@incodetech/web 0.0.0-dev-20260313-486e658 → 0.0.0-dev-20260313-bc2dab4
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-BtKe6-rC.js → AsYouType-CpH-Rmtj.js} +1 -1
- package/dist/{Trans-C2X8WLEu.js → Trans-CA9a3vKp.js} +1 -1
- package/dist/authentication/authentication.es.js +25 -20
- package/dist/base.css +9 -4
- package/dist/{browser-ponyfill-CLXJUgvu.js → browser-ponyfill-B6W6hHVY.js} +49 -46
- package/dist/{incodeModule-DLGHhn9E.js → button-Ca1tRSTI.js} +153 -239
- package/dist/{captureFooter-C2Yrou50.js → captureFooter-X2qN1773.js} +72 -70
- package/dist/{chevronDown-D5uHEaU-.js → chevronDown-BUaOuf9J.js} +1 -1
- package/dist/{closeIcon-BMPoRQCd.js → closeIcon-BM7WLbKp.js} +1 -1
- package/dist/{countries-3p5tkqcx.js → countries-C9bhJe4u.js} +3 -3
- package/dist/curp-validation/curp-validation.es.js +26 -25
- package/dist/{dateInputComposed-CqHIiKPV.js → dateInputComposed-CvFmQpJ0.js} +11 -10
- package/dist/document-capture/styles.css +1 -0
- package/dist/{documentCapture-CzGmGxzA.js → documentCapture-PdKA2frR.js} +113 -157
- package/dist/{dropdownComposed-BgGKKaXv.js → dropdownComposed-DBm7cotT.js} +8 -6
- package/dist/{ekybModule-Bttpjr3j.js → ekybModule-DiFpO2sE.js} +16 -14
- package/dist/ekycModule-DdD1iChB.js +370 -0
- package/dist/email/email.es.js +86 -63
- package/dist/{errorContent-6xl4ArMV.js → errorContent-yUAdbZ5o.js} +5 -5
- package/dist/{errorIcon-Cxcv4ISP.js → errorIcon-BL647nVh.js} +1 -1
- package/dist/extensibility.es.js +290 -0
- package/dist/face-match/styles.css +8 -0
- package/dist/{faceMatch-DKqzUCml.js → faceMatch-BjdNG_e0.js} +12 -11
- package/dist/fileIcon-DOyMcRWU.js +52 -0
- package/dist/flipAnimation-DoMQoFPb.js +1355 -0
- package/dist/flow/flow.es.js +157 -157
- package/dist/flow/styles.css +15 -3
- package/dist/formField-C91ckby4.js +94 -0
- package/dist/geolocation/geolocation.es.js +15 -14
- package/dist/governmentValidation/governmentValidation.es.js +19 -18
- package/dist/id/id.es.js +30 -1354
- package/dist/id/styles.css +2 -0
- package/dist/incodeModule-aE-LkKwM.js +96 -0
- package/dist/index.es.js +7 -7
- package/dist/{otpInput-BT0ZXrAt.js → otpInput-cazUY73p.js} +1 -1
- package/dist/{page-BJDfLRpO.js → page-BVHG3h0V.js} +1 -1
- package/dist/permissions-DwF2Ez1N.js +754 -0
- package/dist/phone/phone.es.js +53 -30
- package/dist/{phoneInput-d3sq4X5R.js → phoneInput-Duuochsh.js} +4 -4
- package/dist/phoneInputComposed-B1gXoSzr.js +107 -0
- package/dist/{processing-CGb_3dSE.js → processing-CDgOueI3.js} +3 -3
- package/dist/selfie/selfie.es.js +29 -18
- package/dist/selfie/styles.css +12 -3
- package/dist/{spinner--i134wYq.js → spinner-Cx3FPUCD.js} +13 -11
- package/dist/{successIcon-1BcPFhum.js → successIcon-BybULRRU.js} +1 -1
- package/dist/{tutorial-DXgOS41l.js → tutorial-Dagmccxh.js} +21 -21
- package/dist/types/authentication.d.ts +10 -3
- package/dist/types/curp-validation.d.ts +5 -1
- package/dist/types/email.d.ts +8 -3
- package/dist/types/extensibility.d.ts +671 -0
- package/dist/types/flow.d.ts +5 -1
- package/dist/types/geolocation.d.ts +5 -1
- package/dist/types/governmentValidation.d.ts +5 -1
- package/dist/types/id.d.ts +8 -3
- package/dist/types/phone.d.ts +8 -3
- package/dist/types/selfie.d.ts +8 -3
- package/dist/{uiConfig-DisZ_yFB.js → uiConfig-Z6RT23Sl.js} +3 -3
- package/dist/useFormScrollable-3O3GeT4m.js +15 -0
- package/dist/{warningIcon-WqI5X7cK.js → warningIcon-DyoKeqDd.js} +1 -1
- package/package.json +6 -2
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/baseTutorial-hbezn8sT.js +0 -755
- package/dist/ekycModule-DfwZMKdL.js +0 -467
- package/dist/verificationResult-CKZqPXb9.js +0 -106
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
import { u as t, b as O, I as U, a as j, S as Q, B as W, r as z } from "./incodeModule-DLGHhn9E.js";
|
|
2
|
-
import { createEkycManager as G } from "@incodetech/core/ekyc";
|
|
3
|
-
import { d as P, A as x, T as V, y as w, q as R } from "./vendor-preact-BXf0bkEs.js";
|
|
4
|
-
import "./uiConfig-DisZ_yFB.js";
|
|
5
|
-
import "@incodetech/core";
|
|
6
|
-
import { V as D, u as Y, F as J } from "./verificationResult-CKZqPXb9.js";
|
|
7
|
-
import { D as X } from "./dateInputComposed-CqHIiKPV.js";
|
|
8
|
-
import { I as K, D as H } from "./dropdownComposed-BgGKKaXv.js";
|
|
9
|
-
import { P as Z } from "./page-BJDfLRpO.js";
|
|
10
|
-
import { c as _, g as L } from "./countries-3p5tkqcx.js";
|
|
11
|
-
import { p as T, A as B } from "./AsYouType-BtKe6-rC.js";
|
|
12
|
-
import { u as ee } from "./useMediaQuery-CiSMgDyi.js";
|
|
13
|
-
const te = ({
|
|
14
|
-
id: f,
|
|
15
|
-
label: d,
|
|
16
|
-
countryCode: b = "US",
|
|
17
|
-
value: r,
|
|
18
|
-
placeholder: a = "(123) 123-6789",
|
|
19
|
-
error: C,
|
|
20
|
-
disabled: k = !1,
|
|
21
|
-
disableCountrySelector: N = !1,
|
|
22
|
-
required: M,
|
|
23
|
-
onChange: v,
|
|
24
|
-
"data-testid": F
|
|
25
|
-
}) => {
|
|
26
|
-
const [p, l] = P(b), [I, E] = P(""), S = x(!1), g = V(
|
|
27
|
-
() => _.map((n) => ({
|
|
28
|
-
value: n.code,
|
|
29
|
-
label: `${n.emoji} ${n.callingCode} ${n.name}`
|
|
30
|
-
})),
|
|
31
|
-
[]
|
|
32
|
-
), i = V(
|
|
33
|
-
() => L(p) ?? L("US"),
|
|
34
|
-
[p]
|
|
35
|
-
);
|
|
36
|
-
w(() => {
|
|
37
|
-
if (S.current || !r || !i) return;
|
|
38
|
-
S.current = !0;
|
|
39
|
-
const n = r.startsWith("+") ? r : `+${r}`, o = T(n);
|
|
40
|
-
if (o?.isValid() && o.country) {
|
|
41
|
-
o.country !== p && l(o.country);
|
|
42
|
-
const c = new B(o.country);
|
|
43
|
-
E(c.input(o.nationalNumber));
|
|
44
|
-
}
|
|
45
|
-
}, [r, i, p]);
|
|
46
|
-
const A = R(
|
|
47
|
-
(n, o) => {
|
|
48
|
-
const c = `${o.callingCode}${n.replace(/\D/g, "")}`;
|
|
49
|
-
try {
|
|
50
|
-
const $ = T(c, o.code);
|
|
51
|
-
v?.(c, $?.isValid() ?? !1);
|
|
52
|
-
} catch {
|
|
53
|
-
v?.(c, !1);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
[v]
|
|
57
|
-
), e = R(
|
|
58
|
-
(n) => {
|
|
59
|
-
l(n);
|
|
60
|
-
const o = L(n);
|
|
61
|
-
o && I && A(I, o);
|
|
62
|
-
},
|
|
63
|
-
[I, A]
|
|
64
|
-
), u = R(
|
|
65
|
-
(n) => {
|
|
66
|
-
const o = n.target.value;
|
|
67
|
-
if (!i) {
|
|
68
|
-
E(o);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const c = `${i.callingCode}${o}`, s = new B(i.code).input(c).replace(i.callingCode, "").trimStart();
|
|
72
|
-
E(s), A(o, i);
|
|
73
|
-
},
|
|
74
|
-
[i, A]
|
|
75
|
-
), y = `${f}-country`, h = `${f}-phone`;
|
|
76
|
-
return /* @__PURE__ */ t(
|
|
77
|
-
H,
|
|
78
|
-
{
|
|
79
|
-
id: y,
|
|
80
|
-
label: d,
|
|
81
|
-
options: g,
|
|
82
|
-
value: p,
|
|
83
|
-
onChange: e,
|
|
84
|
-
error: C,
|
|
85
|
-
disabled: k || N,
|
|
86
|
-
required: M,
|
|
87
|
-
searchable: !0,
|
|
88
|
-
searchPlaceholder: "Search countries...",
|
|
89
|
-
renderSelectedLabel: (n) => {
|
|
90
|
-
const o = L(n.value);
|
|
91
|
-
return o ? `${o.emoji} ${o.callingCode}` : n.label;
|
|
92
|
-
},
|
|
93
|
-
class: "IncodePhoneInputComposed",
|
|
94
|
-
siblingElement: /* @__PURE__ */ t(
|
|
95
|
-
K,
|
|
96
|
-
{
|
|
97
|
-
id: h,
|
|
98
|
-
type: "tel",
|
|
99
|
-
value: I,
|
|
100
|
-
onInput: u,
|
|
101
|
-
placeholder: a,
|
|
102
|
-
error: C,
|
|
103
|
-
disabled: k,
|
|
104
|
-
suppressMessages: !0,
|
|
105
|
-
"aria-label": "Phone number",
|
|
106
|
-
"data-testid": F
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}, oe = ({
|
|
112
|
-
label: f,
|
|
113
|
-
value: d,
|
|
114
|
-
error: b,
|
|
115
|
-
suggestions: r,
|
|
116
|
-
readonly: a,
|
|
117
|
-
optional: C,
|
|
118
|
-
onChange: k,
|
|
119
|
-
onSearch: N,
|
|
120
|
-
onSelect: M
|
|
121
|
-
}) => {
|
|
122
|
-
const { t: v } = O(), [F, p] = P(!1), [l, I] = P(!1), [E, S] = P(""), [g, i] = P(-1), A = x(null), e = "ekyc-address-listbox", u = ee(), y = v(f), h = C ? `${y} (${v("common.optional")})` : y;
|
|
123
|
-
w(() => {
|
|
124
|
-
function s(m) {
|
|
125
|
-
A.current && !A.current.contains(m.target) && p(!1);
|
|
126
|
-
}
|
|
127
|
-
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
128
|
-
}, []), w(() => {
|
|
129
|
-
i(-1);
|
|
130
|
-
}, [r]);
|
|
131
|
-
const n = R(
|
|
132
|
-
(s) => {
|
|
133
|
-
M(s), p(!1), I(!1), i(-1);
|
|
134
|
-
},
|
|
135
|
-
[M]
|
|
136
|
-
), o = (s) => {
|
|
137
|
-
k(s), s.length >= 3 ? u ? (I(!0), S(s)) : (N(s), p(!0)) : p(!1);
|
|
138
|
-
}, c = (s) => {
|
|
139
|
-
!F || r.length === 0 || (s.key === "ArrowDown" ? (s.preventDefault(), i((m) => m < r.length - 1 ? m + 1 : 0)) : s.key === "ArrowUp" ? (s.preventDefault(), i((m) => m > 0 ? m - 1 : r.length - 1)) : s.key === "Enter" && g >= 0 ? (s.preventDefault(), n(r[g])) : s.key === "Escape" && (p(!1), i(-1)));
|
|
140
|
-
}, $ = !u && F && r.length > 0, q = $ && g >= 0 ? `${e}-option-${g}` : void 0;
|
|
141
|
-
return /* @__PURE__ */ t("div", { className: "IncodeAddressAutocomplete", ref: A, children: [
|
|
142
|
-
/* @__PURE__ */ t(
|
|
143
|
-
K,
|
|
144
|
-
{
|
|
145
|
-
id: "ekyc-street",
|
|
146
|
-
label: h,
|
|
147
|
-
name: "street",
|
|
148
|
-
value: d,
|
|
149
|
-
readOnly: a,
|
|
150
|
-
error: b ? v(b) : void 0,
|
|
151
|
-
onInput: (s) => o(s.target.value),
|
|
152
|
-
onKeyDown: c,
|
|
153
|
-
role: "combobox",
|
|
154
|
-
"aria-expanded": $,
|
|
155
|
-
"aria-controls": e,
|
|
156
|
-
"aria-activedescendant": q,
|
|
157
|
-
"aria-autocomplete": "list",
|
|
158
|
-
"data-testid": "ekyc-address-input"
|
|
159
|
-
}
|
|
160
|
-
),
|
|
161
|
-
$ && /* @__PURE__ */ t(
|
|
162
|
-
"ul",
|
|
163
|
-
{
|
|
164
|
-
id: e,
|
|
165
|
-
role: "listbox",
|
|
166
|
-
className: "IncodeAddressAutocompleteSuggestions",
|
|
167
|
-
children: r.map((s, m) => /* @__PURE__ */ t(
|
|
168
|
-
"li",
|
|
169
|
-
{
|
|
170
|
-
id: `${e}-option-${m}`,
|
|
171
|
-
role: "option",
|
|
172
|
-
"aria-selected": m === g,
|
|
173
|
-
className: `IncodeAddressAutocompleteSuggestion${m === g ? "IncodeAddressAutocompleteSuggestionActive" : ""}`,
|
|
174
|
-
onClick: () => n(s),
|
|
175
|
-
children: s.label
|
|
176
|
-
},
|
|
177
|
-
s.id
|
|
178
|
-
))
|
|
179
|
-
}
|
|
180
|
-
),
|
|
181
|
-
u && l && /* @__PURE__ */ t("div", { className: "IncodeAddressAutocompleteModalOverlay", children: /* @__PURE__ */ t("div", { className: "IncodeAddressAutocompleteModal", children: [
|
|
182
|
-
/* @__PURE__ */ t("div", { className: "IncodeAddressAutocompleteModalHeader", children: [
|
|
183
|
-
/* @__PURE__ */ t("h3", { children: v("verification.addressSearch") }),
|
|
184
|
-
/* @__PURE__ */ t(
|
|
185
|
-
"button",
|
|
186
|
-
{
|
|
187
|
-
className: "IncodeAddressAutocompleteModalClose",
|
|
188
|
-
onClick: () => I(!1),
|
|
189
|
-
type: "button",
|
|
190
|
-
children: "×"
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
] }),
|
|
194
|
-
/* @__PURE__ */ t("div", { className: "IncodeAddressAutocompleteModalBody", children: [
|
|
195
|
-
/* @__PURE__ */ t(
|
|
196
|
-
"input",
|
|
197
|
-
{
|
|
198
|
-
className: "IncodeAddressAutocompleteModalInput",
|
|
199
|
-
type: "text",
|
|
200
|
-
value: E,
|
|
201
|
-
placeholder: v("verification.addressPlaceholder"),
|
|
202
|
-
onInput: (s) => {
|
|
203
|
-
const m = s.target.value;
|
|
204
|
-
S(m), m.length >= 3 && N(m);
|
|
205
|
-
},
|
|
206
|
-
autoFocus: !0
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
r.length > 0 && /* @__PURE__ */ t(
|
|
210
|
-
"ul",
|
|
211
|
-
{
|
|
212
|
-
role: "listbox",
|
|
213
|
-
className: "IncodeAddressAutocompleteModalSuggestions",
|
|
214
|
-
children: r.map((s) => /* @__PURE__ */ t(
|
|
215
|
-
"li",
|
|
216
|
-
{
|
|
217
|
-
role: "option",
|
|
218
|
-
className: "IncodeAddressAutocompleteModalSuggestion",
|
|
219
|
-
onClick: () => n(s),
|
|
220
|
-
children: s.label
|
|
221
|
-
},
|
|
222
|
-
s.id
|
|
223
|
-
))
|
|
224
|
-
}
|
|
225
|
-
),
|
|
226
|
-
/* @__PURE__ */ t(
|
|
227
|
-
"button",
|
|
228
|
-
{
|
|
229
|
-
className: "IncodeAddressAutocompleteEnterManually",
|
|
230
|
-
onClick: () => I(!1),
|
|
231
|
-
type: "button",
|
|
232
|
-
children: v("verification.enterManually")
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
] })
|
|
236
|
-
] }) })
|
|
237
|
-
] });
|
|
238
|
-
}, ne = ({ config: f, onFinish: d, onError: b }) => {
|
|
239
|
-
const { t: r } = O(), [a, C] = j(() => G({ config: f }));
|
|
240
|
-
w(() => {
|
|
241
|
-
(a.status === "finished" || a.status === "closed") && d?.();
|
|
242
|
-
}, [a.status, d]);
|
|
243
|
-
const k = a.status === "error" ? a.errorMessage : void 0;
|
|
244
|
-
return w(() => {
|
|
245
|
-
a.status === "error" && b?.(k);
|
|
246
|
-
}, [a.status, b, k]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ t(
|
|
247
|
-
D,
|
|
248
|
-
{
|
|
249
|
-
status: "submitting",
|
|
250
|
-
submittingTitle: r("common.loading")
|
|
251
|
-
}
|
|
252
|
-
) : a.status === "submitting" ? /* @__PURE__ */ t(D, { status: "submitting" }) : a.status === "success" ? /* @__PURE__ */ t(D, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ t(
|
|
253
|
-
D,
|
|
254
|
-
{
|
|
255
|
-
status: "failure",
|
|
256
|
-
onRetry: () => C.retry(),
|
|
257
|
-
onSkip: () => C.skip()
|
|
258
|
-
}
|
|
259
|
-
) : a.status === "misconfigured" ? /* @__PURE__ */ t(
|
|
260
|
-
D,
|
|
261
|
-
{
|
|
262
|
-
status: "failure",
|
|
263
|
-
failureTitle: r("verification.noFormFields"),
|
|
264
|
-
onSkip: () => C.close(),
|
|
265
|
-
skipLabel: r("common.close")
|
|
266
|
-
}
|
|
267
|
-
) : a.status === "form" ? /* @__PURE__ */ t(se, { state: a, manager: C }) : null;
|
|
268
|
-
}, se = ({ state: f, manager: d }) => {
|
|
269
|
-
const {
|
|
270
|
-
fields: b,
|
|
271
|
-
values: r,
|
|
272
|
-
displayErrors: a,
|
|
273
|
-
errorParams: C,
|
|
274
|
-
isValid: k,
|
|
275
|
-
addressSuggestions: N,
|
|
276
|
-
prefilled: M,
|
|
277
|
-
hideEmail: v,
|
|
278
|
-
fieldsCountry: F,
|
|
279
|
-
submitError: p
|
|
280
|
-
} = f, { t: l } = O(), I = x(null), E = x(null), S = x(void 0), g = Y(I, b.length);
|
|
281
|
-
w(() => {
|
|
282
|
-
const e = a.postalCode, u = S.current;
|
|
283
|
-
if (S.current = e, !e || u === e)
|
|
284
|
-
return;
|
|
285
|
-
const y = requestAnimationFrame(() => {
|
|
286
|
-
const h = E.current;
|
|
287
|
-
if (!h) return;
|
|
288
|
-
(h.querySelector("#postalCode-error") ?? h).scrollIntoView({
|
|
289
|
-
behavior: "smooth",
|
|
290
|
-
block: "nearest"
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
return () => cancelAnimationFrame(y);
|
|
294
|
-
}, [a.postalCode]);
|
|
295
|
-
let i;
|
|
296
|
-
return /* @__PURE__ */ t(Z, { className: `IncodeEkycPage${g ? " IncodeEkycPageScrollable" : ""}`, title: l("verification.title"), children: [
|
|
297
|
-
/* @__PURE__ */ t("div", { ref: I, className: "IncodeEkycForm", children: b.map((e) => {
|
|
298
|
-
if (e.name === "email" && v) return null;
|
|
299
|
-
let u = null;
|
|
300
|
-
e.section && e.section !== i && (i = e.section, u = /* @__PURE__ */ t("h3", { className: "IncodeEkycSectionHeader", children: l({
|
|
301
|
-
address: "verification.labels.addressDetailsSection",
|
|
302
|
-
driverLicense: "verification.labels.dlDetailsSection"
|
|
303
|
-
}[e.section] ?? e.section) }));
|
|
304
|
-
const y = e.readonly || M[e.name], h = r[e.name] ?? "", n = a[e.name];
|
|
305
|
-
if (e.name === "street" && e.section === "address")
|
|
306
|
-
return /* @__PURE__ */ t("div", { children: [
|
|
307
|
-
u,
|
|
308
|
-
/* @__PURE__ */ t(
|
|
309
|
-
oe,
|
|
310
|
-
{
|
|
311
|
-
label: e.label,
|
|
312
|
-
value: h,
|
|
313
|
-
error: n,
|
|
314
|
-
suggestions: N,
|
|
315
|
-
readonly: y,
|
|
316
|
-
onChange: (o) => d.setField("street", o),
|
|
317
|
-
onSearch: (o) => d.searchAddress(o),
|
|
318
|
-
onSelect: (o) => d.selectAddress(o)
|
|
319
|
-
}
|
|
320
|
-
)
|
|
321
|
-
] }, e.name);
|
|
322
|
-
if (e.type === "dropdown") {
|
|
323
|
-
const o = l(e.label);
|
|
324
|
-
return /* @__PURE__ */ t("div", { children: [
|
|
325
|
-
u,
|
|
326
|
-
/* @__PURE__ */ t(
|
|
327
|
-
H,
|
|
328
|
-
{
|
|
329
|
-
id: `ekyc-${e.name}`,
|
|
330
|
-
label: o,
|
|
331
|
-
placeholder: e.placeholder ? l(e.placeholder) : void 0,
|
|
332
|
-
value: h,
|
|
333
|
-
options: (e.options ?? []).map((c) => ({
|
|
334
|
-
...c,
|
|
335
|
-
label: l(c.label)
|
|
336
|
-
})),
|
|
337
|
-
error: n ? l(n) : void 0,
|
|
338
|
-
disabled: y,
|
|
339
|
-
searchable: !0,
|
|
340
|
-
onChange: (c) => d.setField(e.name, c),
|
|
341
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
342
|
-
}
|
|
343
|
-
)
|
|
344
|
-
] }, e.name);
|
|
345
|
-
}
|
|
346
|
-
if (e.type === "date") {
|
|
347
|
-
const o = l(e.label);
|
|
348
|
-
return /* @__PURE__ */ t("div", { children: [
|
|
349
|
-
u,
|
|
350
|
-
/* @__PURE__ */ t(
|
|
351
|
-
X,
|
|
352
|
-
{
|
|
353
|
-
id: `ekyc-${e.name}`,
|
|
354
|
-
label: o,
|
|
355
|
-
value: h,
|
|
356
|
-
error: n ? l(n) : void 0,
|
|
357
|
-
disabled: y,
|
|
358
|
-
onInput: (c) => {
|
|
359
|
-
const $ = c.target;
|
|
360
|
-
d.setField(e.name, $.value);
|
|
361
|
-
},
|
|
362
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
363
|
-
}
|
|
364
|
-
)
|
|
365
|
-
] }, e.name);
|
|
366
|
-
}
|
|
367
|
-
if (e.type === "phone") {
|
|
368
|
-
const o = l(e.label);
|
|
369
|
-
return /* @__PURE__ */ t("div", { children: [
|
|
370
|
-
u,
|
|
371
|
-
/* @__PURE__ */ t(
|
|
372
|
-
te,
|
|
373
|
-
{
|
|
374
|
-
id: `ekyc-${e.name}`,
|
|
375
|
-
label: o,
|
|
376
|
-
countryCode: F,
|
|
377
|
-
value: h,
|
|
378
|
-
placeholder: e.placeholder,
|
|
379
|
-
error: n ? l(n) : void 0,
|
|
380
|
-
disabled: y,
|
|
381
|
-
disableCountrySelector: e.disableCountrySelector,
|
|
382
|
-
required: e.required,
|
|
383
|
-
onChange: (c) => d.setField(e.name, c),
|
|
384
|
-
"data-testid": `ekyc-field-${e.name}`
|
|
385
|
-
}
|
|
386
|
-
)
|
|
387
|
-
] }, e.name);
|
|
388
|
-
}
|
|
389
|
-
return e.type === "radio" ? /* @__PURE__ */ t("div", { children: [
|
|
390
|
-
u,
|
|
391
|
-
/* @__PURE__ */ t("div", { className: "IncodeEkycRadioGroup", children: [
|
|
392
|
-
/* @__PURE__ */ t("label", { className: "IncodeEkycRadioLabel", children: l(e.label) }),
|
|
393
|
-
/* @__PURE__ */ t("div", { className: "IncodeEkycRadioOptions", children: e.options?.map((o) => /* @__PURE__ */ t(
|
|
394
|
-
"label",
|
|
395
|
-
{
|
|
396
|
-
className: "IncodeEkycRadioOption",
|
|
397
|
-
children: [
|
|
398
|
-
/* @__PURE__ */ t(
|
|
399
|
-
"input",
|
|
400
|
-
{
|
|
401
|
-
type: "radio",
|
|
402
|
-
name: e.name,
|
|
403
|
-
checked: h === o.value,
|
|
404
|
-
value: o.value,
|
|
405
|
-
onChange: () => d.setField(e.name, o.value),
|
|
406
|
-
disabled: y
|
|
407
|
-
}
|
|
408
|
-
),
|
|
409
|
-
/* @__PURE__ */ t("span", { children: l(o.label) })
|
|
410
|
-
]
|
|
411
|
-
},
|
|
412
|
-
o.value
|
|
413
|
-
)) }),
|
|
414
|
-
n && /* @__PURE__ */ t("span", { className: "IncodeEkycFieldError", children: l(n) })
|
|
415
|
-
] })
|
|
416
|
-
] }, e.name) : /* @__PURE__ */ t(
|
|
417
|
-
"div",
|
|
418
|
-
{
|
|
419
|
-
ref: e.name === "postalCode" ? E : void 0,
|
|
420
|
-
children: [
|
|
421
|
-
u,
|
|
422
|
-
/* @__PURE__ */ t(
|
|
423
|
-
J,
|
|
424
|
-
{
|
|
425
|
-
name: e.name,
|
|
426
|
-
label: e.label,
|
|
427
|
-
value: h,
|
|
428
|
-
error: n,
|
|
429
|
-
errorParams: C[e.name],
|
|
430
|
-
type: e.type,
|
|
431
|
-
placeholder: e.placeholder,
|
|
432
|
-
placeholderParams: e.placeholderParams,
|
|
433
|
-
required: e.required,
|
|
434
|
-
optional: e.optional,
|
|
435
|
-
readonly: y,
|
|
436
|
-
maxLength: e.maxLength,
|
|
437
|
-
onChange: (o, c) => d.setField(o, c)
|
|
438
|
-
}
|
|
439
|
-
)
|
|
440
|
-
]
|
|
441
|
-
},
|
|
442
|
-
e.name
|
|
443
|
-
);
|
|
444
|
-
}) }),
|
|
445
|
-
/* @__PURE__ */ t("div", { className: "IncodeEkycFooter", children: [
|
|
446
|
-
/* @__PURE__ */ t(Q, { size: 32 }),
|
|
447
|
-
p && /* @__PURE__ */ t("p", { className: "IncodeEkycSubmitError", children: l(p) }),
|
|
448
|
-
/* @__PURE__ */ t(
|
|
449
|
-
W,
|
|
450
|
-
{
|
|
451
|
-
onClick: () => d.submit(),
|
|
452
|
-
disabled: !k,
|
|
453
|
-
"data-testid": "ekyc-submit",
|
|
454
|
-
children: l("common.continue")
|
|
455
|
-
}
|
|
456
|
-
)
|
|
457
|
-
] })
|
|
458
|
-
] });
|
|
459
|
-
}, ae = ({
|
|
460
|
-
config: f,
|
|
461
|
-
onFinish: d,
|
|
462
|
-
onError: b
|
|
463
|
-
}) => /* @__PURE__ */ t(U, { children: f ? /* @__PURE__ */ t(ne, { config: f, onFinish: d, onError: b }) : null });
|
|
464
|
-
z(ae, "incode-ekyc");
|
|
465
|
-
export {
|
|
466
|
-
ae as EkycModule
|
|
467
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { d as g, y as F } from "./vendor-preact-BXf0bkEs.js";
|
|
2
|
-
import { b as I, u as e, B as v } from "./incodeModule-DLGHhn9E.js";
|
|
3
|
-
import "./uiConfig-DisZ_yFB.js";
|
|
4
|
-
import { I as S } from "./dropdownComposed-BgGKKaXv.js";
|
|
5
|
-
import { E as y } from "./errorIcon-Cxcv4ISP.js";
|
|
6
|
-
import { S as k } from "./successIcon-1BcPFhum.js";
|
|
7
|
-
import { P as f } from "./page-BJDfLRpO.js";
|
|
8
|
-
import { S as z } from "./spinner--i134wYq.js";
|
|
9
|
-
function L(i, o) {
|
|
10
|
-
const [a, s] = g(!1);
|
|
11
|
-
return F(() => {
|
|
12
|
-
const t = i.current;
|
|
13
|
-
if (!t) return;
|
|
14
|
-
const c = () => s(t.scrollHeight > t.clientHeight);
|
|
15
|
-
c();
|
|
16
|
-
const r = new ResizeObserver(c);
|
|
17
|
-
return r.observe(t), () => r.disconnect();
|
|
18
|
-
}, [o, i]), a;
|
|
19
|
-
}
|
|
20
|
-
const O = ({
|
|
21
|
-
name: i,
|
|
22
|
-
label: o,
|
|
23
|
-
value: a = "",
|
|
24
|
-
error: s,
|
|
25
|
-
errorParams: t,
|
|
26
|
-
type: c = "text",
|
|
27
|
-
placeholder: r,
|
|
28
|
-
placeholderParams: u,
|
|
29
|
-
required: n,
|
|
30
|
-
readonly: m,
|
|
31
|
-
maxLength: l,
|
|
32
|
-
disabled: h,
|
|
33
|
-
optional: _,
|
|
34
|
-
onChange: V
|
|
35
|
-
}) => {
|
|
36
|
-
const { t: d } = I(), p = d(o), b = _ ? `${p} ${d("verification.labels.optional")}` : p;
|
|
37
|
-
return /* @__PURE__ */ e("div", { className: "IncodeFormField", children: /* @__PURE__ */ e(
|
|
38
|
-
S,
|
|
39
|
-
{
|
|
40
|
-
id: i,
|
|
41
|
-
label: b,
|
|
42
|
-
name: i,
|
|
43
|
-
type: c,
|
|
44
|
-
value: a,
|
|
45
|
-
placeholder: r ? d(r, u) : void 0,
|
|
46
|
-
readOnly: m,
|
|
47
|
-
disabled: h,
|
|
48
|
-
maxLength: l,
|
|
49
|
-
error: s ? d(s, t) : void 0,
|
|
50
|
-
onInput: (N) => {
|
|
51
|
-
const R = N.target;
|
|
52
|
-
V(i, R.value);
|
|
53
|
-
},
|
|
54
|
-
"data-testid": `form-field-${i}`
|
|
55
|
-
}
|
|
56
|
-
) });
|
|
57
|
-
}, P = ({
|
|
58
|
-
status: i,
|
|
59
|
-
submittingTitle: o,
|
|
60
|
-
successTitle: a,
|
|
61
|
-
failureTitle: s,
|
|
62
|
-
onRetry: t,
|
|
63
|
-
onSkip: c,
|
|
64
|
-
retryLabel: r,
|
|
65
|
-
skipLabel: u
|
|
66
|
-
}) => {
|
|
67
|
-
const { t: n } = I();
|
|
68
|
-
if (i === "submitting") {
|
|
69
|
-
const l = o ?? n("verification.processing");
|
|
70
|
-
return /* @__PURE__ */ e(f, { className: "IncodeVerificationResult", children: /* @__PURE__ */ e("div", { className: "IncodeVerificationResult__center", children: [
|
|
71
|
-
/* @__PURE__ */ e(z, {}),
|
|
72
|
-
/* @__PURE__ */ e("p", { className: "IncodeVerificationResult__title", children: l })
|
|
73
|
-
] }) });
|
|
74
|
-
}
|
|
75
|
-
if (i === "success") {
|
|
76
|
-
const l = a ?? n("verification.successTitle");
|
|
77
|
-
return /* @__PURE__ */ e(f, { className: "IncodeVerificationResult", children: /* @__PURE__ */ e("div", { className: "IncodeVerificationResult__center", children: [
|
|
78
|
-
/* @__PURE__ */ e(k, { size: 64 }),
|
|
79
|
-
/* @__PURE__ */ e("p", { className: "IncodeVerificationResult__title", children: l })
|
|
80
|
-
] }) });
|
|
81
|
-
}
|
|
82
|
-
const m = s ?? n("verification.failureTitle");
|
|
83
|
-
return /* @__PURE__ */ e(f, { className: "IncodeVerificationResult", children: [
|
|
84
|
-
/* @__PURE__ */ e("div", { className: "IncodeVerificationResult__center", children: [
|
|
85
|
-
/* @__PURE__ */ e(y, { size: 64 }),
|
|
86
|
-
/* @__PURE__ */ e("p", { className: "IncodeVerificationResult__title", children: m })
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ e("div", { className: "IncodeVerificationResult__actions", children: [
|
|
89
|
-
t && /* @__PURE__ */ e(v, { onClick: t, "data-testid": "verification-retry", children: r ?? n("common.tryAgain") }),
|
|
90
|
-
c && /* @__PURE__ */ e(
|
|
91
|
-
v,
|
|
92
|
-
{
|
|
93
|
-
onClick: c,
|
|
94
|
-
variant: "secondary",
|
|
95
|
-
"data-testid": "verification-skip",
|
|
96
|
-
children: u ?? n("common.skip")
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
] })
|
|
100
|
-
] });
|
|
101
|
-
};
|
|
102
|
-
export {
|
|
103
|
-
O as F,
|
|
104
|
-
P as V,
|
|
105
|
-
L as u
|
|
106
|
-
};
|