@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.
@@ -8,6 +8,10 @@
8
8
  }
9
9
  }
10
10
 
11
+ .IncodeEkybSpinner {
12
+ flex: 1;
13
+ }
14
+
11
15
  .IncodeEkybPage {
12
16
  max-width: 480px;
13
17
  margin-inline: auto;
@@ -1,18 +1,19 @@
1
- import { b as v, u as o, I as X, a as J, B as Q } from "./button-Ca1tRSTI.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 P, d as te, q as S, k as oe } from "./vendor-preact-BXf0bkEs.js";
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 re, A as se } from "./addressAutocomplete-DetZGxBZ.js";
7
- import { P as ne } from "./page-BVHG3h0V.js";
8
- import { t as K, F as ae, V as A } from "./formField-FeX9N4c8.js";
9
- import { r as ue } from "./incodeModule-aE-LkKwM.js";
10
- import { D as G } from "./dropdownComposed-B5ZuQS8C.js";
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 ce(t) {
13
+ function ue(t) {
13
14
  return [...t.toUpperCase()].map((r) => String.fromCodePoint(127462 + r.charCodeAt(0) - 65)).join("");
14
15
  }
15
- const le = {
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 ie(t) {
31
- const r = le[t] ?? t;
32
- return { value: t, label: `${ce(t)} ${r}` };
31
+ function me(t) {
32
+ const r = ie[t] ?? t;
33
+ return { value: t, label: `${ue(t)} ${r}` };
33
34
  }
34
- function me() {
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 de = ({
40
+ const be = ({
40
41
  value: t,
41
42
  onChange: r
42
43
  }) => {
43
- const { t: u } = v(), s = q(() => (me() ? [...M, ...Z] : [...M]).map(ie).sort((c, d) => c.label.localeCompare(d.label)), []);
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
- G,
46
+ Y,
46
47
  {
47
48
  id: "ekyb-country",
48
- label: u("ekyb.country"),
49
+ label: c("ekyb.country"),
49
50
  value: t,
50
- options: s,
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: u,
59
- errorParams: s,
59
+ error: c,
60
+ errorParams: n,
60
61
  country: i,
61
- onChange: c,
62
+ onChange: l,
62
63
  onBlur: d
63
64
  }) => {
64
- const { t: b } = v(), l = !t.required, h = b(t.label);
65
+ const { t: b } = v(), u = !t.required, h = b(t.label);
65
66
  if (t.type === "dropdown") {
66
- const m = l ? `${h} (${b("common.optional")})` : h, n = t.name === "state" ? b("ekyb.selectState") : void 0;
67
+ const m = u ? `${h} (${b("common.optional")})` : h, s = t.name === "state" ? b("ekyb.selectState") : void 0;
67
68
  return /* @__PURE__ */ o(
68
- G,
69
+ Y,
69
70
  {
70
71
  id: `ekyb-${t.name}`,
71
72
  label: m,
72
- placeholder: n,
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: K(b, u, s),
79
+ error: G(b, c, n),
79
80
  searchable: !0,
80
- onChange: (p) => c(t.name, 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
- ae,
88
+ ce,
88
89
  {
89
90
  name: t.name,
90
91
  label: t.label,
91
92
  value: r,
92
- error: u,
93
- errorParams: s,
93
+ error: c,
94
+ errorParams: n,
94
95
  required: t.required,
95
- optional: l,
96
- onChange: c,
96
+ optional: u,
97
+ onChange: l,
97
98
  onBlur: d
98
99
  }
99
100
  );
100
- }, be = ({
101
+ }, pe = ({
101
102
  ubos: t,
102
103
  errors: r,
103
- errorParams: u,
104
- canAddUbo: s,
104
+ errorParams: c,
105
+ canAddUbo: n,
105
106
  onSetField: i,
106
- onBlur: c,
107
+ onBlur: l,
107
108
  onAdd: d,
108
109
  onRemove: b
109
110
  }) => {
110
- const { t: l } = v(), h = (m) => K(l, r[m], u[m]);
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, n) => {
113
- const p = n === 0 ? l("ekyb.uboName") : l("ekyb.uboNameWithNumber", { number: n + 1 }), f = n === 0 ? l("ekyb.uboSurname") : l("ekyb.uboSurnameWithNumber", { number: n + 1 }), N = n === 0;
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-${n}-name`,
119
+ id: `ubo-${s}-name`,
119
120
  label: p,
120
- name: `ubo-${n}-name`,
121
+ name: `ubo-${s}-name`,
121
122
  value: m.name,
122
- error: h(`ubo-${n}-name`),
123
- onInput: (I) => i(n, "name", I.target.value),
124
- onBlur: c ? () => c(`ubo-${n}-name`) : void 0,
125
- "data-testid": `ekyb-ubo-${n}-name`
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-${n}-surname`,
132
+ id: `ubo-${s}-surname`,
132
133
  label: f,
133
- name: `ubo-${n}-surname`,
134
+ name: `ubo-${s}-surname`,
134
135
  value: m.surname,
135
- error: h(`ubo-${n}-surname`),
136
+ error: h(`ubo-${s}-surname`),
136
137
  onInput: (I) => i(
137
- n,
138
+ s,
138
139
  "surname",
139
140
  I.target.value
140
141
  ),
141
- onBlur: c ? () => c(`ubo-${n}-surname`) : void 0,
142
- "data-testid": `ekyb-ubo-${n}-surname`
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(n),
150
+ onClick: () => b(s),
150
151
  type: "button",
151
- children: l("common.remove")
152
+ children: u("common.remove")
152
153
  }
153
154
  )
154
155
  ] }, m.id);
155
156
  }),
156
- s && /* @__PURE__ */ o(
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: l("ekyb.addAnotherUbo")
164
+ children: u("ekyb.addAnotherUbo")
164
165
  }
165
166
  )
166
167
  ] });
167
- }, pe = ({ config: t, onFinish: r }) => {
168
- const { t: u } = v(), [s, i] = J(() => ee({ config: t }));
168
+ }, ye = ({ config: t, onFinish: r }) => {
169
+ const { t: c } = v(), [n, i] = Q(() => te({ config: t }));
169
170
  return V(() => {
170
- (s.status === "finished" || s.status === "closed") && r?.();
171
- }, [s.status, r]), s.status === "finished" || s.status === "closed" ? null : s.status === "loading" ? /* @__PURE__ */ o(
172
- A,
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: u("common.loading")
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
- ) : s.status === "submitting" ? /* @__PURE__ */ o(A, { status: "submitting" }) : s.status === "success" ? /* @__PURE__ */ o(A, { status: "success" }) : s.status === "error" ? /* @__PURE__ */ o(A, { status: "failure", onRetry: () => i.retry() }) : s.status === "form" ? /* @__PURE__ */ o(he, { state: s, manager: i }) : null;
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
- ]), ye = ["street", "city", "state", "postalCode", "houseNo"], he = ({ state: t, manager: r }) => {
193
+ ]), he = ["street", "city", "state", "postalCode", "houseNo"], ke = ({ state: t, manager: r }) => {
186
194
  const {
187
- country: u,
188
- fields: s,
195
+ country: c,
196
+ fields: n,
189
197
  values: i,
190
- errors: c,
198
+ errors: l,
191
199
  isValid: d,
192
200
  ubos: b,
193
- canAddUbo: l,
201
+ canAddUbo: u,
194
202
  addressSuggestions: h,
195
203
  submitAttempted: m
196
- } = t, { t: n } = v(), p = P(null), f = P(null), N = P(void 0), I = re(p, s.length), [w, T] = te({}), y = S((e) => {
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
- () => x(
200
- c,
207
+ () => ee(
208
+ l,
201
209
  w,
202
210
  m,
203
- u,
204
- s
211
+ c,
212
+ n
205
213
  ),
206
- [c, w, m, u, s]
214
+ [l, w, m, c, n]
207
215
  ), $ = S(
208
216
  (e) => y(e),
209
217
  [y]
210
- ), U = S(
218
+ ), A = S(
211
219
  (e, a) => {
212
220
  y(e), r.setField(e, a);
213
221
  },
214
222
  [r, y]
215
- ), Y = S(
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
- ), j = S(
228
+ ), W = S(
221
229
  (e) => {
222
- for (const a of ye) y(a);
230
+ for (const a of he) y(a);
223
231
  r.selectAddress(e);
224
232
  },
225
233
  [r, y]
226
- ), W = S(
234
+ ), z = S(
227
235
  (e) => {
228
236
  r.removeUbo(e), T((a) => {
229
237
  const k = {};
230
- for (const [C, R] of Object.entries(a)) {
231
- const D = C.match(/^ubo-(\d+)-(name|surname)$/);
232
- if (!D) {
233
- k[C] = R;
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(D[1]);
244
+ const g = Number(R[1]);
237
245
  if (g === e) continue;
238
- const H = g > e ? g - 1 : g;
239
- k[`ubo-${H}-${D[2]}`] = R;
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 z = s.filter((e) => !O.has(e.name)), L = s.filter((e) => O.has(e.name));
261
- return /* @__PURE__ */ o(ne, { className: `IncodeEkybPage${I ? " IncodeEkybPageScrollable" : ""}`, title: n("ekyb.title"), children: [
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
- de,
272
+ be,
265
273
  {
266
- value: u,
274
+ value: c,
267
275
  onChange: (e) => r.setCountry(e)
268
276
  }
269
277
  ),
270
- z.map((e) => /* @__PURE__ */ o(
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: u,
278
- onChange: U,
285
+ country: c,
286
+ onChange: A,
279
287
  onBlur: $
280
288
  },
281
289
  e.name
282
290
  )),
283
291
  /* @__PURE__ */ o(
284
- be,
292
+ pe,
285
293
  {
286
294
  ubos: b,
287
295
  errors: E,
288
296
  errorParams: F,
289
- canAddUbo: l,
290
- onSetField: Y,
297
+ canAddUbo: u,
298
+ onSetField: j,
291
299
  onBlur: $,
292
300
  onAdd: () => r.addUbo(),
293
- onRemove: W
301
+ onRemove: z
294
302
  }
295
303
  ),
296
- L.length > 0 && /* @__PURE__ */ o(oe, { children: [
297
- /* @__PURE__ */ o("h3", { className: "IncodeEkybSectionHeader", children: n("ekyb.addressDetails") }),
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) => U("street", a),
315
+ onChange: (a) => A("street", a),
308
316
  onSearch: (a) => r.searchAddress(a),
309
- onSelect: j,
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: u,
325
- onChange: U,
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
- Q,
343
+ Z,
336
344
  {
337
345
  onClick: () => r.submit(),
338
346
  disabled: !d,
339
347
  "data-testid": "ekyb-submit",
340
- children: n("ekyb.continue")
348
+ children: s("ekyb.continue")
341
349
  }
342
350
  ) })
343
351
  ] });
344
- }, ke = ({ config: t, onFinish: r }) => /* @__PURE__ */ o(X, { children: t ? /* @__PURE__ */ o(pe, { config: t, onFinish: r }) : null });
345
- ue(ke, "incode-ekyb");
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
- ke as EkybModule
355
+ Ee as EkybModule
348
356
  };
@@ -9,6 +9,10 @@
9
9
  }
10
10
  }
11
11
 
12
+ .IncodeEkycSpinner {
13
+ flex: 1;
14
+ }
15
+
12
16
  .IncodeEkycPage {
13
17
  max-width: 480px;
14
18
  margin-inline: auto;
@@ -1,88 +1,96 @@
1
- import { u as r, I as O, b as q, a as Y, B as L } from "./button-Ca1tRSTI.js";
2
- import { computeEkycDisplayErrors as G, createEkycManager as j } from "@incodetech/core/ekyc";
3
- import { y as $, A as F, d as z, q as v, T as J } from "./vendor-preact-BXf0bkEs.js";
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 Q, A as U } from "./addressAutocomplete-DetZGxBZ.js";
7
- import { V as k, t as W, F as X } from "./formField-FeX9N4c8.js";
8
- import { D as Z } from "./dateInputComposed-CvFmQpJ0.js";
9
- import { D as f } from "./dropdownComposed-B5ZuQS8C.js";
10
- import { P as ee } from "./page-BVHG3h0V.js";
11
- import { r as re } from "./incodeModule-aE-LkKwM.js";
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 oe = ({ config: p, onFinish: n }) => {
14
- const { t: l } = q(), [a, m] = Y(() => j({ config: p }));
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") && n?.();
17
- }, [a.status, n]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ r(
18
- k,
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(k, { status: "submitting" }) : a.status === "success" ? /* @__PURE__ */ r(k, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ r(
24
- k,
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: () => m.retry(),
28
- onSkip: () => m.skip()
35
+ onRetry: () => d.retry(),
36
+ onSkip: () => d.skip()
29
37
  }
30
38
  ) : a.status === "misconfigured" ? /* @__PURE__ */ r(
31
- k,
39
+ v,
32
40
  {
33
41
  status: "failure",
34
42
  failureTitle: l("verification.noFormFields"),
35
- onSkip: () => m.close(),
43
+ onSkip: () => d.close(),
36
44
  skipLabel: l("common.close")
37
45
  }
38
- ) : a.status === "form" ? /* @__PURE__ */ r(se, { state: a, manager: m }) : null;
39
- }, ae = [
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: n }) => {
53
+ ], se = ({ state: p, manager: s }) => {
46
54
  const {
47
55
  fields: l,
48
56
  values: a,
49
- errors: m,
50
- isValid: T,
51
- addressSuggestions: V,
52
- prefilled: w,
53
- hideEmail: K,
57
+ errors: d,
58
+ isValid: V,
59
+ addressSuggestions: w,
60
+ prefilled: K,
61
+ hideEmail: M,
54
62
  fieldsCountry: C,
55
- submitError: g,
63
+ submitError: S,
56
64
  submitAttempted: P
57
- } = p, { t: s } = q(), N = F(null), A = F(null), R = F(void 0), M = Q(N, l.length), [D, x] = z({}), h = v((e) => {
58
- x((t) => t[e] ? t : { ...t, [e]: !0 });
59
- }, []), { displayErrors: S, errorParams: I } = J(
60
- () => G(
61
- m,
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
- [m, D, P, C, l]
68
- ), y = v(
75
+ [d, D, P, C, l]
76
+ ), y = E(
69
77
  (e) => h(e),
70
78
  [h]
71
- ), b = v(
72
- (e, t) => {
73
- h(e), n.setField(e, t);
79
+ ), b = E(
80
+ (e, o) => {
81
+ h(e), s.setField(e, o);
74
82
  },
75
- [n, h]
76
- ), _ = v(
83
+ [s, h]
84
+ ), H = E(
77
85
  (e) => {
78
- for (const t of ae) h(t);
79
- n.selectAddress(e);
86
+ for (const o of ne) h(o);
87
+ s.selectAddress(e);
80
88
  },
81
- [n, h]
89
+ [s, h]
82
90
  );
83
91
  $(() => {
84
- const e = S.postalCode, t = R.current;
85
- if (R.current = e, !e || t === 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
- }, [S.postalCode]);
97
- const E = (e, t) => W(s, t, I[e]);
104
+ }, [g.postalCode]);
105
+ const k = (e, o) => X(n, o, I[e]);
98
106
  let B;
99
- return /* @__PURE__ */ r(ee, { className: `IncodeEkycPage${M ? " IncodeEkycPageScrollable" : ""}`, title: s("verification.title"), children: [
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" && K) return null;
102
- let t = null;
103
- e.section && e.section !== B && (B = e.section, t = /* @__PURE__ */ r("h3", { className: "IncodeEkycSectionHeader", children: s({
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 || w[e.name], c = a[e.name] ?? "", u = S[e.name];
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
- t,
118
+ o,
111
119
  /* @__PURE__ */ r(
112
- U,
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: V,
126
+ suggestions: w,
119
127
  readonly: i,
120
128
  optional: !e.required,
121
- onChange: (o) => b("street", o),
122
- onSearch: (o) => n.searchAddress(o),
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 o = s(e.label);
137
+ const t = n(e.label);
130
138
  return /* @__PURE__ */ r("div", { children: [
131
- t,
139
+ o,
132
140
  /* @__PURE__ */ r(
133
- f,
141
+ ee,
134
142
  {
135
143
  id: `ekyc-${e.name}`,
136
- label: o,
137
- placeholder: e.placeholder ? s(e.placeholder) : void 0,
144
+ label: t,
145
+ placeholder: e.placeholder ? n(e.placeholder) : void 0,
138
146
  value: c,
139
- options: (e.options ?? []).map((d) => ({
140
- ...d,
141
- label: s(d.label)
147
+ options: (e.options ?? []).map((m) => ({
148
+ ...m,
149
+ label: n(m.label)
142
150
  })),
143
- error: E(e.name, u),
151
+ error: k(e.name, u),
144
152
  disabled: i,
145
153
  searchable: !0,
146
- onChange: (d) => b(e.name, d),
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 o = s(e.label);
162
+ const t = n(e.label);
155
163
  return /* @__PURE__ */ r("div", { children: [
156
- t,
164
+ o,
157
165
  /* @__PURE__ */ r(
158
- Z,
166
+ f,
159
167
  {
160
168
  id: `ekyc-${e.name}`,
161
- label: o,
169
+ label: t,
162
170
  value: c,
163
- error: E(e.name, u),
171
+ error: k(e.name, u),
164
172
  disabled: i,
165
- onInput: (d) => {
166
- const H = d.target;
167
- b(e.name, H.value);
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 o = s(e.label);
184
+ const t = n(e.label);
177
185
  return /* @__PURE__ */ r("div", { children: [
178
- t,
186
+ o,
179
187
  /* @__PURE__ */ r(
180
188
  te,
181
189
  {
182
190
  id: `ekyc-${e.name}`,
183
- label: o,
191
+ label: t,
184
192
  countryCode: C,
185
193
  value: c,
186
194
  placeholder: e.placeholder,
187
- error: E(e.name, u),
195
+ error: k(e.name, u),
188
196
  disabled: i,
189
197
  disableCountrySelector: e.disableCountrySelector,
190
198
  required: e.required,
191
- onChange: (d) => b(e.name, d),
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
- t,
207
+ o,
200
208
  /* @__PURE__ */ r("div", { className: "IncodeEkycRadioGroup", children: [
201
- /* @__PURE__ */ r("label", { className: "IncodeEkycRadioLabel", children: s(e.label) }),
202
- /* @__PURE__ */ r("div", { className: "IncodeEkycRadioOptions", children: e.options?.map((o) => /* @__PURE__ */ r(
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 === o.value,
213
- value: o.value,
214
- onChange: () => b(e.name, o.value),
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: s(o.label) })
227
+ /* @__PURE__ */ r("span", { children: n(t.label) })
220
228
  ]
221
229
  },
222
- o.value
230
+ t.value
223
231
  )) }),
224
- u && /* @__PURE__ */ r("span", { className: "IncodeEkycFieldError", children: E(e.name, u) })
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
- t,
239
+ o,
232
240
  /* @__PURE__ */ r(
233
- X,
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
- g && /* @__PURE__ */ r("p", { className: "IncodeEkycSubmitError", children: s(g) }),
265
+ S && /* @__PURE__ */ r("p", { className: "IncodeEkycSubmitError", children: n(S) }),
258
266
  /* @__PURE__ */ r(
259
267
  L,
260
268
  {
261
- onClick: () => n.submit(),
262
- disabled: !T,
269
+ onClick: () => s.submit(),
270
+ disabled: !V,
263
271
  "data-testid": "ekyc-submit",
264
- children: s("common.continue")
272
+ children: n("common.continue")
265
273
  }
266
274
  ),
267
- g === "verification.errors.countryNotSupported" && /* @__PURE__ */ r(
275
+ S === "verification.errors.countryNotSupported" && /* @__PURE__ */ r(
268
276
  L,
269
277
  {
270
278
  variant: "link",
271
- onClick: () => n.skip(),
279
+ onClick: () => s.skip(),
272
280
  "data-testid": "ekyc-skip",
273
- children: s("verification.labels.skip")
281
+ children: n("verification.labels.skip")
274
282
  }
275
283
  )
276
284
  ] })
277
285
  ] });
278
- }, ne = ({ config: p, onFinish: n }) => /* @__PURE__ */ r(O, { children: p ? /* @__PURE__ */ r(oe, { config: p, onFinish: n }) : null });
279
- re(ne, "incode-ekyc");
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
- ne as EkycModule
289
+ ce as EkycModule
282
290
  };
@@ -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-CFcYtlo_.js").then((e) => e.EkycModule),
2004
- EKYB: () => import("../ekybModule-FeVB4y3_.js").then((e) => e.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
  ),
@@ -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-20260317-737b25e",
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-20260317-737b25e"
122
+ "@incodetech/core": "0.0.0-dev-20260318-7381409"
123
123
  },
124
124
  "devDependencies": {
125
125
  "@microsoft/api-extractor": "^7.53.3",