@finos_sdk/sdk-ekyc 1.2.2 → 1.2.9
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/LICENSE +13 -10
- package/README.md +41 -42
- package/android/build.gradle +42 -11
- package/android/gradle.properties +7 -1
- package/android/settings.gradle +53 -0
- package/android/src/main/java/finos/sdk/ekyc/EKYCModule.kt +791 -81
- package/dist/EKYCModule.d.ts +73 -0
- package/dist/EKYCModule.js +663 -71
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -1
- package/dist/package.json +31 -21
- package/dist/src/modules/FinosEKYCModule.d.ts +149 -0
- package/dist/src/modules/FinosEKYCModule.js +485 -2
- package/dist/src/modules/FinosESignModule.d.ts +270 -0
- package/dist/src/modules/FinosESignModule.js +752 -0
- package/dist/src/types/ekycESignType.d.ts +67 -0
- package/dist/src/types/ekycESignType.js +2 -0
- package/dist/src/types/ekycSmsOtpType.d.ts +52 -0
- package/dist/src/types/ekycSmsOtpType.js +2 -0
- package/package.json +31 -21
- package/src/modules/FinosEKYCModule.ts +572 -2
- package/src/modules/FinosESignModule.ts +919 -0
- package/src/modules/README.md +3 -3
- package/src/types/ekycESignType.ts +76 -0
- package/src/types/ekycSmsOtpType.ts +59 -0
- package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.module +0 -110
- package/android/SDKeKYC/finos/sdk/ekyc/c06/1.2.2/c06-1.2.2.pom +0 -37
- package/android/SDKeKYC/finos/sdk/ekyc/c06/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.module +0 -201
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/1.2.2/ekyc-1.2.2.pom +0 -73
- package/android/SDKeKYC/finos/sdk/ekyc/ekyc/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.module +0 -131
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/1.2.2/ekycui-1.2.2.pom +0 -43
- package/android/SDKeKYC/finos/sdk/ekyc/ekycui/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.module +0 -110
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/1.2.2/faceservice-1.2.2.pom +0 -37
- package/android/SDKeKYC/finos/sdk/ekyc/faceservice/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.module +0 -138
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/1.2.2/liveness-1.2.2.pom +0 -55
- package/android/SDKeKYC/finos/sdk/ekyc/liveness/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.module +0 -131
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/1.2.2/nfc-1.2.2.pom +0 -55
- package/android/SDKeKYC/finos/sdk/ekyc/nfc/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.module +0 -124
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/1.2.2/ocr-1.2.2.pom +0 -43
- package/android/SDKeKYC/finos/sdk/ekyc/ocr/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.module +0 -138
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/1.2.2/qrcode-1.2.2.pom +0 -55
- package/android/SDKeKYC/finos/sdk/ekyc/qrcode/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.module +0 -341
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/1.2.2/sdkcore-1.2.2.pom +0 -139
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcore/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.module +0 -201
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/1.2.2/sdkcorecamera-1.2.2.pom +0 -85
- package/android/SDKeKYC/finos/sdk/ekyc/sdkcorecamera/maven-metadata-local.xml +0 -13
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2-sources.jar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.aar +0 -0
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.module +0 -208
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/1.2.2/sdkui-1.2.2.pom +0 -103
- package/android/SDKeKYC/finos/sdk/ekyc/sdkui/maven-metadata-local.xml +0 -13
- package/android/src/main/AndroidManifest.xml +0 -22
- package/android/src/main/build.gradle +0 -31
- package/dist/App.d.ts +0 -3
- package/dist/App.js +0 -497
- package/dist/finos_sdk-sdk-ekyc-1.2.2.tgz +0 -0
package/dist/App.js
DELETED
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const react_1 = __importStar(require("react"));
|
|
27
|
-
const react_native_1 = require("react-native");
|
|
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
|
-
};
|
|
38
|
-
const App = () => {
|
|
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>);
|
|
267
|
-
};
|
|
268
|
-
const styles = react_native_1.StyleSheet.create({
|
|
269
|
-
container: {
|
|
270
|
-
flex: 1,
|
|
271
|
-
backgroundColor: '#f5f5f5',
|
|
272
|
-
},
|
|
273
|
-
scrollView: {
|
|
274
|
-
flex: 1,
|
|
275
|
-
},
|
|
276
|
-
content: {
|
|
277
|
-
padding: 20,
|
|
278
|
-
},
|
|
279
|
-
title: {
|
|
280
|
-
fontSize: 24,
|
|
281
|
-
fontWeight: 'bold',
|
|
282
|
-
textAlign: 'center',
|
|
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,
|
|
495
|
-
},
|
|
496
|
-
});
|
|
497
|
-
exports.default = App;
|
|
Binary file
|