@sanctum-key/react-native-sdk 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/android/build/.transforms/{c9d62bb333688ab562f51958998d5a48 → 9e34a0354bf8964d60c4c1392f5aa5b2}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.java +2 -2
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_file_paths.xml.flat +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +1 -1
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +1 -1
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/{SanctumKey → sanctumkey}/com/BuildConfig.class +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +42 -42
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +52 -52
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{SanctumKey → sanctumkey}/com/SanctumKeySdkView.class +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkModule.kt → sanctumkey/com/SanctumKeySdkModule.kt} +21 -18
- package/android/src/main/java/kyc/{transfergratis/com/TransfergratisSdkView.kt → sanctumkey/com/SanctumKeySdkView.kt} +2 -2
- package/build/package.json +5 -5
- package/build/src/App.d.ts +2 -2
- package/build/src/App.d.ts.map +1 -1
- package/build/src/App.js +2 -2
- package/build/src/App.js.map +1 -1
- package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
- package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
- package/build/src/SanctumKeySdk.types.js +2 -0
- package/build/src/SanctumKeySdk.types.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
- package/build/src/SanctumKeySdkModule.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
- package/build/src/SanctumKeySdkModule.web.js.map +1 -0
- package/build/src/SanctumKeySdkView.d.ts +4 -0
- package/build/src/SanctumKeySdkView.d.ts.map +1 -0
- package/build/src/SanctumKeySdkView.js +7 -0
- package/build/src/SanctumKeySdkView.js.map +1 -0
- package/build/src/SanctumKeySdkView.web.d.ts +4 -0
- package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
- package/build/src/SanctumKeySdkView.web.js.map +1 -0
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +13 -4
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/NativeCameraView.js +1 -1
- package/build/src/components/NativeCameraView.js.map +1 -1
- package/build/src/components/TemplateKYCExample.d.ts +4 -3
- package/build/src/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/src/components/TemplateKYCExample.js +2 -2
- package/build/src/components/TemplateKYCExample.js.map +1 -1
- package/build/src/config/allowedDomains.js +6 -6
- package/build/src/config/allowedDomains.js.map +1 -1
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +9 -4
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/camera/NativeCameraModule.js +17 -17
- package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
- package/build/src/web/WebKYCEntry.d.ts +2 -2
- package/build/src/web/WebKYCEntry.d.ts.map +1 -1
- package/build/src/web/WebKYCEntry.js +3 -2
- package/build/src/web/WebKYCEntry.js.map +1 -1
- package/expo-module.config.json +3 -3
- package/ios/TransfergratisSdk.podspec +2 -2
- package/ios/TransfergratisSdkModule.swift +12 -12
- package/package.json +5 -5
- package/src/App.tsx +2 -2
- package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
- package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
- package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
- package/src/SanctumKeySdkView.tsx +11 -0
- package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
- package/src/components/KYCElements/IDCardCapture.tsx +15 -4
- package/src/components/NativeCameraView.tsx +1 -1
- package/src/components/TemplateKYCExample.tsx +23 -4
- package/src/config/allowedDomains.ts +6 -6
- package/src/i18n/README.md +1 -1
- package/src/index.ts +3 -3
- package/src/modules/api/KYCService.ts +10 -4
- package/src/modules/camera/NativeCameraModule.ts +17 -17
- package/src/web/WebKYCEntry.tsx +3 -3
- package/android/build/.transforms/ab90740579f5bd05b27b4343ada2d1c9/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/c9d62bb333688ab562f51958998d5a48/results.bin +0 -1
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0 +0 -0
- package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
- package/build/src/TransfergratisSdk.types.js +0 -2
- package/build/src/TransfergratisSdk.types.js.map +0 -1
- package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.js.map +0 -1
- package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.web.js.map +0 -1
- package/build/src/TransfergratisSdkView.d.ts +0 -4
- package/build/src/TransfergratisSdkView.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.js +0 -7
- package/build/src/TransfergratisSdkView.js.map +0 -1
- package/build/src/TransfergratisSdkView.web.d.ts +0 -4
- package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.web.js.map +0 -1
- package/src/TransfergratisSdkView.tsx +0 -11
- /package/android/build/.transforms/{ab90740579f5bd05b27b4343ada2d1c9 → 9e34a0354bf8964d60c4c1392f5aa5b2}/results.bin +0 -0
|
@@ -3,7 +3,7 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name = '
|
|
6
|
+
s.name = 'SanctumKeySdk'
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = package['description']
|
|
9
9
|
s.description = package['description']
|
|
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
:tvos => '15.1'
|
|
16
16
|
}
|
|
17
17
|
s.swift_version = '5.4'
|
|
18
|
-
s.source = { git: 'https://github.com/
|
|
18
|
+
s.source = { git: 'https://github.com/SanctumKeyOrg/KYC-User-Frontend' }
|
|
19
19
|
s.static_framework = true
|
|
20
20
|
|
|
21
21
|
s.dependency 'ExpoModulesCore'
|
|
@@ -4,7 +4,7 @@ import UIKit
|
|
|
4
4
|
import Photos
|
|
5
5
|
|
|
6
6
|
// Vue caméra native avec logs et interface améliorée
|
|
7
|
-
public final class
|
|
7
|
+
public final class SanctumKeySdkView: ExpoView {
|
|
8
8
|
let onCapture = EventDispatcher()
|
|
9
9
|
let onError = EventDispatcher()
|
|
10
10
|
|
|
@@ -18,13 +18,13 @@ public final class TransfergratisSdkView: ExpoView {
|
|
|
18
18
|
|
|
19
19
|
// Logs pour débogage
|
|
20
20
|
private func logDebug(_ message: String) {
|
|
21
|
-
print("🟦 [
|
|
21
|
+
print("🟦 [SanctumKeySdkView] \(message)")
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
public required init(appContext: AppContext? = nil) {
|
|
25
25
|
super.init(appContext: appContext)
|
|
26
26
|
logDebug("Initialisation de la vue caméra")
|
|
27
|
-
print("🟦 [
|
|
27
|
+
print("🟦 [SanctumKeySdkView] Init appelé - Vue créée")
|
|
28
28
|
setupViews()
|
|
29
29
|
|
|
30
30
|
// Test immédiat pour voir si les événements fonctionnent
|
|
@@ -180,9 +180,9 @@ public final class TransfergratisSdkView: ExpoView {
|
|
|
180
180
|
|
|
181
181
|
// Classe déléguée pour gérer les protocoles qui nécessitent NSObject
|
|
182
182
|
class CameraDelegate: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
|
|
183
|
-
weak var module:
|
|
183
|
+
weak var module: SanctumKeySdkModule?
|
|
184
184
|
|
|
185
|
-
init(module:
|
|
185
|
+
init(module: SanctumKeySdkModule) {
|
|
186
186
|
self.module = module
|
|
187
187
|
super.init()
|
|
188
188
|
}
|
|
@@ -228,9 +228,9 @@ class CameraDelegate: NSObject, UIImagePickerControllerDelegate, UINavigationCon
|
|
|
228
228
|
|
|
229
229
|
// Classe déléguée pour le sélecteur de fichiers
|
|
230
230
|
class FilePickerDelegate: NSObject, UIDocumentPickerDelegate {
|
|
231
|
-
weak var module:
|
|
231
|
+
weak var module: SanctumKeySdkModule?
|
|
232
232
|
|
|
233
|
-
init(module:
|
|
233
|
+
init(module: SanctumKeySdkModule) {
|
|
234
234
|
self.module = module
|
|
235
235
|
super.init()
|
|
236
236
|
}
|
|
@@ -261,7 +261,7 @@ class FilePickerDelegate: NSObject, UIDocumentPickerDelegate {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
public class
|
|
264
|
+
public class SanctumKeySdkModule: Module {
|
|
265
265
|
var cameraPromise: Promise?
|
|
266
266
|
var filePickerPromise: Promise?
|
|
267
267
|
var currentPhotoPath: String?
|
|
@@ -269,7 +269,7 @@ public class TransfergratisSdkModule: Module {
|
|
|
269
269
|
private var filePickerDelegate: FilePickerDelegate?
|
|
270
270
|
|
|
271
271
|
public func definition() -> ModuleDefinition {
|
|
272
|
-
Name("
|
|
272
|
+
Name("SanctumKeySdk")
|
|
273
273
|
|
|
274
274
|
Constants([
|
|
275
275
|
"PI": Double.pi
|
|
@@ -364,12 +364,12 @@ public class TransfergratisSdkModule: Module {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
// Vue native pour la caméra avec instructions
|
|
367
|
-
View(
|
|
368
|
-
Prop("instructions") { (view:
|
|
367
|
+
View(SanctumKeySdkView.self) {
|
|
368
|
+
Prop("instructions") { (view: SanctumKeySdkView, instructions: String) in
|
|
369
369
|
view.setInstructions(instructions)
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
Prop("showCamera") { (view:
|
|
372
|
+
Prop("showCamera") { (view: SanctumKeySdkView, show: Bool) in
|
|
373
373
|
view.showCamera(show)
|
|
374
374
|
}
|
|
375
375
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanctum-key/react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Sanctum Key React Native SDK",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"kyc",
|
|
26
26
|
"identity-verification"
|
|
27
27
|
],
|
|
28
|
-
"repository": "https://github.com/
|
|
28
|
+
"repository": "https://github.com/SanctumKeyOrg/KYC-User-Frontend",
|
|
29
29
|
"bugs": {
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/SanctumKeyOrg/KYC-User-Frontend/issues"
|
|
31
31
|
},
|
|
32
|
-
"author": "mesha-
|
|
32
|
+
"author": "mesha-SanctumKey <loic.lontchi@SanctumKey.com> (https://github.com/mesha-SanctumKey)",
|
|
33
33
|
"license": "MIT",
|
|
34
|
-
"homepage": "https://github.com/
|
|
34
|
+
"homepage": "https://github.com/SanctumKey/KYC-User-Frontend#readme",
|
|
35
35
|
"files": [
|
|
36
36
|
"build",
|
|
37
37
|
"src",
|
package/src/App.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import CameraCaptureEx from "./components/example/CameraCaptureEx";
|
|
|
2
2
|
// import SelfieCaptureEx from "./components/example/SelfieCaptureEx";
|
|
3
3
|
// import { KYCExample } from "./components/KYCExample";
|
|
4
4
|
// import { KYCFlow } from "./components/KYCFlow"
|
|
5
|
-
const
|
|
5
|
+
const LaunchSanctumKeyKYC = () =>{
|
|
6
6
|
return <CameraCaptureEx/>
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default LaunchSanctumKeyKYC;
|
|
@@ -15,13 +15,13 @@ export type ErrorEventPayload = {
|
|
|
15
15
|
message: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type SanctumKeySdkModuleEvents = {
|
|
19
19
|
onCameraCapture: (params: CameraCaptureEventPayload) => void;
|
|
20
20
|
onFileSelected: (params: FileSelectedEventPayload) => void;
|
|
21
21
|
onError: (params: ErrorEventPayload) => void;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type SanctumKeySdkViewProps = {
|
|
25
25
|
instructions: string;
|
|
26
26
|
showCamera: boolean;
|
|
27
27
|
onCapture?: (event: { nativeEvent: { action: 'capture' | 'retake' } }) => void;
|
|
@@ -2,9 +2,9 @@ import { requireNativeModule } from 'expo-modules-core';
|
|
|
2
2
|
|
|
3
3
|
import { NativeModule } from 'expo';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { SanctumKeySdkModuleEvents } from './SanctumKeySdk.types';
|
|
6
6
|
|
|
7
|
-
declare class
|
|
7
|
+
declare class SanctumKeySdkModule extends NativeModule<SanctumKeySdkModuleEvents> {
|
|
8
8
|
PI: number;
|
|
9
9
|
testModule(): Promise<string>;
|
|
10
10
|
requestCameraPermission(): Promise<boolean>;
|
|
@@ -13,4 +13,4 @@ declare class TransfergratisSdkModule extends NativeModule<TransfergratisSdkModu
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// This call loads the native module object from the JSI.
|
|
16
|
-
export default requireNativeModule<
|
|
16
|
+
export default requireNativeModule<SanctumKeySdkModule>('SanctumKeySdk');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { registerWebModule } from 'expo-modules-core';
|
|
2
2
|
import { NativeModule } from 'expo';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { SanctumKeySdkModuleEvents } from './SanctumKeySdk.types';
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class SanctumKeySdkModule extends NativeModule<SanctumKeySdkModuleEvents> {
|
|
7
7
|
PI = Math.PI;
|
|
8
8
|
|
|
9
9
|
async requestCameraPermission(): Promise<boolean> {
|
|
@@ -28,4 +28,4 @@ class TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export default registerWebModule(
|
|
31
|
+
export default registerWebModule(SanctumKeySdkModule, 'SanctumKeySdkModule');
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
import { SanctumKeySdkViewProps } from './SanctumKeySdk.types';
|
|
5
|
+
|
|
6
|
+
const NativeView: React.ComponentType<SanctumKeySdkViewProps> =
|
|
7
|
+
requireNativeView('SanctumKeySdk');
|
|
8
|
+
|
|
9
|
+
export default function SanctumKeySdkView(props: SanctumKeySdkViewProps) {
|
|
10
|
+
return <NativeView {...props} />;
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { SanctumKeySdkViewProps } from './SanctumKeySdk.types';
|
|
4
4
|
|
|
5
|
-
export default function
|
|
5
|
+
export default function SanctumKeySdkView(props: SanctumKeySdkViewProps) {
|
|
6
6
|
return (
|
|
7
7
|
<div>
|
|
8
8
|
{/* <iframe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, Image, ScrollView, Platform, ActivityIndicator } from 'react-native';
|
|
2
|
+
import { View, Text, StyleSheet, Image, ScrollView, Platform, ActivityIndicator, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { showAlert } from '../../utils/platformAlert';
|
|
4
4
|
import { EnhancedCameraView } from '../EnhancedCameraView';
|
|
5
5
|
import { TemplateComponent, LocalizedText, GovernmentDocumentType, ISilentCaptureResult, IBbox, GovernmentDocumentTypeShorted, GovernmentDocumentTypeBackend } from '../../types/KYC.types';
|
|
@@ -14,7 +14,6 @@ import pathToBase64 from '../../utils/pathToBase64';
|
|
|
14
14
|
import { cropByObb, cropImageWithBBoxWithTolerance, getObbConfidence, OBB_CONFIDENCE_THRESHOLD } from '../../utils/cropByObb';
|
|
15
15
|
import REGION_MAPPING from '../../config/region_mapping.json';
|
|
16
16
|
|
|
17
|
-
// 🌍 Map ISO codes to exact JSON root keys to ensure perfect dictionary lookups
|
|
18
17
|
const ISO_TO_COUNTRY_NAME: Record<string, string> = {
|
|
19
18
|
'KE': 'Kenya', 'CM': 'Cameroon', 'NG': 'Nigeria', 'CA': 'Canada',
|
|
20
19
|
'FR': 'France', 'GH': 'Ghana', 'ZA': 'South Africa', 'GB': 'Britain',
|
|
@@ -40,6 +39,8 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({ component, value =
|
|
|
40
39
|
const [silentCaptureResult, setSilentCaptureResult] = useState<ISilentCaptureResult>({ success: false, isAnalyzing: false });
|
|
41
40
|
const [isProcessingCapture, setIsProcessingCapture] = useState(false);
|
|
42
41
|
const [processingImagePath, setProcessingImagePath] = useState<string | null>(null);
|
|
42
|
+
const [cameraKey, setCameraKey] = useState(0);
|
|
43
|
+
|
|
43
44
|
|
|
44
45
|
const documentTypeMapping: Record<string, GovernmentDocumentType> = {
|
|
45
46
|
'nationalId': 'national_id', 'passport': 'passport', 'driversLicense': 'drivers_licence',
|
|
@@ -53,6 +54,10 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({ component, value =
|
|
|
53
54
|
return "";
|
|
54
55
|
};
|
|
55
56
|
|
|
57
|
+
const refreshCamera = () => {
|
|
58
|
+
setCameraKey(prev => prev + 1);
|
|
59
|
+
};
|
|
60
|
+
|
|
56
61
|
const countrySelectionData = useMemo(() => {
|
|
57
62
|
const countrySelectionComponent = state.template.components.find(c => c.type === 'country_selection');
|
|
58
63
|
return countrySelectionComponent ? state.componentData[countrySelectionComponent.id] : null;
|
|
@@ -330,7 +335,7 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({ component, value =
|
|
|
330
335
|
|
|
331
336
|
<View style={styles.cameraFeedContainer}>
|
|
332
337
|
<EnhancedCameraView
|
|
333
|
-
key={currentSide}
|
|
338
|
+
key={`${currentSide}-${cameraKey}`}
|
|
334
339
|
showCamera={true}
|
|
335
340
|
isProcessing={isBusy}
|
|
336
341
|
cameraType={cameraConfig.cameraType}
|
|
@@ -390,6 +395,10 @@ export const IDCardCapture: React.FC<IDCardCaptureProps> = ({ component, value =
|
|
|
390
395
|
step: state.currentComponentIndex + 1, totalSteps: state.template.components.length, side: currentSide,
|
|
391
396
|
}}
|
|
392
397
|
/>
|
|
398
|
+
|
|
399
|
+
<TouchableOpacity style={styles.refreshButton} onPress={refreshCamera}>
|
|
400
|
+
<Text style={styles.refreshButtonText}>Refresh Camera</Text>
|
|
401
|
+
</TouchableOpacity>
|
|
393
402
|
</>
|
|
394
403
|
}
|
|
395
404
|
/>
|
|
@@ -589,5 +598,7 @@ const styles = StyleSheet.create({
|
|
|
589
598
|
errorText: { color: '#dc2626', fontSize: 14, marginTop: 8, textAlign: 'center' },
|
|
590
599
|
topAnalyzingPillContainer: { position: 'absolute', top: Platform.OS === 'android' ? 60 : 50, left: 0, right: 0, alignItems: 'center', zIndex: 100 },
|
|
591
600
|
topAnalyzingPill: { flexDirection: 'row', alignItems: 'center', backgroundColor: 'rgba(0,0,0,0.6)', paddingVertical: 8, paddingHorizontal: 16, borderRadius: 20, gap: 8 },
|
|
592
|
-
analyzingPillText: { color: 'white', fontSize: 14, fontWeight: 'bold' }
|
|
601
|
+
analyzingPillText: { color: 'white', fontSize: 14, fontWeight: 'bold' },
|
|
602
|
+
refreshButton: { position: 'absolute', bottom: 100, alignSelf: 'center', backgroundColor: 'rgba(0,0,0,0.5)', padding: 10, borderRadius: 20, zIndex: 500 },
|
|
603
|
+
refreshButtonText: { color: 'white', fontWeight: 'bold' },
|
|
593
604
|
});
|
|
@@ -10,7 +10,7 @@ export interface NativeCameraViewProps {
|
|
|
10
10
|
onError?: (event: any) => void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const NativeCameraViewComponent = requireNativeViewManager('
|
|
13
|
+
const NativeCameraViewComponent = requireNativeViewManager('SanctumKeySdk_SanctumKeySdkView');
|
|
14
14
|
|
|
15
15
|
export const NativeCameraView: React.FC<NativeCameraViewProps> = (props) => {
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { JSX } from 'react';
|
|
2
2
|
import { View, SafeAreaView } from 'react-native';
|
|
3
3
|
import { TemplateKYCFlow } from './TemplateKYCFlowRefactored';
|
|
4
4
|
import { KYCTemplate, VerificationState } from '../types/KYC.types';
|
|
@@ -136,7 +136,8 @@ const advancedVerificationTemplate: KYCTemplate = {
|
|
|
136
136
|
]
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
|
|
140
|
+
export interface TemplateKYCExampleProps {
|
|
140
141
|
onComplete: (data: VerificationState) => void;
|
|
141
142
|
onCancel: () => void;
|
|
142
143
|
onError: (error: string) => void;
|
|
@@ -151,7 +152,25 @@ export const TemplateKYCExample: React.FC<{
|
|
|
151
152
|
initialCountryResume?: { code: string; documentType: string; region?: string };
|
|
152
153
|
referenceId?: string;
|
|
153
154
|
onSessionSave?: (sessionId: string) => void;
|
|
154
|
-
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function TemplateKYCExample({
|
|
158
|
+
onComplete,
|
|
159
|
+
onCancel,
|
|
160
|
+
onError,
|
|
161
|
+
language,
|
|
162
|
+
API_KEY,
|
|
163
|
+
templateId,
|
|
164
|
+
template,
|
|
165
|
+
env = 'PRODUCTION',
|
|
166
|
+
serverEnv,
|
|
167
|
+
existingSessionId,
|
|
168
|
+
initialComponentIndex,
|
|
169
|
+
initialCountryResume,
|
|
170
|
+
referenceId,
|
|
171
|
+
onSessionSave
|
|
172
|
+
}: TemplateKYCExampleProps): JSX.Element { // <--- Explicit Return Type
|
|
173
|
+
|
|
155
174
|
const handleComplete = (data: VerificationState) => {
|
|
156
175
|
console.log('KYC Template completed with data:', data);
|
|
157
176
|
onComplete(data);
|
|
@@ -194,5 +213,5 @@ export const TemplateKYCExample: React.FC<{
|
|
|
194
213
|
</View>
|
|
195
214
|
</SafeAreaView>
|
|
196
215
|
);
|
|
197
|
-
}
|
|
216
|
+
}
|
|
198
217
|
|
|
@@ -12,11 +12,11 @@ export interface AllowedDomainConfig {
|
|
|
12
12
|
// Default configuration - can be overridden via environment variables
|
|
13
13
|
const DEFAULT_CONFIG: AllowedDomainConfig = {
|
|
14
14
|
domains: [
|
|
15
|
-
'
|
|
16
|
-
'www.
|
|
17
|
-
'admin.
|
|
18
|
-
'dashboard.
|
|
19
|
-
'preweb.
|
|
15
|
+
'sanctumkey.com',
|
|
16
|
+
'www.sanctumkey.com',
|
|
17
|
+
'admin.sanctumkey.com',
|
|
18
|
+
'dashboard.sanctumkey.com',
|
|
19
|
+
'preweb.sanctumkey.net',
|
|
20
20
|
// Add other trusted domains here
|
|
21
21
|
],
|
|
22
22
|
enforceHttps: true,
|
|
@@ -59,7 +59,7 @@ export const isDomainAllowed = (domain: string): boolean => {
|
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// Subdomain match (e.g., app.
|
|
62
|
+
// Subdomain match (e.g., app.SanctumKey.com matches SanctumKey.com)
|
|
63
63
|
if (domain.endsWith('.' + allowedDomain)) {
|
|
64
64
|
return true;
|
|
65
65
|
}
|
package/src/i18n/README.md
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './SanctumKeySdk.types';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
// Export KYC types
|
|
@@ -8,9 +8,9 @@ export * from './types/KYC.types';
|
|
|
8
8
|
export * from './types/env.types';
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
export { TemplateKYCExample as
|
|
11
|
+
export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
|
|
12
12
|
// Backward compatibility for existing integrations using the typo.
|
|
13
|
-
export { TemplateKYCExample as
|
|
13
|
+
export { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';
|
|
14
14
|
|
|
15
15
|
// Export Template Flow Components
|
|
16
16
|
export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';
|
|
@@ -60,12 +60,18 @@ export class KYCService {
|
|
|
60
60
|
private baseURL: string;
|
|
61
61
|
private apiKey: string;
|
|
62
62
|
// Additional service base URLs (fixed as per current infra)
|
|
63
|
-
private faceServiceURL = 'https://face-infera.sanctumkey.com
|
|
64
|
-
private textExtractionServiceURL = 'https://text-infera.sanctumkey.com
|
|
65
|
-
private mrzServiceURL = 'https://mrz-infera.sanctumkey.com
|
|
66
|
-
private barcodeServiceURL = 'https://kyc-engine.
|
|
63
|
+
private faceServiceURL = 'https://face-infera.sanctumkey.com';
|
|
64
|
+
private textExtractionServiceURL = 'https://text-infera.sanctumkey.com';
|
|
65
|
+
private mrzServiceURL = 'https://mrz-infera.sanctumkey.com';
|
|
66
|
+
private barcodeServiceURL = 'https://kyc-engine.SanctumKey.net:8000';
|
|
67
67
|
private orientationServiceURL = 'http://18.188.180.154:8080';
|
|
68
68
|
|
|
69
|
+
// private faceServiceURL = 'https://kyc-engine.transfergratis.net:8000';
|
|
70
|
+
// private textExtractionServiceURL = 'https://kyc-engine.transfergratis.net:8006';
|
|
71
|
+
// private mrzServiceURL = 'https://kyc-engine.transfergratis.net:8002';
|
|
72
|
+
// private barcodeServiceURL = 'https://kyc-engine.transfergratis.net:8000';
|
|
73
|
+
// private orientationServiceURL = 'http://18.188.180.154:8080';
|
|
74
|
+
|
|
69
75
|
constructor(baseURL: string, apiKey: string) {
|
|
70
76
|
this.baseURL = baseURL;
|
|
71
77
|
this.apiKey = apiKey;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeEventEmitter, Platform } from "react-native";
|
|
2
|
-
import
|
|
2
|
+
import SanctumKeySdkModule from "../../SanctumKeySdkModule";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export interface CameraCaptureResult {
|
|
@@ -23,11 +23,11 @@ export class NativeCameraModule {
|
|
|
23
23
|
*/
|
|
24
24
|
async testModule(): Promise<string> {
|
|
25
25
|
try {
|
|
26
|
-
if (!
|
|
27
|
-
console.warn('
|
|
26
|
+
if (!SanctumKeySdkModule) {
|
|
27
|
+
console.warn('SanctumKeySdk native module not available');
|
|
28
28
|
return 'Module not available';
|
|
29
29
|
}
|
|
30
|
-
return await
|
|
30
|
+
return await SanctumKeySdkModule.testModule();
|
|
31
31
|
} catch (error) {
|
|
32
32
|
console.error('Error testing module:', error);
|
|
33
33
|
return 'Test failed';
|
|
@@ -39,17 +39,17 @@ export class NativeCameraModule {
|
|
|
39
39
|
console.log('Platform:', Platform.OS);
|
|
40
40
|
|
|
41
41
|
// Vérifier que le module natif est disponible
|
|
42
|
-
if (
|
|
43
|
-
console.log('
|
|
42
|
+
if (SanctumKeySdkModule) {
|
|
43
|
+
console.log('SanctumKeySdk module found, creating event emitter');
|
|
44
44
|
try {
|
|
45
|
-
// this.eventEmitter = new NativeEventEmitter(
|
|
45
|
+
// this.eventEmitter = new NativeEventEmitter(SanctumKeySdkModule as unknown as NativeModule);
|
|
46
46
|
console.log('Event emitter created successfully');
|
|
47
47
|
} catch (error) {
|
|
48
48
|
console.error('Error creating event emitter:', error);
|
|
49
49
|
this.eventEmitter = null;
|
|
50
50
|
}
|
|
51
51
|
} else {
|
|
52
|
-
console.warn('
|
|
52
|
+
console.warn('SanctumKeySdk native module not available');
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -60,11 +60,11 @@ export class NativeCameraModule {
|
|
|
60
60
|
console.log('requestCameraPermission');
|
|
61
61
|
|
|
62
62
|
try {
|
|
63
|
-
if (!
|
|
64
|
-
console.warn('
|
|
63
|
+
if (!SanctumKeySdkModule) {
|
|
64
|
+
console.warn('SanctumKeySdk native module not available');
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
|
-
return await
|
|
67
|
+
return await SanctumKeySdkModule.requestCameraPermission();
|
|
68
68
|
} catch (error) {
|
|
69
69
|
console.error('Error requesting camera permission:', error);
|
|
70
70
|
return false;
|
|
@@ -76,8 +76,8 @@ export class NativeCameraModule {
|
|
|
76
76
|
*/
|
|
77
77
|
async openCameraWithInstructions(instructions: string): Promise<CameraCaptureResult> {
|
|
78
78
|
try {
|
|
79
|
-
if (!
|
|
80
|
-
console.warn('
|
|
79
|
+
if (!SanctumKeySdkModule) {
|
|
80
|
+
console.warn('SanctumKeySdk native module not available');
|
|
81
81
|
return {
|
|
82
82
|
success: false,
|
|
83
83
|
error: 'Native module not available'
|
|
@@ -92,7 +92,7 @@ export class NativeCameraModule {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const result = await
|
|
95
|
+
const result = await SanctumKeySdkModule.openCameraWithInstructions(instructions);
|
|
96
96
|
return {
|
|
97
97
|
success: result.success,
|
|
98
98
|
path: result.path
|
|
@@ -111,14 +111,14 @@ export class NativeCameraModule {
|
|
|
111
111
|
*/
|
|
112
112
|
async openFilePicker(allowedTypes: string[] = ['*/*']): Promise<FilePickerResult> {
|
|
113
113
|
try {
|
|
114
|
-
if (!
|
|
115
|
-
console.warn('
|
|
114
|
+
if (!SanctumKeySdkModule) {
|
|
115
|
+
console.warn('SanctumKeySdk native module not available');
|
|
116
116
|
return {
|
|
117
117
|
success: false,
|
|
118
118
|
error: 'Native module not available'
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
const result = await
|
|
121
|
+
const result = await SanctumKeySdkModule.openFilePicker(allowedTypes);
|
|
122
122
|
return {
|
|
123
123
|
success: result.success,
|
|
124
124
|
uri: result.uri,
|
package/src/web/WebKYCEntry.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState, useCallback } from 'react';
|
|
1
|
+
import React, { useEffect, useState, useCallback, JSX } from 'react';
|
|
2
2
|
import { View, Text, StyleSheet, SafeAreaView, ActivityIndicator } from 'react-native';
|
|
3
3
|
// import { TemplateKYCFlow } from '../components/TemplateKYCFlowRefactored';
|
|
4
4
|
// import { KYCTemplate } from '../types/KYC.types';
|
|
@@ -105,12 +105,12 @@ const postWebhook = async (url: string, payload: unknown, timeoutMs: number = 50
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
export function WebKYCEntry({
|
|
109
109
|
onComplete,
|
|
110
110
|
onError,
|
|
111
111
|
onCancel,
|
|
112
112
|
onSessionSave,
|
|
113
|
-
})
|
|
113
|
+
}: WebKYCEntryProps): JSX.Element {
|
|
114
114
|
const { setLocale } = useI18n();
|
|
115
115
|
const [urlParams, setUrlParams] = useState<URLParams>({});
|
|
116
116
|
const [isLoading, setIsLoading] = useState(true);
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/classes
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdk.types.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,eAAe,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC7D,cAAc,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC3D,OAAO,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdk.types.js","sourceRoot":"","sources":["../../src/TransfergratisSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nexport type CameraCaptureEventPayload = {\n instructions?: string;\n status: 'opened' | 'captured';\n path?: string;\n};\n\nexport type FileSelectedEventPayload = {\n uri: string;\n path: string;\n};\n\nexport type ErrorEventPayload = {\n message: string;\n};\n\nexport type TransfergratisSdkModuleEvents = {\n onCameraCapture: (params: CameraCaptureEventPayload) => void;\n onFileSelected: (params: FileSelectedEventPayload) => void;\n onError: (params: ErrorEventPayload) => void;\n};\n\nexport type TransfergratisSdkViewProps = {\n instructions: string;\n showCamera: boolean;\n onCapture?: (event: { nativeEvent: { action: 'capture' | 'retake' } }) => void;\n onError?: (event: { nativeEvent: ErrorEventPayload }) => void;\n style?: StyleProp<ViewStyle>;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAC7B,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAC3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnH;;AAGD,wBAAiF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAcxD,yDAAyD;AACzD,eAAe,mBAAmB,CAA0B,mBAAmB,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\ndeclare class TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI: number;\n testModule(): Promise<string>;\n requestCameraPermission(): Promise<boolean>;\n openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }>;\n openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }>;\n}\n\n// This call loads the native module object from the JSI.\nexport default requireNativeModule<TransfergratisSdkModule>('TransfergratisSdk');\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E,cAAM,uBAAwB,SAAQ,YAAY,CAAC,6BAA6B,CAAC;IAC/E,EAAE,SAAW;IAEP,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAK3C,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ9G,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAOzH;;AAED,wBAAqF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkModule.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,uBAAwB,SAAQ,YAA2C;IAC/E,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAEb,KAAK,CAAC,uBAAuB;QAC3B,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,0BAA0B,CAAC,YAAoB;QACnD,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sCAAsC;SAC9C,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,YAAsB;QACzC,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,2CAA2C;SACnD,CAAC;IACJ,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import { registerWebModule } from 'expo-modules-core';\nimport { NativeModule } from 'expo';\n\nimport { TransfergratisSdkModuleEvents } from './TransfergratisSdk.types';\n\nclass TransfergratisSdkModule extends NativeModule<TransfergratisSdkModuleEvents> {\n PI = Math.PI;\n \n async requestCameraPermission(): Promise<boolean> {\n console.warn('Camera permission not available on web');\n return false;\n }\n \n async openCameraWithInstructions(instructions: string): Promise<{ success: boolean; path?: string; error?: string }> {\n console.warn('Camera not available on web');\n return {\n success: false,\n error: 'Camera not available on web platform'\n };\n }\n \n async openFilePicker(allowedTypes: string[]): Promise<{ success: boolean; uri?: string; path?: string; error?: string }> {\n console.warn('File picker not available on web');\n return {\n success: false,\n error: 'File picker not available on web platform'\n };\n }\n}\n\nexport default registerWebModule(TransfergratisSdkModule, 'TransfergratisSdkModule');\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAKvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAE9E"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
const NativeView = requireNativeView('TransfergratisSdk');
|
|
4
|
-
export default function TransfergratisSdkView(props) {
|
|
5
|
-
return <NativeView {...props}/>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=TransfergratisSdkView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GACd,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nconst NativeView: React.ComponentType<TransfergratisSdkViewProps> =\n requireNativeView('TransfergratisSdk');\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return <NativeView {...props} />;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.web.d.ts","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAU9E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TransfergratisSdkView.web.js","sourceRoot":"","sources":["../../src/TransfergratisSdkView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAiC;IAC7E,OAAO,CACL,CAAC,GAAG,CACF;MAAA,CAAC;;;;aAII,CACP;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { TransfergratisSdkViewProps } from './TransfergratisSdk.types';\n\nexport default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {\n return (\n <div>\n {/* <iframe\n style={{ flex: 1 }}\n src={props.url}\n onLoad={() => props.onLoad({ nativeEvent: { url: props.url } })}\n /> */}\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
import { TransfergratisSdkViewProps } from './TransfergratisSdk.types';
|
|
5
|
-
|
|
6
|
-
const NativeView: React.ComponentType<TransfergratisSdkViewProps> =
|
|
7
|
-
requireNativeView('TransfergratisSdk');
|
|
8
|
-
|
|
9
|
-
export default function TransfergratisSdkView(props: TransfergratisSdkViewProps) {
|
|
10
|
-
return <NativeView {...props} />;
|
|
11
|
-
}
|
|
File without changes
|