@incodetech/web 2.0.1 → 2.1.0-rc.1
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/ae-signature/ae-signature.es.js +15 -13
- package/dist/ae-signature/styles.css +3 -17
- package/dist/ae-signature/styles2.css +15 -5
- package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
- package/dist/antifraud/antifraud.es.js +23 -16
- package/dist/authentication/authentication.es.js +42 -27
- package/dist/autoFocusTitle-BzkUiELM.js +29 -0
- package/dist/{back-horizontal-hint-B8Brxh3U.js → back-horizontal-hint-D_8LptLm.js} +26 -26
- package/dist/back-tutorial-vb1MxlrT.js +14597 -0
- package/dist/{back-vertical-hint-BBo36dxn.js → back-vertical-hint-C1evxxq2.js} +27 -27
- package/dist/backdevicelottie-HypPqBz7.js +16690 -0
- package/dist/base.css +1258 -104
- package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
- package/dist/bottomSheet-F1GJfQx_.js +39 -0
- package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
- package/dist/button-CM_hgyIP.js +35 -0
- package/dist/checkbox-BoeLHKgp.js +96 -0
- package/dist/consent/consent.es.js +89 -73
- package/dist/consent/styles.css +35 -22
- package/dist/countrySelector-mSWyHSy4.js +60 -0
- package/dist/cpf-ocr/cpf-ocr.es.js +2 -0
- package/dist/cpfOcr-MtpRztkG.js +92 -0
- package/dist/cpfOcr-jJkYCfsX.js +2 -0
- package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -16
- package/dist/curp-validation/curp-validation.es.js +247 -203
- package/dist/customFields-DXXt9HGM.js +140 -0
- package/dist/customWatchlist-DsW04UF6.js +36 -0
- package/dist/dateInputComposed-C_mh4XBg.js +69 -0
- package/dist/dateInputComposed-Cy6a7ymh.js +1 -0
- package/dist/defineProperty-mefzVtTv.js +39 -0
- package/dist/document-capture/document-capture.es.js +2 -0
- package/dist/document-capture/styles.css +2 -5
- package/dist/documentCapture-8ypBJehw.js +2 -0
- package/dist/documentCapture-BDV_921m.js +880 -0
- package/dist/dropdownComposed-CEWBSdGl.js +1 -0
- package/dist/dropdownComposed-_fgAlo_C.js +380 -0
- package/dist/dynamic-forms/styles.css +25 -13
- package/dist/dynamicForms-DyfnsS7E.js +352 -0
- package/dist/ekyb/ekyb.es.js +2 -2
- package/dist/ekyb/styles.css +2 -0
- package/dist/ekybModule-CIPGmCvD.js +279 -0
- package/dist/ekybModule-DFoYpheB.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -2
- package/dist/ekyc/styles.css +9 -7
- package/dist/ekycModule-BGzwgjl1.js +2 -0
- package/dist/ekycModule-BuTaC5ct.js +257 -0
- package/dist/electronic-signature/electronic-signature.es.js +2 -2
- package/dist/electronic-signature-B-Q7M0wK.js +430 -0
- package/dist/email/email.es.js +199 -66
- package/dist/emailInput-KZmhjOdZ.js +39 -0
- package/dist/errorIcon-DJRZpd8j.js +26 -0
- package/dist/expiredId-Q1t6aVpk.js +85 -0
- package/dist/extensibility-Cs3KQQdC.js +3070 -0
- package/dist/extensibility.es.js +26 -25
- package/dist/face-match/face-match.es.js +2 -2
- package/dist/face-match/styles.css +0 -4
- package/dist/faceMatch--RDHJe4t.js +343 -0
- package/dist/faceMatch-yEKPYaym.js +2 -0
- package/dist/field-comparison/field-comparison.es.js +2 -0
- package/dist/field-comparison/styles.css +16 -0
- package/dist/fieldComparison-CAF86bTC.js +88 -0
- package/dist/fieldComparison-D0an7T_g.js +2 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +224 -0
- package/dist/fiscal-qr/styles.css +71 -0
- package/dist/{flip-animation-CgwRsEmK.js → flip-animation-BGRvygw9.js} +4221 -4221
- package/dist/flow/flow.es.js +619 -484
- package/dist/flow/styles.css +378 -418
- package/dist/{front-horizontal-hint-DGGGi8e1.js → front-horizontal-hint-Uf5bHCsd.js} +70 -70
- package/dist/{front-vertical-hint-CNr5mE6Q.js → front-vertical-hint-DdWNA45v.js} +81 -81
- package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
- package/dist/geolocation/geolocation.es.js +486 -395
- package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
- package/dist/governmentValidation/governmentValidation.es.js +166 -93
- package/dist/governmentValidation/styles.css +0 -17
- package/dist/homeScreen-BZnIEDrV.js +264 -0
- package/dist/hooks-Da_yP_Dr.js +149 -0
- package/dist/i18n-CoCO2ZuN.js +2971 -0
- package/dist/icons-Dbs9ZfYM.js +360 -0
- package/dist/id/id.es.js +583 -414
- package/dist/id/styles.css +59 -43
- package/dist/id-laser-h-DX8UbVNH.js +467 -0
- package/dist/id-laser-v-DhnHdjlB.js +490 -0
- package/dist/id-tutorial-lj4iKtYT.js +13165 -0
- package/dist/id-verification/id-verification.es.js +21 -17
- package/dist/idOcr-CjGbb4dB.js +123 -0
- package/dist/identity-reuse/identity-reuse.es.js +311 -182
- package/dist/identity-reuse/styles.css +134 -80
- package/dist/incode-logo-57XFniXU.js +4 -0
- package/dist/incodeComponent-wfnHlnXx.js +63 -0
- package/dist/incodeModule-BUDoTwT9.js +13 -0
- package/dist/index.es.js +17 -13
- package/dist/inputComposed-BEn7_nZd.js +1 -0
- package/dist/inputComposed-CQ4AsvZg.js +99 -0
- package/dist/loadingIcon-B0ysgiNq.js +148 -0
- package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
- package/dist/mandatoryConsent-r0PQHmv-.js +107 -0
- package/dist/modal-nTSaG7nB.js +139 -0
- package/dist/modal.hooks-D2xhIuHA.js +195 -0
- package/dist/numberedStep-CEtwZqLp.js +13 -0
- package/dist/optionAccessibleLabel-CnA-mNAU.js +202 -0
- package/dist/otpInput-_JmtVwa0.js +195 -0
- package/dist/page-DxGQj7Gk.js +71 -0
- package/dist/{passport-horizontal-hint-Bgquwtac.js → passport-horizontal-hint-Bbm2mvSn.js} +55 -55
- package/dist/{passport-tutorial-DwRwtPVX.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
- package/dist/{passport-vertical-hint-BT1D5BrW.js → passport-vertical-hint-DJbCtBiM.js} +49 -49
- package/dist/pdf-BZA70WbM.js +22398 -0
- package/dist/pdfViewer-BK-yVIve.js +114 -0
- package/dist/phone/phone.es.js +214 -70
- package/dist/phoneInputComposed-DjNdsmPE.js +12142 -0
- package/dist/processing-BM-wT-1W.js +8 -0
- package/dist/qe-signature/qe-signature.es.js +15 -13
- package/dist/radioGroupComposed-BNuaopVr.js +215 -0
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2774 -0
- package/dist/redirect-to-mobile/styles.css +19 -269
- package/dist/registerIncodeElement-77NGCDsy.js +11 -0
- package/dist/requiredLabelHint-DEadtiwx.js +17 -0
- package/dist/richText-Cf9aMOCk.js +3153 -0
- package/dist/rolldown-runtime--E5BIlTp.js +33 -0
- package/dist/selfie/selfie.es.js +54 -37
- package/dist/selfie/styles.css +0 -4
- package/dist/selfieTutorial-CtruLyO2.js +2689 -0
- package/dist/signature/signature.es.js +778 -405
- package/dist/snackbar-CxepGC3e.js +16 -0
- package/dist/spinner-B6RxGFrI.js +1 -0
- package/dist/spinner-D8a_2LvW.js +42 -0
- package/dist/statusPage-DMYPUwRZ.js +28 -0
- package/dist/successIcon-BAyDPT7I.js +30 -0
- package/dist/tabs-C8npVBbk.js +103 -0
- package/dist/themes/dark.css +5 -0
- package/dist/themes/light.css +4 -0
- package/dist/transitionSpinner-DRRz-NV8.js +26 -0
- package/dist/{tutorial-9vHAHvMK.js → tutorial-D1qaY2Tm.js} +1105 -856
- package/dist/types/ae-signature.d.ts +4 -1
- package/dist/types/antifraud.d.ts +9 -3
- package/dist/types/authentication.d.ts +4 -1
- package/dist/types/consent.d.ts +4 -1
- package/dist/types/cpf-ocr.d.ts +12 -0
- package/dist/types/cross-document-data-match.d.ts +4 -1
- package/dist/types/curp-validation.d.ts +9 -3
- package/dist/types/document-capture.d.ts +37 -0
- package/dist/types/ekyb.d.ts +4 -1
- package/dist/types/ekyc.d.ts +4 -1
- package/dist/types/electronic-signature.d.ts +4 -1
- package/dist/types/email.d.ts +4 -1
- package/dist/types/extensibility.d.ts +40 -15
- package/dist/types/face-match.d.ts +4 -1
- package/dist/types/field-comparison.d.ts +38 -0
- package/dist/types/fiscal-qr.d.ts +43 -0
- package/dist/types/flow.d.ts +5 -2
- package/dist/types/geolocation.d.ts +4 -1
- package/dist/types/governmentValidation.d.ts +4 -1
- package/dist/types/id-verification.d.ts +4 -1
- package/dist/types/id.d.ts +4 -1
- package/dist/types/identity-reuse.d.ts +4 -1
- package/dist/types/index.d.ts +26 -2
- package/dist/types/phone.d.ts +4 -1
- package/dist/types/qe-signature.d.ts +4 -1
- package/dist/types/redirect-to-mobile.d.ts +17 -0
- package/dist/types/selfie.d.ts +4 -1
- package/dist/types/signature.d.ts +4 -1
- package/dist/types/watchlist.d.ts +4 -1
- package/dist/types/workflow.d.ts +55 -11
- package/dist/typography-YLgHHuao.js +45 -0
- package/dist/uiConfig-D2_wawvr.js +25 -0
- package/dist/useModuleLoader-CeJ2jL25.js +672 -0
- package/dist/vendor-preact-DThS2ZQ_.js +955 -0
- package/dist/verificationResult-Do5SpZ6X.js +64 -0
- package/dist/verifiedByIncode-DjXOdCml.js +103 -0
- package/dist/watchlist/watchlist.es.js +31 -28
- package/dist/watchlistForBusiness-BFFXC9d-.js +80 -0
- package/dist/workflow/styles.css +449 -427
- package/dist/workflow/workflow.es.js +268 -182
- package/package.json +32 -10
- package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
- package/dist/autoFocusTitle-QexamZ4i.js +0 -16
- package/dist/back-tutorial-1NOQobGO.js +0 -14585
- package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
- package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
- package/dist/bottomSheet-DE_8TFEC.js +0 -31
- package/dist/browser-ponyfill-jOkuz57z.js +0 -299
- package/dist/button-DcCUEn2n.js +0 -24
- package/dist/checkbox-Cl57ltq_.js +0 -85
- package/dist/countrySelector-CE-JgIsv.js +0 -58
- package/dist/cpfOcr-D_tbwbvh.js +0 -78
- package/dist/customFields-CW38fQUv.js +0 -127
- package/dist/customWatchlist-D9_yjEQd.js +0 -33
- package/dist/dateInputComposed-BpAGsjN6.js +0 -55
- package/dist/dateInputComposed-DU3o6PAV.js +0 -1
- package/dist/defineProperty-Dh8nSJpJ.js +0 -39
- package/dist/documentCapture-xX-JT7ZY.js +0 -763
- package/dist/dropdownComposed-DFRBG22E.js +0 -284
- package/dist/dropdownComposed-DwTzc2YU.js +0 -1
- package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
- package/dist/ekybModule-BSs7mndb.js +0 -280
- package/dist/ekybModule-D9M3E2Gm.js +0 -2
- package/dist/ekycModule-CU9pt5YN.js +0 -246
- package/dist/ekycModule-CZw9cLno.js +0 -2
- package/dist/electronic-signature-COYXjGdd.js +0 -410
- package/dist/emailInput-DppGf9pv.js +0 -37
- package/dist/expiredId-BnmzE8T3.js +0 -70
- package/dist/extensibility-CzEJfRwo.js +0 -2586
- package/dist/faceMatch-B8j0g0Yo.js +0 -2
- package/dist/faceMatch-BV8UD7tj.js +0 -201
- package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
- package/dist/glaredevicelottie-B10axYs_.js +0 -14466
- package/dist/homeScreen-DnP1jw9A.js +0 -227
- package/dist/hooks-BVnGysT7.js +0 -80
- package/dist/i18n-9s4OSqwi.js +0 -2010
- package/dist/icons-Cc7zwchP.js +0 -310
- package/dist/id-laser-h-mBAzHVOK.js +0 -467
- package/dist/id-laser-v-CrFg4bcJ.js +0 -483
- package/dist/id-tutorial-BCr42Pnn.js +0 -13153
- package/dist/idOcr-CCjfWQvH.js +0 -94
- package/dist/incode-logo-DX016usY.js +0 -4
- package/dist/incodeComponent-C1o4M0ZK.js +0 -50
- package/dist/incodeModule-BqCjVgEI.js +0 -18
- package/dist/inputComposed-APSw8C7o.js +0 -89
- package/dist/inputComposed-XYrarFxS.js +0 -1
- package/dist/loadingIcon-BN5YRQUb.js +0 -104
- package/dist/mandatoryConsent-DssKMC3v.js +0 -100
- package/dist/modal-NMxsQHAO.js +0 -135
- package/dist/modal.hooks-CAjcIFZK.js +0 -126
- package/dist/numberedStep-CT-alrK5.js +0 -11
- package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
- package/dist/otpInput-DqRA_egd.js +0 -145
- package/dist/page-C1yT4DLb.js +0 -69
- package/dist/pdf-BurGZ08w.js +0 -14967
- package/dist/pdfViewer-BGBNL1Ea.js +0 -63
- package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
- package/dist/processing-G_y3o32b.js +0 -6
- package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
- package/dist/redirectToMobile-C3k1gloW.js +0 -1514
- package/dist/requiredLabelHint-BLwgqozE.js +0 -13
- package/dist/richText-DbJ5sl2n.js +0 -1973
- package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
- package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
- package/dist/snackbar-BDp8x7Cv.js +0 -14
- package/dist/spinner-B4dcie2T.js +0 -1
- package/dist/spinner-CKnjVHxw.js +0 -39
- package/dist/statusPage-CUI7ApcU.js +0 -28
- package/dist/successIcon-DbILeIz_.js +0 -28
- package/dist/tabs-DaPyP71c.js +0 -78
- package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
- package/dist/types/cpf-ocr/styles.d.ts +0 -1
- package/dist/types/document-capture/styles.d.ts +0 -1
- package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
- package/dist/typography-CxjaknHN.js +0 -28
- package/dist/uiConfig-CwpQ-IM6.js +0 -20
- package/dist/useModuleLoader-BFiVA41N.js +0 -432
- package/dist/vendor-preact-D6SntenC.js +0 -958
- package/dist/verificationResult-BrVbUJ4U.js +0 -97
- package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
- package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
|
@@ -1,90 +1,106 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { o as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { createConsentManager as g } from "@incodetech/core/consent";
|
|
1
|
+
import { n as useTranslation } from "../i18n-CoCO2ZuN.js";
|
|
2
|
+
import { d as T, v as u } from "../vendor-preact-DThS2ZQ_.js";
|
|
3
|
+
import { a as isTerminalModuleState, c as useManager, o as useModuleTerminalCallbacks } from "../hooks-Da_yP_Dr.js";
|
|
4
|
+
import { t as IncodeComponent } from "../incodeComponent-wfnHlnXx.js";
|
|
5
|
+
import { t as Page } from "../page-DxGQj7Gk.js";
|
|
6
|
+
import { t as TransitionSpinner } from "../transitionSpinner-DRRz-NV8.js";
|
|
7
|
+
import { t as Button } from "../button-CM_hgyIP.js";
|
|
8
|
+
import { t as Checkbox } from "../checkbox-BoeLHKgp.js";
|
|
9
|
+
import { t as registerIncodeModuleElement } from "../incodeModule-BUDoTwT9.js";
|
|
10
|
+
import { t as RichText } from "../richText-Cf9aMOCk.js";
|
|
11
|
+
import { n as getRequiredHintMode, t as getFieldHint } from "../requiredLabelHint-DEadtiwx.js";
|
|
12
|
+
import { createConsentManager } from "@incodetech/core/consent";
|
|
14
13
|
//#region src/modules/consent/consent.tsx
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
var stopLinkPropagation = (event) => {
|
|
15
|
+
if (event.target.closest("a")) event.stopPropagation();
|
|
16
|
+
};
|
|
17
|
+
var ConsentContent = ({ config, manager: externalManager, onFinish, onError }) => {
|
|
18
|
+
const { t, i18n } = useTranslation();
|
|
19
|
+
const [state, manager] = useManager(() => {
|
|
20
|
+
if (externalManager) return externalManager;
|
|
21
|
+
if (!config) throw new Error("Consent config is required");
|
|
22
|
+
return createConsentManager({ config: {
|
|
23
|
+
...config,
|
|
24
|
+
language: i18n.language
|
|
25
|
+
} });
|
|
26
|
+
}, { manageLifecycle: !externalManager });
|
|
27
|
+
const checkboxes = "checkboxes" in state ? state.checkboxes : void 0;
|
|
28
|
+
const mode = T(() => getRequiredHintMode(checkboxes?.map((c) => c.required) ?? []), [checkboxes]);
|
|
29
|
+
useModuleTerminalCallbacks({
|
|
30
|
+
status: state.status,
|
|
31
|
+
onFinish,
|
|
32
|
+
onError,
|
|
33
|
+
error: state.status === "error" ? state.error : void 0
|
|
34
|
+
});
|
|
35
|
+
if (isTerminalModuleState(state)) return null;
|
|
36
|
+
if (state.status === "idle" || state.status === "loading") return /* @__PURE__ */ u(TransitionSpinner, { hideText: true });
|
|
37
|
+
return /* @__PURE__ */ u(Page, {
|
|
26
38
|
className: "IncodeConsentPage",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
children: /* @__PURE__ */ i("div", {
|
|
39
|
+
title: state.title,
|
|
40
|
+
children: /* @__PURE__ */ u("div", {
|
|
30
41
|
class: "IncodeConsentContent",
|
|
31
|
-
children: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
className: "IncodeConsentTitle",
|
|
37
|
-
tabIndex: -1,
|
|
38
|
-
children: x.title
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ i(p, {
|
|
41
|
-
content: x.richText,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ u("div", {
|
|
44
|
+
class: "IncodeConsentBody",
|
|
45
|
+
children: [/* @__PURE__ */ u(RichText, {
|
|
46
|
+
content: state.richText,
|
|
42
47
|
class: "IncodeRichText"
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ i("div", {
|
|
48
|
+
}), /* @__PURE__ */ u("div", {
|
|
45
49
|
class: "IncodeConsentCheckboxList",
|
|
46
50
|
role: "group",
|
|
47
|
-
"aria-label":
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
"aria-label": t("biometricConsent.consentOptions"),
|
|
52
|
+
children: state.checkboxes.map((checkbox) => {
|
|
53
|
+
const hint = getFieldHint(mode, checkbox.required);
|
|
54
|
+
const labelHint = hint ? t(`forms.label.${hint}`) : void 0;
|
|
55
|
+
return /* @__PURE__ */ u(Checkbox, {
|
|
56
|
+
id: `consent-checkbox-${checkbox.id}`,
|
|
52
57
|
class: "IncodeConsentCheckbox",
|
|
53
58
|
size: "s",
|
|
54
|
-
checked:
|
|
55
|
-
required:
|
|
56
|
-
labelHint
|
|
57
|
-
onChange: () =>
|
|
58
|
-
label: /* @__PURE__ */
|
|
59
|
+
checked: checkbox.checked,
|
|
60
|
+
required: checkbox.required,
|
|
61
|
+
labelHint,
|
|
62
|
+
onChange: () => manager.toggleCheckbox(checkbox.id),
|
|
63
|
+
label: /* @__PURE__ */ u("span", {
|
|
59
64
|
class: "IncodeConsentCheckboxLabel",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
content:
|
|
65
|
+
role: "presentation",
|
|
66
|
+
onClick: stopLinkPropagation,
|
|
67
|
+
onKeyDown: stopLinkPropagation,
|
|
68
|
+
children: /* @__PURE__ */ u(RichText, {
|
|
69
|
+
content: checkbox.label,
|
|
65
70
|
class: "IncodeRichText",
|
|
66
71
|
disallowedTags: ["img"]
|
|
67
72
|
})
|
|
68
73
|
})
|
|
69
|
-
},
|
|
74
|
+
}, checkbox.id);
|
|
70
75
|
})
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
})]
|
|
77
|
+
}),
|
|
78
|
+
state.status === "display" && state.error ? /* @__PURE__ */ u("p", {
|
|
79
|
+
class: "IncodeConsentSubmitError",
|
|
80
|
+
"data-testid": "consent-submit-error",
|
|
81
|
+
role: "alert",
|
|
82
|
+
children: state.error
|
|
83
|
+
}) : null,
|
|
84
|
+
/* @__PURE__ */ u(Button, {
|
|
85
|
+
class: "IncodeConsentButton",
|
|
86
|
+
"data-testid": "consent-submit",
|
|
87
|
+
onClick: () => manager.submit(),
|
|
88
|
+
disabled: !state.canSubmit,
|
|
89
|
+
isLoading: state.status === "submitting",
|
|
90
|
+
children: t("biometricConsent.button.continue")
|
|
91
|
+
})
|
|
92
|
+
]
|
|
80
93
|
})
|
|
81
94
|
}, "ready");
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
};
|
|
96
|
+
var Consent = ({ config, manager, onFinish, onError }) => {
|
|
97
|
+
return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(ConsentContent, {
|
|
98
|
+
config,
|
|
99
|
+
manager,
|
|
100
|
+
onFinish,
|
|
101
|
+
onError
|
|
102
|
+
}) : null });
|
|
103
|
+
};
|
|
104
|
+
registerIncodeModuleElement(Consent, "incode-consent");
|
|
89
105
|
//#endregion
|
|
90
|
-
export {
|
|
106
|
+
export { Consent };
|
package/dist/consent/styles.css
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.IncodeConsentPage {
|
|
3
3
|
height: 100%;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.IncodeConsentPage .IncodePageInner {
|
|
7
|
-
padding: var(--spacing-24, var(--spacing-24, 24px));
|
|
4
|
+
animation: fadeIn var(--motion-fade-in-duration, .7s) ease-out;
|
|
5
|
+
animation-fill-mode: both;
|
|
8
6
|
}
|
|
9
7
|
|
|
10
8
|
.IncodeConsentPage .IncodePageContent {
|
|
@@ -12,9 +10,11 @@
|
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
.IncodeConsentPage .IncodeConsentContent {
|
|
13
|
+
margin-top: var(--spacing-24, var(--spacing-24, 24px));
|
|
15
14
|
height: 100%;
|
|
16
15
|
min-height: var(--spacing-0, var(--spacing-none, 0px));
|
|
17
16
|
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
18
|
gap: var(--spacing-24, var(--spacing-24, 24px));
|
|
19
19
|
flex-direction: column;
|
|
20
20
|
display: flex;
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
|
|
23
23
|
.IncodeConsentPage .IncodeConsentBody {
|
|
24
24
|
min-height: var(--spacing-0, var(--spacing-none, 0px));
|
|
25
|
-
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: var(--incode-form-max-w);
|
|
27
|
+
gap: var(--spacing-24, var(--spacing-24, 24px));
|
|
26
28
|
flex-direction: column;
|
|
27
29
|
flex: 1;
|
|
28
30
|
display: flex;
|
|
@@ -31,24 +33,21 @@
|
|
|
31
33
|
|
|
32
34
|
.IncodeConsentPage .IncodeConsentBody .IncodeRichText .markup h2, .IncodeConsentPage .IncodeConsentBody .IncodeRichText h2 {
|
|
33
35
|
margin-bottom: var(--spacing-12, var(--spacing-12, 12px));
|
|
34
|
-
font-family: var(--typography-
|
|
35
|
-
font-size: var(--typography-
|
|
36
|
-
font-weight: var(--typography-
|
|
37
|
-
line-height: var(--typography-
|
|
38
|
-
letter-spacing: var(--typography-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.IncodeConsentPage .IncodeConsentTitle {
|
|
42
|
-
font-family: var(--typography-headline-family);
|
|
43
|
-
font-size: var(--typography-headline-h1-size);
|
|
44
|
-
font-weight: var(--typography-headline-h1-weight);
|
|
45
|
-
line-height: var(--typography-headline-h1-line-height);
|
|
46
|
-
letter-spacing: var(--typography-headline-h1-letter-spacing);
|
|
36
|
+
font-family: var(--typography-body-family);
|
|
37
|
+
font-size: var(--typography-body-m-regular-size);
|
|
38
|
+
font-weight: var(--typography-body-m-regular-weight);
|
|
39
|
+
line-height: var(--typography-body-m-regular-line-height);
|
|
40
|
+
letter-spacing: var(--typography-body-m-regular-letter-spacing);
|
|
47
41
|
color: var(--color-text-body-primary, var(--text-body-800-primary));
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
.IncodeConsentPage .IncodeConsentSubtitle {
|
|
51
|
-
|
|
45
|
+
font-family: var(--typography-body-family);
|
|
46
|
+
font-size: var(--typography-body-m-regular-size);
|
|
47
|
+
font-weight: var(--typography-body-m-regular-weight);
|
|
48
|
+
line-height: var(--typography-body-m-regular-line-height);
|
|
49
|
+
letter-spacing: var(--typography-body-m-regular-letter-spacing);
|
|
50
|
+
color: var(--color-text-body-primary, var(--text-body-800-primary));
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
.IncodeConsentPage .IncodeConsentCheckboxList {
|
|
@@ -61,7 +60,8 @@
|
|
|
61
60
|
border-radius: var(--radius-medium, var(--border-radius-medium));
|
|
62
61
|
background-color: var(--color-surface-brand-50, var(--surface-brand-50));
|
|
63
62
|
width: 100%;
|
|
64
|
-
padding: var(--spacing-16, var(--spacing-16, 16px));
|
|
63
|
+
padding-inline: var(--spacing-16, var(--spacing-16, 16px));
|
|
64
|
+
padding-block: var(--spacing-20, var(--spacing-20, 20px));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.IncodeConsentPage .IncodeConsentCheckbox .IncodeCheckboxLabel {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
font-weight: var(--typography-checkbox-radio-s-weight);
|
|
83
83
|
line-height: var(--typography-checkbox-radio-s-line-height);
|
|
84
84
|
letter-spacing: var(--typography-checkbox-radio-s-letter-spacing);
|
|
85
|
-
color: var(--color-text-
|
|
85
|
+
color: var(--color-checkbox-text-default, var(--checkbox-text-default));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.IncodeConsentPage .IncodeConsentCheckboxLabel .IncodeRichText, .IncodeConsentPage .IncodeConsentCheckboxLabel .IncodeRichText .markup {
|
|
@@ -100,10 +100,11 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.IncodeConsentPage .IncodeConsentCheckboxLabel .IncodeRichText .markup a, .IncodeConsentPage .IncodeConsentCheckboxLabel .IncodeRichText a {
|
|
103
|
-
color: var(--color-
|
|
103
|
+
color: var(--color-link-default, var(--link-default));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.IncodeConsentPage .IncodeConsentButton {
|
|
107
|
+
margin-bottom: var(--spacing-16, var(--spacing-16, 16px));
|
|
107
108
|
width: 100%;
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -114,3 +115,15 @@
|
|
|
114
115
|
width: 100%;
|
|
115
116
|
display: flex;
|
|
116
117
|
}
|
|
118
|
+
|
|
119
|
+
.IncodeConsentPage .IncodeConsentSubmitError {
|
|
120
|
+
margin-bottom: var(--spacing-12, var(--spacing-12, 12px));
|
|
121
|
+
text-align: center;
|
|
122
|
+
font-family: var(--typography-headline-family);
|
|
123
|
+
font-size: var(--typography-headline-h5-size);
|
|
124
|
+
font-weight: var(--typography-headline-h5-weight);
|
|
125
|
+
line-height: var(--typography-headline-h5-line-height);
|
|
126
|
+
letter-spacing: var(--typography-headline-h5-letter-spacing);
|
|
127
|
+
color: var(--color-input-text-helper-negative, var(--input-text-helper-negative));
|
|
128
|
+
margin-top: 0;
|
|
129
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { n as useTranslation } from "./i18n-CoCO2ZuN.js";
|
|
2
|
+
import { d as T, v as u } from "./vendor-preact-DThS2ZQ_.js";
|
|
3
|
+
import { t as DropdownComposed } from "./dropdownComposed-_fgAlo_C.js";
|
|
4
|
+
//#region src/shared/countrySelector/countrySelector.tsx
|
|
5
|
+
var DEFAULT_COUNTRY_CODES = [
|
|
6
|
+
"BR",
|
|
7
|
+
"CN",
|
|
8
|
+
"FR",
|
|
9
|
+
"DE",
|
|
10
|
+
"IL",
|
|
11
|
+
"IT",
|
|
12
|
+
"MX",
|
|
13
|
+
"ES",
|
|
14
|
+
"GB",
|
|
15
|
+
"US"
|
|
16
|
+
];
|
|
17
|
+
var DEFAULT_DEV_ONLY_COUNTRY_CODES = [
|
|
18
|
+
"CM",
|
|
19
|
+
"KE",
|
|
20
|
+
"NG"
|
|
21
|
+
];
|
|
22
|
+
function countryFlag(code) {
|
|
23
|
+
return [...code.toUpperCase()].map((c) => String.fromCodePoint(127462 + c.charCodeAt(0) - 65)).join("");
|
|
24
|
+
}
|
|
25
|
+
function isDevEnvironment() {
|
|
26
|
+
if (typeof window === "undefined") return false;
|
|
27
|
+
const { hostname } = window.location;
|
|
28
|
+
return hostname === "localhost" || hostname.includes("stage") || hostname.includes("demo");
|
|
29
|
+
}
|
|
30
|
+
var CountrySelector = ({ value, onChange, label, id = "country-selector", countryCodes = DEFAULT_COUNTRY_CODES, devOnlyCountryCodes = DEFAULT_DEV_ONLY_COUNTRY_CODES, "data-testid": testId }) => {
|
|
31
|
+
const { i18n } = useTranslation();
|
|
32
|
+
const locale = i18n.language || "en";
|
|
33
|
+
return /* @__PURE__ */ u("div", {
|
|
34
|
+
class: "IncodeCountrySelector",
|
|
35
|
+
children: /* @__PURE__ */ u(DropdownComposed, {
|
|
36
|
+
id,
|
|
37
|
+
label,
|
|
38
|
+
value,
|
|
39
|
+
options: T(() => {
|
|
40
|
+
const displayNames = new Intl.DisplayNames([locale, "en"], { type: "region" });
|
|
41
|
+
return (isDevEnvironment() ? [...countryCodes, ...devOnlyCountryCodes] : [...countryCodes]).map((code) => {
|
|
42
|
+
const name = displayNames.of(code) ?? code;
|
|
43
|
+
return {
|
|
44
|
+
value: code,
|
|
45
|
+
label: `${countryFlag(code)} ${name}`,
|
|
46
|
+
ariaLabel: name
|
|
47
|
+
};
|
|
48
|
+
}).sort((a, b) => a.label.localeCompare(b.label, locale));
|
|
49
|
+
}, [
|
|
50
|
+
countryCodes,
|
|
51
|
+
devOnlyCountryCodes,
|
|
52
|
+
locale
|
|
53
|
+
]),
|
|
54
|
+
onChange,
|
|
55
|
+
"data-testid": testId
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { CountrySelector as t };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { _ as y, p as d, v as u } from "./vendor-preact-DThS2ZQ_.js";
|
|
2
|
+
import { c as useManager, o as useModuleTerminalCallbacks } from "./hooks-Da_yP_Dr.js";
|
|
3
|
+
import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
|
|
4
|
+
import { t as Page } from "./page-DxGQj7Gk.js";
|
|
5
|
+
import { t as Spinner } from "./spinner-D8a_2LvW.js";
|
|
6
|
+
import "./spinner-B6RxGFrI.js";
|
|
7
|
+
import { t as Button } from "./button-CM_hgyIP.js";
|
|
8
|
+
import { t as VerificationResult } from "./verificationResult-Do5SpZ6X.js";
|
|
9
|
+
import { t as InputComposed } from "./inputComposed-CQ4AsvZg.js";
|
|
10
|
+
import { createCpfOcrManager } from "@incodetech/core/cpf-ocr";
|
|
11
|
+
//#region src/modules/cpf-ocr/cpfOcr.tsx
|
|
12
|
+
var getInputState = (state) => {
|
|
13
|
+
if (state.status === "inputting") return {
|
|
14
|
+
cpf: state.cpf,
|
|
15
|
+
isValid: state.isValid
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
cpf: "",
|
|
19
|
+
isValid: false
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
var CpfOcr = ({ manager: externalManager, onFinish, onError }) => {
|
|
23
|
+
const [state, manager] = useManager(() => externalManager ?? createCpfOcrManager(), { manageLifecycle: !externalManager });
|
|
24
|
+
const [hasBlurred, setHasBlurred] = d(false);
|
|
25
|
+
const [hasEdited, setHasEdited] = d(false);
|
|
26
|
+
const [isFocused, setIsFocused] = d(false);
|
|
27
|
+
useModuleTerminalCallbacks({
|
|
28
|
+
status: state.status === "finished" ? "finished" : "loading",
|
|
29
|
+
onFinish
|
|
30
|
+
});
|
|
31
|
+
y(() => {
|
|
32
|
+
if (state.status === "error") onError?.(state.error);
|
|
33
|
+
}, [state, onError]);
|
|
34
|
+
if (state.status === "idle" || state.status === "loading" || state.status === "submitting") return /* @__PURE__ */ u(Page, {
|
|
35
|
+
className: "IncodeCpfOcrPage",
|
|
36
|
+
children: /* @__PURE__ */ u("div", {
|
|
37
|
+
class: "IncodeCpfOcrLoading",
|
|
38
|
+
children: /* @__PURE__ */ u(Spinner, { fullScreen: false })
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
if (state.status === "error") return /* @__PURE__ */ u(VerificationResult, {
|
|
42
|
+
status: "failure",
|
|
43
|
+
failureTitle: "Não foi possível verificar o CPF",
|
|
44
|
+
onRetry: () => manager.retry()
|
|
45
|
+
});
|
|
46
|
+
if (state.status === "finished") return null;
|
|
47
|
+
const inputState = getInputState(state);
|
|
48
|
+
const isComplete = inputState.cpf.replace(/\D/g, "").length === 11;
|
|
49
|
+
const cpfError = hasEdited && !inputState.isValid && (isComplete || hasBlurred && !isFocused) ? "Insira um CPF válido" : void 0;
|
|
50
|
+
return /* @__PURE__ */ u(Page, {
|
|
51
|
+
className: "IncodeCpfOcrPage",
|
|
52
|
+
title: "Insira e verifique o número do seu CPF",
|
|
53
|
+
children: /* @__PURE__ */ u("div", {
|
|
54
|
+
class: "IncodeCpfOcr",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ u(Spacer, { size: 32 }),
|
|
57
|
+
/* @__PURE__ */ u(InputComposed, {
|
|
58
|
+
id: "cpf-ocr-input",
|
|
59
|
+
label: "",
|
|
60
|
+
value: inputState.cpf,
|
|
61
|
+
placeholder: "Seu CPF",
|
|
62
|
+
maxLength: 14,
|
|
63
|
+
inputMode: "numeric",
|
|
64
|
+
"aria-label": "CPF",
|
|
65
|
+
onInput: (event) => {
|
|
66
|
+
setHasEdited(true);
|
|
67
|
+
manager.setCpf(event.target.value);
|
|
68
|
+
},
|
|
69
|
+
onFocus: () => {
|
|
70
|
+
setIsFocused(true);
|
|
71
|
+
},
|
|
72
|
+
onBlur: () => {
|
|
73
|
+
setIsFocused(false);
|
|
74
|
+
setHasBlurred(true);
|
|
75
|
+
},
|
|
76
|
+
error: cpfError,
|
|
77
|
+
showErrorIcon: true
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ u(Spacer, {}),
|
|
80
|
+
/* @__PURE__ */ u(Button, {
|
|
81
|
+
type: "button",
|
|
82
|
+
onClick: () => manager.submit(),
|
|
83
|
+
disabled: !inputState.isValid,
|
|
84
|
+
"data-testid": "cpf-ocr-continue",
|
|
85
|
+
children: "Continuar"
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { CpfOcr as t };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { o as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { createCrossDocumentDataMatchManager
|
|
1
|
+
import { _ as y, v as u } from "../vendor-preact-DThS2ZQ_.js";
|
|
2
|
+
import { c as useManager, o as useModuleTerminalCallbacks } from "../hooks-Da_yP_Dr.js";
|
|
3
|
+
import { t as IncodeComponent } from "../incodeComponent-wfnHlnXx.js";
|
|
4
|
+
import { t as Spinner } from "../spinner-D8a_2LvW.js";
|
|
5
|
+
import { t as registerIncodeModuleElement } from "../incodeModule-BUDoTwT9.js";
|
|
6
|
+
import { createCrossDocumentDataMatchManager } from "@incodetech/core/cross-document-data-match";
|
|
7
7
|
//#region src/modules/cross-document-data-match/cross-document-data-match.tsx
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
var CrossDocumentDataMatchContent = ({ onFinish }) => {
|
|
9
|
+
const [state, manager] = useManager(() => createCrossDocumentDataMatchManager());
|
|
10
|
+
y(() => {
|
|
11
|
+
manager.load();
|
|
12
|
+
}, [manager]);
|
|
13
|
+
useModuleTerminalCallbacks({
|
|
14
|
+
status: state.status === "finished" ? "finished" : "loading",
|
|
15
|
+
onFinish
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ u(Spinner, { fullScreen: true });
|
|
18
|
+
};
|
|
19
|
+
var CrossDocumentDataMatch = ({ onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(CrossDocumentDataMatchContent, { onFinish }) });
|
|
20
|
+
registerIncodeModuleElement(CrossDocumentDataMatch, "incode-cross-document-data-match");
|
|
17
21
|
//#endregion
|
|
18
|
-
export {
|
|
22
|
+
export { CrossDocumentDataMatch };
|