@incodetech/core 0.0.0-dev-20260508-3255029 → 0.0.0-dev-20260508-9f627e9
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.d.ts +1 -1
- package/dist/consent.d.ts +50 -50
- package/dist/cpf-ocr.d.ts +17 -17
- package/dist/document-capture.d.ts +74 -74
- package/dist/document-upload.d.ts +43 -43
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybStateMachine-BvcjLd6l.esm.js → ekybStateMachine-D3782jvA.esm.js} +1 -1
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.esm.js +3 -3
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-D73gvley.esm.js → flowServices-DxoBqypr.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id-ocr.d.ts +52 -52
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-BrVam9QJ.esm.js → idCaptureManager-XyfCpFXq.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-DMCtVeNb.esm.js → idCaptureStateMachine-fkhBD0jR.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +47 -47
- package/dist/{index-BSWxRDj-.d.ts → index-DlE7zNv3.d.ts} +119 -119
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{session-CVZ98m1h.esm.js → session-DfeUAFVU.esm.js} +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{setup-BYcwXXPT.esm.js → setup-D5U4Qvmv.esm.js} +1 -1
- package/dist/wasm.esm.js +2 -2
- package/dist/workflow.d.ts +191 -112
- package/dist/workflow.esm.js +46 -8
- package/package.json +3 -3
package/dist/workflow.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import "./BrowserTimerProvider-BZGH3sYJ.esm.js";
|
|
|
3
3
|
import { t as api } from "./api-eqRXuVG-.esm.js";
|
|
4
4
|
import { o as createManagerInstrumentation } from "./events-Bt1azl2B.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-B3V1U9Dg.esm.js";
|
|
6
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-
|
|
6
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-DfeUAFVU.esm.js";
|
|
7
7
|
import "./IpifyProvider-ByL6JYxg.esm.js";
|
|
8
8
|
import "./browserSimulation-CAH-V_iE.esm.js";
|
|
9
9
|
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-C19_S3_9.esm.js";
|
|
@@ -27,13 +27,13 @@ import { t as consentMachine } from "./consentStateMachine-Bda2QqSh.esm.js";
|
|
|
27
27
|
import "./cpf-DTvbZfOI.esm.js";
|
|
28
28
|
import { t as curpValidationMachine } from "./curpValidationStateMachine-CYXt-Why.esm.js";
|
|
29
29
|
import { t as documentCaptureMachine } from "./documentCaptureStateMachine-SQ3AsME6.esm.js";
|
|
30
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
30
|
+
import { t as ekybMachine } from "./ekybStateMachine-D3782jvA.esm.js";
|
|
31
31
|
import "./addressSearch-DGVL5bWp.esm.js";
|
|
32
|
-
import "./flowServices-
|
|
32
|
+
import "./flowServices-DxoBqypr.esm.js";
|
|
33
33
|
import { t as ekycMachine } from "./ekycStateMachine-B-R_nMk9.esm.js";
|
|
34
34
|
import { t as emailMachine } from "./emailStateMachine-CfL8um8y.esm.js";
|
|
35
35
|
import { t as selfieMachine } from "./selfieStateMachine-DCwYz6V1.esm.js";
|
|
36
|
-
import { t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
36
|
+
import { t as idCaptureMachine } from "./idCaptureStateMachine-fkhBD0jR.esm.js";
|
|
37
37
|
import { t as phoneMachine } from "./phoneStateMachine-B0KqPCut.esm.js";
|
|
38
38
|
import { t as faceMatchMachine } from "./faceMatchStateMachine-o_4FAl-g.esm.js";
|
|
39
39
|
import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-BpsyjQ6x.esm.js";
|
|
@@ -260,7 +260,9 @@ const workflowMachine = setup({
|
|
|
260
260
|
errorCode: code
|
|
261
261
|
};
|
|
262
262
|
}),
|
|
263
|
-
setModuleError: assign(({ event }) => ({ error: String(event.error) }))
|
|
263
|
+
setModuleError: assign(({ event }) => ({ error: String(event.error) })),
|
|
264
|
+
setHomeContinueLoading: assign({ isHomeContinueLoading: true }),
|
|
265
|
+
clearHomeContinueLoading: assign({ isHomeContinueLoading: false })
|
|
264
266
|
},
|
|
265
267
|
guards: {
|
|
266
268
|
isModuleNode: ({ event }) => {
|
|
@@ -277,6 +279,13 @@ const workflowMachine = setup({
|
|
|
277
279
|
},
|
|
278
280
|
isCustomModule: ({ context }) => {
|
|
279
281
|
return context.currentNode?.moduleKey === "CUSTOM_MODULE";
|
|
282
|
+
},
|
|
283
|
+
shouldEnterHome: ({ event }) => {
|
|
284
|
+
const result = event.output;
|
|
285
|
+
if (!result || result.currentNode.nodeType !== "MODULE") return false;
|
|
286
|
+
if (result.workflowConfig.disableLaunchScreen === true) return false;
|
|
287
|
+
if (result.currentNode.moduleKey === "REDIRECT_TO_MOBILE") return false;
|
|
288
|
+
return true;
|
|
280
289
|
}
|
|
281
290
|
}
|
|
282
291
|
}).createMachine({
|
|
@@ -295,6 +304,7 @@ const workflowMachine = setup({
|
|
|
295
304
|
interviewId: input.interviewId ?? "",
|
|
296
305
|
isDesktop: input.isDesktop ?? true,
|
|
297
306
|
isInjectedNode: false,
|
|
307
|
+
isHomeContinueLoading: false,
|
|
298
308
|
getFinishStatus: input.getFinishStatus ?? getFinishStatus
|
|
299
309
|
}),
|
|
300
310
|
states: {
|
|
@@ -304,6 +314,11 @@ const workflowMachine = setup({
|
|
|
304
314
|
src: "loadWorkflow",
|
|
305
315
|
input: ({ context }) => ({ isDesktop: context.isDesktop }),
|
|
306
316
|
onDone: [
|
|
317
|
+
{
|
|
318
|
+
target: "home",
|
|
319
|
+
guard: "shouldEnterHome",
|
|
320
|
+
actions: "setLoadingResult"
|
|
321
|
+
},
|
|
307
322
|
{
|
|
308
323
|
target: "resolvingModule",
|
|
309
324
|
guard: "isModuleNode",
|
|
@@ -325,6 +340,10 @@ const workflowMachine = setup({
|
|
|
325
340
|
actions: "setError"
|
|
326
341
|
}
|
|
327
342
|
} },
|
|
343
|
+
home: { on: { HOME_CONTINUE: {
|
|
344
|
+
target: "resolvingModule",
|
|
345
|
+
actions: "setHomeContinueLoading"
|
|
346
|
+
} } },
|
|
328
347
|
resolvingModule: {
|
|
329
348
|
always: [{
|
|
330
349
|
target: "handlingCustomModule",
|
|
@@ -348,6 +367,7 @@ const workflowMachine = setup({
|
|
|
348
367
|
}
|
|
349
368
|
},
|
|
350
369
|
runningModule: {
|
|
370
|
+
entry: "clearHomeContinueLoading",
|
|
351
371
|
invoke: {
|
|
352
372
|
id: "currentModule",
|
|
353
373
|
src: "runChildModule",
|
|
@@ -529,9 +549,19 @@ const DEFAULT_MODULES = {
|
|
|
529
549
|
ID_CAPTURE: idCaptureMachine,
|
|
530
550
|
REDIRECT_TO_MOBILE: redirectToMobileMachine
|
|
531
551
|
};
|
|
552
|
+
function deriveHomeScreen(snapshot) {
|
|
553
|
+
return {
|
|
554
|
+
visible: snapshot.matches("home"),
|
|
555
|
+
isContinueLoading: snapshot.context.isHomeContinueLoading
|
|
556
|
+
};
|
|
557
|
+
}
|
|
532
558
|
function mapState(snapshot) {
|
|
533
559
|
const { context } = snapshot;
|
|
534
|
-
|
|
560
|
+
const homeScreen = deriveHomeScreen(snapshot);
|
|
561
|
+
if (snapshot.matches("idle")) return {
|
|
562
|
+
status: "idle",
|
|
563
|
+
homeScreen
|
|
564
|
+
};
|
|
535
565
|
if (snapshot.matches("runningModule")) {
|
|
536
566
|
const childSnapshot = snapshot.children.currentModule?.getSnapshot();
|
|
537
567
|
return {
|
|
@@ -542,7 +572,8 @@ function mapState(snapshot) {
|
|
|
542
572
|
...context.currentNode?.moduleConfiguration,
|
|
543
573
|
ds: context.workflowConfig?.ds
|
|
544
574
|
},
|
|
545
|
-
moduleState: childSnapshot ?? null
|
|
575
|
+
moduleState: childSnapshot ?? null,
|
|
576
|
+
homeScreen
|
|
546
577
|
};
|
|
547
578
|
}
|
|
548
579
|
if (snapshot.matches("finished")) return {
|
|
@@ -565,7 +596,10 @@ function mapState(snapshot) {
|
|
|
565
596
|
error: context.error ?? "Unknown error",
|
|
566
597
|
errorCode: context.errorCode
|
|
567
598
|
};
|
|
568
|
-
return {
|
|
599
|
+
return {
|
|
600
|
+
status: "loading",
|
|
601
|
+
homeScreen
|
|
602
|
+
};
|
|
569
603
|
}
|
|
570
604
|
function createApi({ actor, getSnapshot, trackElementClicked }) {
|
|
571
605
|
return {
|
|
@@ -586,6 +620,10 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
|
|
|
586
620
|
error
|
|
587
621
|
});
|
|
588
622
|
},
|
|
623
|
+
continueFromHome() {
|
|
624
|
+
trackElementClicked?.("homeContinue");
|
|
625
|
+
actor.send({ type: "HOME_CONTINUE" });
|
|
626
|
+
},
|
|
589
627
|
getModuleConfig() {
|
|
590
628
|
const snapshot = getSnapshot();
|
|
591
629
|
if (snapshot.value !== "runningModule") return void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-20260508-
|
|
3
|
+
"version": "0.0.0-dev-20260508-9f627e9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -224,8 +224,8 @@
|
|
|
224
224
|
"tsdown": "^0.16.6",
|
|
225
225
|
"typescript": "^5.9.3",
|
|
226
226
|
"vitest": "^4.0.13",
|
|
227
|
-
"@incodetech/
|
|
228
|
-
"@incodetech/
|
|
227
|
+
"@incodetech/config": "1.0.0",
|
|
228
|
+
"@incodetech/infra": "1.0.0"
|
|
229
229
|
},
|
|
230
230
|
"scripts": {
|
|
231
231
|
"build": "tsdown -c tsdown.config.ts",
|