@sanctum-key/react-native-sdk 1.0.9 → 1.0.11
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 +3 -3
- package/android/build/.transforms/{c9d62bb333688ab562f51958998d5a48 → 9e34a0354bf8964d60c4c1392f5aa5b2}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.java +2 -2
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_file_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.class +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +42 -42
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +52 -52
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkView.class +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkModule.kt → sanctumkey/com/SanctumKeySdkModule.kt} +21 -18
- package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkView.kt → sanctumkey/com/SanctumKeySdkView.kt} +2 -2
- package/build/package.json +5 -5
- package/build/src/App.d.ts +2 -2
- package/build/src/App.d.ts.map +1 -1
- package/build/src/App.js +2 -2
- package/build/src/App.js.map +1 -1
- package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
- package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
- package/build/src/SanctumKeySdk.types.js +2 -0
- package/build/src/SanctumKeySdk.types.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
- package/build/src/SanctumKeySdkModule.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
- package/build/src/SanctumKeySdkModule.web.js.map +1 -0
- package/build/src/SanctumKeySdkView.d.ts +4 -0
- package/build/src/SanctumKeySdkView.d.ts.map +1 -0
- package/build/src/SanctumKeySdkView.js +7 -0
- package/build/src/SanctumKeySdkView.js.map +1 -0
- package/build/src/SanctumKeySdkView.web.d.ts +4 -0
- package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
- package/build/src/SanctumKeySdkView.web.js.map +1 -0
- package/build/src/components/KYCElements/CountrySelection.d.ts.map +1 -1
- package/build/src/components/KYCElements/CountrySelection.js +259 -63
- package/build/src/components/KYCElements/CountrySelection.js.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +231 -69
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js +160 -21
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
- package/build/src/components/NativeCameraView.js +1 -1
- package/build/src/components/NativeCameraView.js.map +1 -1
- package/build/src/components/TemplateKYCExample.d.ts +4 -3
- package/build/src/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/src/components/TemplateKYCExample.js +2 -2
- package/build/src/components/TemplateKYCExample.js.map +1 -1
- package/build/src/config/allowedDomains.js +6 -6
- package/build/src/config/allowedDomains.js.map +1 -1
- package/build/src/config/region_mapping.json +727 -0
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/src/modules/api/CardAuthentification.js +3 -7
- package/build/src/modules/api/CardAuthentification.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts +1 -2
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +112 -60
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/camera/NativeCameraModule.js +17 -17
- package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
- package/build/src/web/WebKYCEntry.d.ts +2 -2
- package/build/src/web/WebKYCEntry.d.ts.map +1 -1
- package/build/src/web/WebKYCEntry.js +3 -2
- package/build/src/web/WebKYCEntry.js.map +1 -1
- package/expo-module.config.json +3 -3
- package/ios/TransfergratisSdk.podspec +2 -2
- package/ios/TransfergratisSdkModule.swift +12 -12
- package/package.json +5 -5
- package/src/App.tsx +2 -2
- package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
- package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
- package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
- package/src/SanctumKeySdkView.tsx +11 -0
- package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
- package/src/components/KYCElements/CountrySelection.tsx +300 -74
- package/src/components/KYCElements/IDCardCapture.tsx +322 -157
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +201 -29
- package/src/components/NativeCameraView.tsx +1 -1
- package/src/components/TemplateKYCExample.tsx +23 -4
- package/src/config/allowedDomains.ts +6 -6
- package/src/i18n/README.md +1 -1
- package/src/index.ts +3 -3
- package/src/modules/api/CardAuthentification.ts +5 -8
- package/src/modules/api/KYCService.ts +174 -106
- package/src/modules/camera/NativeCameraModule.ts +17 -17
- package/src/web/WebKYCEntry.tsx +3 -3
- package/android/build/.transforms/ab90740579f5bd05b27b4343ada2d1c9/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/c9d62bb333688ab562f51958998d5a48/results.bin +0 -1
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0 +0 -0
- package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
- package/build/src/TransfergratisSdk.types.js +0 -2
- package/build/src/TransfergratisSdk.types.js.map +0 -1
- package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.js.map +0 -1
- package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.web.js.map +0 -1
- package/build/src/TransfergratisSdkView.d.ts +0 -4
- package/build/src/TransfergratisSdkView.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.js +0 -7
- package/build/src/TransfergratisSdkView.js.map +0 -1
- package/build/src/TransfergratisSdkView.web.d.ts +0 -4
- package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.web.js.map +0 -1
- package/src/TransfergratisSdkView.tsx +0 -11
- /package/android/build/.transforms/{ab90740579f5bd05b27b4343ada2d1c9 → 9e34a0354bf8964d60c4c1392f5aa5b2}/results.bin +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, Image, ScrollView, Platform, ActivityIndicator } from 'react-native';
|
|
2
|
+
import { View, Text, StyleSheet, Image, ScrollView, Platform, ActivityIndicator, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { showAlert } from '../../utils/platformAlert';
|
|
4
4
|
import { EnhancedCameraView } from '../EnhancedCameraView';
|
|
5
5
|
import { GovernmentDocumentTypeShorted, GovernmentDocumentTypeBackend } from '../../types/KYC.types';
|
|
@@ -12,6 +12,12 @@ import { backVerification, checkTemplateType, frontVerification } from '../../mo
|
|
|
12
12
|
import { getDocumentTypeInfo } from '../../utils/get-document-type-info';
|
|
13
13
|
import pathToBase64 from '../../utils/pathToBase64';
|
|
14
14
|
import { cropByObb, cropImageWithBBoxWithTolerance, getObbConfidence, OBB_CONFIDENCE_THRESHOLD } from '../../utils/cropByObb';
|
|
15
|
+
import REGION_MAPPING from '../../config/region_mapping.json';
|
|
16
|
+
const ISO_TO_COUNTRY_NAME = {
|
|
17
|
+
'KE': 'Kenya', 'CM': 'Cameroon', 'NG': 'Nigeria', 'CA': 'Canada',
|
|
18
|
+
'FR': 'France', 'GH': 'Ghana', 'ZA': 'South Africa', 'GB': 'Britain',
|
|
19
|
+
'CI': 'Ivory Coast', 'SN': 'Senegal', 'TG': 'Togo', 'ML': 'Mali'
|
|
20
|
+
};
|
|
15
21
|
export const IDCardCapture = ({ component, value = {}, onValueChange, error, language = 'en' }) => {
|
|
16
22
|
const { t, locale } = useI18n();
|
|
17
23
|
const [showCamera, setShowCamera] = useState(false);
|
|
@@ -21,6 +27,7 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
21
27
|
const [silentCaptureResult, setSilentCaptureResult] = useState({ success: false, isAnalyzing: false });
|
|
22
28
|
const [isProcessingCapture, setIsProcessingCapture] = useState(false);
|
|
23
29
|
const [processingImagePath, setProcessingImagePath] = useState(null);
|
|
30
|
+
const [cameraKey, setCameraKey] = useState(0);
|
|
24
31
|
const documentTypeMapping = {
|
|
25
32
|
'nationalId': 'national_id', 'passport': 'passport', 'driversLicense': 'drivers_licence',
|
|
26
33
|
'residencePermit': 'permanent_residence', 'healthInsuranceCard': 'health_insurance_card',
|
|
@@ -31,6 +38,9 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
31
38
|
return text[currentSide][locale] || '';
|
|
32
39
|
return "";
|
|
33
40
|
};
|
|
41
|
+
const refreshCamera = () => {
|
|
42
|
+
setCameraKey(prev => prev + 1);
|
|
43
|
+
};
|
|
34
44
|
const countrySelectionData = useMemo(() => {
|
|
35
45
|
const countrySelectionComponent = state.template.components.find(c => c.type === 'country_selection');
|
|
36
46
|
return countrySelectionComponent ? state.componentData[countrySelectionComponent.id] : null;
|
|
@@ -48,17 +58,20 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
48
58
|
if (JSON.stringify(value) !== JSON.stringify(capturedImages)) {
|
|
49
59
|
const updatedImages = value;
|
|
50
60
|
setCapturedImages(updatedImages);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
const currentImageData = updatedImages[currentSide];
|
|
62
|
+
if (currentImageData?.dir) {
|
|
63
|
+
setSilentCaptureResult(prev => ({
|
|
64
|
+
...prev,
|
|
65
|
+
path: currentImageData.dir,
|
|
66
|
+
success: true,
|
|
67
|
+
isAnalyzing: false,
|
|
68
|
+
mrz: currentImageData.mrz || '',
|
|
69
|
+
templatePath: currentImageData.templatePath || '',
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
73
|
}
|
|
61
|
-
}, [value]);
|
|
74
|
+
}, [value, currentSide]);
|
|
62
75
|
const cameraConfig = useMemo(() => {
|
|
63
76
|
const instructions = selectedDocumentType
|
|
64
77
|
? (locale === 'en' ? getDocumentTypeInfo(selectedDocumentType.type).instructions.en : getDocumentTypeInfo(selectedDocumentType.type).instructions.fr)
|
|
@@ -69,7 +82,6 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
69
82
|
};
|
|
70
83
|
}, [selectedDocumentType, locale, component.instructions]);
|
|
71
84
|
const retakePicture = (sideToRetake) => {
|
|
72
|
-
// Completely wipe all processing states to prevent leakage
|
|
73
85
|
setIsProcessingCapture(false);
|
|
74
86
|
setProcessingImagePath(null);
|
|
75
87
|
setSilentCaptureResult({ path: '', success: false, isAnalyzing: false, error: '', templatePath: '', mrz: '', bbox: undefined });
|
|
@@ -82,13 +94,30 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
82
94
|
onValueChange(newValue);
|
|
83
95
|
}
|
|
84
96
|
};
|
|
85
|
-
const getCurrentSideVerification = (currentSide) => {
|
|
86
|
-
|
|
97
|
+
const getCurrentSideVerification = (currentSide, countryKey) => {
|
|
98
|
+
const rawDocType = countrySelectionData?.documentType;
|
|
99
|
+
if (!rawDocType || !countryKey) {
|
|
87
100
|
return { authMethod: [], mrzTypes: [], regionMapping: null, key: 'root' };
|
|
88
|
-
|
|
101
|
+
}
|
|
102
|
+
const rawCountryName = ISO_TO_COUNTRY_NAME[countryData?.code || ''] || countryData?.code || countryKey;
|
|
103
|
+
const baseMapping = REGION_MAPPING.regionMapping || REGION_MAPPING;
|
|
104
|
+
let countryMapping = baseMapping[rawCountryName];
|
|
105
|
+
// Fallback search in case of case mismatches
|
|
106
|
+
if (!countryMapping) {
|
|
107
|
+
const foundKey = Object.keys(baseMapping).find(k => k.toLowerCase() === rawCountryName.toLowerCase() || k.toLowerCase() === countryKey.toLowerCase());
|
|
108
|
+
if (foundKey)
|
|
109
|
+
countryMapping = baseMapping[foundKey];
|
|
110
|
+
}
|
|
111
|
+
if (!countryMapping) {
|
|
112
|
+
return { authMethod: [], mrzTypes: [], regionMapping: null, key: 'root' };
|
|
113
|
+
}
|
|
114
|
+
const regionMapping = countryMapping[rawDocType];
|
|
115
|
+
if (!regionMapping) {
|
|
116
|
+
return { authMethod: [], mrzTypes: [], regionMapping: null, key: 'root' };
|
|
117
|
+
}
|
|
89
118
|
const authMethod = [];
|
|
90
119
|
const mrzTypes = [];
|
|
91
|
-
const key =
|
|
120
|
+
const key = countrySelectionData.region?.trim()?.length > 0 ? countrySelectionData.region.trim() : 'root';
|
|
92
121
|
if (regionMapping?.[key] && Array.isArray(regionMapping[key])) {
|
|
93
122
|
regionMapping[key].forEach((item) => {
|
|
94
123
|
if (item[currentSide]) {
|
|
@@ -168,16 +197,16 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
168
197
|
return;
|
|
169
198
|
if (result.success && result.path) {
|
|
170
199
|
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: true, success: false, error: '' }));
|
|
171
|
-
|
|
200
|
+
// 🚨 Force a template fetch if we haven't successfully saved the current side yet
|
|
201
|
+
let templatePath = capturedImages[currentSide]?.templatePath || '';
|
|
172
202
|
let templateBbox;
|
|
173
203
|
let templateResponse;
|
|
174
204
|
if (!selectedDocumentType) {
|
|
175
205
|
setSilentCaptureResult((prev) => ({ ...prev, isAnalyzing: false, success: false, error: 'Document type not selected' }));
|
|
176
206
|
return;
|
|
177
207
|
}
|
|
178
|
-
const regionMappings = getCurrentSideVerification(currentSide);
|
|
179
208
|
try {
|
|
180
|
-
if (templatePath
|
|
209
|
+
if (!templatePath) {
|
|
181
210
|
const templateType = await checkTemplateType({ path: result.path || '', docType: selectedDocumentType?.type, docRegion: countryData?.code || "", postfix: currentSide }, env);
|
|
182
211
|
templateResponse = templateType;
|
|
183
212
|
if (templateType.template_path)
|
|
@@ -195,16 +224,33 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
195
224
|
catch { }
|
|
196
225
|
}
|
|
197
226
|
}
|
|
227
|
+
const extractedCountryKey = templatePath ? templatePath.split('/')[0] : (ISO_TO_COUNTRY_NAME[countryData?.code || ''] || 'root');
|
|
228
|
+
const regionMappings = getCurrentSideVerification(currentSide, extractedCountryKey);
|
|
198
229
|
let verificationRes;
|
|
199
230
|
if (currentSide === 'front') {
|
|
200
231
|
const matchedAuthMethod = getCorrespondingAuthMethod(templatePath, regionMappings.regionMapping, regionMappings.key || '', 'front');
|
|
201
|
-
const mrzType = getCorrespondingMrzType(templatePath, regionMappings.regionMapping, regionMappings.key || '') || '';
|
|
232
|
+
const mrzType = getCorrespondingMrzType(templatePath, regionMappings.regionMapping, regionMappings.key || '') || 'TD1';
|
|
202
233
|
verificationRes = await frontVerification({ path: result.path, regionMapping: { authMethod: matchedAuthMethod ? [matchedAuthMethod] : regionMappings.authMethod, mrzTypes: regionMappings.mrzTypes }, selectedDocumentType: GovernmentDocumentTypeShorted[selectedDocumentType?.type] || '', code: countryData?.code || '', currentSide, templatePath, mrzType }, env);
|
|
203
234
|
}
|
|
204
235
|
else {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
236
|
+
let matchedBackAuthMethod = getCorrespondingAuthMethod(templatePath, regionMappings.regionMapping, regionMappings.key || '', 'back');
|
|
237
|
+
if (!matchedBackAuthMethod && currentSide === 'back') {
|
|
238
|
+
matchedBackAuthMethod = 'MRZ';
|
|
239
|
+
}
|
|
240
|
+
const backMrzType = getCorrespondingMrzType(templatePath, regionMappings.regionMapping, regionMappings.key || '') || 'TD1';
|
|
241
|
+
verificationRes = await backVerification({
|
|
242
|
+
path: result.path,
|
|
243
|
+
regionMapping: {
|
|
244
|
+
authMethod: matchedBackAuthMethod ? [matchedBackAuthMethod] : regionMappings.authMethod,
|
|
245
|
+
mrzTypes: regionMappings.mrzTypes
|
|
246
|
+
},
|
|
247
|
+
selectedDocumentType: GovernmentDocumentTypeShorted[selectedDocumentType.type] || '',
|
|
248
|
+
code: countryData?.code || '',
|
|
249
|
+
currentSide,
|
|
250
|
+
templatePath,
|
|
251
|
+
mrzType: backMrzType,
|
|
252
|
+
templateResponse
|
|
253
|
+
}, env);
|
|
208
254
|
}
|
|
209
255
|
const bbox = verificationRes?.bbox || templateBbox;
|
|
210
256
|
const mrz = verificationRes?.mrz ? JSON.stringify(verificationRes.mrz) : "";
|
|
@@ -229,7 +275,7 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
229
275
|
useEffect(() => { actions.showCustomStepper(!showCamera); }, [showCamera]);
|
|
230
276
|
if (!countrySelectionData || !selectedDocumentType) {
|
|
231
277
|
return (<View style={styles.root}>
|
|
232
|
-
<View style={styles.
|
|
278
|
+
<View style={styles.previewContainer}>
|
|
233
279
|
<Text style={styles.title}>{getLocalizedText(component.labels)}</Text>
|
|
234
280
|
<Text style={styles.description}>
|
|
235
281
|
{state.currentLanguage === "en" ? "Please complete the country and document selection first." : "Veuillez d'abord compléter la sélection du pays et du document."}
|
|
@@ -240,34 +286,45 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
240
286
|
// --- CAMERA RENDER ---
|
|
241
287
|
if (showCamera) {
|
|
242
288
|
const isBusy = isProcessingCapture;
|
|
243
|
-
return (<View style={styles.
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<View style={styles.processingOverlay}>
|
|
258
|
-
<ActivityIndicator size="large" color="#2DBD60"/>
|
|
259
|
-
<Text style={styles.processingText}>
|
|
260
|
-
{state.currentLanguage === 'en' ? 'Perfect!\nProcessing Document...' : 'Parfait!\nTraitement du document...'}
|
|
261
|
-
</Text>
|
|
262
|
-
</View>
|
|
263
|
-
</View>)}
|
|
289
|
+
return (<View style={styles.root}>
|
|
290
|
+
<View style={styles.cameraWrapper}>
|
|
291
|
+
|
|
292
|
+
{/* Web/Desktop Clean Header */}
|
|
293
|
+
<View style={styles.headerContainer}>
|
|
294
|
+
<Text style={styles.headerTitle}>
|
|
295
|
+
{selectedDocumentType ? (locale === 'en' ? getDocumentTypeInfo(selectedDocumentType.type).name.en : getDocumentTypeInfo(selectedDocumentType.type).name.fr) : ''}
|
|
296
|
+
</Text>
|
|
297
|
+
<View style={styles.stepBadge}>
|
|
298
|
+
<Text style={styles.stepText}>
|
|
299
|
+
{t('kyc.idCardCapture.captureTitle', { side: currentSide === 'front' ? locale === 'en' ? 'Front' : 'Recto' : locale === 'en' ? 'Back' : 'Verso' })}
|
|
300
|
+
</Text>
|
|
301
|
+
</View>
|
|
302
|
+
</View>
|
|
264
303
|
|
|
265
|
-
|
|
304
|
+
<View style={styles.cameraFeedContainer}>
|
|
305
|
+
<EnhancedCameraView key={`${currentSide}-${cameraKey}`} showCamera={true} isProcessing={isBusy} cameraType={cameraConfig.cameraType} style={styles.camera} onError={handleError} onSilentCapture={handleSilentCapture} silentCaptureResult={silentCaptureResult} overlayComponent={<>
|
|
306
|
+
{!isBusy && silentCaptureResult.isAnalyzing && (<View style={styles.topAnalyzingPillContainer}>
|
|
307
|
+
<View style={styles.topAnalyzingPill}>
|
|
308
|
+
<ActivityIndicator size="small" color="white"/>
|
|
309
|
+
<Text style={styles.analyzingPillText}>
|
|
310
|
+
{state.currentLanguage === 'en' ? 'Scanning...' : 'Analyse...'}
|
|
311
|
+
</Text>
|
|
312
|
+
</View>
|
|
313
|
+
</View>)}
|
|
314
|
+
{isBusy && (<View style={StyleSheet.absoluteFillObject}>
|
|
315
|
+
{processingImagePath && (<Image source={{ uri: processingImagePath.startsWith('file://') ? processingImagePath : `file://${processingImagePath}` }} style={StyleSheet.absoluteFillObject} resizeMode="cover"/>)}
|
|
316
|
+
<View style={styles.processingOverlay}>
|
|
317
|
+
<ActivityIndicator size="large" color="#2DBD60"/>
|
|
318
|
+
<Text style={styles.processingText}>
|
|
319
|
+
{state.currentLanguage === 'en' ? 'Perfect!\nProcessing Document...' : 'Parfait!\nTraitement du document...'}
|
|
320
|
+
</Text>
|
|
321
|
+
</View>
|
|
322
|
+
</View>)}
|
|
323
|
+
<IdCardOverlay xMin={cameraConfig.overlay.bbox.xMin} yMin={cameraConfig.overlay.bbox.yMin} xMax={cameraConfig.overlay.bbox.xMax} yMax={cameraConfig.overlay.bbox.yMax} instructions={cameraConfig.overlay.guideText} cornerOpacity={cameraConfig.overlay.bbox.cornerRadius || 0} isSuccess={silentCaptureResult.success} language={state.currentLanguage} stepperProps={{
|
|
266
324
|
back: () => {
|
|
267
325
|
if (currentSide === 'back') {
|
|
268
326
|
setCurrentSide('front');
|
|
269
327
|
setShowCamera(false);
|
|
270
|
-
// 🚨 Clean up any residual state when going backwards
|
|
271
328
|
setIsProcessingCapture(false);
|
|
272
329
|
setProcessingImagePath(null);
|
|
273
330
|
if (capturedImages['front']?.dir) {
|
|
@@ -285,11 +342,17 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
285
342
|
selectedDocumentType: selectedDocumentType ? (locale === 'en' ? getDocumentTypeInfo(selectedDocumentType.type).name.en : getDocumentTypeInfo(selectedDocumentType.type).name.fr) : '',
|
|
286
343
|
step: state.currentComponentIndex + 1, totalSteps: state.template.components.length, side: currentSide,
|
|
287
344
|
}}/>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
345
|
+
|
|
346
|
+
<TouchableOpacity style={styles.refreshButton} onPress={refreshCamera}>
|
|
347
|
+
<Text style={styles.refreshButtonText}>Refresh Camera</Text>
|
|
348
|
+
</TouchableOpacity>
|
|
349
|
+
</>}/>
|
|
350
|
+
{/* Elegant Floating Error Banner below the cutout */}
|
|
351
|
+
{silentCaptureResult.error && !isBusy ? (<View style={styles.floatingErrorBanner}>
|
|
352
|
+
<Text style={styles.floatingErrorText}>⚠️ {silentCaptureResult.error}</Text>
|
|
353
|
+
</View>) : null}
|
|
354
|
+
</View>
|
|
355
|
+
</View>
|
|
293
356
|
</View>);
|
|
294
357
|
}
|
|
295
358
|
return (<View style={styles.root}>
|
|
@@ -303,19 +366,15 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
303
366
|
{getLocalizedText(component.instructions)}
|
|
304
367
|
</Text>
|
|
305
368
|
<View style={{ alignItems: 'center', justifyContent: 'center', flexDirection: "column", gap: 16 }}>
|
|
306
|
-
|
|
307
369
|
{silentCaptureResult?.error === 'TOO_FAR_AWAY' && (<View style={styles.warningBanner}>
|
|
308
370
|
<Text style={styles.warningText}>
|
|
309
371
|
{state.currentLanguage === "en" ? "Move the document closer to the camera and place it on a flat surface." : "Veuillez rapprocher le document de la caméra et le poser à plat."}
|
|
310
372
|
</Text>
|
|
311
373
|
</View>)}
|
|
312
|
-
|
|
313
374
|
<View style={styles.imagePreviewWrapper}>
|
|
314
375
|
{capturedImages[currentSide]?.dir ? (<Image source={{ uri: capturedImages[currentSide].dir }} style={styles.previewImage}/>) : silentCaptureResult.path ? (<Image source={{ uri: silentCaptureResult.path }} style={styles.previewImage}/>) : null}
|
|
315
376
|
</View>
|
|
316
|
-
|
|
317
377
|
{!capturedImages[currentSide]?.dir && (<Button title={state.currentLanguage === "en" ? "Start Scanning" : "Commencer la numérisation"} onPress={() => { setShowCamera(true); actions.showCustomStepper(false); }} variant="primary" size="large" fullWidth/>)}
|
|
318
|
-
|
|
319
378
|
{capturedImages[currentSide]?.dir && (<>
|
|
320
379
|
<Button title={t('kyc.idCardCapture.retakeButton')} onPress={() => retakePicture(currentSide)} variant="outline" size="medium" fullWidth/>
|
|
321
380
|
<Button title={t('common.next')} onPress={() => {
|
|
@@ -323,14 +382,13 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
323
382
|
showAlert('Error', 'Document type not selected');
|
|
324
383
|
return;
|
|
325
384
|
}
|
|
326
|
-
// 🚨 BUG FIX: Clear all state before moving forward
|
|
327
385
|
if (currentSide === 'back' || selectedDocumentType.type === 'passport') {
|
|
328
386
|
actions.nextComponent();
|
|
329
387
|
}
|
|
330
388
|
else {
|
|
331
389
|
setShowCamera(true);
|
|
332
390
|
setCurrentSide('back');
|
|
333
|
-
setSilentCaptureResult({ success: false, isAnalyzing: false, path: '', error: '' });
|
|
391
|
+
setSilentCaptureResult({ success: false, isAnalyzing: false, path: '', error: '', templatePath: undefined });
|
|
334
392
|
setIsProcessingCapture(false);
|
|
335
393
|
setProcessingImagePath(null);
|
|
336
394
|
}
|
|
@@ -343,19 +401,124 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
343
401
|
</View>);
|
|
344
402
|
};
|
|
345
403
|
const styles = StyleSheet.create({
|
|
346
|
-
root: {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
404
|
+
root: {
|
|
405
|
+
flex: 1,
|
|
406
|
+
width: '100%',
|
|
407
|
+
backgroundColor: 'transparent',
|
|
408
|
+
alignSelf: 'center',
|
|
409
|
+
...(Platform.OS === 'web'
|
|
410
|
+
? {
|
|
411
|
+
minHeight: '85vh',
|
|
412
|
+
justifyContent: 'center',
|
|
413
|
+
alignItems: 'center',
|
|
414
|
+
// Note: backdropFilter is valid in React Native Web but TS might complain, cast safely
|
|
415
|
+
backdropFilter: 'blur(8px)'
|
|
416
|
+
}
|
|
417
|
+
: {})
|
|
418
|
+
},
|
|
419
|
+
cameraWrapper: {
|
|
420
|
+
width: '100%',
|
|
421
|
+
backgroundColor: '#FFFFFF',
|
|
422
|
+
overflow: 'hidden',
|
|
423
|
+
...(Platform.OS === 'web'
|
|
424
|
+
? {
|
|
425
|
+
maxWidth: 500,
|
|
426
|
+
height: 700,
|
|
427
|
+
maxHeight: '90vh', // TypeScript will now ignore this thanks to the cast below
|
|
428
|
+
borderRadius: 24,
|
|
429
|
+
shadowColor: '#000',
|
|
430
|
+
shadowOffset: { width: 0, height: 20 },
|
|
431
|
+
shadowOpacity: 0.25,
|
|
432
|
+
shadowRadius: 35,
|
|
433
|
+
elevation: 24,
|
|
434
|
+
} // 🚨 CAST TO ANY
|
|
435
|
+
: {
|
|
436
|
+
flex: 1,
|
|
437
|
+
})
|
|
438
|
+
},
|
|
439
|
+
headerContainer: {
|
|
440
|
+
flexDirection: 'row',
|
|
441
|
+
alignItems: 'center',
|
|
442
|
+
justifyContent: 'space-between',
|
|
443
|
+
paddingHorizontal: 24,
|
|
444
|
+
paddingVertical: 18,
|
|
445
|
+
backgroundColor: '#FFFFFF',
|
|
446
|
+
borderBottomWidth: 1,
|
|
447
|
+
borderBottomColor: '#F1F5F9',
|
|
448
|
+
zIndex: 10,
|
|
449
|
+
// Mobile hidden, Web visible to replace floating text
|
|
450
|
+
...(Platform.OS !== 'web' ? { display: 'none' } : {})
|
|
451
|
+
},
|
|
452
|
+
headerTitle: {
|
|
453
|
+
fontSize: 18,
|
|
454
|
+
fontWeight: '700',
|
|
455
|
+
color: '#0F172A',
|
|
456
|
+
},
|
|
457
|
+
stepBadge: {
|
|
458
|
+
backgroundColor: '#F1F5F9',
|
|
459
|
+
paddingHorizontal: 12,
|
|
460
|
+
paddingVertical: 6,
|
|
461
|
+
borderRadius: 20,
|
|
462
|
+
},
|
|
463
|
+
stepText: {
|
|
464
|
+
fontSize: 13,
|
|
465
|
+
fontWeight: '600',
|
|
466
|
+
color: '#64748B',
|
|
467
|
+
},
|
|
468
|
+
cameraFeedContainer: {
|
|
469
|
+
flex: 1,
|
|
470
|
+
position: 'relative',
|
|
471
|
+
backgroundColor: '#000',
|
|
472
|
+
},
|
|
473
|
+
camera: {
|
|
474
|
+
flex: 1,
|
|
475
|
+
},
|
|
476
|
+
previewContainer: {
|
|
477
|
+
width: '100%',
|
|
478
|
+
backgroundColor: 'white',
|
|
479
|
+
borderRadius: 12,
|
|
480
|
+
paddingVertical: 24,
|
|
481
|
+
paddingHorizontal: 20,
|
|
482
|
+
shadowColor: '#000',
|
|
483
|
+
shadowOffset: { width: 0, height: 4 },
|
|
484
|
+
shadowOpacity: 0.1,
|
|
485
|
+
shadowRadius: 12,
|
|
486
|
+
elevation: 8,
|
|
487
|
+
...(Platform.OS === 'web' ? { alignSelf: 'center', maxWidth: 600 } : { margin: 10, width: '95%' })
|
|
488
|
+
},
|
|
489
|
+
previewItemContainer: {
|
|
490
|
+
flexGrow: 1,
|
|
491
|
+
},
|
|
351
492
|
title: { fontSize: 24, fontWeight: 'bold', color: '#333', marginBottom: 8, textAlign: 'center' },
|
|
352
493
|
description: { fontSize: 16, color: '#666', textAlign: 'center', marginBottom: 24, lineHeight: 22 },
|
|
353
494
|
sideContainer: { marginBottom: 24 },
|
|
354
495
|
sideTitle: { fontSize: 25, fontWeight: 'bold', color: '#000', marginBottom: 12, textAlign: 'center' },
|
|
355
|
-
imagePreviewWrapper: {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
496
|
+
imagePreviewWrapper: {
|
|
497
|
+
width: '100%', height: 220, borderRadius: 12, padding: 1, overflow: 'hidden',
|
|
498
|
+
shadowColor: '#000', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.18, shadowRadius: 8, elevation: 8, backgroundColor: '#f0f0f0'
|
|
499
|
+
},
|
|
500
|
+
previewImage: { width: '100%', height: '100%', borderRadius: 12, resizeMode: 'cover' },
|
|
501
|
+
floatingErrorBanner: {
|
|
502
|
+
position: 'absolute',
|
|
503
|
+
bottom: 30, // Pushed to the bottom for professional feel
|
|
504
|
+
left: 24,
|
|
505
|
+
right: 24,
|
|
506
|
+
backgroundColor: '#FEF2F2',
|
|
507
|
+
borderWidth: 1,
|
|
508
|
+
borderColor: '#FCA5A5',
|
|
509
|
+
paddingVertical: 12,
|
|
510
|
+
paddingHorizontal: 16,
|
|
511
|
+
borderRadius: 12,
|
|
512
|
+
alignItems: 'center',
|
|
513
|
+
justifyContent: 'center',
|
|
514
|
+
shadowColor: '#DC2626',
|
|
515
|
+
shadowOffset: { width: 0, height: 4 },
|
|
516
|
+
shadowOpacity: 0.1,
|
|
517
|
+
shadowRadius: 8,
|
|
518
|
+
elevation: 8,
|
|
519
|
+
zIndex: 100
|
|
520
|
+
},
|
|
521
|
+
floatingErrorText: { color: '#991B1B', fontSize: 14, fontWeight: '700', textAlign: 'center' },
|
|
359
522
|
processingOverlay: { flex: 1, backgroundColor: 'rgba(0, 0, 0, 0.6)', justifyContent: 'center', alignItems: 'center', zIndex: 9999 },
|
|
360
523
|
processingText: { color: '#FFF', fontSize: 18, fontWeight: 'bold', marginTop: 16, textAlign: 'center' },
|
|
361
524
|
warningBanner: { backgroundColor: '#FF9500', padding: 12, borderRadius: 8, width: '100%', shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.2, shadowRadius: 4, elevation: 4 },
|
|
@@ -364,8 +527,7 @@ const styles = StyleSheet.create({
|
|
|
364
527
|
topAnalyzingPillContainer: { position: 'absolute', top: Platform.OS === 'android' ? 60 : 50, left: 0, right: 0, alignItems: 'center', zIndex: 100 },
|
|
365
528
|
topAnalyzingPill: { flexDirection: 'row', alignItems: 'center', backgroundColor: 'rgba(0,0,0,0.6)', paddingVertical: 8, paddingHorizontal: 16, borderRadius: 20, gap: 8 },
|
|
366
529
|
analyzingPillText: { color: 'white', fontSize: 14, fontWeight: 'bold' },
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
},
|
|
530
|
+
refreshButton: { position: 'absolute', bottom: 100, alignSelf: 'center', backgroundColor: 'rgba(0,0,0,0.5)', padding: 10, borderRadius: 20, zIndex: 500 },
|
|
531
|
+
refreshButtonText: { color: 'white', fontWeight: 'bold' },
|
|
370
532
|
});
|
|
371
533
|
//# sourceMappingURL=IDCardCapture.js.map
|