@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,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemplateComponent } from '../../types/KYC.types';
|
|
3
|
+
interface PhoneVerificationTemplateProps {
|
|
4
|
+
component: TemplateComponent;
|
|
5
|
+
value?: any;
|
|
6
|
+
onValueChange: (data: any) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const PhoneVerificationTemplate: React.FC<PhoneVerificationTemplateProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=PhoneVerificationTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneVerificationTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/PhoneVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,uBAAuB,CAAC;AAKzE,UAAU,8BAA8B;IACpC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAuJ9E,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert } from 'react-native';
|
|
3
|
+
import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
4
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
5
|
+
import { Button } from '../ui/Button';
|
|
6
|
+
export const PhoneVerificationTemplate = ({ component, value, onValueChange, error: propError, }) => {
|
|
7
|
+
const { actions, getLocalizedText } = useTemplateKYCFlowContext();
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
// const config = component.config as PhoneVerificationConfig;
|
|
10
|
+
// State
|
|
11
|
+
const [step, setStep] = useState('phone');
|
|
12
|
+
const [phone, setPhone] = useState('');
|
|
13
|
+
const [otp, setOtp] = useState('');
|
|
14
|
+
const [localError, setLocalError] = useState(null);
|
|
15
|
+
const [isSimulating, setIsSimulating] = useState(false);
|
|
16
|
+
const title = getLocalizedText(component.labels);
|
|
17
|
+
const instructions = getLocalizedText(component.instructions);
|
|
18
|
+
// Determine button text based on step
|
|
19
|
+
const verifyButtonText = getLocalizedText(component.ui.buttonText) || t('common.verify') || 'Verify';
|
|
20
|
+
const sendButtonText = t('common.sendCode') || 'Send Verification Code';
|
|
21
|
+
const buttonText = step === 'phone' ? sendButtonText : verifyButtonText;
|
|
22
|
+
const handleSendCode = () => {
|
|
23
|
+
if (!phone || phone.length < 5) {
|
|
24
|
+
setLocalError(t('errors.invalidPhone') || 'Please enter a valid phone number');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
setLocalError(null);
|
|
28
|
+
setIsSimulating(true);
|
|
29
|
+
// Simulate API call to send code
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
setIsSimulating(false);
|
|
32
|
+
setStep('otp');
|
|
33
|
+
}, 1500);
|
|
34
|
+
};
|
|
35
|
+
const handleVerifyCode = () => {
|
|
36
|
+
if (!otp || otp.length < 4) {
|
|
37
|
+
setLocalError(t('errors.invalidCode') || 'Please enter the 6-digit code');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
setLocalError(null);
|
|
41
|
+
setIsSimulating(true);
|
|
42
|
+
// Simulate verification API
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
setIsSimulating(false);
|
|
45
|
+
// Mock validation logic
|
|
46
|
+
if (otp === '123456') {
|
|
47
|
+
onValueChange({ phone, otp, verified: true });
|
|
48
|
+
actions.nextComponent();
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
setLocalError(t('errors.wrongCode') || 'Invalid verification code. Try 123456');
|
|
52
|
+
}
|
|
53
|
+
}, 1500);
|
|
54
|
+
};
|
|
55
|
+
const onChangePhone = (text) => {
|
|
56
|
+
setPhone(text);
|
|
57
|
+
if (localError)
|
|
58
|
+
setLocalError(null);
|
|
59
|
+
};
|
|
60
|
+
const onChangeOtp = (text) => {
|
|
61
|
+
setOtp(text);
|
|
62
|
+
if (localError)
|
|
63
|
+
setLocalError(null);
|
|
64
|
+
};
|
|
65
|
+
const handleBackToPhone = () => {
|
|
66
|
+
setStep('phone');
|
|
67
|
+
setOtp('');
|
|
68
|
+
setLocalError(null);
|
|
69
|
+
};
|
|
70
|
+
return (<View style={styles.container}>
|
|
71
|
+
<Text style={styles.title}>{title}</Text>
|
|
72
|
+
<Text style={styles.instructions}>
|
|
73
|
+
{step === 'phone' ? instructions : (t('kyc.enterCodeSent') || `Please enter the code sent to ${phone}`)}
|
|
74
|
+
</Text>
|
|
75
|
+
|
|
76
|
+
<View style={styles.contentContainer}>
|
|
77
|
+
{step === 'phone' ? (<View style={styles.inputContainer}>
|
|
78
|
+
<Text style={styles.label}>{t('common.phone') || 'Phone Number'}</Text>
|
|
79
|
+
<TextInput style={styles.input} placeholder="+1234567890" value={phone} onChangeText={onChangePhone} keyboardType="phone-pad" autoComplete="tel" editable={!isSimulating}/>
|
|
80
|
+
</View>) : (<View style={styles.inputContainer}>
|
|
81
|
+
<Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>
|
|
82
|
+
<TextInput style={styles.input} placeholder="123456" value={otp} onChangeText={onChangeOtp} keyboardType="number-pad" maxLength={6} editable={!isSimulating}/>
|
|
83
|
+
<TouchableOpacity onPress={handleBackToPhone} style={styles.changeLink}>
|
|
84
|
+
<Text style={styles.changeText}>{t('common.back') || 'Change number'}</Text>
|
|
85
|
+
</TouchableOpacity>
|
|
86
|
+
</View>)}
|
|
87
|
+
|
|
88
|
+
{(localError || propError) && (<Text style={styles.errorText}>{localError || propError}</Text>)}
|
|
89
|
+
|
|
90
|
+
<Button title={isSimulating ? (t('common.processing') || 'Processing...') : buttonText} onPress={step === 'phone' ? handleSendCode : handleVerifyCode} style={styles.button} disabled={isSimulating ||
|
|
91
|
+
(step === 'phone' ? !phone : !otp)}/>
|
|
92
|
+
|
|
93
|
+
{step === 'otp' && (<TouchableOpacity onPress={() => {
|
|
94
|
+
// Resend logic
|
|
95
|
+
Alert.alert(t('common.codeResent') || 'Code Resent', t('common.codeResentMessage', { email: phone }) || 'Code resent to ' + phone);
|
|
96
|
+
}} style={styles.resendButton} disabled={isSimulating}>
|
|
97
|
+
<Text style={styles.resendText}>{t('common.resendCode') || 'Resend Code'}</Text>
|
|
98
|
+
</TouchableOpacity>)}
|
|
99
|
+
</View>
|
|
100
|
+
</View>);
|
|
101
|
+
};
|
|
102
|
+
const styles = StyleSheet.create({
|
|
103
|
+
container: {
|
|
104
|
+
padding: 24,
|
|
105
|
+
backgroundColor: 'white',
|
|
106
|
+
borderRadius: 16,
|
|
107
|
+
margin: 16,
|
|
108
|
+
shadowColor: '#000',
|
|
109
|
+
shadowOffset: { width: 0, height: 4 },
|
|
110
|
+
shadowOpacity: 0.1,
|
|
111
|
+
shadowRadius: 12,
|
|
112
|
+
elevation: 5,
|
|
113
|
+
width: '95%',
|
|
114
|
+
},
|
|
115
|
+
title: {
|
|
116
|
+
fontSize: 24,
|
|
117
|
+
fontWeight: '700',
|
|
118
|
+
marginBottom: 8,
|
|
119
|
+
color: '#1a1a1a',
|
|
120
|
+
textAlign: 'center',
|
|
121
|
+
},
|
|
122
|
+
instructions: {
|
|
123
|
+
fontSize: 16,
|
|
124
|
+
color: '#666',
|
|
125
|
+
marginBottom: 32,
|
|
126
|
+
lineHeight: 24,
|
|
127
|
+
textAlign: 'center',
|
|
128
|
+
},
|
|
129
|
+
contentContainer: {
|
|
130
|
+
// width: '100%',
|
|
131
|
+
},
|
|
132
|
+
inputContainer: {
|
|
133
|
+
marginBottom: 24,
|
|
134
|
+
},
|
|
135
|
+
label: {
|
|
136
|
+
fontSize: 14,
|
|
137
|
+
fontWeight: '600',
|
|
138
|
+
color: '#333',
|
|
139
|
+
marginBottom: 8,
|
|
140
|
+
marginLeft: 4,
|
|
141
|
+
},
|
|
142
|
+
input: {
|
|
143
|
+
borderWidth: 1,
|
|
144
|
+
borderColor: '#e0e0e0',
|
|
145
|
+
padding: 16,
|
|
146
|
+
borderRadius: 12,
|
|
147
|
+
fontSize: 16,
|
|
148
|
+
backgroundColor: '#f8f9fa',
|
|
149
|
+
color: '#333',
|
|
150
|
+
},
|
|
151
|
+
errorText: {
|
|
152
|
+
color: '#dc2626',
|
|
153
|
+
marginBottom: 16,
|
|
154
|
+
fontSize: 14,
|
|
155
|
+
textAlign: 'center',
|
|
156
|
+
backgroundColor: '#fee2e2',
|
|
157
|
+
padding: 8,
|
|
158
|
+
borderRadius: 8,
|
|
159
|
+
overflow: 'hidden',
|
|
160
|
+
},
|
|
161
|
+
button: {
|
|
162
|
+
height: 50,
|
|
163
|
+
borderRadius: 12,
|
|
164
|
+
width: "100%"
|
|
165
|
+
},
|
|
166
|
+
changeLink: {
|
|
167
|
+
alignSelf: 'flex-end',
|
|
168
|
+
marginTop: 8,
|
|
169
|
+
},
|
|
170
|
+
changeText: {
|
|
171
|
+
color: '#2DBD60',
|
|
172
|
+
fontSize: 14,
|
|
173
|
+
fontWeight: '500',
|
|
174
|
+
},
|
|
175
|
+
resendButton: {
|
|
176
|
+
marginTop: 16,
|
|
177
|
+
alignItems: 'center',
|
|
178
|
+
},
|
|
179
|
+
resendText: {
|
|
180
|
+
color: '#666',
|
|
181
|
+
fontSize: 14,
|
|
182
|
+
textDecorationLine: 'underline',
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
//# sourceMappingURL=PhoneVerificationTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneVerificationTemplate.js","sourceRoot":"","sources":["../../../src/components/KYCElements/PhoneVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,MAAM,CAAC,MAAM,yBAAyB,GAA6C,CAAC,EAChF,SAAS,EACT,KAAK,EACL,aAAa,EACb,KAAK,EAAE,SAAS,GACnB,EAAE,EAAE;IACD,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,yBAAyB,EAAE,CAAC;IAClE,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,8DAA8D;IAE9D,QAAQ;IACR,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAmB,OAAO,CAAC,CAAC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AAE,EAAE;QACd,SAAS,EAAE,QAAQ;KACtB;IACD,gBAAgB,EAAE;IACd,iBAAiB;KACpB;IACD,cAAc,EAAE;QACZ,YAAY,EAAE,EAAE;KACnB;IACD,KAAK,EAAE;QACH,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,CAAC;KAChB;IACD,KAAK,EAAE;QACH,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,SAAS;QAC1B,KAAK,EAAE,MAAM;KAChB;IACD,SAAS,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,CAAC;QACf,QAAQ,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,MAAM;KAChB;IACD,UAAU,EAAE;QACR,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,CAAC;KACf;IACD,UAAU,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KACpB;IACD,YAAY,EAAE;QACV,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,QAAQ;KACvB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,WAAW;KAClC;CACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert } from 'react-native';\nimport { TemplateComponent, LocalizedText } from '../../types/KYC.types';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\nimport { Button } from '../ui/Button';\n\ninterface PhoneVerificationTemplateProps {\n component: TemplateComponent;\n value?: any;\n onValueChange: (data: any) => void;\n error?: string;\n language?: string;\n}\n\ntype VerificationStep = 'phone' | 'otp';\n\nexport const PhoneVerificationTemplate: React.FC<PhoneVerificationTemplateProps> = ({\n component,\n value,\n onValueChange,\n error: propError,\n}) => {\n const { actions, getLocalizedText } = useTemplateKYCFlowContext();\n const { t } = useI18n();\n // const config = component.config as PhoneVerificationConfig;\n\n // State\n const [step, setStep] = useState<VerificationStep>('phone');\n const [phone, setPhone] = useState('');\n const [otp, setOtp] = useState('');\n const [localError, setLocalError] = useState<string | null>(null);\n const [isSimulating, setIsSimulating] = useState(false);\n\n const title = getLocalizedText(component.labels as LocalizedText);\n const instructions = getLocalizedText(component.instructions as LocalizedText);\n\n // Determine button text based on step\n const verifyButtonText = getLocalizedText((component.ui as any).buttonText) || t('common.verify') || 'Verify';\n const sendButtonText = t('common.sendCode') || 'Send Verification Code';\n const buttonText = step === 'phone' ? sendButtonText : verifyButtonText;\n\n const handleSendCode = () => {\n if (!phone || phone.length < 5) {\n setLocalError(t('errors.invalidPhone') || 'Please enter a valid phone number');\n return;\n }\n\n setLocalError(null);\n setIsSimulating(true);\n\n // Simulate API call to send code\n setTimeout(() => {\n setIsSimulating(false);\n setStep('otp');\n }, 1500);\n };\n\n const handleVerifyCode = () => {\n if (!otp || otp.length < 4) {\n setLocalError(t('errors.invalidCode') || 'Please enter the 6-digit code');\n return;\n }\n\n setLocalError(null);\n setIsSimulating(true);\n\n // Simulate verification API\n setTimeout(() => {\n setIsSimulating(false);\n\n // Mock validation logic\n if (otp === '123456') {\n onValueChange({ phone, otp, verified: true });\n actions.nextComponent();\n } else {\n setLocalError(t('errors.wrongCode') || 'Invalid verification code. Try 123456');\n }\n }, 1500);\n };\n\n const onChangePhone = (text: string) => {\n setPhone(text);\n if (localError) setLocalError(null);\n };\n\n const onChangeOtp = (text: string) => {\n setOtp(text);\n if (localError) setLocalError(null);\n };\n\n const handleBackToPhone = () => {\n setStep('phone');\n setOtp('');\n setLocalError(null);\n };\n\n return (\n <View style={styles.container}>\n <Text style={styles.title}>{title}</Text>\n <Text style={styles.instructions}>\n {step === 'phone' ? instructions : (t('kyc.enterCodeSent') || `Please enter the code sent to ${phone}`)}\n </Text>\n\n <View style={styles.contentContainer}>\n {step === 'phone' ? (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.phone') || 'Phone Number'}</Text>\n <TextInput\n style={styles.input}\n placeholder=\"+1234567890\"\n value={phone}\n onChangeText={onChangePhone}\n keyboardType=\"phone-pad\"\n autoComplete=\"tel\"\n editable={!isSimulating}\n />\n </View>\n ) : (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>\n <TextInput\n style={styles.input}\n placeholder=\"123456\"\n value={otp}\n onChangeText={onChangeOtp}\n keyboardType=\"number-pad\"\n maxLength={6}\n editable={!isSimulating}\n />\n <TouchableOpacity onPress={handleBackToPhone} style={styles.changeLink}>\n <Text style={styles.changeText}>{t('common.back') || 'Change number'}</Text>\n </TouchableOpacity>\n </View>\n )}\n\n {(localError || propError) && (\n <Text style={styles.errorText}>{localError || propError}</Text>\n )}\n\n <Button\n title={isSimulating ? (t('common.processing') || 'Processing...') : buttonText}\n onPress={step === 'phone' ? handleSendCode : handleVerifyCode}\n style={styles.button}\n disabled={\n isSimulating ||\n (step === 'phone' ? !phone : !otp)\n }\n />\n\n {step === 'otp' && (\n <TouchableOpacity\n onPress={() => {\n // Resend logic\n Alert.alert(\n t('common.codeResent') || 'Code Resent',\n t('common.codeResentMessage', { email: phone }) || 'Code resent to ' + phone\n );\n }}\n style={styles.resendButton}\n disabled={isSimulating}\n >\n <Text style={styles.resendText}>{t('common.resendCode') || 'Resend Code'}</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 24,\n backgroundColor: 'white',\n borderRadius: 16,\n margin: 16,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.1,\n shadowRadius: 12,\n elevation: 5,\n width: '95%',\n },\n title: {\n fontSize: 24,\n fontWeight: '700',\n marginBottom: 8,\n color: '#1a1a1a',\n textAlign: 'center',\n },\n instructions: {\n fontSize: 16,\n color: '#666',\n marginBottom: 32,\n lineHeight: 24,\n textAlign: 'center',\n },\n contentContainer: {\n // width: '100%',\n },\n inputContainer: {\n marginBottom: 24,\n },\n label: {\n fontSize: 14,\n fontWeight: '600',\n color: '#333',\n marginBottom: 8,\n marginLeft: 4,\n },\n input: {\n borderWidth: 1,\n borderColor: '#e0e0e0',\n padding: 16,\n borderRadius: 12,\n fontSize: 16,\n backgroundColor: '#f8f9fa',\n color: '#333',\n },\n errorText: {\n color: '#dc2626',\n marginBottom: 16,\n fontSize: 14,\n textAlign: 'center',\n backgroundColor: '#fee2e2',\n padding: 8,\n borderRadius: 8,\n overflow: 'hidden',\n },\n button: {\n height: 50,\n borderRadius: 12,\n width: \"100%\"\n },\n changeLink: {\n alignSelf: 'flex-end',\n marginTop: 8,\n },\n changeText: {\n color: '#2DBD60',\n fontSize: 14,\n fontWeight: '500',\n },\n resendButton: {\n marginTop: 16,\n alignItems: 'center',\n },\n resendText: {\n color: '#666',\n fontSize: 14,\n textDecorationLine: 'underline',\n },\n});\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemplateComponent } from '../../types/KYC.types';
|
|
3
|
+
interface ReviewSubmitTemplateProps {
|
|
4
|
+
component: TemplateComponent;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onValueChange: (data: unknown) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ReviewSubmitTemplate: React.FC<ReviewSubmitTemplateProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ReviewSubmitTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewSubmitTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/ReviewSubmitTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D,UAAU,yBAAyB;IACjC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsGpE,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity, ScrollView } from 'react-native';
|
|
3
|
+
import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
4
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
5
|
+
export const ReviewSubmitTemplate = () => {
|
|
6
|
+
const { t } = useI18n();
|
|
7
|
+
const { state, actions, getLocalizedText } = useTemplateKYCFlowContext();
|
|
8
|
+
const idSection = useMemo(() => {
|
|
9
|
+
const idComp = state.template.components.find(c => c.type === 'id_card');
|
|
10
|
+
return idComp ? state.componentData[idComp.id] : null;
|
|
11
|
+
}, [state.template.components, state.componentData]);
|
|
12
|
+
// Helper to coerce possibly-nested localized configs into the expected shape
|
|
13
|
+
const coerceLocalized = (value, fallback) => {
|
|
14
|
+
if (value && typeof value === 'object') {
|
|
15
|
+
if (typeof value.en === 'string' || typeof value.fr === 'string') {
|
|
16
|
+
return {
|
|
17
|
+
en: typeof value.en === 'string' ? value.en : fallback.en,
|
|
18
|
+
fr: typeof value.fr === 'string' ? value.fr : fallback.fr,
|
|
19
|
+
...value,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return fallback;
|
|
24
|
+
};
|
|
25
|
+
// const reviewComp = useMemo(() => {
|
|
26
|
+
// return state.template.components.find(c => c.type === 'review_submit');
|
|
27
|
+
// }, [state.template.components]);
|
|
28
|
+
const dynamicComponents = useMemo(() => {
|
|
29
|
+
return state.template.components.filter(c => c.type !== 'review_submit' && c.type !== 'verification_progress');
|
|
30
|
+
}, [state.template.components]);
|
|
31
|
+
const handleSubmit = async () => {
|
|
32
|
+
await actions.nextComponent();
|
|
33
|
+
};
|
|
34
|
+
return (<View style={styles.container}>
|
|
35
|
+
<Text style={styles.title}>{t('kyc.reviewSubmit.title')}</Text>
|
|
36
|
+
<Text style={styles.subtitle}>{t('kyc.reviewSubmit.subtitle')}</Text>
|
|
37
|
+
|
|
38
|
+
<ScrollView contentContainerStyle={styles.scrollContent}>
|
|
39
|
+
{dynamicComponents.map((comp) => {
|
|
40
|
+
const compData = state.componentData[comp.id] || {};
|
|
41
|
+
const isCompleted = state.completedComponents.includes(comp.id);
|
|
42
|
+
if (comp.type === 'id_card') {
|
|
43
|
+
const hasFront = !!(compData.front || compData.front_base64 || compData.front_mrz);
|
|
44
|
+
const hasBack = !!(compData.back || compData.back_base64 || compData.back_mrz);
|
|
45
|
+
return (<View key={comp.id} style={styles.section}>
|
|
46
|
+
<Text style={styles.sectionTitle}>{t('kyc.reviewSubmit.documentInfo')}</Text>
|
|
47
|
+
<View style={styles.row}>
|
|
48
|
+
<View style={[styles.tile, hasFront ? styles.active : null]}>
|
|
49
|
+
<Text style={styles.tileLabel}>{t('kyc.idCardCapture.frontSide')}</Text>
|
|
50
|
+
{hasFront ? <Text style={styles.check}>✓</Text> : null}
|
|
51
|
+
</View>
|
|
52
|
+
<View style={[styles.tile, hasBack ? styles.active : null]}>
|
|
53
|
+
<Text style={styles.tileLabel}>{t('kyc.idCardCapture.backSide')}</Text>
|
|
54
|
+
{hasBack ? <Text style={styles.check}>✓</Text> : null}
|
|
55
|
+
</View>
|
|
56
|
+
</View>
|
|
57
|
+
{idSection?.documentType ? (<Text style={styles.caption}>{idSection.documentType}</Text>) : null}
|
|
58
|
+
</View>);
|
|
59
|
+
}
|
|
60
|
+
if (comp.type === 'selfie') {
|
|
61
|
+
const orientations = (comp.config?.orientations || ['center', 'right', 'left']);
|
|
62
|
+
return (<View key={comp.id} style={styles.section}>
|
|
63
|
+
<Text style={styles.sectionTitle}>{t('kyc.selfieCapture.title')}</Text>
|
|
64
|
+
<View style={styles.row}>
|
|
65
|
+
{orientations.map((o) => {
|
|
66
|
+
const has = !!compData[o];
|
|
67
|
+
const colorStyle = o === 'center' ? styles.pink : o === 'right' ? styles.blue : styles.purple;
|
|
68
|
+
return (<View key={o} style={[styles.tile, colorStyle, has ? styles.active : null]}>
|
|
69
|
+
<Text style={styles.tileLabel}>{t(`kyc.reviewSubmit.selfieSide.${o}`)}</Text>
|
|
70
|
+
{has ? <Text style={styles.check}>✓</Text> : null}
|
|
71
|
+
</View>);
|
|
72
|
+
})}
|
|
73
|
+
</View>
|
|
74
|
+
<Text style={styles.caption}>{t('kyc.selfieCapture.success')}</Text>
|
|
75
|
+
</View>);
|
|
76
|
+
}
|
|
77
|
+
// Generic fallback for other component types
|
|
78
|
+
return (<View key={comp.id} style={styles.section}>
|
|
79
|
+
<Text style={styles.sectionTitle}>{getLocalizedText(coerceLocalized(comp.labels, { en: comp.type, fr: comp.type }))}</Text>
|
|
80
|
+
<Text style={styles.caption}>{isCompleted ? t('common.success') : t('kyc.verificationProgress.status.pending')}</Text>
|
|
81
|
+
</View>);
|
|
82
|
+
})}
|
|
83
|
+
</ScrollView>
|
|
84
|
+
|
|
85
|
+
<TouchableOpacity style={[styles.button, styles.primary]} onPress={handleSubmit}>
|
|
86
|
+
<Text style={styles.buttonText}>{t('kyc.reviewSubmit.submitButton')}</Text>
|
|
87
|
+
</TouchableOpacity>
|
|
88
|
+
</View>);
|
|
89
|
+
};
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
container: {
|
|
92
|
+
flex: 1,
|
|
93
|
+
width: '100%',
|
|
94
|
+
paddingHorizontal: 16,
|
|
95
|
+
paddingVertical: 12,
|
|
96
|
+
},
|
|
97
|
+
title: {
|
|
98
|
+
fontSize: 24,
|
|
99
|
+
fontWeight: 'bold',
|
|
100
|
+
color: '#111827',
|
|
101
|
+
marginBottom: 4,
|
|
102
|
+
},
|
|
103
|
+
subtitle: {
|
|
104
|
+
fontSize: 14,
|
|
105
|
+
color: '#6B7280',
|
|
106
|
+
marginBottom: 16,
|
|
107
|
+
},
|
|
108
|
+
section: {
|
|
109
|
+
backgroundColor: 'white',
|
|
110
|
+
borderRadius: 16,
|
|
111
|
+
padding: 16,
|
|
112
|
+
marginBottom: 16,
|
|
113
|
+
},
|
|
114
|
+
sectionTitle: {
|
|
115
|
+
fontSize: 18,
|
|
116
|
+
fontWeight: '700',
|
|
117
|
+
color: '#111827',
|
|
118
|
+
marginBottom: 12,
|
|
119
|
+
},
|
|
120
|
+
scrollContent: {
|
|
121
|
+
paddingBottom: 24,
|
|
122
|
+
},
|
|
123
|
+
row: {
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
gap: 12,
|
|
126
|
+
},
|
|
127
|
+
tile: {
|
|
128
|
+
flex: 1,
|
|
129
|
+
height: 110,
|
|
130
|
+
borderRadius: 16,
|
|
131
|
+
backgroundColor: '#F3F4F6',
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
justifyContent: 'center',
|
|
134
|
+
},
|
|
135
|
+
tileLabel: {
|
|
136
|
+
fontSize: 14,
|
|
137
|
+
color: '#111827',
|
|
138
|
+
marginBottom: 8,
|
|
139
|
+
},
|
|
140
|
+
check: {
|
|
141
|
+
fontSize: 18,
|
|
142
|
+
color: '#10B981',
|
|
143
|
+
fontWeight: '700',
|
|
144
|
+
},
|
|
145
|
+
active: {
|
|
146
|
+
backgroundColor: '#DDE9FF',
|
|
147
|
+
},
|
|
148
|
+
pink: { backgroundColor: '#FDE2E7' },
|
|
149
|
+
blue: { backgroundColor: '#DDE9FF' },
|
|
150
|
+
purple: { backgroundColor: '#EDE2FF' },
|
|
151
|
+
caption: {
|
|
152
|
+
marginTop: 10,
|
|
153
|
+
fontSize: 12,
|
|
154
|
+
color: '#6B7280',
|
|
155
|
+
},
|
|
156
|
+
button: {
|
|
157
|
+
paddingVertical: 14,
|
|
158
|
+
borderRadius: 10,
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
marginTop: 12,
|
|
161
|
+
},
|
|
162
|
+
primary: {
|
|
163
|
+
backgroundColor: '#2DBD60',
|
|
164
|
+
},
|
|
165
|
+
buttonText: {
|
|
166
|
+
color: 'white',
|
|
167
|
+
fontSize: 16,
|
|
168
|
+
fontWeight: '600',
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=ReviewSubmitTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewSubmitTemplate.js","sourceRoot":"","sources":["../../../src/components/KYCElements/ReviewSubmitTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAU9C,MAAM,CAAC,MAAM,oBAAoB,GAAwC,GAAG,EAAE;IAC5E,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,yBAAyB,EA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IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,GAAG;QACX,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;QAC1B,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,CAAC;KAChB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACN,eAAe,EAAE,SAAS;KAC3B;IACD,IAAI,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IACpC,IAAI,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IACpC,MAAM,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IACtC,OAAO,EAAE;QACP,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;QACN,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,EAAE;KACd;IACD,OAAO,EAAE;QACP,eAAe,EAAE,SAAS;KAC3B;IACD,UAAU,EAAE;QACV,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\nimport { View, Text, StyleSheet, TouchableOpacity, ScrollView } from 'react-native';\nimport { TemplateComponent } from '../../types/KYC.types';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\n\ninterface ReviewSubmitTemplateProps {\n component: TemplateComponent;\n value: unknown;\n onValueChange: (data: unknown) => void;\n error?: string;\n language?: string;\n}\n\nexport const ReviewSubmitTemplate: React.FC<ReviewSubmitTemplateProps> = () => {\n const { t } = useI18n();\n const { state, actions, getLocalizedText } = useTemplateKYCFlowContext();\n\n const idSection = useMemo(() => {\n const idComp = state.template.components.find(c => c.type === 'id_card');\n return idComp ? state.componentData[idComp.id] : null;\n }, [state.template.components, state.componentData]);\n\n // Helper to coerce possibly-nested localized configs into the expected shape\n const coerceLocalized = (value: any, fallback: { en: string; fr: string }) => {\n if (value && typeof value === 'object') {\n if (typeof value.en === 'string' || typeof value.fr === 'string') {\n return {\n en: typeof value.en === 'string' ? value.en : fallback.en,\n fr: typeof value.fr === 'string' ? value.fr : fallback.fr,\n ...value,\n } as { [key: string]: string; en: string; fr: string };\n }\n }\n return fallback;\n };\n\n // const reviewComp = useMemo(() => {\n // return state.template.components.find(c => c.type === 'review_submit');\n // }, [state.template.components]);\n\n const dynamicComponents = useMemo(() => {\n return state.template.components.filter(c => c.type !== 'review_submit' && c.type !== 'verification_progress');\n }, [state.template.components]);\n\n const handleSubmit = async () => {\n await actions.nextComponent();\n };\n\n return (\n <View style={styles.container}>\n <Text style={styles.title}>{t('kyc.reviewSubmit.title')}</Text>\n <Text style={styles.subtitle}>{t('kyc.reviewSubmit.subtitle')}</Text>\n\n <ScrollView contentContainerStyle={styles.scrollContent}>\n {dynamicComponents.map((comp) => {\n const compData = state.componentData[comp.id] || {};\n const isCompleted = state.completedComponents.includes(comp.id);\n if (comp.type === 'id_card') {\n const hasFront = !!(compData.front || compData.front_base64 || compData.front_mrz);\n const hasBack = !!(compData.back || compData.back_base64 || compData.back_mrz);\n return (\n <View key={comp.id} style={styles.section}>\n <Text style={styles.sectionTitle}>{t('kyc.reviewSubmit.documentInfo')}</Text>\n <View style={styles.row}>\n <View style={[styles.tile, hasFront ? styles.active : null]}>\n <Text style={styles.tileLabel}>{t('kyc.idCardCapture.frontSide')}</Text>\n {hasFront ? <Text style={styles.check}>✓</Text> : null}\n </View>\n <View style={[styles.tile, hasBack ? styles.active : null]}>\n <Text style={styles.tileLabel}>{t('kyc.idCardCapture.backSide')}</Text>\n {hasBack ? <Text style={styles.check}>✓</Text> : null}\n </View>\n </View>\n {idSection?.documentType ? (\n <Text style={styles.caption}>{idSection.documentType}</Text>\n ) : null}\n </View>\n );\n }\n if (comp.type === 'selfie') {\n const orientations = ((comp.config as any)?.orientations || ['center', 'right', 'left']) as string[];\n return (\n <View key={comp.id} style={styles.section}>\n <Text style={styles.sectionTitle}>{t('kyc.selfieCapture.title')}</Text>\n <View style={styles.row}>\n {orientations.map((o) => {\n const has = !!compData[o];\n const colorStyle = o === 'center' ? styles.pink : o === 'right' ? styles.blue : styles.purple;\n return (\n <View key={o} style={[styles.tile, colorStyle, has ? styles.active : null]}>\n <Text style={styles.tileLabel}>{t(`kyc.reviewSubmit.selfieSide.${o}`)}</Text>\n {has ? <Text style={styles.check}>✓</Text> : null}\n </View>\n );\n })}\n </View>\n <Text style={styles.caption}>{t('kyc.selfieCapture.success')}</Text>\n </View>\n );\n }\n // Generic fallback for other component types\n return (\n <View key={comp.id} style={styles.section}>\n <Text style={styles.sectionTitle}>{getLocalizedText(coerceLocalized(comp.labels, { en: comp.type, fr: comp.type }))}</Text>\n <Text style={styles.caption}>{isCompleted ? t('common.success') : t('kyc.verificationProgress.status.pending')}</Text>\n </View>\n );\n })}\n </ScrollView>\n\n <TouchableOpacity style={[styles.button, styles.primary]} onPress={handleSubmit}>\n <Text style={styles.buttonText}>{t('kyc.reviewSubmit.submitButton')}</Text>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n width: '100%',\n paddingHorizontal: 16,\n paddingVertical: 12,\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#111827',\n marginBottom: 4,\n },\n subtitle: {\n fontSize: 14,\n color: '#6B7280',\n marginBottom: 16,\n },\n section: {\n backgroundColor: 'white',\n borderRadius: 16,\n padding: 16,\n marginBottom: 16,\n },\n sectionTitle: {\n fontSize: 18,\n fontWeight: '700',\n color: '#111827',\n marginBottom: 12,\n },\n scrollContent: {\n paddingBottom: 24,\n },\n row: {\n flexDirection: 'row',\n gap: 12,\n },\n tile: {\n flex: 1,\n height: 110,\n borderRadius: 16,\n backgroundColor: '#F3F4F6',\n alignItems: 'center',\n justifyContent: 'center',\n },\n tileLabel: {\n fontSize: 14,\n color: '#111827',\n marginBottom: 8,\n },\n check: {\n fontSize: 18,\n color: '#10B981',\n fontWeight: '700',\n },\n active: {\n backgroundColor: '#DDE9FF',\n },\n pink: { backgroundColor: '#FDE2E7' },\n blue: { backgroundColor: '#DDE9FF' },\n purple: { backgroundColor: '#EDE2FF' },\n caption: {\n marginTop: 10,\n fontSize: 12,\n color: '#6B7280',\n },\n button: {\n paddingVertical: 14,\n borderRadius: 10,\n alignItems: 'center',\n marginTop: 12,\n },\n primary: {\n backgroundColor: '#2DBD60',\n },\n buttonText: {\n color: 'white',\n fontSize: 16,\n fontWeight: '600',\n },\n});\n\n\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KYCElement } from '../../types/KYC.types';
|
|
3
|
+
interface SelfieCaptureProps {
|
|
4
|
+
element: KYCElement;
|
|
5
|
+
value?: string;
|
|
6
|
+
onValueChange: (value: string) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SelfieCapture: React.FC<SelfieCaptureProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SelfieCapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelfieCapture.d.ts","sourceRoot":"","sources":["../../../src/components/KYCElements/SelfieCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiHtD,CAAC"}
|