@incodetech/core 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4677d7f
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/{BaseWasmProvider--AzPfwOm.esm.js → BaseWasmProvider-CQgeReKV.esm.js} +1 -785
- package/dist/MotionSensorProvider-BTDLt08l.esm.js +254 -0
- package/dist/StateMachine-8d441d6x.d.ts +2 -0
- package/dist/{WasmUtilProvider-BonqBWdj.esm.js → WasmUtilProvider-C45HStLj.esm.js} +1 -1
- package/dist/{addressSearch-DC5By0cC.esm.js → addressSearch-C5qzDvkN.esm.js} +15 -8
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +3 -3
- package/dist/authentication.d.ts +11 -9
- package/dist/authentication.esm.js +18 -13
- package/dist/{authenticationManager-B4gSCgrO.esm.js → authenticationManager-CW4qxgcq.esm.js} +7 -6
- package/dist/{authenticationManager-Bd10YGSO.d.ts → authenticationManager-CiXsOTdM.d.ts} +2 -2
- package/dist/{backCameraStream-DF_d7hTz.esm.js → backCameraStream-CUo1USCT.esm.js} +2 -2
- package/dist/camera.d.ts +16 -0
- package/dist/camera.esm.js +5 -0
- package/dist/consent.d.ts +52 -52
- package/dist/consent.esm.js +3 -3
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +3 -3
- package/dist/{deepsightLoader-DKgEdLIS.esm.js → deepsightLoader-Bs5jHgca.esm.js} +10 -7
- package/dist/deepsightService-C3gQ_9Ml.esm.js +493 -0
- package/dist/{deepsightService-Ciu0atv5.d.ts → deepsightService-CMAtxAC9.d.ts} +193 -197
- package/dist/device.d.ts +46 -0
- package/dist/device.esm.js +106 -0
- package/dist/document-capture.d.ts +78 -78
- package/dist/document-capture.esm.js +6 -6
- package/dist/document-upload.d.ts +53 -53
- package/dist/document-upload.esm.js +6 -6
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +11 -10
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +104 -22
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +5 -5
- package/dist/{emailManager-CpAwvP3v.esm.js → emailManager-CZ2IGW0g.esm.js} +4 -4
- package/dist/{emailManager-BQPIJR_O.d.ts → emailManager-DEIxY7l6.d.ts} +2 -2
- package/dist/events-BlVGS-8F.esm.js +472 -0
- package/dist/events.d.ts +232 -0
- package/dist/events.esm.js +4 -0
- package/dist/extensibility.d.ts +15 -13
- package/dist/extensibility.esm.js +25 -20
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +3 -3
- package/dist/{faceCaptureManagerFactory-CdwpYykv.d.ts → faceCaptureManagerFactory-CWj-nXdx.d.ts} +8 -6
- package/dist/{faceCaptureSetup-DbXgtcp7.esm.js → faceCaptureSetup-DIE5cftl.esm.js} +13 -10
- package/dist/flow.d.ts +7 -6
- package/dist/flow.esm.js +8 -8
- package/dist/{flowCompletionService-TnWijsSw.esm.js → flowCompletionService-N6-xypy-.esm.js} +2 -2
- package/dist/{flowServices-CO2sIR3D.esm.js → flowServices-xgqnJ64L.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +4 -4
- package/dist/getBrowser-B800KRAi.esm.js +41 -0
- package/dist/getDeviceClass-BKd2FOAf.esm.js +14 -0
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +4 -4
- package/dist/http.d.ts +57 -0
- package/dist/http.esm.js +3 -0
- package/dist/id.d.ts +11 -10
- package/dist/id.esm.js +19 -15
- package/dist/{idCaptureManager-IdqsAASp.d.ts → idCaptureManager-H-rkXnbK.d.ts} +7 -6
- package/dist/{idCaptureManager-DaLU1ug7.esm.js → idCaptureManager-SHBRQ-X_.esm.js} +15 -11
- package/dist/index.d.ts +3 -611
- package/dist/index.esm.js +10 -562
- package/dist/{lib-i-4qLKdG.esm.js → lib-Cq5Wc-Hd.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +58 -58
- package/dist/mandatory-consent.esm.js +3 -3
- package/dist/permissionServices-CDqkkway.esm.js +50 -0
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +5 -5
- package/dist/{phoneManager-DA8WUJtl.d.ts → phoneManager-Clfbrs6b.d.ts} +2 -2
- package/dist/{phoneManager-BAPHSXx8.esm.js → phoneManager-CscgaER2.esm.js} +4 -4
- package/dist/{StreamCanvasCapture-DkpkIgyL.esm.js → recordingsRepository-blYn-iKZ.esm.js} +157 -215
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +4 -4
- package/dist/selfie.d.ts +11 -9
- package/dist/selfie.esm.js +18 -13
- package/dist/{selfieManager-BSkzncsa.esm.js → selfieManager-DeGqD5aN.esm.js} +5 -4
- package/dist/{selfieManager-Dft5wZQ_.d.ts → selfieManager-h_hhEefT.d.ts} +2 -2
- package/dist/{session-OglUYC9l.esm.js → session-PLjFj_T3.esm.js} +5 -19
- package/dist/session.d.ts +46 -2
- package/dist/session.esm.js +7 -4
- package/dist/setup-DJ3dFl5k.d.ts +120 -0
- package/dist/setup-fvDWE7f8.esm.js +450 -0
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +3 -3
- package/dist/{stats-BVigf5Rn.esm.js → stats-BZ1kFW4p.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-CiLyvJGb.d.ts → types-T0VjZW3T.d.ts} +1 -1
- package/dist/types-qhLxpptI.d.ts +5 -0
- package/dist/{types-D8Y1faI5.d.ts → types-zH5PDmSe.d.ts} +1 -1
- package/dist/{StateMachine-CM_aOfNL.d.ts → warmup-CEOVQKby.d.ts} +1 -4
- package/dist/wasm.d.ts +15 -0
- package/dist/wasm.esm.js +10 -0
- package/dist/{Manager-C6AGXEq_.esm.js → xstate.esm-BXrcOcSC.esm.js} +103 -507
- package/package.json +18 -2
- package/dist/endpoints-CI5-28jT.esm.js +0 -69
- package/dist/id-CzDAG_kM.esm.js +0 -0
- package/dist/index-BuVKc9bv.d.ts +0 -1
- /package/dist/{Actor-By8WNHi-.d.ts → Actor-C-jivmFF.d.ts} +0 -0
- /package/dist/{BrowserEnvironmentProvider-BECjyw3_.esm.js → BrowserEnvironmentProvider--xQUs3sg.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-CIqH6hJp.esm.js → BrowserTimerProvider-CkHEwJFa.esm.js} +0 -0
- /package/dist/{Manager-CCT_-HuZ.d.ts → Manager-BqFybBV-.d.ts} +0 -0
- /package/dist/{api-C2uzxrpN.esm.js → api-CyI8qTie.esm.js} +0 -0
- /package/dist/{browserSimulation-DYAk0Ipe.esm.js → browserSimulation-yzDdWSBf.esm.js} +0 -0
- /package/dist/{camera-6XJdOeBF.d.ts → camera-CKsQVNlH.d.ts} +0 -0
- /package/dist/{camera-DAuRUvnp.esm.js → camera-CsT06Zqy.esm.js} +0 -0
- /package/dist/{chunk-D6hkk-hd.esm.js → chunk-BcQWkoAq.esm.js} +0 -0
- /package/dist/{displayErrors-CGJwvrTl.d.ts → displayErrors-CjMXlBnu.d.ts} +0 -0
- /package/dist/{flowCompletionService-BOd4Rk8n.d.ts → flowCompletionService-BV6ThEJ1.d.ts} +0 -0
- /package/dist/{platform-DdhkonXk.esm.js → platform-Dcuv6w60.esm.js} +0 -0
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
1
|
+
import { t as api } from "./api-CyI8qTie.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
|
|
3
|
+
import "./session-PLjFj_T3.esm.js";
|
|
4
|
+
import "./BrowserEnvironmentProvider--xQUs3sg.esm.js";
|
|
5
|
+
import "./browserSimulation-yzDdWSBf.esm.js";
|
|
6
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
|
|
7
|
+
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-C5qzDvkN.esm.js";
|
|
8
|
+
import { t as getFlow } from "./flowServices-xgqnJ64L.esm.js";
|
|
9
|
+
import "./BrowserTimerProvider-CkHEwJFa.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/ekyb/ekybConstants.ts
|
|
12
12
|
const UBO_INPUT_LIMIT = 8;
|
|
@@ -511,7 +511,8 @@ const ekybMachine = setup({
|
|
|
511
511
|
markSubmitAttempted: assign({ submitAttempted: () => true }),
|
|
512
512
|
fillAddressFields: assign(({ context, event }) => {
|
|
513
513
|
const { suggestion } = event;
|
|
514
|
-
const
|
|
514
|
+
const activeFields = new Set(context.fields.map((f) => f.name));
|
|
515
|
+
const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
|
|
515
516
|
const { errors, isValid } = computeEkybValidation(context.fields, newValues, context.country, context.ubos, context.hasUbos);
|
|
516
517
|
return {
|
|
517
518
|
values: newValues,
|
package/dist/ekyc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import { n as AddressSuggestion, r as FieldDef, t as DisplayErrorsResult } from "./displayErrors-
|
|
1
|
+
import { t as Manager } from "./Manager-BqFybBV-.js";
|
|
2
|
+
import "./Actor-C-jivmFF.js";
|
|
3
|
+
import { n as AddressSuggestion, r as FieldDef, t as DisplayErrorsResult } from "./displayErrors-CjMXlBnu.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/ekyc/types.d.ts
|
|
6
6
|
type EkycFieldSource = 'user_input' | 'document_scan' | 'poa_document' | 'phone_module_input' | 'email_module_input' | false;
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
1
|
+
import { t as api } from "./api-CyI8qTie.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
|
|
4
|
+
import { a as POSTAL_CODE_FORMAT_ERROR_KEYS, c as getPostalCodeMaxLength, i as FIXED_DIGIT_POSTAL_CODE_LENGTH, l as validatePostalCode, n as fillFromSuggestion, o as formatPostalCode, r as DYNAMIC_REQUIRED_KEY, s as getPostalCodeErrorKey, t as debounceSearchActor, u as usStateOptions } from "./addressSearch-C5qzDvkN.esm.js";
|
|
5
|
+
import "./BrowserTimerProvider-CkHEwJFa.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/ekyc/ekycConsts.ts
|
|
8
8
|
const COUNTRY_SELECTOR_DISABLED_SOURCES = ["UK_VOTER_REGISTER"];
|
|
@@ -42,13 +42,90 @@ const INVALID_CPF_PATTERNS = [
|
|
|
42
42
|
"88888888888",
|
|
43
43
|
"99999999999"
|
|
44
44
|
];
|
|
45
|
-
const NO_STATE_SOURCES = ["GR_1", "UK_VOTER_REGISTER"];
|
|
46
45
|
const DOB_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
47
46
|
const ADDRESS_OPTIONAL_SOURCES = ["US_TELCO_1", "UK_VOTER_REGISTER"];
|
|
48
47
|
const LAST4SSN_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
49
48
|
const DRIVERS_LICENSE_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
50
49
|
const EMAIL_OPTIONAL_SOURCES = ["US_TELCO_1"];
|
|
51
50
|
const PHONE_OPTIONAL_SOURCES = ["CA_RES_CREDIT", "UK_VOTER_REGISTER"];
|
|
51
|
+
const NAME_SOURCES = [
|
|
52
|
+
"US_TELCO_1",
|
|
53
|
+
"US_TELCO_2",
|
|
54
|
+
"US_TELCO_4",
|
|
55
|
+
"US_ADDRESS_1",
|
|
56
|
+
"US_CREDIT_BUREAU_1",
|
|
57
|
+
"US_DRIVERS_LICENSE_1",
|
|
58
|
+
"CA_RES_CREDIT",
|
|
59
|
+
"SERPRO",
|
|
60
|
+
"SE_1",
|
|
61
|
+
"GR_1",
|
|
62
|
+
"GT_1",
|
|
63
|
+
"AR_1",
|
|
64
|
+
"ES_1",
|
|
65
|
+
"UK_VOTER_REGISTER",
|
|
66
|
+
"CL_1",
|
|
67
|
+
"INDIA_PAN"
|
|
68
|
+
];
|
|
69
|
+
const HOUSE_NO_SOURCES = [
|
|
70
|
+
"SERPRO",
|
|
71
|
+
"GR_1",
|
|
72
|
+
"ES_1"
|
|
73
|
+
];
|
|
74
|
+
const STREET_SOURCES = [
|
|
75
|
+
"US_TELCO_1",
|
|
76
|
+
"US_TELCO_2",
|
|
77
|
+
"US_CREDIT_BUREAU_1",
|
|
78
|
+
"CA_RES_CREDIT",
|
|
79
|
+
"SERPRO",
|
|
80
|
+
"AR_1",
|
|
81
|
+
"ES_1",
|
|
82
|
+
"UK_VOTER_REGISTER"
|
|
83
|
+
];
|
|
84
|
+
const CITY_SOURCES = [
|
|
85
|
+
"US_TELCO_1",
|
|
86
|
+
"US_TELCO_2",
|
|
87
|
+
"US_CREDIT_BUREAU_1",
|
|
88
|
+
"CA_RES_CREDIT",
|
|
89
|
+
"SERPRO",
|
|
90
|
+
"AR_1",
|
|
91
|
+
"ES_1",
|
|
92
|
+
"UK_VOTER_REGISTER"
|
|
93
|
+
];
|
|
94
|
+
const ADDRESS_STATE_SOURCES = [
|
|
95
|
+
"US_TELCO_1",
|
|
96
|
+
"US_TELCO_2",
|
|
97
|
+
"US_CREDIT_BUREAU_1",
|
|
98
|
+
"US_DRIVERS_LICENSE_1",
|
|
99
|
+
"CA_RES_CREDIT",
|
|
100
|
+
"SERPRO",
|
|
101
|
+
"AR_1",
|
|
102
|
+
"ES_1"
|
|
103
|
+
];
|
|
104
|
+
const POSTAL_CODE_SOURCES = [
|
|
105
|
+
"US_TELCO_1",
|
|
106
|
+
"US_TELCO_2",
|
|
107
|
+
"US_CREDIT_BUREAU_1",
|
|
108
|
+
"CA_RES_CREDIT",
|
|
109
|
+
"SERPRO",
|
|
110
|
+
"AR_1",
|
|
111
|
+
"ES_1",
|
|
112
|
+
"UK_VOTER_REGISTER"
|
|
113
|
+
];
|
|
114
|
+
const TAX_ID_SOURCES = [
|
|
115
|
+
"GT_1",
|
|
116
|
+
"ES_1",
|
|
117
|
+
"CL_1"
|
|
118
|
+
];
|
|
119
|
+
const MIDDLE_NAME_SOURCES = [
|
|
120
|
+
"US_CREDIT_BUREAU_1",
|
|
121
|
+
"CA_RES_CREDIT",
|
|
122
|
+
"UK_VOTER_REGISTER",
|
|
123
|
+
"GR_1",
|
|
124
|
+
"AR_1",
|
|
125
|
+
"ES_1",
|
|
126
|
+
"CL_1",
|
|
127
|
+
"INDIA_PAN"
|
|
128
|
+
];
|
|
52
129
|
|
|
53
130
|
//#endregion
|
|
54
131
|
//#region src/modules/ekyc/ekycUtils.ts
|
|
@@ -84,7 +161,8 @@ function getEKYCFields(config) {
|
|
|
84
161
|
/** Maps a verification source string to a country code */
|
|
85
162
|
function getEKYCCountry(source) {
|
|
86
163
|
switch (source) {
|
|
87
|
-
case "BR_GOVT_1":
|
|
164
|
+
case "BR_GOVT_1":
|
|
165
|
+
case "SERPRO": return "BR";
|
|
88
166
|
case "MX_CONSUMER_1": return "MX";
|
|
89
167
|
case "UK_CREDIT_BUREAU_1":
|
|
90
168
|
case "UK_VOTER_REGISTER": return "GB";
|
|
@@ -9979,21 +10057,22 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
9979
10057
|
...opts
|
|
9980
10058
|
});
|
|
9981
10059
|
};
|
|
9982
|
-
|
|
9983
|
-
|
|
10060
|
+
const nameSource = fields.name || (NAME_SOURCES.includes(configSource) ? "user_input" : false);
|
|
10061
|
+
if (nameSource) {
|
|
10062
|
+
add("firstName", "text", "verification.labels.firstName", nameSource, {
|
|
9984
10063
|
maxLength: 100,
|
|
9985
10064
|
placeholder: "verification.placeholder.firstName"
|
|
9986
10065
|
});
|
|
9987
|
-
if (configSource
|
|
10066
|
+
if (MIDDLE_NAME_SOURCES.includes(configSource)) add("middleName", "text", "verification.labels.middleName", nameSource, {
|
|
9988
10067
|
maxLength: 100,
|
|
9989
10068
|
placeholder: "verification.placeholder.middleName",
|
|
9990
10069
|
optional: true
|
|
9991
10070
|
});
|
|
9992
|
-
add("surName", "text", country === "US" ? "verification.labels.lastName" : "verification.labels.surName",
|
|
10071
|
+
add("surName", "text", country === "US" ? "verification.labels.lastName" : "verification.labels.surName", nameSource, {
|
|
9993
10072
|
maxLength: 100,
|
|
9994
10073
|
placeholder: country === "US" ? "verification.placeholder.lastName" : "verification.placeholder.surname"
|
|
9995
10074
|
});
|
|
9996
|
-
if (country === "MX") add("maternalSurname", "text", "verification.labels.maternalSurname",
|
|
10075
|
+
if (country === "MX") add("maternalSurname", "text", "verification.labels.maternalSurname", nameSource, {
|
|
9997
10076
|
maxLength: 100,
|
|
9998
10077
|
placeholder: "verification.placeholder.maternalSurname"
|
|
9999
10078
|
});
|
|
@@ -10004,7 +10083,7 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10004
10083
|
const phoneCountrySelectorDisabled = enablePhoneRisk && configSource !== "PHONE_RISK_1" || COUNTRY_SELECTOR_DISABLED_SOURCES.includes(configSource);
|
|
10005
10084
|
add("phone", "phone", "verification.labels.phone", fields.phone, { disableCountrySelector: phoneCountrySelectorDisabled });
|
|
10006
10085
|
}
|
|
10007
|
-
if (fields.SSN) if (country === "BR") add("taxId", "text", "verification.labels.taxId", fields.SSN);
|
|
10086
|
+
if (fields.SSN) if (country === "BR" || TAX_ID_SOURCES.includes(configSource)) add("taxId", "text", "verification.labels.taxId", fields.SSN);
|
|
10008
10087
|
else if (country === "CN") add("ssn", "text", "verification.labels.prcId", fields.SSN);
|
|
10009
10088
|
else add("ssn", "text", "verification.labels.ssn", fields.SSN, { maxLength: 11 });
|
|
10010
10089
|
if (fields.nationality) if (country === "BR") add("nationality", "dropdown", "verification.labels.nationality", fields.nationality, { options: [
|
|
@@ -10038,11 +10117,13 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10038
10117
|
}] });
|
|
10039
10118
|
if (fields.panNumber) add("panNumber", "text", "verification.labels.panNumber", fields.panNumber, { maxLength: 10 });
|
|
10040
10119
|
const addAddressFields = () => {
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
add("
|
|
10045
|
-
if (
|
|
10120
|
+
const needsAddress = HOUSE_NO_SOURCES.includes(configSource) || STREET_SOURCES.includes(configSource) || ADDRESS_STATE_SOURCES.includes(configSource);
|
|
10121
|
+
const addrSource = fields.address || (needsAddress ? "user_input" : false);
|
|
10122
|
+
if (!addrSource) return;
|
|
10123
|
+
if (HOUSE_NO_SOURCES.includes(configSource)) add("houseNo", "text", "verification.labels.houseNo", addrSource, { section: "address" });
|
|
10124
|
+
if (STREET_SOURCES.includes(configSource)) add("street", "text", "verification.labels.street", addrSource, { section: "address" });
|
|
10125
|
+
if (CITY_SOURCES.includes(configSource)) add("city", "text", "verification.labels.city", addrSource, { section: "address" });
|
|
10126
|
+
if (ADDRESS_STATE_SOURCES.includes(configSource)) add("state", country === "US" ? "dropdown" : "text", country === "US" ? "verification.labels.chooseState" : "verification.labels.state", addrSource, {
|
|
10046
10127
|
section: "address",
|
|
10047
10128
|
...country === "US" ? {
|
|
10048
10129
|
options: usStateOptions,
|
|
@@ -10052,7 +10133,7 @@ function buildFieldDefs(fields, configSource, country, enablePhoneRisk = false)
|
|
|
10052
10133
|
placeholderParams: { states: STATE_CODE_HINTS[country] ?? "" }
|
|
10053
10134
|
}
|
|
10054
10135
|
});
|
|
10055
|
-
add("postalCode", "text", country === "US" ? "verification.labels.zipCode" : "verification.labels.postalCode",
|
|
10136
|
+
if (POSTAL_CODE_SOURCES.includes(configSource)) add("postalCode", "text", country === "US" ? "verification.labels.zipCode" : "verification.labels.postalCode", addrSource, {
|
|
10056
10137
|
section: "address",
|
|
10057
10138
|
maxLength: getPostalCodeMaxLength(country)
|
|
10058
10139
|
});
|
|
@@ -10084,9 +10165,9 @@ function validateField(name, value, required, country, configSource) {
|
|
|
10084
10165
|
if (name === "street" && isPoBox(val)) return "verification.errors.poBox";
|
|
10085
10166
|
if (name === "postalCode") return validatePostalCode(val, country) ? void 0 : getPostalCodeErrorKey(country);
|
|
10086
10167
|
if (name === "phone") {
|
|
10087
|
-
if (!isFieldOptional("phone", configSource) || val) return validatePhone(val, country) ? void 0 : "verification.errors.
|
|
10168
|
+
if (!isFieldOptional("phone", configSource) || val) return validatePhone(val, country) ? void 0 : "verification.errors.phoneInvalid";
|
|
10088
10169
|
}
|
|
10089
|
-
if (name === "email" && val) return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val) ? void 0 : "verification.errors.
|
|
10170
|
+
if (name === "email" && val) return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val) ? void 0 : "verification.errors.emailInvalid";
|
|
10090
10171
|
if (name === "panNumber" && val) return val.length === 10 ? void 0 : "verification.errors.exactly10Characters";
|
|
10091
10172
|
}
|
|
10092
10173
|
function computeValidation(fields, values, country, configSource) {
|
|
@@ -10375,7 +10456,8 @@ const ekycMachine = setup({
|
|
|
10375
10456
|
}),
|
|
10376
10457
|
fillAddressFields: assign(({ context, event }) => {
|
|
10377
10458
|
const { suggestion } = event;
|
|
10378
|
-
const
|
|
10459
|
+
const activeFields = new Set(context.fields.map((f) => f.name));
|
|
10460
|
+
const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
|
|
10379
10461
|
const { errors, isValid } = computeValidation(context.fields, newValues, context.fieldsCountry, context.configSource);
|
|
10380
10462
|
return {
|
|
10381
10463
|
values: newValues,
|
package/dist/email.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-
|
|
1
|
+
import "./Manager-BqFybBV-.js";
|
|
2
|
+
import "./Actor-C-jivmFF.js";
|
|
3
|
+
import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-DEIxY7l6.js";
|
|
4
4
|
export { type EmailConfig, type EmailManager, type EmailState, createEmailManager, emailMachine };
|
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./BrowserTimerProvider-
|
|
5
|
-
import { r as emailMachine, t as createEmailManager } from "./emailManager-
|
|
1
|
+
import "./api-CyI8qTie.esm.js";
|
|
2
|
+
import "./events-BlVGS-8F.esm.js";
|
|
3
|
+
import "./xstate.esm-BXrcOcSC.esm.js";
|
|
4
|
+
import "./BrowserTimerProvider-CkHEwJFa.esm.js";
|
|
5
|
+
import { r as emailMachine, t as createEmailManager } from "./emailManager-CZ2IGW0g.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createEmailManager, emailMachine };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-
|
|
1
|
+
import { t as api } from "./api-CyI8qTie.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, r as fromCallback, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
|
|
4
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CkHEwJFa.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/email/emailServices.ts
|
|
7
7
|
async function fetchEmail(signal) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as Manager } from "./Manager-BqFybBV-.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-C-jivmFF.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/email/types.d.ts
|
|
5
5
|
|