@incodetech/core 2.5.0-agentic → 2.5.0-agentic.1
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/{FaceDetectionProvider-Dv9iXub0.esm.js → FaceDetectionProvider-Cy2EAL0i.esm.js} +9 -9
- package/dist/{IIdCaptureCapability-CAxToGns.d.ts → IIdCaptureCapability-BRAZQtkM.d.ts} +1 -0
- package/dist/{MotionSensorProvider-X4_2eBGd.esm.js → MotionSensorProvider-BAGydZPH.esm.js} +5 -0
- package/dist/{WasmUtilProvider-DVFDFlIL.esm.js → WasmUtilProvider-C4x5gc1c.esm.js} +2 -2
- package/dist/{definitionSource-B-Z2EgJJ.esm.js → addressSearch-DBJeg_g3.esm.js} +76 -9
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{phoneFormat-C3q0Ukh4.esm.js → allowedCharacters-Bnir--CN.esm.js} +1 -11
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BI2zr7YX.esm.js → antifraudManager-DRMBLSh7.esm.js} +3 -3
- package/dist/{antifraudStateMachine-TWUu8wLN.esm.js → antifraudStateMachine-Bi0m60oV.esm.js} +1 -1
- package/dist/{api-BNxrW8xK.esm.js → api-B58edv6M.esm.js} +0 -1
- package/dist/{apiError-BAfdBGxH.esm.js → apiError-B9-B3cMq.esm.js} +1 -1
- package/dist/{attemptCarry-DWM8lV9V.esm.js → attemptCarry-CxiYlUAO.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BJElkTsj.d.ts → authenticationManager-CkD0JR7Q.d.ts} +1 -1
- package/dist/{authenticationManager-DFzByAYo.esm.js → authenticationManager-DNWtc0eq.esm.js} +6 -6
- package/dist/{authenticationStateMachine-CKTOhwwc.esm.js → authenticationStateMachine-CJ9i4Al-.esm.js} +3 -3
- package/dist/{browser-pQZA35G2-CG3C-xGt.esm.js → browser-pQZA35G2-B4Dwja1e.esm.js} +1 -1
- package/dist/{calendarDate-DcqGuEht.esm.js → calendarDate-D2zWfUlA.esm.js} +1 -1
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-P44yBRop.esm.js → certificateIssuanceManager-Ctj6AJC7.esm.js} +3 -3
- package/dist/{certificateIssuanceStateMachine-BPBrILt6.esm.js → certificateIssuanceStateMachine-DDqN9kvL.esm.js} +1 -1
- package/dist/{cnpj-Bl_olpdX.esm.js → cnpj-CVq3vL39.esm.js} +1 -9
- package/dist/cnpj-D5cxwIe-.esm.js +9 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-Duzd8paN.d.ts → consentManager-B0YKqYtZ.d.ts} +5 -5
- package/dist/{consentManager-D43w2ms-.esm.js → consentManager-CyoeiABc.esm.js} +3 -3
- package/dist/{consentStateMachine-CLK8PfM4.esm.js → consentStateMachine-BTUrAslr.esm.js} +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cag_bcyW.esm.js → crossDocumentDataMatchManager-cmQmp7Bi.esm.js} +3 -3
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-C6WmQToS.esm.js → curpValidationManager-EW44fVpH.esm.js} +3 -3
- package/dist/{curpValidationManager-CmL52FU8.d.ts → curpValidationManager-HOidAKvT.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-BbJ4YAzE.esm.js → curpValidationStateMachine-BFkt90Zs.esm.js} +3 -3
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-BBy6X9nh.esm.js → customFieldsManager-DPMBJrcH.esm.js} +4 -4
- package/dist/{customWatchlistManager-CtBMy2EF.esm.js → customWatchlistManager-DiYpPjZx.esm.js} +3 -3
- package/dist/{customWatchlistStateMachine-SS2ssNCg.esm.js → customWatchlistStateMachine-D7VxQggF.esm.js} +1 -1
- package/dist/{deepsightCaptureConfig-Nm_K8twx.esm.js → deepsightCaptureConfig-BxD3mSac.esm.js} +2 -2
- package/dist/{deepsightLoader-BInnND1H.esm.js → deepsightLoader-KYZP8_x-.esm.js} +7 -7
- package/dist/definitionSource-B9WTvQb9.esm.js +30 -0
- package/dist/{desktopCameraElection-JNBOXqvK.esm.js → desktopCameraElection-BGQRIA2u.esm.js} +8 -8
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.esm.js +3 -3
- package/dist/{documentCaptureManager-CGDtkfWj.esm.js → documentCaptureManager-SRG6YEMh.esm.js} +3 -3
- package/dist/{documentCaptureStateMachine-flAt9D4q.esm.js → documentCaptureStateMachine-Bh0uyfGq.esm.js} +4 -4
- package/dist/{documentSignatureStateMachine-DrRyICFT.esm.js → documentSignatureStateMachine-CLljjltG.esm.js} +4 -4
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-CxLq2KzT.esm.js → dynamicFormsManager-CnU2hRvl.esm.js} +3 -3
- package/dist/{dynamicFormsStateMachine-By-maT_4.esm.js → dynamicFormsStateMachine-huYmjamB.esm.js} +3 -3
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-CE19Pcdb.esm.js → ekybManager-CaEErq39.esm.js} +3 -3
- package/dist/{ekybManager-BflWuTe4.d.ts → ekybManager-Cjk8pQX0.d.ts} +2 -2
- package/dist/{ekybStateMachine-q7JQ-x9l.esm.js → ekybStateMachine-BIU8KIMv.esm.js} +141 -10
- package/dist/{ekybUtils-Z9MhFAer.esm.js → ekybUtils-Dl0MU-ib.esm.js} +23 -1
- package/dist/ekyc-prefill.d.ts +5 -5
- package/dist/ekyc-prefill.esm.js +2 -2
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-p3uenUEi.esm.js → ekycManager-D2K8AaMV.esm.js} +3 -3
- package/dist/{ekycManager-BKVQazAb.d.ts → ekycManager-DusmB-4j.d.ts} +2 -2
- package/dist/{ekycPrefillManager-BcLhkpp8.d.ts → ekycPrefillManager-BwmPXfhY.d.ts} +12 -12
- package/dist/{ekycPrefillManager-gPX3XE7u.esm.js → ekycPrefillManager-CENQjdNq.esm.js} +6 -7
- package/dist/ekycPrefillStateMachine-jT3hIt2X.esm.js +1289 -0
- package/dist/{ekycStateMachine-D0NAHzS7.esm.js → ekycStateMachine-6EKndBd7.esm.js} +740 -230
- package/dist/{ekycUtils-DEvtEyBI.esm.js → ekycUtils-C6HZB46m.esm.js} +37 -6
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-C1M-Yxf2.esm.js → electronicSignatureManager-wM8WTgzP.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-DWnhEsUf.esm.js → emailManager-BBdRYLtH.esm.js} +3 -3
- package/dist/{emailStateMachine--T9PHflK.esm.js → emailStateMachine-DO7lWYvn.esm.js} +2 -2
- package/dist/{events-ChMS-UzR.esm.js → events-PUWyizJn.esm.js} +2 -2
- package/dist/events.d.ts +0 -3
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +36 -36
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-CHqmyOjM.d.ts → faceCaptureManagerFactory-D1EJw36F.d.ts} +3 -3
- package/dist/{faceCaptureManagerFactory-18QW0lmV.esm.js → faceCaptureManagerFactory-DbEARG3h.esm.js} +6 -6
- package/dist/{faceCaptureSetup-CFToXwHy.esm.js → faceCaptureSetup-VaAjMpWX.esm.js} +20 -12
- package/dist/{faceMatchManager-DIStK4qi.esm.js → faceMatchManager-nBvS9z0o.esm.js} +3 -3
- package/dist/{faceMatchStateMachine-DagrRdo2.esm.js → faceMatchStateMachine-48O8j_Lx.esm.js} +2 -2
- package/dist/{feature-management-BlscKbeV.esm.js → feature-management-D7oLtULO.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-BnWBtMN7.esm.js → fieldComparisonManager-B1ipvtnp.esm.js} +3 -3
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-BxXaLhin.esm.js → fiscalQrManager-yecjuXV4.esm.js} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +7 -7
- package/dist/flow.esm.js +5 -5
- package/dist/{flowCompletionService-DNLssMAg.esm.js → flowCompletionService-CIjaIpMH.esm.js} +2 -2
- package/dist/{flowServices-Bzq3piUR.esm.js → flowServices-Dqt75TXx.esm.js} +9 -9
- package/dist/formErrors-lSfh7Y8J.esm.js +512 -0
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-DoLbpx5e.esm.js → geolocationManager-DHfgXhEs.esm.js} +3 -3
- package/dist/{geolocationStateMachine-d5_E7gAm.esm.js → geolocationStateMachine-CrEspaN-.esm.js} +3 -3
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-CaZxyEOO.esm.js → governmentValidationManager-0-L21hu6.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-DeHHhlcf.esm.js → governmentValidationStateMachine-BFIcq3UB.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +2 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +19 -3
- package/dist/id-selfie-flow.d.ts +2 -2
- package/dist/id-selfie-flow.esm.js +8 -8
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureDefaults-R3rHuTOE.esm.js → idCaptureDefaults-CNopPetU.esm.js} +16 -6
- package/dist/{idCaptureManager-D_YGMeCW.esm.js → idCaptureManager-BPDCAV04.esm.js} +24 -18
- package/dist/{idCaptureManager-CgkQW3Xc.d.ts → idCaptureManager-CNFBeYgV.d.ts} +20 -5
- package/dist/{idCaptureServices-CP6AxsFW.esm.js → idCaptureServices-CWZFmS7l.esm.js} +5 -5
- package/dist/{idCaptureStateMachine-BdBtGQZP.esm.js → idCaptureStateMachine-Cyt2BvPB.esm.js} +191 -44
- package/dist/{idOcrManager-C0C7lFGd.d.ts → idOcrManager-DflRx-_u.d.ts} +1 -1
- package/dist/{idOcrManager-XTbpfHoF.esm.js → idOcrManager-bjBLjrEE.esm.js} +3 -3
- package/dist/{idOcrStateMachine-B-00PgPh.esm.js → idOcrStateMachine-D5ifJ1B8.esm.js} +2 -2
- package/dist/{idVerificationManager-B4NYLlUl.esm.js → idVerificationManager-C8Ja-vKq.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-B48Ikl-7.esm.js → idVerificationStateMachine-BMnfZZli.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.esm.js +2 -2
- package/dist/{identityReuseManager-tFeYm_So.esm.js → identityReuseManager-B5BWAleT.esm.js} +3 -3
- package/dist/{identityReuseStateMachine-Ckf39qFu.esm.js → identityReuseStateMachine-Cuggm1UP.esm.js} +1 -1
- package/dist/{index-CNck5TLp.d.ts → index-BMr3MZEI.d.ts} +1 -1
- package/dist/{index-CoePktWH.d.ts → index-BoGlwLGK.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DNQX9k5e.esm.js → invokeOnCaptureCallback-D2FOfi4O.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -3
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-DP76y-Qz.esm.js → kybChecksManager-BF2vf0Q2.esm.js} +2 -2
- package/dist/{kybChecksManager-B7Di9auB.d.ts → kybChecksManager-CKDy1mel.d.ts} +1 -1
- package/dist/{kybChecksStateMachine-OKLT8Zoc.esm.js → kybChecksStateMachine-oBQfgdka.esm.js} +176 -179
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-kzr5kdc_.d.ts → mandatoryConsentManager-BcxCesP5.d.ts} +6 -6
- package/dist/{mandatoryConsentManager-NX1lz6nk.esm.js → mandatoryConsentManager-FfgHdPYw.esm.js} +3 -3
- package/dist/{mandatoryConsentStateMachine-D1J2NQSI.esm.js → mandatoryConsentStateMachine-CXuYC3qR.esm.js} +1 -1
- package/dist/{multipartRecordingService-Cz-cWrpV.esm.js → multipartRecordingService-CFmOUGQt.esm.js} +1 -1
- package/dist/numericRange-2e1vw1W0.esm.js +256 -0
- package/dist/{permissionGuards-Cyh71hOt.esm.js → permissionGuards-CZTCRHT-.esm.js} +1 -1
- package/dist/{permissionServices-BrtDMB0Z.esm.js → permissionServices-Vd86JiW9.esm.js} +19 -7
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-VO1HEoUZ.d.ts → phoneManager-bA-xw2TP.d.ts} +0 -8
- package/dist/{phoneManager-D1QPNbu0.esm.js → phoneManager-oIMdbeLG.esm.js} +5 -6
- package/dist/{phoneServices-DC7AuUed.esm.js → phoneServices-Dk4j3NhI.esm.js} +2 -12
- package/dist/{phoneStateMachine-CxCPxTIy.esm.js → phoneStateMachine-Cu3y7ewi.esm.js} +3 -8
- package/dist/{processFaceMatch-BQoiqLVh.esm.js → processFaceMatch-CHeI0DEt.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-CSCvD2tB.esm.js → recordingService-DK3kjUby.esm.js} +3 -3
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-Dcpg5GfP.esm.js → redirectToMobileManager-yYJGE47m.esm.js} +3 -3
- package/dist/{redirectToMobileStateMachine-BMehrtVP.esm.js → redirectToMobileStateMachine-g_NbyHrL.esm.js} +1 -1
- package/dist/{runChildModule-DNEmc7of.esm.js → runChildModule-x1rrxjYY.esm.js} +2 -2
- package/dist/{sdkVersion-etdZfyCR.esm.js → sdkVersion-kRh5h82H.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +11 -11
- package/dist/{selfieErrorUtils-DT-uhK20.esm.js → selfieErrorUtils-B9GfiS9f.esm.js} +1 -1
- package/dist/{selfieManager-CdS6a7Q8.esm.js → selfieManager-CivYjnF5.esm.js} +6 -6
- package/dist/{selfieManager-DrBYj5kA.d.ts → selfieManager-CqDlUy6B.d.ts} +1 -1
- package/dist/{selfieStateMachine-ChCl3nyf.esm.js → selfieStateMachine-dLwrXWll.esm.js} +3 -3
- package/dist/{session-VXYuRYzb.esm.js → session-DeJ-rd9u.esm.js} +5 -5
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-BT_CmYcX.esm.js → sessionInitializer-uZgyxsrL.esm.js} +11 -11
- package/dist/{setup-rcXgYUcY.d.ts → setup-Cr2KCwau.d.ts} +1 -1
- package/dist/{setup-BXrgDdfx.esm.js → setup-D0QZHkS8.esm.js} +13 -13
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-B737Gkvk.esm.js → signatureManager-DRUflksL.esm.js} +3 -3
- package/dist/{signatureStateMachine-B-QG7fk0.esm.js → signatureStateMachine-BQZenxel.esm.js} +1 -1
- package/dist/{stats-CrqhpKkP.esm.js → stats-DHu3li6G.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{tri-BD9z6z0w.esm.js → tri-D_gHPWrq.esm.js} +2 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-DYdFtcDH.esm.js → tri.esm-CftnGf9w.esm.js} +187 -177
- package/dist/tri.esm.js +1 -1
- package/dist/trueSight-CbrZUzLx.esm.js +1 -0
- package/dist/{trueSightService-BwyLhIAo.esm.js → trueSightService-BMp8g65B.esm.js} +5 -7
- package/dist/trust-graph.esm.js +3 -3
- package/dist/{trustGraphStateMachine-BxvReuo1.esm.js → trustGraphStateMachine-0Ehwried.esm.js} +1 -1
- package/dist/{types-4Re9FSOw.d.ts → types-BZsmNYom.d.ts} +3 -4
- package/dist/types-BinnzVrL.d.ts +6 -0
- package/dist/{types-BgRHw-dR.d.ts → types-BwMpWCVG.d.ts} +6 -2
- package/dist/{types-b0l9b83G.d.ts → types-D-FEM1rT.d.ts} +26 -10
- package/dist/{textRules-D4NRinKY.d.ts → types-D6Q1D1kx.d.ts} +1 -9
- package/dist/{types-CBQN04Rh.esm.js → types-DLsivQsu.esm.js} +0 -3
- package/dist/{types-CTaL0XJz.d.ts → types-DWqO7owj.d.ts} +2 -24
- package/dist/{types-CEGG70FK.d.ts → types-HHgsFhZn.d.ts} +1 -1
- package/dist/{types-C1056-J1.d.ts → types-LbccjQYX.d.ts} +1 -1
- package/dist/{types-DHpz4Y37.d.ts → types-PnJXvTkV.d.ts} +1 -1
- package/dist/{types-B-PIc0en.d.ts → types-g3NuVCT9.d.ts} +40 -37
- package/dist/{types-DEa3taWc.d.ts → types-tOSLpcSa.d.ts} +16 -2
- package/dist/video-selfie.d.ts +14 -6
- package/dist/video-selfie.esm.js +12 -9
- package/dist/{videoSelfieCameraWarmer-DgRlU_8q.esm.js → videoSelfieCameraWarmer-BpP0_lDr.esm.js} +27 -8
- package/dist/{videoSelfieStepDetector-DC_Qh7qI.d.ts → videoSelfieStepDetector-CxOc3kSI.d.ts} +3 -3
- package/dist/{warmup-BN8dG2KX.esm.js → warmup-ClZxXOkg.esm.js} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-DwBfTlgB.esm.js → wasmDsFlagSync-Bw-P5OG1.esm.js} +1 -1
- package/dist/{wasmWebClient-B2P6Vlvv.esm.js → wasmWebClient-BLtlzQhv.esm.js} +9 -9
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-DxeSH80T.esm.js → watchlistForBusinessManager-d8kdf35n.esm.js} +3 -3
- package/dist/{watchlistForBusinessStateMachine-BC9UWLuZ.esm.js → watchlistForBusinessStateMachine-Y9wFmuMH.esm.js} +4 -3
- package/dist/{watchlistManager-BHzmC9OC.esm.js → watchlistManager-D1BVrd3H.esm.js} +3 -3
- package/dist/{watchlistStateMachine-Bxzn16iJ.esm.js → watchlistStateMachine-Da4p0sTE.esm.js} +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +42 -42
- package/package.json +3 -3
- package/dist/addressSearch-BKlynuBr.esm.js +0 -71
- package/dist/ekycPrefillStateMachine-SBnBKPGA.esm.js +0 -685
- package/dist/ekycRules-BH_Ll_0A.esm.js +0 -482
- package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +0 -18
- package/dist/trueSight-BymJD5cW.esm.js +0 -1
- package/dist/types-BtrJ5fkm.d.ts +0 -6
package/dist/{kybChecksStateMachine-OKLT8Zoc.esm.js → kybChecksStateMachine-oBQfgdka.esm.js}
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
3
|
+
import { i as toIncodeApiError, t as IncodeApiError } from "./apiError-B9-B3cMq.esm.js";
|
|
4
|
+
import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
4
5
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
6
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
6
7
|
import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
|
|
7
|
-
import { n as checkSupport,
|
|
8
|
-
import { n as
|
|
8
|
+
import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
|
|
9
|
+
import { a as e164, c as setFieldValue, d as createFormRegistry, f as supportedIds, i as oneOfRequired, l as validateAllValues, n as requiredError, o as allowedCharacters, p as buildPayload, r as trim, s as phoneDeps, t as STRUCTURE_MESSAGES } from "./formErrors-lSfh7Y8J.esm.js";
|
|
9
10
|
function isSupportedSchema(form) {
|
|
10
11
|
return String(form.schemaVersion).split(".")[0] === "1";
|
|
11
12
|
}
|
|
@@ -17,11 +18,6 @@ function formFields(form) {
|
|
|
17
18
|
function findField(form, name) {
|
|
18
19
|
return formFields(form).find((field) => field.name === name);
|
|
19
20
|
}
|
|
20
|
-
/** Blank text, or a list with no non-blank entry. */
|
|
21
|
-
function isBlank(value) {
|
|
22
|
-
if (Array.isArray(value)) return value.every((v) => v.trim() === "");
|
|
23
|
-
return value === void 0 || value.trim() === "";
|
|
24
|
-
}
|
|
25
21
|
//#endregion
|
|
26
22
|
//#region src/modules/kyb-checks/kybChecksDefinition.ts
|
|
27
23
|
const KYB_CHECKS_MODULE = "kybChecks";
|
|
@@ -50,20 +46,30 @@ const KINDS = {
|
|
|
50
46
|
list: "list"
|
|
51
47
|
};
|
|
52
48
|
const KEYBOARDS = /* @__PURE__ */ new Set(["url", "email"]);
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
/**
|
|
50
|
+
* The only ids the adapter produces, with their kernel implementations: KYB
|
|
51
|
+
* Checks validates and builds its request with these, and nothing else, so
|
|
52
|
+
* the kernel's other rules, the vocabulary and the postal tables stay out of
|
|
53
|
+
* its bundle. A served construct with no id here is left out by the adapter.
|
|
54
|
+
* There are no default messages: every served rule carries its own, and a
|
|
55
|
+
* rule without one falls back to its id, as before.
|
|
56
|
+
*/
|
|
57
|
+
const KYB_CHECKS_REGISTRY = createFormRegistry({
|
|
55
58
|
schemaVersions: [1],
|
|
56
59
|
vocabulary: "1.3",
|
|
57
|
-
kinds:
|
|
58
|
-
groups:
|
|
59
|
-
rules:
|
|
60
|
-
transforms:
|
|
61
|
-
groupRules:
|
|
62
|
-
optionLists:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
60
|
+
kinds: Object.values(KINDS),
|
|
61
|
+
groups: [...Object.values(GROUPS), OTHER_GROUP],
|
|
62
|
+
rules: [allowedCharacters],
|
|
63
|
+
transforms: [trim, e164],
|
|
64
|
+
groupRules: [oneOfRequired],
|
|
65
|
+
optionLists: { US_STATES: usStateOptions.map((option) => option.value) },
|
|
66
|
+
flags: ["payload.omitWhenEmpty"],
|
|
67
|
+
required: requiredError,
|
|
68
|
+
structure: STRUCTURE_MESSAGES
|
|
69
|
+
});
|
|
70
|
+
/** Request transforms the adapter keeps from a served field. */
|
|
71
|
+
const TRANSFORMS = new Set(KYB_CHECKS_REGISTRY.transforms.keys());
|
|
72
|
+
const KYB_CHECKS_SUPPORTED_IDS = supportedIds(KYB_CHECKS_REGISTRY);
|
|
67
73
|
/** A served regex of the one shape `allowedCharacters` can express: `^[…]{1,n}$` or `^[…]+$`. */
|
|
68
74
|
const CHARACTER_CLASS_REGEX = /^\^\[([^\]]+)\](?:\{[01],(\d+)\}|\+)\$$/;
|
|
69
75
|
/**
|
|
@@ -175,6 +181,16 @@ function toGroupRules(form, names) {
|
|
|
175
181
|
});
|
|
176
182
|
}
|
|
177
183
|
/**
|
|
184
|
+
* `submit.static` without the keys a served field writes. The backend sends
|
|
185
|
+
* the country both ways, with the same value; the field's value is the one
|
|
186
|
+
* the user chose (CK1 decision K11), and the kernel reports two writers of
|
|
187
|
+
* one key as a definition error.
|
|
188
|
+
*/
|
|
189
|
+
function staticKeys(form, fields) {
|
|
190
|
+
const written = new Set(fields.filter((field) => !field.payload?.omit).map((field) => field.payload?.key ?? field.name));
|
|
191
|
+
return Object.fromEntries(Object.entries(form.submit?.static ?? {}).filter(([key]) => !written.has(key)));
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
178
194
|
* The served form as a form definition, plus what the definition has no slot
|
|
179
195
|
* for. Steps are flattened: the backend always sends one.
|
|
180
196
|
*/
|
|
@@ -208,7 +224,7 @@ function toKybChecksDefinition(form) {
|
|
|
208
224
|
sections,
|
|
209
225
|
fields,
|
|
210
226
|
...groupRules.length > 0 && { groupRules },
|
|
211
|
-
submit: { static: form
|
|
227
|
+
submit: { static: staticKeys(form, fields) }
|
|
212
228
|
},
|
|
213
229
|
layout: {
|
|
214
230
|
title: form.steps[0]?.title,
|
|
@@ -218,51 +234,28 @@ function toKybChecksDefinition(form) {
|
|
|
218
234
|
}
|
|
219
235
|
//#endregion
|
|
220
236
|
//#region src/modules/kyb-checks/kybChecksFields.ts
|
|
237
|
+
/**
|
|
238
|
+
* KYB Checks on the forms kernel: checks and resolves the definition the
|
|
239
|
+
* adapter builds and projects it to `KybFieldDef`s. Values are validated with
|
|
240
|
+
* the kernel's `validateForm` and the request body is the kernel's
|
|
241
|
+
* `buildPayload`, both with `KYB_CHECKS_REGISTRY`; this file only maps their
|
|
242
|
+
* errors to the module's `KybText`s.
|
|
243
|
+
*/
|
|
244
|
+
/** A phone the input itself reports as malformed. */
|
|
221
245
|
const PHONE_FORMAT_ERROR = {
|
|
222
246
|
key: "kyb.errors.phoneNumberFormat",
|
|
223
247
|
text: "Enter a valid phone number"
|
|
224
248
|
};
|
|
225
|
-
const INVALID_CHARACTERS = {
|
|
226
|
-
key: "verification.errors.invalidCharacters",
|
|
227
|
-
text: "Use only the allowed characters"
|
|
228
|
-
};
|
|
229
249
|
const ALL_GROUPS_ON = Object.fromEntries([...KYB_CHECKS_SUPPORTED_IDS.groups].map((group) => [group, true]));
|
|
230
250
|
const TYPES = {
|
|
231
251
|
choice: "dropdown",
|
|
232
252
|
phone: "phone",
|
|
233
253
|
list: "list"
|
|
234
254
|
};
|
|
235
|
-
const toText = (text, fallback) => text ? {
|
|
236
|
-
key: text.key,
|
|
237
|
-
text: text.text ?? fallback.text
|
|
238
|
-
} : fallback;
|
|
239
255
|
const fromFormText = (text) => ({
|
|
240
256
|
key: text.key,
|
|
241
257
|
text: text.text ?? ""
|
|
242
258
|
});
|
|
243
|
-
function projectRules(rules, required, maxLength) {
|
|
244
|
-
const validation = required ? [{ type: "required" }] : [];
|
|
245
|
-
let lengthMessage;
|
|
246
|
-
for (const rule of rules ?? []) {
|
|
247
|
-
if (rule.id !== "allowedCharacters") continue;
|
|
248
|
-
const params = rule.params ?? {};
|
|
249
|
-
const message = toText(rule.message, INVALID_CHARACTERS);
|
|
250
|
-
validation.push({
|
|
251
|
-
type: "allowedCharacters",
|
|
252
|
-
classes: params.classes ?? [],
|
|
253
|
-
extra: typeof params.extra === "string" ? params.extra : "",
|
|
254
|
-
ascii: params.ascii === true,
|
|
255
|
-
message
|
|
256
|
-
});
|
|
257
|
-
lengthMessage ??= message;
|
|
258
|
-
}
|
|
259
|
-
if (maxLength !== void 0 && lengthMessage) validation.push({
|
|
260
|
-
type: "maxLength",
|
|
261
|
-
max: maxLength,
|
|
262
|
-
message: lengthMessage
|
|
263
|
-
});
|
|
264
|
-
return validation;
|
|
265
|
-
}
|
|
266
259
|
function projectField(resolved, layout, country) {
|
|
267
260
|
const { field, required, phoneLocked } = resolved;
|
|
268
261
|
const type = TYPES[field.kind] ?? "text";
|
|
@@ -290,20 +283,37 @@ function projectField(resolved, layout, country) {
|
|
|
290
283
|
},
|
|
291
284
|
...served?.readonly && { readonly: true },
|
|
292
285
|
...served?.refetchOnChange && { refetchOnChange: served.refetchOnChange },
|
|
293
|
-
initialValue: served?.value ?? (type === "list" ? [] : "")
|
|
294
|
-
validation: projectRules(field.rules, required, maxLength)
|
|
286
|
+
initialValue: served?.value ?? (type === "list" ? [] : "")
|
|
295
287
|
};
|
|
296
288
|
}
|
|
297
|
-
const preparedForms = /* @__PURE__ */ new WeakMap();
|
|
298
289
|
/**
|
|
299
|
-
* The
|
|
300
|
-
*
|
|
301
|
-
* can't render it: a newer schema major, or an adapter output that fails
|
|
302
|
-
* `checkSupport`, which would be a bug in the adapter.
|
|
290
|
+
* The English text of every message the definition carries (rule and group
|
|
291
|
+
* rule messages), by key, for a key i18nexus doesn't have.
|
|
303
292
|
*/
|
|
304
|
-
function
|
|
293
|
+
function messageTexts(definition) {
|
|
294
|
+
const texts = /* @__PURE__ */ new Map([[PHONE_FORMAT_ERROR.key, PHONE_FORMAT_ERROR.text]]);
|
|
295
|
+
const add = (text) => {
|
|
296
|
+
if (text?.text && !texts.has(text.key)) texts.set(text.key, text.text);
|
|
297
|
+
};
|
|
298
|
+
for (const field of definition.fields) for (const rule of field.rules ?? []) add(rule.message);
|
|
299
|
+
for (const rule of definition.groupRules ?? []) add(rule.message);
|
|
300
|
+
return texts;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Each field's first served rule text, by field name. A served pattern also
|
|
304
|
+
* caps the field's length, so a value that is too long falls back to it, as
|
|
305
|
+
* the module's own check did.
|
|
306
|
+
*/
|
|
307
|
+
function lengthTexts(definition) {
|
|
308
|
+
return new Map(definition.fields.flatMap((field) => {
|
|
309
|
+
const text = field.rules?.find((rule) => rule.message?.text)?.message?.text;
|
|
310
|
+
return field.input?.maxLength !== void 0 && text ? [[field.name, text]] : [];
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
const preparedForms = /* @__PURE__ */ new WeakMap();
|
|
314
|
+
function prepared(form) {
|
|
305
315
|
if (preparedForms.has(form)) return preparedForms.get(form) ?? void 0;
|
|
306
|
-
let
|
|
316
|
+
let result = null;
|
|
307
317
|
if (isSupportedSchema(form)) {
|
|
308
318
|
const { definition, layout } = toKybChecksDefinition(form);
|
|
309
319
|
const support = checkSupport(definition, KYB_CHECKS_SUPPORTED_IDS);
|
|
@@ -314,21 +324,50 @@ function prepareKybChecksForm(form) {
|
|
|
314
324
|
...section.title && { title: fromFormText(section.title) },
|
|
315
325
|
fields: resolved.fields.filter((field) => field.field.section === section.id).map((field) => projectField(field, layout, definition.country))
|
|
316
326
|
}));
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
+
result = {
|
|
328
|
+
view: {
|
|
329
|
+
title: layout.title,
|
|
330
|
+
sections
|
|
331
|
+
},
|
|
332
|
+
definition,
|
|
333
|
+
check: {
|
|
334
|
+
form: resolved,
|
|
335
|
+
registry: KYB_CHECKS_REGISTRY,
|
|
336
|
+
env: () => ({
|
|
337
|
+
country: definition.country ?? "",
|
|
338
|
+
today: getLocalIsoDate(),
|
|
339
|
+
deps: phoneDeps()
|
|
340
|
+
}),
|
|
341
|
+
invalidFormatError: { key: PHONE_FORMAT_ERROR.key }
|
|
342
|
+
},
|
|
343
|
+
fieldsByName: new Map(sections.flatMap((section) => section.fields.map((field) => [field.name, field]))),
|
|
344
|
+
texts: messageTexts(definition),
|
|
345
|
+
lengthTexts: lengthTexts(definition)
|
|
327
346
|
};
|
|
328
347
|
} else console.warn("[kyb-checks] Unsupported form definition", support.problems);
|
|
329
348
|
}
|
|
330
|
-
preparedForms.set(form,
|
|
331
|
-
return
|
|
349
|
+
preparedForms.set(form, result);
|
|
350
|
+
return result ?? void 0;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* The served form on the forms kernel: translated to a definition, checked,
|
|
354
|
+
* resolved with every group on and projected. `undefined` when this build
|
|
355
|
+
* can't render it: a newer schema major, or an adapter output that fails
|
|
356
|
+
* `checkSupport`, which would be a bug in the adapter.
|
|
357
|
+
*/
|
|
358
|
+
function prepareKybChecksForm(form) {
|
|
359
|
+
return prepared(form)?.view;
|
|
360
|
+
}
|
|
361
|
+
/** What the kernel checks the form's values against. */
|
|
362
|
+
function kybChecksFormCheck(form) {
|
|
363
|
+
return prepared(form)?.check;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Whether the form shows a phone locked to its country. Its country check
|
|
367
|
+
* needs the phone rules, so a submit waits for them first.
|
|
368
|
+
*/
|
|
369
|
+
function hasLockedPhone(form) {
|
|
370
|
+
return !!prepared(form)?.check.form.fields.some((field) => field.phoneLocked);
|
|
332
371
|
}
|
|
333
372
|
function sectionFields(prepared) {
|
|
334
373
|
return prepared.sections.flatMap((section) => section.fields);
|
|
@@ -363,99 +402,49 @@ function carryOverValues(prepared, before, previous, invalidFormats) {
|
|
|
363
402
|
invalidFormats: stillInvalid
|
|
364
403
|
};
|
|
365
404
|
}
|
|
366
|
-
function requiredMessage(field) {
|
|
367
|
-
return {
|
|
368
|
-
key: DYNAMIC_REQUIRED_KEY,
|
|
369
|
-
text: `${field.labelText} is required`,
|
|
370
|
-
params: { fieldName: {
|
|
371
|
-
key: field.label,
|
|
372
|
-
text: field.labelText
|
|
373
|
-
} }
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
function failsRule(rule, value) {
|
|
377
|
-
if (rule.type === "required") return isBlank(value);
|
|
378
|
-
const entries = (Array.isArray(value) ? value : [value]).map((entry) => entry.trim()).filter((entry) => entry !== "");
|
|
379
|
-
if (rule.type === "maxLength") return entries.some((entry) => entry.length > rule.max);
|
|
380
|
-
return entries.some((entry) => !hasAllowedCharacters(entry, rule.classes, rule.extra, rule.ascii));
|
|
381
|
-
}
|
|
382
|
-
/** The first failing rule's message for a field, in rule order. */
|
|
383
|
-
function validateField(field, values, invalidFormats = {}) {
|
|
384
|
-
const value = values[field.name] ?? field.initialValue;
|
|
385
|
-
for (const rule of field.validation) if (failsRule(rule, value)) return rule.type === "required" ? requiredMessage(field) : rule.message;
|
|
386
|
-
if (invalidFormats[field.name] && !isBlank(value)) return PHONE_FORMAT_ERROR;
|
|
387
|
-
}
|
|
388
405
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
406
|
+
* A kernel error as a `KybText`: params as text, and the served English text
|
|
407
|
+
* as fallback. A value that is too long gets the field's served pattern text
|
|
408
|
+
* (its `lengthText`), which also capped the length.
|
|
391
409
|
*/
|
|
392
|
-
function
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
if (target && !errors[target] && allBlank) errors[target] = rule.message;
|
|
402
|
-
}
|
|
403
|
-
return errors;
|
|
404
|
-
}
|
|
405
|
-
function applyTransforms(value, transforms, country) {
|
|
406
|
-
let current = value;
|
|
407
|
-
for (const transform of transforms) if (transform === "trim") current = Array.isArray(current) ? current.map((entry) => entry.trim()) : current.trim();
|
|
408
|
-
else if (transform === "e164" && typeof current === "string") current = current ? formatPhoneE164(current, country ?? "") : current;
|
|
409
|
-
return current;
|
|
410
|
+
function toKybText(error, field, texts, lengthText) {
|
|
411
|
+
const params = error.params ? Object.fromEntries(Object.entries(error.params).map(([name, value]) => [name, Array.isArray(value) ? value.join(", ") : String(value)])) : void 0;
|
|
412
|
+
const tooLong = typeof error.params?.maxLength === "number";
|
|
413
|
+
const text = error.key === "verification.errors.fieldRequiredDynamic" && field ? `${field.labelText} is required` : texts.get(error.key) ?? (tooLong ? lengthText : void 0) ?? "";
|
|
414
|
+
return {
|
|
415
|
+
key: error.key,
|
|
416
|
+
text,
|
|
417
|
+
...params && { params }
|
|
418
|
+
};
|
|
410
419
|
}
|
|
420
|
+
const kybErrors = /* @__PURE__ */ new WeakMap();
|
|
421
|
+
const NO_TEXTS = /* @__PURE__ */ new Map();
|
|
411
422
|
/**
|
|
412
|
-
* The
|
|
413
|
-
* `
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* field whose key an earlier field already writes is left out, with a warning.
|
|
423
|
+
* The module's errors for the UI and headless hosts. The required message's
|
|
424
|
+
* `fieldName` is the field's label key; show the field's `labelText` when it
|
|
425
|
+
* has no translation. Mapped once per errors object, so it keeps its identity
|
|
426
|
+
* between snapshots.
|
|
417
427
|
*/
|
|
418
|
-
function
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (staticKeys.has(key)) continue;
|
|
426
|
-
if (claimed.has(key)) {
|
|
427
|
-
console.warn(`[kyb-checks] Not sending field "${field.name}": request key "${key}" is already written`);
|
|
428
|
-
continue;
|
|
429
|
-
}
|
|
430
|
-
claimed.add(key);
|
|
431
|
-
fields.push({
|
|
432
|
-
name: field.name,
|
|
433
|
-
key,
|
|
434
|
-
transforms: (field.payload?.transforms ?? []).map((t) => t.id),
|
|
435
|
-
omitWhenEmpty: field.payload?.omitWhenEmpty === true,
|
|
436
|
-
isList: field.kind === "list"
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
return {
|
|
440
|
-
static: { ...definition.submit.static },
|
|
441
|
-
country: definition.country,
|
|
442
|
-
fields
|
|
443
|
-
};
|
|
428
|
+
function toKybErrors(form, errors) {
|
|
429
|
+
const known = kybErrors.get(errors);
|
|
430
|
+
if (known) return known;
|
|
431
|
+
const entry = form ? prepared(form) : void 0;
|
|
432
|
+
const mapped = Object.fromEntries(Object.entries(errors).map(([name, error]) => [name, toKybText(error, entry?.fieldsByName.get(name), entry?.texts ?? NO_TEXTS, entry?.lengthTexts.get(name))]));
|
|
433
|
+
kybErrors.set(errors, mapped);
|
|
434
|
+
return mapped;
|
|
444
435
|
}
|
|
445
436
|
/**
|
|
446
|
-
* The `POST /omni/kyb` body:
|
|
447
|
-
*
|
|
448
|
-
*
|
|
437
|
+
* The `POST /omni/kyb` body: the kernel's request body for the definition.
|
|
438
|
+
* Empty values are left out, list entries that are blank are dropped, and
|
|
439
|
+
* `submit.static` keys follow the fields. A served form the compiler never
|
|
440
|
+
* saw can still repeat a request key; the first writer wins, with a warning.
|
|
449
441
|
*/
|
|
450
|
-
function
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
body[field.key] = value;
|
|
457
|
-
}
|
|
458
|
-
return body;
|
|
442
|
+
function buildKybChecksBody(form, values) {
|
|
443
|
+
const check = prepared(form)?.check;
|
|
444
|
+
if (!check) return {};
|
|
445
|
+
const { body, problems } = buildPayload(check.form, values, check.registry, check.env());
|
|
446
|
+
if (problems.length > 0) console.warn("[kyb-checks] Request body problems", problems);
|
|
447
|
+
return { ...body };
|
|
459
448
|
}
|
|
460
449
|
//#endregion
|
|
461
450
|
//#region src/modules/kyb-checks/kybChecksServices.ts
|
|
@@ -512,9 +501,12 @@ const kybChecksMachine = setup({
|
|
|
512
501
|
},
|
|
513
502
|
actors: {
|
|
514
503
|
fetchForm: fromPromise(async ({ input, signal }) => fetchKybForm(input.country, signal)),
|
|
504
|
+
loadPhoneRules: fromPromise(async () => {
|
|
505
|
+
await loadPhoneValidation();
|
|
506
|
+
}),
|
|
515
507
|
submit: fromPromise(async ({ input, signal }) => {
|
|
516
508
|
await loadPhoneValidation();
|
|
517
|
-
return submitKyb(
|
|
509
|
+
return submitKyb(buildKybChecksBody(input.form, input.values), signal);
|
|
518
510
|
})
|
|
519
511
|
},
|
|
520
512
|
actions: {
|
|
@@ -533,23 +525,18 @@ const kybChecksMachine = setup({
|
|
|
533
525
|
};
|
|
534
526
|
}),
|
|
535
527
|
setFieldValue: assign(({ context, event }) => {
|
|
536
|
-
const
|
|
537
|
-
const
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
return {
|
|
543
|
-
values: {
|
|
544
|
-
...context.values,
|
|
545
|
-
[name]: value
|
|
546
|
-
},
|
|
547
|
-
errors,
|
|
548
|
-
invalidFormats
|
|
549
|
-
};
|
|
528
|
+
const check = context.form && kybChecksFormCheck(context.form);
|
|
529
|
+
const set = event;
|
|
530
|
+
return check ? setFieldValue(context, set, check) : { values: {
|
|
531
|
+
...context.values,
|
|
532
|
+
[set.name]: set.value
|
|
533
|
+
} };
|
|
550
534
|
}),
|
|
551
535
|
setCountryFromEvent: assign(({ event }) => ({ country: String(event.value) })),
|
|
552
|
-
validateAll: assign(({ context }) =>
|
|
536
|
+
validateAll: assign(({ context }) => {
|
|
537
|
+
const check = context.form && kybChecksFormCheck(context.form);
|
|
538
|
+
return { errors: check ? validateAllValues(context, check) : {} };
|
|
539
|
+
}),
|
|
553
540
|
setLoadError: assign(({ event }) => ({
|
|
554
541
|
errorKind: "load",
|
|
555
542
|
canRetry: true,
|
|
@@ -577,6 +564,7 @@ const kybChecksMachine = setup({
|
|
|
577
564
|
const { name, value } = event;
|
|
578
565
|
return findField(context.form, name)?.refetchOnChange === COUNTRY_PARAM && typeof value === "string" && value !== "" && value !== context.country;
|
|
579
566
|
},
|
|
567
|
+
waitsForPhoneRules: ({ context }) => !!context.form && hasLockedPhone(context.form) && !getPhoneValidation(),
|
|
580
568
|
hasNoErrors: ({ context }) => Object.keys(context.errors).length === 0 && !!context.form?.submit,
|
|
581
569
|
failedLoadingFirstForm: ({ context }) => context.errorKind === "load" && context.form === void 0,
|
|
582
570
|
failedLoading: ({ context }) => context.errorKind === "load",
|
|
@@ -630,7 +618,16 @@ const kybChecksMachine = setup({
|
|
|
630
618
|
target: "refetching",
|
|
631
619
|
actions: ["setFieldValue", "setCountryFromEvent"]
|
|
632
620
|
}, { actions: "setFieldValue" }],
|
|
633
|
-
SUBMIT:
|
|
621
|
+
SUBMIT: [{
|
|
622
|
+
guard: "waitsForPhoneRules",
|
|
623
|
+
target: "loadingPhoneRules"
|
|
624
|
+
}, { target: "validating" }]
|
|
625
|
+
} },
|
|
626
|
+
loadingPhoneRules: { invoke: {
|
|
627
|
+
id: "loadPhoneRules",
|
|
628
|
+
src: "loadPhoneRules",
|
|
629
|
+
onDone: { target: "validating" },
|
|
630
|
+
onError: { target: "validating" }
|
|
634
631
|
} },
|
|
635
632
|
refetching: {
|
|
636
633
|
invoke: {
|
|
@@ -671,7 +668,7 @@ const kybChecksMachine = setup({
|
|
|
671
668
|
id: "submit",
|
|
672
669
|
src: "submit",
|
|
673
670
|
input: ({ context }) => ({
|
|
674
|
-
|
|
671
|
+
form: context.form,
|
|
675
672
|
values: context.values
|
|
676
673
|
}),
|
|
677
674
|
onDone: {
|
|
@@ -713,4 +710,4 @@ const kybChecksMachine = setup({
|
|
|
713
710
|
}
|
|
714
711
|
});
|
|
715
712
|
//#endregion
|
|
716
|
-
export { kybChecksMachine as t };
|
|
713
|
+
export { toKybErrors as n, kybChecksMachine as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as MandatoryConsentConfig } from "./types-
|
|
2
|
-
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-
|
|
1
|
+
import { r as MandatoryConsentConfig } from "./types-LbccjQYX.js";
|
|
2
|
+
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-BcxCesP5.js";
|
|
3
3
|
export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-
|
|
2
|
-
import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-
|
|
1
|
+
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CXuYC3qR.esm.js";
|
|
2
|
+
import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-FfgHdPYw.esm.js";
|
|
3
3
|
export { createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
|
package/dist/{mandatoryConsentManager-kzr5kdc_.d.ts → mandatoryConsentManager-BcxCesP5.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { A as MachineSnapshot, O as PromiseActorLogic, S as RequiredLogicInput,
|
|
|
2
2
|
import "./xstate.cjs-D6Ur0X1F.js";
|
|
3
3
|
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
4
4
|
import "./Actor-DqjOqDfU.js";
|
|
5
|
-
import { n as MandatoryConsent, r as MandatoryConsentConfig, t as FetchMandatoryConsentResponse } from "./types-
|
|
5
|
+
import { n as MandatoryConsent, r as MandatoryConsentConfig, t as FetchMandatoryConsentResponse } from "./types-LbccjQYX.js";
|
|
6
6
|
//#region src/modules/mandatory-consent/mandatoryConsentStateMachine.d.ts
|
|
7
7
|
type MandatoryConsentContext = {
|
|
8
8
|
config: MandatoryConsentConfig;
|
|
@@ -66,14 +66,14 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
|
|
|
66
66
|
type: "setLoadError";
|
|
67
67
|
params: NonReducibleUnknown;
|
|
68
68
|
};
|
|
69
|
-
resetContext: {
|
|
70
|
-
type: "resetContext";
|
|
71
|
-
params: NonReducibleUnknown;
|
|
72
|
-
};
|
|
73
69
|
toggleSigned: {
|
|
74
70
|
type: "toggleSigned";
|
|
75
71
|
params: NonReducibleUnknown;
|
|
76
72
|
};
|
|
73
|
+
resetContext: {
|
|
74
|
+
type: "resetContext";
|
|
75
|
+
params: NonReducibleUnknown;
|
|
76
|
+
};
|
|
77
77
|
}>, Values<{
|
|
78
78
|
canSubmit: {
|
|
79
79
|
type: "canSubmit";
|
|
@@ -83,7 +83,7 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
|
|
|
83
83
|
type: "hasConsent";
|
|
84
84
|
params: unknown;
|
|
85
85
|
};
|
|
86
|
-
}>, never, "error" | "idle" | "closed" | "finished" | "
|
|
86
|
+
}>, never, "error" | "idle" | "closed" | "finished" | "submitting" | "loading" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
87
87
|
readonly id: "mandatoryConsent";
|
|
88
88
|
readonly initial: "idle";
|
|
89
89
|
readonly context: ({ input }: {
|
package/dist/{mandatoryConsentManager-NX1lz6nk.esm.js → mandatoryConsentManager-FfgHdPYw.esm.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
3
3
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
|
-
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-
|
|
5
|
+
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CXuYC3qR.esm.js";
|
|
6
6
|
//#region src/modules/mandatory-consent/mandatoryConsentActor.ts
|
|
7
7
|
function createMandatoryConsentActor(options) {
|
|
8
8
|
return createActor(mandatoryConsentMachine, { input: { config: options.config } }).start();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
2
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
4
4
|
//#region src/modules/mandatory-consent/mandatoryConsentServices.ts
|
package/dist/{multipartRecordingService-Cz-cWrpV.esm.js → multipartRecordingService-CFmOUGQt.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
|
|
2
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
+
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
4
|
import { t as BrowserNetworkStatusProvider } from "./BrowserNetworkStatusProvider-BrDXBEDd.esm.js";
|
|
5
5
|
import { t as MultipartRecordingProvider } from "./MultipartRecordingProvider-BtMQZEbg.esm.js";
|