@incodetech/core 2.4.1-agentic.10 → 2.4.1-agentic.12
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/Actor-DqjOqDfU.d.ts +1 -0
- package/dist/{CameraCompositor-DN7NkJzV.esm.js → CameraCompositor-C7N1N61V.esm.js} +55 -1
- package/dist/{FaceDetectionProvider-BSLpXAGx.esm.js → FaceDetectionProvider-WtuJ6QBK.esm.js} +16 -11
- package/dist/{IWasmUtilCapability-BRn0wz8v.d.ts → IWasmUtilCapability-XcOtT1TP.d.ts} +5 -4
- package/dist/Manager-BvXAwDv9.esm.js +125 -0
- package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
- package/dist/{MultipartRecordingProvider-BfQPSgSO.esm.js → MultipartRecordingProvider-BtMQZEbg.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-ixfy84ys.d.ts → StreamCanvasCapture-BnBfA6fb.d.ts} +24 -2
- package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
- package/dist/{WasmUtilProvider-C_puwvVn.esm.js → WasmUtilProvider-D5RMElzw.esm.js} +47 -4
- package/dist/{WorkerEncoderRecordingProvider-CyCrQnZR.esm.js → WorkerEncoderRecordingProvider-BO7urYwT.esm.js} +1 -1
- package/dist/{addressSearch-B_4JYKa-.esm.js → addressSearch-BzAy6lhp.esm.js} +6 -7
- package/dist/{advanceableErrors-k-U-cL5m.esm.js → advanceableErrors-CxZyPRyh.esm.js} +3 -0
- package/dist/ae-signature.d.ts +2 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BWCVkSu2.esm.js → antifraudManager-Bw5nw5fh.esm.js} +5 -3
- package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
- package/dist/{antifraudStateMachine-CX9I2f3s.esm.js → antifraudStateMachine-kOfsaAuT.esm.js} +4 -6
- package/dist/{api-BSnbg4HO.esm.js → api-DSZSaaWr.esm.js} +3 -1
- package/dist/{apiError-Bmwy1Fa7.esm.js → apiError-BDuL1wTs.esm.js} +1 -1
- package/dist/{attemptCarry-zQH85Elh.esm.js → attemptCarry-QFQkA3na.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BoiOaB0m.esm.js → authenticationManager-B0SioAdd.esm.js} +7 -6
- package/dist/{authenticationManager-CISxaY6N.d.ts → authenticationManager-eYcurNiS.d.ts} +2 -2
- package/dist/{authenticationStateMachine-BMD1JLwr.esm.js → authenticationStateMachine-n1OrhPTv.esm.js} +50 -18
- package/dist/{backCameraStream-DS1oDiUq.esm.js → backCameraStream-6qVHvj76.esm.js} +2 -2
- package/dist/{browser-pQZA35G2-PIj2uGBm.esm.js → browser-pQZA35G2-CG3C-xGt.esm.js} +1 -1
- package/dist/calendarDate-DcqGuEht.esm.js +35 -0
- package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
- package/dist/camera-9yYDUOsO.d.ts +5 -0
- package/dist/{camera-E_Kcre4O.esm.js → camera-CJKApt0x.esm.js} +10 -3
- package/dist/camera.d.ts +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.d.ts +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
- package/dist/{certificateIssuanceManager-DzDuQTsK.esm.js → certificateIssuanceManager-DPT8E9zV.esm.js} +5 -3
- package/dist/{certificateIssuanceStateMachine-BAOYLACb.esm.js → certificateIssuanceStateMachine-BwDb3ezx.esm.js} +3 -3
- package/dist/{cnpj-Co1ottYN.esm.js → cnpj-Bl_olpdX.esm.js} +5 -3
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-7aHaehwF.d.ts → consentManager-B0YKqYtZ.d.ts} +9 -8
- package/dist/{consentManager-DFSKQTcR.esm.js → consentManager-DRMJ3O4r.esm.js} +5 -3
- package/dist/{consentStateMachine-4nZIH2O8.esm.js → consentStateMachine-Br0JbW7k.esm.js} +6 -9
- package/dist/{cpf-BIADjddF.esm.js → cpf-DDXMTLYr.esm.js} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-D7ka2qOC.esm.js → crossDocumentDataMatchManager-BIQ-SYcR.esm.js} +6 -5
- package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
- package/dist/curp-DZGvefg3.esm.js +14 -0
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-BVTt7IgC.esm.js → curpValidationManager-BKUDQ55W.esm.js} +6 -4
- package/dist/{curpValidationManager-DEqTUWdu.d.ts → curpValidationManager-DgUZySoq.d.ts} +4 -4
- package/dist/{curpValidationStateMachine-FB_MRbZQ.esm.js → curpValidationStateMachine-BwUBkyyi.esm.js} +16 -17
- package/dist/custom-fields.d.ts +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-gbsq53p6.esm.js → customFieldsManager-CPhONu5i.esm.js} +15 -17
- package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
- package/dist/{customWatchlistManager-50APwk4Z.esm.js → customWatchlistManager-cN57usIW.esm.js} +5 -3
- package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
- package/dist/{customWatchlistStateMachine-CpEVPzuT.esm.js → customWatchlistStateMachine-C1Xq1ugl.esm.js} +4 -6
- package/dist/{deepsightLoader-BKCT8UT1.esm.js → deepsightLoader-ClCQCdeL.esm.js} +5 -5
- package/dist/{definitionSource-BHNxbuiv.esm.js → definitionSource-Nw0YCbpe.esm.js} +38 -1
- package/dist/{desktopCameraElection-Dvvw7PRY.esm.js → desktopCameraElection-btFONYx6.esm.js} +23 -11
- package/dist/device.d.ts +3 -3
- package/dist/device.esm.js +15 -15
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.d.ts +123 -0
- package/dist/document-signature.esm.js +149 -0
- package/dist/{documentCaptureManager-BG5TuqJz.esm.js → documentCaptureManager-5I3lKDVW.esm.js} +5 -3
- package/dist/{documentCaptureManager-DDfviFg0.d.ts → documentCaptureManager-BkaPpoKy.d.ts} +6 -5
- package/dist/{documentCaptureStateMachine-C7PW_Ah9.esm.js → documentCaptureStateMachine-jtQHasPA.esm.js} +9 -12
- package/dist/documentSignatureStateMachine-DKtU0H-F.esm.js +218 -0
- package/dist/dynamic-forms.d.ts +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-B0bpHhhJ.esm.js → dynamicFormsManager-B6Bv32wU.esm.js} +5 -3
- package/dist/{dynamicFormsManager-9kwY8Bf5.d.ts → dynamicFormsManager-C45pTncO.d.ts} +3 -3
- package/dist/{dynamicFormsStateMachine-2ZHyejBc.esm.js → dynamicFormsStateMachine-Kauq2oB-.esm.js} +12 -13
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +2 -2
- package/dist/{ekybManager-BLOkwmWO.d.ts → ekybManager-BflWuTe4.d.ts} +3 -3
- package/dist/{ekybManager-P9mC7W9J.esm.js → ekybManager-wi135kG-.esm.js} +5 -3
- package/dist/{ekybStateMachine-C7HKaeVr.esm.js → ekybStateMachine-Vjb6_mFt.esm.js} +19 -23
- package/dist/ekyc-prefill.d.ts +1 -1
- package/dist/ekyc-prefill.esm.js +2 -2
- package/dist/ekyc.d.ts +2 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-q1fos6IY.d.ts → ekycManager-BKVQazAb.d.ts} +47 -6
- package/dist/{ekycManager-CeeJoRFY.esm.js → ekycManager-DWCL912J.esm.js} +39 -16
- package/dist/{ekycPrefillManager-PPGVZbWk.d.ts → ekycPrefillManager-BcLhkpp8.d.ts} +4 -3
- package/dist/{ekycPrefillManager-C6BFFKxc.esm.js → ekycPrefillManager-C27Cu6rn.esm.js} +3 -2
- package/dist/{ekycPrefillStateMachine-Dku90kZL.esm.js → ekycPrefillStateMachine-DqXvupSw.esm.js} +12 -13
- package/dist/{ekycRules-BLX7Elcb.esm.js → ekycRules-1hyjJ6bw.esm.js} +201 -38
- package/dist/{ekycStateMachine-DBTczgGE.esm.js → ekycStateMachine-DjiGyQtm.esm.js} +478 -73
- package/dist/{ekycUtils-Dcff8BOD.esm.js → ekycUtils-D9ui9Ztp.esm.js} +49 -43
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
- package/dist/{electronicSignatureManager-BKQuhJm_.esm.js → electronicSignatureManager-BHnxFx7u.esm.js} +11 -17
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-CGmKbsBL.esm.js → emailManager-CfvR6pQN.esm.js} +5 -3
- package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
- package/dist/{emailStateMachine-CGY1UGs2.esm.js → emailStateMachine-C4FouMzc.esm.js} +5 -7
- package/dist/events-CsPmTidH.esm.js +299 -0
- package/dist/events.d.ts +4 -1
- package/dist/events.esm.js +2 -1
- package/dist/extensibility.d.ts +41 -41
- package/dist/extensibility.esm.js +38 -38
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-ClFsByZc.esm.js → faceCaptureManagerFactory-BjVIUTMM.esm.js} +17 -6
- package/dist/{faceCaptureManagerFactory-BVwVGa3z.d.ts → faceCaptureManagerFactory-DhDPxxp-.d.ts} +23 -10
- package/dist/{faceCaptureSetup-9hv5GC_H.esm.js → faceCaptureSetup-q33e6ah9.esm.js} +61 -42
- package/dist/{faceMatchManager-BZtEw6bB.d.ts → faceMatchManager-C5b5WtcY.d.ts} +3 -2
- package/dist/{faceMatchManager-CRe7Nvm6.esm.js → faceMatchManager-CsPFaja4.esm.js} +5 -3
- package/dist/{faceMatchStateMachine-EX9QhxFE.esm.js → faceMatchStateMachine-Co2S7iN8.esm.js} +24 -23
- package/dist/{feature-management-CmKTG_T5.esm.js → feature-management-BhRKAG--.esm.js} +3 -2
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.d.ts +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-DuosZJso.esm.js → fieldComparisonManager-Chn80m_n.esm.js} +7 -7
- package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-ji0qDaTW.esm.js → fiscalQrManager-CpX6MOy_.esm.js} +9 -8
- package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +48 -12
- package/dist/flow.esm.js +214 -58
- package/dist/{flowCompletionService-DvcH16XO.esm.js → flowCompletionService-E_6ChYsV.esm.js} +2 -2
- package/dist/{flowServices-Ca2vKNt2.esm.js → flowServices-C23o7MqO.esm.js} +375 -13
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-6e1i9UIR.d.ts → geolocationManager-CENrvxpK.d.ts} +4 -3
- package/dist/{geolocationManager-CiG32lIm.esm.js → geolocationManager-dgMVi0ed.esm.js} +5 -3
- package/dist/{geolocationStateMachine-5rnTEOuw.esm.js → geolocationStateMachine-CCVd9xGh.esm.js} +8 -10
- package/dist/{getDeviceClass-DoIWuKI8.esm.js → getDeviceClass-Dcy9erbl.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BivVZNVe.esm.js → governmentValidationManager-D2KGYDws.esm.js} +5 -3
- package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
- package/dist/{governmentValidationStateMachine-CeSDNgha.esm.js → governmentValidationStateMachine-DRG-5jwQ.esm.js} +4 -6
- package/dist/home.d.ts +4 -3
- package/dist/home.esm.js +4 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +3 -3
- package/dist/id-selfie-flow.d.ts +5 -4
- package/dist/id-selfie-flow.esm.js +13 -12
- package/dist/id-verification.d.ts +1 -1
- 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-DBnOC28H.esm.js → idCaptureDefaults-BivjtJka.esm.js} +1 -1
- package/dist/{idCaptureManager-B5xqok0L.esm.js → idCaptureManager-B_deOVCC.esm.js} +15 -15
- package/dist/{idCaptureManager-CG8zbAp0.d.ts → idCaptureManager-DzAMWmRO.d.ts} +17 -9
- package/dist/{idCaptureServices-BIF_7rub.esm.js → idCaptureServices-BFCsusKB.esm.js} +17 -25
- package/dist/{idCaptureStateMachine-B5cfgKvn.esm.js → idCaptureStateMachine--CMATkG9.esm.js} +52 -57
- package/dist/{idOcrCpfUtils-Nfln1Psb.esm.js → idOcrCpfUtils-D5Gwskxu.esm.js} +1 -1
- package/dist/{idOcrManager-DNbVTMIu.esm.js → idOcrManager-C-_bzBSX.esm.js} +5 -3
- package/dist/{idOcrManager-B5xeI2lg.d.ts → idOcrManager-DflRx-_u.d.ts} +5 -4
- package/dist/{idOcrStateMachine-MAGnpWkb.esm.js → idOcrStateMachine-BNtBkAXC.esm.js} +13 -10
- package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
- package/dist/{idVerificationManager-BEAkamNm.esm.js → idVerificationManager-CdvGdtg2.esm.js} +5 -3
- package/dist/{idVerificationStateMachine-D5mBN2Ye.esm.js → idVerificationStateMachine-mozw0CIg.esm.js} +4 -6
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.d.ts +97 -0
- package/dist/identity-search.esm.js +96 -0
- package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
- package/dist/{identityReuseManager-M8-BTjar.esm.js → identityReuseManager-Z1Re4UGd.esm.js} +9 -4
- package/dist/{identityReuseStateMachine-D5bXgw9h.esm.js → identityReuseStateMachine-C_3fSFCw.esm.js} +24 -31
- package/dist/{index-CSPOoqah.d.ts → index-C0WIMlJE.d.ts} +2 -2
- package/dist/{index-Btj1EhiM.d.ts → index-CNck5TLp.d.ts} +1 -1
- package/dist/index-DHuAkTe0.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-C1-j4fsq.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +1 -1
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-CblEL97E.d.ts → kybChecksManager-B7Di9auB.d.ts} +3 -3
- package/dist/{kybChecksManager-CnqwgKoV.esm.js → kybChecksManager-D-mVF14T.esm.js} +3 -2
- package/dist/{kybChecksStateMachine-Be41K_NS.esm.js → kybChecksStateMachine-BARZh9GN.esm.js} +11 -14
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-LFhUlLvO.esm.js → mandatoryConsentManager-CKzzbbRe.esm.js} +5 -3
- package/dist/{mandatoryConsentManager-CYOJd_IZ.d.ts → mandatoryConsentManager-D6tBmPDy.d.ts} +10 -9
- package/dist/{mandatoryConsentStateMachine-DTSyDqQs.esm.js → mandatoryConsentStateMachine-DpK7fg3E.esm.js} +6 -9
- package/dist/{mediaRecorderOptions-B9-IEVtV.esm.js → mediaRecorderOptions-Di_V9TnZ.esm.js} +21 -4
- package/dist/{multipartRecordingService-CCiRpByl.esm.js → multipartRecordingService-CEtaAPz4.esm.js} +2 -2
- package/dist/{permissionGuards-DjQUR1du.esm.js → permissionGuards-BJIaHxvI.esm.js} +1 -1
- package/dist/{permissionServices-CZpORUWY.esm.js → permissionServices-6Mdq1hDk.esm.js} +8 -5
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/phoneFormat-C3q0Ukh4.esm.js +27 -0
- package/dist/{phoneManager-C-qD3p3N.esm.js → phoneManager-D8-l6-0y.esm.js} +5 -3
- package/dist/{phoneManager-6nrJkvkG.d.ts → phoneManager-VO1HEoUZ.d.ts} +3 -3
- package/dist/{phoneServices-BdR1nmSO.esm.js → phoneServices-C9lFIuCM.esm.js} +3 -7
- package/dist/{phoneStateMachine-2FMTdjtJ.esm.js → phoneStateMachine-CGLBgJJR.esm.js} +4 -4
- package/dist/{platform-aPh7gTWh.esm.js → platform-GIg4uPWe.esm.js} +1 -4
- package/dist/{processFaceMatch-B1YnoBer.esm.js → processFaceMatch-B1Mhqkep.esm.js} +1 -1
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-BVSCo0ac.esm.js → recordingService-CLGnDCDl.esm.js} +7 -6
- package/dist/redirect-to-mobile.d.ts +1 -1
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-CqyDfDxs.esm.js → redirectToMobileManager-Djb_daci.esm.js} +6 -4
- package/dist/{redirectToMobileManager-Dm9ctRCC.d.ts → redirectToMobileManager-pT6FiPE7.d.ts} +3 -3
- package/dist/{redirectToMobileStateMachine-CXqfo2Gd.esm.js → redirectToMobileStateMachine-BCyQFlpn.esm.js} +9 -19
- package/dist/{resolveForm-f9PhUo9j.esm.js → resolveForm-DaaQSVWp.esm.js} +7 -4
- package/dist/{runChildModule-BmteMhR7.esm.js → runChildModule-DF2c6TxC.esm.js} +8 -6
- package/dist/{sdkVersion-KZROt6l3.esm.js → sdkVersion-B5_kVegT.esm.js} +1 -1
- package/dist/selfie.d.ts +5 -5
- package/dist/selfie.esm.js +13 -12
- package/dist/{selfieErrorUtils-fqxp645p.esm.js → selfieErrorUtils-BVuv5qO7.esm.js} +1 -1
- package/dist/{selfieManager-DREuBhXZ.d.ts → selfieManager-C5a6Fw6W.d.ts} +2 -2
- package/dist/{selfieManager-A-n3k9Tu.esm.js → selfieManager-Dnb5h3qV.esm.js} +7 -6
- package/dist/{selfieStateMachine-48PKdKrw.esm.js → selfieStateMachine-BT69FLFb.esm.js} +5 -5
- package/dist/{session-D0DWDKp9.esm.js → session-OCc4b-Iv.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-I92b2dmL.esm.js → sessionInitializer-BUUpdBy6.esm.js} +11 -12
- package/dist/{setup-CG6oLkAa.d.ts → setup-BpD7lYSf.d.ts} +5 -4
- package/dist/{setup-BpjzWqR1.esm.js → setup-CJMohzTE.esm.js} +10 -9
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-M9vQBj19.esm.js → signatureManager-B6dRieBV.esm.js} +5 -3
- package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
- package/dist/{signatureStateMachine-0_frzAN5.esm.js → signatureStateMachine-DSW5-ZO0.esm.js} +5 -7
- package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
- package/dist/{stats-C2sigf9p.esm.js → stats-VqHbD5rn.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/step-up.d.ts +3 -2
- package/dist/step-up.esm.js +2 -1
- package/dist/{tri-DaUNvo-o.esm.js → tri-B5Yh5glk.esm.js} +2 -2
- package/dist/tri.d.ts +1 -1
- package/dist/tri.esm-DYdFtcDH.esm.js +3105 -0
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-DHYTBCIn.esm.js → trueSightService-D9D2IdEj.esm.js} +8 -6
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +5 -3
- package/dist/{types-TisHEbBg.d.ts → types-B2DGXHe6.d.ts} +30 -1
- package/dist/{types-BqlZSoZ-.d.ts → types-BBHnkH6S.d.ts} +4 -4
- package/dist/types-BNkzXOXE.d.ts +45 -0
- package/dist/{types-P9LzsfRo.d.ts → types-BkWUNheX.d.ts} +1 -1
- package/dist/types-C2uJrJrS.d.ts +6 -0
- package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
- package/dist/{events-C7h7oaTE.esm.js → types-CBQN04Rh.esm.js} +5 -299
- package/dist/{types-CyNndVAT.d.ts → types-CaVUb1DL.d.ts} +1 -1
- package/dist/{types-Cbm9J2yF.d.ts → types-Crg7oL-l.d.ts} +1 -1
- package/dist/{types-CgihAhT_.d.ts → types-x5MQKskR.d.ts} +4 -2
- package/dist/video-selfie.d.ts +6 -5
- package/dist/video-selfie.esm.js +14 -13
- package/dist/{videoSelfieCameraWarmer-CTOpqhov.esm.js → videoSelfieCameraWarmer-CYEHPKK6.esm.js} +9 -9
- package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-4XE2QI5q.d.ts → videoSelfieStepDetector-DGXi_TXk.d.ts} +18 -8
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +1 -1
- package/dist/{wasmDsFlagSync-lRIgn5Ic.esm.js → wasmDsFlagSync-BNttW5Sm.esm.js} +1 -1
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-C1S5y5yj.esm.js → watchlistForBusinessManager-CfLnsL8p.esm.js} +5 -3
- package/dist/{watchlistForBusinessManager-DX2AyM4Y.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +3 -3
- package/dist/{watchlistForBusinessStateMachine-Bj_hnoK5.esm.js → watchlistForBusinessStateMachine-EzlC_4I4.esm.js} +12 -9
- package/dist/{watchlistManager-BpegtZbc.esm.js → watchlistManager-CGXbemnp.esm.js} +5 -3
- package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
- package/dist/{watchlistStateMachine-Bgkh1gra.esm.js → watchlistStateMachine-CsNEmiXL.esm.js} +4 -6
- package/dist/workflow.d.ts +6 -5
- package/dist/workflow.esm.js +53 -43
- package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
- package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
- package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
- package/package.json +11 -1
- package/dist/Actor-DpTj5PFb.d.ts +0 -1
- package/dist/camera-9wWD-pwg.d.ts +0 -4
- package/dist/index-DpTj5PFb.d.ts +0 -1
- package/dist/nationalIds-B91f_RuB.esm.js +0 -99
- package/dist/phoneFormat-DEpESpz2.esm.js +0 -87
- package/dist/tri.esm-Df5eKLsY.esm.js +0 -2165
- package/dist/types-kLsU6Jkt.d.ts +0 -6
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { n as getFlow } from "./flowServices-
|
|
3
|
-
import { i as assign, t as setup } from "./xstate.esm-
|
|
4
|
-
import { n as fromPromise } from "./xstate-actors.esm-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-DSZSaaWr.esm.js";
|
|
2
|
+
import { n as getFlow } from "./flowServices-C23o7MqO.esm.js";
|
|
3
|
+
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
|
+
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
5
5
|
import { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
|
|
6
6
|
import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
|
|
7
|
-
import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-
|
|
8
|
-
import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as
|
|
9
|
-
import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-
|
|
10
|
-
import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-
|
|
7
|
+
import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-Bl_olpdX.esm.js";
|
|
8
|
+
import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as getPostalCodeErrorParams, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
|
|
9
|
+
import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
|
|
10
|
+
import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BzAy6lhp.esm.js";
|
|
11
11
|
//#region src/modules/ekyb/ekybValidators.ts
|
|
12
|
-
const buildPostalCodeParams = (country) => {
|
|
13
|
-
const fixedLen = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
|
|
14
|
-
if (fixedLen !== void 0) return { length: fixedLen };
|
|
15
|
-
let maxLen = getPostalCodeMaxLength(country);
|
|
16
|
-
if (country === "US" || country === "BR") maxLen = maxLen - 1;
|
|
17
|
-
return { maxLength: maxLen };
|
|
18
|
-
};
|
|
19
12
|
const createValidators = () => ({
|
|
20
13
|
required: (value, _rule, field) => {
|
|
21
14
|
if (value.trim().length > 0) return void 0;
|
|
@@ -39,7 +32,7 @@ const createValidators = () => ({
|
|
|
39
32
|
if (validatePostalCode(value, rule.country)) return void 0;
|
|
40
33
|
return {
|
|
41
34
|
key: getPostalCodeErrorKey(rule.country),
|
|
42
|
-
params:
|
|
35
|
+
params: getPostalCodeErrorParams(rule.country)
|
|
43
36
|
};
|
|
44
37
|
}
|
|
45
38
|
});
|
|
@@ -344,7 +337,8 @@ const EKYB_SUPPORTED_IDS = {
|
|
|
344
337
|
groupRules: /* @__PURE__ */ new Set(),
|
|
345
338
|
optionLists: new Set(Object.keys(OPTION_LISTS)),
|
|
346
339
|
conditions: /* @__PURE__ */ new Set(),
|
|
347
|
-
prefillSources: /* @__PURE__ */ new Set()
|
|
340
|
+
prefillSources: /* @__PURE__ */ new Set(),
|
|
341
|
+
flags: /* @__PURE__ */ new Set()
|
|
348
342
|
};
|
|
349
343
|
/** Today's UBO actions use a fixed limit and a single collection. */
|
|
350
344
|
const UBO_COLLECTION = "ubos";
|
|
@@ -415,8 +409,10 @@ const bundled = createBundledDefinitionSource(EKYB_DEFINITIONS);
|
|
|
415
409
|
/**
|
|
416
410
|
* The resolved definition for this country and configuration, if one applies
|
|
417
411
|
* and the rollout is on. Every country has a builder today, so none is exempt.
|
|
412
|
+
* `useDefinitions` is the rollout answer the machine read once, when it was
|
|
413
|
+
* created.
|
|
418
414
|
*/
|
|
419
|
-
function selectEkybForm(config, verificationFields, country, useDefinitions
|
|
415
|
+
function selectEkybForm(config, verificationFields, country, useDefinitions) {
|
|
420
416
|
if (!useDefinitions) return void 0;
|
|
421
417
|
const context = toEkybResolveContext(config, verificationFields);
|
|
422
418
|
if (!context) return void 0;
|
|
@@ -579,9 +575,7 @@ async function fetchEkybModuleConfig(signal) {
|
|
|
579
575
|
}
|
|
580
576
|
/** Submits eKYB business verification */
|
|
581
577
|
async function submitEkyb(data, signal) {
|
|
582
|
-
|
|
583
|
-
if (!res.ok) throw new Error(`POST ${endpoints.ekybSubmit} failed: ${res.status} ${res.statusText}`);
|
|
584
|
-
return res.data;
|
|
578
|
+
return (await api.post(endpoints.ekybSubmit, data, { signal })).data;
|
|
585
579
|
}
|
|
586
580
|
//#endregion
|
|
587
581
|
//#region src/modules/ekyb/ekybActors.ts
|
|
@@ -758,7 +752,8 @@ const ekybMachine = setup({
|
|
|
758
752
|
fillAddressFields: assign(({ context, event }) => {
|
|
759
753
|
const { suggestion } = event;
|
|
760
754
|
const activeFields = new Set(context.fields.map((f) => f.name));
|
|
761
|
-
const { values:
|
|
755
|
+
const { values: filled } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
|
|
756
|
+
const newValues = keepSuggestedStateInOptions(context.fields, context.values, filled);
|
|
762
757
|
const errs = context.validationErrors;
|
|
763
758
|
let newErrors = errs;
|
|
764
759
|
if (errs) {
|
|
@@ -851,7 +846,8 @@ const ekybMachine = setup({
|
|
|
851
846
|
RESULTS: {
|
|
852
847
|
target: "inputting",
|
|
853
848
|
actions: "setAddressSuggestions"
|
|
854
|
-
}
|
|
849
|
+
},
|
|
850
|
+
SUBMIT: { target: "validatingSubmit" }
|
|
855
851
|
}
|
|
856
852
|
},
|
|
857
853
|
validatingSubmit: {
|
package/dist/ekyc-prefill.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
|
|
2
2
|
import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
|
|
3
|
-
import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-
|
|
3
|
+
import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-BcLhkpp8.js";
|
|
4
4
|
//#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
|
package/dist/ekyc-prefill.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-
|
|
2
|
-
import { t as createEkycPrefillManager } from "./ekycPrefillManager-
|
|
1
|
+
import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DqXvupSw.esm.js";
|
|
2
|
+
import { t as createEkycPrefillManager } from "./ekycPrefillManager-C27Cu6rn.esm.js";
|
|
3
3
|
export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
|
package/dist/ekyc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
|
|
2
2
|
import { c as EkycValidationErrors, i as EkycFieldDisplayMode, n as EkycDisplayModes, o as EkycModuleConfig, s as EkycValidationError, t as EkycConfig } from "./types-DEa3taWc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as EkycStep, n as EkycState, r as createEkycManager, s as ekycMachine, t as EkycManager } from "./ekycManager-BKVQazAb.js";
|
|
4
4
|
//#region src/modules/ekyc/ekycUtils.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Normalizes any supported eKYC config input into a manager-ready `EkycConfig`.
|
|
@@ -19,4 +19,4 @@ import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycMana
|
|
|
19
19
|
*/
|
|
20
20
|
declare function toEkycConfig(config: Partial<EkycModuleConfig> & Partial<EkycConfig>): EkycConfig;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { type AddressSuggestion, type EkycConfig, type EkycDisplayModes, type EkycFieldDisplayMode, type EkycManager, type EkycModuleConfig, type EkycState, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
|
|
22
|
+
export { type AddressSuggestion, type EkycConfig, type EkycDisplayModes, type EkycFieldDisplayMode, type EkycManager, type EkycModuleConfig, type EkycState, type EkycStep, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ekycMachine } from "./ekycStateMachine-
|
|
2
|
-
import { l as toEkycConfig } from "./ekycUtils-
|
|
3
|
-
import { t as createEkycManager } from "./ekycManager-
|
|
1
|
+
import { t as ekycMachine } from "./ekycStateMachine-DjiGyQtm.esm.js";
|
|
2
|
+
import { l as toEkycConfig } from "./ekycUtils-D9ui9Ztp.esm.js";
|
|
3
|
+
import { t as createEkycManager } from "./ekycManager-DWCL912J.esm.js";
|
|
4
4
|
export { createEkycManager, ekycMachine, toEkycConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as ActorRefFrom } from "./spawn-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./Actor-
|
|
1
|
+
import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
|
|
2
|
+
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
3
|
+
import "./Actor-DqjOqDfU.js";
|
|
4
4
|
import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
|
|
5
5
|
import { a as EkycFormValues, c as EkycValidationErrors, r as EkycFieldDef, t as EkycConfig } from "./types-DEa3taWc.js";
|
|
6
6
|
//#region src/modules/ekyc/ekycStateMachine.d.ts
|
|
@@ -13,6 +13,17 @@ type CreateEkycActorOptions = {
|
|
|
13
13
|
config: EkycConfig;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
+
//#region src/modules/ekyc/ekycSteps.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* One screen of the eKYC form: a run of visible fields that share a section.
|
|
19
|
+
* `id` is `'personal'` for fields without a section, otherwise the section
|
|
20
|
+
* (`'driverLicense'` or `'address'` today).
|
|
21
|
+
*/
|
|
22
|
+
type EkycStep = {
|
|
23
|
+
id: string;
|
|
24
|
+
fieldNames: string[];
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
16
27
|
//#region src/modules/ekyc/ekycManager.d.ts
|
|
17
28
|
type EkycLoadingState = {
|
|
18
29
|
status: 'loading';
|
|
@@ -29,6 +40,16 @@ type EkycFormState = {
|
|
|
29
40
|
hideEmail: boolean;
|
|
30
41
|
fieldsCountry: string;
|
|
31
42
|
submitError: string;
|
|
43
|
+
/**
|
|
44
|
+
* The form's screens, one per run of visible fields that share a section
|
|
45
|
+
* (`'personal'` for fields without one). A form with one step has a single
|
|
46
|
+
* screen.
|
|
47
|
+
*/
|
|
48
|
+
steps: EkycStep[];
|
|
49
|
+
/** Index into `steps` of the screen the user is on. */
|
|
50
|
+
currentStepIndex: number;
|
|
51
|
+
/** True iff the current step's fields have no validation errors. */
|
|
52
|
+
isStepValid: boolean;
|
|
32
53
|
};
|
|
33
54
|
type EkycSubmittingState = {
|
|
34
55
|
status: 'submitting';
|
|
@@ -64,7 +85,17 @@ declare function createEkycManagerFromActor(actor: EkycActor): Manager<EkycState
|
|
|
64
85
|
searchAddress(query: string): void;
|
|
65
86
|
/** Selects an address suggestion and populates address fields */
|
|
66
87
|
selectAddress(suggestion: AddressSuggestion): void;
|
|
67
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Continues from the current step: validates its fields and moves to the
|
|
90
|
+
* next step when they pass. On the last step it submits, like `submit()`.
|
|
91
|
+
*/
|
|
92
|
+
next(): void;
|
|
93
|
+
/** Returns to the previous step. Keeps values and errors; does not validate. */
|
|
94
|
+
back(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Submits the form. Runs full-form validation whatever the current step;
|
|
97
|
+
* advances only when no errors, otherwise moves to the first step with one.
|
|
98
|
+
*/
|
|
68
99
|
submit(): void;
|
|
69
100
|
/** Retries from failure state, returning to the form */
|
|
70
101
|
retry(): void;
|
|
@@ -84,7 +115,17 @@ declare function createEkycManager(options: CreateEkycActorOptions): Manager<Eky
|
|
|
84
115
|
searchAddress(query: string): void;
|
|
85
116
|
/** Selects an address suggestion and populates address fields */
|
|
86
117
|
selectAddress(suggestion: AddressSuggestion): void;
|
|
87
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Continues from the current step: validates its fields and moves to the
|
|
120
|
+
* next step when they pass. On the last step it submits, like `submit()`.
|
|
121
|
+
*/
|
|
122
|
+
next(): void;
|
|
123
|
+
/** Returns to the previous step. Keeps values and errors; does not validate. */
|
|
124
|
+
back(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Submits the form. Runs full-form validation whatever the current step;
|
|
127
|
+
* advances only when no errors, otherwise moves to the first step with one.
|
|
128
|
+
*/
|
|
88
129
|
submit(): void;
|
|
89
130
|
/** Retries from failure state, returning to the form */
|
|
90
131
|
retry(): void;
|
|
@@ -95,4 +136,4 @@ declare function createEkycManager(options: CreateEkycActorOptions): Manager<Eky
|
|
|
95
136
|
};
|
|
96
137
|
type EkycManager = ReturnType<typeof createEkycManager>;
|
|
97
138
|
//#endregion
|
|
98
|
-
export {
|
|
139
|
+
export { EkycStep as a, createEkycManagerFromActor as i, EkycState as n, EkycActor as o, createEkycManager as r, ekycMachine as s, EkycManager as t };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-CsPmTidH.esm.js";
|
|
2
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
|
+
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
+
import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-DjiGyQtm.esm.js";
|
|
5
7
|
//#region src/modules/ekyc/ekycActor.ts
|
|
6
8
|
/**
|
|
7
9
|
* Creates and starts an eKYC actor.
|
|
@@ -44,18 +46,25 @@ function mapState(snapshot) {
|
|
|
44
46
|
const typedSnapshot = snapshot;
|
|
45
47
|
const { context } = typedSnapshot;
|
|
46
48
|
if (typedSnapshot.matches("idle") || typedSnapshot.matches("loading") || typedSnapshot.matches("prefilling")) return { status: "loading" };
|
|
47
|
-
if (typedSnapshot.matches("form"))
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
if (typedSnapshot.matches("form")) {
|
|
50
|
+
const steps = buildEkycSteps(context.fields, context.hideEmail);
|
|
51
|
+
const currentStepIndex = clampStepIndex(context.currentStepIndex, steps);
|
|
52
|
+
return {
|
|
53
|
+
status: "form",
|
|
54
|
+
fields: context.fields,
|
|
55
|
+
values: context.values,
|
|
56
|
+
validationErrors: context.validationErrors,
|
|
57
|
+
isValid: Object.keys(context.validationErrors ?? {}).length === 0,
|
|
58
|
+
addressSuggestions: context.addressSuggestions,
|
|
59
|
+
prefilled: context.prefilled,
|
|
60
|
+
hideEmail: context.hideEmail,
|
|
61
|
+
fieldsCountry: context.fieldsCountry,
|
|
62
|
+
submitError: context.submitError,
|
|
63
|
+
steps,
|
|
64
|
+
currentStepIndex,
|
|
65
|
+
isStepValid: isStepValid(steps[currentStepIndex], context.validationErrors)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
59
68
|
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
60
69
|
if (typedSnapshot.matches("success")) return { status: "success" };
|
|
61
70
|
if (typedSnapshot.matches("error")) return {
|
|
@@ -102,7 +111,21 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
102
111
|
suggestion
|
|
103
112
|
});
|
|
104
113
|
},
|
|
105
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Continues from the current step: validates its fields and moves to the
|
|
116
|
+
* next step when they pass. On the last step it submits, like `submit()`.
|
|
117
|
+
*/
|
|
118
|
+
next() {
|
|
119
|
+
actor.send({ type: "NEXT_STEP" });
|
|
120
|
+
},
|
|
121
|
+
/** Returns to the previous step. Keeps values and errors; does not validate. */
|
|
122
|
+
back() {
|
|
123
|
+
actor.send({ type: "PREVIOUS_STEP" });
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* Submits the form. Runs full-form validation whatever the current step;
|
|
127
|
+
* advances only when no errors, otherwise moves to the first step with one.
|
|
128
|
+
*/
|
|
106
129
|
submit() {
|
|
107
130
|
trackElementClicked?.("submit");
|
|
108
131
|
actor.send({ type: "SUBMIT" });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
1
|
+
import { A as MachineSnapshot, O as PromiseActorLogic, S as RequiredLogicInput, T as Values, _ as IsNotNever, a as ActorRefFromLogic, b as NonReducibleUnknown, c as AnyEventObject, g as InputFrom, h as GetConcreteByKey, i as ActorRefFrom, j as StateMachine, m as EventObject, o as AnyActorLogic, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, w as StateValue, x as RequiredActorOptions, y as MetaObject } from "./spawn-COZKetCS.js";
|
|
2
|
+
import "./xstate.cjs-D6Ur0X1F.js";
|
|
3
|
+
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
4
|
+
import "./Actor-DqjOqDfU.js";
|
|
4
5
|
import { a as EkycFormValues, c as EkycValidationErrors } from "./types-DEa3taWc.js";
|
|
5
6
|
import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, d as EkycPrefillSubmitResponse, i as EkycPrefillErrorKind, o as EkycPrefillInput, r as EkycPrefillContext, t as EkycPrefillConfig, u as EkycPrefillSubmitPlan } from "./types-B-PIc0en.js";
|
|
6
7
|
//#region src/modules/ekyc-prefill/ekycPrefillStateMachine.d.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
2
|
+
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
|
+
import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DqXvupSw.esm.js";
|
|
3
4
|
//#region src/modules/ekyc-prefill/ekycPrefillActor.ts
|
|
4
5
|
/** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
|
|
5
6
|
function createEkycPrefillActor(options = {}) {
|
package/dist/{ekycPrefillStateMachine-Dku90kZL.esm.js → ekycPrefillStateMachine-DqXvupSw.esm.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-DSZSaaWr.esm.js";
|
|
2
|
+
import { i as toIncodeApiError } from "./apiError-BDuL1wTs.esm.js";
|
|
3
3
|
import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
4
|
-
import { i as assign, t as setup } from "./xstate.esm-
|
|
5
|
-
import { n as fromPromise } from "./xstate-actors.esm-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { t as formatCPF } from "./idOcrCpfUtils-
|
|
4
|
+
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
|
+
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
6
|
+
import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-1hyjJ6bw.esm.js";
|
|
7
|
+
import { t as createBundledDefinitionSource } from "./definitionSource-Nw0YCbpe.esm.js";
|
|
8
|
+
import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
|
|
9
|
+
import { t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
|
|
10
|
+
import { t as formatCPF } from "./idOcrCpfUtils-D5Gwskxu.esm.js";
|
|
11
11
|
//#region src/modules/ekyc-prefill/ekycPrefillConfig.ts
|
|
12
12
|
const isString = (value) => typeof value === "string" && value !== "";
|
|
13
13
|
function toConfigField(raw) {
|
|
@@ -180,7 +180,8 @@ const EKYC_PREFILL_SUPPORTED_IDS = {
|
|
|
180
180
|
groupRules: /* @__PURE__ */ new Set(["oneOfRequired"]),
|
|
181
181
|
optionLists: /* @__PURE__ */ new Set(),
|
|
182
182
|
conditions: /* @__PURE__ */ new Set(),
|
|
183
|
-
prefillSources: /* @__PURE__ */ new Set()
|
|
183
|
+
prefillSources: /* @__PURE__ */ new Set(),
|
|
184
|
+
flags: /* @__PURE__ */ new Set()
|
|
184
185
|
};
|
|
185
186
|
const bundled = createBundledDefinitionSource(EKYCPREFILL_DEFINITIONS);
|
|
186
187
|
/** The catalog definition for a country, or `undefined` when it has none. */
|
|
@@ -433,9 +434,7 @@ function buildSubmitBody(submit, values) {
|
|
|
433
434
|
*/
|
|
434
435
|
async function submitEkycPrefill(body, signal) {
|
|
435
436
|
try {
|
|
436
|
-
|
|
437
|
-
if (!res.ok) throw res;
|
|
438
|
-
return res.data;
|
|
437
|
+
return (await api.post(endpoints.ekycPrefillSubmit, body, { signal })).data;
|
|
439
438
|
} catch (error) {
|
|
440
439
|
throw toIncodeApiError(endpoints.ekycPrefillSubmit, error);
|
|
441
440
|
}
|
|
@@ -1,10 +1,202 @@
|
|
|
1
1
|
import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
2
|
import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { t as isValidCurp } from "./curp-DZGvefg3.esm.js";
|
|
4
|
+
import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
|
|
5
|
+
import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-Nw0YCbpe.esm.js";
|
|
6
|
+
import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
|
|
7
|
+
import { t as validateCPF } from "./cpf-DDXMTLYr.esm.js";
|
|
8
|
+
import { n as hasAllowedCharacters } from "./phoneFormat-C3q0Ukh4.esm.js";
|
|
9
|
+
//#region src/internal/forms/checks/esDni.ts
|
|
10
|
+
const DNI_LETTERS = "TRWAGMYFPDXBNJZSQVHLCKE";
|
|
11
|
+
/**
|
|
12
|
+
* Spanish DNI: 8 digits and the check letter for their value modulo 23
|
|
13
|
+
* (`12345678Z`). A space or hyphen before the letter is ignored. NIEs, the
|
|
14
|
+
* foreigners' IDs, are not DNIs and fail.
|
|
15
|
+
*/
|
|
16
|
+
function isValidEsDni(value) {
|
|
17
|
+
const dni = value.replace(/[\s-]/g, "").toUpperCase();
|
|
18
|
+
const match = /^([0-9]{8})([A-Z])$/.exec(dni);
|
|
19
|
+
if (!match) return false;
|
|
20
|
+
const [, digits, letter] = match;
|
|
21
|
+
return DNI_LETTERS[Number(digits) % 23] === letter;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/internal/forms/checks/fiPersonalIdentityCode.ts
|
|
25
|
+
const FI_CHECK_CHARACTERS = "0123456789ABCDEFHJKLMNPRSTUVWXY";
|
|
26
|
+
/** The first year of each century sign; the 2023 reform added Y-U and B-F. */
|
|
27
|
+
const FI_CENTURY = {
|
|
28
|
+
"+": 1800,
|
|
29
|
+
"-": 1900,
|
|
30
|
+
Y: 1900,
|
|
31
|
+
X: 1900,
|
|
32
|
+
W: 1900,
|
|
33
|
+
V: 1900,
|
|
34
|
+
U: 1900,
|
|
35
|
+
A: 2e3,
|
|
36
|
+
B: 2e3,
|
|
37
|
+
C: 2e3,
|
|
38
|
+
D: 2e3,
|
|
39
|
+
E: 2e3,
|
|
40
|
+
F: 2e3
|
|
41
|
+
};
|
|
42
|
+
const isLeapYear = (year) => year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
|
43
|
+
const daysInMonth = (year, month) => month === 2 ? isLeapYear(year) ? 29 : 28 : [
|
|
44
|
+
4,
|
|
45
|
+
6,
|
|
46
|
+
9,
|
|
47
|
+
11
|
|
48
|
+
].includes(month) ? 30 : 31;
|
|
49
|
+
/**
|
|
50
|
+
* Finnish personal identity code (henkilötunnus): `DDMMYY`, a century sign,
|
|
51
|
+
* a 3-digit individual number and a check character for the 9 digits modulo
|
|
52
|
+
* 31 (`131052-308T`). The date must exist.
|
|
53
|
+
*/
|
|
54
|
+
function isValidFiPersonalIdentityCode(value) {
|
|
55
|
+
const match = /^([0-9]{2})([0-9]{2})([0-9]{2})([-+A-FU-Y])([0-9]{3})([0-9A-Y])$/.exec(value.trim().toUpperCase());
|
|
56
|
+
if (!match) return false;
|
|
57
|
+
const [, dd, mm, yy, sign, individual, check] = match;
|
|
58
|
+
const year = FI_CENTURY[sign] + Number(yy);
|
|
59
|
+
const month = Number(mm);
|
|
60
|
+
const day = Number(dd);
|
|
61
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) return false;
|
|
62
|
+
return FI_CHECK_CHARACTERS[Number(`${dd}${mm}${yy}${individual}`) % 31] === check;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/internal/forms/checks/inDrivingLicenseNumber.ts
|
|
66
|
+
const IN_DRIVING_LICENSE_REGEX = /^[A-Z]{2}[-\s]?[0-9]{2}(?:[0-9]{2})?[-\s]?(?:19|20)[0-9]{2}[-\s]?[0-9]{7}$/i;
|
|
67
|
+
/**
|
|
68
|
+
* Indian driving licence number format, `SS-RR[RR]-YYYY-NNNNNNN`, with or
|
|
69
|
+
* without hyphens (`MH-12-2011-0012345`, `MH1220110012345`). Format only:
|
|
70
|
+
* the number has no check digit.
|
|
71
|
+
*/
|
|
72
|
+
function isValidInDrivingLicenseNumber(value) {
|
|
73
|
+
return IN_DRIVING_LICENSE_REGEX.test(value.trim());
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/internal/forms/checks/rut.ts
|
|
77
|
+
/**
|
|
78
|
+
* Chilean RUT/RUN: a 7- or 8-digit body and a check character, 0-9 or K,
|
|
79
|
+
* computed modulo 11. Dots, a hyphen and spaces are ignored
|
|
80
|
+
* (`12.345.678-5`, `12345678-5`, `123456785`).
|
|
81
|
+
*/
|
|
82
|
+
function isValidRut(value) {
|
|
83
|
+
const rut = value.replace(/[.\s-]/g, "").toUpperCase();
|
|
84
|
+
const match = /^([0-9]{7,8})([0-9K])$/.exec(rut);
|
|
85
|
+
if (!match) return false;
|
|
86
|
+
const [, body, check] = match;
|
|
87
|
+
let sum = 0;
|
|
88
|
+
let factor = 2;
|
|
89
|
+
for (let i = body.length - 1; i >= 0; i--) {
|
|
90
|
+
sum += Number(body[i]) * factor;
|
|
91
|
+
factor = factor === 7 ? 2 : factor + 1;
|
|
92
|
+
}
|
|
93
|
+
const rest = 11 - sum % 11;
|
|
94
|
+
return check === (rest === 11 ? "0" : rest === 10 ? "K" : String(rest));
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/internal/forms/checks/digitCount.ts
|
|
98
|
+
/** `digitCount`: only the digits 0-9, with a count in `lengths` or between `min` and `max`. */
|
|
99
|
+
function hasDigitCount(value, count) {
|
|
100
|
+
if (!/^[0-9]+$/.test(value)) return false;
|
|
101
|
+
const { length } = value;
|
|
102
|
+
if (count.lengths) return count.lengths.includes(length);
|
|
103
|
+
return (count.min === void 0 || length >= count.min) && (count.max === void 0 || length <= count.max);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The `digitCount` message: one length (`exactDigits`), a list of lengths
|
|
107
|
+
* (`digitsOneOf`), or a range (`digitsBetween`), with the counts as params.
|
|
108
|
+
*/
|
|
109
|
+
function digitCountError(count) {
|
|
110
|
+
if (count.lengths?.length === 1) return {
|
|
111
|
+
key: "verification.errors.exactDigits",
|
|
112
|
+
params: { length: count.lengths[0] }
|
|
113
|
+
};
|
|
114
|
+
if (count.lengths) return {
|
|
115
|
+
key: "verification.errors.digitsOneOf",
|
|
116
|
+
params: { lengths: [...count.lengths] }
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
key: "verification.errors.digitsBetween",
|
|
120
|
+
params: {
|
|
121
|
+
min: count.min ?? 0,
|
|
122
|
+
max: count.max ?? 0
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/internal/forms/checks/emailFormat.ts
|
|
128
|
+
/** One `@`, no whitespace, and a dot inside the domain. */
|
|
129
|
+
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
130
|
+
/** Whether a value has an email's shape: one `@`, no spaces, a dot in the domain. */
|
|
131
|
+
function isEmailFormat(value) {
|
|
132
|
+
return EMAIL_PATTERN.test(value);
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/internal/forms/checks/noPoBox.ts
|
|
136
|
+
const PO_BOX_PATTERN = /POBox|P\.O\.Box|pobox|postofficebox|postbox|po\.box|p\.o\.box/i;
|
|
137
|
+
/** Whether an address describes a P.O. box, ignoring whitespace and case. */
|
|
138
|
+
function isPoBox(address) {
|
|
139
|
+
return PO_BOX_PATTERN.test(address.replace(/\s/g, ""));
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/internal/forms/checks/charTemplate.ts
|
|
143
|
+
const escapeForPattern = (chars) => chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
144
|
+
/**
|
|
145
|
+
* `charTemplate`: the whole value matches one template, where `9` is a digit,
|
|
146
|
+
* `A` an uppercase letter A-Z and any other character stands for itself.
|
|
147
|
+
* `ignoreCase` also accepts lowercase letters and literals in either case.
|
|
148
|
+
*/
|
|
149
|
+
function matchesCharTemplate(value, templates, ignoreCase = false) {
|
|
150
|
+
return templates.some((template) => {
|
|
151
|
+
const pattern = [...template].map((char) => {
|
|
152
|
+
if (char === "9") return "[0-9]";
|
|
153
|
+
if (char === "A") return "[A-Z]";
|
|
154
|
+
return escapeForPattern(char);
|
|
155
|
+
}).join("");
|
|
156
|
+
return new RegExp(`^${pattern}$`, ignoreCase ? "iu" : "u").test(value);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/internal/forms/checks/maxAge.ts
|
|
161
|
+
/**
|
|
162
|
+
* `maxAge`: an ISO `YYYY-MM-DD` date of birth at most `years` full years
|
|
163
|
+
* before `today`, also ISO, in the user's calendar. As in SDK1, someone turns
|
|
164
|
+
* a year older on their birthday. Field structure validation checks calendar
|
|
165
|
+
* dates before this age rule runs.
|
|
166
|
+
*/
|
|
167
|
+
function isWithinMaxAge(value, today, years) {
|
|
168
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
|
|
169
|
+
const [birthYear, birthMonthDay] = [value.slice(0, 4), value.slice(5)];
|
|
170
|
+
const [todayYear, todayMonthDay] = [today.slice(0, 4), today.slice(5)];
|
|
171
|
+
return Number(todayYear) - Number(birthYear) - (todayMonthDay < birthMonthDay ? 1 : 0) <= years;
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/internal/forms/checks/nameCharacters.ts
|
|
175
|
+
const NAME_REGEX = /^[\p{L}\p{M} '’-]+$/u;
|
|
176
|
+
/** `nameCharacters`: letters from any script, spaces, hyphens and apostrophes. */
|
|
177
|
+
function hasNameCharacters(value) {
|
|
178
|
+
return NAME_REGEX.test(value);
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/internal/forms/checks/notFuture.ts
|
|
182
|
+
/**
|
|
183
|
+
* `notFuture`: an ISO `YYYY-MM-DD` date on or before `today`, also ISO, in
|
|
184
|
+
* the user's calendar. Field structure validation checks calendar dates
|
|
185
|
+
* before this range rule runs.
|
|
186
|
+
*/
|
|
187
|
+
function isNotFuture(value, today) {
|
|
188
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
|
|
189
|
+
return value <= today;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/internal/forms/checks/numericRange.ts
|
|
193
|
+
/** `numericRange`: a whole number from `min` to `max`. */
|
|
194
|
+
function isInNumericRange(value, min, max) {
|
|
195
|
+
if (!/^-?[0-9]+$/.test(value)) return false;
|
|
196
|
+
const number = Number(value);
|
|
197
|
+
return number >= min && number <= max;
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
8
200
|
//#region src/modules/ekyc/ekycValidators.ts
|
|
9
201
|
async function loadPhoneValidator() {
|
|
10
202
|
if (!await loadPhoneValidation()) throw new Error("Failed to load the phone validation rules");
|
|
@@ -25,11 +217,6 @@ function formatSSN(value) {
|
|
|
25
217
|
function cleanName(name) {
|
|
26
218
|
return (name ?? "").replace(/[^\p{L}\p{M}\s,'’´-]/gu, "").slice(0, 100);
|
|
27
219
|
}
|
|
28
|
-
const PO_BOX_REGEX = /POBox|P\.O\.Box|pobox|postofficebox|postbox|po\.box|p\.o\.box/i;
|
|
29
|
-
/** Returns true if the address looks like a P.O. Box */
|
|
30
|
-
function isPoBox(address) {
|
|
31
|
-
return PO_BOX_REGEX.test(address.replace(/\s/g, ""));
|
|
32
|
-
}
|
|
33
220
|
function validatePhone(phone, country) {
|
|
34
221
|
return getPhoneValidation()?.isValid(phone, country) ?? false;
|
|
35
222
|
}
|
|
@@ -42,24 +229,6 @@ const ONE_OF_REQUIRED_ERROR_KEY = "verification.errors.dobOrSsnRequired";
|
|
|
42
229
|
const oneOfRequiredErrorKey = (rule) => rule.message ?? "verification.errors.dobOrSsnRequired";
|
|
43
230
|
const PHONE_INVALID_KEY = "verification.errors.phoneInvalid";
|
|
44
231
|
const INVALID_ID_NUMBER_KEY = "verification.errors.invalidIdNumber";
|
|
45
|
-
/** The digitCount message: one length, a list of lengths, or a range. */
|
|
46
|
-
const digitCountError = (rule) => {
|
|
47
|
-
if (rule.lengths?.length === 1) return {
|
|
48
|
-
key: "verification.errors.exactDigits",
|
|
49
|
-
params: { length: rule.lengths[0] }
|
|
50
|
-
};
|
|
51
|
-
if (rule.lengths) return {
|
|
52
|
-
key: "verification.errors.digitsOneOf",
|
|
53
|
-
params: { lengths: rule.lengths }
|
|
54
|
-
};
|
|
55
|
-
return {
|
|
56
|
-
key: "verification.errors.digitsBetween",
|
|
57
|
-
params: {
|
|
58
|
-
min: rule.min ?? 0,
|
|
59
|
-
max: rule.max ?? 0
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
232
|
/**
|
|
64
233
|
* A national ID check: blank passes, anything else must satisfy `isValid`.
|
|
65
234
|
* The error is the vocabulary's message for these rules; a definition names
|
|
@@ -72,14 +241,6 @@ const idNumberValidator = (isValid) => (value) => {
|
|
|
72
241
|
};
|
|
73
242
|
const normalizeFieldValue = (value) => typeof value === "string" ? value : String(value ?? "");
|
|
74
243
|
const SSN_FORMAT_REGEX = /^\d{3}-\d{2}-\d{4}$/;
|
|
75
|
-
const EMAIL_FORMAT_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
76
|
-
const buildPostalCodeParams = (country) => {
|
|
77
|
-
const fixedLen = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
|
|
78
|
-
if (fixedLen !== void 0) return { length: fixedLen };
|
|
79
|
-
let maxLen = getPostalCodeMaxLength(country);
|
|
80
|
-
if (country === "US" || country === "BR") maxLen = maxLen - 1;
|
|
81
|
-
return { maxLength: maxLen };
|
|
82
|
-
};
|
|
83
244
|
const requiredError = (field) => {
|
|
84
245
|
const fieldName = field.displayLabel ?? field.label;
|
|
85
246
|
return fieldName ? {
|
|
@@ -128,7 +289,7 @@ const createValidators = () => {
|
|
|
128
289
|
if (validatePostalCode(value, rule.country)) return void 0;
|
|
129
290
|
return {
|
|
130
291
|
key: getPostalCodeErrorKey(rule.country),
|
|
131
|
-
params:
|
|
292
|
+
params: getPostalCodeErrorParams(rule.country)
|
|
132
293
|
};
|
|
133
294
|
},
|
|
134
295
|
phoneFormat: (value, rule) => {
|
|
@@ -139,7 +300,7 @@ const createValidators = () => {
|
|
|
139
300
|
},
|
|
140
301
|
emailFormat: (value) => {
|
|
141
302
|
if (value.trim().length === 0) return void 0;
|
|
142
|
-
return
|
|
303
|
+
return isEmailFormat(value) ? void 0 : { key: "verification.errors.emailInvalid" };
|
|
143
304
|
},
|
|
144
305
|
exactLength: (value, rule) => {
|
|
145
306
|
if (rule.type !== "exactLength") return void 0;
|
|
@@ -214,6 +375,8 @@ const withRuleMessage = (error, rule) => !rule.message || error.key === rule.mes
|
|
|
214
375
|
key: rule.message
|
|
215
376
|
};
|
|
216
377
|
const evaluateRules = (value, rules, field, values, validators) => {
|
|
378
|
+
const dateError = field.type === "date" ? calendarDateError(value.trim()) : void 0;
|
|
379
|
+
if (dateError) return { key: dateError };
|
|
217
380
|
if (!rules) return void 0;
|
|
218
381
|
for (const rule of rules) {
|
|
219
382
|
const error = validators[rule.type](value, rule, field, values);
|