@incodetech/web 0.0.0-dev-20260430-9210a38 → 0.0.0-dev-20260501-05e25eb

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.
@@ -4,7 +4,7 @@ import { i as c, t as l } from "./hooks-K-ks8TCv.js";
4
4
  import { t as u } from "./incodeComponent-Brc9IhMv.js";
5
5
  import { t as d } from "./spacer-DCljE53A.js";
6
6
  import { t as f } from "./page-D5Mt-0zn.js";
7
- import { c as p, d as m, f as h, l as g, u as _, v, y } from "./extensibility-DNj8hlpt.js";
7
+ import { c as p, d as m, f as h, l as g, u as _, v, y } from "./extensibility-TTT9sIbb.js";
8
8
  import { n as b } from "./loadingIcon-wTrHZMGC.js";
9
9
  import { t as x } from "./spinner-CNteWaxs.js";
10
10
  import { t as S } from "./button-4-ToV5B_.js";
@@ -4,108 +4,116 @@ import { i } from "../hooks-K-ks8TCv.js";
4
4
  import { t as a } from "../incodeComponent-Brc9IhMv.js";
5
5
  import { t as o } from "../spacer-DCljE53A.js";
6
6
  import { t as s } from "../page-D5Mt-0zn.js";
7
- import "../extensibility-DNj8hlpt.js";
7
+ import "../extensibility-TTT9sIbb.js";
8
8
  import { t as c } from "../button-4-ToV5B_.js";
9
9
  import { t as l } from "../inputComposed-28d14HXP.js";
10
10
  import { t as u } from "../otpInput-BuHkqpRJ.js";
11
11
  import { t as d } from "../incodeModule-BH9gV7jI.js";
12
12
  import { createEmailManager as f } from "@incodetech/core/email";
13
13
  //#region src/modules/email/emailInput.tsx
14
- var p = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, m = ({ prefilledEmail: i, emailError: a, label: o, disabled: s = !1, required: c = !1, onEmailChange: u }) => {
15
- let { t: d } = e(), [f, m] = n("");
16
- t(() => {
17
- if (i) {
18
- m(i);
19
- let e = p.test(i.trim());
20
- u(i.trim(), e);
21
- }
22
- }, [i, u]);
23
- let h = (e) => {
24
- let t = e.target.value;
25
- m(t);
26
- let n = t.trim();
27
- u(n, n.length > 0 && p.test(n));
28
- }, g = a ? "email-error" : void 0;
14
+ var p = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/, m = ({ value: t, emailError: n, label: i, disabled: a = !1, required: o = !1, onEmailChange: s, onBlur: c }) => {
15
+ let { t: u } = e(), d = (e) => {
16
+ let t = e.target.value.trim();
17
+ s(t, t.length > 0 && p.test(t));
18
+ }, f = n ? "email-error" : void 0;
29
19
  return /* @__PURE__ */ r("div", {
30
20
  class: "IncodeEmailInput",
31
21
  children: /* @__PURE__ */ r("div", {
32
22
  class: "IncodeEmailInputContainer",
23
+ onFocusOut: c,
33
24
  children: /* @__PURE__ */ r(l, {
34
25
  id: "email-input",
35
26
  type: "email",
36
- value: f,
37
- onInput: h,
38
- placeholder: d("email.placeholder"),
39
- disabled: s,
40
- required: c,
41
- label: o,
27
+ value: t,
28
+ onInput: d,
29
+ placeholder: u("email.placeholder"),
30
+ disabled: a,
31
+ required: o,
32
+ label: i,
42
33
  "data-testid": "email-input",
43
- "aria-label": o ? void 0 : "Email address",
44
- "aria-invalid": a ? "true" : void 0,
45
- "aria-describedby": g || void 0,
34
+ "aria-label": i ? void 0 : "Email address",
35
+ "aria-invalid": n ? "true" : void 0,
36
+ "aria-describedby": f || void 0,
46
37
  autocomplete: "email",
47
- error: a,
38
+ error: n,
48
39
  showErrorIcon: !0
49
40
  })
50
41
  })
51
42
  });
52
- }, h = ({ config: t, manager: a, onFinish: l, onError: d }) => {
53
- let { t: p } = e(), [h, g] = i(() => {
54
- if (a) return a;
55
- if (!t) throw Error("Email config is required");
56
- return f({ config: t });
57
- }, { manageLifecycle: !a }), [_, v] = n(!1);
58
- if (h.status === "idle" || h.status === "loadingPrefill" || h.status === "inputting" || h.status === "submitting" || h.status === "sendingInitialOtp") {
59
- 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;
43
+ };
44
+ //#endregion
45
+ //#region src/modules/email/email.tsx
46
+ function h(e) {
47
+ return e === "serverError" ? "email.serverError" : e;
48
+ }
49
+ function g(e) {
50
+ return e === "invalidEmail" ? "verification.errors.emailInvalid" : e === "serverError" ? "email.serverError" : e;
51
+ }
52
+ var _ = ({ config: a, manager: l, onFinish: d, onError: p }) => {
53
+ let { t: _ } = e(), [v, y] = i(() => {
54
+ if (l) return l;
55
+ if (!a) throw Error("Email config is required");
56
+ return f({ config: a });
57
+ }, { manageLifecycle: !l }), [b, x] = n(""), [S, C] = n(!1), [w, T] = n(!1), [E, D] = n(!1), O = v.status === "inputting" ? v.prefilledEmail ?? "" : "";
58
+ if (t(() => {
59
+ if (O) {
60
+ let e = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(O.trim());
61
+ x(O.trim()), C(e), y.setEmail(O.trim(), e);
62
+ }
63
+ }, [O, y]), v.status === "idle" || v.status === "loadingPrefill" || v.status === "inputting" || v.status === "submitting" || v.status === "sendingInitialOtp") {
64
+ let e = v.status === "idle" || v.status === "loadingPrefill" || v.status === "submitting" || v.status === "sendingInitialOtp", t = v.status === "inputting" && v.emailError ? _(g(v.emailError)) : void 0, n = v.status === "inputting" && w && E && !S ? _("verification.errors.emailInvalid") : void 0, i = t ?? n, a = !S || t !== void 0;
60
65
  return /* @__PURE__ */ r(s, {
61
66
  className: "IncodeEmailPage",
62
- title: p("email.verify"),
63
- subtitle: p("email.willSendCode"),
67
+ title: _("email.verify"),
68
+ subtitle: _("email.willSendCode"),
64
69
  children: [
65
70
  /* @__PURE__ */ r(m, {
66
- prefilledEmail: t,
67
- emailError: n,
71
+ value: b,
72
+ emailError: i,
68
73
  disabled: e,
69
74
  onEmailChange: (e, t) => {
70
- g.setEmail(e, t), v(t);
75
+ y.setEmail(e, t), x(e), T(!0), D(!1), C(t);
76
+ },
77
+ onBlur: () => {
78
+ D(!0);
71
79
  }
72
80
  }),
73
81
  /* @__PURE__ */ r(o, {}),
74
82
  /* @__PURE__ */ r(c, {
75
- onClick: () => g.submit(),
76
- disabled: !_,
83
+ onClick: () => y.submit(),
84
+ disabled: a,
77
85
  isLoading: e,
78
86
  "data-testid": "email-submit",
79
- children: p("common.continue")
87
+ children: _("common.continue")
80
88
  })
81
89
  ]
82
90
  }, "email-input");
83
91
  }
84
- if (h.status === "awaitingOtp" || h.status === "verifyingOtp" || h.status === "otpError" || h.status === "resendingOtp") {
85
- let e = h.status === "verifyingOtp", t = h.status === "otpError", n = h.status === "awaitingOtp", i = h.status === "resendingOtp", a = n || t || e;
92
+ if (v.status === "awaitingOtp" || v.status === "verifyingOtp" || v.status === "otpError" || v.status === "resendingOtp") {
93
+ let e = v.status === "verifyingOtp", t = v.status === "otpError", n = v.status === "awaitingOtp", i = v.status === "resendingOtp", a = n || t || e;
86
94
  return /* @__PURE__ */ r(s, {
87
95
  className: "IncodeEmailPage IncodeEmailOtpPage",
88
- title: p("otp.enterCodeEmail"),
96
+ title: _("otp.enterCodeEmail"),
89
97
  children: /* @__PURE__ */ r(u, {
90
- resendTimer: a ? h.resendTimer : 0,
91
- canResend: a ? h.canResend : !1,
92
- error: t ? p(h.otpError) : void 0,
98
+ resendTimer: a ? v.resendTimer : 0,
99
+ canResend: a ? v.canResend : !1,
100
+ error: t ? _(h(v.otpError)) : void 0,
93
101
  isLoading: e,
94
102
  disabled: i || e,
95
- onSubmit: (e) => g.submitOtp(e),
96
- onResend: () => g.resendOtp(),
97
- onBack: () => g.back(),
103
+ onSubmit: (e) => y.submitOtp(e),
104
+ onResend: () => y.resendOtp(),
105
+ onBack: () => y.back(),
98
106
  backLinkText: "otp.changeEmail"
99
107
  })
100
108
  }, "email-otp");
101
109
  }
102
- return h.status === "finished" ? (l?.(), null) : (h.status === "error" && d?.(h.error), null);
103
- }, g = ({ config: e, manager: t, onFinish: n, onError: i }) => /* @__PURE__ */ r(a, { children: e || t ? /* @__PURE__ */ r(h, {
110
+ return v.status === "finished" ? (d?.(), null) : (v.status === "error" && p?.(v.error), null);
111
+ }, v = ({ config: e, manager: t, onFinish: n, onError: i }) => /* @__PURE__ */ r(a, { children: e || t ? /* @__PURE__ */ r(_, {
104
112
  config: e,
105
113
  manager: t,
106
114
  onFinish: n,
107
115
  onError: i
108
116
  }) : null });
109
- d(g, "incode-email");
117
+ d(v, "incode-email");
110
118
  //#endregion
111
- export { g as Email };
119
+ export { v as Email };
@@ -1089,7 +1089,7 @@ var $ = ({ mode: e, orientation: t, onAnimationEnd: r }) => {
1089
1089
  class: "IncodeIdManualCaptureTooltip",
1090
1090
  children: /* @__PURE__ */ u("ol", {
1091
1091
  class: "IncodeIdManualCaptureTooltipList",
1092
- children: [/* @__PURE__ */ u("li", { children: v("idv2.commonIssues.firstStep") }), /* @__PURE__ */ u("li", { children: v("idv2.commonIssues.secondStep") })]
1092
+ children: [/* @__PURE__ */ u("li", { children: v(T ? "idv2.commonIssues.firstStepPassport" : "idv2.commonIssues.firstStep") }), /* @__PURE__ */ u("li", { children: v("idv2.commonIssues.secondStep") })]
1093
1093
  })
1094
1094
  })
1095
1095
  }) : null
@@ -4,7 +4,7 @@ import { i as n, r } from "./hooks-K-ks8TCv.js";
4
4
  import { n as i, t as a } from "./incodeComponent-Brc9IhMv.js";
5
5
  import { t as o } from "./spacer-DCljE53A.js";
6
6
  import { t as s } from "./page-D5Mt-0zn.js";
7
- import { _ as c, a 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-DNj8hlpt.js";
7
+ import { _ as c, a 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-TTT9sIbb.js";
8
8
  import { a as D, i as O, n as k, o as A, r as j, t as M } from "./typography-BU5GeRw-.js";
9
9
  import { t as N } from "./spinner-CNteWaxs.js";
10
10
  import { t as P } from "./processing-5g21QOQZ.js";
@@ -5,7 +5,7 @@ import { i as l } from "../hooks-K-ks8TCv.js";
5
5
  import { t as u } from "../incodeComponent-Brc9IhMv.js";
6
6
  import { t as d } from "../transitionSpinner-CisZoKUv.js";
7
7
  import { t as f } from "../incodeModule-BH9gV7jI.js";
8
- import { a as p, c as m, d as h, i as g, l as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "../useModuleLoader-B1uekAhF.js";
8
+ import { a as p, c as m, d as h, i as g, l as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "../useModuleLoader-ChOOrxCM.js";
9
9
  import { getDeviceClass as T } from "@incodetech/core/device";
10
10
  import { getRequiredWasmPipelines as E } from "@incodetech/core/flow";
11
11
  import { QrValidationError as D, bootstrapSession as O, refreshQrUrlUuid as k } from "@incodetech/core/session";
package/dist/id/id.es.js CHANGED
@@ -3,7 +3,7 @@ import { _ as t, c as n, l as r, o as i, v as a } from "../vendor-preact-D6Snten
3
3
  import { i as o } from "../hooks-K-ks8TCv.js";
4
4
  import { t as s } from "../incodeComponent-Brc9IhMv.js";
5
5
  import { t as c } from "../page-D5Mt-0zn.js";
6
- import { a as l, i as u, n as d, o as f, r as p, t as m } from "../extensibility-DNj8hlpt.js";
6
+ import { a as l, i as u, n as d, o as f, r as p, t as m } from "../extensibility-TTT9sIbb.js";
7
7
  import { n as h } from "../loadingIcon-wTrHZMGC.js";
8
8
  import { t as g } from "../spinner-CNteWaxs.js";
9
9
  import "../spinner-BiPJCr9Q.js";
@@ -3,7 +3,7 @@ import { v as t } from "./vendor-preact-D6SntenC.js";
3
3
  import { i as n } from "./hooks-K-ks8TCv.js";
4
4
  import { t as r } from "./incodeComponent-Brc9IhMv.js";
5
5
  import { t as i } from "./page-D5Mt-0zn.js";
6
- import { _ as a } from "./extensibility-DNj8hlpt.js";
6
+ import { _ as a } from "./extensibility-TTT9sIbb.js";
7
7
  import { t as o } from "./button-4-ToV5B_.js";
8
8
  import { t as s } from "./verificationResult-BvUseXrX.js";
9
9
  import { t as c } from "./inputComposed-28d14HXP.js";
@@ -4,7 +4,7 @@ import { i as c } from "../hooks-K-ks8TCv.js";
4
4
  import { t as l } from "../incodeComponent-Brc9IhMv.js";
5
5
  import { t as u } from "../spacer-DCljE53A.js";
6
6
  import { t as d } from "../page-D5Mt-0zn.js";
7
- import "../extensibility-DNj8hlpt.js";
7
+ import "../extensibility-TTT9sIbb.js";
8
8
  import { t as f } from "../button-4-ToV5B_.js";
9
9
  import { t as p } from "../verificationResult-BvUseXrX.js";
10
10
  import { t as m } from "../incodeModule-BH9gV7jI.js";
@@ -174,12 +174,12 @@ var M = {
174
174
  GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((e) => e.Geolocation),
175
175
  EXTERNAL_VERIFICATION: () => import("./ekycModule-Cui98eSq.js").then((e) => e.EkycModule),
176
176
  EKYB: () => import("./ekybModule-Cl0rbs4s.js").then((e) => e.EkybModule),
177
- DOCUMENT_CAPTURE: () => import("./documentCapture-CcVn64fP.js").then((e) => e.DocumentCapture),
178
- ADDRESS: () => import("./documentCapture-CcVn64fP.js").then((e) => e.DocumentCapture),
177
+ DOCUMENT_CAPTURE: () => import("./documentCapture-Dzou9uTk.js").then((e) => e.DocumentCapture),
178
+ ADDRESS: () => import("./documentCapture-Dzou9uTk.js").then((e) => e.DocumentCapture),
179
179
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((e) => e.Consent),
180
180
  MANDATORY_CONSENT: () => import("./mandatoryConsent-BP_Zpvrh.js").then((e) => e.MandatoryConsent),
181
181
  SIGNATURE: () => import("./signature/signature.es.js").then((e) => e.Signature),
182
- ID_OCR: () => import("./idOcr-Dj81-Oip.js").then((e) => e.IdOcr),
182
+ ID_OCR: () => import("./idOcr-DvBdbbVN.js").then((e) => e.IdOcr),
183
183
  CPF_OCR: () => import("./cpfOcr-BmNgojfA.js").then((e) => e.CpfOcr),
184
184
  ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((e) => e.Antifraud),
185
185
  CUSTOM_FIELDS: () => import("./customFields-BE-LNxr6.js").then((e) => e.CustomFields),
@@ -6,7 +6,7 @@ import { t as s } from "../incodeComponent-Brc9IhMv.js";
6
6
  import "../spinner-BiPJCr9Q.js";
7
7
  import { t as c } from "../transitionSpinner-CisZoKUv.js";
8
8
  import { t as l } from "../incodeModule-BH9gV7jI.js";
9
- import { a as u, f as d, i as f, m as p, t as m } from "../useModuleLoader-B1uekAhF.js";
9
+ import { a as u, f as d, i as f, m as p, t as m } from "../useModuleLoader-ChOOrxCM.js";
10
10
  import { resolveWasmConfig as h, warmupWasm as g } from "@incodetech/core/wasm";
11
11
  import { QrValidationError as _, refreshQrUrlUuid as v } from "@incodetech/core/session";
12
12
  import { createWorkflowManager as y } from "@incodetech/core/workflow";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260430-9210a38",
3
+ "version": "0.0.0-dev-20260501-05e25eb",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -239,7 +239,7 @@
239
239
  "qrcode": "^1.5.4",
240
240
  "signature_pad": "^5.1.3",
241
241
  "tailwindcss": "^4.1.17",
242
- "@incodetech/core": "0.0.0-dev-20260430-9210a38"
242
+ "@incodetech/core": "0.0.0-dev-20260501-05e25eb"
243
243
  },
244
244
  "devDependencies": {
245
245
  "@microsoft/api-extractor": "^7.53.3",