datakeen-session-react 1.1.159 → 1.1.161
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/dist/cjs/components/DatakeenSession.js +22 -3
- package/dist/cjs/components/DatakeenSession.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentCollection.js +2 -2
- package/dist/cjs/components/document-collection/DocumentCollection.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentCollectionIntroduction.js +5 -5
- package/dist/cjs/components/document-collection/DocumentCollectionIntroduction.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentCollectionMethodSelection.js +2 -2
- package/dist/cjs/components/document-collection/DocumentCollectionMethodSelection.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentCollectionSelection.js +5 -5
- package/dist/cjs/components/document-collection/DocumentCollectionSelection.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentCollectionUpload.js +11 -11
- package/dist/cjs/components/document-collection/DocumentCollectionUpload.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentError.js +4 -2
- package/dist/cjs/components/document-collection/DocumentError.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentSuccess.js +2 -2
- package/dist/cjs/components/document-collection/DocumentSuccess.js.map +1 -1
- package/dist/cjs/components/id-check/Photo.js +9 -1
- package/dist/cjs/components/id-check/Photo.js.map +1 -1
- package/dist/cjs/components/jdi/JDDWorkInProgress.js +1 -1
- package/dist/cjs/components/jdi/JDDWorkInProgress.js.map +1 -1
- package/dist/cjs/components/jdi/JDIDocumentUpload.js +1 -1
- package/dist/cjs/components/jdi/JDIDocumentUpload.js.map +1 -1
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js +26 -7
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/dist/cjs/components/session/DocumentCheck.js +2 -2
- package/dist/cjs/components/session/DocumentCheck.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/CustomFormFields.js +42 -45
- package/dist/cjs/components/session/UserInputForm/CustomFormFields.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/DatePickerField.js +154 -0
- package/dist/cjs/components/session/UserInputForm/DatePickerField.js.map +1 -0
- package/dist/cjs/components/session/UserInputForm.js +2 -2
- package/dist/cjs/components/session/UserInputForm.js.map +1 -1
- package/dist/cjs/components/session/VideoWorkInProgress.js +1 -1
- package/dist/cjs/components/session/VideoWorkInProgress.js.map +1 -1
- package/dist/cjs/components/signature-electronic/DocusealSignature.js +2 -1
- package/dist/cjs/components/signature-electronic/DocusealSignature.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js +2 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronicIntroduction.js +2 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronicIntroduction.js.map +1 -1
- package/dist/cjs/components/start-flow/CGU.js +5 -2
- package/dist/cjs/components/start-flow/CGU.js.map +1 -1
- package/dist/cjs/components/start-flow/Start.js +5 -2
- package/dist/cjs/components/start-flow/Start.js.map +1 -1
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js +2 -1
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/cjs/components/ui/MobilePageLayout.js +1 -1
- package/dist/cjs/components/ui/MobilePageLayout.js.map +1 -1
- package/dist/cjs/components/ui/Paper.js +2 -2
- package/dist/cjs/components/ui/Paper.js.map +1 -1
- package/dist/cjs/hooks/useUserInputForm.js +90 -29
- package/dist/cjs/hooks/useUserInputForm.js.map +1 -1
- package/dist/cjs/i18n/en.json.js +35 -5
- package/dist/cjs/i18n/en.json.js.map +1 -1
- package/dist/cjs/i18n/fr.json.js +36 -6
- package/dist/cjs/i18n/fr.json.js.map +1 -1
- package/dist/cjs/index.css.js +1 -1
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +13 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +67 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js +62 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +25 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +106 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +16 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js +192 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js +137 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US.js +31 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js +16 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js +170 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js +138 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr.js +31 -0
- package/dist/cjs/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/cjs/types/session.js +6 -0
- package/dist/cjs/types/session.js.map +1 -0
- package/dist/cjs/utils/customFieldValidation.js +62 -0
- package/dist/cjs/utils/customFieldValidation.js.map +1 -0
- package/dist/esm/components/DatakeenSession.js +22 -3
- package/dist/esm/components/DatakeenSession.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentCollection.js +2 -2
- package/dist/esm/components/document-collection/DocumentCollection.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentCollectionIntroduction.js +5 -5
- package/dist/esm/components/document-collection/DocumentCollectionIntroduction.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentCollectionMethodSelection.js +2 -2
- package/dist/esm/components/document-collection/DocumentCollectionMethodSelection.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentCollectionSelection.js +5 -5
- package/dist/esm/components/document-collection/DocumentCollectionSelection.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentCollectionUpload.js +11 -11
- package/dist/esm/components/document-collection/DocumentCollectionUpload.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentError.js +4 -2
- package/dist/esm/components/document-collection/DocumentError.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentSuccess.js +2 -2
- package/dist/esm/components/document-collection/DocumentSuccess.js.map +1 -1
- package/dist/esm/components/id-check/Photo.js +9 -1
- package/dist/esm/components/id-check/Photo.js.map +1 -1
- package/dist/esm/components/jdi/JDDWorkInProgress.js +1 -1
- package/dist/esm/components/jdi/JDDWorkInProgress.js.map +1 -1
- package/dist/esm/components/jdi/JDIDocumentUpload.js +1 -1
- package/dist/esm/components/jdi/JDIDocumentUpload.js.map +1 -1
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js +26 -7
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/dist/esm/components/session/DocumentCheck.js +2 -2
- package/dist/esm/components/session/DocumentCheck.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/CustomFormFields.js +42 -45
- package/dist/esm/components/session/UserInputForm/CustomFormFields.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/DatePickerField.js +132 -0
- package/dist/esm/components/session/UserInputForm/DatePickerField.js.map +1 -0
- package/dist/esm/components/session/UserInputForm.js +2 -2
- package/dist/esm/components/session/UserInputForm.js.map +1 -1
- package/dist/esm/components/session/VideoWorkInProgress.js +1 -1
- package/dist/esm/components/session/VideoWorkInProgress.js.map +1 -1
- package/dist/esm/components/signature-electronic/DocusealSignature.js +2 -1
- package/dist/esm/components/signature-electronic/DocusealSignature.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js +2 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronicIntroduction.js +2 -1
- package/dist/esm/components/signature-electronic/SignatureElectronicIntroduction.js.map +1 -1
- package/dist/esm/components/start-flow/CGU.js +5 -2
- package/dist/esm/components/start-flow/CGU.js.map +1 -1
- package/dist/esm/components/start-flow/Start.js +5 -2
- package/dist/esm/components/start-flow/Start.js.map +1 -1
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js +2 -1
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/esm/components/ui/MobilePageLayout.js +1 -1
- package/dist/esm/components/ui/MobilePageLayout.js.map +1 -1
- package/dist/esm/components/ui/Paper.js +2 -2
- package/dist/esm/components/ui/Paper.js.map +1 -1
- package/dist/esm/components/ui/SelectComponent.js +3 -3
- package/dist/esm/components/ui/SelectComponent.js.map +1 -1
- package/dist/esm/hooks/useUserInputForm.js +92 -31
- package/dist/esm/hooks/useUserInputForm.js.map +1 -1
- package/dist/esm/i18n/en.json.js +35 -5
- package/dist/esm/i18n/en.json.js.map +1 -1
- package/dist/esm/i18n/fr.json.js +36 -6
- package/dist/esm/i18n/fr.json.js.map +1 -1
- package/dist/esm/index.css.js +1 -1
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +11 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +65 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js +60 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +23 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +104 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js +42 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +14 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js +190 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js +135 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js +103 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js +42 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js +14 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js +168 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js +136 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/esm/providers/I18nProvider.js +2 -2
- package/dist/esm/providers/I18nProvider.js.map +1 -1
- package/dist/esm/types/session.js +4 -0
- package/dist/esm/types/session.js.map +1 -0
- package/dist/esm/utils/customFieldValidation.js +56 -0
- package/dist/esm/utils/customFieldValidation.js.map +1 -0
- package/jest.config.js +1 -0
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserInputForm.js","sources":["../../../../src/hooks/useUserInputForm.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { UserInputFormProps } from \"../types/userInput\";\nimport type {\n AddressSuggestion,\n InformationType,\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../types/userInputForm\";\nimport {\n DEFAULT_FIELDS,\n FALLBACK_ADDRESS_SUGGESTIONS,\n GEOCODING_AUTOCOMPLETE_ENDPOINT,\n} from \"../constants/userInputForm\";\nimport { API_BASE_URL } from \"../config/env\";\nimport {\n checkIsMajor,\n parseBirthDate,\n resolveInformationType,\n} from \"../utils/userInputForm\";\nimport {\n countNonEmptyListRows,\n getListFieldMinRows,\n} from \"../utils/listFieldUtils\";\nimport { useI18n } from \"./useI18n\";\n\ninterface UseUserInputFormResult {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n informationType: InformationType;\n requestedFields: RequestedFields;\n pageTitle: string;\n pageDescription: string;\n addressSuggestions: AddressSuggestion[];\n showSuggestions: boolean;\n handleFieldChange: (key: keyof UserInputFormState, value: string) => void;\n handleAddressChange: (value: string) => void;\n handleAddressFocus: () => void;\n handleAddressBlur: () => void;\n applyAddressSuggestion: (suggestion: AddressSuggestion) => void;\n goOnNextStep: () => void;\n goOnPreviousStep: () => void;\n // Custom form fields\n customFormData: Record<string, any>;\n customFormErrors: Record<string, boolean>;\n handleCustomFieldChange: (fieldId: string, value: any) => void;\n}\n\nexport const useUserInputForm = ({\n stepObject,\n setUserInput,\n initialUserInput,\n node,\n template,\n contactInfo,\n setContactInfo,\n onContinueCallback,\n}: UserInputFormProps): UseUserInputFormResult => {\n const { setStep, goBack, goToNextStep, step } = stepObject;\n const { t } = useI18n();\n\n const informationType = useMemo<InformationType>(() => {\n const resolved = resolveInformationType(\n node.informationType as string,\n \"identity\",\n );\n console.log(\"🔍 [useUserInputForm] Resolving informationType:\", {\n nodeInformationType: node.informationType,\n resolved,\n hasCustomFields: !!node.customFields,\n customFieldsCount: node.customFields?.length,\n });\n return resolved;\n }, [node.informationType, node.customFields]);\n\n const requestedFields = useMemo<RequestedFields>(() => {\n const defaults = DEFAULT_FIELDS[informationType] || [];\n const optional =\n node.optionalFields && node.optionalFields.length > 0\n ? node.optionalFields\n : defaults;\n const merged = new Set<string>(optional);\n\n if (node.requiredFields) {\n node.requiredFields.forEach((field) => merged.add(field));\n }\n\n return merged;\n }, [node.optionalFields, node.requiredFields, informationType]);\n\n const birthDateParts = useMemo(\n () => parseBirthDate(initialUserInput?.birthDate || \"\"),\n [initialUserInput?.birthDate],\n );\n\n const [form, setForm] = useState<UserInputFormState>({\n lastName: initialUserInput?.lastName || \"\",\n firstName: initialUserInput?.firstName || \"\",\n birthDate: initialUserInput?.birthDate || \"\",\n day: birthDateParts.day,\n month: birthDateParts.month,\n year: birthDateParts.year,\n email: initialUserInput?.email || contactInfo?.email || \"\",\n phoneNumber:\n initialUserInput?.phoneNumber || contactInfo?.phoneNumber || \"\",\n sms: initialUserInput?.sms || \"\",\n addressLine1: initialUserInput?.addressLine1 || \"\",\n addressLine2: initialUserInput?.addressLine2 || \"\",\n postalCode: initialUserInput?.postalCode || \"\",\n city: initialUserInput?.city || \"\",\n countryCode: initialUserInput?.countryCode || \"\",\n nationality: initialUserInput?.nationality || \"\",\n companyName: initialUserInput?.companyName || \"\",\n siret: initialUserInput?.siret || \"\",\n tva: initialUserInput?.tva || \"\",\n });\n\n const [errors, setErrors] = useState<UserInputFormErrors>({});\n\n // Custom form state\n const [customFormData, setCustomFormData] = useState<Record<string, any>>(\n () => {\n if (informationType !== \"custom\" || !node.customFields) return {};\n\n const initial: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const savedValue = initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n initial[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n\n initial[field.id] = savedValue || \"\";\n });\n return initial;\n },\n );\n const [customFormErrors, setCustomFormErrors] = useState<\n Record<string, boolean>\n >({});\n\n const [addressSuggestions, setAddressSuggestions] = useState<\n AddressSuggestion[]\n >([]);\n const [showSuggestions, setShowSuggestions] = useState(false);\n const isFirstRender = useRef(true);\n const hideSuggestionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const addressRequestState = useRef<{\n debounce: ReturnType<typeof setTimeout> | null;\n controller: AbortController | null;\n }>({\n debounce: null,\n controller: null,\n });\n\n const formTitles = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.titles.identity\"),\n \"identity-legal\": t(\"user_input_form.titles.identity_legal\"),\n contact: t(\"user_input_form.titles.contact\"),\n address: t(\"user_input_form.titles.address\"),\n nationality: t(\"user_input_form.titles.nationality\"),\n custom: t(\"user_input_form.titles.custom\"),\n }),\n [t],\n );\n\n const formDescriptions = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.descriptions.identity\"),\n \"identity-legal\": t(\"user_input_form.descriptions.identity_legal\"),\n contact: t(\"user_input_form.descriptions.contact\"),\n address: t(\"user_input_form.descriptions.address\"),\n nationality: t(\"user_input_form.descriptions.nationality\"),\n custom: t(\"user_input_form.descriptions.custom\"),\n }),\n [t],\n );\n\n const applyAddressSuggestion = (suggestion: AddressSuggestion) => {\n const normalizedCountry =\n suggestion.countryCode?.toUpperCase() || suggestion.country || \"\";\n\n setForm((previous) => ({\n ...previous,\n addressLine1: suggestion.addressLine1 || suggestion.label,\n postalCode: suggestion.postalCode || previous.postalCode,\n city: suggestion.city || previous.city,\n countryCode: normalizedCountry || previous.countryCode,\n }));\n setErrors((previous) => ({\n ...previous,\n addressLine1: false,\n postalCode: false,\n city: false,\n country: false,\n }));\n setShowSuggestions(false);\n setAddressSuggestions([]);\n };\n\n const mapGeoapifyFeature = (feature: any): AddressSuggestion | null => {\n if (!feature || !feature.properties) {\n return null;\n }\n\n const { properties } = feature;\n const label: string =\n properties.formatted ||\n properties.address_line1 ||\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n if (!label) {\n return null;\n }\n\n const addressLine1 =\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim() ||\n properties.address_line1 ||\n label;\n\n const city =\n properties.city ||\n properties.town ||\n properties.village ||\n properties.state ||\n \"\";\n\n return {\n id:\n (properties.place_id && String(properties.place_id)) ||\n feature.id ||\n `${properties.lon ?? \"\"}-${properties.lat ?? \"\"}-${label}`,\n label,\n addressLine1,\n postalCode: properties.postcode || \"\",\n city,\n country: properties.country || \"\",\n countryCode: properties.country_code || undefined,\n };\n };\n\n const requestAddressSuggestions = (\n query: string,\n { autoComplete }: { autoComplete: boolean },\n ) => {\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n addressRequestState.current.debounce = null;\n }\n\n if (query.trim().length < 3) {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n addressRequestState.current.controller = null;\n }\n setAddressSuggestions([]);\n setShowSuggestions(false);\n return;\n }\n\n addressRequestState.current.debounce = setTimeout(async () => {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n\n const controller = new AbortController();\n addressRequestState.current.controller = controller;\n\n try {\n const searchParams = new URLSearchParams({\n text: query,\n lang: \"fr\",\n });\n\n const response = await fetch(\n `${API_BASE_URL}${GEOCODING_AUTOCOMPLETE_ENDPOINT}?${searchParams.toString()}`,\n { signal: controller.signal },\n );\n\n if (!response.ok) {\n throw new Error(\n `Geocoding request failed with status ${response.status}`,\n );\n }\n\n const payload = await response.json();\n\n const suggestions: AddressSuggestion[] = Array.isArray(\n payload?.features,\n )\n ? payload.features\n .map((feature: any) => mapGeoapifyFeature(feature))\n .filter(\n (\n suggestion: AddressSuggestion | null,\n ): suggestion is AddressSuggestion => Boolean(suggestion),\n )\n : [];\n\n setAddressSuggestions(suggestions);\n setShowSuggestions(suggestions.length > 0);\n\n if (autoComplete && suggestions.length === 1) {\n const single = suggestions[0];\n const normalizedQuery = query.trim().toLowerCase();\n if (\n normalizedQuery.length >= 6 &&\n single.label.toLowerCase().startsWith(normalizedQuery)\n ) {\n applyAddressSuggestion(single);\n }\n }\n } catch (error) {\n if ((error as Error).name === \"AbortError\") {\n return;\n }\n\n const fallback = FALLBACK_ADDRESS_SUGGESTIONS.filter((suggestion) =>\n suggestion.label.toLowerCase().includes(query.toLowerCase()),\n );\n setAddressSuggestions(fallback);\n setShowSuggestions(fallback.length > 0);\n } finally {\n addressRequestState.current.controller = null;\n }\n }, 250);\n };\n\n useEffect(() => {\n if (!initialUserInput) {\n return;\n }\n\n if (\n isFirstRender.current ||\n (!form.firstName &&\n !form.lastName &&\n !form.email &&\n !form.phoneNumber &&\n !form.companyName)\n ) {\n const nextBirthParts = parseBirthDate(initialUserInput.birthDate || \"\");\n setForm((previous) => ({\n ...previous,\n lastName: initialUserInput.lastName || previous.lastName,\n firstName: initialUserInput.firstName || previous.firstName,\n birthDate: initialUserInput.birthDate || previous.birthDate,\n day: nextBirthParts.day,\n month: nextBirthParts.month,\n year: nextBirthParts.year,\n email: initialUserInput.email || previous.email,\n phoneNumber: initialUserInput.phoneNumber || previous.phoneNumber,\n sms: initialUserInput.sms || previous.sms,\n addressLine1: initialUserInput.addressLine1 || previous.addressLine1,\n addressLine2: initialUserInput.addressLine2 || previous.addressLine2,\n postalCode: initialUserInput.postalCode || previous.postalCode,\n city: initialUserInput.city || previous.city,\n countryCode: initialUserInput.countryCode || previous.countryCode,\n nationality: initialUserInput.nationality || previous.nationality,\n companyName: initialUserInput.companyName || previous.companyName,\n siret: initialUserInput.siret || previous.siret,\n tva: initialUserInput.tva || previous.tva,\n }));\n\n isFirstRender.current = false;\n }\n }, [\n initialUserInput,\n form.firstName,\n form.lastName,\n form.email,\n form.phoneNumber,\n form.companyName,\n ]);\n\n useEffect(() => {\n return () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n }\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n };\n }, []);\n\n const handleFieldChange = (key: keyof UserInputFormState, value: string) => {\n setErrors((previous) => ({\n ...previous,\n [key]: false,\n notMajor: false,\n }));\n\n setForm((previous) => {\n const next = { ...previous, [key]: value };\n if (key === \"day\" || key === \"month\" || key === \"year\") {\n const { day, month, year } = next;\n if (day && month && year) {\n const paddedDay = day.padStart(2, \"0\");\n const paddedMonth = month.padStart(2, \"0\");\n next.birthDate = `${paddedDay}-${paddedMonth}-${year}`;\n } else {\n next.birthDate = \"\";\n }\n }\n return next;\n });\n };\n\n const handleAddressChange = (value: string) => {\n handleFieldChange(\"addressLine1\", value);\n requestAddressSuggestions(value, { autoComplete: true });\n };\n\n const handleAddressFocus = () => {\n requestAddressSuggestions(form.addressLine1, { autoComplete: false });\n };\n\n const handleAddressBlur = () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n hideSuggestionTimeout.current = setTimeout(() => {\n setShowSuggestions(false);\n hideSuggestionTimeout.current = null;\n }, 150);\n };\n\n const validateForm = () => {\n const nextErrors: UserInputFormErrors = {};\n let hasError = false;\n\n const markError = (key: string) => {\n nextErrors[key] = true;\n hasError = true;\n };\n\n if (informationType === \"identity\") {\n if (requestedFields.has(\"prenom\") && !form.firstName) {\n markError(\"firstName\");\n }\n if (requestedFields.has(\"nom\") && !form.lastName) {\n markError(\"lastName\");\n }\n if (requestedFields.has(\"date_naissance\")) {\n if (!form.birthDate) {\n markError(\"birthDate\");\n } else if (!checkIsMajor(form.birthDate)) {\n nextErrors.notMajor = true;\n hasError = true;\n }\n }\n }\n\n if (informationType === \"identity-legal\") {\n if (requestedFields.has(\"nom\") && !form.companyName) {\n markError(\"companyName\");\n }\n if (requestedFields.has(\"siret\") && !form.siret) {\n markError(\"siret\");\n }\n if (requestedFields.has(\"tva\") && !form.tva) {\n markError(\"tva\");\n }\n }\n\n if (informationType === \"contact\") {\n if (requestedFields.has(\"email\")) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!form.email || !emailRegex.test(form.email)) {\n markError(\"email\");\n }\n }\n if (requestedFields.has(\"sms\")) {\n if (\n !form.phoneNumber ||\n form.phoneNumber.replace(/\\D/g, \"\").length < 6\n ) {\n markError(\"phoneNumber\");\n }\n }\n }\n\n if (\n (informationType === \"address\" || informationType === \"identity-legal\") &&\n requestedFields.has(\"adresse\")\n ) {\n if (!form.addressLine1) {\n markError(\"addressLine1\");\n }\n if (!form.postalCode) {\n markError(\"postalCode\");\n }\n if (!form.city) {\n markError(\"city\");\n }\n if (!form.countryCode) {\n markError(\"country\");\n }\n }\n\n if (\n informationType === \"nationality\" &&\n requestedFields.has(\"nationalite\")\n ) {\n if (!form.nationality) {\n markError(\"nationality\");\n }\n }\n\n setErrors(nextErrors);\n return !hasError;\n };\n\n const validateCustomForm = () => {\n const errors: Record<string, boolean> = {};\n let hasError = false;\n\n node.customFields?.forEach((field) => {\n const value = customFormData[field.id];\n\n if (field.valueType === \"list\") {\n const rows = Array.isArray(value) ? value : [];\n const minRows = getListFieldMinRows(field);\n\n if (field.required && countNonEmptyListRows(rows) < minRows) {\n errors[field.id] = true;\n hasError = true;\n }\n return;\n }\n\n // Check if required field is missing\n if (field.required && !value) {\n errors[field.id] = true;\n hasError = true;\n return;\n }\n\n // Type-specific validation\n if (value) {\n switch (field.valueType) {\n case \"number\":\n if (isNaN(Number(value))) {\n errors[field.id] = true;\n hasError = true;\n }\n break;\n\n case \"date\":\n // Date format: DD-MM-YYYY\n // For required dates, all parts must be filled\n if (field.required) {\n const dateParts = value.split(\"-\");\n if (\n dateParts.length !== 3 ||\n !dateParts[0] ||\n !dateParts[1] ||\n !dateParts[2]\n ) {\n errors[field.id] = true;\n hasError = true;\n break;\n }\n\n // Validate month and day ranges\n const day = parseInt(dateParts[0], 10);\n const month = parseInt(dateParts[1], 10);\n const year = parseInt(dateParts[2], 10);\n\n if (\n isNaN(day) ||\n isNaN(month) ||\n isNaN(year) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n\n case \"address\":\n // Validate address object if required\n if (field.required && typeof value === \"object\") {\n const addressValue = value as {\n addressLine1?: string;\n postalCode?: string;\n city?: string;\n countryCode?: string;\n };\n if (\n !addressValue.addressLine1 ||\n !addressValue.postalCode ||\n !addressValue.city ||\n !addressValue.countryCode\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n }\n }\n });\n\n setCustomFormErrors(errors);\n return !hasError;\n };\n\n const handleCustomFieldChange = (fieldId: string, value: any) => {\n setCustomFormData((prev) => ({ ...prev, [fieldId]: value }));\n setCustomFormErrors((prev) => ({ ...prev, [fieldId]: false }));\n };\n\n const goOnNextStep = () => {\n // Handle custom form validation and submission\n if (informationType === \"custom\") {\n if (!validateCustomForm()) {\n return;\n }\n\n setUserInput((prev) => ({\n ...prev,\n customFormData: { ...(prev.customFormData ?? {}), ...customFormData },\n }));\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n return;\n }\n\n // Standard form validation\n if (!validateForm()) {\n return;\n }\n\n setUserInput((previous) => ({\n ...previous,\n ...(requestedFields.has(\"nom\") && {\n ...(informationType === \"identity-legal\"\n ? { companyName: form.companyName }\n : { lastName: form.lastName }),\n }),\n ...(requestedFields.has(\"prenom\") && { firstName: form.firstName }),\n ...(requestedFields.has(\"date_naissance\") && {\n birthDate: form.birthDate,\n }),\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && {\n phoneNumber: form.phoneNumber,\n sms: form.phoneNumber,\n }),\n ...(requestedFields.has(\"adresse\") && {\n addressLine1: form.addressLine1,\n addressLine2: form.addressLine2,\n postalCode: form.postalCode,\n city: form.city,\n countryCode: form.countryCode,\n }),\n ...(requestedFields.has(\"siret\") && { siret: form.siret }),\n ...(requestedFields.has(\"tva\") && { tva: form.tva }),\n ...(requestedFields.has(\"nationalite\") && {\n nationality: form.nationality,\n }),\n }));\n\n if (informationType === \"contact\" && setContactInfo) {\n setContactInfo((previous) => ({\n ...previous,\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && { phoneNumber: form.phoneNumber }),\n }));\n }\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n };\n\n const goOnPreviousStep = () => {\n console.log(\"[goOnPreviousStep] called — step:\", step, \"canGoBack:\", stepObject.canGoBack);\n goBack();\n };\n\n const pageTitle = node.pageTitle || formTitles[informationType];\n\n const pageDescription =\n node.pageDescription || formDescriptions[informationType];\n\n return {\n form,\n errors,\n informationType,\n requestedFields,\n pageTitle,\n pageDescription,\n addressSuggestions,\n showSuggestions,\n handleFieldChange,\n handleAddressChange,\n handleAddressFocus,\n handleAddressBlur,\n applyAddressSuggestion,\n goOnNextStep,\n goOnPreviousStep,\n customFormData,\n customFormErrors,\n handleCustomFieldChange,\n };\n};\n"],"names":["useI18n","useMemo","resolveInformationType","DEFAULT_FIELDS","parseBirthDate","useState","useRef","__assign","__awaiter","API_BASE_URL","GEOCODING_AUTOCOMPLETE_ENDPOINT","FALLBACK_ADDRESS_SUGGESTIONS","useEffect","checkIsMajor","getListFieldMinRows","countNonEmptyListRows"],"mappings":";;;;;;;;;;AAgDO,IAAM,gBAAgB,GAAG,UAAC,EASZ,EAAA;QARnB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,kBAAkB,GAAA,EAAA,CAAA,kBAAA;AAEV,IAAwC,UAAU,QAA3C,CAAA,KAAE,MAAM,GAAyB,UAAU,CAAA,MAAnC,EAAE,YAAY,GAAW,UAAU,CAAA,YAArB,CAAA,CAAE,IAAI,GAAK,UAAU;AAClD,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;IAET,IAAM,eAAe,GAAGC,aAAO,CAAkB,YAAA;;QAC/C,IAAM,QAAQ,GAAGC,oCAAsB,CACrC,IAAI,CAAC,eAAyB,EAC9B,UAAU,CACX;AACD,QAAA,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE;YAC9D,mBAAmB,EAAE,IAAI,CAAC,eAAe;AACzC,YAAA,QAAQ,EAAA,QAAA;AACR,YAAA,eAAe,EAAE,CAAC,CAAC,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AS,EAAA,SAAA;AACT,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,kBAAkB,EAAA,kBAAA;AAClB,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,iBAAiB,EAAA,iBAAA;AACjB,QAAA,mBAAmB,EAAA,mBAAA;AACnB,QAAA,kBAAkB,EAAA,kBAAA;AAClB,QAAA,iBAAiB,EAAA,iBAAA;AACjB,QAAA,sBAAsB,EAAA,sBAAA;AACtB,QAAA,YAAY,EAAA,YAAA;AACZ,QAAA,gBAAgB,EAAA,gBAAA;AAChB,QAAA,cAAc,EAAA,cAAA;AACd,QAAA,gBAAgB,EAAA,gBAAA;AAChB,QAAA,uBAAuB,EAAA,uBAAA;KACxB;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"useUserInputForm.js","sources":["../../../../src/hooks/useUserInputForm.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { UserInputFormProps } from \"../types/userInput\";\nimport type {\n AddressSuggestion,\n InformationType,\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../types/userInputForm\";\nimport {\n DEFAULT_FIELDS,\n FALLBACK_ADDRESS_SUGGESTIONS,\n GEOCODING_AUTOCOMPLETE_ENDPOINT,\n} from \"../constants/userInputForm\";\nimport { API_BASE_URL } from \"../config/env\";\nimport {\n checkIsMajor,\n parseBirthDate,\n resolveInformationType,\n} from \"../utils/userInputForm\";\nimport {\n countNonEmptyListRows,\n getListFieldMinRows,\n normalizeListColumns,\n} from \"../utils/listFieldUtils\";\nimport {\n cellErrorKey,\n isDateValid,\n isEmailValid,\n isRegexMatch,\n} from \"../utils/customFieldValidation\";\nimport { DEFAULT_DATE_DISPLAY_FORMAT } from \"../types/session\";\nimport { useI18n } from \"./useI18n\";\n\nexport type CustomFieldErrorValue = string | boolean;\n\ninterface UseUserInputFormResult {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n informationType: InformationType;\n requestedFields: RequestedFields;\n pageTitle: string;\n pageDescription: string;\n addressSuggestions: AddressSuggestion[];\n showSuggestions: boolean;\n handleFieldChange: (key: keyof UserInputFormState, value: string) => void;\n handleAddressChange: (value: string) => void;\n handleAddressFocus: () => void;\n handleAddressBlur: () => void;\n applyAddressSuggestion: (suggestion: AddressSuggestion) => void;\n goOnNextStep: () => void;\n goOnPreviousStep: () => void;\n // Custom form fields\n customFormData: Record<string, any>;\n customFormErrors: Record<string, CustomFieldErrorValue>;\n customFormCellErrors: Record<string, Record<string, CustomFieldErrorValue>>;\n handleCustomFieldChange: (fieldId: string, value: any) => void;\n}\n\nexport const useUserInputForm = ({\n stepObject,\n setUserInput,\n initialUserInput,\n node,\n template,\n contactInfo,\n setContactInfo,\n onContinueCallback,\n}: UserInputFormProps): UseUserInputFormResult => {\n const { setStep, goBack, goToNextStep, step } = stepObject;\n const { t } = useI18n();\n\n const informationType = useMemo<InformationType>(() => {\n const resolved = resolveInformationType(\n node.informationType as string,\n \"identity\",\n );\n console.log(\"🔍 [useUserInputForm] Resolving informationType:\", {\n nodeInformationType: node.informationType,\n resolved,\n hasCustomFields: !!node.customFields,\n customFieldsCount: node.customFields?.length,\n });\n return resolved;\n }, [node.informationType, node.customFields]);\n\n const requestedFields = useMemo<RequestedFields>(() => {\n const defaults = DEFAULT_FIELDS[informationType] || [];\n const optional =\n node.optionalFields && node.optionalFields.length > 0\n ? node.optionalFields\n : defaults;\n const merged = new Set<string>(optional);\n\n if (node.requiredFields) {\n node.requiredFields.forEach((field) => merged.add(field));\n }\n\n return merged;\n }, [node.optionalFields, node.requiredFields, informationType]);\n\n const birthDateParts = useMemo(\n () => parseBirthDate(initialUserInput?.birthDate || \"\"),\n [initialUserInput?.birthDate],\n );\n\n const [form, setForm] = useState<UserInputFormState>({\n lastName: initialUserInput?.lastName || \"\",\n firstName: initialUserInput?.firstName || \"\",\n birthDate: initialUserInput?.birthDate || \"\",\n day: birthDateParts.day,\n month: birthDateParts.month,\n year: birthDateParts.year,\n email: initialUserInput?.email || contactInfo?.email || \"\",\n phoneNumber:\n initialUserInput?.phoneNumber || contactInfo?.phoneNumber || \"\",\n sms: initialUserInput?.sms || \"\",\n addressLine1: initialUserInput?.addressLine1 || \"\",\n addressLine2: initialUserInput?.addressLine2 || \"\",\n postalCode: initialUserInput?.postalCode || \"\",\n city: initialUserInput?.city || \"\",\n countryCode: initialUserInput?.countryCode || \"\",\n nationality: initialUserInput?.nationality || \"\",\n companyName: initialUserInput?.companyName || \"\",\n siret: initialUserInput?.siret || \"\",\n tva: initialUserInput?.tva || \"\",\n });\n\n const [errors, setErrors] = useState<UserInputFormErrors>({});\n\n // Custom form state\n const [customFormData, setCustomFormData] = useState<Record<string, any>>(\n () => {\n if (informationType !== \"custom\" || !node.customFields) return {};\n\n const initial: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const savedValue = initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n initial[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n\n initial[field.id] = savedValue || \"\";\n });\n return initial;\n },\n );\n const [customFormErrors, setCustomFormErrors] = useState<\n Record<string, CustomFieldErrorValue>\n >({});\n const [customFormCellErrors, setCustomFormCellErrors] = useState<\n Record<string, Record<string, CustomFieldErrorValue>>\n >({});\n\n const [addressSuggestions, setAddressSuggestions] = useState<\n AddressSuggestion[]\n >([]);\n const [showSuggestions, setShowSuggestions] = useState(false);\n const isFirstRender = useRef(true);\n const hideSuggestionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const addressRequestState = useRef<{\n debounce: ReturnType<typeof setTimeout> | null;\n controller: AbortController | null;\n }>({\n debounce: null,\n controller: null,\n });\n\n const formTitles = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.titles.identity\"),\n \"identity-legal\": t(\"user_input_form.titles.identity_legal\"),\n contact: t(\"user_input_form.titles.contact\"),\n address: t(\"user_input_form.titles.address\"),\n nationality: t(\"user_input_form.titles.nationality\"),\n custom: t(\"user_input_form.titles.custom\"),\n }),\n [t],\n );\n\n const formDescriptions = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.descriptions.identity\"),\n \"identity-legal\": t(\"user_input_form.descriptions.identity_legal\"),\n contact: t(\"user_input_form.descriptions.contact\"),\n address: t(\"user_input_form.descriptions.address\"),\n nationality: t(\"user_input_form.descriptions.nationality\"),\n custom: t(\"user_input_form.descriptions.custom\"),\n }),\n [t],\n );\n\n const applyAddressSuggestion = (suggestion: AddressSuggestion) => {\n const normalizedCountry =\n suggestion.countryCode?.toUpperCase() || suggestion.country || \"\";\n\n setForm((previous) => ({\n ...previous,\n addressLine1: suggestion.addressLine1 || suggestion.label,\n postalCode: suggestion.postalCode || previous.postalCode,\n city: suggestion.city || previous.city,\n countryCode: normalizedCountry || previous.countryCode,\n }));\n setErrors((previous) => ({\n ...previous,\n addressLine1: false,\n postalCode: false,\n city: false,\n country: false,\n }));\n setShowSuggestions(false);\n setAddressSuggestions([]);\n };\n\n const mapGeoapifyFeature = (feature: any): AddressSuggestion | null => {\n if (!feature || !feature.properties) {\n return null;\n }\n\n const { properties } = feature;\n const label: string =\n properties.formatted ||\n properties.address_line1 ||\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n if (!label) {\n return null;\n }\n\n const addressLine1 =\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim() ||\n properties.address_line1 ||\n label;\n\n const city =\n properties.city ||\n properties.town ||\n properties.village ||\n properties.state ||\n \"\";\n\n return {\n id:\n (properties.place_id && String(properties.place_id)) ||\n feature.id ||\n `${properties.lon ?? \"\"}-${properties.lat ?? \"\"}-${label}`,\n label,\n addressLine1,\n postalCode: properties.postcode || \"\",\n city,\n country: properties.country || \"\",\n countryCode: properties.country_code || undefined,\n };\n };\n\n const requestAddressSuggestions = (\n query: string,\n { autoComplete }: { autoComplete: boolean },\n ) => {\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n addressRequestState.current.debounce = null;\n }\n\n if (query.trim().length < 3) {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n addressRequestState.current.controller = null;\n }\n setAddressSuggestions([]);\n setShowSuggestions(false);\n return;\n }\n\n addressRequestState.current.debounce = setTimeout(async () => {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n\n const controller = new AbortController();\n addressRequestState.current.controller = controller;\n\n try {\n const searchParams = new URLSearchParams({\n text: query,\n lang: \"fr\",\n });\n\n const response = await fetch(\n `${API_BASE_URL}${GEOCODING_AUTOCOMPLETE_ENDPOINT}?${searchParams.toString()}`,\n { signal: controller.signal },\n );\n\n if (!response.ok) {\n throw new Error(\n `Geocoding request failed with status ${response.status}`,\n );\n }\n\n const payload = await response.json();\n\n const suggestions: AddressSuggestion[] = Array.isArray(\n payload?.features,\n )\n ? payload.features\n .map((feature: any) => mapGeoapifyFeature(feature))\n .filter(\n (\n suggestion: AddressSuggestion | null,\n ): suggestion is AddressSuggestion => Boolean(suggestion),\n )\n : [];\n\n setAddressSuggestions(suggestions);\n setShowSuggestions(suggestions.length > 0);\n\n if (autoComplete && suggestions.length === 1) {\n const single = suggestions[0];\n const normalizedQuery = query.trim().toLowerCase();\n if (\n normalizedQuery.length >= 6 &&\n single.label.toLowerCase().startsWith(normalizedQuery)\n ) {\n applyAddressSuggestion(single);\n }\n }\n } catch (error) {\n if ((error as Error).name === \"AbortError\") {\n return;\n }\n\n const fallback = FALLBACK_ADDRESS_SUGGESTIONS.filter((suggestion) =>\n suggestion.label.toLowerCase().includes(query.toLowerCase()),\n );\n setAddressSuggestions(fallback);\n setShowSuggestions(fallback.length > 0);\n } finally {\n addressRequestState.current.controller = null;\n }\n }, 250);\n };\n\n useEffect(() => {\n if (!initialUserInput) {\n return;\n }\n\n if (\n isFirstRender.current ||\n (!form.firstName &&\n !form.lastName &&\n !form.email &&\n !form.phoneNumber &&\n !form.companyName)\n ) {\n const nextBirthParts = parseBirthDate(initialUserInput.birthDate || \"\");\n setForm((previous) => ({\n ...previous,\n lastName: initialUserInput.lastName || previous.lastName,\n firstName: initialUserInput.firstName || previous.firstName,\n birthDate: initialUserInput.birthDate || previous.birthDate,\n day: nextBirthParts.day,\n month: nextBirthParts.month,\n year: nextBirthParts.year,\n email: initialUserInput.email || previous.email,\n phoneNumber: initialUserInput.phoneNumber || previous.phoneNumber,\n sms: initialUserInput.sms || previous.sms,\n addressLine1: initialUserInput.addressLine1 || previous.addressLine1,\n addressLine2: initialUserInput.addressLine2 || previous.addressLine2,\n postalCode: initialUserInput.postalCode || previous.postalCode,\n city: initialUserInput.city || previous.city,\n countryCode: initialUserInput.countryCode || previous.countryCode,\n nationality: initialUserInput.nationality || previous.nationality,\n companyName: initialUserInput.companyName || previous.companyName,\n siret: initialUserInput.siret || previous.siret,\n tva: initialUserInput.tva || previous.tva,\n }));\n\n isFirstRender.current = false;\n }\n }, [\n initialUserInput,\n form.firstName,\n form.lastName,\n form.email,\n form.phoneNumber,\n form.companyName,\n ]);\n\n useEffect(() => {\n return () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n }\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n };\n }, []);\n\n const handleFieldChange = (key: keyof UserInputFormState, value: string) => {\n setErrors((previous) => ({\n ...previous,\n [key]: false,\n notMajor: false,\n }));\n\n setForm((previous) => {\n const next = { ...previous, [key]: value };\n if (key === \"day\" || key === \"month\" || key === \"year\") {\n const { day, month, year } = next;\n if (day && month && year) {\n const paddedDay = day.padStart(2, \"0\");\n const paddedMonth = month.padStart(2, \"0\");\n next.birthDate = `${paddedDay}-${paddedMonth}-${year}`;\n } else {\n next.birthDate = \"\";\n }\n }\n return next;\n });\n };\n\n const handleAddressChange = (value: string) => {\n handleFieldChange(\"addressLine1\", value);\n requestAddressSuggestions(value, { autoComplete: true });\n };\n\n const handleAddressFocus = () => {\n requestAddressSuggestions(form.addressLine1, { autoComplete: false });\n };\n\n const handleAddressBlur = () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n hideSuggestionTimeout.current = setTimeout(() => {\n setShowSuggestions(false);\n hideSuggestionTimeout.current = null;\n }, 150);\n };\n\n const validateForm = () => {\n const nextErrors: UserInputFormErrors = {};\n let hasError = false;\n\n const markError = (key: string) => {\n nextErrors[key] = true;\n hasError = true;\n };\n\n if (informationType === \"identity\") {\n if (requestedFields.has(\"prenom\") && !form.firstName) {\n markError(\"firstName\");\n }\n if (requestedFields.has(\"nom\") && !form.lastName) {\n markError(\"lastName\");\n }\n if (requestedFields.has(\"date_naissance\")) {\n if (!form.birthDate) {\n markError(\"birthDate\");\n } else if (!checkIsMajor(form.birthDate)) {\n nextErrors.notMajor = true;\n hasError = true;\n }\n }\n }\n\n if (informationType === \"identity-legal\") {\n if (requestedFields.has(\"nom\") && !form.companyName) {\n markError(\"companyName\");\n }\n if (requestedFields.has(\"siret\") && !form.siret) {\n markError(\"siret\");\n }\n if (requestedFields.has(\"tva\") && !form.tva) {\n markError(\"tva\");\n }\n }\n\n if (informationType === \"contact\") {\n if (requestedFields.has(\"email\")) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!form.email || !emailRegex.test(form.email)) {\n markError(\"email\");\n }\n }\n if (requestedFields.has(\"sms\")) {\n if (\n !form.phoneNumber ||\n form.phoneNumber.replace(/\\D/g, \"\").length < 6\n ) {\n markError(\"phoneNumber\");\n }\n }\n }\n\n if (\n (informationType === \"address\" || informationType === \"identity-legal\") &&\n requestedFields.has(\"adresse\")\n ) {\n if (!form.addressLine1) {\n markError(\"addressLine1\");\n }\n if (!form.postalCode) {\n markError(\"postalCode\");\n }\n if (!form.city) {\n markError(\"city\");\n }\n if (!form.countryCode) {\n markError(\"country\");\n }\n }\n\n if (\n informationType === \"nationality\" &&\n requestedFields.has(\"nationalite\")\n ) {\n if (!form.nationality) {\n markError(\"nationality\");\n }\n }\n\n setErrors(nextErrors);\n return !hasError;\n };\n\n const validateCustomForm = () => {\n const errors: Record<string, CustomFieldErrorValue> = {};\n const cellErrors: Record<string, Record<string, CustomFieldErrorValue>> = {};\n let hasError = false;\n\n node.customFields?.forEach((field) => {\n const value = customFormData[field.id];\n\n if (field.valueType === \"list\") {\n const rows: Record<string, string>[] = Array.isArray(value) ? value : [];\n const minRows = getListFieldMinRows(field);\n const columns = normalizeListColumns(field.listColumns);\n const fieldCellErrors: Record<string, CustomFieldErrorValue> = {};\n let listFieldInvalid = false;\n\n if (field.required && countNonEmptyListRows(rows) < minRows) {\n errors[field.id] = true;\n hasError = true;\n listFieldInvalid = true;\n }\n\n rows.forEach((row, rowIndex) => {\n const rowIsEmpty = columns.every(\n (col) => !String(row?.[col.label] ?? \"\").trim(),\n );\n if (rowIsEmpty && !field.required) return;\n\n columns.forEach((col) => {\n const cellValue = String(row?.[col.label] ?? \"\").trim();\n const key = cellErrorKey(rowIndex, col.label);\n\n if (!cellValue) {\n if (field.required && !rowIsEmpty) {\n fieldCellErrors[key] = t(\"custom_form.required_field\");\n listFieldInvalid = true;\n }\n return;\n }\n\n switch (col.type) {\n case \"email\":\n if (!isEmailValid(cellValue)) {\n fieldCellErrors[key] = t(\"custom_form.invalid_email\");\n listFieldInvalid = true;\n }\n break;\n case \"date\": {\n const fmt = col.dateFormat ?? DEFAULT_DATE_DISPLAY_FORMAT;\n if (!isDateValid(cellValue, fmt)) {\n fieldCellErrors[key] = t(\"custom_form.invalid_date\", {\n format: fmt,\n });\n listFieldInvalid = true;\n }\n break;\n }\n case \"text\":\n if (col.regex && !isRegexMatch(cellValue, col.regex)) {\n fieldCellErrors[key] =\n col.regexErrorMessage ||\n t(\"custom_form.invalid_format\");\n listFieldInvalid = true;\n }\n break;\n }\n });\n });\n\n if (Object.keys(fieldCellErrors).length > 0) {\n cellErrors[field.id] = fieldCellErrors;\n }\n if (listFieldInvalid) {\n errors[field.id] = errors[field.id] ?? true;\n hasError = true;\n }\n return;\n }\n\n // Check if required field is missing\n if (field.required && !value) {\n errors[field.id] = true;\n hasError = true;\n return;\n }\n\n // Type-specific validation\n if (value) {\n switch (field.valueType) {\n case \"number\":\n if (isNaN(Number(value))) {\n errors[field.id] = true;\n hasError = true;\n }\n break;\n\n case \"email\":\n if (!isEmailValid(String(value))) {\n errors[field.id] = t(\"custom_form.invalid_email\");\n hasError = true;\n }\n break;\n\n case \"text\":\n if (field.regex && !isRegexMatch(String(value), field.regex)) {\n errors[field.id] =\n field.regexErrorMessage || t(\"custom_form.invalid_format\");\n hasError = true;\n }\n break;\n\n case \"date\": {\n const fmt = field.dateFormat ?? DEFAULT_DATE_DISPLAY_FORMAT;\n if (!isDateValid(String(value), fmt)) {\n errors[field.id] = t(\"custom_form.invalid_date\", {\n format: fmt,\n });\n hasError = true;\n }\n break;\n }\n\n case \"address\":\n // Validate address object if required\n if (field.required && typeof value === \"object\") {\n const addressValue = value as {\n addressLine1?: string;\n postalCode?: string;\n city?: string;\n countryCode?: string;\n };\n if (\n !addressValue.addressLine1 ||\n !addressValue.postalCode ||\n !addressValue.city ||\n !addressValue.countryCode\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n }\n }\n });\n\n setCustomFormErrors(errors);\n setCustomFormCellErrors(cellErrors);\n return !hasError;\n };\n\n const handleCustomFieldChange = (fieldId: string, value: any) => {\n setCustomFormData((prev) => ({ ...prev, [fieldId]: value }));\n setCustomFormErrors((prev) => ({ ...prev, [fieldId]: false }));\n setCustomFormCellErrors((prev) => {\n if (!(fieldId in prev)) return prev;\n const { [fieldId]: _removed, ...rest } = prev;\n return rest;\n });\n };\n\n const goOnNextStep = () => {\n // Handle custom form validation and submission\n if (informationType === \"custom\") {\n if (!validateCustomForm()) {\n return;\n }\n\n setUserInput((prev) => ({\n ...prev,\n customFormData: { ...(prev.customFormData ?? {}), ...customFormData },\n }));\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n return;\n }\n\n // Standard form validation\n if (!validateForm()) {\n return;\n }\n\n setUserInput((previous) => ({\n ...previous,\n ...(requestedFields.has(\"nom\") && {\n ...(informationType === \"identity-legal\"\n ? { companyName: form.companyName }\n : { lastName: form.lastName }),\n }),\n ...(requestedFields.has(\"prenom\") && { firstName: form.firstName }),\n ...(requestedFields.has(\"date_naissance\") && {\n birthDate: form.birthDate,\n }),\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && {\n phoneNumber: form.phoneNumber,\n sms: form.phoneNumber,\n }),\n ...(requestedFields.has(\"adresse\") && {\n addressLine1: form.addressLine1,\n addressLine2: form.addressLine2,\n postalCode: form.postalCode,\n city: form.city,\n countryCode: form.countryCode,\n }),\n ...(requestedFields.has(\"siret\") && { siret: form.siret }),\n ...(requestedFields.has(\"tva\") && { tva: form.tva }),\n ...(requestedFields.has(\"nationalite\") && {\n nationality: form.nationality,\n }),\n }));\n\n if (informationType === \"contact\" && setContactInfo) {\n setContactInfo((previous) => ({\n ...previous,\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && { phoneNumber: form.phoneNumber }),\n }));\n }\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n };\n\n const goOnPreviousStep = () => {\n console.log(\"[goOnPreviousStep] called — step:\", step, \"canGoBack:\", stepObject.canGoBack);\n goBack();\n };\n\n const pageTitle = node.pageTitle || formTitles[informationType];\n\n const pageDescription =\n node.pageDescription || formDescriptions[informationType];\n\n return {\n form,\n errors,\n informationType,\n requestedFields,\n pageTitle,\n pageDescription,\n addressSuggestions,\n showSuggestions,\n handleFieldChange,\n handleAddressChange,\n handleAddressFocus,\n handleAddressBlur,\n applyAddressSuggestion,\n goOnNextStep,\n goOnPreviousStep,\n customFormData,\n customFormErrors,\n customFormCellErrors,\n handleCustomFieldChange,\n };\n};\n"],"names":["useI18n","useMemo","resolveInformationType","DEFAULT_FIELDS","parseBirthDate","useState","useRef","__assign","__awaiter","API_BASE_URL","GEOCODING_AUTOCOMPLETE_ENDPOINT","FALLBACK_ADDRESS_SUGGESTIONS","useEffect","checkIsMajor","getListFieldMinRows","normalizeListColumns","countNonEmptyListRows","cellErrorKey","isEmailValid","DEFAULT_DATE_DISPLAY_FORMAT","isDateValid","isRegexMatch","__rest"],"mappings":";;;;;;;;;;;;AA2DO,IAAM,gBAAgB,GAAG,UAAC,EASZ,EAAA;QARnB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,kBAAkB,GAAA,EAAA,CAAA,kBAAA;AAEV,IAAwC,UAAU,QAA3C,CAAA,KAAE,MAAM,GAAyB,UAAU,CAAA,MAAnC,EAAE,YAAY,GAAW,UAAU,CAAA,YAArB,CAAA,CAAE,IAAI,GAAK,UAAU;AAClD,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;IAET,IAAM,eAAe,GAAGC,aAAO,CAAkB,YAAA;;QAC/C,IAAM,QAAQ,GAAGC,oCAAsB,CACrC,IAAI,CAAC,eAAyB,EAC9B,UAAU,CACX;AACD,QAAA,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE;YAC9D,mBAAmB,EAAE,IAAI,CAAC,eAAe;AACzC,YAAA,QAAQ,EAAA,QAAA;AACR,YAAA,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY;AACpC,YAAA,iBAAiB,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,0CAAE,MAAM;AAC7C,SAAA,CAAC;AACF,QAAA,OAAO,QAAQ;IACjB,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,E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CAAC,mCAAmC,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC;AAC1F,QAAA,MAAM,EAAE;AACV,IAAA,CAAC;IAED,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,eAAe,CAAC;IAE/D,IAAM,eAAe,GACnB,IAAI,CAAC,eAAe,IAAI,gBAAgB,CAAC,eAAe,CAAC;IAE3D,OAAO;AACL,QAAA,IAAI,EAAA,IAAA;AACJ,QAAA,MAAM,EAAA,MAAA;AACN,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,SAAS,EAAA,SAAA;AACT,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,kBAAkB,EAAA,kBAAA;AAClB,QAAA,eAAe,EAAA,eAAA;AACf,QAAA,iBAAiB,EAAA,iBAAA;AACjB,QAAA,mBAAmB,EAAA,mBAAA;AACnB,QAAA,kBAAkB,EAAA,kBAAA;AAClB,QAAA,iBAAiB,EAAA,iBAAA;AACjB,QAAA,sBAAsB,EAAA,sBAAA;AACtB,QAAA,YAAY,EAAA,YAAA;AACZ,QAAA,gBAAgB,EAAA,gBAAA;AAChB,QAAA,cAAc,EAAA,cAAA;AACd,QAAA,gBAAgB,EAAA,gBAAA;AAChB,QAAA,oBAAoB,EAAA,oBAAA;AACpB,QAAA,uBAAuB,EAAA,uBAAA;KACxB;AACH;;;;"}
|
package/dist/cjs/i18n/en.json.js
CHANGED
|
@@ -98,7 +98,10 @@ var custom_form = {
|
|
|
98
98
|
select_option: "Select an option",
|
|
99
99
|
add_row: "Add row",
|
|
100
100
|
remove_row: "Remove row",
|
|
101
|
-
list_missing_columns: "This table has no configured columns."
|
|
101
|
+
list_missing_columns: "This table has no configured columns.",
|
|
102
|
+
invalid_email: "Invalid email address",
|
|
103
|
+
invalid_date: "Invalid date. Expected format: {{format}}",
|
|
104
|
+
invalid_format: "Value does not match the expected format"
|
|
102
105
|
};
|
|
103
106
|
var pdf_generation = {
|
|
104
107
|
loading_title: "Generating document",
|
|
@@ -126,7 +129,7 @@ var user_guidance = {
|
|
|
126
129
|
"2.1": "The photo is not clear. Avoid any blur or reflection",
|
|
127
130
|
"2.2": "The photo is not clear. Avoid any blur or reflection",
|
|
128
131
|
"2.4": "The photo is not clear. Avoid any blur or reflection",
|
|
129
|
-
"2.6": "
|
|
132
|
+
"2.6": "The document submitted is not the expected one"
|
|
130
133
|
};
|
|
131
134
|
var validation_points = {
|
|
132
135
|
"1.0": {
|
|
@@ -450,6 +453,7 @@ var jdi = {
|
|
|
450
453
|
download: "Downloading...",
|
|
451
454
|
back: "Back",
|
|
452
455
|
validate_document: "Validate document",
|
|
456
|
+
validate_documents: "Validate documents",
|
|
453
457
|
steps: {
|
|
454
458
|
document_reception: {
|
|
455
459
|
title: "Document reception",
|
|
@@ -469,6 +473,19 @@ var jdi = {
|
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
475
|
},
|
|
476
|
+
document_types: {
|
|
477
|
+
jdi_1: "ID Card - Large format",
|
|
478
|
+
jdi_2: "ID Card - Card format",
|
|
479
|
+
jdi_3: "Biometric passport",
|
|
480
|
+
jdi_4: "Residence permit",
|
|
481
|
+
jdi_5: "Driving license - Card format",
|
|
482
|
+
jdi_6: "Driving license - Booklet format",
|
|
483
|
+
jdd_1: "Tax notice (previous year)",
|
|
484
|
+
jdd_2: "Public service bill (< 3 months)",
|
|
485
|
+
jdd_3: "Rent receipt (< 6 months)",
|
|
486
|
+
jdd_4: "Housing tax (previous year)",
|
|
487
|
+
jdd_5: "Property tax (previous year)"
|
|
488
|
+
},
|
|
472
489
|
document_selection: {
|
|
473
490
|
title_jdd: "Select the type of proof of address",
|
|
474
491
|
subtitle_jdd: "Please choose the type of document you will upload as proof of address.",
|
|
@@ -527,7 +544,8 @@ var jdi = {
|
|
|
527
544
|
valid: "• The document must be valid.",
|
|
528
545
|
readable: "• All information must be readable."
|
|
529
546
|
}
|
|
530
|
-
}
|
|
547
|
+
},
|
|
548
|
+
title_identity: "Accepted document(s)"
|
|
531
549
|
},
|
|
532
550
|
document_upload: {
|
|
533
551
|
add_back: "Add the back side",
|
|
@@ -578,7 +596,8 @@ var jdi = {
|
|
|
578
596
|
upload_error: "An error occurred during upload. Please try again.",
|
|
579
597
|
front_corrupted: "The front image is corrupted or invalid.",
|
|
580
598
|
back_corrupted: "The back image is corrupted or invalid."
|
|
581
|
-
}
|
|
599
|
+
},
|
|
600
|
+
drag_drop_hint: "or drag and drop your files here"
|
|
582
601
|
}
|
|
583
602
|
};
|
|
584
603
|
var selfie = {
|
|
@@ -823,6 +842,14 @@ var document_collection = {
|
|
|
823
842
|
back_to_start: "Back to start"
|
|
824
843
|
};
|
|
825
844
|
var document_check = {
|
|
845
|
+
method_selection: {
|
|
846
|
+
title: "Choose a method",
|
|
847
|
+
subtitle: "How would you like to add your document?",
|
|
848
|
+
picture_title: "Take a photo",
|
|
849
|
+
picture_desc: "Use your device's camera",
|
|
850
|
+
download_title: "Upload a file",
|
|
851
|
+
download_desc: "Select a file from your device"
|
|
852
|
+
},
|
|
826
853
|
config_error: {
|
|
827
854
|
title: "Configuration error",
|
|
828
855
|
description: "Document type not specified.",
|
|
@@ -908,6 +935,8 @@ var document_upload = {
|
|
|
908
935
|
upload_jdd: "Upload your proof of address.",
|
|
909
936
|
uploading: "Uploading...",
|
|
910
937
|
validate_multiple: "Validate documents",
|
|
938
|
+
upload_title: "Add your document",
|
|
939
|
+
upload_description: "Please select the file corresponding to the chosen document.",
|
|
911
940
|
validate_single: "Validate document",
|
|
912
941
|
errors: {
|
|
913
942
|
add_photo_identity: "Please add a photo of your identity document.",
|
|
@@ -923,7 +952,8 @@ var document_upload = {
|
|
|
923
952
|
upload_error: "An error occurred during upload. Please try again.",
|
|
924
953
|
front_corrupted: "The front image is corrupted or invalid.",
|
|
925
954
|
back_corrupted: "The back image is corrupted or invalid."
|
|
926
|
-
}
|
|
955
|
+
},
|
|
956
|
+
drag_drop_hint: "or drag and drop your files here"
|
|
927
957
|
};
|
|
928
958
|
var unissey = {
|
|
929
959
|
capture: "Record a video",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/i18n/fr.json.js
CHANGED
|
@@ -98,7 +98,10 @@ var custom_form = {
|
|
|
98
98
|
select_option: "Sélectionner une option",
|
|
99
99
|
add_row: "Ajouter une ligne",
|
|
100
100
|
remove_row: "Supprimer la ligne",
|
|
101
|
-
list_missing_columns: "Ce tableau n'a pas de colonnes configurées."
|
|
101
|
+
list_missing_columns: "Ce tableau n'a pas de colonnes configurées.",
|
|
102
|
+
invalid_email: "Adresse email invalide",
|
|
103
|
+
invalid_date: "Date invalide. Format attendu : {{format}}",
|
|
104
|
+
invalid_format: "La valeur ne respecte pas le format attendu"
|
|
102
105
|
};
|
|
103
106
|
var pdf_generation = {
|
|
104
107
|
loading_title: "Génération du document",
|
|
@@ -126,7 +129,7 @@ var user_guidance = {
|
|
|
126
129
|
"2.1": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
127
130
|
"2.2": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
128
131
|
"2.4": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
129
|
-
"2.6": "
|
|
132
|
+
"2.6": "Le document déposé n'est pas celui attendu"
|
|
130
133
|
};
|
|
131
134
|
var validation_points = {
|
|
132
135
|
"1.0": {
|
|
@@ -420,7 +423,7 @@ var jdi = {
|
|
|
420
423
|
errors: {
|
|
421
424
|
verification_failed: "Vérification échouée",
|
|
422
425
|
verification_failed_subtitle: "Nous n'avons pas pu valider votre {{document}}. Veuillez vérifier les points ci-dessous et réessayer.",
|
|
423
|
-
verification_failed_subtitle_no_retry: "
|
|
426
|
+
verification_failed_subtitle_no_retry: "Nous n'avons pas pu valider votre {{documentType}}. Veuillez vérifier les points ci-dessous.",
|
|
424
427
|
problems_detected: "Problèmes détectés",
|
|
425
428
|
improvement_tips: "Conseils d'amélioration",
|
|
426
429
|
image_quality_insufficient: "• Qualité des images : Insuffisante",
|
|
@@ -450,6 +453,7 @@ var jdi = {
|
|
|
450
453
|
download: "Téléchargement en cours...",
|
|
451
454
|
back: "Retour",
|
|
452
455
|
validate_document: "Valider le document",
|
|
456
|
+
validate_documents: "Valider les documents",
|
|
453
457
|
steps: {
|
|
454
458
|
document_reception: {
|
|
455
459
|
title: "Réception du document",
|
|
@@ -469,6 +473,19 @@ var jdi = {
|
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
475
|
},
|
|
476
|
+
document_types: {
|
|
477
|
+
jdi_1: "Carte d'identité - Grand format",
|
|
478
|
+
jdi_2: "Carte d'identité - Format carte",
|
|
479
|
+
jdi_3: "Passeport biométrique",
|
|
480
|
+
jdi_4: "Titre de séjour",
|
|
481
|
+
jdi_5: "Permis de conduire - Format carte",
|
|
482
|
+
jdi_6: "Permis de conduire - Format dépliant",
|
|
483
|
+
jdd_1: "Avis d'imposition (année passée)",
|
|
484
|
+
jdd_2: "Facture de service public (< 3 mois)",
|
|
485
|
+
jdd_3: "Quittance de loyer (< 6 mois)",
|
|
486
|
+
jdd_4: "Taxe d'habitation (année passée)",
|
|
487
|
+
jdd_5: "Taxe foncière (année passée)"
|
|
488
|
+
},
|
|
472
489
|
document_selection: {
|
|
473
490
|
title_jdd: "Sélectionnez le type de justificatif de domicile",
|
|
474
491
|
subtitle_jdd: "Veuillez choisir le type de document que vous allez téléverser comme justificatif de domicile.",
|
|
@@ -527,7 +544,8 @@ var jdi = {
|
|
|
527
544
|
valid: "• Le document doit être valide.",
|
|
528
545
|
readable: "• Toutes les informations doivent être lisibles."
|
|
529
546
|
}
|
|
530
|
-
}
|
|
547
|
+
},
|
|
548
|
+
title_identity: "Document(s) accepté(s)"
|
|
531
549
|
},
|
|
532
550
|
document_upload: {
|
|
533
551
|
add_back: "Ajouter le verso",
|
|
@@ -578,7 +596,8 @@ var jdi = {
|
|
|
578
596
|
upload_error: "Une erreur s'est produite lors du téléchargement. Veuillez réessayer.",
|
|
579
597
|
front_corrupted: "L'image du recto est corrompue ou invalide.",
|
|
580
598
|
back_corrupted: "L'image du verso est corrompue ou invalide."
|
|
581
|
-
}
|
|
599
|
+
},
|
|
600
|
+
drag_drop_hint: "ou glissez-déposez vos fichiers ici"
|
|
582
601
|
}
|
|
583
602
|
};
|
|
584
603
|
var selfie = {
|
|
@@ -823,6 +842,14 @@ var document_collection = {
|
|
|
823
842
|
back_to_start: "Retour au début"
|
|
824
843
|
};
|
|
825
844
|
var document_check = {
|
|
845
|
+
method_selection: {
|
|
846
|
+
title: "Choisissez une méthode",
|
|
847
|
+
subtitle: "Comment souhaitez-vous ajouter votre document ?",
|
|
848
|
+
picture_title: "Prendre une photo",
|
|
849
|
+
picture_desc: "Utilisez l'appareil photo de votre appareil",
|
|
850
|
+
download_title: "Téléverser un fichier",
|
|
851
|
+
download_desc: "Sélectionnez un fichier sur votre appareil"
|
|
852
|
+
},
|
|
826
853
|
config_error: {
|
|
827
854
|
title: "Erreur de configuration",
|
|
828
855
|
description: "Type de document non spécifié.",
|
|
@@ -908,6 +935,8 @@ var document_upload = {
|
|
|
908
935
|
upload_jdd: "Téléchargez votre justificatif de domicile.",
|
|
909
936
|
uploading: "Téléchargement...",
|
|
910
937
|
validate_multiple: "Valider les documents",
|
|
938
|
+
upload_title: "Ajoutez votre document",
|
|
939
|
+
upload_description: "Veuillez sélectionner le fichier correspondant au document choisi.",
|
|
911
940
|
validate_single: "Valider le document",
|
|
912
941
|
errors: {
|
|
913
942
|
add_photo_identity: "Veuillez ajouter une photo de votre document d'identité.",
|
|
@@ -923,7 +952,8 @@ var document_upload = {
|
|
|
923
952
|
upload_error: "Une erreur s'est produite lors du téléchargement. Veuillez réessayer.",
|
|
924
953
|
front_corrupted: "L'image du recto est corrompue ou invalide.",
|
|
925
954
|
back_corrupted: "L'image du verso est corrompue ou invalide."
|
|
926
|
-
}
|
|
955
|
+
},
|
|
956
|
+
drag_drop_hint: "ou glissez-déposez vos fichiers ici"
|
|
927
957
|
};
|
|
928
958
|
var unissey = {
|
|
929
959
|
capture: "Enregistrer une vidéo",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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