@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,142 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { View, StyleSheet, Platform, Text } from 'react-native';
|
|
3
|
+
import { Camera, useCameraDevice } from 'react-native-vision-camera';
|
|
4
|
+
import VisionCameraModule from '../modules/camera/VisionCameraModule';
|
|
5
|
+
export const VisionCameraView = ({ instructions = 'Position yourself in the frame and tap to capture', showCamera, cameraType = 'front', style, onCapture, onError, onPermissionError, enableHdr = false, enableNightMode = false, quality = 'high', }) => {
|
|
6
|
+
const camera = useRef(null);
|
|
7
|
+
const device = useCameraDevice(cameraType);
|
|
8
|
+
const [hasPermission, setHasPermission] = useState(false);
|
|
9
|
+
const [isInitialized, setIsInitialized] = useState(false);
|
|
10
|
+
// Check permissions on component mount
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
checkPermissions();
|
|
13
|
+
}, []);
|
|
14
|
+
const checkPermissions = async () => {
|
|
15
|
+
try {
|
|
16
|
+
const hasAllPermissions = await VisionCameraModule.hasAllPermissions();
|
|
17
|
+
if (!hasAllPermissions) {
|
|
18
|
+
const granted = await VisionCameraModule.requestAllPermissions();
|
|
19
|
+
if (!granted) {
|
|
20
|
+
onPermissionError?.();
|
|
21
|
+
onError?.({ message: 'Camera permissions not granted' });
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
setHasPermission(true);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
console.error('Error checking permissions:', error);
|
|
29
|
+
onError?.({ message: 'Error checking camera permissions' });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const onInitialized = useCallback(() => {
|
|
33
|
+
console.log('Camera initialized!');
|
|
34
|
+
setIsInitialized(true);
|
|
35
|
+
}, []);
|
|
36
|
+
const onCameraError = useCallback((error) => {
|
|
37
|
+
console.error('Camera error:', error);
|
|
38
|
+
onError?.({ message: error.message || 'Camera error occurred' });
|
|
39
|
+
}, [onError]);
|
|
40
|
+
const capturePhoto = useCallback(async () => {
|
|
41
|
+
try {
|
|
42
|
+
if (!camera.current || !isInitialized) {
|
|
43
|
+
onError?.({ message: 'Camera not ready' });
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const photo = await camera.current.takePhoto({
|
|
47
|
+
enableShutterSound: true,
|
|
48
|
+
});
|
|
49
|
+
const result = await VisionCameraModule.processPhotoResult(photo);
|
|
50
|
+
onCapture?.(result);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error('Error taking photo:', error);
|
|
54
|
+
onCapture?.({
|
|
55
|
+
success: false,
|
|
56
|
+
error: error instanceof Error ? error.message : 'Failed to capture photo',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}, [isInitialized, quality, onCapture, onError]);
|
|
60
|
+
// Auto-capture functionality (can be triggered externally)
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
if (showCamera && isInitialized && hasPermission) {
|
|
63
|
+
// Auto-capture after a short delay when camera is ready
|
|
64
|
+
const timer = setTimeout(() => {
|
|
65
|
+
capturePhoto();
|
|
66
|
+
}, 1000);
|
|
67
|
+
return () => clearTimeout(timer);
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}, [showCamera, isInitialized, hasPermission, capturePhoto]);
|
|
71
|
+
if (Platform.OS === 'web') {
|
|
72
|
+
return (<View style={[styles.container, style]}>
|
|
73
|
+
<Text style={styles.webMessage}>
|
|
74
|
+
Camera is not supported on web platform. Please use the mobile app.
|
|
75
|
+
</Text>
|
|
76
|
+
</View>);
|
|
77
|
+
}
|
|
78
|
+
if (!hasPermission) {
|
|
79
|
+
return (<View style={[styles.container, style]}>
|
|
80
|
+
<Text style={styles.permissionMessage}>
|
|
81
|
+
Camera permission required. Please grant permission to continue.
|
|
82
|
+
</Text>
|
|
83
|
+
</View>);
|
|
84
|
+
}
|
|
85
|
+
if (!device) {
|
|
86
|
+
return (<View style={[styles.container, style]}>
|
|
87
|
+
<Text style={styles.errorMessage}>
|
|
88
|
+
Camera device not available
|
|
89
|
+
</Text>
|
|
90
|
+
</View>);
|
|
91
|
+
}
|
|
92
|
+
if (!showCamera) {
|
|
93
|
+
return <View style={[styles.container, style]}/>;
|
|
94
|
+
}
|
|
95
|
+
return (<View style={[styles.container, style]}>
|
|
96
|
+
<Camera ref={camera} style={StyleSheet.absoluteFill} device={device} isActive={showCamera} photo={true} onInitialized={onInitialized} onError={onCameraError}/>
|
|
97
|
+
|
|
98
|
+
{instructions && (<View style={styles.instructionsOverlay}>
|
|
99
|
+
<Text style={styles.instructions}>{instructions}</Text>
|
|
100
|
+
</View>)}
|
|
101
|
+
</View>);
|
|
102
|
+
};
|
|
103
|
+
const styles = StyleSheet.create({
|
|
104
|
+
container: {
|
|
105
|
+
flex: 1,
|
|
106
|
+
backgroundColor: 'black',
|
|
107
|
+
},
|
|
108
|
+
instructionsOverlay: {
|
|
109
|
+
position: 'absolute',
|
|
110
|
+
top: 60,
|
|
111
|
+
left: 20,
|
|
112
|
+
right: 20,
|
|
113
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
|
114
|
+
padding: 15,
|
|
115
|
+
borderRadius: 10,
|
|
116
|
+
},
|
|
117
|
+
instructions: {
|
|
118
|
+
color: 'white',
|
|
119
|
+
fontSize: 16,
|
|
120
|
+
textAlign: 'center',
|
|
121
|
+
fontWeight: '500',
|
|
122
|
+
},
|
|
123
|
+
permissionMessage: {
|
|
124
|
+
color: 'white',
|
|
125
|
+
fontSize: 16,
|
|
126
|
+
textAlign: 'center',
|
|
127
|
+
margin: 20,
|
|
128
|
+
},
|
|
129
|
+
errorMessage: {
|
|
130
|
+
color: 'red',
|
|
131
|
+
fontSize: 16,
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
margin: 20,
|
|
134
|
+
},
|
|
135
|
+
webMessage: {
|
|
136
|
+
color: 'white',
|
|
137
|
+
fontSize: 16,
|
|
138
|
+
textAlign: 'center',
|
|
139
|
+
margin: 20,
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
//# sourceMappingURL=VisionCameraView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisionCameraView.js","sourceRoot":"","sources":["../../src/components/VisionCameraView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,kBAAkB,MAAM,sCAAsC,CAAC;AAetE,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,YAAY,GAAG,mDAAmD,EAClE,UAAU,EACV,UAAU,GAAG,OAAO,EACpB,KAAK,EACL,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,SAAS,GAAG,KAAK,EACjB,eAAe,GAAG,KAAK,EACvB,OAAO,GAAG,MAAM,GACjB,EAAE,EAAE;IACH,MAAM,M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AAQ;QACnB,MAAM,EAAE,EAAE;KACX;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;KACX;IACD,UAAU,EAAE;QACV,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;KACX;CACF,CAAC,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { View, StyleSheet, Platform, ViewStyle, Text } from 'react-native';\nimport { Camera, useCameraDevice } from 'react-native-vision-camera';\nimport VisionCameraModule from '../modules/camera/VisionCameraModule';\n\nexport interface VisionCameraViewProps {\n instructions?: string;\n showCamera: boolean;\n cameraType?: 'front' | 'back';\n style?: ViewStyle;\n onCapture?: (result: { success: boolean; path?: string; error?: string }) => void;\n onError?: (event: { message: string }) => void;\n onPermissionError?: () => void;\n enableHdr?: boolean;\n enableNightMode?: boolean;\n quality?: 'low' | 'medium' | 'high';\n}\n\nexport const VisionCameraView: React.FC<VisionCameraViewProps> = ({\n instructions = 'Position yourself in the frame and tap to capture',\n showCamera,\n cameraType = 'front',\n style,\n onCapture,\n onError,\n onPermissionError,\n enableHdr = false,\n enableNightMode = false,\n quality = 'high',\n}) => {\n const camera = useRef<Camera>(null);\n const device = useCameraDevice(cameraType);\n const [hasPermission, setHasPermission] = useState(false);\n const [isInitialized, setIsInitialized] = useState(false);\n\n // Check permissions on component mount\n useEffect(() => {\n checkPermissions();\n }, []);\n\n const checkPermissions = async () => {\n try {\n const hasAllPermissions = await VisionCameraModule.hasAllPermissions();\n if (!hasAllPermissions) {\n const granted = await VisionCameraModule.requestAllPermissions();\n if (!granted) {\n onPermissionError?.();\n onError?.({ message: 'Camera permissions not granted' });\n return;\n }\n }\n setHasPermission(true);\n } catch (error) {\n console.error('Error checking permissions:', error);\n onError?.({ message: 'Error checking camera permissions' });\n }\n };\n\n const onInitialized = useCallback(() => {\n console.log('Camera initialized!');\n setIsInitialized(true);\n }, []);\n\n const onCameraError = useCallback((error: any) => {\n console.error('Camera error:', error);\n onError?.({ message: error.message || 'Camera error occurred' });\n }, [onError]);\n\n const capturePhoto = useCallback(async () => {\n try {\n if (!camera.current || !isInitialized) {\n onError?.({ message: 'Camera not ready' });\n return;\n }\n\n const photo = await camera.current.takePhoto({\n enableShutterSound: true,\n });\n\n const result = await VisionCameraModule.processPhotoResult(photo);\n onCapture?.(result);\n } catch (error) {\n console.error('Error taking photo:', error);\n onCapture?.({\n success: false,\n error: error instanceof Error ? error.message : 'Failed to capture photo',\n });\n }\n }, [isInitialized, quality, onCapture, onError]);\n\n // Auto-capture functionality (can be triggered externally)\n useEffect(() => {\n if (showCamera && isInitialized && hasPermission) {\n // Auto-capture after a short delay when camera is ready\n const timer = setTimeout(() => {\n capturePhoto();\n }, 1000);\n \n return () => clearTimeout(timer);\n }\n return undefined;\n }, [showCamera, isInitialized, hasPermission, capturePhoto]);\n\n if (Platform.OS === 'web') {\n return (\n <View style={[styles.container, style]}>\n <Text style={styles.webMessage}>\n Camera is not supported on web platform. Please use the mobile app.\n </Text>\n </View>\n );\n }\n\n if (!hasPermission) {\n return (\n <View style={[styles.container, style]}>\n <Text style={styles.permissionMessage}>\n Camera permission required. Please grant permission to continue.\n </Text>\n </View>\n );\n }\n\n if (!device) {\n return (\n <View style={[styles.container, style]}>\n <Text style={styles.errorMessage}>\n Camera device not available\n </Text>\n </View>\n );\n }\n\n if (!showCamera) {\n return <View style={[styles.container, style]} />;\n }\n\n return (\n <View style={[styles.container, style]}>\n <Camera\n ref={camera}\n style={StyleSheet.absoluteFill}\n device={device}\n isActive={showCamera}\n photo={true}\n onInitialized={onInitialized}\n onError={onCameraError}\n />\n \n {instructions && (\n <View style={styles.instructionsOverlay}>\n <Text style={styles.instructions}>{instructions}</Text>\n </View>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'black',\n },\n instructionsOverlay: {\n position: 'absolute',\n top: 60,\n left: 20,\n right: 20,\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n padding: 15,\n borderRadius: 10,\n },\n instructions: {\n color: 'white',\n fontSize: 16,\n textAlign: 'center',\n fontWeight: '500',\n },\n permissionMessage: {\n color: 'white',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n errorMessage: {\n color: 'red',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n webMessage: {\n color: 'white',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraCaptureEx.d.ts","sourceRoot":"","sources":["../../../src/components/example/CameraCaptureEx.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,QAAA,MAAM,eAAe,yBAwPpB,CAAA;AAgFD,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { StyleSheet, View, Dimensions, Text, Animated, Image } from "react-native";
|
|
2
|
+
import { EnhancedCameraView } from "../EnhancedCameraView";
|
|
3
|
+
import Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import ScanningLine from "../Svgs/scanningLine";
|
|
6
|
+
const CameraCaptureEx = () => {
|
|
7
|
+
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
|
8
|
+
const bbox = [20, 140, 370, 340]; // [xMin, yMin, xMax, yMax]
|
|
9
|
+
const [xMin, yMin, xMax, yMax] = bbox;
|
|
10
|
+
const boxWidth = xMax - xMin;
|
|
11
|
+
const boxHeight = yMax - yMin;
|
|
12
|
+
// Animations
|
|
13
|
+
const instructionAnimation = useRef(new Animated.Value(0)).current;
|
|
14
|
+
const [cornerOpacity, setCornerOpacity] = useState(0.8);
|
|
15
|
+
const [imageUrl, setImageUrl] = useState(null);
|
|
16
|
+
const scanY = useRef(new Animated.Value(yMin)).current;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
// Animation boucle : descend puis remonte
|
|
19
|
+
Animated.loop(Animated.sequence([
|
|
20
|
+
Animated.timing(scanY, {
|
|
21
|
+
toValue: yMax,
|
|
22
|
+
duration: 2000,
|
|
23
|
+
useNativeDriver: false,
|
|
24
|
+
}),
|
|
25
|
+
Animated.timing(scanY, {
|
|
26
|
+
toValue: yMin,
|
|
27
|
+
duration: 2000,
|
|
28
|
+
useNativeDriver: false,
|
|
29
|
+
}),
|
|
30
|
+
])).start();
|
|
31
|
+
}, [scanY, yMin, yMax]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
// Animation des instructions
|
|
34
|
+
const instructionSequence = Animated.loop(Animated.sequence([
|
|
35
|
+
Animated.timing(instructionAnimation, {
|
|
36
|
+
toValue: 1,
|
|
37
|
+
duration: 600,
|
|
38
|
+
useNativeDriver: false,
|
|
39
|
+
}),
|
|
40
|
+
Animated.timing(instructionAnimation, {
|
|
41
|
+
toValue: 0.95,
|
|
42
|
+
duration: 200,
|
|
43
|
+
useNativeDriver: false,
|
|
44
|
+
}),
|
|
45
|
+
Animated.timing(instructionAnimation, {
|
|
46
|
+
toValue: 1,
|
|
47
|
+
duration: 200,
|
|
48
|
+
useNativeDriver: false,
|
|
49
|
+
}),
|
|
50
|
+
]));
|
|
51
|
+
// Animation des coins avec setState
|
|
52
|
+
const cornerInterval = setInterval(() => {
|
|
53
|
+
setCornerOpacity(prev => prev === 0.8 ? 1 : 0.8);
|
|
54
|
+
}, 800);
|
|
55
|
+
// Démarrer les animations
|
|
56
|
+
instructionSequence.start();
|
|
57
|
+
return () => {
|
|
58
|
+
instructionSequence.stop();
|
|
59
|
+
clearInterval(cornerInterval);
|
|
60
|
+
};
|
|
61
|
+
}, [instructionAnimation, xMin, xMax]);
|
|
62
|
+
if (imageUrl) {
|
|
63
|
+
return (<View style={{
|
|
64
|
+
flex: 1,
|
|
65
|
+
justifyContent: 'center',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
}}>
|
|
68
|
+
|
|
69
|
+
<View style={{
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
}}>
|
|
73
|
+
<Image source={{ uri: imageUrl }} style={[styles.image,
|
|
74
|
+
{
|
|
75
|
+
width: boxWidth,
|
|
76
|
+
height: boxHeight,
|
|
77
|
+
marginLeft: -xMin,
|
|
78
|
+
marginTop: -yMin,
|
|
79
|
+
},
|
|
80
|
+
]}/>
|
|
81
|
+
</View>
|
|
82
|
+
|
|
83
|
+
</View>);
|
|
84
|
+
}
|
|
85
|
+
return (<EnhancedCameraView showCamera={true} showSwitchCamera={false} bbox={{
|
|
86
|
+
xMin: 150,
|
|
87
|
+
yMin: 210,
|
|
88
|
+
xMax: 350,
|
|
89
|
+
yMax: 410,
|
|
90
|
+
borderColor: "#2DBD60",
|
|
91
|
+
borderWidth: 3,
|
|
92
|
+
cornerRadius: 8
|
|
93
|
+
}} onCapture={(image) => {
|
|
94
|
+
setImageUrl(image.path ?? null);
|
|
95
|
+
}} overlayComponent={<View style={StyleSheet.absoluteFill}>
|
|
96
|
+
<Animated.View style={[
|
|
97
|
+
styles.topIntruction,
|
|
98
|
+
]}>
|
|
99
|
+
<Text style={styles.topIntructionText}>
|
|
100
|
+
💡 Alignez le code QR avec la zone de capture • déplacez la caméra pour ajuster la zone de capture • mesurez 100cm de hauteur.
|
|
101
|
+
</Text>
|
|
102
|
+
</Animated.View>
|
|
103
|
+
|
|
104
|
+
<Svg height={screenHeight} width={screenWidth} style={styles.svg}>
|
|
105
|
+
<Defs>
|
|
106
|
+
<Mask id="cameraMask">
|
|
107
|
+
{/* Fond blanc - zone visible */}
|
|
108
|
+
<Rect x="0" y="0" width={screenWidth} height={screenHeight} fill="white"/>
|
|
109
|
+
{/* Zone noire - zone masquée (transparente) */}
|
|
110
|
+
<Rect x={xMin} y={yMin} width={boxWidth} height={boxHeight} fill="black"/>
|
|
111
|
+
</Mask>
|
|
112
|
+
</Defs>
|
|
113
|
+
|
|
114
|
+
{/* Overlay semi-transparent avec masque */}
|
|
115
|
+
<Rect x="0" y="0" width={screenWidth} height={screenHeight} fill="rgba(0, 0, 0, 0.5)" mask="url(#cameraMask)"/>
|
|
116
|
+
|
|
117
|
+
{/* Coins de la zone de capture - arrondis avec animation */}
|
|
118
|
+
<Path d={`M ${xMin + 15} ${yMin} Q ${xMin} ${yMin} ${xMin} ${yMin + 15} L ${xMin} ${yMin + 20}`} stroke="#4CAF50" strokeWidth="8" fill="none" opacity={cornerOpacity}/>
|
|
119
|
+
<Path d={`M ${xMin + 20} ${yMin} L ${xMin + 15} ${yMin}`} stroke="#4CAF50" strokeWidth="8" opacity={cornerOpacity}/>
|
|
120
|
+
|
|
121
|
+
<Path d={`M ${xMax - 15} ${yMin} Q ${xMax} ${yMin} ${xMax} ${yMin + 15} L ${xMax} ${yMin + 20}`} stroke="#4CAF50" strokeWidth="8" fill="none" opacity={cornerOpacity}/>
|
|
122
|
+
<Path d={`M ${xMax - 20} ${yMin} L ${xMax - 15} ${yMin}`} stroke="#4CAF50" strokeWidth="8" opacity={cornerOpacity}/>
|
|
123
|
+
|
|
124
|
+
<Path d={`M ${xMin + 15} ${yMax} Q ${xMin} ${yMax} ${xMin} ${yMax - 15} L ${xMin} ${yMax - 20}`} stroke="#4CAF50" strokeWidth="8" fill="none" opacity={cornerOpacity}/>
|
|
125
|
+
<Path d={`M ${xMin + 20} ${yMax} L ${xMin + 15} ${yMax}`} stroke="#4CAF50" strokeWidth="8" opacity={cornerOpacity}/>
|
|
126
|
+
|
|
127
|
+
<Path d={`M ${xMax - 15} ${yMax} Q ${xMax} ${yMax} ${xMax} ${yMax - 15} L ${xMax} ${yMax - 20}`} stroke="#4CAF50" strokeWidth="8" fill="none" opacity={cornerOpacity}/>
|
|
128
|
+
<Path d={`M ${xMax - 20} ${yMax} L ${xMax - 15} ${yMax}`} stroke="#4CAF50" strokeWidth="8" opacity={cornerOpacity}/>
|
|
129
|
+
|
|
130
|
+
</Svg>
|
|
131
|
+
<ScanningLine yMin={yMin} screenWidth={screenWidth} height={screenHeight} yMax={yMax}/>
|
|
132
|
+
|
|
133
|
+
<View style={styles.bottomIntruction}>
|
|
134
|
+
<Text style={styles.bottomTitle}>
|
|
135
|
+
Mesurez 100cm de hauteur.
|
|
136
|
+
</Text>
|
|
137
|
+
<Text style={styles.bottomSubtitle}>
|
|
138
|
+
Ne pas déplacer la caméra pendant la capture. • Ne pas déplacer la caméra pendant la capture.
|
|
139
|
+
</Text>
|
|
140
|
+
</View>
|
|
141
|
+
</View>}/>);
|
|
142
|
+
};
|
|
143
|
+
const styles = StyleSheet.create({
|
|
144
|
+
overlay: {
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
top: 0,
|
|
147
|
+
left: 0,
|
|
148
|
+
width: '100%',
|
|
149
|
+
height: '50%',
|
|
150
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
151
|
+
},
|
|
152
|
+
svg: {
|
|
153
|
+
position: 'absolute',
|
|
154
|
+
top: 0,
|
|
155
|
+
left: 0,
|
|
156
|
+
width: '100%',
|
|
157
|
+
height: '100%',
|
|
158
|
+
},
|
|
159
|
+
topIntruction: {
|
|
160
|
+
zIndex: 1000,
|
|
161
|
+
flexDirection: 'row',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
justifyContent: 'center',
|
|
164
|
+
paddingVertical: 20,
|
|
165
|
+
paddingHorizontal: 10,
|
|
166
|
+
marginHorizontal: 20,
|
|
167
|
+
marginTop: 10,
|
|
168
|
+
backgroundColor: "#FDE04730",
|
|
169
|
+
borderColor: "#FDE047",
|
|
170
|
+
borderWidth: 1,
|
|
171
|
+
borderRadius: 10,
|
|
172
|
+
gap: 10,
|
|
173
|
+
},
|
|
174
|
+
topIntructionText: {
|
|
175
|
+
color: '#FDE047',
|
|
176
|
+
fontSize: 14,
|
|
177
|
+
fontWeight: 'bold',
|
|
178
|
+
textAlign: 'center',
|
|
179
|
+
},
|
|
180
|
+
bottomIntruction: {
|
|
181
|
+
position: 'absolute',
|
|
182
|
+
bottom: 0,
|
|
183
|
+
left: 0,
|
|
184
|
+
width: '100%',
|
|
185
|
+
height: '35%',
|
|
186
|
+
paddingHorizontal: 20,
|
|
187
|
+
},
|
|
188
|
+
bottomIntructionTextBold: {
|
|
189
|
+
color: 'white',
|
|
190
|
+
fontSize: 16,
|
|
191
|
+
fontWeight: 'bold',
|
|
192
|
+
textAlign: 'center',
|
|
193
|
+
},
|
|
194
|
+
bottomIntructionText: {
|
|
195
|
+
color: 'white',
|
|
196
|
+
fontSize: 14,
|
|
197
|
+
fontWeight: 'bold',
|
|
198
|
+
textAlign: 'center',
|
|
199
|
+
},
|
|
200
|
+
bottomTitle: {
|
|
201
|
+
color: 'white',
|
|
202
|
+
fontSize: 25,
|
|
203
|
+
fontWeight: 'bold',
|
|
204
|
+
textAlign: 'center',
|
|
205
|
+
},
|
|
206
|
+
bottomSubtitle: {
|
|
207
|
+
color: 'white',
|
|
208
|
+
marginTop: 15,
|
|
209
|
+
fontSize: 14,
|
|
210
|
+
fontWeight: '500',
|
|
211
|
+
textAlign: 'center',
|
|
212
|
+
},
|
|
213
|
+
image: {
|
|
214
|
+
position: 'absolute',
|
|
215
|
+
borderRadius: 10,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
export default CameraCaptureEx;
|
|
219
|
+
//# sourceMappingURL=CameraCaptureEx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraCaptureEx.js","sourceRoot":"","sources":["../../../src/components/example/CameraCaptureEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,GAAG,EAAE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,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,QAAQ;KACtB;IACD,WAAW,EAAE;QACT,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,QAAQ;KACtB;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACtB;IAGD,KAAK,EAAE;QACH,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,EAAE;KACnB;CACJ,CAAC,CAAA;AAEF,eAAe,eAAe,CAAA","sourcesContent":["import { StyleSheet, View, Dimensions, Text, Animated, Image } from \"react-native\"\nimport { EnhancedCameraView } from \"../EnhancedCameraView\"\nimport Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';\nimport React, { useEffect, useRef, useState } from 'react';\nimport ScanningLine from \"../Svgs/scanningLine\";\n\nconst CameraCaptureEx = () => {\n const { width: screenWidth, height: screenHeight } = Dimensions.get('window');\n\n\n const bbox = [20, 140, 370, 340]; // [xMin, yMin, xMax, yMax]\n const [xMin, yMin, xMax, yMax] = bbox;\n const boxWidth = xMax - xMin;\n const boxHeight = yMax - yMin;\n\n // Animations\n const instructionAnimation = useRef(new Animated.Value(0)).current;\n\n const [cornerOpacity, setCornerOpacity] = useState(0.8);\n\n const [imageUrl, setImageUrl] = useState<string | null>(null);\n\n const scanY = useRef(new Animated.Value(yMin)).current;\n\n\n useEffect(() => {\n // Animation boucle : descend puis remonte\n Animated.loop(\n Animated.sequence([\n Animated.timing(scanY, {\n toValue: yMax,\n duration: 2000,\n useNativeDriver: false,\n }),\n Animated.timing(scanY, {\n toValue: yMin,\n duration: 2000,\n useNativeDriver: false,\n }),\n ])\n ).start();\n }, [scanY, yMin, yMax]);\n\n useEffect(() => {\n // Animation des instructions\n const instructionSequence = Animated.loop(\n Animated.sequence([\n Animated.timing(instructionAnimation, {\n toValue: 1,\n duration: 600,\n useNativeDriver: false,\n }),\n Animated.timing(instructionAnimation, {\n toValue: 0.95,\n duration: 200,\n useNativeDriver: false,\n }),\n Animated.timing(instructionAnimation, {\n toValue: 1,\n duration: 200,\n useNativeDriver: false,\n }),\n ])\n );\n\n // Animation des coins avec setState\n const cornerInterval = setInterval(() => {\n setCornerOpacity(prev => prev === 0.8 ? 1 : 0.8);\n }, 800);\n\n\n\n\n // Démarrer les animations\n instructionSequence.start();\n\n return () => {\n instructionSequence.stop();\n clearInterval(cornerInterval);\n\n };\n }, [instructionAnimation, xMin, xMax]);\n\n if (imageUrl) {\n return (\n <View style={\n {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n }\n }>\n\n <View style={\n {\n\n justifyContent: 'center',\n alignItems: 'center',\n }\n }>\n <Image\n source={{ uri: imageUrl }}\n style={[styles.image,\n {\n width: boxWidth,\n height: boxHeight,\n marginLeft: -xMin,\n marginTop: -yMin,\n\n },\n ]} />\n </View>\n\n </View>\n )\n }\n\n return (\n <EnhancedCameraView\n showCamera={true}\n showSwitchCamera={false}\n bbox={{\n xMin: 150,\n yMin: 210,\n xMax: 350,\n yMax: 410,\n borderColor: \"#2DBD60\",\n borderWidth: 3,\n cornerRadius: 8\n }}\n onCapture={(image) => {\n setImageUrl(image.path ?? null);\n }}\n overlayComponent={\n <View style={StyleSheet.absoluteFill}>\n <Animated.View\n style={[\n styles.topIntruction,\n\n ]}\n >\n <Text style={styles.topIntructionText}>\n 💡 Alignez le code QR avec la zone de capture • déplacez la caméra pour ajuster la zone de capture • mesurez 100cm de hauteur.\n </Text>\n </Animated.View>\n\n <Svg\n height={screenHeight}\n width={screenWidth}\n style={styles.svg}\n >\n <Defs>\n <Mask id=\"cameraMask\">\n {/* Fond blanc - zone visible */}\n <Rect\n x=\"0\"\n y=\"0\"\n width={screenWidth}\n height={screenHeight}\n fill=\"white\"\n />\n {/* Zone noire - zone masquée (transparente) */}\n <Rect\n x={xMin}\n y={yMin}\n width={boxWidth}\n height={boxHeight}\n fill=\"black\"\n />\n </Mask>\n </Defs>\n\n {/* Overlay semi-transparent avec masque */}\n <Rect\n x=\"0\"\n y=\"0\"\n width={screenWidth}\n height={screenHeight}\n fill=\"rgba(0, 0, 0, 0.5)\"\n mask=\"url(#cameraMask)\"\n />\n\n {/* Coins de la zone de capture - arrondis avec animation */}\n <Path\n d={`M ${xMin + 15} ${yMin} Q ${xMin} ${yMin} ${xMin} ${yMin + 15} L ${xMin} ${yMin + 20}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMin + 20} ${yMin} L ${xMin + 15} ${yMin}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n <Path\n d={`M ${xMax - 15} ${yMin} Q ${xMax} ${yMin} ${xMax} ${yMin + 15} L ${xMax} ${yMin + 20}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMax - 20} ${yMin} L ${xMax - 15} ${yMin}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n <Path\n d={`M ${xMin + 15} ${yMax} Q ${xMin} ${yMax} ${xMin} ${yMax - 15} L ${xMin} ${yMax - 20}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMin + 20} ${yMax} L ${xMin + 15} ${yMax}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n <Path\n d={`M ${xMax - 15} ${yMax} Q ${xMax} ${yMax} ${xMax} ${yMax - 15} L ${xMax} ${yMax - 20}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMax - 20} ${yMax} L ${xMax - 15} ${yMax}`}\n stroke=\"#4CAF50\"\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n </Svg>\n <ScanningLine yMin={yMin} screenWidth={screenWidth} height={screenHeight} yMax={yMax} />\n\n <View style={styles.bottomIntruction}>\n <Text style={styles.bottomTitle}>\n Mesurez 100cm de hauteur.\n </Text>\n <Text style={styles.bottomSubtitle}>\n Ne pas déplacer la caméra pendant la capture. • Ne pas déplacer la caméra pendant la capture.\n </Text>\n </View>\n </View>\n }\n />\n )\n}\n\nconst styles = StyleSheet.create({\n overlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '50%',\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n svg: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n },\n topIntruction: {\n zIndex: 1000,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 20,\n paddingHorizontal: 10,\n marginHorizontal: 20,\n marginTop: 10,\n backgroundColor: \"#FDE04730\",\n borderColor: \"#FDE047\",\n borderWidth: 1,\n borderRadius: 10,\n gap: 10,\n },\n topIntructionText: {\n color: '#FDE047',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntruction: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%',\n height: '35%',\n paddingHorizontal: 20,\n },\n bottomIntructionTextBold: {\n color: 'white',\n fontSize: 16,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntructionText: {\n color: 'white',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomTitle: {\n color: 'white',\n fontSize: 25,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomSubtitle: {\n color: 'white',\n marginTop: 15,\n fontSize: 14,\n fontWeight: '500',\n textAlign: 'center',\n },\n\n\n image: {\n position: 'absolute',\n borderRadius: 10,\n },\n})\n\nexport default CameraCaptureEx"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraCaptureExAdvanced.d.ts","sourceRoot":"","sources":["../../../src/components/example/CameraCaptureExAdvanced.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,uBAAuB,mCAqR5B,CAAA;AA0ED,eAAe,uBAAuB,CAAA"}
|