@incodetech/web 0.0.0-dev-20260409-a38d5e8 → 0.0.0-dev-20260409-09dfd52

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.
Files changed (92) hide show
  1. package/dist/{AsYouType-C-VEC826.js → AsYouType-RC03ULcj.js} +1 -1
  2. package/dist/{addressAutocomplete-BuldQv2L.js → addressAutocomplete-BELDwueU.js} +4 -4
  3. package/dist/antifraud/antifraud.es.js +3 -3
  4. package/dist/authentication/authentication.es.js +3 -3
  5. package/dist/button-Dt72Wn3U.js +24 -0
  6. package/dist/{checkbox-CCxy6DN4.js → checkbox-BcJjkRs3.js} +2 -2
  7. package/dist/consent/consent.es.js +13 -13
  8. package/dist/cross-document-data-match/cross-document-data-match.es.js +3 -3
  9. package/dist/curp-validation/curp-validation.es.js +37 -37
  10. package/dist/dateInputComposed-DU2hZfnf.js +2 -0
  11. package/dist/{dateInputComposed-DX7hO6l8.js → dateInputComposed-wl-LTsul.js} +4 -4
  12. package/dist/{documentCapture-CYW_KpEI.js → documentCapture-CrE9NA0-.js} +54 -54
  13. package/dist/{dropdownComposed-DbHLLS0N.js → dropdownComposed-C2cDpZSB.js} +3 -3
  14. package/dist/ekyb/ekyb.es.js +1 -1
  15. package/dist/ekybModule-BQUyYqJO.js +2 -0
  16. package/dist/{ekybModule-BKCFm27J.js → ekybModule-tHnD9IyU.js} +19 -19
  17. package/dist/ekyc/ekyc.es.js +1 -1
  18. package/dist/ekycModule-ByS2oj23.js +2 -0
  19. package/dist/{ekycModule-BVXMAI6j.js → ekycModule-Cc2l9FNN.js} +19 -19
  20. package/dist/email/email.es.js +11 -11
  21. package/dist/{extensibility-CGYf1tlJ.js → extensibility-Due2cIvN.js} +58 -58
  22. package/dist/extensibility.es.js +20 -20
  23. package/dist/face-match/face-match.es.js +1 -1
  24. package/dist/{faceMatch-BMdxb9CE.js → faceMatch-8wF_NjAI.js} +11 -11
  25. package/dist/faceMatch-k9ZKksto.js +2 -0
  26. package/dist/flow/flow.es.js +269 -2134
  27. package/dist/{formField-BVEXt76v.js → formField-DRI6PubM.js} +13 -13
  28. package/dist/geolocation/geolocation.es.js +11 -11
  29. package/dist/governmentValidation/governmentValidation.es.js +9 -9
  30. package/dist/{i18n-CcMrDzmw.js → i18n-DGG1zc7t.js} +1 -1
  31. package/dist/{icons-CvPvuYCm.js → icons-CkLer5E1.js} +1 -1
  32. package/dist/id/id.es.js +6 -6
  33. package/dist/index.es.js +1 -1
  34. package/dist/inputComposed-C3Q-eQ1V.js +1 -0
  35. package/dist/{inputComposed-6ZSkf7Za.js → inputComposed-yULlZXg1.js} +3 -3
  36. package/dist/{loadingIcon-DEN5B0ju.js → loadingIcon-B3xEpDvA.js} +1 -1
  37. package/dist/{mandatoryConsent-DpejBjwV.js → mandatoryConsent-CWA8z4z-.js} +14 -14
  38. package/dist/{otpInput-DAwkcaQi.js → otpInput-2FjlqNe0.js} +4 -4
  39. package/dist/{page-B61t4D13.js → page-kB-LDkaO.js} +4 -4
  40. package/dist/phone/phone.es.js +11 -11
  41. package/dist/{phoneInput-BezqS95v.js → phoneInput-CYbUN3oz.js} +3 -3
  42. package/dist/{phoneInputComposed-DbSTCw_p.js → phoneInputComposed-CkL_nMPT.js} +6 -6
  43. package/dist/{processing-CD5TYh41.js → processing-BB9pxvN2.js} +2 -2
  44. package/dist/redirectToMobile-CYLzR4ck.js +2 -0
  45. package/dist/redirectToMobile-CxEfitZM.js +1545 -0
  46. package/dist/{richText-nIDjB47u.js → richText-C9m4iMuF.js} +1 -1
  47. package/dist/selfie/selfie.es.js +4 -4
  48. package/dist/{setup-CNelwOWO.js → setup-CATCmh3T.js} +1 -1
  49. package/dist/signature/signature.es.js +15 -15
  50. package/dist/{spinner-CBuVSVRP.js → spinner-4epdvlck.js} +3 -3
  51. package/dist/spinner-CbGt1yZr.js +1 -0
  52. package/dist/{tutorial-qFq58awW.js → tutorial-s3gx4OxF.js} +63 -63
  53. package/dist/types/workflow.d.ts +62 -0
  54. package/dist/{typography-PQSaYBgR.js → typography-R9HuMYSQ.js} +1 -1
  55. package/dist/typography-ePPfV-Xg.js +1 -0
  56. package/dist/useModuleLoader-Jq27P9t5.js +325 -0
  57. package/dist/{button-D85zGTiU.js → verifiedByIncode-CMPwRtA2.js} +32 -51
  58. package/dist/workflow/styles.css +6697 -0
  59. package/dist/workflow/workflow.es.js +219 -0
  60. package/package.json +9 -2
  61. package/dist/dateInputComposed-BaWm6bmT.js +0 -2
  62. package/dist/ekybModule-DviRZ6bj.js +0 -2
  63. package/dist/ekycModule-B8z7i5gA.js +0 -2
  64. package/dist/faceMatch-BRVU6adg.js +0 -2
  65. package/dist/inputComposed-C2QhOo1q.js +0 -1
  66. package/dist/spinner-BOBu0_7y.js +0 -1
  67. package/dist/typography-BveyW5lr.js +0 -1
  68. /package/dist/{aligndevicelottie-BESyjja3.js → aligndevicelottie-Dzk0EYVz.js} +0 -0
  69. /package/dist/{back-horizontal-hint-CalX75a7.js → back-horizontal-hint-BgG85hNR.js} +0 -0
  70. /package/dist/{back-tutorial-BQwJgaGG.js → back-tutorial-CJwYD2hu.js} +0 -0
  71. /package/dist/{back-vertical-hint-2SOVPN8l.js → back-vertical-hint-BhG7RS-O.js} +0 -0
  72. /package/dist/{backdevicelottie-D5kOlV31.js → backdevicelottie-TJ3pa5kD.js} +0 -0
  73. /package/dist/{blurdevicelottie-YEyIrlUI.js → blurdevicelottie-gPcFwLJO.js} +0 -0
  74. /package/dist/{browser-ponyfill-cMyrYa4p.js → browser-ponyfill-CYOHdF5Y.js} +0 -0
  75. /package/dist/{countries-BGpsb-UE.js → countries-DKKNtuUp.js} +0 -0
  76. /package/dist/{defineProperty-DSVcWjt2.js → defineProperty-eqPYf0qG.js} +0 -0
  77. /package/dist/{flip-animation-DbofaTty.js → flip-animation-ygeHr8Wk.js} +0 -0
  78. /package/dist/{front-horizontal-hint-DI3Uaq97.js → front-horizontal-hint-yIMvej7H.js} +0 -0
  79. /package/dist/{front-vertical-hint-Bc4LWUVG.js → front-vertical-hint-ZYgpMlDz.js} +0 -0
  80. /package/dist/{frontdevicelottie-BEk_Z_Up.js → frontdevicelottie-CJbKuefM.js} +0 -0
  81. /package/dist/{glaredevicelottie-COKmclSi.js → glaredevicelottie-DeGIxDRx.js} +0 -0
  82. /package/dist/{id-laser-h-CY76JXmk.js → id-laser-h-B7ddWmEe.js} +0 -0
  83. /package/dist/{id-laser-v-CyjBWjkL.js → id-laser-v-CI4GubjY.js} +0 -0
  84. /package/dist/{id-tutorial-Cqp9EUbW.js → id-tutorial-B1vsh6Wp.js} +0 -0
  85. /package/dist/{incodeModule-nXHV_p_Y.js → incodeModule-C3p8eAh_.js} +0 -0
  86. /package/dist/{numberedStep-a4kHo4t-.js → numberedStep-CoxrYWYg.js} +0 -0
  87. /package/dist/{passport-horizontal-hint-h_yTQfgD.js → passport-horizontal-hint-BLM_Rdz4.js} +0 -0
  88. /package/dist/{passport-tutorial-DNr-AgHL.js → passport-tutorial-DH7UEOHu.js} +0 -0
  89. /package/dist/{passport-vertical-hint-DzvJ1Cas.js → passport-vertical-hint-BVKS-R7d.js} +0 -0
  90. /package/dist/{selfieTutorial-6N-Fb6dA.js → selfieTutorial-BZFLHPco.js} +0 -0
  91. /package/dist/{successIcon-AHrfmJvv.js → successIcon-Dklx5JWI.js} +0 -0
  92. /package/dist/{warningIcon-Cvj-ayg1.js → warningIcon-Bv_pDQV-.js} +0 -0
@@ -0,0 +1,219 @@
1
+ import { n as e } from "../i18n-DGG1zc7t.js";
2
+ import { _ as t, l as n, p as r, v as i } from "../vendor-preact-D6SntenC.js";
3
+ import { t as a } from "../uiConfig-CwpQ-IM6.js";
4
+ import { c as o, r as s } from "../loadingIcon-B3xEpDvA.js";
5
+ import { t as c } from "../spinner-4epdvlck.js";
6
+ import "../spinner-CbGt1yZr.js";
7
+ import { t as l } from "../incodeModule-C3p8eAh_.js";
8
+ import { d as u, i as d, l as f, r as p, t as m } from "../useModuleLoader-Jq27P9t5.js";
9
+ import { resolveWasmConfig as h, warmupWasm as g } from "@incodetech/core/wasm";
10
+ import { createWorkflowManager as _ } from "@incodetech/core/workflow";
11
+ //#region src/modules/workflow/workflowInit.ts
12
+ var v = {
13
+ ...d,
14
+ REDIRECT_TO_MOBILE: () => import("../redirectToMobile-CYLzR4ck.js").then((e) => e.RedirectToMobile)
15
+ };
16
+ async function y() {
17
+ try {
18
+ let e = await u();
19
+ return {
20
+ theme: e,
21
+ uiConfig: {
22
+ logoSrc: e.logo,
23
+ hideFooterBranding: e.hideFooterBranding
24
+ }
25
+ };
26
+ } catch {
27
+ return {};
28
+ }
29
+ }
30
+ function b(e = {}) {
31
+ return _({
32
+ customModuleCallback: e.customModuleCallback,
33
+ interviewId: e.interviewId,
34
+ isDesktop: e.isDesktop
35
+ });
36
+ }
37
+ function x(e) {
38
+ e !== !1 && g(h({
39
+ ...e,
40
+ pipelines: e?.pipelines ?? ["selfie", "idCapture"]
41
+ })).catch((e) => {
42
+ console.error("Workflow WASM warmup failed:", e);
43
+ });
44
+ }
45
+ //#endregion
46
+ //#region src/modules/workflow/useWorkflowInitialization.ts
47
+ function S(e) {
48
+ let { apiURL: i, token: o, lang: s, disableDashboardTheme: c, wasmConfig: l, customModuleCallback: u, interviewId: d, isDesktop: p, onError: m } = e, h = n(null), [g, _] = r(() => {
49
+ let e = b({
50
+ customModuleCallback: u,
51
+ interviewId: d,
52
+ isDesktop: p
53
+ });
54
+ return h.current = e, {
55
+ status: "initializing",
56
+ workflowManager: e
57
+ };
58
+ }), v = n(!1);
59
+ return t(() => {
60
+ if (g.status !== "initializing" || v.current) return;
61
+ v.current = !0;
62
+ let e = h.current;
63
+ return (async () => {
64
+ try {
65
+ await f({
66
+ apiURL: i,
67
+ token: o,
68
+ lang: s
69
+ });
70
+ let t = c ? Promise.resolve() : y().then((e) => {
71
+ e.uiConfig && a(e.uiConfig);
72
+ });
73
+ x(l), e.load(), await t, _({
74
+ status: "ready",
75
+ workflowManager: e
76
+ });
77
+ } catch (t) {
78
+ let n = t instanceof Error ? t.message : "Failed to initialize SDK";
79
+ _({
80
+ status: "error",
81
+ error: n,
82
+ workflowManager: e
83
+ }), m?.(n);
84
+ }
85
+ })(), () => e?.stop();
86
+ }, [
87
+ i,
88
+ o,
89
+ s,
90
+ c,
91
+ l,
92
+ m
93
+ ]), g;
94
+ }
95
+ //#endregion
96
+ //#region src/modules/workflow/workflow.tsx
97
+ function C(e) {
98
+ let { moduleKey: t, config: n, workflowId: r, authHint: i, lang: a, mergeSessionRecordings: o, ageAssurance: s } = e;
99
+ switch (t) {
100
+ case "AUTHENTICATION": return {
101
+ ...n,
102
+ authHint: i
103
+ };
104
+ case "REDIRECT_TO_MOBILE": return {
105
+ ...n,
106
+ flowId: r,
107
+ authHint: i,
108
+ lang: a
109
+ };
110
+ case "ID":
111
+ case "ID_CAPTURE":
112
+ case "TUTORIAL_ID": return {
113
+ ...n,
114
+ mergeSessionRecordings: n.mergeSessionRecordings ?? o,
115
+ ageAssurance: n.ageAssurance ?? s
116
+ };
117
+ case "SELFIE": return {
118
+ ...n,
119
+ ageAssurance: n.ageAssurance ?? s
120
+ };
121
+ case "ADDRESS": return {
122
+ ...n,
123
+ processingType: "addressStatement"
124
+ };
125
+ case "EKYB":
126
+ case "EXTERNAL_VERIFICATION": return {
127
+ ...n,
128
+ flowId: r
129
+ };
130
+ case "SECOND_ID": return {
131
+ ...n,
132
+ isSecondId: !0
133
+ };
134
+ default: return n;
135
+ }
136
+ }
137
+ var w = ({ config: r, onFinish: a, onError: s }) => {
138
+ let { i18n: l } = e(), u = S({
139
+ apiURL: r.apiURL,
140
+ token: r.token,
141
+ lang: r.lang,
142
+ disableDashboardTheme: r.disableDashboardTheme,
143
+ wasmConfig: r.wasmConfig,
144
+ customModuleCallback: r.customModuleCallback,
145
+ interviewId: r.interviewId,
146
+ isDesktop: r.isDesktop,
147
+ onError: s
148
+ }), [d, f] = o(() => u.workflowManager, { autoLoad: !1 }), h = m({
149
+ moduleKey: d?.status === "ready" ? d.currentNode.moduleKey : void 0,
150
+ modules: v,
151
+ onModuleLoading: r.onModuleLoading,
152
+ onModuleLoaded: r.onModuleLoaded,
153
+ onError: s
154
+ });
155
+ t(() => {
156
+ r.lang && l.language !== r.lang && l.changeLanguage(r.lang);
157
+ }, [r.lang, l]);
158
+ let g = n(!1);
159
+ t(() => {
160
+ g.current || (d?.status === "finished" ? (g.current = !0, a?.(d.finishStatus)) : d?.status === "asyncResolution" && (g.current = !0, a?.()));
161
+ }, [
162
+ d?.status,
163
+ a,
164
+ d
165
+ ]), t(() => {
166
+ d?.status === "error" && s && s(d.error);
167
+ }, [
168
+ d?.status,
169
+ s,
170
+ d
171
+ ]);
172
+ let _ = () => /* @__PURE__ */ i("div", {
173
+ class: "IncodeWorkflow",
174
+ children: /* @__PURE__ */ i(c, {
175
+ title: r.spinnerConfig?.title,
176
+ subtitle: r.spinnerConfig?.subtitle,
177
+ size: r.spinnerConfig?.size,
178
+ fullScreen: !0
179
+ })
180
+ }), y = (e) => {
181
+ f.errorModule(e ?? "Module error"), s?.(e ?? "Module error");
182
+ };
183
+ if (u.status === "error") return null;
184
+ if (u.status === "initializing" || !d || d.status === "idle" || d.status === "loading") return _();
185
+ if (d.status === "finished" || d.status === "error" || d.status === "asyncResolution" || d.status === "closed") return null;
186
+ if (h.status === "unsupported") return /* @__PURE__ */ i("div", {
187
+ class: "IncodeWorkflow",
188
+ children: /* @__PURE__ */ i(p, {
189
+ moduleKey: d.currentNode.moduleKey,
190
+ onNext: () => f.completeModule()
191
+ })
192
+ });
193
+ if (h.status === "idle" || h.status === "loading" || h.status === "error") return _();
194
+ let { Component: b } = h;
195
+ return /* @__PURE__ */ i("div", {
196
+ class: "IncodeWorkflow",
197
+ children: /* @__PURE__ */ i(b, {
198
+ config: C({
199
+ moduleKey: d.currentNode.moduleKey,
200
+ config: d.config,
201
+ workflowId: d.workflowConfig.id,
202
+ authHint: r.authHint,
203
+ lang: r.lang,
204
+ mergeSessionRecordings: d.workflowConfig.mergeSessionRecordings,
205
+ ageAssurance: d.workflowConfig.ageAssurance
206
+ }),
207
+ onFinish: () => f.completeModule(),
208
+ onError: y,
209
+ ...d.currentNode.moduleKey === "REDIRECT_TO_MOBILE" ? { onContinue: () => f.completeModule() } : {}
210
+ }, d.currentNode.id)
211
+ });
212
+ }, T = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ i(s, { children: e ? /* @__PURE__ */ i(w, {
213
+ config: e,
214
+ onFinish: t,
215
+ onError: n
216
+ }) : null });
217
+ l(T, "incode-workflow");
218
+ //#endregion
219
+ export { T as IncodeWorkflow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260409-a38d5e8",
3
+ "version": "0.0.0-dev-20260409-09dfd52",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -127,6 +127,13 @@
127
127
  "./antifraud/styles.css": {
128
128
  "default": "./dist/antifraud/styles.css"
129
129
  },
130
+ "./workflow": {
131
+ "types": "./dist/types/workflow.d.ts",
132
+ "import": "./dist/workflow/workflow.es.js"
133
+ },
134
+ "./workflow/styles.css": {
135
+ "default": "./dist/workflow/styles.css"
136
+ },
130
137
  "./cross-document-data-match": {
131
138
  "types": "./dist/types/cross-document-data-match.d.ts",
132
139
  "import": "./dist/cross-document-data-match/cross-document-data-match.es.js"
@@ -148,7 +155,7 @@
148
155
  "qrcode": "^1.5.4",
149
156
  "signature_pad": "^5.1.3",
150
157
  "tailwindcss": "^4.1.17",
151
- "@incodetech/core": "0.0.0-dev-20260409-a38d5e8"
158
+ "@incodetech/core": "0.0.0-dev-20260409-09dfd52"
152
159
  },
153
160
  "devDependencies": {
154
161
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,2 +0,0 @@
1
- import "./dropdownComposed-DbHLLS0N.js";
2
- import "./dateInputComposed-DX7hO6l8.js";
@@ -1,2 +0,0 @@
1
- import { t as e } from "./ekybModule-BKCFm27J.js";
2
- export { e as EkybModule };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./ekycModule-BVXMAI6j.js";
2
- export { e as EkycModule };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./faceMatch-BMdxb9CE.js";
2
- export { e as FaceMatch };
@@ -1 +0,0 @@
1
- import "./inputComposed-6ZSkf7Za.js";
@@ -1 +0,0 @@
1
- import "./spinner-CBuVSVRP.js";
@@ -1 +0,0 @@
1
- import "./typography-PQSaYBgR.js";