@transfergratis/react-native-sdk 0.1.25 → 0.1.28
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/src/main/AndroidManifest.xml +12 -0
- package/build/components/EnhancedCameraView.web.d.ts.map +1 -1
- package/build/components/EnhancedCameraView.web.js +76 -21
- package/build/components/EnhancedCameraView.web.js.map +1 -1
- package/build/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
- package/build/components/KYCElements/EmailVerificationTemplate.js +48 -29
- package/build/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
- package/build/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/components/KYCElements/IDCardCapture.js +48 -11
- package/build/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/components/KYCElements/WelcomeTemplate.js +2 -1
- package/build/components/KYCElements/WelcomeTemplate.js.map +1 -1
- package/build/components/OverLay/type.d.ts +2 -0
- package/build/components/OverLay/type.d.ts.map +1 -1
- package/build/components/OverLay/type.js.map +1 -1
- package/build/components/TemplateKYCExample.d.ts +8 -2
- package/build/components/TemplateKYCExample.d.ts.map +1 -1
- package/build/components/TemplateKYCExample.js +2 -2
- package/build/components/TemplateKYCExample.js.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.d.ts +10 -2
- package/build/components/TemplateKYCFlowRefactored.d.ts.map +1 -1
- package/build/components/TemplateKYCFlowRefactored.js +13 -3
- package/build/components/TemplateKYCFlowRefactored.js.map +1 -1
- package/build/config/KYCConfig.js +1 -1
- package/build/config/KYCConfig.js.map +1 -1
- package/build/hooks/useTemplateKYCFlow.d.ts +14 -2
- package/build/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/hooks/useTemplateKYCFlow.js +175 -84
- package/build/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/i18n/en/index.d.ts +2 -0
- package/build/i18n/en/index.d.ts.map +1 -1
- package/build/i18n/en/index.js +3 -1
- package/build/i18n/en/index.js.map +1 -1
- package/build/i18n/fr/index.d.ts +2 -0
- package/build/i18n/fr/index.d.ts.map +1 -1
- package/build/i18n/fr/index.js +3 -1
- package/build/i18n/fr/index.js.map +1 -1
- package/build/i18n/types.d.ts +2 -0
- package/build/i18n/types.d.ts.map +1 -1
- package/build/i18n/types.js.map +1 -1
- package/build/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/modules/api/CardAuthentification.js +28 -2
- package/build/modules/api/CardAuthentification.js.map +1 -1
- package/build/modules/api/KYCService.d.ts +10 -0
- package/build/modules/api/KYCService.d.ts.map +1 -1
- package/build/modules/api/KYCService.js +24 -0
- package/build/modules/api/KYCService.js.map +1 -1
- package/build/modules/camera/VisionCameraModule.web.d.ts.map +1 -1
- package/build/modules/camera/VisionCameraModule.web.js +27 -8
- package/build/modules/camera/VisionCameraModule.web.js.map +1 -1
- package/build/types/KYC.types.d.ts +6 -2
- package/build/types/KYC.types.d.ts.map +1 -1
- package/build/types/KYC.types.js.map +1 -1
- package/build/utils/cropByObb.d.ts +17 -0
- package/build/utils/cropByObb.d.ts.map +1 -1
- package/build/utils/cropByObb.js +51 -1
- package/build/utils/cropByObb.js.map +1 -1
- package/build/web/WebKYCEntry.d.ts.map +1 -1
- package/build/web/WebKYCEntry.js +11 -5
- package/build/web/WebKYCEntry.js.map +1 -1
- package/package.json +1 -1
- package/plugin/build/index.d.ts +1 -0
- package/plugin/build/index.js +3 -1
- package/plugin/build/withRemovePermissions.d.ts +3 -0
- package/plugin/build/withRemovePermissions.js +67 -0
- package/plugin/src/index.ts +2 -1
- package/plugin/src/withRemovePermissions.js +85 -0
- package/plugin/src/withRemovePermissions.ts +83 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/plugin.js +6 -1
- package/src/components/EnhancedCameraView.web.tsx +76 -21
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +47 -33
- package/src/components/KYCElements/IDCardCapture.tsx +51 -10
- package/src/components/KYCElements/WelcomeTemplate.tsx +2 -1
- package/src/components/OverLay/type.ts +2 -0
- package/src/components/TemplateKYCExample.tsx +9 -5
- package/src/components/TemplateKYCFlowRefactored.tsx +24 -6
- package/src/config/KYCConfig.ts +1 -1
- package/src/hooks/useTemplateKYCFlow.tsx +189 -95
- package/src/i18n/en/index.ts +3 -1
- package/src/i18n/fr/index.ts +3 -1
- package/src/i18n/types.ts +2 -0
- package/src/modules/api/CardAuthentification.ts +30 -2
- package/src/modules/api/KYCService.ts +41 -0
- package/src/modules/camera/VisionCameraModule.web.ts +30 -12
- package/src/types/KYC.types.ts +7 -3
- package/src/utils/cropByObb.ts +57 -1
- package/src/web/WebKYCEntry.tsx +17 -6
|
@@ -1 +1 @@
|
|
|
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;AAG/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;AAgBzC,MAAM,sBAAsB,GAAG,aAAa,CAAyC,SAAS,CAAC,CAAC;AAgBhG,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,MAAM,EACN,GAAG,GAAG,YAAY,EAClB,iBAAiB,GAClB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAEhI,OAAO,CACL,CAAC,sBAA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E,CAAC,CAAC;gBAChB,GAAG,IAAI;gBACP,eAAe,EAAE,QAAQ;aAC1B,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAEZ,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,CAAC,MAAM,CAAC,CAAC;QAEZ,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,CAAC,MAAM,CAAC,CAAC;KACb,CAAC;IAEF,OAAO;QACL,KAAK;QACL,OAAO;QACP,gBAAgB;QAChB,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;QACV,gBAAgB;QAChB,iBAAiB;QACjB,GAAG;KACJ,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 { KycEnvironment } from '../types/env.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 env: KycEnvironment;\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 env?: KycEnvironment;\n existingSessionId?: string;\n initialStep?: number;\n}\n\nexport const TemplateKYCFlowProvider: React.FC<TemplateKYCFlowProviderProps> = ({\n children,\n template,\n onComplete,\n onError,\n onCancel,\n initialLanguage = 'en',\n apiKey,\n env = 'PRODUCTION',\n existingSessionId,\n}) => {\n const hookResult = useTemplateKYCFlow(template, onComplete, onError, onCancel, initialLanguage, apiKey, env, existingSessionId);\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 env: KycEnvironment = 'PRODUCTION',\n existingSessionId?: string,\n initialStep?: number,\n): UseTemplateReturn => {\n\n const { setLocale } = useI18n();\n\n useEffect(() => {\n setLocale(initialLanguage);\n }, [initialLanguage, apiKey]);\n\n // Helpers to align SDK steps with backend actions/templates\n const isUiOnlyStep = useCallback((type: TemplateComponent['type']) => {\n return type === 'verification_progress';\n }, [apiKey]);\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 }, [apiKey]);\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 }, [apiKey]);\n\n const templateWithReview = useMemo(() => ensureReviewSubmitStep(template), [template, ensureReviewSubmitStep, apiKey]);\n const templateWithReviewAndVerification = useMemo(() => ensureVerificationProgressStep(templateWithReview), [templateWithReview, ensureVerificationProgressStep, apiKey]);\n\n // État initial du flux\n const buildInitialState = (): TemplateState => {\n // Valider initialStep pour s'assurer qu'il est dans les limites du template\n let validInitialStep = 0;\n let completedComponents: number[] = [];\n \n logger.log('buildInitialState called', { initialStep, existingSessionId });\n \n if (initialStep !== undefined && initialStep >= 0) {\n const maxIndex = templateWithReviewAndVerification.components.length - 1;\n const requestedStep = Math.min(initialStep, maxIndex);\n const requestedComponent = templateWithReviewAndVerification.components[requestedStep];\n \n logger.log('Processing initialStep', {\n initialStep,\n requestedStep,\n maxIndex,\n componentType: requestedComponent?.type,\n componentId: requestedComponent?.id\n });\n \n // Si on reprend à l'étape id_card, on peut rester à id_card si on a une session existante\n // car les données de country_selection peuvent être chargées depuis la session\n if (requestedComponent?.type === 'id_card') {\n // Si on a une session existante, on peut rester à id_card et charger les données\n if (existingSessionId) {\n logger.log('id_card with existing session - staying at id_card');\n validInitialStep = requestedStep;\n // Marquer les composants précédents comme complétés\n if (validInitialStep > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, validInitialStep)\n .map(component => component.id);\n }\n } else {\n // Si pas de session, revenir à country_selection pour refaire le choix\n const countrySelectionIndex = templateWithReviewAndVerification.components.findIndex(\n c => c.type === 'country_selection'\n );\n \n logger.log('id_card without session - going back to country_selection', { countrySelectionIndex });\n \n if (countrySelectionIndex >= 0) {\n validInitialStep = countrySelectionIndex;\n // Marquer les composants avant country_selection comme complétés\n if (countrySelectionIndex > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, countrySelectionIndex)\n .map(component => component.id);\n }\n } else {\n // Si pas de country_selection, commencer au début\n validInitialStep = 0;\n }\n }\n } else if (requestedComponent?.type === 'review_submit') {\n // Si on reprend au review_submit, on ne marque pas les composants précédents\n // pour permettre à l'utilisateur de revenir en arrière et vérifier/modifier les données\n validInitialStep = requestedStep;\n // Ne pas marquer les composants précédents comme complétés\n completedComponents = [];\n } else {\n // Pour les autres composants (selfie, etc.), commencer directement à l'étape demandée\n validInitialStep = requestedStep;\n \n // Marquer tous les composants précédents comme complétés\n // Cela permet à l'utilisateur de continuer sans refaire les étapes précédentes\n if (validInitialStep > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, validInitialStep)\n .map(component => component.id);\n }\n }\n \n logger.log('Final initial state', {\n validInitialStep,\n completedComponentsCount: completedComponents.length,\n componentAtStep: templateWithReviewAndVerification.components[validInitialStep]?.type\n });\n }\n \n return {\n template: templateWithReviewAndVerification,\n currentComponentIndex: validInitialStep,\n completedComponents: completedComponents,\n componentData: {},\n errors: {},\n isProcessing: false,\n currentLanguage: initialLanguage,\n showCustomStepper: true,\n session: {\n session_id: existingSessionId || '',\n token: '',\n isInitialized: false,\n isProcessing: false,\n error: null,\n },\n verification: {\n status: 'idle',\n },\n };\n };\n\n // État du flux\n const [state, setState] = useState<TemplateState>(() => buildInitialState());\n \n // Fonction utilitaire pour convertir base64 en data URI pour l'affichage\n const base64ToDataUri = useCallback((base64: string, mimeType: string = 'image/jpeg'): string => {\n // Si c'est déjà une data URI, retourner tel quel\n if (base64.startsWith('data:')) {\n return base64;\n }\n // Sinon, créer une data URI\n return `data:${mimeType};base64,${base64}`;\n }, []);\n\n // Charger les données de session si on reprend une session existante\n useEffect(() => {\n const loadSessionData = async () => {\n // Ne charger que si on a une session existante\n if (!existingSessionId) {\n logger.log('No existingSessionId, skipping data load');\n return;\n }\n\n // Si initialStep n'est pas défini ou est 0, on ne charge pas (début de session)\n if (initialStep === undefined || initialStep === 0) {\n logger.log('initialStep is 0 or undefined, skipping data load');\n return;\n }\n\n // Attendre que la session soit initialisée\n if (!state.session.isInitialized || !state.session.session_id) {\n logger.log('Session not initialized yet, waiting...', {\n isInitialized: state.session.isInitialized,\n sessionId: state.session.session_id\n });\n return;\n }\n\n try {\n logger.log('Loading session data for resume:', { sessionId: existingSessionId, step: initialStep });\n const result = await kycService.getVerificationResult(state.session.session_id);\n const sessionData = result[state.session.session_id]?.data;\n\n if (sessionData) {\n // Restaurer les données des composants depuis la session\n // Utiliser 'as any' car VerificationResult peut avoir des propriétés dynamiques\n const data: any = sessionData;\n const restoredComponentData: Record<number, any> = {};\n\n // Parcourir les composants jusqu'à l'étape initiale (incluse) pour restaurer leurs données\n // Utiliser initialStep + 1 pour inclure le composant à l'étape initialStep\n templateWithReviewAndVerification.components\n .slice(0, initialStep + 1)\n .forEach((component) => {\n // Essayer de restaurer les données selon le type de composant\n if (component.type === 'id_card' || component.type === 'file_upload') {\n // Les documents peuvent être dans différentes structures\n let documents: any = null;\n \n // Chercher dans différentes structures possibles\n if (data.documents) {\n documents = data.documents;\n } else if (data.user_data?.documents) {\n documents = data.user_data.documents;\n } else if (data.document_images) {\n documents = data.document_images;\n }\n\n if (documents) {\n // Convertir les images base64 en format utilisable\n const restoredDocuments: Record<string, any> = {};\n \n Object.keys(documents).forEach((key) => {\n const doc = documents[key];\n if (typeof doc === 'object' && doc !== null) {\n // Si on a un fichier base64, créer une structure avec dir et file\n if (doc.file || doc.base64) {\n const base64Data = doc.file || doc.base64;\n restoredDocuments[key] = {\n dir: base64ToDataUri(base64Data), // Utiliser data URI pour l'affichage\n file: base64Data, // Garder le base64 pour l'envoi\n mrz: doc.mrz || '',\n templatePath: doc.templatePath || '',\n };\n } else {\n // Sinon, garder la structure originale\n restoredDocuments[key] = doc;\n }\n } else if (typeof doc === 'string') {\n // Si c'est directement une string base64\n restoredDocuments[key] = {\n dir: base64ToDataUri(doc),\n file: doc,\n mrz: '',\n templatePath: '',\n };\n }\n });\n\n if (Object.keys(restoredDocuments).length > 0) {\n restoredComponentData[component.id] = restoredDocuments;\n }\n }\n } else if (component.type === 'selfie') {\n // Les selfies peuvent être dans sessionData.selfie_info\n if (data.selfie_info) {\n const selfieData: Record<string, any> = {};\n const selfieInfo: any = data.selfie_info;\n \n // Si selfie_info contient une image\n if (selfieInfo.image) {\n const base64Image = selfieInfo.image;\n selfieData['front'] = {\n dir: base64ToDataUri(base64Image),\n file: base64Image,\n };\n }\n \n // Si on a plusieurs orientations\n if (selfieInfo.orientations) {\n Object.keys(selfieInfo.orientations).forEach((orientation) => {\n const img = selfieInfo.orientations[orientation];\n if (img) {\n selfieData[orientation] = {\n dir: base64ToDataUri(img),\n file: img,\n };\n }\n });\n }\n\n if (Object.keys(selfieData).length > 0) {\n restoredComponentData[component.id] = selfieData;\n }\n }\n } else if (component.type === 'country_selection') {\n // Les données de sélection de pays peuvent être dans metadata\n if (data.metadata || data.user_data) {\n restoredComponentData[component.id] = {\n ...(data.metadata || {}),\n ...(data.user_data || {}),\n };\n }\n } else if (component.type === 'location') {\n // Les données de localisation peuvent être dans metadata\n if (data.metadata?.location || data.user_data?.location) {\n restoredComponentData[component.id] = {\n ...(data.metadata?.location || {}),\n ...(data.user_data?.location || {}),\n };\n }\n }\n });\n\n // Mettre à jour l'état avec les données restaurées\n if (Object.keys(restoredComponentData).length > 0) {\n logger.log('Session data restored - components:', Object.keys(restoredComponentData));\n logger.log('Session data restored - sample data:', truncateFields(restoredComponentData));\n setState(prev => ({\n ...prev,\n componentData: {\n ...prev.componentData,\n ...restoredComponentData,\n },\n }));\n logger.log('Component data updated in state');\n } else {\n logger.log('No component data to restore from session');\n }\n }\n } catch (error) {\n logger.error('Error loading session data:', truncateFields(error));\n // Ne pas bloquer le flux si le chargement échoue\n }\n };\n\n loadSessionData();\n }, [existingSessionId, initialStep, state.session.isInitialized, state.session.session_id, templateWithReviewAndVerification.components, base64ToDataUri]);\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 'welcome':\n // UI-only step, no backend action needed\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 }, [apiKey]);\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, apiKey]);\n\n // Build backend-friendly payloads per action\n const buildPayloadForComponent = useCallback((action: string | null, component: TemplateComponent, rawData: any, templateId: string, step: number) => {\n console.log('apiKey in buildPayloadForComponent', apiKey);\n\n const base = { template_id: templateId || null, templateId: templateId || 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 const documentType = _idCardData?.documentType;\n // Map national_id to identity_card for selfie capture\n const mappedDocumentType = documentType === 'national_id' ? 'identity_card' : (documentType as GovernmentDocumentType || 'identity_card');\n return { ...base, documents, country: _idCardData?.country || '', documentType: mappedDocumentType };\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, apiKey]);\n // Ensure the template contains a final review step\n\n // console.log('apiKey in useTemplateKYCFlow', apiKey);\n\n\n // Composant actuel\n const currentComponent = useMemo(() => {\n return state.template.components[state.currentComponentIndex] || null;\n }, [state.template.components, state.currentComponentIndex, apiKey]);\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, apiKey]);\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, apiKey]);\n\n const canGoPrevious = useMemo(() => {\n return state.currentComponentIndex > 0;\n }, [state.currentComponentIndex, apiKey]);\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, apiKey]);\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, apiKey]);\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 = apiKey ? undefined : await authentification();\n console.log('token in initializeSession', { token, apiKey },);\n\n // Check if we already have a session ID from URL params (passed via state or prop)\n let session;\n const existingSessionId = state.session.session_id; // This might be set from initial props if we add logic for it\n\n if (existingSessionId && existingSessionId.length > 0) {\n logger.log('Resuming existing session:', existingSessionId);\n // Verify existence/validity if needed, for now trust the ID and just fetch/use it\n session = { session_id: existingSessionId };\n } else {\n session = await kycService.newSession({ token, apiKey });\n }\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 apiKey: apiKey,\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 }, [apiKey]);\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 'welcome':\n // Welcome is valid once user has given consent (componentData is set when they click Get Started)\n return componentData && componentData.consentGiven !== false;\n\n case 'email_verification':\n return componentData && componentData.verified === true;\n\n case 'phone_verification':\n return componentData && componentData.verified === true;\n\n case 'personal_information':\n return componentData && Object.keys(componentData).length > 0;\n\n case 'additional_documents':\n // Optional by default in template config, but if required we should check based on config\n // For now, return true or check length if present\n return true;\n\n case 'review_submit':\n return true;\n default:\n return false;\n }\n }, [state.template.components, state.componentData, apiKey]);\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, apiKey]),\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 // Prevent multiple simultaneous calls\n setState(prev => {\n if (prev.isProcessing) {\n return prev;\n }\n return {\n ...prev,\n isProcessing: true,\n };\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) {\n setState(prev => ({\n ...prev,\n isProcessing: false,\n }));\n return;\n }\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 console.log('payloadData', action, apiKey);\n\n await kycService.verificationSession({\n session_id: state.session.session_id,\n step: step,\n data: payloadData,\n templateId: templateId,\n token: state.session.token,\n action: action,\n apiKey: apiKey ?? \"-\",\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 logger.error('Error in nextComponent:', 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, apiKey, state.session.session_id, state.session.token, buildPayloadForComponent, mapComponentTypeToAction, chooseTemplateId, state.currentLanguage]),\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, apiKey]),\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, apiKey]),\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 }, [apiKey]),\n\n // Valider un composant\n validateComponent: useCallback((componentId: number) => {\n return validateComponent(componentId);\n }, [validateComponent, apiKey]),\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, apiKey]),\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, apiKey]),\n\n // Réinitialiser le template\n resetTemplate: useCallback(() => {\n setState(buildInitialState());\n }, [buildInitialState, apiKey]),\n\n // Changer la langue\n setLanguage: useCallback((language: string) => {\n setState(prev => ({\n ...prev,\n currentLanguage: language,\n }));\n }, [apiKey]),\n\n // Afficher le stepper personnalisé\n showCustomStepper: useCallback((show: boolean) => {\n setState(prev => ({\n ...prev,\n showCustomStepper: show,\n }));\n }, [apiKey]),\n\n setVerificationState: useCallback((verificationState) => {\n setState(prev => ({\n ...prev,\n verification: verificationState,\n }));\n }, [apiKey]),\n };\n\n return {\n state,\n actions,\n currentComponent,\n progress,\n canGoNext,\n canGoPrevious,\n isComplete,\n getLocalizedText,\n initializeSession,\n env,\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;AAG/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;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAiBtD,MAAM,sBAAsB,GAAG,aAAa,CAAyC,SAAS,CAAC,CAAC;AAmBhG,MAAM,CAAC,MAAM,uBAAuB,GAA2C,CAAC,EAC9E,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,EACR,eAAe,GAAG,IAAI,EACtB,MAAM,EACN,GAAG,GAAG,YAAY,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;IAE7K,OAAO,CACL,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CACjD;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,sBAAsB,CAAC,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,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,KAAK,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAErJ,4BAA4B;QAC5B,aAAa,EAAE,WAAW,CAAC,GAAG,EAAE;YAC9B,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAChC,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;QAE/B,oBAAoB;QACpB,WAAW,EAAE,WAAW,CAAC,CAAC,QAAgB,EAAE,EAAE;YAC5C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChB,GAAG,IAAI;gBACP,eAAe,EAAE,QAAQ;aAC1B,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAEZ,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,CAAC,MAAM,CAAC,CAAC;QAEZ,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,CAAC,MAAM,CAAC,CAAC;KACb,CAAC;IAEF,OAAO;QACL,KAAK;QACL,OAAO;QACP,gBAAgB;QAChB,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;QACV,gBAAgB;QAChB,iBAAiB;QACjB,GAAG;QACH,MAAM;KACc,CAAC;AACzB,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 { KycEnvironment } from '../types/env.types';\nimport kycService, { authentification, truncateFields } from '../modules/api/KYCService';\nimport useI18n from './useI18n';\nimport { logger } from '../utils/logger';\nimport { countryMapping } from '../config/region_mapping';\nimport { countryData } from '../config/countriesData';\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 env: KycEnvironment;\n apiKey?: string;\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 env?: KycEnvironment;\n existingSessionId?: string;\n /** Index in template.components where to resume (0-based). Simple to store in template table. */\n initialComponentIndex?: number;\n /** Pays / type de document depuis l'URL de reprise — évite de dépendre du backend pour afficher les pays. */\n initialCountryResume?: { code: string; documentType: string; region?: 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 env = 'PRODUCTION',\n existingSessionId,\n initialComponentIndex,\n initialCountryResume,\n}) => {\n const hookResult = useTemplateKYCFlow(template, onComplete, onError, onCancel, initialLanguage, apiKey, env, existingSessionId, initialComponentIndex, initialCountryResume);\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 env: KycEnvironment = 'PRODUCTION',\n existingSessionId?: string,\n initialComponentIndex?: number,\n initialCountryResume?: { code: string; documentType: string; region?: string },\n): UseTemplateReturn => {\n\n const { setLocale } = useI18n();\n\n useEffect(() => {\n setLocale(initialLanguage);\n }, [initialLanguage, apiKey]);\n\n // Helpers to align SDK steps with backend actions/templates\n const isUiOnlyStep = useCallback((type: TemplateComponent['type']) => {\n return type === 'verification_progress';\n }, [apiKey]);\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 }, [apiKey]);\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 }, [apiKey]);\n\n const templateWithReview = useMemo(() => ensureReviewSubmitStep(template), [template, ensureReviewSubmitStep, apiKey]);\n const templateWithReviewAndVerification = useMemo(() => ensureVerificationProgressStep(templateWithReview), [templateWithReview, ensureVerificationProgressStep, apiKey]);\n\n // État initial du flux (initialComponentIndex = index dans template.components pour reprendre au bon composant)\n const buildInitialState = (): TemplateState => {\n let resumeAtIndex = 0;\n let completedComponents: number[] = [];\n let initialComponentData: Record<number, unknown> = {};\n\n logger.log('buildInitialState called', { initialComponentIndex, existingSessionId, initialCountryResume });\n\n if (initialComponentIndex !== undefined && initialComponentIndex >= 0) {\n const maxIndex = templateWithReviewAndVerification.components.length - 1;\n const requestedIndex = Math.min(initialComponentIndex, maxIndex);\n const requestedComponent = templateWithReviewAndVerification.components[requestedIndex];\n\n logger.log('Processing initialComponentIndex (component in template)', {\n initialComponentIndex,\n requestedIndex,\n maxIndex,\n componentType: requestedComponent?.type,\n componentId: requestedComponent?.id,\n });\n\n // Reprendre au composant en cours (id_card, selfie, etc.)\n if (requestedComponent?.type === 'id_card') {\n if (existingSessionId) {\n logger.log('id_card with existing session - staying at id_card');\n resumeAtIndex = requestedIndex;\n if (resumeAtIndex > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, resumeAtIndex)\n .map(component => component.id);\n }\n } else {\n const countrySelectionIndex = templateWithReviewAndVerification.components.findIndex(\n c => c.type === 'country_selection'\n );\n logger.log('id_card without session - going back to country_selection', { countrySelectionIndex });\n if (countrySelectionIndex >= 0) {\n resumeAtIndex = countrySelectionIndex;\n if (countrySelectionIndex > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, countrySelectionIndex)\n .map(component => component.id);\n }\n } else {\n resumeAtIndex = 0;\n }\n }\n } else if (requestedComponent?.type === 'review_submit') {\n resumeAtIndex = requestedIndex;\n completedComponents = [];\n } else {\n resumeAtIndex = requestedIndex;\n if (resumeAtIndex > 0) {\n completedComponents = templateWithReviewAndVerification.components\n .slice(0, resumeAtIndex)\n .map(component => component.id);\n }\n }\n\n logger.log('Final initial state (resume at component index)', {\n resumeAtIndex,\n completedComponentsCount: completedComponents.length,\n componentAtResume: templateWithReviewAndVerification.components[resumeAtIndex]?.type,\n });\n }\n\n if (initialCountryResume?.code && initialCountryResume?.documentType) {\n const countrySel = templateWithReviewAndVerification.components.find(c => c.type === 'country_selection');\n if (countrySel && countryData[initialCountryResume.code]) {\n initialComponentData[countrySel.id] = {\n code: initialCountryResume.code,\n documentType: initialCountryResume.documentType,\n region: initialCountryResume.region || 'root',\n ...countryData[initialCountryResume.code],\n };\n logger.log('Prefilled country_selection from URL', { code: initialCountryResume.code, documentType: initialCountryResume.documentType });\n }\n }\n\n return {\n template: templateWithReviewAndVerification,\n currentComponentIndex: resumeAtIndex,\n completedComponents: completedComponents,\n componentData: initialComponentData,\n errors: {},\n isProcessing: false,\n currentLanguage: initialLanguage,\n showCustomStepper: true,\n session: {\n session_id: existingSessionId || '',\n token: '',\n isInitialized: false,\n isProcessing: false,\n error: null,\n sessionDataRestored: !existingSessionId || Boolean(initialCountryResume?.code && initialCountryResume?.documentType),\n },\n verification: {\n status: 'idle',\n },\n };\n };\n\n // État du flux\n const [state, setState] = useState<TemplateState>(() => buildInitialState());\n \n // Fonction utilitaire pour convertir base64 en data URI pour l'affichage\n const base64ToDataUri = useCallback((base64: string, mimeType: string = 'image/jpeg'): string => {\n // Si c'est déjà une data URI, retourner tel quel\n if (base64.startsWith('data:')) {\n return base64;\n }\n // Sinon, créer une data URI\n return `data:${mimeType};base64,${base64}`;\n }, []);\n\n // Charger les données de session si on reprend une session existante\n useEffect(() => {\n const loadSessionData = async () => {\n // Ne charger que si on a une session existante\n if (!existingSessionId) {\n logger.log('No existingSessionId, skipping data load');\n return;\n }\n\n // Si initialComponentIndex n'est pas défini ou est 0, on ne charge pas (début de session)\n if (initialComponentIndex === undefined || initialComponentIndex === 0) {\n logger.log('initialComponentIndex is 0 or undefined, skipping data load');\n return;\n }\n\n // Attendre que la session soit initialisée\n if (!state.session.isInitialized || !state.session.session_id) {\n logger.log('Session not initialized yet, waiting...', {\n isInitialized: state.session.isInitialized,\n sessionId: state.session.session_id\n });\n return;\n }\n\n try {\n logger.log('Loading session data for resume:', { sessionId: existingSessionId, componentIndex: initialComponentIndex });\n const result = await kycService.getVerificationResult(state.session.session_id);\n const sessionData = result[state.session.session_id]?.data;\n\n if (sessionData) {\n // Restaurer les données des composants depuis la session\n // Utiliser 'as any' car VerificationResult peut avoir des propriétés dynamiques\n const data: any = sessionData;\n const restoredComponentData: Record<number, any> = {};\n\n // Parcourir les composants jusqu'au composant de reprise (inclu) pour restaurer leurs données\n templateWithReviewAndVerification.components\n .slice(0, initialComponentIndex + 1)\n .forEach((component) => {\n // Essayer de restaurer les données selon le type de composant\n if (component.type === 'id_card' || component.type === 'file_upload') {\n // Les documents peuvent être dans différentes structures\n let documents: any = null;\n \n // Chercher dans différentes structures possibles\n if (data.documents) {\n documents = data.documents;\n } else if (data.user_data?.documents) {\n documents = data.user_data.documents;\n } else if (data.document_images) {\n documents = data.document_images;\n }\n\n if (documents) {\n // Convertir les images base64 en format utilisable\n const restoredDocuments: Record<string, any> = {};\n \n Object.keys(documents).forEach((key) => {\n const doc = documents[key];\n if (typeof doc === 'object' && doc !== null) {\n // Si on a un fichier base64, créer une structure avec dir et file\n if (doc.file || doc.base64) {\n const base64Data = doc.file || doc.base64;\n restoredDocuments[key] = {\n dir: base64ToDataUri(base64Data), // Utiliser data URI pour l'affichage\n file: base64Data, // Garder le base64 pour l'envoi\n mrz: doc.mrz || '',\n templatePath: doc.templatePath || '',\n };\n } else {\n // Sinon, garder la structure originale\n restoredDocuments[key] = doc;\n }\n } else if (typeof doc === 'string') {\n // Si c'est directement une string base64\n restoredDocuments[key] = {\n dir: base64ToDataUri(doc),\n file: doc,\n mrz: '',\n templatePath: '',\n };\n }\n });\n\n if (Object.keys(restoredDocuments).length > 0) {\n restoredComponentData[component.id] = restoredDocuments;\n }\n }\n } else if (component.type === 'selfie') {\n // Les selfies peuvent être dans sessionData.selfie_info\n if (data.selfie_info) {\n const selfieData: Record<string, any> = {};\n const selfieInfo: any = data.selfie_info;\n \n // Si selfie_info contient une image\n if (selfieInfo.image) {\n const base64Image = selfieInfo.image;\n selfieData['front'] = {\n dir: base64ToDataUri(base64Image),\n file: base64Image,\n };\n }\n \n // Si on a plusieurs orientations\n if (selfieInfo.orientations) {\n Object.keys(selfieInfo.orientations).forEach((orientation) => {\n const img = selfieInfo.orientations[orientation];\n if (img) {\n selfieData[orientation] = {\n dir: base64ToDataUri(img),\n file: img,\n };\n }\n });\n }\n\n if (Object.keys(selfieData).length > 0) {\n restoredComponentData[component.id] = selfieData;\n }\n }\n } else if (component.type === 'country_selection') {\n // Reconstruire country_selection au format attendu par IDCardCapture / CountrySelectionTemplate (code, documentType, region, regionMapping)\n const meta = data.metadata || data.user_data || data;\n const code = meta.country || meta.country_code || meta.code;\n const documentType = meta.document_type || meta.documentType;\n const region = meta.region;\n if (code && documentType != null) {\n const country = countryData[code];\n const mapping = countryMapping[code as keyof typeof countryMapping];\n if (country) {\n restoredComponentData[component.id] = {\n code,\n ...country,\n documentType,\n region: region || undefined,\n regionMapping: mapping || undefined,\n };\n logger.log('Restored country_selection for resume', { code, documentType, region });\n } else {\n restoredComponentData[component.id] = { code, documentType, region: region || undefined, regionMapping: mapping || undefined };\n }\n } else if (data.metadata || data.user_data) {\n restoredComponentData[component.id] = {\n ...(data.metadata || {}),\n ...(data.user_data || {}),\n };\n }\n } else if (component.type === 'location') {\n // Les données de localisation peuvent être dans metadata\n if (data.metadata?.location || data.user_data?.location) {\n restoredComponentData[component.id] = {\n ...(data.metadata?.location || {}),\n ...(data.user_data?.location || {}),\n };\n }\n }\n });\n\n // Fallback: si pas de country_selection restauré mais on a des documents avec templatePath, déduire code/documentType (ex. \"templates/national_id_CM_front.jpg\")\n const countrySelectionComponent = templateWithReviewAndVerification.components.find(c => c.type === 'country_selection');\n if (countrySelectionComponent && !restoredComponentData[countrySelectionComponent.id] && data.documents) {\n const docs = data.documents as Record<string, { templatePath?: string }>;\n const firstDoc = Object.values(docs).find(d => d?.templatePath);\n const path = firstDoc?.templatePath || '';\n const match = path.match(/([a-z_]+)_([A-Z]{2})(?:_|$)/i) || path.match(/([A-Z]{2})/);\n const code = match ? (match[2] || match[1]).toUpperCase().slice(0, 2) : null;\n const docTypeFromPath = path.match(/(national_id|identity_card|passport|passport_card)/i)?.[1]?.toLowerCase().replace('identity_card', 'national_id') || null;\n if (code && countryData[code]) {\n const documentType = docTypeFromPath || 'national_id';\n const mapping = countryMapping[code as keyof typeof countryMapping];\n const country = countryData[code];\n restoredComponentData[countrySelectionComponent.id] = {\n code,\n ...country,\n documentType,\n region: undefined,\n regionMapping: mapping || undefined,\n };\n logger.log('Restored country_selection from document templatePath', { code, documentType, path });\n }\n }\n\n // Mettre à jour l'état avec les données restaurées\n if (Object.keys(restoredComponentData).length > 0) {\n logger.log('Session data restored - components:', Object.keys(restoredComponentData));\n logger.log('Session data restored - sample data:', truncateFields(restoredComponentData));\n setState(prev => ({\n ...prev,\n componentData: {\n ...prev.componentData,\n ...restoredComponentData,\n },\n session: { ...prev.session, sessionDataRestored: true },\n }));\n logger.log('Component data updated in state');\n } else {\n logger.log('No component data to restore from session');\n setState(prev => ({ ...prev, session: { ...prev.session, sessionDataRestored: true } }));\n }\n } else {\n setState(prev => ({ ...prev, session: { ...prev.session, sessionDataRestored: true } }));\n }\n } catch (error) {\n logger.error('Error loading session data:', truncateFields(error));\n setState(prev => ({ ...prev, session: { ...prev.session, sessionDataRestored: true } }));\n }\n };\n\n loadSessionData();\n }, [existingSessionId, initialComponentIndex, state.session.isInitialized, state.session.session_id, templateWithReviewAndVerification.components, base64ToDataUri]);\n\n // Si l'index pointe vers Review alors que des étapes ne sont pas complétées, ramener à la première étape incomplète\n useEffect(() => {\n const comp = state.template.components[state.currentComponentIndex];\n if (!comp || comp.type !== 'review_submit') return;\n const nonReview = state.template.components.filter(\n c => c.type !== 'review_submit' && c.type !== 'verification_progress'\n );\n if (nonReview.every(c => state.completedComponents.includes(c.id))) return;\n const firstIncomplete = nonReview.find(c => !state.completedComponents.includes(c.id));\n if (!firstIncomplete) return;\n const targetIndex = state.template.components.findIndex(c => c.id === firstIncomplete.id);\n if (targetIndex >= 0 && targetIndex !== state.currentComponentIndex) {\n setState(prev => ({ ...prev, currentComponentIndex: targetIndex }));\n }\n }, [state.currentComponentIndex, state.completedComponents, state.template.components]);\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 'welcome':\n // UI-only step, no backend action needed\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 }, [apiKey]);\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, apiKey]);\n\n // Build backend-friendly payloads per action\n const buildPayloadForComponent = useCallback((action: string | null, component: TemplateComponent, rawData: any, templateId: string, step: number) => {\n console.log('apiKey in buildPayloadForComponent', apiKey);\n\n const base = { template_id: templateId || null, templateId: templateId || null, step: component.order, permissionGranted: true } as any;\n if (!action) {\n return base;\n }\n // Document upload expects documents; include country_selection in metadata so resume can restore it\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 const countryComp = state.template.components.find(c => c.type === 'country_selection');\n const countryDataForPayload = countryComp ? state.componentData[countryComp.id] : null;\n const metadata: Record<string, unknown> = {};\n if (countryDataForPayload?.code) {\n metadata.country = countryDataForPayload.code;\n metadata.document_type = countryDataForPayload.documentType;\n if (countryDataForPayload.region != null) metadata.region = countryDataForPayload.region;\n }\n return {\n ...base,\n documents,\n ...(Object.keys(metadata).length > 0 ? { metadata } : {}),\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 const documentType = _idCardData?.documentType;\n // Map national_id to identity_card for selfie capture\n const mappedDocumentType = documentType === 'national_id' ? 'identity_card' : (documentType as GovernmentDocumentType || 'identity_card');\n return { ...base, documents, country: _idCardData?.country || '', documentType: mappedDocumentType };\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, apiKey]);\n // Ensure the template contains a final review step\n\n // console.log('apiKey in useTemplateKYCFlow', apiKey);\n\n\n // Composant actuel (peut être redirigé si on pointe vers Review alors que le flux n'est pas terminé)\n const currentComponent = useMemo(() => {\n const comp = state.template.components[state.currentComponentIndex] || null;\n if (!comp || comp.type !== 'review_submit') return comp;\n const nonReview = state.template.components.filter(\n c => c.type !== 'review_submit' && c.type !== 'verification_progress'\n );\n const allDone = nonReview.every(c => state.completedComponents.includes(c.id));\n if (allDone) return comp;\n const firstIncomplete = nonReview.find(c => !state.completedComponents.includes(c.id));\n return firstIncomplete || comp;\n }, [state.template.components, state.currentComponentIndex, state.completedComponents, apiKey]);\n\n // Progression du flux (basée sur le composant effectivement affiché)\n const progress = useMemo(() => {\n const idx = currentComponent\n ? state.template.components.findIndex(c => c.id === currentComponent.id)\n : state.currentComponentIndex;\n const i = idx >= 0 ? idx : state.currentComponentIndex;\n return state.template.components.length > 0\n ? ((i + 1) / state.template.components.length) * 100\n : 0;\n }, [currentComponent, state.template.components, state.currentComponentIndex, apiKey]);\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, apiKey]);\n\n const canGoPrevious = useMemo(() => {\n return state.currentComponentIndex > 0;\n }, [state.currentComponentIndex, apiKey]);\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, apiKey]);\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, apiKey]);\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 = apiKey ? undefined : await authentification();\n console.log('token in initializeSession', { token, apiKey },);\n\n // Check if we already have a session ID from URL params (passed via state or prop)\n let session;\n const existingSessionId = state.session.session_id; // This might be set from initial props if we add logic for it\n\n if (existingSessionId && existingSessionId.length > 0) {\n logger.log('Resuming existing session:', existingSessionId);\n // Verify existence/validity if needed, for now trust the ID and just fetch/use it\n session = { session_id: existingSessionId };\n } else {\n session = await kycService.newSession({ token, apiKey });\n }\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 apiKey: apiKey,\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 }, [apiKey]);\n\n // When user switches device: resume with existingSessionId + initialStep — ensure session is initialized so loadSessionData runs\n useEffect(() => {\n if (!existingSessionId || state.session.isInitialized) return;\n if (state.session.session_id !== existingSessionId) return;\n logger.log('Resuming on new device: initializing session so data can load', { existingSessionId, initialComponentIndex });\n initializeSession();\n }, [existingSessionId, state.session.session_id, state.session.isInitialized, initializeSession]);\n\n // Validation d'un composant (dataOverride permet de valider sans attendre la mise à jour du state)\n const validateComponent = useCallback((componentId: number, dataOverride?: any): boolean => {\n const component = state.template.components.find(c => c.id === componentId);\n if (!component) return false;\n\n const componentData = dataOverride !== undefined ? dataOverride : 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 'welcome':\n // Welcome is valid once user has given consent (componentData is set when they click Get Started)\n return componentData && componentData.consentGiven !== false;\n\n case 'email_verification':\n return componentData && componentData.verified === true;\n\n case 'phone_verification':\n return componentData && componentData.verified === true;\n\n case 'personal_information':\n return componentData && Object.keys(componentData).length > 0;\n\n case 'additional_documents':\n // Optional by default in template config, but if required we should check based on config\n // For now, return true or check length if present\n return true;\n\n case 'review_submit':\n return true;\n default:\n return false;\n }\n }, [state.template.components, state.componentData, apiKey]);\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, apiKey]),\n\n // Passer au composant suivant (overrideData = données du step courant si déjà connues, évite un double clic)\n nextComponent: useCallback(async (overrideData?: any) => {\n if (!canGoNext) return;\n\n const currentComp = state.template.components[state.currentComponentIndex];\n if (!currentComp) return;\n\n // Prevent multiple simultaneous calls\n setState(prev => {\n if (prev.isProcessing) {\n return prev;\n }\n return {\n ...prev,\n isProcessing: true,\n };\n });\n // Valider avec override ou state\n if (!validateComponent(currentComp.id, overrideData)) {\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) {\n setState(prev => ({\n ...prev,\n isProcessing: false,\n }));\n return;\n }\n\n if (component.type === 'review_submit') {\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n componentData: overrideData !== undefined ? { ...prev.componentData, [currentComp.id]: overrideData } : prev.componentData,\n isProcessing: false,\n verification: { status: 'in_progress' },\n errors: { ...prev.errors, [currentComp.id]: '' }\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 componentData: overrideData !== undefined ? { ...prev.componentData, [currentComp.id]: overrideData } : prev.componentData,\n isProcessing: false,\n errors: { ...prev.errors, [currentComp.id]: '' }\n }));\n return;\n }\n\n const step = serverStep === 0 && action !== 'initialize_session' ? 1 : serverStep;\n const currentStepData = overrideData !== undefined ? overrideData : state.componentData[currentComp.id];\n const payloadData = buildPayloadForComponent(action, component, currentStepData, templateId, step);\n console.log('payloadData', action, apiKey);\n\n await kycService.verificationSession({\n session_id: state.session.session_id,\n step: step,\n data: payloadData,\n templateId: templateId,\n token: state.session.token,\n action: action,\n apiKey: apiKey ?? \"-\",\n });\n logger.log(\"currentComp state\", truncateFields(state));\n setState(prev => ({\n ...prev,\n currentComponentIndex: prev.currentComponentIndex + 1,\n completedComponents: [...prev.completedComponents, currentComp.id],\n componentData: overrideData !== undefined ? { ...prev.componentData, [currentComp.id]: overrideData } : prev.componentData,\n isProcessing: false,\n ...(action === \"location_permission\" ? { permissionGranted: true } : {}),\n errors: { ...prev.errors, [currentComp.id]: '' }\n }));\n\n } catch (error) {\n logger.error('Error in nextComponent:', 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, apiKey, state.session.session_id, state.session.token, buildPayloadForComponent, mapComponentTypeToAction, chooseTemplateId, state.currentLanguage]),\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, apiKey]),\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, apiKey]),\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 }, [apiKey]),\n\n // Valider un composant\n validateComponent: useCallback((componentId: number, dataOverride?: any) => {\n return validateComponent(componentId, dataOverride);\n }, [validateComponent, apiKey]),\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, apiKey]),\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, apiKey]),\n\n // Réinitialiser le template\n resetTemplate: useCallback(() => {\n setState(buildInitialState());\n }, [buildInitialState, apiKey]),\n\n // Changer la langue\n setLanguage: useCallback((language: string) => {\n setState(prev => ({\n ...prev,\n currentLanguage: language,\n }));\n }, [apiKey]),\n\n // Afficher le stepper personnalisé\n showCustomStepper: useCallback((show: boolean) => {\n setState(prev => ({\n ...prev,\n showCustomStepper: show,\n }));\n }, [apiKey]),\n\n setVerificationState: useCallback((verificationState) => {\n setState(prev => ({\n ...prev,\n verification: verificationState,\n }));\n }, [apiKey]),\n };\n\n return {\n state,\n actions,\n currentComponent,\n progress,\n canGoNext,\n canGoPrevious,\n isComplete,\n getLocalizedText,\n initializeSession,\n env,\n apiKey,\n } as UseTemplateReturn;\n}; "]}
|
package/build/i18n/en/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare const en: {
|
|
|
61
61
|
termsOfService: string;
|
|
62
62
|
marketingConsent: string;
|
|
63
63
|
readMore: string;
|
|
64
|
+
getStarted: string;
|
|
64
65
|
};
|
|
65
66
|
locationCapture: {
|
|
66
67
|
title: string;
|
|
@@ -104,6 +105,7 @@ export declare const en: {
|
|
|
104
105
|
success: string;
|
|
105
106
|
error: string;
|
|
106
107
|
captureTitle: string;
|
|
108
|
+
cardNotFullyInFrame: string;
|
|
107
109
|
continueOnPhone: string;
|
|
108
110
|
continueOnMobile: string;
|
|
109
111
|
scanQrCode: string;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkRd,CAAC"}
|
package/build/i18n/en/index.js
CHANGED
|
@@ -67,7 +67,8 @@ export const en = {
|
|
|
67
67
|
privacyPolicy: 'I agree to the Privacy Policy',
|
|
68
68
|
termsOfService: 'I agree to the Terms of Service',
|
|
69
69
|
marketingConsent: 'I agree to receive marketing communications',
|
|
70
|
-
readMore: 'Read more'
|
|
70
|
+
readMore: 'Read more',
|
|
71
|
+
getStarted: 'Get Started'
|
|
71
72
|
},
|
|
72
73
|
// Location Capture
|
|
73
74
|
locationCapture: {
|
|
@@ -119,6 +120,7 @@ export const en = {
|
|
|
119
120
|
success: 'ID captured successfully',
|
|
120
121
|
error: 'Failed to capture ID. Please try again.',
|
|
121
122
|
captureTitle: '%{side} side of your government document',
|
|
123
|
+
cardNotFullyInFrame: 'The ID is not fully in frame. Position the entire card within the frame.',
|
|
122
124
|
continueOnPhone: 'Continue on Phone',
|
|
123
125
|
continueOnMobile: 'Continue on Mobile',
|
|
124
126
|
scanQrCode: 'Scan this QR code with your phone to continue the verification process.',
|
|
@@ -1 +1 @@
|
|
|
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;QACnB,WAAW,EAAE,cAAc;QAC3B,UAAU,EAAE,aAAa;QACzB,MAAM,EAAE,QAAQ;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,KAAK;QACV,gBAAgB,EAAE,mBAAmB;QACrC,WAAW,EAAE,cAAc;QAC3B,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,aAAa;QACzB,iBAAiB,EAAE,yBAAyB;QAC5C,KAAK,EAAE,gCAAgC;KACxC;IAED,WAAW;IACX,GAAG,EAAE;QACH,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,iDAAiD;QAC3D,IAAI,EAAE,6BAA6B;QAC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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 invalidCode: 'Invalid code',\n resendCode: 'Resend code',\n verify: 'Verify',\n sendCode: 'Send code',\n resend: 'Resend',\n email: 'Email',\n otp: 'OTP',\n verificationCode: 'Verification code',\n changeEmail: 'Change Email',\n processing: \"Processing\",\n codeResent: 'Code Resent',\n codeResentMessage: 'Code resent to %{email}',\n phone: 'Phone number with country code',\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 enterCodeSent: \"Enter code sent\",\n\n additionalDocs: {\n title: 'Additional Documents',\n add: \"Press to select file\",\n subtitle: 'Upload additional documents to complete your identity verification',\n uploadButton: 'Upload',\n uploadButtonText: 'Upload',\n uploadSubtext: 'Upload a clear photo of your document',\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 // 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 welcome: {\n requirements: 'What you\\'ll need:',\n estimatedTime: 'Estimated time:',\n consent: 'Please accept the following:',\n privacyPolicy: 'I agree to the Privacy Policy',\n termsOfService: 'I agree to the Terms of Service',\n marketingConsent: 'I agree to receive marketing communications',\n readMore: 'Read more'\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 captureTitle: '%{side} side of your government document',\n continueOnPhone: 'Continue on Phone',\n continueOnMobile: 'Continue on Mobile',\n scanQrCode: 'Scan this QR code with your phone to continue the verification process.',\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 wrongCode: \"Wrong code\",\n invalidCode: \"Invalid code\",\n invalidEmail: \"Invalid email\",\n invalidPhone: \"Invalid phone\",\n invalidDate: \"Invalid date\",\n minLength: \"Min length\",\n maxLength: \"Max length\",\n invalidFormat: \"Invalid format\",\n fileTooLarge: \"File too large\",\n fileTypeNotSupported: \"File type not supported\",\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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AClD,YAAY,EAAE,8CAA8C;QAC5D,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,eAAe;QAC7B,YAAY,EAAE,eAAe;QAC7B,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE,YAAY;QACvB,SAAS,EAAE,YAAY;QACvB,aAAa,EAAE,gBAAgB;QAC/B,YAAY,EAAE,gBAAgB;QAC9B,oBAAoB,EAAE,yBAAyB;KAChD;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 invalidCode: 'Invalid code',\n resendCode: 'Resend code',\n verify: 'Verify',\n sendCode: 'Send code',\n resend: 'Resend',\n email: 'Email',\n otp: 'OTP',\n verificationCode: 'Verification code',\n changeEmail: 'Change Email',\n processing: \"Processing\",\n codeResent: 'Code Resent',\n codeResentMessage: 'Code resent to %{email}',\n phone: 'Phone number with country code',\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 enterCodeSent: \"Enter code sent\",\n\n additionalDocs: {\n title: 'Additional Documents',\n add: \"Press to select file\",\n subtitle: 'Upload additional documents to complete your identity verification',\n uploadButton: 'Upload',\n uploadButtonText: 'Upload',\n uploadSubtext: 'Upload a clear photo of your document',\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 // 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 welcome: {\n requirements: 'What you\\'ll need:',\n estimatedTime: 'Estimated time:',\n consent: 'Please accept the following:',\n privacyPolicy: 'I agree to the Privacy Policy',\n termsOfService: 'I agree to the Terms of Service',\n marketingConsent: 'I agree to receive marketing communications',\n readMore: 'Read more',\n getStarted: 'Get Started'\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 captureTitle: '%{side} side of your government document',\n cardNotFullyInFrame: 'The ID is not fully in frame. Position the entire card within the frame.',\n continueOnPhone: 'Continue on Phone',\n continueOnMobile: 'Continue on Mobile',\n scanQrCode: 'Scan this QR code with your phone to continue the verification process.',\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 wrongCode: \"Wrong code\",\n invalidCode: \"Invalid code\",\n invalidEmail: \"Invalid email\",\n invalidPhone: \"Invalid phone\",\n invalidDate: \"Invalid date\",\n minLength: \"Min length\",\n maxLength: \"Max length\",\n invalidFormat: \"Invalid format\",\n fileTooLarge: \"File too large\",\n fileTypeNotSupported: \"File type not supported\",\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
|
@@ -47,6 +47,7 @@ export declare const fr: {
|
|
|
47
47
|
termsOfService: string;
|
|
48
48
|
marketingConsent: string;
|
|
49
49
|
readMore: string;
|
|
50
|
+
getStarted: string;
|
|
50
51
|
};
|
|
51
52
|
locationCapture: {
|
|
52
53
|
title: string;
|
|
@@ -90,6 +91,7 @@ export declare const fr: {
|
|
|
90
91
|
success: string;
|
|
91
92
|
error: string;
|
|
92
93
|
captureTitle: string;
|
|
94
|
+
cardNotFullyInFrame: string;
|
|
93
95
|
continueOnPhone: string;
|
|
94
96
|
continueOnMobile: string;
|
|
95
97
|
scanQrCode: string;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmQd,CAAC"}
|
package/build/i18n/fr/index.js
CHANGED
|
@@ -53,7 +53,8 @@ export const fr = {
|
|
|
53
53
|
privacyPolicy: 'J\'accepte la Politique de Confidentialité',
|
|
54
54
|
termsOfService: 'J\'accepte les Conditions d\'Utilisation',
|
|
55
55
|
marketingConsent: 'J\'accepte de recevoir des communications marketing',
|
|
56
|
-
readMore: 'Lire plus'
|
|
56
|
+
readMore: 'Lire plus',
|
|
57
|
+
getStarted: 'Commencer'
|
|
57
58
|
},
|
|
58
59
|
// Location Capture
|
|
59
60
|
locationCapture: {
|
|
@@ -105,6 +106,7 @@ export const fr = {
|
|
|
105
106
|
success: 'Document d\'identité capturé avec succès',
|
|
106
107
|
error: 'Échec de la capture du document. Veuillez réessayer.',
|
|
107
108
|
captureTitle: '%{side} de votre document d\'identité',
|
|
109
|
+
cardNotFullyInFrame: 'La carte n\'est pas entièrement visible. Positionnez toute la carte dans le cadre.',
|
|
108
110
|
continueOnPhone: 'Continuer sur mobile',
|
|
109
111
|
continueOnMobile: 'Continuer sur mobile',
|
|
110
112
|
scanQrCode: 'Scannez ce code QR avec votre téléphone pour continuer la vérification.',
|