@transfergratis/react-native-sdk 0.1.4 → 0.1.6
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/build/api/axios.d.ts +30 -0
- package/build/api/axios.d.ts.map +1 -0
- package/build/api/axios.js +92 -0
- package/build/api/axios.js.map +1 -0
- package/build/components/EnhancedCameraView.d.ts +1 -41
- package/build/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.js +75 -34
- package/build/components/EnhancedCameraView.js.map +1 -1
- package/build/components/EnhancedCameraView.web.d.ts +1 -41
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.web.js +28 -4
- package/build/components/EnhancedCameraView.web.js.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts +2 -2
- package/build/components/KYCElements/CountrySelectionTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/CountrySelectionTemplate.js +77 -114
- package/build/components/KYCElements/CountrySelectionTemplate.js.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/FileUploadTemplate.js +7 -3
- package/build/components/KYCElements/FileUploadTemplate.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts +7 -2
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +253 -104
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/InitializationStep.d.ts +5 -0
- package/build/components/KYCElements/InitializationStep.d.ts.map +1 -0
- package/build/components/KYCElements/InitializationStep.js +41 -0
- package/build/components/KYCElements/InitializationStep.js.map +1 -0
- package/build/components/KYCElements/LocationCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/LocationCaptureTemplate.js +15 -13
- package/build/components/KYCElements/LocationCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCapture.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCapture.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureEnhanced.js.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts +2 -2
- package/build/components/KYCElements/OrientationVideoCaptureFinal.d.ts.map +1 -1
- package/build/components/KYCElements/OrientationVideoCaptureFinal.js.map +1 -1
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts +12 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js +171 -0
- package/build/components/KYCElements/ReviewSubmitTemplate.js.map +1 -0
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts +6 -2
- package/build/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/SelfieCaptureTemplate.js +137 -38
- package/build/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts +12 -0
- package/build/components/KYCElements/VerificationProgressTemplate.d.ts.map +1 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js +194 -0
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -0
- package/build/components/OverLay/IdCard.d.ts +1 -1
- package/build/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/components/OverLay/IdCard.js +10 -6
- package/build/components/OverLay/IdCard.js.map +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts +1 -1
- package/build/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/components/OverLay/SelfieOverlay.js +5 -4
- package/build/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/components/OverLay/type.d.ts +71 -1
- package/build/components/OverLay/type.d.ts.map +1 -1
- package/build/components/OverLay/type.js.map +1 -1
- package/build/components/TemplateKYCExample.d.ts +4 -1
- package/build/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/components/TemplateKYCExample.js +74 -199
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts +3 -2
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.js +64 -40
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/components/example/OrientationVideoExample.d.ts.map +1 -1
- package/build/components/example/OrientationVideoExample.js +1 -5
- package/build/components/example/OrientationVideoExample.js.map +1 -1
- package/build/config/countriesData.d.ts +3 -0
- package/build/config/countriesData.d.ts.map +1 -0
- package/build/config/countriesData.js +79 -0
- package/build/config/countriesData.js.map +1 -0
- package/build/config/region_mapping.d.ts +3 -0
- package/build/config/region_mapping.d.ts.map +1 -0
- package/build/config/region_mapping.js +687 -0
- package/build/config/region_mapping.js.map +1 -0
- package/build/hooks/useI18n.d.ts +11 -0
- package/build/hooks/useI18n.d.ts.map +1 -0
- package/build/hooks/useI18n.js +37 -0
- package/build/hooks/useI18n.js.map +1 -0
- package/build/hooks/useOrientationVideo.d.ts +1 -2
- package/build/hooks/useOrientationVideo.d.ts.map +1 -1
- package/build/hooks/useOrientationVideo.js +2 -1
- package/build/hooks/useOrientationVideo.js.map +1 -1
- package/build/hooks/useRealtimeVerifier.d.ts +28 -0
- package/build/hooks/useRealtimeVerifier.d.ts.map +1 -0
- package/build/hooks/useRealtimeVerifier.js +91 -0
- package/build/hooks/useRealtimeVerifier.js.map +1 -0
- package/build/hooks/useTemplateKYCFlow.d.ts +6 -3
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +356 -42
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +168 -0
- package/build/i18n/en/index.d.ts.map +1 -0
- package/build/i18n/en/index.js +195 -0
- package/build/i18n/en/index.js.map +1 -0
- package/build/i18n/fr/index.d.ts +168 -0
- package/build/i18n/fr/index.d.ts.map +1 -0
- package/build/i18n/fr/index.js +194 -0
- package/build/i18n/fr/index.js.map +1 -0
- package/build/i18n/index.d.ts +10 -0
- package/build/i18n/index.d.ts.map +1 -0
- package/build/i18n/index.js +56 -0
- package/build/i18n/index.js.map +1 -0
- package/build/i18n/types.d.ts +153 -0
- package/build/i18n/types.d.ts.map +1 -0
- package/build/i18n/types.js +3 -0
- package/build/i18n/types.js.map +1 -0
- package/build/i18n/usage-example.d.ts +4 -0
- package/build/i18n/usage-example.d.ts.map +1 -0
- package/build/i18n/usage-example.js +189 -0
- package/build/i18n/usage-example.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/modules/api/CardAuthentification.d.ts +22 -0
- package/build/modules/api/CardAuthentification.d.ts.map +1 -0
- package/build/modules/api/CardAuthentification.js +107 -0
- package/build/modules/api/CardAuthentification.js.map +1 -0
- package/build/modules/api/KYCService.d.ts +58 -1
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +304 -27
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/modules/api/SelfieVerification.d.ts +3 -0
- package/build/modules/api/SelfieVerification.d.ts.map +1 -0
- package/build/modules/api/SelfieVerification.js +9 -0
- package/build/modules/api/SelfieVerification.js.map +1 -0
- package/build/modules/api/backendApi.d.ts +2 -0
- package/build/modules/api/backendApi.d.ts.map +1 -0
- package/build/modules/api/backendApi.js +6 -0
- package/build/modules/api/backendApi.js.map +1 -0
- package/build/modules/api/types.d.ts +45 -0
- package/build/modules/api/types.d.ts.map +1 -0
- package/build/modules/api/types.js +2 -0
- package/build/modules/api/types.js.map +1 -0
- package/build/types/KYC.types.d.ts +56 -7
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js +9 -1
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/cropByObb.d.ts +11 -0
- package/build/utils/cropByObb.d.ts.map +1 -0
- package/build/utils/cropByObb.js +78 -0
- package/build/utils/cropByObb.js.map +1 -0
- package/build/utils/get-document-type-info.d.ts +13 -0
- package/build/utils/get-document-type-info.d.ts.map +1 -0
- package/build/utils/get-document-type-info.js +59 -0
- package/build/utils/get-document-type-info.js.map +1 -0
- package/build/utils/pathToBase64.d.ts +3 -0
- package/build/utils/pathToBase64.d.ts.map +1 -0
- package/build/utils/pathToBase64.js +47 -0
- package/build/utils/pathToBase64.js.map +1 -0
- package/build/utils/remove-duplicate.d.ts +2 -0
- package/build/utils/remove-duplicate.d.ts.map +1 -0
- package/build/utils/remove-duplicate.js +4 -0
- package/build/utils/remove-duplicate.js.map +1 -0
- package/build/web/WebKYCEntry.d.ts +9 -0
- package/build/web/WebKYCEntry.d.ts.map +1 -0
- package/build/web/WebKYCEntry.js +156 -0
- package/build/web/WebKYCEntry.js.map +1 -0
- package/build/web/index.d.ts +2 -0
- package/build/web/index.d.ts.map +1 -0
- package/build/web/index.js +2 -0
- package/build/web/index.js.map +1 -0
- package/package.json +3 -1
- package/src/api/axios.ts +144 -0
- package/src/components/EnhancedCameraView.tsx +96 -78
- package/src/components/EnhancedCameraView.web.tsx +41 -40
- package/src/components/KYCElements/CountrySelectionTemplate.tsx +111 -136
- package/src/components/KYCElements/FileUploadTemplate.tsx +14 -8
- package/src/components/KYCElements/IDCardCapture.tsx +311 -115
- package/src/components/KYCElements/InitializationStep.tsx +53 -0
- package/src/components/KYCElements/LocationCaptureTemplate.tsx +17 -15
- package/src/components/KYCElements/OrientationVideoCapture.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureEnhanced.tsx +2 -2
- package/src/components/KYCElements/OrientationVideoCaptureFinal.tsx +2 -2
- package/src/components/KYCElements/ReviewSubmitTemplate.tsx +201 -0
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +174 -57
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +246 -0
- package/src/components/OverLay/IdCard.tsx +17 -9
- package/src/components/OverLay/SelfieOverlay.tsx +6 -5
- package/src/components/OverLay/type.ts +64 -2
- package/src/components/TemplateKYCExample.tsx +80 -200
- package/src/components/TemplateKYCFlowRefactored.tsx +80 -48
- package/src/components/example/OrientationVideoExample.tsx +3 -7
- package/src/config/countriesData.ts +84 -0
- package/src/config/region_mapping.ts +688 -0
- package/src/hooks/useI18n.ts +53 -0
- package/src/hooks/useOrientationVideo.ts +2 -2
- package/src/hooks/useRealtimeVerifier.ts +128 -0
- package/src/hooks/useTemplateKYCFlow.tsx +407 -57
- package/src/i18n/README.md +288 -0
- package/src/i18n/en/index.ts +206 -0
- package/src/i18n/fr/index.ts +205 -0
- package/src/i18n/index.ts +65 -0
- package/src/i18n/types.ts +172 -0
- package/src/i18n/usage-example.tsx +202 -0
- package/src/index.ts +3 -0
- package/src/modules/api/CardAuthentification.ts +114 -0
- package/src/modules/api/KYCService.ts +350 -30
- package/src/modules/api/SelfieVerification.ts +11 -0
- package/src/modules/api/backendApi.ts +8 -0
- package/src/modules/api/types.ts +51 -0
- package/src/types/KYC.types.ts +82 -14
- package/src/utils/cropByObb.ts +99 -0
- package/src/utils/get-document-type-info.ts +62 -0
- package/src/utils/pathToBase64.ts +47 -0
- package/src/utils/remove-duplicate.ts +3 -0
- package/src/web/WebKYCEntry.tsx +215 -0
- package/src/web/index.ts +1 -0
- package/src/types/nativewind.d.ts +0 -2
|
@@ -1,36 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native';
|
|
3
3
|
import { TemplateKYCFlowProvider, useTemplateKYCFlowContext } from '../hooks/useTemplateKYCFlow';
|
|
4
|
+
import { useI18n } from '../hooks/useI18n';
|
|
4
5
|
import { IDCardCapture } from './KYCElements/IDCardCapture';
|
|
5
6
|
import { SelfieCaptureTemplate } from './KYCElements/SelfieCaptureTemplate';
|
|
6
7
|
import { FileUploadTemplate } from './KYCElements/FileUploadTemplate';
|
|
7
8
|
import { LocationCaptureTemplate } from './KYCElements/LocationCaptureTemplate';
|
|
8
9
|
import { CountrySelectionTemplate } from './KYCElements/CountrySelectionTemplate';
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import { InitializationStep } from './KYCElements/InitializationStep';
|
|
11
|
+
import { ReviewSubmitTemplate } from './KYCElements/ReviewSubmitTemplate';
|
|
12
|
+
import { VerificationProgressTemplate } from './KYCElements/VerificationProgressTemplate';
|
|
13
|
+
export const TemplateKYCFlow = ({ template, onComplete, onError, language = 'fr', onCancel, API_KEY, }) => {
|
|
14
|
+
return (<TemplateKYCFlowProvider template={template} onComplete={onComplete} onError={onError} onCancel={onCancel} initialLanguage={language} apiKey={API_KEY}>
|
|
11
15
|
<TemplateKYCFlowContent onCancel={onCancel}/>
|
|
12
16
|
</TemplateKYCFlowProvider>);
|
|
13
17
|
};
|
|
14
18
|
const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
15
19
|
const { state, actions, currentComponent, progress, } = useTemplateKYCFlowContext();
|
|
16
|
-
|
|
17
|
-
const getCurrentSideForComponent = (componentId) => {
|
|
18
|
-
const component = state.template.components.find(c => c.id === componentId);
|
|
19
|
-
if (!component || component.type !== 'id_card')
|
|
20
|
-
return 'front';
|
|
21
|
-
const idConfig = component.config;
|
|
22
|
-
const sides = idConfig.sides || ['front', 'back'];
|
|
23
|
-
// Calculer le côté basé sur l'ordre dans le template
|
|
24
|
-
const componentIndex = state.template.components.findIndex(c => c.id === componentId);
|
|
25
|
-
const sideIndex = componentIndex % sides.length;
|
|
26
|
-
return sides[sideIndex];
|
|
27
|
-
};
|
|
20
|
+
const { t } = useI18n();
|
|
28
21
|
const updateComponentData = (componentId, data) => {
|
|
29
22
|
actions.updateComponentData(componentId, data);
|
|
30
23
|
};
|
|
31
24
|
if (!currentComponent) {
|
|
32
25
|
return (<View style={styles.container}>
|
|
33
|
-
<Text style={styles.errorText}>
|
|
26
|
+
<Text style={styles.errorText}>{t('errors.unknownError')}</Text>
|
|
34
27
|
</View>);
|
|
35
28
|
}
|
|
36
29
|
// Rendu du composant actuel
|
|
@@ -42,9 +35,12 @@ const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
|
42
35
|
error: state.errors[currentComponent.id],
|
|
43
36
|
language: state.currentLanguage,
|
|
44
37
|
};
|
|
38
|
+
if (!state.session.isInitialized) {
|
|
39
|
+
return <InitializationStep session={state.session}/>;
|
|
40
|
+
}
|
|
45
41
|
switch (currentComponent.type) {
|
|
46
42
|
case 'id_card':
|
|
47
|
-
return <IDCardCapture {...commonProps}
|
|
43
|
+
return <IDCardCapture {...commonProps}/>;
|
|
48
44
|
case 'selfie':
|
|
49
45
|
return <SelfieCaptureTemplate {...commonProps}/>;
|
|
50
46
|
case 'file_upload':
|
|
@@ -53,42 +49,53 @@ const TemplateKYCFlowContent = ({ onCancel }) => {
|
|
|
53
49
|
return <LocationCaptureTemplate {...commonProps}/>;
|
|
54
50
|
case 'country_selection':
|
|
55
51
|
return <CountrySelectionTemplate {...commonProps}/>;
|
|
52
|
+
case 'review_submit':
|
|
53
|
+
return <ReviewSubmitTemplate {...commonProps}/>;
|
|
54
|
+
case 'verification_progress':
|
|
55
|
+
return <VerificationProgressTemplate {...commonProps}/>;
|
|
56
56
|
default:
|
|
57
57
|
return (<View style={styles.unsupportedContainer}>
|
|
58
58
|
<Text style={styles.unsupportedText}>
|
|
59
|
-
|
|
59
|
+
{t('errors.unknownError')}: {currentComponent.type}
|
|
60
60
|
</Text>
|
|
61
61
|
</View>);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
return (<
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
return (<View style={{ flex: 1 }}>
|
|
65
|
+
{state.isProcessing && (<View style={styles.processingContainer}>
|
|
66
|
+
<Text style={styles.processingText}>{t('common.loading')}</Text>
|
|
67
|
+
<ActivityIndicator size="large" color="#fff"/>
|
|
68
|
+
</View>)}
|
|
69
|
+
<SafeAreaView style={styles.container}>
|
|
70
|
+
{/* Header avec informations sur l'étape */}
|
|
71
|
+
|
|
72
|
+
{(state.showCustomStepper && state.session.isInitialized) ? (<View style={styles.header}>
|
|
73
|
+
<Text style={styles.progressText}>
|
|
74
|
+
{t('kyc.step', { current: state.currentComponentIndex + 1, total: state.template.components.length })}
|
|
75
|
+
</Text>
|
|
76
|
+
<View style={styles.progressContainer}>
|
|
77
|
+
<View style={styles.progressBar}>
|
|
78
|
+
<View style={[
|
|
73
79
|
styles.progressFill,
|
|
74
80
|
{ width: `${progress}%` }
|
|
75
81
|
]}/>
|
|
76
|
-
|
|
82
|
+
</View>
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
</View>
|
|
79
85
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
<View style={{ position: 'absolute', right: 12, top: 12 }}>
|
|
87
|
+
<TouchableOpacity onPress={onCancel} disabled={!onCancel} style={{ opacity: onCancel ? 1 : 0.5 }}>
|
|
88
|
+
<Text style={{ fontSize: 20, fontWeight: 'bold', color: '#333' }}>{`X`}</Text>
|
|
89
|
+
</TouchableOpacity>
|
|
90
|
+
</View>
|
|
91
|
+
</View>) : null}
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
{/* Contenu principal */}
|
|
94
|
+
<View style={styles.content}>
|
|
95
|
+
{renderCurrentComponent()}
|
|
96
|
+
</View>
|
|
97
|
+
</SafeAreaView>
|
|
98
|
+
</View>);
|
|
92
99
|
};
|
|
93
100
|
const styles = StyleSheet.create({
|
|
94
101
|
container: {
|
|
@@ -206,5 +213,22 @@ const styles = StyleSheet.create({
|
|
|
206
213
|
color: '#666',
|
|
207
214
|
textAlign: 'center',
|
|
208
215
|
},
|
|
216
|
+
processingContainer: {
|
|
217
|
+
position: 'absolute',
|
|
218
|
+
flex: 1,
|
|
219
|
+
width: Dimensions.get('window').width,
|
|
220
|
+
height: Dimensions.get('window').height,
|
|
221
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
222
|
+
justifyContent: 'center',
|
|
223
|
+
alignItems: 'center',
|
|
224
|
+
zIndex: 1000,
|
|
225
|
+
},
|
|
226
|
+
processingText: {
|
|
227
|
+
fontSize: 16,
|
|
228
|
+
color: '#fff',
|
|
229
|
+
textAlign: 'center',
|
|
230
|
+
fontWeight: 'bold',
|
|
231
|
+
marginBottom: 10,
|
|
232
|
+
},
|
|
209
233
|
});
|
|
210
234
|
//# sourceMappingURL=TemplateKYCFlowRefactored.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateKYCFlowRefactored.js","sourceRoot":"","sources":["../../src/components/TemplateKYCFlowRefactored.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAUlF,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,GAAG,IAAI,EACf,QAAQ,G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1B;IACD,SAAS,EAAE;QACT,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,CAAC;QACf,QAAQ,EAAE,GAAG;QACb,UAAU,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE;QACb,eAAe,EAAE,SAAS;KAC3B;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,OAAO;KACf;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,MAAM,EAAE,EAAE;KACX;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,EAAE;KACZ;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { View, Text, StyleSheet, SafeAreaView, TouchableOpacity } from 'react-native';\nimport { KYCTemplate } from '../types/KYC.types';\nimport { TemplateKYCFlowProvider, useTemplateKYCFlowContext } from '../hooks/useTemplateKYCFlow';\nimport { IDCardCapture } from './KYCElements/IDCardCapture';\nimport { SelfieCaptureTemplate } from './KYCElements/SelfieCaptureTemplate';\nimport { FileUploadTemplate } from './KYCElements/FileUploadTemplate';\nimport { LocationCaptureTemplate } from './KYCElements/LocationCaptureTemplate';\nimport { CountrySelectionTemplate } from './KYCElements/CountrySelectionTemplate';\n\ninterface TemplateKYCFlowProps {\n template: KYCTemplate;\n onComplete?: (data: Record<number, unknown>) => void;\n onError?: (error: string) => void;\n language?: string;\n onCancel?: () => void;\n}\n\nexport const TemplateKYCFlow: React.FC<TemplateKYCFlowProps> = ({\n template,\n onComplete,\n onError,\n language = 'en',\n onCancel,\n}) => {\n return (\n <TemplateKYCFlowProvider\n template={template}\n onComplete={onComplete}\n onError={onError}\n initialLanguage={language}\n >\n <TemplateKYCFlowContent onCancel={onCancel} />\n </TemplateKYCFlowProvider>\n );\n};\n\nconst TemplateKYCFlowContent: React.FC<{ onCancel?: () => void }> = ({ onCancel }) => {\n const {\n state,\n actions,\n currentComponent,\n progress,\n } = useTemplateKYCFlowContext();\n\n // Fonction pour déterminer le côté actuel d'une carte d'identité\n const getCurrentSideForComponent = (componentId: number): string => {\n const component = state.template.components.find(c => c.id === componentId);\n if (!component || component.type !== 'id_card') return 'front';\n\n const idConfig = component.config as any;\n const sides = idConfig.sides || ['front', 'back'];\n\n // Calculer le côté basé sur l'ordre dans le template\n const componentIndex = state.template.components.findIndex(c => c.id === componentId);\n const sideIndex = componentIndex % sides.length;\n\n return sides[sideIndex];\n };\n\n const updateComponentData = (componentId: number, data: unknown) => {\n actions.updateComponentData(componentId, data);\n };\n\n if (!currentComponent) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>Aucun composant trouvé</Text>\n </View>\n );\n }\n\n // Rendu du composant actuel\n const renderCurrentComponent = () => {\n const commonProps = {\n component: currentComponent,\n value: state.componentData[currentComponent.id],\n onValueChange: (data: unknown) => updateComponentData(currentComponent.id, data),\n error: state.errors[currentComponent.id],\n language: state.currentLanguage,\n };\n\n switch (currentComponent.type) {\n case 'id_card':\n return <IDCardCapture {...commonProps} currentSide={getCurrentSideForComponent(currentComponent.id)} />;\n\n case 'selfie':\n return <SelfieCaptureTemplate {...commonProps} />;\n\n case 'file_upload':\n return <FileUploadTemplate {...commonProps} />;\n\n case 'location':\n return <LocationCaptureTemplate {...commonProps} />;\n\n case 'country_selection':\n return <CountrySelectionTemplate {...commonProps} />;\n\n default:\n return (\n <View style={styles.unsupportedContainer}>\n <Text style={styles.unsupportedText}>\n Type de composant non supporté: {currentComponent.type}\n </Text>\n </View>\n );\n }\n };\n\n return (\n <SafeAreaView style={styles.container}>\n {/* Header avec informations sur l'étape */}\n {state.showCustomStepper ? (\n <View style={styles.header}>\n <Text style={styles.progressText}>\n Étape {state.currentComponentIndex + 1} sur {state.template.components.length}\n </Text>\n <View style={styles.progressContainer}>\n <View style={styles.progressBar}>\n <View\n style={[\n styles.progressFill,\n { width: `${progress}%` }\n ]}\n />\n </View>\n\n </View>\n\n <View style={{ position: 'absolute', right: 12, top: 12 }}>\n <TouchableOpacity onPress={onCancel} disabled={!onCancel} style={{ opacity: onCancel ? 1 : 0.5 }}>\n <Text style={{ fontSize: 20, fontWeight: 'bold', color: '#333' }}>{`X`}</Text>\n </TouchableOpacity>\n </View>\n </View>\n ) : null}\n\n {/* Contenu principal */}\n <View style={styles.content}>\n {renderCurrentComponent()}\n </View>\n </SafeAreaView>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n \n },\n header: {\n backgroundColor: 'white',\n paddingVertical: 20,\n paddingHorizontal: 12,\n borderBottomWidth: 1,\n borderBottomColor: '#e0e0e0',\n marginHorizontal: 12,\n marginTop: 12,\n // shadow\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n shadowRadius: 1.84,\n elevation: 5,\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 8,\n },\n description: {\n fontSize: 16,\n color: '#666',\n marginBottom: 20,\n },\n progressContainer: {\n // marginBottom: 20,\n },\n progressBar: {\n height: 8,\n backgroundColor: '#e0e0e0',\n borderRadius: 4,\n overflow: 'hidden',\n },\n progressFill: {\n height: '100%',\n backgroundColor: '#2DBD60',\n borderRadius: 4,\n },\n progressText: {\n fontSize: 14,\n color: 'black',\n fontWeight: '600',\n textAlign: 'left',\n marginBottom: 8,\n },\n stepInfo: {\n backgroundColor: '#f8f9fa',\n padding: 16,\n borderRadius: 8,\n borderLeftWidth: 4,\n borderLeftColor: '#2DBD60',\n },\n stepTitle: {\n fontSize: 18,\n fontWeight: '600',\n color: '#333',\n marginBottom: 8,\n },\n stepDescription: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n content: {\n flex: 1,\n // justifyContent: 'center',\n alignItems: 'center',\n // paddingTop: Dimensions.get('window').height > 760 ? 12 : 0,\n },\n navigation: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 20,\n backgroundColor: 'white',\n borderTopWidth: 1,\n borderTopColor: '#e0e0e0',\n },\n navButton: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n borderRadius: 8,\n minWidth: 100,\n alignItems: 'center',\n },\n primaryButton: {\n backgroundColor: '#2DBD60',\n },\n navButtonText: {\n fontSize: 16,\n fontWeight: '600',\n color: 'white',\n },\n errorText: {\n color: '#dc2626',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n unsupportedContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n unsupportedText: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n },\n}); "]}
|
|
1
|
+
{"version":3,"file":"TemplateKYCFlowRefactored.js","sourceRoot":"","sources":["../../src/components/TemplateKYCFlowRefactored.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAErH,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAw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KACpB;IACD,mBAAmB,EAAE;QACnB,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK;QACrC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM;QACvC,eAAe,EAAE,oBAAoB;QACrC,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,IAAI;KACb;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native';\nimport { KYCTemplate, VerificationState } from '../types/KYC.types';\nimport { TemplateKYCFlowProvider, useTemplateKYCFlowContext } from '../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../hooks/useI18n';\nimport { IDCardCapture } from './KYCElements/IDCardCapture';\nimport { SelfieCaptureTemplate } from './KYCElements/SelfieCaptureTemplate';\nimport { FileUploadTemplate } from './KYCElements/FileUploadTemplate';\nimport { LocationCaptureTemplate } from './KYCElements/LocationCaptureTemplate';\nimport { CountrySelectionTemplate } from './KYCElements/CountrySelectionTemplate';\nimport { InitializationStep } from './KYCElements/InitializationStep';\nimport { ReviewSubmitTemplate } from './KYCElements/ReviewSubmitTemplate';\nimport { VerificationProgressTemplate } from './KYCElements/VerificationProgressTemplate';\n\ninterface TemplateKYCFlowProps {\n template: KYCTemplate;\n onComplete?: (data: VerificationState) => void;\n onError?: (error: string) => void;\n language?: string;\n onCancel?: () => void;\n API_KEY?: string;\n}\n\nexport const TemplateKYCFlow: React.FC<TemplateKYCFlowProps> = ({\n template,\n onComplete,\n onError,\n language = 'fr',\n onCancel,\n API_KEY,\n}) => {\n return (\n <TemplateKYCFlowProvider\n template={template}\n onComplete={onComplete}\n onError={onError}\n onCancel={onCancel}\n initialLanguage={language}\n apiKey={API_KEY}\n >\n <TemplateKYCFlowContent onCancel={onCancel} />\n </TemplateKYCFlowProvider>\n );\n};\n\nconst TemplateKYCFlowContent: React.FC<{ onCancel?: () => void }> = ({ onCancel }) => {\n const {\n state,\n actions,\n currentComponent,\n progress,\n } = useTemplateKYCFlowContext();\n\n const { t } = useI18n();\n\n const updateComponentData = (componentId: number, data: unknown) => {\n actions.updateComponentData(componentId, data);\n };\n\n if (!currentComponent) {\n return (\n <View style={styles.container}>\n <Text style={styles.errorText}>{t('errors.unknownError')}</Text>\n </View>\n );\n }\n\n // Rendu du composant actuel\n const renderCurrentComponent = () => {\n const commonProps = {\n component: currentComponent,\n value: state.componentData[currentComponent.id],\n onValueChange: (data: unknown) => updateComponentData(currentComponent.id, data),\n error: state.errors[currentComponent.id],\n language: state.currentLanguage,\n };\n\n if (!state.session.isInitialized) {\n return <InitializationStep session={state.session} />\n }\n\n switch (currentComponent.type) {\n case 'id_card':\n return <IDCardCapture {...commonProps} />;\n\n case 'selfie':\n return <SelfieCaptureTemplate {...commonProps} />;\n\n case 'file_upload':\n return <FileUploadTemplate {...commonProps} />;\n\n case 'location':\n return <LocationCaptureTemplate {...commonProps} />;\n\n case 'country_selection':\n return <CountrySelectionTemplate {...commonProps} />;\n\n case 'review_submit':\n return <ReviewSubmitTemplate {...commonProps} />;\n\n case 'verification_progress':\n return <VerificationProgressTemplate {...commonProps} />;\n\n default:\n return (\n <View style={styles.unsupportedContainer}>\n <Text style={styles.unsupportedText}>\n {t('errors.unknownError')}: {currentComponent.type}\n </Text>\n </View>\n );\n }\n };\n\n return (\n <View style={{ flex: 1 }}>\n {state.isProcessing && (\n <View style={styles.processingContainer}>\n <Text style={styles.processingText}>{t('common.loading')}</Text>\n <ActivityIndicator size=\"large\" color=\"#fff\" />\n </View>\n )}\n <SafeAreaView style={styles.container}>\n {/* Header avec informations sur l'étape */}\n\n {(state.showCustomStepper && state.session.isInitialized) ? (\n <View style={styles.header}>\n <Text style={styles.progressText}>\n {t('kyc.step', { current: state.currentComponentIndex + 1, total: state.template.components.length })}\n </Text>\n <View style={styles.progressContainer}>\n <View style={styles.progressBar}>\n <View\n style={[\n styles.progressFill,\n { width: `${progress}%` }\n ]}\n />\n </View>\n\n </View>\n\n <View style={{ position: 'absolute', right: 12, top: 12 }}>\n <TouchableOpacity onPress={onCancel} disabled={!onCancel} style={{ opacity: onCancel ? 1 : 0.5 }}>\n <Text style={{ fontSize: 20, fontWeight: 'bold', color: '#333' }}>{`X`}</Text>\n </TouchableOpacity>\n </View>\n </View>\n ) : null}\n\n {/* Contenu principal */}\n <View style={styles.content}>\n {renderCurrentComponent()}\n </View>\n </SafeAreaView>\n </View>\n\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n\n },\n header: {\n backgroundColor: 'white',\n paddingVertical: 20,\n paddingHorizontal: 12,\n borderBottomWidth: 1,\n borderBottomColor: '#e0e0e0',\n marginHorizontal: 12,\n marginTop: 12,\n // shadow\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.15,\n shadowRadius: 1.84,\n elevation: 5,\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 8,\n },\n description: {\n fontSize: 16,\n color: '#666',\n marginBottom: 20,\n },\n progressContainer: {\n // marginBottom: 20,\n },\n progressBar: {\n height: 8,\n backgroundColor: '#e0e0e0',\n borderRadius: 4,\n overflow: 'hidden',\n },\n progressFill: {\n height: '100%',\n backgroundColor: '#2DBD60',\n borderRadius: 4,\n },\n progressText: {\n fontSize: 14,\n color: 'black',\n fontWeight: '600',\n textAlign: 'left',\n marginBottom: 8,\n },\n stepInfo: {\n backgroundColor: '#f8f9fa',\n padding: 16,\n borderRadius: 8,\n borderLeftWidth: 4,\n borderLeftColor: '#2DBD60',\n },\n stepTitle: {\n fontSize: 18,\n fontWeight: '600',\n color: '#333',\n marginBottom: 8,\n },\n stepDescription: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n content: {\n flex: 1,\n // justifyContent: 'center',\n alignItems: 'center',\n // paddingTop: Dimensions.get('window').height > 760 ? 12 : 0,\n },\n navigation: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 20,\n backgroundColor: 'white',\n borderTopWidth: 1,\n borderTopColor: '#e0e0e0',\n },\n navButton: {\n paddingHorizontal: 24,\n paddingVertical: 12,\n borderRadius: 8,\n minWidth: 100,\n alignItems: 'center',\n },\n primaryButton: {\n backgroundColor: '#2DBD60',\n },\n navButtonText: {\n fontSize: 16,\n fontWeight: '600',\n color: 'white',\n },\n errorText: {\n color: '#dc2626',\n fontSize: 16,\n textAlign: 'center',\n margin: 20,\n },\n unsupportedContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 20,\n },\n unsupportedText: {\n fontSize: 16,\n color: '#666',\n textAlign: 'center',\n },\n processingContainer: {\n position: 'absolute',\n flex: 1,\n width: Dimensions.get('window').width,\n height: Dimensions.get('window').height,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n justifyContent: 'center',\n alignItems: 'center',\n zIndex: 1000,\n },\n processingText: {\n fontSize: 16,\n color: '#fff',\n textAlign: 'center',\n fontWeight: 'bold',\n marginBottom: 10,\n },\n}); "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrientationVideoExample.d.ts","sourceRoot":"","sources":["../../../src/components/example/OrientationVideoExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"OrientationVideoExample.d.ts","sourceRoot":"","sources":["../../../src/components/example/OrientationVideoExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAsMpC,CAAC;AAwKF,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, Text, StyleSheet, TouchableOpacity, Alert, ScrollView, } from 'react-native';
|
|
3
|
-
import KYCService from '../../modules/api/KYCService';
|
|
4
3
|
import OrientationVideoCaptureEnhanced from '../KYCElements/OrientationVideoCaptureEnhanced';
|
|
4
|
+
import kycService from '../../modules/api/KYCService';
|
|
5
5
|
const OrientationVideoExample = () => {
|
|
6
6
|
const [showVideoCapture, setShowVideoCapture] = useState(false);
|
|
7
7
|
const [result, setResult] = useState(null);
|
|
8
8
|
const [isLoading] = useState(false);
|
|
9
|
-
// Initialize KYC Service with your API configuration
|
|
10
|
-
const kycService = new KYCService('http://18.188.180.154:8001/', // Replace with your actual API base URL
|
|
11
|
-
'1234567890' // Replace with your actual API key
|
|
12
|
-
);
|
|
13
9
|
const handleComplete = (orientationResult) => {
|
|
14
10
|
setResult(orientationResult);
|
|
15
11
|
setShowVideoCapture(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrientationVideoExample.js","sourceRoot":"","sources":["../../../src/components/example/OrientationVideoExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAEtD,OAAO,+BAA+B,MAAM,gDAAgD,CAAC;AAE7F,MAAM,uBAAuB,GAAa,GAAG,EAAE;IAC7C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,G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QACrB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;KAChB;IACD,iBAAiB,EAAE;QACjB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACjB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,CAAC;KAChB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,EAAE;KACR;IACD,WAAW,EAAE;QACX,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,WAAW,EAAE;QACX,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport {\n View,\n Text,\n StyleSheet,\n TouchableOpacity,\n Alert,\n ScrollView,\n} from 'react-native';\nimport KYCService from '../../modules/api/KYCService';\nimport { OrientationVideoResult } from '../../types/KYC.types';\nimport OrientationVideoCaptureEnhanced from '../KYCElements/OrientationVideoCaptureEnhanced';\n\nconst OrientationVideoExample: React.FC = () => {\n const [showVideoCapture, setShowVideoCapture] = useState(false);\n const [result, setResult] = useState<OrientationVideoResult | null>(null);\n const [isLoading] = useState(false);\n\n // Initialize KYC Service with your API configuration\n const kycService = new KYCService(\n 'http://18.188.180.154:8001/', // Replace with your actual API base URL\n '1234567890' // Replace with your actual API key\n );\n\n const handleComplete = (orientationResult: OrientationVideoResult) => {\n setResult(orientationResult);\n setShowVideoCapture(false);\n \n // Check if all orientations were captured\n const allCaptured = orientationResult.center.captured && \n orientationResult.left.captured && \n orientationResult.right.captured;\n \n if (allCaptured) {\n Alert.alert(\n 'Success!',\n 'All face orientations have been successfully captured and verified.',\n [{ text: 'OK' }]\n );\n } else {\n Alert.alert(\n 'Partial Success',\n 'Some orientations were not captured. You may need to retake the video.',\n [{ text: 'OK' }]\n );\n }\n };\n\n const handleError = (error: string) => {\n setShowVideoCapture(false);\n Alert.alert('Error', error, [{ text: 'OK' }]);\n };\n\n const startOrientationCapture = () => {\n setShowVideoCapture(true);\n setResult(null);\n };\n\n const resetExample = () => {\n setShowVideoCapture(false);\n setResult(null);\n };\n\n const renderResult = () => {\n if (!result) return null;\n\n const { center, left, right } = result;\n const allCaptured = center.captured && left.captured && right.captured;\n\n return (\n <View style={styles.resultContainer}>\n <Text style={styles.resultTitle}>\n Orientation Video Analysis Results\n </Text>\n \n <View style={styles.statusContainer}>\n <Text style={[\n styles.statusText,\n allCaptured ? styles.successText : styles.warningText\n ]}>\n {allCaptured ? '✅ All orientations captured' : '⚠️ Some orientations missing'}\n </Text>\n </View>\n\n <View style={styles.orientationDetails}>\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Center</Text>\n <Text style={[\n styles.orientationStatus,\n center.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {center.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {center.captured && (\n <Text style={styles.frameText}>Frame: {center.frame}</Text>\n )}\n </View>\n\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Left</Text>\n <Text style={[\n styles.orientationStatus,\n left.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {left.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {left.captured && (\n <Text style={styles.frameText}>Frame: {left.frame}</Text>\n )}\n </View>\n\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Right</Text>\n <Text style={[\n styles.orientationStatus,\n right.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {right.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {right.captured && (\n <Text style={styles.frameText}>Frame: {right.frame}</Text>\n )}\n </View>\n </View>\n\n <View style={styles.instructionsContainer}>\n <Text style={styles.instructionsTitle}>Instructions for Liveness Detection:</Text>\n <Text style={styles.instructionText}>• Look straight ahead at the camera</Text>\n <Text style={styles.instructionText}>• Turn your head to the left</Text>\n <Text style={styles.instructionText}>• Turn your head to the right</Text>\n <Text style={styles.instructionText}>• Keep your face within the frame</Text>\n <Text style={styles.instructionText}>• Ensure good lighting conditions</Text>\n </View>\n </View>\n );\n };\n\n if (showVideoCapture) {\n return (\n <OrientationVideoCaptureEnhanced\n config={{\n duration: 10,\n orientations: ['center', 'left', 'right'],\n instructions: {\n center: 'Look straight ahead at the camera',\n left: 'Turn your head to the left',\n right: 'Turn your head to the right',\n },\n showPreview: true,\n allowRetake: true,\n maxRetakes: 3,\n quality: 0.8,\n aspectRatio: 16 / 9,\n }}\n onComplete={handleComplete}\n onError={handleError}\n kycService={kycService}\n />\n );\n }\n\n return (\n <ScrollView style={styles.container}>\n <View style={styles.header}>\n <Text style={styles.title}>Orientation Video Capture Example</Text>\n <Text style={styles.subtitle}>\n This example demonstrates liveness detection through face orientation analysis\n </Text>\n </View>\n\n <View style={styles.content}>\n <View style={styles.infoContainer}>\n <Text style={styles.infoTitle}>What is Liveness Detection?</Text>\n <Text style={styles.infoText}>\n Liveness detection is a security feature that verifies a real person is present \n during the verification process, preventing spoofing attacks using photos or videos.\n </Text>\n </View>\n\n <View style={styles.infoContainer}>\n <Text style={styles.infoTitle}>How it works:</Text>\n <Text style={styles.infoText}>\n 1. Record a short video (10 seconds){'\\n'}\n 2. Follow the on-screen instructions{'\\n'}\n 3. Turn your head in different directions{'\\n'}\n 4. The system analyzes the video to detect face orientations{'\\n'}\n 5. Results show which orientations were successfully captured\n </Text>\n </View>\n\n {renderResult()}\n\n <View style={styles.buttonContainer}>\n <TouchableOpacity \n style={styles.startButton} \n onPress={startOrientationCapture}\n disabled={isLoading}\n >\n <Text style={styles.startButtonText}>\n {isLoading ? 'Loading...' : 'Start Orientation Capture'}\n </Text>\n </TouchableOpacity>\n\n {result && (\n <TouchableOpacity \n style={styles.resetButton} \n onPress={resetExample}\n >\n <Text style={styles.resetButtonText}>Reset Example</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </ScrollView>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n },\n header: {\n backgroundColor: '#007AFF',\n padding: 20,\n alignItems: 'center',\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#fff',\n textAlign: 'center',\n marginBottom: 10,\n },\n subtitle: {\n fontSize: 16,\n color: '#fff',\n textAlign: 'center',\n opacity: 0.9,\n },\n content: {\n padding: 20,\n },\n infoContainer: {\n backgroundColor: '#fff',\n padding: 20,\n borderRadius: 10,\n marginBottom: 20,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n infoTitle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n infoText: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n resultContainer: {\n backgroundColor: '#fff',\n padding: 20,\n borderRadius: 10,\n marginBottom: 20,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n resultTitle: {\n fontSize: 20,\n fontWeight: 'bold',\n color: '#333',\n textAlign: 'center',\n marginBottom: 15,\n },\n statusContainer: {\n alignItems: 'center',\n marginBottom: 20,\n },\n statusText: {\n fontSize: 16,\n fontWeight: 'bold',\n },\n successText: {\n color: '#34C759',\n },\n warningText: {\n color: '#FF9500',\n },\n orientationDetails: {\n marginBottom: 20,\n },\n orientationItem: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingVertical: 10,\n borderBottomWidth: 1,\n borderBottomColor: '#f0f0f0',\n },\n orientationLabel: {\n fontSize: 16,\n fontWeight: '600',\n color: '#333',\n flex: 1,\n },\n orientationStatus: {\n fontSize: 14,\n fontWeight: '500',\n flex: 1,\n textAlign: 'center',\n },\n capturedText: {\n color: '#34C759',\n },\n notCapturedText: {\n color: '#FF3B30',\n },\n frameText: {\n fontSize: 12,\n color: '#666',\n flex: 1,\n textAlign: 'right',\n },\n instructionsContainer: {\n backgroundColor: '#f8f9fa',\n padding: 15,\n borderRadius: 8,\n },\n instructionsTitle: {\n fontSize: 16,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n instructionText: {\n fontSize: 14,\n color: '#666',\n marginBottom: 5,\n },\n buttonContainer: {\n gap: 15,\n },\n startButton: {\n backgroundColor: '#007AFF',\n paddingVertical: 15,\n paddingHorizontal: 30,\n borderRadius: 25,\n alignItems: 'center',\n },\n startButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n resetButton: {\n backgroundColor: '#FF3B30',\n paddingVertical: 15,\n paddingHorizontal: 30,\n borderRadius: 25,\n alignItems: 'center',\n },\n resetButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n});\n\nexport default OrientationVideoExample; "]}
|
|
1
|
+
{"version":3,"file":"OrientationVideoExample.js","sourceRoot":"","sources":["../../../src/components/example/OrientationVideoExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,+BAA+B,MA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EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,OAAO;KACnB;IACD,qBAAqB,EAAE;QACrB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;KAChB;IACD,iBAAiB,EAAE;QACjB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE;KACjB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,CAAC;KAChB;IACD,eAAe,EAAE;QACf,GAAG,EAAE,EAAE;KACR;IACD,WAAW,EAAE;QACX,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,WAAW,EAAE;QACX,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport {\n View,\n Text,\n StyleSheet,\n TouchableOpacity,\n Alert,\n ScrollView,\n} from 'react-native'; \nimport { OrientationVideoResult } from '../../types/KYC.types';\nimport OrientationVideoCaptureEnhanced from '../KYCElements/OrientationVideoCaptureEnhanced';\nimport kycService from '../../modules/api/KYCService';\n\nconst OrientationVideoExample: React.FC = () => {\n const [showVideoCapture, setShowVideoCapture] = useState(false);\n const [result, setResult] = useState<OrientationVideoResult | null>(null);\n const [isLoading] = useState(false);\n\n \n\n const handleComplete = (orientationResult: OrientationVideoResult) => {\n setResult(orientationResult);\n setShowVideoCapture(false);\n \n // Check if all orientations were captured\n const allCaptured = orientationResult.center.captured && \n orientationResult.left.captured && \n orientationResult.right.captured;\n \n if (allCaptured) {\n Alert.alert(\n 'Success!',\n 'All face orientations have been successfully captured and verified.',\n [{ text: 'OK' }]\n );\n } else {\n Alert.alert(\n 'Partial Success',\n 'Some orientations were not captured. You may need to retake the video.',\n [{ text: 'OK' }]\n );\n }\n };\n\n const handleError = (error: string) => {\n setShowVideoCapture(false);\n Alert.alert('Error', error, [{ text: 'OK' }]);\n };\n\n const startOrientationCapture = () => {\n setShowVideoCapture(true);\n setResult(null);\n };\n\n const resetExample = () => {\n setShowVideoCapture(false);\n setResult(null);\n };\n\n const renderResult = () => {\n if (!result) return null;\n\n const { center, left, right } = result;\n const allCaptured = center.captured && left.captured && right.captured;\n\n return (\n <View style={styles.resultContainer}>\n <Text style={styles.resultTitle}>\n Orientation Video Analysis Results\n </Text>\n \n <View style={styles.statusContainer}>\n <Text style={[\n styles.statusText,\n allCaptured ? styles.successText : styles.warningText\n ]}>\n {allCaptured ? '✅ All orientations captured' : '⚠️ Some orientations missing'}\n </Text>\n </View>\n\n <View style={styles.orientationDetails}>\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Center</Text>\n <Text style={[\n styles.orientationStatus,\n center.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {center.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {center.captured && (\n <Text style={styles.frameText}>Frame: {center.frame}</Text>\n )}\n </View>\n\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Left</Text>\n <Text style={[\n styles.orientationStatus,\n left.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {left.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {left.captured && (\n <Text style={styles.frameText}>Frame: {left.frame}</Text>\n )}\n </View>\n\n <View style={styles.orientationItem}>\n <Text style={styles.orientationLabel}>Right</Text>\n <Text style={[\n styles.orientationStatus,\n right.captured ? styles.capturedText : styles.notCapturedText\n ]}>\n {right.captured ? '✅ Captured' : '❌ Not captured'}\n </Text>\n {right.captured && (\n <Text style={styles.frameText}>Frame: {right.frame}</Text>\n )}\n </View>\n </View>\n\n <View style={styles.instructionsContainer}>\n <Text style={styles.instructionsTitle}>Instructions for Liveness Detection:</Text>\n <Text style={styles.instructionText}>• Look straight ahead at the camera</Text>\n <Text style={styles.instructionText}>• Turn your head to the left</Text>\n <Text style={styles.instructionText}>• Turn your head to the right</Text>\n <Text style={styles.instructionText}>• Keep your face within the frame</Text>\n <Text style={styles.instructionText}>• Ensure good lighting conditions</Text>\n </View>\n </View>\n );\n };\n\n if (showVideoCapture) {\n return (\n <OrientationVideoCaptureEnhanced\n config={{\n duration: 10,\n orientations: ['center', 'left', 'right'],\n instructions: {\n center: 'Look straight ahead at the camera',\n left: 'Turn your head to the left',\n right: 'Turn your head to the right',\n },\n showPreview: true,\n allowRetake: true,\n maxRetakes: 3,\n quality: 0.8,\n aspectRatio: 16 / 9,\n }}\n onComplete={handleComplete}\n onError={handleError}\n kycService={kycService}\n />\n );\n }\n\n return (\n <ScrollView style={styles.container}>\n <View style={styles.header}>\n <Text style={styles.title}>Orientation Video Capture Example</Text>\n <Text style={styles.subtitle}>\n This example demonstrates liveness detection through face orientation analysis\n </Text>\n </View>\n\n <View style={styles.content}>\n <View style={styles.infoContainer}>\n <Text style={styles.infoTitle}>What is Liveness Detection?</Text>\n <Text style={styles.infoText}>\n Liveness detection is a security feature that verifies a real person is present \n during the verification process, preventing spoofing attacks using photos or videos.\n </Text>\n </View>\n\n <View style={styles.infoContainer}>\n <Text style={styles.infoTitle}>How it works:</Text>\n <Text style={styles.infoText}>\n 1. Record a short video (10 seconds){'\\n'}\n 2. Follow the on-screen instructions{'\\n'}\n 3. Turn your head in different directions{'\\n'}\n 4. The system analyzes the video to detect face orientations{'\\n'}\n 5. Results show which orientations were successfully captured\n </Text>\n </View>\n\n {renderResult()}\n\n <View style={styles.buttonContainer}>\n <TouchableOpacity \n style={styles.startButton} \n onPress={startOrientationCapture}\n disabled={isLoading}\n >\n <Text style={styles.startButtonText}>\n {isLoading ? 'Loading...' : 'Start Orientation Capture'}\n </Text>\n </TouchableOpacity>\n\n {result && (\n <TouchableOpacity \n style={styles.resetButton} \n onPress={resetExample}\n >\n <Text style={styles.resetButtonText}>Reset Example</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </ScrollView>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#f5f5f5',\n },\n header: {\n backgroundColor: '#007AFF',\n padding: 20,\n alignItems: 'center',\n },\n title: {\n fontSize: 24,\n fontWeight: 'bold',\n color: '#fff',\n textAlign: 'center',\n marginBottom: 10,\n },\n subtitle: {\n fontSize: 16,\n color: '#fff',\n textAlign: 'center',\n opacity: 0.9,\n },\n content: {\n padding: 20,\n },\n infoContainer: {\n backgroundColor: '#fff',\n padding: 20,\n borderRadius: 10,\n marginBottom: 20,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n infoTitle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n infoText: {\n fontSize: 14,\n color: '#666',\n lineHeight: 20,\n },\n resultContainer: {\n backgroundColor: '#fff',\n padding: 20,\n borderRadius: 10,\n marginBottom: 20,\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.1,\n shadowRadius: 3.84,\n elevation: 5,\n },\n resultTitle: {\n fontSize: 20,\n fontWeight: 'bold',\n color: '#333',\n textAlign: 'center',\n marginBottom: 15,\n },\n statusContainer: {\n alignItems: 'center',\n marginBottom: 20,\n },\n statusText: {\n fontSize: 16,\n fontWeight: 'bold',\n },\n successText: {\n color: '#34C759',\n },\n warningText: {\n color: '#FF9500',\n },\n orientationDetails: {\n marginBottom: 20,\n },\n orientationItem: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingVertical: 10,\n borderBottomWidth: 1,\n borderBottomColor: '#f0f0f0',\n },\n orientationLabel: {\n fontSize: 16,\n fontWeight: '600',\n color: '#333',\n flex: 1,\n },\n orientationStatus: {\n fontSize: 14,\n fontWeight: '500',\n flex: 1,\n textAlign: 'center',\n },\n capturedText: {\n color: '#34C759',\n },\n notCapturedText: {\n color: '#FF3B30',\n },\n frameText: {\n fontSize: 12,\n color: '#666',\n flex: 1,\n textAlign: 'right',\n },\n instructionsContainer: {\n backgroundColor: '#f8f9fa',\n padding: 15,\n borderRadius: 8,\n },\n instructionsTitle: {\n fontSize: 16,\n fontWeight: 'bold',\n color: '#333',\n marginBottom: 10,\n },\n instructionText: {\n fontSize: 14,\n color: '#666',\n marginBottom: 5,\n },\n buttonContainer: {\n gap: 15,\n },\n startButton: {\n backgroundColor: '#007AFF',\n paddingVertical: 15,\n paddingHorizontal: 30,\n borderRadius: 25,\n alignItems: 'center',\n },\n startButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n resetButton: {\n backgroundColor: '#FF3B30',\n paddingVertical: 15,\n paddingHorizontal: 30,\n borderRadius: 25,\n alignItems: 'center',\n },\n resetButtonText: {\n color: '#fff',\n fontSize: 18,\n fontWeight: 'bold',\n },\n});\n\nexport default OrientationVideoExample; "]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countriesData.d.ts","sourceRoot":"","sources":["../../src/config/countriesData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAM7C,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA6E/C,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const countryData = {
|
|
2
|
+
FR: { name: 'France', name_en: "France", flag: '🇫🇷' },
|
|
3
|
+
CM: { name: 'Cameroun', name_en: "Cameroon", flag: '🇨🇲' },
|
|
4
|
+
US: { name: 'États-Unis', name_en: "United States of America", flag: '🇺🇸' },
|
|
5
|
+
DE: { name: 'Allemagne', name_en: "Germany", flag: '🇩🇪' },
|
|
6
|
+
BE: { name: 'Belgique', name_en: "Belgium", flag: '🇧🇪' },
|
|
7
|
+
LU: { name: 'Luxembourg', name_en: "Luxembourg", flag: '🇱🇺' },
|
|
8
|
+
IT: { name: 'Italie', name_en: "Italy", flag: '🇮🇹' },
|
|
9
|
+
ES: { name: 'Espagne', name_en: "Spain", flag: '🇪🇸' },
|
|
10
|
+
PT: { name: 'Portugal', name_en: "Portugal", flag: '🇵🇹' },
|
|
11
|
+
AT: { name: 'Autriche', name_en: "Austria", flag: '🇦🇹' },
|
|
12
|
+
CH: { name: 'Suisse', name_en: "Switzerland", flag: '🇨🇭' },
|
|
13
|
+
NL: { name: 'Pays-Bas', name_en: "Netherlands", flag: '🇳🇱' },
|
|
14
|
+
CA: { name: 'Canada', name_en: "Canada", flag: '🇨🇦', hasRegions: true },
|
|
15
|
+
GB: { name: 'Royaume-Uni', name_en: "United Kingdom", flag: '🇬🇧' },
|
|
16
|
+
AU: { name: 'Australie', name_en: "Australia", flag: '🇦🇺' },
|
|
17
|
+
JP: { name: 'Japon', name_en: "Japan", flag: '🇯🇵' },
|
|
18
|
+
KR: { name: 'Corée du Sud', name_en: "South Korea", flag: '🇰🇷' },
|
|
19
|
+
SG: { name: 'Singapour', name_en: "Singapore", flag: '🇸🇬' },
|
|
20
|
+
HK: { name: 'Hong Kong', name_en: "Hong Kong", flag: '🇭🇰' },
|
|
21
|
+
AE: { name: 'Émirats Arabes Unis', name_en: "United Arab Emirates", flag: '🇦🇪' },
|
|
22
|
+
SA: { name: 'Arabie Saoudite', name_en: "Saudi Arabia", flag: '🇸🇦' },
|
|
23
|
+
QA: { name: 'Qatar', name_en: "Qatar", flag: '🇶🇦' },
|
|
24
|
+
KW: { name: 'Koweït', name_en: "Kuwait", flag: '🇰🇼' },
|
|
25
|
+
BH: { name: 'Bahreïn', name_en: "Bahrain", flag: '🇧🇭' },
|
|
26
|
+
OM: { name: 'Oman', name_en: "Oman", flag: '🇴🇲' },
|
|
27
|
+
JO: { name: 'Jordanie', name_en: "Jordan", flag: '🇯🇴' },
|
|
28
|
+
LB: { name: 'Liban', name_en: "Lebanon", flag: '🇱🇧' },
|
|
29
|
+
EG: { name: 'Égypte', name_en: "Egypt", flag: '🇪🇬' },
|
|
30
|
+
MA: { name: 'Maroc', name_en: "Morocco", flag: '🇲🇦' },
|
|
31
|
+
TN: { name: 'Tunisie', name_en: "Tunisia", flag: '🇹🇳' },
|
|
32
|
+
DZ: { name: 'Algérie', name_en: "Algeria", flag: '🇩🇿' },
|
|
33
|
+
SN: { name: 'Sénégal', name_en: "Senegal", flag: '🇸🇳' },
|
|
34
|
+
CI: { name: 'Côte d\'Ivoire', name_en: "Ivory Coast", flag: '🇨🇮' },
|
|
35
|
+
NG: { name: 'Nigeria', name_en: "Nigeria", flag: '🇳🇬' },
|
|
36
|
+
KE: { name: 'Kenya', name_en: "Kenya", flag: '🇰🇪' },
|
|
37
|
+
ZA: { name: 'Afrique du Sud', name_en: "South Africa", flag: '🇿🇦' },
|
|
38
|
+
BR: { name: 'Brésil', name_en: "Brazil", flag: '🇧🇷' },
|
|
39
|
+
MX: { name: 'Mexique', name_en: "Mexico", flag: '🇲🇽' },
|
|
40
|
+
AR: { name: 'Argentine', name_en: "Argentina", flag: '🇦🇷' },
|
|
41
|
+
CL: { name: 'Chili', name_en: "Chile", flag: '🇨🇱' },
|
|
42
|
+
PE: { name: 'Pérou', name_en: "Peru", flag: '🇵🇪' },
|
|
43
|
+
CO: { name: 'Colombie', name_en: "Colombia", flag: '🇨🇴' },
|
|
44
|
+
VE: { name: 'Venezuela', name_en: "Venezuela", flag: '🇻🇪' },
|
|
45
|
+
EC: { name: 'Équateur', name_en: "Ecuador", flag: '🇪🇨' },
|
|
46
|
+
UY: { name: 'Uruguay', name_en: "Uruguay", flag: '🇺🇾' },
|
|
47
|
+
PY: { name: 'Paraguay', name_en: "Paraguay", flag: '🇵🇾' },
|
|
48
|
+
BO: { name: 'Bolivie', name_en: "Bolivia", flag: '🇧🇴' },
|
|
49
|
+
IN: { name: 'Inde', name_en: "India", flag: '🇮🇳' },
|
|
50
|
+
CN: { name: 'Chine', name_en: "China", flag: '🇨🇳' },
|
|
51
|
+
TH: { name: 'Thaïlande', name_en: "Thailand", flag: '🇹🇭' },
|
|
52
|
+
VN: { name: 'Vietnam', name_en: "Vietnam", flag: '🇻🇳' },
|
|
53
|
+
ID: { name: 'Indonésie', name_en: "Indonesia", flag: '🇮🇩' },
|
|
54
|
+
MY: { name: 'Malaisie', name_en: "Malaysia", flag: '🇲🇾' },
|
|
55
|
+
PH: { name: 'Philippines', name_en: "Philippines", flag: '🇵🇭' },
|
|
56
|
+
TR: { name: 'Turquie', name_en: "Turkey", flag: '🇹🇷' },
|
|
57
|
+
IL: { name: 'Israël', name_en: "Israel", flag: '🇮🇱' },
|
|
58
|
+
RU: { name: 'Russie', name_en: "Russia", flag: '🇷🇺' },
|
|
59
|
+
UA: { name: 'Ukraine', name_en: "Ukraine", flag: '🇺🇦' },
|
|
60
|
+
PL: { name: 'Pologne', name_en: "Poland", flag: '🇵🇱' },
|
|
61
|
+
CZ: { name: 'République Tchèque', name_en: "Czech Republic", flag: '🇨🇿' },
|
|
62
|
+
HU: { name: 'Hongrie', name_en: "Hungary", flag: '🇭🇺' },
|
|
63
|
+
RO: { name: 'Roumanie', name_en: "Romania", flag: '🇷🇴' },
|
|
64
|
+
BG: { name: 'Bulgarie', name_en: "Bulgaria", flag: '🇧🇬' },
|
|
65
|
+
HR: { name: 'Croatie', name_en: "Croatia", flag: '🇭🇷' },
|
|
66
|
+
SI: { name: 'Slovénie', name_en: "Slovenia", flag: '🇸🇮' },
|
|
67
|
+
SK: { name: 'Slovaquie', name_en: "Slovakia", flag: '🇸🇰' },
|
|
68
|
+
LT: { name: 'Lituanie', name_en: "Lithuania", flag: '🇱🇹' },
|
|
69
|
+
LV: { name: 'Lettonie', name_en: "Latvia", flag: '🇱🇻' },
|
|
70
|
+
EE: { name: 'Estonie', name_en: "Estonia", flag: '🇪🇪' },
|
|
71
|
+
FI: { name: 'Finlande', name_en: "Finland", flag: '🇫🇮' },
|
|
72
|
+
SE: { name: 'Suède', name_en: "Sweden", flag: '🇸🇪' },
|
|
73
|
+
NO: { name: 'Norvège', name_en: "Norway", flag: '🇳🇴' },
|
|
74
|
+
DK: { name: 'Danemark', name_en: "Denmark", flag: '🇩🇰' },
|
|
75
|
+
IS: { name: 'Islande', name_en: "Iceland", flag: '🇮🇸' },
|
|
76
|
+
IE: { name: 'Irlande', name_en: "Ireland", flag: '🇮🇪' },
|
|
77
|
+
NZ: { name: 'Nouvelle-Zélande', name_en: "New Zealand", flag: '🇳🇿' },
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=countriesData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countriesData.js","sourceRoot":"","sources":["../../src/config/countriesData.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,WAAW,GAA4B;IAChD,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACvD,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3D,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,EAAE;IAC7E,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IAC3D,EAAE,EAAE,EAAE,IAA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AE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACzD,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACzD,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1D,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACtD,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACxD,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1D,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACzD,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;IACzD,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE;CACzE,CAAC","sourcesContent":["import { Country } from \"../types/KYC.types\";\n\n\n\n\n\nexport const countryData: Record<string, Country> = {\n FR: { name: 'France', name_en: \"France\", flag: '🇫🇷' },\n CM: { name: 'Cameroun', name_en: \"Cameroon\", flag: '🇨🇲' },\n US: { name: 'États-Unis', name_en: \"United States of America\", flag: '🇺🇸' },\n DE: { name: 'Allemagne', name_en: \"Germany\", flag: '🇩🇪' },\n BE: { name: 'Belgique', name_en: \"Belgium\", flag: '🇧🇪' },\n LU: { name: 'Luxembourg', name_en: \"Luxembourg\", flag: '🇱🇺' },\n IT: { name: 'Italie', name_en: \"Italy\", flag: '🇮🇹' },\n ES: { name: 'Espagne', name_en: \"Spain\", flag: '🇪🇸' },\n PT: { name: 'Portugal', name_en: \"Portugal\", flag: '🇵🇹' },\n AT: { name: 'Autriche', name_en: \"Austria\", flag: '🇦🇹' },\n CH: { name: 'Suisse', name_en: \"Switzerland\", flag: '🇨🇭' },\n NL: { name: 'Pays-Bas', name_en: \"Netherlands\", flag: '🇳🇱' },\n CA: { name: 'Canada', name_en: \"Canada\", flag: '🇨🇦', hasRegions: true },\n GB: { name: 'Royaume-Uni', name_en: \"United Kingdom\", flag: '🇬🇧' },\n AU: { name: 'Australie', name_en: \"Australia\", flag: '🇦🇺' },\n JP: { name: 'Japon', name_en: \"Japan\", flag: '🇯🇵' },\n KR: { name: 'Corée du Sud', name_en: \"South Korea\", flag: '🇰🇷' },\n SG: { name: 'Singapour', name_en: \"Singapore\", flag: '🇸🇬' },\n HK: { name: 'Hong Kong', name_en: \"Hong Kong\", flag: '🇭🇰' },\n AE: { name: 'Émirats Arabes Unis', name_en: \"United Arab Emirates\", flag: '🇦🇪' },\n SA: { name: 'Arabie Saoudite', name_en: \"Saudi Arabia\", flag: '🇸🇦' },\n QA: { name: 'Qatar', name_en: \"Qatar\", flag: '🇶🇦' },\n KW: { name: 'Koweït', name_en: \"Kuwait\", flag: '🇰🇼' },\n BH: { name: 'Bahreïn', name_en: \"Bahrain\", flag: '🇧🇭' },\n OM: { name: 'Oman', name_en: \"Oman\", flag: '🇴🇲' },\n JO: { name: 'Jordanie', name_en: \"Jordan\", flag: '🇯🇴' },\n LB: { name: 'Liban', name_en: \"Lebanon\", flag: '🇱🇧' },\n EG: { name: 'Égypte', name_en: \"Egypt\", flag: '🇪🇬' },\n MA: { name: 'Maroc', name_en: \"Morocco\", flag: '🇲🇦' },\n TN: { name: 'Tunisie', name_en: \"Tunisia\", flag: '🇹🇳' },\n DZ: { name: 'Algérie', name_en: \"Algeria\", flag: '🇩🇿' },\n SN: { name: 'Sénégal', name_en: \"Senegal\", flag: '🇸🇳' },\n CI: { name: 'Côte d\\'Ivoire', name_en: \"Ivory Coast\", flag: '🇨🇮' },\n NG: { name: 'Nigeria', name_en: \"Nigeria\", flag: '🇳🇬' },\n KE: { name: 'Kenya', name_en: \"Kenya\", flag: '🇰🇪' },\n ZA: { name: 'Afrique du Sud', name_en: \"South Africa\", flag: '🇿🇦' },\n BR: { name: 'Brésil', name_en: \"Brazil\", flag: '🇧🇷' },\n MX: { name: 'Mexique', name_en: \"Mexico\", flag: '🇲🇽' },\n AR: { name: 'Argentine', name_en: \"Argentina\", flag: '🇦🇷' },\n CL: { name: 'Chili', name_en: \"Chile\", flag: '🇨🇱' },\n PE: { name: 'Pérou', name_en: \"Peru\", flag: '🇵🇪' },\n CO: { name: 'Colombie', name_en: \"Colombia\", flag: '🇨🇴' },\n VE: { name: 'Venezuela', name_en: \"Venezuela\", flag: '🇻🇪' },\n EC: { name: 'Équateur', name_en: \"Ecuador\", flag: '🇪🇨' },\n UY: { name: 'Uruguay', name_en: \"Uruguay\", flag: '🇺🇾' },\n PY: { name: 'Paraguay', name_en: \"Paraguay\", flag: '🇵🇾' },\n BO: { name: 'Bolivie', name_en: \"Bolivia\", flag: '🇧🇴' },\n IN: { name: 'Inde', name_en: \"India\", flag: '🇮🇳' },\n CN: { name: 'Chine', name_en: \"China\", flag: '🇨🇳' },\n TH: { name: 'Thaïlande', name_en: \"Thailand\", flag: '🇹🇭' },\n VN: { name: 'Vietnam', name_en: \"Vietnam\", flag: '🇻🇳' },\n ID: { name: 'Indonésie', name_en: \"Indonesia\", flag: '🇮🇩' },\n MY: { name: 'Malaisie', name_en: \"Malaysia\", flag: '🇲🇾' },\n PH: { name: 'Philippines', name_en: \"Philippines\", flag: '🇵🇭' },\n TR: { name: 'Turquie', name_en: \"Turkey\", flag: '🇹🇷' },\n IL: { name: 'Israël', name_en: \"Israel\", flag: '🇮🇱' },\n RU: { name: 'Russie', name_en: \"Russia\", flag: '🇷🇺' },\n UA: { name: 'Ukraine', name_en: \"Ukraine\", flag: '🇺🇦' },\n PL: { name: 'Pologne', name_en: \"Poland\", flag: '🇵🇱' },\n CZ: { name: 'République Tchèque', name_en: \"Czech Republic\", flag: '🇨🇿' },\n HU: { name: 'Hongrie', name_en: \"Hungary\", flag: '🇭🇺' },\n RO: { name: 'Roumanie', name_en: \"Romania\", flag: '🇷🇴' },\n BG: { name: 'Bulgarie', name_en: \"Bulgaria\", flag: '🇧🇬' },\n HR: { name: 'Croatie', name_en: \"Croatia\", flag: '🇭🇷' },\n SI: { name: 'Slovénie', name_en: \"Slovenia\", flag: '🇸🇮' },\n SK: { name: 'Slovaquie', name_en: \"Slovakia\", flag: '🇸🇰' },\n LT: { name: 'Lituanie', name_en: \"Lithuania\", flag: '🇱🇹' },\n LV: { name: 'Lettonie', name_en: \"Latvia\", flag: '🇱🇻' },\n EE: { name: 'Estonie', name_en: \"Estonia\", flag: '🇪🇪' },\n FI: { name: 'Finlande', name_en: \"Finland\", flag: '🇫🇮' },\n SE: { name: 'Suède', name_en: \"Sweden\", flag: '🇸🇪' },\n NO: { name: 'Norvège', name_en: \"Norway\", flag: '🇳🇴' },\n DK: { name: 'Danemark', name_en: \"Denmark\", flag: '🇩🇰' },\n IS: { name: 'Islande', name_en: \"Iceland\", flag: '🇮🇸' },\n IE: { name: 'Irlande', name_en: \"Ireland\", flag: '🇮🇪' },\n NZ: { name: 'Nouvelle-Zélande', name_en: \"New Zealand\", flag: '🇳🇿' },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"region_mapping.d.ts","sourceRoot":"","sources":["../../src/config/region_mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,CA6qB5F,CAAA"}
|