@incodetech/web 0.0.0-dev-20260317-ce5d28b → 0.0.0-dev-20260317-6ffceac
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/{addressAutocomplete-CL7IcYGQ.js → addressAutocomplete-3u5x8ZFs.js} +2 -2
- package/dist/base.css +25 -70
- package/dist/curp-validation/curp-validation.es.js +59 -58
- package/dist/dropdownComposed-B5ZuQS8C.js +345 -0
- package/dist/{ekybModule-CV7jE8qz.js → ekybModule-BKSouMz6.js} +8 -7
- package/dist/{ekycModule-fxKjsL1i.js → ekycModule-CWu3ZTNN.js} +4 -4
- package/dist/email/email.es.js +87 -86
- package/dist/extensibility.es.js +59 -58
- package/dist/flow/flow.es.js +2 -2
- package/dist/{formField-B2HDj15w.js → formField-UWsp-7Fj.js} +1 -1
- package/dist/governmentValidation/governmentValidation.es.js +1 -1
- package/dist/inputComposed-BHi-MSpP.js +102 -0
- package/dist/otpInput-DdkvlvCS.js +107 -0
- package/dist/phone/phone.es.js +58 -64
- package/dist/{phoneInputComposed-D0oBe-el.js → phoneInputComposed-CwtJKvGh.js} +7 -6
- package/package.json +2 -2
- package/dist/dropdownComposed-DBm7cotT.js +0 -440
- package/dist/otpInput-cazUY73p.js +0 -151
package/dist/extensibility.es.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { u as e, d as l, B as V } from "./button-Ca1tRSTI.js";
|
|
2
2
|
import { I as Y, e as _, S as N, a as ee, b as ae } from "./button-Ca1tRSTI.js";
|
|
3
|
-
import { s as re, u as
|
|
3
|
+
import { s as re, u as te } from "./uiConfig-Z6RT23Sl.js";
|
|
4
4
|
import { P as se } from "./page-BVHG3h0V.js";
|
|
5
5
|
import { C as ie, F as le, M as de } from "./fileIcon-DOyMcRWU.js";
|
|
6
|
-
import { S as ue, T as he, a as Ce, b as xe, c as
|
|
6
|
+
import { S as ue, T as he, a as Ce, b as xe, c as me, d as Ie } from "./spinner-Cx3FPUCD.js";
|
|
7
7
|
import { P as be } from "./processing-CDgOueI3.js";
|
|
8
8
|
import { E as ve } from "./errorContent-yUAdbZ5o.js";
|
|
9
|
-
import { F as ye, V as we } from "./formField-
|
|
9
|
+
import { F as ye, V as we } from "./formField-UWsp-7Fj.js";
|
|
10
10
|
import { a as Be, C as Le, c as Me, b as Se, e as Fe, d as De, H as He, L as Pe, P as Ve } from "./captureFooter-X2qN1773.js";
|
|
11
|
-
import {
|
|
12
|
-
import { O as
|
|
11
|
+
import { a as Oe, I as Re } from "./inputComposed-BHi-MSpP.js";
|
|
12
|
+
import { O as je } from "./otpInput-DdkvlvCS.js";
|
|
13
13
|
import { D as E, d as O, A as R, y as W, q as j } from "./vendor-preact-BXf0bkEs.js";
|
|
14
14
|
import { E as U } from "./errorIcon-BL647nVh.js";
|
|
15
|
-
import { P as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { C as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
15
|
+
import { P as $e } from "./phoneInputComposed-CwtJKvGh.js";
|
|
16
|
+
import { D as Ae, S as Ze } from "./dropdownComposed-B5ZuQS8C.js";
|
|
17
|
+
import { C as Ge, D as Je } from "./dateInputComposed-CvFmQpJ0.js";
|
|
18
|
+
import { B as Qe, L as Xe, P as Ye } from "./permissions-DwF2Ez1N.js";
|
|
19
|
+
import { C as Ne } from "./chevronDown-BUaOuf9J.js";
|
|
20
|
+
import { C as aa } from "./closeIcon-BM7WLbKp.js";
|
|
21
|
+
import { S as ra } from "./successIcon-BybULRRU.js";
|
|
22
|
+
import { c as na, a as sa, g as ca } from "./countries-C9bhJe4u.js";
|
|
23
|
+
import { C as la, T as da } from "./tutorial-Dagmccxh.js";
|
|
24
|
+
import { a as ua, C as ha, b as Ca, I as xa, F as ma, T as Ia } from "./flipAnimation-DoMQoFPb.js";
|
|
24
25
|
const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
25
26
|
"svg",
|
|
26
27
|
{
|
|
@@ -71,11 +72,11 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
71
72
|
({
|
|
72
73
|
id: a,
|
|
73
74
|
label: o,
|
|
74
|
-
size:
|
|
75
|
+
size: t = "m",
|
|
75
76
|
checked: r,
|
|
76
77
|
defaultChecked: c,
|
|
77
78
|
disabled: i = !1,
|
|
78
|
-
required:
|
|
79
|
+
required: n = !1,
|
|
79
80
|
name: b,
|
|
80
81
|
value: g,
|
|
81
82
|
onChange: v,
|
|
@@ -89,9 +90,9 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
89
90
|
"aria-invalid": T,
|
|
90
91
|
...B
|
|
91
92
|
}, L) => {
|
|
92
|
-
const [M, S] = O(!!c), p = r !== void 0, x = p ? !!r : M, u = !!i, F = !!
|
|
93
|
+
const [M, S] = O(!!c), p = r !== void 0, x = p ? !!r : M, u = !!i, F = !!n, D = typeof h == "string" ? h : void 0, H = (f) => {
|
|
93
94
|
p || S(f.target.checked), v?.(f);
|
|
94
|
-
},
|
|
95
|
+
}, m = d ? `${a}-helper` : void 0, I = s ? `${a}-error` : void 0, P = [w, I, m].filter(Boolean).join(" ") || void 0;
|
|
95
96
|
return /* @__PURE__ */ e("div", { class: l("IncodeCheckbox", D), children: [
|
|
96
97
|
/* @__PURE__ */ e(
|
|
97
98
|
"label",
|
|
@@ -113,7 +114,7 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
113
114
|
value: g,
|
|
114
115
|
...p ? { checked: r } : { defaultChecked: c },
|
|
115
116
|
disabled: i,
|
|
116
|
-
required:
|
|
117
|
+
required: n,
|
|
117
118
|
onChange: H,
|
|
118
119
|
"aria-label": y,
|
|
119
120
|
"aria-labelledby": C,
|
|
@@ -139,14 +140,14 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
139
140
|
"span",
|
|
140
141
|
{
|
|
141
142
|
class: l("IncodeCheckboxText", {
|
|
142
|
-
IncodeCheckboxTextS:
|
|
143
|
-
IncodeCheckboxTextM:
|
|
143
|
+
IncodeCheckboxTextS: t === "s",
|
|
144
|
+
IncodeCheckboxTextM: t === "m",
|
|
144
145
|
IncodeCheckboxTextDisabled: u
|
|
145
146
|
}),
|
|
146
147
|
"aria-hidden": C ? "true" : void 0,
|
|
147
148
|
children: [
|
|
148
149
|
o,
|
|
149
|
-
|
|
150
|
+
n && /* @__PURE__ */ e("span", { class: "IncodeCheckboxRequired", "aria-hidden": "true", children: "*" })
|
|
150
151
|
]
|
|
151
152
|
}
|
|
152
153
|
)
|
|
@@ -160,7 +161,7 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
160
161
|
"data-testid": `${a}-error-wrapper`,
|
|
161
162
|
children: [
|
|
162
163
|
k && /* @__PURE__ */ e("div", { class: "IncodeCheckboxIconWrapper", children: /* @__PURE__ */ e(U, { size: 17 }) }),
|
|
163
|
-
/* @__PURE__ */ e("p", { id:
|
|
164
|
+
/* @__PURE__ */ e("p", { id: I, class: "IncodeCheckboxErrorText", children: s })
|
|
164
165
|
]
|
|
165
166
|
}
|
|
166
167
|
),
|
|
@@ -169,7 +170,7 @@ const $ = ({ size: a = 28 }) => /* @__PURE__ */ e(
|
|
|
169
170
|
{
|
|
170
171
|
class: "IncodeCheckboxMessageWrapper",
|
|
171
172
|
"data-testid": `${a}-helper-wrapper`,
|
|
172
|
-
children: /* @__PURE__ */ e("p", { id:
|
|
173
|
+
children: /* @__PURE__ */ e("p", { id: m, class: "IncodeCheckboxHelperText", children: d })
|
|
173
174
|
}
|
|
174
175
|
)
|
|
175
176
|
] });
|
|
@@ -180,13 +181,13 @@ function q(a) {
|
|
|
180
181
|
return null;
|
|
181
182
|
const o = document.createElement("canvas");
|
|
182
183
|
o.width = a.videoWidth, o.height = a.videoHeight;
|
|
183
|
-
const
|
|
184
|
-
return
|
|
184
|
+
const t = o.getContext("2d");
|
|
185
|
+
return t ? (t.drawImage(a, 0, 0), o.toDataURL("image/jpeg", 0.92).split(",")[1] ?? null) : null;
|
|
185
186
|
}
|
|
186
187
|
const K = ({
|
|
187
188
|
stream: a,
|
|
188
189
|
onCapture: o,
|
|
189
|
-
disabled:
|
|
190
|
+
disabled: t
|
|
190
191
|
}) => {
|
|
191
192
|
const r = R(null);
|
|
192
193
|
W(() => {
|
|
@@ -195,10 +196,10 @@ const K = ({
|
|
|
195
196
|
}, [a]);
|
|
196
197
|
const c = j(() => {
|
|
197
198
|
const i = r.current;
|
|
198
|
-
if (!i ||
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
}, [o,
|
|
199
|
+
if (!i || t) return;
|
|
200
|
+
const n = q(i);
|
|
201
|
+
n && o(n);
|
|
202
|
+
}, [o, t]);
|
|
202
203
|
return /* @__PURE__ */ e("div", { class: "IncodeManualCapture", children: [
|
|
203
204
|
/* @__PURE__ */ e("div", { class: "IncodeManualCaptureVideoContainer", children: /* @__PURE__ */ e(
|
|
204
205
|
"video",
|
|
@@ -217,7 +218,7 @@ const K = ({
|
|
|
217
218
|
variant: "primary",
|
|
218
219
|
size: "L",
|
|
219
220
|
onClick: c,
|
|
220
|
-
disabled:
|
|
221
|
+
disabled: t,
|
|
221
222
|
class: "IncodeManualCaptureButton",
|
|
222
223
|
"aria-label": "Capture document",
|
|
223
224
|
children: "Capture"
|
|
@@ -226,9 +227,9 @@ const K = ({
|
|
|
226
227
|
] });
|
|
227
228
|
};
|
|
228
229
|
export {
|
|
229
|
-
|
|
230
|
+
Qe as BaseTutorial,
|
|
230
231
|
V as Button,
|
|
231
|
-
|
|
232
|
+
Ge as CalendarIcon,
|
|
232
233
|
Be as CameraFrame,
|
|
233
234
|
ie as CameraIcon,
|
|
234
235
|
Le as CameraOverlay,
|
|
@@ -238,53 +239,53 @@ export {
|
|
|
238
239
|
De as CaptureFooter,
|
|
239
240
|
J as Checkbox,
|
|
240
241
|
$ as CheckmarkIcon,
|
|
241
|
-
|
|
242
|
+
Ne as ChevronDown,
|
|
242
243
|
G as ChevronRightIcon,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
aa as CloseIcon,
|
|
245
|
+
Je as DateInputComposed,
|
|
246
|
+
Ae as DropdownComposed,
|
|
246
247
|
ve as ErrorContent,
|
|
247
248
|
U as ErrorIcon,
|
|
248
249
|
le as FileIcon,
|
|
249
250
|
ye as FormField,
|
|
250
251
|
He as HelpIcon,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
ua as IdCapture,
|
|
253
|
+
ha as IdChooser,
|
|
254
|
+
Ca as IdError,
|
|
255
|
+
xa as IdExpired,
|
|
256
|
+
ma as IdFlipAnimation,
|
|
256
257
|
Ia as IdTutorial,
|
|
257
258
|
Y as IncodeComponent,
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
Oe as Input,
|
|
260
|
+
Re as InputComposed,
|
|
260
261
|
_ as LandscapeBlocker,
|
|
261
262
|
Pe as LockIcon,
|
|
262
|
-
|
|
263
|
+
Xe as Lottie,
|
|
263
264
|
K as ManualCapture,
|
|
264
265
|
de as Modal,
|
|
265
|
-
|
|
266
|
+
je as OtpInput,
|
|
266
267
|
se as Page,
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
Ye as Permissions,
|
|
269
|
+
$e as PhoneInputComposed,
|
|
269
270
|
be as Processing,
|
|
270
271
|
Ve as ProgressBar,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
Ze as SearchIcon,
|
|
273
|
+
la as SelfieCapture,
|
|
274
|
+
da as SelfieTutorial,
|
|
274
275
|
N as Spacer,
|
|
275
276
|
ue as Spinner,
|
|
276
|
-
|
|
277
|
+
ra as SuccessIcon,
|
|
277
278
|
he as Title,
|
|
278
279
|
Ce as TypographyH1,
|
|
279
280
|
xe as TypographyH3,
|
|
280
|
-
|
|
281
|
-
|
|
281
|
+
me as TypographyH4,
|
|
282
|
+
Ie as TypographyH5,
|
|
282
283
|
we as VerificationResult,
|
|
283
284
|
na as countries,
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
sa as getCountryByCallingCode,
|
|
286
|
+
ca as getCountryByCode,
|
|
286
287
|
re as setUiConfig,
|
|
287
288
|
ee as useManager,
|
|
288
|
-
|
|
289
|
+
te as useScreenOrientation,
|
|
289
290
|
ae as useTranslation
|
|
290
291
|
};
|
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-CWu3ZTNN.js").then((e) => e.EkycModule),
|
|
2004
|
+
EKYB: () => import("../ekybModule-BKSouMz6.js").then((e) => e.EkybModule),
|
|
2005
2005
|
DOCUMENT_CAPTURE: () => import("../documentCapture-PdKA2frR.js").then(
|
|
2006
2006
|
(e) => e.DocumentCapture
|
|
2007
2007
|
),
|
|
@@ -5,7 +5,7 @@ import { E as b } from "./errorIcon-BL647nVh.js";
|
|
|
5
5
|
import { S as y } from "./successIcon-BybULRRU.js";
|
|
6
6
|
import { P as m } from "./page-BVHG3h0V.js";
|
|
7
7
|
import { S as F } from "./spinner-Cx3FPUCD.js";
|
|
8
|
-
import { I as E } from "./
|
|
8
|
+
import { I as E } from "./inputComposed-BHi-MSpP.js";
|
|
9
9
|
const L = ({
|
|
10
10
|
status: i,
|
|
11
11
|
submittingTitle: t,
|
|
@@ -6,7 +6,7 @@ import "../uiConfig-Z6RT23Sl.js";
|
|
|
6
6
|
import { E as h } from "../errorIcon-BL647nVh.js";
|
|
7
7
|
import { S as c } from "../successIcon-BybULRRU.js";
|
|
8
8
|
import { W as I } from "../warningIcon-DyoKeqDd.js";
|
|
9
|
-
import { O as V } from "../otpInput-
|
|
9
|
+
import { O as V } from "../otpInput-DdkvlvCS.js";
|
|
10
10
|
import { P as r } from "../page-BVHG3h0V.js";
|
|
11
11
|
import { S as G } from "../spinner-Cx3FPUCD.js";
|
|
12
12
|
import { r as S } from "../incodeModule-aE-LkKwM.js";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { u as o, d as m } from "./button-Ca1tRSTI.js";
|
|
2
|
+
import { D as u } from "./vendor-preact-BXf0bkEs.js";
|
|
3
|
+
import { C as W } from "./closeIcon-BM7WLbKp.js";
|
|
4
|
+
import { E as y } from "./errorIcon-BL647nVh.js";
|
|
5
|
+
import { S as E } from "./successIcon-BybULRRU.js";
|
|
6
|
+
const w = u((e, n) => {
|
|
7
|
+
const { class: a, type: s = "text", ...r } = e;
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
"input",
|
|
10
|
+
{
|
|
11
|
+
...r,
|
|
12
|
+
ref: n,
|
|
13
|
+
type: s,
|
|
14
|
+
class: m("IncodeInput", a)
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}), j = u(
|
|
18
|
+
({
|
|
19
|
+
id: e,
|
|
20
|
+
label: n,
|
|
21
|
+
"aria-label": a,
|
|
22
|
+
type: s,
|
|
23
|
+
error: r,
|
|
24
|
+
showErrorIcon: C,
|
|
25
|
+
helper: t,
|
|
26
|
+
showHelperIcon: h,
|
|
27
|
+
closeButton: p,
|
|
28
|
+
required: l,
|
|
29
|
+
suppressMessages: d = !1,
|
|
30
|
+
class: v,
|
|
31
|
+
value: c,
|
|
32
|
+
...b
|
|
33
|
+
}, f) => {
|
|
34
|
+
const i = `${e}-helper`, I = `${e}-error`, $ = d ? "" : [t ? i : null, r ? I : null].filter(Boolean).join(" ");
|
|
35
|
+
return /* @__PURE__ */ o("div", { class: m("IncodeInputComposed", v), children: [
|
|
36
|
+
n && /* @__PURE__ */ o(
|
|
37
|
+
"label",
|
|
38
|
+
{
|
|
39
|
+
class: "IncodeInputComposedLabel",
|
|
40
|
+
htmlFor: e,
|
|
41
|
+
"data-testid": `${e}-label`,
|
|
42
|
+
children: n
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ o("div", { class: "IncodeInputComposedWrapper", children: [
|
|
46
|
+
/* @__PURE__ */ o(
|
|
47
|
+
w,
|
|
48
|
+
{
|
|
49
|
+
id: e,
|
|
50
|
+
type: s,
|
|
51
|
+
...b,
|
|
52
|
+
ref: f,
|
|
53
|
+
required: l,
|
|
54
|
+
"data-has-value": !!(c && String(c).length > 0),
|
|
55
|
+
...!n && a ? { "aria-label": a } : {},
|
|
56
|
+
"aria-describedby": $ || void 0,
|
|
57
|
+
"aria-required": l ? "true" : void 0,
|
|
58
|
+
"aria-invalid": r ? "true" : void 0,
|
|
59
|
+
value: c
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
p?.show && /* @__PURE__ */ o(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
"aria-label": "Clear",
|
|
67
|
+
class: "IncodeInputComposedClearButton",
|
|
68
|
+
onClick: p.onClose,
|
|
69
|
+
"data-testid": `${e}-clear`,
|
|
70
|
+
children: /* @__PURE__ */ o(W, {})
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
!d && r && /* @__PURE__ */ o(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
class: "IncodeInputComposedErrorWrapper",
|
|
78
|
+
"data-testid": `${e}-error-wrapper`,
|
|
79
|
+
children: [
|
|
80
|
+
C && /* @__PURE__ */ o("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ o(y, { size: 17 }) }),
|
|
81
|
+
/* @__PURE__ */ o("p", { id: I, class: "IncodeInputComposedError", children: r })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
!d && t && !r && /* @__PURE__ */ o(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
class: "IncodeInputComposedHelperWrapper",
|
|
89
|
+
"data-testid": `${e}-helper-wrapper`,
|
|
90
|
+
children: [
|
|
91
|
+
h && /* @__PURE__ */ o("div", { class: "IncodeInputComposedIconWrapper", children: /* @__PURE__ */ o(E, { size: 17 }) }),
|
|
92
|
+
/* @__PURE__ */ o("p", { id: i, class: "IncodeInputComposedHelper", children: t })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
export {
|
|
100
|
+
j as I,
|
|
101
|
+
w as a
|
|
102
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { b as P, u as e, S as O, B as b } from "./button-Ca1tRSTI.js";
|
|
2
|
+
import { d as D, A as g, y as m } from "./vendor-preact-BXf0bkEs.js";
|
|
3
|
+
import { I as M } from "./inputComposed-BHi-MSpP.js";
|
|
4
|
+
import "./uiConfig-Z6RT23Sl.js";
|
|
5
|
+
const s = 6, N = (r) => {
|
|
6
|
+
const u = Math.floor(r / 60), a = r % 60;
|
|
7
|
+
return `${u}:${a.toString().padStart(2, "0")}`;
|
|
8
|
+
}, v = (r) => r.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, s), E = ({
|
|
9
|
+
resendTimer: r,
|
|
10
|
+
canResend: u,
|
|
11
|
+
error: a,
|
|
12
|
+
onSubmit: p,
|
|
13
|
+
onResend: x,
|
|
14
|
+
onBack: k,
|
|
15
|
+
backLinkText: f = "otp.changePhoneNumber",
|
|
16
|
+
disabled: i = !1,
|
|
17
|
+
isLoading: t = !1
|
|
18
|
+
}) => {
|
|
19
|
+
const { t: c } = P(), [n, I] = D(""), d = g(null), C = g(0);
|
|
20
|
+
m(() => {
|
|
21
|
+
d.current && d.current.focus();
|
|
22
|
+
}, []), m(() => {
|
|
23
|
+
a && setTimeout(() => {
|
|
24
|
+
d.current?.focus();
|
|
25
|
+
}, 0);
|
|
26
|
+
}, [a]), m(() => {
|
|
27
|
+
if (!n) return;
|
|
28
|
+
const o = n.length === s && C.current < s;
|
|
29
|
+
C.current = n.length, o && !t && p(n);
|
|
30
|
+
}, [n, t, p]);
|
|
31
|
+
const T = (o) => {
|
|
32
|
+
o.target.select();
|
|
33
|
+
}, y = (o) => {
|
|
34
|
+
const h = o.target;
|
|
35
|
+
I(v(h.value));
|
|
36
|
+
}, z = (o) => {
|
|
37
|
+
o.preventDefault();
|
|
38
|
+
const h = o.clipboardData?.getData("text") || "", l = v(h);
|
|
39
|
+
l && (I(l), l.length === s && !t && p(l));
|
|
40
|
+
}, A = () => /* @__PURE__ */ e("div", { class: "IncodeOtpInputActions", children: u && !t ? /* @__PURE__ */ e("p", { class: "IncodeOtpInputResendText", "data-testid": "otp-resend-section", children: [
|
|
41
|
+
c("otp.didYouNotGetIt"),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
class: "IncodeOtpInputLink",
|
|
47
|
+
onClick: x,
|
|
48
|
+
disabled: i || t,
|
|
49
|
+
"data-testid": "otp-resend",
|
|
50
|
+
children: c("otp.resendCode")
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
` ${c("otp.or")} `,
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
"button",
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
class: "IncodeOtpInputLink",
|
|
59
|
+
onClick: k,
|
|
60
|
+
disabled: i || t,
|
|
61
|
+
"data-testid": "otp-back",
|
|
62
|
+
children: c(f)
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }) : t ? null : /* @__PURE__ */ e(b, { variant: "link", disabled: !0, "data-testid": "otp-timer", children: c("otp.resendCountdown", { time: N(r) }) }) });
|
|
66
|
+
return /* @__PURE__ */ e("div", { class: "IncodeOtpInput IncodeOtpInputComposed", children: [
|
|
67
|
+
/* @__PURE__ */ e(
|
|
68
|
+
M,
|
|
69
|
+
{
|
|
70
|
+
id: "otp-code",
|
|
71
|
+
type: "text",
|
|
72
|
+
inputMode: "text",
|
|
73
|
+
ref: d,
|
|
74
|
+
maxLength: s,
|
|
75
|
+
value: n,
|
|
76
|
+
error: a,
|
|
77
|
+
onInput: y,
|
|
78
|
+
onPaste: z,
|
|
79
|
+
onFocus: T,
|
|
80
|
+
disabled: i || t,
|
|
81
|
+
autocomplete: "one-time-code",
|
|
82
|
+
"data-testid": "otp-input-0",
|
|
83
|
+
"aria-label": c(f),
|
|
84
|
+
class: "IncodeOtpSingleInput",
|
|
85
|
+
showErrorIcon: !0
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ e(O, {}),
|
|
89
|
+
/* @__PURE__ */ e(
|
|
90
|
+
b,
|
|
91
|
+
{
|
|
92
|
+
onClick: () => {
|
|
93
|
+
n.length === s && p(n);
|
|
94
|
+
},
|
|
95
|
+
disabled: n.length < s || t,
|
|
96
|
+
isLoading: t,
|
|
97
|
+
"data-testid": "otp-submit",
|
|
98
|
+
children: c("common.continue")
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ e(O, { size: 12 }),
|
|
102
|
+
A()
|
|
103
|
+
] });
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
E as O
|
|
107
|
+
};
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
import { u as e, I as
|
|
2
|
-
import { createPhoneManager as
|
|
3
|
-
import { d as
|
|
1
|
+
import { u as e, I as b, b as O, a as I, S as C, B as E } from "../button-Ca1tRSTI.js";
|
|
2
|
+
import { createPhoneManager as S } from "@incodetech/core/phone";
|
|
3
|
+
import { d as v } from "../vendor-preact-BXf0bkEs.js";
|
|
4
|
+
import "../uiConfig-Z6RT23Sl.js";
|
|
4
5
|
import "@incodetech/core";
|
|
5
|
-
import { O as y } from "../otpInput-
|
|
6
|
-
import { P as
|
|
7
|
-
import { r as
|
|
8
|
-
import { PhoneInput as
|
|
9
|
-
const
|
|
6
|
+
import { O as y } from "../otpInput-DdkvlvCS.js";
|
|
7
|
+
import { P as m } from "../page-BVHG3h0V.js";
|
|
8
|
+
import { r as w } from "../incodeModule-aE-LkKwM.js";
|
|
9
|
+
import { PhoneInput as k } from "../phoneInput-Duuochsh.js";
|
|
10
|
+
const B = ({
|
|
10
11
|
config: n,
|
|
11
|
-
manager:
|
|
12
|
-
onFinish:
|
|
13
|
-
onError:
|
|
12
|
+
manager: r,
|
|
13
|
+
onFinish: a,
|
|
14
|
+
onError: u
|
|
14
15
|
}) => {
|
|
15
|
-
const [t,
|
|
16
|
+
const { t: s } = O(), [t, o] = I(
|
|
16
17
|
() => {
|
|
17
|
-
if (
|
|
18
|
+
if (r) return r;
|
|
18
19
|
if (!n)
|
|
19
20
|
throw new Error("Phone config is required");
|
|
20
|
-
return
|
|
21
|
+
return S({ config: n });
|
|
21
22
|
},
|
|
22
|
-
{ manageLifecycle: !
|
|
23
|
-
), [c,
|
|
23
|
+
{ manageLifecycle: !r }
|
|
24
|
+
), [c, h] = v(!1);
|
|
24
25
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingOtp") {
|
|
25
|
-
const
|
|
26
|
+
const i = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingOtp", p = t.status === "inputting" ? t.countryCode : "US", f = t.status === "inputting" ? t.phonePrefix : "+1", g = t.status === "inputting" ? t.prefilledPhone : void 0, P = t.status === "inputting" && t.phoneError ? s(t.phoneError) : void 0;
|
|
26
27
|
return /* @__PURE__ */ e(
|
|
27
|
-
|
|
28
|
+
m,
|
|
28
29
|
{
|
|
29
30
|
className: "IncodePhonePage",
|
|
30
|
-
title: "
|
|
31
|
-
subtitle: n.otpVerification ? "
|
|
31
|
+
title: s("phone.verify"),
|
|
32
|
+
subtitle: n.otpVerification ? s("email.willSendCode") : void 0,
|
|
32
33
|
children: [
|
|
33
34
|
/* @__PURE__ */ e(
|
|
34
|
-
|
|
35
|
+
k,
|
|
35
36
|
{
|
|
36
|
-
countryCode:
|
|
37
|
-
phonePrefix:
|
|
38
|
-
prefilledPhone:
|
|
39
|
-
phoneError:
|
|
37
|
+
countryCode: p,
|
|
38
|
+
phonePrefix: f,
|
|
39
|
+
prefilledPhone: g,
|
|
40
|
+
phoneError: P,
|
|
40
41
|
optinEnabled: n.optinEnabled,
|
|
41
|
-
disabled:
|
|
42
|
-
onPhoneChange: (d,
|
|
43
|
-
|
|
42
|
+
disabled: i,
|
|
43
|
+
onPhoneChange: (d, l) => {
|
|
44
|
+
o.setPhoneNumber(d, l), h(l);
|
|
44
45
|
},
|
|
45
|
-
onOptInChange: (d) =>
|
|
46
|
+
onOptInChange: (d) => o.setOptInGranted(d)
|
|
46
47
|
}
|
|
47
48
|
),
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(C, {}),
|
|
49
50
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
51
|
+
E,
|
|
51
52
|
{
|
|
52
|
-
onClick: () =>
|
|
53
|
+
onClick: () => o.submit(),
|
|
53
54
|
disabled: !c,
|
|
54
|
-
isLoading:
|
|
55
|
+
isLoading: i,
|
|
55
56
|
"data-testid": "phone-submit",
|
|
56
|
-
children: "
|
|
57
|
+
children: s("common.continue")
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
]
|
|
@@ -61,43 +62,36 @@ const S = ({
|
|
|
61
62
|
);
|
|
62
63
|
}
|
|
63
64
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError") {
|
|
64
|
-
const
|
|
65
|
-
return /* @__PURE__ */ e(
|
|
66
|
-
|
|
65
|
+
const i = t.status === "verifyingOtp";
|
|
66
|
+
return /* @__PURE__ */ e(m, { className: "IncodePhonePage", title: s("otp.enterCodeSMS"), children: /* @__PURE__ */ e(
|
|
67
|
+
y,
|
|
67
68
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
error: t.status === "otpError" ? t.error : void 0,
|
|
76
|
-
onSubmit: (u) => s.submitOtp(u),
|
|
77
|
-
onResend: () => s.resendOtp(),
|
|
78
|
-
onBack: () => s.back(),
|
|
79
|
-
isLoading: o
|
|
80
|
-
}
|
|
81
|
-
)
|
|
69
|
+
resendTimer: t.status === "awaitingOtp" ? t.resendTimer : 0,
|
|
70
|
+
canResend: t.status === "awaitingOtp" ? t.canResend : !1,
|
|
71
|
+
error: t.status === "otpError" ? s(t.error) : void 0,
|
|
72
|
+
onSubmit: (p) => o.submitOtp(p),
|
|
73
|
+
onResend: () => o.resendOtp(),
|
|
74
|
+
onBack: () => o.back(),
|
|
75
|
+
isLoading: i
|
|
82
76
|
}
|
|
83
|
-
);
|
|
77
|
+
) });
|
|
84
78
|
}
|
|
85
|
-
return t.status === "finished" ? (
|
|
86
|
-
},
|
|
79
|
+
return t.status === "finished" ? (a?.(), null) : (t.status === "error" && u?.(t.error), null);
|
|
80
|
+
}, L = ({
|
|
87
81
|
config: n,
|
|
88
|
-
manager:
|
|
89
|
-
onFinish:
|
|
90
|
-
onError:
|
|
91
|
-
}) => /* @__PURE__ */ e(
|
|
92
|
-
|
|
82
|
+
manager: r,
|
|
83
|
+
onFinish: a,
|
|
84
|
+
onError: u
|
|
85
|
+
}) => /* @__PURE__ */ e(b, { children: n ? /* @__PURE__ */ e(
|
|
86
|
+
B,
|
|
93
87
|
{
|
|
94
88
|
config: n,
|
|
95
|
-
manager:
|
|
96
|
-
onFinish:
|
|
97
|
-
onError:
|
|
89
|
+
manager: r,
|
|
90
|
+
onFinish: a,
|
|
91
|
+
onError: u
|
|
98
92
|
}
|
|
99
93
|
) : null });
|
|
100
|
-
|
|
94
|
+
w(L, "incode-phone");
|
|
101
95
|
export {
|
|
102
|
-
|
|
96
|
+
L as Phone
|
|
103
97
|
};
|