@incodetech/core 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/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
- package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
- package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
- package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
- package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
- package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
- package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
- package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-CiEN7Gjn.esm.js} +183 -11
- package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
- package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +6 -5
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +6 -43
- package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
- package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
- package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
- package/dist/apiError-B-j-gyDx.esm.js +51 -0
- package/dist/authentication.d.ts +13 -11
- package/dist/authentication.esm.js +26 -22
- package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CIVY80H9.d.ts} +4 -4
- package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-ZNotsWnC.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DksVbF_H.esm.js} +21 -9
- package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
- package/dist/{session-CrkWAs-q.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
- package/dist/camera.d.ts +4 -3
- package/dist/camera.esm.js +4 -3
- package/dist/canvas-SKcRBxsk.esm.js +230 -0
- package/dist/consent.d.ts +4 -398
- package/dist/consent.esm.js +6 -77
- package/dist/consentManager-BLd51QiW.d.ts +419 -0
- package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
- package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
- package/dist/cpf-ocr.d.ts +4 -199
- package/dist/cpf-ocr.esm.js +8 -177
- package/dist/cpfOcrManager-BnieFXuG.d.ts +216 -0
- package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +8 -158
- package/dist/curp-validation.esm.js +6 -108
- package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
- package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
- package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +4 -4
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -41
- package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
- package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-65k1Appi.esm.js} +19 -10
- package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-B7ShOkWL.d.ts} +8 -160
- package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
- package/dist/device.esm.js +4 -3
- package/dist/document-capture.d.ts +995 -86
- package/dist/document-capture.esm.js +34 -8
- package/dist/document-upload.d.ts +47 -47
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-WYV1r9le.esm.js} +90 -6
- package/dist/dynamic-forms.d.ts +20 -5
- package/dist/dynamic-forms.esm.js +150 -61
- package/dist/ekyb.d.ts +32 -13
- package/dist/ekyb.esm.js +25 -15
- package/dist/{ekybStateMachine-CyMx_kg-.esm.js → ekybStateMachine-aYixw2sL.esm.js} +319 -207
- package/dist/ekyc.d.ts +10 -78
- package/dist/ekyc.esm.js +17 -12
- package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +5 -4
- package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
- package/dist/email.d.ts +4 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
- package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
- package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
- package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
- package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +32 -16
- package/dist/extensibility.esm.js +55 -33
- package/dist/face-match.d.ts +32 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-C_hRHx8a.d.ts} +35 -11
- package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-kqbUqtrr.esm.js} +21 -5
- package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-CtvHWd3x.esm.js} +68 -183
- package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DdGXUBnx.esm.js} +60 -6
- package/dist/field-comparison.d.ts +4 -0
- package/dist/field-comparison.esm.js +7 -0
- package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
- package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
- package/dist/fiscal-qr.d.ts +59 -0
- package/dist/fiscal-qr.esm.js +323 -0
- package/dist/flow-events.d.ts +6 -5
- package/dist/flow.d.ts +23 -15
- package/dist/flow.esm.js +63 -17
- package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
- package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
- package/dist/{flowServices-PiNsxLfK.esm.js → flowServices-BTuHLHVr.esm.js} +10 -5
- package/dist/geolocation.d.ts +4 -4
- package/dist/geolocation.esm.js +6 -6
- package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
- package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
- package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
- package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
- package/dist/government-validation.d.ts +28 -8
- package/dist/government-validation.esm.js +19 -8
- package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
- package/dist/home.d.ts +15 -14
- package/dist/home.esm.js +2 -2
- package/dist/http-Cai3IoLS.esm.js +0 -0
- package/dist/http.esm.js +1 -0
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +5 -5
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +4 -4
- package/dist/id.d.ts +12 -10
- package/dist/id.esm.js +36 -26
- package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-D-QYESvF.d.ts} +28 -14
- package/dist/{idCaptureManager-D0ktk7Hh.esm.js → idCaptureManager-DGVv5l1_.esm.js} +22 -7
- package/dist/{idCaptureStateMachine-dwlBUjbC.esm.js → idCaptureStateMachine-DHi7HydI.esm.js} +172 -123
- package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
- package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
- package/dist/identity-reuse.d.ts +4 -530
- package/dist/identity-reuse.esm.js +8 -274
- package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
- package/dist/identityReuseManager-DwLtVzUn.d.ts +428 -0
- package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
- package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
- package/dist/{index-ChHWNH48.d.ts → index-B9NysVDB.d.ts} +469 -195
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10 -8
- package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
- package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +8 -412
- package/dist/mandatory-consent.esm.js +6 -76
- package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
- package/dist/mandatoryConsentManager-KfIlURRY.d.ts +429 -0
- package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
- package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
- package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
- package/dist/otp-CGMdUzBC.esm.js +33 -0
- package/dist/otp-DF5A0sFx.d.ts +8 -0
- package/dist/permissionGuards-C1ispV96.esm.js +23 -0
- package/dist/permissionServices-CG3bMSfG.esm.js +130 -0
- package/dist/phone.d.ts +4 -3
- package/dist/phone.esm.js +6 -5
- package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
- package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
- package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
- package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +6 -5
- package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-Bn9EdCmz.esm.js} +197 -179
- package/dist/redirect-to-mobile.d.ts +6 -104
- package/dist/redirect-to-mobile.esm.js +6 -99
- package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
- package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
- package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
- package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
- package/dist/selfie.d.ts +13 -11
- package/dist/selfie.esm.js +27 -23
- package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BjCoKRy0.esm.js} +6 -6
- package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-dUbKRzOh.d.ts} +4 -4
- package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-b4F2q9zw.esm.js} +5 -3
- package/dist/session-DoVb-OcB.esm.js +152 -0
- package/dist/session.d.ts +37 -5
- package/dist/session.esm.js +12 -7
- package/dist/sessionInitializer-B8H5MsXM.esm.js +366 -0
- package/dist/{setup-C5AITV8m.d.ts → setup-BbkprdVv.d.ts} +57 -6
- package/dist/{setup-DPPAxmXf.esm.js → setup-BqEfrdja.esm.js} +162 -24
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
- package/dist/stats-BMNUG1AU.esm.js +41 -0
- package/dist/stats.d.ts +13 -2
- package/dist/stats.esm.js +3 -2
- package/dist/trust-graph.d.ts +33 -4
- package/dist/trust-graph.esm.js +21 -15
- package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
- package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
- package/dist/types-DsnEVMhr.esm.js +34 -0
- package/dist/types-DvGZI7BF.d.ts +131 -0
- package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
- package/dist/types-ya0LN_MX.d.ts +5 -0
- package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
- package/dist/wasm.d.ts +6 -4
- package/dist/wasm.esm.js +11 -9
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +5 -73
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -41
- package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
- package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
- package/dist/workflow.d.ts +150 -97
- package/dist/workflow.esm.js +156 -80
- package/package.json +19 -1
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
- /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
- /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
- /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
- /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
- /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
- /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
- /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
- /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import "./WasmUtilProvider-CiEN7Gjn.esm.js";
|
|
1
2
|
import "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import "./endpoints-
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
3
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
|
|
4
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
5
|
+
import "./platform-SKvEfCBh.esm.js";
|
|
6
|
+
import { c as createManager, s as createActor } from "./xstate.esm-C9wncMQa.esm.js";
|
|
7
|
+
import "./MotionSensorProvider-Bx7Mpzt0.esm.js";
|
|
8
|
+
import "./permissionServices-CG3bMSfG.esm.js";
|
|
9
|
+
import "./camera-DJWm3V4g.esm.js";
|
|
10
|
+
import "./ITimerCapability-CB0I1Uf2.esm.js";
|
|
11
|
+
import "./backCameraStream-D7Wo4Nbx.esm.js";
|
|
12
|
+
import "./permissionGuards-C1ispV96.esm.js";
|
|
13
|
+
import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-WYV1r9le.esm.js";
|
|
10
14
|
|
|
11
15
|
//#region src/modules/document-capture/documentCaptureActor.ts
|
|
12
16
|
function createDocumentCaptureActor(options) {
|
|
@@ -15,6 +19,12 @@ function createDocumentCaptureActor(options) {
|
|
|
15
19
|
|
|
16
20
|
//#endregion
|
|
17
21
|
//#region src/modules/document-capture/documentCaptureManager.ts
|
|
22
|
+
function getPermissionStatus(snapshot) {
|
|
23
|
+
if (snapshot.matches({ permissions: "learnMore" })) return "learnMore";
|
|
24
|
+
if (snapshot.matches({ permissions: "requesting" })) return "requesting";
|
|
25
|
+
if (snapshot.matches({ permissions: "denied" })) return "denied";
|
|
26
|
+
return "idle";
|
|
27
|
+
}
|
|
18
28
|
function mapState(snapshot) {
|
|
19
29
|
const typedSnapshot = snapshot;
|
|
20
30
|
const { context } = typedSnapshot;
|
|
@@ -30,6 +40,10 @@ function mapState(snapshot) {
|
|
|
30
40
|
pageNumber: context.pageNumber
|
|
31
41
|
};
|
|
32
42
|
}
|
|
43
|
+
if (typedSnapshot.matches("permissions")) return {
|
|
44
|
+
status: "permissions",
|
|
45
|
+
permissionStatus: getPermissionStatus(typedSnapshot)
|
|
46
|
+
};
|
|
33
47
|
if (typedSnapshot.matches("initCamera")) return { status: "initializingCamera" };
|
|
34
48
|
if (typedSnapshot.matches("capturing")) return {
|
|
35
49
|
status: "capturing",
|
|
@@ -124,6 +138,18 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
124
138
|
trackElementClicked?.("close");
|
|
125
139
|
actor.send({ type: "CLOSE" });
|
|
126
140
|
},
|
|
141
|
+
requestPermission() {
|
|
142
|
+
trackElementClicked?.("requestPermission");
|
|
143
|
+
actor.send({ type: "REQUEST_PERMISSION" });
|
|
144
|
+
},
|
|
145
|
+
goToLearnMore() {
|
|
146
|
+
trackElementClicked?.("goToLearnMore");
|
|
147
|
+
actor.send({ type: "GO_TO_LEARN_MORE" });
|
|
148
|
+
},
|
|
149
|
+
back() {
|
|
150
|
+
trackElementClicked?.("back");
|
|
151
|
+
actor.send({ type: "BACK" });
|
|
152
|
+
},
|
|
127
153
|
captureNextPageFromCamera() {
|
|
128
154
|
trackElementClicked?.("captureNextPageFromCamera");
|
|
129
155
|
actor.send({ type: "NEXT_PAGE_CAMERA" });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import "./camera-
|
|
4
|
-
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-
|
|
5
|
-
import * as
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import "./camera-SRBpPq2X.js";
|
|
4
|
+
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-Bj9hdFjU.js";
|
|
5
|
+
import * as xstate368 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate368.StateMachine<DocumentUploadContext, {
|
|
9
9
|
type: "START";
|
|
10
10
|
} | {
|
|
11
11
|
type: "CAPTURE";
|
|
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "CLOSE";
|
|
20
20
|
}, {
|
|
21
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate368.ActorRefFromLogic<xstate368.PromiseActorLogic<MediaStream, void, xstate368.EventObject>> | xstate368.ActorRefFromLogic<xstate368.PromiseActorLogic<void, {
|
|
22
22
|
imageBase64: string;
|
|
23
23
|
documentType: string;
|
|
24
24
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, xstate368.EventObject>> | undefined;
|
|
26
|
+
}, xstate368.Values<{
|
|
27
27
|
uploadDocument: {
|
|
28
28
|
src: "uploadDocument";
|
|
29
|
-
logic:
|
|
29
|
+
logic: xstate368.PromiseActorLogic<void, {
|
|
30
30
|
imageBase64: string;
|
|
31
31
|
documentType: string;
|
|
32
32
|
onProgress: (progress: number) => void;
|
|
33
|
-
},
|
|
33
|
+
}, xstate368.EventObject>;
|
|
34
34
|
id: string | undefined;
|
|
35
35
|
};
|
|
36
36
|
initCamera: {
|
|
37
37
|
src: "initCamera";
|
|
38
|
-
logic:
|
|
38
|
+
logic: xstate368.PromiseActorLogic<MediaStream, void, xstate368.EventObject>;
|
|
39
39
|
id: string | undefined;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
41
|
+
}>, xstate368.Values<{
|
|
42
42
|
setError: {
|
|
43
43
|
type: "setError";
|
|
44
|
-
params:
|
|
44
|
+
params: xstate368.NonReducibleUnknown;
|
|
45
45
|
};
|
|
46
46
|
clearError: {
|
|
47
47
|
type: "clearError";
|
|
48
|
-
params:
|
|
48
|
+
params: xstate368.NonReducibleUnknown;
|
|
49
49
|
};
|
|
50
50
|
setStream: {
|
|
51
51
|
type: "setStream";
|
|
52
|
-
params:
|
|
53
|
-
};
|
|
54
|
-
setImageAndClearError: {
|
|
55
|
-
type: "setImageAndClearError";
|
|
56
|
-
params: xstate618.NonReducibleUnknown;
|
|
52
|
+
params: xstate368.NonReducibleUnknown;
|
|
57
53
|
};
|
|
58
54
|
setProgress: {
|
|
59
55
|
type: "setProgress";
|
|
60
|
-
params:
|
|
56
|
+
params: xstate368.NonReducibleUnknown;
|
|
61
57
|
};
|
|
62
58
|
stopStream: {
|
|
63
59
|
type: "stopStream";
|
|
64
|
-
params:
|
|
60
|
+
params: xstate368.NonReducibleUnknown;
|
|
61
|
+
};
|
|
62
|
+
setImageAndClearError: {
|
|
63
|
+
type: "setImageAndClearError";
|
|
64
|
+
params: xstate368.NonReducibleUnknown;
|
|
65
65
|
};
|
|
66
|
-
}>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput,
|
|
66
|
+
}>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, xstate368.NonReducibleUnknown, xstate368.EventObject, xstate368.MetaObject, {
|
|
67
67
|
readonly id: "documentUpload";
|
|
68
68
|
readonly initial: "idle";
|
|
69
69
|
readonly context: ({
|
|
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
72
72
|
spawn: {
|
|
73
73
|
<TSrc extends "uploadDocument" | "initCamera">(logic: TSrc, ...[options]: ({
|
|
74
74
|
src: "uploadDocument";
|
|
75
|
-
logic:
|
|
75
|
+
logic: xstate368.PromiseActorLogic<void, {
|
|
76
76
|
imageBase64: string;
|
|
77
77
|
documentType: string;
|
|
78
78
|
onProgress: (progress: number) => void;
|
|
79
|
-
},
|
|
79
|
+
}, xstate368.EventObject>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
} extends infer T ? T extends {
|
|
82
82
|
src: "uploadDocument";
|
|
83
|
-
logic:
|
|
83
|
+
logic: xstate368.PromiseActorLogic<void, {
|
|
84
84
|
imageBase64: string;
|
|
85
85
|
documentType: string;
|
|
86
86
|
onProgress: (progress: number) => void;
|
|
87
|
-
},
|
|
87
|
+
}, xstate368.EventObject>;
|
|
88
88
|
id: string | undefined;
|
|
89
89
|
} ? T extends {
|
|
90
90
|
src: TSrc;
|
|
91
|
-
} ?
|
|
91
|
+
} ? xstate368.ConditionalRequired<[options?: ({
|
|
92
92
|
id?: T["id"] | undefined;
|
|
93
93
|
systemId?: string;
|
|
94
|
-
input?:
|
|
94
|
+
input?: xstate368.InputFrom<T["logic"]> | undefined;
|
|
95
95
|
syncSnapshot?: boolean;
|
|
96
|
-
} & { [K in
|
|
96
|
+
} & { [K in xstate368.RequiredActorOptions<T>]: unknown }) | undefined], xstate368.IsNotNever<xstate368.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
97
97
|
src: "initCamera";
|
|
98
|
-
logic:
|
|
98
|
+
logic: xstate368.PromiseActorLogic<MediaStream, void, xstate368.EventObject>;
|
|
99
99
|
id: string | undefined;
|
|
100
100
|
} extends infer T_1 ? T_1 extends {
|
|
101
101
|
src: "initCamera";
|
|
102
|
-
logic:
|
|
102
|
+
logic: xstate368.PromiseActorLogic<MediaStream, void, xstate368.EventObject>;
|
|
103
103
|
id: string | undefined;
|
|
104
104
|
} ? T_1 extends {
|
|
105
105
|
src: TSrc;
|
|
106
|
-
} ?
|
|
106
|
+
} ? xstate368.ConditionalRequired<[options?: ({
|
|
107
107
|
id?: T_1["id"] | undefined;
|
|
108
108
|
systemId?: string;
|
|
109
|
-
input?:
|
|
109
|
+
input?: xstate368.InputFrom<T_1["logic"]> | undefined;
|
|
110
110
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate368.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate368.IsNotNever<xstate368.RequiredActorOptions<T_1>>> : never : never : never)): xstate368.ActorRefFromLogic<xstate368.GetConcreteByKey<xstate368.Values<{
|
|
112
112
|
uploadDocument: {
|
|
113
113
|
src: "uploadDocument";
|
|
114
|
-
logic:
|
|
114
|
+
logic: xstate368.PromiseActorLogic<void, {
|
|
115
115
|
imageBase64: string;
|
|
116
116
|
documentType: string;
|
|
117
117
|
onProgress: (progress: number) => void;
|
|
118
|
-
},
|
|
118
|
+
}, xstate368.EventObject>;
|
|
119
119
|
id: string | undefined;
|
|
120
120
|
};
|
|
121
121
|
initCamera: {
|
|
122
122
|
src: "initCamera";
|
|
123
|
-
logic:
|
|
123
|
+
logic: xstate368.PromiseActorLogic<MediaStream, void, xstate368.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
};
|
|
126
126
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate368.AnyActorLogic>(src: TLogic, ...[options]: xstate368.ConditionalRequired<[options?: ({
|
|
128
128
|
id?: never;
|
|
129
129
|
systemId?: string;
|
|
130
|
-
input?:
|
|
130
|
+
input?: xstate368.InputFrom<TLogic> | undefined;
|
|
131
131
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate368.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate368.IsNotNever<xstate368.RequiredLogicInput<TLogic>>>): xstate368.ActorRefFromLogic<TLogic>;
|
|
133
133
|
};
|
|
134
134
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
135
|
+
self: xstate368.ActorRef<xstate368.MachineSnapshot<DocumentUploadContext, {
|
|
136
136
|
type: "START";
|
|
137
137
|
} | {
|
|
138
138
|
type: "CAPTURE";
|
|
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
144
144
|
type: "RETRY";
|
|
145
145
|
} | {
|
|
146
146
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate368.AnyActorRef | undefined>, xstate368.StateValue, string, unknown, any, any>, {
|
|
148
148
|
type: "START";
|
|
149
149
|
} | {
|
|
150
150
|
type: "CAPTURE";
|
|
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
156
156
|
type: "RETRY";
|
|
157
157
|
} | {
|
|
158
158
|
type: "CLOSE";
|
|
159
|
-
},
|
|
159
|
+
}, xstate368.AnyEventObject>;
|
|
160
160
|
}) => {
|
|
161
161
|
config: DocumentUploadConfig;
|
|
162
162
|
stream: undefined;
|
|
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "CLOSE";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate368.ActorRef<xstate368.MachineSnapshot<DocumentUploadContext, {
|
|
230
230
|
type: "START";
|
|
231
231
|
} | {
|
|
232
232
|
type: "CAPTURE";
|
|
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
238
238
|
type: "RETRY";
|
|
239
239
|
} | {
|
|
240
240
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate368.AnyActorRef>, xstate368.StateValue, string, unknown, any, any>, {
|
|
242
242
|
type: "START";
|
|
243
243
|
} | {
|
|
244
244
|
type: "CAPTURE";
|
|
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate618.StateMachine<DocumentUploadContex
|
|
|
250
250
|
type: "RETRY";
|
|
251
251
|
} | {
|
|
252
252
|
type: "CLOSE";
|
|
253
|
-
},
|
|
253
|
+
}, xstate368.AnyEventObject>;
|
|
254
254
|
}) => {
|
|
255
255
|
imageBase64: string;
|
|
256
256
|
documentType: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import { i as stopCameraStream } from "./camera-
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import "./platform-SKvEfCBh.esm.js";
|
|
5
|
+
import { a as fromPromise, c as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
6
|
+
import { i as stopCameraStream } from "./camera-DJWm3V4g.esm.js";
|
|
7
|
+
import "./ITimerCapability-CB0I1Uf2.esm.js";
|
|
8
|
+
import { n as getBackCameraStream } from "./backCameraStream-D7Wo4Nbx.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/document-upload/documentUploadServices.ts
|
|
11
11
|
async function uploadDocument({ imageBase64, documentType, onProgress, signal }) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
3
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
4
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-CG3bMSfG.esm.js";
|
|
5
|
+
import { i as stopCameraStream } from "./camera-DJWm3V4g.esm.js";
|
|
6
|
+
import { n as getBackCameraStream } from "./backCameraStream-D7Wo4Nbx.esm.js";
|
|
7
|
+
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-C1ispV96.esm.js";
|
|
6
8
|
|
|
7
9
|
//#region src/modules/document-capture/types.ts
|
|
8
10
|
const PROCESSING_TYPE_MAP = {
|
|
@@ -90,6 +92,12 @@ const documentCaptureMachine = setup({
|
|
|
90
92
|
input: {}
|
|
91
93
|
},
|
|
92
94
|
actors: {
|
|
95
|
+
checkPermission: fromPromise(async () => {
|
|
96
|
+
return checkPermission();
|
|
97
|
+
}),
|
|
98
|
+
requestPermission: fromPromise(async ({ input }) => {
|
|
99
|
+
return invokeRequestPermissionActor(input);
|
|
100
|
+
}),
|
|
93
101
|
initCamera: fromPromise(async () => {
|
|
94
102
|
const { stream } = await getBackCameraStream(void 0);
|
|
95
103
|
return stream;
|
|
@@ -171,6 +179,11 @@ const documentCaptureMachine = setup({
|
|
|
171
179
|
canRetry: ({ context }) => context.attemptsRemaining > 0,
|
|
172
180
|
attemptsExhausted: ({ context }) => context.attemptsRemaining <= 0,
|
|
173
181
|
isCameraMode: ({ context }) => context.config.captureMode === "camera",
|
|
182
|
+
isCameraPermissionGranted: ({ context, event }) => {
|
|
183
|
+
const output = event.output;
|
|
184
|
+
return isReadyForCaptureFromPermission(resolveStoredPermissionResult(output, context.permissionResult), false);
|
|
185
|
+
},
|
|
186
|
+
isCameraPermissionDenied: ({ event }) => event.output === "denied",
|
|
174
187
|
isCaptureMethodCamera: ({ context }) => context.captureMethod === "camera",
|
|
175
188
|
isCaptureMethodGallery: ({ context }) => context.captureMethod === "gallery",
|
|
176
189
|
isCaptureMethodFile: ({ context }) => context.captureMethod === "file",
|
|
@@ -203,6 +216,7 @@ const documentCaptureMachine = setup({
|
|
|
203
216
|
step2Text
|
|
204
217
|
},
|
|
205
218
|
stream: void 0,
|
|
219
|
+
permissionResult: void 0,
|
|
206
220
|
capturedDocument: void 0,
|
|
207
221
|
captureMethod: void 0,
|
|
208
222
|
progress: 0,
|
|
@@ -215,7 +229,7 @@ const documentCaptureMachine = setup({
|
|
|
215
229
|
states: {
|
|
216
230
|
tutorial: { on: {
|
|
217
231
|
CAPTURE: [{
|
|
218
|
-
target: "
|
|
232
|
+
target: "permissions",
|
|
219
233
|
guard: "isCameraMode"
|
|
220
234
|
}, { target: "capturing" }],
|
|
221
235
|
FILE_SELECTED: [{
|
|
@@ -232,6 +246,76 @@ const documentCaptureMachine = setup({
|
|
|
232
246
|
},
|
|
233
247
|
CLOSE: { target: "closed" }
|
|
234
248
|
} },
|
|
249
|
+
permissions: {
|
|
250
|
+
initial: "idle",
|
|
251
|
+
states: {
|
|
252
|
+
idle: {
|
|
253
|
+
invoke: {
|
|
254
|
+
id: "checkPermissionIdle",
|
|
255
|
+
src: "checkPermission",
|
|
256
|
+
onDone: [
|
|
257
|
+
{
|
|
258
|
+
target: "#documentCapture.initCamera",
|
|
259
|
+
guard: "isCameraPermissionGranted",
|
|
260
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
target: "denied",
|
|
264
|
+
guard: "isCameraPermissionDenied",
|
|
265
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
target: "waitingForUser",
|
|
269
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
onError: {
|
|
273
|
+
target: "waitingForUser",
|
|
274
|
+
actions: assign({ permissionResult: () => "prompt" })
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
on: {
|
|
278
|
+
REQUEST_PERMISSION: "requesting",
|
|
279
|
+
GO_TO_LEARN_MORE: "learnMore"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
waitingForUser: { on: {
|
|
283
|
+
REQUEST_PERMISSION: "requesting",
|
|
284
|
+
GO_TO_LEARN_MORE: "learnMore"
|
|
285
|
+
} },
|
|
286
|
+
learnMore: { on: {
|
|
287
|
+
BACK: "idle",
|
|
288
|
+
REQUEST_PERMISSION: "requesting"
|
|
289
|
+
} },
|
|
290
|
+
requesting: { invoke: {
|
|
291
|
+
id: "requestPermission",
|
|
292
|
+
src: "requestPermission",
|
|
293
|
+
input: ({ context }) => ({
|
|
294
|
+
permissionResult: context.permissionResult === "refresh" ? void 0 : context.permissionResult,
|
|
295
|
+
requestMotionPermission: false
|
|
296
|
+
}),
|
|
297
|
+
onDone: [
|
|
298
|
+
{
|
|
299
|
+
target: "#documentCapture.initCamera",
|
|
300
|
+
guard: "isCameraPermissionGranted",
|
|
301
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
target: "denied",
|
|
305
|
+
guard: "isCameraPermissionDenied",
|
|
306
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
target: "waitingForUser",
|
|
310
|
+
actions: assign({ permissionResult: ({ event }) => event.output })
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
onError: { target: "denied" }
|
|
314
|
+
} },
|
|
315
|
+
denied: { entry: assign({ permissionResult: () => "refresh" }) }
|
|
316
|
+
},
|
|
317
|
+
on: { CLOSE: { target: "closed" } }
|
|
318
|
+
},
|
|
235
319
|
initCamera: {
|
|
236
320
|
invoke: {
|
|
237
321
|
id: "initCamera",
|
|
@@ -344,7 +428,7 @@ const documentCaptureMachine = setup({
|
|
|
344
428
|
} },
|
|
345
429
|
nextPage: { on: {
|
|
346
430
|
NEXT_PAGE_CAMERA: {
|
|
347
|
-
target: "
|
|
431
|
+
target: "permissions",
|
|
348
432
|
actions: ["clearForNextPage", "setCaptureMethodCamera"]
|
|
349
433
|
},
|
|
350
434
|
NEXT_PAGE_PHOTO_LIBRARY: {
|
package/dist/dynamic-forms.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/dynamic-forms/types.d.ts
|
|
5
5
|
|
|
@@ -42,6 +42,10 @@ type DynamicFormsConfig = {
|
|
|
42
42
|
screens?: Screen[];
|
|
43
43
|
};
|
|
44
44
|
//#endregion
|
|
45
|
+
//#region src/modules/dynamic-forms/dynamicFormsFields.d.ts
|
|
46
|
+
/** Map of `questionId` → currently-displayed i18n error key. */
|
|
47
|
+
type DynamicFormsValidationErrors = Partial<Record<string, string>>;
|
|
48
|
+
//#endregion
|
|
45
49
|
//#region src/modules/dynamic-forms/dynamicFormsStateMachine.d.ts
|
|
46
50
|
/** Whether the form completed normally or was skipped due to a screen-loading failure. */
|
|
47
51
|
type DynamicFormsResult = 'completed' | 'skipped';
|
|
@@ -68,7 +72,8 @@ type DynamicFormsLoadingState = {
|
|
|
68
72
|
* @property totalScreens - Total number of screens in the form
|
|
69
73
|
* @property answers - Current answer values keyed by questionId
|
|
70
74
|
* @property answerValidity - Per-question format validity reported via `setAnswerValidity` (phone, email, CPF, etc.)
|
|
71
|
-
* @property
|
|
75
|
+
* @property validationErrors - Errors currently surfaced to the user, keyed by questionId. Entries appear on blur or submit, clear on type. Render as-is — no further UI-side gating.
|
|
76
|
+
* @property canSubmit - True when no validation errors are currently displayed. Optimistic semantic: enabled on initial empty form; disables only after a submit attempt populates errors.
|
|
72
77
|
*/
|
|
73
78
|
type DynamicFormsInputtingState = {
|
|
74
79
|
status: 'inputting';
|
|
@@ -77,6 +82,7 @@ type DynamicFormsInputtingState = {
|
|
|
77
82
|
totalScreens: number;
|
|
78
83
|
answers: Record<string, string>;
|
|
79
84
|
answerValidity: Record<string, boolean>;
|
|
85
|
+
validationErrors?: DynamicFormsValidationErrors;
|
|
80
86
|
canSubmit: boolean;
|
|
81
87
|
};
|
|
82
88
|
/**
|
|
@@ -96,6 +102,7 @@ type DynamicFormsSubmittingState = {
|
|
|
96
102
|
currentScreen: Screen;
|
|
97
103
|
answers: Record<string, string>;
|
|
98
104
|
answerValidity: Record<string, boolean>;
|
|
105
|
+
validationErrors?: DynamicFormsValidationErrors;
|
|
99
106
|
};
|
|
100
107
|
/**
|
|
101
108
|
* All screens submitted — success screen visible for ~3 s before
|
|
@@ -154,12 +161,20 @@ declare function createDynamicFormsManager(options: CreateDynamicFormsActorOptio
|
|
|
154
161
|
/**
|
|
155
162
|
* Reports the format validity of a question's current value.
|
|
156
163
|
* Used for fields with format constraints (PHONE, EMAIL, CPF).
|
|
157
|
-
*
|
|
164
|
+
* A `false` entry feeds into the `formatViaAnswerValidity` validation rule
|
|
165
|
+
* and surfaces as a `validationErrors[questionId]` entry once validated.
|
|
158
166
|
*
|
|
159
167
|
* @param questionId - The question ID from the screen definition
|
|
160
168
|
* @param isValid - Whether the current value passes format validation
|
|
161
169
|
*/
|
|
162
170
|
setAnswerValidity(questionId: string, isValid: boolean): void;
|
|
171
|
+
/**
|
|
172
|
+
* Triggers validation for a single field (e.g., on blur).
|
|
173
|
+
* Populates or clears `validationErrors[questionId]` accordingly.
|
|
174
|
+
*
|
|
175
|
+
* @param questionId - The question ID from the screen definition
|
|
176
|
+
*/
|
|
177
|
+
validateField(questionId: string): void;
|
|
163
178
|
/**
|
|
164
179
|
* Submits the current screen's answers.
|
|
165
180
|
* Transitions to 'submitting', then advances to the next screen or 'finished'.
|
|
@@ -175,4 +190,4 @@ declare function createDynamicFormsManager(options: CreateDynamicFormsActorOptio
|
|
|
175
190
|
/** Type representing a dynamic forms manager instance. */
|
|
176
191
|
type DynamicFormsManager = ReturnType<typeof createDynamicFormsManager>;
|
|
177
192
|
//#endregion
|
|
178
|
-
export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
|
|
193
|
+
export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type DynamicFormsValidationErrors, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
|