@incodetech/web 0.0.0-dev-20260604-662e2c10 → 0.0.0-dev-20260604-0577f678
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/document-capture/document-capture.es.js +1 -1
- package/dist/{documentCapture-JOLoKg-o.js → documentCapture-CHmKVwqz.js} +1 -1
- package/dist/documentCapture-DfcF8h_m.js +2 -0
- package/dist/{dynamicForms-UD_Ltg4G.js → dynamicForms-ByfP6dw6.js} +2 -2
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/{ekybModule-BgRVm537.js → ekybModule-D1D4edIu.js} +1 -1
- package/dist/ekybModule-DoaEfEqH.js +2 -0
- package/dist/email/email.es.js +18 -12
- package/dist/{emailInput-CCYF0Qwb.js → emailInput-DJdfL7eI.js} +1 -1
- package/dist/{extensibility-DmK4sDoK.js → extensibility-DF-z_Zts.js} +1 -1
- package/dist/extensibility.es.js +2 -2
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/{fieldComparison-CA7rMe9-.js → fieldComparison-BiVqGXJq.js} +1 -1
- package/dist/fieldComparison-CM3YRwUd.js +2 -0
- package/dist/flow/flow.es.js +1 -1
- package/dist/governmentValidation/governmentValidation.es.js +9 -3
- package/dist/id/id.es.js +1 -1
- package/dist/{idOcr-cX6NMQRj.js → idOcr-DyiUeztu.js} +1 -1
- package/dist/otpInput-C4pk4BJU.js +157 -0
- package/dist/phone/phone.es.js +8 -2
- package/dist/signature/signature.es.js +1 -1
- package/dist/types/extensibility.d.ts +6 -0
- package/dist/{useModuleLoader-Q_TWKmpj.js → useModuleLoader-Besn5Bv3.js} +6 -6
- package/dist/workflow/workflow.es.js +1 -1
- package/package.json +2 -2
- package/dist/documentCapture-DSoU1sJr.js +0 -2
- package/dist/ekybModule-hr0rGx_l.js +0 -2
- package/dist/fieldComparison-oheKoLrO.js +0 -2
- package/dist/otpInput-BQxXATyG.js +0 -145
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../documentCapture-
|
|
1
|
+
import { t as e } from "../documentCapture-CHmKVwqz.js";
|
|
2
2
|
export { e as DocumentCapture };
|
|
@@ -4,7 +4,7 @@ import { c as l, o as u, r as d } from "./hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as f } from "./incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { n as p, r as m } from "./loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as h } from "./page-C1yT4DLb.js";
|
|
7
|
-
import { b as g, d as _, f as v, l as y, p as b, u as x, y as S } from "./extensibility-
|
|
7
|
+
import { b as g, d as _, f as v, l as y, p as b, u as x, y as S } from "./extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as C } from "./spinner-CKnjVHxw.js";
|
|
9
9
|
import { t as w } from "./button-DcCUEn2n.js";
|
|
10
10
|
import { a as T, p as E, r as D } from "./icons-9I5g9-_1.js";
|
|
@@ -12,7 +12,7 @@ import { t as m } from "./dropdownComposed-CS2pyn-g.js";
|
|
|
12
12
|
import { t as h } from "./dateInputComposed-Ddd7HLyM.js";
|
|
13
13
|
import { t as g } from "./incodeModule-BiCoAJ5k.js";
|
|
14
14
|
import { n as _, t as v } from "./requiredLabelHint-B6FN3v88.js";
|
|
15
|
-
import { t as y } from "./emailInput-
|
|
15
|
+
import { t as y } from "./emailInput-DJdfL7eI.js";
|
|
16
16
|
import { formatCPF as b, isValidCPF as x } from "@incodetech/core/cpf-ocr";
|
|
17
17
|
import { createDynamicFormsManager as S } from "@incodetech/core/dynamic-forms";
|
|
18
18
|
//#region src/modules/dynamic-forms/dynamicForms.tsx
|
|
@@ -275,7 +275,7 @@ var T = ({ question: n, value: i, disabled: a = !1, error: o, labelHint: s, onCh
|
|
|
275
275
|
onAnswerValidityChange: (e, t) => l.setAnswerValidity(e, t),
|
|
276
276
|
onValidateField: (e) => l.validateField(e),
|
|
277
277
|
onSubmit: () => l.submit()
|
|
278
|
-
});
|
|
278
|
+
}, c.screenIndex);
|
|
279
279
|
}
|
|
280
280
|
if (c.status === "success") return /* @__PURE__ */ r(u, {
|
|
281
281
|
status: "success",
|
package/dist/ekyb/ekyb.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../ekybModule-
|
|
1
|
+
import { t as e } from "../ekybModule-D1D4edIu.js";
|
|
2
2
|
export { e as EkybModule };
|
|
@@ -4,7 +4,7 @@ import { c as o, i as s, o as c } from "./hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as l } from "./incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { r as u } from "./loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as d } from "./page-C1yT4DLb.js";
|
|
7
|
-
import "./extensibility-
|
|
7
|
+
import "./extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as f } from "./spinner-CKnjVHxw.js";
|
|
9
9
|
import { t as p } from "./button-DcCUEn2n.js";
|
|
10
10
|
import { t as m } from "./verificationResult-V15L4ypC.js";
|
package/dist/email/email.es.js
CHANGED
|
@@ -5,9 +5,9 @@ import { t as s } from "../incodeComponent-BoFhgK7G.js";
|
|
|
5
5
|
import { r as c } from "../loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as l } from "../page-C1yT4DLb.js";
|
|
7
7
|
import { t as u } from "../button-DcCUEn2n.js";
|
|
8
|
-
import { t as d } from "../otpInput-
|
|
8
|
+
import { t as d } from "../otpInput-C4pk4BJU.js";
|
|
9
9
|
import { t as f } from "../incodeModule-BiCoAJ5k.js";
|
|
10
|
-
import { t as p } from "../emailInput-
|
|
10
|
+
import { t as p } from "../emailInput-DJdfL7eI.js";
|
|
11
11
|
import { createEmailManager as m } from "@incodetech/core/email";
|
|
12
12
|
//#region src/modules/email/email.tsx
|
|
13
13
|
function h(e) {
|
|
@@ -21,21 +21,21 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
|
|
|
21
21
|
if (f) return f;
|
|
22
22
|
if (!s) throw Error("Email config is required");
|
|
23
23
|
return m({ config: s });
|
|
24
|
-
}, { manageLifecycle: !f }), [S, C] = n("")
|
|
24
|
+
}, { manageLifecycle: !f }), [S, C] = n("");
|
|
25
25
|
o({
|
|
26
26
|
status: b.status,
|
|
27
27
|
onFinish: _,
|
|
28
28
|
onError: v,
|
|
29
29
|
error: b.status === "error" ? b.error : void 0
|
|
30
30
|
});
|
|
31
|
-
let
|
|
31
|
+
let w = b.status === "inputting" ? b.prefilledEmail ?? "" : "";
|
|
32
32
|
if (t(() => {
|
|
33
|
-
if (
|
|
34
|
-
let e = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(
|
|
35
|
-
C(
|
|
33
|
+
if (w) {
|
|
34
|
+
let e = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(w.trim());
|
|
35
|
+
C(w.trim()), x.setEmail(w.trim(), e);
|
|
36
36
|
}
|
|
37
|
-
}, [
|
|
38
|
-
let e = b.status === "idle" || b.status === "loadingPrefill" || b.status === "submitting" || b.status === "sendingInitialOtp", t = b.status === "inputting" && b.emailError ? y(g(b.emailError)) : void 0, n = b.status === "inputting" &&
|
|
37
|
+
}, [w, x]), b.status === "idle" || b.status === "loadingPrefill" || b.status === "inputting" || b.status === "submitting" || b.status === "sendingInitialOtp") {
|
|
38
|
+
let e = b.status === "idle" || b.status === "loadingPrefill" || b.status === "submitting" || b.status === "sendingInitialOtp", t = b.status === "inputting" && b.emailError ? y(g(b.emailError)) : void 0, n = b.status === "inputting" && b.validationErrors?.email ? y(g(b.validationErrors.email)) : void 0, i = t ?? n, a = b.status === "inputting" ? b.isValid : !0;
|
|
39
39
|
return /* @__PURE__ */ r(l, {
|
|
40
40
|
className: "IncodeEmailPage",
|
|
41
41
|
title: y("email.verify"),
|
|
@@ -47,16 +47,16 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
|
|
|
47
47
|
disabled: e,
|
|
48
48
|
required: !0,
|
|
49
49
|
onEmailChange: (e, t) => {
|
|
50
|
-
x.setEmail(e, t), C(e)
|
|
50
|
+
x.setEmail(e, t), C(e);
|
|
51
51
|
},
|
|
52
52
|
onBlur: () => {
|
|
53
|
-
|
|
53
|
+
x.validateEmail();
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ r(c, {}),
|
|
57
57
|
/* @__PURE__ */ r(u, {
|
|
58
58
|
onClick: () => x.submit(),
|
|
59
|
-
disabled: a,
|
|
59
|
+
disabled: !a,
|
|
60
60
|
isLoading: e,
|
|
61
61
|
"data-testid": "email-submit",
|
|
62
62
|
children: y("common.continue")
|
|
@@ -70,12 +70,18 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
|
|
|
70
70
|
className: "IncodeEmailPage IncodeEmailOtpPage",
|
|
71
71
|
title: y("otp.enterCodeEmail"),
|
|
72
72
|
children: /* @__PURE__ */ r(d, {
|
|
73
|
+
value: b.otpCode,
|
|
74
|
+
otpLength: b.otpLength,
|
|
73
75
|
resendTimer: a ? b.resendTimer : 0,
|
|
74
76
|
canResend: a ? b.canResend : !1,
|
|
75
77
|
error: t ? y(h(b.otpError)) : void 0,
|
|
78
|
+
validationError: "otpValidationErrors" in b && b.otpValidationErrors?.otp ? y("otp.incompleteCode", { length: b.otpLength }) : void 0,
|
|
79
|
+
isValid: "isOtpValid" in b ? b.isOtpValid : !0,
|
|
76
80
|
isLoading: e,
|
|
77
81
|
disabled: i || e,
|
|
78
82
|
onSubmit: (e) => x.submitOtp(e),
|
|
83
|
+
onChange: (e) => x.setOtpCode(e),
|
|
84
|
+
onValidate: () => x.validateOtp(),
|
|
79
85
|
onResend: () => x.resendOtp(),
|
|
80
86
|
onBack: () => x.back(),
|
|
81
87
|
backLinkText: "otp.changeEmail"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e } from "./i18n-Kzzvkz94.js";
|
|
2
2
|
import { v as t } from "./vendor-preact-D6SntenC.js";
|
|
3
|
-
import "./extensibility-
|
|
3
|
+
import "./extensibility-DF-z_Zts.js";
|
|
4
4
|
import { t as n } from "./inputComposed-DAEey9xm.js";
|
|
5
5
|
//#region src/modules/email/emailInput.tsx
|
|
6
6
|
var r = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/, i = ({ value: i, emailError: a, label: o, labelHint: s, disabled: c = !1, required: l = !1, onEmailChange: u, onBlur: d }) => {
|
|
@@ -18,7 +18,7 @@ import { a as O, i as ee } from "./tutorial-B3nSsfRC.js";
|
|
|
18
18
|
import "./verificationResult-V15L4ypC.js";
|
|
19
19
|
import "./inputComposed-DAEey9xm.js";
|
|
20
20
|
import "./inputComposed-eS4B0Mkh.js";
|
|
21
|
-
import "./otpInput-
|
|
21
|
+
import "./otpInput-C4pk4BJU.js";
|
|
22
22
|
import "./checkbox-DCCzBAuF.js";
|
|
23
23
|
import "./radioGroupComposed-DRRxVk9Z.js";
|
|
24
24
|
import "./phoneInputComposed-CjAxk2Gj.js";
|
package/dist/extensibility.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as n, s as r } from "./hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { n as i, t as a } from "./incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { r as o } from "./loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as s } from "./page-C1yT4DLb.js";
|
|
7
|
-
import { _ as c, b as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, y as E } from "./extensibility-
|
|
7
|
+
import { _ as c, b as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, y as E } from "./extensibility-DF-z_Zts.js";
|
|
8
8
|
import { a as D, i as O, n as k, o as A, r as j, t as M } from "./typography-CxjaknHN.js";
|
|
9
9
|
import { t as N } from "./spinner-CKnjVHxw.js";
|
|
10
10
|
import { t as P } from "./processing-DPktVde2.js";
|
|
@@ -16,7 +16,7 @@ import { t as $ } from "./modal-ZqAhwiRF.js";
|
|
|
16
16
|
import { a as ee, i as te, n as ne, o as re, r as ie, t as ae } from "./tutorial-B3nSsfRC.js";
|
|
17
17
|
import { t as oe } from "./verificationResult-V15L4ypC.js";
|
|
18
18
|
import { n as se, t as ce } from "./inputComposed-DAEey9xm.js";
|
|
19
|
-
import { t as le } from "./otpInput-
|
|
19
|
+
import { t as le } from "./otpInput-C4pk4BJU.js";
|
|
20
20
|
import { t as ue } from "./checkbox-DCCzBAuF.js";
|
|
21
21
|
import { n as de, r as fe, t as pe } from "./radioGroupComposed-DRRxVk9Z.js";
|
|
22
22
|
import { i as me, n as he, r as ge, t as _e } from "./phoneInputComposed-CjAxk2Gj.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../fieldComparison-
|
|
1
|
+
import { t as e } from "../fieldComparison-BiVqGXJq.js";
|
|
2
2
|
export { e as FieldComparison };
|
|
@@ -4,7 +4,7 @@ import { c as n, o as r } from "./hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as i } from "./incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { r as a } from "./loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as o } from "./page-C1yT4DLb.js";
|
|
7
|
-
import "./extensibility-
|
|
7
|
+
import "./extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as s } from "./button-DcCUEn2n.js";
|
|
9
9
|
import { t as c } from "./verificationResult-V15L4ypC.js";
|
|
10
10
|
import { t as l } from "./inputComposed-DAEey9xm.js";
|
package/dist/flow/flow.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { c as u } from "../hooks-MxHtZWTS.js";
|
|
|
5
5
|
import { t as d } from "../incodeComponent-BoFhgK7G.js";
|
|
6
6
|
import { t as f } from "../transitionSpinner-Di3bOyOu.js";
|
|
7
7
|
import { t as p } from "../incodeModule-BiCoAJ5k.js";
|
|
8
|
-
import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-
|
|
8
|
+
import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-Besn5Bv3.js";
|
|
9
9
|
import { getDeviceClass as A } from "@incodetech/core/device";
|
|
10
10
|
import { getRequiredWasmPipelines as j } from "@incodetech/core/flow";
|
|
11
11
|
import { bootstrapSession as M, refreshQrUrlUuid as N } from "@incodetech/core/session";
|
|
@@ -4,10 +4,10 @@ import { c as r, o as i } from "../hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as a } from "../incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { r as o } from "../loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as s } from "../page-C1yT4DLb.js";
|
|
7
|
-
import "../extensibility-
|
|
7
|
+
import "../extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as c } from "../autoFocusTitle-BpYdaSUM.js";
|
|
9
9
|
import { t as l } from "../verificationResult-V15L4ypC.js";
|
|
10
|
-
import { t as u } from "../otpInput-
|
|
10
|
+
import { t as u } from "../otpInput-C4pk4BJU.js";
|
|
11
11
|
import { t as d } from "../incodeModule-BiCoAJ5k.js";
|
|
12
12
|
import { createGovernmentValidationManager as f } from "@incodetech/core/government-validation";
|
|
13
13
|
//#endregion
|
|
@@ -36,7 +36,7 @@ var p = ({ config: a, onFinish: d }) => {
|
|
|
36
36
|
successTitle: p("ineCheck.processing")
|
|
37
37
|
}),
|
|
38
38
|
g && (() => {
|
|
39
|
-
let e = m.status === "verifyingOtp", t = m.status === "awaitingOtp" ? m.otpError : void 0;
|
|
39
|
+
let e = m.status === "verifyingOtp", t = m.status === "awaitingOtp" ? m.otpError : void 0, r = m.status === "awaitingOtp" && m.otpValidationErrors?.otp ? p("otp.incompleteCode", { length: m.otpLength }) : void 0, i = m.status === "awaitingOtp" ? m.isOtpValid : !0;
|
|
40
40
|
return /* @__PURE__ */ n("div", {
|
|
41
41
|
class: "IncodeGovtValidation IncodeGovtValidation--otp",
|
|
42
42
|
children: /* @__PURE__ */ n(s, {
|
|
@@ -48,10 +48,16 @@ var p = ({ config: a, onFinish: d }) => {
|
|
|
48
48
|
children: [/* @__PURE__ */ n(c, { children: p("otp.insertSMS") }), /* @__PURE__ */ n("p", { children: p("otp.focus") })]
|
|
49
49
|
}),
|
|
50
50
|
/* @__PURE__ */ n(u, {
|
|
51
|
+
value: m.otpCode,
|
|
52
|
+
otpLength: m.otpLength,
|
|
51
53
|
resendTimer: m.status === "awaitingOtp" ? m.resendTimer : 0,
|
|
52
54
|
canResend: m.status === "awaitingOtp" ? m.canResend : !1,
|
|
53
55
|
error: t,
|
|
56
|
+
validationError: r,
|
|
57
|
+
isValid: i,
|
|
54
58
|
onSubmit: (e) => h.submitOtp(e),
|
|
59
|
+
onChange: (e) => h.setOtpCode(e),
|
|
60
|
+
onValidate: () => h.validateOtp(),
|
|
55
61
|
onResend: () => h.resendOtp(),
|
|
56
62
|
onBack: () => {},
|
|
57
63
|
isLoading: e
|
package/dist/id/id.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c as l, o as u } from "../hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as d } from "../incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { n as f } from "../loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as p } from "../page-C1yT4DLb.js";
|
|
7
|
-
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b, y as ee } from "../extensibility-
|
|
7
|
+
import { a as m, i as h, n as g, o as _, r as v, s as y, t as b, y as ee } from "../extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as x } from "../spinner-CKnjVHxw.js";
|
|
9
9
|
import "../spinner-B4dcie2T.js";
|
|
10
10
|
import { t as S } from "../transitionSpinner-Di3bOyOu.js";
|
|
@@ -3,7 +3,7 @@ import { d as t, v as n } from "./vendor-preact-D6SntenC.js";
|
|
|
3
3
|
import { c as r, o as i } from "./hooks-MxHtZWTS.js";
|
|
4
4
|
import { t as a } from "./incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { t as o } from "./page-C1yT4DLb.js";
|
|
6
|
-
import "./extensibility-
|
|
6
|
+
import "./extensibility-DF-z_Zts.js";
|
|
7
7
|
import { t as s } from "./button-DcCUEn2n.js";
|
|
8
8
|
import { t as c } from "./verificationResult-V15L4ypC.js";
|
|
9
9
|
import { t as l } from "./inputComposed-DAEey9xm.js";
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { n as e } from "./i18n-Kzzvkz94.js";
|
|
2
|
+
import { _ as t, h as n, l as r, v as i } from "./vendor-preact-D6SntenC.js";
|
|
3
|
+
import { r as a } from "./loadingIcon-BN5YRQUb.js";
|
|
4
|
+
import { t as o } from "./button-DcCUEn2n.js";
|
|
5
|
+
import { t as s } from "./inputComposed-DAEey9xm.js";
|
|
6
|
+
import "./inputComposed-eS4B0Mkh.js";
|
|
7
|
+
//#region src/shared/otpInput/otpInput.tsx
|
|
8
|
+
var c = (e) => `${Math.floor(e / 60)}:${(e % 60).toString().padStart(2, "0")}`, l = (e, t) => e.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, t), u = ({ value: u, otpLength: d, resendTimer: f, canResend: p, error: m, validationError: h, isValid: g = !0, onSubmit: _, onChange: v, onValidate: y, onResend: b, onBack: x, backLinkText: S = "otp.changePhoneNumber", disabled: C = !1, isLoading: w = !1 }) => {
|
|
9
|
+
let { t: T } = e(), E = r(null), D = r(u.length), O = r(null), k = r(null), A = r(p), j = r(!1), M = r(), N = n((e) => {
|
|
10
|
+
let t = k.current;
|
|
11
|
+
t && (clearTimeout(M.current), t.textContent = "", M.current = setTimeout(() => {
|
|
12
|
+
t.textContent = e;
|
|
13
|
+
}, 50));
|
|
14
|
+
}, []);
|
|
15
|
+
t(() => {
|
|
16
|
+
let e = !A.current;
|
|
17
|
+
return A.current = p, e && p && N(T("otp.resendCodeAvailable")), () => clearTimeout(M.current);
|
|
18
|
+
}, [
|
|
19
|
+
p,
|
|
20
|
+
N,
|
|
21
|
+
T
|
|
22
|
+
]), t(() => {
|
|
23
|
+
m && (O.current = null, setTimeout(() => {
|
|
24
|
+
E.current?.focus();
|
|
25
|
+
}, 0));
|
|
26
|
+
}, [m]);
|
|
27
|
+
let P = n((e) => {
|
|
28
|
+
let t = l(e, d);
|
|
29
|
+
t.length !== d || w || O.current !== t && (O.current = t, _(t));
|
|
30
|
+
}, [
|
|
31
|
+
w,
|
|
32
|
+
_,
|
|
33
|
+
d
|
|
34
|
+
]);
|
|
35
|
+
t(() => {
|
|
36
|
+
let e = u.length === d && D.current < d;
|
|
37
|
+
D.current = u.length, e && P(u);
|
|
38
|
+
}, [
|
|
39
|
+
u,
|
|
40
|
+
d,
|
|
41
|
+
P
|
|
42
|
+
]);
|
|
43
|
+
let F = (e) => {
|
|
44
|
+
let t = e.target;
|
|
45
|
+
v(l(t.value, d));
|
|
46
|
+
}, I = (e) => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
let t = l(e.clipboardData?.getData("text") || "", d);
|
|
49
|
+
t && v(t);
|
|
50
|
+
}, L = () => {
|
|
51
|
+
if (u.length < d) {
|
|
52
|
+
y?.(), E.current?.focus();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
P(u);
|
|
56
|
+
}, R = m ?? h;
|
|
57
|
+
t(() => {
|
|
58
|
+
if (p || f <= 0) {
|
|
59
|
+
j.current = !1;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!j.current) {
|
|
63
|
+
j.current = !0, N(T("otp.timerStarted", { time: String(f) }));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
f === 10 ? N(T("otp.timerTenSeconds")) : f === 5 && N(T("otp.timerFiveSeconds"));
|
|
67
|
+
}, [
|
|
68
|
+
f,
|
|
69
|
+
p,
|
|
70
|
+
N,
|
|
71
|
+
T
|
|
72
|
+
]);
|
|
73
|
+
let z = () => {
|
|
74
|
+
if (!p && f > 0) return /* @__PURE__ */ i("div", {
|
|
75
|
+
class: "IncodeOtpInputActions",
|
|
76
|
+
children: /* @__PURE__ */ i("p", {
|
|
77
|
+
class: "IncodeOtpInputTimerText",
|
|
78
|
+
"data-testid": "otp-timer",
|
|
79
|
+
children: T("otp.resendCountdown", { time: c(f) })
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
let e = () => {
|
|
83
|
+
O.current = null, v(""), b();
|
|
84
|
+
}, t = () => {
|
|
85
|
+
O.current = null, v(""), x();
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ i("div", {
|
|
88
|
+
class: "IncodeOtpInputActions",
|
|
89
|
+
children: /* @__PURE__ */ i("p", {
|
|
90
|
+
class: `IncodeOtpInputResendText ${C ? "IncodeOtpInputResendTextDisabled" : ""}`,
|
|
91
|
+
"data-testid": "otp-resend-section",
|
|
92
|
+
children: [
|
|
93
|
+
T("otp.didYouNotGetIt"),
|
|
94
|
+
/* @__PURE__ */ i("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
class: "IncodeOtpInputLink",
|
|
97
|
+
onClick: e,
|
|
98
|
+
disabled: C || !p,
|
|
99
|
+
"data-testid": "otp-resend",
|
|
100
|
+
children: T("otp.resendCode")
|
|
101
|
+
}),
|
|
102
|
+
` ${T("otp.or")} `,
|
|
103
|
+
/* @__PURE__ */ i("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
class: "IncodeOtpInputLink",
|
|
106
|
+
onClick: t,
|
|
107
|
+
disabled: C,
|
|
108
|
+
"data-testid": "otp-back",
|
|
109
|
+
children: T(S)
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
return /* @__PURE__ */ i("div", {
|
|
116
|
+
class: "IncodeOtpInput IncodeOtpInputComposed",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ i("div", {
|
|
119
|
+
ref: k,
|
|
120
|
+
class: "IncodeSrOnly",
|
|
121
|
+
"aria-live": "polite",
|
|
122
|
+
"aria-atomic": "true"
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ i(s, {
|
|
125
|
+
id: "otp-code",
|
|
126
|
+
type: "text",
|
|
127
|
+
inputMode: "text",
|
|
128
|
+
ref: E,
|
|
129
|
+
maxLength: d,
|
|
130
|
+
value: u,
|
|
131
|
+
error: R,
|
|
132
|
+
onInput: F,
|
|
133
|
+
onBlur: y,
|
|
134
|
+
onPaste: I,
|
|
135
|
+
disabled: C || w,
|
|
136
|
+
required: !0,
|
|
137
|
+
autocomplete: "one-time-code",
|
|
138
|
+
"data-testid": "otp-input-0",
|
|
139
|
+
"aria-label": T("otp.verificationCode"),
|
|
140
|
+
class: "IncodeOtpSingleInput",
|
|
141
|
+
showErrorIcon: !0
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ i(a, {}),
|
|
144
|
+
/* @__PURE__ */ i(o, {
|
|
145
|
+
onClick: L,
|
|
146
|
+
disabled: C || w || !g,
|
|
147
|
+
isLoading: w,
|
|
148
|
+
"data-testid": "otp-submit",
|
|
149
|
+
children: T("common.continue")
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ i(a, { size: 12 }),
|
|
152
|
+
z()
|
|
153
|
+
]
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
export { u as t };
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { t as o } from "../incodeComponent-BoFhgK7G.js";
|
|
|
5
5
|
import { r as s } from "../loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as c } from "../page-C1yT4DLb.js";
|
|
7
7
|
import { t as l } from "../button-DcCUEn2n.js";
|
|
8
|
-
import { t as u } from "../otpInput-
|
|
8
|
+
import { t as u } from "../otpInput-C4pk4BJU.js";
|
|
9
9
|
import { t as d } from "../checkbox-DCCzBAuF.js";
|
|
10
10
|
import { t as f } from "../phoneInputComposed-CjAxk2Gj.js";
|
|
11
11
|
import { t as p } from "../incodeModule-BiCoAJ5k.js";
|
|
@@ -81,17 +81,23 @@ var _ = ({ config: o, manager: p, onFinish: _, onError: v }) => {
|
|
|
81
81
|
}, "phone-input");
|
|
82
82
|
}
|
|
83
83
|
if (b.status === "awaitingOtp" || b.status === "verifyingOtp" || b.status === "otpError" || b.status === "resendingOtp") {
|
|
84
|
-
let e = b.status === "verifyingOtp", t = b.status === "otpError", r = b.status === "awaitingOtp", i = b.status === "resendingOtp", a = r || t || e, o = t ? y(g(b.otpError)) : void 0;
|
|
84
|
+
let e = b.status === "verifyingOtp", t = b.status === "otpError", r = b.status === "awaitingOtp", i = b.status === "resendingOtp", a = r || t || e, o = t ? y(g(b.otpError)) : void 0, s = "otpValidationErrors" in b && b.otpValidationErrors?.otp ? y("otp.incompleteCode", { length: b.otpLength }) : void 0, l = "isOtpValid" in b ? b.isOtpValid : !0;
|
|
85
85
|
return /* @__PURE__ */ n(c, {
|
|
86
86
|
className: "IncodePhonePage",
|
|
87
87
|
title: y("otp.enterCodeSMS"),
|
|
88
88
|
children: /* @__PURE__ */ n(u, {
|
|
89
|
+
value: b.otpCode,
|
|
90
|
+
otpLength: b.otpLength,
|
|
89
91
|
resendTimer: a ? b.resendTimer : 0,
|
|
90
92
|
canResend: a ? b.canResend : !1,
|
|
91
93
|
isLoading: e,
|
|
92
94
|
disabled: i || e,
|
|
93
95
|
error: o,
|
|
96
|
+
validationError: s,
|
|
97
|
+
isValid: l,
|
|
94
98
|
onSubmit: (e) => x.submitOtp(e),
|
|
99
|
+
onChange: (e) => x.setOtpCode(e),
|
|
100
|
+
onValidate: () => x.validateOtp(),
|
|
95
101
|
onResend: () => x.resendOtp(),
|
|
96
102
|
onBack: () => x.back()
|
|
97
103
|
})
|
|
@@ -4,7 +4,7 @@ import { c, o as l } from "../hooks-MxHtZWTS.js";
|
|
|
4
4
|
import { t as u } from "../incodeComponent-BoFhgK7G.js";
|
|
5
5
|
import { r as d } from "../loadingIcon-BN5YRQUb.js";
|
|
6
6
|
import { t as f } from "../page-C1yT4DLb.js";
|
|
7
|
-
import "../extensibility-
|
|
7
|
+
import "../extensibility-DF-z_Zts.js";
|
|
8
8
|
import { t as p } from "../button-DcCUEn2n.js";
|
|
9
9
|
import { t as m } from "../verificationResult-V15L4ypC.js";
|
|
10
10
|
import { t as h } from "../incodeModule-BiCoAJ5k.js";
|
|
@@ -625,10 +625,16 @@ declare type ModalTitleSectionProps = {
|
|
|
625
625
|
export declare const OtpInput: FC<OtpInputProps>;
|
|
626
626
|
|
|
627
627
|
declare type OtpInputProps = {
|
|
628
|
+
value: string;
|
|
629
|
+
otpLength: number;
|
|
628
630
|
resendTimer: number;
|
|
629
631
|
canResend: boolean;
|
|
630
632
|
error?: string;
|
|
633
|
+
validationError?: string;
|
|
634
|
+
isValid?: boolean;
|
|
631
635
|
onSubmit: (code: string) => void;
|
|
636
|
+
onChange: (code: string) => void;
|
|
637
|
+
onValidate?: () => void;
|
|
632
638
|
onResend: () => void;
|
|
633
639
|
onBack: () => void;
|
|
634
640
|
/**
|
|
@@ -223,13 +223,13 @@ var N = {
|
|
|
223
223
|
INE_VALIDATION: () => import("./governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
|
|
224
224
|
GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((e) => e.Geolocation),
|
|
225
225
|
EXTERNAL_VERIFICATION: () => import("./ekycModule-Bx2PI3UK.js").then((e) => e.EkycModule),
|
|
226
|
-
EKYB: () => import("./ekybModule-
|
|
227
|
-
DOCUMENT_CAPTURE: () => import("./documentCapture-
|
|
228
|
-
ADDRESS: () => import("./documentCapture-
|
|
226
|
+
EKYB: () => import("./ekybModule-DoaEfEqH.js").then((e) => e.EkybModule),
|
|
227
|
+
DOCUMENT_CAPTURE: () => import("./documentCapture-DfcF8h_m.js").then((e) => e.DocumentCapture),
|
|
228
|
+
ADDRESS: () => import("./documentCapture-DfcF8h_m.js").then((e) => e.DocumentCapture),
|
|
229
229
|
COMBINED_CONSENT: () => import("./consent/consent.es.js").then((e) => e.Consent),
|
|
230
230
|
MANDATORY_CONSENT: () => import("./mandatoryConsent-DAFLnk4s.js").then((e) => e.MandatoryConsent),
|
|
231
231
|
SIGNATURE: () => import("./signature/signature.es.js").then((e) => e.Signature),
|
|
232
|
-
ID_OCR: () => import("./idOcr-
|
|
232
|
+
ID_OCR: () => import("./idOcr-DyiUeztu.js").then((e) => e.IdOcr),
|
|
233
233
|
CPF_OCR: () => import("./cpfOcr-DCTIr5fo.js").then((e) => e.CpfOcr),
|
|
234
234
|
ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((e) => e.Antifraud),
|
|
235
235
|
CUSTOM_FIELDS: () => import("./customFields-DNl42iD9.js").then((e) => e.CustomFields),
|
|
@@ -239,8 +239,8 @@ var N = {
|
|
|
239
239
|
AE_SIGNATURE: () => import("./ae-signature/ae-signature.es.js").then((e) => e.AeSignature),
|
|
240
240
|
QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((e) => e.QeSignature),
|
|
241
241
|
CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((e) => e.CrossDocumentDataMatch),
|
|
242
|
-
DYNAMIC_FORMS: () => import("./dynamicForms-
|
|
243
|
-
FIELD_COMPARISON: () => import("./fieldComparison-
|
|
242
|
+
DYNAMIC_FORMS: () => import("./dynamicForms-ByfP6dw6.js").then((e) => e.DynamicForms),
|
|
243
|
+
FIELD_COMPARISON: () => import("./fieldComparison-CM3YRwUd.js").then((e) => e.FieldComparison)
|
|
244
244
|
};
|
|
245
245
|
function P() {
|
|
246
246
|
return O();
|
|
@@ -5,7 +5,7 @@ import { c as l } from "../hooks-MxHtZWTS.js";
|
|
|
5
5
|
import { t as u } from "../incodeComponent-BoFhgK7G.js";
|
|
6
6
|
import { t as d } from "../transitionSpinner-Di3bOyOu.js";
|
|
7
7
|
import { t as f } from "../incodeModule-BiCoAJ5k.js";
|
|
8
|
-
import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-
|
|
8
|
+
import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-Besn5Bv3.js";
|
|
9
9
|
import { resolveWasmConfig as S, upgradeToWasmHttpClient as C, warmupWasm as w } from "@incodetech/core/wasm";
|
|
10
10
|
import { getDeviceClass as T } from "@incodetech/core/device";
|
|
11
11
|
import { bootstrapSession as E, refreshQrUrlUuid as D } from "@incodetech/core/session";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-20260604-
|
|
3
|
+
"version": "0.0.0-dev-20260604-0577f678",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"qrcode": "^1.5.4",
|
|
256
256
|
"signature_pad": "^5.1.3",
|
|
257
257
|
"tailwindcss": "^4.1.17",
|
|
258
|
-
"@incodetech/core": "0.0.0-dev-20260604-
|
|
258
|
+
"@incodetech/core": "0.0.0-dev-20260604-0577f678"
|
|
259
259
|
},
|
|
260
260
|
"devDependencies": {
|
|
261
261
|
"@microsoft/api-extractor": "^7.53.3",
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./i18n-Kzzvkz94.js";
|
|
2
|
-
import { _ as t, h as n, l as r, p as i, v as a } from "./vendor-preact-D6SntenC.js";
|
|
3
|
-
import { r as o } from "./loadingIcon-BN5YRQUb.js";
|
|
4
|
-
import { t as s } from "./button-DcCUEn2n.js";
|
|
5
|
-
import { t as c } from "./inputComposed-DAEey9xm.js";
|
|
6
|
-
import "./inputComposed-eS4B0Mkh.js";
|
|
7
|
-
//#region src/shared/otpInput/otpInput.tsx
|
|
8
|
-
var l = 6, u = (e) => `${Math.floor(e / 60)}:${(e % 60).toString().padStart(2, "0")}`, d = (e) => e.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, l), f = ({ resendTimer: f, canResend: p, error: m, onSubmit: h, onResend: g, onBack: _, backLinkText: v = "otp.changePhoneNumber", disabled: y = !1, isLoading: b = !1 }) => {
|
|
9
|
-
let { t: x } = e(), [S, C] = i(""), w = r(null), T = r(0), E = r(null), D = r(null), O = r(p), k = r(!1), A = r(), j = n((e) => {
|
|
10
|
-
let t = D.current;
|
|
11
|
-
t && (clearTimeout(A.current), t.textContent = "", A.current = setTimeout(() => {
|
|
12
|
-
t.textContent = e;
|
|
13
|
-
}, 50));
|
|
14
|
-
}, []);
|
|
15
|
-
t(() => {
|
|
16
|
-
let e = !O.current;
|
|
17
|
-
return O.current = p, e && p && j(x("otp.resendCodeAvailable")), () => clearTimeout(A.current);
|
|
18
|
-
}, [
|
|
19
|
-
p,
|
|
20
|
-
j,
|
|
21
|
-
x
|
|
22
|
-
]), t(() => {
|
|
23
|
-
m && (E.current = null, setTimeout(() => {
|
|
24
|
-
w.current?.focus();
|
|
25
|
-
}, 0));
|
|
26
|
-
}, [m]);
|
|
27
|
-
let M = n((e) => {
|
|
28
|
-
let t = d(e);
|
|
29
|
-
t.length !== l || b || E.current !== t && (E.current = t, h(t));
|
|
30
|
-
}, [b, h]);
|
|
31
|
-
t(() => {
|
|
32
|
-
if (!S) return;
|
|
33
|
-
let e = S.length === l && T.current < l;
|
|
34
|
-
T.current = S.length, e && M(S);
|
|
35
|
-
}, [S, M]);
|
|
36
|
-
let N = (e) => {
|
|
37
|
-
let t = e.target;
|
|
38
|
-
C(d(t.value));
|
|
39
|
-
}, P = (e) => {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
let t = d(e.clipboardData?.getData("text") || "");
|
|
42
|
-
t && (C(t), t.length === l && M(t));
|
|
43
|
-
};
|
|
44
|
-
t(() => {
|
|
45
|
-
if (p || f <= 0) {
|
|
46
|
-
k.current = !1;
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (!k.current) {
|
|
50
|
-
k.current = !0, j(x("otp.timerStarted", { time: String(f) }));
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
f === 10 ? j(x("otp.timerTenSeconds")) : f === 5 && j(x("otp.timerFiveSeconds"));
|
|
54
|
-
}, [
|
|
55
|
-
f,
|
|
56
|
-
p,
|
|
57
|
-
j,
|
|
58
|
-
x
|
|
59
|
-
]);
|
|
60
|
-
let F = () => {
|
|
61
|
-
if (!p && f > 0) return /* @__PURE__ */ a("div", {
|
|
62
|
-
class: "IncodeOtpInputActions",
|
|
63
|
-
children: /* @__PURE__ */ a("p", {
|
|
64
|
-
class: "IncodeOtpInputTimerText",
|
|
65
|
-
"data-testid": "otp-timer",
|
|
66
|
-
children: x("otp.resendCountdown", { time: u(f) })
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
let e = () => {
|
|
70
|
-
E.current = null, C(""), g();
|
|
71
|
-
}, t = () => {
|
|
72
|
-
E.current = null, C(""), _();
|
|
73
|
-
};
|
|
74
|
-
return /* @__PURE__ */ a("div", {
|
|
75
|
-
class: "IncodeOtpInputActions",
|
|
76
|
-
children: /* @__PURE__ */ a("p", {
|
|
77
|
-
class: `IncodeOtpInputResendText ${y ? "IncodeOtpInputResendTextDisabled" : ""}`,
|
|
78
|
-
"data-testid": "otp-resend-section",
|
|
79
|
-
children: [
|
|
80
|
-
x("otp.didYouNotGetIt"),
|
|
81
|
-
/* @__PURE__ */ a("button", {
|
|
82
|
-
type: "button",
|
|
83
|
-
class: "IncodeOtpInputLink",
|
|
84
|
-
onClick: e,
|
|
85
|
-
disabled: y || !p,
|
|
86
|
-
"data-testid": "otp-resend",
|
|
87
|
-
children: x("otp.resendCode")
|
|
88
|
-
}),
|
|
89
|
-
` ${x("otp.or")} `,
|
|
90
|
-
/* @__PURE__ */ a("button", {
|
|
91
|
-
type: "button",
|
|
92
|
-
class: "IncodeOtpInputLink",
|
|
93
|
-
onClick: t,
|
|
94
|
-
disabled: y,
|
|
95
|
-
"data-testid": "otp-back",
|
|
96
|
-
children: x(v)
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
})
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
return /* @__PURE__ */ a("div", {
|
|
103
|
-
class: "IncodeOtpInput IncodeOtpInputComposed",
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ a("div", {
|
|
106
|
-
ref: D,
|
|
107
|
-
class: "IncodeSrOnly",
|
|
108
|
-
"aria-live": "polite",
|
|
109
|
-
"aria-atomic": "true"
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ a(c, {
|
|
112
|
-
id: "otp-code",
|
|
113
|
-
type: "text",
|
|
114
|
-
inputMode: "text",
|
|
115
|
-
ref: w,
|
|
116
|
-
maxLength: l,
|
|
117
|
-
value: S,
|
|
118
|
-
error: m,
|
|
119
|
-
onInput: N,
|
|
120
|
-
onPaste: P,
|
|
121
|
-
disabled: y || b,
|
|
122
|
-
required: !0,
|
|
123
|
-
autocomplete: "one-time-code",
|
|
124
|
-
"data-testid": "otp-input-0",
|
|
125
|
-
"aria-label": x("otp.verificationCode"),
|
|
126
|
-
class: "IncodeOtpSingleInput",
|
|
127
|
-
showErrorIcon: !0
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ a(o, {}),
|
|
130
|
-
/* @__PURE__ */ a(s, {
|
|
131
|
-
onClick: () => {
|
|
132
|
-
M(S);
|
|
133
|
-
},
|
|
134
|
-
disabled: S.length < l || b,
|
|
135
|
-
isLoading: b,
|
|
136
|
-
"data-testid": "otp-submit",
|
|
137
|
-
children: x("common.continue")
|
|
138
|
-
}),
|
|
139
|
-
/* @__PURE__ */ a(o, { size: 12 }),
|
|
140
|
-
F()
|
|
141
|
-
]
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
//#endregion
|
|
145
|
-
export { f as t };
|