datakeen-session-react 1.1.140-dev.116 → 1.1.140-dev.127

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.
Files changed (38) hide show
  1. package/.gitlab-ci.yml +115 -56
  2. package/dist/cjs/components/document-collection/DocumentCollection.js +3 -1
  3. package/dist/cjs/components/document-collection/DocumentCollection.js.map +1 -1
  4. package/dist/cjs/components/document-collection/DocumentError.js +1 -1
  5. package/dist/cjs/components/document-collection/DocumentError.js.map +1 -1
  6. package/dist/cjs/components/jdi/JDIError.js +1 -1
  7. package/dist/cjs/components/jdi/JDIError.js.map +1 -1
  8. package/dist/cjs/components/session/DocumentCheck.js +3 -1
  9. package/dist/cjs/components/session/DocumentCheck.js.map +1 -1
  10. package/dist/cjs/components/session/Selfie.js +3 -1
  11. package/dist/cjs/components/session/Selfie.js.map +1 -1
  12. package/dist/cjs/components/session/UserInputForm/LegalRepFields.js +5 -1
  13. package/dist/cjs/components/session/UserInputForm/LegalRepFields.js.map +1 -1
  14. package/dist/cjs/components/template/ExternalVerificationNodeHandler.js +74 -36
  15. package/dist/cjs/components/template/ExternalVerificationNodeHandler.js.map +1 -1
  16. package/dist/cjs/constants/userInputForm.js.map +1 -1
  17. package/dist/cjs/hooks/useUserInputForm.js +11 -1
  18. package/dist/cjs/hooks/useUserInputForm.js.map +1 -1
  19. package/dist/cjs/types/session.js.map +1 -1
  20. package/dist/esm/components/document-collection/DocumentCollection.js +3 -1
  21. package/dist/esm/components/document-collection/DocumentCollection.js.map +1 -1
  22. package/dist/esm/components/document-collection/DocumentError.js +1 -1
  23. package/dist/esm/components/document-collection/DocumentError.js.map +1 -1
  24. package/dist/esm/components/jdi/JDIError.js +1 -1
  25. package/dist/esm/components/jdi/JDIError.js.map +1 -1
  26. package/dist/esm/components/session/DocumentCheck.js +3 -1
  27. package/dist/esm/components/session/DocumentCheck.js.map +1 -1
  28. package/dist/esm/components/session/Selfie.js +3 -1
  29. package/dist/esm/components/session/Selfie.js.map +1 -1
  30. package/dist/esm/components/session/UserInputForm/LegalRepFields.js +5 -1
  31. package/dist/esm/components/session/UserInputForm/LegalRepFields.js.map +1 -1
  32. package/dist/esm/components/template/ExternalVerificationNodeHandler.js +75 -37
  33. package/dist/esm/components/template/ExternalVerificationNodeHandler.js.map +1 -1
  34. package/dist/esm/constants/userInputForm.js.map +1 -1
  35. package/dist/esm/hooks/useUserInputForm.js +11 -1
  36. package/dist/esm/hooks/useUserInputForm.js.map +1 -1
  37. package/dist/esm/types/session.js.map +1 -1
  38. package/package.json +1 -1
@@ -53,7 +53,9 @@ var Selfie = function (_a) {
53
53
  stepObject.setStep(stepObject.step - 1);
54
54
  };
55
55
  console.log("[Selfie] buttonBgColor:", template.buttonBgColor, "buttonTextColor:", template.buttonTextColor);
56
- return (jsxs("div", { className: "h-full w-full transition-opacity duration-500 ".concat(isTransitioning ? "opacity-50" : "opacity-100"), children: [internalStep === 0 && (jsx(Video, { setSelfieData: setSelfieData, setStep: setInternalStep, onBack: handleBackToParent, btnBg: (_b = template.buttonBgColor) !== null && _b !== void 0 ? _b : "#11E5C5", btnText: (_c = template.buttonTextColor) !== null && _c !== void 0 ? _c : "#3C3C40" })), internalStep === 1 && selfieData && (jsx(SelfieConfirmation, { selfieData: selfieData, onConfirm: handleConfirmSelfie, onRetake: handleRetakeSelfie, setSelfiePhoto: setSelfiePhoto })), internalStep === 2 && selfieData && (jsx(SelfieProcessing, { onProcessingComplete: selfieProcessed, selfieVideo: selfieData, selfiePhoto: selfiePhoto, onRetake: onRetake, onContinueAnyway: handleContinueAnyway }))] }));
56
+ return (jsxs("div", { className: "h-full w-full transition-opacity duration-500 ".concat(isTransitioning ? "opacity-50" : "opacity-100"), children: [internalStep === 0 && (jsx(Video, { setSelfieData: setSelfieData, setStep: setInternalStep, onBack: handleBackToParent, btnBg: (_b = template.buttonBgColor) !== null && _b !== void 0 ? _b : "#11E5C5", btnText: (_c = template.buttonTextColor) !== null && _c !== void 0 ? _c : "#3C3C40" })), internalStep === 1 && selfieData && (jsx(SelfieConfirmation, { selfieData: selfieData, onConfirm: handleConfirmSelfie, onRetake: handleRetakeSelfie, setSelfiePhoto: setSelfiePhoto })), internalStep === 2 && selfieData && (jsx(SelfieProcessing, { onProcessingComplete: selfieProcessed, selfieVideo: selfieData, selfiePhoto: selfiePhoto, onRetake: onRetake, onContinueAnyway: node.allowContinueOnFailure === false
57
+ ? undefined
58
+ : handleContinueAnyway }))] }));
57
59
  };
58
60
 
59
61
  export { Selfie as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Selfie.js","sources":["../../../../../src/components/session/Selfie.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n SessionTemplate,\n SessionTemplateNode,\n stepObject,\n} from \"../../types/session\";\nimport Video from \"../selfie/Video\";\nimport SelfieConfirmation from \"../selfie/SelfieConfirmation\";\nimport type { SelfieCaptureData } from \"../../types/selfie\";\nimport SelfieProcessing from \"../selfie/selfie-flow/SelfieProcessing\";\nimport {\n updateSessionCurrentStep,\n getOrderedJourneySteps,\n} from \"../../services/sessionService\";\n\n/**\n * Composant de gestion du flux selfie.\n * Gère les étapes internes de capture et confirmation du selfie.\n */\nconst Selfie = ({\n stepObject,\n sessionId,\n node,\n template,\n}: {\n stepObject: stepObject;\n sessionId: string;\n node: SessionTemplateNode;\n template: SessionTemplate;\n}) => {\n const [internalStep, setInternalStep] = useState(0);\n const [selfieData, setSelfieData] = useState<SelfieCaptureData | null>(null);\n const [selfiePhoto, setSelfiePhoto] = useState<string | null>(null);\n const [isTransitioning, setIsTransitioning] = useState(false);\n\n const handleConfirmSelfie = () => {\n // Ajouter une transition visuelle avant de passer à l'étape suivante\n setIsTransitioning(true);\n\n // Attendre un peu pour l'animation avant de passer à l'étape suivante\n setTimeout(() => {\n setInternalStep(2); // Passer à l'étape de traitement du selfie\n setIsTransitioning(false);\n }, 500);\n };\n\n const selfieProcessed = (processed: boolean) => {\n // Callback pour indiquer que le selfie a été traité\n if (processed) {\n // Increment currentStep in database immediately after successful analysis\n // This prevents double analysis if the user refreshes the page\n updateSessionCurrentStep(sessionId, stepObject.step + 1).catch((error) => {\n console.error(\"Failed to update current step after successful analysis:\", error);\n });\n stepObject.goToNextStep(node.id, template);\n }\n };\n\n const handleContinueAnyway = () => {\n updateSessionCurrentStep(sessionId, stepObject.step + 1).catch((error) => {\n console.error(\"Failed to update current step after KO bypass:\", error);\n });\n stepObject.goToNextStep(node.id, template);\n };\n\n const onRetake = () => {\n setInternalStep(0);\n };\n\n const handleRetakeSelfie = () => {\n setInternalStep(0);\n };\n\n const handleBackToParent = () => {\n // Retourner à l'étape précédente du flow principal\n stepObject.setStep(stepObject.step - 1);\n };\n\n console.log(\"[Selfie] buttonBgColor:\", template.buttonBgColor, \"buttonTextColor:\", template.buttonTextColor);\n\n return (\n <div\n className={`h-full w-full transition-opacity duration-500 ${isTransitioning ? \"opacity-50\" : \"opacity-100\"\n }`}\n >\n {internalStep === 0 && (\n <Video\n setSelfieData={setSelfieData}\n setStep={setInternalStep}\n onBack={handleBackToParent}\n btnBg={template.buttonBgColor ?? \"#11E5C5\"}\n btnText={template.buttonTextColor ?? \"#3C3C40\"}\n />\n )}\n {internalStep === 1 && selfieData && (\n <SelfieConfirmation\n selfieData={selfieData}\n onConfirm={handleConfirmSelfie}\n onRetake={handleRetakeSelfie}\n setSelfiePhoto={setSelfiePhoto}\n />\n )}\n {internalStep === 2 && selfieData && (\n <SelfieProcessing\n onProcessingComplete={selfieProcessed}\n selfieVideo={selfieData}\n selfiePhoto={selfiePhoto}\n onRetake={onRetake}\n onContinueAnyway={handleContinueAnyway}\n />\n )}\n </div>\n );\n};\n\nexport default Selfie;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAeA;;;AAGG;AACH,IAAM,MAAM,GAAG,UAAC,EAUf,EAAA;;QATC,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,IAAI,GAAA,EAAA,CAAA,IAA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C/BA,GAAA,CAAC,kBAAkB,EAAA,EACjB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,kBAAkB,EAC5B,cAAc,EAAE,cAAc,EAAA,CAC9B,CACH,EACA,YAAY,KAAK,CAAC,IAAI,UAAU,KAC/BA,GAAA,CAAC,gBAAgB,EAAA,EACf,oBAAoB,EAAE,eAAe,EACrC,WAAW,EAAE,UAAU,EACvB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,oBAAoB,EAAA,CACtC,CACH,CAAA,EAAA,CACG;AAEV;;;;"}
1
+ {"version":3,"file":"Selfie.js","sources":["../../../../../src/components/session/Selfie.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport {\n SessionTemplate,\n SessionTemplateNode,\n stepObject,\n} from \"../../types/session\";\nimport Video from \"../selfie/Video\";\nimport SelfieConfirmation from \"../selfie/SelfieConfirmation\";\nimport type { SelfieCaptureData } from \"../../types/selfie\";\nimport SelfieProcessing from \"../selfie/selfie-flow/SelfieProcessing\";\nimport {\n updateSessionCurrentStep,\n getOrderedJourneySteps,\n} from \"../../services/sessionService\";\n\n/**\n * Composant de gestion du flux selfie.\n * Gère les étapes internes de capture et confirmation du selfie.\n */\nconst Selfie = ({\n stepObject,\n sessionId,\n node,\n template,\n}: {\n stepObject: stepObject;\n sessionId: string;\n node: SessionTemplateNode;\n template: SessionTemplate;\n}) => {\n const [internalStep, setInternalStep] = useState(0);\n const [selfieData, setSelfieData] = useState<SelfieCaptureData | null>(null);\n const [selfiePhoto, setSelfiePhoto] = useState<string | null>(null);\n const [isTransitioning, setIsTransitioning] = useState(false);\n\n const handleConfirmSelfie = () => {\n // Ajouter une transition visuelle avant de passer à l'étape suivante\n setIsTransitioning(true);\n\n // Attendre un peu pour l'animation avant de passer à l'étape suivante\n setTimeout(() => {\n setInternalStep(2); // Passer à l'étape de traitement du selfie\n setIsTransitioning(false);\n }, 500);\n };\n\n const selfieProcessed = (processed: boolean) => {\n // Callback pour indiquer que le selfie a été traité\n if (processed) {\n // Increment currentStep in database immediately after successful analysis\n // This prevents double analysis if the user refreshes the page\n updateSessionCurrentStep(sessionId, stepObject.step + 1).catch((error) => {\n console.error(\"Failed to update current step after successful analysis:\", error);\n });\n stepObject.goToNextStep(node.id, template);\n }\n };\n\n const handleContinueAnyway = () => {\n updateSessionCurrentStep(sessionId, stepObject.step + 1).catch((error) => {\n console.error(\"Failed to update current step after KO bypass:\", error);\n });\n stepObject.goToNextStep(node.id, template);\n };\n\n const onRetake = () => {\n setInternalStep(0);\n };\n\n const handleRetakeSelfie = () => {\n setInternalStep(0);\n };\n\n const handleBackToParent = () => {\n // Retourner à l'étape précédente du flow principal\n stepObject.setStep(stepObject.step - 1);\n };\n\n console.log(\"[Selfie] buttonBgColor:\", template.buttonBgColor, \"buttonTextColor:\", template.buttonTextColor);\n\n return (\n <div\n className={`h-full w-full transition-opacity duration-500 ${isTransitioning ? \"opacity-50\" : \"opacity-100\"\n }`}\n >\n {internalStep === 0 && (\n <Video\n setSelfieData={setSelfieData}\n setStep={setInternalStep}\n onBack={handleBackToParent}\n btnBg={template.buttonBgColor ?? \"#11E5C5\"}\n btnText={template.buttonTextColor ?? \"#3C3C40\"}\n />\n )}\n {internalStep === 1 && selfieData && (\n <SelfieConfirmation\n selfieData={selfieData}\n onConfirm={handleConfirmSelfie}\n onRetake={handleRetakeSelfie}\n setSelfiePhoto={setSelfiePhoto}\n />\n )}\n {internalStep === 2 && selfieData && (\n <SelfieProcessing\n onProcessingComplete={selfieProcessed}\n selfieVideo={selfieData}\n selfiePhoto={selfiePhoto}\n onRetake={onRetake}\n onContinueAnyway={\n node.allowContinueOnFailure === false\n ? undefined\n : handleContinueAnyway\n }\n />\n )}\n </div>\n );\n};\n\nexport default Selfie;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAeA;;;AAGG;AACH,IAAM,MAAM,GAAG,UAAC,EAUf,EAAA;;QATC,U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AAA,KAAA,MAAA,GAAA,EAAA,GAAI,SAAS,EAAA,CAC9C,CACH,EACA,YAAY,KAAK,CAAC,IAAI,UAAU,KAC/BA,GAAA,CAAC,kBAAkB,EAAA,EACjB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,kBAAkB,EAC5B,cAAc,EAAE,cAAc,EAAA,CAC9B,CACH,EACA,YAAY,KAAK,CAAC,IAAI,UAAU,KAC/BA,GAAA,CAAC,gBAAgB,EAAA,EACf,oBAAoB,EAAE,eAAe,EACrC,WAAW,EAAE,UAAU,EACvB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EACd,IAAI,CAAC,sBAAsB,KAAK;AAC9B,sBAAE;AACF,sBAAE,oBAAoB,EAAA,CAE1B,CACH,CAAA,EAAA,CACG;AAEV;;;;"}
@@ -15,7 +15,11 @@ var LegalRepFields = function (_a) {
15
15
  return onFieldChange("legalRepresentativeFirstName", event.target.value);
16
16
  }, placeholder: t("user_input_form.placeholders.legal_representative_first_name", "Prénom"), className: clsx("w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent", errors.legalRepresentativeFirstName
17
17
  ? "border-red-500 bg-red-50"
18
- : "border-gray-300 hover-border-gray-400"), autoComplete: "off" }), errors.legalRepresentativeFirstName && (jsxs("p", { className: "text-red-600 text-sm flex items-center gap-1", children: [jsx("span", { className: "text-red-500", children: "\u26A0" }), t("user_input_form.errors.legal_representative_first_name_required")] }))] }))] }));
18
+ : "border-gray-300 hover-border-gray-400"), autoComplete: "off" }), errors.legalRepresentativeFirstName && (jsxs("p", { className: "text-red-600 text-sm flex items-center gap-1", children: [jsx("span", { className: "text-red-500", children: "\u26A0" }), t("user_input_form.errors.legal_representative_first_name_required")] }))] })), requestedFields.has("legalRepresentativeSiren") && (jsxs("div", { className: "space-y-2", children: [jsx(Label.Root, { htmlFor: "legalRepresentativeSiren", className: "block text-sm md:text-base font-semibold text-gray-900", children: t("user_input_form.fields.legal_representative_siren", "SIREN du représentant légal") }), jsx("input", { id: "legalRepresentativeSiren", type: "text", inputMode: "numeric", value: form.legalRepresentativeSiren || "", onChange: function (event) {
19
+ return onFieldChange("legalRepresentativeSiren", event.target.value);
20
+ }, placeholder: t("user_input_form.placeholders.legal_representative_siren", "9 chiffres"), className: clsx("w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent", errors.legalRepresentativeSiren
21
+ ? "border-red-500 bg-red-50"
22
+ : "border-gray-300 hover-border-gray-400"), autoComplete: "off" }), errors.legalRepresentativeSiren && (jsxs("p", { className: "text-red-600 text-sm flex items-center gap-1", children: [jsx("span", { className: "text-red-500", children: "\u26A0" }), t("user_input_form.errors.legal_representative_siren_required")] }))] }))] }));
19
23
  };
20
24
 
21
25
  export { LegalRepFields as default };
@@ -1 +1 @@
1
- {"version":3,"file":"LegalRepFields.js","sources":["../../../../../../src/components/session/UserInputForm/LegalRepFields.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport * as Label from \"@radix-ui/react-label\";\nimport clsx from \"clsx\";\nimport type {\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../../../types/userInputForm\";\nimport { useI18n } from \"../../../hooks/useI18n\";\n\ninterface LegalRepFieldsProps {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n requestedFields: RequestedFields;\n onFieldChange: (key: keyof UserInputFormState, value: string) => void;\n}\n\nconst LegalRepFields = ({\n form,\n errors,\n requestedFields,\n onFieldChange,\n}: LegalRepFieldsProps) => {\n const { t } = useI18n();\n\n return (\n <Fragment>\n {requestedFields.has(\"legalRepresentativeNom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeLastName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_last_name\",\n \"Nom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeLastName\"\n type=\"text\"\n value={form.legalRepresentativeLastName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeLastName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_last_name\",\n \"Nom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeLastName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeLastName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_last_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n\n {requestedFields.has(\"legalRepresentativePrenom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeFirstName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_first_name\",\n \"Prénom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeFirstName\"\n type=\"text\"\n value={form.legalRepresentativeFirstName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeFirstName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_first_name\",\n \"Prénom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeFirstName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeFirstName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_first_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n </Fragment>\n );\n};\n\nexport default LegalRepFields;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAiBA,IAAM,cAAc,GAAG,UAAC,EAKF,EAAA;QAJpB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,aAAa,GAAA,EAAA,CAAA,aAAA;AAEL,IAAA,IAAA,CAAC,GAAK,OAAO,EAAE,EAAd;IAET,QACEA,IAAA,CAAC,QAAQ,EAAA,EAAA,QAAA,EAAA,CACN,eAAe,CAAC,GAAG,CAAC,wBAAwB,CAAC,KAC5CA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,WAAW,EAAA,QAAA,EAAA,CACxBC,GAAA,CAAC,KAAK,CAAC,IAAI,EAAA,EACT,OAAO,EAAC,6BAA6B,EACrC,SAAS,EAAC,wDAAwD,YAEjE,CAAC,CACA,uDAAuD,EACvD,2BAA2B,CAC5B,EAAA,CACU,EACbA,GAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAC,6BAA6B,EAChC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,2BAA2B,IAAI,EAAE,EAC7C,QAAQ,EAAE,UAAC,KAAK,EAAA;4BACd,OAAA,aAAa,CAAC,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAAhE,wBAAA,CAAgE,EAElE,WAAW,EAAE,CAAC,CACZ,6DAA6D,EAC7D,KAAK,CACN,EACD,SAAS,EAAE,IAAI,CACb,sJAAsJ,EACtJ,MAAM,CAAC;AACL,8BAAE;AACF,8BAAE,uCAAuC,CAC5C,EACD,YAAY,EAAC,KAAK,EAAA,CAClB,EACD,MAAM,CAAC,2BAA2B,KACjCD,IAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,8CAA8C,aACzDC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,cAAc,uBAAS,EACtC,CAAC,CACA,gEAAgE,CACjE,IACC,CACL,CAAA,EAAA,CACG,CACP,EAEA,eAAe,CAAC,GAAG,CAAC,2BAA2B,CAAC,KAC/CD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,WAAW,aACxBC,GAAA,CAAC,KAAK,CAAC,IAAI,EAAA,EACT,OAAO,EAAC,8BAA8B,EACtC,SAAS,EAAC,wDAAwD,EAAA,QAAA,EAEjE,CAAC,CACA,wDAAwD,EACxD,8BAA8B,CAC/B,EAAA,CACU,EACbA,GAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAC,8BAA8B,EACjC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,4BAA4B,IAAI,EAAE,EAC9C,QAAQ,EAAE,UAAC,KAAK,EAAA;4BACd,OAAA,aAAa,CAAC,8BAA8B,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAAjE,wBAAA,CAAiE,EAEnE,WAAW,EAAE,CAAC,CACZ,8DAA8D,EAC9D,QAAQ,CACT,EACD,SAAS,EAAE,IAAI,CACb,sJAAsJ,EACtJ,MAAM,CAAC;AACL,8BAAE;AACF,8BAAE,uCAAuC,CAC5C,EACD,YAAY,EAAC,KAAK,EAAA,CAClB,EACD,MAAM,CAAC,4BAA4B,KAClCD,YAAG,SAAS,EAAC,8CAA8C,EAAA,QAAA,EAAA,CACzDC,cAAM,SAAS,EAAC,cAAc,EAAA,QAAA,EAAA,QAAA,EAAA,CAAS,EACtC,CAAC,CACA,iEAAiE,CAClE,IACC,CACL,CAAA,EAAA,CACG,CACP,CAAA,EAAA,CACQ;AAEf;;;;"}
1
+ {"version":3,"file":"LegalRepFields.js","sources":["../../../../../../src/components/session/UserInputForm/LegalRepFields.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport * as Label from \"@radix-ui/react-label\";\nimport clsx from \"clsx\";\nimport type {\n RequestedFields,\n UserInputFormErrors,\n UserInputFormState,\n} from \"../../../types/userInputForm\";\nimport { useI18n } from \"../../../hooks/useI18n\";\n\ninterface LegalRepFieldsProps {\n form: UserInputFormState;\n errors: UserInputFormErrors;\n requestedFields: RequestedFields;\n onFieldChange: (key: keyof UserInputFormState, value: string) => void;\n}\n\nconst LegalRepFields = ({\n form,\n errors,\n requestedFields,\n onFieldChange,\n}: LegalRepFieldsProps) => {\n const { t } = useI18n();\n\n return (\n <Fragment>\n {requestedFields.has(\"legalRepresentativeNom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeLastName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_last_name\",\n \"Nom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeLastName\"\n type=\"text\"\n value={form.legalRepresentativeLastName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeLastName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_last_name\",\n \"Nom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeLastName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeLastName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_last_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n\n {requestedFields.has(\"legalRepresentativePrenom\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeFirstName\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_first_name\",\n \"Prénom du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeFirstName\"\n type=\"text\"\n value={form.legalRepresentativeFirstName || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeFirstName\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_first_name\",\n \"Prénom\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeFirstName\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeFirstName && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_first_name_required\",\n )}\n </p>\n )}\n </div>\n )}\n\n {/* RL personne morale (délégation de pouvoir) : remplace Nom/Prénom par\n le SIREN de la société mandataire. Mode fixé par le concepteur du\n parcours (requestedFields), jamais choisi par l'utilisateur final. */}\n {requestedFields.has(\"legalRepresentativeSiren\") && (\n <div className=\"space-y-2\">\n <Label.Root\n htmlFor=\"legalRepresentativeSiren\"\n className=\"block text-sm md:text-base font-semibold text-gray-900\"\n >\n {t(\n \"user_input_form.fields.legal_representative_siren\",\n \"SIREN du représentant légal\",\n )}\n </Label.Root>\n <input\n id=\"legalRepresentativeSiren\"\n type=\"text\"\n inputMode=\"numeric\"\n value={form.legalRepresentativeSiren || \"\"}\n onChange={(event) =>\n onFieldChange(\"legalRepresentativeSiren\", event.target.value)\n }\n placeholder={t(\n \"user_input_form.placeholders.legal_representative_siren\",\n \"9 chiffres\",\n )}\n className={clsx(\n \"w-full px-3 py-3 md:py-4 border rounded-lg text-base transition-colors focus:outline-none focus:ring-2 focus:ring-[#11E5C5] focus:border-transparent\",\n errors.legalRepresentativeSiren\n ? \"border-red-500 bg-red-50\"\n : \"border-gray-300 hover-border-gray-400\",\n )}\n autoComplete=\"off\"\n />\n {errors.legalRepresentativeSiren && (\n <p className=\"text-red-600 text-sm flex items-center gap-1\">\n <span className=\"text-red-500\">⚠</span>\n {t(\n \"user_input_form.errors.legal_representative_siren_required\",\n )}\n </p>\n )}\n </div>\n )}\n </Fragment>\n );\n};\n\nexport default LegalRepFields;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAiBA,IAAM,cAAc,GAAG,UAAC,EAKF,EAAA;QAJpB,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,aAAa,GAAA,EAAA,CAAA,aAAA;AAEL,IAAA,IAAA,CAAC,GAAK,OAAO,EAAE,EAAd;IAET,QACEA,IAAA,CAAC,QAAQ,EAAA,EAAA,QAAA,EAAA,CACN,eAAe,CAAC,GAAG,CAAC,wBAAwB,CAAC,KAC5CA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,WAAW,EAAA,QAAA,EAAA,CACxBC,GAAA,CAAC,KAAK,CAAC,IAAI,EAAA,EACT,OAAO,EAAC,6BAA6B,EACrC,SAAS,EAAC,wDAAwD,YAEjE,CAAC,CACA,uDAAuD,EACvD,2BAA2B,CAC5B,EAAA,CACU,EACbA,GAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAC,6BAA6B,EAChC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,2BAA2B,IAAI,EAAE,EAC7C,QAAQ,EAAE,UAAC,KAAK,EAAA;4BACd,OAAA,aAAa,CAAC,6BAA6B,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAAhE,wBAAA,CAAgE,EAElE,WAAW,EAAE,CAAC,CACZ,6DAA6D,EAC7D,KAAK,CACN,EACD,SAAS,EAAE,IAAI,CACb,sJAAsJ,EACtJ,MAAM,CAAC;AACL,8BAAE;AACF,8BAAE,uCAAuC,CAC5C,EACD,YAAY,EAAC,KAAK,EAAA,CAClB,EACD,MAAM,CAAC,2BAA2B,KACjCD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AAC,KAAK,CAAC,IAAI,EAAA,EACT,OAAO,EAAC,0BAA0B,EAClC,SAAS,EAAC,wDAAwD,EAAA,QAAA,EAEjE,CAAC,CACA,mDAAmD,EACnD,6BAA6B,CAC9B,EAAA,CACU,EACbA,GAAA,CAAA,OAAA,EAAA,EACE,EAAE,EAAC,0BAA0B,EAC7B,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,IAAI,CAAC,wBAAwB,IAAI,EAAE,EAC1C,QAAQ,EAAE,UAAC,KAAK,EAAA;4BACd,OAAA,aAAa,CAAC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;AAA7D,wBAAA,CAA6D,EAE/D,WAAW,EAAE,CAAC,CACZ,yDAAyD,EACzD,YAAY,CACb,EACD,SAAS,EAAE,IAAI,CACb,sJAAsJ,EACtJ,MAAM,CAAC;AACL,8BAAE;AACF,8BAAE,uCAAuC,CAC5C,EACD,YAAY,EAAC,KAAK,EAAA,CAClB,EACD,MAAM,CAAC,wBAAwB,KAC9BD,YAAG,SAAS,EAAC,8CAA8C,EAAA,QAAA,EAAA,CACzDC,cAAM,SAAS,EAAC,cAAc,EAAA,QAAA,EAAA,QAAA,EAAA,CAAS,EACtC,CAAC,CACA,4DAA4D,CAC7D,IACC,CACL,CAAA,EAAA,CACG,CACP,CAAA,EAAA,CACQ;AAEf;;;;"}
@@ -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,6 +65,9 @@ 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 () {
@@ -104,10 +114,10 @@ var ExternalVerificationNodeHandler = function (_a) {
104
114
  useEffect(function () {
105
115
  var abortController = new AbortController();
106
116
  var run = function () { return __awaiter(void 0, void 0, void 0, function () {
107
- 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;
108
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
109
- return __generator(this, function (_s) {
110
- switch (_s.label) {
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) {
111
121
  case 0:
112
122
  result = {
113
123
  isVerified: false,
@@ -120,9 +130,10 @@ var ExternalVerificationNodeHandler = function (_a) {
120
130
  referenceVariable = String(nodeData.referenceVariable || '');
121
131
  submittedFirstName = '';
122
132
  submittedLastName = '';
123
- _s.label = 1;
133
+ submittedSiren = '';
134
+ _v.label = 1;
124
135
  case 1:
125
- _s.trys.push([1, 9, , 10]);
136
+ _v.trys.push([1, 9, , 10]);
126
137
  if (!(session === null || session === void 0 ? void 0 : session.id))
127
138
  throw new Error('Session ID is missing');
128
139
  referenceField = normalizeReferenceField(String(nodeData.referenceField || referenceVariable || ''));
@@ -172,45 +183,62 @@ var ExternalVerificationNodeHandler = function (_a) {
172
183
  cfg = nodeData.comparisonConfig;
173
184
  personNodeInput = (_d = userInput[cfg.personReferenceNodeId]) !== null && _d !== void 0 ? _d : {};
174
185
  flat = userInput;
175
- firstNameKeys = expandFieldKey((_e = cfg.personFirstNameField) !== null && _e !== void 0 ? _e : '').filter(Boolean);
176
- lastNameKeys = expandFieldKey((_f = cfg.personLastNameField) !== null && _f !== void 0 ? _f : '').filter(Boolean);
177
- birthDateKeys = cfg.personBirthDateField
178
- ? expandFieldKey(cfg.personBirthDateField).filter(Boolean)
179
- : [];
180
- submittedFirstName = (_g = resolveFieldValue(personNodeInput, flat, firstNameKeys)) !== null && _g !== void 0 ? _g : '';
181
- submittedLastName = (_h = resolveFieldValue(personNodeInput, flat, lastNameKeys)) !== null && _h !== void 0 ? _h : '';
182
- dateOfBirth = cfg.compareBirthDate && birthDateKeys.length
183
- ? resolveFieldValue(personNodeInput, flat, birthDateKeys)
184
- : undefined;
185
- if (submittedFirstName && submittedLastName) {
186
- comparisonConfig = __assign({ firstName: submittedFirstName, lastName: submittedLastName, compareTargets: (_j = cfg.compareTargets) !== null && _j !== void 0 ? _j : ['mandataires'] }, (dateOfBirth ? { dateOfBirth: dateOfBirth } : {}));
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
+ }
187
215
  }
188
216
  }
189
217
  if (isInpiRbe)
190
218
  advanceStep(1);
191
- _s.label = 4;
219
+ _v.label = 4;
192
220
  case 4:
193
- _s.trys.push([4, 7, , 8]);
221
+ _v.trys.push([4, 7, , 8]);
194
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 })];
195
223
  case 5:
196
- response = _s.sent();
224
+ response = _v.sent();
197
225
  if (isInpiRbe)
198
226
  advanceStep(2);
199
227
  return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 600); })];
200
228
  case 6:
201
- _s.sent();
202
- res = (_k = response.data) === null || _k === void 0 ? void 0 : _k.data;
229
+ _v.sent();
230
+ res = (_m = response.data) === null || _m === void 0 ? void 0 : _m.data;
203
231
  if (res && typeof res.isVerified === 'boolean') {
204
232
  result = res;
205
233
  }
206
234
  return [3 /*break*/, 8];
207
235
  case 7:
208
- apiErr_1 = _s.sent();
236
+ apiErr_1 = _v.sent();
209
237
  if (abortController.signal.aborted)
210
238
  return [2 /*return*/];
211
239
  if (isInpiRbe)
212
240
  advanceStep(2);
213
- apiResult = (_m = (_l = apiErr_1 === null || apiErr_1 === void 0 ? void 0 : apiErr_1.response) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m.data;
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;
214
242
  if (apiResult && typeof apiResult.isVerified === 'boolean') {
215
243
  result = apiResult;
216
244
  }
@@ -225,7 +253,7 @@ var ExternalVerificationNodeHandler = function (_a) {
225
253
  return [3 /*break*/, 8];
226
254
  case 8: return [3 /*break*/, 10];
227
255
  case 9:
228
- _s.sent();
256
+ _v.sent();
229
257
  result = {
230
258
  isVerified: false,
231
259
  status: 'external_error',
@@ -255,13 +283,21 @@ var ExternalVerificationNodeHandler = function (_a) {
255
283
  if (result.status === 'person_mismatch') {
256
284
  inpi = result.inpiData;
257
285
  cfg = nodeData.comparisonConfig;
286
+ isPersonneMorale_1 = (cfg === null || cfg === void 0 ? void 0 : cfg.personType) === 'MORALE';
258
287
  setErrorScreenData({
259
288
  submittedLastName: submittedLastName,
260
289
  submittedFirstName: submittedFirstName,
261
- mandataires: ((_o = inpi === null || inpi === void 0 ? void 0 : inpi.mandataires) !== null && _o !== void 0 ? _o : []).filter(function (m) { return m.type === 'individu'; }),
262
- beneficiairesEffectifs: (_p = inpi === null || inpi === void 0 ? void 0 : inpi.beneficiairesEffectifs) !== null && _p !== void 0 ? _p : [],
263
- compareTargets: (_q = cfg === null || cfg === void 0 ? void 0 : cfg.compareTargets) !== null && _q !== void 0 ? _q : ['mandataires'],
264
- personNodeId: (_r = cfg === null || cfg === void 0 ? void 0 : cfg.personReferenceNodeId) !== null && _r !== void 0 ? _r : '',
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,
265
301
  siren: resolvedReferenceValue,
266
302
  sirenNodeId: referenceNodeId,
267
303
  source: inpi === null || inpi === void 0 ? void 0 : inpi.source,
@@ -336,20 +372,22 @@ var ExternalVerificationNodeHandler = function (_a) {
336
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'))
337
373
  ? t('inpi_verification.mandataires_label', 'Mandataires renseignés au RNE')
338
374
  : t('inpi_verification.persons_label', 'Personnes renseignées au RNE');
339
- 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: 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) && (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.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) {
340
- var _a, _b;
341
- return (jsxs("p", { children: [jsx("strong", { children: (_a = m.nom) !== null && _a !== void 0 ? _a : '' }), ((_b = m.prenoms) !== null && _b !== void 0 ? _b : []).length > 0 && " ".concat(m.prenoms.join(' '))] }, "m-".concat(i)));
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)));
342
380
  }), showBeneficiaires && d.beneficiairesEffectifs.map(function (b, i) {
343
381
  var _a, _b;
344
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)));
345
- })] })] }))] }) }), 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') }))] })] }) })] }));
346
384
  }
347
385
  // ─── Not found phase ───────────────────────────────────────────────────────
348
386
  if (phase === 'not_found') {
349
387
  var d = errorScreenData;
350
- 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: (d === null || d === void 0 ? void 0 : d.isDoubleNotFound)
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)
351
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).")
352
- : 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') }), 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') }), jsx(Button, { onClick: onNext, "data-cy": "inpi-not-found-continue", children: t('inpi_verification.mismatch_continue', 'Continuer quand même') })] })] }) })] }));
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') }))] })] }) })] }));
353
391
  }
354
392
  // ─── Error / fallback ─────────────────────────────────────────────────────
355
393
  return (jsx(LoadingState, { message: t('verification_node.verifying_title', 'Vérification en cours…'), subtitle: t('verification_node.verifying_desc', 'Vérification en cours…') }));