@incodetech/core 0.0.0-dev-20261112-32d0f499 → 0.0.0-dev-20261112-72ff5b1b

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 (65) hide show
  1. package/dist/{FaceDetectionProvider-BjkNHW9z.esm.js → FaceDetectionProvider-BFjCyYz9.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-BiDfOhRj.esm.js → apiError-MUJosEwz.esm.js} +1 -1
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-DBOO5IuU.esm.js → authenticationManager-C2Q28jLY.esm.js} +3 -3
  6. package/dist/{authenticationStateMachine-4QJFn4hi.esm.js → authenticationStateMachine-BTVuXBmg.esm.js} +2 -2
  7. package/dist/consent.d.ts +1 -1
  8. package/dist/{consentManager-7aHaehwF.d.ts → consentManager-DXetSxcx.d.ts} +4 -4
  9. package/dist/{deepsightLoader-CB2Gguh2.esm.js → deepsightLoader-BrUk17wc.esm.js} +3 -3
  10. package/dist/dynamic-forms.esm.js +2 -2
  11. package/dist/{dynamicFormsManager-DlD1YjuI.esm.js → dynamicFormsManager-Bf2yQ0rs.esm.js} +1 -1
  12. package/dist/{dynamicFormsStateMachine-uaQptU_V.esm.js → dynamicFormsStateMachine-CMFCaE32.esm.js} +1 -1
  13. package/dist/ekyb.esm.js +2 -2
  14. package/dist/{ekybManager-DlRmm58r.esm.js → ekybManager-CvYvio91.esm.js} +1 -1
  15. package/dist/{ekybStateMachine-C1gBvyG1.esm.js → ekybStateMachine-CDfHmPUs.esm.js} +1 -1
  16. package/dist/ekyc-prefill.esm.js +2 -2
  17. package/dist/ekyc.d.ts +2 -2
  18. package/dist/ekyc.esm.js +2 -2
  19. package/dist/{ekycManager-q1fos6IY.d.ts → ekycManager-C4gkJ1w_.d.ts} +44 -3
  20. package/dist/{ekycManager-CeeJoRFY.esm.js → ekycManager-DGAn__vq.esm.js} +35 -14
  21. package/dist/{ekycPrefillManager-C6jYVCLR.esm.js → ekycPrefillManager-CX0-5GGA.esm.js} +1 -1
  22. package/dist/{ekycPrefillStateMachine-DOlWgNuX.esm.js → ekycPrefillStateMachine-C0csNsV2.esm.js} +1 -1
  23. package/dist/{ekycStateMachine-DBTczgGE.esm.js → ekycStateMachine-NSnXCfwh.esm.js} +104 -14
  24. package/dist/electronic-signature.esm.js +1 -1
  25. package/dist/{electronicSignatureManager-CiK5ZWMS.esm.js → electronicSignatureManager-Bn9Pm902.esm.js} +1 -1
  26. package/dist/extensibility.d.ts +3 -3
  27. package/dist/extensibility.esm.js +13 -13
  28. package/dist/{faceCaptureManagerFactory-OJHVPaLL.esm.js → faceCaptureManagerFactory-E29Xz3yI.esm.js} +1 -1
  29. package/dist/{faceCaptureSetup-CO4Ka8uF.esm.js → faceCaptureSetup-BUufMik2.esm.js} +3 -3
  30. package/dist/{feature-management-Byi6a0gN.esm.js → feature-management-L3eiz9Rv.esm.js} +1 -1
  31. package/dist/feature-management.esm.js +1 -1
  32. package/dist/flow.esm.js +3 -3
  33. package/dist/{flowCompletionService-DdqbcDEA.esm.js → flowCompletionService-DqwsC4lT.esm.js} +1 -1
  34. package/dist/{flowServices-BJdM87dZ.esm.js → flowServices-BKNERhW7.esm.js} +4 -4
  35. package/dist/geolocation.esm.js +2 -2
  36. package/dist/{geolocationManager-CYbEiEF1.esm.js → geolocationManager-xY_Ybgl8.esm.js} +1 -1
  37. package/dist/{geolocationStateMachine-Cyqr7x3W.esm.js → geolocationStateMachine-COc3qHfM.esm.js} +1 -1
  38. package/dist/id-selfie-flow.esm.js +6 -6
  39. package/dist/id.esm.js +3 -3
  40. package/dist/{idCaptureManager--Cp2Doc6.esm.js → idCaptureManager-CYtzDU1M.esm.js} +3 -3
  41. package/dist/{idCaptureServices-B0xegMnA.esm.js → idCaptureServices-BBBqZEBc.esm.js} +2 -2
  42. package/dist/{idCaptureStateMachine-EByRfBkz.esm.js → idCaptureStateMachine-BD5s0mO_.esm.js} +8 -8
  43. package/dist/index.esm.js +1 -1
  44. package/dist/kyb-checks.esm.js +2 -2
  45. package/dist/{kybChecksManager-BzFwfcR0.esm.js → kybChecksManager-BpD-3H0j.esm.js} +1 -1
  46. package/dist/{kybChecksStateMachine-DVfO3-RE.esm.js → kybChecksStateMachine-D0NV3i55.esm.js} +1 -1
  47. package/dist/mandatory-consent.d.ts +1 -1
  48. package/dist/{mandatoryConsentManager-CYOJd_IZ.d.ts → mandatoryConsentManager-NBAqxVzC.d.ts} +4 -4
  49. package/dist/qe-signature.esm.js +1 -1
  50. package/dist/{runChildModule-LqKjf1x-.esm.js → runChildModule-Sd7HS30G.esm.js} +1 -1
  51. package/dist/{sdkVersion-BNQiCyjV.esm.js → sdkVersion-GcCzb3Px.esm.js} +1 -1
  52. package/dist/selfie.esm.js +6 -6
  53. package/dist/{selfieErrorUtils-CMFdasv6.esm.js → selfieErrorUtils-DBK_jegf.esm.js} +1 -1
  54. package/dist/{selfieManager-DIfNKutt.esm.js → selfieManager-Cee_9ASV.esm.js} +3 -3
  55. package/dist/{selfieStateMachine-DOeQyXDv.esm.js → selfieStateMachine-D6Oe0_kd.esm.js} +3 -3
  56. package/dist/{session-BGz6qIWu.esm.js → session-BVZyjWFT.esm.js} +3 -3
  57. package/dist/session.esm.js +4 -4
  58. package/dist/{sessionInitializer-BKc2LC_7.esm.js → sessionInitializer-D06GkSia.esm.js} +3 -3
  59. package/dist/{setup-BteRksIU.esm.js → setup-XPmg3OH_.esm.js} +4 -4
  60. package/dist/{trueSightService-BkQ1WSz1.esm.js → trueSightService-DitOWhDS.esm.js} +1 -1
  61. package/dist/video-selfie.esm.js +3 -3
  62. package/dist/{videoSelfieCameraWarmer-BrkKQyK4.esm.js → videoSelfieCameraWarmer-C7oFdvEa.esm.js} +3 -3
  63. package/dist/wasm.esm.js +1 -1
  64. package/dist/workflow.esm.js +16 -16
  65. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { l as wasmRuntime } from "./warmup-BZOMg303.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-BteRksIU.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-XPmg3OH_.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-E_cX5CfH.esm.js";
4
4
  import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
5
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-BkQ1WSz1.esm.js";
6
- import "./sessionInitializer-BKc2LC_7.esm.js";
5
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-DitOWhDS.esm.js";
6
+ import "./sessionInitializer-D06GkSia.esm.js";
7
7
  import { t as addDeviceStats } from "./stats-C2sigf9p.esm.js";
8
8
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
9
9
  import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
@@ -235,7 +235,7 @@ function startDetection(params) {
235
235
  };
236
236
  }
237
237
  async function initializeDeepsightSession(options) {
238
- const { loadDeepsightSession } = await import("./deepsightLoader-CB2Gguh2.esm.js");
238
+ const { loadDeepsightSession } = await import("./deepsightLoader-BrUk17wc.esm.js");
239
239
  return loadDeepsightSession({
240
240
  ds: options.ds,
241
241
  storage: options.storage
@@ -1,4 +1,4 @@
1
- import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-CiK5ZWMS.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-Bn9Pm902.esm.js";
2
2
  //#region src/modules/ae-signature/index.ts
3
3
  function createAeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,4 +1,4 @@
1
- import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-BkQ1WSz1.esm.js";
1
+ import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-DitOWhDS.esm.js";
2
2
  //#region src/internal/http/apiError.ts
3
3
  /**
4
4
  * Incode API error.
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-4QJFn4hi.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-DBOO5IuU.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-BTVuXBmg.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-C2Q28jLY.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,9 +1,9 @@
1
- import { u as BrowserStorageProvider } from "./setup-BteRksIU.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-XPmg3OH_.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-E_cX5CfH.esm.js";
3
3
  import { n as eventModuleNames } from "./events-C7h7oaTE.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-DSajW7CJ.esm.js";
5
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-OJHVPaLL.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-4QJFn4hi.esm.js";
5
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-E29Xz3yI.esm.js";
6
+ import { t as authenticationMachine } from "./authenticationStateMachine-BTVuXBmg.esm.js";
7
7
  //#region src/modules/authentication/authenticationActor.ts
8
8
  function createAuthenticationActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,7 +1,7 @@
1
1
  import { i as assign } from "./xstate.esm-DSajW7CJ.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
3
- import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-CO4Ka8uF.esm.js";
4
- import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BjkNHW9z.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-BUufMik2.esm.js";
4
+ import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BFjCyYz9.esm.js";
5
5
  import { s as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-wRaWOx9n.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
package/dist/consent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-7aHaehwF.js";
1
+ import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-DXetSxcx.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -86,6 +86,10 @@ declare const consentMachine: StateMachine<ConsentContext, {
86
86
  type: "setLoadError";
87
87
  params: NonReducibleUnknown;
88
88
  };
89
+ resetContext: {
90
+ type: "resetContext";
91
+ params: NonReducibleUnknown;
92
+ };
89
93
  setConsentData: {
90
94
  type: "setConsentData";
91
95
  params: NonReducibleUnknown;
@@ -94,10 +98,6 @@ declare const consentMachine: StateMachine<ConsentContext, {
94
98
  type: "toggleCheckbox";
95
99
  params: NonReducibleUnknown;
96
100
  };
97
- resetContext: {
98
- type: "resetContext";
99
- params: NonReducibleUnknown;
100
- };
101
101
  }>, {
102
102
  type: "canSubmit";
103
103
  params: unknown;
@@ -1,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-E_cX5CfH.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-BkQ1WSz1.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-BNQiCyjV.esm.js";
4
- import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-BKc2LC_7.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-DitOWhDS.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-GcCzb3Px.esm.js";
4
+ import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-D06GkSia.esm.js";
5
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
6
6
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
7
7
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-5NLoQaLV.esm.js";
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-uaQptU_V.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-DlD1YjuI.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CMFCaE32.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-Bf2yQ0rs.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-uaQptU_V.esm.js";
4
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CMFCaE32.esm.js";
5
5
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
6
6
  function createDynamicFormsActor(options) {
7
7
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BiDfOhRj.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-MUJosEwz.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
5
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-C1gBvyG1.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-DlRmm58r.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-CDfHmPUs.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-CvYvio91.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-C1gBvyG1.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-CDfHmPUs.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
- import { n as getFlow } from "./flowServices-BJdM87dZ.esm.js";
2
+ import { n as getFlow } from "./flowServices-BKNERhW7.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
5
  import { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DOlWgNuX.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-C6jYVCLR.esm.js";
1
+ import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-C0csNsV2.esm.js";
2
+ import { t as createEkycPrefillManager } from "./ekycPrefillManager-CX0-5GGA.esm.js";
3
3
  export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
package/dist/ekyc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
2
2
  import { c as EkycValidationErrors, i as EkycFieldDisplayMode, n as EkycDisplayModes, o as EkycModuleConfig, s as EkycValidationError, t as EkycConfig } from "./types-DEa3taWc.js";
3
- import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-q1fos6IY.js";
3
+ import { a as EkycStep, n as EkycState, r as createEkycManager, s as ekycMachine, t as EkycManager } from "./ekycManager-C4gkJ1w_.js";
4
4
  //#region src/modules/ekyc/ekycUtils.d.ts
5
5
  /**
6
6
  * Normalizes any supported eKYC config input into a manager-ready `EkycConfig`.
@@ -19,4 +19,4 @@ import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycMana
19
19
  */
20
20
  declare function toEkycConfig(config: Partial<EkycModuleConfig> & Partial<EkycConfig>): EkycConfig;
21
21
  //#endregion
22
- export { type AddressSuggestion, type EkycConfig, type EkycDisplayModes, type EkycFieldDisplayMode, type EkycManager, type EkycModuleConfig, type EkycState, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
22
+ export { type AddressSuggestion, type EkycConfig, type EkycDisplayModes, type EkycFieldDisplayMode, type EkycManager, type EkycModuleConfig, type EkycState, type EkycStep, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ekycMachine } from "./ekycStateMachine-DBTczgGE.esm.js";
1
+ import { t as ekycMachine } from "./ekycStateMachine-NSnXCfwh.esm.js";
2
2
  import { l as toEkycConfig } from "./ekycUtils-Dcff8BOD.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-CeeJoRFY.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-DGAn__vq.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -13,6 +13,17 @@ type CreateEkycActorOptions = {
13
13
  config: EkycConfig;
14
14
  };
15
15
  //#endregion
16
+ //#region src/modules/ekyc/ekycSteps.d.ts
17
+ /**
18
+ * One screen of the eKYC form: a run of visible fields that share a section.
19
+ * `id` is `'personal'` for fields without a section, otherwise the section
20
+ * (`'driverLicense'` or `'address'` today).
21
+ */
22
+ type EkycStep = {
23
+ id: string;
24
+ fieldNames: string[];
25
+ };
26
+ //#endregion
16
27
  //#region src/modules/ekyc/ekycManager.d.ts
17
28
  type EkycLoadingState = {
18
29
  status: 'loading';
@@ -29,6 +40,16 @@ type EkycFormState = {
29
40
  hideEmail: boolean;
30
41
  fieldsCountry: string;
31
42
  submitError: string;
43
+ /**
44
+ * The form's screens, one per run of visible fields that share a section
45
+ * (`'personal'` for fields without one). A form with one step has a single
46
+ * screen.
47
+ */
48
+ steps: EkycStep[];
49
+ /** Index into `steps` of the screen the user is on. */
50
+ currentStepIndex: number;
51
+ /** True iff the current step's fields have no validation errors. */
52
+ isStepValid: boolean;
32
53
  };
33
54
  type EkycSubmittingState = {
34
55
  status: 'submitting';
@@ -64,7 +85,17 @@ declare function createEkycManagerFromActor(actor: EkycActor): Manager<EkycState
64
85
  searchAddress(query: string): void;
65
86
  /** Selects an address suggestion and populates address fields */
66
87
  selectAddress(suggestion: AddressSuggestion): void;
67
- /** Submits the form. Runs full-form validation; advances only when no errors. */
88
+ /**
89
+ * Continues from the current step: validates its fields and moves to the
90
+ * next step when they pass. On the last step it submits, like `submit()`.
91
+ */
92
+ next(): void;
93
+ /** Returns to the previous step. Keeps values and errors; does not validate. */
94
+ back(): void;
95
+ /**
96
+ * Submits the form. Runs full-form validation whatever the current step;
97
+ * advances only when no errors, otherwise moves to the first step with one.
98
+ */
68
99
  submit(): void;
69
100
  /** Retries from failure state, returning to the form */
70
101
  retry(): void;
@@ -84,7 +115,17 @@ declare function createEkycManager(options: CreateEkycActorOptions): Manager<Eky
84
115
  searchAddress(query: string): void;
85
116
  /** Selects an address suggestion and populates address fields */
86
117
  selectAddress(suggestion: AddressSuggestion): void;
87
- /** Submits the form. Runs full-form validation; advances only when no errors. */
118
+ /**
119
+ * Continues from the current step: validates its fields and moves to the
120
+ * next step when they pass. On the last step it submits, like `submit()`.
121
+ */
122
+ next(): void;
123
+ /** Returns to the previous step. Keeps values and errors; does not validate. */
124
+ back(): void;
125
+ /**
126
+ * Submits the form. Runs full-form validation whatever the current step;
127
+ * advances only when no errors, otherwise moves to the first step with one.
128
+ */
88
129
  submit(): void;
89
130
  /** Retries from failure state, returning to the form */
90
131
  retry(): void;
@@ -95,4 +136,4 @@ declare function createEkycManager(options: CreateEkycActorOptions): Manager<Eky
95
136
  };
96
137
  type EkycManager = ReturnType<typeof createEkycManager>;
97
138
  //#endregion
98
- export { EkycActor as a, createEkycManagerFromActor as i, EkycState as n, ekycMachine as o, createEkycManager as r, EkycManager as t };
139
+ export { EkycStep as a, createEkycManagerFromActor as i, EkycState as n, EkycActor as o, createEkycManager as r, ekycMachine as s, EkycManager as t };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as ekycMachine } from "./ekycStateMachine-DBTczgGE.esm.js";
4
+ import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-NSnXCfwh.esm.js";
5
5
  //#region src/modules/ekyc/ekycActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYC actor.
@@ -44,18 +44,25 @@ function mapState(snapshot) {
44
44
  const typedSnapshot = snapshot;
45
45
  const { context } = typedSnapshot;
46
46
  if (typedSnapshot.matches("idle") || typedSnapshot.matches("loading") || typedSnapshot.matches("prefilling")) return { status: "loading" };
47
- if (typedSnapshot.matches("form")) return {
48
- status: "form",
49
- fields: context.fields,
50
- values: context.values,
51
- validationErrors: context.validationErrors,
52
- isValid: Object.keys(context.validationErrors ?? {}).length === 0,
53
- addressSuggestions: context.addressSuggestions,
54
- prefilled: context.prefilled,
55
- hideEmail: context.hideEmail,
56
- fieldsCountry: context.fieldsCountry,
57
- submitError: context.submitError
58
- };
47
+ if (typedSnapshot.matches("form")) {
48
+ const steps = buildEkycSteps(context.fields, context.hideEmail);
49
+ const currentStepIndex = clampStepIndex(context.currentStepIndex, steps);
50
+ return {
51
+ status: "form",
52
+ fields: context.fields,
53
+ values: context.values,
54
+ validationErrors: context.validationErrors,
55
+ isValid: Object.keys(context.validationErrors ?? {}).length === 0,
56
+ addressSuggestions: context.addressSuggestions,
57
+ prefilled: context.prefilled,
58
+ hideEmail: context.hideEmail,
59
+ fieldsCountry: context.fieldsCountry,
60
+ submitError: context.submitError,
61
+ steps,
62
+ currentStepIndex,
63
+ isStepValid: isStepValid(steps[currentStepIndex], context.validationErrors)
64
+ };
65
+ }
59
66
  if (typedSnapshot.matches("submitting")) return { status: "submitting" };
60
67
  if (typedSnapshot.matches("success")) return { status: "success" };
61
68
  if (typedSnapshot.matches("error")) return {
@@ -102,7 +109,21 @@ function createApi({ actor, trackElementClicked }) {
102
109
  suggestion
103
110
  });
104
111
  },
105
- /** Submits the form. Runs full-form validation; advances only when no errors. */
112
+ /**
113
+ * Continues from the current step: validates its fields and moves to the
114
+ * next step when they pass. On the last step it submits, like `submit()`.
115
+ */
116
+ next() {
117
+ actor.send({ type: "NEXT_STEP" });
118
+ },
119
+ /** Returns to the previous step. Keeps values and errors; does not validate. */
120
+ back() {
121
+ actor.send({ type: "PREVIOUS_STEP" });
122
+ },
123
+ /**
124
+ * Submits the form. Runs full-form validation whatever the current step;
125
+ * advances only when no errors, otherwise moves to the first step with one.
126
+ */
106
127
  submit() {
107
128
  trackElementClicked?.("submit");
108
129
  actor.send({ type: "SUBMIT" });
@@ -1,5 +1,5 @@
1
1
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
2
- import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DOlWgNuX.esm.js";
2
+ import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-C0csNsV2.esm.js";
3
3
  //#region src/modules/ekyc-prefill/ekycPrefillActor.ts
4
4
  /** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
5
5
  function createEkycPrefillActor(options = {}) {
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-BiDfOhRj.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-MUJosEwz.esm.js";
3
3
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
@@ -7163,6 +7163,38 @@ function processFieldValueByName(name, value, fieldsCountry) {
7163
7163
  if (name === "panNumber") return value.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
7164
7164
  return value;
7165
7165
  }
7166
+ /** Whether the form shows a field: not hidden, and not an email shown elsewhere. */
7167
+ const isVisibleEkycField = (field, hideEmail) => field.displayMode !== "hidden" && !(hideEmail && field.name === "email");
7168
+ /**
7169
+ * Splits the form into steps, one per run of visible fields with the same
7170
+ * section, in field order. A section with no visible field has no step.
7171
+ */
7172
+ function buildEkycSteps(fields, hideEmail) {
7173
+ const steps = [];
7174
+ for (const field of fields) {
7175
+ if (!isVisibleEkycField(field, hideEmail)) continue;
7176
+ const id = field.section ?? "personal";
7177
+ const last = steps[steps.length - 1];
7178
+ if (last?.id === id) last.fieldNames.push(field.name);
7179
+ else steps.push({
7180
+ id,
7181
+ fieldNames: [field.name]
7182
+ });
7183
+ }
7184
+ return steps;
7185
+ }
7186
+ /**
7187
+ * The step index kept within the steps the form has now. A missing index, as
7188
+ * in a snapshot taken before steps existed, is the first step.
7189
+ */
7190
+ const clampStepIndex = (index, steps) => Number.isFinite(index) ? Math.max(0, Math.min(index, steps.length - 1)) : 0;
7191
+ /** Whether a step's fields have no validation errors. */
7192
+ const isStepValid = (step, errors) => !step || step.fieldNames.every((name) => !errors?.[name]);
7193
+ /** The first step with a validation error, or `undefined` when none has one. */
7194
+ function firstStepWithError(steps, errors) {
7195
+ const index = steps.findIndex((step) => !isStepValid(step, errors));
7196
+ return index === -1 ? void 0 : index;
7197
+ }
7166
7198
  //#endregion
7167
7199
  //#region src/modules/ekyc/ekycServices.ts
7168
7200
  /** Fetches module configuration for EXTERNAL_VERIFICATION */
@@ -7289,6 +7321,12 @@ const prefillConfig = (context) => ({
7289
7321
  riskAddons: context.moduleConfig?.riskAddons,
7290
7322
  useDefinitions: context._formDefinitions
7291
7323
  });
7324
+ const stepsOf = (context) => buildEkycSteps(context.fields, context.hideEmail);
7325
+ /** The step the user is on, kept within the steps the form has now. */
7326
+ const currentStep = (context) => {
7327
+ const steps = stepsOf(context);
7328
+ return steps[clampStepIndex(context.currentStepIndex, steps)];
7329
+ };
7292
7330
  const omitKeys = (errors, keys) => {
7293
7331
  if (!errors) return void 0;
7294
7332
  const next = { ...errors };
@@ -7391,6 +7429,30 @@ const ekycMachine = setup({
7391
7429
  const errors = validateEkycForm(context.values, context.fields);
7392
7430
  return { validationErrors: Object.keys(errors).length > 0 ? errors : void 0 };
7393
7431
  }),
7432
+ validateCurrentStep: assign(({ context }) => {
7433
+ const step = currentStep(context);
7434
+ if (!step) return {};
7435
+ const next = { ...context.validationErrors ?? {} };
7436
+ for (const name of step.fieldNames) {
7437
+ const message = validateEkycField(context.values, name, context.fields);
7438
+ if (message) next[name] = message;
7439
+ else delete next[name];
7440
+ }
7441
+ return { validationErrors: Object.keys(next).length > 0 ? next : void 0 };
7442
+ }),
7443
+ advanceStep: assign(({ context }) => {
7444
+ const steps = stepsOf(context);
7445
+ return { currentStepIndex: clampStepIndex(clampStepIndex(context.currentStepIndex, steps) + 1, steps) };
7446
+ }),
7447
+ previousStep: assign(({ context }) => {
7448
+ const steps = stepsOf(context);
7449
+ return { currentStepIndex: clampStepIndex(clampStepIndex(context.currentStepIndex, steps) - 1, steps) };
7450
+ }),
7451
+ goToFirstStepWithError: assign(({ context }) => {
7452
+ const index = firstStepWithError(stepsOf(context), context.validationErrors);
7453
+ return index === void 0 ? {} : { currentStepIndex: index };
7454
+ }),
7455
+ resetStep: assign({ currentStepIndex: () => 0 }),
7394
7456
  fillAddressFields: assign(({ context, event }) => {
7395
7457
  const { suggestion } = event;
7396
7458
  const activeFields = new Set(context.fields.filter((f) => !isLocked(f)).map((f) => f.name));
@@ -7425,7 +7487,12 @@ const ekycMachine = setup({
7425
7487
  needsPhoneRules: needsPhoneRulesGuard,
7426
7488
  isCountryNotSupported: isCountryNotSupportedGuard,
7427
7489
  shouldAutoSubmit: ({ context }) => !context.autoSubmitted && showsNoFields(context),
7428
- showsNoFields: ({ context }) => showsNoFields(context)
7490
+ showsNoFields: ({ context }) => showsNoFields(context),
7491
+ isLastStep: ({ context }) => {
7492
+ const steps = stepsOf(context);
7493
+ return clampStepIndex(context.currentStepIndex, steps) >= steps.length - 1;
7494
+ },
7495
+ currentStepHasNoErrors: ({ context }) => isStepValid(currentStep(context), context.validationErrors)
7429
7496
  }
7430
7497
  }).createMachine({
7431
7498
  id: "ekyc",
@@ -7447,6 +7514,7 @@ const ekycMachine = setup({
7447
7514
  autoSubmitted: false,
7448
7515
  errorMessage: "",
7449
7516
  submitError: "",
7517
+ currentStepIndex: 0,
7450
7518
  _formDefinitions: isFormDefinitionsEnabled(),
7451
7519
  _searchQuery: ""
7452
7520
  };
@@ -7509,19 +7577,22 @@ const ekycMachine = setup({
7509
7577
  } }
7510
7578
  }
7511
7579
  },
7512
- prefilling: { invoke: {
7513
- id: "fetchPrefillData",
7514
- src: "fetchPrefillData",
7515
- input: ({ context }) => ({ addressOrigin: prefillAddressOrigin(prefillConfig(context)) }),
7516
- onDone: {
7517
- target: "form",
7518
- actions: "applyPrefillData"
7519
- },
7520
- onError: {
7521
- target: "form",
7522
- actions: "applyEmptyPrefill"
7580
+ prefilling: {
7581
+ entry: "resetStep",
7582
+ invoke: {
7583
+ id: "fetchPrefillData",
7584
+ src: "fetchPrefillData",
7585
+ input: ({ context }) => ({ addressOrigin: prefillAddressOrigin(prefillConfig(context)) }),
7586
+ onDone: {
7587
+ target: "form",
7588
+ actions: "applyPrefillData"
7589
+ },
7590
+ onError: {
7591
+ target: "form",
7592
+ actions: "applyEmptyPrefill"
7593
+ }
7523
7594
  }
7524
- } },
7595
+ },
7525
7596
  form: {
7526
7597
  initial: "inputting",
7527
7598
  states: {
@@ -7557,10 +7628,29 @@ const ekycMachine = setup({
7557
7628
  always: [{
7558
7629
  guard: "hasNoValidationErrors",
7559
7630
  target: "#ekyc.submitting"
7631
+ }, {
7632
+ target: "inputting",
7633
+ actions: "goToFirstStepWithError"
7634
+ }]
7635
+ },
7636
+ validatingStep: {
7637
+ entry: "validateCurrentStep",
7638
+ always: [{
7639
+ guard: "currentStepHasNoErrors",
7640
+ target: "inputting",
7641
+ actions: "advanceStep"
7560
7642
  }, { target: "inputting" }]
7561
7643
  }
7562
7644
  },
7563
7645
  on: {
7646
+ NEXT_STEP: [{
7647
+ guard: "isLastStep",
7648
+ target: ".validatingSubmit"
7649
+ }, { target: ".validatingStep" }],
7650
+ PREVIOUS_STEP: {
7651
+ target: ".inputting",
7652
+ actions: "previousStep"
7653
+ },
7564
7654
  SEARCH_ADDRESS: {
7565
7655
  target: ".searching",
7566
7656
  actions: assign(({ event }) => ({
@@ -7625,4 +7715,4 @@ const ekycMachine = setup({
7625
7715
  }
7626
7716
  });
7627
7717
  //#endregion
7628
- export { ekycMachine as t };
7718
+ export { isStepValid as i, buildEkycSteps as n, clampStepIndex as r, ekycMachine as t };
@@ -1,2 +1,2 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-CiK5ZWMS.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-Bn9Pm902.esm.js";
2
2
  export { AE_CONSENT_KEYS, NAMIRIAL_QES_CONSENT_KEYS, NAMIRIAL_QES_PROVIDER_CODE, QE_CONSENT_KEYS, areAllConsented, createElectronicSignatureManager, createElectronicSignatureManagerFromActor, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
- import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-BiDfOhRj.esm.js";
4
+ import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-MUJosEwz.esm.js";
5
5
  import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
6
6
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
7
7
  import { t as externalFetch } from "./externalFetch-CQY41QT1.esm.js";
@@ -12,7 +12,7 @@ import "./StreamCanvasCapture-ixfy84ys.js";
12
12
  import { i as createIdCaptureManagerFromActor, n as IdCaptureManager, q as WasmUtilProvider, r as IdCaptureState, y as IdCaptureActor } from "./idCaptureManager-CG8zbAp0.js";
13
13
  import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-CISxaY6N.js";
14
14
  import { a as CertificateIssuanceActor, i as createCertificateIssuanceManagerFromActor, n as CertificateIssuanceState, t as CertificateIssuanceManager } from "./certificateIssuanceManager-Dr8A4Lgr.js";
15
- import { a as ConsentActor, i as createConsentManagerFromActor, n as ConsentState, t as ConsentManager } from "./consentManager-7aHaehwF.js";
15
+ import { a as ConsentActor, i as createConsentManagerFromActor, n as ConsentState, t as ConsentManager } from "./consentManager-DXetSxcx.js";
16
16
  import { a as CrossDocumentDataMatchActor, i as createCrossDocumentDataMatchManagerFromActor, n as CrossDocumentDataMatchState, t as CrossDocumentDataMatchManager } from "./crossDocumentDataMatchManager-yCWCOzcU.js";
17
17
  import { a as CurpValidationActor, i as createCurpValidationManagerFromActor, n as CurpValidationState, t as CurpValidationManager } from "./curpValidationManager-DEqTUWdu.js";
18
18
  import { a as createCustomFieldsManagerFromActor, n as CustomFieldsState, o as CustomFieldsActor, t as CustomFieldsManager } from "./customFieldsManager-CF-cO8ap.js";
@@ -21,7 +21,7 @@ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor,
21
21
  import { a as DynamicFormsActor, i as createDynamicFormsManagerFromActor, n as DynamicFormsState, t as DynamicFormsManager } from "./dynamicFormsManager-9kwY8Bf5.js";
22
22
  import { a as EkybActor, i as createEkybManagerFromActor, n as EkybState, t as EkybManager } from "./ekybManager-BLOkwmWO.js";
23
23
  import { c as EkycPrefillManager, m as EkycPrefillActor, p as createEkycPrefillManagerFromActor, u as EkycPrefillState } from "./ekycPrefillManager-PPGVZbWk.js";
24
- import { a as EkycActor, i as createEkycManagerFromActor, n as EkycState, t as EkycManager } from "./ekycManager-q1fos6IY.js";
24
+ import { i as createEkycManagerFromActor, n as EkycState, o as EkycActor, t as EkycManager } from "./ekycManager-C4gkJ1w_.js";
25
25
  import { a as EmailActor, i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-Dy6omJVp.js";
26
26
  import { i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-DREuBhXZ.js";
27
27
  import { i as CaptureIdResponse } from "./types-BqlZSoZ-.js";
@@ -30,7 +30,7 @@ import { a as WatchlistActor, i as createWatchlistManagerFromActor, n as Watchli
30
30
  import { i as WatchlistForBusinessState, o as createWatchlistForBusinessManagerFromActor, r as WatchlistForBusinessManager, s as WatchlistForBusinessActor } from "./watchlistForBusinessManager-DX2AyM4Y.js";
31
31
  import { a as IdentityReuseActor, i as createIdentityReuseManagerFromActor, n as IdentityReuseState, t as IdentityReuseManager } from "./identityReuseManager-ooAbp6Kc.js";
32
32
  import { a as FieldComparisonActor, i as createFieldComparisonManagerFromActor, n as FieldComparisonState, t as FieldComparisonManager } from "./fieldComparisonManager-CUX4gza2.js";
33
- import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, t as MandatoryConsentManager } from "./mandatoryConsentManager-CYOJd_IZ.js";
33
+ import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, t as MandatoryConsentManager } from "./mandatoryConsentManager-NBAqxVzC.js";
34
34
  import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, t as IdOcrManager } from "./idOcrManager-B5xeI2lg.js";
35
35
  import { a as RedirectToMobileActor, i as createRedirectToMobileManagerFromActor, n as RedirectToMobileState, t as RedirectToMobileManager } from "./redirectToMobileManager-Dm9ctRCC.js";
36
36
  import { a as createSignatureManagerFromActor, n as SignatureManager, o as SignatureActor, r as SignatureState } from "./signatureManager-BpVt_Jv7.js";