@incodetech/web 0.0.0-dev-20260317-737b25e → 0.0.0-dev-20260318-7381409
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/ekyb/styles.css +4 -0
- package/dist/{ekybModule-FeVB4y3_.js → ekybModule-9m8cnkfH.js} +116 -108
- package/dist/ekyc/styles.css +4 -0
- package/dist/{ekycModule-CFcYtlo_.js → ekycModule-BN_zKKux.js} +111 -103
- package/dist/flow/flow.es.js +2 -2
- package/dist/flow/styles.css +8 -0
- package/package.json +2 -2
package/dist/ekyb/styles.css
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { b as v, u as o, I as
|
|
2
|
-
import { SUPPORTED_COUNTRIES as M, DEV_ONLY_COUNTRIES as
|
|
3
|
-
import { T as q, y as V, A as
|
|
1
|
+
import { b as v, u as o, I as J, a as Q, B as Z } from "./button-Ca1tRSTI.js";
|
|
2
|
+
import { SUPPORTED_COUNTRIES as M, DEV_ONLY_COUNTRIES as x, computeEkybDisplayErrors as ee, createEkybManager as te } from "@incodetech/core/ekyb";
|
|
3
|
+
import { T as q, y as V, A as D, d as oe, q as S, k as re } from "./vendor-preact-BXf0bkEs.js";
|
|
4
4
|
import "./uiConfig-Z6RT23Sl.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
|
-
import { u as
|
|
7
|
-
import { P as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { u as ne, A as se } from "./addressAutocomplete-DetZGxBZ.js";
|
|
7
|
+
import { P as K } from "./page-BVHG3h0V.js";
|
|
8
|
+
import { S as ae } from "./spinner-Cx3FPUCD.js";
|
|
9
|
+
import { t as G, F as ce, V as P } from "./formField-FeX9N4c8.js";
|
|
10
|
+
import { r as le } from "./incodeModule-aE-LkKwM.js";
|
|
11
|
+
import { D as Y } from "./dropdownComposed-B5ZuQS8C.js";
|
|
11
12
|
import { I as _ } from "./inputComposed-BHi-MSpP.js";
|
|
12
|
-
function
|
|
13
|
+
function ue(t) {
|
|
13
14
|
return [...t.toUpperCase()].map((r) => String.fromCodePoint(127462 + r.charCodeAt(0) - 65)).join("");
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const ie = {
|
|
16
17
|
BR: "Brazil",
|
|
17
18
|
CM: "Cameroon",
|
|
18
19
|
CN: "China",
|
|
@@ -27,27 +28,27 @@ const le = {
|
|
|
27
28
|
GB: "United Kingdom",
|
|
28
29
|
US: "USA"
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
-
const r =
|
|
32
|
-
return { value: t, label: `${
|
|
31
|
+
function me(t) {
|
|
32
|
+
const r = ie[t] ?? t;
|
|
33
|
+
return { value: t, label: `${ue(t)} ${r}` };
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function de() {
|
|
35
36
|
if (typeof window > "u") return !1;
|
|
36
37
|
const { hostname: t } = window.location;
|
|
37
38
|
return t === "localhost" || t.includes("stage") || t.includes("demo");
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
+
const be = ({
|
|
40
41
|
value: t,
|
|
41
42
|
onChange: r
|
|
42
43
|
}) => {
|
|
43
|
-
const { t:
|
|
44
|
+
const { t: c } = v(), n = q(() => (de() ? [...M, ...x] : [...M]).map(me).sort((l, d) => l.label.localeCompare(d.label)), []);
|
|
44
45
|
return /* @__PURE__ */ o("div", { className: "IncodeEkybCountrySelector", children: /* @__PURE__ */ o(
|
|
45
|
-
|
|
46
|
+
Y,
|
|
46
47
|
{
|
|
47
48
|
id: "ekyb-country",
|
|
48
|
-
label:
|
|
49
|
+
label: c("ekyb.country"),
|
|
49
50
|
value: t,
|
|
50
|
-
options:
|
|
51
|
+
options: n,
|
|
51
52
|
onChange: r,
|
|
52
53
|
"data-testid": "ekyb-country-selector"
|
|
53
54
|
}
|
|
@@ -55,126 +56,133 @@ const de = ({
|
|
|
55
56
|
}, B = ({
|
|
56
57
|
field: t,
|
|
57
58
|
value: r,
|
|
58
|
-
error:
|
|
59
|
-
errorParams:
|
|
59
|
+
error: c,
|
|
60
|
+
errorParams: n,
|
|
60
61
|
country: i,
|
|
61
|
-
onChange:
|
|
62
|
+
onChange: l,
|
|
62
63
|
onBlur: d
|
|
63
64
|
}) => {
|
|
64
|
-
const { t: b } = v(),
|
|
65
|
+
const { t: b } = v(), u = !t.required, h = b(t.label);
|
|
65
66
|
if (t.type === "dropdown") {
|
|
66
|
-
const m =
|
|
67
|
+
const m = u ? `${h} (${b("common.optional")})` : h, s = t.name === "state" ? b("ekyb.selectState") : void 0;
|
|
67
68
|
return /* @__PURE__ */ o(
|
|
68
|
-
|
|
69
|
+
Y,
|
|
69
70
|
{
|
|
70
71
|
id: `ekyb-${t.name}`,
|
|
71
72
|
label: m,
|
|
72
|
-
placeholder:
|
|
73
|
+
placeholder: s,
|
|
73
74
|
value: r,
|
|
74
75
|
options: (t.options ?? []).map((p) => ({
|
|
75
76
|
...p,
|
|
76
77
|
label: b(p.label)
|
|
77
78
|
})),
|
|
78
|
-
error:
|
|
79
|
+
error: G(b, c, n),
|
|
79
80
|
searchable: !0,
|
|
80
|
-
onChange: (p) =>
|
|
81
|
+
onChange: (p) => l(t.name, p),
|
|
81
82
|
onBlur: d ? () => d(t.name) : void 0,
|
|
82
83
|
"data-testid": `ekyb-field-${t.name}`
|
|
83
84
|
}
|
|
84
85
|
);
|
|
85
86
|
}
|
|
86
87
|
return /* @__PURE__ */ o(
|
|
87
|
-
|
|
88
|
+
ce,
|
|
88
89
|
{
|
|
89
90
|
name: t.name,
|
|
90
91
|
label: t.label,
|
|
91
92
|
value: r,
|
|
92
|
-
error:
|
|
93
|
-
errorParams:
|
|
93
|
+
error: c,
|
|
94
|
+
errorParams: n,
|
|
94
95
|
required: t.required,
|
|
95
|
-
optional:
|
|
96
|
-
onChange:
|
|
96
|
+
optional: u,
|
|
97
|
+
onChange: l,
|
|
97
98
|
onBlur: d
|
|
98
99
|
}
|
|
99
100
|
);
|
|
100
|
-
},
|
|
101
|
+
}, pe = ({
|
|
101
102
|
ubos: t,
|
|
102
103
|
errors: r,
|
|
103
|
-
errorParams:
|
|
104
|
-
canAddUbo:
|
|
104
|
+
errorParams: c,
|
|
105
|
+
canAddUbo: n,
|
|
105
106
|
onSetField: i,
|
|
106
|
-
onBlur:
|
|
107
|
+
onBlur: l,
|
|
107
108
|
onAdd: d,
|
|
108
109
|
onRemove: b
|
|
109
110
|
}) => {
|
|
110
|
-
const { t:
|
|
111
|
+
const { t: u } = v(), h = (m) => G(u, r[m], c[m]);
|
|
111
112
|
return t.length === 0 ? null : /* @__PURE__ */ o("div", { className: "IncodeEkybUbos", children: [
|
|
112
|
-
t.map((m,
|
|
113
|
-
const p =
|
|
113
|
+
t.map((m, s) => {
|
|
114
|
+
const p = s === 0 ? u("ekyb.uboName") : u("ekyb.uboNameWithNumber", { number: s + 1 }), f = s === 0 ? u("ekyb.uboSurname") : u("ekyb.uboSurnameWithNumber", { number: s + 1 }), N = s === 0;
|
|
114
115
|
return /* @__PURE__ */ o("div", { className: "IncodeEkybUboEntry", children: [
|
|
115
116
|
/* @__PURE__ */ o(
|
|
116
117
|
_,
|
|
117
118
|
{
|
|
118
|
-
id: `ubo-${
|
|
119
|
+
id: `ubo-${s}-name`,
|
|
119
120
|
label: p,
|
|
120
|
-
name: `ubo-${
|
|
121
|
+
name: `ubo-${s}-name`,
|
|
121
122
|
value: m.name,
|
|
122
|
-
error: h(`ubo-${
|
|
123
|
-
onInput: (I) => i(
|
|
124
|
-
onBlur:
|
|
125
|
-
"data-testid": `ekyb-ubo-${
|
|
123
|
+
error: h(`ubo-${s}-name`),
|
|
124
|
+
onInput: (I) => i(s, "name", I.target.value),
|
|
125
|
+
onBlur: l ? () => l(`ubo-${s}-name`) : void 0,
|
|
126
|
+
"data-testid": `ekyb-ubo-${s}-name`
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
129
|
/* @__PURE__ */ o(
|
|
129
130
|
_,
|
|
130
131
|
{
|
|
131
|
-
id: `ubo-${
|
|
132
|
+
id: `ubo-${s}-surname`,
|
|
132
133
|
label: f,
|
|
133
|
-
name: `ubo-${
|
|
134
|
+
name: `ubo-${s}-surname`,
|
|
134
135
|
value: m.surname,
|
|
135
|
-
error: h(`ubo-${
|
|
136
|
+
error: h(`ubo-${s}-surname`),
|
|
136
137
|
onInput: (I) => i(
|
|
137
|
-
|
|
138
|
+
s,
|
|
138
139
|
"surname",
|
|
139
140
|
I.target.value
|
|
140
141
|
),
|
|
141
|
-
onBlur:
|
|
142
|
-
"data-testid": `ekyb-ubo-${
|
|
142
|
+
onBlur: l ? () => l(`ubo-${s}-surname`) : void 0,
|
|
143
|
+
"data-testid": `ekyb-ubo-${s}-surname`
|
|
143
144
|
}
|
|
144
145
|
),
|
|
145
146
|
!N && /* @__PURE__ */ o(
|
|
146
147
|
"button",
|
|
147
148
|
{
|
|
148
149
|
className: "IncodeEkybRemoveUbo",
|
|
149
|
-
onClick: () => b(
|
|
150
|
+
onClick: () => b(s),
|
|
150
151
|
type: "button",
|
|
151
|
-
children:
|
|
152
|
+
children: u("common.remove")
|
|
152
153
|
}
|
|
153
154
|
)
|
|
154
155
|
] }, m.id);
|
|
155
156
|
}),
|
|
156
|
-
|
|
157
|
+
n && /* @__PURE__ */ o(
|
|
157
158
|
"button",
|
|
158
159
|
{
|
|
159
160
|
className: "IncodeEkybAddUbo",
|
|
160
161
|
onClick: d,
|
|
161
162
|
type: "button",
|
|
162
163
|
"data-testid": "ekyb-add-ubo",
|
|
163
|
-
children:
|
|
164
|
+
children: u("ekyb.addAnotherUbo")
|
|
164
165
|
}
|
|
165
166
|
)
|
|
166
167
|
] });
|
|
167
|
-
},
|
|
168
|
-
const { t:
|
|
168
|
+
}, ye = ({ config: t, onFinish: r }) => {
|
|
169
|
+
const { t: c } = v(), [n, i] = Q(() => te({ config: t }));
|
|
169
170
|
return V(() => {
|
|
170
|
-
(
|
|
171
|
-
}, [
|
|
172
|
-
|
|
171
|
+
(n.status === "finished" || n.status === "closed") && r?.();
|
|
172
|
+
}, [n.status, r]), n.status === "finished" || n.status === "closed" ? null : n.status === "loading" ? /* @__PURE__ */ o(
|
|
173
|
+
P,
|
|
173
174
|
{
|
|
174
175
|
status: "submitting",
|
|
175
|
-
submittingTitle:
|
|
176
|
+
submittingTitle: c("common.loading")
|
|
177
|
+
}
|
|
178
|
+
) : n.status === "submitting" ? /* @__PURE__ */ o(K, { children: /* @__PURE__ */ o(
|
|
179
|
+
ae,
|
|
180
|
+
{
|
|
181
|
+
fullScreen: !1,
|
|
182
|
+
title: c("common.processing"),
|
|
183
|
+
className: "IncodeEkybSpinner"
|
|
176
184
|
}
|
|
177
|
-
)
|
|
185
|
+
) }) : n.status === "success" ? /* @__PURE__ */ o(P, { status: "success" }) : n.status === "error" ? /* @__PURE__ */ o(P, { status: "failure", onRetry: () => i.retry() }) : n.status === "form" ? /* @__PURE__ */ o(ke, { state: n, manager: i }) : null;
|
|
178
186
|
}, O = /* @__PURE__ */ new Set([
|
|
179
187
|
"street",
|
|
180
188
|
"houseNo",
|
|
@@ -182,61 +190,61 @@ const de = ({
|
|
|
182
190
|
"city",
|
|
183
191
|
"state",
|
|
184
192
|
"postalCode"
|
|
185
|
-
]),
|
|
193
|
+
]), he = ["street", "city", "state", "postalCode", "houseNo"], ke = ({ state: t, manager: r }) => {
|
|
186
194
|
const {
|
|
187
|
-
country:
|
|
188
|
-
fields:
|
|
195
|
+
country: c,
|
|
196
|
+
fields: n,
|
|
189
197
|
values: i,
|
|
190
|
-
errors:
|
|
198
|
+
errors: l,
|
|
191
199
|
isValid: d,
|
|
192
200
|
ubos: b,
|
|
193
|
-
canAddUbo:
|
|
201
|
+
canAddUbo: u,
|
|
194
202
|
addressSuggestions: h,
|
|
195
203
|
submitAttempted: m
|
|
196
|
-
} = t, { t:
|
|
204
|
+
} = t, { t: s } = v(), p = D(null), f = D(null), N = D(void 0), I = ne(p, n.length), [w, T] = oe({}), y = S((e) => {
|
|
197
205
|
T((a) => a[e] ? a : { ...a, [e]: !0 });
|
|
198
206
|
}, []), { displayErrors: E, errorParams: F } = q(
|
|
199
|
-
() =>
|
|
200
|
-
|
|
207
|
+
() => ee(
|
|
208
|
+
l,
|
|
201
209
|
w,
|
|
202
210
|
m,
|
|
203
|
-
|
|
204
|
-
|
|
211
|
+
c,
|
|
212
|
+
n
|
|
205
213
|
),
|
|
206
|
-
[
|
|
214
|
+
[l, w, m, c, n]
|
|
207
215
|
), $ = S(
|
|
208
216
|
(e) => y(e),
|
|
209
217
|
[y]
|
|
210
|
-
),
|
|
218
|
+
), A = S(
|
|
211
219
|
(e, a) => {
|
|
212
220
|
y(e), r.setField(e, a);
|
|
213
221
|
},
|
|
214
222
|
[r, y]
|
|
215
|
-
),
|
|
223
|
+
), j = S(
|
|
216
224
|
(e, a, k) => {
|
|
217
225
|
y(`ubo-${e}-${a}`), r.setUboField(e, a, k);
|
|
218
226
|
},
|
|
219
227
|
[r, y]
|
|
220
|
-
),
|
|
228
|
+
), W = S(
|
|
221
229
|
(e) => {
|
|
222
|
-
for (const a of
|
|
230
|
+
for (const a of he) y(a);
|
|
223
231
|
r.selectAddress(e);
|
|
224
232
|
},
|
|
225
233
|
[r, y]
|
|
226
|
-
),
|
|
234
|
+
), z = S(
|
|
227
235
|
(e) => {
|
|
228
236
|
r.removeUbo(e), T((a) => {
|
|
229
237
|
const k = {};
|
|
230
|
-
for (const [C,
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
233
|
-
k[C] =
|
|
238
|
+
for (const [C, U] of Object.entries(a)) {
|
|
239
|
+
const R = C.match(/^ubo-(\d+)-(name|surname)$/);
|
|
240
|
+
if (!R) {
|
|
241
|
+
k[C] = U;
|
|
234
242
|
continue;
|
|
235
243
|
}
|
|
236
|
-
const g = Number(
|
|
244
|
+
const g = Number(R[1]);
|
|
237
245
|
if (g === e) continue;
|
|
238
|
-
const
|
|
239
|
-
k[`ubo-${
|
|
246
|
+
const X = g > e ? g - 1 : g;
|
|
247
|
+
k[`ubo-${X}-${R[2]}`] = U;
|
|
240
248
|
}
|
|
241
249
|
return k;
|
|
242
250
|
});
|
|
@@ -257,44 +265,44 @@ const de = ({
|
|
|
257
265
|
});
|
|
258
266
|
return () => cancelAnimationFrame(k);
|
|
259
267
|
}, [E.postalCode]);
|
|
260
|
-
const
|
|
261
|
-
return /* @__PURE__ */ o(
|
|
268
|
+
const H = n.filter((e) => !O.has(e.name)), L = n.filter((e) => O.has(e.name));
|
|
269
|
+
return /* @__PURE__ */ o(K, { className: `IncodeEkybPage${I ? " IncodeEkybPageScrollable" : ""}`, title: s("ekyb.title"), children: [
|
|
262
270
|
/* @__PURE__ */ o("div", { ref: p, className: "IncodeEkybForm", children: [
|
|
263
271
|
/* @__PURE__ */ o(
|
|
264
|
-
|
|
272
|
+
be,
|
|
265
273
|
{
|
|
266
|
-
value:
|
|
274
|
+
value: c,
|
|
267
275
|
onChange: (e) => r.setCountry(e)
|
|
268
276
|
}
|
|
269
277
|
),
|
|
270
|
-
|
|
278
|
+
H.map((e) => /* @__PURE__ */ o(
|
|
271
279
|
B,
|
|
272
280
|
{
|
|
273
281
|
field: e,
|
|
274
282
|
value: i[e.name] ?? "",
|
|
275
283
|
error: E[e.name],
|
|
276
284
|
errorParams: F[e.name],
|
|
277
|
-
country:
|
|
278
|
-
onChange:
|
|
285
|
+
country: c,
|
|
286
|
+
onChange: A,
|
|
279
287
|
onBlur: $
|
|
280
288
|
},
|
|
281
289
|
e.name
|
|
282
290
|
)),
|
|
283
291
|
/* @__PURE__ */ o(
|
|
284
|
-
|
|
292
|
+
pe,
|
|
285
293
|
{
|
|
286
294
|
ubos: b,
|
|
287
295
|
errors: E,
|
|
288
296
|
errorParams: F,
|
|
289
|
-
canAddUbo:
|
|
290
|
-
onSetField:
|
|
297
|
+
canAddUbo: u,
|
|
298
|
+
onSetField: j,
|
|
291
299
|
onBlur: $,
|
|
292
300
|
onAdd: () => r.addUbo(),
|
|
293
|
-
onRemove:
|
|
301
|
+
onRemove: z
|
|
294
302
|
}
|
|
295
303
|
),
|
|
296
|
-
L.length > 0 && /* @__PURE__ */ o(
|
|
297
|
-
/* @__PURE__ */ o("h3", { className: "IncodeEkybSectionHeader", children:
|
|
304
|
+
L.length > 0 && /* @__PURE__ */ o(re, { children: [
|
|
305
|
+
/* @__PURE__ */ o("h3", { className: "IncodeEkybSectionHeader", children: s("ekyb.addressDetails") }),
|
|
298
306
|
L.map((e) => e.name === "street" ? /* @__PURE__ */ o(
|
|
299
307
|
se,
|
|
300
308
|
{
|
|
@@ -304,9 +312,9 @@ const de = ({
|
|
|
304
312
|
errorParams: F.street,
|
|
305
313
|
suggestions: h,
|
|
306
314
|
optional: !e.required,
|
|
307
|
-
onChange: (a) =>
|
|
315
|
+
onChange: (a) => A("street", a),
|
|
308
316
|
onSearch: (a) => r.searchAddress(a),
|
|
309
|
-
onSelect:
|
|
317
|
+
onSelect: W,
|
|
310
318
|
onBlur: () => $("street")
|
|
311
319
|
},
|
|
312
320
|
e.name
|
|
@@ -321,8 +329,8 @@ const de = ({
|
|
|
321
329
|
value: i[e.name] ?? "",
|
|
322
330
|
error: E[e.name],
|
|
323
331
|
errorParams: F[e.name],
|
|
324
|
-
country:
|
|
325
|
-
onChange:
|
|
332
|
+
country: c,
|
|
333
|
+
onChange: A,
|
|
326
334
|
onBlur: $
|
|
327
335
|
}
|
|
328
336
|
)
|
|
@@ -332,17 +340,17 @@ const de = ({
|
|
|
332
340
|
] })
|
|
333
341
|
] }),
|
|
334
342
|
/* @__PURE__ */ o("div", { className: "IncodeEkybFooter", children: /* @__PURE__ */ o(
|
|
335
|
-
|
|
343
|
+
Z,
|
|
336
344
|
{
|
|
337
345
|
onClick: () => r.submit(),
|
|
338
346
|
disabled: !d,
|
|
339
347
|
"data-testid": "ekyb-submit",
|
|
340
|
-
children:
|
|
348
|
+
children: s("ekyb.continue")
|
|
341
349
|
}
|
|
342
350
|
) })
|
|
343
351
|
] });
|
|
344
|
-
},
|
|
345
|
-
|
|
352
|
+
}, Ee = ({ config: t, onFinish: r }) => /* @__PURE__ */ o(J, { children: t ? /* @__PURE__ */ o(ye, { config: t, onFinish: r }) : null });
|
|
353
|
+
le(Ee, "incode-ekyb");
|
|
346
354
|
export {
|
|
347
|
-
|
|
355
|
+
Ee as EkybModule
|
|
348
356
|
};
|
package/dist/ekyc/styles.css
CHANGED
|
@@ -1,88 +1,96 @@
|
|
|
1
|
-
import { u as r, I as
|
|
2
|
-
import { computeEkycDisplayErrors as
|
|
3
|
-
import { y as $, A as F, d as
|
|
1
|
+
import { u as r, I as Y, b as q, a as G, B as L } from "./button-Ca1tRSTI.js";
|
|
2
|
+
import { computeEkycDisplayErrors as j, createEkycManager as z } from "@incodetech/core/ekyc";
|
|
3
|
+
import { y as $, A as F, d as J, q as E, T as Q } from "./vendor-preact-BXf0bkEs.js";
|
|
4
4
|
import "./uiConfig-Z6RT23Sl.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
|
-
import { u as
|
|
7
|
-
import { V as
|
|
8
|
-
import { D as
|
|
9
|
-
import { D as
|
|
10
|
-
import { P as
|
|
11
|
-
import {
|
|
6
|
+
import { u as U, A as W } from "./addressAutocomplete-DetZGxBZ.js";
|
|
7
|
+
import { V as v, t as X, F as Z } from "./formField-FeX9N4c8.js";
|
|
8
|
+
import { D as f } from "./dateInputComposed-CvFmQpJ0.js";
|
|
9
|
+
import { D as ee } from "./dropdownComposed-B5ZuQS8C.js";
|
|
10
|
+
import { P as T } from "./page-BVHG3h0V.js";
|
|
11
|
+
import { S as re } from "./spinner-Cx3FPUCD.js";
|
|
12
|
+
import { r as oe } from "./incodeModule-aE-LkKwM.js";
|
|
12
13
|
import { P as te } from "./phoneInputComposed-CwtJKvGh.js";
|
|
13
|
-
const
|
|
14
|
-
const { t: l } = q(), [a,
|
|
14
|
+
const ae = ({ config: p, onFinish: s }) => {
|
|
15
|
+
const { t: l } = q(), [a, d] = G(() => z({ config: p }));
|
|
15
16
|
return $(() => {
|
|
16
|
-
(a.status === "finished" || a.status === "closed") &&
|
|
17
|
-
}, [a.status,
|
|
18
|
-
|
|
17
|
+
(a.status === "finished" || a.status === "closed") && s?.();
|
|
18
|
+
}, [a.status, s]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ r(
|
|
19
|
+
v,
|
|
19
20
|
{
|
|
20
21
|
status: "submitting",
|
|
21
22
|
submittingTitle: l("common.loading")
|
|
22
23
|
}
|
|
23
|
-
) : a.status === "submitting" ? /* @__PURE__ */ r(
|
|
24
|
-
|
|
24
|
+
) : a.status === "submitting" ? /* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
|
|
25
|
+
re,
|
|
26
|
+
{
|
|
27
|
+
fullScreen: !1,
|
|
28
|
+
title: l("common.processing"),
|
|
29
|
+
className: "IncodeEkycSpinner"
|
|
30
|
+
}
|
|
31
|
+
) }) : a.status === "success" ? /* @__PURE__ */ r(v, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ r(
|
|
32
|
+
v,
|
|
25
33
|
{
|
|
26
34
|
status: "failure",
|
|
27
|
-
onRetry: () =>
|
|
28
|
-
onSkip: () =>
|
|
35
|
+
onRetry: () => d.retry(),
|
|
36
|
+
onSkip: () => d.skip()
|
|
29
37
|
}
|
|
30
38
|
) : a.status === "misconfigured" ? /* @__PURE__ */ r(
|
|
31
|
-
|
|
39
|
+
v,
|
|
32
40
|
{
|
|
33
41
|
status: "failure",
|
|
34
42
|
failureTitle: l("verification.noFormFields"),
|
|
35
|
-
onSkip: () =>
|
|
43
|
+
onSkip: () => d.close(),
|
|
36
44
|
skipLabel: l("common.close")
|
|
37
45
|
}
|
|
38
|
-
) : a.status === "form" ? /* @__PURE__ */ r(se, { state: a, manager:
|
|
39
|
-
},
|
|
46
|
+
) : a.status === "form" ? /* @__PURE__ */ r(se, { state: a, manager: d }) : null;
|
|
47
|
+
}, ne = [
|
|
40
48
|
"street",
|
|
41
49
|
"city",
|
|
42
50
|
"state",
|
|
43
51
|
"postalCode",
|
|
44
52
|
"houseNo"
|
|
45
|
-
], se = ({ state: p, manager:
|
|
53
|
+
], se = ({ state: p, manager: s }) => {
|
|
46
54
|
const {
|
|
47
55
|
fields: l,
|
|
48
56
|
values: a,
|
|
49
|
-
errors:
|
|
50
|
-
isValid:
|
|
51
|
-
addressSuggestions:
|
|
52
|
-
prefilled:
|
|
53
|
-
hideEmail:
|
|
57
|
+
errors: d,
|
|
58
|
+
isValid: V,
|
|
59
|
+
addressSuggestions: w,
|
|
60
|
+
prefilled: K,
|
|
61
|
+
hideEmail: M,
|
|
54
62
|
fieldsCountry: C,
|
|
55
|
-
submitError:
|
|
63
|
+
submitError: S,
|
|
56
64
|
submitAttempted: P
|
|
57
|
-
} = p, { t:
|
|
58
|
-
|
|
59
|
-
}, []), { displayErrors:
|
|
60
|
-
() =>
|
|
61
|
-
|
|
65
|
+
} = p, { t: n } = q(), N = F(null), A = F(null), R = F(void 0), x = U(N, l.length), [D, _] = J({}), h = E((e) => {
|
|
66
|
+
_((o) => o[e] ? o : { ...o, [e]: !0 });
|
|
67
|
+
}, []), { displayErrors: g, errorParams: I } = Q(
|
|
68
|
+
() => j(
|
|
69
|
+
d,
|
|
62
70
|
D,
|
|
63
71
|
P,
|
|
64
72
|
C,
|
|
65
73
|
l
|
|
66
74
|
),
|
|
67
|
-
[
|
|
68
|
-
), y =
|
|
75
|
+
[d, D, P, C, l]
|
|
76
|
+
), y = E(
|
|
69
77
|
(e) => h(e),
|
|
70
78
|
[h]
|
|
71
|
-
), b =
|
|
72
|
-
(e,
|
|
73
|
-
h(e),
|
|
79
|
+
), b = E(
|
|
80
|
+
(e, o) => {
|
|
81
|
+
h(e), s.setField(e, o);
|
|
74
82
|
},
|
|
75
|
-
[
|
|
76
|
-
),
|
|
83
|
+
[s, h]
|
|
84
|
+
), H = E(
|
|
77
85
|
(e) => {
|
|
78
|
-
for (const
|
|
79
|
-
|
|
86
|
+
for (const o of ne) h(o);
|
|
87
|
+
s.selectAddress(e);
|
|
80
88
|
},
|
|
81
|
-
[
|
|
89
|
+
[s, h]
|
|
82
90
|
);
|
|
83
91
|
$(() => {
|
|
84
|
-
const e =
|
|
85
|
-
if (R.current = e, !e ||
|
|
92
|
+
const e = g.postalCode, o = R.current;
|
|
93
|
+
if (R.current = e, !e || o === e)
|
|
86
94
|
return;
|
|
87
95
|
const i = requestAnimationFrame(() => {
|
|
88
96
|
const c = A.current;
|
|
@@ -93,57 +101,57 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
93
101
|
});
|
|
94
102
|
});
|
|
95
103
|
return () => cancelAnimationFrame(i);
|
|
96
|
-
}, [
|
|
97
|
-
const
|
|
104
|
+
}, [g.postalCode]);
|
|
105
|
+
const k = (e, o) => X(n, o, I[e]);
|
|
98
106
|
let B;
|
|
99
|
-
return /* @__PURE__ */ r(
|
|
107
|
+
return /* @__PURE__ */ r(T, { className: `IncodeEkycPage${x ? " IncodeEkycPageScrollable" : ""}`, title: n("verification.title"), children: [
|
|
100
108
|
/* @__PURE__ */ r("div", { ref: N, className: "IncodeEkycForm", children: l.map((e) => {
|
|
101
|
-
if (e.name === "email" &&
|
|
102
|
-
let
|
|
103
|
-
e.section && e.section !== B && (B = e.section,
|
|
109
|
+
if (e.name === "email" && M) return null;
|
|
110
|
+
let o = null;
|
|
111
|
+
e.section && e.section !== B && (B = e.section, o = /* @__PURE__ */ r("h3", { className: "IncodeEkycSectionHeader", children: n({
|
|
104
112
|
address: "verification.labels.addressDetailsSection",
|
|
105
113
|
driverLicense: "verification.labels.dlDetailsSection"
|
|
106
114
|
}[e.section] ?? e.section) }));
|
|
107
|
-
const i = e.readonly ||
|
|
115
|
+
const i = e.readonly || K[e.name], c = a[e.name] ?? "", u = g[e.name];
|
|
108
116
|
if (e.name === "street" && e.section === "address")
|
|
109
117
|
return /* @__PURE__ */ r("div", { children: [
|
|
110
|
-
|
|
118
|
+
o,
|
|
111
119
|
/* @__PURE__ */ r(
|
|
112
|
-
|
|
120
|
+
W,
|
|
113
121
|
{
|
|
114
122
|
label: e.label,
|
|
115
123
|
value: c,
|
|
116
124
|
error: u,
|
|
117
125
|
errorParams: I[e.name],
|
|
118
|
-
suggestions:
|
|
126
|
+
suggestions: w,
|
|
119
127
|
readonly: i,
|
|
120
128
|
optional: !e.required,
|
|
121
|
-
onChange: (
|
|
122
|
-
onSearch: (
|
|
123
|
-
onSelect:
|
|
129
|
+
onChange: (t) => b("street", t),
|
|
130
|
+
onSearch: (t) => s.searchAddress(t),
|
|
131
|
+
onSelect: H,
|
|
124
132
|
onBlur: () => y("street")
|
|
125
133
|
}
|
|
126
134
|
)
|
|
127
135
|
] }, e.name);
|
|
128
136
|
if (e.type === "dropdown") {
|
|
129
|
-
const
|
|
137
|
+
const t = n(e.label);
|
|
130
138
|
return /* @__PURE__ */ r("div", { children: [
|
|
131
|
-
|
|
139
|
+
o,
|
|
132
140
|
/* @__PURE__ */ r(
|
|
133
|
-
|
|
141
|
+
ee,
|
|
134
142
|
{
|
|
135
143
|
id: `ekyc-${e.name}`,
|
|
136
|
-
label:
|
|
137
|
-
placeholder: e.placeholder ?
|
|
144
|
+
label: t,
|
|
145
|
+
placeholder: e.placeholder ? n(e.placeholder) : void 0,
|
|
138
146
|
value: c,
|
|
139
|
-
options: (e.options ?? []).map((
|
|
140
|
-
...
|
|
141
|
-
label:
|
|
147
|
+
options: (e.options ?? []).map((m) => ({
|
|
148
|
+
...m,
|
|
149
|
+
label: n(m.label)
|
|
142
150
|
})),
|
|
143
|
-
error:
|
|
151
|
+
error: k(e.name, u),
|
|
144
152
|
disabled: i,
|
|
145
153
|
searchable: !0,
|
|
146
|
-
onChange: (
|
|
154
|
+
onChange: (m) => b(e.name, m),
|
|
147
155
|
onBlur: () => y(e.name),
|
|
148
156
|
"data-testid": `ekyc-field-${e.name}`
|
|
149
157
|
}
|
|
@@ -151,20 +159,20 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
151
159
|
] }, e.name);
|
|
152
160
|
}
|
|
153
161
|
if (e.type === "date") {
|
|
154
|
-
const
|
|
162
|
+
const t = n(e.label);
|
|
155
163
|
return /* @__PURE__ */ r("div", { children: [
|
|
156
|
-
|
|
164
|
+
o,
|
|
157
165
|
/* @__PURE__ */ r(
|
|
158
|
-
|
|
166
|
+
f,
|
|
159
167
|
{
|
|
160
168
|
id: `ekyc-${e.name}`,
|
|
161
|
-
label:
|
|
169
|
+
label: t,
|
|
162
170
|
value: c,
|
|
163
|
-
error:
|
|
171
|
+
error: k(e.name, u),
|
|
164
172
|
disabled: i,
|
|
165
|
-
onInput: (
|
|
166
|
-
const
|
|
167
|
-
b(e.name,
|
|
173
|
+
onInput: (m) => {
|
|
174
|
+
const O = m.target;
|
|
175
|
+
b(e.name, O.value);
|
|
168
176
|
},
|
|
169
177
|
onBlur: () => y(e.name),
|
|
170
178
|
"data-testid": `ekyc-field-${e.name}`
|
|
@@ -173,22 +181,22 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
173
181
|
] }, e.name);
|
|
174
182
|
}
|
|
175
183
|
if (e.type === "phone") {
|
|
176
|
-
const
|
|
184
|
+
const t = n(e.label);
|
|
177
185
|
return /* @__PURE__ */ r("div", { children: [
|
|
178
|
-
|
|
186
|
+
o,
|
|
179
187
|
/* @__PURE__ */ r(
|
|
180
188
|
te,
|
|
181
189
|
{
|
|
182
190
|
id: `ekyc-${e.name}`,
|
|
183
|
-
label:
|
|
191
|
+
label: t,
|
|
184
192
|
countryCode: C,
|
|
185
193
|
value: c,
|
|
186
194
|
placeholder: e.placeholder,
|
|
187
|
-
error:
|
|
195
|
+
error: k(e.name, u),
|
|
188
196
|
disabled: i,
|
|
189
197
|
disableCountrySelector: e.disableCountrySelector,
|
|
190
198
|
required: e.required,
|
|
191
|
-
onChange: (
|
|
199
|
+
onChange: (m) => b(e.name, m),
|
|
192
200
|
onBlur: () => y(e.name),
|
|
193
201
|
"data-testid": `ekyc-field-${e.name}`
|
|
194
202
|
}
|
|
@@ -196,10 +204,10 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
196
204
|
] }, e.name);
|
|
197
205
|
}
|
|
198
206
|
return e.type === "radio" ? /* @__PURE__ */ r("div", { children: [
|
|
199
|
-
|
|
207
|
+
o,
|
|
200
208
|
/* @__PURE__ */ r("div", { className: "IncodeEkycRadioGroup", children: [
|
|
201
|
-
/* @__PURE__ */ r("label", { className: "IncodeEkycRadioLabel", children:
|
|
202
|
-
/* @__PURE__ */ r("div", { className: "IncodeEkycRadioOptions", children: e.options?.map((
|
|
209
|
+
/* @__PURE__ */ r("label", { className: "IncodeEkycRadioLabel", children: n(e.label) }),
|
|
210
|
+
/* @__PURE__ */ r("div", { className: "IncodeEkycRadioOptions", children: e.options?.map((t) => /* @__PURE__ */ r(
|
|
203
211
|
"label",
|
|
204
212
|
{
|
|
205
213
|
className: "IncodeEkycRadioOption",
|
|
@@ -209,28 +217,28 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
209
217
|
{
|
|
210
218
|
type: "radio",
|
|
211
219
|
name: e.name,
|
|
212
|
-
checked: c ===
|
|
213
|
-
value:
|
|
214
|
-
onChange: () => b(e.name,
|
|
220
|
+
checked: c === t.value,
|
|
221
|
+
value: t.value,
|
|
222
|
+
onChange: () => b(e.name, t.value),
|
|
215
223
|
onBlur: () => y(e.name),
|
|
216
224
|
disabled: i
|
|
217
225
|
}
|
|
218
226
|
),
|
|
219
|
-
/* @__PURE__ */ r("span", { children:
|
|
227
|
+
/* @__PURE__ */ r("span", { children: n(t.label) })
|
|
220
228
|
]
|
|
221
229
|
},
|
|
222
|
-
|
|
230
|
+
t.value
|
|
223
231
|
)) }),
|
|
224
|
-
u && /* @__PURE__ */ r("span", { className: "IncodeEkycFieldError", children:
|
|
232
|
+
u && /* @__PURE__ */ r("span", { className: "IncodeEkycFieldError", children: k(e.name, u) })
|
|
225
233
|
] })
|
|
226
234
|
] }, e.name) : /* @__PURE__ */ r(
|
|
227
235
|
"div",
|
|
228
236
|
{
|
|
229
237
|
ref: e.name === "postalCode" ? A : void 0,
|
|
230
238
|
children: [
|
|
231
|
-
|
|
239
|
+
o,
|
|
232
240
|
/* @__PURE__ */ r(
|
|
233
|
-
|
|
241
|
+
Z,
|
|
234
242
|
{
|
|
235
243
|
name: e.name,
|
|
236
244
|
label: e.label,
|
|
@@ -254,29 +262,29 @@ const oe = ({ config: p, onFinish: n }) => {
|
|
|
254
262
|
);
|
|
255
263
|
}) }),
|
|
256
264
|
/* @__PURE__ */ r("div", { className: "IncodeEkycFooter", children: [
|
|
257
|
-
|
|
265
|
+
S && /* @__PURE__ */ r("p", { className: "IncodeEkycSubmitError", children: n(S) }),
|
|
258
266
|
/* @__PURE__ */ r(
|
|
259
267
|
L,
|
|
260
268
|
{
|
|
261
|
-
onClick: () =>
|
|
262
|
-
disabled: !
|
|
269
|
+
onClick: () => s.submit(),
|
|
270
|
+
disabled: !V,
|
|
263
271
|
"data-testid": "ekyc-submit",
|
|
264
|
-
children:
|
|
272
|
+
children: n("common.continue")
|
|
265
273
|
}
|
|
266
274
|
),
|
|
267
|
-
|
|
275
|
+
S === "verification.errors.countryNotSupported" && /* @__PURE__ */ r(
|
|
268
276
|
L,
|
|
269
277
|
{
|
|
270
278
|
variant: "link",
|
|
271
|
-
onClick: () =>
|
|
279
|
+
onClick: () => s.skip(),
|
|
272
280
|
"data-testid": "ekyc-skip",
|
|
273
|
-
children:
|
|
281
|
+
children: n("verification.labels.skip")
|
|
274
282
|
}
|
|
275
283
|
)
|
|
276
284
|
] })
|
|
277
285
|
] });
|
|
278
|
-
},
|
|
279
|
-
|
|
286
|
+
}, ce = ({ config: p, onFinish: s }) => /* @__PURE__ */ r(Y, { children: p ? /* @__PURE__ */ r(ae, { config: p, onFinish: s }) : null });
|
|
287
|
+
oe(ce, "incode-ekyc");
|
|
280
288
|
export {
|
|
281
|
-
|
|
289
|
+
ce as EkycModule
|
|
282
290
|
};
|
package/dist/flow/flow.es.js
CHANGED
|
@@ -2000,8 +2000,8 @@ const Pe = () => import("../id/id.es.js").then((e) => e.Id), ke = {
|
|
|
2000
2000
|
(e) => e.GovernmentValidation
|
|
2001
2001
|
),
|
|
2002
2002
|
GEOLOCATION: () => import("../geolocation/geolocation.es.js").then((e) => e.Geolocation),
|
|
2003
|
-
EXTERNAL_VERIFICATION: () => import("../ekycModule-
|
|
2004
|
-
EKYB: () => import("../ekybModule-
|
|
2003
|
+
EXTERNAL_VERIFICATION: () => import("../ekycModule-BN_zKKux.js").then((e) => e.EkycModule),
|
|
2004
|
+
EKYB: () => import("../ekybModule-9m8cnkfH.js").then((e) => e.EkybModule),
|
|
2005
2005
|
DOCUMENT_CAPTURE: () => import("../documentCapture-PdKA2frR.js").then(
|
|
2006
2006
|
(e) => e.DocumentCapture
|
|
2007
2007
|
),
|
package/dist/flow/styles.css
CHANGED
|
@@ -5395,6 +5395,10 @@
|
|
|
5395
5395
|
display: inline-block;
|
|
5396
5396
|
}
|
|
5397
5397
|
|
|
5398
|
+
.IncodeEkycSpinner {
|
|
5399
|
+
flex: 1;
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5398
5402
|
.IncodeEkycPage {
|
|
5399
5403
|
max-width: 480px;
|
|
5400
5404
|
margin-inline: auto;
|
|
@@ -5729,6 +5733,10 @@
|
|
|
5729
5733
|
background-color: #0000;
|
|
5730
5734
|
}
|
|
5731
5735
|
|
|
5736
|
+
.IncodeEkybSpinner {
|
|
5737
|
+
flex: 1;
|
|
5738
|
+
}
|
|
5739
|
+
|
|
5732
5740
|
.IncodeEkybPage {
|
|
5733
5741
|
max-width: 480px;
|
|
5734
5742
|
margin-inline: auto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260318-7381409",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"preact-custom-element": "^4.6.0",
|
|
120
120
|
"qrcode": "^1.5.4",
|
|
121
121
|
"tailwindcss": "^4.1.17",
|
|
122
|
-
"@incodetech/core": "0.0.0-dev-
|
|
122
|
+
"@incodetech/core": "0.0.0-dev-20260318-7381409"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@microsoft/api-extractor": "^7.53.3",
|