@incodetech/core 2.4.1 → 2.5.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actor-DqjOqDfU.d.ts +1 -0
- package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
- package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-ppyMYVoY.esm.js} +7 -744
- package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
- package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-n9u4dEn_.esm.js} +28 -64
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +33 -6
- package/dist/Manager-BvXAwDv9.esm.js +125 -0
- package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
- package/dist/MultipartRecordingProvider-CduV32Qa.esm.js +151 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-ixfy84ys.d.ts} +13 -4
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-0xTxgP0R.esm.js} +114 -25
- package/dist/WorkerEncoderRecordingProvider-CsDED9UU.esm.js +80 -0
- package/dist/addressSearch-Rxm1K67A.esm.js +73 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
- 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-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-DKNOi9-z.esm.js} +5 -3
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BJ6PmCsw.esm.js} +3 -3
- package/dist/{api-Cz90EHyu.esm.js → api-CZpuJuZl.esm.js} +11 -6
- package/dist/{apiError-9Yi8xMeB.esm.js → apiError-CtArBUt-.esm.js} +1 -1
- package/dist/attemptCarry-BecGGZK8.esm.js +45 -0
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-9N3eg3Uh.esm.js} +7 -6
- package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-DRaugLgH.d.ts} +2 -2
- package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-DoK5RKIS.esm.js} +50 -18
- package/dist/avatar.d.ts +1 -1
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
- package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
- package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
- 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-BfeMv2PU.esm.js → certificateIssuanceManager-DaUklfNj.esm.js} +5 -3
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-_EQcjGE3.esm.js} +4 -4
- package/dist/cnpj-Bl_olpdX.esm.js +79 -0
- package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-BPocwpm2.esm.js} +7 -4
- package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-vI6QHkHU.d.ts} +16 -8
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DgiIcT9q.esm.js} +22 -9
- package/dist/cpf-DDXMTLYr.esm.js +37 -0
- package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +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-Cu141CE8.esm.js → crossDocumentDataMatchManager-BfA29Aji.esm.js} +6 -4
- 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-B-z9q5V3.esm.js → curpValidationManager-CbvBDoE1.esm.js} +6 -3
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-Ci2iVuog.d.ts} +4 -4
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BQ8XK2Y3.esm.js} +30 -22
- 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-D1ex2cFM.esm.js → customFieldsManager-BRqSCR9R.esm.js} +6 -4
- package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-Bd1ooIDB.esm.js} +5 -3
- package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-r8nGhyo1.esm.js} +3 -3
- package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-zG373VVx.esm.js} +39 -69
- package/dist/definitionSource-Nw0YCbpe.esm.js +221 -0
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BKFjsQpO.esm.js} +178 -41
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-BKaJVQxg.esm.js} +30 -20
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CoGcEiMK.d.ts} +42 -8
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BYLb5Azk.esm.js} +107 -58
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-BfQKWG7a.esm.js} +5 -3
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
- package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-CRq01QNK.esm.js} +4 -4
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-B489iXyO.esm.js} +5 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
- package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-DZxg8T0H.esm.js} +40 -56
- package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
- package/dist/ekyc-prefill.d.ts +17 -0
- package/dist/ekyc-prefill.esm.js +3 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-nRT0rxei.esm.js} +39 -16
- package/dist/ekycPrefillManager-BXWDF7vT.esm.js +103 -0
- package/dist/ekycPrefillManager-DOTl3Y2w.d.ts +566 -0
- package/dist/ekycPrefillStateMachine-CuWTVze1.esm.js +687 -0
- package/dist/ekycRules-DXP2hqVw.esm.js +479 -0
- package/dist/ekycStateMachine-nwJRel2s.esm.js +7897 -0
- package/dist/ekycUtils-FcqA6oU4.esm.js +1491 -0
- 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-CjKvJ6E-.esm.js → electronicSignatureManager-BcE0XMrN.esm.js} +8 -6
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-Co4jarT1.esm.js} +5 -3
- package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-CTEaYncs.esm.js} +34 -22
- package/dist/events-CP3yOzAl.esm.js +299 -0
- package/dist/events.d.ts +3 -1
- package/dist/events.esm.js +2 -1
- package/dist/extensibility.d.ts +43 -41
- package/dist/extensibility.esm.js +39 -37
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-BBQzNrku.esm.js} +17 -6
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-CRGajjZ4.d.ts} +84 -72
- package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-D8_ilXFc.esm.js} +117 -482
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-CGmNGbov.esm.js} +5 -3
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-BuHt7kec.esm.js} +68 -29
- package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-SIBmKJs8.esm.js} +35 -21
- 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-v3knTYV_.esm.js → fieldComparisonManager-VgCU4X96.esm.js} +6 -4
- 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-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-DOLq45ph.esm.js} +8 -6
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +75 -24
- package/dist/flow.esm.js +288 -70
- package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-BFCddN3G.esm.js} +24 -3
- package/dist/{flowServices-X6Rwf_7E.esm.js → flowServices-NX4ksmS5.esm.js} +447 -183
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
- package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-D1Ga7_lB.esm.js} +9 -9
- package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-oPgI5FIQ.esm.js} +14 -10
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-6JQQkzha.esm.js} +5 -3
- package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-wBunpfQ9.esm.js} +3 -3
- 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 +2 -2
- package/dist/id-ocr.esm.js +3 -19
- package/dist/id-selfie-flow.d.ts +6 -5
- package/dist/id-selfie-flow.esm.js +13 -11
- package/dist/id-verification.d.ts +1 -1
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +4 -17
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Drh207VJ.esm.js} +3 -3
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-Cqx2y_fC.d.ts} +76 -12
- package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-DjZyIbxc.esm.js} +68 -19
- package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-DWs9Fb58.esm.js} +29 -198
- package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-BGMkWF9t.esm.js} +961 -553
- package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-DflRx-_u.d.ts} +6 -5
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-im7VfJQi.esm.js} +5 -3
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B832arAl.esm.js} +11 -10
- package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-PMGM4hXY.esm.js} +5 -3
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DeeugC00.esm.js} +3 -3
- 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 +97 -0
- package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-C40ngKeM.d.ts} +86 -19
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CjFZ7WRa.esm.js} +9 -4
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-CLFjPp13.esm.js} +22 -25
- package/dist/index-DHuAkTe0.d.ts +1 -0
- package/dist/{index-CKQ9QBZP.d.ts → index-DxYNO94y.d.ts} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-lXP41N7b.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
- package/dist/kybChecksManager-eRU3ht0m.esm.js +90 -0
- package/dist/kybChecksStateMachine-CU0oIYDR.esm.js +720 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-C1B2ERZk.d.ts} +28 -11
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-Dh3pBhOe.esm.js} +7 -4
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-BjuI72HZ.esm.js} +32 -13
- package/dist/mediaRecorderOptions-g1TwTlhd.esm.js +87 -0
- package/dist/multipartRecordingService-WgK8ieRI.esm.js +407 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-pcrrqrPR.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DFJlH7K3.esm.js} +11 -9
- package/dist/phone-number.d.ts +7 -1
- package/dist/phone-number.esm.js +15 -2
- 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-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-rA7updqF.esm.js} +6 -4
- package/dist/phoneServices-CFXcwCFr.esm.js +77 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DKdY2Scx.esm.js} +56 -84
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
- package/dist/processFaceMatch-B_DkDTE5.esm.js +21 -0
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-DxiwS8TV.esm.js +397 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-DjsEtWLq.esm.js} +9 -6
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-pT6FiPE7.d.ts} +6 -4
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CMjjUXSu.esm.js} +67 -28
- package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
- package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-CJ_aQO92.esm.js} +9 -7
- package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-C9kbIDeX.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +13 -12
- package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-DUokfsv4.esm.js} +1 -1
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DihwheJ6.d.ts} +2 -2
- package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-uJtbzEp9.esm.js} +7 -6
- package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-CKXAmNkA.esm.js} +5 -5
- package/dist/{session-CNUfjlRc.esm.js → session-Bk2K8TEv.esm.js} +77 -9
- package/dist/session.d.ts +96 -10
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-CUCBGZ_s.esm.js} +359 -115
- package/dist/{setup-C5tfWt6W.esm.js → setup-B3a5KQeI.esm.js} +36 -27
- package/dist/{setup-YPKTUCY5.d.ts → setup-DpOr8H_l.d.ts} +2 -2
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BgAja97K.esm.js} +5 -3
- package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-CVPmvU2p.esm.js} +3 -3
- package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-DoByUnTa.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-BnQDjqUu.esm.js} +22 -10
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +5 -3
- package/dist/{types-yPH8lAH-.d.ts → types-9wlf1-GE.d.ts} +3 -3
- package/dist/types-B-PIc0en.d.ts +115 -0
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
- package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
- package/dist/types-CE1jkHw3.d.ts +6 -0
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/{types-BAxn7MpY.d.ts → types-Cpdum4vi.d.ts} +125 -50
- package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
- package/dist/types-DEa3taWc.d.ts +217 -0
- package/dist/{types-CK8Jbjkp.d.ts → types-DFP7eSle.d.ts} +1 -1
- package/dist/{types-Ckir_BEs.d.ts → types-DJPU3W2M.d.ts} +3 -2
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/{events-Du2A4-Qr.esm.js → types-DYYMdAGv.esm.js} +4 -299
- package/dist/{types-B6HsSzpk.d.ts → types-Ddc4Tr_f.d.ts} +42 -6
- package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
- package/dist/usStates-CwOQ2kAx.esm.js +209 -0
- package/dist/video-selfie.d.ts +16 -14
- package/dist/video-selfie.esm.js +100 -24
- package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-CgqaNI-W.esm.js} +26 -27
- package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DRrh4P0A.d.ts} +10 -5
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
- package/dist/{warmup-BElYWRh7.esm.js → warmup-BZOMg303.esm.js} +243 -30
- package/dist/wasm.d.ts +9 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DPK7qGgo.esm.js} +1 -1
- package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-CyLCM31e.esm.js} +45 -26
- package/dist/watchlist-for-business.d.ts +2 -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-CZZOFkGl.esm.js → watchlistForBusinessManager-BH6M4kqA.esm.js} +40 -8
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
- package/dist/watchlistForBusinessStateMachine-BMWm5mcP.esm.js +166 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BDaVjzLW.esm.js} +5 -3
- package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Cx-6QAvu.esm.js} +3 -3
- package/dist/workflow.d.ts +234 -45
- package/dist/workflow.esm.js +194 -80
- 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 +22 -5
- package/dist/Actor-DpTj5PFb.d.ts +0 -1
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/cpf-uAZTPUBy.esm.js +0 -61
- package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/index-DpTj5PFb.d.ts +0 -1
- package/dist/types-BvLo3U4u.d.ts +0 -134
- package/dist/types-zOgZqMni.d.ts +0 -6
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
package/dist/watchlist.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as WatchlistState, o as watchlistMachine, r as createWatchlistManager, t as WatchlistManager } from "./watchlistManager-
|
|
1
|
+
import { n as WatchlistState, o as watchlistMachine, r as createWatchlistManager, t as WatchlistManager } from "./watchlistManager-DQq4GxBO.js";
|
|
2
2
|
//#region src/modules/watchlist/types.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for the global watchlist module.
|
package/dist/watchlist.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as watchlistMachine } from "./watchlistStateMachine-
|
|
2
|
-
import { t as createWatchlistManager } from "./watchlistManager-
|
|
1
|
+
import { t as watchlistMachine } from "./watchlistStateMachine-Cx-6QAvu.esm.js";
|
|
2
|
+
import { t as createWatchlistManager } from "./watchlistManager-BDaVjzLW.esm.js";
|
|
3
3
|
export { createWatchlistManager, watchlistMachine };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { n as eventModuleNames
|
|
1
|
+
import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-CP3yOzAl.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 { n as watchlistForBusinessMachine, t as getMaxDateOfIncorporation } from "./watchlistForBusinessStateMachine-BMWm5mcP.esm.js";
|
|
5
7
|
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.ts
|
|
6
|
-
function createWatchlistForBusinessActor() {
|
|
7
|
-
return createActor(watchlistForBusinessMachine).start();
|
|
8
|
+
function createWatchlistForBusinessActor(options = {}) {
|
|
9
|
+
return createActor(watchlistForBusinessMachine, { input: { config: options.config ?? {} } }).start();
|
|
8
10
|
}
|
|
9
11
|
//#endregion
|
|
10
12
|
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.ts
|
|
@@ -38,6 +40,11 @@ function mapState(snapshot) {
|
|
|
38
40
|
status: "form",
|
|
39
41
|
country: context.country,
|
|
40
42
|
businessName: context.businessName,
|
|
43
|
+
taxId: context.taxId,
|
|
44
|
+
dateOfIncorporation: context.dateOfIncorporation,
|
|
45
|
+
showTaxId: context.config?.taxIdEnabled === true,
|
|
46
|
+
showDateOfIncorporation: context.config?.dateOfIncorporationEnabled === true,
|
|
47
|
+
maxDateOfIncorporation: getMaxDateOfIncorporation(),
|
|
41
48
|
isValid: context.isValid,
|
|
42
49
|
validationErrors: context.validationErrors,
|
|
43
50
|
canSubmit: Object.keys(context.validationErrors ?? {}).length === 0
|
|
@@ -67,7 +74,27 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
67
74
|
value
|
|
68
75
|
});
|
|
69
76
|
},
|
|
70
|
-
/**
|
|
77
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
78
|
+
setTaxId(value) {
|
|
79
|
+
actor.send({
|
|
80
|
+
type: "SET_TAX_ID",
|
|
81
|
+
value
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
86
|
+
* is not sent; a future date blocks submit.
|
|
87
|
+
*/
|
|
88
|
+
setDateOfIncorporation(value) {
|
|
89
|
+
actor.send({
|
|
90
|
+
type: "SET_DATE_OF_INCORPORATION",
|
|
91
|
+
value
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
96
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
97
|
+
*/
|
|
71
98
|
submit() {
|
|
72
99
|
trackElementClicked?.("submit");
|
|
73
100
|
actor.send({ type: "SUBMIT" });
|
|
@@ -79,6 +106,11 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
79
106
|
*
|
|
80
107
|
* On API error the module completes silently (fire-and-forget).
|
|
81
108
|
*
|
|
109
|
+
* @param options.config - Optional module config. `taxIdEnabled` and
|
|
110
|
+
* `dateOfIncorporationEnabled` turn on the optional Tax ID and date-of-
|
|
111
|
+
* incorporation inputs. Without config only country and business name are
|
|
112
|
+
* collected.
|
|
113
|
+
*
|
|
82
114
|
* @example Headless usage
|
|
83
115
|
* ```typescript
|
|
84
116
|
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
@@ -94,8 +126,8 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
94
126
|
* manager.stop();
|
|
95
127
|
* ```
|
|
96
128
|
*/
|
|
97
|
-
function createWatchlistForBusinessManager() {
|
|
98
|
-
return createWatchlistForBusinessManagerFromActor(createWatchlistForBusinessActor());
|
|
129
|
+
function createWatchlistForBusinessManager(options = {}) {
|
|
130
|
+
return createWatchlistForBusinessManagerFromActor(createWatchlistForBusinessActor(options));
|
|
99
131
|
}
|
|
100
132
|
function createWatchlistForBusinessManagerFromActor(actor) {
|
|
101
133
|
return createManager({
|
package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts}
RENAMED
|
@@ -1,36 +1,47 @@
|
|
|
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
|
+
import { n as WatchlistForBusinessValidationErrors, t as WatchlistForBusinessConfig } from "./types-B9C8W01q.js";
|
|
4
5
|
//#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.d.ts
|
|
5
6
|
declare const watchlistForBusinessMachine: any;
|
|
6
7
|
type WatchlistForBusinessMachine = typeof watchlistForBusinessMachine;
|
|
7
8
|
//#endregion
|
|
8
9
|
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.d.ts
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
//#region src/modules/watchlist-for-business/types.d.ts
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for the watchlist-for-business module.
|
|
14
|
-
*
|
|
15
|
-
* No server-side configuration is required — the module collects
|
|
16
|
-
* country and business name from the user and submits them to the
|
|
17
|
-
* business watchlist endpoint.
|
|
18
|
-
*/
|
|
19
|
-
type WatchlistForBusinessConfig = Record<string, never>;
|
|
20
|
-
type WatchlistForBusinessValidationErrors = {
|
|
21
|
-
businessName?: string;
|
|
10
|
+
type CreateWatchlistForBusinessActorOptions = {
|
|
11
|
+
config?: WatchlistForBusinessConfig;
|
|
22
12
|
};
|
|
13
|
+
type WatchlistForBusinessActor = ActorRefFrom<WatchlistForBusinessMachine>;
|
|
23
14
|
//#endregion
|
|
24
15
|
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.d.ts
|
|
25
16
|
/** Waiting for `load()` to be called. */
|
|
26
17
|
type WatchlistForBusinessIdleState = {
|
|
27
18
|
status: 'idle';
|
|
28
19
|
};
|
|
29
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Form is ready — use `setCountry()`, `setBusinessName()`, `setTaxId()`,
|
|
22
|
+
* `setDateOfIncorporation()`, and `submit()`.
|
|
23
|
+
*/
|
|
30
24
|
type WatchlistForBusinessFormState = {
|
|
31
25
|
status: 'form';
|
|
32
26
|
country: string;
|
|
33
27
|
businessName: string;
|
|
28
|
+
/** Optional. Sent only when `showTaxId` is true and the value is not blank. */
|
|
29
|
+
taxId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Optional, `YYYY-MM-DD`. Sent only when `showDateOfIncorporation` is true
|
|
32
|
+
* and the value is not blank.
|
|
33
|
+
*/
|
|
34
|
+
dateOfIncorporation: string;
|
|
35
|
+
/** Whether the module config enables the optional Tax ID input. */
|
|
36
|
+
showTaxId: boolean;
|
|
37
|
+
/** Whether the module config enables the optional date-of-incorporation input. */
|
|
38
|
+
showDateOfIncorporation: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Latest allowed date of incorporation (`YYYY-MM-DD`): today in the user's
|
|
41
|
+
* local time. Use it as the date input's `max`; a later date fails submit.
|
|
42
|
+
*/
|
|
43
|
+
maxDateOfIncorporation: string;
|
|
44
|
+
/** Whether the required business name is filled. Optional fields never affect it. */
|
|
34
45
|
isValid: boolean;
|
|
35
46
|
validationErrors?: WatchlistForBusinessValidationErrors;
|
|
36
47
|
canSubmit: boolean;
|
|
@@ -59,6 +70,11 @@ type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBus
|
|
|
59
70
|
*
|
|
60
71
|
* On API error the module completes silently (fire-and-forget).
|
|
61
72
|
*
|
|
73
|
+
* @param options.config - Optional module config. `taxIdEnabled` and
|
|
74
|
+
* `dateOfIncorporationEnabled` turn on the optional Tax ID and date-of-
|
|
75
|
+
* incorporation inputs. Without config only country and business name are
|
|
76
|
+
* collected.
|
|
77
|
+
*
|
|
62
78
|
* @example Headless usage
|
|
63
79
|
* ```typescript
|
|
64
80
|
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
@@ -74,14 +90,24 @@ type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBus
|
|
|
74
90
|
* manager.stop();
|
|
75
91
|
* ```
|
|
76
92
|
*/
|
|
77
|
-
declare function createWatchlistForBusinessManager(): Manager<WatchlistForBusinessState> & {
|
|
93
|
+
declare function createWatchlistForBusinessManager(options?: CreateWatchlistForBusinessActorOptions): Manager<WatchlistForBusinessState> & {
|
|
78
94
|
/** Transitions from `idle` to the form. Must be called before any other method. */
|
|
79
95
|
load(): void;
|
|
80
96
|
/** Updates the selected country code (ISO 3166-1 alpha-2). */
|
|
81
97
|
setCountry(country: string): void;
|
|
82
98
|
/** Updates the business name field and recomputes validity. */
|
|
83
99
|
setBusinessName(value: string): void;
|
|
84
|
-
/**
|
|
100
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
101
|
+
setTaxId(value: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
104
|
+
* is not sent; a future date blocks submit.
|
|
105
|
+
*/
|
|
106
|
+
setDateOfIncorporation(value: string): void;
|
|
107
|
+
/**
|
|
108
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
109
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
110
|
+
*/
|
|
85
111
|
submit(): void;
|
|
86
112
|
};
|
|
87
113
|
declare function createWatchlistForBusinessManagerFromActor(actor: WatchlistForBusinessActor): Manager<WatchlistForBusinessState> & {
|
|
@@ -91,9 +117,19 @@ declare function createWatchlistForBusinessManagerFromActor(actor: WatchlistForB
|
|
|
91
117
|
setCountry(country: string): void;
|
|
92
118
|
/** Updates the business name field and recomputes validity. */
|
|
93
119
|
setBusinessName(value: string): void;
|
|
94
|
-
/**
|
|
120
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
121
|
+
setTaxId(value: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
124
|
+
* is not sent; a future date blocks submit.
|
|
125
|
+
*/
|
|
126
|
+
setDateOfIncorporation(value: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
129
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
130
|
+
*/
|
|
95
131
|
submit(): void;
|
|
96
132
|
};
|
|
97
133
|
type WatchlistForBusinessManager = ReturnType<typeof createWatchlistForBusinessManager>;
|
|
98
134
|
//#endregion
|
|
99
|
-
export { createWatchlistForBusinessManager as a,
|
|
135
|
+
export { createWatchlistForBusinessManager as a, watchlistForBusinessMachine as c, WatchlistForBusinessState as i, WatchlistForBusinessFormState as n, createWatchlistForBusinessManagerFromActor as o, WatchlistForBusinessManager as r, WatchlistForBusinessActor as s, WatchlistForBusinessFinishedState as t };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { t as api, u as endpoints } from "./api-CZpuJuZl.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
|
+
import { r as validateCNPJ, t as COUNTRIES_WITH_CNPJ_VALIDATION } from "./cnpj-Bl_olpdX.esm.js";
|
|
6
|
+
//#region ../infra/src/time/epochMsToLocalIsoDate.ts
|
|
7
|
+
/**
|
|
8
|
+
* Converts an epoch-milliseconds timestamp to the user's local calendar date
|
|
9
|
+
* as `YYYY-MM-DD` — the format of an `<input type="date">` value.
|
|
10
|
+
*
|
|
11
|
+
* Use it to compare a user-entered date with "today" as the user sees it.
|
|
12
|
+
* `DateFormattingProvider.utcToIsoDateString` returns the UTC date, which is a
|
|
13
|
+
* day off near midnight outside UTC. Lives in Infra (L0) because Core cannot
|
|
14
|
+
* touch the `Date` global (`no-browser-api-in-core`); see `epochMsToIsoString`.
|
|
15
|
+
*/
|
|
16
|
+
function epochMsToLocalIsoDate(epochMs) {
|
|
17
|
+
const date = new Date(epochMs);
|
|
18
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
19
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
20
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessServices.ts
|
|
24
|
+
async function submitWatchlistForBusiness(data, signal) {
|
|
25
|
+
const res = await api.post(endpoints.watchlistForBusinessSubmit, data, { signal });
|
|
26
|
+
if (!res.ok) throw new Error(`POST ${endpoints.watchlistForBusinessSubmit} failed: ${res.status} ${res.statusText}`);
|
|
27
|
+
return res.data;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.ts
|
|
31
|
+
const DEFAULT_COUNTRY = "US";
|
|
32
|
+
const BUSINESS_NAME_REQUIRED_ERROR = "dynamicForms.fieldRequired";
|
|
33
|
+
const INVALID_TAX_ID_ERROR = "ekyb.error.invalidTaxId";
|
|
34
|
+
const FUTURE_DATE_OF_INCORPORATION_ERROR = "watchlistForBusiness.dateOfIncorporationFuture";
|
|
35
|
+
/**
|
|
36
|
+
* Country-specific Tax ID format checks, applied only to a filled Tax ID.
|
|
37
|
+
* Countries without an entry accept any value. The CNPJ countries come from
|
|
38
|
+
* the shared list eKYB also uses, so the two modules cannot drift.
|
|
39
|
+
*/
|
|
40
|
+
const TAX_ID_VALIDATORS = Object.fromEntries(COUNTRIES_WITH_CNPJ_VALIDATION.map((country) => [country, validateCNPJ]));
|
|
41
|
+
/**
|
|
42
|
+
* Latest allowed date of incorporation: today in the user's local time, as
|
|
43
|
+
* `YYYY-MM-DD`. The single source for both the future-date check and the
|
|
44
|
+
* date picker's `max` (exposed through the manager's `form` state).
|
|
45
|
+
*/
|
|
46
|
+
function getMaxDateOfIncorporation() {
|
|
47
|
+
return epochMsToLocalIsoDate(getTimestamp());
|
|
48
|
+
}
|
|
49
|
+
function computeIsValid(businessName) {
|
|
50
|
+
return businessName.trim().length > 0;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns the trimmed value of an optional field, or `undefined` when the
|
|
54
|
+
* field is disabled or blank — a blank optional field is never sent.
|
|
55
|
+
*/
|
|
56
|
+
function optionalValue(enabled, value) {
|
|
57
|
+
if (!enabled) return void 0;
|
|
58
|
+
const trimmed = value.trim();
|
|
59
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
60
|
+
}
|
|
61
|
+
function getTaxId(context) {
|
|
62
|
+
return optionalValue(context.config?.taxIdEnabled, context.taxId);
|
|
63
|
+
}
|
|
64
|
+
function getDateOfIncorporation(context) {
|
|
65
|
+
return optionalValue(context.config?.dateOfIncorporationEnabled, context.dateOfIncorporation);
|
|
66
|
+
}
|
|
67
|
+
function computeValidationErrors(context) {
|
|
68
|
+
const errors = {};
|
|
69
|
+
if (!computeIsValid(context.businessName)) errors.businessName = BUSINESS_NAME_REQUIRED_ERROR;
|
|
70
|
+
const taxId = getTaxId(context);
|
|
71
|
+
const validateTaxId = TAX_ID_VALIDATORS[context.country];
|
|
72
|
+
if (taxId && validateTaxId && !validateTaxId(taxId)) errors.taxId = INVALID_TAX_ID_ERROR;
|
|
73
|
+
const dateOfIncorporation = getDateOfIncorporation(context);
|
|
74
|
+
if (dateOfIncorporation && dateOfIncorporation > getMaxDateOfIncorporation()) errors.dateOfIncorporation = FUTURE_DATE_OF_INCORPORATION_ERROR;
|
|
75
|
+
return Object.keys(errors).length > 0 ? errors : void 0;
|
|
76
|
+
}
|
|
77
|
+
function buildSubmitRequest(context) {
|
|
78
|
+
const request = {
|
|
79
|
+
countryCodes: [context.country],
|
|
80
|
+
businessName: context.businessName.trim()
|
|
81
|
+
};
|
|
82
|
+
const taxId = getTaxId(context);
|
|
83
|
+
if (taxId) request.taxId = taxId;
|
|
84
|
+
const dateOfIncorporation = getDateOfIncorporation(context);
|
|
85
|
+
if (dateOfIncorporation) request.dateOfIncorporation = dateOfIncorporation;
|
|
86
|
+
return request;
|
|
87
|
+
}
|
|
88
|
+
/** Drops one field's error once the user edits what it depends on. */
|
|
89
|
+
function withoutValidationError(context, field) {
|
|
90
|
+
if (!context.validationErrors?.[field]) return {};
|
|
91
|
+
const remaining = { ...context.validationErrors };
|
|
92
|
+
delete remaining[field];
|
|
93
|
+
return { validationErrors: Object.keys(remaining).length > 0 ? remaining : void 0 };
|
|
94
|
+
}
|
|
95
|
+
const watchlistForBusinessMachine = setup({
|
|
96
|
+
types: {
|
|
97
|
+
context: {},
|
|
98
|
+
events: {},
|
|
99
|
+
input: {}
|
|
100
|
+
},
|
|
101
|
+
actors: { submitWatchlistForBusiness: fromPromise(async ({ input, signal }) => {
|
|
102
|
+
await submitWatchlistForBusiness(input, signal);
|
|
103
|
+
}) },
|
|
104
|
+
actions: {
|
|
105
|
+
setCountry: assign(({ event }) => {
|
|
106
|
+
const { country } = event;
|
|
107
|
+
return { country };
|
|
108
|
+
}),
|
|
109
|
+
setBusinessName: assign(({ event }) => {
|
|
110
|
+
const { value } = event;
|
|
111
|
+
return {
|
|
112
|
+
businessName: value,
|
|
113
|
+
isValid: computeIsValid(value)
|
|
114
|
+
};
|
|
115
|
+
}),
|
|
116
|
+
setTaxId: assign(({ event }) => {
|
|
117
|
+
const { value } = event;
|
|
118
|
+
return { taxId: value };
|
|
119
|
+
}),
|
|
120
|
+
setDateOfIncorporation: assign(({ event }) => {
|
|
121
|
+
const { value } = event;
|
|
122
|
+
return { dateOfIncorporation: value };
|
|
123
|
+
}),
|
|
124
|
+
clearBusinessNameValidationError: assign(({ context }) => withoutValidationError(context, "businessName")),
|
|
125
|
+
clearTaxIdValidationError: assign(({ context }) => withoutValidationError(context, "taxId")),
|
|
126
|
+
clearDateOfIncorporationValidationError: assign(({ context }) => withoutValidationError(context, "dateOfIncorporation")),
|
|
127
|
+
setValidationErrors: assign(({ context }) => ({ validationErrors: computeValidationErrors(context) }))
|
|
128
|
+
},
|
|
129
|
+
guards: { canSubmit: ({ context }) => computeValidationErrors(context) === void 0 }
|
|
130
|
+
}).createMachine({
|
|
131
|
+
id: "watchlist-for-business",
|
|
132
|
+
initial: "idle",
|
|
133
|
+
context: ({ input }) => ({
|
|
134
|
+
config: input?.config ?? {},
|
|
135
|
+
country: DEFAULT_COUNTRY,
|
|
136
|
+
businessName: "",
|
|
137
|
+
taxId: "",
|
|
138
|
+
dateOfIncorporation: "",
|
|
139
|
+
isValid: false,
|
|
140
|
+
validationErrors: void 0
|
|
141
|
+
}),
|
|
142
|
+
states: {
|
|
143
|
+
idle: { on: { LOAD: { target: "form" } } },
|
|
144
|
+
form: { on: {
|
|
145
|
+
SET_COUNTRY: { actions: ["setCountry", "clearTaxIdValidationError"] },
|
|
146
|
+
SET_BUSINESS_NAME: { actions: ["setBusinessName", "clearBusinessNameValidationError"] },
|
|
147
|
+
SET_TAX_ID: { actions: ["setTaxId", "clearTaxIdValidationError"] },
|
|
148
|
+
SET_DATE_OF_INCORPORATION: { actions: ["setDateOfIncorporation", "clearDateOfIncorporationValidationError"] },
|
|
149
|
+
SUBMIT: [{
|
|
150
|
+
target: "submitting",
|
|
151
|
+
guard: "canSubmit"
|
|
152
|
+
}, { actions: "setValidationErrors" }]
|
|
153
|
+
} },
|
|
154
|
+
submitting: { invoke: {
|
|
155
|
+
id: "submitWatchlistForBusiness",
|
|
156
|
+
src: "submitWatchlistForBusiness",
|
|
157
|
+
input: ({ context }) => buildSubmitRequest(context),
|
|
158
|
+
onDone: { target: "success" },
|
|
159
|
+
onError: { target: "finished" }
|
|
160
|
+
} },
|
|
161
|
+
success: { after: { 3e3: { target: "finished" } } },
|
|
162
|
+
finished: { type: "final" }
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { watchlistForBusinessMachine as n, getMaxDateOfIncorporation as t };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames
|
|
1
|
+
import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-CP3yOzAl.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 { t as watchlistMachine } from "./watchlistStateMachine-Cx-6QAvu.esm.js";
|
|
5
7
|
//#region src/modules/watchlist/watchlistActor.ts
|
|
6
8
|
function createWatchlistActor() {
|
|
7
9
|
return createActor(watchlistMachine).start();
|
|
@@ -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
|
//#region src/modules/watchlist/watchlistStateMachine.d.ts
|
|
5
5
|
type WatchlistResult = 'success' | 'skipped';
|
|
6
6
|
declare const watchlistMachine: any;
|
package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Cx-6QAvu.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { i as assign, t as setup } from "./xstate.esm-
|
|
3
|
-
import { n as fromPromise } from "./xstate-actors.esm-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
|
|
2
|
+
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
|
+
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
4
4
|
//#region src/modules/watchlist/watchlistServices.ts
|
|
5
5
|
async function processWatchlist(signal) {
|
|
6
6
|
const res = await api.post(endpoints.processGlobalWatchlist, {}, { signal });
|