@transfergratis/react-native-sdk 0.1.3 → 0.1.5
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/android/.idea/caches/deviceStreaming.xml +860 -0
- package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -0
- package/android/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
- package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +51 -48
- package/android/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-transfergratis-react-native-sdk.jar +0 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- 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.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +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.values.at +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.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +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 +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/source-to-classes.tab +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/subtypes.tab +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 +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
- 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.values.at +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +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/id-to-file.tab_i +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.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +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/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/aar/transfergratis-react-native-sdk-debug.aar +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +27 -23
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
- package/android/build.gradle +1 -5
- package/android/src/main/AndroidManifest.xml +1 -0
- package/build/api/axios.d.ts +30 -0
- package/build/api/axios.d.ts.map +1 -0
- package/build/api/axios.js +92 -0
- package/build/api/axios.js.map +1 -0
- package/build/components/EnhancedCameraView.d.ts +1 -41
- package/build/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.js +76 -35
- package/build/components/EnhancedCameraView.js.map +1 -1
- package/build/components/EnhancedCameraView.web.d.ts +1 -41
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.web.js +28 -4
- package/build/components/EnhancedCameraView.web.js.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts +2 -2
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.js +71 -114
- package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.js +7 -3
- package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts +7 -2
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +253 -104
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/InitializationStep.d.ts +5 -0
- package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
- package/build/components/KYCElements/InitializationStep.js +41 -0
- package/build/components/KYCElements/InitializationStep.js.map +1 -0
- package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/LocationCaptureTemplate.js +15 -13
- package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +6 -2
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.js +105 -35
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js +93 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
- package/build/components/OverLay/IdCard.d.ts +1 -1
- package/build/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/components/OverLay/IdCard.js +10 -6
- package/build/components/OverLay/IdCard.js.map +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/components/OverLay/SelfieOverlay.js +5 -4
- package/build/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/components/OverLay/type.d.ts +71 -1
- package/build/components/OverLay/type.d.ts.map +1 -1
- package/build/components/OverLay/type.js.map +1 -1
- package/build/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/components/TemplateKYCExample.js +72 -197
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.js +63 -39
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/components/VisionCameraView.js +1 -1
- package/build/components/VisionCameraView.js.map +1 -1
- package/build/components/example/OrientationVideoExample.d.ts.map +1 -1
- package/build/components/example/OrientationVideoExample.js +1 -5
- package/build/components/example/OrientationVideoExample.js.map +1 -1
- package/build/components/ui/Button.js +1 -1
- package/build/components/ui/Button.js.map +1 -1
- package/build/config/countriesData.d.ts +3 -0
- package/build/config/countriesData.d.ts.map +1 -0
- package/build/config/countriesData.js +79 -0
- package/build/config/countriesData.js.map +1 -0
- package/build/config/region_mapping.d.ts +3 -0
- package/build/config/region_mapping.d.ts.map +1 -0
- package/build/config/region_mapping.js +687 -0
- package/build/config/region_mapping.js.map +1 -0
- package/build/hooks/useI18n.d.ts +11 -0
- package/build/hooks/useI18n.d.ts.map +1 -0
- package/build/hooks/useI18n.js +37 -0
- package/build/hooks/useI18n.js.map +1 -0
- package/build/hooks/useOrientationVideo.d.ts +1 -2
- package/build/hooks/useOrientationVideo.d.ts.map +1 -1
- package/build/hooks/useOrientationVideo.js +2 -1
- package/build/hooks/useOrientationVideo.js.map +1 -1
- package/build/hooks/useRealtimeVerifier.d.ts +28 -0
- package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
- package/build/hooks/useRealtimeVerifier.js +91 -0
- package/build/hooks/useRealtimeVerifier.js.map +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +337 -38
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +168 -0
- package/build/i18n/en/index.d.ts.map +1 -0
- package/build/i18n/en/index.js +195 -0
- package/build/i18n/en/index.js.map +1 -0
- package/build/i18n/fr/index.d.ts +168 -0
- package/build/i18n/fr/index.d.ts.map +1 -0
- package/build/i18n/fr/index.js +194 -0
- package/build/i18n/fr/index.js.map +1 -0
- package/build/i18n/index.d.ts +10 -0
- package/build/i18n/index.d.ts.map +1 -0
- package/build/i18n/index.js +56 -0
- package/build/i18n/index.js.map +1 -0
- package/build/i18n/types.d.ts +153 -0
- package/build/i18n/types.d.ts.map +1 -0
- package/build/i18n/types.js +3 -0
- package/build/i18n/types.js.map +1 -0
- package/build/i18n/usage-example.d.ts +4 -0
- package/build/i18n/usage-example.d.ts.map +1 -0
- package/build/i18n/usage-example.js +189 -0
- package/build/i18n/usage-example.js.map +1 -0
- package/build/modules/api/CardAuthentification.d.ts +22 -0
- package/build/modules/api/CardAuthentification.d.ts.map +1 -0
- package/build/modules/api/CardAuthentification.js +107 -0
- package/build/modules/api/CardAuthentification.js.map +1 -0
- package/build/modules/api/KYCService.d.ts +57 -1
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +348 -27
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/modules/api/SelfieVerification.d.ts +3 -0
- package/build/modules/api/SelfieVerification.d.ts.map +1 -0
- package/build/modules/api/SelfieVerification.js +9 -0
- package/build/modules/api/SelfieVerification.js.map +1 -0
- package/build/modules/api/backendApi.d.ts +2 -0
- package/build/modules/api/backendApi.d.ts.map +1 -0
- package/build/modules/api/backendApi.js +6 -0
- package/build/modules/api/backendApi.js.map +1 -0
- package/build/modules/api/types.d.ts +20 -0
- package/build/modules/api/types.d.ts.map +1 -0
- package/build/modules/api/types.js +2 -0
- package/build/modules/api/types.js.map +1 -0
- package/build/modules/camera/VisionCameraModule.d.ts +1 -1
- package/build/modules/camera/VisionCameraModule.d.ts.map +1 -1
- package/build/modules/camera/VisionCameraModule.js +8 -2
- package/build/modules/camera/VisionCameraModule.js.map +1 -1
- package/build/types/KYC.types.d.ts +59 -7
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js +9 -1
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/cropByObb.d.ts +11 -0
- package/build/utils/cropByObb.d.ts.map +1 -0
- package/build/utils/cropByObb.js +78 -0
- package/build/utils/cropByObb.js.map +1 -0
- package/build/utils/get-document-type-info.d.ts +13 -0
- package/build/utils/get-document-type-info.d.ts.map +1 -0
- package/build/utils/get-document-type-info.js +59 -0
- package/build/utils/get-document-type-info.js.map +1 -0
- package/build/utils/pathToBase64.d.ts +3 -0
- package/build/utils/pathToBase64.d.ts.map +1 -0
- package/build/utils/pathToBase64.js +47 -0
- package/build/utils/pathToBase64.js.map +1 -0
- package/build/utils/remove-duplicate.d.ts +2 -0
- package/build/utils/remove-duplicate.d.ts.map +1 -0
- package/build/utils/remove-duplicate.js +4 -0
- package/build/utils/remove-duplicate.js.map +1 -0
- package/package.json +3 -1
- package/src/api/axios.ts +144 -0
- package/src/components/EnhancedCameraView.tsx +96 -78
- package/src/components/EnhancedCameraView.web.tsx +41 -40
- package/src/components/KYCElements/CountrySelectionTemplate.tsx +104 -136
- package/src/components/KYCElements/FileUploadTemplate.tsx +14 -8
- package/src/components/KYCElements/IDCardCapture.tsx +311 -115
- package/src/components/KYCElements/InitializationStep.tsx +53 -0
- package/src/components/KYCElements/LocationCaptureTemplate.tsx +17 -15
- package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
- package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +140 -53
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +123 -0
- package/src/components/OverLay/IdCard.tsx +17 -9
- package/src/components/OverLay/SelfieOverlay.tsx +6 -5
- package/src/components/OverLay/type.ts +64 -2
- package/src/components/TemplateKYCExample.tsx +76 -197
- package/src/components/TemplateKYCFlowRefactored.tsx +74 -46
- package/src/components/VisionCameraView.tsx +1 -1
- package/src/components/example/OrientationVideoExample.tsx +3 -7
- package/src/components/ui/Button.tsx +1 -1
- package/src/config/countriesData.ts +84 -0
- package/src/config/region_mapping.ts +688 -0
- package/src/hooks/useI18n.ts +53 -0
- package/src/hooks/useOrientationVideo.ts +2 -2
- package/src/hooks/useRealtimeVerifier.ts +128 -0
- package/src/hooks/useTemplateKYCFlow.tsx +375 -53
- package/src/i18n/README.md +288 -0
- package/src/i18n/en/index.ts +206 -0
- package/src/i18n/fr/index.ts +205 -0
- package/src/i18n/index.ts +65 -0
- package/src/i18n/types.ts +172 -0
- package/src/i18n/usage-example.tsx +202 -0
- package/src/modules/api/CardAuthentification.ts +114 -0
- package/src/modules/api/KYCService.ts +403 -30
- package/src/modules/api/SelfieVerification.ts +11 -0
- package/src/modules/api/backendApi.ts +8 -0
- package/src/modules/api/types.ts +24 -0
- package/src/modules/camera/VisionCameraModule.ts +16 -7
- package/src/types/KYC.types.ts +83 -14
- package/src/utils/cropByObb.ts +99 -0
- package/src/utils/get-document-type-info.ts +62 -0
- package/src/utils/pathToBase64.ts +47 -0
- package/src/utils/remove-duplicate.ts +3 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/results.bin +0 -1
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/BuildConfig.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkModule.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/kyc/transfergratis/com/TransfergratisSdkView.dex +0 -0
- package/android/build/.transforms/d6df0e53bfc3165a876965af720f910a/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/kyc/transfergratis/com/TransfergratisSdkView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/transfergratis-sdk_debug.kotlin_module +0 -0
- package/src/types/nativewind.d.ts +0 -2
- /package/android/build/.transforms/{7ec900c0f64f5f1a7c88998dd44001b8 → 01c28d00c798aa4846f16ce72123ebf9}/results.bin +0 -0
- /package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/{transfergratis-sdk_debug.kotlin_module → transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
- /package/android/build/{intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/transfergratis-sdk_debug.kotlin_module → tmp/kotlin-classes/debug/META-INF/transfergratis-react-native-sdk_debug.kotlin_module} +0 -0
|
@@ -37,147 +37,72 @@ const advancedVerificationTemplate = {
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
id:
|
|
41
|
-
type: "
|
|
40
|
+
id: 6,
|
|
41
|
+
type: "country_selection",
|
|
42
42
|
order: 2,
|
|
43
|
-
templateId: 1,
|
|
44
43
|
labels: {
|
|
45
|
-
en: "
|
|
46
|
-
fr: "
|
|
44
|
+
en: "Select your country",
|
|
45
|
+
fr: "Sélectionnez votre pays"
|
|
47
46
|
},
|
|
48
47
|
instructions: {
|
|
49
|
-
en: "
|
|
50
|
-
fr: "
|
|
48
|
+
en: "Choose your country of residence.",
|
|
49
|
+
fr: "Choisissez votre pays de résidence."
|
|
51
50
|
},
|
|
52
51
|
ui: {
|
|
53
|
-
icon: "
|
|
52
|
+
icon: "country-icon.png",
|
|
54
53
|
themeColor: "#2DBD60",
|
|
55
|
-
buttonText: { en: "
|
|
54
|
+
buttonText: { en: "Confirm", fr: "Confirmer" }
|
|
56
55
|
},
|
|
57
56
|
config: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
document_types: ["id_card", "passport", "drivers_license", "national_id"],
|
|
62
|
-
bbox_configs: {
|
|
63
|
-
id_card: {
|
|
64
|
-
xMin: 20,
|
|
65
|
-
yMin: 140,
|
|
66
|
-
xMax: 370,
|
|
67
|
-
yMax: 340,
|
|
68
|
-
borderColor: "#2DBD60",
|
|
69
|
-
borderWidth: 4,
|
|
70
|
-
cornerRadius: 12
|
|
71
|
-
},
|
|
72
|
-
passport: {
|
|
73
|
-
xMin: 15,
|
|
74
|
-
yMin: 130,
|
|
75
|
-
xMax: 375,
|
|
76
|
-
yMax: 350,
|
|
77
|
-
borderColor: "#007AFF",
|
|
78
|
-
borderWidth: 4,
|
|
79
|
-
cornerRadius: 8
|
|
80
|
-
},
|
|
81
|
-
drivers_license: {
|
|
82
|
-
xMin: 25,
|
|
83
|
-
yMin: 150,
|
|
84
|
-
xMax: 365,
|
|
85
|
-
yMax: 330,
|
|
86
|
-
borderColor: "#FF9500",
|
|
87
|
-
borderWidth: 4,
|
|
88
|
-
cornerRadius: 10
|
|
89
|
-
},
|
|
90
|
-
national_id: {
|
|
91
|
-
xMin: 20,
|
|
92
|
-
yMin: 140,
|
|
93
|
-
xMax: 370,
|
|
94
|
-
yMax: 340,
|
|
95
|
-
borderColor: "#5856D6",
|
|
96
|
-
borderWidth: 4,
|
|
97
|
-
cornerRadius: 12
|
|
98
|
-
},
|
|
99
|
-
residence_permit: {
|
|
100
|
-
xMin: 20,
|
|
101
|
-
yMin: 140,
|
|
102
|
-
xMax: 370,
|
|
103
|
-
yMax: 340,
|
|
104
|
-
borderColor: "#2DBD60",
|
|
105
|
-
borderWidth: 4,
|
|
106
|
-
cornerRadius: 12
|
|
107
|
-
},
|
|
108
|
-
voter_id: {
|
|
109
|
-
xMin: 20,
|
|
110
|
-
yMin: 140,
|
|
111
|
-
xMax: 370,
|
|
112
|
-
yMax: 340,
|
|
113
|
-
borderColor: "#2DBD60",
|
|
114
|
-
borderWidth: 4,
|
|
115
|
-
cornerRadius: 12
|
|
116
|
-
},
|
|
117
|
-
military_id: {
|
|
118
|
-
xMin: 20,
|
|
119
|
-
yMin: 140,
|
|
120
|
-
xMax: 370,
|
|
121
|
-
yMax: 340,
|
|
122
|
-
borderColor: "#2DBD60",
|
|
123
|
-
borderWidth: 4,
|
|
124
|
-
cornerRadius: 12
|
|
125
|
-
},
|
|
126
|
-
student_id: {
|
|
127
|
-
xMin: 20,
|
|
128
|
-
yMin: 140,
|
|
129
|
-
xMax: 370,
|
|
130
|
-
yMax: 340,
|
|
131
|
-
borderColor: "#2DBD60",
|
|
132
|
-
borderWidth: 4,
|
|
133
|
-
cornerRadius: 12
|
|
134
|
-
},
|
|
135
|
-
work_permit: {
|
|
136
|
-
xMin: 20,
|
|
137
|
-
yMin: 140,
|
|
138
|
-
xMax: 370,
|
|
139
|
-
yMax: 340,
|
|
140
|
-
borderColor: "#2DBD60",
|
|
141
|
-
borderWidth: 4,
|
|
142
|
-
cornerRadius: 12
|
|
143
|
-
},
|
|
144
|
-
other: {
|
|
145
|
-
xMin: 20,
|
|
146
|
-
yMin: 140,
|
|
147
|
-
xMax: 370,
|
|
148
|
-
yMax: 340,
|
|
149
|
-
borderColor: "#2DBD60",
|
|
150
|
-
borderWidth: 4,
|
|
151
|
-
cornerRadius: 12
|
|
152
|
-
}
|
|
153
|
-
}
|
|
57
|
+
allowed_countries: ["CA", "FR", "CM", "US", "DE", "CI", "SN", "NG", "MA", "DZ"],
|
|
58
|
+
default_country: "CA",
|
|
59
|
+
required: true
|
|
154
60
|
}
|
|
155
61
|
},
|
|
156
62
|
{
|
|
157
|
-
id:
|
|
63
|
+
id: 1,
|
|
158
64
|
type: "id_card",
|
|
159
65
|
order: 3,
|
|
160
66
|
templateId: 1,
|
|
161
67
|
labels: {
|
|
162
|
-
|
|
163
|
-
|
|
68
|
+
front: {
|
|
69
|
+
en: "Upload front of ID card",
|
|
70
|
+
fr: "Téléversez le recto de votre carte d'identité"
|
|
71
|
+
},
|
|
72
|
+
back: {
|
|
73
|
+
en: "Upload back of ID card",
|
|
74
|
+
fr: "Téléversez le verso de votre carte d'identité"
|
|
75
|
+
},
|
|
164
76
|
},
|
|
165
77
|
instructions: {
|
|
166
|
-
|
|
167
|
-
|
|
78
|
+
front: {
|
|
79
|
+
en: "Take a clear photo of the front of your ID.",
|
|
80
|
+
fr: "Prenez une photo nette du recto de votre pièce."
|
|
81
|
+
},
|
|
82
|
+
back: {
|
|
83
|
+
en: "Take a clear photo of the back of your ID.",
|
|
84
|
+
fr: "Prenez une photo nette du verso de votre pièce."
|
|
85
|
+
},
|
|
168
86
|
},
|
|
169
87
|
ui: {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
88
|
+
front: {
|
|
89
|
+
icon: "id-card-icon.png",
|
|
90
|
+
themeColor: "#2DBD60",
|
|
91
|
+
buttonText: { en: "Next", fr: "Suivant" }
|
|
92
|
+
},
|
|
93
|
+
back: {
|
|
94
|
+
icon: "id-card-icon.png",
|
|
95
|
+
themeColor: "#2DBD60",
|
|
96
|
+
buttonText: { en: "Next", fr: "Suivant" }
|
|
97
|
+
},
|
|
173
98
|
},
|
|
174
99
|
config: {
|
|
175
|
-
sides: ["back"],
|
|
100
|
+
sides: ["front", "back"],
|
|
176
101
|
allowed_formats: ["jpg", "png"],
|
|
177
102
|
max_size_mb: 5,
|
|
178
|
-
document_types: ["
|
|
103
|
+
document_types: ["drivers_licence", "passport", "drivers_licence", "national_id"],
|
|
179
104
|
bbox_configs: {
|
|
180
|
-
|
|
105
|
+
drivers_licence: {
|
|
181
106
|
xMin: 20,
|
|
182
107
|
yMin: 140,
|
|
183
108
|
xMax: 370,
|
|
@@ -195,25 +120,7 @@ const advancedVerificationTemplate = {
|
|
|
195
120
|
borderWidth: 4,
|
|
196
121
|
cornerRadius: 8
|
|
197
122
|
},
|
|
198
|
-
|
|
199
|
-
xMin: 25,
|
|
200
|
-
yMin: 150,
|
|
201
|
-
xMax: 365,
|
|
202
|
-
yMax: 330,
|
|
203
|
-
borderColor: "#FF9500",
|
|
204
|
-
borderWidth: 4,
|
|
205
|
-
cornerRadius: 10
|
|
206
|
-
},
|
|
207
|
-
national_id: {
|
|
208
|
-
xMin: 20,
|
|
209
|
-
yMin: 140,
|
|
210
|
-
xMax: 370,
|
|
211
|
-
yMax: 340,
|
|
212
|
-
borderColor: "#5856D6",
|
|
213
|
-
borderWidth: 4,
|
|
214
|
-
cornerRadius: 12
|
|
215
|
-
},
|
|
216
|
-
residence_permit: {
|
|
123
|
+
identity_card: {
|
|
217
124
|
xMin: 20,
|
|
218
125
|
yMin: 140,
|
|
219
126
|
xMax: 370,
|
|
@@ -222,7 +129,7 @@ const advancedVerificationTemplate = {
|
|
|
222
129
|
borderWidth: 4,
|
|
223
130
|
cornerRadius: 12
|
|
224
131
|
},
|
|
225
|
-
|
|
132
|
+
health_insurance_card: {
|
|
226
133
|
xMin: 20,
|
|
227
134
|
yMin: 140,
|
|
228
135
|
xMax: 370,
|
|
@@ -231,16 +138,16 @@ const advancedVerificationTemplate = {
|
|
|
231
138
|
borderWidth: 4,
|
|
232
139
|
cornerRadius: 12
|
|
233
140
|
},
|
|
234
|
-
|
|
141
|
+
national_id: {
|
|
235
142
|
xMin: 20,
|
|
236
143
|
yMin: 140,
|
|
237
144
|
xMax: 370,
|
|
238
145
|
yMax: 340,
|
|
239
|
-
borderColor: "#
|
|
146
|
+
borderColor: "#5856D6",
|
|
240
147
|
borderWidth: 4,
|
|
241
148
|
cornerRadius: 12
|
|
242
149
|
},
|
|
243
|
-
|
|
150
|
+
permanent_residence: {
|
|
244
151
|
xMin: 20,
|
|
245
152
|
yMin: 140,
|
|
246
153
|
xMax: 370,
|
|
@@ -258,22 +165,13 @@ const advancedVerificationTemplate = {
|
|
|
258
165
|
borderWidth: 4,
|
|
259
166
|
cornerRadius: 12
|
|
260
167
|
},
|
|
261
|
-
other: {
|
|
262
|
-
xMin: 20,
|
|
263
|
-
yMin: 140,
|
|
264
|
-
xMax: 370,
|
|
265
|
-
yMax: 340,
|
|
266
|
-
borderColor: "#2DBD60",
|
|
267
|
-
borderWidth: 4,
|
|
268
|
-
cornerRadius: 12
|
|
269
|
-
}
|
|
270
168
|
}
|
|
271
169
|
}
|
|
272
170
|
},
|
|
273
171
|
{
|
|
274
172
|
id: 3,
|
|
275
173
|
type: "selfie",
|
|
276
|
-
order:
|
|
174
|
+
order: 5,
|
|
277
175
|
templateId: 1,
|
|
278
176
|
labels: {
|
|
279
177
|
en: "Take selfies from different angles",
|
|
@@ -291,55 +189,32 @@ const advancedVerificationTemplate = {
|
|
|
291
189
|
config: {
|
|
292
190
|
liveness_check: true,
|
|
293
191
|
max_attempts: 3,
|
|
294
|
-
orientations: ["
|
|
192
|
+
orientations: ["center", "left", "right"]
|
|
295
193
|
}
|
|
296
194
|
},
|
|
297
|
-
{
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
id: 6,
|
|
322
|
-
type: "country_selection",
|
|
323
|
-
order: 6,
|
|
324
|
-
labels: {
|
|
325
|
-
en: "Select your country",
|
|
326
|
-
fr: "Sélectionnez votre pays"
|
|
327
|
-
},
|
|
328
|
-
instructions: {
|
|
329
|
-
en: "Choose your country of residence.",
|
|
330
|
-
fr: "Choisissez votre pays de résidence."
|
|
331
|
-
},
|
|
332
|
-
ui: {
|
|
333
|
-
icon: "country-icon.png",
|
|
334
|
-
themeColor: "#2DBD60",
|
|
335
|
-
buttonText: { en: "Confirm", fr: "Confirmer" }
|
|
336
|
-
},
|
|
337
|
-
config: {
|
|
338
|
-
allowed_countries: ["FR", "CM", "US", "DE"],
|
|
339
|
-
default_country: "FR",
|
|
340
|
-
required: true
|
|
341
|
-
}
|
|
342
|
-
}
|
|
195
|
+
// {
|
|
196
|
+
// id: 4,
|
|
197
|
+
// type: "file_upload" as const,
|
|
198
|
+
// order: 6,
|
|
199
|
+
// labels: {
|
|
200
|
+
// en: "Upload proof of address",
|
|
201
|
+
// fr: "Téléversez un justificatif de domicile"
|
|
202
|
+
// },
|
|
203
|
+
// instructions: {
|
|
204
|
+
// en: "Upload a recent utility bill or bank statement (PDF, JPG, PNG).",
|
|
205
|
+
// fr: "Téléversez une facture récente ou un relevé bancaire (PDF, JPG, PNG)."
|
|
206
|
+
// },
|
|
207
|
+
// ui: {
|
|
208
|
+
// icon: "file-upload-icon.png",
|
|
209
|
+
// themeColor: "#2DBD60",
|
|
210
|
+
// buttonText: { en: "Upload", fr: "Téléverser" }
|
|
211
|
+
// },
|
|
212
|
+
// config: {
|
|
213
|
+
// allowed_formats: ["pdf", "jpg", "png"],
|
|
214
|
+
// max_size_mb: 10,
|
|
215
|
+
// required: true
|
|
216
|
+
// } as const
|
|
217
|
+
// },
|
|
343
218
|
]
|
|
344
219
|
};
|
|
345
220
|
export const TemplateKYCExample = ({ onComplete, onCancel, onError }) => {
|
|
@@ -357,7 +232,7 @@ export const TemplateKYCExample = ({ onComplete, onCancel, onError }) => {
|
|
|
357
232
|
// Gérer l'erreur
|
|
358
233
|
};
|
|
359
234
|
return (<View style={styles.container}>
|
|
360
|
-
<TemplateKYCFlow template={advancedVerificationTemplate} onComplete={handleComplete} onError={handleError} onCancel={handleCancel} language="
|
|
235
|
+
<TemplateKYCFlow template={advancedVerificationTemplate} onComplete={handleComplete} onError={handleError} onCancel={handleCancel} language="en" // ou "en" pour l'anglais
|
|
361
236
|
/>
|
|
362
237
|
</View>);
|
|
363
238
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateKYCExample.js","sourceRoot":"","sources":["../../src/components/TemplateKYCExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,uCAAuC;AACvC,MAAM,4BAA4B,GAAgB;IAChD,EAAE,EAAE,CAAC;IACL,IAAI,EAAE;QACJ,EAAE,EAAE,uBAAuB;QAC3B,EAAE,EAAE,sBAAsB;KAC3B;IACD,WAAW,EAAE;QACX,EAAE,EAAE,qCAAqC;QACzC,EAAE,EAAE,6CAA6C;KAClD;IACD,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE;QACV;YACE,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,UAAmB;YACzB,KAAK,EAAE,CAAC;YACR,MAAM,EAAE;gBACN,EAAE,EAAE,sBAAsB;gBAC1B,EAAE,EAAE,4BAA4B;aACjC;YACD,YAAY,EAAE;gBACZ,EAAE,EAAE,oDAAoD;gBACxD,EAAE,EAAE,8EAA8E;aACnF;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,mBAAmB;gBACzB,UAAU,EAAE,SAAS;gBACrB,UAAU,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,yBAAyB,EAAE;aACrE;YACD,MAAM,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,CAAC,CAAC;QAC5C,iBAAiB;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,eAAe,CACd,QAAQ,CAAC,CAAC,4BAA4B,CAAC,CACvC,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,QAAQ,CAAC,IAAI,CAAC,yBAAyB;MAE3C;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,wEAAwE;AACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DE","sourcesContent":["import React from 'react';\nimport { View, StyleSheet } from 'react-native';\nimport { TemplateKYCFlow } from './TemplateKYCFlowRefactored';\nimport { KYCTemplate } from '../types/KYC.types';\n\n// Template JSON basé sur votre exemple\nconst advancedVerificationTemplate: KYCTemplate = {\n id: 1,\n name: {\n en: \"Advanced Verification\",\n fr: \"Vérification Avancée\"\n },\n description: {\n en: \"Extended identity verification flow\",\n fr: \"Processus de vérification d'identité étendu\"\n },\n version: \"1.1.0\",\n components: [\n {\n id: 5,\n type: \"location\" as const,\n order: 1,\n labels: {\n en: \"Enable your location\",\n fr: \"Activez votre localisation\"\n },\n instructions: {\n en: \"We need your GPS location for compliance purposes.\",\n fr: \"Nous avons besoin de votre localisation GPS pour des raisons réglementaires.\"\n },\n ui: {\n icon: \"location-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Enable Location\", fr: \"Activer la localisation\" }\n },\n config: {\n accuracy: \"high\",\n required: true\n } as const\n },\n {\n id: 1,\n type: \"id_card\" as const,\n order: 2,\n templateId: 1,\n labels: {\n en: \"Upload front of ID card\",\n fr: \"Téléversez le recto de votre carte d'identité\"\n },\n instructions: {\n en: \"Take a clear photo of the front of your ID.\",\n fr: \"Prenez une photo nette du recto de votre pièce.\"\n },\n ui: {\n icon: \"id-card-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n config: {\n sides: [\"front\"],\n allowed_formats: [\"jpg\", \"png\"],\n max_size_mb: 5,\n document_types: [\"id_card\", \"passport\", \"drivers_license\", \"national_id\"],\n bbox_configs: {\n id_card: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n passport: {\n xMin: 15,\n yMin: 130,\n xMax: 375,\n yMax: 350,\n borderColor: \"#007AFF\",\n borderWidth: 4,\n cornerRadius: 8\n },\n drivers_license: {\n xMin: 25,\n yMin: 150,\n xMax: 365,\n yMax: 330,\n borderColor: \"#FF9500\",\n borderWidth: 4,\n cornerRadius: 10\n },\n national_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#5856D6\",\n borderWidth: 4,\n cornerRadius: 12\n },\n residence_permit: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n voter_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n military_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n student_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n work_permit: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n other: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n }\n }\n } as const\n },\n {\n id: 2,\n type: \"id_card\" as const,\n order: 3,\n templateId: 1,\n labels: {\n en: \"Upload back of ID card\",\n fr: \"Téléversez le verso de votre carte d'identité\"\n },\n instructions: {\n en: \"Take a clear photo of the back of your ID.\",\n fr: \"Prenez une photo nette du verso de votre pièce.\"\n },\n ui: {\n icon: \"id-card-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n config: {\n sides: [\"back\"],\n allowed_formats: [\"jpg\", \"png\"],\n max_size_mb: 5,\n document_types: [\"id_card\", \"passport\", \"drivers_license\", \"national_id\"],\n bbox_configs: {\n id_card: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n passport: {\n xMin: 15,\n yMin: 130,\n xMax: 375,\n yMax: 350,\n borderColor: \"#007AFF\",\n borderWidth: 4,\n cornerRadius: 8\n },\n drivers_license: {\n xMin: 25,\n yMin: 150,\n xMax: 365,\n yMax: 330,\n borderColor: \"#FF9500\",\n borderWidth: 4,\n cornerRadius: 10\n },\n national_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#5856D6\",\n borderWidth: 4,\n cornerRadius: 12\n },\n residence_permit: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n voter_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n military_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n student_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n work_permit: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n other: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n }\n }\n } as const\n },\n {\n id: 3,\n type: \"selfie\" as const,\n order: 4,\n templateId: 1,\n labels: {\n en: \"Take selfies from different angles\",\n fr: \"Prenez des selfies sous différents angles\"\n },\n instructions: {\n en: \"Take selfies from front, left, and right angles.\",\n fr: \"Prenez des selfies de face, profil gauche et profil droit.\"\n },\n ui: {\n icon: \"selfie-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n config: {\n liveness_check: true,\n max_attempts: 3,\n orientations: [\"front\", \"left\", \"right\"]\n } as const\n },\n {\n id: 4,\n type: \"file_upload\" as const,\n order: 5,\n labels: {\n en: \"Upload proof of address\",\n fr: \"Téléversez un justificatif de domicile\"\n },\n instructions: {\n en: \"Upload a recent utility bill or bank statement (PDF, JPG, PNG).\",\n fr: \"Téléversez une facture récente ou un relevé bancaire (PDF, JPG, PNG).\"\n },\n ui: {\n icon: \"file-upload-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Upload\", fr: \"Téléverser\" }\n },\n config: {\n allowed_formats: [\"pdf\", \"jpg\", \"png\"],\n max_size_mb: 10,\n required: true\n } as const\n },\n {\n id: 6,\n type: \"country_selection\" as const,\n order: 6,\n labels: {\n en: \"Select your country\",\n fr: \"Sélectionnez votre pays\"\n },\n instructions: {\n en: \"Choose your country of residence.\",\n fr: \"Choisissez votre pays de résidence.\"\n },\n ui: {\n icon: \"country-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Confirm\", fr: \"Confirmer\" }\n },\n config: {\n allowed_countries: [\"FR\", \"CM\", \"US\", \"DE\"],\n default_country: \"FR\",\n required: true\n } as const\n }\n ]\n};\n\nexport const TemplateKYCExample: React.FC<{ onComplete: (data: Record<number, any>) => void, onCancel: () => void, onError: (error: string) => void }> = ({ onComplete, onCancel, onError }) => {\n const handleComplete = (data: Record<number, any>) => {\n console.log('KYC Template completed with data:', data);\n onComplete(data);\n // Ici vous pouvez envoyer les données à votre API\n };\n\n const handleCancel = () => {\n console.log('KYC Template flow cancelled');\n onCancel();\n };\n\n const handleError = (error: string) => {\n console.error('KYC Template error:', error);\n // Gérer l'erreur\n };\n\n return (\n <View style={styles.container}>\n <TemplateKYCFlow\n template={advancedVerificationTemplate}\n onComplete={handleComplete}\n onError={handleError}\n onCancel={handleCancel}\n language=\"fr\" // ou \"en\" pour l'anglais\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\n// Exemples de différents types de documents gouvernementaux supportés :\n/*\nexport const documentTypeExamples = {\n // Carte d'identité nationale\n idCard: {\n document_type: \"id_card\" as const,\n labels: { en: \"Upload your ID card\", fr: \"Téléversez votre carte d'identité\" }\n },\n \n // Passeport\n passport: {\n document_type: \"passport\" as const,\n labels: { en: \"Upload your passport\", fr: \"Téléversez votre passeport\" }\n },\n \n // Permis de conduire\n driversLicense: {\n document_type: \"drivers_license\" as const,\n labels: { en: \"Upload your driver's license\", fr: \"Téléversez votre permis de conduire\" }\n },\n \n // Permis de séjour\n residencePermit: {\n document_type: \"residence_permit\" as const,\n labels: { en: \"Upload your residence permit\", fr: \"Téléversez votre permis de séjour\" }\n },\n \n // Carte nationale d'identité\n nationalId: {\n document_type: \"national_id\" as const,\n labels: { en: \"Upload your national ID\", fr: \"Téléversez votre carte nationale d'identité\" }\n },\n \n // Carte d'électeur\n voterId: {\n document_type: \"voter_id\" as const,\n labels: { en: \"Upload your voter ID\", fr: \"Téléversez votre carte d'électeur\" }\n },\n \n // Carte militaire\n militaryId: {\n document_type: \"military_id\" as const,\n labels: { en: \"Upload your military ID\", fr: \"Téléversez votre carte militaire\" }\n },\n \n // Carte d'étudiant\n studentId: {\n document_type: \"student_id\" as const,\n labels: { en: \"Upload your student ID\", fr: \"Téléversez votre carte d'étudiant\" }\n },\n \n // Permis de travail\n workPermit: {\n document_type: \"work_permit\" as const,\n labels: { en: \"Upload your work permit\", fr: \"Téléversez votre permis de travail\" }\n },\n \n // Autre document gouvernemental\n other: {\n document_type: \"other\" as const,\n labels: { en: \"Upload your government document\", fr: \"Téléversez votre document gouvernemental\" }\n }\n};\n*/ "]}
|
|
1
|
+
{"version":3,"file":"TemplateKYCExample.js","sourceRoot":"","sources":["../../src/components/TemplateKYCExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,uCAAuC;AACvC,MAAM,4BAA4B,GAAgB;IAChD,EAAE,EAAE,CAAC;IACL,IAAI,EAAE;QACJ,EAAE,EAAE,uBAAuB;QAC3B,EAAE,EAAE,sBAAsB;KAC3B;IACD,WAAW,EAAE;QACX,EAAE,EAAE,qCAAqC;QACzC,EAAE,EAAE,6CAA6C;KAClD;IACD,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE;QACV;YACE,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,UAAmB;YACzB,KAAK,EAAE,CAAC;YACR,MAAM,EAAE;gBACN,EAAE,EAAE,sBAAsB;gBAC1B,EAAE,EAAE,4BAA4B;aACjC;YACD,YAAY,EAAE;gBACZ,EAAE,EAAE,oDAAoD;gBACxD,EAAE,EAAE,8EAA8E;aACnF;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,mBAAmB;gBACzB,UAAU,EAAE,SAAS;gB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R,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,wEAAwE;AACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DE","sourcesContent":["import React from 'react';\nimport { View, StyleSheet } from 'react-native';\nimport { TemplateKYCFlow } from './TemplateKYCFlowRefactored';\nimport { KYCTemplate } from '../types/KYC.types';\n\n// Template JSON basé sur votre exemple\nconst advancedVerificationTemplate: KYCTemplate = {\n id: 1,\n name: {\n en: \"Advanced Verification\",\n fr: \"Vérification Avancée\"\n },\n description: {\n en: \"Extended identity verification flow\",\n fr: \"Processus de vérification d'identité étendu\"\n },\n version: \"1.1.0\",\n components: [\n {\n id: 5,\n type: \"location\" as const,\n order: 1,\n labels: {\n en: \"Enable your location\",\n fr: \"Activez votre localisation\"\n },\n instructions: {\n en: \"We need your GPS location for compliance purposes.\",\n fr: \"Nous avons besoin de votre localisation GPS pour des raisons réglementaires.\"\n },\n ui: {\n icon: \"location-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Enable Location\", fr: \"Activer la localisation\" }\n },\n config: {\n accuracy: \"high\",\n required: true\n } as const\n },\n {\n id: 6,\n type: \"country_selection\" as const,\n order: 2,\n labels: {\n en: \"Select your country\",\n fr: \"Sélectionnez votre pays\"\n },\n instructions: {\n en: \"Choose your country of residence.\",\n fr: \"Choisissez votre pays de résidence.\"\n },\n ui: {\n icon: \"country-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Confirm\", fr: \"Confirmer\" }\n },\n config: {\n allowed_countries: [\"CA\", \"FR\", \"CM\", \"US\", \"DE\", \"CI\", \"SN\", \"NG\", \"MA\", \"DZ\"],\n default_country: \"CA\",\n required: true\n } as const\n },\n {\n id: 1,\n type: \"id_card\" as const,\n order: 3,\n templateId: 1,\n labels: {\n front: {\n en: \"Upload front of ID card\",\n fr: \"Téléversez le recto de votre carte d'identité\"\n },\n back: {\n en: \"Upload back of ID card\",\n fr: \"Téléversez le verso de votre carte d'identité\"\n },\n },\n instructions: {\n front: {\n en: \"Take a clear photo of the front of your ID.\",\n fr: \"Prenez une photo nette du recto de votre pièce.\"\n },\n back: {\n en: \"Take a clear photo of the back of your ID.\",\n fr: \"Prenez une photo nette du verso de votre pièce.\"\n },\n },\n ui: {\n front: {\n icon: \"id-card-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n back: {\n icon: \"id-card-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n },\n config: {\n sides: [\"front\", \"back\"],\n allowed_formats: [\"jpg\", \"png\"],\n max_size_mb: 5,\n document_types: [\"drivers_licence\", \"passport\", \"drivers_licence\", \"national_id\"],\n bbox_configs: {\n drivers_licence: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n passport: {\n xMin: 15,\n yMin: 130,\n xMax: 375,\n yMax: 350,\n borderColor: \"#007AFF\",\n borderWidth: 4,\n cornerRadius: 8\n },\n identity_card: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n health_insurance_card: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n national_id: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#5856D6\",\n borderWidth: 4,\n cornerRadius: 12\n },\n permanent_residence: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n\n\n work_permit: {\n xMin: 20,\n yMin: 140,\n xMax: 370,\n yMax: 340,\n borderColor: \"#2DBD60\",\n borderWidth: 4,\n cornerRadius: 12\n },\n\n }\n } as const\n },\n {\n id: 3,\n type: \"selfie\" as const,\n order: 5,\n templateId: 1,\n labels: {\n en: \"Take selfies from different angles\",\n fr: \"Prenez des selfies sous différents angles\"\n },\n instructions: {\n en: \"Take selfies from front, left, and right angles.\",\n fr: \"Prenez des selfies de face, profil gauche et profil droit.\"\n },\n ui: {\n icon: \"selfie-icon.png\",\n themeColor: \"#2DBD60\",\n buttonText: { en: \"Next\", fr: \"Suivant\" }\n },\n config: {\n liveness_check: true,\n max_attempts: 3,\n orientations: [\"center\", \"left\", \"right\"]\n } as const\n },\n // {\n // id: 4,\n // type: \"file_upload\" as const,\n // order: 6,\n // labels: {\n // en: \"Upload proof of address\",\n // fr: \"Téléversez un justificatif de domicile\"\n // },\n // instructions: {\n // en: \"Upload a recent utility bill or bank statement (PDF, JPG, PNG).\",\n // fr: \"Téléversez une facture récente ou un relevé bancaire (PDF, JPG, PNG).\"\n // },\n // ui: {\n // icon: \"file-upload-icon.png\",\n // themeColor: \"#2DBD60\",\n // buttonText: { en: \"Upload\", fr: \"Téléverser\" }\n // },\n // config: {\n // allowed_formats: [\"pdf\", \"jpg\", \"png\"],\n // max_size_mb: 10,\n // required: true\n // } as const\n // },\n\n ]\n};\n\nexport const TemplateKYCExample: React.FC<{ onComplete: (data: Record<number, any>) => void, onCancel: () => void, onError: (error: string) => void }> = ({ onComplete, onCancel, onError }) => {\n const handleComplete = (data: Record<number, any>) => {\n console.log('KYC Template completed with data:', data);\n onComplete(data);\n // Ici vous pouvez envoyer les données à votre API\n };\n\n const handleCancel = () => {\n console.log('KYC Template flow cancelled');\n onCancel();\n };\n\n const handleError = (error: string) => {\n console.error('KYC Template error:', error);\n // Gérer l'erreur\n };\n\n return (\n <View style={styles.container}>\n <TemplateKYCFlow\n template={advancedVerificationTemplate}\n onComplete={handleComplete}\n onError={handleError}\n onCancel={handleCancel}\n language=\"en\" // ou \"en\" pour l'anglais\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\n// Exemples de différents types de documents gouvernementaux supportés :\n/*\nexport const documentTypeExamples = {\n // Carte d'identité nationale\n idCard: {\n document_type: \"id_card\" as const,\n labels: { en: \"Upload your ID card\", fr: \"Téléversez votre carte d'identité\" }\n },\n \n // Passeport\n passport: {\n document_type: \"passport\" as const,\n labels: { en: \"Upload your passport\", fr: \"Téléversez votre passeport\" }\n },\n \n // Permis de conduire\n driversLicense: {\n document_type: \"drivers_license\" as const,\n labels: { en: \"Upload your driver's license\", fr: \"Téléversez votre permis de conduire\" }\n },\n \n // Permis de séjour\n residencePermit: {\n document_type: \"residence_permit\" as const,\n labels: { en: \"Upload your residence permit\", fr: \"Téléversez votre permis de séjour\" }\n },\n \n // Carte nationale d'identité\n nationalId: {\n document_type: \"national_id\" as const,\n labels: { en: \"Upload your national ID\", fr: \"Téléversez votre carte nationale d'identité\" }\n },\n \n // Carte d'électeur\n voterId: {\n document_type: \"voter_id\" as const,\n labels: { en: \"Upload your voter ID\", fr: \"Téléversez votre carte d'électeur\" }\n },\n \n // Carte militaire\n militaryId: {\n document_type: \"military_id\" as const,\n labels: { en: \"Upload your military ID\", fr: \"Téléversez votre carte militaire\" }\n },\n \n // Carte d'étudiant\n studentId: {\n document_type: \"student_id\" as const,\n labels: { en: \"Upload your student ID\", fr: \"Téléversez votre carte d'étudiant\" }\n },\n \n // Permis de travail\n workPermit: {\n document_type: \"work_permit\" as const,\n labels: { en: \"Upload your work permit\", fr: \"Téléversez votre permis de travail\" }\n },\n \n // Autre document gouvernemental\n other: {\n document_type: \"other\" as const,\n labels: { en: \"Upload your government document\", fr: \"Téléversez votre document gouvernemental\" }\n }\n};\n*/ "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateKYCFlowRefactored.d.ts","sourceRoot":"","sources":["../../src/components/TemplateKYCFlowRefactored.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"TemplateKYCFlowRefactored.d.ts","sourceRoot":"","sources":["../../src/components/TemplateKYCFlowRefactored.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAYjD,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiB1D,CAAC"}
|
|
@@ -1,36 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native';
|
|
3
3
|
import { TemplateKYCFlowProvider, useTemplateKYCFlowContext } from '../hooks/useTemplateKYCFlow';
|
|
4
|
+
import { useI18n } from '../hooks/useI18n';
|
|
4
5
|
import { IDCardCapture } from './KYCElements/IDCardCapture';
|
|
5
6
|
import { SelfieCaptureTemplate } from './KYCElements/SelfieCaptureTemplate';
|
|
6
7
|
import { FileUploadTemplate } from './KYCElements/FileUploadTemplate';
|
|
7
8
|
import { LocationCaptureTemplate } from './KYCElements/LocationCaptureTemplate';
|
|
8
9
|
import { CountrySelectionTemplate } from './KYCElements/CountrySelectionTemplate';
|
|
9
|
-
|
|
10
|
+
import { InitializationStep } from './KYCElements/InitializationStep';
|
|
11
|
+
import { ReviewSubmitTemplate } from './KYCElements/ReviewSubmitTemplate';
|
|
12
|
+
import { VerificationProgressTemplate } from './KYCElements/VerificationProgressTemplate';
|
|
13
|
+
export const TemplateKYCFlow = ({ template, onComplete, onError, language = 'fr', onCancel, }) => {
|
|
10
14
|
return (<TemplateKYCFlowProvider template={template} onComplete={onComplete} onError={onError} initialLanguage={language}>
|
|
11
15
|
<TemplateKYCFlowContent onCancel={onCancel}/>
|
|
12
16
|
</TemplateKYCFlowProvider>);
|
|
13
17
|
};
|
|
14
18
|
const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
15
19
|
const { state, actions, currentComponent, progress, } = useTemplateKYCFlowContext();
|
|
16
|
-
|
|
17
|
-
const getCurrentSideForComponent = (componentId) => {
|
|
18
|
-
const component = state.template.components.find(c => c.id === componentId);
|
|
19
|
-
if (!component || component.type !== 'id_card')
|
|
20
|
-
return 'front';
|
|
21
|
-
const idConfig = component.config;
|
|
22
|
-
const sides = idConfig.sides || ['front', 'back'];
|
|
23
|
-
// Calculer le côté basé sur l'ordre dans le template
|
|
24
|
-
const componentIndex = state.template.components.findIndex(c => c.id === componentId);
|
|
25
|
-
const sideIndex = componentIndex % sides.length;
|
|
26
|
-
return sides[sideIndex];
|
|
27
|
-
};
|
|
20
|
+
const { t } = useI18n();
|
|
28
21
|
const updateComponentData = (componentId, data) => {
|
|
29
22
|
actions.updateComponentData(componentId, data);
|
|
30
23
|
};
|
|
31
24
|
if (!currentComponent) {
|
|
32
25
|
return (<View style={styles.container}>
|
|
33
|
-
<Text style={styles.errorText}>
|
|
26
|
+
<Text style={styles.errorText}>{t('errors.unknownError')}</Text>
|
|
34
27
|
</View>);
|
|
35
28
|
}
|
|
36
29
|
// Rendu du composant actuel
|
|
@@ -42,9 +35,12 @@ const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
|
42
35
|
error: state.errors[currentComponent.id],
|
|
43
36
|
language: state.currentLanguage,
|
|
44
37
|
};
|
|
38
|
+
if (!state.session.isInitialized) {
|
|
39
|
+
return <InitializationStep session={state.session}/>;
|
|
40
|
+
}
|
|
45
41
|
switch (currentComponent.type) {
|
|
46
42
|
case 'id_card':
|
|
47
|
-
return <IDCardCapture {...commonProps}
|
|
43
|
+
return <IDCardCapture {...commonProps}/>;
|
|
48
44
|
case 'selfie':
|
|
49
45
|
return <SelfieCaptureTemplate {...commonProps}/>;
|
|
50
46
|
case 'file_upload':
|
|
@@ -53,42 +49,53 @@ const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
|
53
49
|
return <LocationCaptureTemplate {...commonProps}/>;
|
|
54
50
|
case 'country_selection':
|
|
55
51
|
return <CountrySelectionTemplate {...commonProps}/>;
|
|
52
|
+
case 'review_submit':
|
|
53
|
+
return <ReviewSubmitTemplate {...commonProps}/>;
|
|
54
|
+
case 'verification_progress':
|
|
55
|
+
return <VerificationProgressTemplate {...commonProps}/>;
|
|
56
56
|
default:
|
|
57
57
|
return (<View style={styles.unsupportedContainer}>
|
|
58
58
|
<Text style={styles.unsupportedText}>
|
|
59
|
-
|
|
59
|
+
{t('errors.unknownError')}: {currentComponent.type}
|
|
60
60
|
</Text>
|
|
61
61
|
</View>);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
return (<
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
return (<View style={{ flex: 1 }}>
|
|
65
|
+
{state.isProcessing && (<View style={styles.processingContainer}>
|
|
66
|
+
<Text style={styles.processingText}>{t('common.loading')}</Text>
|
|
67
|
+
<ActivityIndicator size="large" color="#fff"/>
|
|
68
|
+
</View>)}
|
|
69
|
+
<SafeAreaView style={styles.container}>
|
|
70
|
+
{/* Header avec informations sur l'étape */}
|
|
71
|
+
|
|
72
|
+
{(state.showCustomStepper && state.session.isInitialized) ? (<View style={styles.header}>
|
|
73
|
+
<Text style={styles.progressText}>
|
|
74
|
+
{t('kyc.step', { current: state.currentComponentIndex + 1, total: state.template.components.length })}
|
|
75
|
+
</Text>
|
|
76
|
+
<View style={styles.progressContainer}>
|
|
77
|
+
<View style={styles.progressBar}>
|
|
78
|
+
<View style={[
|
|
73
79
|
styles.progressFill,
|
|
74
80
|
{ width: `${progress}%` }
|
|
75
81
|
]}/>
|
|
76
|
-
|
|
82
|
+
</View>
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
</View>
|
|
79
85
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
<View style={{ position: 'absolute', right: 12, top: 12 }}>
|
|
87
|
+
<TouchableOpacity onPress={onCancel} disabled={!onCancel} style={{ opacity: onCancel ? 1 : 0.5 }}>
|
|
88
|
+
<Text style={{ fontSize: 20, fontWeight: 'bold', color: '#333' }}>{`X`}</Text>
|
|
89
|
+
</TouchableOpacity>
|
|
90
|
+
</View>
|
|
91
|
+
</View>) : null}
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
{/* Contenu principal */}
|
|
94
|
+
<View style={styles.content}>
|
|
95
|
+
{renderCurrentComponent()}
|
|
96
|
+
</View>
|
|
97
|
+
</SafeAreaView>
|
|
98
|
+
</View>);
|
|
92
99
|
};
|
|
93
100
|
const styles = StyleSheet.create({
|
|
94
101
|
container: {
|
|
@@ -206,5 +213,22 @@ const styles = StyleSheet.create({
|
|
|
206
213
|
color: '#666',
|
|
207
214
|
textAlign: 'center',
|
|
208
215
|
},
|
|
216
|
+
processingContainer: {
|
|
217
|
+
position: 'absolute',
|
|
218
|
+
flex: 1,
|
|
219
|
+
width: Dimensions.get('window').width,
|
|
220
|
+
height: Dimensions.get('window').height,
|
|
221
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
222
|
+
justifyContent: 'center',
|
|
223
|
+
alignItems: 'center',
|
|
224
|
+
zIndex: 1000,
|
|
225
|
+
},
|
|
226
|
+
processingText: {
|
|
227
|
+
fontSize: 16,
|
|
228
|
+
color: '#fff',
|
|
229
|
+
textAlign: 'center',
|
|
230
|
+
fontWeight: 'bold',
|
|
231
|
+
marginBottom: 10,
|
|
232
|
+
},
|
|
209
233
|
});
|
|
210
234
|
//# sourceMappingURL=TemplateKYCFlowRefactored.js.map
|