@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.3
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/3dAvatarProvider-ChciZmjE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -25
- package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
- package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
- package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
- package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
- package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
- package/dist/{Manager-B2OEDYqf.d.ts → Manager-CJ3G2zqi.d.ts} +1 -4
- package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
- package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
- package/dist/StateMachine-C_AY4cs7.d.ts +2 -0
- package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
- package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
- package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
- package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +10 -9
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +7 -6
- package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-BKdQoMFf.esm.js} +4 -3
- package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
- package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -12
- package/dist/authentication.esm.js +33 -27
- package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-CdPbNS2H.d.ts} +3 -3
- package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-Dtl1vcET.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +8 -8
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
- package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-qLKs75Qp.esm.js} +1 -1
- package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
- package/dist/camera-DUkgmYMo.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +31 -30
- package/dist/certificate-issuance.esm.js +8 -7
- package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-C07m7qtP.esm.js} +4 -4
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +7 -6
- package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-BtnPZUW4.esm.js} +4 -3
- package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-DufVo9D9.d.ts} +52 -52
- package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +7 -6
- package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
- package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
- package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
- package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +6 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +7 -6
- package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-BafobPXC.esm.js} +4 -3
- package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-Co6LZAHT.d.ts} +3 -3
- package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
- package/dist/custom-fields.d.ts +3 -2
- package/dist/custom-fields.esm.js +6 -5
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +6 -5
- package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
- package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
- package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
- package/dist/deepsightService-CMB9XjES.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +175 -174
- package/dist/document-capture.esm.js +14 -13
- package/dist/document-upload.d.ts +48 -47
- package/dist/document-upload.esm.js +9 -8
- package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +8 -160
- package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
- package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
- package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BXHcaocI.esm.js} +4 -4
- package/dist/ekyb.d.ts +9 -6
- package/dist/ekyb.esm.js +20 -17
- package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +9 -8
- package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +9 -8
- package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +50 -87
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +9 -8
- package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-B_XzEsXH.esm.js} +5 -4
- package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-fHASH6uo.d.ts} +3 -3
- package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
- package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-BzMJFAPV.esm.js} +13 -0
- package/dist/{events-DN-u67gb.esm.js → events-CqGY1yMq.esm.js} +2 -188
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +3 -2
- package/dist/extensibility.d.ts +37 -26
- package/dist/extensibility.esm.js +74 -59
- package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-CyhBfD-n.esm.js} +1 -1
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +6 -5
- package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +25 -16
- package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
- package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +6 -5
- package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
- package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +13 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +21 -13
- package/dist/flow.esm.js +28 -19
- package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-BIqSTZcd.d.ts} +2 -1
- package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js} +3 -3
- package/dist/{flowServices-ar5DXv71.esm.js → flowServices-C4piblgx.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -127
- package/dist/geolocation.esm.js +8 -115
- package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
- package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
- package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
- package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
- package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +8 -7
- package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +4 -3
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +8 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +6 -5
- package/dist/id.d.ts +16 -11
- package/dist/id.esm.js +39 -32
- package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
- package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-BVdvfJys.d.ts} +40 -10
- package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +14 -11
- package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +395 -382
- package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
- package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
- package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +7 -6
- package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
- package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
- package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
- package/dist/{index-BgxYUYuD.d.ts → index-DtUlD-bz.d.ts} +2 -2
- package/dist/{index-DV134v62.d.ts → index-Icld-cKW.d.ts} +175 -295
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +16 -13
- package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
- package/dist/{lib-7ZQ9BdKH.esm.js → lib-B050WTth.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +7 -6
- package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
- package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
- package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
- package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
- package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
- package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
- package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
- package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
- package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
- package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1494 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +9 -8
- package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-BOTcjXgs.d.ts} +3 -3
- package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-BWlxqbyD.esm.js} +5 -4
- package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
- package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +10 -9
- package/dist/recordingService-m_1xCthr.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +9 -8
- package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
- package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +10 -12
- package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-0nQfjVVo.esm.js} +3 -3
- package/dist/selfie.d.ts +19 -12
- package/dist/selfie.esm.js +34 -28
- package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-D_ZFERsE.esm.js} +6 -6
- package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-R0Jw5sjb.d.ts} +3 -3
- package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
- package/dist/{session-Be_IA1e0.esm.js → session-9jIfKFCc.esm.js} +3 -3
- package/dist/session.d.ts +7 -5
- package/dist/session.esm.js +16 -14
- package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-C_TYIgyk.esm.js} +11 -107
- package/dist/{setup-BJZAkajt.d.ts → setup-CpRnXxn8.d.ts} +16 -3
- package/dist/setup-DHc6OaHm.esm.js +562 -0
- package/dist/signature.d.ts +3 -2
- package/dist/signature.esm.js +6 -5
- package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-DtoiPzys.esm.js} +3 -3
- package/dist/{stats-DntyIiGr.esm.js → stats-CYcScXcO.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
- package/dist/{tri-CtxWthxz.esm.js → tri-BG1iJsr4.esm.js} +12 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-DUC01NgO.esm.js} +27 -23
- package/dist/tri.esm.js +2 -2
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +4 -3
- package/dist/{types-DpTWgfKY.d.ts → types-BklZ_Wne.d.ts} +1 -1
- package/dist/{types-Dv-9WPJX.d.ts → types-BsYXnC5s.d.ts} +39 -3
- package/dist/types-CxW2e0Ar.d.ts +132 -0
- package/dist/{types-Z9wv19v2.d.ts → types-DgGlgyZT.d.ts} +1 -1
- package/dist/types-ElOJAGaM.esm.js +189 -0
- package/dist/video-C2WIj6TS.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1509 -0
- package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
- package/dist/{warmup--6HA3yUR.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -4
- package/dist/wasm.esm.js +17 -14
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +6 -5
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +6 -5
- package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
- package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
- package/dist/workflow.d.ts +230 -98
- package/dist/workflow.esm.js +123 -79
- package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-Bomq1a0z.esm.js} +41 -1
- package/package.json +16 -1
- package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
- package/dist/camera-x4LjGTjZ.esm.js +0 -22
- package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
- package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
- package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
- package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
- package/dist/setup-C7tintPc.esm.js +0 -1064
- /package/dist/{Actor-fIPLXfoi.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
- /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
- /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
- /package/dist/{camera-biGPWlmx.d.ts → camera-CNVUo-bC.d.ts} +0 -0
- /package/dist/{canvas-7uX2izHb.esm.js → canvas-_I95hkPg.esm.js} +0 -0
- /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-xBg-DFNn.esm.js → cpf-BKaho0j_.esm.js} +0 -0
- /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
- /package/dist/{http-CfVTgMfU.esm.js → http-BkiUT7EB.esm.js} +0 -0
- /package/dist/{index-52_qi4bd.d.ts → index-XTtxaahe.d.ts} +0 -0
- /package/dist/{otp-D87RTwrx.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
- /package/dist/{otp-BHJnjEEc.d.ts → otp-M4iy57XY.d.ts} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-uIVQUnJP.esm.js} +0 -0
- /package/dist/{types-BdVOWGGW.esm.js → types-CMcxlSmH.esm.js} +0 -0
- /package/dist/{types-DYZja-k9.d.ts → types-D_IceWxT.d.ts} +0 -0
- /package/dist/{types-F0IXbaCB.d.ts → types-Duy2rDxF.d.ts} +0 -0
- /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-BZqFU9rR.esm.js} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import "./WasmUtilProvider-
|
|
2
|
-
import "./api-
|
|
3
|
-
import { n as
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import
|
|
1
|
+
import "./WasmUtilProvider-ADG54T6M.esm.js";
|
|
2
|
+
import "./api-DsbUi7TO.esm.js";
|
|
3
|
+
import { n as createManagerInstrumentation, t as topLevelStateName } from "./events-CqGY1yMq.esm.js";
|
|
4
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
5
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
6
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
7
|
+
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
8
|
+
import "./MotionSensorProvider-DCbId4De.esm.js";
|
|
9
|
+
import "./permissionServices-BJhGL13R.esm.js";
|
|
10
|
+
import "./camera-DUkgmYMo.esm.js";
|
|
11
|
+
import "./ITimerCapability-pltuG1E8.esm.js";
|
|
12
|
+
import "./backCameraStream-ZyqrFyjO.esm.js";
|
|
13
|
+
import "./permissionGuards-BR2oN573.esm.js";
|
|
14
|
+
import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-DSOX2epf.esm.js";
|
|
14
15
|
|
|
15
16
|
//#region src/modules/document-capture/documentCaptureActor.ts
|
|
16
17
|
function createDocumentCaptureActor(options) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import { t as Manager } from "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import "./Actor-CGEelYtQ.js";
|
|
4
|
+
import "./camera-CNVUo-bC.js";
|
|
5
|
+
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-DgGlgyZT.js";
|
|
6
|
+
import * as xstate0 from "xstate";
|
|
6
7
|
|
|
7
8
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
9
|
+
declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
|
|
9
10
|
type: "START";
|
|
10
11
|
} | {
|
|
11
12
|
type: "CAPTURE";
|
|
@@ -18,52 +19,52 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
18
19
|
} | {
|
|
19
20
|
type: "CLOSE";
|
|
20
21
|
}, {
|
|
21
|
-
[x: string]:
|
|
22
|
+
[x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
|
|
22
23
|
imageBase64: string;
|
|
23
24
|
documentType: string;
|
|
24
25
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
26
|
+
}, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | undefined;
|
|
27
|
+
}, xstate0.Values<{
|
|
27
28
|
uploadDocument: {
|
|
28
29
|
src: "uploadDocument";
|
|
29
|
-
logic:
|
|
30
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
30
31
|
imageBase64: string;
|
|
31
32
|
documentType: string;
|
|
32
33
|
onProgress: (progress: number) => void;
|
|
33
|
-
},
|
|
34
|
+
}, xstate0.EventObject>;
|
|
34
35
|
id: string | undefined;
|
|
35
36
|
};
|
|
36
37
|
initCamera: {
|
|
37
38
|
src: "initCamera";
|
|
38
|
-
logic:
|
|
39
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
39
40
|
id: string | undefined;
|
|
40
41
|
};
|
|
41
|
-
}>,
|
|
42
|
-
setError: {
|
|
43
|
-
type: "setError";
|
|
44
|
-
params: xstate593.NonReducibleUnknown;
|
|
45
|
-
};
|
|
42
|
+
}>, xstate0.Values<{
|
|
46
43
|
setStream: {
|
|
47
44
|
type: "setStream";
|
|
48
|
-
params:
|
|
45
|
+
params: xstate0.NonReducibleUnknown;
|
|
49
46
|
};
|
|
50
47
|
setImageAndClearError: {
|
|
51
48
|
type: "setImageAndClearError";
|
|
52
|
-
params:
|
|
49
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
50
|
};
|
|
54
51
|
setProgress: {
|
|
55
52
|
type: "setProgress";
|
|
56
|
-
params:
|
|
53
|
+
params: xstate0.NonReducibleUnknown;
|
|
54
|
+
};
|
|
55
|
+
setError: {
|
|
56
|
+
type: "setError";
|
|
57
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
58
|
};
|
|
58
59
|
clearError: {
|
|
59
60
|
type: "clearError";
|
|
60
|
-
params:
|
|
61
|
+
params: xstate0.NonReducibleUnknown;
|
|
61
62
|
};
|
|
62
63
|
stopStream: {
|
|
63
64
|
type: "stopStream";
|
|
64
|
-
params:
|
|
65
|
+
params: xstate0.NonReducibleUnknown;
|
|
65
66
|
};
|
|
66
|
-
}>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput,
|
|
67
|
+
}>, never, never, "error" | "idle" | "uploading" | "closed" | "finished" | "initCamera" | "capturing", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
|
|
67
68
|
readonly id: "documentUpload";
|
|
68
69
|
readonly initial: "idle";
|
|
69
70
|
readonly context: ({
|
|
@@ -72,67 +73,67 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
72
73
|
spawn: {
|
|
73
74
|
<TSrc extends "uploadDocument" | "initCamera">(logic: TSrc, ...[options]: ({
|
|
74
75
|
src: "uploadDocument";
|
|
75
|
-
logic:
|
|
76
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
76
77
|
imageBase64: string;
|
|
77
78
|
documentType: string;
|
|
78
79
|
onProgress: (progress: number) => void;
|
|
79
|
-
},
|
|
80
|
+
}, xstate0.EventObject>;
|
|
80
81
|
id: string | undefined;
|
|
81
82
|
} extends infer T ? T extends {
|
|
82
83
|
src: "uploadDocument";
|
|
83
|
-
logic:
|
|
84
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
84
85
|
imageBase64: string;
|
|
85
86
|
documentType: string;
|
|
86
87
|
onProgress: (progress: number) => void;
|
|
87
|
-
},
|
|
88
|
+
}, xstate0.EventObject>;
|
|
88
89
|
id: string | undefined;
|
|
89
90
|
} ? T extends {
|
|
90
91
|
src: TSrc;
|
|
91
|
-
} ?
|
|
92
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
92
93
|
id?: T["id"] | undefined;
|
|
93
94
|
systemId?: string;
|
|
94
|
-
input?:
|
|
95
|
+
input?: xstate0.InputFrom<T["logic"]> | undefined;
|
|
95
96
|
syncSnapshot?: boolean;
|
|
96
|
-
} & { [K in
|
|
97
|
+
} & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
97
98
|
src: "initCamera";
|
|
98
|
-
logic:
|
|
99
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
99
100
|
id: string | undefined;
|
|
100
101
|
} extends infer T_1 ? T_1 extends {
|
|
101
102
|
src: "initCamera";
|
|
102
|
-
logic:
|
|
103
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
103
104
|
id: string | undefined;
|
|
104
105
|
} ? T_1 extends {
|
|
105
106
|
src: TSrc;
|
|
106
|
-
} ?
|
|
107
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
107
108
|
id?: T_1["id"] | undefined;
|
|
108
109
|
systemId?: string;
|
|
109
|
-
input?:
|
|
110
|
+
input?: xstate0.InputFrom<T_1["logic"]> | undefined;
|
|
110
111
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
112
|
+
} & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
|
|
112
113
|
uploadDocument: {
|
|
113
114
|
src: "uploadDocument";
|
|
114
|
-
logic:
|
|
115
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
115
116
|
imageBase64: string;
|
|
116
117
|
documentType: string;
|
|
117
118
|
onProgress: (progress: number) => void;
|
|
118
|
-
},
|
|
119
|
+
}, xstate0.EventObject>;
|
|
119
120
|
id: string | undefined;
|
|
120
121
|
};
|
|
121
122
|
initCamera: {
|
|
122
123
|
src: "initCamera";
|
|
123
|
-
logic:
|
|
124
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
124
125
|
id: string | undefined;
|
|
125
126
|
};
|
|
126
127
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
128
|
+
<TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
|
|
128
129
|
id?: never;
|
|
129
130
|
systemId?: string;
|
|
130
|
-
input?:
|
|
131
|
+
input?: xstate0.InputFrom<TLogic> | undefined;
|
|
131
132
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
133
|
+
} & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
|
|
133
134
|
};
|
|
134
135
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
136
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
136
137
|
type: "START";
|
|
137
138
|
} | {
|
|
138
139
|
type: "CAPTURE";
|
|
@@ -144,7 +145,7 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
144
145
|
type: "RETRY";
|
|
145
146
|
} | {
|
|
146
147
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
148
|
+
}, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
|
|
148
149
|
type: "START";
|
|
149
150
|
} | {
|
|
150
151
|
type: "CAPTURE";
|
|
@@ -156,7 +157,7 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
156
157
|
type: "RETRY";
|
|
157
158
|
} | {
|
|
158
159
|
type: "CLOSE";
|
|
159
|
-
},
|
|
160
|
+
}, xstate0.AnyEventObject>;
|
|
160
161
|
}) => {
|
|
161
162
|
config: DocumentUploadConfig;
|
|
162
163
|
stream: undefined;
|
|
@@ -226,7 +227,7 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
226
227
|
} | {
|
|
227
228
|
type: "CLOSE";
|
|
228
229
|
};
|
|
229
|
-
self:
|
|
230
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
230
231
|
type: "START";
|
|
231
232
|
} | {
|
|
232
233
|
type: "CAPTURE";
|
|
@@ -238,7 +239,7 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
238
239
|
type: "RETRY";
|
|
239
240
|
} | {
|
|
240
241
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
242
|
+
}, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
|
|
242
243
|
type: "START";
|
|
243
244
|
} | {
|
|
244
245
|
type: "CAPTURE";
|
|
@@ -250,7 +251,7 @@ declare const documentUploadMachine: xstate593.StateMachine<DocumentUploadContex
|
|
|
250
251
|
type: "RETRY";
|
|
251
252
|
} | {
|
|
252
253
|
type: "CLOSE";
|
|
253
|
-
},
|
|
254
|
+
}, xstate0.AnyEventObject>;
|
|
254
255
|
}) => {
|
|
255
256
|
imageBase64: string;
|
|
256
257
|
documentType: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
6
|
+
import { a as fromPromise, l as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
7
|
+
import { a as stopCameraStream } from "./camera-DUkgmYMo.esm.js";
|
|
8
|
+
import "./ITimerCapability-pltuG1E8.esm.js";
|
|
9
|
+
import { n as getBackCameraStream } from "./backCameraStream-ZyqrFyjO.esm.js";
|
|
9
10
|
|
|
10
11
|
//#region src/modules/document-upload/documentUploadServices.ts
|
|
11
12
|
async function uploadDocument({ imageBase64, documentType, onProgress, signal }) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-
|
|
4
|
-
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-
|
|
5
|
-
import {
|
|
6
|
-
import { n as getBackCameraStream } from "./backCameraStream-
|
|
7
|
-
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
3
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
4
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BJhGL13R.esm.js";
|
|
5
|
+
import { a as stopCameraStream } from "./camera-DUkgmYMo.esm.js";
|
|
6
|
+
import { n as getBackCameraStream } from "./backCameraStream-ZyqrFyjO.esm.js";
|
|
7
|
+
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BR2oN573.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/document-capture/types.ts
|
|
10
10
|
const PROCESSING_TYPE_MAP = {
|
package/dist/dynamic-forms.d.ts
CHANGED
|
@@ -1,193 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Input types supported by dynamic form questions.
|
|
8
|
-
* `inputType` on `Question` is optional so unknown future API values degrade
|
|
9
|
-
* gracefully to the text fallback rather than requiring this union to be widened.
|
|
10
|
-
*/
|
|
11
|
-
type InputType = 'TEXT' | 'DATE' | 'COUNTRY' | 'NATIONALITY' | 'NUMBER' | 'EMAIL' | 'PHONE' | 'CPF' | 'NAME' | 'YESNO' | 'SELECT' | 'MULTISELECT';
|
|
12
|
-
/**
|
|
13
|
-
* A single question within a dynamic form screen.
|
|
14
|
-
*/
|
|
15
|
-
type Question = {
|
|
16
|
-
questionId: string;
|
|
17
|
-
/** Display label shown to the user */
|
|
18
|
-
question: string;
|
|
19
|
-
inputType?: InputType;
|
|
20
|
-
/** Fallback type used when `inputType` is absent */
|
|
21
|
-
overrides?: InputType;
|
|
22
|
-
isPredefined?: boolean;
|
|
23
|
-
isOptional?: boolean;
|
|
24
|
-
options?: string[];
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* A single screen within the dynamic form flow.
|
|
28
|
-
*/
|
|
29
|
-
type Screen = {
|
|
30
|
-
title?: string;
|
|
31
|
-
hideTitle?: boolean;
|
|
32
|
-
questions: Question[];
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Configuration for the dynamic forms module.
|
|
36
|
-
* Provide either `screens` (pre-loaded) or `flowId` (fetched from API).
|
|
37
|
-
*/
|
|
38
|
-
type DynamicFormsConfig = {
|
|
39
|
-
/** Flow ID used to fetch screens from the API when `screens` is not provided */
|
|
40
|
-
flowId?: string;
|
|
41
|
-
/** Pre-loaded screens — skips the API fetch when provided */
|
|
42
|
-
screens?: Screen[];
|
|
43
|
-
};
|
|
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
|
|
49
|
-
//#region src/modules/dynamic-forms/dynamicFormsStateMachine.d.ts
|
|
50
|
-
/** Whether the form completed normally or was skipped due to a screen-loading failure. */
|
|
51
|
-
type DynamicFormsResult = 'completed' | 'skipped';
|
|
52
|
-
declare const dynamicFormsMachine: any;
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/modules/dynamic-forms/dynamicFormsActor.d.ts
|
|
55
|
-
type CreateDynamicFormsActorOptions = {
|
|
56
|
-
config: DynamicFormsConfig;
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/modules/dynamic-forms/dynamicFormsManager.d.ts
|
|
60
|
-
/** Dynamic forms manager is in initial state, waiting for `load()` */
|
|
61
|
-
type DynamicFormsIdleState = {
|
|
62
|
-
status: 'idle';
|
|
63
|
-
};
|
|
64
|
-
/** Fetching screen configuration from the backend */
|
|
65
|
-
type DynamicFormsLoadingState = {
|
|
66
|
-
status: 'loadingScreens';
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Ready for user input on the current screen.
|
|
70
|
-
* @property currentScreen - The screen definition to render
|
|
71
|
-
* @property screenIndex - 0-based index of the current screen
|
|
72
|
-
* @property totalScreens - Total number of screens in the form
|
|
73
|
-
* @property answers - Current answer values keyed by questionId
|
|
74
|
-
* @property answerValidity - Per-question format validity reported via `setAnswerValidity` (phone, email, CPF, etc.)
|
|
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.
|
|
77
|
-
*/
|
|
78
|
-
type DynamicFormsInputtingState = {
|
|
79
|
-
status: 'inputting';
|
|
80
|
-
currentScreen: Screen;
|
|
81
|
-
screenIndex: number;
|
|
82
|
-
totalScreens: number;
|
|
83
|
-
answers: Record<string, string>;
|
|
84
|
-
answerValidity: Record<string, boolean>;
|
|
85
|
-
validationErrors?: DynamicFormsValidationErrors;
|
|
86
|
-
canSubmit: boolean;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Submitting the current screen's answers to the backend.
|
|
90
|
-
* The screen data is preserved so the UI can keep the form visible (with
|
|
91
|
-
* disabled fields and a button spinner) while the request is in-flight.
|
|
92
|
-
* @property screenIndex - Index of the screen being submitted
|
|
93
|
-
* @property totalScreens - Total number of screens in the form
|
|
94
|
-
* @property currentScreen - The screen whose answers are being submitted
|
|
95
|
-
* @property answers - Frozen answer values at submission time
|
|
96
|
-
* @property answerValidity - Frozen validity flags at submission time
|
|
97
|
-
*/
|
|
98
|
-
type DynamicFormsSubmittingState = {
|
|
99
|
-
status: 'submitting';
|
|
100
|
-
screenIndex: number;
|
|
101
|
-
totalScreens: number;
|
|
102
|
-
currentScreen: Screen;
|
|
103
|
-
answers: Record<string, string>;
|
|
104
|
-
answerValidity: Record<string, boolean>;
|
|
105
|
-
validationErrors?: DynamicFormsValidationErrors;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* All screens submitted — success screen visible for ~3 s before
|
|
109
|
-
* transitioning to `finished`.
|
|
110
|
-
*/
|
|
111
|
-
type DynamicFormsSuccessState = {
|
|
112
|
-
status: 'success';
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* All screens completed or skipped.
|
|
116
|
-
* @property result - `'completed'` when all screens were submitted successfully;
|
|
117
|
-
* `'skipped'` when screen configuration could not be loaded (fire-and-forget).
|
|
118
|
-
*/
|
|
119
|
-
type DynamicFormsFinishedState = {
|
|
120
|
-
status: 'finished';
|
|
121
|
-
result: DynamicFormsResult;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Neither `screens` nor `flowId` was provided — misconfiguration, not a runtime error.
|
|
125
|
-
* Call `close()` to dismiss. Fix the config (provide `screens` or `flowId`) instead.
|
|
126
|
-
*/
|
|
127
|
-
type DynamicFormsMisconfiguredState = {
|
|
128
|
-
status: 'misconfigured';
|
|
129
|
-
};
|
|
130
|
-
/** User dismissed the module */
|
|
131
|
-
type DynamicFormsClosedState = {
|
|
132
|
-
status: 'closed';
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Union of all possible dynamic forms manager states.
|
|
136
|
-
*/
|
|
137
|
-
type DynamicFormsState = DynamicFormsIdleState | DynamicFormsLoadingState | DynamicFormsInputtingState | DynamicFormsSubmittingState | DynamicFormsSuccessState | DynamicFormsFinishedState | DynamicFormsMisconfiguredState | DynamicFormsClosedState;
|
|
138
|
-
/**
|
|
139
|
-
* Creates a dynamic forms manager for headless or UI-driven usage.
|
|
140
|
-
*
|
|
141
|
-
* @param options - Configuration options
|
|
142
|
-
* @param options.config - Dynamic forms configuration (flowId or pre-loaded screens)
|
|
143
|
-
*
|
|
144
|
-
* @returns Dynamic forms manager with state, API methods, and subscription
|
|
145
|
-
*/
|
|
146
|
-
declare function createDynamicFormsManager(options: CreateDynamicFormsActorOptions): Manager<DynamicFormsState> & {
|
|
147
|
-
/**
|
|
148
|
-
* Initializes the dynamic forms flow.
|
|
149
|
-
* Transitions from 'idle' to 'loadingScreens' or 'inputting'.
|
|
150
|
-
* Must be called before any other method.
|
|
151
|
-
*/
|
|
152
|
-
load(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Updates the answer value for a single question.
|
|
155
|
-
* Should be called when state is 'inputting'.
|
|
156
|
-
*
|
|
157
|
-
* @param questionId - The question ID from the screen definition
|
|
158
|
-
* @param value - The raw user input value (formatting is stripped in Core before submission)
|
|
159
|
-
*/
|
|
160
|
-
setAnswer(questionId: string, value: string): void;
|
|
161
|
-
/**
|
|
162
|
-
* Reports the format validity of a question's current value.
|
|
163
|
-
* Used for fields with format constraints (PHONE, EMAIL, CPF).
|
|
164
|
-
* A `false` entry feeds into the `formatViaAnswerValidity` validation rule
|
|
165
|
-
* and surfaces as a `validationErrors[questionId]` entry once validated.
|
|
166
|
-
*
|
|
167
|
-
* @param questionId - The question ID from the screen definition
|
|
168
|
-
* @param isValid - Whether the current value passes format validation
|
|
169
|
-
*/
|
|
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;
|
|
178
|
-
/**
|
|
179
|
-
* Submits the current screen's answers.
|
|
180
|
-
* Transitions to 'submitting', then advances to the next screen or 'finished'.
|
|
181
|
-
* Answer submission failures are fire-and-forget and do not block progression.
|
|
182
|
-
*/
|
|
183
|
-
submit(): void;
|
|
184
|
-
/**
|
|
185
|
-
* Dismisses the module from 'misconfigured' state.
|
|
186
|
-
* Fix the config (provide `screens` or `flowId`) rather than calling `reset()`.
|
|
187
|
-
*/
|
|
188
|
-
close(): void;
|
|
189
|
-
};
|
|
190
|
-
/** Type representing a dynamic forms manager instance. */
|
|
191
|
-
type DynamicFormsManager = ReturnType<typeof createDynamicFormsManager>;
|
|
192
|
-
//#endregion
|
|
1
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import "./Actor-CGEelYtQ.js";
|
|
4
|
+
import { c as DynamicFormsValidationErrors, d as Question, f as Screen, l as DynamicFormsConfig, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager, u as InputType } from "./dynamicFormsManager-CUYLOj9g.js";
|
|
193
5
|
export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type DynamicFormsValidationErrors, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -1,162 +1,10 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
|
+
import "./dateUtils-7-tQYRNN.esm.js";
|
|
7
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BXHcaocI.esm.js";
|
|
8
|
+
import { t as createDynamicFormsManager } from "./dynamicFormsManager-BOefZbyF.esm.js";
|
|
7
9
|
|
|
8
|
-
//#region src/modules/dynamic-forms/dynamicFormsActor.ts
|
|
9
|
-
function createDynamicFormsActor(options) {
|
|
10
|
-
return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/modules/dynamic-forms/dynamicFormsManager.ts
|
|
15
|
-
/**
|
|
16
|
-
* @module @incodetech/core/dynamic-forms
|
|
17
|
-
*
|
|
18
|
-
* Dynamic Forms module for the Incode Web SDK.
|
|
19
|
-
* Drives multi-screen forms defined by backend configuration.
|
|
20
|
-
*
|
|
21
|
-
* @example Headless usage
|
|
22
|
-
* ```typescript
|
|
23
|
-
* import { createDynamicFormsManager } from '@incodetech/core/dynamic-forms';
|
|
24
|
-
* import { setup } from '@incodetech/core';
|
|
25
|
-
*
|
|
26
|
-
* setup({ apiURL: 'https://api.example.com', token: 'your-token' });
|
|
27
|
-
*
|
|
28
|
-
* const manager = createDynamicFormsManager({
|
|
29
|
-
* config: { flowId: 'flow-123' },
|
|
30
|
-
* });
|
|
31
|
-
*
|
|
32
|
-
* manager.subscribe((state) => {
|
|
33
|
-
* if (state.status === 'inputting') {
|
|
34
|
-
* console.log('Screen:', state.currentScreen.title);
|
|
35
|
-
* }
|
|
36
|
-
* if (state.status === 'finished') {
|
|
37
|
-
* console.log('Result:', state.result); // 'completed' | 'skipped'
|
|
38
|
-
* }
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* manager.load();
|
|
42
|
-
* manager.stop();
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
function hasNoErrors(errors) {
|
|
46
|
-
return Object.keys(errors ?? {}).length === 0;
|
|
47
|
-
}
|
|
48
|
-
function hasAnyAnswer(answers) {
|
|
49
|
-
for (const value of Object.values(answers)) if (typeof value === "string" && value.length > 0) return true;
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Maps a Dynamic Forms state-machine snapshot to the exact Figma
|
|
54
|
-
* "Tracked Events" screen name. Source: Forms and Data entry Figma file
|
|
55
|
-
* (`https://www.figma.com/design/N6otHMuY2Hha5eBqRz0uC3/Forms-and-Data-entry---Latest-Designs?node-id=53-60567`).
|
|
56
|
-
* Family is `forms.*` with a single longform sub-family.
|
|
57
|
-
*
|
|
58
|
-
* `idle`, `loadingScreens`, `submitting`, `misconfigured`, and `closed` are
|
|
59
|
-
* intentionally unmapped — the Figma canvas does not define discrete
|
|
60
|
-
* tracked-event surfaces for them. They fall back to the generic
|
|
61
|
-
* `<module>.<state>` default.
|
|
62
|
-
*/
|
|
63
|
-
function getDynamicFormsScreenName(snapshot) {
|
|
64
|
-
const stateName = topLevelStateName(snapshot.value);
|
|
65
|
-
if (stateName === void 0) return void 0;
|
|
66
|
-
switch (stateName) {
|
|
67
|
-
case "inputting": return hasAnyAnswer(snapshot.context.answers) ? "forms.longform.filled" : "forms.longform.default";
|
|
68
|
-
case "success":
|
|
69
|
-
case "finished": return "forms.success";
|
|
70
|
-
default: return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function mapState(snapshot) {
|
|
74
|
-
const typedSnapshot = snapshot;
|
|
75
|
-
const { context } = typedSnapshot;
|
|
76
|
-
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
77
|
-
if (typedSnapshot.matches("loadingScreens")) return { status: "loadingScreens" };
|
|
78
|
-
if (typedSnapshot.matches("inputting")) return {
|
|
79
|
-
status: "inputting",
|
|
80
|
-
currentScreen: context.screens[context.currentScreenIndex],
|
|
81
|
-
screenIndex: context.currentScreenIndex,
|
|
82
|
-
totalScreens: context.screens.length,
|
|
83
|
-
answers: context.answers,
|
|
84
|
-
answerValidity: context.answerValidity,
|
|
85
|
-
validationErrors: context.validationErrors,
|
|
86
|
-
canSubmit: hasNoErrors(context.validationErrors)
|
|
87
|
-
};
|
|
88
|
-
if (typedSnapshot.matches("submitting")) {
|
|
89
|
-
const currentScreen = context.screens[context.currentScreenIndex];
|
|
90
|
-
return {
|
|
91
|
-
status: "submitting",
|
|
92
|
-
screenIndex: context.currentScreenIndex,
|
|
93
|
-
totalScreens: context.screens.length,
|
|
94
|
-
currentScreen,
|
|
95
|
-
answers: context.answers,
|
|
96
|
-
answerValidity: context.answerValidity,
|
|
97
|
-
validationErrors: context.validationErrors
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (typedSnapshot.matches("success")) return { status: "success" };
|
|
101
|
-
if (typedSnapshot.matches("finished")) return {
|
|
102
|
-
status: "finished",
|
|
103
|
-
result: context.result
|
|
104
|
-
};
|
|
105
|
-
if (typedSnapshot.matches("misconfigured")) return { status: "misconfigured" };
|
|
106
|
-
if (typedSnapshot.matches("closed")) return { status: "closed" };
|
|
107
|
-
return { status: "idle" };
|
|
108
|
-
}
|
|
109
|
-
function createApi({ actor, trackElementClicked }) {
|
|
110
|
-
return {
|
|
111
|
-
load() {
|
|
112
|
-
actor.send({ type: "LOAD" });
|
|
113
|
-
},
|
|
114
|
-
setAnswer(questionId, value) {
|
|
115
|
-
actor.send({
|
|
116
|
-
type: "ANSWER_CHANGED",
|
|
117
|
-
questionId,
|
|
118
|
-
value
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
setAnswerValidity(questionId, isValid) {
|
|
122
|
-
actor.send({
|
|
123
|
-
type: "ANSWER_VALIDITY_CHANGED",
|
|
124
|
-
questionId,
|
|
125
|
-
isValid
|
|
126
|
-
});
|
|
127
|
-
},
|
|
128
|
-
validateField(questionId) {
|
|
129
|
-
actor.send({
|
|
130
|
-
type: "VALIDATE_FIELD",
|
|
131
|
-
questionId
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
submit() {
|
|
135
|
-
trackElementClicked?.("submit");
|
|
136
|
-
actor.send({ type: "SUBMIT" });
|
|
137
|
-
},
|
|
138
|
-
close() {
|
|
139
|
-
trackElementClicked?.("close");
|
|
140
|
-
actor.send({ type: "CLOSE" });
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Creates a dynamic forms manager for headless or UI-driven usage.
|
|
146
|
-
*
|
|
147
|
-
* @param options - Configuration options
|
|
148
|
-
* @param options.config - Dynamic forms configuration (flowId or pre-loaded screens)
|
|
149
|
-
*
|
|
150
|
-
* @returns Dynamic forms manager with state, API methods, and subscription
|
|
151
|
-
*/
|
|
152
|
-
function createDynamicFormsManager(options) {
|
|
153
|
-
return createManager({
|
|
154
|
-
actor: createDynamicFormsActor(options),
|
|
155
|
-
mapState,
|
|
156
|
-
createApi,
|
|
157
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.forms, { getEventScreenName: getDynamicFormsScreenName })
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
//#endregion
|
|
162
10
|
export { createDynamicFormsManager, dynamicFormsMachine };
|