@incodetech/core 0.0.0-dev-20260318-aab03c7 → 0.0.0-dev-20260318-ce9c1ed
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.
|
@@ -225,6 +225,10 @@ declare const documentCaptureMachine: xstate63.StateMachine<DocumentCaptureConte
|
|
|
225
225
|
type: "isCameraMode";
|
|
226
226
|
params: unknown;
|
|
227
227
|
};
|
|
228
|
+
isCaptureMethodFile: {
|
|
229
|
+
type: "isCaptureMethodFile";
|
|
230
|
+
params: unknown;
|
|
231
|
+
};
|
|
228
232
|
isPendingNextPage: {
|
|
229
233
|
type: "isPendingNextPage";
|
|
230
234
|
params: unknown;
|
|
@@ -436,10 +440,14 @@ declare const documentCaptureMachine: xstate63.StateMachine<DocumentCaptureConte
|
|
|
436
440
|
readonly target: "uploading";
|
|
437
441
|
readonly actions: "resetProgress";
|
|
438
442
|
};
|
|
439
|
-
readonly RETAKE: {
|
|
443
|
+
readonly RETAKE: readonly [{
|
|
444
|
+
readonly target: "tutorial";
|
|
445
|
+
readonly guard: "isCaptureMethodFile";
|
|
446
|
+
readonly actions: "clearCapturedDocument";
|
|
447
|
+
}, {
|
|
440
448
|
readonly target: "capturing";
|
|
441
449
|
readonly actions: "clearCapturedDocument";
|
|
442
|
-
};
|
|
450
|
+
}];
|
|
443
451
|
readonly CLOSE: {
|
|
444
452
|
readonly target: "closed";
|
|
445
453
|
readonly actions: "stopStream";
|
|
@@ -147,6 +147,7 @@ const documentCaptureMachine = setup({
|
|
|
147
147
|
canRetryFile: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod !== "camera",
|
|
148
148
|
attemptsExhausted: ({ context }) => context.attemptsRemaining <= 0,
|
|
149
149
|
isCameraMode: ({ context }) => context.config.captureMode === "camera",
|
|
150
|
+
isCaptureMethodFile: ({ context }) => context.captureMethod !== "camera",
|
|
150
151
|
isPendingNextPage: ({ context }) => context.pendingNextPage
|
|
151
152
|
}
|
|
152
153
|
}).createMachine({
|
|
@@ -240,10 +241,14 @@ const documentCaptureMachine = setup({
|
|
|
240
241
|
target: "uploading",
|
|
241
242
|
actions: "resetProgress"
|
|
242
243
|
},
|
|
243
|
-
RETAKE: {
|
|
244
|
+
RETAKE: [{
|
|
245
|
+
target: "tutorial",
|
|
246
|
+
guard: "isCaptureMethodFile",
|
|
247
|
+
actions: "clearCapturedDocument"
|
|
248
|
+
}, {
|
|
244
249
|
target: "capturing",
|
|
245
250
|
actions: "clearCapturedDocument"
|
|
246
|
-
},
|
|
251
|
+
}],
|
|
247
252
|
CLOSE: {
|
|
248
253
|
target: "closed",
|
|
249
254
|
actions: "stopStream"
|