@incodetech/web 0.0.0-dev-20260212-7db2d06 → 0.0.0-dev-20260217-d00c4c5
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/curp-validation/curp-validation.es.js +63 -83
- package/dist/errorIcon-X7wnjHa6.js +26 -0
- package/dist/flow/flow.es.js +118 -101
- package/dist/flow/styles.css +100 -0
- package/dist/governmentValidation/governmentValidation.es.js +125 -0
- package/dist/governmentValidation/styles.css +64 -0
- package/dist/types/governmentValidation.d.ts +25 -0
- package/package.json +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { u as e, c as
|
|
1
|
+
import { u as e, c as $, S as L, B as E, r as j, a as Y } from "../incodeModule-SZbHLd1r.js";
|
|
2
2
|
import { mexicanStates as q, createCurpValidationManager as K } from "@incodetech/core/curp-validation";
|
|
3
|
-
import { g as X, D as
|
|
3
|
+
import { g as X, D as G, A as U, d as z, y as W, k as F } from "../vendor-preact-CjD4WiuC.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
5
|
import "../instance-B-q0ZREN.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as B, S as J } from "../spinner-BcMtCrDz.js";
|
|
7
7
|
import { I as Q, P as R } from "../incodeComponent-DWkUggQZ.js";
|
|
8
|
-
import {
|
|
8
|
+
import { E as x } from "../errorIcon-X7wnjHa6.js";
|
|
9
|
+
import { S as T } from "../successIcon-_WpNP6Fl.js";
|
|
9
10
|
import { C as _ } from "../chevronDown-CN1d_3gk.js";
|
|
10
11
|
const ee = ({ class: n }) => {
|
|
11
12
|
const o = X();
|
|
@@ -85,28 +86,7 @@ const ee = ({ class: n }) => {
|
|
|
85
86
|
}
|
|
86
87
|
)
|
|
87
88
|
}
|
|
88
|
-
),
|
|
89
|
-
"svg",
|
|
90
|
-
{
|
|
91
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
92
|
-
width: n,
|
|
93
|
-
height: n,
|
|
94
|
-
viewBox: "0 0 32 32",
|
|
95
|
-
fill: "none",
|
|
96
|
-
class: "IncodeErrorIcon",
|
|
97
|
-
"aria-hidden": "true",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ e("title", { children: "Error" }),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
"path",
|
|
102
|
-
{
|
|
103
|
-
d: "M16 0C24.8219 0 32 7.17642 32 16C32 24.8219 24.8219 32 16 32C7.17811 32 0 24.8219 0 16C0 7.17642 7.17811 0 16 0ZM13.1553 11.3701C12.6618 10.8767 11.8636 10.8767 11.3701 11.3701C10.8767 11.8636 10.8767 12.6618 11.3701 13.1553L14.4053 16.1924L11.3721 19.2256C10.8803 19.7191 10.8803 20.5173 11.3721 21.0107C11.8656 21.504 12.6658 21.5041 13.1592 21.0107L16.1924 17.9775L19.2334 21.0205C19.481 21.2664 19.8029 21.3916 20.1279 21.3916C20.4513 21.3916 20.7746 21.2664 21.0205 21.0205C21.514 20.527 21.514 19.7269 21.0205 19.2334L17.9775 16.1924L21.0107 13.1572C21.5041 12.6638 21.504 11.8639 21.0107 11.3721C20.5173 10.8786 19.7191 10.8786 19.2256 11.3721L16.1904 14.4053L13.1553 11.3701Z",
|
|
104
|
-
fill: "var(--icon-status-negative)"
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
), ne = B((n, o) => {
|
|
89
|
+
), ne = G((n, o) => {
|
|
110
90
|
const { class: s, type: a = "text", ...t } = n;
|
|
111
91
|
return /* @__PURE__ */ e(
|
|
112
92
|
"input",
|
|
@@ -114,10 +94,10 @@ const ee = ({ class: n }) => {
|
|
|
114
94
|
...t,
|
|
115
95
|
ref: o,
|
|
116
96
|
type: a,
|
|
117
|
-
class:
|
|
97
|
+
class: $("IncodeInput", s)
|
|
118
98
|
}
|
|
119
99
|
);
|
|
120
|
-
}),
|
|
100
|
+
}), N = G(
|
|
121
101
|
({
|
|
122
102
|
id: n,
|
|
123
103
|
label: o,
|
|
@@ -132,10 +112,10 @@ const ee = ({ class: n }) => {
|
|
|
132
112
|
suppressMessages: m = !1,
|
|
133
113
|
class: f,
|
|
134
114
|
value: c,
|
|
135
|
-
...
|
|
136
|
-
},
|
|
115
|
+
...b
|
|
116
|
+
}, y) => {
|
|
137
117
|
const i = `${n}-helper`, h = `${n}-error`, I = m ? "" : [r ? i : null, t ? h : null].filter(Boolean).join(" ");
|
|
138
|
-
return /* @__PURE__ */ e("div", { class:
|
|
118
|
+
return /* @__PURE__ */ e("div", { class: $("IncodeInputComposed", f), children: [
|
|
139
119
|
o && /* @__PURE__ */ e(
|
|
140
120
|
"label",
|
|
141
121
|
{
|
|
@@ -151,8 +131,8 @@ const ee = ({ class: n }) => {
|
|
|
151
131
|
{
|
|
152
132
|
id: n,
|
|
153
133
|
type: a,
|
|
154
|
-
...
|
|
155
|
-
ref:
|
|
134
|
+
...b,
|
|
135
|
+
ref: y,
|
|
156
136
|
required: u,
|
|
157
137
|
"data-has-value": !!(c && String(c).length > 0),
|
|
158
138
|
...!o && s ? { "aria-label": s } : {},
|
|
@@ -180,7 +160,7 @@ const ee = ({ class: n }) => {
|
|
|
180
160
|
class: "IncodeInputComposedErrorWrapper",
|
|
181
161
|
"data-testid": `${n}-error-wrapper`,
|
|
182
162
|
children: [
|
|
183
|
-
d && /* @__PURE__ */ e("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
163
|
+
d && /* @__PURE__ */ e("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ e(x, { size: 17 }) }),
|
|
184
164
|
/* @__PURE__ */ e("p", { id: h, class: "IncodeInputComposedError", children: t })
|
|
185
165
|
]
|
|
186
166
|
}
|
|
@@ -191,7 +171,7 @@ const ee = ({ class: n }) => {
|
|
|
191
171
|
class: "IncodeInputComposedHelperWrapper",
|
|
192
172
|
"data-testid": `${n}-helper-wrapper`,
|
|
193
173
|
children: [
|
|
194
|
-
C && /* @__PURE__ */ e("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
174
|
+
C && /* @__PURE__ */ e("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ e(T, { size: 17 }) }),
|
|
195
175
|
/* @__PURE__ */ e("p", { id: i, class: "IncodeInputComposedHelper", children: r })
|
|
196
176
|
]
|
|
197
177
|
}
|
|
@@ -209,10 +189,10 @@ const ee = ({ class: n }) => {
|
|
|
209
189
|
continueLabel: C,
|
|
210
190
|
dontHaveLabel: l
|
|
211
191
|
}) => {
|
|
212
|
-
const { t: u } =
|
|
192
|
+
const { t: u } = B(), m = r ?? u("curp.placeholder.curp") ?? "CURP", f = C ?? u("curp.continue") ?? "Continue", c = l ?? u("curp.dontHave") ?? "I don't have my CURP", b = u("curp.placeholder.curp") ?? "CURP";
|
|
213
193
|
return /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpInput", children: [
|
|
214
194
|
/* @__PURE__ */ e(
|
|
215
|
-
|
|
195
|
+
N,
|
|
216
196
|
{
|
|
217
197
|
id: "curp-input",
|
|
218
198
|
label: "",
|
|
@@ -224,7 +204,7 @@ const ee = ({ class: n }) => {
|
|
|
224
204
|
placeholder: m,
|
|
225
205
|
disabled: d,
|
|
226
206
|
maxLength: 18,
|
|
227
|
-
"aria-label":
|
|
207
|
+
"aria-label": b
|
|
228
208
|
}
|
|
229
209
|
),
|
|
230
210
|
/* @__PURE__ */ e(L, {}),
|
|
@@ -250,7 +230,7 @@ const ee = ({ class: n }) => {
|
|
|
250
230
|
}
|
|
251
231
|
)
|
|
252
232
|
] });
|
|
253
|
-
},
|
|
233
|
+
}, M = G(
|
|
254
234
|
({
|
|
255
235
|
id: n,
|
|
256
236
|
label: o,
|
|
@@ -265,16 +245,16 @@ const ee = ({ class: n }) => {
|
|
|
265
245
|
showHelperIcon: m,
|
|
266
246
|
suppressMessages: f = !1,
|
|
267
247
|
disabled: c,
|
|
268
|
-
required:
|
|
269
|
-
class:
|
|
248
|
+
required: b,
|
|
249
|
+
class: y,
|
|
270
250
|
"data-testid": i,
|
|
271
251
|
...h
|
|
272
252
|
}, I) => {
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
}, S = (
|
|
276
|
-
|
|
277
|
-
const D =
|
|
253
|
+
const g = U(null), V = `${n}-helper`, P = `${n}-error`, k = f ? "" : [u ? V : null, C ? P : null].filter(Boolean).join(" "), H = (w) => {
|
|
254
|
+
g.current = w, typeof I == "function" ? I(w) : I && (I.current = w);
|
|
255
|
+
}, S = (w) => {
|
|
256
|
+
w.preventDefault();
|
|
257
|
+
const D = g.current;
|
|
278
258
|
if (!(!D || c))
|
|
279
259
|
if (D.focus(), "showPicker" in HTMLInputElement.prototype)
|
|
280
260
|
try {
|
|
@@ -285,7 +265,7 @@ const ee = ({ class: n }) => {
|
|
|
285
265
|
else
|
|
286
266
|
D.click();
|
|
287
267
|
};
|
|
288
|
-
return /* @__PURE__ */ e("div", { class:
|
|
268
|
+
return /* @__PURE__ */ e("div", { class: $("IncodeDateInputComposed", y), children: [
|
|
289
269
|
o && /* @__PURE__ */ e(
|
|
290
270
|
"label",
|
|
291
271
|
{
|
|
@@ -294,7 +274,7 @@ const ee = ({ class: n }) => {
|
|
|
294
274
|
"data-testid": `${n}-label`,
|
|
295
275
|
children: [
|
|
296
276
|
o,
|
|
297
|
-
|
|
277
|
+
b && /* @__PURE__ */ e("span", { class: "IncodeDateInputComposedRequired", children: " *" })
|
|
298
278
|
]
|
|
299
279
|
}
|
|
300
280
|
),
|
|
@@ -312,11 +292,11 @@ const ee = ({ class: n }) => {
|
|
|
312
292
|
max: d,
|
|
313
293
|
placeholder: r,
|
|
314
294
|
disabled: c,
|
|
315
|
-
required:
|
|
295
|
+
required: b,
|
|
316
296
|
"data-has-value": !!s,
|
|
317
297
|
"data-testid": i,
|
|
318
298
|
"aria-describedby": k || void 0,
|
|
319
|
-
"aria-required":
|
|
299
|
+
"aria-required": b ? "true" : void 0,
|
|
320
300
|
"aria-invalid": C ? "true" : void 0,
|
|
321
301
|
...h
|
|
322
302
|
}
|
|
@@ -341,7 +321,7 @@ const ee = ({ class: n }) => {
|
|
|
341
321
|
class: "IncodeDateInputComposedErrorWrapper",
|
|
342
322
|
"data-testid": `${n}-error-wrapper`,
|
|
343
323
|
children: [
|
|
344
|
-
l && /* @__PURE__ */ e("div", { class: "IncodeDateInputComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
324
|
+
l && /* @__PURE__ */ e("div", { class: "IncodeDateInputComposedIconWrapper", children: /* @__PURE__ */ e(x, { size: 17 }) }),
|
|
345
325
|
/* @__PURE__ */ e("p", { id: P, class: "IncodeDateInputComposedError", children: C })
|
|
346
326
|
]
|
|
347
327
|
}
|
|
@@ -352,7 +332,7 @@ const ee = ({ class: n }) => {
|
|
|
352
332
|
class: "IncodeDateInputComposedHelperWrapper",
|
|
353
333
|
"data-testid": `${n}-helper-wrapper`,
|
|
354
334
|
children: [
|
|
355
|
-
m && /* @__PURE__ */ e("div", { class: "IncodeDateInputComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
335
|
+
m && /* @__PURE__ */ e("div", { class: "IncodeDateInputComposedIconWrapper", children: /* @__PURE__ */ e(T, { size: 17 }) }),
|
|
356
336
|
/* @__PURE__ */ e("p", { id: V, class: "IncodeDateInputComposedHelper", children: u })
|
|
357
337
|
]
|
|
358
338
|
}
|
|
@@ -360,8 +340,8 @@ const ee = ({ class: n }) => {
|
|
|
360
340
|
] });
|
|
361
341
|
}
|
|
362
342
|
);
|
|
363
|
-
|
|
364
|
-
const
|
|
343
|
+
M.displayName = "DateInputComposed";
|
|
344
|
+
const O = ({
|
|
365
345
|
id: n,
|
|
366
346
|
label: o,
|
|
367
347
|
placeholder: s = "Choose an option",
|
|
@@ -375,17 +355,17 @@ const M = ({
|
|
|
375
355
|
suppressMessages: m = !1,
|
|
376
356
|
disabled: f = !1,
|
|
377
357
|
required: c,
|
|
378
|
-
class:
|
|
379
|
-
"data-testid":
|
|
358
|
+
class: b,
|
|
359
|
+
"data-testid": y
|
|
380
360
|
}) => {
|
|
381
|
-
const [i, h] =
|
|
361
|
+
const [i, h] = z(!1), [I, g] = z(-1), V = U(null), P = U(null), k = t.find((p) => p.value === a), H = `${n}-helper`, S = `${n}-error`, w = m ? "" : [C ? H : null, r ? S : null].filter(Boolean).join(" ");
|
|
382
362
|
W(() => {
|
|
383
363
|
const p = (v) => {
|
|
384
364
|
V.current && !V.current.contains(v.target) && h(!1);
|
|
385
365
|
};
|
|
386
366
|
return i && document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
387
367
|
}, [i]), W(() => {
|
|
388
|
-
i ||
|
|
368
|
+
i || g(-1);
|
|
389
369
|
}, [i]), W(() => {
|
|
390
370
|
i && I >= 0 && P.current && P.current.children[I]?.scrollIntoView({ block: "nearest" });
|
|
391
371
|
}, [I, i]);
|
|
@@ -393,16 +373,16 @@ const M = ({
|
|
|
393
373
|
if (!f)
|
|
394
374
|
switch (p.key) {
|
|
395
375
|
case "ArrowDown":
|
|
396
|
-
p.preventDefault(), i ?
|
|
376
|
+
p.preventDefault(), i ? g(
|
|
397
377
|
(v) => v < t.length - 1 ? v + 1 : v
|
|
398
|
-
) : (h(!0),
|
|
378
|
+
) : (h(!0), g(0));
|
|
399
379
|
break;
|
|
400
380
|
case "ArrowUp":
|
|
401
|
-
p.preventDefault(), i ?
|
|
381
|
+
p.preventDefault(), i ? g((v) => v > 0 ? v - 1 : v) : (h(!0), g(t.length - 1));
|
|
402
382
|
break;
|
|
403
383
|
case "Enter":
|
|
404
384
|
case " ":
|
|
405
|
-
p.preventDefault(), i && I >= 0 && t[I] ? (d(t[I].value), h(!1)) : i || (h(!0),
|
|
385
|
+
p.preventDefault(), i && I >= 0 && t[I] ? (d(t[I].value), h(!1)) : i || (h(!0), g(0));
|
|
406
386
|
break;
|
|
407
387
|
case "Escape":
|
|
408
388
|
p.preventDefault(), h(!1);
|
|
@@ -414,7 +394,7 @@ const M = ({
|
|
|
414
394
|
}, Z = (p) => {
|
|
415
395
|
d(p), h(!1);
|
|
416
396
|
};
|
|
417
|
-
return /* @__PURE__ */ e("div", { class:
|
|
397
|
+
return /* @__PURE__ */ e("div", { class: $("IncodeDropdownComposed", b), ref: V, children: [
|
|
418
398
|
o && /* @__PURE__ */ e(
|
|
419
399
|
"label",
|
|
420
400
|
{
|
|
@@ -440,10 +420,10 @@ const M = ({
|
|
|
440
420
|
"aria-haspopup": "listbox",
|
|
441
421
|
"aria-expanded": i ? "true" : "false",
|
|
442
422
|
"aria-label": o ?? s,
|
|
443
|
-
"aria-describedby":
|
|
423
|
+
"aria-describedby": w || void 0,
|
|
444
424
|
"aria-required": c ? "true" : void 0,
|
|
445
425
|
"aria-invalid": r ? "true" : void 0,
|
|
446
|
-
"data-testid":
|
|
426
|
+
"data-testid": y,
|
|
447
427
|
children: [
|
|
448
428
|
/* @__PURE__ */ e(
|
|
449
429
|
"span",
|
|
@@ -480,7 +460,7 @@ const M = ({
|
|
|
480
460
|
"data-highlighted": I === v,
|
|
481
461
|
onClick: () => Z(p.value),
|
|
482
462
|
onMouseDown: (A) => A.preventDefault(),
|
|
483
|
-
onMouseEnter: () =>
|
|
463
|
+
onMouseEnter: () => g(v),
|
|
484
464
|
children: p.label
|
|
485
465
|
},
|
|
486
466
|
p.value
|
|
@@ -494,7 +474,7 @@ const M = ({
|
|
|
494
474
|
class: "IncodeDropdownComposedErrorWrapper",
|
|
495
475
|
"data-testid": `${n}-error-wrapper`,
|
|
496
476
|
children: [
|
|
497
|
-
l && /* @__PURE__ */ e("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
477
|
+
l && /* @__PURE__ */ e("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ e(x, { size: 17 }) }),
|
|
498
478
|
/* @__PURE__ */ e("p", { id: S, class: "IncodeDropdownComposedError", children: r })
|
|
499
479
|
]
|
|
500
480
|
}
|
|
@@ -505,7 +485,7 @@ const M = ({
|
|
|
505
485
|
class: "IncodeDropdownComposedHelperWrapper",
|
|
506
486
|
"data-testid": `${n}-helper-wrapper`,
|
|
507
487
|
children: [
|
|
508
|
-
u && /* @__PURE__ */ e("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ e(
|
|
488
|
+
u && /* @__PURE__ */ e("div", { class: "IncodeDropdownComposedIconWrapper", children: /* @__PURE__ */ e(T, { size: 17 }) }),
|
|
509
489
|
/* @__PURE__ */ e("p", { id: H, class: "IncodeDropdownComposedHelper", children: C })
|
|
510
490
|
]
|
|
511
491
|
}
|
|
@@ -519,7 +499,7 @@ const M = ({
|
|
|
519
499
|
disabled: t = !1,
|
|
520
500
|
labels: d
|
|
521
501
|
}) => {
|
|
522
|
-
const { t: r } =
|
|
502
|
+
const { t: r } = B(), l = { ...{
|
|
523
503
|
firstName: r("curp.labels.firstName") ?? "Your First name",
|
|
524
504
|
firstLast: r("curp.labels.firstLast") ?? "Your First last name",
|
|
525
505
|
secondLast: r("curp.labels.secondLast") ?? "Your Second last name",
|
|
@@ -532,9 +512,9 @@ const M = ({
|
|
|
532
512
|
birthState: r("curp.labels.birthState") ?? "State of birth",
|
|
533
513
|
statePlaceholder: r("curp.placeholder.state") ?? "Select state",
|
|
534
514
|
generate: r("curp.generateCta") ?? "Generate CURP"
|
|
535
|
-
}, ...d }, u = (c) => (
|
|
536
|
-
const
|
|
537
|
-
s({ [c]:
|
|
515
|
+
}, ...d }, u = (c) => (b) => {
|
|
516
|
+
const y = b.target;
|
|
517
|
+
s({ [c]: y.value });
|
|
538
518
|
}, m = [
|
|
539
519
|
{ value: "H", label: l.male },
|
|
540
520
|
{ value: "M", label: l.female },
|
|
@@ -545,7 +525,7 @@ const M = ({
|
|
|
545
525
|
}));
|
|
546
526
|
return /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeGenerateCurpForm", children: [
|
|
547
527
|
/* @__PURE__ */ e(
|
|
548
|
-
|
|
528
|
+
N,
|
|
549
529
|
{
|
|
550
530
|
id: "curp-first-name",
|
|
551
531
|
label: l.firstName,
|
|
@@ -557,7 +537,7 @@ const M = ({
|
|
|
557
537
|
}
|
|
558
538
|
),
|
|
559
539
|
/* @__PURE__ */ e(
|
|
560
|
-
|
|
540
|
+
N,
|
|
561
541
|
{
|
|
562
542
|
id: "curp-first-last",
|
|
563
543
|
label: l.firstLast,
|
|
@@ -568,7 +548,7 @@ const M = ({
|
|
|
568
548
|
}
|
|
569
549
|
),
|
|
570
550
|
/* @__PURE__ */ e(
|
|
571
|
-
|
|
551
|
+
N,
|
|
572
552
|
{
|
|
573
553
|
id: "curp-second-last",
|
|
574
554
|
label: l.secondLast,
|
|
@@ -579,7 +559,7 @@ const M = ({
|
|
|
579
559
|
}
|
|
580
560
|
),
|
|
581
561
|
/* @__PURE__ */ e(
|
|
582
|
-
|
|
562
|
+
O,
|
|
583
563
|
{
|
|
584
564
|
id: "curp-gender",
|
|
585
565
|
label: l.gender,
|
|
@@ -592,7 +572,7 @@ const M = ({
|
|
|
592
572
|
}
|
|
593
573
|
),
|
|
594
574
|
/* @__PURE__ */ e(
|
|
595
|
-
|
|
575
|
+
M,
|
|
596
576
|
{
|
|
597
577
|
id: "curp-birth-date",
|
|
598
578
|
label: l.dob,
|
|
@@ -605,7 +585,7 @@ const M = ({
|
|
|
605
585
|
}
|
|
606
586
|
),
|
|
607
587
|
/* @__PURE__ */ e(
|
|
608
|
-
|
|
588
|
+
O,
|
|
609
589
|
{
|
|
610
590
|
id: "curp-birth-state",
|
|
611
591
|
label: l.birthState,
|
|
@@ -633,7 +613,7 @@ const M = ({
|
|
|
633
613
|
onFinish: o,
|
|
634
614
|
onError: s
|
|
635
615
|
}) => {
|
|
636
|
-
const { t: a } =
|
|
616
|
+
const { t: a } = B(), [t, d] = Y(() => {
|
|
637
617
|
if (!n)
|
|
638
618
|
throw new Error("CURP validation config is required");
|
|
639
619
|
return K({ config: n });
|
|
@@ -712,7 +692,7 @@ const M = ({
|
|
|
712
692
|
);
|
|
713
693
|
if (t.status === "success")
|
|
714
694
|
return /* @__PURE__ */ e(R, { className: "IncodeCurpValidationPage", children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpSuccess", children: [
|
|
715
|
-
/* @__PURE__ */ e(
|
|
695
|
+
/* @__PURE__ */ e(T, { size: 32 }),
|
|
716
696
|
/* @__PURE__ */ e(L, { size: 16 }),
|
|
717
697
|
/* @__PURE__ */ e("h2", { class: "IncodeCurpSuccessTitle", children: a("curp.status.verified") ?? "Verified" })
|
|
718
698
|
] }) });
|
|
@@ -720,15 +700,15 @@ const M = ({
|
|
|
720
700
|
const r = t.retriesLeft > 0, C = t.status === "failure" ? a("curp.status.notVerified") ?? "Not verified" : a("curp.status.couldntGenerate") ?? "Couldn't generate CURP";
|
|
721
701
|
return /* @__PURE__ */ e(R, { className: "IncodeCurpValidationPage", children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpFailure", children: [
|
|
722
702
|
/* @__PURE__ */ e(L, {}),
|
|
723
|
-
/* @__PURE__ */ e(
|
|
703
|
+
/* @__PURE__ */ e(x, { size: 32 }),
|
|
724
704
|
/* @__PURE__ */ e(L, { size: 16 }),
|
|
725
705
|
/* @__PURE__ */ e("h2", { class: "IncodeCurpFailureTitle", children: C }),
|
|
726
|
-
t.status === "generateError" && r && /* @__PURE__ */ e(
|
|
706
|
+
t.status === "generateError" && r && /* @__PURE__ */ e(F, { children: [
|
|
727
707
|
/* @__PURE__ */ e(L, { size: 12 }),
|
|
728
708
|
/* @__PURE__ */ e("p", { class: "IncodeCurpFailureHint", children: a("curp.status.checkInfo") ?? "Please check your information" })
|
|
729
709
|
] }),
|
|
730
710
|
/* @__PURE__ */ e(L, {}),
|
|
731
|
-
r && /* @__PURE__ */ e(
|
|
711
|
+
r && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(
|
|
732
712
|
E,
|
|
733
713
|
{
|
|
734
714
|
type: "button",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { u as r } from "./incodeModule-SZbHLd1r.js";
|
|
2
|
+
const n = ({ size: t = 32 }) => /* @__PURE__ */ r(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: t,
|
|
7
|
+
height: t,
|
|
8
|
+
viewBox: "0 0 32 32",
|
|
9
|
+
fill: "none",
|
|
10
|
+
class: "IncodeErrorIcon",
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ r("title", { children: "Error" }),
|
|
14
|
+
/* @__PURE__ */ r(
|
|
15
|
+
"path",
|
|
16
|
+
{
|
|
17
|
+
d: "M16 0C24.8219 0 32 7.17642 32 16C32 24.8219 24.8219 32 16 32C7.17811 32 0 24.8219 0 16C0 7.17642 7.17811 0 16 0ZM13.1553 11.3701C12.6618 10.8767 11.8636 10.8767 11.3701 11.3701C10.8767 11.8636 10.8767 12.6618 11.3701 13.1553L14.4053 16.1924L11.3721 19.2256C10.8803 19.7191 10.8803 20.5173 11.3721 21.0107C11.8656 21.504 12.6658 21.5041 13.1592 21.0107L16.1924 17.9775L19.2334 21.0205C19.481 21.2664 19.8029 21.3916 20.1279 21.3916C20.4513 21.3916 20.7746 21.2664 21.0205 21.0205C21.514 20.527 21.514 19.7269 21.0205 19.2334L17.9775 16.1924L21.0107 13.1572C21.5041 12.6638 21.504 11.8639 21.0107 11.3721C20.5173 10.8786 19.7191 10.8786 19.2256 11.3721L16.1904 14.4053L13.1553 11.3701Z",
|
|
18
|
+
fill: "var(--icon-status-negative)"
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
export {
|
|
25
|
+
n as E
|
|
26
|
+
};
|
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { u as l, B as
|
|
2
|
-
import { createOrchestratedFlowManager as
|
|
3
|
-
import { A as F, d as
|
|
4
|
-
import { api as
|
|
1
|
+
import { u as l, B as $, r as _, a as H } from "../incodeModule-SZbHLd1r.js";
|
|
2
|
+
import { createOrchestratedFlowManager as V, getRequiredWasmPipelines as D } from "@incodetech/core/flow";
|
|
3
|
+
import { A as F, d as L, y as g } from "../vendor-preact-CjD4WiuC.js";
|
|
4
|
+
import { api as U, warmupWasm as z, IdCaptureProvider as k } from "@incodetech/core";
|
|
5
5
|
import "../instance-B-q0ZREN.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { emailMachine as
|
|
8
|
-
import { faceMatchMachine as
|
|
6
|
+
import { u as W, S as M } from "../spinner-BcMtCrDz.js";
|
|
7
|
+
import { emailMachine as j } from "@incodetech/core/email";
|
|
8
|
+
import { faceMatchMachine as G } from "@incodetech/core/face-match";
|
|
9
9
|
import { idCaptureMachine as C } from "@incodetech/core/id";
|
|
10
|
-
import { phoneMachine as
|
|
11
|
-
import { selfieMachine as
|
|
12
|
-
import { authenticationMachine as
|
|
13
|
-
import { curpValidationMachine as
|
|
14
|
-
import {
|
|
15
|
-
import { s as
|
|
16
|
-
|
|
10
|
+
import { phoneMachine as B } from "@incodetech/core/phone";
|
|
11
|
+
import { selfieMachine as K } from "@incodetech/core/selfie";
|
|
12
|
+
import { authenticationMachine as q } from "@incodetech/core/authentication";
|
|
13
|
+
import { curpValidationMachine as Y } from "@incodetech/core/curp-validation";
|
|
14
|
+
import { governmentValidationMachine as Z } from "@incodetech/core/government-validation";
|
|
15
|
+
import { s as J } from "../setup-BhetRn4n.js";
|
|
16
|
+
import { s as v } from "../uiConfig-DEqynrWx.js";
|
|
17
|
+
function Q(e) {
|
|
17
18
|
let t = e.replace("#", "");
|
|
18
19
|
t.length === 3 && (t = t.split("").map((s) => s + s).join(""));
|
|
19
20
|
const n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
@@ -37,13 +38,13 @@ function J(e) {
|
|
|
37
38
|
}
|
|
38
39
|
return { h: a * 360, s: h * 100, l: u * 100 };
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function w(e, t, n) {
|
|
41
42
|
const i = e / 360, d = t / 100, r = n / 100;
|
|
42
43
|
let o, f, a;
|
|
43
44
|
if (d === 0)
|
|
44
45
|
o = f = a = r;
|
|
45
46
|
else {
|
|
46
|
-
const u = (p,
|
|
47
|
+
const u = (p, y, m) => (m < 0 && (m += 1), m > 1 && (m -= 1), m < 0.16666666666666666 ? p + (y - p) * 6 * m : m < 0.5 ? y : m < 0.6666666666666666 ? p + (y - p) * (0.6666666666666666 - m) * 6 : p), s = r < 0.5 ? r * (1 + d) : r + d - r * d, c = 2 * r - s;
|
|
47
48
|
o = u(c, s, i + 1 / 3), f = u(c, s, i), a = u(c, s, i - 1 / 3);
|
|
48
49
|
}
|
|
49
50
|
const h = (u) => {
|
|
@@ -52,24 +53,24 @@ function I(e, t, n) {
|
|
|
52
53
|
};
|
|
53
54
|
return `#${h(o)}${h(f)}${h(a)}`;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
const t =
|
|
56
|
+
function X(e) {
|
|
57
|
+
const t = Q(e);
|
|
57
58
|
if (!t)
|
|
58
59
|
throw new Error(`Invalid color format: ${e}`);
|
|
59
60
|
return {
|
|
60
|
-
50:
|
|
61
|
-
200:
|
|
62
|
-
300:
|
|
63
|
-
400:
|
|
61
|
+
50: w(t.h, t.s, 95),
|
|
62
|
+
200: w(t.h, t.s, 80),
|
|
63
|
+
300: w(t.h, t.s, 65),
|
|
64
|
+
400: w(t.h, t.s, Math.min(100, t.l + 10)),
|
|
64
65
|
500: e,
|
|
65
|
-
600:
|
|
66
|
-
900:
|
|
66
|
+
600: w(t.h, t.s, Math.max(0, t.l - 10)),
|
|
67
|
+
900: w(t.h, t.s, 20)
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function ee(e, t) {
|
|
70
71
|
if (typeof document > "u")
|
|
71
72
|
return;
|
|
72
|
-
const n =
|
|
73
|
+
const n = X(e);
|
|
73
74
|
let i = document.getElementById(
|
|
74
75
|
"incode-theme"
|
|
75
76
|
);
|
|
@@ -89,24 +90,24 @@ function X(e, t) {
|
|
|
89
90
|
`;
|
|
90
91
|
i.textContent = r;
|
|
91
92
|
}
|
|
92
|
-
async function
|
|
93
|
-
return (await
|
|
93
|
+
async function te() {
|
|
94
|
+
return (await U.get("/omni/asset/fetch-all")).data;
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
-
async function
|
|
96
|
+
const E = /* @__PURE__ */ new Map();
|
|
97
|
+
async function re(e) {
|
|
97
98
|
if (e.startsWith("data:"))
|
|
98
99
|
return e;
|
|
99
|
-
const t =
|
|
100
|
+
const t = E.get(e);
|
|
100
101
|
if (t)
|
|
101
102
|
return t;
|
|
102
103
|
const i = await (await fetch(e)).blob(), d = await new Promise((r, o) => {
|
|
103
104
|
const f = new FileReader();
|
|
104
105
|
f.onloadend = () => r(f.result), f.onerror = o, f.readAsDataURL(i);
|
|
105
106
|
});
|
|
106
|
-
return
|
|
107
|
+
return E.set(e, d), d;
|
|
107
108
|
}
|
|
108
|
-
async function
|
|
109
|
-
const e = await
|
|
109
|
+
async function ne() {
|
|
110
|
+
const e = await te();
|
|
110
111
|
if (!e.theme)
|
|
111
112
|
throw new Error("Theme URL not found in assets response");
|
|
112
113
|
const t = e.theme, n = t.startsWith("http://") || t.startsWith("https://");
|
|
@@ -117,19 +118,19 @@ async function re() {
|
|
|
117
118
|
throw new Error(`Failed to fetch theme: ${o.statusText}`);
|
|
118
119
|
i = await o.json();
|
|
119
120
|
} else
|
|
120
|
-
i = (await
|
|
121
|
+
i = (await U.get(t)).data;
|
|
121
122
|
const d = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || i.logo;
|
|
122
123
|
let r = d;
|
|
123
|
-
return d && (r = await
|
|
124
|
+
return d && (r = await re(d)), {
|
|
124
125
|
...i,
|
|
125
126
|
logo: r
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
|
-
async function
|
|
129
|
-
const e = await
|
|
130
|
-
return e.main &&
|
|
129
|
+
async function oe() {
|
|
130
|
+
const e = await ne();
|
|
131
|
+
return e.main && ee(e.main, e.buttonColor), e;
|
|
131
132
|
}
|
|
132
|
-
const b = () => import("../id/id.es.js").then((e) => e.Id),
|
|
133
|
+
const b = () => import("../id/id.es.js").then((e) => e.Id), A = {
|
|
133
134
|
PHONE: () => import("../phone/phone.es.js").then((e) => e.Phone),
|
|
134
135
|
EMAIL: () => import("../email/email.es.js").then((e) => e.Email),
|
|
135
136
|
SELFIE: () => import("../selfie/selfie.es.js").then((e) => e.Selfie),
|
|
@@ -139,60 +140,64 @@ const b = () => import("../id/id.es.js").then((e) => e.Id), E = {
|
|
|
139
140
|
SECOND_ID: b,
|
|
140
141
|
THIRD_ID: b,
|
|
141
142
|
FACE_MATCH: () => import("../faceMatch-BwyMhXen.js").then((e) => e.FaceMatch),
|
|
142
|
-
CURP_VALIDATION: () => import("../curp-validation/curp-validation.es.js").then((e) => e.CurpValidation)
|
|
143
|
+
CURP_VALIDATION: () => import("../curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
|
|
144
|
+
GOVT_VALIDATION_PROVISIONING: () => import("../governmentValidation/governmentValidation.es.js").then(
|
|
145
|
+
(e) => e.GovernmentValidation
|
|
146
|
+
)
|
|
143
147
|
};
|
|
144
148
|
function P() {
|
|
145
|
-
return
|
|
149
|
+
return V({
|
|
146
150
|
modules: {
|
|
147
|
-
PHONE:
|
|
148
|
-
EMAIL:
|
|
149
|
-
SELFIE:
|
|
150
|
-
AUTHENTICATION:
|
|
151
|
+
PHONE: B,
|
|
152
|
+
EMAIL: j,
|
|
153
|
+
SELFIE: K,
|
|
154
|
+
AUTHENTICATION: q,
|
|
151
155
|
ID: C,
|
|
152
156
|
TUTORIAL_ID: C,
|
|
153
157
|
SECOND_ID: C,
|
|
154
158
|
THIRD_ID: C,
|
|
155
|
-
FACE_MATCH:
|
|
156
|
-
CURP_VALIDATION:
|
|
159
|
+
FACE_MATCH: G,
|
|
160
|
+
CURP_VALIDATION: Y,
|
|
161
|
+
GOVT_VALIDATION_PROVISIONING: Z
|
|
157
162
|
}
|
|
158
163
|
});
|
|
159
164
|
}
|
|
160
|
-
async function
|
|
161
|
-
await
|
|
165
|
+
async function N(e) {
|
|
166
|
+
await J({
|
|
162
167
|
apiURL: e.apiURL,
|
|
163
168
|
token: e.token,
|
|
164
169
|
i18n: { lang: e.lang ?? "en" }
|
|
165
170
|
});
|
|
166
171
|
}
|
|
167
|
-
async function
|
|
172
|
+
async function O() {
|
|
168
173
|
try {
|
|
169
|
-
const e = await
|
|
174
|
+
const e = await oe(), t = {
|
|
170
175
|
logoSrc: e.logo,
|
|
171
176
|
hideFooterBranding: e.hideFooterBranding
|
|
172
177
|
};
|
|
173
|
-
return
|
|
178
|
+
return v(t), { theme: e, uiConfig: t };
|
|
174
179
|
} catch (e) {
|
|
175
180
|
return console.warn("Failed to fetch dashboard theme:", e), {};
|
|
176
181
|
}
|
|
177
182
|
}
|
|
178
|
-
function
|
|
179
|
-
const n =
|
|
180
|
-
n.length > 0 &&
|
|
183
|
+
function x(e, t) {
|
|
184
|
+
const n = D(e.flow);
|
|
185
|
+
n.length > 0 && z({
|
|
181
186
|
...t,
|
|
182
187
|
pipelines: n
|
|
183
188
|
}).catch((i) => {
|
|
184
189
|
console.error("WASM warmup failed:", i);
|
|
185
190
|
});
|
|
186
191
|
}
|
|
187
|
-
function
|
|
192
|
+
function ie(e) {
|
|
188
193
|
const t = e.currentStep;
|
|
189
194
|
if (t) {
|
|
190
|
-
const n =
|
|
195
|
+
const n = A[t];
|
|
191
196
|
n && n().catch(() => {
|
|
192
197
|
});
|
|
193
198
|
}
|
|
194
199
|
}
|
|
195
|
-
const
|
|
200
|
+
const ae = ({
|
|
196
201
|
moduleKey: e,
|
|
197
202
|
onNext: t
|
|
198
203
|
}) => /* @__PURE__ */ l("section", { class: "IncodeUnsupportedModule", "aria-live": "polite", children: /* @__PURE__ */ l("div", { class: "IncodeUnsupportedModuleContent", children: [
|
|
@@ -203,7 +208,7 @@ const ie = ({
|
|
|
203
208
|
'" module is not yet supported in this version.'
|
|
204
209
|
] }),
|
|
205
210
|
/* @__PURE__ */ l(
|
|
206
|
-
|
|
211
|
+
$,
|
|
207
212
|
{
|
|
208
213
|
onClick: t,
|
|
209
214
|
class: "IncodeUnsupportedModuleButton",
|
|
@@ -211,9 +216,9 @@ const ie = ({
|
|
|
211
216
|
children: "Next"
|
|
212
217
|
}
|
|
213
218
|
)
|
|
214
|
-
] }) }),
|
|
219
|
+
] }) }), I = /* @__PURE__ */ new Map();
|
|
215
220
|
function S(e) {
|
|
216
|
-
const t =
|
|
221
|
+
const t = I.get(e);
|
|
217
222
|
if (!t)
|
|
218
223
|
throw new Error("Preload state not found");
|
|
219
224
|
return {
|
|
@@ -231,13 +236,13 @@ function S(e) {
|
|
|
231
236
|
}
|
|
232
237
|
},
|
|
233
238
|
cancel() {
|
|
234
|
-
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(new Error("Preload cancelled")),
|
|
239
|
+
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(new Error("Preload cancelled")), I.delete(e));
|
|
235
240
|
}
|
|
236
241
|
};
|
|
237
242
|
}
|
|
238
|
-
function
|
|
243
|
+
function Se(e) {
|
|
239
244
|
const { token: t } = e;
|
|
240
|
-
if (
|
|
245
|
+
if (I.has(t))
|
|
241
246
|
return S(t);
|
|
242
247
|
let n, i;
|
|
243
248
|
const d = new Promise((a, h) => {
|
|
@@ -250,43 +255,43 @@ function Ee(e) {
|
|
|
250
255
|
readyResolve: n,
|
|
251
256
|
readyReject: i
|
|
252
257
|
};
|
|
253
|
-
return
|
|
258
|
+
return I.set(t, o), (async () => {
|
|
254
259
|
try {
|
|
255
|
-
await
|
|
260
|
+
await N({
|
|
256
261
|
apiURL: e.apiURL,
|
|
257
262
|
token: e.token,
|
|
258
263
|
lang: e.lang
|
|
259
264
|
});
|
|
260
|
-
const a = e.disableDashboardTheme ? Promise.resolve({}) :
|
|
265
|
+
const a = e.disableDashboardTheme ? Promise.resolve({}) : O().then((u) => {
|
|
261
266
|
o.theme = u.theme, o.uiConfig = u.uiConfig;
|
|
262
267
|
}), h = r.subscribe((u) => {
|
|
263
268
|
if (u.status === "ready") {
|
|
264
269
|
const s = u;
|
|
265
|
-
e.wasmConfig &&
|
|
270
|
+
e.wasmConfig && x(s, e.wasmConfig), ie(s), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
|
|
266
271
|
} else u.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = u.error, o.readyReject(new Error(u.error)));
|
|
267
272
|
});
|
|
268
273
|
o.unsubscribe = h, r.load(), await a;
|
|
269
274
|
} catch (a) {
|
|
270
275
|
o.status = "error", o.error = a instanceof Error ? a.message : "Failed to preload", o.readyReject(
|
|
271
276
|
a instanceof Error ? a : new Error("Failed to preload")
|
|
272
|
-
),
|
|
277
|
+
), I.delete(t);
|
|
273
278
|
}
|
|
274
279
|
})(), S(t);
|
|
275
280
|
}
|
|
276
281
|
function T(e) {
|
|
277
|
-
return
|
|
282
|
+
return I.get(e) ?? null;
|
|
278
283
|
}
|
|
279
|
-
function
|
|
284
|
+
function R(e) {
|
|
280
285
|
const t = T(e);
|
|
281
|
-
return t &&
|
|
286
|
+
return t && I.delete(e), t;
|
|
282
287
|
}
|
|
283
|
-
function
|
|
284
|
-
const { apiURL: t, token: n, lang: i, disableDashboardTheme: d, onError: r } = e, o = F(null), [f, a] =
|
|
288
|
+
function se(e) {
|
|
289
|
+
const { apiURL: t, token: n, lang: i, disableDashboardTheme: d, onError: r } = e, o = F(null), [f, a] = L(() => {
|
|
285
290
|
const u = T(n);
|
|
286
291
|
if (u?.status === "ready") {
|
|
287
|
-
const c =
|
|
292
|
+
const c = R(n);
|
|
288
293
|
if (c)
|
|
289
|
-
return o.current = c.flowManager, c.uiConfig &&
|
|
294
|
+
return o.current = c.flowManager, c.uiConfig && v(c.uiConfig), { status: "ready", flowManager: c.flowManager };
|
|
290
295
|
}
|
|
291
296
|
const s = P();
|
|
292
297
|
return o.current = s, u?.status === "error" ? {
|
|
@@ -301,8 +306,8 @@ function ae(e) {
|
|
|
301
306
|
const u = T(n);
|
|
302
307
|
if (u?.status === "loading") {
|
|
303
308
|
u.readyPromise.then(() => {
|
|
304
|
-
const c =
|
|
305
|
-
c && (o.current = c.flowManager, c.uiConfig &&
|
|
309
|
+
const c = R(n);
|
|
310
|
+
c && (o.current = c.flowManager, c.uiConfig && v(c.uiConfig), a({ status: "ready", flowManager: c.flowManager }));
|
|
306
311
|
}).catch((c) => {
|
|
307
312
|
const p = c instanceof Error ? c.message : "Preload failed";
|
|
308
313
|
a({
|
|
@@ -317,9 +322,9 @@ function ae(e) {
|
|
|
317
322
|
return;
|
|
318
323
|
h.current = !0, (async () => {
|
|
319
324
|
try {
|
|
320
|
-
await
|
|
321
|
-
const c = d ? Promise.resolve() :
|
|
322
|
-
p.uiConfig &&
|
|
325
|
+
await N({ apiURL: t, token: n, lang: i });
|
|
326
|
+
const c = d ? Promise.resolve() : O().then((p) => {
|
|
327
|
+
p.uiConfig && v(p.uiConfig);
|
|
323
328
|
});
|
|
324
329
|
f.flowManager.load(), await c, a({ status: "ready", flowManager: f.flowManager });
|
|
325
330
|
} catch (c) {
|
|
@@ -333,14 +338,14 @@ function ae(e) {
|
|
|
333
338
|
})();
|
|
334
339
|
}, [t, n, i, d, r, f]), f;
|
|
335
340
|
}
|
|
336
|
-
function
|
|
337
|
-
const { moduleKey: t, onModuleLoading: n, onModuleLoaded: i, onError: d } = e, [r, o] =
|
|
341
|
+
function le(e) {
|
|
342
|
+
const { moduleKey: t, onModuleLoading: n, onModuleLoaded: i, onError: d } = e, [r, o] = L({ status: "idle" });
|
|
338
343
|
return g(() => {
|
|
339
344
|
if (!t) {
|
|
340
345
|
o({ status: "idle" });
|
|
341
346
|
return;
|
|
342
347
|
}
|
|
343
|
-
const f =
|
|
348
|
+
const f = A[t];
|
|
344
349
|
if (!f) {
|
|
345
350
|
o({ status: "unsupported", moduleKey: t });
|
|
346
351
|
return;
|
|
@@ -359,14 +364,14 @@ function se(e) {
|
|
|
359
364
|
};
|
|
360
365
|
}, [t, n, i, d]), r;
|
|
361
366
|
}
|
|
362
|
-
function
|
|
367
|
+
function ce(e, t) {
|
|
363
368
|
const n = F(/* @__PURE__ */ new Set());
|
|
364
369
|
g(() => {
|
|
365
370
|
if (t < e.length - 1) {
|
|
366
371
|
const i = e[t + 1];
|
|
367
372
|
if (i && !n.current.has(i)) {
|
|
368
373
|
n.current.add(i);
|
|
369
|
-
const d =
|
|
374
|
+
const d = A[i];
|
|
370
375
|
d && d().catch(() => {
|
|
371
376
|
n.current.delete(i);
|
|
372
377
|
});
|
|
@@ -374,32 +379,32 @@ function le(e, t) {
|
|
|
374
379
|
}
|
|
375
380
|
}, [e, t]);
|
|
376
381
|
}
|
|
377
|
-
const
|
|
382
|
+
const de = ({
|
|
378
383
|
config: e,
|
|
379
384
|
onFinish: t,
|
|
380
385
|
onError: n
|
|
381
386
|
}) => {
|
|
382
|
-
const { t: i } =
|
|
387
|
+
const { t: i } = W(), d = se({
|
|
383
388
|
apiURL: e.apiURL,
|
|
384
389
|
token: e.token,
|
|
385
390
|
lang: e.lang,
|
|
386
391
|
disableDashboardTheme: e.disableDashboardTheme,
|
|
387
392
|
onError: n
|
|
388
|
-
}), [r, o] =
|
|
393
|
+
}), [r, o] = H(() => d.flowManager, {
|
|
389
394
|
autoLoad: !1
|
|
390
|
-
}), f =
|
|
395
|
+
}), f = le({
|
|
391
396
|
moduleKey: r?.status === "ready" ? r.currentStep : void 0,
|
|
392
397
|
onModuleLoading: e.onModuleLoading,
|
|
393
398
|
onModuleLoaded: e.onModuleLoaded,
|
|
394
399
|
onError: n
|
|
395
400
|
});
|
|
396
|
-
if (
|
|
401
|
+
if (ce(
|
|
397
402
|
r?.status === "ready" ? r.steps : [],
|
|
398
403
|
r?.status === "ready" ? r.currentStepIndex : -1
|
|
399
404
|
), g(() => {
|
|
400
405
|
if (r?.status === "ready" && e.wasmConfig) {
|
|
401
|
-
const a = r, h =
|
|
402
|
-
h.length > 0 && (e.onWasmWarmup?.(h),
|
|
406
|
+
const a = r, h = D(a.flow);
|
|
407
|
+
h.length > 0 && (e.onWasmWarmup?.(h), x(a, e.wasmConfig));
|
|
403
408
|
}
|
|
404
409
|
}, [r, e]), g(() => {
|
|
405
410
|
r?.status === "finished" && t(r.finishStatus);
|
|
@@ -453,7 +458,7 @@ const ce = ({
|
|
|
453
458
|
) });
|
|
454
459
|
if (f.status === "unsupported")
|
|
455
460
|
return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
|
|
456
|
-
|
|
461
|
+
ae,
|
|
457
462
|
{
|
|
458
463
|
moduleKey: a,
|
|
459
464
|
onNext: () => o.completeModule()
|
|
@@ -527,7 +532,7 @@ const ce = ({
|
|
|
527
532
|
}
|
|
528
533
|
if (a === "TUTORIAL_ID" || a === "SECOND_ID" || a === "THIRD_ID" || // Only render ID if TUTORIAL_ID doesn't exist (otherwise useEffect will skip it)
|
|
529
534
|
a === "ID" && !r.steps.includes("TUTORIAL_ID")) {
|
|
530
|
-
const s = h, c = new
|
|
535
|
+
const s = h, c = new k();
|
|
531
536
|
return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
|
|
532
537
|
u,
|
|
533
538
|
{
|
|
@@ -570,23 +575,35 @@ const ce = ({
|
|
|
570
575
|
},
|
|
571
576
|
`curp-validation-${r.currentStepIndex}`
|
|
572
577
|
) });
|
|
578
|
+
if (a === "GOVT_VALIDATION_PROVISIONING")
|
|
579
|
+
return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
|
|
580
|
+
u,
|
|
581
|
+
{
|
|
582
|
+
config: h,
|
|
583
|
+
onFinish: () => o.completeModule(),
|
|
584
|
+
onError: (c) => {
|
|
585
|
+
n?.(c ?? "Government validation error");
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
`govt-validation-${r.currentStepIndex}`
|
|
589
|
+
) });
|
|
573
590
|
}
|
|
574
591
|
return null;
|
|
575
|
-
},
|
|
592
|
+
}, ue = ({
|
|
576
593
|
config: e,
|
|
577
594
|
onFinish: t = () => {
|
|
578
595
|
},
|
|
579
596
|
onError: n
|
|
580
597
|
}) => /* @__PURE__ */ l("div", { class: "IncodeComponent", children: e ? /* @__PURE__ */ l(
|
|
581
|
-
|
|
598
|
+
de,
|
|
582
599
|
{
|
|
583
600
|
config: e,
|
|
584
601
|
onFinish: t,
|
|
585
602
|
onError: n
|
|
586
603
|
}
|
|
587
604
|
) : null });
|
|
588
|
-
|
|
605
|
+
_(ue, "incode-flow");
|
|
589
606
|
export {
|
|
590
|
-
|
|
591
|
-
|
|
607
|
+
ue as IncodeFlow,
|
|
608
|
+
Se as preloadIncodeFlow
|
|
592
609
|
};
|
package/dist/flow/styles.css
CHANGED
|
@@ -1265,6 +1265,70 @@
|
|
|
1265
1265
|
opacity: 0;
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
1268
|
+
.IncodeGovtValidation {
|
|
1269
|
+
flex-direction: column;
|
|
1270
|
+
justify-content: center;
|
|
1271
|
+
align-items: center;
|
|
1272
|
+
width: 100%;
|
|
1273
|
+
height: 100%;
|
|
1274
|
+
display: flex;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
.IncodeGovtValidation .IncodeGovtValidationPage {
|
|
1278
|
+
width: 100%;
|
|
1279
|
+
height: 100%;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.IncodeGovtValidation .IncodeGovtValidationPage .IncodePageContent {
|
|
1283
|
+
flex-direction: column;
|
|
1284
|
+
flex: 1;
|
|
1285
|
+
justify-content: center;
|
|
1286
|
+
align-items: center;
|
|
1287
|
+
display: flex;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.IncodeGovtValidation .IncodeGovtValidationStatus {
|
|
1291
|
+
text-align: center;
|
|
1292
|
+
flex-direction: column;
|
|
1293
|
+
justify-content: center;
|
|
1294
|
+
align-items: center;
|
|
1295
|
+
display: flex;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
.IncodeGovtValidation .IncodeGovtValidationText {
|
|
1299
|
+
margin-top: var(--spacing-12, var(--spacing-12, 12px));
|
|
1300
|
+
font-family: var(--primitive-typography-family-dm-sans);
|
|
1301
|
+
font-size: var(--typography-headline-h2-size);
|
|
1302
|
+
font-weight: var(--typography-headline-h2-weight);
|
|
1303
|
+
line-height: var(--typography-headline-h2-line-height);
|
|
1304
|
+
letter-spacing: var(--typography-headline-h2-letter-spacing);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodePageContent {
|
|
1308
|
+
flex-direction: column;
|
|
1309
|
+
align-items: center;
|
|
1310
|
+
display: flex;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodeGovtValidationOtpInstructions {
|
|
1314
|
+
margin-bottom: var(--spacing-12, var(--spacing-12, 12px));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodeGovtValidationOtpInstructions p {
|
|
1318
|
+
font-family: var(--primitive-typography-family-dm-sans);
|
|
1319
|
+
font-size: var(--typography-body-lg-size);
|
|
1320
|
+
font-weight: var(--typography-body-lg-weight);
|
|
1321
|
+
line-height: var(--typography-body-lg-line-height);
|
|
1322
|
+
letter-spacing: var(--typography-body-lg-letter-spacing);
|
|
1323
|
+
font-size: var(--text-lg, 1.125rem);
|
|
1324
|
+
line-height: var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));
|
|
1325
|
+
text-wrap: nowrap;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.IncodeWarningIcon {
|
|
1329
|
+
color: var(--icon-status-warning);
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1268
1332
|
.IncodeFlowStart {
|
|
1269
1333
|
width: 100%;
|
|
1270
1334
|
height: 100%;
|
|
@@ -2710,6 +2774,42 @@
|
|
|
2710
2774
|
}
|
|
2711
2775
|
}
|
|
2712
2776
|
|
|
2777
|
+
@media (min-width: 40rem) {
|
|
2778
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2779
|
+
max-width: 40rem;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2783
|
+
@media (min-width: 48rem) {
|
|
2784
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2785
|
+
max-width: 48rem;
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
@media (min-width: 64rem) {
|
|
2790
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2791
|
+
max-width: 64rem;
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
@media (min-width: 80rem) {
|
|
2796
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2797
|
+
max-width: 80rem;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
@media (min-width: 96rem) {
|
|
2802
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2803
|
+
max-width: 96rem;
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
@media (min-width: 48rem) {
|
|
2808
|
+
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2809
|
+
height: 840px;
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2713
2813
|
.IncodeCommonIssuesModal .IncodeCommonIssuesModalContent {
|
|
2714
2814
|
width: 100%;
|
|
2715
2815
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { u as n, r as p, a as v, S as m } from "../incodeModule-SZbHLd1r.js";
|
|
2
|
+
import { createGovernmentValidationManager as h } from "@incodetech/core/government-validation";
|
|
3
|
+
import "../vendor-preact-CjD4WiuC.js";
|
|
4
|
+
import "@incodetech/core";
|
|
5
|
+
import "../instance-B-q0ZREN.js";
|
|
6
|
+
import { u as g, S as f } from "../spinner-BcMtCrDz.js";
|
|
7
|
+
import { I, P as r } from "../incodeComponent-DWkUggQZ.js";
|
|
8
|
+
import { E as C } from "../errorIcon-X7wnjHa6.js";
|
|
9
|
+
import { S as c } from "../successIcon-_WpNP6Fl.js";
|
|
10
|
+
import { O as V } from "../otpInput-BR9B2kBI.js";
|
|
11
|
+
const G = ({ size: i = 32 }) => /* @__PURE__ */ n(
|
|
12
|
+
"svg",
|
|
13
|
+
{
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
width: i,
|
|
16
|
+
height: i,
|
|
17
|
+
viewBox: "0 0 32 32",
|
|
18
|
+
fill: "none",
|
|
19
|
+
class: "IncodeWarningIcon",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ n("title", { children: "Warning" }),
|
|
23
|
+
/* @__PURE__ */ n(
|
|
24
|
+
"path",
|
|
25
|
+
{
|
|
26
|
+
d: "M16 0C24.848 0 32 7.1696 32 16C32 24.8336 24.848 32 16 32C7.168 32 0 24.8336 0 16C0 7.1696 7.168 0 16 0ZM16 20.6896C15.232 20.6896 14.608 21.3136 14.608 22.0816C14.608 22.8496 15.232 23.4896 16.016 23.4896C16.784 23.4896 17.408 22.8496 17.408 22.0816C17.408 21.3136 16.784 20.6896 16 20.6896ZM16 8.528C15.232 8.528 14.592 9.1696 14.592 9.936V17.008C14.592 17.7776 15.232 18.4 16 18.4C16.768 18.4 17.392 17.7776 17.392 17.008V9.936C17.392 9.1696 16.768 8.528 16 8.528Z",
|
|
27
|
+
fill: "var(--icon-status-warning)"
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
), o = ({
|
|
33
|
+
variant: i,
|
|
34
|
+
icon: a,
|
|
35
|
+
title: e,
|
|
36
|
+
subtitle: t
|
|
37
|
+
}) => /* @__PURE__ */ n("div", { class: `IncodeGovtValidation IncodeGovtValidation--${i}`, children: /* @__PURE__ */ n(r, { className: "IncodeGovtValidationPage", children: /* @__PURE__ */ n("div", { class: "IncodeGovtValidationStatus", children: [
|
|
38
|
+
/* @__PURE__ */ n(a, { size: 64 }),
|
|
39
|
+
/* @__PURE__ */ n("p", { class: "IncodeGovtValidationText", children: e }),
|
|
40
|
+
t ? /* @__PURE__ */ n("p", { class: "IncodeGovtValidationText", children: t }) : null
|
|
41
|
+
] }) }) }), w = ({ title: i, subtitle: a }) => /* @__PURE__ */ n("div", { class: "IncodeGovtValidation IncodeGovtValidation--loading", children: /* @__PURE__ */ n(r, { className: "IncodeGovtValidationPage", children: /* @__PURE__ */ n(f, { title: i, subtitle: a, fullScreen: !1 }) }) }), S = ({
|
|
42
|
+
config: i,
|
|
43
|
+
onFinish: a
|
|
44
|
+
}) => {
|
|
45
|
+
const { t: e } = g(), [t, s] = v(() => {
|
|
46
|
+
if (!i)
|
|
47
|
+
throw new Error("GovernmentValidation config is required");
|
|
48
|
+
return h({ config: i });
|
|
49
|
+
});
|
|
50
|
+
if (i.backgroundExecution && t.status === "finished")
|
|
51
|
+
return a?.(), null;
|
|
52
|
+
if (t.status === "idle" || t.status === "loading")
|
|
53
|
+
return /* @__PURE__ */ n(
|
|
54
|
+
w,
|
|
55
|
+
{
|
|
56
|
+
title: `${e("ineCheck.verifying")} ${e("ineCheck.identity")}`
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
if (t.status === "finished")
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
61
|
+
o,
|
|
62
|
+
{
|
|
63
|
+
variant: "success",
|
|
64
|
+
icon: c,
|
|
65
|
+
title: e("ineCheck.verified")
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
if (t.status === "processing")
|
|
69
|
+
return /* @__PURE__ */ n(
|
|
70
|
+
o,
|
|
71
|
+
{
|
|
72
|
+
variant: "success",
|
|
73
|
+
icon: c,
|
|
74
|
+
title: e("ineCheck.processing")
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
if (t.status === "awaitingOtp" || t.status === "verifyingOtp") {
|
|
78
|
+
const d = t.status === "verifyingOtp", l = t.status === "awaitingOtp" ? t.otpError : void 0;
|
|
79
|
+
return /* @__PURE__ */ n("div", { class: "IncodeGovtValidation IncodeGovtValidation--otp", children: /* @__PURE__ */ n(r, { className: "IncodeGovtValidationPage", children: [
|
|
80
|
+
/* @__PURE__ */ n(m, { size: 16 }),
|
|
81
|
+
/* @__PURE__ */ n("div", { class: "IncodeGovtValidationOtpInstructions", children: [
|
|
82
|
+
/* @__PURE__ */ n("p", { children: e("otp.insertSMS") }),
|
|
83
|
+
/* @__PURE__ */ n("p", { children: e("otp.focus") })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ n(
|
|
86
|
+
V,
|
|
87
|
+
{
|
|
88
|
+
resendTimer: t.status === "awaitingOtp" ? t.resendTimer : 0,
|
|
89
|
+
canResend: t.status === "awaitingOtp" ? t.canResend : !1,
|
|
90
|
+
error: l,
|
|
91
|
+
onSubmit: (u) => s.submitOtp(u),
|
|
92
|
+
onResend: () => s.resendOtp(),
|
|
93
|
+
onBack: () => {
|
|
94
|
+
},
|
|
95
|
+
isLoading: d
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] }) });
|
|
99
|
+
}
|
|
100
|
+
return t.status === "error" ? /* @__PURE__ */ n(
|
|
101
|
+
o,
|
|
102
|
+
{
|
|
103
|
+
variant: "error",
|
|
104
|
+
icon: C,
|
|
105
|
+
title: `${e("ineCheck.failure1")} ${e("ineCheck.failure2")}`
|
|
106
|
+
}
|
|
107
|
+
) : t.status === "unknown" ? /* @__PURE__ */ n(
|
|
108
|
+
o,
|
|
109
|
+
{
|
|
110
|
+
variant: "unknown",
|
|
111
|
+
icon: G,
|
|
112
|
+
title: e("ineCheck.unknown")
|
|
113
|
+
}
|
|
114
|
+
) : null;
|
|
115
|
+
}, k = ({
|
|
116
|
+
config: i,
|
|
117
|
+
onFinish: a
|
|
118
|
+
}) => /* @__PURE__ */ n(I, { children: i ? /* @__PURE__ */ n(S, { config: i, onFinish: a }) : null });
|
|
119
|
+
p(
|
|
120
|
+
k,
|
|
121
|
+
"incode-government-validation"
|
|
122
|
+
);
|
|
123
|
+
export {
|
|
124
|
+
k as GovernmentValidation
|
|
125
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
|
+
.IncodeGovtValidation {
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.IncodeGovtValidation .IncodeGovtValidationPage {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.IncodeGovtValidation .IncodeGovtValidationPage .IncodePageContent {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
flex: 1;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.IncodeGovtValidation .IncodeGovtValidationStatus {
|
|
25
|
+
text-align: center;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.IncodeGovtValidation .IncodeGovtValidationText {
|
|
33
|
+
margin-top: var(--spacing-12, var(--spacing-12, 12px));
|
|
34
|
+
font-family: var(--primitive-typography-family-dm-sans);
|
|
35
|
+
font-size: var(--typography-headline-h2-size);
|
|
36
|
+
font-weight: var(--typography-headline-h2-weight);
|
|
37
|
+
line-height: var(--typography-headline-h2-line-height);
|
|
38
|
+
letter-spacing: var(--typography-headline-h2-letter-spacing);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodePageContent {
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: center;
|
|
44
|
+
display: flex;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodeGovtValidationOtpInstructions {
|
|
48
|
+
margin-bottom: var(--spacing-12, var(--spacing-12, 12px));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.IncodeGovtValidation.IncodeGovtValidation--otp .IncodeGovtValidationPage .IncodeGovtValidationOtpInstructions p {
|
|
52
|
+
font-family: var(--primitive-typography-family-dm-sans);
|
|
53
|
+
font-size: var(--typography-body-lg-size);
|
|
54
|
+
font-weight: var(--typography-body-lg-weight);
|
|
55
|
+
line-height: var(--typography-body-lg-line-height);
|
|
56
|
+
letter-spacing: var(--typography-body-lg-letter-spacing);
|
|
57
|
+
font-size: var(--text-lg, 1.125rem);
|
|
58
|
+
line-height: var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));
|
|
59
|
+
text-wrap: nowrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.IncodeWarningIcon {
|
|
63
|
+
color: var(--icon-status-warning);
|
|
64
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'preact/compat';
|
|
2
|
+
import { GovernmentValidationConfig } from '@incodetech/core/government-validation';
|
|
3
|
+
|
|
4
|
+
export declare const GovernmentValidation: FC<GovernmentValidationProps>;
|
|
5
|
+
|
|
6
|
+
declare type GovernmentValidationProps = IncodeModuleProps<GovernmentValidationConfig>;
|
|
7
|
+
|
|
8
|
+
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
9
|
+
/**
|
|
10
|
+
* Module configuration required to render the flow.
|
|
11
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
12
|
+
*/
|
|
13
|
+
config?: TConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Callback invoked when the module completes successfully.
|
|
16
|
+
* @param result - Optional result data from the module completion
|
|
17
|
+
*/
|
|
18
|
+
onFinish?: (result?: TResult) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Callback invoked when a fatal module error occurs.
|
|
21
|
+
*/
|
|
22
|
+
onError?: (error: string | undefined) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { }
|
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-20260217-d00c4c5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"libphonenumber-js": "^1.11.0",
|
|
80
80
|
"preact-custom-element": "^4.6.0",
|
|
81
81
|
"tailwindcss": "^4.1.17",
|
|
82
|
-
"@incodetech/core": "0.0.0-dev-
|
|
82
|
+
"@incodetech/core": "0.0.0-dev-20260217-d00c4c5"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@microsoft/api-extractor": "^7.53.3",
|