@incodetech/web 2.0.1 → 2.1.0-rc.0
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 +16 -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 +20 -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,244 +1,330 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import "../
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { createWorkflowManager as w } from "@incodetech/core/workflow";
|
|
1
|
+
import { n as useTranslation, o as readStoredLanguage } from "../i18n-CoCO2ZuN.js";
|
|
2
|
+
import { _ as y, c as z, l as A, o as P, p as d, v as u } from "../vendor-preact-DThS2ZQ_.js";
|
|
3
|
+
import { t as setUiConfig } from "../uiConfig-D2_wawvr.js";
|
|
4
|
+
import { c as useManager } from "../hooks-Da_yP_Dr.js";
|
|
5
|
+
import { t as IncodeComponent } from "../incodeComponent-wfnHlnXx.js";
|
|
6
|
+
import { t as TransitionSpinner } from "../transitionSpinner-DRRz-NV8.js";
|
|
7
|
+
import { t as registerIncodeModuleElement } from "../incodeModule-BUDoTwT9.js";
|
|
8
|
+
import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-CeJ2jL25.js";
|
|
9
|
+
import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
|
|
10
|
+
import { getDeviceClass } from "@incodetech/core/device";
|
|
11
|
+
import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
|
|
12
|
+
import { createWorkflowManager } from "@incodetech/core/workflow";
|
|
14
13
|
//#region src/modules/workflow/workflowInit.ts
|
|
15
|
-
var
|
|
16
|
-
...
|
|
17
|
-
REDIRECT_TO_MOBILE: () => import("../
|
|
18
|
-
ID: () => import("../id-verification/id-verification.es.js").then((
|
|
14
|
+
var LAZY_WORKFLOW_MODULES = {
|
|
15
|
+
...LAZY_UI_MODULES,
|
|
16
|
+
REDIRECT_TO_MOBILE: () => import("../redirect-to-mobile/redirect-to-mobile.es.js").then((m) => m.RedirectToMobile),
|
|
17
|
+
ID: () => import("../id-verification/id-verification.es.js").then((m) => m.IdVerification),
|
|
18
|
+
IDENTITY_REUSE: () => import("../identity-reuse/identity-reuse.es.js").then((m) => m.IdentityReuse)
|
|
19
19
|
};
|
|
20
|
-
async function
|
|
20
|
+
async function fetchWorkflowTheme() {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
const theme = await fetchAndApplyTheme();
|
|
23
23
|
return {
|
|
24
|
-
theme
|
|
24
|
+
theme,
|
|
25
25
|
uiConfig: {
|
|
26
|
-
logoSrc:
|
|
27
|
-
hideFooterBranding:
|
|
26
|
+
logoSrc: theme.logo,
|
|
27
|
+
hideFooterBranding: theme.hideFooterBranding
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
} catch {
|
|
31
31
|
return {};
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
36
|
-
customModuleCallback:
|
|
37
|
-
interviewId:
|
|
38
|
-
isDesktop:
|
|
34
|
+
function createWorkflowUIManager(options = {}) {
|
|
35
|
+
return createWorkflowManager({
|
|
36
|
+
customModuleCallback: options.customModuleCallback,
|
|
37
|
+
interviewId: options.interviewId,
|
|
38
|
+
isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
...
|
|
45
|
-
pipelines:
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
function warmupWorkflowWasm(wasmConfig) {
|
|
42
|
+
if (wasmConfig === false) return;
|
|
43
|
+
const resolved = resolveWasmConfig({
|
|
44
|
+
...wasmConfig,
|
|
45
|
+
pipelines: wasmConfig?.pipelines ?? ["selfie", "idCapture"]
|
|
46
|
+
});
|
|
47
|
+
const upgradeConfig = {
|
|
48
|
+
...resolved,
|
|
49
|
+
pipelines: resolved.pipelines ? [...resolved.pipelines] : void 0
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
-
console.error("Workflow WASM warmup failed:",
|
|
51
|
+
warmupWasm(resolved).then(() => upgradeToWasmHttpClient(upgradeConfig)).catch((error) => {
|
|
52
|
+
console.error("Workflow WASM warmup failed:", error);
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
|
56
|
+
//#region src/modules/workflow/createWorkflowSession.ts
|
|
57
|
+
async function createWorkflowSession(config, signal) {
|
|
58
|
+
return bootstrapSession(await resolveApiKey(config), {
|
|
59
|
+
configurationId: config.configurationId,
|
|
60
|
+
externalId: config.externalId,
|
|
61
|
+
externalCustomerId: config.externalCustomerId,
|
|
62
|
+
language: config.lang,
|
|
63
|
+
customFields: config.customFields,
|
|
64
|
+
uuid: config.uuid,
|
|
65
|
+
urlUuid: config.urlUuid,
|
|
66
|
+
loginHint: config.loginHint,
|
|
67
|
+
onUrlUuidRefreshed: config.onUrlUuidRefreshed
|
|
68
|
+
}, signal);
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/modules/workflow/workflowConfig.ts
|
|
72
|
+
function hasWorkflowToken(config) {
|
|
73
|
+
return typeof config.token === "string";
|
|
74
|
+
}
|
|
75
|
+
function isSelfLoadingWorkflowConfig(config) {
|
|
76
|
+
const bootstrapConfig = config;
|
|
77
|
+
return typeof bootstrapConfig.configurationId === "string" && (typeof bootstrapConfig.apiKey === "string" || typeof bootstrapConfig.clientId === "string");
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
55
80
|
//#region src/modules/workflow/useWorkflowInitialization.ts
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
workflowManager: e
|
|
66
|
-
};
|
|
67
|
-
}), y = r(!1);
|
|
68
|
-
return t(() => {
|
|
69
|
-
if (_.status !== "initializing" || y.current) return;
|
|
70
|
-
y.current = !0;
|
|
71
|
-
let e = g.current, t = new AbortController(), { signal: r } = t;
|
|
72
|
-
return (async () => {
|
|
81
|
+
function useWorkflowInitialization(options) {
|
|
82
|
+
const { onError, onUrlUuidRefreshed } = options;
|
|
83
|
+
const [state, setState] = d({ status: "initializing" });
|
|
84
|
+
const managerRef = A(null);
|
|
85
|
+
y(() => {
|
|
86
|
+
if (state.status !== "initializing") return;
|
|
87
|
+
const abortController = new AbortController();
|
|
88
|
+
const { signal } = abortController;
|
|
89
|
+
const initialize = async () => {
|
|
73
90
|
try {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
let resolvedToken;
|
|
92
|
+
let resolvedInterviewId;
|
|
93
|
+
if (hasWorkflowToken(options)) {
|
|
94
|
+
resolvedToken = options.token;
|
|
95
|
+
resolvedInterviewId = options.interviewId;
|
|
96
|
+
if (options.urlUuid) await refreshQrUrlUuid({
|
|
97
|
+
urlUuid: options.urlUuid,
|
|
98
|
+
onboardingId: null,
|
|
99
|
+
onRefreshed: onUrlUuidRefreshed
|
|
100
|
+
}, signal);
|
|
101
|
+
} else if (isSelfLoadingWorkflowConfig(options)) {
|
|
102
|
+
const session = await createWorkflowSession(options, signal);
|
|
103
|
+
resolvedToken = session.token;
|
|
104
|
+
resolvedInterviewId = session.interviewId;
|
|
105
|
+
} else throw new Error("Workflow requires token, or configurationId with apiKey or clientId");
|
|
106
|
+
if (signal.aborted) return;
|
|
107
|
+
await setupSDK({
|
|
108
|
+
token: resolvedToken,
|
|
109
|
+
lang: options.lang
|
|
84
110
|
});
|
|
85
|
-
|
|
111
|
+
if (signal.aborted) return;
|
|
112
|
+
const themePromise = options.disableDashboardTheme ? Promise.resolve() : fetchWorkflowTheme().then((result) => {
|
|
113
|
+
if (result.uiConfig) setUiConfig(result.uiConfig);
|
|
114
|
+
});
|
|
115
|
+
warmupWorkflowWasm(options.wasmConfig);
|
|
116
|
+
if (signal.aborted) return;
|
|
117
|
+
managerRef.current = createWorkflowUIManager({
|
|
118
|
+
customModuleCallback: options.customModuleCallback,
|
|
119
|
+
interviewId: resolvedInterviewId,
|
|
120
|
+
isDesktop: options.isDesktop
|
|
121
|
+
});
|
|
122
|
+
managerRef.current.load();
|
|
123
|
+
await themePromise;
|
|
124
|
+
if (signal.aborted) return;
|
|
125
|
+
setState({
|
|
86
126
|
status: "ready",
|
|
87
|
-
workflowManager:
|
|
127
|
+
workflowManager: managerRef.current
|
|
88
128
|
});
|
|
89
|
-
} catch (
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
|
|
129
|
+
} catch (error) {
|
|
130
|
+
if (signal.aborted) return;
|
|
131
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to initialize SDK";
|
|
132
|
+
const errorCode = extractIncodeStatus(error);
|
|
133
|
+
setState({
|
|
93
134
|
status: "error",
|
|
94
|
-
error:
|
|
95
|
-
errorCode
|
|
96
|
-
|
|
97
|
-
|
|
135
|
+
error: errorMessage,
|
|
136
|
+
errorCode
|
|
137
|
+
});
|
|
138
|
+
onError?.(errorMessage, errorCode);
|
|
98
139
|
}
|
|
99
|
-
})(), () => {
|
|
100
|
-
t.abort(), e?.stop();
|
|
101
140
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
]), _;
|
|
141
|
+
initialize();
|
|
142
|
+
return () => {
|
|
143
|
+
abortController.abort();
|
|
144
|
+
managerRef.current?.stop();
|
|
145
|
+
managerRef.current = null;
|
|
146
|
+
};
|
|
147
|
+
}, []);
|
|
148
|
+
return state;
|
|
111
149
|
}
|
|
112
150
|
//#endregion
|
|
113
151
|
//#region src/modules/workflow/workflow.tsx
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
switch (
|
|
152
|
+
var LazyHomeScreen = z(() => import("../homeScreen-BZnIEDrV.js").then((module) => ({ default: module.HomeScreen })));
|
|
153
|
+
function mapModuleConfig(options) {
|
|
154
|
+
const { moduleKey, config, workflowId, authHint, lang, mergeSessionRecordings, ageAssurance } = options;
|
|
155
|
+
switch (moduleKey) {
|
|
118
156
|
case "AUTHENTICATION": return {
|
|
119
|
-
...
|
|
120
|
-
authHint
|
|
157
|
+
...config,
|
|
158
|
+
authHint
|
|
121
159
|
};
|
|
122
160
|
case "REDIRECT_TO_MOBILE": return {
|
|
123
|
-
...
|
|
124
|
-
flowId:
|
|
125
|
-
authHint
|
|
126
|
-
lang
|
|
161
|
+
...config,
|
|
162
|
+
flowId: workflowId,
|
|
163
|
+
authHint,
|
|
164
|
+
lang
|
|
127
165
|
};
|
|
128
166
|
case "ID_CAPTURE":
|
|
129
167
|
case "TUTORIAL_ID": return {
|
|
130
|
-
...
|
|
131
|
-
mergeSessionRecordings:
|
|
132
|
-
ageAssurance:
|
|
133
|
-
skipProcessId:
|
|
168
|
+
...config,
|
|
169
|
+
mergeSessionRecordings: config.mergeSessionRecordings ?? mergeSessionRecordings,
|
|
170
|
+
ageAssurance: config.ageAssurance ?? ageAssurance,
|
|
171
|
+
skipProcessId: true
|
|
134
172
|
};
|
|
135
|
-
case "ID": return
|
|
173
|
+
case "ID": return config;
|
|
136
174
|
case "SELFIE": return {
|
|
137
|
-
...
|
|
138
|
-
ageAssurance:
|
|
175
|
+
...config,
|
|
176
|
+
ageAssurance: config.ageAssurance ?? ageAssurance
|
|
139
177
|
};
|
|
140
178
|
case "ADDRESS": return {
|
|
141
|
-
...
|
|
179
|
+
...config,
|
|
142
180
|
processingType: "addressStatement"
|
|
143
181
|
};
|
|
144
182
|
case "SECOND_ID": return {
|
|
145
|
-
...
|
|
146
|
-
isSecondId:
|
|
183
|
+
...config,
|
|
184
|
+
isSecondId: true
|
|
185
|
+
};
|
|
186
|
+
case "MANDATORY_CONSENT": return {
|
|
187
|
+
...config,
|
|
188
|
+
type: "MANDATORY"
|
|
147
189
|
};
|
|
148
|
-
default: return
|
|
190
|
+
default: return config;
|
|
149
191
|
}
|
|
150
192
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
onError: s,
|
|
162
|
-
onUrlUuidRefreshed: n.onUrlUuidRefreshed
|
|
163
|
-
}), [p, h] = c(() => d.workflowManager, { autoLoad: !1 }), g = _({
|
|
164
|
-
moduleKey: p?.status === "ready" ? p.currentNode.moduleKey : void 0,
|
|
165
|
-
modules: T,
|
|
166
|
-
headlessModuleKeys: m,
|
|
167
|
-
onModuleLoading: n.onModuleLoading,
|
|
168
|
-
onModuleLoaded: n.onModuleLoaded,
|
|
169
|
-
onError: s
|
|
193
|
+
/**
|
|
194
|
+
* Inner component mounted only after `useWorkflowInitialization` has resolved
|
|
195
|
+
* the session and constructed the manager. Splitting this out keeps the
|
|
196
|
+
* `useManager` factory call out of the init path — token-mode and
|
|
197
|
+
* self-loading mode both arrive here with a fully-constructed manager.
|
|
198
|
+
*/
|
|
199
|
+
var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish, onError }) => {
|
|
200
|
+
const [workflowState, workflowManager] = useManager(() => initialManager, {
|
|
201
|
+
autoLoad: false,
|
|
202
|
+
manageLifecycle: false
|
|
170
203
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
204
|
+
const moduleLoaderState = useModuleLoader({
|
|
205
|
+
moduleKey: workflowState?.status === "ready" ? workflowState.currentNode.moduleKey : void 0,
|
|
206
|
+
modules: LAZY_WORKFLOW_MODULES,
|
|
207
|
+
headlessModuleKeys: HEADLESS_WORKFLOW_MODULE_KEYS,
|
|
208
|
+
onModuleLoading: config.onModuleLoading,
|
|
209
|
+
onModuleLoaded: config.onModuleLoaded,
|
|
210
|
+
onError
|
|
211
|
+
});
|
|
212
|
+
const terminalFiredRef = A(false);
|
|
213
|
+
y(() => {
|
|
214
|
+
if (terminalFiredRef.current) return;
|
|
215
|
+
if (workflowState?.status === "finished") {
|
|
216
|
+
terminalFiredRef.current = true;
|
|
217
|
+
const finishStatus = workflowState.finishStatus;
|
|
218
|
+
queueMicrotask(() => onFinish?.(finishStatus));
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (workflowState?.status === "asyncResolution") {
|
|
222
|
+
terminalFiredRef.current = true;
|
|
223
|
+
queueMicrotask(() => onFinish?.());
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (workflowState?.status === "error" && onError) {
|
|
227
|
+
terminalFiredRef.current = true;
|
|
228
|
+
const { error, errorCode } = workflowState;
|
|
229
|
+
queueMicrotask(() => onError(error, errorCode));
|
|
230
|
+
}
|
|
183
231
|
}, [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
232
|
+
workflowState?.status,
|
|
233
|
+
onFinish,
|
|
234
|
+
onError,
|
|
235
|
+
workflowState
|
|
187
236
|
]);
|
|
188
|
-
|
|
237
|
+
const hideSpinnerText = !(config.spinnerConfig?.title || config.spinnerConfig?.subtitle);
|
|
238
|
+
const renderSpinner = () => /* @__PURE__ */ u("div", {
|
|
189
239
|
class: "IncodeWorkflow",
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
-
spinnerConfig:
|
|
192
|
-
hideText:
|
|
240
|
+
children: /* @__PURE__ */ u(TransitionSpinner, {
|
|
241
|
+
spinnerConfig: config.spinnerConfig,
|
|
242
|
+
hideText: hideSpinnerText
|
|
193
243
|
})
|
|
194
|
-
})
|
|
195
|
-
|
|
244
|
+
});
|
|
245
|
+
const handleModuleError = (error, _errorCode, moduleErrorCode) => {
|
|
246
|
+
workflowManager.errorModule(error ?? "Module error", moduleErrorCode);
|
|
196
247
|
};
|
|
197
|
-
if (
|
|
198
|
-
if (d.status === "initializing") return b();
|
|
199
|
-
if (p && "homeScreen" in p && p.homeScreen.visible) return /* @__PURE__ */ o("div", {
|
|
248
|
+
if (workflowState && "homeScreen" in workflowState && workflowState.homeScreen.visible) return /* @__PURE__ */ u("div", {
|
|
200
249
|
class: "IncodeWorkflow",
|
|
201
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ u(P, {
|
|
202
251
|
fallback: null,
|
|
203
|
-
children: /* @__PURE__ */
|
|
204
|
-
isContinueLoading:
|
|
205
|
-
onContinue: () =>
|
|
252
|
+
children: /* @__PURE__ */ u(LazyHomeScreen, {
|
|
253
|
+
isContinueLoading: workflowState.homeScreen.isContinueLoading,
|
|
254
|
+
onContinue: () => workflowManager.continueFromHome()
|
|
206
255
|
})
|
|
207
256
|
})
|
|
208
257
|
});
|
|
209
|
-
if (!
|
|
210
|
-
if (
|
|
211
|
-
|
|
258
|
+
if (!workflowState || workflowState.status === "idle" || workflowState.status === "loading") return renderSpinner();
|
|
259
|
+
if (workflowState.status === "error") return /* @__PURE__ */ u("div", {
|
|
260
|
+
class: "IncodeWorkflow",
|
|
261
|
+
children: /* @__PURE__ */ u(TerminalErrorPage, { message: workflowState.error })
|
|
262
|
+
});
|
|
263
|
+
if (workflowState.status === "finished" || workflowState.status === "asyncResolution" || workflowState.status === "closed") return null;
|
|
264
|
+
if (moduleLoaderState.status === "unsupported") return /* @__PURE__ */ u("div", {
|
|
212
265
|
class: "IncodeWorkflow",
|
|
213
|
-
children: /* @__PURE__ */
|
|
214
|
-
moduleKey:
|
|
215
|
-
onNext: () =>
|
|
266
|
+
children: /* @__PURE__ */ u(UnsupportedModule, {
|
|
267
|
+
moduleKey: workflowState.currentNode.moduleKey,
|
|
268
|
+
onNext: () => workflowManager.completeModule()
|
|
216
269
|
})
|
|
217
270
|
});
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
|
|
271
|
+
if (moduleLoaderState.status === "idle" || moduleLoaderState.status === "loading" || moduleLoaderState.status === "error") return renderSpinner();
|
|
272
|
+
const { Component } = moduleLoaderState;
|
|
273
|
+
const moduleConfig = mapModuleConfig({
|
|
274
|
+
moduleKey: workflowState.currentNode.moduleKey,
|
|
275
|
+
config: workflowState.config,
|
|
276
|
+
workflowId: workflowState.workflowConfig.id,
|
|
277
|
+
authHint: config.authHint,
|
|
278
|
+
lang: config.lang,
|
|
279
|
+
mergeSessionRecordings: workflowState.workflowConfig.mergeSessionRecordings,
|
|
280
|
+
ageAssurance: workflowState.workflowConfig.ageAssurance
|
|
281
|
+
});
|
|
282
|
+
let extraProps = {};
|
|
283
|
+
if (workflowState.currentNode.moduleKey === "REDIRECT_TO_MOBILE") extraProps = { onContinue: () => workflowManager.completeModule() };
|
|
284
|
+
return /* @__PURE__ */ u("div", {
|
|
285
|
+
class: "IncodeWorkflow",
|
|
286
|
+
children: /* @__PURE__ */ u(Component, {
|
|
287
|
+
config: moduleConfig,
|
|
288
|
+
onFinish: () => workflowManager.completeModule(),
|
|
289
|
+
onError: handleModuleError,
|
|
290
|
+
...extraProps
|
|
291
|
+
}, workflowState.currentNode.id)
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
var IncodeWorkflowContent = ({ config, onFinish, onError }) => {
|
|
295
|
+
const { i18n } = useTranslation();
|
|
296
|
+
const initState = useWorkflowInitialization({
|
|
297
|
+
...config,
|
|
298
|
+
onError
|
|
299
|
+
});
|
|
300
|
+
y(() => {
|
|
301
|
+
if (readStoredLanguage()) return;
|
|
302
|
+
if (config.lang && i18n.language !== config.lang) i18n.changeLanguage(config.lang);
|
|
303
|
+
}, [config.lang, i18n]);
|
|
304
|
+
const hideSpinnerText = !(config.spinnerConfig?.title || config.spinnerConfig?.subtitle);
|
|
305
|
+
if (initState.status === "error") return /* @__PURE__ */ u("div", {
|
|
221
306
|
class: "IncodeWorkflow",
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
-
config: j({
|
|
224
|
-
moduleKey: p.currentNode.moduleKey,
|
|
225
|
-
config: p.config,
|
|
226
|
-
workflowId: p.workflowConfig.id,
|
|
227
|
-
authHint: n.authHint,
|
|
228
|
-
lang: n.lang,
|
|
229
|
-
mergeSessionRecordings: p.workflowConfig.mergeSessionRecordings,
|
|
230
|
-
ageAssurance: p.workflowConfig.ageAssurance
|
|
231
|
-
}),
|
|
232
|
-
onFinish: () => h.completeModule(),
|
|
233
|
-
onError: x,
|
|
234
|
-
...p.currentNode.moduleKey === "REDIRECT_TO_MOBILE" ? { onContinue: () => h.completeModule() } : {}
|
|
235
|
-
}, p.currentNode.id)
|
|
307
|
+
children: /* @__PURE__ */ u(TerminalErrorPage, { message: initState.error })
|
|
236
308
|
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
309
|
+
if (initState.status === "initializing") return /* @__PURE__ */ u("div", {
|
|
310
|
+
class: "IncodeWorkflow",
|
|
311
|
+
children: /* @__PURE__ */ u(TransitionSpinner, {
|
|
312
|
+
spinnerConfig: config.spinnerConfig,
|
|
313
|
+
hideText: hideSpinnerText
|
|
314
|
+
})
|
|
315
|
+
});
|
|
316
|
+
return /* @__PURE__ */ u(IncodeWorkflowReady, {
|
|
317
|
+
config,
|
|
318
|
+
workflowManager: initState.workflowManager,
|
|
319
|
+
onFinish,
|
|
320
|
+
onError
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
var IncodeWorkflow = ({ config, onFinish, onError }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IncodeWorkflowContent, {
|
|
324
|
+
config,
|
|
325
|
+
onFinish,
|
|
326
|
+
onError
|
|
241
327
|
}) : null });
|
|
242
|
-
|
|
328
|
+
registerIncodeModuleElement(IncodeWorkflow, "incode-workflow");
|
|
243
329
|
//#endregion
|
|
244
|
-
export {
|
|
330
|
+
export { IncodeWorkflow, mapModuleConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-rc.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
|
|
7
|
+
},
|
|
4
8
|
"type": "module",
|
|
5
9
|
"main": "./dist/index.es.js",
|
|
6
10
|
"types": "./dist/types/index.d.ts",
|
|
@@ -154,7 +158,7 @@
|
|
|
154
158
|
"import": "./dist/extensibility.es.js"
|
|
155
159
|
},
|
|
156
160
|
"./redirect-to-mobile": {
|
|
157
|
-
"source": "./src/modules/redirect-to-mobile/
|
|
161
|
+
"source": "./src/modules/redirect-to-mobile/redirect-to-mobile.tsx",
|
|
158
162
|
"types": "./dist/types/redirect-to-mobile.d.ts",
|
|
159
163
|
"import": "./dist/redirect-to-mobile/redirect-to-mobile.es.js"
|
|
160
164
|
},
|
|
@@ -180,6 +184,15 @@
|
|
|
180
184
|
"source": "./src/modules/antifraud/styles.css",
|
|
181
185
|
"default": "./dist/antifraud/styles.css"
|
|
182
186
|
},
|
|
187
|
+
"./field-comparison": {
|
|
188
|
+
"source": "./src/modules/field-comparison/fieldComparison.tsx",
|
|
189
|
+
"types": "./dist/types/field-comparison.d.ts",
|
|
190
|
+
"import": "./dist/field-comparison/field-comparison.es.js"
|
|
191
|
+
},
|
|
192
|
+
"./field-comparison/styles.css": {
|
|
193
|
+
"source": "./src/modules/field-comparison/styles.css",
|
|
194
|
+
"default": "./dist/field-comparison/styles.css"
|
|
195
|
+
},
|
|
183
196
|
"./electronic-signature": {
|
|
184
197
|
"source": "./src/modules/electronic-signature/electronic-signature.tsx",
|
|
185
198
|
"types": "./dist/types/electronic-signature.d.ts",
|
|
@@ -226,12 +239,15 @@
|
|
|
226
239
|
"dist"
|
|
227
240
|
],
|
|
228
241
|
"dependencies": {
|
|
242
|
+
"@fontsource/dm-sans": "^5.2.8",
|
|
243
|
+
"@fontsource/rethink-sans": "^5.2.8",
|
|
229
244
|
"@tailwindcss/vite": "^4.2.2",
|
|
230
245
|
"dompurify": "^3.3.3",
|
|
231
246
|
"i18next": "^25.7.1",
|
|
232
247
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
233
248
|
"i18next-http-backend": "^3.0.2",
|
|
234
249
|
"libphonenumber-js": "^1.11.0",
|
|
250
|
+
"lottie-web": "5.13.0",
|
|
235
251
|
"marked": "^17.0.5",
|
|
236
252
|
"pdfjs-dist": "~5.4.624",
|
|
237
253
|
"preact-custom-element": "^4.6.0",
|
|
@@ -239,30 +255,34 @@
|
|
|
239
255
|
"qrcode": "^1.5.4",
|
|
240
256
|
"signature_pad": "^5.1.3",
|
|
241
257
|
"tailwindcss": "^4.1.17",
|
|
242
|
-
"@incodetech/core": "2.0.
|
|
258
|
+
"@incodetech/core": "2.1.0-rc.0"
|
|
243
259
|
},
|
|
244
260
|
"devDependencies": {
|
|
245
261
|
"@microsoft/api-extractor": "^7.53.3",
|
|
246
262
|
"@preact/preset-vite": "^2.10.5",
|
|
247
|
-
"@storybook/addon-a11y": "^
|
|
248
|
-
"@storybook/addon-
|
|
249
|
-
"@storybook/addon-
|
|
250
|
-
"@storybook/
|
|
251
|
-
"@storybook/preact": "^
|
|
252
|
-
"@storybook/
|
|
263
|
+
"@storybook/addon-a11y": "^10.4.1",
|
|
264
|
+
"@storybook/addon-themes": "^10.4.1",
|
|
265
|
+
"@storybook/addon-vitest": "^10.4.1",
|
|
266
|
+
"@storybook/preact": "^10.4.1",
|
|
267
|
+
"@storybook/preact-vite": "^10.4.1",
|
|
268
|
+
"@storybook/react-dom-shim": "^10.4.1",
|
|
253
269
|
"@tailwindcss/postcss": "^4.1.17",
|
|
254
270
|
"@testing-library/preact": "^3.2.4",
|
|
255
271
|
"@types/node": "^22.10.5",
|
|
256
272
|
"@types/qrcode": "^1.5.6",
|
|
257
273
|
"@vitejs/plugin-basic-ssl": "^2.3.0",
|
|
274
|
+
"@vitest/browser": "4.0.13",
|
|
275
|
+
"@vitest/browser-playwright": "4.0.13",
|
|
258
276
|
"@vitest/coverage-v8": "^4.0.13",
|
|
259
277
|
"happy-dom": "^20.7.0",
|
|
278
|
+
"playwright": "^1.60.0",
|
|
260
279
|
"postcss": "^8.5.6",
|
|
261
280
|
"postcss-import": "^16.1.1",
|
|
262
281
|
"preact": "^10.27.2",
|
|
263
282
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
264
|
-
"storybook": "^
|
|
283
|
+
"storybook": "^10.4.1",
|
|
265
284
|
"stylelint": "^17.5.0",
|
|
285
|
+
"terser": "^5.48.0",
|
|
266
286
|
"typescript": "^5.9.3",
|
|
267
287
|
"vite": "^8.0.0",
|
|
268
288
|
"vite-plugin-dts": "^4.5.4",
|
|
@@ -272,9 +292,11 @@
|
|
|
272
292
|
},
|
|
273
293
|
"scripts": {
|
|
274
294
|
"build": "rm -rf dist && vite build",
|
|
295
|
+
"build:cdn": "rm -rf dist && NODE_OPTIONS=--experimental-strip-types BUILD_TARGET=cdn vite build",
|
|
275
296
|
"build:dev": "NODE_ENV=development vite build",
|
|
276
297
|
"build:analyze": "rm -rf dist && ANALYZE=1 vite build && echo '\\nBundle report: packages/ui/dist/stats.html\\n'",
|
|
277
298
|
"test": "vitest run",
|
|
299
|
+
"test:a11y": "VITE_STORYBOOK_A11Y=true vitest run",
|
|
278
300
|
"coverage": "vitest run --coverage",
|
|
279
301
|
"lint": "eslint . && pnpm lint:styles",
|
|
280
302
|
"lint:fix": "eslint . --fix && pnpm lint:styles",
|