datakeen-session-react 1.1.140-rc.76 → 1.1.140-rc.77
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/session/UserInputForm/LegalRepFields.js +45 -0
- package/dist/cjs/components/session/UserInputForm/LegalRepFields.js.map +1 -0
- package/dist/cjs/components/session/UserInputForm.js +2 -1
- package/dist/cjs/components/session/UserInputForm.js.map +1 -1
- package/dist/cjs/constants/userInputForm.js +2 -2
- package/dist/cjs/constants/userInputForm.js.map +1 -1
- package/dist/cjs/hooks/useUserInputForm.js +17 -1
- package/dist/cjs/hooks/useUserInputForm.js.map +1 -1
- package/dist/cjs/i18n/documents/documents.en.json.js +3 -0
- package/dist/cjs/i18n/documents/documents.en.json.js.map +1 -1
- package/dist/cjs/i18n/documents/documents.fr.json.js +3 -0
- package/dist/cjs/i18n/documents/documents.fr.json.js.map +1 -1
- package/dist/cjs/i18n/en.json.js +2 -1
- package/dist/cjs/i18n/en.json.js.map +1 -1
- package/dist/cjs/i18n/fr.json.js +2 -1
- package/dist/cjs/i18n/fr.json.js.map +1 -1
- package/dist/cjs/utils/userInputForm.js +1 -0
- package/dist/cjs/utils/userInputForm.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/LegalRepFields.js +22 -0
- package/dist/esm/components/session/UserInputForm/LegalRepFields.js.map +1 -0
- package/dist/esm/components/session/UserInputForm.js +2 -1
- package/dist/esm/components/session/UserInputForm.js.map +1 -1
- package/dist/esm/constants/userInputForm.js +2 -2
- package/dist/esm/constants/userInputForm.js.map +1 -1
- package/dist/esm/hooks/useUserInputForm.js +17 -1
- package/dist/esm/hooks/useUserInputForm.js.map +1 -1
- package/dist/esm/i18n/documents/documents.en.json.js +3 -1
- package/dist/esm/i18n/documents/documents.en.json.js.map +1 -1
- package/dist/esm/i18n/documents/documents.fr.json.js +3 -1
- package/dist/esm/i18n/documents/documents.fr.json.js.map +1 -1
- package/dist/esm/i18n/en.json.js +2 -1
- package/dist/esm/i18n/en.json.js.map +1 -1
- package/dist/esm/i18n/fr.json.js +2 -1
- package/dist/esm/i18n/fr.json.js.map +1 -1
- package/dist/esm/utils/userInputForm.js +1 -0
- package/dist/esm/utils/userInputForm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var Label = require('@radix-ui/react-label');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var useI18n = require('../../../hooks/useI18n.js');
|
|
10
|
+
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var Label__namespace = /*#__PURE__*/_interopNamespaceDefault(Label);
|
|
29
|
+
|
|
30
|
+
var LegalRepFields = function (_a) {
|
|
31
|
+
var form = _a.form, errors = _a.errors, requestedFields = _a.requestedFields, onFieldChange = _a.onFieldChange;
|
|
32
|
+
var t = useI18n.useI18n().t;
|
|
33
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [requestedFields.has("legalRepresentativeNom") && (jsxRuntime.jsxs("div", { className: "space-y-2", children: [jsxRuntime.jsx(Label__namespace.Root, { htmlFor: "legalRepresentativeLastName", className: "block text-sm md:text-base font-semibold text-gray-900", children: t("user_input_form.fields.legal_representative_last_name", "Nom du représentant légal") }), jsxRuntime.jsx("input", { id: "legalRepresentativeLastName", type: "text", value: form.legalRepresentativeLastName || "", onChange: function (event) {
|
|
34
|
+
return onFieldChange("legalRepresentativeLastName", event.target.value);
|
|
35
|
+
}, placeholder: t("user_input_form.placeholders.legal_representative_last_name", "Nom"), className: clsx("w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent", errors.legalRepresentativeLastName
|
|
36
|
+
? "border-red-500 bg-red-50"
|
|
37
|
+
: "border-gray-300 hover-border-gray-400"), autoComplete: "off" }), errors.legalRepresentativeLastName && (jsxRuntime.jsxs("p", { className: "text-red-600 text-sm flex items-center gap-1", children: [jsxRuntime.jsx("span", { className: "text-red-500", children: "\u26A0" }), t("user_input_form.errors.legal_representative_last_name_required")] }))] })), requestedFields.has("legalRepresentativePrenom") && (jsxRuntime.jsxs("div", { className: "space-y-2", children: [jsxRuntime.jsx(Label__namespace.Root, { htmlFor: "legalRepresentativeFirstName", className: "block text-sm md:text-base font-semibold text-gray-900", children: t("user_input_form.fields.legal_representative_first_name", "Prénom du représentant légal") }), jsxRuntime.jsx("input", { id: "legalRepresentativeFirstName", type: "text", value: form.legalRepresentativeFirstName || "", onChange: function (event) {
|
|
38
|
+
return onFieldChange("legalRepresentativeFirstName", event.target.value);
|
|
39
|
+
}, placeholder: t("user_input_form.placeholders.legal_representative_first_name", "Prénom"), className: clsx("w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent", errors.legalRepresentativeFirstName
|
|
40
|
+
? "border-red-500 bg-red-50"
|
|
41
|
+
: "border-gray-300 hover-border-gray-400"), autoComplete: "off" }), errors.legalRepresentativeFirstName && (jsxRuntime.jsxs("p", { className: "text-red-600 text-sm flex items-center gap-1", children: [jsxRuntime.jsx("span", { className: "text-red-500", children: "\u26A0" }), t("user_input_form.errors.legal_representative_first_name_required")] }))] }))] }));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.default = LegalRepFields;
|
|
45
|
+
//# sourceMappingURL=LegalRepFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegalRepFields.js","sources":["../../../../../../src/components/session/UserInputForm/LegalRepFields.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport * as Label from \"@radix-ui/react-label\";\nimport clsx from \"clsx\";\nimport type {\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../../../types/userInputForm\";\nimport { useI18n } from \"../../../hooks/useI18n\";\n\ninterface LegalRepFieldsProps {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n requestedFields: RequestedFields;\n onFieldChange: (key: keyof UserInputFormState, value: string) => void;\n}\n\nconst LegalRepFields = ({\n form,\n errors,\n requestedFields,\n onFieldChange,\n}: LegalRepFieldsProps) => {\n const { t } = useI18n();\n\n return (\n <Fragment>\n {requestedFields.has(\"legalRepresentativeNom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeLastName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_last_name\",\n \"Nom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeLastName\"\n type=\"text\"\n value={form.legalRepresentativeLastName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeLastName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_last_name\",\n \"Nom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeLastName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeLastName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_last_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n\n {requestedFields.has(\"legalRepresentativePrenom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeFirstName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_first_name\",\n \"Prénom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeFirstName\"\n type=\"text\"\n value={form.legalRepresentativeFirstName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeFirstName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_first_name\",\n \"Prénom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeFirstName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeFirstName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_first_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n </Fragment>\n );\n};\n\nexport default LegalRepFields;\n"],"names":["useI18n","_jsxs","Fragment","_jsx","Label"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAM,cAAc,GAAG,UAAC,EAKF,EAAA;QAJpB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,aAAa,GAAA,EAAA,CAAA,aAAA;AAEL,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;IAET,QACEC,eAAA,CAACC,cAAQ,EAAA,EAAA,QAAA,EAAA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EACE,EAAE,EAAC,8BAA8B,EACjC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,4BAA4B,IAAI,EAAE,EAC9C,QAAQ,EAAE,UAAC,KAAK,EAAA;4BACd,OAAA,aAAa,CAAC,8BAA8B,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAAjE,wBAAA,CAAiE,EAEnE,WAAW,EAAE,CAAC,CACZ,8DAA8D,EAC9D,QAAQ,CACT,EACD,SAAS,EAAE,IAAI,CACb,sJAAsJ,EACtJ,MAAM,CAAC;AACL,8BAAE;AACF,8BAAE,uCAAuC,CAC5C,EACD,YAAY,EAAC,KAAK,EAAA,CAClB,EACD,MAAM,CAAC,4BAA4B,KAClCF,uBAAG,SAAS,EAAC,8CAA8C,EAAA,QAAA,EAAA,CACzDE,yBAAM,SAAS,EAAC,cAAc,EAAA,QAAA,EAAA,QAAA,EAAA,CAAS,EACtC,CAAC,CACA,iEAAiE,CAClE,IACC,CACL,CAAA,EAAA,CACG,CACP,CAAA,EAAA,CACQ;AAEf;;;;"}
|
|
@@ -11,6 +11,7 @@ var useI18n = require('../../hooks/useI18n.js');
|
|
|
11
11
|
var useUserInputForm = require('../../hooks/useUserInputForm.js');
|
|
12
12
|
var IdentityFields = require('./UserInputForm/IdentityFields.js');
|
|
13
13
|
var LegalEntityFields = require('./UserInputForm/LegalEntityFields.js');
|
|
14
|
+
var LegalRepFields = require('./UserInputForm/LegalRepFields.js');
|
|
14
15
|
var ContactFields = require('./UserInputForm/ContactFields.js');
|
|
15
16
|
var AddressFields = require('./UserInputForm/AddressFields.js');
|
|
16
17
|
var NationalityField = require('./UserInputForm/NationalityField.js');
|
|
@@ -32,7 +33,7 @@ var UserInputForm = function (props) {
|
|
|
32
33
|
return (jsxRuntime.jsxs(MobilePageLayout.default, { contentClassName: "h-full", footer: jsxRuntime.jsx(PageActions.default, { primary: jsxRuntime.jsx(Button.default, { onClick: goOnNextStep, children: t("user_input_form.buttons.continue") }), secondary: jsxRuntime.jsx(Button.default, { variant: "secondary", onClick: goOnPreviousStep, children: t("user_input_form.buttons.back") }) }), children: [typeof process !== "undefined" &&
|
|
33
34
|
((_a = process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) === "development" && (jsxRuntime.jsx("div", { className: "fixed right-0 top-0 z-50 bg-green-500 p-2 text-xs text-white", children: "UserInputForm Rendered \u2713" })), jsxRuntime.jsx("div", { className: "px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxRuntime.jsxs("div", { className: "mx-auto w-full space-y-6 ".concat(hasListCustomField
|
|
34
35
|
? "max-w-[98vw] md:max-w-[1300px] lg:max-w-[1500px]"
|
|
35
|
-
: "max-w-md"), children: [jsxRuntime.jsxs("div", { className: "space-y-4 text-center", children: [jsxRuntime.jsx(Title.default, { className: "text-xl md:text-2xl lg:text-3xl", children: pageTitle }), jsxRuntime.jsx(Subtitle.default, { className: "text-sm leading-relaxed text-gray-600 md:text-base whitespace-pre-line", children: pageDescription })] }), jsxRuntime.jsxs("div", { className: "space-y-6 z-30 h-full", children: [informationType === "identity" && (jsxRuntime.jsx(IdentityFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "identity-legal" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(LegalEntityFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange }), requestedFields.has("adresse") && (jsxRuntime.jsxs("div", { className: "space-y-4", children: [jsxRuntime.jsx("h3", { className: "text-lg md:text-xl font-semibold text-gray-900", children: t("user_input_form.registered_office_address", "Adresse du siège social") }), jsxRuntime.jsx(AddressFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: handleAddressChange, onAddressFocus: handleAddressFocus, onAddressBlur: handleAddressBlur, onApplySuggestion: applyAddressSuggestion })] }))] })), informationType === "contact" && (jsxRuntime.jsx(ContactFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "address" && (jsxRuntime.jsx(AddressFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: handleAddressChange, onAddressFocus: handleAddressFocus, onAddressBlur: handleAddressBlur, onApplySuggestion: applyAddressSuggestion })), informationType === "nationality" && (jsxRuntime.jsx(NationalityField.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "custom" && props.node.customFields && (jsxRuntime.jsx(CustomFormFields.default, { customFields: props.node.customFields, formData: customFormData, errors: customFormErrors, cellErrors: customFormCellErrors, onFieldChange: handleCustomFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: function (fieldId, val) { return handleAddressChange(val); }, onAddressFocus: function (fieldId) { return handleAddressFocus(); }, onAddressBlur: function (fieldId) { return handleAddressBlur(); }, onApplySuggestion: function (fieldId, suggestion) {
|
|
36
|
+
: "max-w-md"), children: [jsxRuntime.jsxs("div", { className: "space-y-4 text-center", children: [jsxRuntime.jsx(Title.default, { className: "text-xl md:text-2xl lg:text-3xl", children: pageTitle }), jsxRuntime.jsx(Subtitle.default, { className: "text-sm leading-relaxed text-gray-600 md:text-base whitespace-pre-line", children: pageDescription })] }), jsxRuntime.jsxs("div", { className: "space-y-6 z-30 h-full", children: [informationType === "identity" && (jsxRuntime.jsx(IdentityFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "identity-legal-rep" && (jsxRuntime.jsx(LegalRepFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "identity-legal" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(LegalEntityFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange }), requestedFields.has("adresse") && (jsxRuntime.jsxs("div", { className: "space-y-4", children: [jsxRuntime.jsx("h3", { className: "text-lg md:text-xl font-semibold text-gray-900", children: t("user_input_form.registered_office_address", "Adresse du siège social") }), jsxRuntime.jsx(AddressFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: handleAddressChange, onAddressFocus: handleAddressFocus, onAddressBlur: handleAddressBlur, onApplySuggestion: applyAddressSuggestion })] }))] })), informationType === "contact" && (jsxRuntime.jsx(ContactFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "address" && (jsxRuntime.jsx(AddressFields.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: handleAddressChange, onAddressFocus: handleAddressFocus, onAddressBlur: handleAddressBlur, onApplySuggestion: applyAddressSuggestion })), informationType === "nationality" && (jsxRuntime.jsx(NationalityField.default, { form: form, errors: errors, requestedFields: requestedFields, onFieldChange: handleFieldChange })), informationType === "custom" && props.node.customFields && (jsxRuntime.jsx(CustomFormFields.default, { customFields: props.node.customFields, formData: customFormData, errors: customFormErrors, cellErrors: customFormCellErrors, onFieldChange: handleCustomFieldChange, addressSuggestions: addressSuggestions, showSuggestions: showSuggestions, onAddressChange: function (fieldId, val) { return handleAddressChange(val); }, onAddressFocus: function (fieldId) { return handleAddressFocus(); }, onAddressBlur: function (fieldId) { return handleAddressBlur(); }, onApplySuggestion: function (fieldId, suggestion) {
|
|
36
37
|
return applyAddressSuggestion(suggestion);
|
|
37
38
|
} }))] })] }) })] }));
|
|
38
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserInputForm.js","sources":["../../../../../src/components/session/UserInputForm.tsx"],"sourcesContent":["import type { UserInputFormProps } from \"../../types/userInput\";\nimport Button from \"../ui/Button\";\nimport PageActions from \"../ui/PageActions\";\nimport Title from \"../ui/Title\";\nimport Subtitle from \"../ui/Subtitle\";\nimport { useI18n } from \"../../hooks/useI18n\";\nimport { useUserInputForm } from \"../../hooks/useUserInputForm\";\nimport IdentityFields from \"./UserInputForm/IdentityFields\";\nimport LegalEntityFields from \"./UserInputForm/LegalEntityFields\";\nimport ContactFields from \"./UserInputForm/ContactFields\";\nimport AddressFields from \"./UserInputForm/AddressFields\";\nimport NationalityField from \"./UserInputForm/NationalityField\";\nimport CustomFormFields from \"./UserInputForm/CustomFormFields\";\nimport MobilePageLayout from \"../ui/MobilePageLayout\";\n\nconst UserInputForm = (props: UserInputFormProps) => {\n const { t } = useI18n();\n const hasListCustomField =\n props.node.informationType === \"custom\" &&\n (props.node.customFields || []).some((field) => field.valueType === \"list\");\n\n const {\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 } = useUserInputForm(props);\n\n // DEBUG LOGS\n console.log(\"🔍 [UserInputForm] informationType:\", informationType);\n console.log(\n \"🔍 [UserInputForm] node.informationType:\",\n props.node.informationType,\n );\n console.log(\"🔍 [UserInputForm] node.customFields:\", props.node.customFields);\n console.log(\"🔍 [UserInputForm] customFormData:\", customFormData);\n console.log(\n \"🔍 [UserInputForm] requestedFields:\",\n Array.from(requestedFields),\n );\n\n return (\n <MobilePageLayout\n contentClassName=\"h-full\"\n footer={\n <PageActions\n primary={\n <Button onClick={goOnNextStep}>\n {t(\"user_input_form.buttons.continue\")}\n </Button>\n }\n secondary={\n <Button variant=\"secondary\" onClick={goOnPreviousStep}>\n {t(\"user_input_form.buttons.back\")}\n </Button>\n }\n />\n }\n >\n {typeof process !== \"undefined\" &&\n process.env?.NODE_ENV === \"development\" && (\n <div className=\"fixed right-0 top-0 z-50 bg-green-500 p-2 text-xs text-white\">\n UserInputForm Rendered ✓\n </div>\n )}\n\n <div className=\"px-4 py-6 pt-11 md:px-8 md:py-8\">\n <div\n className={`mx-auto w-full space-y-6 ${\n hasListCustomField\n ? \"max-w-[98vw] md:max-w-[1300px] lg:max-w-[1500px]\"\n : \"max-w-md\"\n }`}\n >\n <div className=\"space-y-4 text-center\">\n <Title className=\"text-xl md:text-2xl lg:text-3xl\">\n {pageTitle}\n </Title>\n <Subtitle className=\"text-sm leading-relaxed text-gray-600 md:text-base whitespace-pre-line\">\n {pageDescription}\n </Subtitle>\n </div>\n\n <div className=\"space-y-6 z-30 h-full\">\n {informationType === \"identity\" && (\n <IdentityFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"identity-legal\" && (\n <>\n <LegalEntityFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n {requestedFields.has(\"adresse\") && (\n <div className=\"space-y-4\">\n <h3 className=\"text-lg md:text-xl font-semibold text-gray-900\">\n {t(\n \"user_input_form.registered_office_address\",\n \"Adresse du siège social\",\n )}\n </h3>\n <AddressFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={handleAddressChange}\n onAddressFocus={handleAddressFocus}\n onAddressBlur={handleAddressBlur}\n onApplySuggestion={applyAddressSuggestion}\n />\n </div>\n )}\n </>\n )}\n\n {informationType === \"contact\" && (\n <ContactFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"address\" && (\n <AddressFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={handleAddressChange}\n onAddressFocus={handleAddressFocus}\n onAddressBlur={handleAddressBlur}\n onApplySuggestion={applyAddressSuggestion}\n />\n )}\n\n {informationType === \"nationality\" && (\n <NationalityField\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"custom\" && props.node.customFields && (\n <CustomFormFields\n customFields={props.node.customFields}\n formData={customFormData}\n errors={customFormErrors}\n cellErrors={customFormCellErrors}\n onFieldChange={handleCustomFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={(fieldId, val) => handleAddressChange(val)}\n onAddressFocus={(fieldId) => handleAddressFocus()}\n onAddressBlur={(fieldId) => handleAddressBlur()}\n onApplySuggestion={(fieldId, suggestion) =>\n applyAddressSuggestion(suggestion)\n }\n />\n )}\n </div>\n </div>\n </div>\n </MobilePageLayout>\n );\n};\n\nexport default UserInputForm;\n"],"names":["useI18n","useUserInputForm","_jsxs","MobilePageLayout","_jsx","PageActions","Button","Title","Subtitle","IdentityFields","LegalEntityFields","AddressFields","ContactFields","NationalityField","CustomFormFields"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,IAAM,aAAa,GAAG,UAAC,KAAyB,EAAA;;AACtC,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;IACT,IAAM,kBAAkB,GACtB,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,QAAQ;QACvC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,IAAI,CAAC,UAAC,KAAK,EAAA,EAAK,OAAA,KAAK,CAAC,SAAS,KAAK,MAAM,CAAA,CAA1B,CAA0B,CAAC;AAEvE,IAAA,IAAA,EAAA,GAoBFC,iCAAgB,CAAC,KAAK,CAAC,EAnBzB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,eAAe,GAAA,EAAA,CAAA,eAA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IAAI,CAAC,YAAY,EACrC,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAE,uBAAuB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,UAAC,OAAO,EAAE,GAAG,EAAA,EAAK,OAAA,mBAAmB,CAAC,GAAG,CAAC,EAAxB,CAAwB,EAC3D,cAAc,EAAE,UAAC,OAAO,EAAA,EAAK,OAAA,kBAAkB,EAAE,EAApB,CAAoB,EACjD,aAAa,EAAE,UAAC,OAAO,EAAA,EAAK,OAAA,iBAAiB,EAAE,CAAA,CAAnB,CAAmB,EAC/C,iBAAiB,EAAE,UAAC,OAAO,EAAE,UAAU,EAAA;wCACrC,OAAA,sBAAsB,CAAC,UAAU,CAAC;AAAlC,oCAAA,CAAkC,GAEpC,CACH,CAAA,EAAA,CACG,IACF,EAAA,CACF,CAAA,EAAA,CACW;AAEvB;;;;"}
|
|
1
|
+
{"version":3,"file":"UserInputForm.js","sources":["../../../../../src/components/session/UserInputForm.tsx"],"sourcesContent":["import type { UserInputFormProps } from \"../../types/userInput\";\nimport Button from \"../ui/Button\";\nimport PageActions from \"../ui/PageActions\";\nimport Title from \"../ui/Title\";\nimport Subtitle from \"../ui/Subtitle\";\nimport { useI18n } from \"../../hooks/useI18n\";\nimport { useUserInputForm } from \"../../hooks/useUserInputForm\";\nimport IdentityFields from \"./UserInputForm/IdentityFields\";\nimport LegalEntityFields from \"./UserInputForm/LegalEntityFields\";\nimport LegalRepFields from \"./UserInputForm/LegalRepFields\";\nimport ContactFields from \"./UserInputForm/ContactFields\";\nimport AddressFields from \"./UserInputForm/AddressFields\";\nimport NationalityField from \"./UserInputForm/NationalityField\";\nimport CustomFormFields from \"./UserInputForm/CustomFormFields\";\nimport MobilePageLayout from \"../ui/MobilePageLayout\";\n\nconst UserInputForm = (props: UserInputFormProps) => {\n const { t } = useI18n();\n const hasListCustomField =\n props.node.informationType === \"custom\" &&\n (props.node.customFields || []).some((field) => field.valueType === \"list\");\n\n const {\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 } = useUserInputForm(props);\n\n // DEBUG LOGS\n console.log(\"🔍 [UserInputForm] informationType:\", informationType);\n console.log(\n \"🔍 [UserInputForm] node.informationType:\",\n props.node.informationType,\n );\n console.log(\"🔍 [UserInputForm] node.customFields:\", props.node.customFields);\n console.log(\"🔍 [UserInputForm] customFormData:\", customFormData);\n console.log(\n \"🔍 [UserInputForm] requestedFields:\",\n Array.from(requestedFields),\n );\n\n return (\n <MobilePageLayout\n contentClassName=\"h-full\"\n footer={\n <PageActions\n primary={\n <Button onClick={goOnNextStep}>\n {t(\"user_input_form.buttons.continue\")}\n </Button>\n }\n secondary={\n <Button variant=\"secondary\" onClick={goOnPreviousStep}>\n {t(\"user_input_form.buttons.back\")}\n </Button>\n }\n />\n }\n >\n {typeof process !== \"undefined\" &&\n process.env?.NODE_ENV === \"development\" && (\n <div className=\"fixed right-0 top-0 z-50 bg-green-500 p-2 text-xs text-white\">\n UserInputForm Rendered ✓\n </div>\n )}\n\n <div className=\"px-4 py-6 pt-11 md:px-8 md:py-8\">\n <div\n className={`mx-auto w-full space-y-6 ${\n hasListCustomField\n ? \"max-w-[98vw] md:max-w-[1300px] lg:max-w-[1500px]\"\n : \"max-w-md\"\n }`}\n >\n <div className=\"space-y-4 text-center\">\n <Title className=\"text-xl md:text-2xl lg:text-3xl\">\n {pageTitle}\n </Title>\n <Subtitle className=\"text-sm leading-relaxed text-gray-600 md:text-base whitespace-pre-line\">\n {pageDescription}\n </Subtitle>\n </div>\n\n <div className=\"space-y-6 z-30 h-full\">\n {informationType === \"identity\" && (\n <IdentityFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"identity-legal-rep\" && (\n <LegalRepFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"identity-legal\" && (\n <>\n <LegalEntityFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n {requestedFields.has(\"adresse\") && (\n <div className=\"space-y-4\">\n <h3 className=\"text-lg md:text-xl font-semibold text-gray-900\">\n {t(\n \"user_input_form.registered_office_address\",\n \"Adresse du siège social\",\n )}\n </h3>\n <AddressFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={handleAddressChange}\n onAddressFocus={handleAddressFocus}\n onAddressBlur={handleAddressBlur}\n onApplySuggestion={applyAddressSuggestion}\n />\n </div>\n )}\n </>\n )}\n\n {informationType === \"contact\" && (\n <ContactFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"address\" && (\n <AddressFields\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={handleAddressChange}\n onAddressFocus={handleAddressFocus}\n onAddressBlur={handleAddressBlur}\n onApplySuggestion={applyAddressSuggestion}\n />\n )}\n\n {informationType === \"nationality\" && (\n <NationalityField\n form={form}\n errors={errors}\n requestedFields={requestedFields}\n onFieldChange={handleFieldChange}\n />\n )}\n\n {informationType === \"custom\" && props.node.customFields && (\n <CustomFormFields\n customFields={props.node.customFields}\n formData={customFormData}\n errors={customFormErrors}\n cellErrors={customFormCellErrors}\n onFieldChange={handleCustomFieldChange}\n addressSuggestions={addressSuggestions}\n showSuggestions={showSuggestions}\n onAddressChange={(fieldId, val) => handleAddressChange(val)}\n onAddressFocus={(fieldId) => handleAddressFocus()}\n onAddressBlur={(fieldId) => handleAddressBlur()}\n onApplySuggestion={(fieldId, suggestion) =>\n applyAddressSuggestion(suggestion)\n }\n />\n )}\n </div>\n </div>\n </div>\n </MobilePageLayout>\n );\n};\n\nexport default UserInputForm;\n"],"names":["useI18n","useUserInputForm","_jsxs","MobilePageLayout","_jsx","PageActions","Button","Title","Subtitle","IdentityFields","LegalRepFields","_Fragment","LegalEntityFields","AddressFields","ContactFields","NationalityField","CustomFormFields"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,IAAM,aAAa,GAAG,UAAC,KAAyB,EAAA;;AACtC,IAAA,IAAA,CAAC,GAAKA,eAAO,EAAE,EAAd;IACT,IAAM,kBAAkB,GACtB,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,QAAQ;QACvC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,IAAI,CAAC,UAAC,KAAK,EAAA,EAAK,OAAA,KAAK,CAAC,SAAS,KAAK,MAAM,CAAA,CAA1B,CAA0B,CAAC;AAEvE,IAAA,IAAA,EAAA,GAoBFC,iCAAgB,CAAC,KAAK,CAAC,EAnBzB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAClB,eAAe,qBAAA,EACf,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EACjB,mBAAmB,GAAA,EAAA,CAAA,mBAAA,EACnB,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAClB,iBAAiB,GAAA,EAAA,CAAA,iBAAA,EACjB,sBAAsB,GAAA,EAAA,CAAA,sBAAA,E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AoB,EAChC,aAAa,EAAE,uBAAuB,EACtC,kBAAkB,EAAE,kBAAkB,EACtC,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,UAAC,OAAO,EAAE,GAAG,EAAA,EAAK,OAAA,mBAAmB,CAAC,GAAG,CAAC,CAAA,CAAxB,CAAwB,EAC3D,cAAc,EAAE,UAAC,OAAO,EAAA,EAAK,OAAA,kBAAkB,EAAE,EAApB,CAAoB,EACjD,aAAa,EAAE,UAAC,OAAO,EAAA,EAAK,OAAA,iBAAiB,EAAE,CAAA,CAAnB,CAAmB,EAC/C,iBAAiB,EAAE,UAAC,OAAO,EAAE,UAAU,EAAA;wCACrC,OAAA,sBAAsB,CAAC,UAAU,CAAC;AAAlC,oCAAA,CAAkC,GAEpC,CACH,CAAA,EAAA,CACG,IACF,EAAA,CACF,CAAA,EAAA,CACW;AAEvB;;;;"}
|
|
@@ -41,6 +41,7 @@ var ADDRESS_SUGGESTIONS = [
|
|
|
41
41
|
var DEFAULT_FIELDS = {
|
|
42
42
|
identity: ["nom", "prenom", "date_naissance"],
|
|
43
43
|
"identity-legal": ["nom", "registrationNumber", "siret", "tva", "adresse"],
|
|
44
|
+
"identity-legal-rep": ["legalRepresentativeNom", "legalRepresentativePrenom"],
|
|
44
45
|
contact: ["email", "sms"],
|
|
45
46
|
address: ["adresse"],
|
|
46
47
|
nationality: ["nationalite"],
|
|
@@ -56,8 +57,7 @@ var FIELD_LABELS = {
|
|
|
56
57
|
company: "user_input_form.fields.company_name",
|
|
57
58
|
siret: "user_input_form.fields.siret",
|
|
58
59
|
tva: "user_input_form.fields.vat_number",
|
|
59
|
-
registrationNumber: "user_input_form.fields.registration_number"
|
|
60
|
-
};
|
|
60
|
+
registrationNumber: "user_input_form.fields.registration_number"};
|
|
61
61
|
// Backend endpoint pour l'autocomplétion d'adresses (sécurisé)
|
|
62
62
|
var GEOCODING_AUTOCOMPLETE_ENDPOINT = "/geocoding/autocomplete";
|
|
63
63
|
var FALLBACK_ADDRESS_SUGGESTIONS = ADDRESS_SUGGESTIONS.map(function (label, index) { return ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userInputForm.js","sources":["../../../../src/constants/userInputForm.ts"],"sourcesContent":["import type {\n AddressSuggestion,\n InformationType,\n RequestedFieldKey,\n SelectOption,\n} from \"../types/userInputForm\";\n\nconst days = Array.from({ length: 31 }, (_, index) => index + 1);\nconst currentYear = new Date().getFullYear();\nconst years = Array.from({ length: 120 }, (_, index) => currentYear - index);\n\nconst monthLabels = [\n \"Janvier\",\n \"Février\",\n \"Mars\",\n \"Avril\",\n \"Mai\",\n \"Juin\",\n \"Juillet\",\n \"Août\",\n \"Septembre\",\n \"Octobre\",\n \"Novembre\",\n \"Décembre\",\n];\n\nexport const DAY_OPTIONS: SelectOption[] = days.map((value) => ({\n value: String(value).padStart(2, \"0\"),\n label: String(value).padStart(2, \"0\"),\n}));\n\nexport const MONTH_OPTIONS: SelectOption[] = monthLabels.map(\n (label, index) => ({\n value: String(index + 1).padStart(2, \"0\"),\n label,\n })\n);\n\nexport const YEAR_OPTIONS: SelectOption[] = years.map((value) => ({\n value: String(value),\n label: String(value),\n}));\n\n\nexport const ADDRESS_SUGGESTIONS: string[] = [\n \"10 Rue de Rivoli, 75001 Paris, France\",\n \"221B Baker Street, NW1 6XE Londres, Royaume-Uni\",\n \"1600 Amphitheatre Parkway, 94043 Mountain View, États-Unis\",\n \"55 Rue du Faubourg Saint-Honoré, 75008 Paris, France\",\n \"1 Place du Commerce, 44000 Nantes, France\",\n \"Piazza del Colosseo 1, 00184 Rome, Italie\",\n \"Av. Paulista 1578, 01310-200 São Paulo, Brésil\",\n];\n\nexport const DEFAULT_FIELDS: Record<InformationType, RequestedFieldKey[]> = {\n identity: [\"nom\", \"prenom\", \"date_naissance\"],\n \"identity-legal\": [\"nom\", \"registrationNumber\", \"siret\", \"tva\", \"adresse\"],\n contact: [\"email\", \"sms\"],\n address: [\"adresse\"],\n nationality: [\"nationalite\"],\n custom: [], // Custom forms use customFields instead\n};\n\nexport const FIELD_LABELS: Record<RequestedFieldKey, string> = {\n nom: \"user_input_form.fields.last_name\",\n prenom: \"user_input_form.fields.first_name\",\n date_naissance: \"user_input_form.fields.birth_date\",\n email: \"user_input_form.fields.email\",\n sms: \"user_input_form.fields.phone\",\n adresse: \"user_input_form.fields.address_line1\",\n nationalite: \"user_input_form.fields.nationality\",\n company: \"user_input_form.fields.company_name\",\n siret: \"user_input_form.fields.siret\",\n tva: \"user_input_form.fields.vat_number\",\n registrationNumber: \"user_input_form.fields.registration_number\",\n};\n\n// Backend endpoint pour l'autocomplétion d'adresses (sécurisé)\nexport const GEOCODING_AUTOCOMPLETE_ENDPOINT = \"/geocoding/autocomplete\";\n\nexport const FALLBACK_ADDRESS_SUGGESTIONS: AddressSuggestion[] =\n ADDRESS_SUGGESTIONS.map((label, index) => ({\n id: `fallback-${index}`,\n label,\n addressLine1: label,\n postalCode: \"\",\n city: \"\",\n country: \"\",\n }));\n"],"names":[],"mappings":";;AAOA,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA,EAAK,OAAA,KAAK,GAAG,CAAC,CAAA,CAAT,CAAS,CAAC;AAChE,IAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AAC5C,IAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA,EAAK,OAAA,WAAW,GAAG,KAAK,CAAA,CAAnB,CAAmB,CAAC;AAE5E,IAAM,WAAW,GAAG;IAClB,SAAS;IACT,SAAS;IACT,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,SAAS;IACT,MAAM;IACN,WAAW;IACX,SAAS;IACT,UAAU;IACV,UAAU;CACX;AAEM,IAAM,WAAW,GAAmB,IAAI,CAAC,GAAG,CA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,MAAM,EAAE,mCAAmC;AAC3C,IAAA,cAAc,EAAE,mCAAmC;AACnD,IAAA,KAAK,EAAE,8BAA8B;AACrC,IAAA,GAAG,EAAE,8BAA8B;AACnC,IACA,WAAW,EAAE,oCAAoC;AACjD,IAAA,OAAO,EAAE,qCAAqC;AAC9C,IAAA,KAAK,EAAE,8BAA8B;AACrC,IAAA,GAAG,EAAE,mCAAmC;AACxC,IAAA,kBAAkB,EAAE
|
|
1
|
+
{"version":3,"file":"userInputForm.js","sources":["../../../../src/constants/userInputForm.ts"],"sourcesContent":["import type {\n AddressSuggestion,\n InformationType,\n RequestedFieldKey,\n SelectOption,\n} from \"../types/userInputForm\";\n\nconst days = Array.from({ length: 31 }, (_, index) => index + 1);\nconst currentYear = new Date().getFullYear();\nconst years = Array.from({ length: 120 }, (_, index) => currentYear - index);\n\nconst monthLabels = [\n \"Janvier\",\n \"Février\",\n \"Mars\",\n \"Avril\",\n \"Mai\",\n \"Juin\",\n \"Juillet\",\n \"Août\",\n \"Septembre\",\n \"Octobre\",\n \"Novembre\",\n \"Décembre\",\n];\n\nexport const DAY_OPTIONS: SelectOption[] = days.map((value) => ({\n value: String(value).padStart(2, \"0\"),\n label: String(value).padStart(2, \"0\"),\n}));\n\nexport const MONTH_OPTIONS: SelectOption[] = monthLabels.map(\n (label, index) => ({\n value: String(index + 1).padStart(2, \"0\"),\n label,\n })\n);\n\nexport const YEAR_OPTIONS: SelectOption[] = years.map((value) => ({\n value: String(value),\n label: String(value),\n}));\n\n\nexport const ADDRESS_SUGGESTIONS: string[] = [\n \"10 Rue de Rivoli, 75001 Paris, France\",\n \"221B Baker Street, NW1 6XE Londres, Royaume-Uni\",\n \"1600 Amphitheatre Parkway, 94043 Mountain View, États-Unis\",\n \"55 Rue du Faubourg Saint-Honoré, 75008 Paris, France\",\n \"1 Place du Commerce, 44000 Nantes, France\",\n \"Piazza del Colosseo 1, 00184 Rome, Italie\",\n \"Av. Paulista 1578, 01310-200 São Paulo, Brésil\",\n];\n\nexport const DEFAULT_FIELDS: Record<InformationType, RequestedFieldKey[]> = {\n identity: [\"nom\", \"prenom\", \"date_naissance\"],\n \"identity-legal\": [\"nom\", \"registrationNumber\", \"siret\", \"tva\", \"adresse\"],\n \"identity-legal-rep\": [\"legalRepresentativeNom\", \"legalRepresentativePrenom\"],\n contact: [\"email\", \"sms\"],\n address: [\"adresse\"],\n nationality: [\"nationalite\"],\n custom: [], // Custom forms use customFields instead\n};\n\nexport const FIELD_LABELS: Record<RequestedFieldKey, string> = {\n nom: \"user_input_form.fields.last_name\",\n prenom: \"user_input_form.fields.first_name\",\n date_naissance: \"user_input_form.fields.birth_date\",\n email: \"user_input_form.fields.email\",\n sms: \"user_input_form.fields.phone\",\n adresse: \"user_input_form.fields.address_line1\",\n nationalite: \"user_input_form.fields.nationality\",\n company: \"user_input_form.fields.company_name\",\n siret: \"user_input_form.fields.siret\",\n tva: \"user_input_form.fields.vat_number\",\n registrationNumber: \"user_input_form.fields.registration_number\",\n legalRepresentativeNom:\n \"user_input_form.fields.legal_representative_last_name\",\n legalRepresentativePrenom:\n \"user_input_form.fields.legal_representative_first_name\",\n};\n\n// Backend endpoint pour l'autocomplétion d'adresses (sécurisé)\nexport const GEOCODING_AUTOCOMPLETE_ENDPOINT = \"/geocoding/autocomplete\";\n\nexport const FALLBACK_ADDRESS_SUGGESTIONS: AddressSuggestion[] =\n ADDRESS_SUGGESTIONS.map((label, index) => ({\n id: `fallback-${index}`,\n label,\n addressLine1: label,\n postalCode: \"\",\n city: \"\",\n country: \"\",\n }));\n"],"names":[],"mappings":";;AAOA,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,UAAC,CAAC,EAAE,KAAK,EAAA,EAAK,OAAA,KAAK,GAAG,CAAC,CAAA,CAAT,CAAS,CAAC;AAChE,IAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AAC5C,IAAM,KAAK,GAAG,K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AAK,EAAE,QAAQ,EAAE,gBAAgB,CAAC;IAC7C,gBAAgB,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC;AAC1E,IAAA,oBAAoB,EAAE,CAAC,wBAAwB,EAAE,2BAA2B,CAAC;AAC7E,IAAA,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC;IACzB,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,WAAW,EAAE,CAAC,aAAa,CAAC;IAC5B,MAAM,EAAE,EAAE;;AAGL,IAAM,YAAY,GAAsC;AAC7D,IAAA,GAAG,EAAE,kCAAkC;AACvC,IAAA,MAAM,EAAE,mCAAmC;AAC3C,IAAA,cAAc,EAAE,mCAAmC;AACnD,IAAA,KAAK,EAAE,8BAA8B;AACrC,IAAA,GAAG,EAAE,8BAA8B;AACnC,IACA,WAAW,EAAE,oCAAoC;AACjD,IAAA,OAAO,EAAE,qCAAqC;AAC9C,IAAA,KAAK,EAAE,8BAA8B;AACrC,IAAA,GAAG,EAAE,mCAAmC;AACxC,IAAA,kBAAkB,EAAE;AAOtB;AACO,IAAM,+BAA+B,GAAG;AAExC,IAAM,4BAA4B,GACvC,mBAAmB,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,QAAC;IACzC,EAAE,EAAE,WAAA,CAAA,MAAA,CAAY,KAAK,CAAE;AACvB,IAAA,KAAK,EAAA,KAAA;AACL,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,OAAO,EAAE,EAAE;CACZ,EAAC,CAPwC,CAOxC;;;;;;;;;;;"}
|
|
@@ -59,6 +59,8 @@ var useUserInputForm = function (_a) {
|
|
|
59
59
|
siret: (initialUserInput === null || initialUserInput === void 0 ? void 0 : initialUserInput.siret) || "",
|
|
60
60
|
tva: (initialUserInput === null || initialUserInput === void 0 ? void 0 : initialUserInput.tva) || "",
|
|
61
61
|
registrationNumber: (initialUserInput === null || initialUserInput === void 0 ? void 0 : initialUserInput.registrationNumber) || "",
|
|
62
|
+
legalRepresentativeLastName: (initialUserInput === null || initialUserInput === void 0 ? void 0 : initialUserInput.legalRepresentativeLastName) || "",
|
|
63
|
+
legalRepresentativeFirstName: (initialUserInput === null || initialUserInput === void 0 ? void 0 : initialUserInput.legalRepresentativeFirstName) || "",
|
|
62
64
|
}), form = _b[0], setForm = _b[1];
|
|
63
65
|
var _c = React.useState({}), errors = _c[0], setErrors = _c[1];
|
|
64
66
|
// Custom form state
|
|
@@ -367,6 +369,16 @@ var useUserInputForm = function (_a) {
|
|
|
367
369
|
markError("registrationNumber");
|
|
368
370
|
}
|
|
369
371
|
}
|
|
372
|
+
if (informationType === "identity-legal-rep") {
|
|
373
|
+
if (requestedFields.has("legalRepresentativeNom") &&
|
|
374
|
+
!form.legalRepresentativeLastName) {
|
|
375
|
+
markError("legalRepresentativeLastName");
|
|
376
|
+
}
|
|
377
|
+
if (requestedFields.has("legalRepresentativePrenom") &&
|
|
378
|
+
!form.legalRepresentativeFirstName) {
|
|
379
|
+
markError("legalRepresentativeFirstName");
|
|
380
|
+
}
|
|
381
|
+
}
|
|
370
382
|
if (informationType === "contact") {
|
|
371
383
|
if (requestedFields.has("email")) {
|
|
372
384
|
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -585,7 +597,7 @@ var useUserInputForm = function (_a) {
|
|
|
585
597
|
if (!validateForm()) {
|
|
586
598
|
return;
|
|
587
599
|
}
|
|
588
|
-
setUserInput(function (previous) { return (tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, previous), (requestedFields.has("nom") && tslib_es6.__assign({}, (informationType === "identity-legal"
|
|
600
|
+
setUserInput(function (previous) { return (tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, previous), (requestedFields.has("nom") && tslib_es6.__assign({}, (informationType === "identity-legal"
|
|
589
601
|
? { companyName: form.companyName }
|
|
590
602
|
: { lastName: form.lastName })))), (requestedFields.has("prenom") && { firstName: form.firstName })), (requestedFields.has("date_naissance") && {
|
|
591
603
|
birthDate: form.birthDate,
|
|
@@ -600,6 +612,10 @@ var useUserInputForm = function (_a) {
|
|
|
600
612
|
countryCode: form.countryCode,
|
|
601
613
|
})), (requestedFields.has("siret") && { siret: form.siret })), (requestedFields.has("tva") && { tva: form.tva })), (requestedFields.has("registrationNumber") && { registrationNumber: form.registrationNumber })), (requestedFields.has("siret") && !requestedFields.has("registrationNumber") && { registrationNumber: form.siret })), (requestedFields.has("nationalite") && {
|
|
602
614
|
nationality: form.nationality,
|
|
615
|
+
})), (requestedFields.has("legalRepresentativeNom") && {
|
|
616
|
+
legalRepresentativeLastName: form.legalRepresentativeLastName,
|
|
617
|
+
})), (requestedFields.has("legalRepresentativePrenom") && {
|
|
618
|
+
legalRepresentativeFirstName: form.legalRepresentativeFirstName,
|
|
603
619
|
}))); });
|
|
604
620
|
if (informationType === "contact" && setContactInfo) {
|
|
605
621
|
setContactInfo(function (previous) { return (tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, previous), (requestedFields.has("email") && { email: form.email })), (requestedFields.has("sms") && { phoneNumber: form.phoneNumber }))); });
|
|
@@ -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 normalizeListColumns,\n} from \"../utils/listFieldUtils\";\nimport {\n cellErrorKey,\n isDateValid,\n isEmailValid,\n isRegexMatch,\n} from \"../utils/customFieldValidation\";\nimport { labelToKey } from \"../utils/labelToKey\";\nimport { DEFAULT_DATE_DISPLAY_FORMAT } from \"../types/session\";\nimport { useI18n } from \"./useI18n\";\nimport { logFormValidated } from \"../services/auditTrailService\";\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 sessionId,\n}: UserInputFormProps & { sessionId?: string }): 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 registrationNumber: initialUserInput?.registrationNumber || \"\",\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 topLevelKey = field.userInputKey ?? labelToKey(field.label);\n // Priorité : top level (nouveau format) > customFormData[field.id] (ancien format)\n const savedValue =\n (initialUserInput as Record<string, any>)?.[topLevelKey] ??\n 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 prevCustomNodeIdRef = useRef(node.id);\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 registrationNumber: initialUserInput.registrationNumber || previous.registrationNumber,\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 // Re-synchronise customFormData depuis initialUserInput quand on (ré)affiche un\n // nœud DIFFÉRENT sur une instance réutilisée (retour arrière sans remount).\n // Le champ form standard a déjà son propre effet de re-sync ci-dessus ; le\n // customFormData n'en avait aucun → il restait périmé (formulaire perso vidé).\n // On garde sur node.id : sur le MÊME nœud (frappe en cours), on ne touche à rien.\n // Redondant avec le remount par key={node.id} côté renderer, mais sert de filet.\n useEffect(() => {\n if (prevCustomNodeIdRef.current === node.id) {\n return;\n }\n prevCustomNodeIdRef.current = node.id;\n\n if (informationType !== \"custom\" || !node.customFields) {\n setCustomFormData({});\n return;\n }\n\n const next: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const topLevelKey = field.userInputKey ?? labelToKey(field.label);\n const savedValue =\n (initialUserInput as Record<string, any>)?.[topLevelKey] ??\n initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n next[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n next[field.id] = savedValue || \"\";\n });\n setCustomFormData(next);\n }, [node.id, informationType, node.customFields, initialUserInput]);\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 if (requestedFields.has(\"registrationNumber\") && !form.registrationNumber) {\n markError(\"registrationNumber\");\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 const topLevelEntries: Record<string, any> = {};\n const customFormDataEntries: Record<string, any> = {};\n node.customFields?.forEach((field) => {\n const key = field.userInputKey ?? labelToKey(field.label);\n topLevelEntries[key] = customFormData[field.id];\n customFormDataEntries[field.id] = customFormData[field.id];\n });\n\n setUserInput((prev) => ({\n ...prev,\n // Top level avec clé lisible dérivée du label (attendu par l'API cliente)\n ...topLevelEntries,\n // customFormData avec les field.id d'origine (rétrocompat : conditions, sessions existantes)\n customFormData: { ...(prev.customFormData ?? {}), ...customFormDataEntries },\n }));\n\n if (sessionId) logFormValidated(sessionId);\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(\"registrationNumber\") && { registrationNumber: form.registrationNumber }),\n ...(requestedFields.has(\"siret\") && !requestedFields.has(\"registrationNumber\") && { registrationNumber: form.siret }),\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 (sessionId) logFormValidated(sessionId);\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","labelToKey","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","logFormValidated"],"mappings":";;;;;;;;;;;;;;AA6DO,IAAM,gBAAgB,GAAG,UAAC,EAUa,EAAA;QAT5C,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,gBAAgB,GAA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EgB,kCAAgB,CAAC,SAAS,CAAC;QAC1C,IAAI,kBAAkB,EAAE;AACtB,YAAA,kBAAkB,EAAE;QACtB;aAAO;AACL,YAAA,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;QACjC;AACF,IAAA,CAAC;AAED,IAAA,IAAM,gBAAgB,GAAG,YAAA;AACvB,QAAA,OAAO,CAAC,GAAG,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;;;;"}
|
|
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 { labelToKey } from \"../utils/labelToKey\";\nimport { DEFAULT_DATE_DISPLAY_FORMAT } from \"../types/session\";\nimport { useI18n } from \"./useI18n\";\nimport { logFormValidated } from \"../services/auditTrailService\";\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 sessionId,\n}: UserInputFormProps & { sessionId?: string }): 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 registrationNumber: initialUserInput?.registrationNumber || \"\",\n legalRepresentativeLastName:\n initialUserInput?.legalRepresentativeLastName || \"\",\n legalRepresentativeFirstName:\n initialUserInput?.legalRepresentativeFirstName || \"\",\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 topLevelKey = field.userInputKey ?? labelToKey(field.label);\n // Priorité : top level (nouveau format) > customFormData[field.id] (ancien format)\n const savedValue =\n (initialUserInput as Record<string, any>)?.[topLevelKey] ??\n 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 prevCustomNodeIdRef = useRef(node.id);\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 registrationNumber: initialUserInput.registrationNumber || previous.registrationNumber,\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 // Re-synchronise customFormData depuis initialUserInput quand on (ré)affiche un\n // nœud DIFFÉRENT sur une instance réutilisée (retour arrière sans remount).\n // Le champ form standard a déjà son propre effet de re-sync ci-dessus ; le\n // customFormData n'en avait aucun → il restait périmé (formulaire perso vidé).\n // On garde sur node.id : sur le MÊME nœud (frappe en cours), on ne touche à rien.\n // Redondant avec le remount par key={node.id} côté renderer, mais sert de filet.\n useEffect(() => {\n if (prevCustomNodeIdRef.current === node.id) {\n return;\n }\n prevCustomNodeIdRef.current = node.id;\n\n if (informationType !== \"custom\" || !node.customFields) {\n setCustomFormData({});\n return;\n }\n\n const next: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const topLevelKey = field.userInputKey ?? labelToKey(field.label);\n const savedValue =\n (initialUserInput as Record<string, any>)?.[topLevelKey] ??\n initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n next[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n next[field.id] = savedValue || \"\";\n });\n setCustomFormData(next);\n }, [node.id, informationType, node.customFields, initialUserInput]);\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 if (requestedFields.has(\"registrationNumber\") && !form.registrationNumber) {\n markError(\"registrationNumber\");\n }\n }\n\n if (informationType === \"identity-legal-rep\") {\n if (\n requestedFields.has(\"legalRepresentativeNom\") &&\n !form.legalRepresentativeLastName\n ) {\n markError(\"legalRepresentativeLastName\");\n }\n if (\n requestedFields.has(\"legalRepresentativePrenom\") &&\n !form.legalRepresentativeFirstName\n ) {\n markError(\"legalRepresentativeFirstName\");\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 const topLevelEntries: Record<string, any> = {};\n const customFormDataEntries: Record<string, any> = {};\n node.customFields?.forEach((field) => {\n const key = field.userInputKey ?? labelToKey(field.label);\n topLevelEntries[key] = customFormData[field.id];\n customFormDataEntries[field.id] = customFormData[field.id];\n });\n\n setUserInput((prev) => ({\n ...prev,\n // Top level avec clé lisible dérivée du label (attendu par l'API cliente)\n ...topLevelEntries,\n // customFormData avec les field.id d'origine (rétrocompat : conditions, sessions existantes)\n customFormData: { ...(prev.customFormData ?? {}), ...customFormDataEntries },\n }));\n\n if (sessionId) logFormValidated(sessionId);\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(\"registrationNumber\") && { registrationNumber: form.registrationNumber }),\n ...(requestedFields.has(\"siret\") && !requestedFields.has(\"registrationNumber\") && { registrationNumber: form.siret }),\n ...(requestedFields.has(\"nationalite\") && {\n nationality: form.nationality,\n }),\n ...(requestedFields.has(\"legalRepresentativeNom\") && {\n legalRepresentativeLastName: form.legalRepresentativeLastName,\n }),\n ...(requestedFields.has(\"legalRepresentativePrenom\") && {\n legalRepresentativeFirstName: form.legalRepresentativeFirstName,\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 (sessionId) logFormValidated(sessionId);\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","labelToKey","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","logFormValidated"],"mappings":";;;;;;;;;;;;;;AA6DO,IAAM,gBAAgB,GAAG,UAAC,EAUa,EAAA;QAT5C,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,cAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAClB,SAAS,GAAA,EAAA,CAAA,SAAA;AAED,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,CAA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 +28,7 @@ var list_of_previous_registered_offices = "List of Previous Registered Offices";
|
|
|
28
28
|
var list_of_subscribers = "List of Subscribers";
|
|
29
29
|
var cac_acceptance_letter = "CAC Acceptance Letter";
|
|
30
30
|
var power_of_attorney = "Power of Attorney";
|
|
31
|
+
var delegation_of_power = "Delegation of Power";
|
|
31
32
|
var minutes_of_decision = "Minutes of Decision";
|
|
32
33
|
var articles_of_incorporation = "Articles of Incorporation";
|
|
33
34
|
var updated_articles_of_association = "Updated Articles of Association";
|
|
@@ -687,6 +688,7 @@ var documentsEn = {
|
|
|
687
688
|
list_of_subscribers: list_of_subscribers,
|
|
688
689
|
cac_acceptance_letter: cac_acceptance_letter,
|
|
689
690
|
power_of_attorney: power_of_attorney,
|
|
691
|
+
delegation_of_power: delegation_of_power,
|
|
690
692
|
minutes_of_decision: minutes_of_decision,
|
|
691
693
|
articles_of_incorporation: articles_of_incorporation,
|
|
692
694
|
updated_articles_of_association: updated_articles_of_association,
|
|
@@ -1563,6 +1565,7 @@ exports.declaration_of_no_conviction = declaration_of_no_conviction;
|
|
|
1563
1565
|
exports.deed_of_transfer_of_sale_of_real_estate = deed_of_transfer_of_sale_of_real_estate;
|
|
1564
1566
|
exports.deed_of_transfer_of_share = deed_of_transfer_of_share;
|
|
1565
1567
|
exports.default = documentsEn;
|
|
1568
|
+
exports.delegation_of_power = delegation_of_power;
|
|
1566
1569
|
exports.democratic_republic_of_the_congo_passport_2009 = democratic_republic_of_the_congo_passport_2009;
|
|
1567
1570
|
exports.democratic_republic_of_the_congo_passport_2015 = democratic_republic_of_the_congo_passport_2015;
|
|
1568
1571
|
exports.denmark_diplomatic_passport_2006_ = denmark_diplomatic_passport_2006_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"documents.en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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offices = "Liste des sièges sociaux anterieurs"
|
|
|
28
28
|
var list_of_subscribers = "Liste des souscripteurs";
|
|
29
29
|
var cac_acceptance_letter = "Lettre d'acceptation CAC";
|
|
30
30
|
var power_of_attorney = "Pouvoir";
|
|
31
|
+
var delegation_of_power = "Délégation de pouvoir";
|
|
31
32
|
var minutes_of_decision = "PV de decision";
|
|
32
33
|
var articles_of_incorporation = "Statuts constitutifs";
|
|
33
34
|
var updated_articles_of_association = "Statuts mis à jour";
|
|
@@ -687,6 +688,7 @@ var documentsFr = {
|
|
|
687
688
|
list_of_subscribers: list_of_subscribers,
|
|
688
689
|
cac_acceptance_letter: cac_acceptance_letter,
|
|
689
690
|
power_of_attorney: power_of_attorney,
|
|
691
|
+
delegation_of_power: delegation_of_power,
|
|
690
692
|
minutes_of_decision: minutes_of_decision,
|
|
691
693
|
articles_of_incorporation: articles_of_incorporation,
|
|
692
694
|
updated_articles_of_association: updated_articles_of_association,
|
|
@@ -1563,6 +1565,7 @@ exports.declaration_of_no_conviction = declaration_of_no_conviction;
|
|
|
1563
1565
|
exports.deed_of_transfer_of_sale_of_real_estate = deed_of_transfer_of_sale_of_real_estate;
|
|
1564
1566
|
exports.deed_of_transfer_of_share = deed_of_transfer_of_share;
|
|
1565
1567
|
exports.default = documentsFr;
|
|
1568
|
+
exports.delegation_of_power = delegation_of_power;
|
|
1566
1569
|
exports.democratic_republic_of_the_congo_passport_2009 = democratic_republic_of_the_congo_passport_2009;
|
|
1567
1570
|
exports.democratic_republic_of_the_congo_passport_2015 = democratic_republic_of_the_congo_passport_2015;
|
|
1568
1571
|
exports.denmark_diplomatic_passport_2006_ = denmark_diplomatic_passport_2006_;
|