diff --git a/.github/README.md b/.github/README.md
index d5cde0d..121be78 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -243,6 +243,14 @@ Thanks goes to these wonderful people
+
{
@@ -199,9 +204,8 @@ function FaceDetector({
);
}
-FaceDetector.isBrowserSupport = () => navigator?.mediaDevices && globalThis.FaceDetector;
-
FaceDetector.propTypes = {
+ // showForever: PropTypes.bool,
// successCb: PropTypes.func,
failureCb: PropTypes.func,
loadingCb: PropTypes.func,
@@ -211,14 +215,8 @@ FaceDetector.propTypes = {
cameraType: PropTypes.oneOf(['back', 'front']),
};
-FaceDetector.defaultProps = {
- // successCb: () => {},
- failureCb: () => {},
- loadingCb: () => {},
- // successMsg: '',
- failureMsg: { ...failureMsgDefault },
- zIndex: 9,
- cameraType: 'back',
-};
+const WFaceDetector = Wrapper(FaceDetector, isBrowserSupport);
+
+export { WFaceDetector as FaceDetector };
-export default Wrapper(FaceDetector);
+export default WFaceDetector;
diff --git a/__app/component/FaceDetector/FaceDetectorClose.js b/__app/component/FaceDetector/FaceDetectorClose.js
index 8228cfd..5c956d0 100644
--- a/__app/component/FaceDetector/FaceDetectorClose.js
+++ b/__app/component/FaceDetector/FaceDetectorClose.js
@@ -38,4 +38,6 @@ function FaceDetectorClose({
);
}
+export { FaceDetectorClose };
+
export default FaceDetectorClose;
diff --git a/__app/component/FaceDetector/FaceDetectorFacing.js b/__app/component/FaceDetector/FaceDetectorFacing.js
index c67fbb5..fd0e91f 100644
--- a/__app/component/FaceDetector/FaceDetectorFacing.js
+++ b/__app/component/FaceDetector/FaceDetectorFacing.js
@@ -32,4 +32,6 @@ function FaceDetectorFacing({
);
}
+export { FaceDetectorFacing };
+
export default FaceDetectorFacing;
diff --git a/__app/component/FaceDetector/FaceDetectorFlash.js b/__app/component/FaceDetector/FaceDetectorFlash.js
index 50f0066..8b1a7bc 100644
--- a/__app/component/FaceDetector/FaceDetectorFlash.js
+++ b/__app/component/FaceDetector/FaceDetectorFlash.js
@@ -1,6 +1,6 @@
import React from 'react';
-function FaceDetector({
+function FaceDetectorFlash({
toggleFlash,
children,
zIndex,
@@ -32,4 +32,6 @@ function FaceDetector({
);
}
-export default FaceDetector;
+export { FaceDetectorFlash };
+
+export default FaceDetectorFlash;
diff --git a/__app/component/FaceDetector/README.md b/__app/component/FaceDetector/README.md
index 068e26e..416effc 100644
--- a/__app/component/FaceDetector/README.md
+++ b/__app/component/FaceDetector/README.md
@@ -12,8 +12,8 @@ A minimal [Demo Link](https://6jpxdq.csb.app/?component=FaceDetector)
| Value | Used as a | Description|
|--------- | -------- |-----------------|
-|
FaceDetector | Component :white_check_mark: | Can be used as Component |
-|
faceDetector | Service :x: | Can't be used as Service |
+| FaceDetector | :white_check_mark: Component | Can be used as Component |
+| faceDetector | :x: Service | Can be used as Service |
##### 1. Here's an example of basic usage with Multiple Import: with Default Import:
```javascript
@@ -134,14 +134,6 @@ return (
}
-
-
-
- showForever
- |
- Boolean |
- To hide/remove unsupported feature, make it false. Default value is true |
- --- |
|
@@ -149,6 +141,26 @@ return (
|
|
+
+ Props
+ |
+
+ Type
+ |
+
+ Description
+ |
+
+ Default Values
+ |
+
+
+ showForever
+ |
+ Boolean |
+ To hide/remove unsupported feature, make it false. |
+ Default value is true. |
+
### Child Component
diff --git a/__app/component/FaceDetector/index.js b/__app/component/FaceDetector/index.js
index 42a4287..8188946 100644
--- a/__app/component/FaceDetector/index.js
+++ b/__app/component/FaceDetector/index.js
@@ -1,18 +1,6 @@
-import FaceDetector from './FaceDetector';
-import FaceDetectorFlash from './FaceDetectorFlash';
-import FaceDetectorClose from './FaceDetectorClose';
-import FaceDetectorFacing from './FaceDetectorFacing';
+export * from './FaceDetector';
+export * from './FaceDetectorClose';
+export * from './FaceDetectorFlash';
+export * from './FaceDetectorFacing';
-export {
- FaceDetector,
- FaceDetectorFlash,
- FaceDetectorClose,
- FaceDetectorFacing,
-};
-
-export default {
- Init: FaceDetector,
- Flash: FaceDetectorFlash,
- Close: FaceDetectorClose,
- Facing: FaceDetectorFacing,
-};
+export { default } from './FaceDetector';
diff --git a/__app/component/LiveLocationTracking/LiveLocationTracking.js b/__app/component/LiveLocationTracking/LiveLocationTracking.js
index 4bd3201..11233cd 100644
--- a/__app/component/LiveLocationTracking/LiveLocationTracking.js
+++ b/__app/component/LiveLocationTracking/LiveLocationTracking.js
@@ -2,7 +2,7 @@
import React, { useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import dependentJsService from '../services/dependentJsService';
-import { handleError, handleSuccess, handleLoading } from '../services/handlerService';
+import { handleSuccess, handleError, handleLoading } from '../services/handlerService';
import Wrapper from '../Wrapper/Wrapper';
const failureMsgDefault = {
@@ -16,6 +16,8 @@ const failureMsgDefault = {
error: '',
};
+const isBrowserSupport = () => navigator?.geolocation?.watchPosition;
+
const checkPermitByBrowser = async (failureMsg, failureCb) => {
try {
const permissions = await navigator.permissions.query({ name: 'geolocation' });
@@ -43,23 +45,23 @@ const checkScriptInBrowser = async (failureMsg, failureCb, isProdKey, googleKey)
};
function LiveLocationTracking({
- successCb,
- failureCb,
- successMsg,
- failureMsg: failureMsgProps,
- loadingCb,
- googleKey,
- isProdKey,
- destinationLatLng,
- mapTypeControl,
- panControl,
- zoomControl,
- scaleControl,
- streetViewControl,
- overviewMapControl,
- rotateControl,
- fullscreenControl,
-}) {
+ successCb = () => {},
+ failureCb = () => {},
+ loadingCb = () => {},
+ successMsg = 'Successfully!!',
+ failureMsg: failureMsgProps = { ...failureMsgDefault },
+ googleKey = '',
+ isProdKey = true,
+ destinationLatLng = { lat: 12.9387901, lng: 77.6407703 },
+ mapTypeControl = true,
+ panControl = true,
+ zoomControl = true,
+ scaleControl = true,
+ streetViewControl = true,
+ overviewMapControl = true,
+ rotateControl = true,
+ fullscreenControl = true,
+} = {}) {
const directionMapRef = useRef();
let directionsService;
let directionsRenderer;
@@ -167,8 +169,10 @@ function LiveLocationTracking({
};
const init = async () => {
- if (LiveLocationTracking.isBrowserSupport()) {
+ if (isBrowserSupport()) {
handleLoading({ loadingCb });
+
+ // Your Code will start from here
const isPermitByBrowser = await checkPermitByBrowser(failureMsg, failureCb);
const isScriptInBrowser = await checkScriptInBrowser(
failureMsg,
@@ -203,6 +207,7 @@ function LiveLocationTracking({
// }, 200);
}
};
+ // Your Code will end here
} else {
return handleError({ msgType: 'UN_SUPPORTED_FEATURE', msg: failureMsg.unSupported, failureCb });
}
@@ -224,9 +229,9 @@ function LiveLocationTracking({
);
}
-LiveLocationTracking.isBrowserSupport = () => navigator?.geolocation?.watchPosition;
-
LiveLocationTracking.propTypes = {
+ // eslint-disable-next-line react/no-unused-prop-types
+ showForever: PropTypes.bool,
successCb: PropTypes.func,
failureCb: PropTypes.func,
loadingCb: PropTypes.func,
@@ -245,28 +250,8 @@ LiveLocationTracking.propTypes = {
fullscreenControl: PropTypes.bool,
};
-LiveLocationTracking.defaultProps = {
- successCb: () => {},
- failureCb: () => {},
- loadingCb: () => {},
- successMsg: '',
- failureMsg: { ...failureMsgDefault },
-
- destinationLatLng: { lat: 12.9387901, lng: 77.6407703 },
- isProdKey: true,
- googleKey: '',
- mapTypeControl: true,
- panControl: true,
- zoomControl: true,
- scaleControl: true,
- streetViewControl: true,
- overviewMapControl: true,
- rotateControl: true,
- fullscreenControl: true,
-};
+const WLiveLocationTracking = Wrapper(LiveLocationTracking, isBrowserSupport);
-export default Wrapper(LiveLocationTracking);
+export { WLiveLocationTracking as LiveLocationTracking };
-// WALKING - bike
-// TWO_WHEELER - Walking
-// DRIVING - Car
+export default WLiveLocationTracking;
diff --git a/__app/component/LiveLocationTracking/README.md b/__app/component/LiveLocationTracking/README.md
index 3964639..0dccbce 100644
--- a/__app/component/LiveLocationTracking/README.md
+++ b/__app/component/LiveLocationTracking/README.md
@@ -139,22 +139,22 @@ return (
Props
- Type
+ Type
|
- Description
+ Description
|
Default Values
|
- showForever
+ showForever
|
- Boolean |
+ Boolean |
To hide/remove unsupported feature, make it false. |
- Default value is true |
-
+
Default value is true. |
+
googleKey (*) |
String |
@@ -175,52 +175,53 @@ return (
mapTypeControl |
- |
- |
+ Boolean |
+ This allows the user to choose a map type (ROADMAP, SATELLITE, HYBRID, or TERRAIN) |
|
panControl |
- |
+ Boolean |
|
|
zoomControl |
- |
- |
+ Boolean |
+ This adds a buttons for changing the zoom level of the map. |
|
scaleControl |
- |
- |
+ Boolean |
+ This displays a map scale element. |
|
streetViewControl |
- |
- |
+ Boolean |
+ This contains a Pegman icon which can be dragged onto the map to enable Street View. |
|
overviewMapControl |
- |
+ Boolean |
|
|
rotateControl |
- |
- |
+ Boolean |
+ This provides a combination of tilt and rotate options for maps containing oblique imagery. This control appears by default near the bottom right of the map. |
|
fullscreenControl |
- |
- |
+ Boolean |
+ This offers the option to open the map in fullscreen mode.
+ Note: iOS doesn't support the fullscreen feature. The fullscreen control is therefore not visible on iOS devices.
+ |
|
-
diff --git a/__app/component/LiveLocationTracking/index.js b/__app/component/LiveLocationTracking/index.js
index b230cdb..bee1e89 100644
--- a/__app/component/LiveLocationTracking/index.js
+++ b/__app/component/LiveLocationTracking/index.js
@@ -1,5 +1,2 @@
-import LiveLocationTracking from './LiveLocationTracking';
-
-export { LiveLocationTracking };
-
-export default LiveLocationTracking;
+export * from './LiveLocationTracking';
+export { default } from './LiveLocationTracking';
diff --git a/__app/component/SnapScanner/README.md b/__app/component/SnapScanner/README.md
index 8bdbadc..c399a40 100644
--- a/__app/component/SnapScanner/README.md
+++ b/__app/component/SnapScanner/README.md
@@ -150,5 +150,13 @@ return (
To hide/remove unsupported feature, make it false. |
Default value is true. |
+
+
+ via
+ |
+ String |
+ To open gallary/Phone Camera/File System |
+ Default value is gallery. Possible values are gallary/camera/phone |
+