@incodetech/core 0.0.0-dev-20261125-e10a167e → 0.0.0-dev-20261125-6cc4bbe4
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.
- package/dist/{FaceDetectionProvider-DBV0ahb8.esm.js → FaceDetectionProvider-CMhcdtpE.esm.js} +4 -4
- package/dist/{addressSearch-BdHZ5FEs.esm.js → addressSearch-DBJeg_g3.esm.js} +9 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-CuZcUZuv.esm.js → apiError-BdUUT-aa.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DisUbRlN.esm.js → authenticationManager-C2li1k0L.esm.js} +3 -3
- package/dist/{authenticationStateMachine-DkBQguqq.esm.js → authenticationStateMachine-CGSNQCMU.esm.js} +3 -3
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-CMed_O5F.d.ts → consentManager-vI6QHkHU.d.ts} +4 -4
- package/dist/{deepsightCaptureConfig-DGVUTY29.esm.js → deepsightCaptureConfig-CH3OS70R.esm.js} +2 -2
- package/dist/{deepsightLoader-D_RQdqL_.esm.js → deepsightLoader-CwvplTzn.esm.js} +4 -4
- package/dist/definitionSource-B9WTvQb9.esm.js +30 -0
- package/dist/{desktopCameraElection-CuLTefJ0.esm.js → desktopCameraElection-Dzk5E4zQ.esm.js} +4 -4
- package/dist/document-capture.d.ts +1 -1
- package/dist/document-signature.esm.js +1 -1
- package/dist/{documentCaptureManager-DOgJTJ4F.d.ts → documentCaptureManager-sJWgqtUy.d.ts} +4 -4
- package/dist/{documentSignatureStateMachine-D-6LvS1H.esm.js → documentSignatureStateMachine-C6T8Y2lK.esm.js} +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-D5ZYdtQr.esm.js → dynamicFormsManager-BBHxLMRp.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-BR6iuC5G.esm.js → dynamicFormsStateMachine-BHPoZ8q4.esm.js} +1 -1
- package/dist/ekyb.d.ts +2 -2
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-DZdSXQMK.d.ts → ekybManager-Cjk8pQX0.d.ts} +1 -1
- package/dist/{ekybManager-Be_YnkHA.esm.js → ekybManager-q-NZzZtM.esm.js} +1 -1
- package/dist/{ekybStateMachine-hWRDkhAT.esm.js → ekybStateMachine-R5cxtws_.esm.js} +130 -7
- package/dist/{ekybUtils-Z9MhFAer.esm.js → ekybUtils-Dl0MU-ib.esm.js} +23 -1
- package/dist/ekyc-prefill.d.ts +1 -1
- package/dist/ekyc-prefill.esm.js +2 -2
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-CkPw79Pc.esm.js → ekycManager-D2K8AaMV.esm.js} +1 -1
- package/dist/{ekycPrefillManager-Dhy0OG_b.d.ts → ekycPrefillManager-BwmPXfhY.d.ts} +30 -30
- package/dist/{ekycPrefillManager-CaMwNpP0.esm.js → ekycPrefillManager-KcrRytAq.esm.js} +1 -1
- package/dist/{ekycPrefillStateMachine-NMaEb10U.esm.js → ekycPrefillStateMachine-DC8uJnud.esm.js} +3 -3
- package/dist/{ekycStateMachine-4cYy3va1.esm.js → ekycStateMachine-6EKndBd7.esm.js} +12 -7
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-D42Fx6cT.esm.js → electronicSignatureManager-DqufooPc.esm.js} +1 -1
- package/dist/extensibility.d.ts +8 -8
- package/dist/extensibility.esm.js +13 -13
- package/dist/{faceCaptureManagerFactory-BbRj8P8O.esm.js → faceCaptureManagerFactory-CWgRnbPC.esm.js} +2 -2
- package/dist/{faceCaptureSetup-WxNPfp15.esm.js → faceCaptureSetup-CsnM8ZcW.esm.js} +7 -7
- package/dist/{feature-management-B0q4TMsC.esm.js → feature-management-BDSwO7QV.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.d.ts +1 -1
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-BASbhN57.esm.js → flowCompletionService-CYPXshbL.esm.js} +1 -1
- package/dist/{flowServices-CrBbfWoL.esm.js → flowServices-5Ebtf1db.esm.js} +5 -5
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CZlG5tET.esm.js → geolocationManager-B_lVzL0-.esm.js} +1 -1
- package/dist/{geolocationManager-Del2ddmt.d.ts → geolocationManager-CENrvxpK.d.ts} +1 -1
- package/dist/{geolocationStateMachine-DMm-G7NL.esm.js → geolocationStateMachine-DvhqzsGZ.esm.js} +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +6 -6
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-DEy-XaBi.esm.js → idCaptureManager-DFQI89u-.esm.js} +4 -4
- package/dist/{idCaptureServices-CpqaRkff.esm.js → idCaptureServices-DD_3omxr.esm.js} +2 -2
- package/dist/{idCaptureStateMachine-Bzj86X_4.esm.js → idCaptureStateMachine-k4R1fi-y.esm.js} +11 -11
- package/dist/{idOcrManager-voLpv_jJ.d.ts → idOcrManager-DflRx-_u.d.ts} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-D_jiHp1n.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +4 -4
- package/dist/index.esm.js +1 -1
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-BIlgSbb0.esm.js → kybChecksManager-BeLTy9xo.esm.js} +1 -1
- package/dist/{kybChecksStateMachine-JwoWvTVP.esm.js → kybChecksStateMachine-DVICFLYp.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-BY8WCCKq.d.ts → mandatoryConsentManager-aij01joJ.d.ts} +4 -4
- package/dist/{numericRange-zDZFvRb8.esm.js → numericRange-2e1vw1W0.esm.js} +1 -19
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-BMy-wSI4.esm.js → recordingService-RgV2SY4k.esm.js} +1 -1
- package/dist/{runChildModule-DiXTIKoa.esm.js → runChildModule-BIPP80SK.esm.js} +1 -1
- package/dist/{sdkVersion-BkmV6loo.esm.js → sdkVersion-3qOVIvN0.esm.js} +1 -1
- package/dist/selfie.esm.js +7 -7
- package/dist/{selfieErrorUtils-CPZwkfS1.esm.js → selfieErrorUtils-CtmTu3fa.esm.js} +1 -1
- package/dist/{selfieManager-DeovVNrI.esm.js → selfieManager-CA4F2ExG.esm.js} +3 -3
- package/dist/{selfieStateMachine-B8WvkomM.esm.js → selfieStateMachine-BrGY6TX3.esm.js} +3 -3
- package/dist/{session-DNqHhYmG.esm.js → session-7xCqW4aC.esm.js} +4 -4
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-BaxrnKP5.esm.js → sessionInitializer-DMmZCv1L.esm.js} +4 -4
- package/dist/{setup-CBVQS0Tc.esm.js → setup-DpejVs2r.esm.js} +5 -5
- package/dist/trueSight-BH_gVqBE.esm.js +1 -0
- package/dist/{trueSightService-j-XfYmgc.esm.js → trueSightService-BRDUhVLX.esm.js} +1 -1
- package/dist/{types-BaA0Qscz.d.ts → types-BwMpWCVG.d.ts} +5 -1
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-D7kNNRsI.esm.js → videoSelfieCameraWarmer-C8DTT0ji.esm.js} +3 -3
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.esm.js +19 -19
- package/package.json +3 -3
- package/dist/definitionSource-C_pmsYIx.esm.js +0 -12
- package/dist/trueSight-B5TsmkOb.esm.js +0 -1
package/dist/{FaceDetectionProvider-DBV0ahb8.esm.js → FaceDetectionProvider-CMhcdtpE.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { l as wasmRuntime } from "./warmup-O3rAoe1-.esm.js";
|
|
2
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
+
import { t as ensureWasmPipelines } from "./setup-DpejVs2r.esm.js";
|
|
3
3
|
import { r as BaseWasmProvider } from "./WasmUtilProvider-unrmGEHD.esm.js";
|
|
4
4
|
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
5
|
-
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-
|
|
6
|
-
import "./trueSight-
|
|
5
|
+
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-BRDUhVLX.esm.js";
|
|
6
|
+
import "./trueSight-BH_gVqBE.esm.js";
|
|
7
7
|
import { t as addDeviceStats } from "./stats-DHu3li6G.esm.js";
|
|
8
8
|
import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
|
|
9
9
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
@@ -234,7 +234,7 @@ function startDetection(params) {
|
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
async function initializeDeepsightSession(options) {
|
|
237
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
237
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-CwvplTzn.esm.js");
|
|
238
238
|
return loadDeepsightSession({
|
|
239
239
|
ds: options.ds,
|
|
240
240
|
storage: options.storage
|
|
@@ -101,7 +101,8 @@ const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
|
|
|
101
101
|
AR: 8,
|
|
102
102
|
CA: 7,
|
|
103
103
|
NL: 6,
|
|
104
|
-
PT: 8
|
|
104
|
+
PT: 8,
|
|
105
|
+
CO: 6
|
|
105
106
|
};
|
|
106
107
|
const FIXED_LENGTH_KEY = "verification.errors.invalidPostalCodeFixedLength";
|
|
107
108
|
/**
|
|
@@ -163,6 +164,11 @@ const NL_POSTAL_CODE_REGEX = /^\d{4}[A-Z]{2}$/;
|
|
|
163
164
|
/** Seven digits, the first 1 to 9, with or without a hyphen: 4430-458. */
|
|
164
165
|
const PT_POSTAL_CODE_REGEX = /^[1-9]\d{3}-?\d{3}$/;
|
|
165
166
|
/**
|
|
167
|
+
* Six digits (the national format), or four: Creditsafe records Colombian
|
|
168
|
+
* companies' postal codes as four digits, such as 0131.
|
|
169
|
+
*/
|
|
170
|
+
const CO_POSTAL_CODE_REGEX = /^(?:\d{4}|\d{6})$/;
|
|
171
|
+
/**
|
|
166
172
|
* Validates a postal code by country.
|
|
167
173
|
* Covers all countries used by eKYC and eKYB.
|
|
168
174
|
*/
|
|
@@ -179,6 +185,7 @@ function validatePostalCode(postalCode, country) {
|
|
|
179
185
|
case "AR": return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
|
|
180
186
|
case "NL": return NL_POSTAL_CODE_REGEX.test(postalCode);
|
|
181
187
|
case "PT": return PT_POSTAL_CODE_REGEX.test(postalCode);
|
|
188
|
+
case "CO": return CO_POSTAL_CODE_REGEX.test(postalCode);
|
|
182
189
|
case "CM": return postalCode.length > 0;
|
|
183
190
|
default: {
|
|
184
191
|
const stripped = postalCode.replace(/\D/g, "");
|
|
@@ -219,6 +226,7 @@ function formatPostalCode(value, country) {
|
|
|
219
226
|
const digits = value.replace(/\D/g, "").slice(0, 7);
|
|
220
227
|
return digits.length <= 4 ? digits : `${digits.slice(0, 4)}-${digits.slice(4)}`;
|
|
221
228
|
}
|
|
229
|
+
if (country === "CO") return value.replace(/\D/g, "").slice(0, 6);
|
|
222
230
|
if (country === "NL") return `${value.replace(/\D/g, "").slice(0, 4)}${value.replace(/[^A-Za-z]/g, "").slice(0, 2).toUpperCase()}`;
|
|
223
231
|
return value.slice(0, 8);
|
|
224
232
|
}
|
package/dist/ae-signature.esm.js
CHANGED
|
@@ -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-
|
|
1
|
+
import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-DqufooPc.esm.js";
|
|
2
2
|
//#region src/modules/ae-signature/index.ts
|
|
3
3
|
function createAeSignatureManager(options) {
|
|
4
4
|
return createElectronicSignatureManager({ config: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
2
|
-
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-
|
|
1
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-CGSNQCMU.esm.js";
|
|
2
|
+
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-C2li1k0L.esm.js";
|
|
3
3
|
export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
package/dist/{authenticationManager-DisUbRlN.esm.js → authenticationManager-C2li1k0L.esm.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { u as BrowserStorageProvider } from "./setup-DpejVs2r.esm.js";
|
|
2
2
|
import { t as WasmUtilProvider } from "./WasmUtilProvider-unrmGEHD.esm.js";
|
|
3
3
|
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
4
4
|
import "./events-PUWyizJn.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
7
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
6
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CWgRnbPC.esm.js";
|
|
7
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-CGSNQCMU.esm.js";
|
|
8
8
|
//#region src/modules/authentication/authenticationActor.ts
|
|
9
9
|
function createAuthenticationActor(options) {
|
|
10
10
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as assign } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
2
2
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
3
|
-
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
4
|
-
import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-
|
|
5
|
-
import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-
|
|
3
|
+
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-CsnM8ZcW.esm.js";
|
|
4
|
+
import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-CMhcdtpE.esm.js";
|
|
5
|
+
import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-Dzk5E4zQ.esm.js";
|
|
6
6
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
7
7
|
const AUTH_ERROR_MAP = {
|
|
8
8
|
SPOOF_ATTEMPT_DETECTED: FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED,
|
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-
|
|
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-vI6QHkHU.js";
|
|
2
2
|
export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
|
|
@@ -75,14 +75,14 @@ declare const consentMachine: StateMachine<ConsentContext, {
|
|
|
75
75
|
id: string | undefined;
|
|
76
76
|
};
|
|
77
77
|
}>, Values<{
|
|
78
|
-
clearError: {
|
|
79
|
-
type: "clearError";
|
|
80
|
-
params: NonReducibleUnknown;
|
|
81
|
-
};
|
|
82
78
|
setError: {
|
|
83
79
|
type: "setError";
|
|
84
80
|
params: NonReducibleUnknown;
|
|
85
81
|
};
|
|
82
|
+
clearError: {
|
|
83
|
+
type: "clearError";
|
|
84
|
+
params: NonReducibleUnknown;
|
|
85
|
+
};
|
|
86
86
|
setLoadError: {
|
|
87
87
|
type: "setLoadError";
|
|
88
88
|
params: NonReducibleUnknown;
|
package/dist/{deepsightCaptureConfig-DGVUTY29.esm.js → deepsightCaptureConfig-CH3OS70R.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as trueSightLog, w as utf8ByteLength } from "./trueSightService-
|
|
2
|
-
import "./trueSight-
|
|
1
|
+
import { u as trueSightLog, w as utf8ByteLength } from "./trueSightService-BRDUhVLX.esm.js";
|
|
2
|
+
import "./trueSight-BH_gVqBE.esm.js";
|
|
3
3
|
import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
|
|
4
4
|
//#region src/internal/deepsight/deepsightCaptureConfig.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as WasmUtilProvider } from "./WasmUtilProvider-unrmGEHD.esm.js";
|
|
2
|
-
import { u as trueSightLog } from "./trueSightService-
|
|
3
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
4
|
-
import "./trueSight-
|
|
5
|
-
import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as isBrowserSimulation, n as getFingerprintEnabled, t as getDisableIpify, w as SDK_PLATFORM, x as IpifyProvider, y as getThumbmarkId } from "./sessionInitializer-
|
|
2
|
+
import { u as trueSightLog } from "./trueSightService-BRDUhVLX.esm.js";
|
|
3
|
+
import { t as SDK_VERSION } from "./sdkVersion-3qOVIvN0.esm.js";
|
|
4
|
+
import "./trueSight-BH_gVqBE.esm.js";
|
|
5
|
+
import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as isBrowserSimulation, n as getFingerprintEnabled, t as getDisableIpify, w as SDK_PLATFORM, x as IpifyProvider, y as getThumbmarkId } from "./sessionInitializer-DMmZCv1L.esm.js";
|
|
6
6
|
import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
|
|
7
7
|
import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
|
|
8
8
|
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-0SxaYTcb.esm.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/internal/forms/checks/charTemplate.ts
|
|
2
|
+
const escapeForPattern = (chars) => chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3
|
+
/**
|
|
4
|
+
* `charTemplate`: the whole value matches one template, where `9` is a digit,
|
|
5
|
+
* `A` an uppercase letter A-Z and any other character stands for itself.
|
|
6
|
+
* `ignoreCase` also accepts lowercase letters and literals in either case.
|
|
7
|
+
*/
|
|
8
|
+
function matchesCharTemplate(value, templates, ignoreCase = false) {
|
|
9
|
+
return templates.some((template) => {
|
|
10
|
+
const pattern = [...template].map((char) => {
|
|
11
|
+
if (char === "9") return "[0-9]";
|
|
12
|
+
if (char === "A") return "[A-Z]";
|
|
13
|
+
return escapeForPattern(char);
|
|
14
|
+
}).join("");
|
|
15
|
+
return new RegExp(`^${pattern}$`, ignoreCase ? "iu" : "u").test(value);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/internal/forms/definitionSource.ts
|
|
20
|
+
const queryKey = ({ module, source, country }) => `${module}|${source ?? ""}|${country ?? ""}`;
|
|
21
|
+
/**
|
|
22
|
+
* The definitions bundled with this build. Matches module, source and country
|
|
23
|
+
* exactly, so a pair without its own definition keeps the current builder.
|
|
24
|
+
*/
|
|
25
|
+
function createBundledDefinitionSource(definitions) {
|
|
26
|
+
const byQuery = new Map(Object.values(definitions).map((definition) => [queryKey(definition), definition]));
|
|
27
|
+
return { select: (query) => byQuery.get(queryKey(query)) };
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { matchesCharTemplate as n, createBundledDefinitionSource as t };
|
package/dist/{desktopCameraElection-CuLTefJ0.esm.js → desktopCameraElection-Dzk5E4zQ.esm.js}
RENAMED
|
@@ -3,14 +3,14 @@ import { d as CAMERA_CYCLE_OWNERSHIP_DOMAIN, f as getCameraCycleOwnershipDomain,
|
|
|
3
3
|
import { r as setWasmDeepsightConfigSync } from "./wasmDeepsightConfigSync-DukEcrU8.esm.js";
|
|
4
4
|
import { i as utilityWasmApi } from "./WasmUtilProvider-unrmGEHD.esm.js";
|
|
5
5
|
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
6
|
-
import { u as trueSightLog } from "./trueSightService-
|
|
7
|
-
import "./trueSight-
|
|
8
|
-
import { m as getFeatureGate } from "./feature-management-
|
|
6
|
+
import { u as trueSightLog } from "./trueSightService-BRDUhVLX.esm.js";
|
|
7
|
+
import "./trueSight-BH_gVqBE.esm.js";
|
|
8
|
+
import { m as getFeatureGate } from "./feature-management-BDSwO7QV.esm.js";
|
|
9
9
|
import { t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
10
10
|
import { c as isCameraDenialErrorName, n as enumerateVideoDevices, o as withAudioTracks, r as requestCameraAccess, s as clearCameraGrantedInDocument, u as markCameraGrantedInDocument } from "./camera-CJKApt0x.esm.js";
|
|
11
11
|
import { u as queryCameraPermission } from "./permissionServices-GQyOY1tb.esm.js";
|
|
12
12
|
import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
|
|
13
|
-
import { t as deepsightCaptureConfigText } from "./deepsightCaptureConfig-
|
|
13
|
+
import { t as deepsightCaptureConfigText } from "./deepsightCaptureConfig-CH3OS70R.esm.js";
|
|
14
14
|
import { r as selectBestBackDevice, t as isBackCameraLabel } from "./backCameraLabel-yda5ugE4.esm.js";
|
|
15
15
|
//#region ../infra/src/capabilities/ICameraCycleCapability.ts
|
|
16
16
|
/**
|
|
@@ -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-Cy6Lx3L6.js";
|
|
2
|
-
import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-
|
|
2
|
+
import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-sJWgqtUy.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 };
|
|
@@ -2,7 +2,7 @@ import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
|
2
2
|
import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
3
3
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
|
-
import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-
|
|
5
|
+
import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-C6T8Y2lK.esm.js";
|
|
6
6
|
//#region src/modules/document-signature/documentSignatureActor.ts
|
|
7
7
|
function createDocumentSignatureActor(options) {
|
|
8
8
|
return createActor(documentSignatureMachine, { input: { config: options.config } }).start();
|
|
@@ -102,14 +102,14 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
102
102
|
id: string | undefined;
|
|
103
103
|
};
|
|
104
104
|
}>, Values<{
|
|
105
|
-
clearError: {
|
|
106
|
-
type: "clearError";
|
|
107
|
-
params: NonReducibleUnknown;
|
|
108
|
-
};
|
|
109
105
|
decrementAttemptsRemaining: {
|
|
110
106
|
type: "decrementAttemptsRemaining";
|
|
111
107
|
params: NonReducibleUnknown;
|
|
112
108
|
};
|
|
109
|
+
clearError: {
|
|
110
|
+
type: "clearError";
|
|
111
|
+
params: NonReducibleUnknown;
|
|
112
|
+
};
|
|
113
113
|
setStream: {
|
|
114
114
|
type: "setStream";
|
|
115
115
|
params: NonReducibleUnknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, v as addEvent } from "./types-DLsivQsu.esm.js";
|
|
2
2
|
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
3
3
|
import "./events-PUWyizJn.esm.js";
|
|
4
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
4
|
+
import { i as toIncodeApiError } from "./apiError-BdUUT-aa.esm.js";
|
|
5
5
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
6
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
7
7
|
//#region src/modules/document-signature/documentSignatureServices.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
2
|
-
import { t as createDynamicFormsManager } from "./dynamicFormsManager-
|
|
1
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BHPoZ8q4.esm.js";
|
|
2
|
+
import { t as createDynamicFormsManager } from "./dynamicFormsManager-BBHxLMRp.esm.js";
|
|
3
3
|
export { createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
6
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BHPoZ8q4.esm.js";
|
|
7
7
|
//#region src/modules/dynamic-forms/dynamicFormsActor.ts
|
|
8
8
|
function createDynamicFormsActor(options) {
|
|
9
9
|
return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
|
package/dist/{dynamicFormsStateMachine-BR6iuC5G.esm.js → dynamicFormsStateMachine-BHPoZ8q4.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
|
-
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-
|
|
2
|
+
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BdUUT-aa.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
5
5
|
import { n as calendarDateError } from "./calendarDate-D2zWfUlA.esm.js";
|
package/dist/ekyb.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./xstate.cjs-D6Ur0X1F.js";
|
|
2
2
|
import { t as AddressSuggestion } from "./types-D6Q1D1kx.js";
|
|
3
3
|
import { i as FlowModuleConfig } from "./types-BZsmNYom.js";
|
|
4
|
-
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-
|
|
5
|
-
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-
|
|
4
|
+
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BwMpWCVG.js";
|
|
5
|
+
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-Cjk8pQX0.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybServices.d.ts
|
|
7
7
|
type EkybFlowConfig = FlowModuleConfig['EKYB'];
|
|
8
8
|
//#endregion
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
3
|
-
import { t as createEkybManager } from "./ekybManager-
|
|
1
|
+
import { g as isSupportedCountry, l as ALL_COUNTRIES, p as SUPPORTED_COUNTRIES, s as toEkybConfig, u as DEV_ONLY_COUNTRIES } from "./ekybUtils-Dl0MU-ib.esm.js";
|
|
2
|
+
import { t as ekybMachine } from "./ekybStateMachine-R5cxtws_.esm.js";
|
|
3
|
+
import { t as createEkybManager } from "./ekybManager-q-NZzZtM.esm.js";
|
|
4
4
|
export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
|
|
@@ -2,7 +2,7 @@ import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
|
|
|
2
2
|
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
3
3
|
import "./Actor-DqjOqDfU.js";
|
|
4
4
|
import { t as AddressSuggestion } from "./types-D6Q1D1kx.js";
|
|
5
|
-
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-
|
|
5
|
+
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BwMpWCVG.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybStateMachine.d.ts
|
|
7
7
|
declare const ekybMachine: any;
|
|
8
8
|
type EkybMachine = typeof ekybMachine;
|
|
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
6
|
+
import { t as ekybMachine } from "./ekybStateMachine-R5cxtws_.esm.js";
|
|
7
7
|
//#region src/modules/ekyb/ekybActor.ts
|
|
8
8
|
/**
|
|
9
9
|
* Creates and starts an eKYB actor.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
|
-
import { n as getFlow } from "./flowServices-
|
|
2
|
+
import { n as getFlow } from "./flowServices-5Ebtf1db.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
5
|
-
import { a as requiresAddressValidation, c as ADDRESS_FIELDS, d as FIELD_NAME_MAPPING, f as FIELD_ORDER,
|
|
5
|
+
import { a as requiresAddressValidation, c as ADDRESS_FIELDS, d as FIELD_NAME_MAPPING, f as FIELD_ORDER, g as isSupportedCountry, h as UBO_FIELD_LABELS, i as isFormFieldEntry, l as ALL_COUNTRIES, m as TAX_ID_RULES_BY_COUNTRY, n as hasAtLeastOneAddressField, o as sortModulesByOrder, r as isFieldOptional, s as toEkybConfig } from "./ekybUtils-Dl0MU-ib.esm.js";
|
|
6
6
|
import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
|
|
7
7
|
import { t as validateCNPJ } from "./cnpj-CVq3vL39.esm.js";
|
|
8
8
|
import { n as requiresCnpjValidation } from "./cnpj-D5cxwIe-.esm.js";
|
|
9
|
-
import { a as getPostalCodeErrorKey, c as validatePostalCode, d as getStreetLevelErrorForSuggestion, f as keepSuggestionInOptions, i as formatPostalCode, l as STREET_LEVEL_REQUIRED_ERROR, o as getPostalCodeErrorParams, r as isFormDefinitionsEnabled, s as getPostalCodeMaxLength, t as debounceSearchActor, u as fillFromSuggestion } from "./addressSearch-
|
|
9
|
+
import { a as getPostalCodeErrorKey, c as validatePostalCode, d as getStreetLevelErrorForSuggestion, f as keepSuggestionInOptions, i as formatPostalCode, l as STREET_LEVEL_REQUIRED_ERROR, o as getPostalCodeErrorParams, r as isFormDefinitionsEnabled, s as getPostalCodeMaxLength, t as debounceSearchActor, u as fillFromSuggestion } from "./addressSearch-DBJeg_g3.esm.js";
|
|
10
10
|
import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
|
|
11
|
-
import { t as createBundledDefinitionSource } from "./definitionSource-
|
|
11
|
+
import { n as matchesCharTemplate, t as createBundledDefinitionSource } from "./definitionSource-B9WTvQb9.esm.js";
|
|
12
12
|
//#region src/modules/ekyb/ekybValidators.ts
|
|
13
13
|
const createValidators = () => ({
|
|
14
14
|
required: (value, _rule, field) => {
|
|
@@ -35,6 +35,11 @@ const createValidators = () => ({
|
|
|
35
35
|
key: getPostalCodeErrorKey(rule.country),
|
|
36
36
|
params: getPostalCodeErrorParams(rule.country)
|
|
37
37
|
};
|
|
38
|
+
},
|
|
39
|
+
charTemplate: (value, rule) => {
|
|
40
|
+
if (rule.type !== "charTemplate") return void 0;
|
|
41
|
+
if (value.trim().length === 0) return void 0;
|
|
42
|
+
return matchesCharTemplate(value.trim(), rule.templates, rule.ignoreCase) ? void 0 : { key: "verification.errors.invalidFormat" };
|
|
38
43
|
}
|
|
39
44
|
});
|
|
40
45
|
const normalizeFieldValue = (value) => typeof value === "string" ? value : String(value ?? "");
|
|
@@ -458,6 +463,118 @@ const EKYB_DEFINITIONS = {
|
|
|
458
463
|
context: { country: "country" }
|
|
459
464
|
}
|
|
460
465
|
},
|
|
466
|
+
"ekyb/CO": {
|
|
467
|
+
schemaVersion: 1,
|
|
468
|
+
vocabulary: "1.0",
|
|
469
|
+
id: "ekyb/CO",
|
|
470
|
+
module: "ekyb",
|
|
471
|
+
country: "CO",
|
|
472
|
+
availableIn: ["development", "staging"],
|
|
473
|
+
fields: [
|
|
474
|
+
{
|
|
475
|
+
name: "businessName",
|
|
476
|
+
kind: "text",
|
|
477
|
+
group: "businessName",
|
|
478
|
+
required: true,
|
|
479
|
+
label: { key: "ekyb.businessName" },
|
|
480
|
+
input: { autofill: "organization" }
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: "taxId",
|
|
484
|
+
kind: "text",
|
|
485
|
+
group: "taxId",
|
|
486
|
+
required: true,
|
|
487
|
+
label: { key: "ekyb.taxId" },
|
|
488
|
+
rules: [{
|
|
489
|
+
id: "charTemplate",
|
|
490
|
+
params: { templates: [
|
|
491
|
+
"999999999",
|
|
492
|
+
"9999999999",
|
|
493
|
+
"999999999-9",
|
|
494
|
+
"999.999.999",
|
|
495
|
+
"999.999.999-9"
|
|
496
|
+
] }
|
|
497
|
+
}]
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: "street",
|
|
501
|
+
kind: "text",
|
|
502
|
+
group: "address",
|
|
503
|
+
required: true,
|
|
504
|
+
widget: "addressSearch",
|
|
505
|
+
label: { key: "ekyb.street" },
|
|
506
|
+
input: { autofill: "addressLine1" }
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: "houseNo",
|
|
510
|
+
kind: "text",
|
|
511
|
+
group: "address",
|
|
512
|
+
required: true,
|
|
513
|
+
label: { key: "ekyb.houseNo" }
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: "addressLine2",
|
|
517
|
+
kind: "text",
|
|
518
|
+
group: "address",
|
|
519
|
+
label: { key: "ekyb.addressLine2" },
|
|
520
|
+
input: { autofill: "addressLine2" }
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: "city",
|
|
524
|
+
kind: "text",
|
|
525
|
+
group: "address",
|
|
526
|
+
required: true,
|
|
527
|
+
label: { key: "ekyb.city" },
|
|
528
|
+
input: { autofill: "addressLevel2" }
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: "state",
|
|
532
|
+
kind: "text",
|
|
533
|
+
group: "address",
|
|
534
|
+
required: true,
|
|
535
|
+
label: { key: "ekyb.state" },
|
|
536
|
+
input: { autofill: "addressLevel1" }
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
name: "postalCode",
|
|
540
|
+
kind: "text",
|
|
541
|
+
group: "address",
|
|
542
|
+
label: { key: "ekyb.postalCode" },
|
|
543
|
+
input: {
|
|
544
|
+
maxLength: 6,
|
|
545
|
+
autofill: "postalCode"
|
|
546
|
+
},
|
|
547
|
+
rules: [{ id: "postalCodeFormat" }]
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
collections: [{
|
|
551
|
+
id: "ubos",
|
|
552
|
+
group: "ubos",
|
|
553
|
+
min: 1,
|
|
554
|
+
max: 8,
|
|
555
|
+
fields: [{
|
|
556
|
+
name: "name",
|
|
557
|
+
kind: "text",
|
|
558
|
+
group: "ubos",
|
|
559
|
+
required: true,
|
|
560
|
+
label: { key: "ekyb.uboName" }
|
|
561
|
+
}, {
|
|
562
|
+
name: "surname",
|
|
563
|
+
kind: "text",
|
|
564
|
+
group: "ubos",
|
|
565
|
+
required: true,
|
|
566
|
+
label: { key: "ekyb.uboSurname" }
|
|
567
|
+
}],
|
|
568
|
+
payload: {
|
|
569
|
+
key: "uboNames",
|
|
570
|
+
join: ["name", "surname"]
|
|
571
|
+
}
|
|
572
|
+
}],
|
|
573
|
+
submit: {
|
|
574
|
+
static: { plugins: ["ekyb"] },
|
|
575
|
+
context: { country: "country" }
|
|
576
|
+
}
|
|
577
|
+
},
|
|
461
578
|
"ekyb/DE": {
|
|
462
579
|
schemaVersion: 1,
|
|
463
580
|
vocabulary: "1.0",
|
|
@@ -1448,7 +1565,12 @@ const RULES = {
|
|
|
1448
1565
|
postalCodeFormat: (country) => ({
|
|
1449
1566
|
type: "postalCodeFormat",
|
|
1450
1567
|
country
|
|
1451
|
-
})
|
|
1568
|
+
}),
|
|
1569
|
+
charTemplate: (_country, { templates, ignoreCase }) => Array.isArray(templates) && templates.length > 0 && templates.every((t) => typeof t === "string" && t !== "") && (ignoreCase === void 0 || typeof ignoreCase === "boolean") ? {
|
|
1570
|
+
type: "charTemplate",
|
|
1571
|
+
templates: [...templates],
|
|
1572
|
+
...ignoreCase !== void 0 && { ignoreCase }
|
|
1573
|
+
} : void 0
|
|
1452
1574
|
};
|
|
1453
1575
|
const EKYB_SUPPORTED_IDS = {
|
|
1454
1576
|
schemaVersions: [1],
|
|
@@ -1563,8 +1685,8 @@ function projectField(field, required, country) {
|
|
|
1563
1685
|
}));
|
|
1564
1686
|
const validation = required ? [{ type: "required" }] : [];
|
|
1565
1687
|
for (const rule of field.rules ?? []) {
|
|
1566
|
-
const
|
|
1567
|
-
if (
|
|
1688
|
+
const projected = RULES[rule.id]?.(country, rule.params ?? {});
|
|
1689
|
+
if (projected) validation.push(projected);
|
|
1568
1690
|
}
|
|
1569
1691
|
if (validation.length > 0) def.validation = validation;
|
|
1570
1692
|
return def;
|
|
@@ -1583,6 +1705,7 @@ function buildEkybValidationRules(fieldName, required, country) {
|
|
|
1583
1705
|
const rules = [];
|
|
1584
1706
|
if (required) rules.push({ type: "required" });
|
|
1585
1707
|
if (fieldName === "taxId" && requiresCnpjValidation(country)) rules.push({ type: "cnpj" });
|
|
1708
|
+
if (fieldName === "taxId") rules.push(...TAX_ID_RULES_BY_COUNTRY[country] ?? []);
|
|
1586
1709
|
if (fieldName === "postalCode") rules.push({
|
|
1587
1710
|
type: "postalCodeFormat",
|
|
1588
1711
|
country
|
|
@@ -21,6 +21,7 @@ const SUPPORTED_COUNTRIES = [
|
|
|
21
21
|
*/
|
|
22
22
|
const DEV_ONLY_COUNTRIES = [
|
|
23
23
|
"CM",
|
|
24
|
+
"CO",
|
|
24
25
|
"KE",
|
|
25
26
|
"NG"
|
|
26
27
|
];
|
|
@@ -67,6 +68,26 @@ const ADDRESS_FIELDS = [
|
|
|
67
68
|
"postalCode"
|
|
68
69
|
];
|
|
69
70
|
const ALL_COUNTRIES_OPTIONAL_FIELDS = ["ubo"];
|
|
71
|
+
/**
|
|
72
|
+
* Fields a country doesn't require, beyond the ones no country requires.
|
|
73
|
+
* Colombia: most companies have no postal code on the registry.
|
|
74
|
+
*/
|
|
75
|
+
const OPTIONAL_FIELDS_BY_COUNTRY = { CO: ["postalCode"] };
|
|
76
|
+
/**
|
|
77
|
+
* The format rules on a country's tax ID, beyond the CNPJ check on Brazil's.
|
|
78
|
+
* Colombia: the 9-digit NIT, with or without the dots, and with or without
|
|
79
|
+
* the check digit (DV). The backend reduces it to the 9 digits.
|
|
80
|
+
*/
|
|
81
|
+
const TAX_ID_RULES_BY_COUNTRY = { CO: [{
|
|
82
|
+
type: "charTemplate",
|
|
83
|
+
templates: [
|
|
84
|
+
"999999999",
|
|
85
|
+
"9999999999",
|
|
86
|
+
"999999999-9",
|
|
87
|
+
"999.999.999",
|
|
88
|
+
"999.999.999-9"
|
|
89
|
+
]
|
|
90
|
+
}] };
|
|
70
91
|
const UBO_FIELD_LABELS = {
|
|
71
92
|
name: "ekyb.uboName",
|
|
72
93
|
surname: "ekyb.uboSurname"
|
|
@@ -131,6 +152,7 @@ function isFieldOptional(fieldName, countryCode) {
|
|
|
131
152
|
if (ALL_COUNTRIES_OPTIONAL_FIELDS.includes(fieldName)) return true;
|
|
132
153
|
if (fieldName === "businessName") return BUSINESS_NAME_OPTIONAL_COUNTRIES.includes(countryCode);
|
|
133
154
|
if (fieldName === "addressLine2") return true;
|
|
155
|
+
if (OPTIONAL_FIELDS_BY_COUNTRY[countryCode]?.includes(fieldName)) return true;
|
|
134
156
|
if (ADDRESS_FIELDS.includes(fieldName)) return false;
|
|
135
157
|
if (fieldName === "taxId") return false;
|
|
136
158
|
return false;
|
|
@@ -147,4 +169,4 @@ function requiresAddressValidation(countryCode) {
|
|
|
147
169
|
return !ADDRESS_FULLY_OPTIONAL_COUNTRIES.includes(countryCode);
|
|
148
170
|
}
|
|
149
171
|
//#endregion
|
|
150
|
-
export { requiresAddressValidation as a, ADDRESS_FIELDS as c, FIELD_NAME_MAPPING as d, FIELD_ORDER as f, isSupportedCountry as h, isFormFieldEntry as i, ALL_COUNTRIES as l,
|
|
172
|
+
export { requiresAddressValidation as a, ADDRESS_FIELDS as c, FIELD_NAME_MAPPING as d, FIELD_ORDER as f, isSupportedCountry as g, UBO_FIELD_LABELS as h, isFormFieldEntry as i, ALL_COUNTRIES as l, TAX_ID_RULES_BY_COUNTRY as m, hasAtLeastOneAddressField as n, sortModulesByOrder as o, SUPPORTED_COUNTRIES as p, isFieldOptional as r, toEkybConfig as s, ekybUtils_exports as t, DEV_ONLY_COUNTRIES as u };
|
package/dist/ekyc-prefill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as EkycPrefillFieldDef, f as EkycPrefillValues, i as EkycPrefillErrorKind, l as EkycPrefillModuleConfig, n as EkycPrefillConfigField, o as EkycPrefillFieldError, s as EkycPrefillFieldErrors, t as EkycPrefillConfig, u as EkycPrefillServedField } from "./types-g3NuVCT9.js";
|
|
2
|
-
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-
|
|
2
|
+
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-BwmPXfhY.js";
|
|
3
3
|
//#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
|
package/dist/ekyc-prefill.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-
|
|
2
|
-
import { t as createEkycPrefillManager } from "./ekycPrefillManager-
|
|
1
|
+
import { r as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DC8uJnud.esm.js";
|
|
2
|
+
import { t as createEkycPrefillManager } from "./ekycPrefillManager-KcrRytAq.esm.js";
|
|
3
3
|
export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { d as toEkycConfig } from "./ekycUtils-C6HZB46m.esm.js";
|
|
2
|
-
import { t as ekycMachine } from "./ekycStateMachine-
|
|
3
|
-
import { t as createEkycManager } from "./ekycManager-
|
|
2
|
+
import { t as ekycMachine } from "./ekycStateMachine-6EKndBd7.esm.js";
|
|
3
|
+
import { t as createEkycManager } from "./ekycManager-D2K8AaMV.esm.js";
|
|
4
4
|
export { createEkycManager, ekycMachine, toEkycConfig };
|
|
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-
|
|
6
|
+
import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-6EKndBd7.esm.js";
|
|
7
7
|
//#region src/modules/ekyc/ekycActor.ts
|
|
8
8
|
/**
|
|
9
9
|
* Creates and starts an eKYC actor.
|