omnipay-reactnative-sdk 1.2.2-beta.8 → 1.2.3-beta.0
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/README.md +43 -93
- package/android/build.gradle +0 -9
- package/android/src/main/AndroidManifest.xml +0 -5
- package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +1 -4
- package/lib/commonjs/components/OmnipayProvider.js +1 -1
- package/lib/commonjs/components/biometrics/FaceVerification.js +235 -275
- package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -1
- package/lib/commonjs/index.js +0 -33
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/OmnipayProvider.js +1 -1
- package/lib/module/components/biometrics/FaceVerification.js +237 -277
- package/lib/module/components/biometrics/FaceVerification.js.map +1 -1
- package/lib/module/index.js +0 -6
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/biometrics/FaceVerification.d.ts +1 -3
- package/lib/typescript/components/biometrics/FaceVerification.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +0 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/components/OmnipayProvider.tsx +1 -1
- package/src/components/biometrics/FaceVerification.tsx +232 -317
- package/src/index.tsx +0 -7
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraView.java +0 -153
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraViewManager.java +0 -49
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessModule.java +0 -557
- package/ios/OmnipayLivenessCameraView.h +0 -15
- package/ios/OmnipayLivenessCameraView.m +0 -80
- package/ios/OmnipayLivenessCameraViewManager.m +0 -19
- package/ios/OmnipayLivenessModule.h +0 -38
- package/ios/OmnipayLivenessModule.m +0 -615
- package/lib/commonjs/components/biometrics/LivenessDetection.js +0 -149
- package/lib/commonjs/components/biometrics/LivenessDetection.js.map +0 -1
- package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js +0 -15
- package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
- package/lib/commonjs/components/biometrics/PermissionManager.js +0 -279
- package/lib/commonjs/components/biometrics/PermissionManager.js.map +0 -1
- package/lib/commonjs/components/biometrics/index.js +0 -45
- package/lib/commonjs/components/biometrics/index.js.map +0 -1
- package/lib/commonjs/components/biometrics/types.js +0 -17
- package/lib/commonjs/components/biometrics/types.js.map +0 -1
- package/lib/module/components/biometrics/LivenessDetection.js +0 -129
- package/lib/module/components/biometrics/LivenessDetection.js.map +0 -1
- package/lib/module/components/biometrics/OmnipayLivenessCameraView.js +0 -7
- package/lib/module/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
- package/lib/module/components/biometrics/PermissionManager.js +0 -272
- package/lib/module/components/biometrics/PermissionManager.js.map +0 -1
- package/lib/module/components/biometrics/index.js +0 -12
- package/lib/module/components/biometrics/index.js.map +0 -1
- package/lib/module/components/biometrics/types.js +0 -16
- package/lib/module/components/biometrics/types.js.map +0 -1
- package/lib/typescript/components/biometrics/LivenessDetection.d.ts +0 -33
- package/lib/typescript/components/biometrics/LivenessDetection.d.ts.map +0 -1
- package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts +0 -18
- package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts.map +0 -1
- package/lib/typescript/components/biometrics/PermissionManager.d.ts +0 -58
- package/lib/typescript/components/biometrics/PermissionManager.d.ts.map +0 -1
- package/lib/typescript/components/biometrics/index.d.ts +0 -5
- package/lib/typescript/components/biometrics/index.d.ts.map +0 -1
- package/lib/typescript/components/biometrics/types.d.ts +0 -73
- package/lib/typescript/components/biometrics/types.d.ts.map +0 -1
- package/omnipay-reactnative-sdk.podspec +0 -50
- package/src/components/biometrics/LivenessDetection.ts +0 -178
- package/src/components/biometrics/OmnipayLivenessCameraView.tsx +0 -19
- package/src/components/biometrics/PermissionManager.ts +0 -317
- package/src/components/biometrics/index.ts +0 -11
- package/src/components/biometrics/types.ts +0 -86
package/lib/commonjs/index.js
CHANGED
|
@@ -3,24 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
OmnipayProvider: true,
|
|
8
|
-
useOmnipay: true,
|
|
9
|
-
FaceVerification: true,
|
|
10
|
-
LivenessDetection: true
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "FaceVerification", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _biometrics.FaceVerification;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "LivenessDetection", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _biometrics.LivenessDetection;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
6
|
Object.defineProperty(exports, "OmnipayProvider", {
|
|
25
7
|
enumerable: true,
|
|
26
8
|
get: function () {
|
|
@@ -37,21 +19,6 @@ Object.defineProperty(exports, "useOmnipay", {
|
|
|
37
19
|
var _OmnipayView = _interopRequireDefault(require("./components/OmnipayView"));
|
|
38
20
|
var _OmnipayProvider = require("./components/OmnipayProvider");
|
|
39
21
|
var _useOmnipay = require("./hooks/useOmnipay");
|
|
40
|
-
var _biometrics = require("./components/biometrics");
|
|
41
|
-
var _types = require("./components/biometrics/types");
|
|
42
|
-
Object.keys(_types).forEach(function (key) {
|
|
43
|
-
if (key === "default" || key === "__esModule") return;
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
45
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
46
|
-
Object.defineProperty(exports, key, {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
get: function () {
|
|
49
|
-
return _types[key];
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
22
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
54
|
-
// Biometric components and utilities
|
|
55
|
-
// Biometric types
|
|
56
23
|
var _default = exports.default = _OmnipayView.default;
|
|
57
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_OmnipayView","_interopRequireDefault","require","_OmnipayProvider","_useOmnipay","
|
|
1
|
+
{"version":3,"names":["_OmnipayView","_interopRequireDefault","require","_OmnipayProvider","_useOmnipay","e","__esModule","default","_default","exports","Omnipay"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAgD,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GACjCG,oBAAO","ignoreList":[]}
|
|
@@ -1,158 +1,73 @@
|
|
|
1
|
-
import React, { useState
|
|
2
|
-
import { View, Modal, Dimensions, StyleSheet, TouchableOpacity, Image, Text, ActivityIndicator } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import { OmnipayLivenessCameraView } from './OmnipayLivenessCameraView';
|
|
5
|
-
import { CameraPermissionManager, PermissionResult } from './PermissionManager';
|
|
6
|
-
import { LivenessChallenge } from './types';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Modal, Dimensions, Platform, StyleSheet, TouchableOpacity, Image, Text, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { Camera, useCameraDevice, useCameraPermission } from 'react-native-vision-camera';
|
|
7
4
|
const FaceVerification = ({
|
|
8
5
|
onClose,
|
|
9
6
|
onSuccess,
|
|
10
|
-
primaryColor
|
|
11
|
-
config
|
|
7
|
+
primaryColor
|
|
12
8
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, []);
|
|
22
|
-
const checkSupport = async () => {
|
|
9
|
+
const device = useCameraDevice('front');
|
|
10
|
+
const {
|
|
11
|
+
hasPermission,
|
|
12
|
+
requestPermission
|
|
13
|
+
} = useCameraPermission();
|
|
14
|
+
const [isRequestingPermission, setIsRequestingPermission] = useState(false);
|
|
15
|
+
const handleRequestPermission = async () => {
|
|
16
|
+
setIsRequestingPermission(true);
|
|
23
17
|
try {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (permissionResponse.result !== PermissionResult.GRANTED) {
|
|
30
|
-
console.log('❌ Camera permission denied:', permissionResponse.result);
|
|
31
|
-
setState('failed');
|
|
32
|
-
setError(permissionResponse.result === PermissionResult.BLOCKED ? 'Camera permission is blocked. Please enable it in device settings.' : 'Camera permission is required for face verification.');
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
console.log('✅ Camera permission granted');
|
|
36
|
-
|
|
37
|
-
// Step 2: Check device support (hardware/framework capability)
|
|
38
|
-
console.log('🔍 Checking device capabilities...');
|
|
39
|
-
const supported = await LivenessDetection.isSupported();
|
|
40
|
-
console.log('📱 Device support result:', supported);
|
|
41
|
-
setIsSupported(supported);
|
|
42
|
-
if (supported) {
|
|
43
|
-
console.log('✅ Device supports liveness detection, starting...');
|
|
44
|
-
await startDetection();
|
|
45
|
-
} else {
|
|
46
|
-
console.log('❌ Device does not support liveness detection');
|
|
47
|
-
setState('failed');
|
|
48
|
-
setError('Liveness detection is not supported on this device');
|
|
49
|
-
}
|
|
50
|
-
} catch (err) {
|
|
51
|
-
console.error('💥 Error during initialization:', err);
|
|
52
|
-
setState('failed');
|
|
53
|
-
setError('Failed to initialize liveness detection');
|
|
18
|
+
await requestPermission();
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error('Error requesting camera permission:', error);
|
|
21
|
+
} finally {
|
|
22
|
+
setIsRequestingPermission(false);
|
|
54
23
|
}
|
|
55
24
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
} catch (err) {
|
|
102
|
-
setState('failed');
|
|
103
|
-
setError(err instanceof Error ? err.message : 'Unknown error occurred');
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const getChallengeInstruction = challenge => {
|
|
107
|
-
switch (challenge) {
|
|
108
|
-
case LivenessChallenge.SMILE:
|
|
109
|
-
return 'Please smile';
|
|
110
|
-
case LivenessChallenge.BLINK:
|
|
111
|
-
return 'Please blink';
|
|
112
|
-
case LivenessChallenge.TURN_LEFT:
|
|
113
|
-
return 'Please turn your head left';
|
|
114
|
-
case LivenessChallenge.TURN_RIGHT:
|
|
115
|
-
return 'Please turn your head right';
|
|
116
|
-
default:
|
|
117
|
-
return 'Follow the instruction';
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
const getStateMessage = () => {
|
|
121
|
-
switch (state) {
|
|
122
|
-
case 'initializing':
|
|
123
|
-
return 'Initializing camera...';
|
|
124
|
-
case 'starting':
|
|
125
|
-
return 'Starting face verification...';
|
|
126
|
-
case 'running':
|
|
127
|
-
return challengeProgress || 'Look at the camera';
|
|
128
|
-
case 'completed':
|
|
129
|
-
return 'Face verification completed!';
|
|
130
|
-
case 'failed':
|
|
131
|
-
return error || 'Face verification failed';
|
|
132
|
-
default:
|
|
133
|
-
return 'Please wait...';
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const getStateColor = () => {
|
|
137
|
-
switch (state) {
|
|
138
|
-
case 'completed':
|
|
139
|
-
return '#4CAF50';
|
|
140
|
-
case 'failed':
|
|
141
|
-
return '#F44336';
|
|
142
|
-
case 'running':
|
|
143
|
-
return primaryColor;
|
|
144
|
-
default:
|
|
145
|
-
return '#666';
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
const handleRetry = () => {
|
|
149
|
-
setState('initializing');
|
|
150
|
-
setError(null);
|
|
151
|
-
setCurrentChallenge(null);
|
|
152
|
-
setChallengeProgress('');
|
|
153
|
-
checkSupport();
|
|
25
|
+
const renderPermissionRequest = () => /*#__PURE__*/React.createElement(View, {
|
|
26
|
+
style: styles.permissionContainer
|
|
27
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
28
|
+
style: styles.permissionIconContainer
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
30
|
+
style: styles.permissionIcon
|
|
31
|
+
}, "\uD83D\uDCF7")), /*#__PURE__*/React.createElement(Text, {
|
|
32
|
+
style: styles.permissionTitle
|
|
33
|
+
}, "Camera Permission Required"), /*#__PURE__*/React.createElement(Text, {
|
|
34
|
+
style: styles.permissionDescription
|
|
35
|
+
}, "To verify your identity, we need access to your camera. This allows us to capture your face for secure verification."), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
36
|
+
style: [styles.permissionButton, {
|
|
37
|
+
backgroundColor: primaryColor
|
|
38
|
+
}],
|
|
39
|
+
onPress: handleRequestPermission,
|
|
40
|
+
disabled: isRequestingPermission
|
|
41
|
+
}, isRequestingPermission ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
42
|
+
color: "white",
|
|
43
|
+
size: "small"
|
|
44
|
+
}) : /*#__PURE__*/React.createElement(Text, {
|
|
45
|
+
style: styles.permissionButtonText
|
|
46
|
+
}, "Allow Camera Access")));
|
|
47
|
+
const renderNoDevice = () => /*#__PURE__*/React.createElement(View, {
|
|
48
|
+
style: styles.errorContainer
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
style: styles.errorTitle
|
|
51
|
+
}, "Camera Not Available"), /*#__PURE__*/React.createElement(Text, {
|
|
52
|
+
style: styles.errorSubtitle
|
|
53
|
+
}, "No front camera detected on this device. Face verification requires a front-facing camera."));
|
|
54
|
+
const renderCamera = () => {
|
|
55
|
+
if (!device) return null;
|
|
56
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
57
|
+
style: styles.cameraContainer
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Camera, {
|
|
59
|
+
device: device,
|
|
60
|
+
style: styles.camera,
|
|
61
|
+
isActive: true
|
|
62
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
63
|
+
style: styles.cameraOverlay
|
|
64
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
65
|
+
style: styles.faceFrame
|
|
66
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
67
|
+
style: styles.instructionText
|
|
68
|
+
}, "Position your face within the frame")));
|
|
154
69
|
};
|
|
155
|
-
|
|
70
|
+
console.log(onSuccess, primaryColor);
|
|
156
71
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
157
72
|
visible: true,
|
|
158
73
|
transparent: true,
|
|
@@ -161,7 +76,7 @@ const FaceVerification = ({
|
|
|
161
76
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
162
77
|
style: styles.backdrop,
|
|
163
78
|
activeOpacity: 1,
|
|
164
|
-
onPress:
|
|
79
|
+
onPress: onClose
|
|
165
80
|
}, /*#__PURE__*/React.createElement(View, {
|
|
166
81
|
style: [styles.container]
|
|
167
82
|
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
@@ -172,178 +87,223 @@ const FaceVerification = ({
|
|
|
172
87
|
style: styles.closeIcon
|
|
173
88
|
})), /*#__PURE__*/React.createElement(View, {
|
|
174
89
|
style: styles.contentContainer
|
|
175
|
-
},
|
|
176
|
-
style: styles.title
|
|
177
|
-
}, "Face Verification"), /*#__PURE__*/React.createElement(View, {
|
|
178
|
-
style: styles.cameraContainer
|
|
179
|
-
}, state === 'running' && isSupported ? /*#__PURE__*/React.createElement(OmnipayLivenessCameraView, {
|
|
180
|
-
style: styles.camera
|
|
181
|
-
}) : /*#__PURE__*/React.createElement(View, {
|
|
182
|
-
style: [styles.camera, styles.cameraPlaceholder]
|
|
183
|
-
}, state === 'initializing' || state === 'starting' ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
184
|
-
size: "large",
|
|
185
|
-
color: primaryColor
|
|
186
|
-
}) : state === 'completed' ? /*#__PURE__*/React.createElement(View, {
|
|
187
|
-
style: styles.successIcon
|
|
188
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
189
|
-
style: styles.successText
|
|
190
|
-
}, "\u2713")) : /*#__PURE__*/React.createElement(View, {
|
|
191
|
-
style: styles.errorIcon
|
|
192
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
193
|
-
style: styles.errorText
|
|
194
|
-
}, "!"))), /*#__PURE__*/React.createElement(View, {
|
|
195
|
-
style: styles.overlay
|
|
196
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
197
|
-
style: [styles.instruction, {
|
|
198
|
-
color: getStateColor()
|
|
199
|
-
}]
|
|
200
|
-
}, getStateMessage()))), state === 'running' && currentChallenge && /*#__PURE__*/React.createElement(View, {
|
|
201
|
-
style: styles.progressContainer
|
|
202
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
203
|
-
style: styles.challengeText
|
|
204
|
-
}, getChallengeInstruction(currentChallenge))), /*#__PURE__*/React.createElement(View, {
|
|
205
|
-
style: styles.buttonContainer
|
|
206
|
-
}, showRetryButton && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
207
|
-
style: [styles.retryButton, {
|
|
208
|
-
backgroundColor: primaryColor
|
|
209
|
-
}],
|
|
210
|
-
onPress: handleRetry
|
|
211
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
212
|
-
style: styles.retryButtonText
|
|
213
|
-
}, "Try Again")))))));
|
|
90
|
+
}, !hasPermission && renderPermissionRequest(), hasPermission && !device && renderNoDevice(), hasPermission && device && renderCamera()))));
|
|
214
91
|
};
|
|
215
|
-
|
|
216
|
-
width: screenWidth,
|
|
217
|
-
height: screenHeight
|
|
218
|
-
} = Dimensions.get('window');
|
|
92
|
+
export default FaceVerification;
|
|
219
93
|
const styles = StyleSheet.create({
|
|
220
|
-
|
|
221
|
-
|
|
94
|
+
hide: {
|
|
95
|
+
display: 'none'
|
|
222
96
|
},
|
|
223
|
-
|
|
97
|
+
full: {
|
|
224
98
|
flex: 1,
|
|
225
|
-
|
|
99
|
+
width: '100%',
|
|
100
|
+
height: '100%'
|
|
101
|
+
},
|
|
102
|
+
webview: {
|
|
103
|
+
flex: 1,
|
|
104
|
+
width: '100%',
|
|
105
|
+
height: Dimensions.get('window').height - 40,
|
|
106
|
+
backgroundColor: 'white',
|
|
107
|
+
borderTopRightRadius: 20,
|
|
108
|
+
borderTopLeftRadius: 20,
|
|
109
|
+
paddingTop: 150
|
|
110
|
+
},
|
|
111
|
+
webviewLoader: {
|
|
112
|
+
zIndex: 3,
|
|
113
|
+
backgroundColor: 'white',
|
|
114
|
+
alignItems: 'center',
|
|
226
115
|
justifyContent: 'center',
|
|
227
|
-
|
|
116
|
+
flex: 1,
|
|
117
|
+
width: '100%',
|
|
118
|
+
height: '100%',
|
|
119
|
+
position: 'absolute',
|
|
120
|
+
top: 0,
|
|
121
|
+
left: 0,
|
|
122
|
+
borderTopRightRadius: 20,
|
|
123
|
+
borderTopLeftRadius: 20
|
|
124
|
+
},
|
|
125
|
+
backdrop: {
|
|
126
|
+
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
127
|
+
flex: 1,
|
|
128
|
+
justifyContent: 'flex-end',
|
|
129
|
+
position: 'relative',
|
|
130
|
+
height: '100%'
|
|
228
131
|
},
|
|
229
132
|
container: {
|
|
230
|
-
width: screenWidth * 0.9,
|
|
231
|
-
maxHeight: screenHeight * 0.8,
|
|
232
133
|
backgroundColor: 'white',
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
134
|
+
borderTopRightRadius: 20,
|
|
135
|
+
borderTopLeftRadius: 20,
|
|
136
|
+
maxHeight: Dimensions.get('window').height - 120,
|
|
137
|
+
flex: 1,
|
|
138
|
+
position: 'relative',
|
|
139
|
+
...(Platform.OS === 'android' && {
|
|
140
|
+
overflow: 'hidden'
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
modal: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
backgroundColor: 'rgba(0,0,0,0.48)',
|
|
146
|
+
height: '100%',
|
|
147
|
+
width: '100%'
|
|
236
148
|
},
|
|
237
149
|
close: {
|
|
238
150
|
position: 'absolute',
|
|
239
|
-
top:
|
|
240
|
-
right:
|
|
241
|
-
|
|
242
|
-
|
|
151
|
+
top: 10,
|
|
152
|
+
right: 10,
|
|
153
|
+
backgroundColor: 'white',
|
|
154
|
+
height: 24,
|
|
155
|
+
width: 24,
|
|
156
|
+
borderRadius: 1000,
|
|
157
|
+
alignItems: 'center',
|
|
158
|
+
justifyContent: 'center',
|
|
159
|
+
zIndex: 2
|
|
243
160
|
},
|
|
244
161
|
closeIcon: {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
tintColor: '#666'
|
|
162
|
+
height: 12,
|
|
163
|
+
width: 12
|
|
248
164
|
},
|
|
249
165
|
contentContainer: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
166
|
+
height: '100%',
|
|
167
|
+
position: 'relative',
|
|
168
|
+
borderTopRightRadius: 20,
|
|
169
|
+
borderTopLeftRadius: 20,
|
|
170
|
+
padding: 16
|
|
171
|
+
},
|
|
172
|
+
testContent: {
|
|
173
|
+
paddingTop: 30,
|
|
174
|
+
paddingLeft: 16
|
|
253
175
|
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
176
|
+
testTwoContent: {
|
|
177
|
+
paddingTop: 10,
|
|
178
|
+
paddingLeft: 16
|
|
179
|
+
},
|
|
180
|
+
errorSubtitle: {
|
|
181
|
+
textAlign: 'center',
|
|
182
|
+
fontSize: 14,
|
|
183
|
+
color: '#5e7079',
|
|
258
184
|
marginBottom: 20,
|
|
259
|
-
|
|
185
|
+
paddingHorizontal: 8,
|
|
186
|
+
marginTop: 14
|
|
260
187
|
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
188
|
+
errorContainer: {
|
|
189
|
+
flex: 1,
|
|
190
|
+
justifyContent: 'center',
|
|
191
|
+
alignItems: 'center',
|
|
192
|
+
width: Dimensions.get('window').width,
|
|
193
|
+
height: Dimensions.get('window').height,
|
|
194
|
+
zIndex: 2,
|
|
195
|
+
backgroundColor: 'white'
|
|
196
|
+
},
|
|
197
|
+
retryButton: {
|
|
198
|
+
minWidth: 160,
|
|
199
|
+
marginHorizontal: 'auto'
|
|
200
|
+
},
|
|
201
|
+
button: {
|
|
202
|
+
borderRadius: 6,
|
|
203
|
+
paddingHorizontal: 12,
|
|
204
|
+
paddingVertical: 14,
|
|
205
|
+
borderWidth: 1,
|
|
206
|
+
alignItems: 'center',
|
|
207
|
+
justifyContent: 'center'
|
|
208
|
+
},
|
|
209
|
+
buttonText: {
|
|
210
|
+
color: 'white',
|
|
211
|
+
fontSize: 16,
|
|
212
|
+
paddingHorizontal: 30
|
|
269
213
|
},
|
|
270
214
|
camera: {
|
|
271
215
|
flex: 1,
|
|
272
216
|
width: '100%',
|
|
273
|
-
height:
|
|
217
|
+
height: 400
|
|
274
218
|
},
|
|
275
|
-
|
|
219
|
+
// Permission request styles
|
|
220
|
+
permissionContainer: {
|
|
221
|
+
flex: 1,
|
|
276
222
|
justifyContent: 'center',
|
|
277
223
|
alignItems: 'center',
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
overlay: {
|
|
281
|
-
position: 'absolute',
|
|
282
|
-
bottom: 0,
|
|
283
|
-
left: 0,
|
|
284
|
-
right: 0,
|
|
285
|
-
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
286
|
-
padding: 15,
|
|
287
|
-
alignItems: 'center'
|
|
224
|
+
paddingHorizontal: 24,
|
|
225
|
+
paddingVertical: 40
|
|
288
226
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
227
|
+
permissionIconContainer: {
|
|
228
|
+
width: 80,
|
|
229
|
+
height: 80,
|
|
230
|
+
borderRadius: 40,
|
|
231
|
+
backgroundColor: '#f0f0f0',
|
|
232
|
+
justifyContent: 'center',
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
marginBottom: 24
|
|
294
235
|
},
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
alignItems: 'center'
|
|
236
|
+
permissionIcon: {
|
|
237
|
+
fontSize: 40
|
|
298
238
|
},
|
|
299
|
-
|
|
300
|
-
fontSize:
|
|
239
|
+
permissionTitle: {
|
|
240
|
+
fontSize: 20,
|
|
301
241
|
fontWeight: '600',
|
|
302
|
-
color: '#
|
|
303
|
-
textAlign: 'center'
|
|
242
|
+
color: '#1a1a1a',
|
|
243
|
+
textAlign: 'center',
|
|
244
|
+
marginBottom: 12
|
|
304
245
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
246
|
+
permissionDescription: {
|
|
247
|
+
fontSize: 16,
|
|
248
|
+
color: '#666',
|
|
249
|
+
textAlign: 'center',
|
|
250
|
+
lineHeight: 22,
|
|
251
|
+
marginBottom: 32
|
|
309
252
|
},
|
|
310
|
-
|
|
311
|
-
paddingHorizontal:
|
|
312
|
-
paddingVertical:
|
|
253
|
+
permissionButton: {
|
|
254
|
+
paddingHorizontal: 32,
|
|
255
|
+
paddingVertical: 16,
|
|
313
256
|
borderRadius: 8,
|
|
314
|
-
|
|
257
|
+
minWidth: 200,
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
justifyContent: 'center'
|
|
315
260
|
},
|
|
316
|
-
|
|
261
|
+
permissionButtonText: {
|
|
317
262
|
color: 'white',
|
|
318
263
|
fontSize: 16,
|
|
319
264
|
fontWeight: '600'
|
|
320
265
|
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
266
|
+
// Error styles
|
|
267
|
+
errorTitle: {
|
|
268
|
+
fontSize: 18,
|
|
269
|
+
fontWeight: '600',
|
|
270
|
+
color: '#1a1a1a',
|
|
271
|
+
textAlign: 'center',
|
|
272
|
+
marginBottom: 8
|
|
328
273
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
274
|
+
// Camera styles
|
|
275
|
+
cameraContainer: {
|
|
276
|
+
flex: 1,
|
|
277
|
+
position: 'relative'
|
|
333
278
|
},
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
279
|
+
cameraOverlay: {
|
|
280
|
+
position: 'absolute',
|
|
281
|
+
top: 0,
|
|
282
|
+
left: 0,
|
|
283
|
+
right: 0,
|
|
284
|
+
bottom: 0,
|
|
339
285
|
justifyContent: 'center',
|
|
340
286
|
alignItems: 'center'
|
|
341
287
|
},
|
|
342
|
-
|
|
343
|
-
|
|
288
|
+
faceFrame: {
|
|
289
|
+
width: 200,
|
|
290
|
+
height: 250,
|
|
291
|
+
borderWidth: 3,
|
|
292
|
+
borderColor: 'white',
|
|
293
|
+
borderRadius: 100,
|
|
294
|
+
borderStyle: 'dashed',
|
|
295
|
+
backgroundColor: 'transparent'
|
|
296
|
+
},
|
|
297
|
+
instructionText: {
|
|
344
298
|
color: 'white',
|
|
345
|
-
|
|
299
|
+
fontSize: 16,
|
|
300
|
+
fontWeight: '500',
|
|
301
|
+
textAlign: 'center',
|
|
302
|
+
marginTop: 20,
|
|
303
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
304
|
+
paddingHorizontal: 16,
|
|
305
|
+
paddingVertical: 8,
|
|
306
|
+
borderRadius: 20
|
|
346
307
|
}
|
|
347
308
|
});
|
|
348
|
-
export default FaceVerification;
|
|
349
309
|
//# sourceMappingURL=FaceVerification.js.map
|