datakeen-session-react 1.1.160 → 1.1.162
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/document-collection/DocumentError.js +2 -0
- package/dist/cjs/components/document-collection/DocumentError.js.map +1 -1
- package/dist/cjs/components/selfie/SelfieConfirmation.js +1 -1
- package/dist/cjs/components/selfie/SelfieConfirmation.js.map +1 -1
- package/dist/cjs/components/selfie/Video.js +2 -2
- package/dist/cjs/components/selfie/Video.js.map +1 -1
- package/dist/cjs/components/selfie/hooks/useVideoRecorderStyles.js +2 -2
- package/dist/cjs/components/selfie/hooks/useVideoRecorderStyles.js.map +1 -1
- package/dist/cjs/components/selfie/selfie-flow/SelfieFlow.js +7 -3
- package/dist/cjs/components/selfie/selfie-flow/SelfieFlow.js.map +1 -1
- package/dist/cjs/components/selfie/selfie-flow/SelfieProcessing.js +2 -7
- package/dist/cjs/components/selfie/selfie-flow/SelfieProcessing.js.map +1 -1
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js +2 -2
- package/dist/cjs/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/dist/cjs/components/session/DocumentCheck.js +2 -2
- package/dist/cjs/components/session/DocumentCheck.js.map +1 -1
- package/dist/cjs/components/session/Selfie.js +7 -5
- package/dist/cjs/components/session/Selfie.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/CustomFormFields.js +42 -45
- package/dist/cjs/components/session/UserInputForm/CustomFormFields.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/DatePickerField.js +154 -0
- package/dist/cjs/components/session/UserInputForm/DatePickerField.js.map +1 -0
- package/dist/cjs/components/session/UserInputForm.js +2 -2
- package/dist/cjs/components/session/UserInputForm.js.map +1 -1
- package/dist/cjs/components/signature-electronic/DocusealSignature.js +2 -1
- package/dist/cjs/components/signature-electronic/DocusealSignature.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js +2 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronicIntroduction.js +2 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronicIntroduction.js.map +1 -1
- package/dist/cjs/components/start-flow/CGU.js +5 -2
- package/dist/cjs/components/start-flow/CGU.js.map +1 -1
- package/dist/cjs/components/start-flow/Start.js +5 -2
- package/dist/cjs/components/start-flow/Start.js.map +1 -1
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js +2 -1
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/cjs/components/ui/Button.js +5 -3
- package/dist/cjs/components/ui/Button.js.map +1 -1
- package/dist/cjs/hooks/useUserInputForm.js +90 -29
- package/dist/cjs/hooks/useUserInputForm.js.map +1 -1
- package/dist/cjs/i18n/en.json.js +19 -5
- package/dist/cjs/i18n/en.json.js.map +1 -1
- package/dist/cjs/i18n/fr.json.js +19 -5
- package/dist/cjs/i18n/fr.json.js.map +1 -1
- package/dist/cjs/index.css.js +1 -1
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +13 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +67 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js +62 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +25 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +106 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +16 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js +192 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js +137 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US.js +31 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js +16 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js +170 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js +138 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/cjs/node_modules/date-fns/locale/fr.js +31 -0
- package/dist/cjs/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/cjs/services/documentTemplate.js +1 -1
- package/dist/cjs/services/documentTemplate.js.map +1 -1
- package/dist/cjs/types/session.js +6 -0
- package/dist/cjs/types/session.js.map +1 -0
- package/dist/cjs/utils/customFieldValidation.js +62 -0
- package/dist/cjs/utils/customFieldValidation.js.map +1 -0
- package/dist/esm/components/document-collection/DocumentError.js +2 -0
- package/dist/esm/components/document-collection/DocumentError.js.map +1 -1
- package/dist/esm/components/selfie/SelfieConfirmation.js +1 -1
- package/dist/esm/components/selfie/SelfieConfirmation.js.map +1 -1
- package/dist/esm/components/selfie/Video.js +2 -2
- package/dist/esm/components/selfie/Video.js.map +1 -1
- package/dist/esm/components/selfie/hooks/useVideoRecorderStyles.js +2 -2
- package/dist/esm/components/selfie/hooks/useVideoRecorderStyles.js.map +1 -1
- package/dist/esm/components/selfie/selfie-flow/SelfieFlow.js +7 -3
- package/dist/esm/components/selfie/selfie-flow/SelfieFlow.js.map +1 -1
- package/dist/esm/components/selfie/selfie-flow/SelfieProcessing.js +2 -7
- package/dist/esm/components/selfie/selfie-flow/SelfieProcessing.js.map +1 -1
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js +2 -2
- package/dist/esm/components/selfie/selfie-flow/SelfieRecorder.js.map +1 -1
- package/dist/esm/components/session/DocumentCheck.js +2 -2
- package/dist/esm/components/session/DocumentCheck.js.map +1 -1
- package/dist/esm/components/session/Selfie.js +7 -5
- package/dist/esm/components/session/Selfie.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/CustomFormFields.js +42 -45
- package/dist/esm/components/session/UserInputForm/CustomFormFields.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/DatePickerField.js +132 -0
- package/dist/esm/components/session/UserInputForm/DatePickerField.js.map +1 -0
- package/dist/esm/components/session/UserInputForm.js +2 -2
- package/dist/esm/components/session/UserInputForm.js.map +1 -1
- package/dist/esm/components/signature-electronic/DocusealSignature.js +2 -1
- package/dist/esm/components/signature-electronic/DocusealSignature.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js +2 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronicIntroduction.js +2 -1
- package/dist/esm/components/signature-electronic/SignatureElectronicIntroduction.js.map +1 -1
- package/dist/esm/components/start-flow/CGU.js +5 -2
- package/dist/esm/components/start-flow/CGU.js.map +1 -1
- package/dist/esm/components/start-flow/Start.js +5 -2
- package/dist/esm/components/start-flow/Start.js.map +1 -1
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js +2 -1
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/esm/components/ui/Button.js +5 -3
- package/dist/esm/components/ui/Button.js.map +1 -1
- package/dist/esm/components/ui/SelectComponent.js +3 -3
- package/dist/esm/components/ui/SelectComponent.js.map +1 -1
- package/dist/esm/hooks/useUserInputForm.js +92 -31
- package/dist/esm/hooks/useUserInputForm.js.map +1 -1
- package/dist/esm/i18n/en.json.js +19 -5
- package/dist/esm/i18n/en.json.js.map +1 -1
- package/dist/esm/i18n/fr.json.js +19 -5
- package/dist/esm/i18n/fr.json.js.map +1 -1
- package/dist/esm/index.css.js +1 -1
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +11 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +65 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js +60 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +23 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +104 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js +42 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +14 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js +190 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js +135 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/en-US.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js +103 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js +42 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js +14 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js +168 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js +136 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/esm/node_modules/date-fns/locale/fr.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/esm/providers/I18nProvider.js +2 -2
- package/dist/esm/providers/I18nProvider.js.map +1 -1
- package/dist/esm/services/documentTemplate.js +1 -1
- package/dist/esm/services/documentTemplate.js.map +1 -1
- package/dist/esm/types/session.js +4 -0
- package/dist/esm/types/session.js.map +1 -0
- package/dist/esm/utils/customFieldValidation.js +56 -0
- package/dist/esm/utils/customFieldValidation.js.map +1 -0
- package/jest.config.js +1 -0
- package/package.json +4 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from '../node_modules/tslib/tslib.es6.js';
|
|
1
|
+
import { __assign, __rest, __awaiter, __generator } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { useMemo, useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { DEFAULT_FIELDS, FALLBACK_ADDRESS_SUGGESTIONS, GEOCODING_AUTOCOMPLETE_ENDPOINT } from '../constants/userInputForm.js';
|
|
4
4
|
import { API_BASE_URL } from '../config/env.js';
|
|
5
5
|
import { resolveInformationType, parseBirthDate, checkIsMajor } from '../utils/userInputForm.js';
|
|
6
|
-
import { getListFieldMinRows, countNonEmptyListRows } from '../utils/listFieldUtils.js';
|
|
6
|
+
import { getListFieldMinRows, normalizeListColumns, countNonEmptyListRows } from '../utils/listFieldUtils.js';
|
|
7
|
+
import { cellErrorKey, isRegexMatch, isDateValid, isEmailValid } from '../utils/customFieldValidation.js';
|
|
8
|
+
import { DEFAULT_DATE_DISPLAY_FORMAT } from '../types/session.js';
|
|
7
9
|
import { useI18n } from './useI18n.js';
|
|
8
10
|
|
|
9
11
|
var useUserInputForm = function (_a) {
|
|
@@ -71,8 +73,9 @@ var useUserInputForm = function (_a) {
|
|
|
71
73
|
return initial;
|
|
72
74
|
}), customFormData = _d[0], setCustomFormData = _d[1];
|
|
73
75
|
var _e = useState({}), customFormErrors = _e[0], setCustomFormErrors = _e[1];
|
|
74
|
-
var _f = useState(
|
|
75
|
-
var _g = useState(
|
|
76
|
+
var _f = useState({}), customFormCellErrors = _f[0], setCustomFormCellErrors = _f[1];
|
|
77
|
+
var _g = useState([]), addressSuggestions = _g[0], setAddressSuggestions = _g[1];
|
|
78
|
+
var _h = useState(false), showSuggestions = _h[0], setShowSuggestions = _h[1];
|
|
76
79
|
var isFirstRender = useRef(true);
|
|
77
80
|
var hideSuggestionTimeout = useRef(null);
|
|
78
81
|
var addressRequestState = useRef({
|
|
@@ -366,15 +369,71 @@ var useUserInputForm = function (_a) {
|
|
|
366
369
|
var validateCustomForm = function () {
|
|
367
370
|
var _a;
|
|
368
371
|
var errors = {};
|
|
372
|
+
var cellErrors = {};
|
|
369
373
|
var hasError = false;
|
|
370
374
|
(_a = node.customFields) === null || _a === void 0 ? void 0 : _a.forEach(function (field) {
|
|
375
|
+
var _a, _b;
|
|
371
376
|
var value = customFormData[field.id];
|
|
372
377
|
if (field.valueType === "list") {
|
|
373
378
|
var rows = Array.isArray(value) ? value : [];
|
|
374
379
|
var minRows = getListFieldMinRows(field);
|
|
380
|
+
var columns_1 = normalizeListColumns(field.listColumns);
|
|
381
|
+
var fieldCellErrors_1 = {};
|
|
382
|
+
var listFieldInvalid_1 = false;
|
|
375
383
|
if (field.required && countNonEmptyListRows(rows) < minRows) {
|
|
376
384
|
errors[field.id] = true;
|
|
377
385
|
hasError = true;
|
|
386
|
+
listFieldInvalid_1 = true;
|
|
387
|
+
}
|
|
388
|
+
rows.forEach(function (row, rowIndex) {
|
|
389
|
+
var rowIsEmpty = columns_1.every(function (col) { var _a; return !String((_a = row === null || row === void 0 ? void 0 : row[col.label]) !== null && _a !== void 0 ? _a : "").trim(); });
|
|
390
|
+
if (rowIsEmpty && !field.required)
|
|
391
|
+
return;
|
|
392
|
+
columns_1.forEach(function (col) {
|
|
393
|
+
var _a, _b;
|
|
394
|
+
var cellValue = String((_a = row === null || row === void 0 ? void 0 : row[col.label]) !== null && _a !== void 0 ? _a : "").trim();
|
|
395
|
+
var key = cellErrorKey(rowIndex, col.label);
|
|
396
|
+
if (!cellValue) {
|
|
397
|
+
if (field.required && !rowIsEmpty) {
|
|
398
|
+
fieldCellErrors_1[key] = t("custom_form.required_field");
|
|
399
|
+
listFieldInvalid_1 = true;
|
|
400
|
+
}
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
switch (col.type) {
|
|
404
|
+
case "email":
|
|
405
|
+
if (!isEmailValid(cellValue)) {
|
|
406
|
+
fieldCellErrors_1[key] = t("custom_form.invalid_email");
|
|
407
|
+
listFieldInvalid_1 = true;
|
|
408
|
+
}
|
|
409
|
+
break;
|
|
410
|
+
case "date": {
|
|
411
|
+
var fmt = (_b = col.dateFormat) !== null && _b !== void 0 ? _b : DEFAULT_DATE_DISPLAY_FORMAT;
|
|
412
|
+
if (!isDateValid(cellValue, fmt)) {
|
|
413
|
+
fieldCellErrors_1[key] = t("custom_form.invalid_date", {
|
|
414
|
+
format: fmt,
|
|
415
|
+
});
|
|
416
|
+
listFieldInvalid_1 = true;
|
|
417
|
+
}
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
case "text":
|
|
421
|
+
if (col.regex && !isRegexMatch(cellValue, col.regex)) {
|
|
422
|
+
fieldCellErrors_1[key] =
|
|
423
|
+
col.regexErrorMessage ||
|
|
424
|
+
t("custom_form.invalid_format");
|
|
425
|
+
listFieldInvalid_1 = true;
|
|
426
|
+
}
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
if (Object.keys(fieldCellErrors_1).length > 0) {
|
|
432
|
+
cellErrors[field.id] = fieldCellErrors_1;
|
|
433
|
+
}
|
|
434
|
+
if (listFieldInvalid_1) {
|
|
435
|
+
errors[field.id] = (_a = errors[field.id]) !== null && _a !== void 0 ? _a : true;
|
|
436
|
+
hasError = true;
|
|
378
437
|
}
|
|
379
438
|
return;
|
|
380
439
|
}
|
|
@@ -393,35 +452,29 @@ var useUserInputForm = function (_a) {
|
|
|
393
452
|
hasError = true;
|
|
394
453
|
}
|
|
395
454
|
break;
|
|
396
|
-
case "
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
month < 1 ||
|
|
417
|
-
month > 12 ||
|
|
418
|
-
day < 1 ||
|
|
419
|
-
day > 31) {
|
|
420
|
-
errors[field.id] = true;
|
|
421
|
-
hasError = true;
|
|
422
|
-
}
|
|
455
|
+
case "email":
|
|
456
|
+
if (!isEmailValid(String(value))) {
|
|
457
|
+
errors[field.id] = t("custom_form.invalid_email");
|
|
458
|
+
hasError = true;
|
|
459
|
+
}
|
|
460
|
+
break;
|
|
461
|
+
case "text":
|
|
462
|
+
if (field.regex && !isRegexMatch(String(value), field.regex)) {
|
|
463
|
+
errors[field.id] =
|
|
464
|
+
field.regexErrorMessage || t("custom_form.invalid_format");
|
|
465
|
+
hasError = true;
|
|
466
|
+
}
|
|
467
|
+
break;
|
|
468
|
+
case "date": {
|
|
469
|
+
var fmt = (_b = field.dateFormat) !== null && _b !== void 0 ? _b : DEFAULT_DATE_DISPLAY_FORMAT;
|
|
470
|
+
if (!isDateValid(String(value), fmt)) {
|
|
471
|
+
errors[field.id] = t("custom_form.invalid_date", {
|
|
472
|
+
format: fmt,
|
|
473
|
+
});
|
|
474
|
+
hasError = true;
|
|
423
475
|
}
|
|
424
476
|
break;
|
|
477
|
+
}
|
|
425
478
|
case "address":
|
|
426
479
|
// Validate address object if required
|
|
427
480
|
if (field.required && typeof value === "object") {
|
|
@@ -439,6 +492,7 @@ var useUserInputForm = function (_a) {
|
|
|
439
492
|
}
|
|
440
493
|
});
|
|
441
494
|
setCustomFormErrors(errors);
|
|
495
|
+
setCustomFormCellErrors(cellErrors);
|
|
442
496
|
return !hasError;
|
|
443
497
|
};
|
|
444
498
|
var handleCustomFieldChange = function (fieldId, value) {
|
|
@@ -450,6 +504,12 @@ var useUserInputForm = function (_a) {
|
|
|
450
504
|
var _a;
|
|
451
505
|
return (__assign(__assign({}, prev), (_a = {}, _a[fieldId] = false, _a)));
|
|
452
506
|
});
|
|
507
|
+
setCustomFormCellErrors(function (prev) {
|
|
508
|
+
if (!(fieldId in prev))
|
|
509
|
+
return prev;
|
|
510
|
+
var _a = prev, _b = fieldId; _a[_b]; var rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
511
|
+
return rest;
|
|
512
|
+
});
|
|
453
513
|
};
|
|
454
514
|
var goOnNextStep = function () {
|
|
455
515
|
// Handle custom form validation and submission
|
|
@@ -523,6 +583,7 @@ var useUserInputForm = function (_a) {
|
|
|
523
583
|
goOnPreviousStep: goOnPreviousStep,
|
|
524
584
|
customFormData: customFormData,
|
|
525
585
|
customFormErrors: customFormErrors,
|
|
586
|
+
customFormCellErrors: customFormCellErrors,
|
|
526
587
|
handleCustomFieldChange: handleCustomFieldChange,
|
|
527
588
|
};
|
|
528
589
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserInputForm.js","sources":["../../../../src/hooks/useUserInputForm.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { UserInputFormProps } from \"../types/userInput\";\nimport type {\n AddressSuggestion,\n InformationType,\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../types/userInputForm\";\nimport {\n DEFAULT_FIELDS,\n FALLBACK_ADDRESS_SUGGESTIONS,\n GEOCODING_AUTOCOMPLETE_ENDPOINT,\n} from \"../constants/userInputForm\";\nimport { API_BASE_URL } from \"../config/env\";\nimport {\n checkIsMajor,\n parseBirthDate,\n resolveInformationType,\n} from \"../utils/userInputForm\";\nimport {\n countNonEmptyListRows,\n getListFieldMinRows,\n} from \"../utils/listFieldUtils\";\nimport { useI18n } from \"./useI18n\";\n\ninterface UseUserInputFormResult {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n informationType: InformationType;\n requestedFields: RequestedFields;\n pageTitle: string;\n pageDescription: string;\n addressSuggestions: AddressSuggestion[];\n showSuggestions: boolean;\n handleFieldChange: (key: keyof UserInputFormState, value: string) => void;\n handleAddressChange: (value: string) => void;\n handleAddressFocus: () => void;\n handleAddressBlur: () => void;\n applyAddressSuggestion: (suggestion: AddressSuggestion) => void;\n goOnNextStep: () => void;\n goOnPreviousStep: () => void;\n // Custom form fields\n customFormData: Record<string, any>;\n customFormErrors: Record<string, boolean>;\n handleCustomFieldChange: (fieldId: string, value: any) => void;\n}\n\nexport const useUserInputForm = ({\n stepObject,\n setUserInput,\n initialUserInput,\n node,\n template,\n contactInfo,\n setContactInfo,\n onContinueCallback,\n}: UserInputFormProps): UseUserInputFormResult => {\n const { setStep, goBack, goToNextStep, step } = stepObject;\n const { t } = useI18n();\n\n const informationType = useMemo<InformationType>(() => {\n const resolved = resolveInformationType(\n node.informationType as string,\n \"identity\",\n );\n console.log(\"🔍 [useUserInputForm] Resolving informationType:\", {\n nodeInformationType: node.informationType,\n resolved,\n hasCustomFields: !!node.customFields,\n customFieldsCount: node.customFields?.length,\n });\n return resolved;\n }, [node.informationType, node.customFields]);\n\n const requestedFields = useMemo<RequestedFields>(() => {\n const defaults = DEFAULT_FIELDS[informationType] || [];\n const optional =\n node.optionalFields && node.optionalFields.length > 0\n ? node.optionalFields\n : defaults;\n const merged = new Set<string>(optional);\n\n if (node.requiredFields) {\n node.requiredFields.forEach((field) => merged.add(field));\n }\n\n return merged;\n }, [node.optionalFields, node.requiredFields, informationType]);\n\n const birthDateParts = useMemo(\n () => parseBirthDate(initialUserInput?.birthDate || \"\"),\n [initialUserInput?.birthDate],\n );\n\n const [form, setForm] = useState<UserInputFormState>({\n lastName: initialUserInput?.lastName || \"\",\n firstName: initialUserInput?.firstName || \"\",\n birthDate: initialUserInput?.birthDate || \"\",\n day: birthDateParts.day,\n month: birthDateParts.month,\n year: birthDateParts.year,\n email: initialUserInput?.email || contactInfo?.email || \"\",\n phoneNumber:\n initialUserInput?.phoneNumber || contactInfo?.phoneNumber || \"\",\n sms: initialUserInput?.sms || \"\",\n addressLine1: initialUserInput?.addressLine1 || \"\",\n addressLine2: initialUserInput?.addressLine2 || \"\",\n postalCode: initialUserInput?.postalCode || \"\",\n city: initialUserInput?.city || \"\",\n countryCode: initialUserInput?.countryCode || \"\",\n nationality: initialUserInput?.nationality || \"\",\n companyName: initialUserInput?.companyName || \"\",\n siret: initialUserInput?.siret || \"\",\n tva: initialUserInput?.tva || \"\",\n });\n\n const [errors, setErrors] = useState<UserInputFormErrors>({});\n\n // Custom form state\n const [customFormData, setCustomFormData] = useState<Record<string, any>>(\n () => {\n if (informationType !== \"custom\" || !node.customFields) return {};\n\n const initial: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const savedValue = initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n initial[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n\n initial[field.id] = savedValue || \"\";\n });\n return initial;\n },\n );\n const [customFormErrors, setCustomFormErrors] = useState<\n Record<string, boolean>\n >({});\n\n const [addressSuggestions, setAddressSuggestions] = useState<\n AddressSuggestion[]\n >([]);\n const [showSuggestions, setShowSuggestions] = useState(false);\n const isFirstRender = useRef(true);\n const hideSuggestionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const addressRequestState = useRef<{\n debounce: ReturnType<typeof setTimeout> | null;\n controller: AbortController | null;\n }>({\n debounce: null,\n controller: null,\n });\n\n const formTitles = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.titles.identity\"),\n \"identity-legal\": t(\"user_input_form.titles.identity_legal\"),\n contact: t(\"user_input_form.titles.contact\"),\n address: t(\"user_input_form.titles.address\"),\n nationality: t(\"user_input_form.titles.nationality\"),\n custom: t(\"user_input_form.titles.custom\"),\n }),\n [t],\n );\n\n const formDescriptions = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.descriptions.identity\"),\n \"identity-legal\": t(\"user_input_form.descriptions.identity_legal\"),\n contact: t(\"user_input_form.descriptions.contact\"),\n address: t(\"user_input_form.descriptions.address\"),\n nationality: t(\"user_input_form.descriptions.nationality\"),\n custom: t(\"user_input_form.descriptions.custom\"),\n }),\n [t],\n );\n\n const applyAddressSuggestion = (suggestion: AddressSuggestion) => {\n const normalizedCountry =\n suggestion.countryCode?.toUpperCase() || suggestion.country || \"\";\n\n setForm((previous) => ({\n ...previous,\n addressLine1: suggestion.addressLine1 || suggestion.label,\n postalCode: suggestion.postalCode || previous.postalCode,\n city: suggestion.city || previous.city,\n countryCode: normalizedCountry || previous.countryCode,\n }));\n setErrors((previous) => ({\n ...previous,\n addressLine1: false,\n postalCode: false,\n city: false,\n country: false,\n }));\n setShowSuggestions(false);\n setAddressSuggestions([]);\n };\n\n const mapGeoapifyFeature = (feature: any): AddressSuggestion | null => {\n if (!feature || !feature.properties) {\n return null;\n }\n\n const { properties } = feature;\n const label: string =\n properties.formatted ||\n properties.address_line1 ||\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n if (!label) {\n return null;\n }\n\n const addressLine1 =\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim() ||\n properties.address_line1 ||\n label;\n\n const city =\n properties.city ||\n properties.town ||\n properties.village ||\n properties.state ||\n \"\";\n\n return {\n id:\n (properties.place_id && String(properties.place_id)) ||\n feature.id ||\n `${properties.lon ?? \"\"}-${properties.lat ?? \"\"}-${label}`,\n label,\n addressLine1,\n postalCode: properties.postcode || \"\",\n city,\n country: properties.country || \"\",\n countryCode: properties.country_code || undefined,\n };\n };\n\n const requestAddressSuggestions = (\n query: string,\n { autoComplete }: { autoComplete: boolean },\n ) => {\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n addressRequestState.current.debounce = null;\n }\n\n if (query.trim().length < 3) {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n addressRequestState.current.controller = null;\n }\n setAddressSuggestions([]);\n setShowSuggestions(false);\n return;\n }\n\n addressRequestState.current.debounce = setTimeout(async () => {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n\n const controller = new AbortController();\n addressRequestState.current.controller = controller;\n\n try {\n const searchParams = new URLSearchParams({\n text: query,\n lang: \"fr\",\n });\n\n const response = await fetch(\n `${API_BASE_URL}${GEOCODING_AUTOCOMPLETE_ENDPOINT}?${searchParams.toString()}`,\n { signal: controller.signal },\n );\n\n if (!response.ok) {\n throw new Error(\n `Geocoding request failed with status ${response.status}`,\n );\n }\n\n const payload = await response.json();\n\n const suggestions: AddressSuggestion[] = Array.isArray(\n payload?.features,\n )\n ? payload.features\n .map((feature: any) => mapGeoapifyFeature(feature))\n .filter(\n (\n suggestion: AddressSuggestion | null,\n ): suggestion is AddressSuggestion => Boolean(suggestion),\n )\n : [];\n\n setAddressSuggestions(suggestions);\n setShowSuggestions(suggestions.length > 0);\n\n if (autoComplete && suggestions.length === 1) {\n const single = suggestions[0];\n const normalizedQuery = query.trim().toLowerCase();\n if (\n normalizedQuery.length >= 6 &&\n single.label.toLowerCase().startsWith(normalizedQuery)\n ) {\n applyAddressSuggestion(single);\n }\n }\n } catch (error) {\n if ((error as Error).name === \"AbortError\") {\n return;\n }\n\n const fallback = FALLBACK_ADDRESS_SUGGESTIONS.filter((suggestion) =>\n suggestion.label.toLowerCase().includes(query.toLowerCase()),\n );\n setAddressSuggestions(fallback);\n setShowSuggestions(fallback.length > 0);\n } finally {\n addressRequestState.current.controller = null;\n }\n }, 250);\n };\n\n useEffect(() => {\n if (!initialUserInput) {\n return;\n }\n\n if (\n isFirstRender.current ||\n (!form.firstName &&\n !form.lastName &&\n !form.email &&\n !form.phoneNumber &&\n !form.companyName)\n ) {\n const nextBirthParts = parseBirthDate(initialUserInput.birthDate || \"\");\n setForm((previous) => ({\n ...previous,\n lastName: initialUserInput.lastName || previous.lastName,\n firstName: initialUserInput.firstName || previous.firstName,\n birthDate: initialUserInput.birthDate || previous.birthDate,\n day: nextBirthParts.day,\n month: nextBirthParts.month,\n year: nextBirthParts.year,\n email: initialUserInput.email || previous.email,\n phoneNumber: initialUserInput.phoneNumber || previous.phoneNumber,\n sms: initialUserInput.sms || previous.sms,\n addressLine1: initialUserInput.addressLine1 || previous.addressLine1,\n addressLine2: initialUserInput.addressLine2 || previous.addressLine2,\n postalCode: initialUserInput.postalCode || previous.postalCode,\n city: initialUserInput.city || previous.city,\n countryCode: initialUserInput.countryCode || previous.countryCode,\n nationality: initialUserInput.nationality || previous.nationality,\n companyName: initialUserInput.companyName || previous.companyName,\n siret: initialUserInput.siret || previous.siret,\n tva: initialUserInput.tva || previous.tva,\n }));\n\n isFirstRender.current = false;\n }\n }, [\n initialUserInput,\n form.firstName,\n form.lastName,\n form.email,\n form.phoneNumber,\n form.companyName,\n ]);\n\n useEffect(() => {\n return () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n }\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n };\n }, []);\n\n const handleFieldChange = (key: keyof UserInputFormState, value: string) => {\n setErrors((previous) => ({\n ...previous,\n [key]: false,\n notMajor: false,\n }));\n\n setForm((previous) => {\n const next = { ...previous, [key]: value };\n if (key === \"day\" || key === \"month\" || key === \"year\") {\n const { day, month, year } = next;\n if (day && month && year) {\n const paddedDay = day.padStart(2, \"0\");\n const paddedMonth = month.padStart(2, \"0\");\n next.birthDate = `${paddedDay}-${paddedMonth}-${year}`;\n } else {\n next.birthDate = \"\";\n }\n }\n return next;\n });\n };\n\n const handleAddressChange = (value: string) => {\n handleFieldChange(\"addressLine1\", value);\n requestAddressSuggestions(value, { autoComplete: true });\n };\n\n const handleAddressFocus = () => {\n requestAddressSuggestions(form.addressLine1, { autoComplete: false });\n };\n\n const handleAddressBlur = () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n hideSuggestionTimeout.current = setTimeout(() => {\n setShowSuggestions(false);\n hideSuggestionTimeout.current = null;\n }, 150);\n };\n\n const validateForm = () => {\n const nextErrors: UserInputFormErrors = {};\n let hasError = false;\n\n const markError = (key: string) => {\n nextErrors[key] = true;\n hasError = true;\n };\n\n if (informationType === \"identity\") {\n if (requestedFields.has(\"prenom\") && !form.firstName) {\n markError(\"firstName\");\n }\n if (requestedFields.has(\"nom\") && !form.lastName) {\n markError(\"lastName\");\n }\n if (requestedFields.has(\"date_naissance\")) {\n if (!form.birthDate) {\n markError(\"birthDate\");\n } else if (!checkIsMajor(form.birthDate)) {\n nextErrors.notMajor = true;\n hasError = true;\n }\n }\n }\n\n if (informationType === \"identity-legal\") {\n if (requestedFields.has(\"nom\") && !form.companyName) {\n markError(\"companyName\");\n }\n if (requestedFields.has(\"siret\") && !form.siret) {\n markError(\"siret\");\n }\n if (requestedFields.has(\"tva\") && !form.tva) {\n markError(\"tva\");\n }\n }\n\n if (informationType === \"contact\") {\n if (requestedFields.has(\"email\")) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!form.email || !emailRegex.test(form.email)) {\n markError(\"email\");\n }\n }\n if (requestedFields.has(\"sms\")) {\n if (\n !form.phoneNumber ||\n form.phoneNumber.replace(/\\D/g, \"\").length < 6\n ) {\n markError(\"phoneNumber\");\n }\n }\n }\n\n if (\n (informationType === \"address\" || informationType === \"identity-legal\") &&\n requestedFields.has(\"adresse\")\n ) {\n if (!form.addressLine1) {\n markError(\"addressLine1\");\n }\n if (!form.postalCode) {\n markError(\"postalCode\");\n }\n if (!form.city) {\n markError(\"city\");\n }\n if (!form.countryCode) {\n markError(\"country\");\n }\n }\n\n if (\n informationType === \"nationality\" &&\n requestedFields.has(\"nationalite\")\n ) {\n if (!form.nationality) {\n markError(\"nationality\");\n }\n }\n\n setErrors(nextErrors);\n return !hasError;\n };\n\n const validateCustomForm = () => {\n const errors: Record<string, boolean> = {};\n let hasError = false;\n\n node.customFields?.forEach((field) => {\n const value = customFormData[field.id];\n\n if (field.valueType === \"list\") {\n const rows = Array.isArray(value) ? value : [];\n const minRows = getListFieldMinRows(field);\n\n if (field.required && countNonEmptyListRows(rows) < minRows) {\n errors[field.id] = true;\n hasError = true;\n }\n return;\n }\n\n // Check if required field is missing\n if (field.required && !value) {\n errors[field.id] = true;\n hasError = true;\n return;\n }\n\n // Type-specific validation\n if (value) {\n switch (field.valueType) {\n case \"number\":\n if (isNaN(Number(value))) {\n errors[field.id] = true;\n hasError = true;\n }\n break;\n\n case \"date\":\n // Date format: DD-MM-YYYY\n // For required dates, all parts must be filled\n if (field.required) {\n const dateParts = value.split(\"-\");\n if (\n dateParts.length !== 3 ||\n !dateParts[0] ||\n !dateParts[1] ||\n !dateParts[2]\n ) {\n errors[field.id] = true;\n hasError = true;\n break;\n }\n\n // Validate month and day ranges\n const day = parseInt(dateParts[0], 10);\n const month = parseInt(dateParts[1], 10);\n const year = parseInt(dateParts[2], 10);\n\n if (\n isNaN(day) ||\n isNaN(month) ||\n isNaN(year) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n\n case \"address\":\n // Validate address object if required\n if (field.required && typeof value === \"object\") {\n const addressValue = value as {\n addressLine1?: string;\n postalCode?: string;\n city?: string;\n countryCode?: string;\n };\n if (\n !addressValue.addressLine1 ||\n !addressValue.postalCode ||\n !addressValue.city ||\n !addressValue.countryCode\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n }\n }\n });\n\n setCustomFormErrors(errors);\n return !hasError;\n };\n\n const handleCustomFieldChange = (fieldId: string, value: any) => {\n setCustomFormData((prev) => ({ ...prev, [fieldId]: value }));\n setCustomFormErrors((prev) => ({ ...prev, [fieldId]: false }));\n };\n\n const goOnNextStep = () => {\n // Handle custom form validation and submission\n if (informationType === \"custom\") {\n if (!validateCustomForm()) {\n return;\n }\n\n setUserInput((prev) => ({\n ...prev,\n customFormData: { ...(prev.customFormData ?? {}), ...customFormData },\n }));\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n return;\n }\n\n // Standard form validation\n if (!validateForm()) {\n return;\n }\n\n setUserInput((previous) => ({\n ...previous,\n ...(requestedFields.has(\"nom\") && {\n ...(informationType === \"identity-legal\"\n ? { companyName: form.companyName }\n : { lastName: form.lastName }),\n }),\n ...(requestedFields.has(\"prenom\") && { firstName: form.firstName }),\n ...(requestedFields.has(\"date_naissance\") && {\n birthDate: form.birthDate,\n }),\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && {\n phoneNumber: form.phoneNumber,\n sms: form.phoneNumber,\n }),\n ...(requestedFields.has(\"adresse\") && {\n addressLine1: form.addressLine1,\n addressLine2: form.addressLine2,\n postalCode: form.postalCode,\n city: form.city,\n countryCode: form.countryCode,\n }),\n ...(requestedFields.has(\"siret\") && { siret: form.siret }),\n ...(requestedFields.has(\"tva\") && { tva: form.tva }),\n ...(requestedFields.has(\"nationalite\") && {\n nationality: form.nationality,\n }),\n }));\n\n if (informationType === \"contact\" && setContactInfo) {\n setContactInfo((previous) => ({\n ...previous,\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && { phoneNumber: form.phoneNumber }),\n }));\n }\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n };\n\n const goOnPreviousStep = () => {\n console.log(\"[goOnPreviousStep] called — step:\", step, \"canGoBack:\", stepObject.canGoBack);\n goBack();\n };\n\n const pageTitle = node.pageTitle || formTitles[informationType];\n\n const pageDescription =\n node.pageDescription || formDescriptions[informationType];\n\n return {\n form,\n errors,\n informationType,\n requestedFields,\n pageTitle,\n pageDescription,\n addressSuggestions,\n showSuggestions,\n handleFieldChange,\n handleAddressChange,\n handleAddressFocus,\n handleAddressBlur,\n applyAddressSuggestion,\n goOnNextStep,\n goOnPreviousStep,\n customFormData,\n customFormErrors,\n handleCustomFieldChange,\n };\n};\n"],"names":[],"mappings":";;;;;;;;AAgDO,IAAM,gBAAgB,GAAG,UAAC,EASZ,EAAA;QARnB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,IAAI,GAAA,EAAA,CAA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I,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,uBAAuB,EAAA,uBAAA;KACxB;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"useUserInputForm.js","sources":["../../../../src/hooks/useUserInputForm.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { UserInputFormProps } from \"../types/userInput\";\nimport type {\n AddressSuggestion,\n InformationType,\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../types/userInputForm\";\nimport {\n DEFAULT_FIELDS,\n FALLBACK_ADDRESS_SUGGESTIONS,\n GEOCODING_AUTOCOMPLETE_ENDPOINT,\n} from \"../constants/userInputForm\";\nimport { API_BASE_URL } from \"../config/env\";\nimport {\n checkIsMajor,\n parseBirthDate,\n resolveInformationType,\n} from \"../utils/userInputForm\";\nimport {\n countNonEmptyListRows,\n getListFieldMinRows,\n normalizeListColumns,\n} from \"../utils/listFieldUtils\";\nimport {\n cellErrorKey,\n isDateValid,\n isEmailValid,\n isRegexMatch,\n} from \"../utils/customFieldValidation\";\nimport { DEFAULT_DATE_DISPLAY_FORMAT } from \"../types/session\";\nimport { useI18n } from \"./useI18n\";\n\nexport type CustomFieldErrorValue = string | boolean;\n\ninterface UseUserInputFormResult {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n informationType: InformationType;\n requestedFields: RequestedFields;\n pageTitle: string;\n pageDescription: string;\n addressSuggestions: AddressSuggestion[];\n showSuggestions: boolean;\n handleFieldChange: (key: keyof UserInputFormState, value: string) => void;\n handleAddressChange: (value: string) => void;\n handleAddressFocus: () => void;\n handleAddressBlur: () => void;\n applyAddressSuggestion: (suggestion: AddressSuggestion) => void;\n goOnNextStep: () => void;\n goOnPreviousStep: () => void;\n // Custom form fields\n customFormData: Record<string, any>;\n customFormErrors: Record<string, CustomFieldErrorValue>;\n customFormCellErrors: Record<string, Record<string, CustomFieldErrorValue>>;\n handleCustomFieldChange: (fieldId: string, value: any) => void;\n}\n\nexport const useUserInputForm = ({\n stepObject,\n setUserInput,\n initialUserInput,\n node,\n template,\n contactInfo,\n setContactInfo,\n onContinueCallback,\n}: UserInputFormProps): UseUserInputFormResult => {\n const { setStep, goBack, goToNextStep, step } = stepObject;\n const { t } = useI18n();\n\n const informationType = useMemo<InformationType>(() => {\n const resolved = resolveInformationType(\n node.informationType as string,\n \"identity\",\n );\n console.log(\"🔍 [useUserInputForm] Resolving informationType:\", {\n nodeInformationType: node.informationType,\n resolved,\n hasCustomFields: !!node.customFields,\n customFieldsCount: node.customFields?.length,\n });\n return resolved;\n }, [node.informationType, node.customFields]);\n\n const requestedFields = useMemo<RequestedFields>(() => {\n const defaults = DEFAULT_FIELDS[informationType] || [];\n const optional =\n node.optionalFields && node.optionalFields.length > 0\n ? node.optionalFields\n : defaults;\n const merged = new Set<string>(optional);\n\n if (node.requiredFields) {\n node.requiredFields.forEach((field) => merged.add(field));\n }\n\n return merged;\n }, [node.optionalFields, node.requiredFields, informationType]);\n\n const birthDateParts = useMemo(\n () => parseBirthDate(initialUserInput?.birthDate || \"\"),\n [initialUserInput?.birthDate],\n );\n\n const [form, setForm] = useState<UserInputFormState>({\n lastName: initialUserInput?.lastName || \"\",\n firstName: initialUserInput?.firstName || \"\",\n birthDate: initialUserInput?.birthDate || \"\",\n day: birthDateParts.day,\n month: birthDateParts.month,\n year: birthDateParts.year,\n email: initialUserInput?.email || contactInfo?.email || \"\",\n phoneNumber:\n initialUserInput?.phoneNumber || contactInfo?.phoneNumber || \"\",\n sms: initialUserInput?.sms || \"\",\n addressLine1: initialUserInput?.addressLine1 || \"\",\n addressLine2: initialUserInput?.addressLine2 || \"\",\n postalCode: initialUserInput?.postalCode || \"\",\n city: initialUserInput?.city || \"\",\n countryCode: initialUserInput?.countryCode || \"\",\n nationality: initialUserInput?.nationality || \"\",\n companyName: initialUserInput?.companyName || \"\",\n siret: initialUserInput?.siret || \"\",\n tva: initialUserInput?.tva || \"\",\n });\n\n const [errors, setErrors] = useState<UserInputFormErrors>({});\n\n // Custom form state\n const [customFormData, setCustomFormData] = useState<Record<string, any>>(\n () => {\n if (informationType !== \"custom\" || !node.customFields) return {};\n\n const initial: Record<string, any> = {};\n node.customFields.forEach((field) => {\n const savedValue = initialUserInput?.customFormData?.[field.id];\n if (field.valueType === \"list\") {\n initial[field.id] = Array.isArray(savedValue) ? savedValue : [];\n return;\n }\n\n initial[field.id] = savedValue || \"\";\n });\n return initial;\n },\n );\n const [customFormErrors, setCustomFormErrors] = useState<\n Record<string, CustomFieldErrorValue>\n >({});\n const [customFormCellErrors, setCustomFormCellErrors] = useState<\n Record<string, Record<string, CustomFieldErrorValue>>\n >({});\n\n const [addressSuggestions, setAddressSuggestions] = useState<\n AddressSuggestion[]\n >([]);\n const [showSuggestions, setShowSuggestions] = useState(false);\n const isFirstRender = useRef(true);\n const hideSuggestionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const addressRequestState = useRef<{\n debounce: ReturnType<typeof setTimeout> | null;\n controller: AbortController | null;\n }>({\n debounce: null,\n controller: null,\n });\n\n const formTitles = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.titles.identity\"),\n \"identity-legal\": t(\"user_input_form.titles.identity_legal\"),\n contact: t(\"user_input_form.titles.contact\"),\n address: t(\"user_input_form.titles.address\"),\n nationality: t(\"user_input_form.titles.nationality\"),\n custom: t(\"user_input_form.titles.custom\"),\n }),\n [t],\n );\n\n const formDescriptions = useMemo<Record<InformationType, string>>(\n () => ({\n identity: t(\"user_input_form.descriptions.identity\"),\n \"identity-legal\": t(\"user_input_form.descriptions.identity_legal\"),\n contact: t(\"user_input_form.descriptions.contact\"),\n address: t(\"user_input_form.descriptions.address\"),\n nationality: t(\"user_input_form.descriptions.nationality\"),\n custom: t(\"user_input_form.descriptions.custom\"),\n }),\n [t],\n );\n\n const applyAddressSuggestion = (suggestion: AddressSuggestion) => {\n const normalizedCountry =\n suggestion.countryCode?.toUpperCase() || suggestion.country || \"\";\n\n setForm((previous) => ({\n ...previous,\n addressLine1: suggestion.addressLine1 || suggestion.label,\n postalCode: suggestion.postalCode || previous.postalCode,\n city: suggestion.city || previous.city,\n countryCode: normalizedCountry || previous.countryCode,\n }));\n setErrors((previous) => ({\n ...previous,\n addressLine1: false,\n postalCode: false,\n city: false,\n country: false,\n }));\n setShowSuggestions(false);\n setAddressSuggestions([]);\n };\n\n const mapGeoapifyFeature = (feature: any): AddressSuggestion | null => {\n if (!feature || !feature.properties) {\n return null;\n }\n\n const { properties } = feature;\n const label: string =\n properties.formatted ||\n properties.address_line1 ||\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim();\n\n if (!label) {\n return null;\n }\n\n const addressLine1 =\n [properties.housenumber, properties.street]\n .filter(Boolean)\n .join(\" \")\n .trim() ||\n properties.address_line1 ||\n label;\n\n const city =\n properties.city ||\n properties.town ||\n properties.village ||\n properties.state ||\n \"\";\n\n return {\n id:\n (properties.place_id && String(properties.place_id)) ||\n feature.id ||\n `${properties.lon ?? \"\"}-${properties.lat ?? \"\"}-${label}`,\n label,\n addressLine1,\n postalCode: properties.postcode || \"\",\n city,\n country: properties.country || \"\",\n countryCode: properties.country_code || undefined,\n };\n };\n\n const requestAddressSuggestions = (\n query: string,\n { autoComplete }: { autoComplete: boolean },\n ) => {\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n addressRequestState.current.debounce = null;\n }\n\n if (query.trim().length < 3) {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n addressRequestState.current.controller = null;\n }\n setAddressSuggestions([]);\n setShowSuggestions(false);\n return;\n }\n\n addressRequestState.current.debounce = setTimeout(async () => {\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n\n const controller = new AbortController();\n addressRequestState.current.controller = controller;\n\n try {\n const searchParams = new URLSearchParams({\n text: query,\n lang: \"fr\",\n });\n\n const response = await fetch(\n `${API_BASE_URL}${GEOCODING_AUTOCOMPLETE_ENDPOINT}?${searchParams.toString()}`,\n { signal: controller.signal },\n );\n\n if (!response.ok) {\n throw new Error(\n `Geocoding request failed with status ${response.status}`,\n );\n }\n\n const payload = await response.json();\n\n const suggestions: AddressSuggestion[] = Array.isArray(\n payload?.features,\n )\n ? payload.features\n .map((feature: any) => mapGeoapifyFeature(feature))\n .filter(\n (\n suggestion: AddressSuggestion | null,\n ): suggestion is AddressSuggestion => Boolean(suggestion),\n )\n : [];\n\n setAddressSuggestions(suggestions);\n setShowSuggestions(suggestions.length > 0);\n\n if (autoComplete && suggestions.length === 1) {\n const single = suggestions[0];\n const normalizedQuery = query.trim().toLowerCase();\n if (\n normalizedQuery.length >= 6 &&\n single.label.toLowerCase().startsWith(normalizedQuery)\n ) {\n applyAddressSuggestion(single);\n }\n }\n } catch (error) {\n if ((error as Error).name === \"AbortError\") {\n return;\n }\n\n const fallback = FALLBACK_ADDRESS_SUGGESTIONS.filter((suggestion) =>\n suggestion.label.toLowerCase().includes(query.toLowerCase()),\n );\n setAddressSuggestions(fallback);\n setShowSuggestions(fallback.length > 0);\n } finally {\n addressRequestState.current.controller = null;\n }\n }, 250);\n };\n\n useEffect(() => {\n if (!initialUserInput) {\n return;\n }\n\n if (\n isFirstRender.current ||\n (!form.firstName &&\n !form.lastName &&\n !form.email &&\n !form.phoneNumber &&\n !form.companyName)\n ) {\n const nextBirthParts = parseBirthDate(initialUserInput.birthDate || \"\");\n setForm((previous) => ({\n ...previous,\n lastName: initialUserInput.lastName || previous.lastName,\n firstName: initialUserInput.firstName || previous.firstName,\n birthDate: initialUserInput.birthDate || previous.birthDate,\n day: nextBirthParts.day,\n month: nextBirthParts.month,\n year: nextBirthParts.year,\n email: initialUserInput.email || previous.email,\n phoneNumber: initialUserInput.phoneNumber || previous.phoneNumber,\n sms: initialUserInput.sms || previous.sms,\n addressLine1: initialUserInput.addressLine1 || previous.addressLine1,\n addressLine2: initialUserInput.addressLine2 || previous.addressLine2,\n postalCode: initialUserInput.postalCode || previous.postalCode,\n city: initialUserInput.city || previous.city,\n countryCode: initialUserInput.countryCode || previous.countryCode,\n nationality: initialUserInput.nationality || previous.nationality,\n companyName: initialUserInput.companyName || previous.companyName,\n siret: initialUserInput.siret || previous.siret,\n tva: initialUserInput.tva || previous.tva,\n }));\n\n isFirstRender.current = false;\n }\n }, [\n initialUserInput,\n form.firstName,\n form.lastName,\n form.email,\n form.phoneNumber,\n form.companyName,\n ]);\n\n useEffect(() => {\n return () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n if (addressRequestState.current.debounce) {\n clearTimeout(addressRequestState.current.debounce);\n }\n if (addressRequestState.current.controller) {\n addressRequestState.current.controller.abort();\n }\n };\n }, []);\n\n const handleFieldChange = (key: keyof UserInputFormState, value: string) => {\n setErrors((previous) => ({\n ...previous,\n [key]: false,\n notMajor: false,\n }));\n\n setForm((previous) => {\n const next = { ...previous, [key]: value };\n if (key === \"day\" || key === \"month\" || key === \"year\") {\n const { day, month, year } = next;\n if (day && month && year) {\n const paddedDay = day.padStart(2, \"0\");\n const paddedMonth = month.padStart(2, \"0\");\n next.birthDate = `${paddedDay}-${paddedMonth}-${year}`;\n } else {\n next.birthDate = \"\";\n }\n }\n return next;\n });\n };\n\n const handleAddressChange = (value: string) => {\n handleFieldChange(\"addressLine1\", value);\n requestAddressSuggestions(value, { autoComplete: true });\n };\n\n const handleAddressFocus = () => {\n requestAddressSuggestions(form.addressLine1, { autoComplete: false });\n };\n\n const handleAddressBlur = () => {\n if (hideSuggestionTimeout.current) {\n clearTimeout(hideSuggestionTimeout.current);\n }\n hideSuggestionTimeout.current = setTimeout(() => {\n setShowSuggestions(false);\n hideSuggestionTimeout.current = null;\n }, 150);\n };\n\n const validateForm = () => {\n const nextErrors: UserInputFormErrors = {};\n let hasError = false;\n\n const markError = (key: string) => {\n nextErrors[key] = true;\n hasError = true;\n };\n\n if (informationType === \"identity\") {\n if (requestedFields.has(\"prenom\") && !form.firstName) {\n markError(\"firstName\");\n }\n if (requestedFields.has(\"nom\") && !form.lastName) {\n markError(\"lastName\");\n }\n if (requestedFields.has(\"date_naissance\")) {\n if (!form.birthDate) {\n markError(\"birthDate\");\n } else if (!checkIsMajor(form.birthDate)) {\n nextErrors.notMajor = true;\n hasError = true;\n }\n }\n }\n\n if (informationType === \"identity-legal\") {\n if (requestedFields.has(\"nom\") && !form.companyName) {\n markError(\"companyName\");\n }\n if (requestedFields.has(\"siret\") && !form.siret) {\n markError(\"siret\");\n }\n if (requestedFields.has(\"tva\") && !form.tva) {\n markError(\"tva\");\n }\n }\n\n if (informationType === \"contact\") {\n if (requestedFields.has(\"email\")) {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n if (!form.email || !emailRegex.test(form.email)) {\n markError(\"email\");\n }\n }\n if (requestedFields.has(\"sms\")) {\n if (\n !form.phoneNumber ||\n form.phoneNumber.replace(/\\D/g, \"\").length < 6\n ) {\n markError(\"phoneNumber\");\n }\n }\n }\n\n if (\n (informationType === \"address\" || informationType === \"identity-legal\") &&\n requestedFields.has(\"adresse\")\n ) {\n if (!form.addressLine1) {\n markError(\"addressLine1\");\n }\n if (!form.postalCode) {\n markError(\"postalCode\");\n }\n if (!form.city) {\n markError(\"city\");\n }\n if (!form.countryCode) {\n markError(\"country\");\n }\n }\n\n if (\n informationType === \"nationality\" &&\n requestedFields.has(\"nationalite\")\n ) {\n if (!form.nationality) {\n markError(\"nationality\");\n }\n }\n\n setErrors(nextErrors);\n return !hasError;\n };\n\n const validateCustomForm = () => {\n const errors: Record<string, CustomFieldErrorValue> = {};\n const cellErrors: Record<string, Record<string, CustomFieldErrorValue>> = {};\n let hasError = false;\n\n node.customFields?.forEach((field) => {\n const value = customFormData[field.id];\n\n if (field.valueType === \"list\") {\n const rows: Record<string, string>[] = Array.isArray(value) ? value : [];\n const minRows = getListFieldMinRows(field);\n const columns = normalizeListColumns(field.listColumns);\n const fieldCellErrors: Record<string, CustomFieldErrorValue> = {};\n let listFieldInvalid = false;\n\n if (field.required && countNonEmptyListRows(rows) < minRows) {\n errors[field.id] = true;\n hasError = true;\n listFieldInvalid = true;\n }\n\n rows.forEach((row, rowIndex) => {\n const rowIsEmpty = columns.every(\n (col) => !String(row?.[col.label] ?? \"\").trim(),\n );\n if (rowIsEmpty && !field.required) return;\n\n columns.forEach((col) => {\n const cellValue = String(row?.[col.label] ?? \"\").trim();\n const key = cellErrorKey(rowIndex, col.label);\n\n if (!cellValue) {\n if (field.required && !rowIsEmpty) {\n fieldCellErrors[key] = t(\"custom_form.required_field\");\n listFieldInvalid = true;\n }\n return;\n }\n\n switch (col.type) {\n case \"email\":\n if (!isEmailValid(cellValue)) {\n fieldCellErrors[key] = t(\"custom_form.invalid_email\");\n listFieldInvalid = true;\n }\n break;\n case \"date\": {\n const fmt = col.dateFormat ?? DEFAULT_DATE_DISPLAY_FORMAT;\n if (!isDateValid(cellValue, fmt)) {\n fieldCellErrors[key] = t(\"custom_form.invalid_date\", {\n format: fmt,\n });\n listFieldInvalid = true;\n }\n break;\n }\n case \"text\":\n if (col.regex && !isRegexMatch(cellValue, col.regex)) {\n fieldCellErrors[key] =\n col.regexErrorMessage ||\n t(\"custom_form.invalid_format\");\n listFieldInvalid = true;\n }\n break;\n }\n });\n });\n\n if (Object.keys(fieldCellErrors).length > 0) {\n cellErrors[field.id] = fieldCellErrors;\n }\n if (listFieldInvalid) {\n errors[field.id] = errors[field.id] ?? true;\n hasError = true;\n }\n return;\n }\n\n // Check if required field is missing\n if (field.required && !value) {\n errors[field.id] = true;\n hasError = true;\n return;\n }\n\n // Type-specific validation\n if (value) {\n switch (field.valueType) {\n case \"number\":\n if (isNaN(Number(value))) {\n errors[field.id] = true;\n hasError = true;\n }\n break;\n\n case \"email\":\n if (!isEmailValid(String(value))) {\n errors[field.id] = t(\"custom_form.invalid_email\");\n hasError = true;\n }\n break;\n\n case \"text\":\n if (field.regex && !isRegexMatch(String(value), field.regex)) {\n errors[field.id] =\n field.regexErrorMessage || t(\"custom_form.invalid_format\");\n hasError = true;\n }\n break;\n\n case \"date\": {\n const fmt = field.dateFormat ?? DEFAULT_DATE_DISPLAY_FORMAT;\n if (!isDateValid(String(value), fmt)) {\n errors[field.id] = t(\"custom_form.invalid_date\", {\n format: fmt,\n });\n hasError = true;\n }\n break;\n }\n\n case \"address\":\n // Validate address object if required\n if (field.required && typeof value === \"object\") {\n const addressValue = value as {\n addressLine1?: string;\n postalCode?: string;\n city?: string;\n countryCode?: string;\n };\n if (\n !addressValue.addressLine1 ||\n !addressValue.postalCode ||\n !addressValue.city ||\n !addressValue.countryCode\n ) {\n errors[field.id] = true;\n hasError = true;\n }\n }\n break;\n }\n }\n });\n\n setCustomFormErrors(errors);\n setCustomFormCellErrors(cellErrors);\n return !hasError;\n };\n\n const handleCustomFieldChange = (fieldId: string, value: any) => {\n setCustomFormData((prev) => ({ ...prev, [fieldId]: value }));\n setCustomFormErrors((prev) => ({ ...prev, [fieldId]: false }));\n setCustomFormCellErrors((prev) => {\n if (!(fieldId in prev)) return prev;\n const { [fieldId]: _removed, ...rest } = prev;\n return rest;\n });\n };\n\n const goOnNextStep = () => {\n // Handle custom form validation and submission\n if (informationType === \"custom\") {\n if (!validateCustomForm()) {\n return;\n }\n\n setUserInput((prev) => ({\n ...prev,\n customFormData: { ...(prev.customFormData ?? {}), ...customFormData },\n }));\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n return;\n }\n\n // Standard form validation\n if (!validateForm()) {\n return;\n }\n\n setUserInput((previous) => ({\n ...previous,\n ...(requestedFields.has(\"nom\") && {\n ...(informationType === \"identity-legal\"\n ? { companyName: form.companyName }\n : { lastName: form.lastName }),\n }),\n ...(requestedFields.has(\"prenom\") && { firstName: form.firstName }),\n ...(requestedFields.has(\"date_naissance\") && {\n birthDate: form.birthDate,\n }),\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && {\n phoneNumber: form.phoneNumber,\n sms: form.phoneNumber,\n }),\n ...(requestedFields.has(\"adresse\") && {\n addressLine1: form.addressLine1,\n addressLine2: form.addressLine2,\n postalCode: form.postalCode,\n city: form.city,\n countryCode: form.countryCode,\n }),\n ...(requestedFields.has(\"siret\") && { siret: form.siret }),\n ...(requestedFields.has(\"tva\") && { tva: form.tva }),\n ...(requestedFields.has(\"nationalite\") && {\n nationality: form.nationality,\n }),\n }));\n\n if (informationType === \"contact\" && setContactInfo) {\n setContactInfo((previous) => ({\n ...previous,\n ...(requestedFields.has(\"email\") && { email: form.email }),\n ...(requestedFields.has(\"sms\") && { phoneNumber: form.phoneNumber }),\n }));\n }\n\n if (onContinueCallback) {\n onContinueCallback();\n } else {\n goToNextStep(node.id, template);\n }\n };\n\n const goOnPreviousStep = () => {\n console.log(\"[goOnPreviousStep] called — step:\", step, \"canGoBack:\", stepObject.canGoBack);\n goBack();\n };\n\n const pageTitle = node.pageTitle || formTitles[informationType];\n\n const pageDescription =\n node.pageDescription || formDescriptions[informationType];\n\n return {\n form,\n errors,\n informationType,\n requestedFields,\n pageTitle,\n pageDescription,\n addressSuggestions,\n showSuggestions,\n handleFieldChange,\n handleAddressChange,\n handleAddressFocus,\n handleAddressBlur,\n applyAddressSuggestion,\n goOnNextStep,\n goOnPreviousStep,\n customFormData,\n customFormErrors,\n customFormCellErrors,\n handleCustomFieldChange,\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;AA2DO,IAAM,gBAAgB,GAAG,UAAC,EASZ,EAAA;QARnB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,kBAAkB,GAAA,EAAA,CAAA,kBAAA;AAEV,IAAwC,UAAU,QAA3C,CAAA,KAAE,MAAM,GAAyB,UAAU,CAAA,MAAnC,EAAE,YAAY,GAAW,UAAU,CAAA,YAArB,CAAA,CAAE,IAAI,GAAK,UAAU;AAClD,IAAA,IAAA,CAAC,GAAK,OAAO,EAAE,EAAd;IAET,IAAM,eAAe,GAAG,OAAO,CAAkB,YAAA;;QAC/C,IAAM,QAAQ,GAAG,sBAAsB,CACrC,IAAI,CAAC,eAAyB,EAC9B,UAAU,CACX;AACD,QAAA,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE;YAC9D,mBAAmB,EAAE,IAAI,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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;;;;"}
|
package/dist/esm/i18n/en.json.js
CHANGED
|
@@ -94,7 +94,10 @@ var custom_form = {
|
|
|
94
94
|
select_option: "Select an option",
|
|
95
95
|
add_row: "Add row",
|
|
96
96
|
remove_row: "Remove row",
|
|
97
|
-
list_missing_columns: "This table has no configured columns."
|
|
97
|
+
list_missing_columns: "This table has no configured columns.",
|
|
98
|
+
invalid_email: "Invalid email address",
|
|
99
|
+
invalid_date: "Invalid date. Expected format: {{format}}",
|
|
100
|
+
invalid_format: "Value does not match the expected format"
|
|
98
101
|
};
|
|
99
102
|
var pdf_generation = {
|
|
100
103
|
loading_title: "Generating document",
|
|
@@ -122,7 +125,7 @@ var user_guidance = {
|
|
|
122
125
|
"2.1": "The photo is not clear. Avoid any blur or reflection",
|
|
123
126
|
"2.2": "The photo is not clear. Avoid any blur or reflection",
|
|
124
127
|
"2.4": "The photo is not clear. Avoid any blur or reflection",
|
|
125
|
-
"2.6": "
|
|
128
|
+
"2.6": "The document submitted is not the expected one"
|
|
126
129
|
};
|
|
127
130
|
var validation_points = {
|
|
128
131
|
"1.0": {
|
|
@@ -537,7 +540,8 @@ var jdi = {
|
|
|
537
540
|
valid: "• The document must be valid.",
|
|
538
541
|
readable: "• All information must be readable."
|
|
539
542
|
}
|
|
540
|
-
}
|
|
543
|
+
},
|
|
544
|
+
title_identity: "Accepted document(s)"
|
|
541
545
|
},
|
|
542
546
|
document_upload: {
|
|
543
547
|
add_back: "Add the back side",
|
|
@@ -588,7 +592,8 @@ var jdi = {
|
|
|
588
592
|
upload_error: "An error occurred during upload. Please try again.",
|
|
589
593
|
front_corrupted: "The front image is corrupted or invalid.",
|
|
590
594
|
back_corrupted: "The back image is corrupted or invalid."
|
|
591
|
-
}
|
|
595
|
+
},
|
|
596
|
+
drag_drop_hint: "or drag and drop your files here"
|
|
592
597
|
}
|
|
593
598
|
};
|
|
594
599
|
var selfie = {
|
|
@@ -833,6 +838,14 @@ var document_collection = {
|
|
|
833
838
|
back_to_start: "Back to start"
|
|
834
839
|
};
|
|
835
840
|
var document_check = {
|
|
841
|
+
method_selection: {
|
|
842
|
+
title: "Choose a method",
|
|
843
|
+
subtitle: "How would you like to add your document?",
|
|
844
|
+
picture_title: "Take a photo",
|
|
845
|
+
picture_desc: "Use your device's camera",
|
|
846
|
+
download_title: "Upload a file",
|
|
847
|
+
download_desc: "Select a file from your device"
|
|
848
|
+
},
|
|
836
849
|
config_error: {
|
|
837
850
|
title: "Configuration error",
|
|
838
851
|
description: "Document type not specified.",
|
|
@@ -935,7 +948,8 @@ var document_upload = {
|
|
|
935
948
|
upload_error: "An error occurred during upload. Please try again.",
|
|
936
949
|
front_corrupted: "The front image is corrupted or invalid.",
|
|
937
950
|
back_corrupted: "The back image is corrupted or invalid."
|
|
938
|
-
}
|
|
951
|
+
},
|
|
952
|
+
drag_drop_hint: "or drag and drop your files here"
|
|
939
953
|
};
|
|
940
954
|
var unissey = {
|
|
941
955
|
capture: "Record a video",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/i18n/fr.json.js
CHANGED
|
@@ -94,7 +94,10 @@ var custom_form = {
|
|
|
94
94
|
select_option: "Sélectionner une option",
|
|
95
95
|
add_row: "Ajouter une ligne",
|
|
96
96
|
remove_row: "Supprimer la ligne",
|
|
97
|
-
list_missing_columns: "Ce tableau n'a pas de colonnes configurées."
|
|
97
|
+
list_missing_columns: "Ce tableau n'a pas de colonnes configurées.",
|
|
98
|
+
invalid_email: "Adresse email invalide",
|
|
99
|
+
invalid_date: "Date invalide. Format attendu : {{format}}",
|
|
100
|
+
invalid_format: "La valeur ne respecte pas le format attendu"
|
|
98
101
|
};
|
|
99
102
|
var pdf_generation = {
|
|
100
103
|
loading_title: "Génération du document",
|
|
@@ -122,7 +125,7 @@ var user_guidance = {
|
|
|
122
125
|
"2.1": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
123
126
|
"2.2": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
124
127
|
"2.4": "La photo n'est pas nette. Évitez tout flou ou reflet",
|
|
125
|
-
"2.6": "
|
|
128
|
+
"2.6": "Le document déposé n'est pas celui attendu"
|
|
126
129
|
};
|
|
127
130
|
var validation_points = {
|
|
128
131
|
"1.0": {
|
|
@@ -537,7 +540,8 @@ var jdi = {
|
|
|
537
540
|
valid: "• Le document doit être valide.",
|
|
538
541
|
readable: "• Toutes les informations doivent être lisibles."
|
|
539
542
|
}
|
|
540
|
-
}
|
|
543
|
+
},
|
|
544
|
+
title_identity: "Document(s) accepté(s)"
|
|
541
545
|
},
|
|
542
546
|
document_upload: {
|
|
543
547
|
add_back: "Ajouter le verso",
|
|
@@ -588,7 +592,8 @@ var jdi = {
|
|
|
588
592
|
upload_error: "Une erreur s'est produite lors du téléchargement. Veuillez réessayer.",
|
|
589
593
|
front_corrupted: "L'image du recto est corrompue ou invalide.",
|
|
590
594
|
back_corrupted: "L'image du verso est corrompue ou invalide."
|
|
591
|
-
}
|
|
595
|
+
},
|
|
596
|
+
drag_drop_hint: "ou glissez-déposez vos fichiers ici"
|
|
592
597
|
}
|
|
593
598
|
};
|
|
594
599
|
var selfie = {
|
|
@@ -833,6 +838,14 @@ var document_collection = {
|
|
|
833
838
|
back_to_start: "Retour au début"
|
|
834
839
|
};
|
|
835
840
|
var document_check = {
|
|
841
|
+
method_selection: {
|
|
842
|
+
title: "Choisissez une méthode",
|
|
843
|
+
subtitle: "Comment souhaitez-vous ajouter votre document ?",
|
|
844
|
+
picture_title: "Prendre une photo",
|
|
845
|
+
picture_desc: "Utilisez l'appareil photo de votre appareil",
|
|
846
|
+
download_title: "Téléverser un fichier",
|
|
847
|
+
download_desc: "Sélectionnez un fichier sur votre appareil"
|
|
848
|
+
},
|
|
836
849
|
config_error: {
|
|
837
850
|
title: "Erreur de configuration",
|
|
838
851
|
description: "Type de document non spécifié.",
|
|
@@ -935,7 +948,8 @@ var document_upload = {
|
|
|
935
948
|
upload_error: "Une erreur s'est produite lors du téléchargement. Veuillez réessayer.",
|
|
936
949
|
front_corrupted: "L'image du recto est corrompue ou invalide.",
|
|
937
950
|
back_corrupted: "L'image du verso est corrompue ou invalide."
|
|
938
|
-
}
|
|
951
|
+
},
|
|
952
|
+
drag_drop_hint: "ou glissez-déposez vos fichiers ici"
|
|
939
953
|
};
|
|
940
954
|
var unissey = {
|
|
941
955
|
capture: "Enregistrer une vidéo",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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