@incodetech/web 0.0.0-dev-20260504-4f40699 → 0.0.0-dev-20260504-8289e2f

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.
@@ -0,0 +1,78 @@
1
+ import { _ as e, p as t, v as n } from "./vendor-preact-D6SntenC.js";
2
+ import { i as r } from "./hooks-K-ks8TCv.js";
3
+ import { t as i } from "./spacer-DCljE53A.js";
4
+ import { t as a } from "./page-D5Mt-0zn.js";
5
+ import { t as o } from "./spinner-CNteWaxs.js";
6
+ import "./spinner-BiPJCr9Q.js";
7
+ import { t as s } from "./button-4-ToV5B_.js";
8
+ import { t as c } from "./verificationResult-BvUseXrX.js";
9
+ import { t as l } from "./inputComposed-28d14HXP.js";
10
+ import { createCpfOcrManager as u } from "@incodetech/core/cpf-ocr";
11
+ //#region src/modules/cpf-ocr/cpfOcr.tsx
12
+ var d = (e) => e.status === "inputting" ? {
13
+ cpf: e.cpf,
14
+ isValid: e.isValid
15
+ } : {
16
+ cpf: "",
17
+ isValid: !1
18
+ }, f = ({ onFinish: f, onError: p }) => {
19
+ let [m, h] = r(() => u()), [g, _] = t(!1), [v, y] = t(!1), [b, x] = t(!1);
20
+ if (e(() => {
21
+ m.status === "finished" && f?.();
22
+ }, [m.status, f]), e(() => {
23
+ m.status === "error" && p?.(m.error);
24
+ }, [m, p]), m.status === "idle" || m.status === "loading" || m.status === "submitting") return /* @__PURE__ */ n(a, {
25
+ className: "IncodeCpfOcrPage",
26
+ children: /* @__PURE__ */ n("div", {
27
+ class: "IncodeCpfOcrLoading",
28
+ children: /* @__PURE__ */ n(o, { fullScreen: !1 })
29
+ })
30
+ });
31
+ if (m.status === "error") return /* @__PURE__ */ n(c, {
32
+ status: "failure",
33
+ failureTitle: "Não foi possível verificar o CPF",
34
+ onRetry: () => h.retry()
35
+ });
36
+ if (m.status === "finished") return null;
37
+ let S = d(m), C = S.cpf.replace(/\D/g, "").length === 11, w = v && !S.isValid && (C || g && !b) ? "Insira um CPF válido" : void 0;
38
+ return /* @__PURE__ */ n(a, {
39
+ className: "IncodeCpfOcrPage",
40
+ title: "Insira e verifique o número do seu CPF",
41
+ children: /* @__PURE__ */ n("div", {
42
+ class: "IncodeCpfOcr",
43
+ children: [
44
+ /* @__PURE__ */ n(i, { size: 32 }),
45
+ /* @__PURE__ */ n(l, {
46
+ id: "cpf-ocr-input",
47
+ label: "",
48
+ value: S.cpf,
49
+ placeholder: "Seu CPF",
50
+ maxLength: 14,
51
+ inputMode: "numeric",
52
+ "aria-label": "CPF",
53
+ onInput: (e) => {
54
+ y(!0), h.setCpf(e.target.value);
55
+ },
56
+ onFocus: () => {
57
+ x(!0);
58
+ },
59
+ onBlur: () => {
60
+ x(!1), _(!0);
61
+ },
62
+ error: w,
63
+ showErrorIcon: !0
64
+ }),
65
+ /* @__PURE__ */ n(i, {}),
66
+ /* @__PURE__ */ n(s, {
67
+ type: "button",
68
+ onClick: () => h.submit(),
69
+ disabled: !S.isValid,
70
+ "data-testid": "cpf-ocr-continue",
71
+ children: "Continuar"
72
+ })
73
+ ]
74
+ })
75
+ });
76
+ };
77
+ //#endregion
78
+ export { f as CpfOcr };
@@ -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-JcIcr7jR.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-DwhvEFIP.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";
@@ -180,7 +180,7 @@ var M = {
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
182
  ID_OCR: () => import("./idOcr-DXZbASy3.js").then((e) => e.IdOcr),
183
- CPF_OCR: () => import("./cpfOcr-BmNgojfA.js").then((e) => e.CpfOcr),
183
+ CPF_OCR: () => import("./cpfOcr-FEdIt1gs.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),
186
186
  WATCHLIST: () => import("./watchlist/watchlist.es.js").then((e) => e.Watchlist),
@@ -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-JcIcr7jR.js";
9
+ import { a as u, f as d, i as f, m as p, t as m } from "../useModuleLoader-DwhvEFIP.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-20260504-4f40699",
3
+ "version": "0.0.0-dev-20260504-8289e2f",
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-20260504-4f40699"
242
+ "@incodetech/core": "0.0.0-dev-20260504-8289e2f"
243
243
  },
244
244
  "devDependencies": {
245
245
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,70 +0,0 @@
1
- import { _ as e, v as t } from "./vendor-preact-D6SntenC.js";
2
- import { i as n } from "./hooks-K-ks8TCv.js";
3
- import { t as r } from "./spacer-DCljE53A.js";
4
- import { t as i } from "./page-D5Mt-0zn.js";
5
- import { t as a } from "./spinner-CNteWaxs.js";
6
- import "./spinner-BiPJCr9Q.js";
7
- import { t as o } from "./button-4-ToV5B_.js";
8
- import { t as s } from "./verificationResult-BvUseXrX.js";
9
- import { t as c } from "./inputComposed-28d14HXP.js";
10
- import { createCpfOcrManager as l } from "@incodetech/core/cpf-ocr";
11
- //#region src/modules/cpf-ocr/cpfOcr.tsx
12
- var u = (e) => e.status === "inputting" ? {
13
- cpf: e.cpf,
14
- isValid: e.isValid
15
- } : {
16
- cpf: "",
17
- isValid: !1
18
- }, d = ({ onFinish: d, onError: f }) => {
19
- let [p, m] = n(() => l());
20
- if (e(() => {
21
- p.status === "finished" && d?.();
22
- }, [p.status, d]), e(() => {
23
- p.status === "error" && f?.(p.error);
24
- }, [p, f]), p.status === "idle" || p.status === "loading" || p.status === "submitting") return /* @__PURE__ */ t(i, {
25
- className: "IncodeCpfOcrPage",
26
- children: /* @__PURE__ */ t("div", {
27
- class: "IncodeCpfOcrLoading",
28
- children: /* @__PURE__ */ t(a, { fullScreen: !1 })
29
- })
30
- });
31
- if (p.status === "error") return /* @__PURE__ */ t(s, {
32
- status: "failure",
33
- failureTitle: "Não foi possível verificar o CPF",
34
- onRetry: () => m.retry()
35
- });
36
- if (p.status === "finished") return null;
37
- let h = u(p);
38
- return /* @__PURE__ */ t(i, {
39
- className: "IncodeCpfOcrPage",
40
- title: "Insira e verifique o número do seu CPF",
41
- children: /* @__PURE__ */ t("div", {
42
- class: "IncodeCpfOcr",
43
- children: [
44
- /* @__PURE__ */ t(r, { size: 32 }),
45
- /* @__PURE__ */ t(c, {
46
- id: "cpf-ocr-input",
47
- label: "",
48
- value: h.cpf,
49
- placeholder: "Seu CPF",
50
- maxLength: 14,
51
- inputMode: "numeric",
52
- "aria-label": "CPF",
53
- onInput: (e) => {
54
- m.setCpf(e.target.value);
55
- }
56
- }),
57
- /* @__PURE__ */ t(r, {}),
58
- /* @__PURE__ */ t(o, {
59
- type: "button",
60
- onClick: () => m.submit(),
61
- disabled: !h.isValid,
62
- "data-testid": "cpf-ocr-continue",
63
- children: "Continuar"
64
- })
65
- ]
66
- })
67
- });
68
- };
69
- //#endregion
70
- export { d as CpfOcr };