@idmission/websdk-ui 0.5.0 → 0.6.1

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 (78) hide show
  1. package/README.md +41 -3
  2. package/dist/flows/CompositeWizard.d.ts +21 -2
  3. package/dist/flows/CompositeWizard.d.ts.map +1 -1
  4. package/dist/flows/CompositeWizard.js +27 -15
  5. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +3 -3
  6. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
  7. package/dist/flows/CustomerBiometricsEnrollmentFlow.js +21 -2
  8. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +3 -3
  9. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
  10. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +41 -8
  11. package/dist/flows/DocumentCaptureFlow.d.ts +4 -3
  12. package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
  13. package/dist/flows/DocumentCaptureFlow.js +14 -8
  14. package/dist/flows/FaceValidationFlow.d.ts +2 -2
  15. package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
  16. package/dist/flows/FaceValidationFlow.js +7 -2
  17. package/dist/flows/FlowChassis.d.ts +17 -1
  18. package/dist/flows/FlowChassis.d.ts.map +1 -1
  19. package/dist/flows/FlowChassis.js +22 -5
  20. package/dist/flows/IdAndFaceValidationFlow.d.ts +3 -3
  21. package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
  22. package/dist/flows/IdAndFaceValidationFlow.js +29 -2
  23. package/dist/flows/IdValidationFlow.d.ts +10 -5
  24. package/dist/flows/IdValidationFlow.d.ts.map +1 -1
  25. package/dist/flows/IdValidationFlow.js +15 -2
  26. package/dist/flows/SignatureKYCFlow.d.ts +27 -6
  27. package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
  28. package/dist/flows/SignatureKYCFlow.js +60 -7
  29. package/dist/flows/SubmissionProvider.d.ts +12 -3
  30. package/dist/flows/SubmissionProvider.d.ts.map +1 -1
  31. package/dist/flows/SubmissionProvider.js +134 -15
  32. package/dist/flows/VideoIdValidationFlow.d.ts +3 -5
  33. package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
  34. package/dist/flows/VideoIdValidationFlow.js +33 -2
  35. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +3 -2
  36. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -1
  37. package/dist/flows/customerMatch/CustomerMatchCapture.js +5 -6
  38. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +13 -4
  39. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
  40. package/dist/flows/customerMatch/CustomerMatchFlow.js +14 -8
  41. package/dist/flows/flowSettings.d.ts +11 -0
  42. package/dist/flows/flowSettings.d.ts.map +1 -0
  43. package/dist/flows/flowSettings.js +20 -0
  44. package/dist/flows/overlays.d.ts +2 -0
  45. package/dist/flows/overlays.d.ts.map +1 -1
  46. package/dist/flows/overlays.js +28 -10
  47. package/dist/flows/signatureStep.d.ts +6 -1
  48. package/dist/flows/signatureStep.d.ts.map +1 -1
  49. package/dist/flows/types.d.ts +103 -7
  50. package/dist/flows/types.d.ts.map +1 -1
  51. package/dist/flows/videoIdSteps.d.ts +2 -2
  52. package/dist/flows/videoIdSteps.d.ts.map +1 -1
  53. package/dist/i18n/index.d.ts +5 -1
  54. package/dist/i18n/index.d.ts.map +1 -1
  55. package/dist/i18n/index.js +12 -1
  56. package/dist/i18n/locales/threeOh.d.ts +1 -0
  57. package/dist/i18n/locales/threeOh.d.ts.map +1 -1
  58. package/dist/i18n/locales/threeOh.js +195 -1
  59. package/dist/index.d.ts +1 -1
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/testing/fakeClient.d.ts +41 -2
  62. package/dist/testing/fakeClient.d.ts.map +1 -1
  63. package/dist/testing/fakeClient.js +71 -16
  64. package/dist/testing/index.d.ts +1 -1
  65. package/dist/testing/index.d.ts.map +1 -1
  66. package/dist/testing/index.js +1 -1
  67. package/dist/useIdmissionClient.d.ts +24 -3
  68. package/dist/useIdmissionClient.d.ts.map +1 -1
  69. package/dist/useIdmissionClient.js +46 -0
  70. package/dist/utils/mountOnly.d.ts +25 -0
  71. package/dist/utils/mountOnly.d.ts.map +1 -0
  72. package/dist/utils/mountOnly.js +111 -0
  73. package/dist/version.d.ts +1 -1
  74. package/dist/version.js +1 -1
  75. package/package.json +2 -2
  76. package/dist/flows/autoCaptureMountGuard.d.ts +0 -22
  77. package/dist/flows/autoCaptureMountGuard.d.ts.map +0 -1
  78. package/dist/flows/autoCaptureMountGuard.js +0 -61
@@ -1,13 +1,14 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from 'react';
3
3
  import { styled } from 'styled-components';
4
4
  import { AuthenticationError, NetworkError, SubmissionError, } from '@idmission/websdk-core/client';
5
5
  import { LoaderButton } from '../components/common/LoaderButton';
6
6
  import { OverlayContainer, OverlayImageContainer, OverlayInner, } from '../components/common/overlay';
7
- import { useTranslations, } from '../i18n';
7
+ import { useSdkTranslation, useTranslations, } from '../i18n';
8
8
  import { DEFAULT_CDN_URL } from '../utils/cdn';
9
- function MessageOverlay({ heading, children, onRetry, retryText = 'Retry', classNames = {}, }) {
10
- return (_jsx(OverlayContainer, { role: "alert", className: classNames.container, children: _jsxs(CenteredInner, { className: classNames.inner, children: [_jsx(AlertHeading, { className: classNames.heading, children: heading }), _jsx(Content, { className: classNames.description, children: children }), onRetry ? (_jsx(RetryButton, { variant: "warning", finished: true, onClick: onRetry, className: classNames.retryBtn, children: retryText })) : null] }) }));
9
+ function MessageOverlay({ heading, children, onRetry, retryText, classNames = {}, }) {
10
+ const { t } = useSdkTranslation();
11
+ return (_jsx(OverlayContainer, { role: "alert", className: classNames.container, children: _jsxs(CenteredInner, { className: classNames.inner, children: [_jsx(AlertHeading, { className: classNames.heading, children: heading }), _jsx(Content, { className: classNames.description, children: children }), onRetry ? (_jsx(RetryButton, { variant: "warning", finished: true, onClick: onRetry, className: classNames.retryBtn, children: retryText ?? t('Retry') })) : null] }) }));
11
12
  }
12
13
  function AlertHeading({ children, className, }) {
13
14
  const headingRef = useRef(null);
@@ -16,17 +17,29 @@ function AlertHeading({ children, className, }) {
16
17
  }, []);
17
18
  return (_jsx("h3", { ref: headingRef, tabIndex: -1, className: className, children: children }));
18
19
  }
20
+ // The four session screens below render straight from the chassis's AuthGate,
21
+ // so they take no verbiage bag; their copy follows the flow's `lang` through
22
+ // `t()`. Applicants see them, not just integrators: FAILED and ERROR come
23
+ // from an expired session or a network failure, and a misconfigured page
24
+ // shows the other two to whoever opens it. Keys stay inline literals so the
25
+ // locale audit can read them.
19
26
  export function SessionIdMissingOverlay({ classNames, }) {
20
- return (_jsxs(MessageOverlay, { heading: "IDmission WebSDK failed to load", classNames: classNames, children: ["Required property ", _jsx("code", { children: "sessionId" }), " is missing."] }));
27
+ const { t } = useSdkTranslation();
28
+ return (_jsx(MessageOverlay, { heading: t('IDmission WebSDK failed to load'), classNames: classNames, children: t('Required property sessionId is missing.') }));
21
29
  }
22
30
  export function AuthUrlNotAllowedOverlay({ classNames, }) {
23
- return (_jsxs(MessageOverlay, { heading: "IDmission WebSDK failed to load", classNames: classNames, children: ["Required property ", _jsx("code", { children: "authUrl" }), " comes from an unrecognized issuer."] }));
31
+ const { t } = useSdkTranslation();
32
+ return (_jsx(MessageOverlay, { heading: t('IDmission WebSDK failed to load'), classNames: classNames, children: t('Required property authUrl comes from an unrecognized issuer.') }));
24
33
  }
25
34
  export function SessionValidationFailedOverlay({ message, classNames, }) {
26
- return (_jsxs(MessageOverlay, { heading: "IDmission WebSDK failed to load", classNames: classNames, children: ["Required property ", _jsx("code", { children: "sessionId" }), " is not valid", message ? ` (${message})` : '', "."] }));
35
+ const { t } = useSdkTranslation();
36
+ return (_jsxs(MessageOverlay, { heading: t('IDmission WebSDK failed to load'), classNames: classNames, children: [t('Required property sessionId is not valid.'), message ? _jsx(Details, { children: message }) : null] }));
27
37
  }
28
38
  export function SessionValidationErrorOverlay({ error, onRetry, classNames, }) {
29
- return (_jsxs(MessageOverlay, { heading: "IDmission WebSDK failed to load", onRetry: onRetry, classNames: classNames, children: [error?.host ? (_jsxs(_Fragment, { children: ["Failed to reach ", _jsx("code", { children: error.host }), "."] })) : (_jsxs(_Fragment, { children: ["Failed to validate ", _jsx("code", { children: "sessionId" }), "."] })), error?.message ? _jsx(Details, { children: error.message }) : null] }));
39
+ const { t } = useSdkTranslation();
40
+ return (_jsxs(MessageOverlay, { heading: t('IDmission WebSDK failed to load'), onRetry: onRetry, classNames: classNames, children: [error?.host
41
+ ? t('Failed to reach {{host}}.', { host: error.host })
42
+ : t('Failed to validate sessionId.'), error?.message ? _jsx(Details, { children: error.message }) : null] }));
30
43
  }
31
44
  // Exported for the locale-parity gate, not for consumers (index.ts does not
32
45
  // re-export them): these three reach useTranslations through a PROP, so the
@@ -102,6 +115,7 @@ const SUBMISSION_FALLBACKS = {
102
115
  authenticationDescriptionText: 'Your session could not be authenticated. Please start a new session and try again.',
103
116
  networkHeadingText: 'Network unreachable',
104
117
  networkDescriptionText: "We're having trouble reaching our services, please check your connection and try again.",
118
+ unexpectedDescriptionText: 'The submission could not be completed.',
105
119
  retryBtnText: 'Retry',
106
120
  };
107
121
  export function SubmissionErrorOverlay({ error, onRetry, classNames = {}, verbiage, }) {
@@ -118,8 +132,12 @@ export function SubmissionErrorOverlay({ error, onRetry, classNames = {}, verbia
118
132
  ? text.authenticationDescriptionText
119
133
  : network
120
134
  ? text.networkDescriptionText
121
- : error?.message ?? 'The submission could not be completed.';
122
- return (_jsxs(MessageOverlay, { heading: heading, onRetry: onRetry, retryText: text.retryBtnText, classNames: classNames, children: [description, authentication ? _jsxs(Details, { children: ["Status ", error.statusCode] }) : null, submission && error.status.statusCode ? (_jsxs(Details, { children: ["Status ", error.status.statusCode] })) : null] }));
135
+ : text.unexpectedDescriptionText;
136
+ // The raw error text is diagnostic, not copy: it comes from the server or
137
+ // the request builder in English, so it sits beneath the translated
138
+ // description rather than replacing it.
139
+ const unexpectedDetail = !authentication && !network ? error?.message : undefined;
140
+ return (_jsxs(MessageOverlay, { heading: heading, onRetry: onRetry, retryText: text.retryBtnText, classNames: classNames, children: [description, unexpectedDetail ? _jsx(Details, { children: unexpectedDetail }) : null, authentication ? _jsxs(Details, { children: ["Status ", error.statusCode] }) : null, submission && error.status.statusCode ? (_jsxs(Details, { children: ["Status ", error.status.statusCode] })) : null] }));
123
141
  }
124
142
  const CenteredInner = styled(OverlayInner) `
125
143
  box-sizing: border-box;
@@ -1,9 +1,14 @@
1
1
  import type { SignatureCaptureController } from '@idmission/websdk-core/signatureCapture';
2
2
  import { type SignatureCaptureViewProps } from '../SignatureCaptureView';
3
3
  import type { CompositeWizardStep } from './CompositeWizard';
4
+ import type { DeprecatedStepSettings } from './types';
4
5
  /** sdk2's `boolean | (() => Promise<boolean>)` stage-inclusion prop shape. */
5
6
  export type SignatureStageDecision = boolean | (() => Promise<boolean>);
6
- export type SignatureFlowViewProps = Omit<SignatureCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted'>;
7
+ /**
8
+ * The signature step's bag. Its debug switch is `showCaptureDiagnostics`, which
9
+ * the flow's `debugMode` feeds, so only `lang` is deprecated here.
10
+ */
11
+ export type SignatureFlowViewProps = Omit<SignatureCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted' | 'lang'> & Pick<DeprecatedStepSettings, 'lang'>;
7
12
  export type BuildSignatureStepOptions = {
8
13
  captureSignature?: SignatureStageDecision;
9
14
  captureSignatureVideo?: SignatureStageDecision;
@@ -1 +1 @@
1
- {"version":3,"file":"signatureStep.d.ts","sourceRoot":"","sources":["../../src/flows/signatureStep.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,0BAA0B,EAAE,M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AAM,SAAS,CAAA;AAErD,8EAA8E;AAC9E,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;AAEvE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,yBAAyB,EACzB,YAAY,GAAG,cAAc,GAAG,aAAa,GAAG,MAAM,CACvD,GACC,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAA;AAEtC,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IACzC,qBAAqB,CAAC,EAAE,sBAAsB,CAAA;IAC9C,UAAU,EAAE,0BAA0B,CAAA;IACtC,IAAI,CAAC,EAAE,sBAAsB,CAAA;CAC9B,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,qBAAqB,CAAC,EAAE,sBAAsB,GAC7C,OAAO,CAET;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAChC,gBAAgB,CAAC,EAAE,sBAAsB,EACzC,qBAAqB,CAAC,EAAE,sBAAsB,GAC7C,OAAO,GAAG,OAAO,GAAG,IAAI,CAS1B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,IAAI,GACL,EAAE,yBAAyB,GAAG,mBAAmB,GAAG,IAAI,CAiBxD"}
@@ -1,12 +1,13 @@
1
1
  import type { CaptureProgressTask } from '@idmission/websdk-core/captureProgress';
2
2
  import type { ReactNode } from 'react';
3
- import type { IdmissionClient, LivenessOptions, SubmissionArtifacts, SubmissionCallbacks, SubmissionConfig, SubmissionResponse } from '@idmission/websdk-core/client';
3
+ import type { IdmissionClient, LivenessOptions, SubmissionArtifacts, SubmissionCallbacks, SubmissionConfig, SubmissionRequest, SubmissionResponse } from '@idmission/websdk-core/client';
4
4
  import type { IdCaptureController, IdCaptureControllerConfig } from '@idmission/websdk-core/idCapture';
5
5
  import type { SelfieCaptureController, SelfieCaptureControllerConfig, SelfieLivenessConfig } from '@idmission/websdk-core/selfieCapture';
6
6
  import type { RemoteDiagnostics } from '@idmission/websdk-core/diagnostics';
7
7
  import type { RingFinishingScreenClassNames, RingFinishingScreenVerbiage } from '../components/ring/RingFinishingScreen';
8
8
  import type { RingSuccessScreenClassNames, RingSuccessScreenVerbiage } from '../components/ring/RingSuccessScreen';
9
9
  import type { ThemeInput } from '../theme';
10
+ import type { LangOption } from '../i18n';
10
11
  import type { IdCaptureViewProps } from '../IdCaptureView';
11
12
  import type { FaceLivenessViewProps } from '../FaceLivenessView';
12
13
  import type { SelfieCaptureViewProps } from '../SelfieCaptureView';
@@ -19,6 +20,48 @@ export type FlowSubmissionConfig = SubmissionConfig;
19
20
  export type FlowResultCallbacks = SubmissionCallbacks & {
20
21
  onSubmitted?: (response: SubmissionResponse) => void;
21
22
  };
23
+ /**
24
+ * Receives the request a flow built instead of posting it. The flow ends as
25
+ * soon as this is called; it does not wait for a returned promise. A throw or
26
+ * rejection is logged and does not fail the flow, so retrying or reporting
27
+ * your own send is up to you.
28
+ */
29
+ export type SubmissionHandoff = (request: SubmissionRequest) => void | Promise<void>;
30
+ /**
31
+ * What a flow does once capture is complete:
32
+ *
33
+ * - `'post'`: the SDK posts the submission and reports the response
34
+ * (`onComplete`, `onApproved` / `onDenied`, `onSubmitted`).
35
+ * - `'capture'`: nothing is submitted; `onCaptured` receives the artifacts.
36
+ * - `{ handoff }`: the SDK builds the request, uploads included, and passes
37
+ * it to `handoff` instead of posting it.
38
+ *
39
+ * Each flow accepts the modes it can do. An explicit mode ignores the
40
+ * client's deprecated `onSubmit` and the flow's deprecated `captureOnly`.
41
+ */
42
+ export type SubmitMode = 'post' | 'capture' | {
43
+ handoff: SubmissionHandoff;
44
+ };
45
+ /** The `submitMode` prop, narrowed to the modes a flow supports. */
46
+ export type SubmitModeProps<Mode extends SubmitMode> = {
47
+ /**
48
+ * What the flow does once capture is complete; see `SubmitMode`.
49
+ *
50
+ * Unset, the flow keeps its behavior from before this prop existed: it
51
+ * posts, unless the client was created with the deprecated `onSubmit`
52
+ * (then it hands off to that) or the flow has `captureOnly`.
53
+ */
54
+ submitMode?: Mode;
55
+ };
56
+ export type CaptureOnlyProps = {
57
+ /**
58
+ * @deprecated Use `submitMode="capture"`. Still honoured when `submitMode`
59
+ * is unset; an explicit `submitMode` wins.
60
+ */
61
+ captureOnly?: boolean;
62
+ /** Receives the captured artifacts. Fires only in `'capture'` mode. */
63
+ onCaptured?: (artifacts: SubmissionArtifacts) => void;
64
+ };
22
65
  /**
23
66
  * The three `FlowChassis` gates every flow re-exposes verbatim.
24
67
  *
@@ -47,14 +90,67 @@ export type FlowChassisPassthroughProps = {
47
90
  * Status text and screen-reader announcements remain owned by the SDK. */
48
91
  loadingSpinner?: LoadingSpinnerComponent;
49
92
  };
50
- export type CommonFlowProps = FlowResultCallbacks & FlowChassisPassthroughProps & {
93
+ /**
94
+ * Settings that apply to the whole flow, on every flow.
95
+ *
96
+ * The rule for every flow prop: the top level configures the whole flow, and a
97
+ * step bag (`view`, `idView`, `faceView`, ... / `capture`, `idCapture`, ...)
98
+ * configures that one step. A top-level setting reaches every step that has
99
+ * it; a step bag's own value, when set, wins for that step.
100
+ */
101
+ export type FlowSettingsProps = {
102
+ /**
103
+ * Language for every screen the flow shows: each capture step and the
104
+ * flow's own loading, error, submitting and result screens. Default
105
+ * `'auto'` (browser detection).
106
+ */
107
+ lang?: LangOption;
108
+ /**
109
+ * Debug overlays on every capture step that has them, and the signature
110
+ * step's capture diagnostics (`showCaptureDiagnostics`). Default `false`.
111
+ * Does not show the result screen: that is `showResultScreen` /
112
+ * `showDiagnostics`.
113
+ */
114
+ debugMode?: boolean;
115
+ };
116
+ /**
117
+ * A step bag's copy of a flow-wide setting. Still honoured, and it wins over
118
+ * the flow's value for that step, but the flow's top level is the one place
119
+ * for it now.
120
+ */
121
+ export type DeprecatedStepSettings = {
122
+ /** @deprecated Set `lang` on the flow. When set here it still overrides the flow's value for this step. */
123
+ lang?: LangOption;
124
+ /** @deprecated Set `debugMode` on the flow. When set here it still overrides the flow's value for this step. */
125
+ debugMode?: boolean;
126
+ };
127
+ export type CommonFlowProps = FlowResultCallbacks & FlowChassisPassthroughProps & FlowSettingsProps & {
51
128
  client: IdmissionClient;
52
129
  submission?: FlowSubmissionConfig;
53
130
  initialArtifacts?: SubmissionArtifacts;
54
131
  theme?: ThemeInput;
55
132
  className?: string;
133
+ /**
134
+ * Skip every capture step's review screen ("ID captured", "Face liveness
135
+ * verified", the signature review). A step bag's `skipSuccessScreen`
136
+ * overrides it for that step. Unset, each step keeps its own default:
137
+ * shown, except after a ring intro screen and in the video-ID sequence,
138
+ * which skip it.
139
+ */
140
+ skipSuccessScreen?: boolean;
141
+ /**
142
+ * Show the result screen after a successful submission: the response
143
+ * summary and its timings. Default `false`. Ring mode ends on its own
144
+ * success screen instead and ignores this.
145
+ */
146
+ showResultScreen?: boolean;
147
+ /**
148
+ * @deprecated Renamed `showResultScreen`, which wins when both are set.
149
+ * Unrelated to `skipSuccessScreen`, which governs the capture steps'
150
+ * review screens.
151
+ */
56
152
  showSuccessScreen?: boolean;
57
- /** Show the full submission response on the success screen. May contain PII. */
153
+ /** Show the full submission response on the result screen. May contain PII. */
58
154
  showDiagnostics?: boolean;
59
155
  /**
60
156
  * Documents the user is asked to supply from device storage after every
@@ -94,7 +190,7 @@ export type RingScreenVerbiage = {
94
190
  successScreen?: RingSuccessScreenVerbiage;
95
191
  };
96
192
  export type IdCaptureFlowConfig = Omit<IdCaptureControllerConfig, 'client' | 'submission'>;
97
- export type IdCaptureFlowViewProps = Omit<IdCaptureViewProps, 'controller' | 'sessionReady' | 'onCollected' | 'onSubmitted'>;
193
+ export type IdCaptureFlowViewProps = Omit<IdCaptureViewProps, 'controller' | 'sessionReady' | 'onCollected' | 'onSubmitted' | keyof DeprecatedStepSettings> & DeprecatedStepSettings;
98
194
  export type FaceLivenessFlowConfig = Omit<SelfieCaptureControllerConfig, 'liveness'> & {
99
195
  liveness?: Omit<SelfieLivenessConfig, 'checkLiveness'>;
100
196
  checkLivenessOptions?: Omit<LivenessOptions, 'softFail'>;
@@ -110,9 +206,9 @@ export type FaceLivenessFlowConfig = Omit<SelfieCaptureControllerConfig, 'livene
110
206
  export type SelfieCaptureFlowConfig = Omit<SelfieCaptureControllerConfig, 'liveness'> & {
111
207
  checkLivenessOptions?: Omit<LivenessOptions, 'softFail'>;
112
208
  };
113
- export type FaceLivenessFlowViewProps = Omit<FaceLivenessViewProps, 'controller' | 'sessionReady' | 'onDone'>;
114
- export type SelfieFlowViewProps = Omit<SelfieCaptureViewProps, 'controller' | 'sessionReady' | 'onCaptured'>;
115
- export type DocumentCaptureFlowViewProps = Omit<DocumentCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted'>;
209
+ export type FaceLivenessFlowViewProps = Omit<FaceLivenessViewProps, 'controller' | 'sessionReady' | 'onDone' | keyof DeprecatedStepSettings> & DeprecatedStepSettings;
210
+ export type SelfieFlowViewProps = Omit<SelfieCaptureViewProps, 'controller' | 'sessionReady' | 'onCaptured' | keyof DeprecatedStepSettings> & DeprecatedStepSettings;
211
+ export type DocumentCaptureFlowViewProps = Omit<DocumentCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted' | keyof DeprecatedStepSettings> & DeprecatedStepSettings;
116
212
  export type ControllerOverrides = {
117
213
  idController?: IdCaptureController;
118
214
  selfieController?: SelfieCaptureController;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/flows/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KA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AAC,eAAe,EAAE,UAAU,CAAC,CAAA;CACzD,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,6BAA6B,EAC7B,UAAU,CACX,GAAG;IACF,oBAAoB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;CACzD,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,qBAAqB,EACrB,YAAY,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,sBAAsB,CACxE,GACC,sBAAsB,CAAA;AAExB,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,sBAAsB,EACtB,YAAY,GAAG,cAAc,GAAG,YAAY,GAAG,MAAM,sBAAsB,CAC5E,GACC,sBAAsB,CAAA;AAExB,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,wBAAwB,EACxB,YAAY,GAAG,cAAc,GAAG,aAAa,GAAG,MAAM,sBAAsB,CAC7E,GACC,sBAAsB,CAAA;AAExB,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC,gBAAgB,CAAC,EAAE,uBAAuB,CAAA;CAC3C,CAAA"}
@@ -3,8 +3,8 @@ import type { SelfieCaptureController } from '@idmission/websdk-core/selfieCaptu
3
3
  import type { VideoIdCaptureController } from '@idmission/websdk-core/videoIdCapture';
4
4
  import { type VideoIdCaptureViewProps } from '../VideoIdCaptureView';
5
5
  import type { CompositeWizardStep } from './CompositeWizard';
6
- import type { FaceLivenessFlowViewProps, IdCaptureFlowViewProps } from './types';
7
- export type VideoIdFlowViewProps = Omit<VideoIdCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted'>;
6
+ import type { DeprecatedStepSettings, FaceLivenessFlowViewProps, IdCaptureFlowViewProps } from './types';
7
+ export type VideoIdFlowViewProps = Omit<VideoIdCaptureViewProps, 'controller' | 'sessionReady' | 'onCompleted' | keyof DeprecatedStepSettings> & DeprecatedStepSettings;
8
8
  export type BuildVideoIdStepsOptions = {
9
9
  idController: IdCaptureController;
10
10
  selfieController: SelfieCaptureController;
@@ -1 +1 @@
1
- {"version":3,"file":"videoIdSteps.d.ts","sourceRoot":"","sources":["../../src/flows/videoIdSteps.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAA;AAGrF,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,uBAAuB,EACvB,YAAY,GAAG,cAAc,GAAG,aAAa,CAC9C,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,mBAAmB,CAAA;IACjC,gBAAgB,EAAE,uBAAuB,CAAA;IACzC,eAAe,EAAE,wBAAwB,CAAA;IACzC,MAAM,CAAC,EAAE,sBAAsB,CAAA;IAC/B,QAAQ,CAAC,EAAE,yBAAyB,CAAA;IACpC,IAAI,CAAC,EAAE,oBAAoB,CAAA;IAC3B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACvC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,yEAAyE;IACzE,cAAc,CAAC,EAAE,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAC1D,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAA;CACtC,CAAA;AAMD,wBAAgB,iBAAi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AAA;IAC1B,yEAAyE;IACzE,cAAc,CAAC,EAAE,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAC1D,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAA;CACtC,CAAA;AAMD,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,MAAsB,EACtB,QAA0B,EAC1B,IAAuB,EACvB,cAAc,EACd,mBAA0B,EAC1B,gBAAuB,EACvB,cAAc,EACd,wBAAwB,GACzB,EAAE,wBAAwB,GAAG,mBAAmB,EAAE,CAoFlD"}
@@ -38,10 +38,14 @@ export declare const resources: {
38
38
  * Binds one rendered SDK tree to its requested language. A fixed translator
39
39
  * avoids waiting for a post-render changeLanguage() effect and keeps SSR and
40
40
  * concurrently mounted SDK views independent of the shared detector instance.
41
+ *
42
+ * An unset `lang` keeps whatever scope encloses it (or none), so a caller can
43
+ * render the provider unconditionally: toggling `lang` between unset and set
44
+ * then never changes the element tree, and never remounts the subtree.
41
45
  */
42
46
  export declare function SdkLanguageProvider({ children, lang, }: {
43
47
  children: ReactNode;
44
- lang: LangOption;
48
+ lang: LangOption | undefined;
45
49
  }): ReactElement;
46
50
  /**
47
51
  * @deprecated UI translations initialize automatically. Existing calls are
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAGd,OAAO,EAAkB,KAAK,IAAI,IAAI,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AAWnF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAIzC,OAAO,EAAE,cAAc,EAAE,CAAA;AAEzB,eAAO,MAAM,aAAa,yEAWhB,CAAA;AACV,MAAM,MAAM,WAAW,GAAG,OAAO,aAAa,CAAA;AAC9C,MAAM,MAAM,UAAU,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C,wBAAgB,WAAW,CACzB,QAAQ,EAAE,wBAAwB,EAClC,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,YAAY,CAOvB;AAED,wBAAgB,eAAe,CAC7B,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAA;CAAE,EAEpD,QAAQ,EAAE,CAAC,GAAG,SAAS,EACvB,SAAS,EAAE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;CAAE,GACpC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,GAAG,YAAY;CAAE,CAqB3C"}
@@ -65,9 +65,20 @@ const SdkLanguageContext = createContext(undefined);
65
65
  * Binds one rendered SDK tree to its requested language. A fixed translator
66
66
  * avoids waiting for a post-render changeLanguage() effect and keeps SSR and
67
67
  * concurrently mounted SDK views independent of the shared detector instance.
68
+ *
69
+ * An unset `lang` keeps whatever scope encloses it (or none), so a caller can
70
+ * render the provider unconditionally: toggling `lang` between unset and set
71
+ * then never changes the element tree, and never remounts the subtree.
68
72
  */
69
73
  export function SdkLanguageProvider({ children, lang, }) {
70
- return createElement(SdkLanguageContext.Provider, { value: lang === 'auto' ? detectedLanguage : lang }, children);
74
+ const inherited = useContext(SdkLanguageContext);
75
+ return createElement(SdkLanguageContext.Provider, {
76
+ value: lang === undefined
77
+ ? inherited
78
+ : lang === 'auto'
79
+ ? detectedLanguage
80
+ : lang,
81
+ }, children);
71
82
  }
72
83
  /**
73
84
  * @deprecated UI translations initialize automatically. Existing calls are
@@ -1,4 +1,5 @@
1
1
  export declare const threeOhTranslations: Record<string, Record<string, string>>;
2
+ export declare const threeOhAliases: Record<string, string>;
2
3
  /** Base entries win nothing — the supplement may only ADD. See `noShadowing`. */
3
4
  export declare function withThreeOhTranslations(lang: string, base: Record<string, string>): Record<string, string>;
4
5
  //# sourceMappingURL=threeOh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"threeOh.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/threeOh.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuGtE,CAAA;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExB"}
1
+ {"version":3,"file":"threeOh.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/threeOh.ts"],"names":[],"mappings":"AAkGA,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA+PtE,CAAA;AASD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMjD,CAAA;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB"}
@@ -63,6 +63,33 @@ const SELFIE_RECOVERY_HINT = 'We’re having trouble checking the lighting. Keep
63
63
  const CONTINUE_WITH_CURRENT_LIGHTING = 'Continue with current lighting';
64
64
  // The face liveness Retry button while the camera restarts behind it.
65
65
  const STARTING_CAMERA = 'Starting camera...';
66
+ // FLOW-LEVEL SCREENS — the submitting caption (`submissionStatusText`), the
67
+ // enrollment "preparing" orb, the session-error screens the chassis renders
68
+ // from AuthGate, and the submission retry screen's generic description. These
69
+ // never went through `t()` in 2.x, so there is nothing to inherit. Every key
70
+ // must match its literal in `flows/CompositeWizard.tsx`,
71
+ // `flows/CustomerIdAndBiometricsEnrollmentFlow.tsx` or `flows/overlays.tsx`.
72
+ // Property names (`sessionId`, `authUrl`, `submissionToken`) and the
73
+ // `{{host}}` placeholder stay untranslated: they are identifiers, not prose.
74
+ const FINISHING = 'Finishing up…';
75
+ const CREATING_PROFILE = 'Creating your profile…';
76
+ const LOOKING_FOR_PROFILE = 'Looking for your profile…';
77
+ const CHECKING_ID = 'Checking your ID…';
78
+ const CHECKING_ID_AND_SELFIE = 'Checking your ID and selfie…';
79
+ const CHECKING_SELFIE = 'Checking your selfie…';
80
+ const CONFIRMING_ITS_YOU = "Confirming it's you…";
81
+ const MATCHING_SELFIE_TO_ID = 'Matching your selfie to your ID…';
82
+ const GETTING_READY = 'Getting things ready…';
83
+ const SESSION_HEADING = 'IDmission WebSDK failed to load';
84
+ const SESSION_ID_MISSING = 'Required property sessionId is missing.';
85
+ const AUTH_URL_NOT_ALLOWED = 'Required property authUrl comes from an unrecognized issuer.';
86
+ const SESSION_ID_INVALID = 'Required property sessionId is not valid.';
87
+ const SESSION_HOST_UNREACHABLE = 'Failed to reach {{host}}.';
88
+ const SESSION_VALIDATION_ERROR = 'Failed to validate sessionId.';
89
+ const TOKEN_EXPIRED = 'Required property submissionToken is expired.';
90
+ const TOKEN_INVALID_FORMAT = 'Required property submissionToken is invalid.';
91
+ const TOKEN_INVALID_SIGNATURE = 'Required property submissionToken could not be validated.';
92
+ const SUBMISSION_INCOMPLETE = 'The submission could not be completed.';
66
93
  export const threeOhTranslations = {
67
94
  de: {
68
95
  [SELFIE_RECOVERY_HINT]: 'Wir haben Schwierigkeiten, die Beleuchtung zu prüfen. Halten Sie Ihr Gesicht mittig und bleiben Sie ruhig. Wir prüfen weiterhin Ihre Position.',
@@ -74,6 +101,25 @@ export const threeOhTranslations = {
74
101
  [EYES_CLOSED]: 'Augen offen halten...',
75
102
  [HAND_OVER_FACE]: 'Hand vom Gesicht nehmen...',
76
103
  [STARTING_CAMERA]: 'Kamera wird gestartet...',
104
+ [FINISHING]: 'Wird abgeschlossen…',
105
+ [CREATING_PROFILE]: 'Ihr Profil wird erstellt…',
106
+ [LOOKING_FOR_PROFILE]: 'Ihr Profil wird gesucht…',
107
+ [CHECKING_ID]: 'Ihr Ausweis wird geprüft…',
108
+ [CHECKING_ID_AND_SELFIE]: 'Ihr Ausweis und Ihr Selfie werden geprüft…',
109
+ [CHECKING_SELFIE]: 'Ihr Selfie wird geprüft…',
110
+ [CONFIRMING_ITS_YOU]: 'Ihre Identität wird bestätigt…',
111
+ [MATCHING_SELFIE_TO_ID]: 'Ihr Selfie wird mit Ihrem Ausweis abgeglichen…',
112
+ [GETTING_READY]: 'Wird vorbereitet…',
113
+ [SESSION_HEADING]: 'IDmission WebSDK konnte nicht geladen werden',
114
+ [SESSION_ID_MISSING]: 'Die erforderliche Eigenschaft sessionId fehlt.',
115
+ [AUTH_URL_NOT_ALLOWED]: 'Die erforderliche Eigenschaft authUrl stammt von einem unbekannten Aussteller.',
116
+ [SESSION_ID_INVALID]: 'Die erforderliche Eigenschaft sessionId ist ungültig.',
117
+ [SESSION_HOST_UNREACHABLE]: '{{host}} konnte nicht erreicht werden.',
118
+ [SESSION_VALIDATION_ERROR]: 'sessionId konnte nicht validiert werden.',
119
+ [TOKEN_EXPIRED]: 'Die erforderliche Eigenschaft submissionToken ist abgelaufen.',
120
+ [TOKEN_INVALID_FORMAT]: 'Die erforderliche Eigenschaft submissionToken ist ungültig.',
121
+ [TOKEN_INVALID_SIGNATURE]: 'Die erforderliche Eigenschaft submissionToken konnte nicht validiert werden.',
122
+ [SUBMISSION_INCOMPLETE]: 'Die Übermittlung konnte nicht abgeschlossen werden.',
77
123
  },
78
124
  es: {
79
125
  [SELFIE_RECOVERY_HINT]: 'Tenemos dificultades para comprobar la iluminación. Mantenga el rostro centrado y no se mueva. Seguiremos comprobando su posición.',
@@ -85,6 +131,25 @@ export const threeOhTranslations = {
85
131
  [EYES_CLOSED]: 'Hay que mantener los ojos abiertos...',
86
132
  [HAND_OVER_FACE]: 'Hay que retirar la mano de la cara...',
87
133
  [STARTING_CAMERA]: 'Iniciando la cámara...',
134
+ [FINISHING]: 'Finalizando…',
135
+ [CREATING_PROFILE]: 'Creando su perfil…',
136
+ [LOOKING_FOR_PROFILE]: 'Buscando su perfil…',
137
+ [CHECKING_ID]: 'Verificando su identificación…',
138
+ [CHECKING_ID_AND_SELFIE]: 'Verificando su identificación y su selfie…',
139
+ [CHECKING_SELFIE]: 'Verificando su selfie…',
140
+ [CONFIRMING_ITS_YOU]: 'Confirmando su identidad…',
141
+ [MATCHING_SELFIE_TO_ID]: 'Comparando su selfie con su identificación…',
142
+ [GETTING_READY]: 'Preparando todo…',
143
+ [SESSION_HEADING]: 'No se pudo cargar IDmission WebSDK',
144
+ [SESSION_ID_MISSING]: 'Falta la propiedad requerida sessionId.',
145
+ [AUTH_URL_NOT_ALLOWED]: 'La propiedad requerida authUrl proviene de un emisor no reconocido.',
146
+ [SESSION_ID_INVALID]: 'La propiedad requerida sessionId no es válida.',
147
+ [SESSION_HOST_UNREACHABLE]: 'No se pudo conectar con {{host}}.',
148
+ [SESSION_VALIDATION_ERROR]: 'No se pudo validar sessionId.',
149
+ [TOKEN_EXPIRED]: 'La propiedad requerida submissionToken ha expirado.',
150
+ [TOKEN_INVALID_FORMAT]: 'La propiedad requerida submissionToken no es válida.',
151
+ [TOKEN_INVALID_SIGNATURE]: 'No se pudo validar la propiedad requerida submissionToken.',
152
+ [SUBMISSION_INCOMPLETE]: 'No se pudo completar el envío.',
88
153
  },
89
154
  fr: {
90
155
  [SELFIE_RECOVERY_HINT]: 'Nous avons du mal à vérifier l’éclairage. Gardez votre visage centré et restez immobile. Nous vérifierons toujours votre position.',
@@ -96,6 +161,25 @@ export const threeOhTranslations = {
96
161
  [EYES_CLOSED]: 'Gardez les yeux ouverts...',
97
162
  [HAND_OVER_FACE]: 'Retirez votre main de votre visage...',
98
163
  [STARTING_CAMERA]: 'Démarrage de la caméra...',
164
+ [FINISHING]: 'Finalisation…',
165
+ [CREATING_PROFILE]: 'Création de votre profil…',
166
+ [LOOKING_FOR_PROFILE]: 'Recherche de votre profil…',
167
+ [CHECKING_ID]: 'Vérification de votre pièce d’identité…',
168
+ [CHECKING_ID_AND_SELFIE]: 'Vérification de votre pièce d’identité et de votre selfie…',
169
+ [CHECKING_SELFIE]: 'Vérification de votre selfie…',
170
+ [CONFIRMING_ITS_YOU]: 'Confirmation de votre identité…',
171
+ [MATCHING_SELFIE_TO_ID]: 'Comparaison de votre selfie avec votre pièce d’identité…',
172
+ [GETTING_READY]: 'Préparation en cours…',
173
+ [SESSION_HEADING]: 'Échec du chargement d’IDmission WebSDK',
174
+ [SESSION_ID_MISSING]: 'La propriété requise sessionId est manquante.',
175
+ [AUTH_URL_NOT_ALLOWED]: 'La propriété requise authUrl provient d’un émetteur non reconnu.',
176
+ [SESSION_ID_INVALID]: 'La propriété requise sessionId n’est pas valide.',
177
+ [SESSION_HOST_UNREACHABLE]: 'Impossible de joindre {{host}}.',
178
+ [SESSION_VALIDATION_ERROR]: 'Impossible de valider sessionId.',
179
+ [TOKEN_EXPIRED]: 'La propriété requise submissionToken a expiré.',
180
+ [TOKEN_INVALID_FORMAT]: 'La propriété requise submissionToken n’est pas valide.',
181
+ [TOKEN_INVALID_SIGNATURE]: 'La propriété requise submissionToken n’a pas pu être validée.',
182
+ [SUBMISSION_INCOMPLETE]: 'La soumission n’a pas pu être effectuée.',
99
183
  },
100
184
  it: {
101
185
  [SELFIE_RECOVERY_HINT]: 'Abbiamo difficoltà a verificare l’illuminazione. Mantieni il viso centrato e resta fermo. Continueremo a verificare la tua posizione.',
@@ -107,6 +191,25 @@ export const threeOhTranslations = {
107
191
  [EYES_CLOSED]: 'Tenere gli occhi aperti...',
108
192
  [HAND_OVER_FACE]: 'Togliere la mano dal viso...',
109
193
  [STARTING_CAMERA]: 'Avvio della fotocamera...',
194
+ [FINISHING]: 'Completamento in corso…',
195
+ [CREATING_PROFILE]: 'Creazione del profilo…',
196
+ [LOOKING_FOR_PROFILE]: 'Ricerca del profilo…',
197
+ [CHECKING_ID]: 'Verifica del documento…',
198
+ [CHECKING_ID_AND_SELFIE]: 'Verifica del documento e del selfie…',
199
+ [CHECKING_SELFIE]: 'Verifica del selfie…',
200
+ [CONFIRMING_ITS_YOU]: 'Conferma dell’identità…',
201
+ [MATCHING_SELFIE_TO_ID]: 'Confronto del selfie con il documento…',
202
+ [GETTING_READY]: 'Preparazione in corso…',
203
+ [SESSION_HEADING]: 'Impossibile caricare IDmission WebSDK',
204
+ [SESSION_ID_MISSING]: 'Proprietà obbligatoria sessionId mancante.',
205
+ [AUTH_URL_NOT_ALLOWED]: 'La proprietà obbligatoria authUrl proviene da un emittente non riconosciuto.',
206
+ [SESSION_ID_INVALID]: 'La proprietà obbligatoria sessionId non è valida.',
207
+ [SESSION_HOST_UNREACHABLE]: 'Impossibile raggiungere {{host}}.',
208
+ [SESSION_VALIDATION_ERROR]: 'Impossibile convalidare sessionId.',
209
+ [TOKEN_EXPIRED]: 'La proprietà obbligatoria submissionToken è scaduta.',
210
+ [TOKEN_INVALID_FORMAT]: 'La proprietà obbligatoria submissionToken non è valida.',
211
+ [TOKEN_INVALID_SIGNATURE]: 'Impossibile convalidare la proprietà obbligatoria submissionToken.',
212
+ [SUBMISSION_INCOMPLETE]: 'Impossibile completare l’invio.',
110
213
  },
111
214
  ja: {
112
215
  [SELFIE_RECOVERY_HINT]: '照明の確認がうまくできません。顔を中央に保ち、動かないでください。顔の位置は引き続き確認します。',
@@ -118,6 +221,25 @@ export const threeOhTranslations = {
118
221
  [EYES_CLOSED]: '目を開けたままにしてください…',
119
222
  [HAND_OVER_FACE]: '顔から手を離してください…',
120
223
  [STARTING_CAMERA]: 'カメラを起動しています…',
224
+ [FINISHING]: '完了処理中…',
225
+ [CREATING_PROFILE]: 'プロフィールを作成しています…',
226
+ [LOOKING_FOR_PROFILE]: 'プロフィールを検索しています…',
227
+ [CHECKING_ID]: '身分証を確認しています…',
228
+ [CHECKING_ID_AND_SELFIE]: '身分証とセルフィーを確認しています…',
229
+ [CHECKING_SELFIE]: 'セルフィーを確認しています…',
230
+ [CONFIRMING_ITS_YOU]: 'ご本人であることを確認しています…',
231
+ [MATCHING_SELFIE_TO_ID]: 'セルフィーと身分証を照合しています…',
232
+ [GETTING_READY]: '準備しています…',
233
+ [SESSION_HEADING]: 'IDmission WebSDK を読み込めませんでした',
234
+ [SESSION_ID_MISSING]: '必須プロパティ sessionId がありません。',
235
+ [AUTH_URL_NOT_ALLOWED]: '必須プロパティ authUrl の発行元を認識できません。',
236
+ [SESSION_ID_INVALID]: '必須プロパティ sessionId が無効です。',
237
+ [SESSION_HOST_UNREACHABLE]: '{{host}} に接続できませんでした。',
238
+ [SESSION_VALIDATION_ERROR]: 'sessionId を検証できませんでした。',
239
+ [TOKEN_EXPIRED]: '必須プロパティ submissionToken の有効期限が切れています。',
240
+ [TOKEN_INVALID_FORMAT]: '必須プロパティ submissionToken が無効です。',
241
+ [TOKEN_INVALID_SIGNATURE]: '必須プロパティ submissionToken を検証できませんでした。',
242
+ [SUBMISSION_INCOMPLETE]: '送信を完了できませんでした。',
121
243
  },
122
244
  pt: {
123
245
  [SELFIE_RECOVERY_HINT]: 'Estamos com dificuldade para verificar a iluminação. Mantenha o rosto centralizado e fique imóvel. Continuaremos verificando sua posição.',
@@ -129,6 +251,25 @@ export const threeOhTranslations = {
129
251
  [EYES_CLOSED]: 'Mantenha os olhos abertos...',
130
252
  [HAND_OVER_FACE]: 'Tire a mão do rosto...',
131
253
  [STARTING_CAMERA]: 'Iniciando a câmera...',
254
+ [FINISHING]: 'Finalizando…',
255
+ [CREATING_PROFILE]: 'Criando seu perfil…',
256
+ [LOOKING_FOR_PROFILE]: 'Procurando seu perfil…',
257
+ [CHECKING_ID]: 'Verificando seu documento…',
258
+ [CHECKING_ID_AND_SELFIE]: 'Verificando seu documento e sua selfie…',
259
+ [CHECKING_SELFIE]: 'Verificando sua selfie…',
260
+ [CONFIRMING_ITS_YOU]: 'Confirmando que é você…',
261
+ [MATCHING_SELFIE_TO_ID]: 'Comparando sua selfie com seu documento…',
262
+ [GETTING_READY]: 'Preparando tudo…',
263
+ [SESSION_HEADING]: 'Falha ao carregar o IDmission WebSDK',
264
+ [SESSION_ID_MISSING]: 'A propriedade obrigatória sessionId está ausente.',
265
+ [AUTH_URL_NOT_ALLOWED]: 'A propriedade obrigatória authUrl vem de um emissor não reconhecido.',
266
+ [SESSION_ID_INVALID]: 'A propriedade obrigatória sessionId não é válida.',
267
+ [SESSION_HOST_UNREACHABLE]: 'Não foi possível acessar {{host}}.',
268
+ [SESSION_VALIDATION_ERROR]: 'Não foi possível validar o sessionId.',
269
+ [TOKEN_EXPIRED]: 'A propriedade obrigatória submissionToken expirou.',
270
+ [TOKEN_INVALID_FORMAT]: 'A propriedade obrigatória submissionToken é inválida.',
271
+ [TOKEN_INVALID_SIGNATURE]: 'Não foi possível validar a propriedade obrigatória submissionToken.',
272
+ [SUBMISSION_INCOMPLETE]: 'Não foi possível concluir o envio.',
132
273
  },
133
274
  ru: {
134
275
  [SELFIE_RECOVERY_HINT]: 'Нам не удаётся проверить освещение. Держите лицо по центру и не двигайтесь. Мы продолжим проверять положение лица.',
@@ -140,6 +281,25 @@ export const threeOhTranslations = {
140
281
  [EYES_CLOSED]: 'Не закрывайте глаза…',
141
282
  [HAND_OVER_FACE]: 'Уберите руку от лица…',
142
283
  [STARTING_CAMERA]: 'Запуск камеры…',
284
+ [FINISHING]: 'Завершение…',
285
+ [CREATING_PROFILE]: 'Создание профиля…',
286
+ [LOOKING_FOR_PROFILE]: 'Поиск профиля…',
287
+ [CHECKING_ID]: 'Проверка удостоверения личности…',
288
+ [CHECKING_ID_AND_SELFIE]: 'Проверка удостоверения личности и селфи…',
289
+ [CHECKING_SELFIE]: 'Проверка селфи…',
290
+ [CONFIRMING_ITS_YOU]: 'Подтверждение личности…',
291
+ [MATCHING_SELFIE_TO_ID]: 'Сравнение селфи с удостоверением личности…',
292
+ [GETTING_READY]: 'Подготовка…',
293
+ [SESSION_HEADING]: 'Не удалось загрузить IDmission WebSDK',
294
+ [SESSION_ID_MISSING]: 'Отсутствует обязательное свойство sessionId.',
295
+ [AUTH_URL_NOT_ALLOWED]: 'Обязательное свойство authUrl получено от неизвестного издателя.',
296
+ [SESSION_ID_INVALID]: 'Обязательное свойство sessionId недействительно.',
297
+ [SESSION_HOST_UNREACHABLE]: 'Не удалось подключиться к {{host}}.',
298
+ [SESSION_VALIDATION_ERROR]: 'Не удалось проверить sessionId.',
299
+ [TOKEN_EXPIRED]: 'Срок действия обязательного свойства submissionToken истёк.',
300
+ [TOKEN_INVALID_FORMAT]: 'Обязательное свойство submissionToken недействительно.',
301
+ [TOKEN_INVALID_SIGNATURE]: 'Не удалось проверить обязательное свойство submissionToken.',
302
+ [SUBMISSION_INCOMPLETE]: 'Не удалось завершить отправку.',
143
303
  },
144
304
  zh: {
145
305
  [SELFIE_RECOVERY_HINT]: '我們無法順利檢查光線。請將臉部保持在中央並保持不動。我們仍會檢查您的位置。',
@@ -151,9 +311,43 @@ export const threeOhTranslations = {
151
311
  [EYES_CLOSED]: '請保持雙眼睜開...',
152
312
  [HAND_OVER_FACE]: '請將手從臉上移開...',
153
313
  [STARTING_CAMERA]: '正在啟動相機...',
314
+ [FINISHING]: '正在完成…',
315
+ [CREATING_PROFILE]: '正在建立您的個人檔案…',
316
+ [LOOKING_FOR_PROFILE]: '正在尋找您的個人檔案…',
317
+ [CHECKING_ID]: '正在檢查您的證件…',
318
+ [CHECKING_ID_AND_SELFIE]: '正在檢查您的證件與自拍照…',
319
+ [CHECKING_SELFIE]: '正在檢查您的自拍照…',
320
+ [CONFIRMING_ITS_YOU]: '正在確認您的身分…',
321
+ [MATCHING_SELFIE_TO_ID]: '正在比對您的自拍照與證件…',
322
+ [GETTING_READY]: '正在準備…',
323
+ [SESSION_HEADING]: 'IDmission WebSDK 載入失敗',
324
+ [SESSION_ID_MISSING]: '缺少必要屬性 sessionId。',
325
+ [AUTH_URL_NOT_ALLOWED]: '必要屬性 authUrl 來自無法識別的簽發者。',
326
+ [SESSION_ID_INVALID]: '必要屬性 sessionId 無效。',
327
+ [SESSION_HOST_UNREACHABLE]: '無法連線至 {{host}}。',
328
+ [SESSION_VALIDATION_ERROR]: '無法驗證 sessionId。',
329
+ [TOKEN_EXPIRED]: '必要屬性 submissionToken 已過期。',
330
+ [TOKEN_INVALID_FORMAT]: '必要屬性 submissionToken 無效。',
331
+ [TOKEN_INVALID_SIGNATURE]: '無法驗證必要屬性 submissionToken。',
332
+ [SUBMISSION_INCOMPLETE]: '無法完成提交。',
154
333
  },
155
334
  };
335
+ // Runtime literals whose 2.x translation already exists in every base locale,
336
+ // keyed to a different spelling of the same English. The first two are sdk2's
337
+ // own comma drift (its source has the comma, its locale keys do not); the
338
+ // third is the location overlay's heading, which sdk2 renders as "access" but
339
+ // translates only as "permission", worded like its camera and microphone
340
+ // siblings. Each runtime key borrows the inherited translation, so the base
341
+ // files stay byte-identical to sdk2's and no new wording is invented.
342
+ export const threeOhAliases = {
343
+ "We're sorry, an unexpected error has occurred.": "We're sorry an unexpected error has occurred.",
344
+ "We're having trouble reaching our services, please check your connection and try again.": "We're having trouble reaching our services please check your connection and try again.",
345
+ 'Your location access is disabled': 'Your location permission is disabled',
346
+ };
156
347
  /** Base entries win nothing — the supplement may only ADD. See `noShadowing`. */
157
348
  export function withThreeOhTranslations(lang, base) {
158
- return { ...base, ...(threeOhTranslations[lang] ?? {}) };
349
+ const aliased = Object.fromEntries(Object.entries(threeOhAliases)
350
+ .filter(([, target]) => target in base)
351
+ .map(([key, target]) => [key, base[target]]));
352
+ return { ...base, ...aliased, ...(threeOhTranslations[lang] ?? {}) };
159
353
  }