@sanctum-key/react-native-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +278 -0
- package/android/build/.transforms/f62cb96b2d1f78ca96ab35932dd530dc/results.bin +1 -0
- package/android/build/.transforms/f62cb96b2d1f78ca96ab35932dd530dc/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/transfergratis/com/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +69 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- 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/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -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 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/transfergratis-react-native-sdk_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +110 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +69 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/file_paths.xml +15 -0
- 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 +2 -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.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.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/inputs/source-to-output.tab_i.len +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +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-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +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.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +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/class-fq-name-to-source.tab_i.len +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/internal-name-to-source.tab_i.len +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +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/proto.tab_i.len +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.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/source-to-classes.tab_i.len +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +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/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +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.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +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/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -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.len +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/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +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/id-to-file.tab_i.len +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/caches-jvm/lookups/lookups.tab_i.len +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/logs/manifest-merger-debug-report.txt +101 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/transfergratis-react-native-sdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
- 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 +43 -0
- package/android/src/main/AndroidManifest.xml +49 -0
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +131 -0
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +161 -0
- package/android/src/main/res/xml/file_paths.xml +15 -0
- package/build/App.d.ts +3 -0
- package/build/App.d.ts.map +1 -0
- package/build/App.js +9 -0
- package/build/App.js.map +1 -0
- package/build/TransfergratisSdk.types.d.ts +32 -0
- package/build/TransfergratisSdk.types.d.ts.map +1 -0
- package/build/TransfergratisSdk.types.js +2 -0
- package/build/TransfergratisSdk.types.js.map +1 -0
- package/build/TransfergratisSdkModule.d.ts +21 -0
- package/build/TransfergratisSdkModule.d.ts.map +1 -0
- package/build/TransfergratisSdkModule.js +4 -0
- package/build/TransfergratisSdkModule.js.map +1 -0
- package/build/TransfergratisSdkModule.web.d.ts +20 -0
- package/build/TransfergratisSdkModule.web.d.ts.map +1 -0
- package/build/TransfergratisSdkModule.web.js +25 -0
- package/build/TransfergratisSdkModule.web.js.map +1 -0
- package/build/TransfergratisSdkView.d.ts +4 -0
- package/build/TransfergratisSdkView.d.ts.map +1 -0
- package/build/TransfergratisSdkView.js +7 -0
- package/build/TransfergratisSdkView.js.map +1 -0
- package/build/TransfergratisSdkView.web.d.ts +4 -0
- package/build/TransfergratisSdkView.web.d.ts.map +1 -0
- package/build/TransfergratisSdkView.web.js +11 -0
- package/build/TransfergratisSdkView.web.js.map +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/Camera/index.d.ts +2 -0
- package/build/components/Camera/index.d.ts.map +1 -0
- package/build/components/Camera/index.js +2 -0
- package/build/components/Camera/index.js.map +1 -0
- package/build/components/Camera/index.web.d.ts +2 -0
- package/build/components/Camera/index.web.d.ts.map +1 -0
- package/build/components/Camera/index.web.js +2 -0
- package/build/components/Camera/index.web.js.map +1 -0
- package/build/components/Camera/types.d.ts +2 -0
- package/build/components/Camera/types.d.ts.map +1 -0
- package/build/components/Camera/types.js +2 -0
- package/build/components/Camera/types.js.map +1 -0
- package/build/components/ConfigurableKYCFlow.d.ts +11 -0
- package/build/components/ConfigurableKYCFlow.d.ts.map +1 -0
- package/build/components/ConfigurableKYCFlow.js +257 -0
- package/build/components/ConfigurableKYCFlow.js.map +1 -0
- package/build/components/CustomCameraExample.d.ts +10 -0
- package/build/components/CustomCameraExample.d.ts.map +1 -0
- package/build/components/CustomCameraExample.js +232 -0
- package/build/components/CustomCameraExample.js.map +1 -0
- package/build/components/EnhancedCameraView.d.ts +4 -0
- package/build/components/EnhancedCameraView.d.ts.map +1 -0
- package/build/components/EnhancedCameraView.js +393 -0
- package/build/components/EnhancedCameraView.js.map +1 -0
- package/build/components/EnhancedCameraView.web.d.ts +4 -0
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -0
- package/build/components/EnhancedCameraView.web.js +499 -0
- package/build/components/EnhancedCameraView.web.js.map +1 -0
- package/build/components/FileUpload.d.ts +13 -0
- package/build/components/FileUpload.d.ts.map +1 -0
- package/build/components/FileUpload.js +216 -0
- package/build/components/FileUpload.js.map +1 -0
- package/build/components/KYCElementRenderer.d.ts +14 -0
- package/build/components/KYCElementRenderer.d.ts.map +1 -0
- package/build/components/KYCElementRenderer.js +31 -0
- package/build/components/KYCElementRenderer.js.map +1 -0
- package/build/components/KYCElements/AdditionalDocumentsTemplate.d.ts +12 -0
- package/build/components/KYCElements/AdditionalDocumentsTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/AdditionalDocumentsTemplate.js +283 -0
- package/build/components/KYCElements/AdditionalDocumentsTemplate.js.map +1 -0
- package/build/components/KYCElements/CameraCapture.d.ts +11 -0
- package/build/components/KYCElements/CameraCapture.d.ts.map +1 -0
- package/build/components/KYCElements/CameraCapture.js +219 -0
- package/build/components/KYCElements/CameraCapture.js.map +1 -0
- package/build/components/KYCElements/CompletionStep.d.ts +10 -0
- package/build/components/KYCElements/CompletionStep.d.ts.map +1 -0
- package/build/components/KYCElements/CompletionStep.js +147 -0
- package/build/components/KYCElements/CompletionStep.js.map +1 -0
- package/build/components/KYCElements/CountrySelection.d.ts +11 -0
- package/build/components/KYCElements/CountrySelection.d.ts.map +1 -0
- package/build/components/KYCElements/CountrySelection.js +147 -0
- package/build/components/KYCElements/CountrySelection.js.map +1 -0
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts +15 -0
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/CountrySelectionTemplate.js +438 -0
- package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -0
- package/build/components/KYCElements/DocumentTypeSelection.d.ts +11 -0
- package/build/components/KYCElements/DocumentTypeSelection.d.ts.map +1 -0
- package/build/components/KYCElements/DocumentTypeSelection.js +143 -0
- package/build/components/KYCElements/DocumentTypeSelection.js.map +1 -0
- package/build/components/KYCElements/EmailVerificationTemplate.d.ts +12 -0
- package/build/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/EmailVerificationTemplate.js +212 -0
- package/build/components/KYCElements/EmailVerificationTemplate.js.map +1 -0
- package/build/components/KYCElements/FileUpload.d.ts +11 -0
- package/build/components/KYCElements/FileUpload.d.ts.map +1 -0
- package/build/components/KYCElements/FileUpload.js +268 -0
- package/build/components/KYCElements/FileUpload.js.map +1 -0
- package/build/components/KYCElements/FileUploadTemplate.d.ts +12 -0
- package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/FileUploadTemplate.js +331 -0
- package/build/components/KYCElements/FileUploadTemplate.js.map +1 -0
- package/build/components/KYCElements/IDCardCapture.d.ts +19 -0
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -0
- package/build/components/KYCElements/IDCardCapture.js +877 -0
- package/build/components/KYCElements/IDCardCapture.js.map +1 -0
- 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 +20 -0
- package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/LocationCaptureTemplate.js +318 -0
- package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -0
- package/build/components/KYCElements/OrientationVideoCapture.d.ts +14 -0
- package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -0
- package/build/components/KYCElements/OrientationVideoCapture.js +534 -0
- package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -0
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +14 -0
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -0
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js +504 -0
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -0
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +14 -0
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -0
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js +430 -0
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -0
- package/build/components/KYCElements/PersonalInformationTemplate.d.ts +12 -0
- package/build/components/KYCElements/PersonalInformationTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/PersonalInformationTemplate.js +120 -0
- package/build/components/KYCElements/PersonalInformationTemplate.js.map +1 -0
- package/build/components/KYCElements/PhoneVerificationTemplate.d.ts +12 -0
- package/build/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/PhoneVerificationTemplate.js +185 -0
- package/build/components/KYCElements/PhoneVerificationTemplate.js.map +1 -0
- 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/SelfieCapture.d.ts +11 -0
- package/build/components/KYCElements/SelfieCapture.d.ts.map +1 -0
- package/build/components/KYCElements/SelfieCapture.js +236 -0
- package/build/components/KYCElements/SelfieCapture.js.map +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +16 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.js +568 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -0
- 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 +195 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
- package/build/components/KYCElements/VerificationStep.d.ts +10 -0
- package/build/components/KYCElements/VerificationStep.d.ts.map +1 -0
- package/build/components/KYCElements/VerificationStep.js +199 -0
- package/build/components/KYCElements/VerificationStep.js.map +1 -0
- package/build/components/KYCElements/WelcomeTemplate.d.ts +12 -0
- package/build/components/KYCElements/WelcomeTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/WelcomeTemplate.js +244 -0
- package/build/components/KYCElements/WelcomeTemplate.js.map +1 -0
- package/build/components/KYCExample.d.ts +3 -0
- package/build/components/KYCExample.d.ts.map +1 -0
- package/build/components/KYCExample.js +247 -0
- package/build/components/KYCExample.js.map +1 -0
- package/build/components/KYCFlow.d.ts +3 -0
- package/build/components/KYCFlow.d.ts.map +1 -0
- package/build/components/KYCFlow.js +308 -0
- package/build/components/KYCFlow.js.map +1 -0
- package/build/components/NativeCameraView.d.ts +11 -0
- package/build/components/NativeCameraView.d.ts.map +1 -0
- package/build/components/NativeCameraView.js +27 -0
- package/build/components/NativeCameraView.js.map +1 -0
- package/build/components/OverLay/IdCard.d.ts +4 -0
- package/build/components/OverLay/IdCard.d.ts.map +1 -0
- package/build/components/OverLay/IdCard.js +185 -0
- package/build/components/OverLay/IdCard.js.map +1 -0
- package/build/components/OverLay/SelfieOverlay.d.ts +4 -0
- package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -0
- package/build/components/OverLay/SelfieOverlay.js +169 -0
- package/build/components/OverLay/SelfieOverlay.js.map +1 -0
- package/build/components/OverLay/StepOverlay.d.ts +9 -0
- package/build/components/OverLay/StepOverlay.d.ts.map +1 -0
- package/build/components/OverLay/StepOverlay.js +53 -0
- package/build/components/OverLay/StepOverlay.js.map +1 -0
- package/build/components/OverLay/type.d.ts +98 -0
- package/build/components/OverLay/type.d.ts.map +1 -0
- package/build/components/OverLay/type.js +2 -0
- package/build/components/OverLay/type.js.map +1 -0
- package/build/components/ProgressIndicator.d.ts +8 -0
- package/build/components/ProgressIndicator.d.ts.map +1 -0
- package/build/components/ProgressIndicator.js +48 -0
- package/build/components/ProgressIndicator.js.map +1 -0
- package/build/components/SelfieCapture.d.ts +3 -0
- package/build/components/SelfieCapture.d.ts.map +1 -0
- package/build/components/SelfieCapture.js +197 -0
- package/build/components/SelfieCapture.js.map +1 -0
- package/build/components/SimpleExample.d.ts +3 -0
- package/build/components/SimpleExample.d.ts.map +1 -0
- package/build/components/SimpleExample.js +89 -0
- package/build/components/SimpleExample.js.map +1 -0
- package/build/components/Svgs/GpsIcon.d.ts +3 -0
- package/build/components/Svgs/GpsIcon.d.ts.map +1 -0
- package/build/components/Svgs/GpsIcon.js +9 -0
- package/build/components/Svgs/GpsIcon.js.map +1 -0
- package/build/components/Svgs/Schield.d.ts +3 -0
- package/build/components/Svgs/Schield.d.ts.map +1 -0
- package/build/components/Svgs/Schield.js +22 -0
- package/build/components/Svgs/Schield.js.map +1 -0
- package/build/components/Svgs/directionArrow.gif +0 -0
- package/build/components/Svgs/frontSelfieIcon.d.ts +3 -0
- package/build/components/Svgs/frontSelfieIcon.d.ts.map +1 -0
- package/build/components/Svgs/frontSelfieIcon.js +11 -0
- package/build/components/Svgs/frontSelfieIcon.js.map +1 -0
- package/build/components/Svgs/scanningLine.d.ts +9 -0
- package/build/components/Svgs/scanningLine.d.ts.map +1 -0
- package/build/components/Svgs/scanningLine.js +61 -0
- package/build/components/Svgs/scanningLine.js.map +1 -0
- package/build/components/Svgs/sideSelfieIcon.d.ts +3 -0
- package/build/components/Svgs/sideSelfieIcon.d.ts.map +1 -0
- package/build/components/Svgs/sideSelfieIcon.js +9 -0
- package/build/components/Svgs/sideSelfieIcon.js.map +1 -0
- package/build/components/TemplateKYCExample.d.ts +22 -0
- package/build/components/TemplateKYCExample.d.ts.map +1 -0
- package/build/components/TemplateKYCExample.js +155 -0
- package/build/components/TemplateKYCExample.js.map +1 -0
- package/build/components/TemplateKYCFlowRefactored.d.ts +26 -0
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -0
- package/build/components/TemplateKYCFlowRefactored.js +359 -0
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -0
- package/build/components/VisionCameraView.d.ts +22 -0
- package/build/components/VisionCameraView.d.ts.map +1 -0
- package/build/components/VisionCameraView.js +142 -0
- package/build/components/VisionCameraView.js.map +1 -0
- package/build/components/example/CameraCaptureEx.d.ts +4 -0
- package/build/components/example/CameraCaptureEx.d.ts.map +1 -0
- package/build/components/example/CameraCaptureEx.js +219 -0
- package/build/components/example/CameraCaptureEx.js.map +1 -0
- package/build/components/example/CameraCaptureExAdvanced.d.ts +3 -0
- package/build/components/example/CameraCaptureExAdvanced.d.ts.map +1 -0
- package/build/components/example/CameraCaptureExAdvanced.js +229 -0
- package/build/components/example/CameraCaptureExAdvanced.js.map +1 -0
- package/build/components/example/CameraCaptureExScan.d.ts +3 -0
- package/build/components/example/CameraCaptureExScan.d.ts.map +1 -0
- package/build/components/example/CameraCaptureExScan.js +213 -0
- package/build/components/example/CameraCaptureExScan.js.map +1 -0
- package/build/components/example/CameraCaptureExSimple.d.ts +3 -0
- package/build/components/example/CameraCaptureExSimple.d.ts.map +1 -0
- package/build/components/example/CameraCaptureExSimple.js +138 -0
- package/build/components/example/CameraCaptureExSimple.js.map +1 -0
- package/build/components/example/DynamicTemplateExample.d.ts +10 -0
- package/build/components/example/DynamicTemplateExample.d.ts.map +1 -0
- package/build/components/example/DynamicTemplateExample.js +241 -0
- package/build/components/example/DynamicTemplateExample.js.map +1 -0
- package/build/components/example/OrientationVideoExample.d.ts +4 -0
- package/build/components/example/OrientationVideoExample.d.ts.map +1 -0
- package/build/components/example/OrientationVideoExample.js +325 -0
- package/build/components/example/OrientationVideoExample.js.map +1 -0
- package/build/components/example/SelfieCaptureEx.d.ts +4 -0
- package/build/components/example/SelfieCaptureEx.d.ts.map +1 -0
- package/build/components/example/SelfieCaptureEx.js +238 -0
- package/build/components/example/SelfieCaptureEx.js.map +1 -0
- package/build/components/ui/Button.d.ts +37 -0
- package/build/components/ui/Button.d.ts.map +1 -0
- package/build/components/ui/Button.js +194 -0
- package/build/components/ui/Button.js.map +1 -0
- package/build/components/ui/ButtonExample.d.ts +4 -0
- package/build/components/ui/ButtonExample.d.ts.map +1 -0
- package/build/components/ui/ButtonExample.js +209 -0
- package/build/components/ui/ButtonExample.js.map +1 -0
- package/build/components/ui/ButtonStyles.d.ts +521 -0
- package/build/components/ui/ButtonStyles.d.ts.map +1 -0
- package/build/components/ui/ButtonStyles.js +429 -0
- package/build/components/ui/ButtonStyles.js.map +1 -0
- package/build/config/KYCConfig.d.ts +14 -0
- package/build/config/KYCConfig.d.ts.map +1 -0
- package/build/config/KYCConfig.js +26 -0
- package/build/config/KYCConfig.js.map +1 -0
- package/build/config/KYCConfigs.d.ts +7 -0
- package/build/config/KYCConfigs.d.ts.map +1 -0
- package/build/config/KYCConfigs.js +516 -0
- package/build/config/KYCConfigs.js.map +1 -0
- package/build/config/allowedDomains.d.ts +30 -0
- package/build/config/allowedDomains.d.ts.map +1 -0
- package/build/config/allowedDomains.js +112 -0
- package/build/config/allowedDomains.js.map +1 -0
- package/build/config/countriesData.d.ts +3 -0
- package/build/config/countriesData.d.ts.map +1 -0
- package/build/config/countriesData.js +80 -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 +736 -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/useKYC.d.ts +15 -0
- package/build/hooks/useKYC.d.ts.map +1 -0
- package/build/hooks/useKYC.js +103 -0
- package/build/hooks/useKYC.js.map +1 -0
- package/build/hooks/useKYCFlow.d.ts +3 -0
- package/build/hooks/useKYCFlow.d.ts.map +1 -0
- package/build/hooks/useKYCFlow.js +221 -0
- package/build/hooks/useKYCFlow.js.map +1 -0
- package/build/hooks/useLocation.d.ts +32 -0
- package/build/hooks/useLocation.d.ts.map +1 -0
- package/build/hooks/useLocation.js +165 -0
- package/build/hooks/useLocation.js.map +1 -0
- package/build/hooks/useOrientationVideo.d.ts +10 -0
- package/build/hooks/useOrientationVideo.d.ts.map +1 -0
- package/build/hooks/useOrientationVideo.js +118 -0
- package/build/hooks/useOrientationVideo.js.map +1 -0
- 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 +48 -0
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -0
- package/build/hooks/useTemplateKYCFlow.js +910 -0
- package/build/hooks/useTemplateKYCFlow.js.map +1 -0
- package/build/hooks/useTemplateLoader.d.ts +14 -0
- package/build/hooks/useTemplateLoader.d.ts.map +1 -0
- package/build/hooks/useTemplateLoader.js +85 -0
- package/build/hooks/useTemplateLoader.js.map +1 -0
- package/build/i18n/en/index.d.ts +233 -0
- package/build/i18n/en/index.d.ts.map +1 -0
- package/build/i18n/en/index.js +261 -0
- package/build/i18n/en/index.js.map +1 -0
- package/build/i18n/fr/index.d.ts +219 -0
- package/build/i18n/fr/index.d.ts.map +1 -0
- package/build/i18n/fr/index.js +246 -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 +162 -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/index.d.ts +11 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +17 -0
- package/build/index.js.map +1 -0
- package/build/modules/api/CardAuthentification.d.ts +72 -0
- package/build/modules/api/CardAuthentification.d.ts.map +1 -0
- package/build/modules/api/CardAuthentification.js +487 -0
- package/build/modules/api/CardAuthentification.js.map +1 -0
- package/build/modules/api/KYCService.d.ts +116 -0
- package/build/modules/api/KYCService.d.ts.map +1 -0
- package/build/modules/api/KYCService.js +526 -0
- package/build/modules/api/KYCService.js.map +1 -0
- package/build/modules/api/SelfieVerification.d.ts +5 -0
- package/build/modules/api/SelfieVerification.d.ts.map +1 -0
- package/build/modules/api/SelfieVerification.js +25 -0
- package/build/modules/api/SelfieVerification.js.map +1 -0
- package/build/modules/api/TemplateService.d.ts +44 -0
- package/build/modules/api/TemplateService.d.ts.map +1 -0
- package/build/modules/api/TemplateService.js +146 -0
- package/build/modules/api/TemplateService.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 +53 -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/NativeCameraModule.d.ts +52 -0
- package/build/modules/camera/NativeCameraModule.d.ts.map +1 -0
- package/build/modules/camera/NativeCameraModule.js +149 -0
- package/build/modules/camera/NativeCameraModule.js.map +1 -0
- package/build/modules/camera/UnifiedCameraModule.d.ts +70 -0
- package/build/modules/camera/UnifiedCameraModule.d.ts.map +1 -0
- package/build/modules/camera/UnifiedCameraModule.js +125 -0
- package/build/modules/camera/UnifiedCameraModule.js.map +1 -0
- package/build/modules/camera/VisionCameraModule.d.ts +62 -0
- package/build/modules/camera/VisionCameraModule.d.ts.map +1 -0
- package/build/modules/camera/VisionCameraModule.js +313 -0
- package/build/modules/camera/VisionCameraModule.js.map +1 -0
- package/build/modules/camera/VisionCameraModule.web.d.ts +145 -0
- package/build/modules/camera/VisionCameraModule.web.d.ts.map +1 -0
- package/build/modules/camera/VisionCameraModule.web.js +589 -0
- package/build/modules/camera/VisionCameraModule.web.js.map +1 -0
- package/build/modules/camera/index.d.ts +5 -0
- package/build/modules/camera/index.d.ts.map +1 -0
- package/build/modules/camera/index.js +4 -0
- package/build/modules/camera/index.js.map +1 -0
- package/build/stores/kycStore.d.ts +55 -0
- package/build/stores/kycStore.d.ts.map +1 -0
- package/build/stores/kycStore.js +98 -0
- package/build/stores/kycStore.js.map +1 -0
- package/build/types/KYC.types.d.ts +643 -0
- package/build/types/KYC.types.d.ts.map +1 -0
- package/build/types/KYC.types.js +25 -0
- package/build/types/KYC.types.js.map +1 -0
- package/build/types/env.types.d.ts +13 -0
- package/build/types/env.types.d.ts.map +1 -0
- package/build/types/env.types.js +2 -0
- package/build/types/env.types.js.map +1 -0
- package/build/utils/cropByObb.d.ts +37 -0
- package/build/utils/cropByObb.d.ts.map +1 -0
- package/build/utils/cropByObb.js +215 -0
- package/build/utils/cropByObb.js.map +1 -0
- package/build/utils/deviceDetection.d.ts +6 -0
- package/build/utils/deviceDetection.d.ts.map +1 -0
- package/build/utils/deviceDetection.js +12 -0
- package/build/utils/deviceDetection.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/logger.d.ts +12 -0
- package/build/utils/logger.d.ts.map +1 -0
- package/build/utils/logger.js +45 -0
- package/build/utils/logger.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 +65 -0
- package/build/utils/pathToBase64.js.map +1 -0
- package/build/utils/platformAlert.d.ts +20 -0
- package/build/utils/platformAlert.d.ts.map +1 -0
- package/build/utils/platformAlert.js +67 -0
- package/build/utils/platformAlert.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/build/utils/template-transformer.d.ts +10 -0
- package/build/utils/template-transformer.d.ts.map +1 -0
- package/build/utils/template-transformer.js +365 -0
- package/build/utils/template-transformer.js.map +1 -0
- package/build/web/WebKYCEntry.d.ts +9 -0
- package/build/web/WebKYCEntry.d.ts.map +1 -0
- package/build/web/WebKYCEntry.js +288 -0
- package/build/web/WebKYCEntry.js.map +1 -0
- package/build/web/index.d.ts +2 -0
- package/build/web/index.d.ts.map +1 -0
- package/build/web/index.js +2 -0
- package/build/web/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/TransfergratisSdk.podspec +31 -0
- package/ios/TransfergratisSdkModule.swift +409 -0
- package/package.json +71 -0
- package/plugin/build/index.d.ts +5 -0
- package/plugin/build/index.js +12 -0
- package/plugin/build/withLocation.d.ts +9 -0
- package/plugin/build/withLocation.js +77 -0
- package/plugin/build/withRemovePermissions.d.ts +3 -0
- package/plugin/build/withRemovePermissions.js +67 -0
- package/plugin/build/withVisionCamera.d.ts +8 -0
- package/plugin/build/withVisionCamera.js +68 -0
- package/plugin/src/index.ts +5 -0
- package/plugin/src/withLocation.ts +109 -0
- package/plugin/src/withRemovePermissions.js +85 -0
- package/plugin/src/withRemovePermissions.ts +83 -0
- package/plugin/src/withVisionCamera.js +88 -0
- package/plugin/src/withVisionCamera.ts +97 -0
- package/plugin/tsconfig.json +17 -0
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/plugin.js +19 -0
- package/src/App.tsx +9 -0
- package/src/TransfergratisSdk.types.ts +30 -0
- package/src/TransfergratisSdkModule.ts +16 -0
- package/src/TransfergratisSdkModule.web.ts +31 -0
- package/src/TransfergratisSdkView.tsx +11 -0
- package/src/TransfergratisSdkView.web.tsx +15 -0
- package/src/api/axios.ts +144 -0
- package/src/components/Camera/index.tsx +0 -0
- package/src/components/Camera/index.web.tsx +0 -0
- package/src/components/Camera/types.ts +0 -0
- package/src/components/ConfigurableKYCFlow.tsx +334 -0
- package/src/components/CustomCameraExample.tsx +274 -0
- package/src/components/EnhancedCameraView.tsx +482 -0
- package/src/components/EnhancedCameraView.web.tsx +597 -0
- package/src/components/FileUpload.tsx +249 -0
- package/src/components/KYCElementRenderer.tsx +106 -0
- package/src/components/KYCElements/AdditionalDocumentsTemplate.tsx +346 -0
- package/src/components/KYCElements/CameraCapture.tsx +268 -0
- package/src/components/KYCElements/CompletionStep.tsx +161 -0
- package/src/components/KYCElements/CountrySelection.tsx +177 -0
- package/src/components/KYCElements/CountrySelectionTemplate.tsx +526 -0
- package/src/components/KYCElements/DocumentTypeSelection.tsx +173 -0
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +278 -0
- package/src/components/KYCElements/FileUpload.tsx +318 -0
- package/src/components/KYCElements/FileUploadTemplate.tsx +395 -0
- package/src/components/KYCElements/IDCardCapture.tsx +1053 -0
- package/src/components/KYCElements/InitializationStep.tsx +53 -0
- package/src/components/KYCElements/LocationCaptureTemplate.tsx +378 -0
- package/src/components/KYCElements/OrientationVideoCapture.tsx +649 -0
- package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +616 -0
- package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +534 -0
- package/src/components/KYCElements/PersonalInformationTemplate.tsx +158 -0
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +253 -0
- package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
- package/src/components/KYCElements/SelfieCapture.tsx +284 -0
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +662 -0
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +247 -0
- package/src/components/KYCElements/VerificationStep.tsx +234 -0
- package/src/components/KYCElements/WelcomeTemplate.tsx +290 -0
- package/src/components/KYCExample.tsx +297 -0
- package/src/components/KYCFlow.tsx +377 -0
- package/src/components/NativeCameraView.tsx +47 -0
- package/src/components/OverLay/IdCard.tsx +277 -0
- package/src/components/OverLay/SelfieOverlay.tsx +211 -0
- package/src/components/OverLay/StepOverlay.tsx +64 -0
- package/src/components/OverLay/type.ts +91 -0
- package/src/components/ProgressIndicator.tsx +62 -0
- package/src/components/SelfieCapture.tsx +244 -0
- package/src/components/SimpleExample.tsx +92 -0
- package/src/components/Svgs/GpsIcon.tsx +12 -0
- package/src/components/Svgs/Schield.tsx +26 -0
- package/src/components/Svgs/directionArrow.gif +0 -0
- package/src/components/Svgs/frontSelfieIcon.tsx +13 -0
- package/src/components/Svgs/scanningLine.tsx +88 -0
- package/src/components/Svgs/sideSelfieIcon.tsx +10 -0
- package/src/components/TemplateKYCExample.tsx +194 -0
- package/src/components/TemplateKYCFlowRefactored.tsx +473 -0
- package/src/components/VisionCameraView.tsx +197 -0
- package/src/components/example/CameraCaptureEx.tsx +335 -0
- package/src/components/example/CameraCaptureExAdvanced.tsx +357 -0
- package/src/components/example/CameraCaptureExScan.tsx +336 -0
- package/src/components/example/CameraCaptureExSimple.tsx +215 -0
- package/src/components/example/DynamicTemplateExample.tsx +289 -0
- package/src/components/example/OrientationVideoExample.tsx +380 -0
- package/src/components/example/SelfieCaptureEx.tsx +358 -0
- package/src/components/ui/Button.tsx +328 -0
- package/src/components/ui/ButtonExample.tsx +318 -0
- package/src/components/ui/ButtonStyles.ts +465 -0
- package/src/config/KYCConfig.ts +34 -0
- package/src/config/KYCConfigs.ts +528 -0
- package/src/config/allowedDomains.ts +133 -0
- package/src/config/countriesData.ts +85 -0
- package/src/config/region_mapping.json +735 -0
- package/src/config/region_mapping.ts +737 -0
- package/src/hooks/useI18n.ts +53 -0
- package/src/hooks/useKYC.ts +131 -0
- package/src/hooks/useKYCFlow.ts +248 -0
- package/src/hooks/useLocation.ts +221 -0
- package/src/hooks/useOrientationVideo.ts +149 -0
- package/src/hooks/useRealtimeVerifier.ts +128 -0
- package/src/hooks/useTemplateKYCFlow.tsx +1051 -0
- package/src/hooks/useTemplateLoader.ts +102 -0
- package/src/i18n/README.md +288 -0
- package/src/i18n/en/index.ts +275 -0
- package/src/i18n/fr/index.ts +260 -0
- package/src/i18n/index.ts +65 -0
- package/src/i18n/types.ts +182 -0
- package/src/i18n/usage-example.tsx +202 -0
- package/src/index.ts +25 -0
- package/src/modules/api/CardAuthentification.ts +589 -0
- package/src/modules/api/KYCService.ts +666 -0
- package/src/modules/api/SelfieVerification.ts +33 -0
- package/src/modules/api/TemplateService.ts +168 -0
- package/src/modules/api/backendApi.ts +8 -0
- package/src/modules/api/types.ts +59 -0
- package/src/modules/camera/NativeCameraModule.ts +170 -0
- package/src/modules/camera/UnifiedCameraModule.ts +160 -0
- package/src/modules/camera/VisionCameraModule.ts +334 -0
- package/src/modules/camera/VisionCameraModule.web.ts +679 -0
- package/src/modules/camera/index.ts +6 -0
- package/src/stores/kycStore.ts +161 -0
- package/src/types/KYC.types.ts +837 -0
- package/src/types/env.types.ts +13 -0
- package/src/utils/cropByObb.ts +254 -0
- package/src/utils/deviceDetection.ts +11 -0
- package/src/utils/get-document-type-info.ts +62 -0
- package/src/utils/logger.ts +48 -0
- package/src/utils/pathToBase64.ts +63 -0
- package/src/utils/platformAlert.ts +86 -0
- package/src/utils/remove-duplicate.ts +3 -0
- package/src/utils/template-transformer.ts +445 -0
- package/src/web/WebKYCEntry.tsx +375 -0
- package/src/web/index.ts +1 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
4
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
5
|
+
import { Button } from '../ui/Button';
|
|
6
|
+
import ShieldIcon from '../Svgs/Schield';
|
|
7
|
+
export const WelcomeTemplate = ({ component, value, onValueChange, error, }) => {
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
const { getLocalizedText, actions } = useTemplateKYCFlowContext();
|
|
10
|
+
const config = component.config;
|
|
11
|
+
// Consentements cochés par défaut
|
|
12
|
+
const privacyConsent = true;
|
|
13
|
+
const termsConsent = true;
|
|
14
|
+
const [shouldProceed, setShouldProceed] = useState(false);
|
|
15
|
+
// Get localized text
|
|
16
|
+
const title = getLocalizedText(component.labels);
|
|
17
|
+
const description = getLocalizedText(component.instructions);
|
|
18
|
+
const welcomeMessage = config.welcomeMessage || description;
|
|
19
|
+
const buttonText = config.buttonText || getLocalizedText(component.ui.buttonText || { en: 'Get Started', fr: 'Commencer' });
|
|
20
|
+
// Passer à l'étape suivante après que les données sont mises à jour
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (shouldProceed && value && value.consentGiven) {
|
|
23
|
+
// Petit délai pour s'assurer que le state est bien mis à jour
|
|
24
|
+
const timer = setTimeout(() => {
|
|
25
|
+
actions.nextComponent();
|
|
26
|
+
setShouldProceed(false);
|
|
27
|
+
}, 100);
|
|
28
|
+
return () => clearTimeout(timer);
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}, [value, shouldProceed, actions]);
|
|
32
|
+
const handleGetStarted = () => {
|
|
33
|
+
// Mark component as complete
|
|
34
|
+
const consentData = { consentGiven: true, privacyConsent, termsConsent };
|
|
35
|
+
onValueChange(consentData);
|
|
36
|
+
setShouldProceed(true);
|
|
37
|
+
};
|
|
38
|
+
return (<View style={styles.container}>
|
|
39
|
+
<View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
|
|
40
|
+
{/* Icon Section */}
|
|
41
|
+
<View style={{ position: 'relative', width: 70 }}>
|
|
42
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 60, height: 60, backgroundColor: '#2DBE60', borderRadius: 100 }}>
|
|
43
|
+
<ShieldIcon />
|
|
44
|
+
</View>
|
|
45
|
+
<View style={{ position: 'absolute', top: '60%', right: 0, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 40, height: 40, backgroundColor: 'white', borderRadius: 100, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 1.84, elevation: 5 }}>
|
|
46
|
+
<Text style={{ fontSize: 20, color: '#2DBE60' }}>✓</Text>
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
|
|
50
|
+
{/* Title and Description */}
|
|
51
|
+
<View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginTop: 36 }}>
|
|
52
|
+
<Text style={styles.title}>{title}</Text>
|
|
53
|
+
{welcomeMessage && (<Text style={styles.description}>
|
|
54
|
+
{welcomeMessage}
|
|
55
|
+
</Text>)}
|
|
56
|
+
</View>
|
|
57
|
+
|
|
58
|
+
{/* Requirements List */}
|
|
59
|
+
{config.requirements && config.requirements.length > 0 && (<View style={styles.requirementsSection}>
|
|
60
|
+
<Text style={styles.sectionTitle}>
|
|
61
|
+
{t('kyc.welcome.requirements') || `What you'll need:`}
|
|
62
|
+
</Text>
|
|
63
|
+
{config.requirements.map((requirement, index) => (<View key={index} style={styles.requirementItem}>
|
|
64
|
+
<Text style={styles.checkmark}>✓</Text>
|
|
65
|
+
<Text style={styles.requirementText}>{requirement}</Text>
|
|
66
|
+
</View>))}
|
|
67
|
+
</View>)}
|
|
68
|
+
|
|
69
|
+
{/* Estimated Time */}
|
|
70
|
+
{config.showEstimatedTime !== false && config.estimatedTime && (<View style={styles.timeSection}>
|
|
71
|
+
<Text style={styles.timeLabel}>
|
|
72
|
+
{t('kyc.welcome.estimatedTime') || 'Estimated time:'}
|
|
73
|
+
</Text>
|
|
74
|
+
<Text style={styles.timeValue}>{config.estimatedTime}</Text>
|
|
75
|
+
</View>)}
|
|
76
|
+
|
|
77
|
+
{/* Consent Options - Hidden by default as they're pre-checked */}
|
|
78
|
+
{(config.consentOptions?.showPrivacyPolicy || config.consentOptions?.showTermsOfService || config.consentOptions?.showMarketingConsent) && (<View style={styles.consentSection}>
|
|
79
|
+
{config.consentOptions.showPrivacyPolicy && (<View style={styles.consentItem}>
|
|
80
|
+
<View style={[styles.checkbox, styles.checkboxChecked]}>
|
|
81
|
+
<Text style={styles.checkmarkSmall}>✓</Text>
|
|
82
|
+
</View>
|
|
83
|
+
<Text style={styles.consentText}>
|
|
84
|
+
{t('kyc.welcome.privacyPolicy') || 'I agree to the Privacy Policy'}
|
|
85
|
+
</Text>
|
|
86
|
+
</View>)}
|
|
87
|
+
|
|
88
|
+
{config.consentOptions.showTermsOfService && (<View style={styles.consentItem}>
|
|
89
|
+
<View style={[styles.checkbox, styles.checkboxChecked]}>
|
|
90
|
+
<Text style={styles.checkmarkSmall}>✓</Text>
|
|
91
|
+
</View>
|
|
92
|
+
<Text style={styles.consentText}>
|
|
93
|
+
{t('kyc.welcome.termsOfService') || 'I agree to the Terms of Service'}
|
|
94
|
+
</Text>
|
|
95
|
+
</View>)}
|
|
96
|
+
|
|
97
|
+
{config.consentOptions.showMarketingConsent && (<View style={styles.consentItem}>
|
|
98
|
+
<View style={[styles.checkbox, styles.checkboxChecked]}>
|
|
99
|
+
<Text style={styles.checkmarkSmall}>✓</Text>
|
|
100
|
+
</View>
|
|
101
|
+
<Text style={styles.consentText}>
|
|
102
|
+
{t('kyc.welcome.marketingConsent') || 'I agree to receive marketing communications'}
|
|
103
|
+
</Text>
|
|
104
|
+
</View>)}
|
|
105
|
+
</View>)}
|
|
106
|
+
|
|
107
|
+
{error && (<View style={styles.errorContainer}>
|
|
108
|
+
<Text style={styles.errorText}>{error}</Text>
|
|
109
|
+
</View>)}
|
|
110
|
+
|
|
111
|
+
{/* Get Started Button */}
|
|
112
|
+
<Button title={buttonText?.length === 0 ? t('kyc.welcome.getStarted') || 'Get Started' : buttonText} fullWidth onPress={handleGetStarted} style={{ paddingVertical: 20, marginTop: 36 }}/>
|
|
113
|
+
|
|
114
|
+
<View style={{ height: 12 }}/>
|
|
115
|
+
</View>
|
|
116
|
+
</View>);
|
|
117
|
+
};
|
|
118
|
+
const styles = StyleSheet.create({
|
|
119
|
+
container: {
|
|
120
|
+
padding: 16,
|
|
121
|
+
backgroundColor: 'white',
|
|
122
|
+
marginHorizontal: 12,
|
|
123
|
+
marginTop: 12,
|
|
124
|
+
borderRadius: 12,
|
|
125
|
+
shadowColor: '#000',
|
|
126
|
+
shadowOffset: { width: 0, height: 2 },
|
|
127
|
+
shadowOpacity: 0.15,
|
|
128
|
+
shadowRadius: 1.84,
|
|
129
|
+
elevation: 3,
|
|
130
|
+
maxWidth: 760,
|
|
131
|
+
width: '94%',
|
|
132
|
+
},
|
|
133
|
+
title: {
|
|
134
|
+
fontSize: 24,
|
|
135
|
+
fontWeight: 'bold',
|
|
136
|
+
color: '#333',
|
|
137
|
+
marginBottom: 8,
|
|
138
|
+
textAlign: 'center',
|
|
139
|
+
},
|
|
140
|
+
description: {
|
|
141
|
+
fontSize: 16,
|
|
142
|
+
color: '#666',
|
|
143
|
+
textAlign: 'center',
|
|
144
|
+
marginBottom: 24,
|
|
145
|
+
lineHeight: 22,
|
|
146
|
+
},
|
|
147
|
+
requirementsSection: {
|
|
148
|
+
backgroundColor: '#F9FAFB',
|
|
149
|
+
padding: 12,
|
|
150
|
+
borderRadius: 12,
|
|
151
|
+
width: '100%',
|
|
152
|
+
marginTop: 24,
|
|
153
|
+
},
|
|
154
|
+
sectionTitle: {
|
|
155
|
+
fontSize: 16,
|
|
156
|
+
fontWeight: 'bold',
|
|
157
|
+
color: 'black',
|
|
158
|
+
marginBottom: 12,
|
|
159
|
+
textAlign: 'left',
|
|
160
|
+
},
|
|
161
|
+
requirementItem: {
|
|
162
|
+
flexDirection: 'row',
|
|
163
|
+
alignItems: 'center',
|
|
164
|
+
marginBottom: 8,
|
|
165
|
+
},
|
|
166
|
+
checkmark: {
|
|
167
|
+
fontSize: 18,
|
|
168
|
+
color: '#2DBD60',
|
|
169
|
+
marginRight: 12,
|
|
170
|
+
fontWeight: 'bold',
|
|
171
|
+
},
|
|
172
|
+
requirementText: {
|
|
173
|
+
flex: 1,
|
|
174
|
+
fontSize: 16,
|
|
175
|
+
color: '#666',
|
|
176
|
+
textAlign: 'left',
|
|
177
|
+
lineHeight: 22,
|
|
178
|
+
},
|
|
179
|
+
timeSection: {
|
|
180
|
+
backgroundColor: '#F9FAFB',
|
|
181
|
+
padding: 12,
|
|
182
|
+
borderRadius: 12,
|
|
183
|
+
marginTop: 16,
|
|
184
|
+
alignItems: 'center',
|
|
185
|
+
width: '100%',
|
|
186
|
+
},
|
|
187
|
+
timeLabel: {
|
|
188
|
+
fontSize: 14,
|
|
189
|
+
color: '#666',
|
|
190
|
+
marginBottom: 4,
|
|
191
|
+
},
|
|
192
|
+
timeValue: {
|
|
193
|
+
fontSize: 20,
|
|
194
|
+
fontWeight: 'bold',
|
|
195
|
+
color: '#2DBD60',
|
|
196
|
+
},
|
|
197
|
+
consentSection: {
|
|
198
|
+
width: '100%',
|
|
199
|
+
marginTop: 24,
|
|
200
|
+
},
|
|
201
|
+
consentItem: {
|
|
202
|
+
flexDirection: 'row',
|
|
203
|
+
alignItems: 'center',
|
|
204
|
+
marginBottom: 12,
|
|
205
|
+
},
|
|
206
|
+
checkbox: {
|
|
207
|
+
width: 20,
|
|
208
|
+
height: 20,
|
|
209
|
+
borderWidth: 2,
|
|
210
|
+
borderColor: '#ddd',
|
|
211
|
+
borderRadius: 4,
|
|
212
|
+
marginRight: 12,
|
|
213
|
+
alignItems: 'center',
|
|
214
|
+
justifyContent: 'center',
|
|
215
|
+
},
|
|
216
|
+
checkboxChecked: {
|
|
217
|
+
backgroundColor: '#2DBD60',
|
|
218
|
+
borderColor: '#2DBD60',
|
|
219
|
+
},
|
|
220
|
+
checkmarkSmall: {
|
|
221
|
+
fontSize: 14,
|
|
222
|
+
color: 'white',
|
|
223
|
+
fontWeight: 'bold',
|
|
224
|
+
},
|
|
225
|
+
consentText: {
|
|
226
|
+
flex: 1,
|
|
227
|
+
fontSize: 15,
|
|
228
|
+
color: '#333',
|
|
229
|
+
lineHeight: 22,
|
|
230
|
+
},
|
|
231
|
+
errorContainer: {
|
|
232
|
+
backgroundColor: '#fee',
|
|
233
|
+
padding: 12,
|
|
234
|
+
borderRadius: 8,
|
|
235
|
+
marginTop: 16,
|
|
236
|
+
width: '100%',
|
|
237
|
+
},
|
|
238
|
+
errorText: {
|
|
239
|
+
color: '#dc2626',
|
|
240
|
+
fontSize: 14,
|
|
241
|
+
textAlign: 'center',
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
//# sourceMappingURL=WelcomeTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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,EAAE;QACZ,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,MAAM;KACnB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,EAAE;KACf;IACD,cAAc,EAAE;QACd,eAAe,EAAE,MAAM;QACvB,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;QACf,SAAS,EAAE,EAAE;QACb,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { View, Text, StyleSheet } from 'react-native';\nimport { TemplateComponent, WelcomeConfig, LocalizedText } from '../../types/KYC.types';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\nimport { Button } from '../ui/Button';\nimport ShieldIcon from '../Svgs/Schield';\n\ninterface WelcomeTemplateProps {\n component: TemplateComponent;\n value?: any;\n onValueChange: (data: any) => void;\n error?: string;\n language?: string;\n}\n\nexport const WelcomeTemplate: React.FC<WelcomeTemplateProps> = ({\n component,\n value,\n onValueChange,\n error,\n}) => {\n const { t } = useI18n();\n const { getLocalizedText, actions } = useTemplateKYCFlowContext();\n const config = component.config as WelcomeConfig;\n\n // Consentements cochés par défaut\n const privacyConsent = true;\n const termsConsent = true;\n const [shouldProceed, setShouldProceed] = useState(false);\n\n // Get localized text\n const title = getLocalizedText(component.labels as LocalizedText);\n const description = getLocalizedText(component.instructions as LocalizedText);\n const welcomeMessage = config.welcomeMessage || description;\n const buttonText = config.buttonText || getLocalizedText((component.ui as any).buttonText || { en: 'Get Started', fr: 'Commencer' });\n\n // Passer à l'étape suivante après que les données sont mises à jour\n useEffect(() => {\n if (shouldProceed && value && value.consentGiven) {\n // Petit délai pour s'assurer que le state est bien mis à jour\n const timer = setTimeout(() => {\n actions.nextComponent();\n setShouldProceed(false);\n }, 100);\n\n return () => clearTimeout(timer);\n }\n return undefined;\n }, [value, shouldProceed, actions]);\n\n const handleGetStarted = () => {\n // Mark component as complete\n const consentData = { consentGiven: true, privacyConsent, termsConsent };\n onValueChange(consentData);\n setShouldProceed(true);\n };\n\n return (\n <View style={styles.container}>\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>\n {/* Icon Section */}\n <View style={{ position: 'relative', width: 70 }}>\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 60, height: 60, backgroundColor: '#2DBE60', borderRadius: 100 }}>\n <ShieldIcon />\n </View>\n <View style={{ position: 'absolute', top: '60%', right: 0, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', width: 40, height: 40, backgroundColor: 'white', borderRadius: 100, shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 1.84, elevation: 5 }}>\n <Text style={{ fontSize: 20, color: '#2DBE60' }}>✓</Text>\n </View>\n </View>\n\n {/* Title and Description */}\n <View style={{ flexDirection: 'column', alignItems: 'center', justifyContent: 'center', marginTop: 36 }}>\n <Text style={styles.title}>{title}</Text>\n {welcomeMessage && (\n <Text style={styles.description}>\n {welcomeMessage}\n </Text>\n )}\n </View>\n\n {/* Requirements List */}\n {config.requirements && config.requirements.length > 0 && (\n <View style={styles.requirementsSection}>\n <Text style={styles.sectionTitle}>\n {t('kyc.welcome.requirements') || `What you'll need:`}\n </Text>\n {config.requirements.map((requirement, index) => (\n <View key={index} style={styles.requirementItem}>\n <Text style={styles.checkmark}>✓</Text>\n <Text style={styles.requirementText}>{requirement}</Text>\n </View>\n ))}\n </View>\n )}\n\n {/* Estimated Time */}\n {config.showEstimatedTime !== false && config.estimatedTime && (\n <View style={styles.timeSection}>\n <Text style={styles.timeLabel}>\n {t('kyc.welcome.estimatedTime') || 'Estimated time:'}\n </Text>\n <Text style={styles.timeValue}>{config.estimatedTime}</Text>\n </View>\n )}\n\n {/* Consent Options - Hidden by default as they're pre-checked */}\n {(config.consentOptions?.showPrivacyPolicy || config.consentOptions?.showTermsOfService || config.consentOptions?.showMarketingConsent) && (\n <View style={styles.consentSection}>\n {config.consentOptions.showPrivacyPolicy && (\n <View style={styles.consentItem}>\n <View style={[styles.checkbox, styles.checkboxChecked]}>\n <Text style={styles.checkmarkSmall}>✓</Text>\n </View>\n <Text style={styles.consentText}>\n {t('kyc.welcome.privacyPolicy') || 'I agree to the Privacy Policy'}\n </Text>\n </View>\n )}\n\n {config.consentOptions.showTermsOfService && (\n <View style={styles.consentItem}>\n <View style={[styles.checkbox, styles.checkboxChecked]}>\n <Text style={styles.checkmarkSmall}>✓</Text>\n </View>\n <Text style={styles.consentText}>\n {t('kyc.welcome.termsOfService') || 'I agree to the Terms of Service'}\n </Text>\n </View>\n )}\n\n {config.consentOptions.showMarketingConsent && (\n <View style={styles.consentItem}>\n <View style={[styles.checkbox, styles.checkboxChecked]}>\n <Text style={styles.checkmarkSmall}>✓</Text>\n </View>\n <Text style={styles.consentText}>\n {t('kyc.welcome.marketingConsent') || 'I agree to receive marketing communications'}\n </Text>\n </View>\n )}\n </View>\n )}\n\n {error && (\n <View style={styles.errorContainer}>\n <Text style={styles.errorText}>{error}</Text>\n </View>\n )}\n\n {/* Get Started Button */}\n <Button\n title={buttonText?.length === 0 ? t('kyc.welcome.getStarted') || 'Get Started' : buttonText}\n fullWidth\n onPress={handleGetStarted}\n style={{ paddingVertical: 20, marginTop: 36 }}\n />\n\n <View style={{ height: 12 }} />\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 16,\n backgroundColor: 'white',\n marginHorizontal: 12,\n marginTop: 12,\n borderRadius: 12,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n shadowRadius: 1.84,\n elevation: 3,\n maxWidth: 760,\n width: '94%',\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 8,\n textAlign: 'center',\n },\n description: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 24,\n lineHeight: 22,\n },\n requirementsSection: {\n backgroundColor: '#F9FAFB',\n padding: 12,\n borderRadius: 12,\n width: '100%',\n marginTop: 24,\n },\n sectionTitle: {\n fontSize: 16,\n fontWeight: 'bold',\n color: 'black',\n marginBottom: 12,\n textAlign: 'left',\n },\n requirementItem: {\n flexDirection: 'row',\n alignItems: 'center',\n marginBottom: 8,\n },\n checkmark: {\n fontSize: 18,\n color: '#2DBD60',\n marginRight: 12,\n fontWeight: 'bold',\n },\n requirementText: {\n flex: 1,\n fontSize: 16,\n color: '#666',\n textAlign: 'left',\n lineHeight: 22,\n },\n timeSection: {\n backgroundColor: '#F9FAFB',\n padding: 12,\n borderRadius: 12,\n marginTop: 16,\n alignItems: 'center',\n width: '100%',\n },\n timeLabel: {\n fontSize: 14,\n color: '#666',\n marginBottom: 4,\n },\n timeValue: {\n fontSize: 20,\n fontWeight: 'bold',\n color: '#2DBD60',\n },\n consentSection: {\n width: '100%',\n marginTop: 24,\n },\n consentItem: {\n flexDirection: 'row',\n alignItems: 'center',\n marginBottom: 12,\n },\n checkbox: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderColor: '#ddd',\n borderRadius: 4,\n marginRight: 12,\n alignItems: 'center',\n justifyContent: 'center',\n },\n checkboxChecked: {\n backgroundColor: '#2DBD60',\n borderColor: '#2DBD60',\n },\n checkmarkSmall: {\n fontSize: 14,\n color: 'white',\n fontWeight: 'bold',\n },\n consentText: {\n flex: 1,\n fontSize: 15,\n color: '#333',\n lineHeight: 22,\n },\n errorContainer: {\n backgroundColor: '#fee',\n padding: 12,\n borderRadius: 8,\n marginTop: 16,\n width: '100%',\n },\n errorText: {\n color: '#dc2626',\n fontSize: 14,\n textAlign: 'center',\n },\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KYCExample.d.ts","sourceRoot":"","sources":["../../src/components/KYCExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EA+L9B,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, Alert } from 'react-native';
|
|
3
|
+
import { ConfigurableKYCFlow } from './ConfigurableKYCFlow';
|
|
4
|
+
import { basicKYCConfig, advancedKYCConfig, quickKYCConfig, professionalKYCConfig, createCustomKYCConfig } from '../config/KYCConfigs';
|
|
5
|
+
export const KYCExample = () => {
|
|
6
|
+
const [selectedConfig, setSelectedConfig] = useState(null);
|
|
7
|
+
const [showFlow, setShowFlow] = useState(false);
|
|
8
|
+
const handleConfigSelect = (config) => {
|
|
9
|
+
setSelectedConfig(config);
|
|
10
|
+
setShowFlow(true);
|
|
11
|
+
};
|
|
12
|
+
const handleComplete = (data) => {
|
|
13
|
+
Alert.alert('KYC Terminé !', `Vérification terminée avec succès.\nDonnées collectées: ${JSON.stringify(data, null, 2)}`, [
|
|
14
|
+
{
|
|
15
|
+
text: 'OK',
|
|
16
|
+
onPress: () => {
|
|
17
|
+
setShowFlow(false);
|
|
18
|
+
setSelectedConfig(null);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]);
|
|
22
|
+
};
|
|
23
|
+
const handleError = (error) => {
|
|
24
|
+
Alert.alert('Erreur', `Une erreur s'est produite: ${error.message}`);
|
|
25
|
+
};
|
|
26
|
+
const handleClose = () => {
|
|
27
|
+
setShowFlow(false);
|
|
28
|
+
setSelectedConfig(null);
|
|
29
|
+
};
|
|
30
|
+
// Exemple de configuration personnalisée
|
|
31
|
+
const customConfig = createCustomKYCConfig('custom_kyc', 'KYC Personnalisé', 'Configuration personnalisée pour votre service', [
|
|
32
|
+
{
|
|
33
|
+
id: 'country_selection',
|
|
34
|
+
type: 'country_selection',
|
|
35
|
+
title: 'Sélectionnez votre pays',
|
|
36
|
+
description: 'Choisissez le pays qui a émis votre document',
|
|
37
|
+
isRequired: true,
|
|
38
|
+
isVisible: true,
|
|
39
|
+
order: 0,
|
|
40
|
+
validation: { required: true },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'selfie',
|
|
44
|
+
type: 'selfie_capture',
|
|
45
|
+
title: 'Prenez votre photo',
|
|
46
|
+
description: 'Une photo de votre visage est requise',
|
|
47
|
+
isRequired: true,
|
|
48
|
+
isVisible: true,
|
|
49
|
+
order: 1,
|
|
50
|
+
validation: { required: true },
|
|
51
|
+
cameraConfig: {
|
|
52
|
+
aspectRatio: 1,
|
|
53
|
+
quality: 0.8,
|
|
54
|
+
flashMode: 'off',
|
|
55
|
+
cameraType: 'front',
|
|
56
|
+
allowRetake: true,
|
|
57
|
+
maxRetakes: 3,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'verification',
|
|
62
|
+
type: 'verification',
|
|
63
|
+
title: 'Vérification',
|
|
64
|
+
description: 'Vérification en cours...',
|
|
65
|
+
isRequired: true,
|
|
66
|
+
isVisible: true,
|
|
67
|
+
order: 2,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'completion',
|
|
71
|
+
type: 'completion',
|
|
72
|
+
title: 'Terminé !',
|
|
73
|
+
description: 'Vérification réussie',
|
|
74
|
+
isRequired: true,
|
|
75
|
+
isVisible: true,
|
|
76
|
+
order: 3,
|
|
77
|
+
},
|
|
78
|
+
], {
|
|
79
|
+
allowBackNavigation: false,
|
|
80
|
+
showProgressBar: true,
|
|
81
|
+
showStepNumbers: true,
|
|
82
|
+
autoAdvance: true,
|
|
83
|
+
}, {
|
|
84
|
+
primaryColor: '#FF6B6B',
|
|
85
|
+
secondaryColor: '#4ECDC4',
|
|
86
|
+
backgroundColor: '#f8f9fa',
|
|
87
|
+
});
|
|
88
|
+
if (showFlow && selectedConfig) {
|
|
89
|
+
return (<ConfigurableKYCFlow config={selectedConfig} onComplete={handleComplete} onError={handleError} onClose={handleClose}/>);
|
|
90
|
+
}
|
|
91
|
+
return (<View style={styles.container}>
|
|
92
|
+
<Text style={styles.title}>Système KYC Configurable</Text>
|
|
93
|
+
<Text style={styles.subtitle}>
|
|
94
|
+
Sélectionnez le type de vérification d'identité que vous souhaitez utiliser
|
|
95
|
+
</Text>
|
|
96
|
+
|
|
97
|
+
<View style={styles.configGrid}>
|
|
98
|
+
<TouchableOpacity style={styles.configCard} onPress={() => handleConfigSelect(basicKYCConfig)}>
|
|
99
|
+
<Text style={styles.configIcon}>📋</Text>
|
|
100
|
+
<Text style={styles.configTitle}>KYC Basique</Text>
|
|
101
|
+
<Text style={styles.configDescription}>
|
|
102
|
+
Vérification standard avec document d'identité et selfie
|
|
103
|
+
</Text>
|
|
104
|
+
<Text style={styles.configSteps}>7 étapes</Text>
|
|
105
|
+
</TouchableOpacity>
|
|
106
|
+
|
|
107
|
+
<TouchableOpacity style={styles.configCard} onPress={() => handleConfigSelect(advancedKYCConfig)}>
|
|
108
|
+
<Text style={styles.configIcon}>📁</Text>
|
|
109
|
+
<Text style={styles.configTitle}>KYC Avancé</Text>
|
|
110
|
+
<Text style={styles.configDescription}>
|
|
111
|
+
Vérification avec documents supplémentaires optionnels
|
|
112
|
+
</Text>
|
|
113
|
+
<Text style={styles.configSteps}>8 étapes</Text>
|
|
114
|
+
</TouchableOpacity>
|
|
115
|
+
|
|
116
|
+
<TouchableOpacity style={styles.configCard} onPress={() => handleConfigSelect(quickKYCConfig)}>
|
|
117
|
+
<Text style={styles.configIcon}>⚡</Text>
|
|
118
|
+
<Text style={styles.configTitle}>KYC Rapide</Text>
|
|
119
|
+
<Text style={styles.configDescription}>
|
|
120
|
+
Vérification rapide avec selfie uniquement
|
|
121
|
+
</Text>
|
|
122
|
+
<Text style={styles.configSteps}>3 étapes</Text>
|
|
123
|
+
</TouchableOpacity>
|
|
124
|
+
|
|
125
|
+
<TouchableOpacity style={styles.configCard} onPress={() => handleConfigSelect(professionalKYCConfig)}>
|
|
126
|
+
<Text style={styles.configIcon}>💼</Text>
|
|
127
|
+
<Text style={styles.configTitle}>KYC Professionnel</Text>
|
|
128
|
+
<Text style={styles.configDescription}>
|
|
129
|
+
Vérification complète pour professionnels
|
|
130
|
+
</Text>
|
|
131
|
+
<Text style={styles.configSteps}>8 étapes</Text>
|
|
132
|
+
</TouchableOpacity>
|
|
133
|
+
|
|
134
|
+
<TouchableOpacity style={styles.configCard} onPress={() => handleConfigSelect(customConfig)}>
|
|
135
|
+
<Text style={styles.configIcon}>🎨</Text>
|
|
136
|
+
<Text style={styles.configTitle}>KYC Personnalisé</Text>
|
|
137
|
+
<Text style={styles.configDescription}>
|
|
138
|
+
Configuration personnalisée pour votre service
|
|
139
|
+
</Text>
|
|
140
|
+
<Text style={styles.configSteps}>4 étapes</Text>
|
|
141
|
+
</TouchableOpacity>
|
|
142
|
+
</View>
|
|
143
|
+
|
|
144
|
+
<View style={styles.infoContainer}>
|
|
145
|
+
<Text style={styles.infoTitle}>Fonctionnalités du système :</Text>
|
|
146
|
+
<Text style={styles.infoText}>• Configuration automatique des étapes</Text>
|
|
147
|
+
<Text style={styles.infoText}>• Validation personnalisable</Text>
|
|
148
|
+
<Text style={styles.infoText}>• Interface adaptative</Text>
|
|
149
|
+
<Text style={styles.infoText}>• Gestion des erreurs</Text>
|
|
150
|
+
<Text style={styles.infoText}>• Styles personnalisables</Text>
|
|
151
|
+
<Text style={styles.infoText}>• Support multi-langues</Text>
|
|
152
|
+
</View>
|
|
153
|
+
</View>);
|
|
154
|
+
};
|
|
155
|
+
const styles = StyleSheet.create({
|
|
156
|
+
container: {
|
|
157
|
+
flex: 1,
|
|
158
|
+
backgroundColor: '#f8f9fa',
|
|
159
|
+
padding: 16,
|
|
160
|
+
},
|
|
161
|
+
title: {
|
|
162
|
+
fontSize: 28,
|
|
163
|
+
fontWeight: 'bold',
|
|
164
|
+
color: '#333',
|
|
165
|
+
textAlign: 'center',
|
|
166
|
+
marginBottom: 8,
|
|
167
|
+
},
|
|
168
|
+
subtitle: {
|
|
169
|
+
fontSize: 16,
|
|
170
|
+
color: '#666',
|
|
171
|
+
textAlign: 'center',
|
|
172
|
+
marginBottom: 32,
|
|
173
|
+
lineHeight: 22,
|
|
174
|
+
},
|
|
175
|
+
configGrid: {
|
|
176
|
+
flexDirection: 'row',
|
|
177
|
+
flexWrap: 'wrap',
|
|
178
|
+
justifyContent: 'space-between',
|
|
179
|
+
marginBottom: 32,
|
|
180
|
+
},
|
|
181
|
+
configCard: {
|
|
182
|
+
width: '48%',
|
|
183
|
+
backgroundColor: 'white',
|
|
184
|
+
borderRadius: 12,
|
|
185
|
+
padding: 16,
|
|
186
|
+
marginBottom: 16,
|
|
187
|
+
shadowColor: '#000',
|
|
188
|
+
shadowOffset: {
|
|
189
|
+
width: 0,
|
|
190
|
+
height: 2,
|
|
191
|
+
},
|
|
192
|
+
shadowOpacity: 0.1,
|
|
193
|
+
shadowRadius: 3.84,
|
|
194
|
+
elevation: 5,
|
|
195
|
+
},
|
|
196
|
+
configIcon: {
|
|
197
|
+
fontSize: 32,
|
|
198
|
+
textAlign: 'center',
|
|
199
|
+
marginBottom: 12,
|
|
200
|
+
},
|
|
201
|
+
configTitle: {
|
|
202
|
+
fontSize: 18,
|
|
203
|
+
fontWeight: '600',
|
|
204
|
+
color: '#333',
|
|
205
|
+
textAlign: 'center',
|
|
206
|
+
marginBottom: 8,
|
|
207
|
+
},
|
|
208
|
+
configDescription: {
|
|
209
|
+
fontSize: 14,
|
|
210
|
+
color: '#666',
|
|
211
|
+
textAlign: 'center',
|
|
212
|
+
lineHeight: 18,
|
|
213
|
+
marginBottom: 12,
|
|
214
|
+
},
|
|
215
|
+
configSteps: {
|
|
216
|
+
fontSize: 12,
|
|
217
|
+
color: '#4CAF50',
|
|
218
|
+
fontWeight: '600',
|
|
219
|
+
textAlign: 'center',
|
|
220
|
+
},
|
|
221
|
+
infoContainer: {
|
|
222
|
+
backgroundColor: 'white',
|
|
223
|
+
borderRadius: 12,
|
|
224
|
+
padding: 20,
|
|
225
|
+
shadowColor: '#000',
|
|
226
|
+
shadowOffset: {
|
|
227
|
+
width: 0,
|
|
228
|
+
height: 2,
|
|
229
|
+
},
|
|
230
|
+
shadowOpacity: 0.1,
|
|
231
|
+
shadowRadius: 3.84,
|
|
232
|
+
elevation: 5,
|
|
233
|
+
},
|
|
234
|
+
infoTitle: {
|
|
235
|
+
fontSize: 18,
|
|
236
|
+
fontWeight: '600',
|
|
237
|
+
color: '#333',
|
|
238
|
+
marginBottom: 12,
|
|
239
|
+
},
|
|
240
|
+
infoText: {
|
|
241
|
+
fontSize: 14,
|
|
242
|
+
color: '#666',
|
|
243
|
+
marginBottom: 6,
|
|
244
|
+
lineHeight: 20,
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
//# sourceMappingURL=KYCExample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KYCExample.js","sourceRoot":"","sources":["../../src/components/KYCExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,MAAM,UAAU,GAAa,GAAG,EAAE;IACvC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAuB,IAAI,CAAC,CAAC;IACjF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,kBAAkB,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K;QACjB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,YAAY,EAAE,CAAC;KAChB;IACD,iBAAiB,EAAE;QACjB,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;IACD,aAAa,EAAE;QACb,eAAe,EAAE,OAAO;QACxB,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE;YACZ,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;SACV;QACD,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,IAAI;QAClB,SAAS,EAAE,CAAC;KACb;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACjB;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { View, Text, TouchableOpacity, StyleSheet, Alert } from 'react-native';\nimport { ConfigurableKYCFlow } from './ConfigurableKYCFlow';\nimport { \n basicKYCConfig, \n advancedKYCConfig, \n quickKYCConfig, \n professionalKYCConfig,\n createCustomKYCConfig \n} from '../config/KYCConfigs';\nimport { KYCFlowConfig } from '../types/KYC.types';\n\nexport const KYCExample: React.FC = () => {\n const [selectedConfig, setSelectedConfig] = useState<KYCFlowConfig | null>(null);\n const [showFlow, setShowFlow] = useState(false);\n\n const handleConfigSelect = (config: KYCFlowConfig) => {\n setSelectedConfig(config);\n setShowFlow(true);\n };\n\n const handleComplete = (data: any) => {\n Alert.alert(\n 'KYC Terminé !',\n `Vérification terminée avec succès.\\nDonnées collectées: ${JSON.stringify(data, null, 2)}`,\n [\n {\n text: 'OK',\n onPress: () => {\n setShowFlow(false);\n setSelectedConfig(null);\n }\n }\n ]\n );\n };\n\n const handleError = (error: any) => {\n Alert.alert('Erreur', `Une erreur s'est produite: ${error.message}`);\n };\n\n const handleClose = () => {\n setShowFlow(false);\n setSelectedConfig(null);\n };\n\n // Exemple de configuration personnalisée\n const customConfig = createCustomKYCConfig(\n 'custom_kyc',\n 'KYC Personnalisé',\n 'Configuration personnalisée pour votre service',\n [\n {\n id: 'country_selection',\n type: 'country_selection',\n title: 'Sélectionnez votre pays',\n description: 'Choisissez le pays qui a émis votre document',\n isRequired: true,\n isVisible: true,\n order: 0,\n validation: { required: true },\n },\n {\n id: 'selfie',\n type: 'selfie_capture',\n title: 'Prenez votre photo',\n description: 'Une photo de votre visage est requise',\n isRequired: true,\n isVisible: true,\n order: 1,\n validation: { required: true },\n cameraConfig: {\n aspectRatio: 1,\n quality: 0.8,\n flashMode: 'off',\n cameraType: 'front',\n allowRetake: true,\n maxRetakes: 3,\n },\n },\n {\n id: 'verification',\n type: 'verification',\n title: 'Vérification',\n description: 'Vérification en cours...',\n isRequired: true,\n isVisible: true,\n order: 2,\n },\n {\n id: 'completion',\n type: 'completion',\n title: 'Terminé !',\n description: 'Vérification réussie',\n isRequired: true,\n isVisible: true,\n order: 3,\n },\n ],\n {\n allowBackNavigation: false,\n showProgressBar: true,\n showStepNumbers: true,\n autoAdvance: true,\n },\n {\n primaryColor: '#FF6B6B',\n secondaryColor: '#4ECDC4',\n backgroundColor: '#f8f9fa',\n }\n );\n\n if (showFlow && selectedConfig) {\n return (\n <ConfigurableKYCFlow\n config={selectedConfig}\n onComplete={handleComplete}\n onError={handleError}\n onClose={handleClose}\n />\n );\n }\n\n return (\n <View style={styles.container}>\n <Text style={styles.title}>Système KYC Configurable</Text>\n <Text style={styles.subtitle}>\n Sélectionnez le type de vérification d'identité que vous souhaitez utiliser\n </Text>\n\n <View style={styles.configGrid}>\n <TouchableOpacity \n style={styles.configCard}\n onPress={() => handleConfigSelect(basicKYCConfig)}\n >\n <Text style={styles.configIcon}>📋</Text>\n <Text style={styles.configTitle}>KYC Basique</Text>\n <Text style={styles.configDescription}>\n Vérification standard avec document d'identité et selfie\n </Text>\n <Text style={styles.configSteps}>7 étapes</Text>\n </TouchableOpacity>\n\n <TouchableOpacity \n style={styles.configCard}\n onPress={() => handleConfigSelect(advancedKYCConfig)}\n >\n <Text style={styles.configIcon}>📁</Text>\n <Text style={styles.configTitle}>KYC Avancé</Text>\n <Text style={styles.configDescription}>\n Vérification avec documents supplémentaires optionnels\n </Text>\n <Text style={styles.configSteps}>8 étapes</Text>\n </TouchableOpacity>\n\n <TouchableOpacity \n style={styles.configCard}\n onPress={() => handleConfigSelect(quickKYCConfig)}\n >\n <Text style={styles.configIcon}>⚡</Text>\n <Text style={styles.configTitle}>KYC Rapide</Text>\n <Text style={styles.configDescription}>\n Vérification rapide avec selfie uniquement\n </Text>\n <Text style={styles.configSteps}>3 étapes</Text>\n </TouchableOpacity>\n\n <TouchableOpacity \n style={styles.configCard}\n onPress={() => handleConfigSelect(professionalKYCConfig)}\n >\n <Text style={styles.configIcon}>💼</Text>\n <Text style={styles.configTitle}>KYC Professionnel</Text>\n <Text style={styles.configDescription}>\n Vérification complète pour professionnels\n </Text>\n <Text style={styles.configSteps}>8 étapes</Text>\n </TouchableOpacity>\n\n <TouchableOpacity \n style={styles.configCard}\n onPress={() => handleConfigSelect(customConfig)}\n >\n <Text style={styles.configIcon}>🎨</Text>\n <Text style={styles.configTitle}>KYC Personnalisé</Text>\n <Text style={styles.configDescription}>\n Configuration personnalisée pour votre service\n </Text>\n <Text style={styles.configSteps}>4 étapes</Text>\n </TouchableOpacity>\n </View>\n\n <View style={styles.infoContainer}>\n <Text style={styles.infoTitle}>Fonctionnalités du système :</Text>\n <Text style={styles.infoText}>• Configuration automatique des étapes</Text>\n <Text style={styles.infoText}>• Validation personnalisable</Text>\n <Text style={styles.infoText}>• Interface adaptative</Text>\n <Text style={styles.infoText}>• Gestion des erreurs</Text>\n <Text style={styles.infoText}>• Styles personnalisables</Text>\n <Text style={styles.infoText}>• Support multi-langues</Text>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f8f9fa',\n padding: 16,\n },\n title: {\n fontSize: 28,\n fontWeight: 'bold',\n color: '#333',\n textAlign: 'center',\n marginBottom: 8,\n },\n subtitle: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n marginBottom: 32,\n lineHeight: 22,\n },\n configGrid: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'space-between',\n marginBottom: 32,\n },\n configCard: {\n width: '48%',\n backgroundColor: 'white',\n borderRadius: 12,\n padding: 16,\n marginBottom: 16,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n configIcon: {\n fontSize: 32,\n textAlign: 'center',\n marginBottom: 12,\n },\n configTitle: {\n fontSize: 18,\n fontWeight: '600',\n color: '#333',\n textAlign: 'center',\n marginBottom: 8,\n },\n configDescription: {\n fontSize: 14,\n color: '#666',\n textAlign: 'center',\n lineHeight: 18,\n marginBottom: 12,\n },\n configSteps: {\n fontSize: 12,\n color: '#4CAF50',\n fontWeight: '600',\n textAlign: 'center',\n },\n infoContainer: {\n backgroundColor: 'white',\n borderRadius: 12,\n padding: 20,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n infoTitle: {\n fontSize: 18,\n fontWeight: '600',\n color: '#333',\n marginBottom: 12,\n },\n infoText: {\n fontSize: 14,\n color: '#666',\n marginBottom: 6,\n lineHeight: 20,\n },\n}); "]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KYCFlow.d.ts","sourceRoot":"","sources":["../../src/components/KYCFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EA2O3B,CAAC"}
|