@incodetech/web 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/AsYouType-DPWqJvFu.js +2482 -0
- package/dist/addressAutocomplete-t809rK3N.js +108 -0
- package/dist/aligndevicelottie-C9xl1spu.js +12757 -0
- package/dist/antifraud/antifraud.es.js +17 -18
- package/dist/antifraud/styles.css +1 -1
- package/dist/authentication/authentication.es.js +28 -50
- package/dist/back-horizontal-hint-Be3dUGk6.js +137 -0
- package/dist/back-tutorial-BNTyW-1N.js +14584 -0
- package/dist/back-vertical-hint-Bz_rnhd-.js +128 -0
- package/dist/backdevicelottie-DBB1YCtW.js +16678 -0
- package/dist/base.css +327 -67
- package/dist/blurdevicelottie-9WvZCZ6C.js +15939 -0
- package/dist/browser-ponyfill-B4Qc6yfW.js +299 -0
- package/dist/button-DrtZRYJX.js +123 -0
- package/dist/checkbox-kZerHUek.js +85 -0
- package/dist/consent/consent.es.js +82 -89
- package/dist/consent/styles.css +1 -1
- package/dist/countries-y2ydYDhN.js +8323 -0
- package/dist/curp-validation/curp-validation.es.js +271 -313
- package/dist/curp-validation/styles.css +1 -1
- package/dist/dateInputComposed-9zbxhNlX.js +94 -0
- package/dist/dateInputComposed-B36DI9FJ.js +2 -0
- package/dist/defineProperty-brqHEHA_.js +39 -0
- package/dist/document-capture/styles.css +1 -1
- package/dist/documentCapture-CY-g1OUT.js +784 -0
- package/dist/dropdownComposed-CWxUwv7E.js +258 -0
- package/dist/ekyb/ekyb.es.js +2 -0
- package/dist/ekyb/styles.css +1 -1
- package/dist/ekybModule-DGOhCY0S.js +286 -0
- package/dist/ekybModule-mBTq_Apn.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -0
- package/dist/ekyc/styles.css +1 -1
- package/dist/ekycModule-DZlqb6Bc.js +2 -0
- package/dist/ekycModule-rJxf46TS.js +233 -0
- package/dist/email/email.es.js +110 -154
- package/dist/email/styles.css +1 -1
- package/dist/extensibility-CcUfegWj.js +2248 -0
- package/dist/extensibility.es.js +22 -150
- package/dist/face-match/styles.css +147 -73
- package/dist/faceMatch-K9k9f1HF.js +191 -0
- package/dist/flip-animation-DOJzdXB-.js +6983 -0
- package/dist/flow/flow.es.js +2274 -2613
- package/dist/flow/styles.css +432 -73
- package/dist/formField-BBfAFfVZ.js +100 -0
- package/dist/front-horizontal-hint-aGAhadA2.js +380 -0
- package/dist/front-vertical-hint-DZz1VeNp.js +420 -0
- package/dist/frontdevicelottie-DadDp6be.js +17302 -0
- package/dist/geolocation/geolocation.es.js +852 -832
- package/dist/geolocation/styles.css +1 -1
- package/dist/glaredevicelottie-BfI84cPw.js +14466 -0
- package/dist/governmentValidation/governmentValidation.es.js +100 -106
- package/dist/governmentValidation/styles.css +1 -1
- package/dist/i18n-DZOHbK9q.js +1916 -0
- package/dist/icons-BHbofCgJ.js +245 -0
- package/dist/id/id.es.js +53 -59
- package/dist/id/styles.css +1 -1
- package/dist/id-laser-h-BWyU3VgL.js +467 -0
- package/dist/id-laser-v-JiWXUlv0.js +467 -0
- package/dist/id-tutorial-Cc9xg5_J.js +13152 -0
- package/dist/incodeModule-Bf6yJ8RB.js +18 -0
- package/dist/index.es.js +4 -25
- package/dist/inputComposed-rPAh6ptN.js +77 -0
- package/dist/loadingIcon-BDMR5L6z.js +147 -0
- package/dist/mandatoryConsent-ohmxTqe7.js +101 -0
- package/dist/numberedStep-CQVRixRP.js +11 -0
- package/dist/otpInput-DRZiayDi.js +143 -0
- package/dist/page-M9yWRw73.js +61 -0
- package/dist/passport-horizontal-hint-CFsGs7Dp.js +293 -0
- package/dist/passport-tutorial-z0LN7Hsp.js +11688 -0
- package/dist/passport-vertical-hint-BnCpKWeN.js +267 -0
- package/dist/phone/phone.es.js +87 -121
- package/dist/phone/styles.css +1 -1
- package/dist/phoneInput-C9T_8FJt.js +138 -0
- package/dist/phoneInputComposed-CXTXBQ0B.js +407 -0
- package/dist/processing-yJ5QEgaC.js +15 -0
- package/dist/redirect-to-mobile/styles.css +1 -1
- package/dist/richText-Db0PfpkE.js +1973 -0
- package/dist/rolldown-runtime-CjdbFOpI.js +13 -0
- package/dist/selfie/selfie.es.js +29 -50
- package/dist/selfie/styles.css +170 -66
- package/dist/selfieTutorial-B0MIyPrk.js +2676 -0
- package/dist/setup-Dq2bzNKH.js +15 -0
- package/dist/signature/signature.es.js +557 -707
- package/dist/signature/styles.css +1 -1
- package/dist/spacer-DCljE53A.js +59 -0
- package/dist/spinner-BK2pIUzB.js +41 -0
- package/dist/spinner-DjG-sUzI.js +1 -0
- package/dist/successIcon-AHrfmJvv.js +17 -0
- package/dist/tutorial-C2kSUHWe.js +2781 -0
- package/dist/types/ekyb.d.ts +29 -0
- package/dist/types/ekyc.d.ts +29 -0
- package/dist/types/extensibility.d.ts +3 -5
- package/dist/types/flow.d.ts +1 -1
- package/dist/types/index.d.ts +2 -10
- package/dist/typography-BQrJwR60.js +1 -0
- package/dist/typography-BtyuWjzC.js +29 -0
- package/dist/uiConfig-CwpQ-IM6.js +20 -0
- package/dist/vendor-preact-D6SntenC.js +958 -0
- package/dist/warningIcon-Cvj-ayg1.js +17 -0
- package/package.json +8 -11
- package/dist/AsYouType-D1H_js4X.js +0 -2607
- package/dist/Trans-aTzdT_SA.js +0 -55
- package/dist/addressAutocomplete-C8-wL1j_.js +0 -153
- package/dist/aligndevicelottie-DlQCRPfM.js +0 -29
- package/dist/back-horizontal-hint-CSlf9KI1.js +0 -5
- package/dist/back-tutorial-An9AcMSe.js +0 -29
- package/dist/back-vertical-hint-CNieqiCr.js +0 -5
- package/dist/backdevicelottie-B4NgyWmX.js +0 -29
- package/dist/blurdevicelottie-_BZRug1c.js +0 -29
- package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
- package/dist/button-CE9kRlem.js +0 -184
- package/dist/cameraView-C2X7klNb.js +0 -55
- package/dist/captureOverlay-tCb4R4WE.js +0 -592
- package/dist/checkbox-B5X-mfqq.js +0 -137
- package/dist/chevronDown-DSHaPKbi.js +0 -23
- package/dist/closeIcon-9Hc97omv.js +0 -28
- package/dist/countries-DfLkrF0x.js +0 -616
- package/dist/dateInputComposed-C7PCzh-U.js +0 -173
- package/dist/documentCapture-C0mO-RGE.js +0 -692
- package/dist/dropdownComposed-BpinYlrx.js +0 -367
- package/dist/ekybModule-Dr6LJUg-.js +0 -357
- package/dist/ekycModule-C3mswduI.js +0 -291
- package/dist/errorContent-Cb8nmQAE.js +0 -44
- package/dist/errorIcon-DEARBrGx.js +0 -26
- package/dist/faceMatch-DbDp7D3d.js +0 -237
- package/dist/fileIcon-CCSvS10T.js +0 -52
- package/dist/flip-animation-COR596wy.js +0 -29
- package/dist/flipAnimation-BqV462TA.js +0 -2059
- package/dist/formField-CP6wDdfA.js +0 -106
- package/dist/front-horizontal-hint-lRLKd7vY.js +0 -7
- package/dist/front-vertical-hint-qQoJXRE3.js +0 -7
- package/dist/frontdevicelottie-KhKxT5n9.js +0 -29
- package/dist/glaredevicelottie-DLuIStvb.js +0 -29
- package/dist/id-laser-h-BBV3r3rz.js +0 -29
- package/dist/id-laser-v-BTHJaSfx.js +0 -29
- package/dist/id-tutorial-B-F5Q28m.js +0 -29
- package/dist/incodeModule-C4XIllao.js +0 -96
- package/dist/inputComposed-fUbAGrDy.js +0 -103
- package/dist/instance-BWYzq8dk.js +0 -2163
- package/dist/loadingIcon-DmuPXh70.js +0 -195
- package/dist/mandatoryConsent-5xPI0cor.js +0 -94
- package/dist/manualCaptureButton-BvFmTyJe.js +0 -372
- package/dist/numberedStep-DwUB__mh.js +0 -5
- package/dist/otpInput-BFXhqFRT.js +0 -156
- package/dist/page-SrUl0qtN.js +0 -69
- package/dist/passport-horizontal-hint-BCtpMp1Y.js +0 -5
- package/dist/passport-tutorial-CaYBFTqt.js +0 -29
- package/dist/passport-vertical-hint-GaLnzqHP.js +0 -5
- package/dist/permissions-DT4Fz9MR.js +0 -709
- package/dist/phoneInput-CGr8TxOO.js +0 -158
- package/dist/phoneInputComposed-Cm9O2Jba.js +0 -206
- package/dist/processing-szVOCQwZ.js +0 -19
- package/dist/richText-cspvNz2a.js +0 -1807
- package/dist/selfieTutorial-Dm_p0ke9.js +0 -29
- package/dist/spinner-DygONskw.js +0 -60
- package/dist/successIcon-Bjsdc4lF.js +0 -26
- package/dist/tutorial-Cdz1025D.js +0 -473
- package/dist/types/ekyb/styles.d.ts +0 -1
- package/dist/types/ekyc/styles.d.ts +0 -1
- package/dist/typography-BDACYR5i.js +0 -14
- package/dist/uiConfig-Dnt-2YWB.js +0 -23
- package/dist/useMediaQuery-lJdQBmC2.js +0 -18
- package/dist/vendor-preact-BoMmvSgn.js +0 -694
- package/dist/warningIcon-DQq_MrOB.js +0 -26
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { b as I, u as o, I as J, a as Q } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
-
import { SUPPORTED_COUNTRIES as M, DEV_ONLY_COUNTRIES as Z, computeEkybDisplayErrors as x, createEkybManager as ee } from "@incodetech/core/ekyb";
|
|
3
|
-
import { T as q, y as V, A as D, d as te, q as C, k as oe } from "./vendor-preact-BoMmvSgn.js";
|
|
4
|
-
import "./instance-BWYzq8dk.js";
|
|
5
|
-
import "@incodetech/core";
|
|
6
|
-
import { u as re, A as ne } from "./addressAutocomplete-C8-wL1j_.js";
|
|
7
|
-
import { B as se } from "./button-CE9kRlem.js";
|
|
8
|
-
import { P as K } from "./page-SrUl0qtN.js";
|
|
9
|
-
import { S as ae } from "./spinner-DygONskw.js";
|
|
10
|
-
import { t as G, F as le, V as P } from "./formField-CP6wDdfA.js";
|
|
11
|
-
import { r as ce } from "./incodeModule-C4XIllao.js";
|
|
12
|
-
import { D as Y } from "./dropdownComposed-BpinYlrx.js";
|
|
13
|
-
import { a as _ } from "./inputComposed-fUbAGrDy.js";
|
|
14
|
-
function ue(t) {
|
|
15
|
-
return [...t.toUpperCase()].map((r) => String.fromCodePoint(127462 + r.charCodeAt(0) - 65)).join("");
|
|
16
|
-
}
|
|
17
|
-
const ie = {
|
|
18
|
-
BR: "Brazil",
|
|
19
|
-
CM: "Cameroon",
|
|
20
|
-
CN: "China",
|
|
21
|
-
FR: "France",
|
|
22
|
-
DE: "Germany",
|
|
23
|
-
IL: "Israel",
|
|
24
|
-
IT: "Italy",
|
|
25
|
-
KE: "Kenya",
|
|
26
|
-
MX: "Mexico",
|
|
27
|
-
NG: "Nigeria",
|
|
28
|
-
ES: "Spain",
|
|
29
|
-
GB: "United Kingdom",
|
|
30
|
-
US: "USA"
|
|
31
|
-
};
|
|
32
|
-
function me(t) {
|
|
33
|
-
const r = ie[t] ?? t;
|
|
34
|
-
return { value: t, label: `${ue(t)} ${r}` };
|
|
35
|
-
}
|
|
36
|
-
function de() {
|
|
37
|
-
if (typeof window > "u") return !1;
|
|
38
|
-
const { hostname: t } = window.location;
|
|
39
|
-
return t === "localhost" || t.includes("stage") || t.includes("demo");
|
|
40
|
-
}
|
|
41
|
-
const be = ({
|
|
42
|
-
value: t,
|
|
43
|
-
onChange: r
|
|
44
|
-
}) => {
|
|
45
|
-
const { t: l } = I(), s = q(() => (de() ? [...M, ...Z] : [...M]).map(me).sort((c, d) => c.label.localeCompare(d.label)), []);
|
|
46
|
-
return /* @__PURE__ */ o("div", { className: "IncodeEkybCountrySelector", children: /* @__PURE__ */ o(
|
|
47
|
-
Y,
|
|
48
|
-
{
|
|
49
|
-
id: "ekyb-country",
|
|
50
|
-
label: l("ekyb.country"),
|
|
51
|
-
value: t,
|
|
52
|
-
options: s,
|
|
53
|
-
onChange: r,
|
|
54
|
-
"data-testid": "ekyb-country-selector"
|
|
55
|
-
}
|
|
56
|
-
) });
|
|
57
|
-
}, B = ({
|
|
58
|
-
field: t,
|
|
59
|
-
value: r,
|
|
60
|
-
error: l,
|
|
61
|
-
errorParams: s,
|
|
62
|
-
country: i,
|
|
63
|
-
onChange: c,
|
|
64
|
-
onBlur: d
|
|
65
|
-
}) => {
|
|
66
|
-
const { t: b } = I(), u = !t.required, y = b(t.label);
|
|
67
|
-
if (t.type === "dropdown") {
|
|
68
|
-
const m = u ? `${y} (${b("common.optional")})` : y;
|
|
69
|
-
return /* @__PURE__ */ o(
|
|
70
|
-
Y,
|
|
71
|
-
{
|
|
72
|
-
id: `ekyb-${t.name}`,
|
|
73
|
-
label: m,
|
|
74
|
-
placeholder: t.placeholder ? b(t.placeholder) : void 0,
|
|
75
|
-
value: r,
|
|
76
|
-
options: (t.options ?? []).map((n) => ({
|
|
77
|
-
...n,
|
|
78
|
-
label: b(n.label)
|
|
79
|
-
})),
|
|
80
|
-
error: G(b, l, s),
|
|
81
|
-
searchable: !0,
|
|
82
|
-
onChange: (n) => c(t.name, n),
|
|
83
|
-
onBlur: d ? () => d(t.name) : void 0,
|
|
84
|
-
"data-testid": `ekyb-field-${t.name}`
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
return /* @__PURE__ */ o(
|
|
89
|
-
le,
|
|
90
|
-
{
|
|
91
|
-
name: t.name,
|
|
92
|
-
label: t.label,
|
|
93
|
-
value: r,
|
|
94
|
-
error: l,
|
|
95
|
-
errorParams: s,
|
|
96
|
-
required: t.required,
|
|
97
|
-
optional: u,
|
|
98
|
-
onChange: c,
|
|
99
|
-
onBlur: d
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}, pe = ({
|
|
103
|
-
ubos: t,
|
|
104
|
-
errors: r,
|
|
105
|
-
errorParams: l,
|
|
106
|
-
canAddUbo: s,
|
|
107
|
-
onSetField: i,
|
|
108
|
-
onBlur: c,
|
|
109
|
-
onAdd: d,
|
|
110
|
-
onRemove: b
|
|
111
|
-
}) => {
|
|
112
|
-
const { t: u } = I(), y = (m) => G(u, r[m], l[m]);
|
|
113
|
-
return t.length === 0 ? null : /* @__PURE__ */ o("div", { className: "IncodeEkybUbos", children: [
|
|
114
|
-
t.map((m, n) => {
|
|
115
|
-
const v = n === 0 ? u("ekyb.uboName") : u("ekyb.uboNameWithNumber", { number: n + 1 }), f = n === 0 ? u("ekyb.uboSurname") : u("ekyb.uboSurnameWithNumber", { number: n + 1 }), N = n === 0;
|
|
116
|
-
return /* @__PURE__ */ o("div", { className: "IncodeEkybUboEntry", children: [
|
|
117
|
-
/* @__PURE__ */ o(
|
|
118
|
-
_,
|
|
119
|
-
{
|
|
120
|
-
id: `ubo-${n}-name`,
|
|
121
|
-
label: v,
|
|
122
|
-
name: `ubo-${n}-name`,
|
|
123
|
-
value: m.name,
|
|
124
|
-
error: y(`ubo-${n}-name`),
|
|
125
|
-
onInput: (S) => i(n, "name", S.target.value),
|
|
126
|
-
onBlur: c ? () => c(`ubo-${n}-name`) : void 0,
|
|
127
|
-
"data-testid": `ekyb-ubo-${n}-name`
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
/* @__PURE__ */ o(
|
|
131
|
-
_,
|
|
132
|
-
{
|
|
133
|
-
id: `ubo-${n}-surname`,
|
|
134
|
-
label: f,
|
|
135
|
-
name: `ubo-${n}-surname`,
|
|
136
|
-
value: m.surname,
|
|
137
|
-
error: y(`ubo-${n}-surname`),
|
|
138
|
-
onInput: (S) => i(
|
|
139
|
-
n,
|
|
140
|
-
"surname",
|
|
141
|
-
S.target.value
|
|
142
|
-
),
|
|
143
|
-
onBlur: c ? () => c(`ubo-${n}-surname`) : void 0,
|
|
144
|
-
"data-testid": `ekyb-ubo-${n}-surname`
|
|
145
|
-
}
|
|
146
|
-
),
|
|
147
|
-
!N && /* @__PURE__ */ o(
|
|
148
|
-
"button",
|
|
149
|
-
{
|
|
150
|
-
className: "IncodeEkybRemoveUbo",
|
|
151
|
-
onClick: () => b(n),
|
|
152
|
-
type: "button",
|
|
153
|
-
children: u("common.remove")
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] }, m.id);
|
|
157
|
-
}),
|
|
158
|
-
s && /* @__PURE__ */ o(
|
|
159
|
-
"button",
|
|
160
|
-
{
|
|
161
|
-
className: "IncodeEkybAddUbo",
|
|
162
|
-
onClick: d,
|
|
163
|
-
type: "button",
|
|
164
|
-
"data-testid": "ekyb-add-ubo",
|
|
165
|
-
children: u("ekyb.addAnotherUbo")
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
] });
|
|
169
|
-
}, ye = ({ config: t, onFinish: r }) => {
|
|
170
|
-
const { t: l } = I(), [s, i] = Q(() => ee({ config: t }));
|
|
171
|
-
return V(() => {
|
|
172
|
-
(s.status === "finished" || s.status === "closed") && r?.();
|
|
173
|
-
}, [s.status, r]), s.status === "finished" || s.status === "closed" ? null : s.status === "loading" ? /* @__PURE__ */ o(
|
|
174
|
-
P,
|
|
175
|
-
{
|
|
176
|
-
status: "submitting",
|
|
177
|
-
submittingTitle: l("common.loading")
|
|
178
|
-
}
|
|
179
|
-
) : s.status === "submitting" ? /* @__PURE__ */ o(K, { children: /* @__PURE__ */ o(
|
|
180
|
-
ae,
|
|
181
|
-
{
|
|
182
|
-
fullScreen: !1,
|
|
183
|
-
title: l("common.processing"),
|
|
184
|
-
className: "IncodeEkybSpinner"
|
|
185
|
-
}
|
|
186
|
-
) }) : s.status === "success" ? /* @__PURE__ */ o(P, { status: "success" }) : s.status === "error" ? /* @__PURE__ */ o(P, { status: "failure", onRetry: () => i.retry() }) : s.status === "form" ? /* @__PURE__ */ o(Ee, { state: s, manager: i }) : null;
|
|
187
|
-
}, O = /* @__PURE__ */ new Set([
|
|
188
|
-
"street",
|
|
189
|
-
"houseNo",
|
|
190
|
-
"addressLine2",
|
|
191
|
-
"city",
|
|
192
|
-
"state",
|
|
193
|
-
"postalCode"
|
|
194
|
-
]), he = ["street", "city", "state", "postalCode", "houseNo"], Ee = ({ state: t, manager: r }) => {
|
|
195
|
-
const {
|
|
196
|
-
country: l,
|
|
197
|
-
fields: s,
|
|
198
|
-
values: i,
|
|
199
|
-
errors: c,
|
|
200
|
-
isValid: d,
|
|
201
|
-
ubos: b,
|
|
202
|
-
canAddUbo: u,
|
|
203
|
-
addressSuggestions: y,
|
|
204
|
-
submitAttempted: m
|
|
205
|
-
} = t, { t: n } = I(), v = D(null), f = D(null), N = D(void 0), S = re(v, s.length), [w, T] = te({}), p = C((e) => {
|
|
206
|
-
T((a) => a[e] ? a : { ...a, [e]: !0 });
|
|
207
|
-
}, []), { displayErrors: E, errorParams: F } = q(
|
|
208
|
-
() => x(
|
|
209
|
-
c,
|
|
210
|
-
w,
|
|
211
|
-
m,
|
|
212
|
-
l,
|
|
213
|
-
s
|
|
214
|
-
),
|
|
215
|
-
[c, w, m, l, s]
|
|
216
|
-
), $ = C(
|
|
217
|
-
(e) => p(e),
|
|
218
|
-
[p]
|
|
219
|
-
), A = C(
|
|
220
|
-
(e, a) => {
|
|
221
|
-
p(e), r.setField(e, a);
|
|
222
|
-
},
|
|
223
|
-
[r, p]
|
|
224
|
-
), j = C(
|
|
225
|
-
(e, a, h) => {
|
|
226
|
-
p(`ubo-${e}-${a}`), r.setUboField(e, a, h);
|
|
227
|
-
},
|
|
228
|
-
[r, p]
|
|
229
|
-
), W = C(
|
|
230
|
-
(e) => {
|
|
231
|
-
for (const a of he) p(a);
|
|
232
|
-
r.selectAddress(e);
|
|
233
|
-
},
|
|
234
|
-
[r, p]
|
|
235
|
-
), z = C(
|
|
236
|
-
(e) => {
|
|
237
|
-
r.removeUbo(e), T((a) => {
|
|
238
|
-
const h = {};
|
|
239
|
-
for (const [k, U] of Object.entries(a)) {
|
|
240
|
-
const R = k.match(/^ubo-(\d+)-(name|surname)$/);
|
|
241
|
-
if (!R) {
|
|
242
|
-
h[k] = U;
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
245
|
-
const g = Number(R[1]);
|
|
246
|
-
if (g === e) continue;
|
|
247
|
-
const X = g > e ? g - 1 : g;
|
|
248
|
-
h[`ubo-${X}-${R[2]}`] = U;
|
|
249
|
-
}
|
|
250
|
-
return h;
|
|
251
|
-
});
|
|
252
|
-
},
|
|
253
|
-
[r]
|
|
254
|
-
);
|
|
255
|
-
V(() => {
|
|
256
|
-
const e = E.postalCode, a = N.current;
|
|
257
|
-
if (N.current = e, !e || a === e)
|
|
258
|
-
return;
|
|
259
|
-
const h = requestAnimationFrame(() => {
|
|
260
|
-
const k = f.current;
|
|
261
|
-
if (!k) return;
|
|
262
|
-
(k.querySelector("#postalCode-error") ?? k).scrollIntoView({
|
|
263
|
-
behavior: "smooth",
|
|
264
|
-
block: "nearest"
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
return () => cancelAnimationFrame(h);
|
|
268
|
-
}, [E.postalCode]);
|
|
269
|
-
const H = s.filter((e) => !O.has(e.name)), L = s.filter((e) => O.has(e.name));
|
|
270
|
-
return /* @__PURE__ */ o(K, { className: `IncodeEkybPage${S ? " IncodeEkybPageScrollable" : ""}`, title: n("ekyb.title"), children: [
|
|
271
|
-
/* @__PURE__ */ o("div", { ref: v, className: "IncodeEkybForm", children: [
|
|
272
|
-
/* @__PURE__ */ o(
|
|
273
|
-
be,
|
|
274
|
-
{
|
|
275
|
-
value: l,
|
|
276
|
-
onChange: (e) => r.setCountry(e)
|
|
277
|
-
}
|
|
278
|
-
),
|
|
279
|
-
H.map((e) => /* @__PURE__ */ o(
|
|
280
|
-
B,
|
|
281
|
-
{
|
|
282
|
-
field: e,
|
|
283
|
-
value: i[e.name] ?? "",
|
|
284
|
-
error: E[e.name],
|
|
285
|
-
errorParams: F[e.name],
|
|
286
|
-
country: l,
|
|
287
|
-
onChange: A,
|
|
288
|
-
onBlur: $
|
|
289
|
-
},
|
|
290
|
-
e.name
|
|
291
|
-
)),
|
|
292
|
-
/* @__PURE__ */ o(
|
|
293
|
-
pe,
|
|
294
|
-
{
|
|
295
|
-
ubos: b,
|
|
296
|
-
errors: E,
|
|
297
|
-
errorParams: F,
|
|
298
|
-
canAddUbo: u,
|
|
299
|
-
onSetField: j,
|
|
300
|
-
onBlur: $,
|
|
301
|
-
onAdd: () => r.addUbo(),
|
|
302
|
-
onRemove: z
|
|
303
|
-
}
|
|
304
|
-
),
|
|
305
|
-
L.length > 0 && /* @__PURE__ */ o(oe, { children: [
|
|
306
|
-
/* @__PURE__ */ o("h3", { className: "IncodeEkybSectionHeader", children: n("ekyb.addressDetails") }),
|
|
307
|
-
L.map((e) => e.name === "street" ? /* @__PURE__ */ o(
|
|
308
|
-
ne,
|
|
309
|
-
{
|
|
310
|
-
label: e.label,
|
|
311
|
-
value: i.street ?? "",
|
|
312
|
-
error: E.street,
|
|
313
|
-
errorParams: F.street,
|
|
314
|
-
suggestions: y,
|
|
315
|
-
optional: !e.required,
|
|
316
|
-
onChange: (a) => A("street", a),
|
|
317
|
-
onSearch: (a) => r.searchAddress(a),
|
|
318
|
-
onSelect: W,
|
|
319
|
-
onBlur: () => $("street")
|
|
320
|
-
},
|
|
321
|
-
e.name
|
|
322
|
-
) : /* @__PURE__ */ o(
|
|
323
|
-
"div",
|
|
324
|
-
{
|
|
325
|
-
ref: e.name === "postalCode" ? f : void 0,
|
|
326
|
-
children: /* @__PURE__ */ o(
|
|
327
|
-
B,
|
|
328
|
-
{
|
|
329
|
-
field: e,
|
|
330
|
-
value: i[e.name] ?? "",
|
|
331
|
-
error: E[e.name],
|
|
332
|
-
errorParams: F[e.name],
|
|
333
|
-
country: l,
|
|
334
|
-
onChange: A,
|
|
335
|
-
onBlur: $
|
|
336
|
-
}
|
|
337
|
-
)
|
|
338
|
-
},
|
|
339
|
-
e.name
|
|
340
|
-
))
|
|
341
|
-
] })
|
|
342
|
-
] }),
|
|
343
|
-
/* @__PURE__ */ o("div", { className: "IncodeEkybFooter", children: /* @__PURE__ */ o(
|
|
344
|
-
se,
|
|
345
|
-
{
|
|
346
|
-
onClick: () => r.submit(),
|
|
347
|
-
disabled: !d,
|
|
348
|
-
"data-testid": "ekyb-submit",
|
|
349
|
-
children: n("ekyb.continue")
|
|
350
|
-
}
|
|
351
|
-
) })
|
|
352
|
-
] });
|
|
353
|
-
}, ke = ({ config: t, onFinish: r }) => /* @__PURE__ */ o(J, { children: t ? /* @__PURE__ */ o(ye, { config: t, onFinish: r }) : null });
|
|
354
|
-
ce(ke, "incode-ekyb");
|
|
355
|
-
export {
|
|
356
|
-
ke as EkybModule
|
|
357
|
-
};
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import { u as r, I as Y, b as $, a as G } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
-
import { computeEkycDisplayErrors as j, createEkycManager as z } from "@incodetech/core/ekyc";
|
|
3
|
-
import { y as q, A as F, d as J, q as E, T as Q } from "./vendor-preact-BoMmvSgn.js";
|
|
4
|
-
import "./instance-BWYzq8dk.js";
|
|
5
|
-
import "@incodetech/core";
|
|
6
|
-
import { u as U, A as W } from "./addressAutocomplete-C8-wL1j_.js";
|
|
7
|
-
import { V as v, t as X, F as Z } from "./formField-CP6wDdfA.js";
|
|
8
|
-
import { B as L } from "./button-CE9kRlem.js";
|
|
9
|
-
import { D as f } from "./dateInputComposed-C7PCzh-U.js";
|
|
10
|
-
import { D as ee } from "./dropdownComposed-BpinYlrx.js";
|
|
11
|
-
import { P as T } from "./page-SrUl0qtN.js";
|
|
12
|
-
import { S as re } from "./spinner-DygONskw.js";
|
|
13
|
-
import { r as oe } from "./incodeModule-C4XIllao.js";
|
|
14
|
-
import { P as te } from "./phoneInputComposed-Cm9O2Jba.js";
|
|
15
|
-
const ae = ({ config: p, onFinish: s }) => {
|
|
16
|
-
const { t: l } = $(), [a, d] = G(() => z({ config: p }));
|
|
17
|
-
return q(() => {
|
|
18
|
-
(a.status === "finished" || a.status === "closed") && s?.();
|
|
19
|
-
}, [a.status, s]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ r(
|
|
20
|
-
v,
|
|
21
|
-
{
|
|
22
|
-
status: "submitting",
|
|
23
|
-
submittingTitle: l("common.loading")
|
|
24
|
-
}
|
|
25
|
-
) : a.status === "submitting" ? /* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
|
|
26
|
-
re,
|
|
27
|
-
{
|
|
28
|
-
fullScreen: !1,
|
|
29
|
-
title: l("common.processing"),
|
|
30
|
-
className: "IncodeEkycSpinner"
|
|
31
|
-
}
|
|
32
|
-
) }) : a.status === "success" ? /* @__PURE__ */ r(v, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ r(
|
|
33
|
-
v,
|
|
34
|
-
{
|
|
35
|
-
status: "failure",
|
|
36
|
-
onRetry: () => d.retry(),
|
|
37
|
-
onSkip: () => d.skip()
|
|
38
|
-
}
|
|
39
|
-
) : a.status === "misconfigured" ? /* @__PURE__ */ r(
|
|
40
|
-
v,
|
|
41
|
-
{
|
|
42
|
-
status: "failure",
|
|
43
|
-
failureTitle: l("verification.noFormFields"),
|
|
44
|
-
onSkip: () => d.close(),
|
|
45
|
-
skipLabel: l("common.close")
|
|
46
|
-
}
|
|
47
|
-
) : a.status === "form" ? /* @__PURE__ */ r(se, { state: a, manager: d }) : null;
|
|
48
|
-
}, ne = [
|
|
49
|
-
"street",
|
|
50
|
-
"city",
|
|
51
|
-
"state",
|
|
52
|
-
"postalCode",
|
|
53
|
-
"houseNo"
|
|
54
|
-
], se = ({ state: p, manager: s }) => {
|
|
55
|
-
const {
|
|
56
|
-
fields: l,
|
|
57
|
-
values: a,
|
|
58
|
-
errors: d,
|
|
59
|
-
isValid: V,
|
|
60
|
-
addressSuggestions: w,
|
|
61
|
-
prefilled: K,
|
|
62
|
-
hideEmail: M,
|
|
63
|
-
fieldsCountry: C,
|
|
64
|
-
submitError: S,
|
|
65
|
-
submitAttempted: P
|
|
66
|
-
} = p, { t: n } = $(), N = F(null), A = F(null), R = F(void 0), x = U(N, l.length), [D, _] = J({}), h = E((e) => {
|
|
67
|
-
_((o) => o[e] ? o : { ...o, [e]: !0 });
|
|
68
|
-
}, []), { displayErrors: g, errorParams: I } = Q(
|
|
69
|
-
() => j(
|
|
70
|
-
d,
|
|
71
|
-
D,
|
|
72
|
-
P,
|
|
73
|
-
C,
|
|
74
|
-
l
|
|
75
|
-
),
|
|
76
|
-
[d, D, P, C, l]
|
|
77
|
-
), y = E(
|
|
78
|
-
(e) => h(e),
|
|
79
|
-
[h]
|
|
80
|
-
), b = E(
|
|
81
|
-
(e, o) => {
|
|
82
|
-
h(e), s.setField(e, o);
|
|
83
|
-
},
|
|
84
|
-
[s, h]
|
|
85
|
-
), H = E(
|
|
86
|
-
(e) => {
|
|
87
|
-
for (const o of ne) h(o);
|
|
88
|
-
s.selectAddress(e);
|
|
89
|
-
},
|
|
90
|
-
[s, h]
|
|
91
|
-
);
|
|
92
|
-
q(() => {
|
|
93
|
-
const e = g.postalCode, o = R.current;
|
|
94
|
-
if (R.current = e, !e || o === e)
|
|
95
|
-
return;
|
|
96
|
-
const i = requestAnimationFrame(() => {
|
|
97
|
-
const c = A.current;
|
|
98
|
-
if (!c) return;
|
|
99
|
-
(c.querySelector("#postalCode-error") ?? c).scrollIntoView({
|
|
100
|
-
behavior: "smooth",
|
|
101
|
-
block: "nearest"
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
return () => cancelAnimationFrame(i);
|
|
105
|
-
}, [g.postalCode]);
|
|
106
|
-
const k = (e, o) => X(n, o, I[e]);
|
|
107
|
-
let B;
|
|
108
|
-
return /* @__PURE__ */ r(T, { className: `IncodeEkycPage${x ? " IncodeEkycPageScrollable" : ""}`, title: n("verification.title"), children: [
|
|
109
|
-
/* @__PURE__ */ r("div", { ref: N, className: "IncodeEkycForm", children: l.map((e) => {
|
|
110
|
-
if (e.name === "email" && M) return null;
|
|
111
|
-
let o = null;
|
|
112
|
-
e.section && e.section !== B && (B = e.section, o = /* @__PURE__ */ r("h3", { className: "IncodeEkycSectionHeader", children: n({
|
|
113
|
-
address: "verification.labels.addressDetailsSection",
|
|
114
|
-
driverLicense: "verification.labels.dlDetailsSection"
|
|
115
|
-
}[e.section] ?? e.section) }));
|
|
116
|
-
const i = e.readonly || K[e.name], c = a[e.name] ?? "", u = g[e.name];
|
|
117
|
-
if (e.name === "street" && e.section === "address")
|
|
118
|
-
return /* @__PURE__ */ r("div", { children: [
|
|
119
|
-
o,
|
|
120
|
-
/* @__PURE__ */ r(
|
|
121
|
-
W,
|
|
122
|
-
{
|
|
123
|
-
label: e.label,
|
|
124
|
-
value: c,
|
|
125
|
-
error: u,
|
|
126
|
-
errorParams: I[e.name],
|
|
127
|
-
suggestions: w,
|
|
128
|
-
readonly: i,
|
|
129
|
-
optional: !e.required,
|
|
130
|
-
onChange: (t) => b("street", t),
|
|
131
|
-
onSearch: (t) => s.searchAddress(t),
|
|
132
|
-
onSelect: H,
|
|
133
|
-
onBlur: () => y("street")
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
] }, e.name);
|
|
137
|
-
if (e.type === "dropdown") {
|
|
138
|
-
const t = n(e.label);
|
|
139
|
-
return /* @__PURE__ */ r("div", { children: [
|
|
140
|
-
o,
|
|
141
|
-
/* @__PURE__ */ r(
|
|
142
|
-
ee,
|
|
143
|
-
{
|
|
144
|
-
id: `ekyc-${e.name}`,
|
|
145
|
-
label: t,
|
|
146
|
-
placeholder: e.placeholder ? n(e.placeholder) : void 0,
|
|
147
|
-
value: c,
|
|
148
|
-
options: (e.options ?? []).map((m) => ({
|
|
149
|
-
...m,
|
|
150
|
-
label: n(m.label)
|
|
151
|
-
})),
|
|
152
|
-
error: k(e.name, u),
|
|
153
|
-
disabled: i,
|
|
154
|
-
searchable: !0,
|
|
155
|
-
onChange: (m) => b(e.name, m),
|
|
156
|
-
onBlur: () => y(e.name),
|
|
157
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
158
|
-
}
|
|
159
|
-
)
|
|
160
|
-
] }, e.name);
|
|
161
|
-
}
|
|
162
|
-
if (e.type === "date") {
|
|
163
|
-
const t = n(e.label);
|
|
164
|
-
return /* @__PURE__ */ r("div", { children: [
|
|
165
|
-
o,
|
|
166
|
-
/* @__PURE__ */ r(
|
|
167
|
-
f,
|
|
168
|
-
{
|
|
169
|
-
id: `ekyc-${e.name}`,
|
|
170
|
-
label: t,
|
|
171
|
-
value: c,
|
|
172
|
-
error: k(e.name, u),
|
|
173
|
-
disabled: i,
|
|
174
|
-
onInput: (m) => {
|
|
175
|
-
const O = m.target;
|
|
176
|
-
b(e.name, O.value);
|
|
177
|
-
},
|
|
178
|
-
onBlur: () => y(e.name),
|
|
179
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
] }, e.name);
|
|
183
|
-
}
|
|
184
|
-
if (e.type === "phone") {
|
|
185
|
-
const t = n(e.label);
|
|
186
|
-
return /* @__PURE__ */ r("div", { children: [
|
|
187
|
-
o,
|
|
188
|
-
/* @__PURE__ */ r(
|
|
189
|
-
te,
|
|
190
|
-
{
|
|
191
|
-
id: `ekyc-${e.name}`,
|
|
192
|
-
label: t,
|
|
193
|
-
countryCode: C,
|
|
194
|
-
value: c,
|
|
195
|
-
placeholder: e.placeholder,
|
|
196
|
-
error: k(e.name, u),
|
|
197
|
-
disabled: i,
|
|
198
|
-
disableCountrySelector: e.disableCountrySelector,
|
|
199
|
-
required: !1,
|
|
200
|
-
onChange: (m) => b(e.name, m),
|
|
201
|
-
onBlur: () => y(e.name),
|
|
202
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
203
|
-
}
|
|
204
|
-
)
|
|
205
|
-
] }, e.name);
|
|
206
|
-
}
|
|
207
|
-
return e.type === "radio" ? /* @__PURE__ */ r("div", { children: [
|
|
208
|
-
o,
|
|
209
|
-
/* @__PURE__ */ r("div", { className: "IncodeEkycRadioGroup", children: [
|
|
210
|
-
/* @__PURE__ */ r("label", { className: "IncodeEkycRadioLabel", children: n(e.label) }),
|
|
211
|
-
/* @__PURE__ */ r("div", { className: "IncodeEkycRadioOptions", children: e.options?.map((t) => /* @__PURE__ */ r(
|
|
212
|
-
"label",
|
|
213
|
-
{
|
|
214
|
-
className: "IncodeEkycRadioOption",
|
|
215
|
-
children: [
|
|
216
|
-
/* @__PURE__ */ r(
|
|
217
|
-
"input",
|
|
218
|
-
{
|
|
219
|
-
type: "radio",
|
|
220
|
-
name: e.name,
|
|
221
|
-
checked: c === t.value,
|
|
222
|
-
value: t.value,
|
|
223
|
-
onChange: () => b(e.name, t.value),
|
|
224
|
-
onBlur: () => y(e.name),
|
|
225
|
-
disabled: i
|
|
226
|
-
}
|
|
227
|
-
),
|
|
228
|
-
/* @__PURE__ */ r("span", { children: n(t.label) })
|
|
229
|
-
]
|
|
230
|
-
},
|
|
231
|
-
t.value
|
|
232
|
-
)) }),
|
|
233
|
-
u && /* @__PURE__ */ r("span", { className: "IncodeEkycFieldError", children: k(e.name, u) })
|
|
234
|
-
] })
|
|
235
|
-
] }, e.name) : /* @__PURE__ */ r(
|
|
236
|
-
"div",
|
|
237
|
-
{
|
|
238
|
-
ref: e.name === "postalCode" ? A : void 0,
|
|
239
|
-
children: [
|
|
240
|
-
o,
|
|
241
|
-
/* @__PURE__ */ r(
|
|
242
|
-
Z,
|
|
243
|
-
{
|
|
244
|
-
name: e.name,
|
|
245
|
-
label: e.label,
|
|
246
|
-
value: c,
|
|
247
|
-
error: u,
|
|
248
|
-
errorParams: I[e.name],
|
|
249
|
-
type: e.type,
|
|
250
|
-
placeholder: e.placeholder,
|
|
251
|
-
placeholderParams: e.placeholderParams,
|
|
252
|
-
required: e.required,
|
|
253
|
-
optional: e.optional,
|
|
254
|
-
readonly: i,
|
|
255
|
-
maxLength: e.maxLength,
|
|
256
|
-
onChange: b,
|
|
257
|
-
onBlur: y
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
]
|
|
261
|
-
},
|
|
262
|
-
e.name
|
|
263
|
-
);
|
|
264
|
-
}) }),
|
|
265
|
-
/* @__PURE__ */ r("div", { className: "IncodeEkycFooter", children: [
|
|
266
|
-
S && /* @__PURE__ */ r("p", { className: "IncodeEkycSubmitError", children: n(S) }),
|
|
267
|
-
/* @__PURE__ */ r(
|
|
268
|
-
L,
|
|
269
|
-
{
|
|
270
|
-
onClick: () => s.submit(),
|
|
271
|
-
disabled: !V,
|
|
272
|
-
"data-testid": "ekyc-submit",
|
|
273
|
-
children: n("common.continue")
|
|
274
|
-
}
|
|
275
|
-
),
|
|
276
|
-
S === "verification.errors.countryNotSupported" && /* @__PURE__ */ r(
|
|
277
|
-
L,
|
|
278
|
-
{
|
|
279
|
-
variant: "link",
|
|
280
|
-
onClick: () => s.skip(),
|
|
281
|
-
"data-testid": "ekyc-skip",
|
|
282
|
-
children: n("verification.labels.skip")
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
] })
|
|
286
|
-
] });
|
|
287
|
-
}, ce = ({ config: p, onFinish: s }) => /* @__PURE__ */ r(Y, { children: p ? /* @__PURE__ */ r(ae, { config: p, onFinish: s }) : null });
|
|
288
|
-
oe(ce, "incode-ekyc");
|
|
289
|
-
export {
|
|
290
|
-
ce as EkycModule
|
|
291
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { b as m, u as n, S as r } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
-
import { A as l, y as p } from "./vendor-preact-BoMmvSgn.js";
|
|
3
|
-
import { B as C } from "./button-CE9kRlem.js";
|
|
4
|
-
import { E as f } from "./errorIcon-DEARBrGx.js";
|
|
5
|
-
import { W as E } from "./warningIcon-DQq_MrOB.js";
|
|
6
|
-
import { P as I } from "./page-SrUl0qtN.js";
|
|
7
|
-
import { T as h } from "./typography-BDACYR5i.js";
|
|
8
|
-
const b = ({
|
|
9
|
-
title: c,
|
|
10
|
-
description: s,
|
|
11
|
-
attemptsRemaining: e,
|
|
12
|
-
onButtonClick: a,
|
|
13
|
-
"data-testid": d
|
|
14
|
-
}) => {
|
|
15
|
-
const { t } = m(), o = e <= 0, i = l(null);
|
|
16
|
-
return p(() => {
|
|
17
|
-
i.current?.focus();
|
|
18
|
-
}, []), /* @__PURE__ */ n("div", { class: "IncodeErrorContent", children: /* @__PURE__ */ n(I, { "data-testid": d, children: /* @__PURE__ */ n("div", { class: "IncodeErrorContentContainer", children: [
|
|
19
|
-
/* @__PURE__ */ n("div", { class: "IncodeErrorContentIconContainer", children: [
|
|
20
|
-
o ? /* @__PURE__ */ n(f, { size: 32 }) : /* @__PURE__ */ n(E, { size: 32 }),
|
|
21
|
-
/* @__PURE__ */ n(r, { size: 16 }),
|
|
22
|
-
/* @__PURE__ */ n(
|
|
23
|
-
h,
|
|
24
|
-
{
|
|
25
|
-
ref: i,
|
|
26
|
-
id: "error-content-title",
|
|
27
|
-
tabIndex: -1,
|
|
28
|
-
className: "IncodeErrorContentTitle",
|
|
29
|
-
children: c
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
/* @__PURE__ */ n(r, { size: 12 }),
|
|
33
|
-
/* @__PURE__ */ n("p", { class: "IncodeErrorContentDescription", children: s })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ n("div", { class: "IncodeErrorContentAttemptsContainer", children: [
|
|
36
|
-
/* @__PURE__ */ n("p", { class: "IncodeErrorContentAttemptsText", children: o ? t("notifications.noAttemptsRemaining") : t("common.attemptsRemaining", { count: e }) }),
|
|
37
|
-
/* @__PURE__ */ n(r, { size: 24 }),
|
|
38
|
-
/* @__PURE__ */ n(C, { onClick: a, children: t(o ? "common.continue" : "common.tryAgain") })
|
|
39
|
-
] })
|
|
40
|
-
] }) }) });
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
b as E
|
|
44
|
-
};
|