@incodetech/core 0.0.0-dev-20261112-a97f6537 → 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 (75) hide show
  1. package/dist/{FaceDetectionProvider-BYhC7KH_.esm.js → FaceDetectionProvider-BFjCyYz9.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-vSfs8W0Z.esm.js → apiError-MUJosEwz.esm.js} +1 -1
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-DVzGEY3T.esm.js → authenticationManager-C2Q28jLY.esm.js} +3 -3
  6. package/dist/{authenticationStateMachine-Br7ovcM8.esm.js → authenticationStateMachine-BTVuXBmg.esm.js} +2 -2
  7. package/dist/consent.d.ts +1 -1
  8. package/dist/{consentManager-CgDnGyW_.d.ts → consentManager-DXetSxcx.d.ts} +9 -9
  9. package/dist/{deepsightLoader-iUWKiyus.esm.js → deepsightLoader-BrUk17wc.esm.js} +3 -3
  10. package/dist/document-capture.d.ts +1 -1
  11. package/dist/{documentCaptureManager-JmV11_R6.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +4 -4
  12. package/dist/dynamic-forms.esm.js +2 -2
  13. package/dist/{dynamicFormsManager-DHIZSVMi.esm.js → dynamicFormsManager-Bf2yQ0rs.esm.js} +1 -1
  14. package/dist/{dynamicFormsStateMachine-CTD5qqv7.esm.js → dynamicFormsStateMachine-CMFCaE32.esm.js} +1 -1
  15. package/dist/ekyb.esm.js +2 -2
  16. package/dist/{ekybManager-X761X8ZH.esm.js → ekybManager-CvYvio91.esm.js} +1 -1
  17. package/dist/{ekybStateMachine-CjViIY0V.esm.js → ekybStateMachine-CDfHmPUs.esm.js} +1 -1
  18. package/dist/ekyc-prefill.d.ts +1 -1
  19. package/dist/ekyc-prefill.esm.js +2 -2
  20. package/dist/ekyc.d.ts +2 -2
  21. package/dist/ekyc.esm.js +2 -2
  22. package/dist/{ekycManager-q1fos6IY.d.ts → ekycManager-C4gkJ1w_.d.ts} +44 -3
  23. package/dist/{ekycManager-CeeJoRFY.esm.js → ekycManager-DGAn__vq.esm.js} +35 -14
  24. package/dist/{ekycPrefillManager-BziaL-wK.esm.js → ekycPrefillManager-CX0-5GGA.esm.js} +1 -1
  25. package/dist/{ekycPrefillManager-CEyCc_KJ.d.ts → ekycPrefillManager-PPGVZbWk.d.ts} +30 -30
  26. package/dist/{ekycPrefillStateMachine-BpjelkC9.esm.js → ekycPrefillStateMachine-C0csNsV2.esm.js} +1 -1
  27. package/dist/{ekycStateMachine-DBTczgGE.esm.js → ekycStateMachine-NSnXCfwh.esm.js} +104 -14
  28. package/dist/electronic-signature.esm.js +1 -1
  29. package/dist/{electronicSignatureManager-D9myhXmW.esm.js → electronicSignatureManager-Bn9Pm902.esm.js} +1 -1
  30. package/dist/extensibility.d.ts +8 -8
  31. package/dist/extensibility.esm.js +13 -13
  32. package/dist/{faceCaptureManagerFactory-BbTvWUk7.esm.js → faceCaptureManagerFactory-E29Xz3yI.esm.js} +1 -1
  33. package/dist/{faceCaptureSetup-BZU1l2XI.esm.js → faceCaptureSetup-BUufMik2.esm.js} +3 -3
  34. package/dist/{feature-management-CXARIiF5.esm.js → feature-management-L3eiz9Rv.esm.js} +1 -1
  35. package/dist/feature-management.esm.js +1 -1
  36. package/dist/flow.esm.js +3 -3
  37. package/dist/{flowCompletionService-BQjO6iPD.esm.js → flowCompletionService-DqwsC4lT.esm.js} +1 -1
  38. package/dist/{flowServices-DlJUUJc3.esm.js → flowServices-BKNERhW7.esm.js} +4 -4
  39. package/dist/geolocation.d.ts +1 -1
  40. package/dist/geolocation.esm.js +2 -2
  41. package/dist/{geolocationManager-CPhykMow.d.ts → geolocationManager-6e1i9UIR.d.ts} +1 -1
  42. package/dist/{geolocationManager-Cvv0RL8t.esm.js → geolocationManager-xY_Ybgl8.esm.js} +1 -1
  43. package/dist/{geolocationStateMachine-CKnp38ic.esm.js → geolocationStateMachine-COc3qHfM.esm.js} +1 -1
  44. package/dist/id-ocr.d.ts +1 -1
  45. package/dist/id-selfie-flow.esm.js +6 -6
  46. package/dist/id.esm.js +3 -3
  47. package/dist/{idCaptureManager-CBmUwwyT.esm.js → idCaptureManager-CYtzDU1M.esm.js} +3 -3
  48. package/dist/{idCaptureServices-B-UmJefT.esm.js → idCaptureServices-BBBqZEBc.esm.js} +2 -2
  49. package/dist/{idCaptureStateMachine-BHYG3CLh.esm.js → idCaptureStateMachine-BD5s0mO_.esm.js} +8 -8
  50. package/dist/{idOcrManager-GFy7tFVV.d.ts → idOcrManager-B5xeI2lg.d.ts} +1 -1
  51. package/dist/identity-reuse.d.ts +1 -1
  52. package/dist/{identityReuseManager-CU8d7T8n.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +4 -4
  53. package/dist/index.esm.js +1 -1
  54. package/dist/kyb-checks.esm.js +2 -2
  55. package/dist/{kybChecksManager-CW1Y8S7i.esm.js → kybChecksManager-BpD-3H0j.esm.js} +1 -1
  56. package/dist/{kybChecksStateMachine-ixwh64iq.esm.js → kybChecksStateMachine-D0NV3i55.esm.js} +1 -1
  57. package/dist/mandatory-consent.d.ts +1 -1
  58. package/dist/{mandatoryConsentManager-1NjnIdHZ.d.ts → mandatoryConsentManager-NBAqxVzC.d.ts} +9 -9
  59. package/dist/qe-signature.esm.js +1 -1
  60. package/dist/{runChildModule-Cibky5hh.esm.js → runChildModule-Sd7HS30G.esm.js} +1 -1
  61. package/dist/{sdkVersion-D9azBnFg.esm.js → sdkVersion-GcCzb3Px.esm.js} +1 -1
  62. package/dist/selfie.esm.js +6 -6
  63. package/dist/{selfieErrorUtils-Cbq7DEXs.esm.js → selfieErrorUtils-DBK_jegf.esm.js} +1 -1
  64. package/dist/{selfieManager-DukKSouw.esm.js → selfieManager-Cee_9ASV.esm.js} +3 -3
  65. package/dist/{selfieStateMachine-gcBzI9gd.esm.js → selfieStateMachine-D6Oe0_kd.esm.js} +3 -3
  66. package/dist/{session-DzqvagNC.esm.js → session-BVZyjWFT.esm.js} +3 -3
  67. package/dist/session.esm.js +4 -4
  68. package/dist/{sessionInitializer-jpLwvpZR.esm.js → sessionInitializer-D06GkSia.esm.js} +3 -3
  69. package/dist/{setup-CJpuQDMB.esm.js → setup-XPmg3OH_.esm.js} +4 -4
  70. package/dist/{trueSightService-r_30qtHF.esm.js → trueSightService-DitOWhDS.esm.js} +1 -1
  71. package/dist/video-selfie.esm.js +3 -3
  72. package/dist/{videoSelfieCameraWarmer-CwS_S-cv.esm.js → videoSelfieCameraWarmer-C7oFdvEa.esm.js} +3 -3
  73. package/dist/wasm.esm.js +1 -1
  74. package/dist/workflow.esm.js +16 -16
  75. 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-CJpuQDMB.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-r_30qtHF.esm.js";
6
- import "./sessionInitializer-jpLwvpZR.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-iUWKiyus.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-D9myhXmW.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-r_30qtHF.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-Br7ovcM8.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-DVzGEY3T.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-CJpuQDMB.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-BbTvWUk7.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-Br7ovcM8.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-BZU1l2XI.esm.js";
4
- import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BYhC7KH_.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-CgDnGyW_.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 };
@@ -74,18 +74,22 @@ declare const consentMachine: StateMachine<ConsentContext, {
74
74
  id: string | undefined;
75
75
  };
76
76
  }>, Values<{
77
- clearError: {
78
- type: "clearError";
79
- params: NonReducibleUnknown;
80
- };
81
77
  setError: {
82
78
  type: "setError";
83
79
  params: NonReducibleUnknown;
84
80
  };
81
+ clearError: {
82
+ type: "clearError";
83
+ params: NonReducibleUnknown;
84
+ };
85
85
  setLoadError: {
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,14 +98,10 @@ 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;
104
- }, never, "error" | "idle" | "finished" | "submitting" | "loading" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
104
+ }, never, "error" | "idle" | "finished" | "loading" | "submitting" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
105
105
  readonly id: "consent";
106
106
  readonly initial: "idle";
107
107
  readonly context: ({ input }: {
@@ -1,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-E_cX5CfH.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-r_30qtHF.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-D9azBnFg.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-jpLwvpZR.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
1
  import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, u as DocumentUploadStatus } from "./types-CyNndVAT.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-JmV11_R6.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-CD5iQiUI.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, type DocumentUploadStatus, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -101,14 +101,14 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
101
101
  id: string | undefined;
102
102
  };
103
103
  }>, Values<{
104
- clearError: {
105
- type: "clearError";
106
- params: NonReducibleUnknown;
107
- };
108
104
  decrementAttemptsRemaining: {
109
105
  type: "decrementAttemptsRemaining";
110
106
  params: NonReducibleUnknown;
111
107
  };
108
+ clearError: {
109
+ type: "clearError";
110
+ params: NonReducibleUnknown;
111
+ };
112
112
  setStream: {
113
113
  type: "setStream";
114
114
  params: NonReducibleUnknown;
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CTD5qqv7.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-DHIZSVMi.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-CTD5qqv7.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-vSfs8W0Z.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-CjViIY0V.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-X761X8ZH.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-CjViIY0V.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-DlJUUJc3.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,6 +1,6 @@
1
1
  import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
2
2
  import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
3
- import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-CEyCc_KJ.js";
3
+ import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-PPGVZbWk.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
5
5
  /**
6
6
  * Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-BpjelkC9.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-BziaL-wK.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-BpjelkC9.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 = {}) {
@@ -27,10 +27,15 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
27
27
  } | {
28
28
  type: "CLOSE";
29
29
  }, {
30
- [x: string]: ActorRefFromLogic<PromiseActorLogic<void, {
30
+ [x: string]: ActorRefFromLogic<PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>> | ActorRefFromLogic<PromiseActorLogic<void, {
31
31
  hasPhone: boolean;
32
- }, EventObject>> | ActorRefFromLogic<PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>> | undefined;
32
+ }, EventObject>> | undefined;
33
33
  }, Values<{
34
+ submit: {
35
+ src: "submit";
36
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
37
+ id: string | undefined;
38
+ };
34
39
  loadPhoneRules: {
35
40
  src: "loadPhoneRules";
36
41
  logic: PromiseActorLogic<void, {
@@ -38,11 +43,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
38
43
  }, EventObject>;
39
44
  id: string | undefined;
40
45
  };
41
- submit: {
42
- src: "submit";
43
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
44
- id: string | undefined;
45
- };
46
46
  }>, Values<{
47
47
  applyForm: {
48
48
  type: "applyForm";
@@ -81,6 +81,10 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
81
81
  params: NonReducibleUnknown;
82
82
  };
83
83
  }>, Values<{
84
+ isValid: {
85
+ type: "isValid";
86
+ params: unknown;
87
+ };
84
88
  phoneRulesFailed: {
85
89
  type: "phoneRulesFailed";
86
90
  params: unknown;
@@ -93,10 +97,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
93
97
  type: "canRender";
94
98
  params: unknown;
95
99
  };
96
- isValid: {
97
- type: "isValid";
98
- params: unknown;
99
- };
100
100
  isBadRequest: {
101
101
  type: "isBadRequest";
102
102
  params: unknown;
@@ -109,24 +109,20 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
109
109
  type: "isLimitReached";
110
110
  params: unknown;
111
111
  };
112
- }>, never, "error" | "idle" | "closed" | "finished" | "misconfigured" | "submitting" | "limitReached" | {
112
+ }>, never, "error" | "idle" | "closed" | "finished" | "submitting" | "misconfigured" | "limitReached" | {
113
113
  form: "inputting" | "validating";
114
114
  }, string, EkycPrefillInput, NonReducibleUnknown, EventObject, MetaObject, {
115
115
  readonly id: "ekycPrefill";
116
116
  readonly initial: "idle";
117
117
  readonly context: ({ input }: {
118
118
  spawn: {
119
- <TSrc extends "loadPhoneRules" | "submit">(logic: TSrc, ...[options]: ({
120
- src: "loadPhoneRules";
121
- logic: PromiseActorLogic<void, {
122
- hasPhone: boolean;
123
- }, EventObject>;
119
+ <TSrc extends "submit" | "loadPhoneRules">(logic: TSrc, ...[options]: ({
120
+ src: "submit";
121
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
124
122
  id: string | undefined;
125
123
  } extends (infer T) ? T extends {
126
- src: "loadPhoneRules";
127
- logic: PromiseActorLogic<void, {
128
- hasPhone: boolean;
129
- }, EventObject>;
124
+ src: "submit";
125
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
130
126
  id: string | undefined;
131
127
  } ? T extends {
132
128
  src: TSrc;
@@ -136,12 +132,16 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
136
132
  input?: InputFrom<T["logic"]> | undefined;
137
133
  syncSnapshot?: boolean;
138
134
  } & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never) | ({
139
- src: "submit";
140
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
135
+ src: "loadPhoneRules";
136
+ logic: PromiseActorLogic<void, {
137
+ hasPhone: boolean;
138
+ }, EventObject>;
141
139
  id: string | undefined;
142
140
  } extends (infer T_1) ? T_1 extends {
143
- src: "submit";
144
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
141
+ src: "loadPhoneRules";
142
+ logic: PromiseActorLogic<void, {
143
+ hasPhone: boolean;
144
+ }, EventObject>;
145
145
  id: string | undefined;
146
146
  } ? T_1 extends {
147
147
  src: TSrc;
@@ -151,6 +151,11 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
151
151
  input?: InputFrom<T_1["logic"]> | undefined;
152
152
  syncSnapshot?: boolean;
153
153
  } & { [K_1 in RequiredActorOptions<T_1>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T_1>>> : never : never : never)): ActorRefFromLogic<GetConcreteByKey<Values<{
154
+ submit: {
155
+ src: "submit";
156
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
157
+ id: string | undefined;
158
+ };
154
159
  loadPhoneRules: {
155
160
  src: "loadPhoneRules";
156
161
  logic: PromiseActorLogic<void, {
@@ -158,11 +163,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
158
163
  }, EventObject>;
159
164
  id: string | undefined;
160
165
  };
161
- submit: {
162
- src: "submit";
163
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
164
- id: string | undefined;
165
- };
166
166
  }>, "src", TSrc>["logic"]>;
167
167
  <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
168
168
  id?: never;
@@ -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-vSfs8W0Z.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";