@incodetech/web 0.0.0-dev-20260402-43cf9b8 → 0.0.0-dev-20260402-7cf9db4
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/email/email.es.js +59 -59
- package/dist/phone/phone.es.js +31 -31
- package/package.json +2 -2
package/dist/email/email.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { b, u as e, I as O, a as
|
|
1
|
+
import { b as v, u as e, I as O, a as w, S as C, B as y } from "../button-DXIWeie9.js";
|
|
2
2
|
import { createEmailManager as P } from "@incodetech/core/email";
|
|
3
|
-
import { d as
|
|
3
|
+
import { d as b, y as V } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { O as
|
|
5
|
+
import { O as R } from "../otpInput-B85heGC5.js";
|
|
6
6
|
import { P as I } from "../page-D4OThpFS.js";
|
|
7
|
-
import { r as
|
|
7
|
+
import { r as S } from "../incodeModule-C4XIllao.js";
|
|
8
8
|
import "../uiConfig-DmIn-g8M.js";
|
|
9
9
|
import "../typography-CBPoLoAP.js";
|
|
10
|
-
import { a as
|
|
10
|
+
import { a as k } from "../inputComposed-QzDneavl.js";
|
|
11
11
|
import "../checkbox-wo8qk7tM.js";
|
|
12
12
|
import "../phoneInputComposed-BAFZQ4Y8.js";
|
|
13
13
|
import "../dateInputComposed-D5kgh_aC.js";
|
|
@@ -15,43 +15,43 @@ import "../captureOverlay-Crv6ZBp_.js";
|
|
|
15
15
|
import "../manualCaptureButton-CPZ2xxEI.js";
|
|
16
16
|
import "../captureFooter-CKqO4KY2.js";
|
|
17
17
|
import "../countries-DfLkrF0x.js";
|
|
18
|
-
const
|
|
18
|
+
const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
19
19
|
prefilledEmail: i,
|
|
20
20
|
emailError: s,
|
|
21
|
-
label:
|
|
22
|
-
disabled:
|
|
23
|
-
required:
|
|
21
|
+
label: d,
|
|
22
|
+
disabled: c = !1,
|
|
23
|
+
required: a = !1,
|
|
24
24
|
onEmailChange: t
|
|
25
25
|
}) => {
|
|
26
|
-
const { t:
|
|
26
|
+
const { t: l } = v(), [E, p] = b("");
|
|
27
27
|
V(() => {
|
|
28
28
|
if (i) {
|
|
29
29
|
p(i);
|
|
30
|
-
const
|
|
31
|
-
t(i.trim(),
|
|
30
|
+
const r = h.test(i.trim());
|
|
31
|
+
t(i.trim(), r);
|
|
32
32
|
}
|
|
33
33
|
}, [i, t]);
|
|
34
|
-
const f = (
|
|
35
|
-
const
|
|
36
|
-
p(
|
|
37
|
-
const
|
|
38
|
-
t(
|
|
39
|
-
},
|
|
34
|
+
const f = (r) => {
|
|
35
|
+
const m = r.target.value;
|
|
36
|
+
p(m);
|
|
37
|
+
const o = m.trim(), u = o.length > 0 && h.test(o);
|
|
38
|
+
t(o, u);
|
|
39
|
+
}, n = s ? "email-error" : void 0;
|
|
40
40
|
return /* @__PURE__ */ e("div", { class: "IncodeEmailInput", children: /* @__PURE__ */ e("div", { class: "IncodeEmailInputContainer", children: /* @__PURE__ */ e(
|
|
41
|
-
|
|
41
|
+
k,
|
|
42
42
|
{
|
|
43
43
|
id: "email-input",
|
|
44
44
|
type: "email",
|
|
45
45
|
value: E,
|
|
46
46
|
onInput: f,
|
|
47
|
-
placeholder:
|
|
48
|
-
disabled:
|
|
49
|
-
required:
|
|
50
|
-
label:
|
|
47
|
+
placeholder: l("email.placeholder"),
|
|
48
|
+
disabled: c,
|
|
49
|
+
required: a,
|
|
50
|
+
label: d,
|
|
51
51
|
"data-testid": "email-input",
|
|
52
|
-
"aria-label":
|
|
52
|
+
"aria-label": d ? void 0 : "Email address",
|
|
53
53
|
"aria-invalid": s ? "true" : void 0,
|
|
54
|
-
"aria-describedby":
|
|
54
|
+
"aria-describedby": n || void 0,
|
|
55
55
|
autocomplete: "email",
|
|
56
56
|
error: s,
|
|
57
57
|
showErrorIcon: !0
|
|
@@ -60,10 +60,10 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
60
60
|
}, T = ({
|
|
61
61
|
config: i,
|
|
62
62
|
manager: s,
|
|
63
|
-
onFinish:
|
|
64
|
-
onError:
|
|
63
|
+
onFinish: d,
|
|
64
|
+
onError: c
|
|
65
65
|
}) => {
|
|
66
|
-
const { t:
|
|
66
|
+
const { t: a } = v(), [t, l] = w(
|
|
67
67
|
() => {
|
|
68
68
|
if (s) return s;
|
|
69
69
|
if (!i)
|
|
@@ -71,36 +71,36 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
71
71
|
return P({ config: i });
|
|
72
72
|
},
|
|
73
73
|
{ manageLifecycle: !s }
|
|
74
|
-
), [E, p] =
|
|
74
|
+
), [E, p] = b(!1);
|
|
75
75
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
76
|
-
const
|
|
76
|
+
const n = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", r = t.status === "inputting" ? t.prefilledEmail : void 0, g = t.status === "inputting" && t.emailError ? a(t.emailError) : void 0, m = t.status === "inputting" ? t.otpVerification ?? !1 : !1;
|
|
77
77
|
return /* @__PURE__ */ e(
|
|
78
78
|
I,
|
|
79
79
|
{
|
|
80
80
|
className: "IncodeEmailPage",
|
|
81
|
-
title:
|
|
82
|
-
subtitle:
|
|
81
|
+
title: a("otp.enterCodeEmail"),
|
|
82
|
+
subtitle: m ? a("email.willSendCode") : void 0,
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
|
-
|
|
85
|
+
L,
|
|
86
86
|
{
|
|
87
|
-
prefilledEmail:
|
|
88
|
-
emailError:
|
|
89
|
-
disabled:
|
|
90
|
-
onEmailChange: (
|
|
91
|
-
|
|
87
|
+
prefilledEmail: r,
|
|
88
|
+
emailError: g,
|
|
89
|
+
disabled: n,
|
|
90
|
+
onEmailChange: (o, u) => {
|
|
91
|
+
l.setEmail(o, u), p(u);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */ e(
|
|
95
|
+
/* @__PURE__ */ e(C, {}),
|
|
96
96
|
/* @__PURE__ */ e(
|
|
97
97
|
y,
|
|
98
98
|
{
|
|
99
|
-
onClick: () =>
|
|
99
|
+
onClick: () => l.submit(),
|
|
100
100
|
disabled: !E,
|
|
101
|
-
isLoading:
|
|
101
|
+
isLoading: n,
|
|
102
102
|
"data-testid": "email-submit",
|
|
103
|
-
children:
|
|
103
|
+
children: a("common.continue")
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
]
|
|
@@ -108,45 +108,45 @@ const v = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, R = ({
|
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
111
|
-
const
|
|
111
|
+
const n = t.status === "verifyingOtp", r = t.status === "otpError", g = t.status === "awaitingOtp", m = t.status === "resendingOtp", o = g || r || n;
|
|
112
112
|
return /* @__PURE__ */ e(
|
|
113
113
|
I,
|
|
114
114
|
{
|
|
115
115
|
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
116
|
-
title:
|
|
116
|
+
title: a("otp.enterCodeEmail"),
|
|
117
117
|
children: /* @__PURE__ */ e(
|
|
118
|
-
|
|
118
|
+
R,
|
|
119
119
|
{
|
|
120
|
-
resendTimer:
|
|
121
|
-
canResend:
|
|
122
|
-
error:
|
|
123
|
-
isLoading:
|
|
124
|
-
disabled:
|
|
125
|
-
onSubmit: (
|
|
126
|
-
onResend: () =>
|
|
127
|
-
onBack: () =>
|
|
120
|
+
resendTimer: o ? t.resendTimer : 0,
|
|
121
|
+
canResend: o ? t.canResend : !1,
|
|
122
|
+
error: r ? a(t.otpError) : void 0,
|
|
123
|
+
isLoading: n,
|
|
124
|
+
disabled: m || n,
|
|
125
|
+
onSubmit: (u) => l.submitOtp(u),
|
|
126
|
+
onResend: () => l.resendOtp(),
|
|
127
|
+
onBack: () => l.back(),
|
|
128
128
|
backLinkText: "otp.changeEmail"
|
|
129
129
|
}
|
|
130
130
|
)
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
return t.status === "finished" ? (
|
|
134
|
+
return t.status === "finished" ? (d?.(), null) : (t.status === "error" && c?.(t.error), null);
|
|
135
135
|
}, B = ({
|
|
136
136
|
config: i,
|
|
137
137
|
manager: s,
|
|
138
|
-
onFinish:
|
|
139
|
-
onError:
|
|
138
|
+
onFinish: d,
|
|
139
|
+
onError: c
|
|
140
140
|
}) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
|
|
141
141
|
T,
|
|
142
142
|
{
|
|
143
143
|
config: i,
|
|
144
144
|
manager: s,
|
|
145
|
-
onFinish:
|
|
146
|
-
onError:
|
|
145
|
+
onFinish: d,
|
|
146
|
+
onError: c
|
|
147
147
|
}
|
|
148
148
|
) : null });
|
|
149
|
-
|
|
149
|
+
S(B, "incode-email");
|
|
150
150
|
export {
|
|
151
151
|
B as Email
|
|
152
152
|
};
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { u as e, I as O, b as C, a as E, S as
|
|
2
|
-
import { createPhoneManager as
|
|
3
|
-
import { d as
|
|
1
|
+
import { u as e, I as O, b as C, a as E, S as g, B as v } from "../button-DXIWeie9.js";
|
|
2
|
+
import { createPhoneManager as w } from "@incodetech/core/phone";
|
|
3
|
+
import { d as S } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "../uiConfig-DmIn-g8M.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
6
|
import { C as y } from "../checkbox-wo8qk7tM.js";
|
|
7
7
|
import { O as k } from "../otpInput-B85heGC5.js";
|
|
8
|
-
import { P
|
|
8
|
+
import { P } from "../page-D4OThpFS.js";
|
|
9
9
|
import { P as R } from "../phoneInputComposed-BAFZQ4Y8.js";
|
|
10
10
|
import { r as V } from "../incodeModule-C4XIllao.js";
|
|
11
11
|
const B = ({
|
|
12
|
-
config:
|
|
12
|
+
config: r,
|
|
13
13
|
manager: s,
|
|
14
14
|
onFinish: d,
|
|
15
15
|
onError: p
|
|
@@ -17,20 +17,20 @@ const B = ({
|
|
|
17
17
|
const { t: n } = C(), [t, o] = E(
|
|
18
18
|
() => {
|
|
19
19
|
if (s) return s;
|
|
20
|
-
if (!
|
|
20
|
+
if (!r)
|
|
21
21
|
throw new Error("Phone config is required");
|
|
22
|
-
return
|
|
22
|
+
return w({ config: r });
|
|
23
23
|
},
|
|
24
24
|
{ manageLifecycle: !s }
|
|
25
|
-
), [
|
|
25
|
+
), [b, I] = S(!1);
|
|
26
26
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
27
|
-
const
|
|
27
|
+
const i = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", l = t.status === "inputting" ? t.prefilledPhone : void 0, c = t.status === "inputting" && t.phoneError ? n(t.phoneError) : void 0, u = t.status === "inputting" ? t.otpVerification ?? !1 : !1, h = t.status === "inputting" ? t.optinEnabled ?? !1 : !1;
|
|
28
28
|
return /* @__PURE__ */ e(
|
|
29
|
-
|
|
29
|
+
P,
|
|
30
30
|
{
|
|
31
31
|
className: "IncodePhonePage",
|
|
32
32
|
title: n("phone.verify"),
|
|
33
|
-
subtitle:
|
|
33
|
+
subtitle: u ? n("email.willSendCode") : void 0,
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ e("div", { class: "IncodePhoneInputContainer", children: [
|
|
36
36
|
/* @__PURE__ */ e(
|
|
@@ -38,18 +38,18 @@ const B = ({
|
|
|
38
38
|
{
|
|
39
39
|
id: "phone",
|
|
40
40
|
countryCode: a,
|
|
41
|
-
value:
|
|
42
|
-
error:
|
|
43
|
-
disabled:
|
|
44
|
-
onChange: (m,
|
|
45
|
-
o.setPhoneNumber(m,
|
|
41
|
+
value: l,
|
|
42
|
+
error: c,
|
|
43
|
+
disabled: i,
|
|
44
|
+
onChange: (m, f) => {
|
|
45
|
+
o.setPhoneNumber(m, f), I(f);
|
|
46
46
|
},
|
|
47
47
|
"data-testid": "phone-input",
|
|
48
48
|
showErrorIcon: !0
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
|
|
51
|
+
/* @__PURE__ */ e(g, { size: 16 }),
|
|
52
|
+
h && /* @__PURE__ */ e(
|
|
53
53
|
y,
|
|
54
54
|
{
|
|
55
55
|
id: "phone-optin",
|
|
@@ -59,13 +59,13 @@ const B = ({
|
|
|
59
59
|
}
|
|
60
60
|
)
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(g, {}),
|
|
63
63
|
/* @__PURE__ */ e(
|
|
64
64
|
v,
|
|
65
65
|
{
|
|
66
66
|
onClick: () => o.submit(),
|
|
67
|
-
disabled: !
|
|
68
|
-
isLoading:
|
|
67
|
+
disabled: !b,
|
|
68
|
+
isLoading: i,
|
|
69
69
|
"data-testid": "phone-submit",
|
|
70
70
|
children: n("common.continue")
|
|
71
71
|
}
|
|
@@ -75,16 +75,16 @@ const B = ({
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
78
|
-
const
|
|
79
|
-
return /* @__PURE__ */ e(
|
|
78
|
+
const i = t.status === "verifyingOtp", a = t.status === "otpError", l = t.status === "awaitingOtp", c = t.status === "resendingOtp", u = l || a || i;
|
|
79
|
+
return /* @__PURE__ */ e(P, { className: "IncodePhonePage", title: n("otp.enterCodeSMS"), children: /* @__PURE__ */ e(
|
|
80
80
|
k,
|
|
81
81
|
{
|
|
82
|
-
resendTimer: u
|
|
83
|
-
canResend: u
|
|
84
|
-
isLoading:
|
|
85
|
-
disabled:
|
|
82
|
+
resendTimer: u ? t.resendTimer : 0,
|
|
83
|
+
canResend: u ? t.canResend : !1,
|
|
84
|
+
isLoading: i,
|
|
85
|
+
disabled: c || i,
|
|
86
86
|
error: a ? n(t.otpError) : void 0,
|
|
87
|
-
onSubmit: (
|
|
87
|
+
onSubmit: (h) => o.submitOtp(h),
|
|
88
88
|
onResend: () => o.resendOtp(),
|
|
89
89
|
onBack: () => o.back()
|
|
90
90
|
}
|
|
@@ -92,14 +92,14 @@ const B = ({
|
|
|
92
92
|
}
|
|
93
93
|
return t.status === "finished" ? (d?.(), null) : (t.status === "error" && p?.(t.error), null);
|
|
94
94
|
}, L = ({
|
|
95
|
-
config:
|
|
95
|
+
config: r,
|
|
96
96
|
manager: s,
|
|
97
97
|
onFinish: d,
|
|
98
98
|
onError: p
|
|
99
|
-
}) => /* @__PURE__ */ e(O, { children:
|
|
99
|
+
}) => /* @__PURE__ */ e(O, { children: r || s ? /* @__PURE__ */ e(
|
|
100
100
|
B,
|
|
101
101
|
{
|
|
102
|
-
config:
|
|
102
|
+
config: r,
|
|
103
103
|
manager: s,
|
|
104
104
|
onFinish: d,
|
|
105
105
|
onError: p
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-20260402-
|
|
3
|
+
"version": "0.0.0-dev-20260402-7cf9db4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"qrcode": "^1.5.4",
|
|
138
138
|
"signature_pad": "^5.1.3",
|
|
139
139
|
"tailwindcss": "^4.1.17",
|
|
140
|
-
"@incodetech/core": "0.0.0-dev-20260402-
|
|
140
|
+
"@incodetech/core": "0.0.0-dev-20260402-7cf9db4"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
143
|
"@microsoft/api-extractor": "^7.53.3",
|