@transfergratis/react-native-sdk 0.1.13 → 0.1.15
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/android/build.gradle +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +2 -18
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.js +1 -1
- package/build/components/KYCElements/VerificationProgressTemplate.js.map +1 -1
- package/build/components/TemplateKYCExample.js +0 -64
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +6 -12
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +1 -0
- package/build/i18n/en/index.d.ts.map +1 -1
- package/build/i18n/en/index.js +2 -1
- package/build/i18n/en/index.js.map +1 -1
- package/build/i18n/fr/index.d.ts +1 -0
- package/build/i18n/fr/index.d.ts.map +1 -1
- package/build/i18n/fr/index.js +2 -1
- package/build/i18n/fr/index.js.map +1 -1
- package/build/i18n/types.d.ts +1 -0
- package/build/i18n/types.d.ts.map +1 -1
- package/build/i18n/types.js.map +1 -1
- package/build/modules/camera/VisionCameraModule.d.ts.map +1 -1
- package/build/modules/camera/VisionCameraModule.js +74 -6
- package/build/modules/camera/VisionCameraModule.js.map +1 -1
- package/build/utils/pathToBase64.d.ts.map +1 -1
- package/build/utils/pathToBase64.js +8 -6
- package/build/utils/pathToBase64.js.map +1 -1
- package/package.json +1 -1
- package/src/components/KYCElements/IDCardCapture.tsx +2 -19
- package/src/components/KYCElements/VerificationProgressTemplate.tsx +1 -1
- package/src/components/TemplateKYCExample.tsx +0 -65
- package/src/hooks/useTemplateKYCFlow.tsx +7 -12
- package/src/i18n/en/index.ts +2 -1
- package/src/i18n/fr/index.ts +2 -1
- package/src/i18n/types.ts +1 -0
- package/src/modules/camera/VisionCameraModule.ts +77 -8
- package/src/utils/pathToBase64.ts +8 -6
|
@@ -70,8 +70,8 @@ export const useTemplateKYCFlow = (template, onComplete, onError, onCancel, init
|
|
|
70
70
|
}, []);
|
|
71
71
|
const templateWithReview = useMemo(() => ensureReviewSubmitStep(template), [template, ensureReviewSubmitStep]);
|
|
72
72
|
const templateWithReviewAndVerification = useMemo(() => ensureVerificationProgressStep(templateWithReview), [templateWithReview, ensureVerificationProgressStep]);
|
|
73
|
-
// État du flux
|
|
74
|
-
const
|
|
73
|
+
// État initial du flux
|
|
74
|
+
const buildInitialState = () => ({
|
|
75
75
|
template: templateWithReviewAndVerification,
|
|
76
76
|
currentComponentIndex: 0,
|
|
77
77
|
completedComponents: [],
|
|
@@ -91,6 +91,8 @@ export const useTemplateKYCFlow = (template, onComplete, onError, onCancel, init
|
|
|
91
91
|
status: 'idle',
|
|
92
92
|
},
|
|
93
93
|
});
|
|
94
|
+
// État du flux
|
|
95
|
+
const [state, setState] = useState(() => buildInitialState());
|
|
94
96
|
const mapComponentTypeToAction = useCallback((type) => {
|
|
95
97
|
switch (type) {
|
|
96
98
|
case 'id_card':
|
|
@@ -490,16 +492,8 @@ export const useTemplateKYCFlow = (template, onComplete, onError, onCancel, init
|
|
|
490
492
|
}, [state.template.components, state.verification, state.currentComponentIndex, validateComponent, state.componentData, onComplete, onError]),
|
|
491
493
|
// Réinitialiser le template
|
|
492
494
|
resetTemplate: useCallback(() => {
|
|
493
|
-
setState(
|
|
494
|
-
|
|
495
|
-
currentComponentIndex: 0,
|
|
496
|
-
completedComponents: [],
|
|
497
|
-
componentData: {},
|
|
498
|
-
errors: {},
|
|
499
|
-
isProcessing: false,
|
|
500
|
-
verification: { status: 'idle', result: undefined },
|
|
501
|
-
}));
|
|
502
|
-
}, []),
|
|
495
|
+
setState(buildInitialState());
|
|
496
|
+
}, [buildInitialState]),
|
|
503
497
|
// Changer la langue
|
|
504
498
|
setLanguage: useCallback((language) => {
|
|
505
499
|
setState(prev =>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,EAAE,CAAC;QAEN,oBAAoB,EAAE,WAAW,CAAC,CAAC,iBAAiB,EAAE,EAAE;YACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChB,GAAG,IAAI;gBACP,YAAY,EAAE,iBAAiB;aAChC,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,EAAE,CAAC;KACP,CAAC;IAEF,OAAO;QACL,KAAK;QACL,OAAO;QACP,gBAAgB;QAChB,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;QACV,gBAAgB;QAChB,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState, useCallback, useMemo, createContext, useContext, ReactNode, useEffect } from 'react';\nimport { KYCTemplate, TemplateState, TemplateActions, UseTemplateReturn, TemplateComponent, GovernmentDocumentType, VerificationState } from '../types/KYC.types';\nimport kycService, { authentification, truncateFields } from '../modules/api/KYCService';\nimport useI18n from './useI18n';\nimport { logger } from '../utils/logger';\n\n// Context pour le provider\ninterface TemplateKYCFlowContextType {\n state: TemplateState;\n actions: TemplateActions;\n currentComponent: any;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n getLocalizedText: (text: { en: string; fr: string;[key: string]: string }) => string;\n initializeSession: () => Promise<void>;\n}\n\nconst TemplateKYCFlowContext = createContext<TemplateKYCFlowContextType | undefined>(undefined);\n\n// Provider component\ninterface TemplateKYCFlowProviderProps {\n children: ReactNode;\n template: KYCTemplate;\n onComplete?: (data: VerificationState) => void;\n onError?: (error: string) => void;\n onCancel?: () => void;\n initialLanguage?: string;\n apiKey?: string;\n}\n\nexport const TemplateKYCFlowProvider: React.FC<TemplateKYCFlowProviderProps> = ({\n children,\n template,\n onComplete,\n onError,\n onCancel,\n initialLanguage = 'en',\n apiKey,\n}) => {\n const hookResult = useTemplateKYCFlow(template, onComplete, onError, onCancel, initialLanguage, apiKey);\n\n return (\n <TemplateKYCFlowContext.Provider value={hookResult}>\n {children}\n </TemplateKYCFlowContext.Provider>\n );\n};\n\n// Hook pour utiliser le context\nexport const useTemplateKYCFlowContext = (): TemplateKYCFlowContextType => {\n const context = useContext(TemplateKYCFlowContext);\n if (!context) {\n throw new Error('useTemplateKYCFlowContext must be used within a TemplateKYCFlowProvider');\n }\n return context;\n};\n\nexport const useTemplateKYCFlow = (\n template: KYCTemplate,\n onComplete?: (data: VerificationState) => void,\n onError?: (error: string) => void,\n onCancel?: () => void,\n initialLanguage: string = 'en',\n apiKey?: string,\n): UseTemplateReturn => {\n\n const { setLocale } = useI18n();\n\n useEffect(() => {\n setLocale(initialLanguage);\n }, [initialLanguage]);\n\n // Helpers to align SDK steps with backend actions/templates\n const isUiOnlyStep = useCallback((type: TemplateComponent['type']) => {\n return type === 'verification_progress';\n }, []);\n\n\n\n const ensureReviewSubmitStep = useCallback((tpl: KYCTemplate): KYCTemplate => {\n const hasReview = tpl.components.some(c => c.type === 'review_submit');\n if (hasReview) return tpl;\n\n const lastOrder = tpl.components.reduce((acc, c) => Math.max(acc, c.order ?? 0), 0);\n const lastId = tpl.components.reduce((acc, c) => Math.max(acc, c.id), 0);\n\n const reviewComponent: TemplateComponent = {\n id: lastId + 1,\n type: 'review_submit',\n order: lastOrder + 1,\n labels: { en: 'Review & Submit', fr: 'Revoir & Soumettre' },\n instructions: { en: 'Confirm and submit', fr: 'Confirmer et soumettre' },\n ui: { buttonText: { en: 'Complete Verification', fr: 'Terminer la vérification' } },\n // @ts-ignore - config unused for review component\n config: {},\n } as TemplateComponent;\n\n return {\n ...tpl,\n components: [...tpl.components, reviewComponent],\n };\n }, []);\n\n const ensureVerificationProgressStep = useCallback((tpl: KYCTemplate): KYCTemplate => {\n const hasVerification = tpl.components.some(c => c.type === 'verification_progress');\n if (hasVerification) return tpl;\n\n const lastOrder = tpl.components.reduce((acc, c) => Math.max(acc, c.order ?? 0), 0);\n const lastId = tpl.components.reduce((acc, c) => Math.max(acc, c.id), 0);\n\n const verificationComponent: TemplateComponent = {\n id: lastId + 2,\n type: 'verification_progress',\n order: lastOrder + 2,\n labels: { en: 'Verification', fr: 'Vérification' },\n instructions: { en: 'We\\'re reviewing your documents', fr: 'Nous analysons vos documents' },\n ui: { buttonText: { en: '', fr: '' } },\n // @ts-ignore - config unused for progress component\n config: {},\n } as TemplateComponent;\n\n return {\n ...tpl,\n components: [...tpl.components, verificationComponent],\n };\n }, []);\n\n const templateWithReview = useMemo(() => ensureReviewSubmitStep(template), [template, ensureReviewSubmitStep]);\n const templateWithReviewAndVerification = useMemo(() => ensureVerificationProgressStep(templateWithReview), [templateWithReview, ensureVerificationProgressStep]);\n\n // État du flux\n const [state, setState] = useState<TemplateState>({\n template: templateWithReviewAndVerification,\n currentComponentIndex: 0,\n completedComponents: [],\n componentData: {},\n errors: {},\n isProcessing: false,\n currentLanguage: initialLanguage,\n showCustomStepper: true,\n session: {\n session_id: '',\n token: '',\n isInitialized: false,\n isProcessing: false,\n error: null,\n },\n verification: {\n status: 'idle',\n },\n });\n const mapComponentTypeToAction = useCallback((type: TemplateComponent['type']): string | null => {\n switch (type) {\n case 'id_card':\n case 'file_upload':\n return 'document_upload';\n case 'selfie':\n return 'selfie_capture';\n case 'location':\n return 'location_permission';\n case 'review_submit':\n return 'final_submit';\n case 'country_selection':\n // No direct backend action; pack into metadata of next actionable step\n return null;\n case 'initialization':\n return 'initialize_session';\n case 'verification_progress':\n return null; // UI-only\n default:\n return null;\n }\n }, []);\n\n const chooseTemplateId = useCallback((tpl: KYCTemplate): string => {\n const types = tpl.components.map(c => c.type);\n const hasLocation = types.includes('location');\n const hasSelfie = types.includes('selfie');\n const hasIdDoc = types.includes('id_card') || types.includes('file_upload');\n // Simple heuristic to map to backend examples\n if (hasLocation && hasSelfie && hasIdDoc) return 'enhanced_id';\n if (hasSelfie && hasIdDoc) return 'standard_passport';\n return 'standard_passport';\n }, []);\n\n\n const computeServerStepIndex = useCallback((tpl: KYCTemplate, upToIndex: number): number => {\n // Count actionable steps before the current component (exclude UI-only and country_selection)\n const actionable = tpl.components\n .slice(0, upToIndex)\n .filter(c => !isUiOnlyStep(c.type) && mapComponentTypeToAction(c.type) !== null);\n return actionable.length; // 0-based\n }, [isUiOnlyStep, mapComponentTypeToAction]);\n\n // Build backend-friendly payloads per action\n const buildPayloadForComponent = useCallback((action: string | null, component: TemplateComponent, rawData: any, templateId: string, step: number) => {\n const base = { template_id: null, step: component.order, permissionGranted: true } as any;\n if (!action) {\n return base;\n }\n // Document upload expects an array of documents with base64 and metadata\n if (action === 'document_upload') {\n const documents: Record<string, any> = {};\n if (rawData && typeof rawData === 'object') {\n Object.keys(rawData).forEach((key) => {\n documents[key] = rawData[key];\n });\n }\n return {\n ...base,\n documents,\n };\n }\n\n if (action === 'selfie_capture') {\n const documents: Record<string, any> = {};\n if (rawData && typeof rawData === 'object') {\n\n Object.keys(rawData).forEach((key) => {\n documents[key] = rawData[key];\n });\n }\n const idCardID = Object.keys(state.componentData).find((c: string) => c === \"1\");\n if (idCardID) {\n const _idCardData = state.componentData[idCardID];\n return { ...base, documents, country: _idCardData?.country || '', documentType: _idCardData?.documentType as GovernmentDocumentType || 'identity_card' };\n }\n // return { ...base, documents };\n }\n\n if (action === 'location_permission') {\n return { ...base, ...({ metadata: rawData || {} }), ...({ permissionGranted: true, }) };\n }\n\n // Default: wrap as metadata\n return { ...base, metadata: { ...(rawData || {}) } };\n }, [state.componentData]);\n // Ensure the template contains a final review step\n\n\n\n\n\n // Composant actuel\n const currentComponent = useMemo(() => {\n return state.template.components[state.currentComponentIndex] || null;\n }, [state.template.components, state.currentComponentIndex]);\n\n // Progression du flux\n const progress = useMemo(() => {\n return state.template.components.length > 0\n ? ((state.currentComponentIndex + 1) / state.template.components.length) * 100\n : 0;\n }, [state.currentComponentIndex, state.template.components.length]);\n\n // Vérifications de navigation\n const canGoNext = useMemo(() => {\n return state.currentComponentIndex < state.template.components.length - 1;\n }, [state.currentComponentIndex, state.template.components.length]);\n\n const canGoPrevious = useMemo(() => {\n return state.currentComponentIndex > 0;\n }, [state.currentComponentIndex]);\n\n const isComplete = useMemo(() => {\n const atReview = state.template.components[state.currentComponentIndex]?.type === 'review_submit';\n const nonReviewCount = state.template.components.filter(c => c.type !== 'review_submit').length;\n const completedNonReview = state.completedComponents.length >= nonReviewCount;\n return atReview && completedNonReview;\n }, [state.currentComponentIndex, state.completedComponents.length, state.template.components]);\n\n // Fonction pour obtenir le texte localisé\n const getLocalizedText = useCallback((text: { en: string; fr: string;[key: string]: string }): string => {\n return text[state.currentLanguage] || text.en || '';\n }, [state.currentLanguage]);\n\n const initializeSession = useCallback(async () => {\n try {\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n isInitialized: false,\n isProcessing: true,\n error: null,\n },\n }));\n logger.log('Initializing session');\n\n const token = await authentification();\n\n const session = await kycService.newSession(token);\n\n // Align backend flow from step 0 with initialize_session\n try {\n const templateId = chooseTemplateId(templateWithReviewAndVerification);\n await kycService.verificationSession({\n session_id: session.session_id,\n step: 0,\n data: { template_id: templateId, metadata: { language: initialLanguage } },\n templateId: templateId,\n token: token,\n action: 'initialize_session'\n });\n } catch (e) {\n logger.error('Error initializing session:', JSON.stringify(e, null, 2));\n // Non-fatal: we will surface errors via state below if needed\n }\n\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n session_id: session.session_id,\n token: token,\n isInitialized: true,\n isProcessing: false,\n error: null,\n }\n }));\n } catch (error) {\n\n logger.error('Error initializing session:', JSON.stringify(error, null, 2));\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n isInitialized: false,\n isProcessing: false,\n error: \"Erreur lors de l'initialisation de la session\",\n },\n }));\n }\n }, []);\n // Validation d'un composant\n const validateComponent = useCallback((componentId: number): boolean => {\n const component = state.template.components.find(c => c.id === componentId);\n if (!component) return false;\n\n const componentData = state.componentData[componentId];\n\n switch (component.type) {\n case 'id_card':\n // Vérifier si au moins un côté a été capturé\n return componentData && Object.keys(componentData).length > 0;\n\n case 'selfie':\n // Vérifier si toutes les orientations ont été capturées\n const config = component.config as any;\n const orientations = config.orientations || ['front'];\n return componentData && orientations.every((orientation: string) => componentData[orientation]);\n\n case 'file_upload':\n // Vérifier si un fichier a été uploadé\n return componentData && componentData.file;\n\n case 'location':\n // Vérifier si la localisation a été obtenue\n return componentData && componentData.latitude && componentData.longitude;\n\n case 'country_selection':\n // Vérifier si un pays a été sélectionné\n logger.log(\"componentData\", truncateFields(componentData), componentId);\n\n return componentData && componentData.code && componentData.regionMapping;\n\n case 'review_submit':\n return true;\n default:\n return false;\n }\n }, [state.template.components, state.componentData]);\n\n // Actions du flux\n const actions: TemplateActions = {\n // Initialiser le template\n initializeTemplate: useCallback((newTemplate: KYCTemplate) => {\n const withReview = ensureReviewSubmitStep(newTemplate);\n const withVerification = ensureVerificationProgressStep(withReview);\n setState(prev => ({\n ...prev,\n template: withVerification,\n currentComponentIndex: 0,\n completedComponents: [],\n componentData: {},\n errors: {},\n isProcessing: false,\n verification: { status: 'idle', result: undefined },\n }));\n }, [ensureReviewSubmitStep, ensureVerificationProgressStep]),\n\n // Passer au composant suivant\n nextComponent: useCallback(async () => {\n if (!canGoNext) return;\n\n const currentComp = state.template.components[state.currentComponentIndex];\n if (!currentComp) return;\n\n setState(prev => ({\n ...prev,\n isProcessing: true,\n }));\n // Valider le composant actuel\n if (!validateComponent(currentComp.id)) {\n setState(prev => ({\n ...prev,\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: state.currentLanguage === \"en\" ? \"please complete this step before move on\" : \" 'Veuillez compléter cette étape avant de continuer'\"\n }\n }));\n return;\n\n }\n\n try {\n const component = state.template.components.find(c => c.id === currentComp.id);\n if (!component) return;\n if (component.type === 'review_submit') {\n // Move to verification screen and mark verification in progress\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n verification: { status: 'in_progress' },\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n return;\n }\n // Determine backend action and step index\n const action = mapComponentTypeToAction(component.type);\n const templateId = chooseTemplateId(state.template);\n const serverStep = computeServerStepIndex(state.template, state.currentComponentIndex);\n\n // Optionally send initialize_session at step 0 before first actionable action\n if (serverStep === 0) {\n try {\n // await kycService.verificationSession({\n // sessionId: state.session.session_id,\n // step: 0,\n // data: { template_id: templateId, metadata: { language: state.currentLanguage } },\n // templateId: templateId,\n // token: state.session.token,\n // action: 'initialize_session'\n // });\n } catch (e) {\n // if init fails, surface error below in the main call handling\n }\n }\n\n // Skip UI-only and data-only steps that have no backend action\n if (!action) {\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n return;\n }\n\n const step = serverStep === 0 && action !== 'initialize_session' ? 1 : serverStep;\n // Build payload data per action\n const payloadData = buildPayloadForComponent(action, component, state.componentData[currentComp.id], templateId, step);\n\n await kycService.verificationSession({\n session_id: state.session.session_id,\n step: step,\n data: payloadData,\n templateId: null,\n token: state.session.token,\n action: action\n });\n logger.log(\"currentComp state\", truncateFields(state));\n // Marquer comme complété et passer au suivant\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n ...(action === \"location_permission\" ? { permissionGranted: true } : {}),\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n\n } catch (error) {\n // console.error('Error validating component:', error);\n setState(prev => ({\n ...prev,\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: 'Erreur lors de la validation du composant'\n }\n }));\n }\n\n }, [canGoNext, state.currentComponentIndex, state.template.components, validateComponent]),\n\n // Retourner au composant précédent\n previousComponent: useCallback(() => {\n if (!canGoPrevious) return;\n\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex - 1,\n }));\n }, [canGoPrevious]),\n\n // Aller à un composant spécifique\n goToComponent: useCallback((componentId: number) => {\n const componentIndex = state.template.components.findIndex(c => c.id === componentId);\n if (componentIndex !== -1) {\n setState(prev => ({\n ...prev,\n currentComponentIndex: componentIndex,\n }));\n }\n }, [state.template.components]),\n\n // Mettre à jour les données d'un composant\n updateComponentData: useCallback((componentId: number, data: any) => {\n logger.log(\"updateComponentData\", componentId, JSON.stringify(truncateFields(data), null, 2));\n\n setState(prev => ({\n ...prev,\n componentData: {\n ...prev.componentData,\n [componentId]: data\n },\n errors: {\n ...prev.errors,\n [componentId]: ''\n }\n }));\n\n }, []),\n\n // Valider un composant\n validateComponent: useCallback((componentId: number) => {\n return validateComponent(componentId);\n }, [validateComponent]),\n // complet verification\n submitVerification: useCallback(async () => {\n setState(prev => ({ ...prev, isProcessing: true }));\n try {\n onComplete?.(state.verification);\n\n } catch (error) {\n setState(prev => ({ ...prev, isProcessing: false }));\n }\n }, [state.session.session_id, state.verification, onComplete]),\n \n // Soumettre le template complet\n submitTemplate: useCallback(async () => {\n // Allow submission when on the review step and all previous steps are valid\n const atReview = state.template.components[state.currentComponentIndex]?.type === 'review_submit';\n const allValid = state.template.components\n .filter(c => c.type !== 'review_submit')\n .every(comp => validateComponent(comp.id));\n if (!(atReview && allValid)) {\n onError?.('Le flux KYC n\\'est pas encore terminé');\n return;\n }\n\n setState(prev => ({ ...prev, isProcessing: true }));\n\n try {\n // Vérifier que tous les composants (hors review) sont validés\n if (!allValid) throw new Error('Certaines étapes ne sont pas complètes');\n\n // Appeler le callback de completion\n // onComplete?.(state.componentData);\n\n setState(prev => ({ ...prev, isProcessing: false }));\n } catch (error) {\n setState(prev => ({ ...prev, isProcessing: false }));\n onError?.(error instanceof Error ? error.message : 'Erreur lors de la soumission');\n }\n }, [state.template.components, state.verification, state.currentComponentIndex, validateComponent, state.componentData, onComplete, onError]),\n\n // Réinitialiser le template\n resetTemplate: useCallback(() => {\n setState(prev => ({\n ...prev,\n currentComponentIndex: 0,\n completedComponents: [],\n componentData: {},\n errors: {},\n isProcessing: false,\n verification: { status: 'idle', result: undefined },\n }));\n }, []),\n\n // Changer la langue\n setLanguage: useCallback((language: string) => {\n setState(prev => ({\n ...prev,\n currentLanguage: language,\n }));\n }, []),\n\n // Afficher le stepper personnalisé\n showCustomStepper: useCallback((show: boolean) => {\n setState(prev => ({\n ...prev,\n showCustomStepper: show,\n }));\n }, []),\n\n setVerificationState: useCallback((verificationState) => {\n setState(prev => ({\n ...prev,\n verification: verificationState,\n }));\n }, []),\n };\n\n return {\n state,\n actions,\n currentComponent,\n progress,\n canGoNext,\n canGoPrevious,\n isComplete,\n getLocalizedText,\n initializeSession,\n };\n}; "]}
|
|
1
|
+
{"version":3,"file":"useTemplateKYCFlow.js","sourceRoot":"","sources":["../../src/hooks/useTemplateKYCFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/G,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAezC,MAAM,sBAAsB,GAAG,aAAa,CAAyC,SAAS,CAAC,CAAC;AAahG,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IAExG,OAAO,CACL,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CACjD;MAAA,CAAC,QAAQ,CACX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AC1B,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,EAAE,CAAC;QAEN,mCAAmC;QACnC,iBAAiB,EAAE,WAAW,CAAC,CAAC,IAAa,EAAE,EAAE;YAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChB,GAAG,IAAI;gBACP,iBAAiB,EAAE,IAAI;aACxB,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,EAAE,CAAC;QAEN,oBAAoB,EAAE,WAAW,CAAC,CAAC,iBAAiB,EAAE,EAAE;YACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChB,GAAG,IAAI;gBACP,YAAY,EAAE,iBAAiB;aAChC,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,EAAE,CAAC;KACP,CAAC;IAEF,OAAO;QACL,KAAK;QACL,OAAO;QACP,gBAAgB;QAChB,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;QACV,gBAAgB;QAChB,iBAAiB;KAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState, useCallback, useMemo, createContext, useContext, ReactNode, useEffect } from 'react';\nimport { KYCTemplate, TemplateState, TemplateActions, UseTemplateReturn, TemplateComponent, GovernmentDocumentType, VerificationState } from '../types/KYC.types';\nimport kycService, { authentification, truncateFields } from '../modules/api/KYCService';\nimport useI18n from './useI18n';\nimport { logger } from '../utils/logger';\n\n// Context pour le provider\ninterface TemplateKYCFlowContextType {\n state: TemplateState;\n actions: TemplateActions;\n currentComponent: any;\n progress: number;\n canGoNext: boolean;\n canGoPrevious: boolean;\n isComplete: boolean;\n getLocalizedText: (text: { en: string; fr: string;[key: string]: string }) => string;\n initializeSession: () => Promise<void>;\n}\n\nconst TemplateKYCFlowContext = createContext<TemplateKYCFlowContextType | undefined>(undefined);\n\n// Provider component\ninterface TemplateKYCFlowProviderProps {\n children: ReactNode;\n template: KYCTemplate;\n onComplete?: (data: VerificationState) => void;\n onError?: (error: string) => void;\n onCancel?: () => void;\n initialLanguage?: string;\n apiKey?: string;\n}\n\nexport const TemplateKYCFlowProvider: React.FC<TemplateKYCFlowProviderProps> = ({\n children,\n template,\n onComplete,\n onError,\n onCancel,\n initialLanguage = 'en',\n apiKey,\n}) => {\n const hookResult = useTemplateKYCFlow(template, onComplete, onError, onCancel, initialLanguage, apiKey);\n\n return (\n <TemplateKYCFlowContext.Provider value={hookResult}>\n {children}\n </TemplateKYCFlowContext.Provider>\n );\n};\n\n// Hook pour utiliser le context\nexport const useTemplateKYCFlowContext = (): TemplateKYCFlowContextType => {\n const context = useContext(TemplateKYCFlowContext);\n if (!context) {\n throw new Error('useTemplateKYCFlowContext must be used within a TemplateKYCFlowProvider');\n }\n return context;\n};\n\nexport const useTemplateKYCFlow = (\n template: KYCTemplate,\n onComplete?: (data: VerificationState) => void,\n onError?: (error: string) => void,\n onCancel?: () => void,\n initialLanguage: string = 'en',\n apiKey?: string,\n): UseTemplateReturn => {\n\n const { setLocale } = useI18n();\n\n useEffect(() => {\n setLocale(initialLanguage);\n }, [initialLanguage]);\n\n // Helpers to align SDK steps with backend actions/templates\n const isUiOnlyStep = useCallback((type: TemplateComponent['type']) => {\n return type === 'verification_progress';\n }, []);\n\n\n\n const ensureReviewSubmitStep = useCallback((tpl: KYCTemplate): KYCTemplate => {\n const hasReview = tpl.components.some(c => c.type === 'review_submit');\n if (hasReview) return tpl;\n\n const lastOrder = tpl.components.reduce((acc, c) => Math.max(acc, c.order ?? 0), 0);\n const lastId = tpl.components.reduce((acc, c) => Math.max(acc, c.id), 0);\n\n const reviewComponent: TemplateComponent = {\n id: lastId + 1,\n type: 'review_submit',\n order: lastOrder + 1,\n labels: { en: 'Review & Submit', fr: 'Revoir & Soumettre' },\n instructions: { en: 'Confirm and submit', fr: 'Confirmer et soumettre' },\n ui: { buttonText: { en: 'Complete Verification', fr: 'Terminer la vérification' } },\n // @ts-ignore - config unused for review component\n config: {},\n } as TemplateComponent;\n\n return {\n ...tpl,\n components: [...tpl.components, reviewComponent],\n };\n }, []);\n\n const ensureVerificationProgressStep = useCallback((tpl: KYCTemplate): KYCTemplate => {\n const hasVerification = tpl.components.some(c => c.type === 'verification_progress');\n if (hasVerification) return tpl;\n\n const lastOrder = tpl.components.reduce((acc, c) => Math.max(acc, c.order ?? 0), 0);\n const lastId = tpl.components.reduce((acc, c) => Math.max(acc, c.id), 0);\n\n const verificationComponent: TemplateComponent = {\n id: lastId + 2,\n type: 'verification_progress',\n order: lastOrder + 2,\n labels: { en: 'Verification', fr: 'Vérification' },\n instructions: { en: 'We\\'re reviewing your documents', fr: 'Nous analysons vos documents' },\n ui: { buttonText: { en: '', fr: '' } },\n // @ts-ignore - config unused for progress component\n config: {},\n } as TemplateComponent;\n\n return {\n ...tpl,\n components: [...tpl.components, verificationComponent],\n };\n }, []);\n\n const templateWithReview = useMemo(() => ensureReviewSubmitStep(template), [template, ensureReviewSubmitStep]);\n const templateWithReviewAndVerification = useMemo(() => ensureVerificationProgressStep(templateWithReview), [templateWithReview, ensureVerificationProgressStep]);\n\n // État initial du flux\n const buildInitialState = (): TemplateState => ({\n template: templateWithReviewAndVerification,\n currentComponentIndex: 0,\n completedComponents: [],\n componentData: {},\n errors: {},\n isProcessing: false,\n currentLanguage: initialLanguage,\n showCustomStepper: true,\n session: {\n session_id: '',\n token: '',\n isInitialized: false,\n isProcessing: false,\n error: null,\n },\n verification: {\n status: 'idle',\n },\n });\n\n // État du flux\n const [state, setState] = useState<TemplateState>(() => buildInitialState());\n const mapComponentTypeToAction = useCallback((type: TemplateComponent['type']): string | null => {\n switch (type) {\n case 'id_card':\n case 'file_upload':\n return 'document_upload';\n case 'selfie':\n return 'selfie_capture';\n case 'location':\n return 'location_permission';\n case 'review_submit':\n return 'final_submit';\n case 'country_selection':\n // No direct backend action; pack into metadata of next actionable step\n return null;\n case 'initialization':\n return 'initialize_session';\n case 'verification_progress':\n return null; // UI-only\n default:\n return null;\n }\n }, []);\n\n const chooseTemplateId = useCallback((tpl: KYCTemplate): string => {\n const types = tpl.components.map(c => c.type);\n const hasLocation = types.includes('location');\n const hasSelfie = types.includes('selfie');\n const hasIdDoc = types.includes('id_card') || types.includes('file_upload');\n // Simple heuristic to map to backend examples\n if (hasLocation && hasSelfie && hasIdDoc) return 'enhanced_id';\n if (hasSelfie && hasIdDoc) return 'standard_passport';\n return 'standard_passport';\n }, []);\n\n\n const computeServerStepIndex = useCallback((tpl: KYCTemplate, upToIndex: number): number => {\n // Count actionable steps before the current component (exclude UI-only and country_selection)\n const actionable = tpl.components\n .slice(0, upToIndex)\n .filter(c => !isUiOnlyStep(c.type) && mapComponentTypeToAction(c.type) !== null);\n return actionable.length; // 0-based\n }, [isUiOnlyStep, mapComponentTypeToAction]);\n\n // Build backend-friendly payloads per action\n const buildPayloadForComponent = useCallback((action: string | null, component: TemplateComponent, rawData: any, templateId: string, step: number) => {\n const base = { template_id: null, step: component.order, permissionGranted: true } as any;\n if (!action) {\n return base;\n }\n // Document upload expects an array of documents with base64 and metadata\n if (action === 'document_upload') {\n const documents: Record<string, any> = {};\n if (rawData && typeof rawData === 'object') {\n Object.keys(rawData).forEach((key) => {\n documents[key] = rawData[key];\n });\n }\n return {\n ...base,\n documents,\n };\n }\n\n if (action === 'selfie_capture') {\n const documents: Record<string, any> = {};\n if (rawData && typeof rawData === 'object') {\n\n Object.keys(rawData).forEach((key) => {\n documents[key] = rawData[key];\n });\n }\n const idCardID = Object.keys(state.componentData).find((c: string) => c === \"1\");\n if (idCardID) {\n const _idCardData = state.componentData[idCardID];\n return { ...base, documents, country: _idCardData?.country || '', documentType: _idCardData?.documentType as GovernmentDocumentType || 'identity_card' };\n }\n // return { ...base, documents };\n }\n\n if (action === 'location_permission') {\n return { ...base, ...({ metadata: rawData || {} }), ...({ permissionGranted: true, }) };\n }\n\n // Default: wrap as metadata\n return { ...base, metadata: { ...(rawData || {}) } };\n }, [state.componentData]);\n // Ensure the template contains a final review step\n\n\n\n\n\n // Composant actuel\n const currentComponent = useMemo(() => {\n return state.template.components[state.currentComponentIndex] || null;\n }, [state.template.components, state.currentComponentIndex]);\n\n // Progression du flux\n const progress = useMemo(() => {\n return state.template.components.length > 0\n ? ((state.currentComponentIndex + 1) / state.template.components.length) * 100\n : 0;\n }, [state.currentComponentIndex, state.template.components.length]);\n\n // Vérifications de navigation\n const canGoNext = useMemo(() => {\n return state.currentComponentIndex < state.template.components.length - 1;\n }, [state.currentComponentIndex, state.template.components.length]);\n\n const canGoPrevious = useMemo(() => {\n return state.currentComponentIndex > 0;\n }, [state.currentComponentIndex]);\n\n const isComplete = useMemo(() => {\n const atReview = state.template.components[state.currentComponentIndex]?.type === 'review_submit';\n const nonReviewCount = state.template.components.filter(c => c.type !== 'review_submit').length;\n const completedNonReview = state.completedComponents.length >= nonReviewCount;\n return atReview && completedNonReview;\n }, [state.currentComponentIndex, state.completedComponents.length, state.template.components]);\n\n // Fonction pour obtenir le texte localisé\n const getLocalizedText = useCallback((text: { en: string; fr: string;[key: string]: string }): string => {\n return text[state.currentLanguage] || text.en || '';\n }, [state.currentLanguage]);\n\n const initializeSession = useCallback(async () => {\n try {\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n isInitialized: false,\n isProcessing: true,\n error: null,\n },\n }));\n logger.log('Initializing session');\n\n const token = await authentification();\n\n const session = await kycService.newSession(token);\n\n // Align backend flow from step 0 with initialize_session\n try {\n const templateId = chooseTemplateId(templateWithReviewAndVerification);\n await kycService.verificationSession({\n session_id: session.session_id,\n step: 0,\n data: { template_id: templateId, metadata: { language: initialLanguage } },\n templateId: templateId,\n token: token,\n action: 'initialize_session'\n });\n } catch (e) {\n logger.error('Error initializing session:', JSON.stringify(e, null, 2));\n // Non-fatal: we will surface errors via state below if needed\n }\n\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n session_id: session.session_id,\n token: token,\n isInitialized: true,\n isProcessing: false,\n error: null,\n }\n }));\n } catch (error) {\n\n logger.error('Error initializing session:', JSON.stringify(error, null, 2));\n setState(prev => ({\n ...prev,\n session: {\n ...prev.session,\n isInitialized: false,\n isProcessing: false,\n error: \"Erreur lors de l'initialisation de la session\",\n },\n }));\n }\n }, []);\n // Validation d'un composant\n const validateComponent = useCallback((componentId: number): boolean => {\n const component = state.template.components.find(c => c.id === componentId);\n if (!component) return false;\n\n const componentData = state.componentData[componentId];\n\n switch (component.type) {\n case 'id_card':\n // Vérifier si au moins un côté a été capturé\n return componentData && Object.keys(componentData).length > 0;\n\n case 'selfie':\n // Vérifier si toutes les orientations ont été capturées\n const config = component.config as any;\n const orientations = config.orientations || ['front'];\n return componentData && orientations.every((orientation: string) => componentData[orientation]);\n\n case 'file_upload':\n // Vérifier si un fichier a été uploadé\n return componentData && componentData.file;\n\n case 'location':\n // Vérifier si la localisation a été obtenue\n return componentData && componentData.latitude && componentData.longitude;\n\n case 'country_selection':\n // Vérifier si un pays a été sélectionné\n logger.log(\"componentData\", truncateFields(componentData), componentId);\n\n return componentData && componentData.code && componentData.regionMapping;\n\n case 'review_submit':\n return true;\n default:\n return false;\n }\n }, [state.template.components, state.componentData]);\n\n // Actions du flux\n const actions: TemplateActions = {\n // Initialiser le template\n initializeTemplate: useCallback((newTemplate: KYCTemplate) => {\n const withReview = ensureReviewSubmitStep(newTemplate);\n const withVerification = ensureVerificationProgressStep(withReview);\n setState(prev => ({\n ...prev,\n template: withVerification,\n currentComponentIndex: 0,\n completedComponents: [],\n componentData: {},\n errors: {},\n isProcessing: false,\n verification: { status: 'idle', result: undefined },\n }));\n }, [ensureReviewSubmitStep, ensureVerificationProgressStep]),\n\n // Passer au composant suivant\n nextComponent: useCallback(async () => {\n if (!canGoNext) return;\n\n const currentComp = state.template.components[state.currentComponentIndex];\n if (!currentComp) return;\n\n setState(prev => ({\n ...prev,\n isProcessing: true,\n }));\n // Valider le composant actuel\n if (!validateComponent(currentComp.id)) {\n setState(prev => ({\n ...prev,\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: state.currentLanguage === \"en\" ? \"please complete this step before move on\" : \" 'Veuillez compléter cette étape avant de continuer'\"\n }\n }));\n return;\n\n }\n\n try {\n const component = state.template.components.find(c => c.id === currentComp.id);\n if (!component) return;\n if (component.type === 'review_submit') {\n // Move to verification screen and mark verification in progress\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n verification: { status: 'in_progress' },\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n return;\n }\n // Determine backend action and step index\n const action = mapComponentTypeToAction(component.type);\n const templateId = chooseTemplateId(state.template);\n const serverStep = computeServerStepIndex(state.template, state.currentComponentIndex);\n\n // Optionally send initialize_session at step 0 before first actionable action\n if (serverStep === 0) {\n try {\n // await kycService.verificationSession({\n // sessionId: state.session.session_id,\n // step: 0,\n // data: { template_id: templateId, metadata: { language: state.currentLanguage } },\n // templateId: templateId,\n // token: state.session.token,\n // action: 'initialize_session'\n // });\n } catch (e) {\n // if init fails, surface error below in the main call handling\n }\n }\n\n // Skip UI-only and data-only steps that have no backend action\n if (!action) {\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n return;\n }\n\n const step = serverStep === 0 && action !== 'initialize_session' ? 1 : serverStep;\n // Build payload data per action\n const payloadData = buildPayloadForComponent(action, component, state.componentData[currentComp.id], templateId, step);\n\n await kycService.verificationSession({\n session_id: state.session.session_id,\n step: step,\n data: payloadData,\n templateId: null,\n token: state.session.token,\n action: action\n });\n logger.log(\"currentComp state\", truncateFields(state));\n // Marquer comme complété et passer au suivant\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n isProcessing: false,\n ...(action === \"location_permission\" ? { permissionGranted: true } : {}),\n errors: {\n ...prev.errors,\n [currentComp.id]: ''\n }\n }));\n\n } catch (error) {\n // console.error('Error validating component:', error);\n setState(prev => ({\n ...prev,\n isProcessing: false,\n errors: {\n ...prev.errors,\n [currentComp.id]: 'Erreur lors de la validation du composant'\n }\n }));\n }\n\n }, [canGoNext, state.currentComponentIndex, state.template.components, validateComponent]),\n\n // Retourner au composant précédent\n previousComponent: useCallback(() => {\n if (!canGoPrevious) return;\n\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex - 1,\n }));\n }, [canGoPrevious]),\n\n // Aller à un composant spécifique\n goToComponent: useCallback((componentId: number) => {\n const componentIndex = state.template.components.findIndex(c => c.id === componentId);\n if (componentIndex !== -1) {\n setState(prev => ({\n ...prev,\n currentComponentIndex: componentIndex,\n }));\n }\n }, [state.template.components]),\n\n // Mettre à jour les données d'un composant\n updateComponentData: useCallback((componentId: number, data: any) => {\n logger.log(\"updateComponentData\", componentId, JSON.stringify(truncateFields(data), null, 2));\n\n setState(prev => ({\n ...prev,\n componentData: {\n ...prev.componentData,\n [componentId]: data\n },\n errors: {\n ...prev.errors,\n [componentId]: ''\n }\n }));\n\n }, []),\n\n // Valider un composant\n validateComponent: useCallback((componentId: number) => {\n return validateComponent(componentId);\n }, [validateComponent]),\n // complet verification\n submitVerification: useCallback(async () => {\n setState(prev => ({ ...prev, isProcessing: true }));\n try {\n onComplete?.(state.verification);\n\n } catch (error) {\n setState(prev => ({ ...prev, isProcessing: false }));\n }\n }, [state.session.session_id, state.verification, onComplete]),\n \n // Soumettre le template complet\n submitTemplate: useCallback(async () => {\n // Allow submission when on the review step and all previous steps are valid\n const atReview = state.template.components[state.currentComponentIndex]?.type === 'review_submit';\n const allValid = state.template.components\n .filter(c => c.type !== 'review_submit')\n .every(comp => validateComponent(comp.id));\n if (!(atReview && allValid)) {\n onError?.('Le flux KYC n\\'est pas encore terminé');\n return;\n }\n\n setState(prev => ({ ...prev, isProcessing: true }));\n\n try {\n // Vérifier que tous les composants (hors review) sont validés\n if (!allValid) throw new Error('Certaines étapes ne sont pas complètes');\n\n // Appeler le callback de completion\n // onComplete?.(state.componentData);\n\n setState(prev => ({ ...prev, isProcessing: false }));\n } catch (error) {\n setState(prev => ({ ...prev, isProcessing: false }));\n onError?.(error instanceof Error ? error.message : 'Erreur lors de la soumission');\n }\n }, [state.template.components, state.verification, state.currentComponentIndex, validateComponent, state.componentData, onComplete, onError]),\n\n // Réinitialiser le template\n resetTemplate: useCallback(() => {\n setState(buildInitialState());\n }, [buildInitialState]),\n\n // Changer la langue\n setLanguage: useCallback((language: string) => {\n setState(prev => ({\n ...prev,\n currentLanguage: language,\n }));\n }, []),\n\n // Afficher le stepper personnalisé\n showCustomStepper: useCallback((show: boolean) => {\n setState(prev => ({\n ...prev,\n showCustomStepper: show,\n }));\n }, []),\n\n setVerificationState: useCallback((verificationState) => {\n setState(prev => ({\n ...prev,\n verification: verificationState,\n }));\n }, []),\n };\n\n return {\n state,\n actions,\n currentComponent,\n progress,\n canGoNext,\n canGoPrevious,\n isComplete,\n getLocalizedText,\n initializeSession,\n };\n}; "]}
|
package/build/i18n/en/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Nd,CAAC"}
|
package/build/i18n/en/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names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O,EAAE,UAAU;QACnB,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,eAAe;QAC3B,kBAAkB,EAAE,kEAAkE;QACtF,kBAAkB,EAAE,6BAA6B;QACjD,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,cAAc;QACzB,aAAa,EAAE,uBAAuB;QACtC,eAAe,EAAE,yBAAyB;QAC1C,sBAAsB,EAAE,iCAAiC;QACzD,qBAAqB,EAAE,gCAAgC;KACxD;IAED,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,8CAA8C;QAC5D,WAAW,EAAE,uCAAuC;QACpD,eAAe,EAAE,8CAA8C;QAC/D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,+BAA+B;QAC1C,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,8CAA8C;KAC7D;IAED,sBAAsB;IACtB,UAAU,EAAE;QACV,QAAQ,EAAE,wBAAwB;QAClC,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,mCAAmC;QACjD,WAAW,EAAE,2BAA2B;QACxC,SAAS,EAAE,oCAAoC;QAC/C,SAAS,EAAE,wCAAwC;QACnD,aAAa,EAAE,gBAAgB;QAC/B,YAAY,EAAE,mBAAmB;QACjC,oBAAoB,EAAE,yBAAyB;KAChD;CACF,CAAC","sourcesContent":["export const en = {\n // Common UI elements\n common: {\n next: 'Next',\n previous: 'Previous',\n continue: 'Continue',\n cancel: 'Cancel',\n confirm: 'Confirm',\n submit: 'Submit',\n retry: 'Retry',\n close: 'Close',\n back: 'Back',\n loading: 'Loading...',\n error: 'Error',\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Identity Verification',\n subtitle: 'Complete your identity verification to continue',\n step: 'Step %{current} of %{total}',\n \n // Initialization\n initialization: {\n title: 'Welcome to Identity Verification',\n description: 'We need to verify your identity to comply with regulations and ensure security.',\n startButton: 'Start Verification',\n requirements: 'What you\\'ll need:',\n requirementsList: [\n 'Valid government-issued ID',\n 'Good lighting for photos',\n 'Stable internet connection'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Secure Your Verification',\n description: 'Allow location access to help us protect your account and prevent fraudulent activity during verification.',\n howThisHelps: 'How this helps:',\n howThisHelpsList: '• Verifies your device location matches your identity\\n• Detects and prevents unauthorized access\\n• Ensures compliance with security regulations',\n permissionDeniedTitle: 'Permission denied',\n permissionDeniedMessage: 'Location permission is required to continue.',\n locationDisabledTitle: 'Location disabled',\n locationDisabledMessage: 'Please enable location services on your device to continue.',\n errorTitle: 'Error',\n errorMessage: 'Unable to retrieve your location. Please try again.',\n obtained: 'Location obtained',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Accuracy',\n resetButton: 'Reset',\n enableButton: 'Enable Location Access',\n fetching: 'Fetching...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Select Your Country',\n subtitle: 'Choose the country that issued your ID document',\n searchPlaceholder: 'Search for your country...',\n noResults: 'No countries found',\n selectCountry: 'Select Country'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capture Your ID Document',\n subtitle: 'Take a clear photo of your ID document',\n frontSide: 'Front Side',\n backSide: 'Back Side',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Place your ID on a flat surface',\n 'Ensure good lighting',\n 'Keep the entire document in frame',\n 'Avoid glare and shadows'\n ]\n },\n captureButton: 'Capture Photo',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing image...',\n success: 'ID captured successfully',\n error: 'Failed to capture ID. Please try again.'\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Take a Selfie',\n subtitle: 'Take a clear selfie for identity verification',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Look directly at the camera',\n 'Ensure good lighting on your face',\n 'Remove glasses and hats',\n 'Keep a neutral expression'\n ]\n },\n captureButton: 'Take Selfie',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing selfie...',\n success: 'Selfie captured successfully',\n error: 'Failed to capture selfie. Please try again.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Upload Document',\n subtitle: 'Upload a clear photo of your document',\n selectFile: 'Select File',\n uploadButton: 'Upload',\n dragDropText: 'Drag and drop your file here, or click to select',\n supportedFormats: 'Supported formats: JPG, PNG, PDF',\n maxSize: 'Max file size: 10MB',\n processing: 'Processing file...',\n success: 'File uploaded successfully',\n error: 'Failed to upload file. Please try again.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Verifying Your Identity',\n subtitle: 'Please wait while we verify your information',\n steps: {\n analyzing: 'Analyzing documents...',\n extracting: 'Extracting information...',\n verifying: 'Verifying identity...',\n complete: 'Verification complete'\n },\n retrying: 'Retrying ( %{current} / %{max} )',\n estimatedTime: 'Estimated time: 2-3 minutes',\n status: {\n pending: 'Pending',\n processing: 'Processing',\n completed: 'Completed',\n failed: 'Failed'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Review Your Information',\n subtitle: 'Please review the information we extracted',\n personalInfo: 'Personal Information',\n documentInfo: 'Document Information',\n editButton: 'Edit',\n submitButton: 'Submit for Verification',\n confirmMessage: 'Are you sure you want to submit this information?',\n processing: 'Submitting...',\n success: 'Information submitted successfully',\n error: 'Failed to submit information. Please try again.',\n selfieSide: {\n center: 'Center',\n right: 'Right',\n left: 'Left'\n }\n },\n\n // Cancel Confirmation\n cancelConfirmation: {\n title: 'Are you sure you want to cancel?',\n message: 'You will lose all your progress.',\n cancelButton: 'Cancel',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Camera Permission Required',\n permissionMessage: 'We need access to your camera to capture your ID and selfie.',\n permissionButton: 'Grant Permission',\n settingsButton: 'Open Settings',\n notAvailable: 'Camera not available',\n switchCamera: 'Switch Camera',\n flashOn: 'Flash On',\n flashOff: 'Flash Off',\n capturePhoto: 'Capture Photo',\n processing: 'Processing...',\n permissionRequired: 'Camera permission required. Please grant permission to continue.',\n deviceNotAvailable: 'Camera device not available',\n notReady: 'Camera not ready',\n analyzing: 'Analyzing...',\n errorOccurred: 'Camera error occurred',\n failedToCapture: 'Failed to capture photo',\n failedToStartRecording: 'Failed to start video recording',\n failedToStopRecording: 'Failed to stop video recording'\n },\n\n // Errors\n errors: {\n networkError: 'Network error. Please check your connection.',\n serverError: 'Server error. Please try again later.',\n validationError: 'Please check your information and try again.',\n cameraError: 'Camera error. Please try again.',\n fileError: 'File error. Please try again.',\n timeoutError: 'Request timeout. Please try again.',\n unknownError: 'An unknown error occurred. Please try again.'\n },\n\n // Validation messages\n validation: {\n required: 'This field is required',\n invalidEmail: 'Please enter a valid email address',\n invalidPhone: 'Please enter a valid phone number',\n invalidDate: 'Please enter a valid date',\n minLength: 'Must be at least %{min} characters',\n maxLength: 'Must be no more than %{max} characters',\n invalidFormat: 'Invalid format',\n fileTooLarge: 'File is too large',\n fileTypeNotSupported: 'File type not supported'\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,aAAa;KACpB;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,iDAAiD;QAC3D,IAAI,EAAE,6BAA6B;QAEnC,iB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AY,EAAE,8CAA8C;KAC7D;IAED,sBAAsB;IACtB,UAAU,EAAE;QACV,QAAQ,EAAE,wBAAwB;QAClC,YAAY,EAAE,oCAAoC;QAClD,YAAY,EAAE,mCAAmC;QACjD,WAAW,EAAE,2BAA2B;QACxC,SAAS,EAAE,oCAAoC;QAC/C,SAAS,EAAE,wCAAwC;QACnD,aAAa,EAAE,gBAAgB;QAC/B,YAAY,EAAE,mBAAmB;QACjC,oBAAoB,EAAE,yBAAyB;KAChD;CACF,CAAC","sourcesContent":["export const en = {\n // Common UI elements\n common: {\n next: 'Next',\n previous: 'Previous',\n continue: 'Continue',\n cancel: 'Cancel',\n confirm: 'Confirm',\n submit: 'Submit',\n retry: 'Retry',\n close: 'Close',\n back: 'Back',\n loading: 'Loading...',\n error: 'Error',\n success: 'Success',\n warning: 'Warning',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Identity Verification',\n subtitle: 'Complete your identity verification to continue',\n step: 'Step %{current} of %{total}',\n \n // Initialization\n initialization: {\n title: 'Welcome to Identity Verification',\n description: 'We need to verify your identity to comply with regulations and ensure security.',\n startButton: 'Start Verification',\n requirements: 'What you\\'ll need:',\n requirementsList: [\n 'Valid government-issued ID',\n 'Good lighting for photos',\n 'Stable internet connection'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Secure Your Verification',\n description: 'Allow location access to help us protect your account and prevent fraudulent activity during verification.',\n howThisHelps: 'How this helps:',\n howThisHelpsList: '• Verifies your device location matches your identity\\n• Detects and prevents unauthorized access\\n• Ensures compliance with security regulations',\n permissionDeniedTitle: 'Permission denied',\n permissionDeniedMessage: 'Location permission is required to continue.',\n locationDisabledTitle: 'Location disabled',\n locationDisabledMessage: 'Please enable location services on your device to continue.',\n errorTitle: 'Error',\n errorMessage: 'Unable to retrieve your location. Please try again.',\n obtained: 'Location obtained',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Accuracy',\n resetButton: 'Reset',\n enableButton: 'Enable Location Access',\n fetching: 'Fetching...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Select Your Country',\n subtitle: 'Choose the country that issued your ID document',\n searchPlaceholder: 'Search for your country...',\n noResults: 'No countries found',\n selectCountry: 'Select Country'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capture Your ID Document',\n subtitle: 'Take a clear photo of your ID document',\n frontSide: 'Front Side',\n backSide: 'Back Side',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Place your ID on a flat surface',\n 'Ensure good lighting',\n 'Keep the entire document in frame',\n 'Avoid glare and shadows'\n ]\n },\n captureButton: 'Capture Photo',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing image...',\n success: 'ID captured successfully',\n error: 'Failed to capture ID. Please try again.'\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Take a Selfie',\n subtitle: 'Take a clear selfie for identity verification',\n instructions: {\n title: 'Instructions:',\n list: [\n 'Look directly at the camera',\n 'Ensure good lighting on your face',\n 'Remove glasses and hats',\n 'Keep a neutral expression'\n ]\n },\n captureButton: 'Take Selfie',\n retakeButton: 'Retake',\n usePhotoButton: 'Use This Photo',\n processing: 'Processing selfie...',\n success: 'Selfie captured successfully',\n error: 'Failed to capture selfie. Please try again.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Upload Document',\n subtitle: 'Upload a clear photo of your document',\n selectFile: 'Select File',\n uploadButton: 'Upload',\n dragDropText: 'Drag and drop your file here, or click to select',\n supportedFormats: 'Supported formats: JPG, PNG, PDF',\n maxSize: 'Max file size: 10MB',\n processing: 'Processing file...',\n success: 'File uploaded successfully',\n error: 'Failed to upload file. Please try again.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Verifying Your Identity',\n subtitle: 'Please wait while we verify your information',\n steps: {\n analyzing: 'Analyzing documents...',\n extracting: 'Extracting information...',\n verifying: 'Verifying identity...',\n complete: 'Verification complete'\n },\n retrying: 'Retrying ( %{current} / %{max} )',\n estimatedTime: 'Estimated time: 2-3 minutes',\n status: {\n pending: 'Pending',\n processing: 'Processing',\n completed: 'Completed',\n failed: 'Failed',\n retry: 'Retry'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Review Your Information',\n subtitle: 'Please review the information we extracted',\n personalInfo: 'Personal Information',\n documentInfo: 'Document Information',\n editButton: 'Edit',\n submitButton: 'Submit for Verification',\n confirmMessage: 'Are you sure you want to submit this information?',\n processing: 'Submitting...',\n success: 'Information submitted successfully',\n error: 'Failed to submit information. Please try again.',\n selfieSide: {\n center: 'Center',\n right: 'Right',\n left: 'Left'\n }\n },\n\n // Cancel Confirmation\n cancelConfirmation: {\n title: 'Are you sure you want to cancel?',\n message: 'You will lose all your progress.',\n cancelButton: 'Cancel',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Camera Permission Required',\n permissionMessage: 'We need access to your camera to capture your ID and selfie.',\n permissionButton: 'Grant Permission',\n settingsButton: 'Open Settings',\n notAvailable: 'Camera not available',\n switchCamera: 'Switch Camera',\n flashOn: 'Flash On',\n flashOff: 'Flash Off',\n capturePhoto: 'Capture Photo',\n processing: 'Processing...',\n permissionRequired: 'Camera permission required. Please grant permission to continue.',\n deviceNotAvailable: 'Camera device not available',\n notReady: 'Camera not ready',\n analyzing: 'Analyzing...',\n errorOccurred: 'Camera error occurred',\n failedToCapture: 'Failed to capture photo',\n failedToStartRecording: 'Failed to start video recording',\n failedToStopRecording: 'Failed to stop video recording'\n },\n\n // Errors\n errors: {\n networkError: 'Network error. Please check your connection.',\n serverError: 'Server error. Please try again later.',\n validationError: 'Please check your information and try again.',\n cameraError: 'Camera error. Please try again.',\n fileError: 'File error. Please try again.',\n timeoutError: 'Request timeout. Please try again.',\n unknownError: 'An unknown error occurred. Please try again.'\n },\n\n // Validation messages\n validation: {\n required: 'This field is required',\n invalidEmail: 'Please enter a valid email address',\n invalidPhone: 'Please enter a valid phone number',\n invalidDate: 'Please enter a valid date',\n minLength: 'Must be at least %{min} characters',\n maxLength: 'Must be no more than %{max} characters',\n invalidFormat: 'Invalid format',\n fileTooLarge: 'File is too large',\n fileTypeNotSupported: 'File type not supported'\n }\n};\n"]}
|
package/build/i18n/fr/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Nd,CAAC"}
|
package/build/i18n/fr/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,aAAa;KACpB;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,yDAAy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CAAqC;QAChD,YAAY,EAAE,+CAA+C;QAC7D,YAAY,EAAE,0DAA0D;KACzE;IAED,UAAU,EAAE;QACV,QAAQ,EAAE,0BAA0B;QACpC,YAAY,EAAE,0CAA0C;QACxD,YAAY,EAAE,+CAA+C;QAC7D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,uCAAuC;QAClD,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,yBAAyB;QACvC,oBAAoB,EAAE,8BAA8B;KACrD;CAEF,CAAC","sourcesContent":["export const fr = {\n // Common UI elements\n common: {\n next: 'Suivant',\n previous: 'Précédent',\n continue: 'Continuer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n submit: 'Soumettre',\n retry: 'Réessayer',\n close: 'Fermer',\n back: 'Retour',\n loading: 'Chargement...',\n error: 'Erreur',\n success: 'Succès',\n warning: 'Avertissement',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Vérification d\\'Identité',\n subtitle: 'Complétez votre vérification d\\'identité pour continuer',\n step: 'Étape %{current} sur %{total}',\n\n // Initialization\n initialization: {\n title: 'Bienvenue dans la Vérification d\\'Identité',\n description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',\n startButton: 'Commencer la Vérification',\n requirements: 'Ce dont vous aurez besoin :',\n requirementsList: [\n 'Une pièce d\\'identité officielle valide',\n 'Un bon éclairage pour les photos',\n 'Une connexion internet stable'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Sécurisez Votre Vérification',\n description: 'Autorisez l\\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',\n howThisHelps: 'Comment cela aide :',\n howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\\n• Détecte et empêche les accès non autorisés\\n• Garantit la conformité aux réglementations de sécurité',\n permissionDeniedTitle: 'Permission refusée',\n permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',\n locationDisabledTitle: 'Localisation désactivée',\n locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',\n errorTitle: 'Erreur',\n errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',\n obtained: 'Localisation obtenue',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Précision',\n resetButton: 'Réinitialiser',\n enableButton: 'Activer l\\'accès à la localisation',\n fetching: 'Récupération...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Sélectionnez Votre Pays',\n subtitle: 'Choisissez le pays qui a émis votre document d\\'identité',\n searchPlaceholder: 'Recherchez votre pays...',\n noResults: 'Aucun pays trouvé',\n selectCountry: 'Sélectionner le Pays'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capturez Votre Document d\\'Identité',\n subtitle: 'Prenez une photo claire de votre document d\\'identité',\n frontSide: 'Face Avant',\n backSide: 'Face Arrière',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Placez votre pièce d\\'identité sur une surface plane',\n 'Assurez-vous d\\'un bon éclairage',\n 'Gardez tout le document dans le cadre',\n 'Évitez les reflets et les ombres'\n ]\n },\n captureButton: 'Prendre la Photo',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement de l\\'image...',\n success: 'Document d\\'identité capturé avec succès',\n error: 'Échec de la capture du document. Veuillez réessayer.'\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Prenez un Selfie',\n subtitle: 'Prenez un selfie clair pour la vérification d\\'identité',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Regardez directement la caméra',\n 'Assurez-vous d\\'un bon éclairage sur votre visage',\n 'Retirez les lunettes et les chapeaux',\n 'Gardez une expression neutre'\n ]\n },\n captureButton: 'Prendre le Selfie',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement du selfie...',\n success: 'Selfie capturé avec succès',\n error: 'Échec de la capture du selfie. Veuillez réessayer.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Télécharger le Document',\n subtitle: 'Téléchargez une photo claire de votre document',\n selectFile: 'Sélectionner le Fichier',\n uploadButton: 'Télécharger',\n dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',\n supportedFormats: 'Formats supportés : JPG, PNG, PDF',\n maxSize: 'Taille maximale : 10MB',\n processing: 'Traitement du fichier...',\n success: 'Fichier téléchargé avec succès',\n error: 'Échec du téléchargement. Veuillez réessayer.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Vérification de Votre Identité',\n subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',\n steps: {\n analyzing: 'Analyse des documents...',\n extracting: 'Extraction des informations...',\n verifying: 'Vérification de l\\'identité...',\n complete: 'Vérification terminée'\n },\n retrying: 'Réessayer ( %{current}/ %{max} )',\n estimatedTime: 'Temps estimé : 2-3 minutes',\n status: {\n pending: 'En attente',\n processing: 'En cours',\n completed: 'Terminé',\n failed: 'Échoué'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Vérifiez Vos Informations',\n subtitle: 'Veuillez vérifier les informations que nous avons extraites',\n personalInfo: 'Informations Personnelles',\n documentInfo: 'Informations du Document',\n editButton: 'Modifier',\n submitButton: 'Soumettre pour Vérification',\n confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',\n processing: 'Soumission...',\n success: 'Informations soumises avec succès',\n error: 'Échec de la soumission. Veuillez réessayer.',\n selfieSide: {\n center: 'Face',\n right: 'Droite',\n left: 'Gauche'\n }\n },\n\n // Confirmation d'annulation\n cancelConfirmation: {\n title: 'Êtes-vous sûr de vouloir annuler ?',\n message: 'Vous perdrez tout votre progrès.',\n cancelButton: 'Annuler',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Permission Caméra Requise',\n permissionMessage: 'Nous avons besoin d\\'accéder à votre caméra pour capturer votre pièce d\\'identité et votre selfie.',\n permissionButton: 'Accorder la Permission',\n settingsButton: 'Ouvrir les Paramètres',\n notAvailable: 'Caméra non disponible',\n switchCamera: 'Changer de Caméra',\n flashOn: 'Flash Activé',\n flashOff: 'Flash Désactivé',\n capturePhoto: 'Prendre la Photo',\n processing: 'Traitement...',\n permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',\n deviceNotAvailable: 'Appareil photo non disponible',\n notReady: 'Caméra pas prête',\n analyzing: 'Analyse en cours...',\n errorOccurred: 'Erreur de caméra survenue',\n failedToCapture: 'Échec de la capture photo',\n failedToStartRecording: 'Échec du démarrage de l\\'enregistrement vidéo',\n failedToStopRecording: 'Échec de l\\'arrêt de l\\'enregistrement vidéo'\n },\n\n // Errors\n errors: {\n networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',\n serverError: 'Erreur serveur. Veuillez réessayer plus tard.',\n validationError: 'Veuillez vérifier vos informations et réessayer.',\n cameraError: 'Erreur caméra. Veuillez réessayer.',\n fileError: 'Erreur fichier. Veuillez réessayer.',\n timeoutError: 'Délai d\\'attente dépassé. Veuillez réessayer.',\n unknownError: 'Une erreur inconnue s\\'est produite. Veuillez réessayer.'\n },\n\n validation: {\n required: 'Ce champ est obligatoire',\n invalidEmail: 'Veuillez entrer une adresse email valide',\n invalidPhone: 'Veuillez entrer un numéro de téléphone valide',\n invalidDate: 'Veuillez entrer une date valide',\n minLength: 'Doit contenir au moins {min} caractères',\n maxLength: 'Ne doit pas dépasser {max} caractères',\n invalidFormat: 'Format invalide',\n fileTooLarge: 'Fichier trop volumineux',\n fileTypeNotSupported: 'Type de fichier non supporté'\n }\n\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/fr/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,qBAAqB;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,SAAS;Q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kBAAkB,EAAE,+BAA+B;QACnD,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,qBAAqB;QAChC,aAAa,EAAE,2BAA2B;QAC1C,eAAe,EAAE,2BAA2B;QAC5C,sBAAsB,EAAE,+CAA+C;QACvE,qBAAqB,EAAE,8CAA8C;KACtE;IAED,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,mDAAmD;QACjE,WAAW,EAAE,+CAA+C;QAC5D,eAAe,EAAE,kDAAkD;QACnE,WAAW,EAAE,oCAAoC;QACjD,SAAS,EAAE,qCAAqC;QAChD,YAAY,EAAE,+CAA+C;QAC7D,YAAY,EAAE,0DAA0D;KACzE;IAED,UAAU,EAAE;QACV,QAAQ,EAAE,0BAA0B;QACpC,YAAY,EAAE,0CAA0C;QACxD,YAAY,EAAE,+CAA+C;QAC7D,WAAW,EAAE,iCAAiC;QAC9C,SAAS,EAAE,yCAAyC;QACpD,SAAS,EAAE,uCAAuC;QAClD,aAAa,EAAE,iBAAiB;QAChC,YAAY,EAAE,yBAAyB;QACvC,oBAAoB,EAAE,8BAA8B;KACrD;CAEF,CAAC","sourcesContent":["export const fr = {\n // Common UI elements\n common: {\n next: 'Suivant',\n previous: 'Précédent',\n continue: 'Continuer',\n cancel: 'Annuler',\n confirm: 'Confirmer',\n submit: 'Soumettre',\n retry: 'Réessayer',\n close: 'Fermer',\n back: 'Retour',\n loading: 'Chargement...',\n error: 'Erreur',\n success: 'Succès',\n warning: 'Avertissement',\n info: 'Information',\n },\n\n // KYC Flow\n kyc: {\n title: 'Vérification d\\'Identité',\n subtitle: 'Complétez votre vérification d\\'identité pour continuer',\n step: 'Étape %{current} sur %{total}',\n\n // Initialization\n initialization: {\n title: 'Bienvenue dans la Vérification d\\'Identité',\n description: 'Nous devons vérifier votre identité pour respecter les réglementations et assurer la sécurité.',\n startButton: 'Commencer la Vérification',\n requirements: 'Ce dont vous aurez besoin :',\n requirementsList: [\n 'Une pièce d\\'identité officielle valide',\n 'Un bon éclairage pour les photos',\n 'Une connexion internet stable'\n ]\n },\n\n // Location Capture\n locationCapture: {\n title: 'Sécurisez Votre Vérification',\n description: 'Autorisez l\\'accès à la localisation pour nous aider à protéger votre compte et à prévenir les activités frauduleuses pendant la vérification.',\n howThisHelps: 'Comment cela aide :',\n howThisHelpsList: '• Vérifie que la localisation de votre appareil correspond à votre identité\\n• Détecte et empêche les accès non autorisés\\n• Garantit la conformité aux réglementations de sécurité',\n permissionDeniedTitle: 'Permission refusée',\n permissionDeniedMessage: 'La permission de localisation est nécessaire pour continuer.',\n locationDisabledTitle: 'Localisation désactivée',\n locationDisabledMessage: 'Veuillez activer la localisation sur votre appareil pour continuer.',\n errorTitle: 'Erreur',\n errorMessage: 'Impossible de récupérer votre localisation. Veuillez réessayer.',\n obtained: 'Localisation obtenue',\n latitudeLabel: 'Latitude',\n longitudeLabel: 'Longitude',\n accuracyLabel: 'Précision',\n resetButton: 'Réinitialiser',\n enableButton: 'Activer l\\'accès à la localisation',\n fetching: 'Récupération...'\n },\n\n // Country Selection\n countrySelection: {\n title: 'Sélectionnez Votre Pays',\n subtitle: 'Choisissez le pays qui a émis votre document d\\'identité',\n searchPlaceholder: 'Recherchez votre pays...',\n noResults: 'Aucun pays trouvé',\n selectCountry: 'Sélectionner le Pays'\n },\n\n // ID Card Capture\n idCardCapture: {\n title: 'Capturez Votre Document d\\'Identité',\n subtitle: 'Prenez une photo claire de votre document d\\'identité',\n frontSide: 'Face Avant',\n backSide: 'Face Arrière',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Placez votre pièce d\\'identité sur une surface plane',\n 'Assurez-vous d\\'un bon éclairage',\n 'Gardez tout le document dans le cadre',\n 'Évitez les reflets et les ombres'\n ]\n },\n captureButton: 'Prendre la Photo',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement de l\\'image...',\n success: 'Document d\\'identité capturé avec succès',\n error: 'Échec de la capture du document. Veuillez réessayer.'\n },\n\n // Selfie Capture\n selfieCapture: {\n title: 'Prenez un Selfie',\n subtitle: 'Prenez un selfie clair pour la vérification d\\'identité',\n instructions: {\n title: 'Instructions :',\n list: [\n 'Regardez directement la caméra',\n 'Assurez-vous d\\'un bon éclairage sur votre visage',\n 'Retirez les lunettes et les chapeaux',\n 'Gardez une expression neutre'\n ]\n },\n captureButton: 'Prendre le Selfie',\n retakeButton: 'Reprendre',\n usePhotoButton: 'Utiliser Cette Photo',\n processing: 'Traitement du selfie...',\n success: 'Selfie capturé avec succès',\n error: 'Échec de la capture du selfie. Veuillez réessayer.'\n },\n\n // File Upload\n fileUpload: {\n title: 'Télécharger le Document',\n subtitle: 'Téléchargez une photo claire de votre document',\n selectFile: 'Sélectionner le Fichier',\n uploadButton: 'Télécharger',\n dragDropText: 'Glissez-déposez votre fichier ici, ou cliquez pour sélectionner',\n supportedFormats: 'Formats supportés : JPG, PNG, PDF',\n maxSize: 'Taille maximale : 10MB',\n processing: 'Traitement du fichier...',\n success: 'Fichier téléchargé avec succès',\n error: 'Échec du téléchargement. Veuillez réessayer.'\n },\n\n // Verification Progress\n verificationProgress: {\n title: 'Vérification de Votre Identité',\n subtitle: 'Veuillez patienter pendant que nous vérifions vos informations',\n steps: {\n analyzing: 'Analyse des documents...',\n extracting: 'Extraction des informations...',\n verifying: 'Vérification de l\\'identité...',\n complete: 'Vérification terminée'\n },\n retrying: 'Réessayer ( %{current}/ %{max} )',\n estimatedTime: 'Temps estimé : 2-3 minutes',\n status: {\n pending: 'En attente',\n processing: 'En cours',\n completed: 'Terminé',\n failed: 'Échoué',\n retry: 'Réessayer'\n }\n },\n\n // Review and Submit\n reviewSubmit: {\n title: 'Vérifiez Vos Informations',\n subtitle: 'Veuillez vérifier les informations que nous avons extraites',\n personalInfo: 'Informations Personnelles',\n documentInfo: 'Informations du Document',\n editButton: 'Modifier',\n submitButton: 'Soumettre pour Vérification',\n confirmMessage: 'Êtes-vous sûr de vouloir soumettre ces informations ?',\n processing: 'Soumission...',\n success: 'Informations soumises avec succès',\n error: 'Échec de la soumission. Veuillez réessayer.',\n selfieSide: {\n center: 'Face',\n right: 'Droite',\n left: 'Gauche'\n }\n },\n\n // Confirmation d'annulation\n cancelConfirmation: {\n title: 'Êtes-vous sûr de vouloir annuler ?',\n message: 'Vous perdrez tout votre progrès.',\n cancelButton: 'Annuler',\n confirmButton: 'OK'\n }\n },\n\n // Camera and Media\n camera: {\n permissionTitle: 'Permission Caméra Requise',\n permissionMessage: 'Nous avons besoin d\\'accéder à votre caméra pour capturer votre pièce d\\'identité et votre selfie.',\n permissionButton: 'Accorder la Permission',\n settingsButton: 'Ouvrir les Paramètres',\n notAvailable: 'Caméra non disponible',\n switchCamera: 'Changer de Caméra',\n flashOn: 'Flash Activé',\n flashOff: 'Flash Désactivé',\n capturePhoto: 'Prendre la Photo',\n processing: 'Traitement...',\n permissionRequired: 'Permission caméra requise. Veuillez accorder la permission pour continuer.',\n deviceNotAvailable: 'Appareil photo non disponible',\n notReady: 'Caméra pas prête',\n analyzing: 'Analyse en cours...',\n errorOccurred: 'Erreur de caméra survenue',\n failedToCapture: 'Échec de la capture photo',\n failedToStartRecording: 'Échec du démarrage de l\\'enregistrement vidéo',\n failedToStopRecording: 'Échec de l\\'arrêt de l\\'enregistrement vidéo'\n },\n\n // Errors\n errors: {\n networkError: 'Erreur réseau. Veuillez vérifier votre connexion.',\n serverError: 'Erreur serveur. Veuillez réessayer plus tard.',\n validationError: 'Veuillez vérifier vos informations et réessayer.',\n cameraError: 'Erreur caméra. Veuillez réessayer.',\n fileError: 'Erreur fichier. Veuillez réessayer.',\n timeoutError: 'Délai d\\'attente dépassé. Veuillez réessayer.',\n unknownError: 'Une erreur inconnue s\\'est produite. Veuillez réessayer.'\n },\n\n validation: {\n required: 'Ce champ est obligatoire',\n invalidEmail: 'Veuillez entrer une adresse email valide',\n invalidPhone: 'Veuillez entrer un numéro de téléphone valide',\n invalidDate: 'Veuillez entrer une date valide',\n minLength: 'Doit contenir au moins {min} caractères',\n maxLength: 'Ne doit pas dépasser {max} caractères',\n invalidFormat: 'Format invalide',\n fileTooLarge: 'Fichier trop volumineux',\n fileTypeNotSupported: 'Type de fichier non supporté'\n }\n\n};\n"]}
|
package/build/i18n/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IAEb,cAAc,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;IAEF,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,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AAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,GAAG,EAAE,eAAe,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAGD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAG1C,MAAM,WAAW,kBAAkB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/build/i18n/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,yCAAyC","sourcesContent":["// Type definitions for i18n translations\n\nexport interface CommonTranslations {\n next: string;\n previous: string;\n continue: string;\n cancel: string;\n confirm: string;\n submit: string;\n retry: string;\n close: string;\n back: string;\n loading: string;\n error: string;\n success: string;\n warning: string;\n info: string;\n}\n\nexport interface KYCTranslations {\n title: string;\n subtitle: string;\n step: string;\n \n initialization: {\n title: string;\n description: string;\n startButton: string;\n requirements: string;\n requirementsList: string[];\n };\n \n countrySelection: {\n title: string;\n subtitle: string;\n searchPlaceholder: string;\n noResults: string;\n selectCountry: string;\n };\n \n idCardCapture: {\n title: string;\n subtitle: string;\n frontSide: string;\n backSide: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n selfieCapture: {\n title: string;\n subtitle: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n fileUpload: {\n title: string;\n subtitle: string;\n selectFile: string;\n uploadButton: string;\n dragDropText: string;\n supportedFormats: string;\n maxSize: string;\n processing: string;\n success: string;\n error: string;\n };\n \n verificationProgress: {\n title: string;\n subtitle: string;\n steps: {\n analyzing: string;\n extracting: string;\n verifying: string;\n complete: string;\n };\n estimatedTime: string;\n status: {\n pending: string;\n processing: string;\n completed: string;\n failed: string;\n };\n };\n \n reviewSubmit: {\n title: string;\n subtitle: string;\n personalInfo: string;\n documentInfo: string;\n editButton: string;\n submitButton: string;\n confirmMessage: string;\n processing: string;\n success: string;\n error: string;\n };\n \n cancelConfirmation: {\n title: string;\n message: string;\n cancelButton: string;\n confirmButton: string;\n };\n}\n\nexport interface CameraTranslations {\n permissionTitle: string;\n permissionMessage: string;\n permissionButton: string;\n settingsButton: string;\n notAvailable: string;\n switchCamera: string;\n flashOn: string;\n flashOff: string;\n capturePhoto: string;\n processing: string;\n}\n\nexport interface ErrorTranslations {\n networkError: string;\n serverError: string;\n validationError: string;\n cameraError: string;\n fileError: string;\n timeoutError: string;\n unknownError: string;\n}\n\nexport interface ValidationTranslations {\n required: string;\n invalidEmail: string;\n invalidPhone: string;\n invalidDate: string;\n minLength: string;\n maxLength: string;\n invalidFormat: string;\n fileTooLarge: string;\n fileTypeNotSupported: string;\n}\n\nexport interface TranslationKeys {\n common: CommonTranslations;\n kyc: KYCTranslations;\n camera: CameraTranslations;\n errors: ErrorTranslations;\n validation: ValidationTranslations;\n}\n\n// Type for supported locales\nexport type SupportedLocale = 'en' | 'fr';\n\n// Type for translation function parameters\nexport interface TranslationOptions {\n [key: string]: any;\n}\n\n// Type for pluralization options\nexport interface PluralizationOptions extends TranslationOptions {\n count: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,yCAAyC","sourcesContent":["// Type definitions for i18n translations\n\nexport interface CommonTranslations {\n next: string;\n previous: string;\n continue: string;\n cancel: string;\n confirm: string;\n submit: string;\n retry: string;\n close: string;\n back: string;\n loading: string;\n error: string;\n success: string;\n warning: string;\n info: string;\n}\n\nexport interface KYCTranslations {\n title: string;\n subtitle: string;\n step: string;\n \n initialization: {\n title: string;\n description: string;\n startButton: string;\n requirements: string;\n requirementsList: string[];\n };\n \n countrySelection: {\n title: string;\n subtitle: string;\n searchPlaceholder: string;\n noResults: string;\n selectCountry: string;\n };\n \n idCardCapture: {\n title: string;\n subtitle: string;\n frontSide: string;\n backSide: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n selfieCapture: {\n title: string;\n subtitle: string;\n instructions: {\n title: string;\n list: string[];\n };\n captureButton: string;\n retakeButton: string;\n usePhotoButton: string;\n processing: string;\n success: string;\n error: string;\n };\n \n fileUpload: {\n title: string;\n subtitle: string;\n selectFile: string;\n uploadButton: string;\n dragDropText: string;\n supportedFormats: string;\n maxSize: string;\n processing: string;\n success: string;\n error: string;\n };\n \n verificationProgress: {\n title: string;\n subtitle: string;\n steps: {\n analyzing: string;\n extracting: string;\n verifying: string;\n complete: string;\n };\n estimatedTime: string;\n status: {\n pending: string;\n processing: string;\n completed: string;\n failed: string;\n retry: string;\n };\n };\n \n reviewSubmit: {\n title: string;\n subtitle: string;\n personalInfo: string;\n documentInfo: string;\n editButton: string;\n submitButton: string;\n confirmMessage: string;\n processing: string;\n success: string;\n error: string;\n };\n \n cancelConfirmation: {\n title: string;\n message: string;\n cancelButton: string;\n confirmButton: string;\n };\n}\n\nexport interface CameraTranslations {\n permissionTitle: string;\n permissionMessage: string;\n permissionButton: string;\n settingsButton: string;\n notAvailable: string;\n switchCamera: string;\n flashOn: string;\n flashOff: string;\n capturePhoto: string;\n processing: string;\n}\n\nexport interface ErrorTranslations {\n networkError: string;\n serverError: string;\n validationError: string;\n cameraError: string;\n fileError: string;\n timeoutError: string;\n unknownError: string;\n}\n\nexport interface ValidationTranslations {\n required: string;\n invalidEmail: string;\n invalidPhone: string;\n invalidDate: string;\n minLength: string;\n maxLength: string;\n invalidFormat: string;\n fileTooLarge: string;\n fileTypeNotSupported: string;\n}\n\nexport interface TranslationKeys {\n common: CommonTranslations;\n kyc: KYCTranslations;\n camera: CameraTranslations;\n errors: ErrorTranslations;\n validation: ValidationTranslations;\n}\n\n// Type for supported locales\nexport type SupportedLocale = 'en' | 'fr';\n\n// Type for translation function parameters\nexport interface TranslationOptions {\n [key: string]: any;\n}\n\n// Type for pluralization options\nexport interface PluralizationOptions extends TranslationOptions {\n count: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisionCameraModule.d.ts","sourceRoot":"","sources":["../../../src/modules/camera/VisionCameraModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"VisionCameraModule.d.ts","sourceRoot":"","sources":["../../../src/modules/camera/VisionCameraModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AA2ErG,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,sBAAsB,CAAC;IAC/B,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAqB;WAE9B,WAAW,IAAI,kBAAkB;IAO/C;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAUjD;;OAEG;IACG,oBAAoB,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAW1D;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAWzD;;OAEG;IACG,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAUjD;;OAEG;IACG,2BAA2B,IAAI,OAAO,CAAC,OAAO,CAAC;IAUrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAkBvD;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAW3C;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC;IAc/C;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAc3C;;OAEG;IACG,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAoBxE;;;OAGG;IACG,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAiCrF;;AAED,wBAAgD"}
|
|
@@ -1,6 +1,76 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { Camera } from 'react-native-vision-camera';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Backward-compatible file copy function
|
|
5
|
+
* Tries new File API first (Expo SDK 54+), then falls back to legacy API
|
|
6
|
+
* Never uses the deprecated regular import to avoid errors
|
|
7
|
+
*/
|
|
8
|
+
async function copyFileCompat(from, to) {
|
|
9
|
+
// Try new File API first (Expo SDK 54+)
|
|
10
|
+
try {
|
|
11
|
+
// @ts-ignore - File API might not be in types yet
|
|
12
|
+
const { File } = require('expo-file-system');
|
|
13
|
+
if (File && typeof File === 'function') {
|
|
14
|
+
const sourceFile = new File(from);
|
|
15
|
+
const destFile = new File(to);
|
|
16
|
+
// File.copy() is synchronous but may throw
|
|
17
|
+
sourceFile.copy(destFile);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
// New API not available or failed, try legacy
|
|
23
|
+
// Continue to legacy API
|
|
24
|
+
}
|
|
25
|
+
// Try legacy API from expo-file-system/legacy (Expo SDK 54+)
|
|
26
|
+
// This is the recommended way to avoid deprecation warnings
|
|
27
|
+
try {
|
|
28
|
+
// @ts-ignore - legacy export might not be in types
|
|
29
|
+
const LegacyFileSystem = require('expo-file-system/legacy');
|
|
30
|
+
if (LegacyFileSystem && LegacyFileSystem.copyAsync && typeof LegacyFileSystem.copyAsync === 'function') {
|
|
31
|
+
await LegacyFileSystem.copyAsync({ from, to });
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
// If legacy is not available, throw a clear error
|
|
37
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
38
|
+
throw new Error(`Unable to copy file: legacy FileSystem API not available. Error: ${errorMessage}`);
|
|
39
|
+
}
|
|
40
|
+
throw new Error('Unable to copy file: legacy FileSystem API loaded but copyAsync method not found');
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get document directory path in a backward-compatible way
|
|
44
|
+
* Never uses the deprecated regular import to avoid errors
|
|
45
|
+
*/
|
|
46
|
+
function getDocumentDirectory() {
|
|
47
|
+
try {
|
|
48
|
+
// Try new Paths API first (Expo SDK 54+)
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
const { Paths } = require('expo-file-system');
|
|
51
|
+
if (Paths?.document) {
|
|
52
|
+
return Paths.document.uri;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (_) {
|
|
56
|
+
// New API not available, try legacy
|
|
57
|
+
}
|
|
58
|
+
// Try legacy API from expo-file-system/legacy (Expo SDK 54+)
|
|
59
|
+
// This is the recommended way to avoid deprecation warnings
|
|
60
|
+
try {
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
const LegacyFileSystem = require('expo-file-system/legacy');
|
|
63
|
+
if (LegacyFileSystem && LegacyFileSystem.documentDirectory) {
|
|
64
|
+
return LegacyFileSystem.documentDirectory;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
// Legacy should be available in SDK 54+, but if not, throw a clear error
|
|
69
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
70
|
+
throw new Error(`Unable to get document directory: legacy FileSystem API not available. Error: ${errorMessage}`);
|
|
71
|
+
}
|
|
72
|
+
throw new Error('Unable to get document directory: legacy FileSystem API loaded but documentDirectory not found');
|
|
73
|
+
}
|
|
4
74
|
export class VisionCameraModule {
|
|
5
75
|
static instance;
|
|
6
76
|
static getInstance() {
|
|
@@ -146,12 +216,10 @@ export class VisionCameraModule {
|
|
|
146
216
|
* Process photo capture result
|
|
147
217
|
*/
|
|
148
218
|
async processPhotoResult(photo) {
|
|
149
|
-
const newPath = FileSystem.documentDirectory + `photo_${Date.now()}.jpg`;
|
|
150
|
-
await FileSystem.copyAsync({
|
|
151
|
-
from: `file://${photo.path}`,
|
|
152
|
-
to: newPath,
|
|
153
|
-
});
|
|
154
219
|
try {
|
|
220
|
+
const documentDir = getDocumentDirectory();
|
|
221
|
+
const newPath = documentDir + `photo_${Date.now()}.jpg`;
|
|
222
|
+
await copyFileCompat(`file://${photo.path}`, newPath);
|
|
155
223
|
return {
|
|
156
224
|
success: true,
|
|
157
225
|
path: newPath,
|