@finos_sdk/sdk-ekyc 0.0.31 → 0.0.33

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.
Files changed (56) hide show
  1. package/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +1 -1
  2. package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +1 -1
  3. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-javadoc.jar +0 -0
  4. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0-sources.jar +0 -0
  5. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.aar +0 -0
  6. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.module +151 -0
  7. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.0/ekycui-1.2.0.pom +43 -0
  8. package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +13 -0
  9. package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +1 -1
  10. package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +1 -1
  11. package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +1 -1
  12. package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +1 -1
  13. package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +1 -1
  14. package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +1 -1
  15. package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +1 -1
  16. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-javadoc.jar +0 -0
  17. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0-sources.jar +0 -0
  18. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.aar +0 -0
  19. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.module +228 -0
  20. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.0/sdkui-1.2.0.pom +103 -0
  21. package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +13 -0
  22. package/android/src/main/build/generated/source/buildConfig/debug/com/sdkekycrn/BuildConfig.java +10 -0
  23. package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  24. package/android/src/main/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  25. package/android/src/main/build/intermediates/aar_main_jar/debug/syncDebugLibJars/classes.jar +0 -0
  26. package/android/src/main/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  27. package/android/src/main/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  28. package/android/src/main/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  29. package/android/src/main/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  30. package/android/src/main/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  31. package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  32. package/android/src/main/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  33. package/android/src/main/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  34. package/android/src/main/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  35. package/android/src/main/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  36. package/android/src/main/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  37. package/android/src/main/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/sdkekycrn/BuildConfig.class +0 -0
  38. package/android/src/main/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  39. package/android/src/main/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  40. package/android/src/main/build/intermediates/merged_java_res/debug/mergeDebugJavaResource/feature-main.jar +0 -0
  41. package/android/src/main/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  42. package/android/src/main/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  43. package/android/src/main/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  44. package/android/src/main/build/outputs/aar/main-debug.aar +0 -0
  45. package/android/src/main/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  46. package/android/src/main/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  47. package/dist/App.js +481 -12
  48. package/dist/EKYCModule.d.ts +60 -0
  49. package/dist/EKYCModule.js +140 -9
  50. package/dist/index.d.ts +4 -1
  51. package/dist/index.js +7 -2
  52. package/dist/src/modules/FinosEKYCModule.d.ts +206 -0
  53. package/dist/src/modules/FinosEKYCModule.js +352 -0
  54. package/package.json +2 -2
  55. package/src/modules/FinosEKYCModule.ts +450 -0
  56. package/src/modules/README.md +347 -0
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.sdkekycrn",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/debug/jniLibs"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/debug/shaders"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
@@ -0,0 +1,7 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.sdkekycrn" >
4
+ 4
5
+ 5 <uses-sdk android:minSdkVersion="24" />
6
+ 6
7
+ 7</manifest>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.sdkekycrn" >
4
+
5
+ <uses-sdk android:minSdkVersion="24" />
6
+
7
+ </manifest>
@@ -0,0 +1,16 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml:2:13-83
4
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml:2:13-83
5
+ package
6
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml
7
+ xmlns:android
8
+ ADDED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml:2:23-81
9
+ uses-sdk
10
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml reason: use-sdk injection requested
11
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml
12
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml
13
+ android:targetSdkVersion
14
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml
15
+ android:minSdkVersion
16
+ INJECTED from /Volumes/Data/Work/GalaxyHolding/SDK_RN/finos.ekyc.sdk.reactnative/android/src/main/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest13369881532742005821.xml
package/dist/App.js CHANGED
@@ -1,28 +1,497 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
4
24
  };
5
25
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
26
+ const react_1 = __importStar(require("react"));
7
27
  const react_native_1 = require("react-native");
8
- const TestNativeModules_1 = __importDefault(require("./TestNativeModules"));
28
+ const FinosEKYCModule_1 = require("./src/modules/FinosEKYCModule");
29
+ // AppKey configuration from MainActivity.kt
30
+ const AppKey = {
31
+ appKey: "988dda47-df13-4505-9f3e-ea2557f1072a",
32
+ appKeyNfc: "c060f716-8961-4834-9d8e-ba346b2015a2",
33
+ appKeyC06: "835327b6-3b4c-4bbe-8fe0-f49a350bcc82",
34
+ appKeyOcr: "524c7b87-eaf2-41de-9c0a-efd7a1a2b294",
35
+ appKeyLiveness: "8228768f-49b9-4942-a594-8067dc82d753",
36
+ appKeyFaceService: "e6574f35-3c47-4fb6-9684-9a75b5430817"
37
+ };
9
38
  const App = () => {
10
- return (<react_native_1.View style={styles.container}>
11
- <react_native_1.Text style={styles.title}>EKYC Module Test</react_native_1.Text>
12
- <TestNativeModules_1.default />
13
- </react_native_1.View>);
39
+ const [appKey, setAppKey] = (0, react_1.useState)(AppKey.appKey);
40
+ const [transactionId, setTransactionId] = (0, react_1.useState)('test-transaction-123');
41
+ const [isLoading, setIsLoading] = (0, react_1.useState)(false);
42
+ const [currentLanguage, setCurrentLanguage] = (0, react_1.useState)('vi');
43
+ const [step1, setStep1] = (0, react_1.useState)('OCR');
44
+ const [step2, setStep2] = (0, react_1.useState)('NFC');
45
+ const [step3, setStep3] = (0, react_1.useState)('LIVENESS');
46
+ // OptionConfig settings
47
+ const [maxRetry, setMaxRetry] = (0, react_1.useState)(3);
48
+ const showAlert = (title, message) => {
49
+ react_native_1.Alert.alert(title, message);
50
+ };
51
+ const showToast = (message) => {
52
+ react_native_1.Alert.alert('Info', message);
53
+ };
54
+ const handleInitSDK = async () => {
55
+ try {
56
+ setIsLoading(true);
57
+ const result = await FinosEKYCModule_1.FinosEKYC.initialize();
58
+ const sdkInfo = await FinosEKYCModule_1.FinosEKYC.getSDKInfo();
59
+ showAlert('SDK Initialized', `Result: ${result}\nVersion: ${sdkInfo.version}\nPlatform: ${sdkInfo.platform}`);
60
+ }
61
+ catch (error) {
62
+ showAlert('SDK Init Error', `Error: ${error}`);
63
+ }
64
+ finally {
65
+ setIsLoading(false);
66
+ }
67
+ };
68
+ // Main flow button (like MainActivity.kt btnMain)
69
+ const handleMainFlow = async () => {
70
+ try {
71
+ setIsLoading(true);
72
+ const selected = [step1, step2, step3];
73
+ // Map to SDKType like MainActivity.kt startWithFlow
74
+ const flow = selected.filter((sdkType) => sdkType === 'OCR' || sdkType === 'NFC' || sdkType === 'LIVENESS');
75
+ // Use default flow if empty like MainActivity.kt
76
+ const finalFlow = flow.length > 0 ? flow : ['OCR', 'NFC', 'LIVENESS'];
77
+ console.log('Starting eKYC Flow (startWithFlow):', {
78
+ selected: selected,
79
+ flow: flow,
80
+ finalFlow: finalFlow,
81
+ language: currentLanguage,
82
+ transactionId: transactionId,
83
+ appKey: AppKey.appKey,
84
+ optionConfig: {
85
+ countMaxRetry: maxRetry,
86
+ }
87
+ });
88
+ // Call the actual SdkEkycUI.startEkyc
89
+ const result = await FinosEKYCModule_1.FinosEKYC.startEkycUI(AppKey.appKey, finalFlow, currentLanguage, transactionId, {
90
+ appKey: AppKey.appKey,
91
+ appKeyNfc: AppKey.appKeyNfc,
92
+ appKeyOcr: AppKey.appKeyOcr,
93
+ appKeyLiveness: AppKey.appKeyLiveness,
94
+ appKeyC06: AppKey.appKeyC06,
95
+ appKeyFaceService: AppKey.appKeyFaceService,
96
+ }, {
97
+ countMaxRetry: maxRetry,
98
+ }, {
99
+ textSize: 14,
100
+ textFont: "",
101
+ textColor: 0xff000000,
102
+ statusBarBackground: 0,
103
+ backIcon: 0,
104
+ toolbarStyle: {
105
+ textSize: 26,
106
+ textColor: 0xff007AFF, // Custom blue color
107
+ },
108
+ titleStyle: {
109
+ textSize: 26,
110
+ textColor: 0xff34C759, // Custom green color
111
+ },
112
+ instructionStyle: {
113
+ textSize: 24,
114
+ textColor: 0xffFF6B35, // Custom orange color
115
+ },
116
+ });
117
+ showAlert('eKYC UI Started (startWithFlow)', `eKYC UI has been started successfully!\n\n` +
118
+ `Selected: ${selected.join(' → ')}\n` +
119
+ `Final Flow: ${finalFlow.join(' → ')}\n` +
120
+ `Language: ${currentLanguage === 'vi' ? 'Vietnamese' : 'English'}\n` +
121
+ `Transaction ID: ${transactionId}\n\n` +
122
+ `Option Config Applied:\n` +
123
+ `• countMaxRetry: ${maxRetry}\n\n` +
124
+ `Style Config Applied:\n` +
125
+ `• Status Bar: Vikki background\n` +
126
+ `• Back Icon: SDK close icon\n` +
127
+ `• Toolbar: 26sp, Accent color\n` +
128
+ `• Title: 26sp, Gradient color\n` +
129
+ `• Instruction: 24sp, Primary color\n` +
130
+ `• App ID Type: VIKKI\n\n` +
131
+ `Result: ${JSON.stringify(result, null, 2)}`);
132
+ }
133
+ catch (error) {
134
+ showAlert('Flow Error', `Error: ${error}`);
135
+ }
136
+ finally {
137
+ setIsLoading(false);
138
+ }
139
+ };
140
+ const Button = ({ title, onPress, color = '#007AFF' }) => (<react_native_1.TouchableOpacity style={[styles.button, { backgroundColor: color }]} onPress={onPress} disabled={isLoading}>
141
+ <react_native_1.Text style={styles.buttonText}>{title}</react_native_1.Text>
142
+ </react_native_1.TouchableOpacity>);
143
+ return (<react_native_1.SafeAreaView style={styles.container}>
144
+ <react_native_1.ScrollView style={styles.scrollView} contentContainerStyle={styles.content}>
145
+ <react_native_1.Text style={styles.title}>🚀 Finos eKYC SDK v0.0.31</react_native_1.Text>
146
+
147
+ {/* App Key Configuration */}
148
+ <react_native_1.View style={styles.inputContainer}>
149
+ <react_native_1.Text style={styles.label}>Main App Key:</react_native_1.Text>
150
+ <react_native_1.TextInput style={[styles.input, styles.appKeyInput]} value={appKey} onChangeText={setAppKey} placeholder="Main app key" editable={false}/>
151
+ <react_native_1.Text style={styles.appKeyNote}>
152
+ 📝 Using specific app keys for each SDK type:
153
+ {'\n'}• OCR: {AppKey.appKeyOcr.substring(0, 8)}...
154
+ {'\n'}• NFC: {AppKey.appKeyNfc.substring(0, 8)}...
155
+ {'\n'}• Liveness: {AppKey.appKeyLiveness.substring(0, 8)}...
156
+ </react_native_1.Text>
157
+ </react_native_1.View>
158
+
159
+ <react_native_1.View style={styles.inputContainer}>
160
+ <react_native_1.Text style={styles.label}>Transaction ID:</react_native_1.Text>
161
+ <react_native_1.TextInput style={styles.input} value={transactionId} onChangeText={setTransactionId} placeholder="Enter transaction ID"/>
162
+ </react_native_1.View>
163
+
164
+ {/* Language Selection (like MainActivity.kt) */}
165
+ <react_native_1.Text style={styles.sectionTitle}>🌐 Language Selection</react_native_1.Text>
166
+ <react_native_1.View style={styles.radioGroup}>
167
+ <react_native_1.TouchableOpacity style={[styles.radioButton, currentLanguage === 'vi' && styles.radioButtonSelected]} onPress={() => setCurrentLanguage('vi')}>
168
+ <react_native_1.Text style={[styles.radioText, currentLanguage === 'vi' && styles.radioTextSelected]}>
169
+ 🇻🇳 Vietnamese
170
+ </react_native_1.Text>
171
+ </react_native_1.TouchableOpacity>
172
+ <react_native_1.TouchableOpacity style={[styles.radioButton, currentLanguage === 'en' && styles.radioButtonSelected]} onPress={() => setCurrentLanguage('en')}>
173
+ <react_native_1.Text style={[styles.radioText, currentLanguage === 'en' && styles.radioTextSelected]}>
174
+ 🇺🇸 English
175
+ </react_native_1.Text>
176
+ </react_native_1.TouchableOpacity>
177
+ </react_native_1.View>
178
+
179
+ {/* SDK Control */}
180
+ <react_native_1.Text style={styles.sectionTitle}>🔧 SDK Control</react_native_1.Text>
181
+ <Button title="Initialize SDK" onPress={handleInitSDK} color="#34C759"/>
182
+
183
+
184
+ {/* OptionConfig Settings */}
185
+ <react_native_1.Text style={styles.sectionTitle}>⚙️ Option Configuration</react_native_1.Text>
186
+
187
+ <react_native_1.View style={styles.optionContainer}>
188
+ <react_native_1.Text style={styles.optionLabel}>Max Retry:</react_native_1.Text>
189
+ <react_native_1.View style={styles.optionRow}>
190
+ {[1, 2, 3, 4, 5].map(num => (<react_native_1.TouchableOpacity key={num} style={[styles.optionButton, maxRetry === num && styles.optionButtonSelected]} onPress={() => setMaxRetry(num)}>
191
+ <react_native_1.Text style={[styles.optionButtonText, maxRetry === num && styles.optionButtonTextSelected]}>
192
+ {num}
193
+ </react_native_1.Text>
194
+ </react_native_1.TouchableOpacity>))}
195
+ </react_native_1.View>
196
+ </react_native_1.View>
197
+
198
+ {/* Flow Configuration (like MainActivity.kt spinners) */}
199
+ <react_native_1.Text style={styles.sectionTitle}>🔄 Flow Configuration</react_native_1.Text>
200
+
201
+ <react_native_1.View style={styles.flowContainer}>
202
+ <react_native_1.Text style={styles.flowLabel}>Step 1:</react_native_1.Text>
203
+ <react_native_1.View style={styles.pickerContainer}>
204
+ <react_native_1.Text style={styles.pickerText}>{step1}</react_native_1.Text>
205
+ <react_native_1.TouchableOpacity style={styles.pickerButton} onPress={() => {
206
+ const options = ['OCR', 'NFC', 'LIVENESS'];
207
+ const currentIndex = options.indexOf(step1);
208
+ const nextIndex = (currentIndex + 1) % options.length;
209
+ setStep1(options[nextIndex]);
210
+ }}>
211
+ <react_native_1.Text style={styles.pickerButtonText}>▼</react_native_1.Text>
212
+ </react_native_1.TouchableOpacity>
213
+ </react_native_1.View>
214
+ </react_native_1.View>
215
+
216
+ <react_native_1.View style={styles.flowContainer}>
217
+ <react_native_1.Text style={styles.flowLabel}>Step 2:</react_native_1.Text>
218
+ <react_native_1.View style={styles.pickerContainer}>
219
+ <react_native_1.Text style={styles.pickerText}>{step2}</react_native_1.Text>
220
+ <react_native_1.TouchableOpacity style={styles.pickerButton} onPress={() => {
221
+ const options = ['OCR', 'NFC', 'LIVENESS'];
222
+ const currentIndex = options.indexOf(step2);
223
+ const nextIndex = (currentIndex + 1) % options.length;
224
+ setStep2(options[nextIndex]);
225
+ }}>
226
+ <react_native_1.Text style={styles.pickerButtonText}>▼</react_native_1.Text>
227
+ </react_native_1.TouchableOpacity>
228
+ </react_native_1.View>
229
+ </react_native_1.View>
230
+
231
+ <react_native_1.View style={styles.flowContainer}>
232
+ <react_native_1.Text style={styles.flowLabel}>Step 3:</react_native_1.Text>
233
+ <react_native_1.View style={styles.pickerContainer}>
234
+ <react_native_1.Text style={styles.pickerText}>{step3}</react_native_1.Text>
235
+ <react_native_1.TouchableOpacity style={styles.pickerButton} onPress={() => {
236
+ const options = ['OCR', 'NFC', 'LIVENESS'];
237
+ const currentIndex = options.indexOf(step3);
238
+ const nextIndex = (currentIndex + 1) % options.length;
239
+ setStep3(options[nextIndex]);
240
+ }}>
241
+ <react_native_1.Text style={styles.pickerButtonText}>▼</react_native_1.Text>
242
+ </react_native_1.TouchableOpacity>
243
+ </react_native_1.View>
244
+ </react_native_1.View>
245
+
246
+ {/* Main Flow Button (like MainActivity.kt btnMain) */}
247
+ <Button title={`🚀 Start Flow: ${step1} → ${step2} → ${step3}`} onPress={handleMainFlow} color="#FF6B35"/>
248
+
249
+ {/* Status */}
250
+ <react_native_1.Text style={styles.sectionTitle}>📊 Status</react_native_1.Text>
251
+ <react_native_1.View style={styles.statusContainer}>
252
+ <react_native_1.Text style={styles.statusText}>
253
+ {isLoading ? '⏳ Processing...' : '✅ Ready'}
254
+ </react_native_1.Text>
255
+ <react_native_1.Text style={styles.statusSubText}>
256
+ Language: {currentLanguage === 'vi' ? 'Vietnamese' : 'English'}
257
+ </react_native_1.Text>
258
+ </react_native_1.View>
259
+
260
+ <react_native_1.Text style={styles.footer}>
261
+ 💡 Tap individual buttons for single SDK type{'\n'}
262
+ 🔄 Use flow configuration for multi-step process{'\n'}
263
+ 📱 Make sure device has NFC capability for NFC tests
264
+ </react_native_1.Text>
265
+ </react_native_1.ScrollView>
266
+ </react_native_1.SafeAreaView>);
14
267
  };
15
268
  const styles = react_native_1.StyleSheet.create({
16
269
  container: {
17
270
  flex: 1,
18
- backgroundColor: '#fff',
271
+ backgroundColor: '#f5f5f5',
272
+ },
273
+ scrollView: {
274
+ flex: 1,
275
+ },
276
+ content: {
277
+ padding: 20,
19
278
  },
20
279
  title: {
21
- fontSize: 20,
280
+ fontSize: 24,
22
281
  fontWeight: 'bold',
23
282
  textAlign: 'center',
24
- padding: 20,
25
- backgroundColor: '#f0f0f0',
283
+ marginBottom: 30,
284
+ color: '#333',
285
+ },
286
+ inputContainer: {
287
+ marginBottom: 20,
288
+ },
289
+ label: {
290
+ fontSize: 16,
291
+ fontWeight: '600',
292
+ marginBottom: 8,
293
+ color: '#333',
294
+ },
295
+ input: {
296
+ borderWidth: 1,
297
+ borderColor: '#ddd',
298
+ borderRadius: 8,
299
+ padding: 12,
300
+ fontSize: 16,
301
+ backgroundColor: '#fff',
302
+ },
303
+ appKeyInput: {
304
+ backgroundColor: '#f8f9fa',
305
+ color: '#666',
306
+ },
307
+ appKeyNote: {
308
+ fontSize: 12,
309
+ color: '#666',
310
+ marginTop: 8,
311
+ lineHeight: 16,
312
+ },
313
+ sectionTitle: {
314
+ fontSize: 18,
315
+ fontWeight: 'bold',
316
+ marginTop: 20,
317
+ marginBottom: 15,
318
+ color: '#333',
319
+ },
320
+ // Language Selection Styles
321
+ radioGroup: {
322
+ flexDirection: 'row',
323
+ justifyContent: 'space-around',
324
+ marginBottom: 20,
325
+ },
326
+ radioButton: {
327
+ padding: 12,
328
+ borderRadius: 8,
329
+ borderWidth: 2,
330
+ borderColor: '#ddd',
331
+ backgroundColor: '#fff',
332
+ minWidth: 120,
333
+ alignItems: 'center',
334
+ },
335
+ radioButtonSelected: {
336
+ borderColor: '#007AFF',
337
+ backgroundColor: '#E3F2FD',
338
+ },
339
+ radioText: {
340
+ fontSize: 16,
341
+ fontWeight: '500',
342
+ color: '#666',
343
+ },
344
+ radioTextSelected: {
345
+ color: '#007AFF',
346
+ fontWeight: '600',
347
+ },
348
+ // Flow Configuration Styles
349
+ flowContainer: {
350
+ flexDirection: 'row',
351
+ alignItems: 'center',
352
+ marginBottom: 15,
353
+ backgroundColor: '#fff',
354
+ padding: 15,
355
+ borderRadius: 10,
356
+ shadowColor: '#000',
357
+ shadowOffset: {
358
+ width: 0,
359
+ height: 1,
360
+ },
361
+ shadowOpacity: 0.1,
362
+ shadowRadius: 2,
363
+ elevation: 2,
364
+ },
365
+ flowLabel: {
366
+ fontSize: 16,
367
+ fontWeight: '600',
368
+ color: '#333',
369
+ minWidth: 60,
370
+ },
371
+ pickerContainer: {
372
+ flex: 1,
373
+ flexDirection: 'row',
374
+ alignItems: 'center',
375
+ justifyContent: 'space-between',
376
+ marginLeft: 15,
377
+ },
378
+ pickerText: {
379
+ fontSize: 16,
380
+ fontWeight: '500',
381
+ color: '#333',
382
+ flex: 1,
383
+ },
384
+ pickerButton: {
385
+ backgroundColor: '#007AFF',
386
+ borderRadius: 6,
387
+ paddingHorizontal: 12,
388
+ paddingVertical: 6,
389
+ marginLeft: 10,
390
+ },
391
+ pickerButtonText: {
392
+ color: '#fff',
393
+ fontSize: 14,
394
+ fontWeight: '600',
395
+ },
396
+ button: {
397
+ padding: 15,
398
+ borderRadius: 10,
399
+ marginBottom: 10,
400
+ alignItems: 'center',
401
+ shadowColor: '#000',
402
+ shadowOffset: {
403
+ width: 0,
404
+ height: 2,
405
+ },
406
+ shadowOpacity: 0.1,
407
+ shadowRadius: 3,
408
+ elevation: 3,
409
+ },
410
+ buttonText: {
411
+ color: '#fff',
412
+ fontSize: 16,
413
+ fontWeight: '600',
414
+ },
415
+ statusContainer: {
416
+ backgroundColor: '#fff',
417
+ padding: 15,
418
+ borderRadius: 10,
419
+ alignItems: 'center',
420
+ marginBottom: 20,
421
+ shadowColor: '#000',
422
+ shadowOffset: {
423
+ width: 0,
424
+ height: 1,
425
+ },
426
+ shadowOpacity: 0.1,
427
+ shadowRadius: 2,
428
+ elevation: 2,
429
+ },
430
+ statusText: {
431
+ fontSize: 16,
432
+ fontWeight: '600',
433
+ color: '#333',
434
+ marginBottom: 5,
435
+ },
436
+ statusSubText: {
437
+ fontSize: 14,
438
+ color: '#666',
439
+ },
440
+ // OptionConfig Styles
441
+ optionContainer: {
442
+ flexDirection: 'row',
443
+ alignItems: 'center',
444
+ justifyContent: 'space-between',
445
+ marginBottom: 15,
446
+ backgroundColor: '#fff',
447
+ padding: 15,
448
+ borderRadius: 10,
449
+ shadowColor: '#000',
450
+ shadowOffset: {
451
+ width: 0,
452
+ height: 1,
453
+ },
454
+ shadowOpacity: 0.1,
455
+ shadowRadius: 2,
456
+ elevation: 2,
457
+ },
458
+ optionLabel: {
459
+ fontSize: 16,
460
+ fontWeight: '600',
461
+ color: '#333',
462
+ flex: 1,
463
+ },
464
+ optionRow: {
465
+ flexDirection: 'row',
466
+ gap: 8,
467
+ },
468
+ optionButton: {
469
+ paddingHorizontal: 12,
470
+ paddingVertical: 6,
471
+ borderRadius: 6,
472
+ borderWidth: 1,
473
+ borderColor: '#ddd',
474
+ backgroundColor: '#fff',
475
+ },
476
+ optionButtonSelected: {
477
+ backgroundColor: '#007AFF',
478
+ borderColor: '#007AFF',
479
+ },
480
+ optionButtonText: {
481
+ fontSize: 14,
482
+ fontWeight: '500',
483
+ color: '#666',
484
+ },
485
+ optionButtonTextSelected: {
486
+ color: '#fff',
487
+ fontWeight: '600',
488
+ },
489
+ footer: {
490
+ fontSize: 14,
491
+ color: '#666',
492
+ textAlign: 'center',
493
+ marginTop: 20,
494
+ lineHeight: 20,
26
495
  },
27
496
  });
28
497
  exports.default = App;