react-native-biometric-verifier 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/Card.js +3 -3
- package/src/components/Loader.js +1 -1
- package/src/index.js +4 -4
- package/src/utils/getLoaderGif.js +3 -3
package/package.json
CHANGED
package/src/components/Card.js
CHANGED
|
@@ -4,7 +4,7 @@ import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Global } from '../utils/Global';
|
|
6
6
|
|
|
7
|
-
export const Card = ({ employeeData, apiurl,
|
|
7
|
+
export const Card = ({ employeeData, apiurl, fileurl = 'file/filedownload/photo/' }) => {
|
|
8
8
|
const [imageError, setImageError] = useState(false);
|
|
9
9
|
|
|
10
10
|
if (!employeeData || typeof employeeData !== 'object') {
|
|
@@ -18,7 +18,7 @@ export const Card = ({ employeeData, apiurl, imageurl = 'file/filedownload/photo
|
|
|
18
18
|
const employeeId = faceid || 'N/A';
|
|
19
19
|
|
|
20
20
|
const imageSource = !imageError && img
|
|
21
|
-
? { uri: `${apiurl}${
|
|
21
|
+
? { uri: `${apiurl}${fileurl}${img}` }
|
|
22
22
|
: null;
|
|
23
23
|
|
|
24
24
|
return (
|
|
@@ -65,7 +65,7 @@ Card.propTypes = {
|
|
|
65
65
|
img: PropTypes.string,
|
|
66
66
|
}),
|
|
67
67
|
apiurl: PropTypes.string,
|
|
68
|
-
|
|
68
|
+
fileurl: PropTypes.string,
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
const styles = StyleSheet.create({
|
package/src/components/Loader.js
CHANGED
|
@@ -16,7 +16,7 @@ export default function Loader({
|
|
|
16
16
|
overlayColor = 'rgba(0,0,0,0.4)',
|
|
17
17
|
loaderColor = 'lightblue',
|
|
18
18
|
size = 50,
|
|
19
|
-
gifSource
|
|
19
|
+
gifSource,
|
|
20
20
|
message = '',
|
|
21
21
|
messageStyle = {},
|
|
22
22
|
animationType = 'fade',
|
package/src/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import CaptureImageWithoutEdit from "./components/CaptureImageWithoutEdit";
|
|
|
40
40
|
import StepIndicator from "./components/StepIndicator";
|
|
41
41
|
|
|
42
42
|
const BiometricModal = React.memo(
|
|
43
|
-
({ data, qrscan = false, callback, apiurl, onclose, frameProcessorFps, livenessLevel, imageurl }) => {
|
|
43
|
+
({ data, qrscan = false, callback, apiurl, onclose, frameProcessorFps, livenessLevel, fileurl, imageurl }) => {
|
|
44
44
|
const navigation = useNavigation();
|
|
45
45
|
|
|
46
46
|
// Custom hooks
|
|
@@ -547,8 +547,8 @@ const BiometricModal = React.memo(
|
|
|
547
547
|
const loaderSource = useMemo(
|
|
548
548
|
() =>
|
|
549
549
|
state.isLoading &&
|
|
550
|
-
getLoaderGif(state.animationState, state.currentStep, apiurl),
|
|
551
|
-
[state.isLoading, state.animationState, state.currentStep, apiurl]
|
|
550
|
+
getLoaderGif(state.animationState, state.currentStep, apiurl, imageurl),
|
|
551
|
+
[state.isLoading, state.animationState, state.currentStep, apiurl, imageurl]
|
|
552
552
|
);
|
|
553
553
|
|
|
554
554
|
// Determine if camera should be shown
|
|
@@ -608,7 +608,7 @@ const BiometricModal = React.memo(
|
|
|
608
608
|
|
|
609
609
|
{state.employeeData && (
|
|
610
610
|
<View style={styles.cardContainer}>
|
|
611
|
-
<Card employeeData={state.employeeData} apiurl={apiurl}
|
|
611
|
+
<Card employeeData={state.employeeData} apiurl={apiurl} fileurl={fileurl} />
|
|
612
612
|
</View>
|
|
613
613
|
)}
|
|
614
614
|
|
|
@@ -6,11 +6,11 @@ import { Global } from "./Global";
|
|
|
6
6
|
* @param {string} currentStep - Current step of verification
|
|
7
7
|
* @returns {any} - Gif image source or null
|
|
8
8
|
*/
|
|
9
|
-
export const getLoaderGif = (animationState, currentStep,APIURL) => {
|
|
9
|
+
export const getLoaderGif = (animationState, currentStep,APIURL,imageurl ='file/getCommonFile/image/') => {
|
|
10
10
|
const FaceGifUrl =
|
|
11
|
-
`${APIURL}
|
|
11
|
+
`${APIURL}${imageurl}Face.gif`;
|
|
12
12
|
const LocationGifUrl =
|
|
13
|
-
`${APIURL}
|
|
13
|
+
`${APIURL}${imageurl}Location.gif`;
|
|
14
14
|
|
|
15
15
|
if (
|
|
16
16
|
animationState === Global.AnimationStates.faceScan ||
|