datakeen-session-react 1.1.180 → 1.1.182
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/.gitlab-ci.yml +115 -46
- package/dist/cjs/components/document-collection/DocumentCollection.js +12 -7
- package/dist/cjs/components/document-collection/DocumentCollection.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentError.js +16 -12
- package/dist/cjs/components/document-collection/DocumentError.js.map +1 -1
- package/dist/cjs/components/document-collection/DocumentProcessing.js +17 -5
- package/dist/cjs/components/document-collection/DocumentProcessing.js.map +1 -1
- package/dist/cjs/components/jdi/JDIError.js +14 -10
- package/dist/cjs/components/jdi/JDIError.js.map +1 -1
- package/dist/cjs/components/jdi/JDIProcessing.js +13 -5
- package/dist/cjs/components/jdi/JDIProcessing.js.map +1 -1
- package/dist/cjs/components/session/DocumentCheck.js +15 -10
- package/dist/cjs/components/session/DocumentCheck.js.map +1 -1
- package/dist/cjs/components/session/Selfie.js +3 -1
- package/dist/cjs/components/session/Selfie.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/AddressFields.js +1 -1
- package/dist/cjs/components/session/UserInputForm/AddressFields.js.map +1 -1
- package/dist/cjs/components/session/UserInputForm/LegalRepFields.js +5 -1
- package/dist/cjs/components/session/UserInputForm/LegalRepFields.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js +17 -4
- package/dist/cjs/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/cjs/components/signature-electronic/SignedDocumentPreview.js +130 -0
- package/dist/cjs/components/signature-electronic/SignedDocumentPreview.js.map +1 -0
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js +93 -45
- package/dist/cjs/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/cjs/constants/userInputForm.js.map +1 -1
- package/dist/cjs/hooks/useUserInputForm.js +11 -1
- package/dist/cjs/hooks/useUserInputForm.js.map +1 -1
- package/dist/cjs/i18n/en.json.js +9 -3
- package/dist/cjs/i18n/en.json.js.map +1 -1
- package/dist/cjs/i18n/fr.json.js +9 -3
- package/dist/cjs/i18n/fr.json.js.map +1 -1
- package/dist/cjs/index.css.js +1 -1
- package/dist/cjs/types/session.js.map +1 -1
- package/dist/cjs/utils/analysisErrors.js +22 -0
- package/dist/cjs/utils/analysisErrors.js.map +1 -0
- package/dist/esm/components/document-collection/DocumentCollection.js +12 -7
- package/dist/esm/components/document-collection/DocumentCollection.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentError.js +17 -13
- package/dist/esm/components/document-collection/DocumentError.js.map +1 -1
- package/dist/esm/components/document-collection/DocumentProcessing.js +17 -5
- package/dist/esm/components/document-collection/DocumentProcessing.js.map +1 -1
- package/dist/esm/components/jdi/JDIError.js +15 -11
- package/dist/esm/components/jdi/JDIError.js.map +1 -1
- package/dist/esm/components/jdi/JDIProcessing.js +13 -5
- package/dist/esm/components/jdi/JDIProcessing.js.map +1 -1
- package/dist/esm/components/session/DocumentCheck.js +15 -10
- package/dist/esm/components/session/DocumentCheck.js.map +1 -1
- package/dist/esm/components/session/Selfie.js +3 -1
- package/dist/esm/components/session/Selfie.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/AddressFields.js +1 -1
- package/dist/esm/components/session/UserInputForm/AddressFields.js.map +1 -1
- package/dist/esm/components/session/UserInputForm/LegalRepFields.js +5 -1
- package/dist/esm/components/session/UserInputForm/LegalRepFields.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignatureElectronic.js +17 -4
- package/dist/esm/components/signature-electronic/SignatureElectronic.js.map +1 -1
- package/dist/esm/components/signature-electronic/SignedDocumentPreview.js +126 -0
- package/dist/esm/components/signature-electronic/SignedDocumentPreview.js.map +1 -0
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js +94 -46
- package/dist/esm/components/template/ExternalVerificationNodeHandler.js.map +1 -1
- package/dist/esm/constants/userInputForm.js.map +1 -1
- package/dist/esm/hooks/useUserInputForm.js +11 -1
- package/dist/esm/hooks/useUserInputForm.js.map +1 -1
- package/dist/esm/i18n/en.json.js +9 -3
- package/dist/esm/i18n/en.json.js.map +1 -1
- package/dist/esm/i18n/fr.json.js +9 -3
- package/dist/esm/i18n/fr.json.js.map +1 -1
- package/dist/esm/index.css.js +1 -1
- package/dist/esm/types/session.js.map +1 -1
- package/dist/esm/utils/analysisErrors.js +19 -0
- package/dist/esm/utils/analysisErrors.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter, __generator, __assign, __spreadArray } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import sdkI18n from '../../i18n/index.js';
|
|
@@ -19,6 +19,13 @@ var STANDARD_FIELD_ALIASES = {
|
|
|
19
19
|
prenom: ['firstName', 'first_name', 'prenom'],
|
|
20
20
|
nom: ['lastName', 'last_name', 'surname', 'familyName', 'nom'],
|
|
21
21
|
date_naissance: ['birthDate', 'birth_date', 'dateOfBirth', 'date_naissance'],
|
|
22
|
+
// Champs d'un nœud identity-legal-rep (RL) : la clé de config (builder) diffère
|
|
23
|
+
// de la clé réellement soumise par LegalRepFields — sans cet alias, la
|
|
24
|
+
// résolution échouait silencieusement dès qu'un nœud identity-legal-rep était
|
|
25
|
+
// choisi comme "Nœud source Nom/Prénom" (compareTargets ne trouvait jamais la
|
|
26
|
+
// valeur, causant un person_mismatch systématique).
|
|
27
|
+
legalRepresentativePrenom: ['legalRepresentativeFirstName', 'legalRepresentativePrenom'],
|
|
28
|
+
legalRepresentativeNom: ['legalRepresentativeLastName', 'legalRepresentativeNom'],
|
|
22
29
|
};
|
|
23
30
|
var normalizeReferenceField = function (field) {
|
|
24
31
|
if (!field)
|
|
@@ -58,19 +65,25 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
58
65
|
var nodeData = node;
|
|
59
66
|
var apiType = String(nodeData.targetApi || 'INSEE');
|
|
60
67
|
var isInpiRbe = apiType === 'INPI_RBE';
|
|
68
|
+
// Paramétrable depuis le journey builder (panneau "Configuration de la base
|
|
69
|
+
// externe"), par nœud. Absent/true = comportement actuel inchangé.
|
|
70
|
+
var allowContinueOnFailure = nodeData.allowContinueOnFailure !== false;
|
|
61
71
|
var _o = useState('loading'), phase = _o[0], setPhase = _o[1];
|
|
62
72
|
var _p = useState(null), errorScreenData = _p[0], setErrorScreenData = _p[1];
|
|
63
73
|
var _q = useState(function () {
|
|
64
74
|
if (isInpiRbe) {
|
|
65
75
|
return [
|
|
66
76
|
{
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
// Générique : le backend interroge le RNE puis, si besoin, le RNA en
|
|
78
|
+
// fallback (associations) via un seul appel — la source réelle n'est
|
|
79
|
+
// connue qu'à la réponse finale (cf. inpiData.source).
|
|
80
|
+
title: t('inpi_verification.step1', 'Vérification du SIREN auprès des registres officiels'),
|
|
81
|
+
subtitle: t('inpi_verification.step1_sub', 'Connexion aux registres RNE et RNA'),
|
|
69
82
|
status: 'active',
|
|
70
83
|
},
|
|
71
84
|
{
|
|
72
|
-
title: t('inpi_verification.step2', "Récupération des données d'
|
|
73
|
-
subtitle: t('inpi_verification.step2_sub', 'Lecture des informations légales et des
|
|
85
|
+
title: t('inpi_verification.step2', "Récupération des données d'identité"),
|
|
86
|
+
subtitle: t('inpi_verification.step2_sub', 'Lecture des informations légales et des responsables'),
|
|
74
87
|
status: 'pending',
|
|
75
88
|
},
|
|
76
89
|
{
|
|
@@ -101,10 +114,10 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
101
114
|
useEffect(function () {
|
|
102
115
|
var abortController = new AbortController();
|
|
103
116
|
var run = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
104
|
-
var result, referenceField, referenceValueMasked, resolvedReferenceValue, referenceNodeId, referenceVariable, submittedFirstName, submittedLastName, nodeInput, userInputFlat, lookupKeys, referenceValue, allCustomFields, _i, _a, _b, value, str, comparisonConfig, cfg, personNodeInput, flat, firstNameKeys, lastNameKeys, birthDateKeys, dateOfBirth, response, res, apiErr_1, apiResult, inpi, cfg;
|
|
105
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
106
|
-
return __generator(this, function (
|
|
107
|
-
switch (
|
|
117
|
+
var result, referenceField, referenceValueMasked, resolvedReferenceValue, referenceNodeId, referenceVariable, submittedFirstName, submittedLastName, submittedSiren, nodeInput, userInputFlat, lookupKeys, referenceValue, allCustomFields, _i, _a, _b, value, str, comparisonConfig, cfg, personNodeInput, flat, isPersonneMorale, sirenKeys, firstNameKeys, lastNameKeys, birthDateKeys, dateOfBirth, response, res, apiErr_1, apiResult, inpi, cfg, isPersonneMorale_1;
|
|
118
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
119
|
+
return __generator(this, function (_v) {
|
|
120
|
+
switch (_v.label) {
|
|
108
121
|
case 0:
|
|
109
122
|
result = {
|
|
110
123
|
isVerified: false,
|
|
@@ -117,9 +130,10 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
117
130
|
referenceVariable = String(nodeData.referenceVariable || '');
|
|
118
131
|
submittedFirstName = '';
|
|
119
132
|
submittedLastName = '';
|
|
120
|
-
|
|
133
|
+
submittedSiren = '';
|
|
134
|
+
_v.label = 1;
|
|
121
135
|
case 1:
|
|
122
|
-
|
|
136
|
+
_v.trys.push([1, 9, , 10]);
|
|
123
137
|
if (!(session === null || session === void 0 ? void 0 : session.id))
|
|
124
138
|
throw new Error('Session ID is missing');
|
|
125
139
|
referenceField = normalizeReferenceField(String(nodeData.referenceField || referenceVariable || ''));
|
|
@@ -169,45 +183,62 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
169
183
|
cfg = nodeData.comparisonConfig;
|
|
170
184
|
personNodeInput = (_d = userInput[cfg.personReferenceNodeId]) !== null && _d !== void 0 ? _d : {};
|
|
171
185
|
flat = userInput;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
186
|
+
isPersonneMorale = cfg.personType === 'MORALE';
|
|
187
|
+
if (isPersonneMorale) {
|
|
188
|
+
sirenKeys = expandFieldKey((_e = cfg.personSirenField) !== null && _e !== void 0 ? _e : '').filter(Boolean);
|
|
189
|
+
submittedSiren = (_f = resolveFieldValue(personNodeInput, flat, sirenKeys)) !== null && _f !== void 0 ? _f : '';
|
|
190
|
+
if (submittedSiren) {
|
|
191
|
+
comparisonConfig = {
|
|
192
|
+
personType: 'MORALE',
|
|
193
|
+
siren: submittedSiren,
|
|
194
|
+
// Un RBE est toujours une personne physique en droit
|
|
195
|
+
// français : forcé à 'mandataires' quel que soit le
|
|
196
|
+
// contenu de cfg.compareTargets (défense en profondeur).
|
|
197
|
+
compareTargets: ['mandataires'],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
firstNameKeys = expandFieldKey((_g = cfg.personFirstNameField) !== null && _g !== void 0 ? _g : '').filter(Boolean);
|
|
203
|
+
lastNameKeys = expandFieldKey((_h = cfg.personLastNameField) !== null && _h !== void 0 ? _h : '').filter(Boolean);
|
|
204
|
+
birthDateKeys = cfg.personBirthDateField
|
|
205
|
+
? expandFieldKey(cfg.personBirthDateField).filter(Boolean)
|
|
206
|
+
: [];
|
|
207
|
+
submittedFirstName = (_j = resolveFieldValue(personNodeInput, flat, firstNameKeys)) !== null && _j !== void 0 ? _j : '';
|
|
208
|
+
submittedLastName = (_k = resolveFieldValue(personNodeInput, flat, lastNameKeys)) !== null && _k !== void 0 ? _k : '';
|
|
209
|
+
dateOfBirth = cfg.compareBirthDate && birthDateKeys.length
|
|
210
|
+
? resolveFieldValue(personNodeInput, flat, birthDateKeys)
|
|
211
|
+
: undefined;
|
|
212
|
+
if (submittedFirstName && submittedLastName) {
|
|
213
|
+
comparisonConfig = __assign({ firstName: submittedFirstName, lastName: submittedLastName, compareTargets: (_l = cfg.compareTargets) !== null && _l !== void 0 ? _l : ['mandataires'] }, (dateOfBirth ? { dateOfBirth: dateOfBirth } : {}));
|
|
214
|
+
}
|
|
184
215
|
}
|
|
185
216
|
}
|
|
186
217
|
if (isInpiRbe)
|
|
187
218
|
advanceStep(1);
|
|
188
|
-
|
|
219
|
+
_v.label = 4;
|
|
189
220
|
case 4:
|
|
190
|
-
|
|
191
|
-
return [4 /*yield*/, apiService.post("/session/sdk/".concat(session.id, "/verify-external/").concat(node.id), __assign({ apiType: apiType, referenceValue: referenceValue, referenceField: referenceField }, (comparisonConfig ? { comparisonConfig: comparisonConfig } : {})), { signal: abortController.signal })];
|
|
221
|
+
_v.trys.push([4, 7, , 8]);
|
|
222
|
+
return [4 /*yield*/, apiService.post("/session/sdk/".concat(session.id, "/verify-external/").concat(node.id), __assign({ apiType: apiType, referenceValue: referenceValue, referenceField: referenceField, enableRnaFallback: isInpiRbe && nodeData.rnaFallbackEnabled === true }, (comparisonConfig ? { comparisonConfig: comparisonConfig } : {})), { signal: abortController.signal })];
|
|
192
223
|
case 5:
|
|
193
|
-
response =
|
|
224
|
+
response = _v.sent();
|
|
194
225
|
if (isInpiRbe)
|
|
195
226
|
advanceStep(2);
|
|
196
227
|
return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 600); })];
|
|
197
228
|
case 6:
|
|
198
|
-
|
|
199
|
-
res = (
|
|
229
|
+
_v.sent();
|
|
230
|
+
res = (_m = response.data) === null || _m === void 0 ? void 0 : _m.data;
|
|
200
231
|
if (res && typeof res.isVerified === 'boolean') {
|
|
201
232
|
result = res;
|
|
202
233
|
}
|
|
203
234
|
return [3 /*break*/, 8];
|
|
204
235
|
case 7:
|
|
205
|
-
apiErr_1 =
|
|
236
|
+
apiErr_1 = _v.sent();
|
|
206
237
|
if (abortController.signal.aborted)
|
|
207
238
|
return [2 /*return*/];
|
|
208
239
|
if (isInpiRbe)
|
|
209
240
|
advanceStep(2);
|
|
210
|
-
apiResult = (
|
|
241
|
+
apiResult = (_p = (_o = apiErr_1 === null || apiErr_1 === void 0 ? void 0 : apiErr_1.response) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.data;
|
|
211
242
|
if (apiResult && typeof apiResult.isVerified === 'boolean') {
|
|
212
243
|
result = apiResult;
|
|
213
244
|
}
|
|
@@ -222,7 +253,7 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
222
253
|
return [3 /*break*/, 8];
|
|
223
254
|
case 8: return [3 /*break*/, 10];
|
|
224
255
|
case 9:
|
|
225
|
-
|
|
256
|
+
_v.sent();
|
|
226
257
|
result = {
|
|
227
258
|
isVerified: false,
|
|
228
259
|
status: 'external_error',
|
|
@@ -252,15 +283,24 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
252
283
|
if (result.status === 'person_mismatch') {
|
|
253
284
|
inpi = result.inpiData;
|
|
254
285
|
cfg = nodeData.comparisonConfig;
|
|
286
|
+
isPersonneMorale_1 = (cfg === null || cfg === void 0 ? void 0 : cfg.personType) === 'MORALE';
|
|
255
287
|
setErrorScreenData({
|
|
256
288
|
submittedLastName: submittedLastName,
|
|
257
289
|
submittedFirstName: submittedFirstName,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
290
|
+
submittedSiren: isPersonneMorale_1 ? submittedSiren : undefined,
|
|
291
|
+
// En mode personne morale, seuls les mandataires personne morale ont
|
|
292
|
+
// un sens (un RBE est toujours une personne physique) ; en mode
|
|
293
|
+
// physique, comportement inchangé (mandataires individus uniquement).
|
|
294
|
+
mandataires: ((_q = inpi === null || inpi === void 0 ? void 0 : inpi.mandataires) !== null && _q !== void 0 ? _q : []).filter(function (m) {
|
|
295
|
+
return isPersonneMorale_1 ? m.type === 'personne_morale' : m.type === 'individu';
|
|
296
|
+
}),
|
|
297
|
+
beneficiairesEffectifs: (_r = inpi === null || inpi === void 0 ? void 0 : inpi.beneficiairesEffectifs) !== null && _r !== void 0 ? _r : [],
|
|
298
|
+
compareTargets: isPersonneMorale_1 ? ['mandataires'] : ((_s = cfg === null || cfg === void 0 ? void 0 : cfg.compareTargets) !== null && _s !== void 0 ? _s : ['mandataires']),
|
|
299
|
+
personNodeId: (_t = cfg === null || cfg === void 0 ? void 0 : cfg.personReferenceNodeId) !== null && _t !== void 0 ? _t : '',
|
|
300
|
+
targetDenomination: (_u = inpi === null || inpi === void 0 ? void 0 : inpi.identite) === null || _u === void 0 ? void 0 : _u.denomination,
|
|
262
301
|
siren: resolvedReferenceValue,
|
|
263
302
|
sirenNodeId: referenceNodeId,
|
|
303
|
+
source: inpi === null || inpi === void 0 ? void 0 : inpi.source,
|
|
264
304
|
});
|
|
265
305
|
setPhase('mismatch');
|
|
266
306
|
}
|
|
@@ -274,6 +314,7 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
274
314
|
personNodeId: '',
|
|
275
315
|
siren: resolvedReferenceValue,
|
|
276
316
|
sirenNodeId: referenceNodeId,
|
|
317
|
+
isDoubleNotFound: result.errorCode === 'NOT_FOUND_RNE_RNA',
|
|
277
318
|
});
|
|
278
319
|
setPhase('not_found');
|
|
279
320
|
}
|
|
@@ -323,23 +364,30 @@ var ExternalVerificationNodeHandler = function (_a) {
|
|
|
323
364
|
var showBeneficiaires = ((_b = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _b === void 0 ? void 0 : _b.includes('beneficiairesEffectifs')) && ((_d = (_c = d === null || d === void 0 ? void 0 : d.beneficiairesEffectifs) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
|
|
324
365
|
var showMandataires = (!((_e = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _e === void 0 ? void 0 : _e.length) || ((_f = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _f === void 0 ? void 0 : _f.includes('mandataires'))) &&
|
|
325
366
|
((_h = (_g = d === null || d === void 0 ? void 0 : d.mandataires) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0) > 0;
|
|
326
|
-
var
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
367
|
+
var isRna = (d === null || d === void 0 ? void 0 : d.source) === 'RNA';
|
|
368
|
+
var personListLabel = isRna
|
|
369
|
+
? t('inpi_verification.dirigeants_label', 'Dirigeants renseignés au RNA')
|
|
370
|
+
: ((_j = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _j === void 0 ? void 0 : _j.includes('beneficiairesEffectifs')) && !((_k = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _k === void 0 ? void 0 : _k.includes('mandataires'))
|
|
371
|
+
? t('inpi_verification.beneficiaires_label', 'Bénéficiaires effectifs renseignés au RNE')
|
|
372
|
+
: ((_l = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _l === void 0 ? void 0 : _l.includes('mandataires')) && !((_m = d === null || d === void 0 ? void 0 : d.compareTargets) === null || _m === void 0 ? void 0 : _m.includes('beneficiairesEffectifs'))
|
|
373
|
+
? t('inpi_verification.mandataires_label', 'Mandataires renseignés au RNE')
|
|
374
|
+
: t('inpi_verification.persons_label', 'Personnes renseignées au RNE');
|
|
375
|
+
return (jsxs("div", { className: "flex flex-col justify-between h-full w-full", children: [jsx("div", { className: "flex-1 px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxs("div", { className: "w-full max-w-md mx-auto space-y-6", children: [jsx("div", { className: "text-center", children: jsx("div", { className: "mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4", children: jsx("div", { className: "w-8 h-8 bg-red-500 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-white text-lg", children: "\u2715" }) }) }) }), jsxs("div", { className: "text-center space-y-4", children: [jsx(Title, { className: "text-xl md:text-2xl lg:text-3xl text-red-600", children: t('inpi_verification.mismatch_title', 'Identité non confirmée') }), jsx(Subtitle, { className: "text-sm text-gray-600 leading-relaxed", children: (d === null || d === void 0 ? void 0 : d.targetDenomination)
|
|
376
|
+
? t('inpi_verification.mismatch_desc_denomination', "Le responsable l\u00E9gal saisi ne fait pas partie des responsables l\u00E9gaux ou b\u00E9n\u00E9ficiaires effectifs de la soci\u00E9t\u00E9 ".concat(d.targetDenomination))
|
|
377
|
+
: t('inpi_verification.mismatch_desc', "Les informations saisies ne correspondent à aucune personne déclarée à l'INPI pour cette société.") })] }), d && (d.submittedLastName || d.submittedFirstName || d.submittedSiren) && (jsxs("div", { className: "bg-red-50 border border-red-200 rounded-lg p-4", children: [jsx("h3", { className: "font-medium text-red-900 mb-2", children: t('errors.problems_detected', 'Problèmes détectés') }), jsxs("div", { className: "text-sm text-red-800 space-y-1", children: [d.submittedSiren && (jsxs("p", { children: [t('inpi_verification.submitted_siren', 'SIREN saisi'), ' : ', jsx("strong", { children: d.submittedSiren })] })), d.submittedLastName && (jsxs("p", { children: [t('inpi_verification.submitted_last_name', 'Nom saisi'), ' : ', jsx("strong", { children: d.submittedLastName })] })), d.submittedFirstName && (jsxs("p", { children: [t('inpi_verification.submitted_first_name', 'Prénom saisi'), ' : ', jsx("strong", { children: d.submittedFirstName })] }))] })] })), (showMandataires || showBeneficiaires) && (jsxs("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: [jsx("h3", { className: "font-medium text-blue-900 mb-2", children: personListLabel }), jsxs("div", { className: "text-sm text-blue-800 space-y-1", children: [showMandataires && d.mandataires.map(function (m, i) {
|
|
378
|
+
var _a, _b, _c;
|
|
379
|
+
return (jsx("p", { children: m.type === 'personne_morale' ? (jsxs(Fragment, { children: [jsx("strong", { children: (_a = m.denominationSociale) !== null && _a !== void 0 ? _a : '—' }), m.siren && " (SIREN ".concat(m.siren, ")")] })) : (jsxs(Fragment, { children: [jsx("strong", { children: (_b = m.nom) !== null && _b !== void 0 ? _b : '—' }), ((_c = m.prenoms) !== null && _c !== void 0 ? _c : []).length > 0 && " ".concat(m.prenoms.join(' '))] })) }, "m-".concat(i)));
|
|
334
380
|
}), showBeneficiaires && d.beneficiairesEffectifs.map(function (b, i) {
|
|
335
381
|
var _a, _b;
|
|
336
382
|
return (jsxs("p", { children: [jsx("strong", { children: (_a = b.nom) !== null && _a !== void 0 ? _a : '—' }), ((_b = b.prenoms) !== null && _b !== void 0 ? _b : []).length > 0 && " ".concat(b.prenoms.join(' '))] }, "b-".concat(i)));
|
|
337
|
-
})] })] }))] }) }), jsx("div", { className: "sticky bottom-0 md:static bg-white border-t md:border-t-0 p-4 md:p-0 md:pb-8", children: jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxs("div", { className: "flex flex-col space-y-3 md:hidden", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-mismatch-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), jsx(Button, { onClick: onNext, "data-cy": "inpi-mismatch-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') })] }), jsxs("div", { className: "hidden md:flex justify-center space-x-3", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-mismatch-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), jsx(Button, { onClick: onNext, "data-cy": "inpi-mismatch-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') })] })] }) })] }));
|
|
383
|
+
})] })] }))] }) }), jsx("div", { className: "sticky bottom-0 md:static bg-white border-t md:border-t-0 p-4 md:p-0 md:pb-8", children: jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxs("div", { className: "flex flex-col space-y-3 md:hidden", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-mismatch-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), allowContinueOnFailure && (jsx(Button, { onClick: onNext, "data-cy": "inpi-mismatch-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') }))] }), jsxs("div", { className: "hidden md:flex justify-center space-x-3", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-mismatch-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), allowContinueOnFailure && (jsx(Button, { onClick: onNext, "data-cy": "inpi-mismatch-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') }))] })] }) })] }));
|
|
338
384
|
}
|
|
339
385
|
// ─── Not found phase ───────────────────────────────────────────────────────
|
|
340
386
|
if (phase === 'not_found') {
|
|
341
387
|
var d = errorScreenData;
|
|
342
|
-
return (jsxs("div", { className: "flex flex-col justify-between h-full w-full", children: [jsx("div", { className: "flex-1 px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxs("div", { className: "w-full max-w-md mx-auto space-y-6", children: [jsx("div", { className: "text-center", children: jsx("div", { className: "mx-auto w-16 h-16 bg-orange-100 rounded-full flex items-center justify-center mb-4", children: jsx("div", { className: "w-8 h-8 bg-orange-500 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-white text-lg font-bold", children: "!" }) }) }) }), jsxs("div", { className: "text-center space-y-4", children: [jsx(Title, { className: "text-xl md:text-2xl lg:text-3xl text-orange-600", children: t('inpi_verification.not_found_title', 'Société introuvable') }), jsx(Subtitle, { className: "text-sm text-gray-600 leading-relaxed", children: t('inpi_verification.not_found_desc', "Le numéro saisi ne correspond à aucune société enregistrée dans le Registre National des Entreprises.") })] }), jsxs("div", { className: "bg-orange-50 border border-orange-200 rounded-lg p-4", children: [jsx("h3", { className: "font-medium text-orange-900 mb-2", children: t('errors.problems_detected', 'Problèmes détectés') }), jsxs("div", { className: "text-sm text-orange-800 space-y-1", children: [(d === null || d === void 0 ? void 0 : d.siren) && (jsxs("p", { children: [t('inpi_verification.siren_label', 'SIREN'), ' : ', jsx("strong", { children: d.siren })] })), jsx("p", { children:
|
|
388
|
+
return (jsxs("div", { className: "flex flex-col justify-between h-full w-full", children: [jsx("div", { className: "flex-1 px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxs("div", { className: "w-full max-w-md mx-auto space-y-6", children: [jsx("div", { className: "text-center", children: jsx("div", { className: "mx-auto w-16 h-16 bg-orange-100 rounded-full flex items-center justify-center mb-4", children: jsx("div", { className: "w-8 h-8 bg-orange-500 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-white text-lg font-bold", children: "!" }) }) }) }), jsxs("div", { className: "text-center space-y-4", children: [jsx(Title, { className: "text-xl md:text-2xl lg:text-3xl text-orange-600", children: t('inpi_verification.not_found_title', 'Société introuvable') }), jsx(Subtitle, { className: "text-sm text-gray-600 leading-relaxed", children: t('inpi_verification.not_found_desc', "Le numéro saisi ne correspond à aucune société enregistrée dans le Registre National des Entreprises.") }), jsx("span", { className: "inline-block rounded-full bg-red-100 px-3 py-1 text-xs font-semibold text-red-700", children: t('inpi_verification.not_found_rejected_label', 'Dossier rejeté') })] }), jsxs("div", { className: "bg-orange-50 border border-orange-200 rounded-lg p-4", children: [jsx("h3", { className: "font-medium text-orange-900 mb-2", children: t('errors.problems_detected', 'Problèmes détectés') }), jsxs("div", { className: "text-sm text-orange-800 space-y-1", children: [(d === null || d === void 0 ? void 0 : d.siren) && (jsxs("p", { children: [t('inpi_verification.siren_label', 'SIREN'), ' : ', jsx("strong", { children: d.siren })] })), jsx("p", { children: (d === null || d === void 0 ? void 0 : d.isDoubleNotFound)
|
|
389
|
+
? t('inpi_verification.not_found_detail_rne_rna', "Aucune société ni association trouvée, ni dans le Registre National des Entreprises (RNE), ni dans le Répertoire National des Associations (RNA).")
|
|
390
|
+
: t('inpi_verification.not_found_detail', 'Aucune société trouvée dans le Registre National des Entreprises.') })] })] })] }) }), jsx("div", { className: "sticky bottom-0 md:static bg-white border-t md:border-t-0 p-4 md:p-0 md:pb-8", children: jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxs("div", { className: "flex flex-col space-y-3 md:hidden", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-not-found-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), allowContinueOnFailure && (jsx(Button, { onClick: onNext, "data-cy": "inpi-not-found-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') }))] }), jsxs("div", { className: "hidden md:flex justify-center space-x-3", children: [jsx(Button, { variant: "secondary", onClick: handleCorrect, "data-cy": "inpi-not-found-go-back", children: t('inpi_verification.mismatch_correct', 'Corriger ma saisie') }), allowContinueOnFailure && (jsx(Button, { onClick: onNext, "data-cy": "inpi-not-found-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') }))] })] }) })] }));
|
|
343
391
|
}
|
|
344
392
|
// ─── Error / fallback ─────────────────────────────────────────────────────
|
|
345
393
|
return (jsx(LoadingState, { message: t('verification_node.verifying_title', 'Vérification en cours…'), subtitle: t('verification_node.verifying_desc', 'Vérification en cours…') }));
|