@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
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { _ as e, l as t, p as n, v as r } from "./vendor-preact-D6SntenC.js";
|
|
2
|
+
import { n as i } from "./loadingIcon-BDMR5L6z.js";
|
|
3
|
+
import { c as a, n as o, p as s } from "./icons-BHbofCgJ.js";
|
|
4
|
+
import { t as ee } from "./successIcon-AHrfmJvv.js";
|
|
5
|
+
//#region src/shared/dropdownComposed/dropdownComposed.tsx
|
|
6
|
+
var c = ({ id: c, label: l, placeholder: u = "Choose an option", value: d, options: f, onChange: p, error: m, helper: h, showErrorIcon: te, showHelperIcon: g, suppressMessages: _ = !1, disabled: v = !1, required: y, searchable: b = !1, searchPlaceholder: x = "Search...", noResultsText: S = "No results found", name: C, tabIndex: w, onKeyDown: T, onBlur: E, renderSelectedLabel: D, siblingElement: O, enterKeyHint: ne, class: k, "aria-label": A, "data-testid": j }) => {
|
|
7
|
+
let [M, N] = n(!1), [re, P] = n(!1), [F, I] = n(-1), [L, R] = n(""), z = t(null), B = t(null), V = t(null), H = t([]), U = t(null), W = t(""), G = t(), K = f.find((e) => e.value === d), q = K ? D ? D(K) : K.label : u, J = b && L ? f.filter((e) => e.label.toLowerCase().includes(L.toLowerCase())) : f, Y = `${c}-label`, X = `${c}-listbox`, Z = `${c}-helper`, Q = `${c}-error`, ie = _ ? "" : [h ? Z : null, m ? Q : null].filter(Boolean).join(" ");
|
|
8
|
+
e(() => {
|
|
9
|
+
if (!M) return;
|
|
10
|
+
let e = requestAnimationFrame(() => {
|
|
11
|
+
b && U.current && U.current.focus(), requestAnimationFrame(() => {
|
|
12
|
+
V.current?.scrollIntoView({
|
|
13
|
+
behavior: "smooth",
|
|
14
|
+
block: "nearest",
|
|
15
|
+
inline: "nearest"
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return () => cancelAnimationFrame(e);
|
|
20
|
+
}, [M, b]), e(() => {
|
|
21
|
+
M || (I(-1), R(""));
|
|
22
|
+
}, [M]), e(() => {
|
|
23
|
+
F >= 0 && H.current[F] && H.current[F]?.scrollIntoView({
|
|
24
|
+
block: "nearest",
|
|
25
|
+
inline: "nearest"
|
|
26
|
+
});
|
|
27
|
+
}, [F]), e(() => () => {
|
|
28
|
+
G.current && clearTimeout(G.current);
|
|
29
|
+
}, []);
|
|
30
|
+
let ae = () => {
|
|
31
|
+
v || N((e) => !e);
|
|
32
|
+
}, $ = (e) => {
|
|
33
|
+
p(e), N(!1), I(-1), B.current?.focus();
|
|
34
|
+
}, oe = () => {
|
|
35
|
+
P(!0);
|
|
36
|
+
}, se = (e) => {
|
|
37
|
+
P(!1), z.current?.contains(e.relatedTarget) || (N(!1), E?.());
|
|
38
|
+
}, ce = (e) => {
|
|
39
|
+
if (v) return;
|
|
40
|
+
T?.(e);
|
|
41
|
+
let { key: t } = e;
|
|
42
|
+
if (t.length === 1 && /^[a-zA-Z0-9]$/.test(t)) {
|
|
43
|
+
e.preventDefault(), G.current && clearTimeout(G.current), W.current += t.toLowerCase();
|
|
44
|
+
let n = J.findIndex((e) => e.label.toLowerCase().startsWith(W.current));
|
|
45
|
+
n !== -1 && (M || N(!0), I(n)), G.current = setTimeout(() => {
|
|
46
|
+
W.current = "";
|
|
47
|
+
}, 500);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
switch (t) {
|
|
51
|
+
case "ArrowDown":
|
|
52
|
+
e.preventDefault(), M ? I((e) => e < J.length - 1 ? e + 1 : e) : (N(!0), I(0));
|
|
53
|
+
break;
|
|
54
|
+
case "ArrowUp":
|
|
55
|
+
e.preventDefault(), M ? I((e) => e > 0 ? e - 1 : e) : (N(!0), I(J.length - 1));
|
|
56
|
+
break;
|
|
57
|
+
case "Home":
|
|
58
|
+
e.preventDefault(), M && I(0);
|
|
59
|
+
break;
|
|
60
|
+
case "End":
|
|
61
|
+
e.preventDefault(), M && I(J.length - 1);
|
|
62
|
+
break;
|
|
63
|
+
case "Enter":
|
|
64
|
+
e.preventDefault(), M && F >= 0 && J[F] ? $(J[F].value) : M || N(!0);
|
|
65
|
+
break;
|
|
66
|
+
case " ":
|
|
67
|
+
e.preventDefault(), M && F >= 0 && J[F] ? $(J[F].value) : M || (N(!0), I(0));
|
|
68
|
+
break;
|
|
69
|
+
case "Escape":
|
|
70
|
+
e.preventDefault(), M && (N(!1), I(-1), B.current?.focus());
|
|
71
|
+
break;
|
|
72
|
+
case "Tab":
|
|
73
|
+
M && (N(!1), I(-1));
|
|
74
|
+
break;
|
|
75
|
+
default: break;
|
|
76
|
+
}
|
|
77
|
+
}, le = (e) => {
|
|
78
|
+
let { key: t } = e;
|
|
79
|
+
switch (t) {
|
|
80
|
+
case "ArrowDown":
|
|
81
|
+
e.preventDefault(), I((e) => e < J.length - 1 ? e + 1 : e);
|
|
82
|
+
break;
|
|
83
|
+
case "ArrowUp":
|
|
84
|
+
e.preventDefault(), I((e) => e > 0 ? e - 1 : e);
|
|
85
|
+
break;
|
|
86
|
+
case "Home":
|
|
87
|
+
e.preventDefault(), I(0);
|
|
88
|
+
break;
|
|
89
|
+
case "End":
|
|
90
|
+
e.preventDefault(), I(J.length - 1);
|
|
91
|
+
break;
|
|
92
|
+
case "Enter":
|
|
93
|
+
e.preventDefault(), F >= 0 && J[F] && $(J[F].value);
|
|
94
|
+
break;
|
|
95
|
+
case "Escape":
|
|
96
|
+
e.preventDefault(), N(!1), I(-1), B.current?.focus();
|
|
97
|
+
break;
|
|
98
|
+
case "Tab":
|
|
99
|
+
N(!1), I(-1);
|
|
100
|
+
break;
|
|
101
|
+
default: break;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
return /* @__PURE__ */ r("div", {
|
|
105
|
+
class: i("IncodeDropdownComposed", k),
|
|
106
|
+
ref: z,
|
|
107
|
+
onBlur: se,
|
|
108
|
+
children: [
|
|
109
|
+
C && /* @__PURE__ */ r("input", {
|
|
110
|
+
type: "hidden",
|
|
111
|
+
name: C,
|
|
112
|
+
value: d || "",
|
|
113
|
+
disabled: v,
|
|
114
|
+
required: y
|
|
115
|
+
}),
|
|
116
|
+
l && /* @__PURE__ */ r("label", {
|
|
117
|
+
class: "IncodeDropdownComposedLabel",
|
|
118
|
+
id: Y,
|
|
119
|
+
htmlFor: c,
|
|
120
|
+
"data-testid": `${c}-label`,
|
|
121
|
+
children: [l, y && /* @__PURE__ */ r("span", {
|
|
122
|
+
class: "IncodeDropdownComposedRequired",
|
|
123
|
+
children: " *"
|
|
124
|
+
})]
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ r("div", {
|
|
127
|
+
class: "IncodeDropdownComposedWrapper",
|
|
128
|
+
children: [/* @__PURE__ */ r("div", {
|
|
129
|
+
class: i("IncodeDropdownComposedTriggerRow", { IncodeDropdownComposedTriggerRowWithSibling: !!O }),
|
|
130
|
+
children: [/* @__PURE__ */ r("button", {
|
|
131
|
+
ref: B,
|
|
132
|
+
type: "button",
|
|
133
|
+
id: c,
|
|
134
|
+
class: "IncodeDropdownComposedTrigger",
|
|
135
|
+
onClick: ae,
|
|
136
|
+
onFocus: oe,
|
|
137
|
+
onKeyDown: ce,
|
|
138
|
+
tabIndex: v ? -1 : w ?? 0,
|
|
139
|
+
disabled: v,
|
|
140
|
+
"aria-haspopup": "listbox",
|
|
141
|
+
"aria-expanded": M ? "true" : "false",
|
|
142
|
+
"aria-disabled": v ? "true" : void 0,
|
|
143
|
+
"aria-labelledby": l ? Y : void 0,
|
|
144
|
+
"aria-label": l ? void 0 : A,
|
|
145
|
+
"aria-controls": M ? X : void 0,
|
|
146
|
+
"aria-activedescendant": M && F >= 0 ? `${c}-option-${F}` : void 0,
|
|
147
|
+
"aria-invalid": m ? "true" : void 0,
|
|
148
|
+
"aria-required": y ? "true" : void 0,
|
|
149
|
+
"aria-describedby": ie || void 0,
|
|
150
|
+
"data-error": m ? "true" : void 0,
|
|
151
|
+
"data-focused": re || M ? "true" : void 0,
|
|
152
|
+
"data-testid": j,
|
|
153
|
+
children: [/* @__PURE__ */ r("span", {
|
|
154
|
+
class: K ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
|
|
155
|
+
children: q
|
|
156
|
+
}), /* @__PURE__ */ r("span", {
|
|
157
|
+
class: "IncodeDropdownComposedTriggerIcon",
|
|
158
|
+
"aria-hidden": "true",
|
|
159
|
+
"data-open": M,
|
|
160
|
+
children: /* @__PURE__ */ r(a, {})
|
|
161
|
+
})]
|
|
162
|
+
}), O && /* @__PURE__ */ r("div", {
|
|
163
|
+
class: "IncodeDropdownComposedSibling",
|
|
164
|
+
children: O
|
|
165
|
+
})]
|
|
166
|
+
}), M && /* @__PURE__ */ r("div", {
|
|
167
|
+
ref: V,
|
|
168
|
+
class: "IncodeDropdownComposedList",
|
|
169
|
+
"data-error": m ? "true" : void 0,
|
|
170
|
+
children: [b && /* @__PURE__ */ r("div", {
|
|
171
|
+
class: "IncodeDropdownComposedSearchWrapper",
|
|
172
|
+
children: /* @__PURE__ */ r("div", {
|
|
173
|
+
class: "IncodeDropdownComposedSearchInner",
|
|
174
|
+
children: [/* @__PURE__ */ r("input", {
|
|
175
|
+
ref: U,
|
|
176
|
+
type: "text",
|
|
177
|
+
class: "IncodeDropdownComposedSearchInput",
|
|
178
|
+
value: L,
|
|
179
|
+
onInput: (e) => {
|
|
180
|
+
R(e.target.value), I(0);
|
|
181
|
+
},
|
|
182
|
+
onKeyDown: le,
|
|
183
|
+
placeholder: x,
|
|
184
|
+
role: "combobox",
|
|
185
|
+
"aria-autocomplete": "list",
|
|
186
|
+
"aria-expanded": "true",
|
|
187
|
+
"aria-controls": X,
|
|
188
|
+
"aria-activedescendant": F >= 0 ? `${c}-option-${F}` : void 0,
|
|
189
|
+
"aria-label": x,
|
|
190
|
+
autocomplete: "off"
|
|
191
|
+
}), /* @__PURE__ */ r("span", {
|
|
192
|
+
class: "IncodeDropdownComposedSearchIcon",
|
|
193
|
+
"aria-hidden": "true",
|
|
194
|
+
children: /* @__PURE__ */ r(o, { size: 20 })
|
|
195
|
+
})]
|
|
196
|
+
})
|
|
197
|
+
}), /* @__PURE__ */ r("div", {
|
|
198
|
+
id: X,
|
|
199
|
+
role: "listbox",
|
|
200
|
+
"aria-labelledby": l ? Y : void 0,
|
|
201
|
+
"aria-label": l ? void 0 : A ?? u,
|
|
202
|
+
class: "IncodeDropdownComposedOptionsScroll",
|
|
203
|
+
children: J.length === 0 ? /* @__PURE__ */ r("div", {
|
|
204
|
+
class: "IncodeDropdownComposedNoResults",
|
|
205
|
+
children: S
|
|
206
|
+
}) : J.map((e, t) => /* @__PURE__ */ r("div", {
|
|
207
|
+
id: `${c}-option-${t}`,
|
|
208
|
+
role: "option",
|
|
209
|
+
"aria-selected": d === e.value ? "true" : "false",
|
|
210
|
+
class: "IncodeDropdownComposedOption",
|
|
211
|
+
"data-highlighted": F === t,
|
|
212
|
+
ref: (e) => {
|
|
213
|
+
H.current[t] = e;
|
|
214
|
+
},
|
|
215
|
+
onClick: () => $(e.value),
|
|
216
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
217
|
+
onMouseEnter: () => I(t),
|
|
218
|
+
children: e.label
|
|
219
|
+
}, e.value))
|
|
220
|
+
})]
|
|
221
|
+
})]
|
|
222
|
+
}),
|
|
223
|
+
b && /* @__PURE__ */ r("div", {
|
|
224
|
+
class: "IncodeDropdownComposedLiveRegion",
|
|
225
|
+
role: "status",
|
|
226
|
+
"aria-live": "polite",
|
|
227
|
+
"aria-atomic": "true",
|
|
228
|
+
children: M && L ? J.length === 0 ? S : `${J.length} result${J.length === 1 ? "" : "s"} available` : ""
|
|
229
|
+
}),
|
|
230
|
+
!_ && m && /* @__PURE__ */ r("div", {
|
|
231
|
+
class: "IncodeDropdownComposedErrorWrapper",
|
|
232
|
+
"data-testid": `${c}-error-wrapper`,
|
|
233
|
+
children: [te && /* @__PURE__ */ r("div", {
|
|
234
|
+
class: "IncodeDropdownComposedIconWrapper",
|
|
235
|
+
children: /* @__PURE__ */ r(s, { size: 17 })
|
|
236
|
+
}), /* @__PURE__ */ r("p", {
|
|
237
|
+
id: Q,
|
|
238
|
+
class: "IncodeDropdownComposedError",
|
|
239
|
+
children: m
|
|
240
|
+
})]
|
|
241
|
+
}),
|
|
242
|
+
!_ && h && !m && /* @__PURE__ */ r("div", {
|
|
243
|
+
class: "IncodeDropdownComposedHelperWrapper",
|
|
244
|
+
"data-testid": `${c}-helper-wrapper`,
|
|
245
|
+
children: [g && /* @__PURE__ */ r("div", {
|
|
246
|
+
class: "IncodeDropdownComposedIconWrapper",
|
|
247
|
+
children: /* @__PURE__ */ r(ee, { size: 17 })
|
|
248
|
+
}), /* @__PURE__ */ r("p", {
|
|
249
|
+
id: Z,
|
|
250
|
+
class: "IncodeDropdownComposedHelper",
|
|
251
|
+
children: h
|
|
252
|
+
})]
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
//#endregion
|
|
258
|
+
export { c as t };
|
package/dist/ekyb/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { n as e } from "./i18n-DZOHbK9q.js";
|
|
2
|
+
import { S as t, _ as n, d as r, h as i, l as a, p as o, v as s } from "./vendor-preact-D6SntenC.js";
|
|
3
|
+
import { c, o as l, r as u } from "./loadingIcon-BDMR5L6z.js";
|
|
4
|
+
import { t as d } from "./button-DrtZRYJX.js";
|
|
5
|
+
import { t as f } from "./page-M9yWRw73.js";
|
|
6
|
+
import { t as p } from "./spinner-BK2pIUzB.js";
|
|
7
|
+
import { n as m, r as h, t as g } from "./formField-BBfAFfVZ.js";
|
|
8
|
+
import { t as _ } from "./inputComposed-rPAh6ptN.js";
|
|
9
|
+
import { t as v } from "./dropdownComposed-CWxUwv7E.js";
|
|
10
|
+
import { t as y } from "./incodeModule-Bf6yJ8RB.js";
|
|
11
|
+
import { t as b } from "./addressAutocomplete-t809rK3N.js";
|
|
12
|
+
import { DEV_ONLY_COUNTRIES as x, SUPPORTED_COUNTRIES as S, computeEkybDisplayErrors as C, createEkybManager as w } from "@incodetech/core/ekyb";
|
|
13
|
+
//#region src/modules/ekyb/countrySelector.tsx
|
|
14
|
+
function T(e) {
|
|
15
|
+
return [...e.toUpperCase()].map((e) => String.fromCodePoint(127462 + e.charCodeAt(0) - 65)).join("");
|
|
16
|
+
}
|
|
17
|
+
var E = {
|
|
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 D(e) {
|
|
33
|
+
let t = E[e] ?? e;
|
|
34
|
+
return {
|
|
35
|
+
value: e,
|
|
36
|
+
label: `${T(e)} ${t}`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function O() {
|
|
40
|
+
if (typeof window > "u") return !1;
|
|
41
|
+
let { hostname: e } = window.location;
|
|
42
|
+
return e === "localhost" || e.includes("stage") || e.includes("demo");
|
|
43
|
+
}
|
|
44
|
+
var k = ({ value: t, onChange: n }) => {
|
|
45
|
+
let { t: i } = e(), a = r(() => (O() ? [...S, ...x] : [...S]).map(D).sort((e, t) => e.label.localeCompare(t.label)), []);
|
|
46
|
+
return /* @__PURE__ */ s("div", {
|
|
47
|
+
className: "IncodeEkybCountrySelector",
|
|
48
|
+
children: /* @__PURE__ */ s(v, {
|
|
49
|
+
id: "ekyb-country",
|
|
50
|
+
label: i("ekyb.country"),
|
|
51
|
+
value: t,
|
|
52
|
+
options: a,
|
|
53
|
+
onChange: n,
|
|
54
|
+
"data-testid": "ekyb-country-selector"
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}, A = ({ field: t, value: n, error: r, errorParams: i, country: a, onChange: o, onBlur: c }) => {
|
|
58
|
+
let { t: l } = e(), u = !t.required, d = l(t.label);
|
|
59
|
+
if (t.type === "dropdown") {
|
|
60
|
+
let e = u ? `${d} (${l("common.optional")})` : d;
|
|
61
|
+
return /* @__PURE__ */ s(v, {
|
|
62
|
+
id: `ekyb-${t.name}`,
|
|
63
|
+
label: e,
|
|
64
|
+
placeholder: t.placeholder ? l(t.placeholder) : void 0,
|
|
65
|
+
value: n,
|
|
66
|
+
options: (t.options ?? []).map((e) => ({
|
|
67
|
+
...e,
|
|
68
|
+
label: l(e.label)
|
|
69
|
+
})),
|
|
70
|
+
error: m(l, r, i),
|
|
71
|
+
searchable: !0,
|
|
72
|
+
onChange: (e) => o(t.name, e),
|
|
73
|
+
onBlur: c ? () => c(t.name) : void 0,
|
|
74
|
+
"data-testid": `ekyb-field-${t.name}`
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ s(g, {
|
|
78
|
+
name: t.name,
|
|
79
|
+
label: t.label,
|
|
80
|
+
value: n,
|
|
81
|
+
error: r,
|
|
82
|
+
errorParams: i,
|
|
83
|
+
required: t.required,
|
|
84
|
+
optional: u,
|
|
85
|
+
onChange: o,
|
|
86
|
+
onBlur: c
|
|
87
|
+
});
|
|
88
|
+
}, j = ({ ubos: t, errors: n, errorParams: r, canAddUbo: i, onSetField: a, onBlur: o, onAdd: c, onRemove: l }) => {
|
|
89
|
+
let { t: u } = e(), d = (e) => m(u, n[e], r[e]);
|
|
90
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
91
|
+
className: "IncodeEkybUbos",
|
|
92
|
+
children: [t.map((e, t) => {
|
|
93
|
+
let n = t === 0 ? u("ekyb.uboName") : u("ekyb.uboNameWithNumber", { number: t + 1 }), r = t === 0 ? u("ekyb.uboSurname") : u("ekyb.uboSurnameWithNumber", { number: t + 1 }), i = t === 0;
|
|
94
|
+
return /* @__PURE__ */ s("div", {
|
|
95
|
+
className: "IncodeEkybUboEntry",
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ s(_, {
|
|
98
|
+
id: `ubo-${t}-name`,
|
|
99
|
+
label: n,
|
|
100
|
+
name: `ubo-${t}-name`,
|
|
101
|
+
value: e.name,
|
|
102
|
+
error: d(`ubo-${t}-name`),
|
|
103
|
+
onInput: (e) => a(t, "name", e.target.value),
|
|
104
|
+
onBlur: o ? () => o(`ubo-${t}-name`) : void 0,
|
|
105
|
+
"data-testid": `ekyb-ubo-${t}-name`
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ s(_, {
|
|
108
|
+
id: `ubo-${t}-surname`,
|
|
109
|
+
label: r,
|
|
110
|
+
name: `ubo-${t}-surname`,
|
|
111
|
+
value: e.surname,
|
|
112
|
+
error: d(`ubo-${t}-surname`),
|
|
113
|
+
onInput: (e) => a(t, "surname", e.target.value),
|
|
114
|
+
onBlur: o ? () => o(`ubo-${t}-surname`) : void 0,
|
|
115
|
+
"data-testid": `ekyb-ubo-${t}-surname`
|
|
116
|
+
}),
|
|
117
|
+
!i && /* @__PURE__ */ s("button", {
|
|
118
|
+
className: "IncodeEkybRemoveUbo",
|
|
119
|
+
onClick: () => l(t),
|
|
120
|
+
type: "button",
|
|
121
|
+
children: u("common.remove")
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
}, e.id);
|
|
125
|
+
}), i && /* @__PURE__ */ s("button", {
|
|
126
|
+
className: "IncodeEkybAddUbo",
|
|
127
|
+
onClick: c,
|
|
128
|
+
type: "button",
|
|
129
|
+
"data-testid": "ekyb-add-ubo",
|
|
130
|
+
children: u("ekyb.addAnotherUbo")
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
}, M = ({ config: t, onFinish: r }) => {
|
|
134
|
+
let { t: i } = e(), [a, o] = c(() => w({ config: t }));
|
|
135
|
+
return n(() => {
|
|
136
|
+
(a.status === "finished" || a.status === "closed") && r?.();
|
|
137
|
+
}, [a.status, r]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ s(h, {
|
|
138
|
+
status: "submitting",
|
|
139
|
+
submittingTitle: i("common.loading")
|
|
140
|
+
}) : a.status === "submitting" ? /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, {
|
|
141
|
+
fullScreen: !1,
|
|
142
|
+
title: i("common.processing"),
|
|
143
|
+
className: "IncodeEkybSpinner"
|
|
144
|
+
}) }) : a.status === "success" ? /* @__PURE__ */ s(h, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ s(h, {
|
|
145
|
+
status: "failure",
|
|
146
|
+
onRetry: () => o.retry()
|
|
147
|
+
}) : a.status === "form" ? /* @__PURE__ */ s(F, {
|
|
148
|
+
state: a,
|
|
149
|
+
manager: o
|
|
150
|
+
}) : null;
|
|
151
|
+
}, N = new Set([
|
|
152
|
+
"street",
|
|
153
|
+
"houseNo",
|
|
154
|
+
"addressLine2",
|
|
155
|
+
"city",
|
|
156
|
+
"state",
|
|
157
|
+
"postalCode"
|
|
158
|
+
]), P = [
|
|
159
|
+
"street",
|
|
160
|
+
"city",
|
|
161
|
+
"state",
|
|
162
|
+
"postalCode",
|
|
163
|
+
"houseNo"
|
|
164
|
+
], F = ({ state: c, manager: u }) => {
|
|
165
|
+
let { country: p, fields: m, values: h, errors: g, isValid: _, ubos: v, canAddUbo: y, addressSuggestions: x, submitAttempted: S } = c, { t: w } = e(), T = a(null), E = a(null), D = a(void 0), O = l(T, m.length), [M, F] = o({}), I = i((e) => {
|
|
166
|
+
F((t) => t[e] ? t : {
|
|
167
|
+
...t,
|
|
168
|
+
[e]: !0
|
|
169
|
+
});
|
|
170
|
+
}, []), { displayErrors: L, errorParams: R } = r(() => C(g, M, S, p, m), [
|
|
171
|
+
g,
|
|
172
|
+
M,
|
|
173
|
+
S,
|
|
174
|
+
p,
|
|
175
|
+
m
|
|
176
|
+
]), z = i((e) => I(e), [I]), B = i((e, t) => {
|
|
177
|
+
I(e), u.setField(e, t);
|
|
178
|
+
}, [u, I]), V = i((e, t, n) => {
|
|
179
|
+
I(`ubo-${e}-${t}`), u.setUboField(e, t, n);
|
|
180
|
+
}, [u, I]), H = i((e) => {
|
|
181
|
+
for (let e of P) I(e);
|
|
182
|
+
u.selectAddress(e);
|
|
183
|
+
}, [u, I]), U = i((e) => {
|
|
184
|
+
u.removeUbo(e), F((t) => {
|
|
185
|
+
let n = {};
|
|
186
|
+
for (let [r, i] of Object.entries(t)) {
|
|
187
|
+
let t = r.match(/^ubo-(\d+)-(name|surname)$/);
|
|
188
|
+
if (!t) {
|
|
189
|
+
n[r] = i;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
let a = Number(t[1]);
|
|
193
|
+
if (a === e) continue;
|
|
194
|
+
let o = a > e ? a - 1 : a;
|
|
195
|
+
n[`ubo-${o}-${t[2]}`] = i;
|
|
196
|
+
}
|
|
197
|
+
return n;
|
|
198
|
+
});
|
|
199
|
+
}, [u]);
|
|
200
|
+
n(() => {
|
|
201
|
+
let e = L.postalCode, t = D.current;
|
|
202
|
+
if (D.current = e, !e || t === e) return;
|
|
203
|
+
let n = requestAnimationFrame(() => {
|
|
204
|
+
let e = E.current;
|
|
205
|
+
e && (e.querySelector("#postalCode-error") ?? e).scrollIntoView({
|
|
206
|
+
behavior: "smooth",
|
|
207
|
+
block: "nearest"
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
return () => cancelAnimationFrame(n);
|
|
211
|
+
}, [L.postalCode]);
|
|
212
|
+
let W = m.filter((e) => !N.has(e.name)), G = m.filter((e) => N.has(e.name));
|
|
213
|
+
return /* @__PURE__ */ s(f, {
|
|
214
|
+
className: `IncodeEkybPage${O ? " IncodeEkybPageScrollable" : ""}`,
|
|
215
|
+
title: w("ekyb.title"),
|
|
216
|
+
children: [/* @__PURE__ */ s("div", {
|
|
217
|
+
ref: T,
|
|
218
|
+
className: "IncodeEkybForm",
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ s(k, {
|
|
221
|
+
value: p,
|
|
222
|
+
onChange: (e) => u.setCountry(e)
|
|
223
|
+
}),
|
|
224
|
+
W.map((e) => /* @__PURE__ */ s(A, {
|
|
225
|
+
field: e,
|
|
226
|
+
value: h[e.name] ?? "",
|
|
227
|
+
error: L[e.name],
|
|
228
|
+
errorParams: R[e.name],
|
|
229
|
+
country: p,
|
|
230
|
+
onChange: B,
|
|
231
|
+
onBlur: z
|
|
232
|
+
}, e.name)),
|
|
233
|
+
/* @__PURE__ */ s(j, {
|
|
234
|
+
ubos: v,
|
|
235
|
+
errors: L,
|
|
236
|
+
errorParams: R,
|
|
237
|
+
canAddUbo: y,
|
|
238
|
+
onSetField: V,
|
|
239
|
+
onBlur: z,
|
|
240
|
+
onAdd: () => u.addUbo(),
|
|
241
|
+
onRemove: U
|
|
242
|
+
}),
|
|
243
|
+
G.length > 0 && /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ s("h3", {
|
|
244
|
+
className: "IncodeEkybSectionHeader",
|
|
245
|
+
children: w("ekyb.addressDetails")
|
|
246
|
+
}), G.map((e) => e.name === "street" ? /* @__PURE__ */ s(b, {
|
|
247
|
+
label: e.label,
|
|
248
|
+
value: h.street ?? "",
|
|
249
|
+
error: L.street,
|
|
250
|
+
errorParams: R.street,
|
|
251
|
+
suggestions: x,
|
|
252
|
+
optional: !e.required,
|
|
253
|
+
onChange: (e) => B("street", e),
|
|
254
|
+
onSearch: (e) => u.searchAddress(e),
|
|
255
|
+
onSelect: H,
|
|
256
|
+
onBlur: () => z("street")
|
|
257
|
+
}, e.name) : /* @__PURE__ */ s("div", {
|
|
258
|
+
ref: e.name === "postalCode" ? E : void 0,
|
|
259
|
+
children: /* @__PURE__ */ s(A, {
|
|
260
|
+
field: e,
|
|
261
|
+
value: h[e.name] ?? "",
|
|
262
|
+
error: L[e.name],
|
|
263
|
+
errorParams: R[e.name],
|
|
264
|
+
country: p,
|
|
265
|
+
onChange: B,
|
|
266
|
+
onBlur: z
|
|
267
|
+
})
|
|
268
|
+
}, e.name))] })
|
|
269
|
+
]
|
|
270
|
+
}), /* @__PURE__ */ s("div", {
|
|
271
|
+
className: "IncodeEkybFooter",
|
|
272
|
+
children: /* @__PURE__ */ s(d, {
|
|
273
|
+
onClick: () => u.submit(),
|
|
274
|
+
disabled: !_,
|
|
275
|
+
"data-testid": "ekyb-submit",
|
|
276
|
+
children: w("ekyb.continue")
|
|
277
|
+
})
|
|
278
|
+
})]
|
|
279
|
+
});
|
|
280
|
+
}, I = ({ config: e, onFinish: t }) => /* @__PURE__ */ s(u, { children: e ? /* @__PURE__ */ s(M, {
|
|
281
|
+
config: e,
|
|
282
|
+
onFinish: t
|
|
283
|
+
}) : null });
|
|
284
|
+
y(I, "incode-ekyb");
|
|
285
|
+
//#endregion
|
|
286
|
+
export { I as t };
|
package/dist/ekyc/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|