@incodetech/web 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4677d7f
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/AsYouType-DPWqJvFu.js +2482 -0
- package/dist/addressAutocomplete-t809rK3N.js +108 -0
- package/dist/aligndevicelottie-C9xl1spu.js +12757 -0
- package/dist/antifraud/antifraud.es.js +17 -18
- package/dist/antifraud/styles.css +1 -1
- package/dist/authentication/authentication.es.js +28 -50
- package/dist/back-horizontal-hint-Be3dUGk6.js +137 -0
- package/dist/back-tutorial-BNTyW-1N.js +14584 -0
- package/dist/back-vertical-hint-Bz_rnhd-.js +128 -0
- package/dist/backdevicelottie-DBB1YCtW.js +16678 -0
- package/dist/base.css +327 -67
- package/dist/blurdevicelottie-9WvZCZ6C.js +15939 -0
- package/dist/browser-ponyfill-B4Qc6yfW.js +299 -0
- package/dist/button-DrtZRYJX.js +123 -0
- package/dist/checkbox-kZerHUek.js +85 -0
- package/dist/consent/consent.es.js +82 -89
- package/dist/consent/styles.css +1 -1
- package/dist/countries-y2ydYDhN.js +8323 -0
- package/dist/curp-validation/curp-validation.es.js +271 -313
- package/dist/curp-validation/styles.css +1 -1
- package/dist/dateInputComposed-9zbxhNlX.js +94 -0
- package/dist/dateInputComposed-B36DI9FJ.js +2 -0
- package/dist/defineProperty-brqHEHA_.js +39 -0
- package/dist/document-capture/styles.css +1 -1
- package/dist/documentCapture-CY-g1OUT.js +784 -0
- package/dist/dropdownComposed-CWxUwv7E.js +258 -0
- package/dist/ekyb/ekyb.es.js +2 -0
- package/dist/ekyb/styles.css +1 -1
- package/dist/ekybModule-DGOhCY0S.js +286 -0
- package/dist/ekybModule-mBTq_Apn.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -0
- package/dist/ekyc/styles.css +1 -1
- package/dist/ekycModule-DZlqb6Bc.js +2 -0
- package/dist/ekycModule-rJxf46TS.js +233 -0
- package/dist/email/email.es.js +110 -154
- package/dist/email/styles.css +1 -1
- package/dist/extensibility-CcUfegWj.js +2248 -0
- package/dist/extensibility.es.js +22 -150
- package/dist/face-match/styles.css +147 -73
- package/dist/faceMatch-K9k9f1HF.js +191 -0
- package/dist/flip-animation-DOJzdXB-.js +6983 -0
- package/dist/flow/flow.es.js +2274 -2613
- package/dist/flow/styles.css +432 -73
- package/dist/formField-BBfAFfVZ.js +100 -0
- package/dist/front-horizontal-hint-aGAhadA2.js +380 -0
- package/dist/front-vertical-hint-DZz1VeNp.js +420 -0
- package/dist/frontdevicelottie-DadDp6be.js +17302 -0
- package/dist/geolocation/geolocation.es.js +852 -832
- package/dist/geolocation/styles.css +1 -1
- package/dist/glaredevicelottie-BfI84cPw.js +14466 -0
- package/dist/governmentValidation/governmentValidation.es.js +100 -106
- package/dist/governmentValidation/styles.css +1 -1
- package/dist/i18n-DZOHbK9q.js +1916 -0
- package/dist/icons-BHbofCgJ.js +245 -0
- package/dist/id/id.es.js +53 -59
- package/dist/id/styles.css +1 -1
- package/dist/id-laser-h-BWyU3VgL.js +467 -0
- package/dist/id-laser-v-JiWXUlv0.js +467 -0
- package/dist/id-tutorial-Cc9xg5_J.js +13152 -0
- package/dist/incodeModule-Bf6yJ8RB.js +18 -0
- package/dist/index.es.js +4 -25
- package/dist/inputComposed-rPAh6ptN.js +77 -0
- package/dist/loadingIcon-BDMR5L6z.js +147 -0
- package/dist/mandatoryConsent-ohmxTqe7.js +101 -0
- package/dist/numberedStep-CQVRixRP.js +11 -0
- package/dist/otpInput-DRZiayDi.js +143 -0
- package/dist/page-M9yWRw73.js +61 -0
- package/dist/passport-horizontal-hint-CFsGs7Dp.js +293 -0
- package/dist/passport-tutorial-z0LN7Hsp.js +11688 -0
- package/dist/passport-vertical-hint-BnCpKWeN.js +267 -0
- package/dist/phone/phone.es.js +87 -121
- package/dist/phone/styles.css +1 -1
- package/dist/phoneInput-C9T_8FJt.js +138 -0
- package/dist/phoneInputComposed-CXTXBQ0B.js +407 -0
- package/dist/processing-yJ5QEgaC.js +15 -0
- package/dist/redirect-to-mobile/styles.css +1 -1
- package/dist/richText-Db0PfpkE.js +1973 -0
- package/dist/rolldown-runtime-CjdbFOpI.js +13 -0
- package/dist/selfie/selfie.es.js +29 -50
- package/dist/selfie/styles.css +170 -66
- package/dist/selfieTutorial-B0MIyPrk.js +2676 -0
- package/dist/setup-Dq2bzNKH.js +15 -0
- package/dist/signature/signature.es.js +557 -707
- package/dist/signature/styles.css +1 -1
- package/dist/spacer-DCljE53A.js +59 -0
- package/dist/spinner-BK2pIUzB.js +41 -0
- package/dist/spinner-DjG-sUzI.js +1 -0
- package/dist/successIcon-AHrfmJvv.js +17 -0
- package/dist/tutorial-C2kSUHWe.js +2781 -0
- package/dist/types/ekyb.d.ts +29 -0
- package/dist/types/ekyc.d.ts +29 -0
- package/dist/types/extensibility.d.ts +3 -5
- package/dist/types/flow.d.ts +1 -1
- package/dist/types/index.d.ts +2 -10
- package/dist/typography-BQrJwR60.js +1 -0
- package/dist/typography-BtyuWjzC.js +29 -0
- package/dist/uiConfig-CwpQ-IM6.js +20 -0
- package/dist/vendor-preact-D6SntenC.js +958 -0
- package/dist/warningIcon-Cvj-ayg1.js +17 -0
- package/package.json +8 -11
- package/dist/AsYouType-D1H_js4X.js +0 -2607
- package/dist/Trans-aTzdT_SA.js +0 -55
- package/dist/addressAutocomplete-C8-wL1j_.js +0 -153
- package/dist/aligndevicelottie-DlQCRPfM.js +0 -29
- package/dist/back-horizontal-hint-CSlf9KI1.js +0 -5
- package/dist/back-tutorial-An9AcMSe.js +0 -29
- package/dist/back-vertical-hint-CNieqiCr.js +0 -5
- package/dist/backdevicelottie-B4NgyWmX.js +0 -29
- package/dist/blurdevicelottie-_BZRug1c.js +0 -29
- package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
- package/dist/button-CE9kRlem.js +0 -184
- package/dist/cameraView-C2X7klNb.js +0 -55
- package/dist/captureOverlay-tCb4R4WE.js +0 -592
- package/dist/checkbox-B5X-mfqq.js +0 -137
- package/dist/chevronDown-DSHaPKbi.js +0 -23
- package/dist/closeIcon-9Hc97omv.js +0 -28
- package/dist/countries-DfLkrF0x.js +0 -616
- package/dist/dateInputComposed-C7PCzh-U.js +0 -173
- package/dist/documentCapture-C0mO-RGE.js +0 -692
- package/dist/dropdownComposed-BpinYlrx.js +0 -367
- package/dist/ekybModule-Dr6LJUg-.js +0 -357
- package/dist/ekycModule-C3mswduI.js +0 -291
- package/dist/errorContent-Cb8nmQAE.js +0 -44
- package/dist/errorIcon-DEARBrGx.js +0 -26
- package/dist/faceMatch-DbDp7D3d.js +0 -237
- package/dist/fileIcon-CCSvS10T.js +0 -52
- package/dist/flip-animation-COR596wy.js +0 -29
- package/dist/flipAnimation-BqV462TA.js +0 -2059
- package/dist/formField-CP6wDdfA.js +0 -106
- package/dist/front-horizontal-hint-lRLKd7vY.js +0 -7
- package/dist/front-vertical-hint-qQoJXRE3.js +0 -7
- package/dist/frontdevicelottie-KhKxT5n9.js +0 -29
- package/dist/glaredevicelottie-DLuIStvb.js +0 -29
- package/dist/id-laser-h-BBV3r3rz.js +0 -29
- package/dist/id-laser-v-BTHJaSfx.js +0 -29
- package/dist/id-tutorial-B-F5Q28m.js +0 -29
- package/dist/incodeModule-C4XIllao.js +0 -96
- package/dist/inputComposed-fUbAGrDy.js +0 -103
- package/dist/instance-BWYzq8dk.js +0 -2163
- package/dist/loadingIcon-DmuPXh70.js +0 -195
- package/dist/mandatoryConsent-5xPI0cor.js +0 -94
- package/dist/manualCaptureButton-BvFmTyJe.js +0 -372
- package/dist/numberedStep-DwUB__mh.js +0 -5
- package/dist/otpInput-BFXhqFRT.js +0 -156
- package/dist/page-SrUl0qtN.js +0 -69
- package/dist/passport-horizontal-hint-BCtpMp1Y.js +0 -5
- package/dist/passport-tutorial-CaYBFTqt.js +0 -29
- package/dist/passport-vertical-hint-GaLnzqHP.js +0 -5
- package/dist/permissions-DT4Fz9MR.js +0 -709
- package/dist/phoneInput-CGr8TxOO.js +0 -158
- package/dist/phoneInputComposed-Cm9O2Jba.js +0 -206
- package/dist/processing-szVOCQwZ.js +0 -19
- package/dist/richText-cspvNz2a.js +0 -1807
- package/dist/selfieTutorial-Dm_p0ke9.js +0 -29
- package/dist/spinner-DygONskw.js +0 -60
- package/dist/successIcon-Bjsdc4lF.js +0 -26
- package/dist/tutorial-Cdz1025D.js +0 -473
- package/dist/types/ekyb/styles.d.ts +0 -1
- package/dist/types/ekyc/styles.d.ts +0 -1
- package/dist/typography-BDACYR5i.js +0 -14
- package/dist/uiConfig-Dnt-2YWB.js +0 -23
- package/dist/useMediaQuery-lJdQBmC2.js +0 -18
- package/dist/vendor-preact-BoMmvSgn.js +0 -694
- package/dist/warningIcon-DQq_MrOB.js +0 -26
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { n as e } from "./i18n-DZOHbK9q.js";
|
|
2
|
+
import { _ as t, d as n, h as r, l as i, p as a, v as o } from "./vendor-preact-D6SntenC.js";
|
|
3
|
+
import { c as s, o as c, r as l } from "./loadingIcon-BDMR5L6z.js";
|
|
4
|
+
import { t as u } from "./button-DrtZRYJX.js";
|
|
5
|
+
import { t as d } from "./page-M9yWRw73.js";
|
|
6
|
+
import { t as f } from "./spinner-BK2pIUzB.js";
|
|
7
|
+
import { n as p, r as m, t as h } from "./formField-BBfAFfVZ.js";
|
|
8
|
+
import { t as g } from "./phoneInputComposed-CXTXBQ0B.js";
|
|
9
|
+
import { t as _ } from "./dropdownComposed-CWxUwv7E.js";
|
|
10
|
+
import { t as v } from "./dateInputComposed-9zbxhNlX.js";
|
|
11
|
+
import { t as y } from "./incodeModule-Bf6yJ8RB.js";
|
|
12
|
+
import { t as b } from "./addressAutocomplete-t809rK3N.js";
|
|
13
|
+
import { computeEkycDisplayErrors as x, createEkycManager as S } from "@incodetech/core/ekyc";
|
|
14
|
+
//#region src/modules/ekyc/ekycModule.tsx
|
|
15
|
+
var C = ({ config: n, onFinish: r }) => {
|
|
16
|
+
let { t: i } = e(), [a, c] = s(() => S({ config: n }));
|
|
17
|
+
return t(() => {
|
|
18
|
+
(a.status === "finished" || a.status === "closed") && r?.();
|
|
19
|
+
}, [a.status, r]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ o(m, {
|
|
20
|
+
status: "submitting",
|
|
21
|
+
submittingTitle: i("common.loading")
|
|
22
|
+
}) : a.status === "submitting" ? /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(f, {
|
|
23
|
+
fullScreen: !1,
|
|
24
|
+
title: i("common.processing"),
|
|
25
|
+
className: "IncodeEkycSpinner"
|
|
26
|
+
}) }) : a.status === "success" ? /* @__PURE__ */ o(m, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ o(m, {
|
|
27
|
+
status: "failure",
|
|
28
|
+
onRetry: () => c.retry(),
|
|
29
|
+
onSkip: () => c.skip()
|
|
30
|
+
}) : a.status === "misconfigured" ? /* @__PURE__ */ o(m, {
|
|
31
|
+
status: "failure",
|
|
32
|
+
failureTitle: i("verification.noFormFields"),
|
|
33
|
+
onSkip: () => c.close(),
|
|
34
|
+
skipLabel: i("common.close")
|
|
35
|
+
}) : a.status === "form" ? /* @__PURE__ */ o(T, {
|
|
36
|
+
state: a,
|
|
37
|
+
manager: c
|
|
38
|
+
}) : null;
|
|
39
|
+
}, w = [
|
|
40
|
+
"street",
|
|
41
|
+
"city",
|
|
42
|
+
"state",
|
|
43
|
+
"postalCode",
|
|
44
|
+
"houseNo"
|
|
45
|
+
], T = ({ state: s, manager: l }) => {
|
|
46
|
+
let { fields: f, values: m, errors: y, isValid: S, addressSuggestions: C, prefilled: T, hideEmail: E, fieldsCountry: D, submitError: O, submitAttempted: k } = s, { t: A } = e(), j = i(null), M = i(null), N = i(void 0), P = c(j, f.length), [F, I] = a({}), L = r((e) => {
|
|
47
|
+
I((t) => t[e] ? t : {
|
|
48
|
+
...t,
|
|
49
|
+
[e]: !0
|
|
50
|
+
});
|
|
51
|
+
}, []), { displayErrors: R, errorParams: z } = n(() => x(y, F, k, D, f), [
|
|
52
|
+
y,
|
|
53
|
+
F,
|
|
54
|
+
k,
|
|
55
|
+
D,
|
|
56
|
+
f
|
|
57
|
+
]), B = r((e) => L(e), [L]), V = r((e, t) => {
|
|
58
|
+
L(e), l.setField(e, t);
|
|
59
|
+
}, [l, L]), H = r((e) => {
|
|
60
|
+
for (let e of w) L(e);
|
|
61
|
+
l.selectAddress(e);
|
|
62
|
+
}, [l, L]);
|
|
63
|
+
t(() => {
|
|
64
|
+
let e = R.postalCode, t = N.current;
|
|
65
|
+
if (N.current = e, !e || t === e) return;
|
|
66
|
+
let n = requestAnimationFrame(() => {
|
|
67
|
+
let e = M.current;
|
|
68
|
+
e && (e.querySelector("#postalCode-error") ?? e).scrollIntoView({
|
|
69
|
+
behavior: "smooth",
|
|
70
|
+
block: "nearest"
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
return () => cancelAnimationFrame(n);
|
|
74
|
+
}, [R.postalCode]);
|
|
75
|
+
let U = (e, t) => p(A, t, z[e]), W;
|
|
76
|
+
return /* @__PURE__ */ o(d, {
|
|
77
|
+
className: `IncodeEkycPage${P ? " IncodeEkycPageScrollable" : ""}`,
|
|
78
|
+
title: A("verification.title"),
|
|
79
|
+
children: [/* @__PURE__ */ o("div", {
|
|
80
|
+
ref: j,
|
|
81
|
+
className: "IncodeEkycForm",
|
|
82
|
+
children: f.map((e) => {
|
|
83
|
+
if (e.name === "email" && E) return null;
|
|
84
|
+
let t = null;
|
|
85
|
+
e.section && e.section !== W && (W = e.section, t = /* @__PURE__ */ o("h3", {
|
|
86
|
+
className: "IncodeEkycSectionHeader",
|
|
87
|
+
children: A({
|
|
88
|
+
address: "verification.labels.addressDetailsSection",
|
|
89
|
+
driverLicense: "verification.labels.dlDetailsSection"
|
|
90
|
+
}[e.section] ?? e.section)
|
|
91
|
+
}));
|
|
92
|
+
let n = e.readonly || T[e.name], r = m[e.name] ?? "", i = R[e.name];
|
|
93
|
+
if (e.name === "street" && e.section === "address") return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(b, {
|
|
94
|
+
label: e.label,
|
|
95
|
+
value: r,
|
|
96
|
+
error: i,
|
|
97
|
+
errorParams: z[e.name],
|
|
98
|
+
suggestions: C,
|
|
99
|
+
readonly: n,
|
|
100
|
+
optional: !e.required,
|
|
101
|
+
onChange: (e) => V("street", e),
|
|
102
|
+
onSearch: (e) => l.searchAddress(e),
|
|
103
|
+
onSelect: H,
|
|
104
|
+
onBlur: () => B("street")
|
|
105
|
+
})] }, e.name);
|
|
106
|
+
if (e.type === "dropdown") {
|
|
107
|
+
let a = A(e.label);
|
|
108
|
+
return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(_, {
|
|
109
|
+
id: `ekyc-${e.name}`,
|
|
110
|
+
label: a,
|
|
111
|
+
placeholder: e.placeholder ? A(e.placeholder) : void 0,
|
|
112
|
+
value: r,
|
|
113
|
+
options: (e.options ?? []).map((e) => ({
|
|
114
|
+
...e,
|
|
115
|
+
label: A(e.label)
|
|
116
|
+
})),
|
|
117
|
+
error: U(e.name, i),
|
|
118
|
+
disabled: n,
|
|
119
|
+
searchable: !0,
|
|
120
|
+
onChange: (t) => V(e.name, t),
|
|
121
|
+
onBlur: () => B(e.name),
|
|
122
|
+
"data-testid": `ekyc-field-${e.name}`
|
|
123
|
+
})] }, e.name);
|
|
124
|
+
}
|
|
125
|
+
if (e.type === "date") {
|
|
126
|
+
let a = A(e.label);
|
|
127
|
+
return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(v, {
|
|
128
|
+
id: `ekyc-${e.name}`,
|
|
129
|
+
label: a,
|
|
130
|
+
value: r,
|
|
131
|
+
error: U(e.name, i),
|
|
132
|
+
disabled: n,
|
|
133
|
+
onInput: (t) => {
|
|
134
|
+
let n = t.target;
|
|
135
|
+
V(e.name, n.value);
|
|
136
|
+
},
|
|
137
|
+
onBlur: () => B(e.name),
|
|
138
|
+
"data-testid": `ekyc-field-${e.name}`
|
|
139
|
+
})] }, e.name);
|
|
140
|
+
}
|
|
141
|
+
if (e.type === "phone") {
|
|
142
|
+
let a = A(e.label);
|
|
143
|
+
return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(g, {
|
|
144
|
+
id: `ekyc-${e.name}`,
|
|
145
|
+
label: a,
|
|
146
|
+
countryCode: D,
|
|
147
|
+
value: r,
|
|
148
|
+
placeholder: e.placeholder,
|
|
149
|
+
error: U(e.name, i),
|
|
150
|
+
disabled: n,
|
|
151
|
+
disableCountrySelector: e.disableCountrySelector,
|
|
152
|
+
required: !1,
|
|
153
|
+
onChange: (t) => V(e.name, t),
|
|
154
|
+
onBlur: () => B(e.name),
|
|
155
|
+
"data-testid": `ekyc-field-${e.name}`
|
|
156
|
+
})] }, e.name);
|
|
157
|
+
}
|
|
158
|
+
return e.type === "radio" ? /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o("div", {
|
|
159
|
+
className: "IncodeEkycRadioGroup",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ o("label", {
|
|
162
|
+
className: "IncodeEkycRadioLabel",
|
|
163
|
+
children: A(e.label)
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ o("div", {
|
|
166
|
+
className: "IncodeEkycRadioOptions",
|
|
167
|
+
children: e.options?.map((t) => /* @__PURE__ */ o("label", {
|
|
168
|
+
className: "IncodeEkycRadioOption",
|
|
169
|
+
children: [/* @__PURE__ */ o("input", {
|
|
170
|
+
type: "radio",
|
|
171
|
+
name: e.name,
|
|
172
|
+
checked: r === t.value,
|
|
173
|
+
value: t.value,
|
|
174
|
+
onChange: () => V(e.name, t.value),
|
|
175
|
+
onBlur: () => B(e.name),
|
|
176
|
+
disabled: n
|
|
177
|
+
}), /* @__PURE__ */ o("span", { children: A(t.label) })]
|
|
178
|
+
}, t.value))
|
|
179
|
+
}),
|
|
180
|
+
i && /* @__PURE__ */ o("span", {
|
|
181
|
+
className: "IncodeEkycFieldError",
|
|
182
|
+
children: U(e.name, i)
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})] }, e.name) : /* @__PURE__ */ o("div", {
|
|
186
|
+
ref: e.name === "postalCode" ? M : void 0,
|
|
187
|
+
children: [t, /* @__PURE__ */ o(h, {
|
|
188
|
+
name: e.name,
|
|
189
|
+
label: e.label,
|
|
190
|
+
value: r,
|
|
191
|
+
error: i,
|
|
192
|
+
errorParams: z[e.name],
|
|
193
|
+
type: e.type,
|
|
194
|
+
placeholder: e.placeholder,
|
|
195
|
+
placeholderParams: e.placeholderParams,
|
|
196
|
+
required: e.required,
|
|
197
|
+
optional: e.optional,
|
|
198
|
+
readonly: n,
|
|
199
|
+
maxLength: e.maxLength,
|
|
200
|
+
onChange: V,
|
|
201
|
+
onBlur: B
|
|
202
|
+
})]
|
|
203
|
+
}, e.name);
|
|
204
|
+
})
|
|
205
|
+
}), /* @__PURE__ */ o("div", {
|
|
206
|
+
className: "IncodeEkycFooter",
|
|
207
|
+
children: [
|
|
208
|
+
O && /* @__PURE__ */ o("p", {
|
|
209
|
+
className: "IncodeEkycSubmitError",
|
|
210
|
+
children: A(O)
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ o(u, {
|
|
213
|
+
onClick: () => l.submit(),
|
|
214
|
+
disabled: !S,
|
|
215
|
+
"data-testid": "ekyc-submit",
|
|
216
|
+
children: A("common.continue")
|
|
217
|
+
}),
|
|
218
|
+
O === "verification.errors.countryNotSupported" && /* @__PURE__ */ o(u, {
|
|
219
|
+
variant: "link",
|
|
220
|
+
onClick: () => l.skip(),
|
|
221
|
+
"data-testid": "ekyc-skip",
|
|
222
|
+
children: A("verification.labels.skip")
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
})]
|
|
226
|
+
});
|
|
227
|
+
}, E = ({ config: e, onFinish: t }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(C, {
|
|
228
|
+
config: e,
|
|
229
|
+
onFinish: t
|
|
230
|
+
}) : null });
|
|
231
|
+
y(E, "incode-ekyc");
|
|
232
|
+
//#endregion
|
|
233
|
+
export { E as t };
|
package/dist/email/email.es.js
CHANGED
|
@@ -1,154 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
112
|
-
const n = t.status === "verifyingOtp", r = t.status === "otpError", g = t.status === "awaitingOtp", d = t.status === "resendingOtp", o = g || r || n;
|
|
113
|
-
return /* @__PURE__ */ e(
|
|
114
|
-
I,
|
|
115
|
-
{
|
|
116
|
-
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
117
|
-
title: a("otp.enterCodeEmail"),
|
|
118
|
-
children: /* @__PURE__ */ e(
|
|
119
|
-
R,
|
|
120
|
-
{
|
|
121
|
-
resendTimer: o ? t.resendTimer : 0,
|
|
122
|
-
canResend: o ? t.canResend : !1,
|
|
123
|
-
error: r ? a(t.otpError) : void 0,
|
|
124
|
-
isLoading: n,
|
|
125
|
-
disabled: d || n,
|
|
126
|
-
onSubmit: (u) => l.submitOtp(u),
|
|
127
|
-
onResend: () => l.resendOtp(),
|
|
128
|
-
onBack: () => l.back(),
|
|
129
|
-
backLinkText: "otp.changeEmail"
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
},
|
|
133
|
-
"email-otp"
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
return t.status === "finished" ? (m?.(), null) : (t.status === "error" && c?.(t.error), null);
|
|
137
|
-
}, B = ({
|
|
138
|
-
config: i,
|
|
139
|
-
manager: s,
|
|
140
|
-
onFinish: m,
|
|
141
|
-
onError: c
|
|
142
|
-
}) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
|
|
143
|
-
T,
|
|
144
|
-
{
|
|
145
|
-
config: i,
|
|
146
|
-
manager: s,
|
|
147
|
-
onFinish: m,
|
|
148
|
-
onError: c
|
|
149
|
-
}
|
|
150
|
-
) : null });
|
|
151
|
-
S(B, "incode-email");
|
|
152
|
-
export {
|
|
153
|
-
B as Email
|
|
154
|
-
};
|
|
1
|
+
import { n as e } from "../i18n-DZOHbK9q.js";
|
|
2
|
+
import { _ as t, p as n, v as r } from "../vendor-preact-D6SntenC.js";
|
|
3
|
+
import { c as i, r as a } from "../loadingIcon-BDMR5L6z.js";
|
|
4
|
+
import { t as o } from "../spacer-DCljE53A.js";
|
|
5
|
+
import { t as s } from "../button-DrtZRYJX.js";
|
|
6
|
+
import { t as c } from "../page-M9yWRw73.js";
|
|
7
|
+
import "../extensibility-CcUfegWj.js";
|
|
8
|
+
import { t as l } from "../inputComposed-rPAh6ptN.js";
|
|
9
|
+
import { t as u } from "../otpInput-DRZiayDi.js";
|
|
10
|
+
import { t as d } from "../incodeModule-Bf6yJ8RB.js";
|
|
11
|
+
import { createEmailManager as f } from "@incodetech/core/email";
|
|
12
|
+
//#region src/modules/email/emailInput.tsx
|
|
13
|
+
var p = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, m = ({ prefilledEmail: i, emailError: a, label: o, disabled: s = !1, required: c = !1, onEmailChange: u }) => {
|
|
14
|
+
let { t: d } = e(), [f, m] = n("");
|
|
15
|
+
t(() => {
|
|
16
|
+
if (i) {
|
|
17
|
+
m(i);
|
|
18
|
+
let e = p.test(i.trim());
|
|
19
|
+
u(i.trim(), e);
|
|
20
|
+
}
|
|
21
|
+
}, [i, u]);
|
|
22
|
+
let h = (e) => {
|
|
23
|
+
let t = e.target.value;
|
|
24
|
+
m(t);
|
|
25
|
+
let n = t.trim();
|
|
26
|
+
u(n, n.length > 0 && p.test(n));
|
|
27
|
+
}, g = a ? "email-error" : void 0;
|
|
28
|
+
return /* @__PURE__ */ r("div", {
|
|
29
|
+
class: "IncodeEmailInput",
|
|
30
|
+
children: /* @__PURE__ */ r("div", {
|
|
31
|
+
class: "IncodeEmailInputContainer",
|
|
32
|
+
children: /* @__PURE__ */ r(l, {
|
|
33
|
+
id: "email-input",
|
|
34
|
+
type: "email",
|
|
35
|
+
value: f,
|
|
36
|
+
onInput: h,
|
|
37
|
+
placeholder: d("email.placeholder"),
|
|
38
|
+
disabled: s,
|
|
39
|
+
required: c,
|
|
40
|
+
label: o,
|
|
41
|
+
"data-testid": "email-input",
|
|
42
|
+
"aria-label": o ? void 0 : "Email address",
|
|
43
|
+
"aria-invalid": a ? "true" : void 0,
|
|
44
|
+
"aria-describedby": g || void 0,
|
|
45
|
+
autocomplete: "email",
|
|
46
|
+
error: a,
|
|
47
|
+
showErrorIcon: !0
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}, h = ({ config: t, manager: a, onFinish: l, onError: d }) => {
|
|
52
|
+
let { t: p } = e(), [h, g] = i(() => {
|
|
53
|
+
if (a) return a;
|
|
54
|
+
if (!t) throw Error("Email config is required");
|
|
55
|
+
return f({ config: t });
|
|
56
|
+
}, { manageLifecycle: !a }), [_, v] = n(!1);
|
|
57
|
+
if (h.status === "idle" || h.status === "loadingPrefill" || h.status === "inputting" || h.status === "submitting" || h.status === "sendingInitialOtp") {
|
|
58
|
+
let e = h.status === "idle" || h.status === "loadingPrefill" || h.status === "submitting" || h.status === "sendingInitialOtp", t = h.status === "inputting" ? h.prefilledEmail : void 0, n = h.status === "inputting" && h.emailError ? p(h.emailError) : void 0, i = h.status === "inputting" ? h.otpVerification ?? !1 : !1;
|
|
59
|
+
return /* @__PURE__ */ r(c, {
|
|
60
|
+
className: "IncodeEmailPage",
|
|
61
|
+
title: p("otp.enterCodeEmail"),
|
|
62
|
+
subtitle: i ? p("email.willSendCode") : void 0,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ r(m, {
|
|
65
|
+
prefilledEmail: t,
|
|
66
|
+
emailError: n,
|
|
67
|
+
disabled: e,
|
|
68
|
+
onEmailChange: (e, t) => {
|
|
69
|
+
g.setEmail(e, t), v(t);
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ r(o, {}),
|
|
73
|
+
/* @__PURE__ */ r(s, {
|
|
74
|
+
onClick: () => g.submit(),
|
|
75
|
+
disabled: !_,
|
|
76
|
+
isLoading: e,
|
|
77
|
+
"data-testid": "email-submit",
|
|
78
|
+
children: p("common.continue")
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}, "email-input");
|
|
82
|
+
}
|
|
83
|
+
if (h.status === "awaitingOtp" || h.status === "verifyingOtp" || h.status === "otpError" || h.status === "resendingOtp") {
|
|
84
|
+
let e = h.status === "verifyingOtp", t = h.status === "otpError", n = h.status === "awaitingOtp", i = h.status === "resendingOtp", a = n || t || e;
|
|
85
|
+
return /* @__PURE__ */ r(c, {
|
|
86
|
+
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
87
|
+
title: p("otp.enterCodeEmail"),
|
|
88
|
+
children: /* @__PURE__ */ r(u, {
|
|
89
|
+
resendTimer: a ? h.resendTimer : 0,
|
|
90
|
+
canResend: a ? h.canResend : !1,
|
|
91
|
+
error: t ? p(h.otpError) : void 0,
|
|
92
|
+
isLoading: e,
|
|
93
|
+
disabled: i || e,
|
|
94
|
+
onSubmit: (e) => g.submitOtp(e),
|
|
95
|
+
onResend: () => g.resendOtp(),
|
|
96
|
+
onBack: () => g.back(),
|
|
97
|
+
backLinkText: "otp.changeEmail"
|
|
98
|
+
})
|
|
99
|
+
}, "email-otp");
|
|
100
|
+
}
|
|
101
|
+
return h.status === "finished" ? (l?.(), null) : (h.status === "error" && d?.(h.error), null);
|
|
102
|
+
}, g = ({ config: e, manager: t, onFinish: n, onError: i }) => /* @__PURE__ */ r(a, { children: e || t ? /* @__PURE__ */ r(h, {
|
|
103
|
+
config: e,
|
|
104
|
+
manager: t,
|
|
105
|
+
onFinish: n,
|
|
106
|
+
onError: i
|
|
107
|
+
}) : null });
|
|
108
|
+
d(g, "incode-email");
|
|
109
|
+
//#endregion
|
|
110
|
+
export { g as Email };
|
package/dist/email/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.IncodeEmailPage .IncodePageContent {
|
|
3
3
|
padding-top: var(--spacing-32, var(--spacing-32, 32px));
|
|
4
4
|
padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
|