datakeen-session-react 1.1.195-dev.12 → 1.1.195-dev.14

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.
@@ -14,6 +14,9 @@ var analysisErrors = require('../../utils/analysisErrors.js');
14
14
  var DocumentError = function (_a) {
15
15
  var documentType = _a.documentType, documentTypeLabel = _a.documentTypeLabel, onRetry = _a.onRetry, onContinueAnyway = _a.onContinueAnyway, onBackToUserInput = _a.onBackToUserInput, _b = _a.retryCount, retryCount = _b === void 0 ? 0 : _b, _c = _a.predictions, predictions = _c === void 0 ? [] : _c; _a.errorDetails; _a.allowResubmission; var maxResubmissionAttempts = _a.maxResubmissionAttempts, _d = _a.isRetryAllowed, isRetryAllowed = _d === void 0 ? true : _d, errorCode = _a.errorCode, _e = _a.blockContinue, blockContinue = _e === void 0 ? false : _e;
16
16
  var t = useI18n.useI18n().t;
17
+ // APP3-1955: a service refusal (no credits / quota) blocks the journey,
18
+ // whatever node.allowContinueOnFailure says.
19
+ var continueAnyway = analysisErrors.isServiceErrorCode(errorCode) ? undefined : onContinueAnyway;
17
20
  var _f = React.useState([]), validationPoints = _f[0], setValidationPoints = _f[1];
18
21
  React.useEffect(function () {
19
22
  // Use shared utility to get validation points
@@ -62,7 +65,7 @@ var DocumentError = function (_a) {
62
65
  : t("errors.resubmission.no_resubmission_allowed") })] })), !blockContinue && getUserGuidance() && (jsxRuntime.jsxs("div", { className: "bg-yellow-50 border border-yellow-200 rounded-lg p-4", children: [jsxRuntime.jsx("h3", { className: "font-medium text-yellow-900 mb-2", children: analysisErrors.isServiceErrorCode(errorCode)
63
66
  ? // Quota / out of credits: nothing for the end user to improve.
64
67
  t("errors.service_refusal_title")
65
- : "\uD83D\uDCA1 ".concat(t("errors.improvement_tips", "Conseils d'amélioration")) }), jsxRuntime.jsx("p", { className: "text-sm text-yellow-800", children: getUserGuidance() })] })), !blockContinue && isRetryAllowed && (jsxRuntime.jsxs("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: [jsxRuntime.jsx("h3", { className: "font-medium text-blue-900 mb-2", children: t("errors.next_steps", "Prochaines étapes") }), jsxRuntime.jsx("p", { className: "text-sm text-blue-800", children: t("errors.next_steps_description", "Veuillez reprendre les photos de votre document en suivant les conseils d'amélioration pour une meilleure qualité.") })] }))] }) }), jsxRuntime.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: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxRuntime.jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }), jsxRuntime.jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsxRuntime.jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "continue", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }) })] }) })] }));
68
+ : "\uD83D\uDCA1 ".concat(t("errors.improvement_tips", "Conseils d'amélioration")) }), jsxRuntime.jsx("p", { className: "text-sm text-yellow-800", children: getUserGuidance() })] })), !blockContinue && isRetryAllowed && (jsxRuntime.jsxs("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: [jsxRuntime.jsx("h3", { className: "font-medium text-blue-900 mb-2", children: t("errors.next_steps", "Prochaines étapes") }), jsxRuntime.jsx("p", { className: "text-sm text-blue-800", children: t("errors.next_steps_description", "Veuillez reprendre les photos de votre document en suivant les conseils d'amélioration pour une meilleure qualité.") })] }))] }) }), jsxRuntime.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: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxRuntime.jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }), jsxRuntime.jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsxRuntime.jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "continue", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }) })] }) })] }));
66
69
  };
67
70
 
68
71
  exports.default = DocumentError;
@@ -18,6 +18,9 @@ var JDIError = function (_a) {
18
18
  var _b;
19
19
  _a.documentType; var onRetry = _a.onRetry, onContinueAnyway = _a.onContinueAnyway, onBackToUserInput = _a.onBackToUserInput, _c = _a.retryCount, retryCount = _c === void 0 ? 0 : _c, _d = _a.predictions, predictions = _d === void 0 ? DEFAULT_PREDICTIONS : _d, errorCode = _a.errorCode; _a.allowResubmission; var maxResubmissionAttempts = _a.maxResubmissionAttempts, _e = _a.isRetryAllowed, isRetryAllowed = _e === void 0 ? true : _e, _f = _a.blockContinue, blockContinue = _f === void 0 ? false : _f;
20
20
  var t = useI18n.useI18n().t;
21
+ // APP3-1955: a service refusal (no credits / quota) blocks the journey,
22
+ // whatever node.allowContinueOnFailure says.
23
+ var continueAnyway = analysisErrors.isServiceErrorCode(errorCode) ? undefined : onContinueAnyway;
21
24
  var _g = React.useState([]), validationPoints = _g[0], setValidationPoints = _g[1];
22
25
  // Détail de mismatch d'identité (code 7.0), calculé côté backend et porté
23
26
  // par la première prédiction. Absent pour tous les autres codes.
@@ -33,7 +36,7 @@ var JDIError = function (_a) {
33
36
  var guidance = t("user_guidance.".concat(errorCode), "");
34
37
  return guidance || null;
35
38
  };
36
- return (jsxRuntime.jsx(MobilePageLayout.default, { footer: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxRuntime.jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsxRuntime.jsx(Button.default, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsxRuntime.jsx(Button.default, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })), !isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(Button.default, { onClick: onContinueAnyway, className: "w-full py-3", children: t("errors.continue_anyway") }))] })) }), jsxRuntime.jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsxRuntime.jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })), !isRetryAllowed && onContinueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onContinueAnyway, type: "continue", children: t("errors.continue_anyway") }))] })) }) })] }), children: jsxRuntime.jsx("div", { className: "px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto space-y-6", children: [jsxRuntime.jsx("div", { className: "text-center", children: jsxRuntime.jsx("div", { className: "mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4", children: jsxRuntime.jsx("div", { className: "w-8 h-8 bg-red-500 rounded-full flex items-center justify-center", children: jsxRuntime.jsx("span", { className: "text-white text-lg", children: "\u2715" }) }) }) }), jsxRuntime.jsxs("div", { className: "text-center space-y-4", children: [jsxRuntime.jsx(Title.default, { className: "text-xl md:text-2xl lg:text-3xl text-red-600", children: blockContinue
39
+ return (jsxRuntime.jsx(MobilePageLayout.default, { footer: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsxRuntime.jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsxRuntime.jsx(Button.default, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsxRuntime.jsx(Button.default, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })), !isRetryAllowed && continueAnyway && (jsxRuntime.jsx(Button.default, { onClick: continueAnyway, className: "w-full py-3", children: t("errors.continue_anyway") }))] })) }), jsxRuntime.jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsxRuntime.jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [onBackToUserInput && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onBackToUserInput, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })), !isRetryAllowed && continueAnyway && (jsxRuntime.jsx(ButtonDesktop.default, { onClick: continueAnyway, type: "continue", children: t("errors.continue_anyway") }))] })) }) })] }), children: jsxRuntime.jsx("div", { className: "px-4 py-6 pt-11 md:px-8 md:py-8", children: jsxRuntime.jsxs("div", { className: "w-full max-w-md mx-auto space-y-6", children: [jsxRuntime.jsx("div", { className: "text-center", children: jsxRuntime.jsx("div", { className: "mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4", children: jsxRuntime.jsx("div", { className: "w-8 h-8 bg-red-500 rounded-full flex items-center justify-center", children: jsxRuntime.jsx("span", { className: "text-white text-lg", children: "\u2715" }) }) }) }), jsxRuntime.jsxs("div", { className: "text-center space-y-4", children: [jsxRuntime.jsx(Title.default, { className: "text-xl md:text-2xl lg:text-3xl text-red-600", children: blockContinue
37
40
  ? t("errors.upload_not_confirmed.title")
38
41
  : t("errors.verification_failed") }), jsxRuntime.jsx(Subtitle.default, { className: "text-sm text-gray-600 leading-relaxed", children: blockContinue
39
42
  ? t("errors.upload_not_confirmed.subtitle")
@@ -14,7 +14,8 @@ function getSessionCredential(sessionId) {
14
14
  function credentialForRequest(url) {
15
15
  if (/^[a-z]+:/i.test(url) || url.startsWith('//'))
16
16
  return undefined;
17
- var match = url.match(/^\/?session\/sdk\/([^/?]+)/);
17
+ // Routes SDK et biométrie Unissey : toutes adressent une seule session par son id.
18
+ var match = url.match(/^\/?session\/(?:sdk|unissey)\/([^/?]+)/);
18
19
  return match ? credentials.get(decodeURIComponent(match[1])) : undefined;
19
20
  }
20
21
 
@@ -10,6 +10,9 @@ import { isServiceErrorCode } from '../../utils/analysisErrors.js';
10
10
  var DocumentError = function (_a) {
11
11
  var documentType = _a.documentType, documentTypeLabel = _a.documentTypeLabel, onRetry = _a.onRetry, onContinueAnyway = _a.onContinueAnyway, onBackToUserInput = _a.onBackToUserInput, _b = _a.retryCount, retryCount = _b === void 0 ? 0 : _b, _c = _a.predictions, predictions = _c === void 0 ? [] : _c; _a.errorDetails; _a.allowResubmission; var maxResubmissionAttempts = _a.maxResubmissionAttempts, _d = _a.isRetryAllowed, isRetryAllowed = _d === void 0 ? true : _d, errorCode = _a.errorCode, _e = _a.blockContinue, blockContinue = _e === void 0 ? false : _e;
12
12
  var t = useI18n().t;
13
+ // APP3-1955: a service refusal (no credits / quota) blocks the journey,
14
+ // whatever node.allowContinueOnFailure says.
15
+ var continueAnyway = isServiceErrorCode(errorCode) ? undefined : onContinueAnyway;
13
16
  var _f = useState([]), validationPoints = _f[0], setValidationPoints = _f[1];
14
17
  useEffect(function () {
15
18
  // Use shared utility to get validation points
@@ -58,7 +61,7 @@ var DocumentError = function (_a) {
58
61
  : t("errors.resubmission.no_resubmission_allowed") })] })), !blockContinue && getUserGuidance() && (jsxs("div", { className: "bg-yellow-50 border border-yellow-200 rounded-lg p-4", children: [jsx("h3", { className: "font-medium text-yellow-900 mb-2", children: isServiceErrorCode(errorCode)
59
62
  ? // Quota / out of credits: nothing for the end user to improve.
60
63
  t("errors.service_refusal_title")
61
- : "\uD83D\uDCA1 ".concat(t("errors.improvement_tips", "Conseils d'amélioration")) }), jsx("p", { className: "text-sm text-yellow-800", children: getUserGuidance() })] })), !blockContinue && isRetryAllowed && (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: t("errors.next_steps", "Prochaines étapes") }), jsx("p", { className: "text-sm text-blue-800", children: t("errors.next_steps_description", "Veuillez reprendre les photos de votre document en suivant les conseils d'amélioration pour une meilleure qualité.") })] }))] }) }), 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: [jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }), jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "continue", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }) })] }) })] }));
64
+ : "\uD83D\uDCA1 ".concat(t("errors.improvement_tips", "Conseils d'amélioration")) }), jsx("p", { className: "text-sm text-yellow-800", children: getUserGuidance() })] })), !blockContinue && isRetryAllowed && (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: t("errors.next_steps", "Prochaines étapes") }), jsx("p", { className: "text-sm text-blue-800", children: t("errors.next_steps_description", "Veuillez reprendre les photos de votre document en suivant les conseils d'amélioration pour une meilleure qualité.") })] }))] }) }), 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: [jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }), jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", children: t("errors.back_to_user_input", "Retour aux informations d'identité") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "back", children: t("errors.continue_anyway", "Poursuivre tout de même") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification", "Recommencer la vérification") })), !isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "continue", children: t("errors.continue_anyway", "Poursuivre tout de même") }))] })) }) })] }) })] }));
62
65
  };
63
66
 
64
67
  export { DocumentError as default };
@@ -14,6 +14,9 @@ var JDIError = function (_a) {
14
14
  var _b;
15
15
  _a.documentType; var onRetry = _a.onRetry, onContinueAnyway = _a.onContinueAnyway, onBackToUserInput = _a.onBackToUserInput, _c = _a.retryCount, retryCount = _c === void 0 ? 0 : _c, _d = _a.predictions, predictions = _d === void 0 ? DEFAULT_PREDICTIONS : _d, errorCode = _a.errorCode; _a.allowResubmission; var maxResubmissionAttempts = _a.maxResubmissionAttempts, _e = _a.isRetryAllowed, isRetryAllowed = _e === void 0 ? true : _e, _f = _a.blockContinue, blockContinue = _f === void 0 ? false : _f;
16
16
  var t = useI18n().t;
17
+ // APP3-1955: a service refusal (no credits / quota) blocks the journey,
18
+ // whatever node.allowContinueOnFailure says.
19
+ var continueAnyway = isServiceErrorCode(errorCode) ? undefined : onContinueAnyway;
17
20
  var _g = useState([]), validationPoints = _g[0], setValidationPoints = _g[1];
18
21
  // Détail de mismatch d'identité (code 7.0), calculé côté backend et porté
19
22
  // par la première prédiction. Absent pour tous les autres codes.
@@ -29,7 +32,7 @@ var JDIError = function (_a) {
29
32
  var guidance = t("user_guidance.".concat(errorCode), "");
30
33
  return guidance || null;
31
34
  };
32
- return (jsx(MobilePageLayout, { footer: jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsx(Button, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsx(Button, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })), !isRetryAllowed && onContinueAnyway && (jsx(Button, { onClick: onContinueAnyway, className: "w-full py-3", children: t("errors.continue_anyway") }))] })) }), jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })), !isRetryAllowed && onContinueAnyway && (jsx(ButtonDesktop, { onClick: onContinueAnyway, type: "continue", children: t("errors.continue_anyway") }))] })) }) })] }), children: jsx("div", { className: "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: blockContinue
35
+ return (jsx(MobilePageLayout, { footer: jsxs("div", { className: "w-full max-w-md mx-auto", children: [jsx("div", { className: "flex flex-col space-y-3 md:hidden", children: blockContinue ? (jsx(Button, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "back", className: "w-full text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsx(Button, { onClick: onRetry, className: "w-full py-3", children: t("errors.retry_verification") })), !isRetryAllowed && continueAnyway && (jsx(Button, { onClick: continueAnyway, className: "w-full py-3", children: t("errors.continue_anyway") }))] })) }), jsx("div", { className: "hidden md:flex flex-col space-y-3", children: jsx("div", { className: "flex justify-center space-x-3", children: blockContinue ? (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })) : (jsxs(Fragment, { children: [onBackToUserInput && (jsx(ButtonDesktop, { onClick: onBackToUserInput, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.back_to_user_input") })), retryCount >= 1 && isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "back", className: "text-black text-center font-poppins text-sm font-medium py-2", children: t("errors.continue_anyway") })), isRetryAllowed && (jsx(ButtonDesktop, { onClick: onRetry, type: "continue", children: t("errors.retry_verification") })), !isRetryAllowed && continueAnyway && (jsx(ButtonDesktop, { onClick: continueAnyway, type: "continue", children: t("errors.continue_anyway") }))] })) }) })] }), children: jsx("div", { className: "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: blockContinue
33
36
  ? t("errors.upload_not_confirmed.title")
34
37
  : t("errors.verification_failed") }), jsx(Subtitle, { className: "text-sm text-gray-600 leading-relaxed", children: blockContinue
35
38
  ? t("errors.upload_not_confirmed.subtitle")
@@ -12,7 +12,8 @@ function getSessionCredential(sessionId) {
12
12
  function credentialForRequest(url) {
13
13
  if (/^[a-z]+:/i.test(url) || url.startsWith('//'))
14
14
  return undefined;
15
- var match = url.match(/^\/?session\/sdk\/([^/?]+)/);
15
+ // Routes SDK et biométrie Unissey : toutes adressent une seule session par son id.
16
+ var match = url.match(/^\/?session\/(?:sdk|unissey)\/([^/?]+)/);
16
17
  return match ? credentials.get(decodeURIComponent(match[1])) : undefined;
17
18
  }
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datakeen-session-react",
3
- "version": "1.1.195-dev.12",
3
+ "version": "1.1.195-dev.14",
4
4
  "description": "React SDK component to manage and render Datakeen session experiences easily.",
5
5
  "publishConfig": {
6
6
  "access": "public",