@adyen/kyc-components 4.0.1 → 4.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -31
- package/dist/4-people-BtDi7O9A.js +24 -0
- package/dist/AcceptTermsOfServiceComponent-DMAt4BdI.js +650 -0
- package/dist/Accordion-Bvg0x3Mz.js +88 -0
- package/dist/AccountSetupRejected-DkdcpmK6.js +26 -0
- package/dist/ActionBar-AKKiAmMe.js +31 -0
- package/dist/Address-CtHjSBzx.js +1112 -0
- package/dist/Alert-BfbfHD1i.js +169 -0
- package/dist/Avatar-Bf4qSH-S.js +60 -0
- package/dist/BG-HKzabLqZ.js +27 -0
- package/dist/BusinessFinancingComponent-DxwW9KZP.js +55 -0
- package/dist/BusinessFinancingDropin-N_DSHYRu.js +2235 -0
- package/dist/BusinessFinancingPage-unaDjCZH.js +43 -0
- package/dist/BusinessTypeSelectionPage-JTkIjnGQ.js +440 -0
- package/dist/Card-OQuFzmxm.js +90 -0
- package/dist/Checkbox-Bi_0fc1x.js +74 -0
- package/dist/Confirm-CKpYp_5J.js +64 -0
- package/dist/ConstitutionalDocument-BRSGUZEC.js +2361 -0
- package/dist/ContactDetails-DnWFEseS.js +396 -0
- package/dist/ContextGuidance-CzbsgT6C.js +34 -0
- package/dist/ContractViewer-DcQHIGMU.js +935 -0
- package/dist/CountryField-B4WQy2ta.js +66 -0
- package/dist/CreateIndividualComponent-Swzyxw03.js +65 -0
- package/dist/CreateTransferInstrumentComponent-CeE_Q8JD.js +56 -0
- package/dist/Currency-DHXU0Gdw.js +238 -0
- package/dist/CustomerSupport-DtYQbB1A.js +156 -0
- package/dist/DebugModal-C39y9ypZ.js +416 -0
- package/dist/DecisionMakerDetailsPage-BNayhUQ8.js +104 -0
- package/dist/DecisionMakers-BkGj2Qqr.js +858 -0
- package/dist/Dropzone-DyEB_7GZ.js +224 -0
- package/dist/EmbeddedStatus-BOo-inHj.js +97 -0
- package/dist/EndStateLayout-R9pQt832.js +71 -0
- package/dist/EntityAssociation-BKKOMQ4q.js +178 -0
- package/dist/EntityGuidanceStatus-CtuUWykx.js +106 -0
- package/dist/ErrorPanel-DJ-uFV4L.js +194 -0
- package/dist/Field-CmNnfz5n.js +141 -0
- package/dist/FormNavigation-CfFQ7UC8.js +144 -0
- package/dist/FormWrapper-AefMYcpB.js +135 -0
- package/dist/Header-Big_S2UY.js +83 -0
- package/dist/Image-DogJtPYR.js +27 -0
- package/dist/Individual.rules-Cy2RTzkg.js +383 -0
- package/dist/IndividualDropin-BVav94ZL.js +5168 -0
- package/dist/InputDate-C6lCe4Mh.js +43 -0
- package/dist/InputGroup-WBfGDV5F.js +32 -0
- package/dist/InputText-D_BqYXYv.js +134 -0
- package/dist/Introduction-B3dnyHAw.js +256 -0
- package/dist/JpAddress-BolhhPjT.js +329 -0
- package/dist/LandingLayout-4tlusBy1.js +60 -0
- package/dist/LegalCompanyNameField-ChE_IQlE.js +138 -0
- package/dist/LegalRepresentativeDetailsPage-C9GKbpMT.js +55 -0
- package/dist/Link-CyXf5frR.js +35 -0
- package/dist/List-BAzyC6sw.js +83 -0
- package/dist/ListItem-Bt_mPem1.js +69 -0
- package/dist/LoaderWrapper-DW2aG4g9.js +42 -0
- package/dist/ManageIndividualComponent-CogWUNQN.js +46 -0
- package/dist/ManageTermsOfServiceComponent-C4h2qwXq.js +52 -0
- package/dist/ManageTransferInstrumentComponent-Be9R6VAb.js +292 -0
- package/dist/MaskedInput-DQGErUrs.js +811 -0
- package/dist/MaybeModal-Cfq9Y-Oq.js +36 -0
- package/dist/Modal-CrmpkeY0.js +147 -0
- package/dist/Name-EUCnwto8.js +81 -0
- package/dist/OnboardingDropinComponent-BYxARRXY.js +2672 -0
- package/dist/PayoutDetailsDropin-BW6P2kkQ.js +4972 -0
- package/dist/ProgressBar-B7gTQncy.js +47 -0
- package/dist/Radio-BMtxBpnn.js +39 -0
- package/dist/RadioGroup-44hvyE1V.js +100 -0
- package/dist/RadioGroupCard-DjEhU8SG.js +152 -0
- package/dist/Review-g-sL7ZDy.js +84 -0
- package/dist/RootBusinessDetailsPage-B-eg9C2m.js +50 -0
- package/dist/RootBusinessLinesPage-EboQFqwd.js +1553 -0
- package/dist/RootIndividualDetailsPage-DHS3qMMB.js +62 -0
- package/dist/Select-DABfPg0f.js +868 -0
- package/dist/SignPCIComponent-BqoTovzh.js +307 -0
- package/dist/SingpassSelection-DxiigpyU.js +132 -0
- package/dist/SoleProprietorshipPage-IgsabHu-.js +50 -0
- package/dist/SourceOfFundsPage-BS1rKVKe.js +2162 -0
- package/dist/Spacer-BK3jDget.js +18 -0
- package/dist/StepProgressIndicator-BlYqsR2g.js +78 -0
- package/dist/StoreProvider-CISxF69y.js +4845 -0
- package/dist/StructuredList-BNLhk_zV.js +61 -0
- package/dist/Summary-hZQMYY8b.js +220 -0
- package/dist/TaskVerificationStatus-BkICmo3e.js +129 -0
- package/dist/TaxInformationField-DA1SER9m.js +3750 -0
- package/dist/TaxReportingDropin-BQy2CrfP.js +503 -0
- package/dist/TextArea-BVmNrRme.js +103 -0
- package/dist/TileGroup-BexJEHjV.js +203 -0
- package/dist/TrustDetailsPage-4CSRQyws.js +2187 -0
- package/dist/TrustMemberCompanyPage-DoeI_oPE.js +68 -0
- package/dist/TrustMemberIndividualPage-Bd_0eP6B.js +64 -0
- package/dist/TrustMemberRoleAndTypePage-5ic4OwLo.js +1081 -0
- package/dist/TrustMembersOverview-CpMvaz8A.js +439 -0
- package/dist/UnincorporatedPartnershipIndividualPage-CG65q5UX.js +63 -0
- package/dist/UnincorporatedPartnershipMemberCompanyPage-BHlOu-QG.js +71 -0
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-ChWfvQr3.js +292 -0
- package/dist/UnincorporatedPartnershipMembersOverview-BSpPPpnB.js +173 -0
- package/dist/VerificationErrorAlert-DlCMbbyt.js +60 -0
- package/dist/ViewVerificationStatusComponent-PYtbeouG.js +181 -0
- package/dist/accountHolderUtils-C75xtw4E.js +66 -0
- package/dist/adyen-business-financing.js +13 -5
- package/dist/adyen-individual-configuration.js +8 -4
- package/dist/adyen-individual-status.js +5 -4
- package/dist/adyen-invited-decision-maker.js +87 -0
- package/dist/adyen-kyc-components.js +23 -21
- package/dist/adyen-onboarding.js +8 -4
- package/dist/adyen-terms-of-service-management.js +8 -4
- package/dist/adyen-terms-of-service-status.js +5 -4
- package/dist/adyen-transfer-instrument-configuration.js +8 -4
- package/dist/adyen-transfer-instrument-management.js +5 -4
- package/dist/adyen-verification-status.js +8 -4
- package/dist/arrow-right-BoqwUH_d.js +14 -0
- package/dist/bafinUtils-DsY8ws1M.js +80 -0
- package/dist/bag-BXVWLrwo.js +14 -0
- package/dist/bank-1GvaHPAZ.js +14 -0
- package/dist/bg-BG-6XzbmxcW.js +13 -0
- package/dist/bg-BG-C6kad3Qr.js +61 -0
- package/dist/bg-BG-CEipapl4.js +63 -0
- package/dist/bg-BG-CFuVZnaC.js +13 -0
- package/dist/bg-BG-DAqp35Dx.js +13 -0
- package/dist/bg-BG-DMNRRZZE.js +75 -0
- package/dist/bg-BG-DyX-yYYI.js +13 -0
- package/dist/bg-BG-K7feXvEc.js +38 -0
- package/dist/bg-BG-zZhDshGi.js +65 -0
- package/dist/bin-Ba-3ll8T.js +18 -0
- package/dist/business-lines-BAqTbnBw.js +135 -0
- package/dist/capital-9TKHySO7.js +17 -0
- package/dist/cash-stack-DwYu4xNy.js +22 -0
- package/dist/certificate-N2YFedpI.js +17 -0
- package/dist/checkmark-D9dGhGpG.js +14 -0
- package/dist/checkmark-circle-CFWClLQ6.js +20 -0
- package/dist/checkmark-circle-fill-DEB-tuGl.js +17 -0
- package/dist/checkmark-small-D3VNx2lo.js +14 -0
- package/dist/chevron-down-C7SUSYfl.js +14 -0
- package/dist/chevron-left-BXmd-S46.js +14 -0
- package/dist/chevron-right-jE6RwM2B.js +14 -0
- package/dist/chevron-up-BdfNcqzq.js +14 -0
- package/dist/circle-BJPTMCWB.js +17 -0
- package/dist/circle-small-filled-BuO8Vg8j.js +14 -0
- package/dist/clock-DAzaBRWk.js +20 -0
- package/dist/coins-DYdzG5e_.js +17 -0
- package/dist/commonValidators-Bld1N1vF.js +24 -0
- package/dist/company-types-value-D_mKv5PT.js +23 -0
- package/dist/contract-BfJb1t6M.js +14 -0
- package/dist/cross-CDS_eot4.js +14 -0
- package/dist/cross-circle-fill-C-EJ57Yn.js +17 -0
- package/dist/cross-circle-fill-small-DkPjsuBH.js +14 -0
- package/dist/cs-CZ-BD5bYeuJ.js +13 -0
- package/dist/cs-CZ-BHbWTH_v.js +63 -0
- package/dist/cs-CZ-C6vEQ8P9.js +13 -0
- package/dist/cs-CZ-CYQO0o5V.js +38 -0
- package/dist/cs-CZ-CYsR__kj.js +13 -0
- package/dist/cs-CZ-C_GFp3nV.js +61 -0
- package/dist/cs-CZ-Ck22NTT9.js +65 -0
- package/dist/cs-CZ-DXSMRqPu.js +75 -0
- package/dist/cs-CZ-Ke47w0bj.js +13 -0
- package/dist/currency-CrdnaaDu.js +35 -0
- package/dist/da-DK-B3Pg-MWO.js +13 -0
- package/dist/da-DK-C60mLiV1.js +61 -0
- package/dist/da-DK-CGWvmdkq.js +38 -0
- package/dist/da-DK-Cd5IQPv3.js +75 -0
- package/dist/da-DK-Cx4-hLO1.js +13 -0
- package/dist/da-DK-DQ4ZYSea.js +65 -0
- package/dist/da-DK-DzcTI92X.js +13 -0
- package/dist/da-DK-h8DYQ_Iq.js +13 -0
- package/dist/da-DK-vcVNQJbX.js +63 -0
- package/dist/datasetUtil-BHQp0-xL.js +58 -0
- package/dist/de-DE-C9NH2zMh.js +75 -0
- package/dist/de-DE-CL8D8vKZ.js +13 -0
- package/dist/de-DE-CWEW2yqg.js +63 -0
- package/dist/de-DE-CkbOZ6S_.js +65 -0
- package/dist/de-DE-Cvz1TGdB.js +61 -0
- package/dist/de-DE-DHDJhahG.js +38 -0
- package/dist/de-DE-LQE_LFFL.js +13 -0
- package/dist/de-DE-S6qDey1L.js +13 -0
- package/dist/de-DE-dPfrbCii.js +13 -0
- package/dist/debouncedInputEvent-Cv2S512Y.js +46 -0
- package/dist/decision-makers-group-DrvpnEqj.js +1944 -0
- package/dist/digital-wallet-Bx5YM1LY.js +46 -0
- package/dist/document-1-qlSTF558.js +14 -0
- package/dist/document-blurred-BiWap0xs.js +37 -0
- package/dist/document-cut-off-aQezqOif.js +32 -0
- package/dist/document-expired-BhBXaWWQ.js +38 -0
- package/dist/document-front-DYuhZGeQ.js +30 -0
- package/dist/document-person-CDbnTOdV.js +20 -0
- package/dist/download-BZQB1WkZ.js +17 -0
- package/dist/dropinUtils-CAiDwa5U.js +200 -0
- package/dist/edit-1-DAqtnOIx.js +14 -0
- package/dist/el-GR-B78b9rSH.js +63 -0
- package/dist/el-GR-DGbzdIL0.js +13 -0
- package/dist/el-GR-DHNlnOwf.js +38 -0
- package/dist/el-GR-DSlgFwLb.js +61 -0
- package/dist/el-GR-DTHQslLc.js +75 -0
- package/dist/el-GR-Dazirlmt.js +13 -0
- package/dist/el-GR-DoS_Va-n.js +13 -0
- package/dist/el-GR-DudORw4U.js +65 -0
- package/dist/el-GR-Dvv3-Qib.js +13 -0
- package/dist/en-US-AgtwE4Fl.js +63 -0
- package/dist/en-US-BSQXKu6d.js +54 -0
- package/dist/en-US-CjjPhkB5.js +65 -0
- package/dist/en-US-D1sB335h.js +61 -0
- package/dist/en-US-DLY20x1O.js +13 -0
- package/dist/en-US-DoiQhi0j.js +38 -0
- package/dist/en-US-G607HIyo.js +75 -0
- package/dist/en-US-cVpRgdC8.js +13 -0
- package/dist/es-ES--IvNed_Q.js +13 -0
- package/dist/es-ES-BAolMrZ0.js +65 -0
- package/dist/es-ES-BYl5-PFR.js +13 -0
- package/dist/es-ES-CDgjGql5.js +63 -0
- package/dist/es-ES-CxnsKEh4.js +38 -0
- package/dist/es-ES-DK-7qtDf.js +75 -0
- package/dist/es-ES-DdGmXdxO.js +13 -0
- package/dist/es-ES-Dj5-YMmZ.js +61 -0
- package/dist/es-ES-Vn4AcK9-.js +13 -0
- package/dist/et-EE-4fHYOoff.js +13 -0
- package/dist/et-EE-BOIrYrz9.js +65 -0
- package/dist/et-EE-BQixWUEV.js +38 -0
- package/dist/et-EE-BeZJ4Ub1.js +13 -0
- package/dist/et-EE-Bij5j-z5.js +61 -0
- package/dist/et-EE-CsTXSlnY.js +13 -0
- package/dist/et-EE-D0PMC4ie.js +63 -0
- package/dist/et-EE-D5SNtVsM.js +13 -0
- package/dist/et-EE-DNC4hcxm.js +75 -0
- package/dist/external-link-Cg6pJaSJ.js +14 -0
- package/dist/fi-FI-57-xkioo.js +38 -0
- package/dist/fi-FI-B2xHiSHi.js +61 -0
- package/dist/fi-FI-BJLU1JHw.js +75 -0
- package/dist/fi-FI-BUixKfXH.js +13 -0
- package/dist/fi-FI-CIYa9SyS.js +13 -0
- package/dist/fi-FI-CWIaV6Iz.js +13 -0
- package/dist/fi-FI-CsZlDJFb.js +63 -0
- package/dist/fi-FI-D8WrLxxq.js +65 -0
- package/dist/fi-FI-DFxljML-.js +13 -0
- package/dist/fieldConfigurations-BUT9DTUH.js +21 -0
- package/dist/filterProblemsByTaskForms-Cz7iQtms.js +30 -0
- package/dist/form-rules-DhbF2mY4.js +13 -0
- package/dist/formUtils-BD7sDa8f.js +107 -0
- package/dist/fr-FR-B2je0smB.js +75 -0
- package/dist/fr-FR-BM-qNLci.js +13 -0
- package/dist/fr-FR-Beljeilc.js +65 -0
- package/dist/fr-FR-BxiX8Zfi.js +38 -0
- package/dist/fr-FR-CCb4Oux7.js +13 -0
- package/dist/fr-FR-CNQtWSXx.js +61 -0
- package/dist/fr-FR-DPehHVb6.js +13 -0
- package/dist/fr-FR-VoxPkXSc.js +63 -0
- package/dist/fr-FR-l5z31r7i.js +13 -0
- package/dist/funds-in-CInoUdmG.js +21 -0
- package/dist/getName-DkzImyZO.js +41 -0
- package/dist/getProblemsForEntity-BPv4f9Tx.js +24 -0
- package/dist/getProps-Cc3J2-z9.js +148 -0
- package/dist/getTrustedFields-C5-mXl-l.js +64 -0
- package/dist/gift-omNInZeB.js +14 -0
- package/dist/graph-DunG_uu1.js +21 -0
- package/dist/graph-up-BZze4i6m.js +20 -0
- package/dist/headquarter-BhpSibFO.js +21 -0
- package/dist/hotel-Cp7VgGCJ.js +22 -0
- package/dist/house-BhyBQdR3.js +21 -0
- package/dist/hr-HR-B6U5Rzzw.js +61 -0
- package/dist/hr-HR-BAI0N9bo.js +13 -0
- package/dist/hr-HR-BF74vdPD.js +13 -0
- package/dist/hr-HR-Bjx-KdVs.js +13 -0
- package/dist/hr-HR-BtowKWUi.js +13 -0
- package/dist/hr-HR-BynZTNSB.js +38 -0
- package/dist/hr-HR-C0NLgF1r.js +75 -0
- package/dist/hr-HR-CbdP2tk-.js +63 -0
- package/dist/hr-HR-lIHN6Yl2.js +65 -0
- package/dist/hu-HU-B-lUkFnQ.js +13 -0
- package/dist/hu-HU-BLLoj5CX.js +61 -0
- package/dist/hu-HU-BpNDP1I8.js +13 -0
- package/dist/hu-HU-BtRIDozk.js +38 -0
- package/dist/hu-HU-CWdwNCev.js +65 -0
- package/dist/hu-HU-DU-5ujQK.js +75 -0
- package/dist/hu-HU-DYhMVR_c.js +13 -0
- package/dist/hu-HU-MHIPehPS.js +13 -0
- package/dist/hu-HU-pFpTvMiD.js +63 -0
- package/dist/id-blurred-B5lHEP8M.js +59 -0
- package/dist/id-cut-off-Ba1FRzKO.js +55 -0
- package/dist/id-front-CpNWN6nG.js +52 -0
- package/dist/id-glare-DgCQON8k.js +49 -0
- package/dist/iframeWidget-CNWsRmIe.js +234 -0
- package/dist/image-CmB0ioUM.js +17 -0
- package/dist/info-Bb_-xIEK.js +21 -0
- package/dist/info-filled-CK8LB339.js +17 -0
- package/dist/instant-verification-UrnuHTYn.js +40 -0
- package/dist/isEmpty-Pobz7lE7.js +23 -0
- package/dist/isNewEntity-7Vw_eQBr.js +13 -0
- package/dist/it-IT-5a7NHVFo.js +65 -0
- package/dist/it-IT-BAvmkEF8.js +13 -0
- package/dist/it-IT-BRO0Hf5X.js +13 -0
- package/dist/it-IT-Cr20JO4o.js +61 -0
- package/dist/it-IT-D63gRTDc.js +13 -0
- package/dist/it-IT-DOBp2-MP.js +13 -0
- package/dist/it-IT-DZjw9LNC.js +63 -0
- package/dist/it-IT-Dhwa9Ecj.js +75 -0
- package/dist/it-IT-masgjk9F.js +38 -0
- package/dist/ja-JP-B3Y0VVpN.js +152 -0
- package/dist/ja-JP-BZb5ndp9.js +75 -0
- package/dist/ja-JP-BeeuQ_LL.js +61 -0
- package/dist/ja-JP-BqluCflj.js +63 -0
- package/dist/ja-JP-CaUe8KW7.js +27 -0
- package/dist/ja-JP-DL0IjTzn.js +13 -0
- package/dist/ja-JP-DSvZhFNY.js +65 -0
- package/dist/ja-JP-GX3l4yqn.js +125 -0
- package/dist/ja-JP-g6VOUGXZ.js +136 -0
- package/dist/ja-JP-vv3-YsHU.js +38 -0
- package/dist/japanSupportUtils-Cgw9dBsr.js +16 -0
- package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
- package/dist/localizeDateString-CAnd4W1y.js +27 -0
- package/dist/location-itJfxrDQ.js +17 -0
- package/dist/lt-LT-0WbfHH_o.js +61 -0
- package/dist/lt-LT-2BMif2Bk.js +38 -0
- package/dist/lt-LT-BX8dOAzK.js +13 -0
- package/dist/lt-LT-C8n1GZoU.js +75 -0
- package/dist/lt-LT-CXw4ywLM.js +63 -0
- package/dist/lt-LT-CgalYpUh.js +65 -0
- package/dist/lt-LT-DDs3ngzd.js +13 -0
- package/dist/lt-LT-DpszrZ9m.js +13 -0
- package/dist/lt-LT-WRulV980.js +13 -0
- package/dist/lv-LV-B3IqVQos.js +13 -0
- package/dist/lv-LV-BZN4-Xat.js +75 -0
- package/dist/lv-LV-BuuUUumH.js +61 -0
- package/dist/lv-LV-C9Dhkruv.js +13 -0
- package/dist/lv-LV-CHdEDRVO.js +38 -0
- package/dist/lv-LV-CmB2-IO5.js +13 -0
- package/dist/lv-LV-DYqBaW2-.js +63 -0
- package/dist/lv-LV-aAd9SEqx.js +65 -0
- package/dist/lv-LV-dA8yYdKe.js +13 -0
- package/dist/mail-VHTlAusn.js +14 -0
- package/dist/manual-verification-BO8zgAYT.js +41 -0
- package/dist/mapExistingFile-BZXo7HtO.js +230 -0
- package/dist/mapJpAddressSchemaToAddressLocalizations-B2GyvHW2.js +162 -0
- package/dist/mapLegalEntityToIndividualSchema-oeKNb1EG.js +206 -0
- package/dist/mapTransferInstrumentToPayoutAccount-C4zz9v3R.js +34 -0
- package/dist/minus-circle-filled-ZhtJ0GD3.js +17 -0
- package/dist/nl-NL-B0fvINJj.js +75 -0
- package/dist/nl-NL-CmURERx_.js +65 -0
- package/dist/nl-NL-CnvvqAEg.js +13 -0
- package/dist/nl-NL-D1b5RUJ0.js +38 -0
- package/dist/nl-NL-DV4NqPVW.js +13 -0
- package/dist/nl-NL-KQ6bciOb.js +13 -0
- package/dist/nl-NL-KsfqCp2v.js +61 -0
- package/dist/nl-NL-SjOGmGk5.js +13 -0
- package/dist/nl-NL-lcNM54vV.js +63 -0
- package/dist/no-NO-B9618F4_.js +13 -0
- package/dist/no-NO-BAWVf0GX.js +13 -0
- package/dist/no-NO-BdG6WnpB.js +61 -0
- package/dist/no-NO-CIKbQbKT.js +13 -0
- package/dist/no-NO-CTrVITNu.js +63 -0
- package/dist/no-NO-Dkh4SWbB.js +38 -0
- package/dist/no-NO-Ds3VioxT.js +13 -0
- package/dist/no-NO-Jw7Gae-a.js +75 -0
- package/dist/no-NO-qyqWODMp.js +65 -0
- package/dist/onfido-logo-BSkKPH10.js +14 -0
- package/dist/options-horizontal-GuXvLvV3.js +18 -0
- package/dist/partner-QD27Vy4w.js +18 -0
- package/dist/passport-blurred-CVG493IJ.js +59 -0
- package/dist/passport-cut-off-COzA_TmB.js +56 -0
- package/dist/passport-front-WJleLixT.js +52 -0
- package/dist/passport-front-green-CZVkCa1n.js +232 -0
- package/dist/passport-glare-BP5WnJZj.js +50 -0
- package/dist/patternValidators-B_gZ9OEK.js +83 -0
- package/dist/pay-by-link-plane-BpY8Q6-B.js +22 -0
- package/dist/payout-DtB68BcZ.js +20 -0
- package/dist/payout-verification-instant-BzpfOQLD.js +41 -0
- package/dist/payout-verification-manual-gNEoeZkV.js +90 -0
- package/dist/person-IVZG3t3_.js +17 -0
- package/dist/pl-PL-BgbxWHGE.js +13 -0
- package/dist/pl-PL-BkGihn5Q.js +38 -0
- package/dist/pl-PL-Bmaq3IC3.js +75 -0
- package/dist/pl-PL-CErRPlR2.js +63 -0
- package/dist/pl-PL-CTOkaDMG.js +13 -0
- package/dist/pl-PL-DEMxxz7h.js +13 -0
- package/dist/pl-PL-DW9eaUml.js +61 -0
- package/dist/pl-PL-DqzUSnFK.js +13 -0
- package/dist/pl-PL-q9azN24o.js +65 -0
- package/dist/plaid-logo-FsZ7kfL-.js +14 -0
- package/dist/plus-DiALAL8-.js +14 -0
- package/dist/plus-circle-filled-BzHtTqEN.js +17 -0
- package/dist/process-field-configurations-DTeQU5DK.js +324 -0
- package/dist/pt-BR-BRdIEO2O.js +38 -0
- package/dist/pt-BR-BaTE6BB_.js +75 -0
- package/dist/pt-BR-BdfWE-a1.js +61 -0
- package/dist/pt-BR-BfDe_8iW.js +13 -0
- package/dist/pt-BR-BxoOF8jB.js +65 -0
- package/dist/pt-BR-CLUsrQAl.js +13 -0
- package/dist/pt-BR-Ct4s4jXV.js +13 -0
- package/dist/pt-BR-DA44Wgbt.js +63 -0
- package/dist/pt-BR-zuqB_CBf.js +13 -0
- package/dist/pt-PT-BLRgiqFj.js +13 -0
- package/dist/pt-PT-BfL7qUzo.js +38 -0
- package/dist/pt-PT-CFY1O_K0.js +13 -0
- package/dist/pt-PT-DBEsmXQX.js +13 -0
- package/dist/pt-PT-F1qPZJ2c.js +13 -0
- package/dist/pt-PT-PIiikho9.js +63 -0
- package/dist/pt-PT-c0ap84_F.js +75 -0
- package/dist/pt-PT-ej54BPbB.js +61 -0
- package/dist/pt-PT-pIChDwiI.js +65 -0
- package/dist/recurring-DKNs9K3x.js +17 -0
- package/dist/reporting-D5ABpLO_.js +16 -0
- package/dist/resolveEnvironment-0tLtiAxj.js +84 -0
- package/dist/revenue-accelerate-D7Sp0V4a.js +17 -0
- package/dist/review-D4TUjcWF.js +17 -0
- package/dist/ro-RO-0vx6ZLWV.js +13 -0
- package/dist/ro-RO-1ZFmLikG.js +61 -0
- package/dist/ro-RO-7CJ4F5iB.js +13 -0
- package/dist/ro-RO-BPOHV6Wp.js +75 -0
- package/dist/ro-RO-BeA_YyJ8.js +13 -0
- package/dist/ro-RO-Bv9hZxwD.js +63 -0
- package/dist/ro-RO-C00Ig8CL.js +13 -0
- package/dist/ro-RO-C2yBVFht.js +38 -0
- package/dist/ro-RO-DRsaNX9j.js +65 -0
- package/dist/roleMetadata-CQlMMuGM.js +66 -0
- package/dist/save-BfqO2JBI.js +14 -0
- package/dist/search-Cmzbf5zI.js +17 -0
- package/dist/show-IdbU1C6P.js +17 -0
- package/dist/singpass-logo-wY4xsmTX.js +17 -0
- package/dist/singpass-verification-instant-JCqTr7Mv.js +40 -0
- package/dist/singpass-verification-manual-DQ7XW6R3.js +34 -0
- package/dist/sk-SK-3_SoEn6P.js +75 -0
- package/dist/sk-SK-7-enbO1N.js +65 -0
- package/dist/sk-SK-BbJWayDh.js +13 -0
- package/dist/sk-SK-C74EF23u.js +38 -0
- package/dist/sk-SK-ChVwlbp0.js +63 -0
- package/dist/sk-SK-Dm-pif_7.js +61 -0
- package/dist/sk-SK-DuLm2CVx.js +13 -0
- package/dist/sk-SK-DubwJifw.js +13 -0
- package/dist/sk-SK-Og9MJXpR.js +13 -0
- package/dist/sl-SI-59OQIZ3f.js +13 -0
- package/dist/sl-SI-BAIm-qBe.js +13 -0
- package/dist/sl-SI-CoI7iOco.js +13 -0
- package/dist/sl-SI-CvUzNn9Z.js +38 -0
- package/dist/sl-SI-DTvJT7fC.js +65 -0
- package/dist/sl-SI-DZHePXbK.js +63 -0
- package/dist/sl-SI-DbfswGh0.js +75 -0
- package/dist/sl-SI-HO7231cu.js +61 -0
- package/dist/sl-SI-hxwQIw_i.js +13 -0
- package/dist/solution-payments-DpyE_sdS.js +14 -0
- package/dist/store-Btc4GcmU.js +14 -0
- package/dist/style.css +2846 -2814
- package/dist/styles-CLV89_hH.js +2846 -2814
- package/dist/summaryItem-CAQCQSkt.js +18 -0
- package/dist/sv-SE-0PQ-U1u6.js +13 -0
- package/dist/sv-SE-BZNey_8S.js +13 -0
- package/dist/sv-SE-BcJ8p_Tx.js +61 -0
- package/dist/sv-SE-BsLkPEzn.js +38 -0
- package/dist/sv-SE-CQWBP7n1.js +13 -0
- package/dist/sv-SE-ChoPzG_G.js +13 -0
- package/dist/sv-SE-D_Efxy3s.js +75 -0
- package/dist/sv-SE-Dq56vGlB.js +63 -0
- package/dist/sv-SE-N-Hqwcjq.js +65 -0
- package/dist/tax-reporting-graph-hgoilCHZ.js +504 -0
- package/dist/terminal-1-D1pwXCoi.js +18 -0
- package/dist/tink-logo-DDyjz5eJ.js +17 -0
- package/dist/types/api/address/useAddressCleanse.d.ts +1 -1
- package/dist/types/api/address/useRetrieveAddress.d.ts +1 -1
- package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -1
- package/dist/types/api/address/useSearchAddress.d.ts +1 -2
- package/dist/types/api/businessLines/businessLines.types.d.ts +6 -1
- package/dist/types/api/businessLines/useBusinessLines.d.ts +3 -3
- package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +2 -2
- package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +2 -2
- package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +2 -2
- package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +2 -2
- package/dist/types/api/check/useCheck.d.ts +1 -2
- package/dist/types/api/companyDataSet/companyDataset.types.d.ts +5 -0
- package/dist/types/api/companyDataSet/handleCompanyDataset.d.ts +6 -3
- package/dist/types/api/companyDataSet/useClearCompanyData.d.ts +2 -2
- package/dist/types/api/companySearch/companySearch.types.d.ts +8 -0
- package/dist/types/api/companySearch/useCompanySearch.d.ts +9 -4
- package/dist/types/api/companySelection/companySelection.types.d.ts +3 -3
- package/dist/types/api/companySelection/useCompanySelection.d.ts +2 -18
- package/dist/types/api/configurations/useScenarios.d.ts +3 -161
- package/dist/types/api/configurations/useSupportedCountries.d.ts +1 -1
- package/dist/types/api/configurations/useTaskTypes.d.ts +1 -1
- package/dist/types/api/configurations/useVersionConfiguration.d.ts +1 -1
- package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +2 -2
- package/dist/types/api/datasets/useLegalForms.d.ts +1 -1
- package/dist/types/api/datasets/useNaceCodes.d.ts +1 -1
- package/dist/types/api/datasets/useSourceOfFundsTypes.d.ts +1 -1
- package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -4
- package/dist/types/api/documents/useCreateDocument.d.ts +2 -2
- package/dist/types/api/documents/useDeleteDocument.d.ts +2 -2
- package/dist/types/api/documents/useDocument.d.ts +2 -2
- package/dist/types/api/documents/useDocuments.d.ts +4 -0
- package/dist/types/api/documents/useUpdateDocument.d.ts +2 -2
- package/dist/types/api/entityVerifications/useVerifyIdNumber.d.ts +2 -2
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +3 -4
- package/dist/types/api/idVerificationProviders/idVerificationStartCheck.d.ts +2 -2
- package/dist/types/api/idVerificationProviders/useExtractDocumentInformation.d.ts +2 -2
- package/dist/types/api/idVerificationProviders/useIdVerificationToken.d.ts +3 -3
- package/dist/types/api/industryCodes/useIndustryCodes.d.ts +1 -2
- package/dist/types/api/legalEntity/useConfirmReview.d.ts +2 -2
- package/dist/types/api/legalEntity/useLegalEntity.d.ts +8 -389
- package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +5 -5
- package/dist/types/api/onboardingStatus/useGenerateOnboardingLink.d.ts +2 -2
- package/dist/types/api/onboardingStatus/useOnboardingStatus.d.ts +1 -1
- package/dist/types/api/openId/useOpenIdAuthorizationLink.d.ts +1 -2
- package/dist/types/api/pci/usePciQuestionnaireList.d.ts +1 -1
- package/dist/types/api/pci/usePciStatus.d.ts +1 -1
- package/dist/types/api/pci/usePciTemplate.d.ts +1 -1
- package/dist/types/api/pci/useSignPci.d.ts +2 -3
- package/dist/types/api/providersConfiguration/useProviderStatus.d.ts +1 -1
- package/dist/types/api/queryKeys.d.ts +4 -2
- package/dist/types/api/taskStatus/useTaskStatus.d.ts +2 -2
- package/dist/types/api/taxClassification/useTaxClassification.d.ts +1 -1
- package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +2 -3
- package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +1 -7
- package/dist/types/api/termsOfService/useTermsOfService.d.ts +1 -1
- package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +1 -1
- package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +1 -1
- package/dist/types/api/tinVerification/useVerifyTin.d.ts +1 -1
- package/dist/types/api/transferInstruments/useBankVerificationProviders.d.ts +1 -1
- package/dist/types/api/transferInstruments/useCreateTrustedTransferInstrument.d.ts +1 -1
- package/dist/types/api/transferInstruments/useDeleteTransferInstrument.d.ts +1 -1
- package/dist/types/api/transferInstruments/useHandleBankVerificationError.d.ts +1 -1
- package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -2
- package/dist/types/api/transferInstruments/useTransferInstruments.d.ts +1 -1
- package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +1 -1
- package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +15 -0
- package/dist/types/api/types.d.ts +3 -2
- package/dist/types/api/uiAnalytics/useAnalyticsSession.d.ts +2 -2
- package/dist/types/api/uiAnalytics/usePushAnalyticEvent.d.ts +2 -2
- package/dist/types/api/validation/useValidateAccountIdentification.d.ts +2 -3
- package/dist/types/api/validation/useValidatePhoneNumber.d.ts +1 -1
- package/dist/types/components/Apps/tasks/TaskList/utils.d.ts +4 -0
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +1 -2
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -1
- package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +1 -0
- package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/rules.d.ts +2 -2
- package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +0 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +439 -439
- package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +3 -3
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
- package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +1 -1
- package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformation.d.ts +1 -4
- package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard/VerifiedBusinessCard.d.ts +8 -0
- package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +4 -6
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +2 -5
- package/dist/types/components/Business/forms/BasicInformation/BasicInformation.d.ts +1 -4
- package/dist/types/components/Business/forms/BasicInformation/types.d.ts +5 -18
- package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -46
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -22
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +8 -9
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelection.d.ts +13 -3
- package/dist/types/components/Business/forms/BusinessSelection/types.d.ts +0 -11
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +3 -4
- package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +0 -6
- package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +4 -0
- package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +3 -0
- package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +3 -0
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/ProofOfDirectorDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfDirectorDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/ProofOfSignatoryDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/ProofOfSignatoryDocument/types.d.ts +0 -3
- package/dist/types/components/Business/forms/RegistrationDocument/RegistrationDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +1 -3
- package/dist/types/components/Business/forms/TaxDocument/TaxDocument.d.ts +1 -1
- package/dist/types/components/Business/forms/TaxDocument/types.d.ts +1 -3
- package/dist/types/components/Business/forms/forms.types.d.ts +0 -3
- package/dist/types/components/Business/forms/rules.d.ts +10 -10
- package/dist/types/components/Business/mapping/businessDetails/businessBankAccountTaxIdUtils.d.ts +7 -0
- package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -2
- package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +8 -2
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +3 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +14 -6
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +24 -9
- package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +1 -1
- package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +5 -0
- package/dist/types/components/Business/utils/submit.d.ts +2 -0
- package/dist/types/components/Business/utils/useBusinessDetailsData.d.ts +21 -0
- package/dist/types/components/BusinessLines/constants.d.ts +10 -0
- package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
- package/dist/types/components/BusinessLines/fields/SctaField/SctaField.d.ts +2 -0
- package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +6 -0
- package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +1 -1
- package/dist/types/components/BusinessLines/forms/SctaForm/SctaForm.d.ts +2 -0
- package/dist/types/components/BusinessLines/forms/SctaForm/SctaInfoModal.d.ts +3 -0
- package/dist/types/components/BusinessLines/forms/SctaForm/types.d.ts +2 -0
- package/dist/types/components/BusinessLines/forms/rules.d.ts +2 -1
- package/dist/types/components/BusinessLines/pages/RootBusinessLinesPage.d.ts +1 -2
- package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +2 -1
- package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
- package/dist/types/components/BusinessLines/tasks/types.d.ts +4 -0
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +26 -4
- package/dist/types/components/BusinessLines/tasks/validate.d.ts +2 -0
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +3 -3
- package/dist/types/components/EFP/fields/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/EFP/fields/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5812 -582
- package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +3 -2
- package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +1 -1
- package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +1 -2
- package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +1 -2
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.d.ts +2 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.d.ts +4 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +28 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +15 -4
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +10 -1
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +20 -21
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +6 -4
- package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +1 -2
- package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +2 -1
- package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -2
- package/dist/types/components/EmbeddedDropins/InvitedDecisionMakerComponent/InvitedDecisionMakerComponent.d.ts +4 -0
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
- package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/RouterDropinComposer.d.ts +4 -0
- package/dist/types/components/Individual/fields/DriversLicense/DriversLicense.types.d.ts +1 -1
- package/dist/types/components/Individual/fields/IdentityNumber/fieldConfig.d.ts +4 -3
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +29 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/Identity.types.d.ts +13 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +11 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/Identity/validate.d.ts +4 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +22 -0
- package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +22 -0
- package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +8 -0
- package/dist/types/components/Individual/forms/DataConflictsModal/ConflictRow.d.ts +12 -0
- package/dist/types/components/Individual/forms/DataConflictsModal/DataConflictsModal.d.ts +24 -0
- package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +43 -0
- package/dist/types/components/Individual/forms/IdDocumentUpload/utils.d.ts +3 -0
- package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +18 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/IdVerificationMethod.types.d.ts +21 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +7 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +7 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +46 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/mapExtractionResultToSchema.d.ts +4 -0
- package/dist/types/components/Individual/forms/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
- package/dist/types/components/Individual/forms/Individual.d.ts +56 -0
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +45 -0
- package/dist/types/components/Individual/forms/Individual.types.d.ts +60 -0
- package/dist/types/components/Individual/forms/ProofOfRelationship/types.d.ts +14 -0
- package/dist/types/components/Individual/forms/ProofOfResidency/types.d.ts +39 -0
- package/dist/types/components/Individual/forms/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +6 -0
- package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaire.types.d.ts +13 -0
- package/dist/types/components/Individual/forms/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +7 -0
- package/dist/types/components/Individual/forms/form-ids.d.ts +2 -0
- package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -2
- package/dist/types/components/Individual/helpers/mandateIdVerificationForMotionCapture.d.ts +2 -3
- package/dist/types/components/Individual/helpers/roleUtils.d.ts +1 -1
- package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +1 -1
- package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +1 -1
- package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +6 -12
- package/dist/types/components/Individual/mapping/mapApiDocumentToIndividualDocuments.d.ts +2 -2
- package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -3
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +5 -0
- package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +3 -0
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +6 -7
- package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +2 -14
- package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +0 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +8 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +2 -2
- package/dist/types/components/Individual/tasks/IndividualDropin/individualFormConfig.d.ts +3 -3
- package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +0 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +2 -2
- package/dist/types/components/Shared/Introduction/copy.d.ts +3 -3
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +10 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/Currency.d.ts +1 -1
- package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/DBANameField.d.ts +1 -1
- package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/DateOfIncorporationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/EInvoicingCodeField.d.ts +1 -1
- package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +117 -1
- package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +1 -1
- package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +12 -6
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +3 -1
- package/dist/types/components/Shared/fields/LocalizedNameFields/types.d.ts +9 -0
- package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +5 -0
- package/dist/types/components/Shared/fields/NumberOfEmployees/NumberOfEmployees.d.ts +1 -1
- package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +5 -0
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/fieldConfig.d.ts +8 -0
- package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/StockExchangeMICField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/StockISINField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/StockTickerSymbolField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +6 -0
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +2 -1
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/Address.d.ts +1 -1
- package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +3 -1
- package/dist/types/components/Shared/forms/Address/types.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +5 -4
- package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +1 -2
- package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +5 -5
- package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +2 -2
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +2 -1
- package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +1 -2
- package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -1
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +5 -5
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +3 -3
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +1 -1
- package/dist/types/components/ui/atoms/Card/Card.d.ts +19 -0
- package/dist/types/components/ui/atoms/Link/Link.types.d.ts +1 -1
- package/dist/types/components/ui/atoms/Loader/Loader.d.ts +11 -5
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- package/dist/types/components/ui/atoms/MultiSelectList/MultiSelectList.d.ts +0 -1
- package/dist/types/components/ui/atoms/Svg/Svg.d.ts +0 -1
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +4 -0
- package/dist/types/components/ui/atoms/Tile/Tile.d.ts +2 -1
- package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
- package/dist/types/components/ui/molecules/ErrorPanel/ErrorPanel.d.ts +0 -1
- package/dist/types/context/ExperimentContext/types.d.ts +28 -50
- package/dist/types/context/QueryContext/QueryClient.d.ts +1 -1
- package/dist/types/context/StateContext/types.d.ts +2 -3
- package/dist/types/core/models/api/individual.d.ts +3 -0
- package/dist/types/core/models/api/instant-id-verification.d.ts +1 -1
- package/dist/types/core/models/api/legal-arrangement.d.ts +3 -0
- package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
- package/dist/types/core/models/api/legal-entity.d.ts +1 -6
- package/dist/types/core/process-field-configurations.d.ts +0 -5
- package/dist/types/core/services/types.d.ts +1 -1
- package/dist/types/core/user-events.d.ts +4 -2
- package/dist/types/embeds/baseEmbedProps.d.ts +0 -21
- package/dist/types/embeds/business-financing/adyen-business-financing.d.ts +2 -1
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +2 -0
- package/dist/types/embeds/individual-configuration/adyen-individual-configuration.d.ts +5 -1
- package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +2 -2
- package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.d.ts +5 -0
- package/dist/types/embeds/invited-decision-maker/adyen-invited-decision-maker.types.d.ts +34 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +2 -1
- package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.d.ts +5 -1
- package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts +2 -1
- package/dist/types/embeds/verification-status/adyen-verification-status.d.ts +2 -1
- package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -1
- package/dist/types/hooks/useForm/types.d.ts +0 -8
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +4 -2
- package/dist/types/hooks/usePageLandedEvent.d.ts +7 -0
- package/dist/types/hooks/useUboQuestionnaire.d.ts +2 -2
- package/dist/types/language/types.d.ts +7 -2
- package/dist/types/language/utils.d.ts +1 -2
- package/dist/types/router/DefaultRouteRedirect.d.ts +8 -0
- package/dist/types/router/MemoryRouterContext.d.ts +9 -0
- package/dist/types/router/OnboardingRouter.d.ts +39 -0
- package/dist/types/router/SuspenseRoute.d.ts +7 -0
- package/dist/types/router/getDefaultTask.d.ts +16 -0
- package/dist/types/router/routeConfig.d.ts +68 -0
- package/dist/types/router/useCurrentTask.d.ts +5 -0
- package/dist/types/router/useNavigate.d.ts +7 -0
- package/dist/types/stores/formState.d.ts +2 -0
- package/dist/types/stores/globalStore/get-task-status.d.ts +6 -0
- package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
- package/dist/types/types/assert.d.ts +1 -0
- package/dist/types/types/datasets/currency.d.ts +0 -1
- package/dist/types/types/form.d.ts +0 -2
- package/dist/types/utils/addLinkedFields.d.ts +0 -2
- package/dist/types/utils/analytics/debouncedInputEvent.d.ts +1 -0
- package/dist/types/utils/analytics/getPrefilledDetails.d.ts +28 -0
- package/dist/types/utils/api/documentUtils.d.ts +6 -0
- package/dist/types/utils/api/processCapabilitites.d.ts +14 -2
- package/dist/types/utils/birthDateUtils.d.ts +0 -17
- package/dist/types/utils/customerSupportUtils.d.ts +3 -0
- package/dist/types/utils/entityAssociationUtil.d.ts +3 -4
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +0 -2
- package/dist/types/utils/formUtils.d.ts +1 -6
- package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -2
- package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -3
- package/dist/types/utils/getName.d.ts +1 -1
- package/dist/types/utils/japanSupportUtils.d.ts +3 -0
- package/dist/types/utils/logger.d.ts +0 -1
- package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
- package/dist/types/utils/performance.d.ts +64 -0
- package/dist/types/utils/regex/patternValidators.d.ts +1 -1
- package/dist/types/utils/translation.d.ts +3 -2
- package/dist/types/utils/validatorUtils.d.ts +3 -1
- package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
- package/dist/types-BHB4nscA.js +74 -0
- package/dist/types-BW4HQI5X.js +142 -0
- package/dist/types-C_XJxWCe.js +64 -0
- package/dist/types-DelojZRn.js +34 -0
- package/dist/unincorporated-partnership-MeN1dp53.js +97 -0
- package/dist/upload-BmUXjsaU.js +17 -0
- package/dist/us-check-C1rTBsCY.js +46 -0
- package/dist/us-check-account-number-9lI1dXNC.js +48 -0
- package/dist/us-check-routing-number-s_KaAGSM.js +49 -0
- package/dist/useAssociatedLegalEntity-BGeGBL08.js +34 -0
- package/dist/useBusinessDetailsData-DC-wmNPR.js +5310 -0
- package/dist/useBusinessLines-ByGXMKMt.js +29 -0
- package/dist/useCanSeeIntroduction--oO1qdiT.js +48 -0
- package/dist/useCreateLegalEntity-BhOxB6BR.js +32 -0
- package/dist/useDataMissingRemediations-DSkyG5Z7.js +41 -0
- package/dist/useDataset-yW_bgdcI.js +76 -0
- package/dist/useDeleteTransferInstrument-7o0YMB_Y.js +32 -0
- package/dist/useForm-BO942FZd.js +582 -0
- package/dist/useFormContext-DQrT9O9G.js +201 -0
- package/dist/useGlobalData-u2zvMtMx.js +68 -0
- package/dist/useId-BZ0PA7jP.js +24 -0
- package/dist/useMultiForm-CT8j56sz.js +873 -0
- package/dist/useNavigate-uXdvk8zK.js +265 -0
- package/dist/useOnboardingStatus-fuu0YjVz.js +28 -0
- package/dist/usePciQuestionnaireList-Bx4kLQdp.js +29 -0
- package/dist/useSalesChannels-DWNaDLQE.js +65 -0
- package/dist/useScenarios-h02LgFwh.js +48 -0
- package/dist/useSetting-DE1-_Vco.js +19 -0
- package/dist/useTaskStatus-B5twg5YX.js +51 -0
- package/dist/useTermsOfServiceStatus-YEliqzc0.js +43 -0
- package/dist/useToastContext-C4DyQocl.js +49 -0
- package/dist/useTrustMembers-OlL-flWZ.js +163 -0
- package/dist/useUnincorporatedPartnershipMembers-DskiP-FD.js +99 -0
- package/dist/useUpdateBusinessLines-BwPww5xr.js +339 -0
- package/dist/useUpdateLegalEntity-CCe3LXjI.js +40 -0
- package/dist/utils-B4EWNpln.js +58 -0
- package/dist/utils-CV_cvF6v.js +159 -0
- package/dist/utils-DV-jCPYV.js +29 -0
- package/dist/utils-DYNMAZ4x.js +237 -0
- package/dist/utils-g7QCpZSv.js +778 -0
- package/dist/validate-BIn1CJPi.js +108 -0
- package/dist/validate-CLiAFCrt.js +434 -0
- package/dist/validationError-ZbdyGpRj.js +86 -0
- package/dist/warning-circle-fill-DBvt921B.js +17 -0
- package/dist/warning-diamond-filled-Lb2od2ry.js +17 -0
- package/dist/webinar-m9nuFZBt.js +22 -0
- package/dist/yapily-logo-BduxhNRA.js +17 -0
- package/package.json +78 -57
- package/dist/4-people-BzyXLUF9.js +0 -24
- package/dist/AcceptTermsOfServiceComponent-B150yg9N.js +0 -659
- package/dist/Accordion-CVxApR1X.js +0 -88
- package/dist/AccountSetupRejected--dXDa8bC.js +0 -26
- package/dist/ActionBar-Tv1K68ZK.js +0 -31
- package/dist/Address-DrRgozSN.js +0 -1348
- package/dist/Alert-BVHHWVgg.js +0 -159
- package/dist/Avatar-sN35oNt2.js +0 -60
- package/dist/BG-DlvaKo4n.js +0 -27
- package/dist/BusinessDetailsMultiformDropin-BeJATuiX.js +0 -4220
- package/dist/BusinessFinancingComponent-CGBUx-zj.js +0 -54
- package/dist/BusinessFinancingDropin-DxKkpM-k.js +0 -1853
- package/dist/BusinessFinancingPage-JChGPCHT.js +0 -43
- package/dist/BusinessTypeSelectionPage-CH-OiNqT.js +0 -427
- package/dist/Card-B66f7NuH.js +0 -82
- package/dist/ConstitutionalDocument-DIW7X8rZ.js +0 -143
- package/dist/ContractViewer-Byp71k2e.js +0 -935
- package/dist/CountryField-D36v7bff.js +0 -843
- package/dist/CreateIndividualComponent-fmBoSuxQ.js +0 -71
- package/dist/CreateTransferInstrumentComponent-CViSbC6e.js +0 -63
- package/dist/Currency-DlHtZ9aJ.js +0 -183
- package/dist/CustomerSupport-L3PHpji7.js +0 -153
- package/dist/DebugModal-C1mi00fP.js +0 -413
- package/dist/DecisionMakerDetailsPage-li_HZWuV.js +0 -106
- package/dist/DecisionMakers-C8AjEnUh.js +0 -830
- package/dist/EmbeddedStatus-CrKg6woS.js +0 -99
- package/dist/EndStateLayout-CPXu6AzB.js +0 -71
- package/dist/EntityAssociation-SkprG-At.js +0 -159
- package/dist/EntityGuidanceStatus-D9lctwyX.js +0 -105
- package/dist/FormFlow-BVw3rIvU.js +0 -224
- package/dist/FormNavigation-Bag7ETpV.js +0 -144
- package/dist/FormWrapper-BfsyttAY.js +0 -135
- package/dist/IndividualOnfido-CmDDWqG_.js +0 -9594
- package/dist/IndividualOnfidoDropin-VMZXwhd7.js +0 -2497
- package/dist/InputText-DHRZ5RNd.js +0 -249
- package/dist/Introduction-Cht7yZI7.js +0 -300
- package/dist/JpAddress-DCky_der.js +0 -280
- package/dist/LegalRepresentativeDetailsPage-Bez436Rb.js +0 -60
- package/dist/ListItem-DrwSQslm.js +0 -69
- package/dist/ManageIndividualComponent-lLoElwga.js +0 -46
- package/dist/ManageTermsOfServiceComponent-CH1M-H1Y.js +0 -52
- package/dist/ManageTransferInstrumentComponent-NZ8vELQC.js +0 -287
- package/dist/MaybeModal-D4PWacZ0.js +0 -25
- package/dist/Modal-lDK70UQc.js +0 -149
- package/dist/OnboardingDropinComponent-Cljx74I-.js +0 -7908
- package/dist/PayoutDetailsDropin-p2t6lj8Z.js +0 -4841
- package/dist/Review-fdhuI2MF.js +0 -83
- package/dist/RootBusinessDetailsPage-Bb1mWkAw.js +0 -61
- package/dist/RootBusinessLinesPage-Bge83rhi.js +0 -1118
- package/dist/RootIndividualDetailsPage-B31dJO7o.js +0 -71
- package/dist/SignPCIComponent-C0P_OLXa.js +0 -304
- package/dist/SingpassSelection-B2rjBQ6u.js +0 -130
- package/dist/SoleProprietorshipPage-3S2tDRwx.js +0 -60
- package/dist/SourceOfFundsPage-BpV6fE8P.js +0 -2383
- package/dist/StepProgressIndicator-CBkt5fOY.js +0 -78
- package/dist/StoreProvider-l6WD5T55.js +0 -7674
- package/dist/Summary-Ccxu9A6C.js +0 -204
- package/dist/TaxReportingDropin-H22DcnSG.js +0 -502
- package/dist/TrustDetailsPage-BvIa1mbz.js +0 -2149
- package/dist/TrustMemberCompanyPage-VNaovE9r.js +0 -73
- package/dist/TrustMemberIndividualPage-Dp9kroxy.js +0 -66
- package/dist/TrustMemberRoleAndTypePage-BbbTPGJm.js +0 -985
- package/dist/TrustMembersOverview-Dd7lo_I5.js +0 -438
- package/dist/UnincorporatedPartnershipIndividualPage-CcLh5gtc.js +0 -65
- package/dist/UnincorporatedPartnershipMemberCompanyPage-DA-1RrVz.js +0 -76
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-CgLeyHTs.js +0 -281
- package/dist/UnincorporatedPartnershipMembersOverview-CNONb63l.js +0 -172
- package/dist/VerificationErrorAlert-D7gb2Rqo.js +0 -79
- package/dist/ViewVerificationStatusComponent-DpeNbWSm.js +0 -180
- package/dist/arrow-right-KxA3SvQj.js +0 -14
- package/dist/bag-BPumznWh.js +0 -14
- package/dist/bank-D6FiNBhs.js +0 -14
- package/dist/bg-BG-B7Xs_t04.js +0 -13
- package/dist/bg-BG-CepHap8j.js +0 -68
- package/dist/bg-BG-D9J6LnkI.js +0 -57
- package/dist/bg-BG-DH45-0B-.js +0 -29
- package/dist/bg-BG-DRkMqyL8.js +0 -13
- package/dist/bg-BG-Dp4LxSP7.js +0 -37
- package/dist/bg-BG-DpIAKQve.js +0 -113
- package/dist/bg-BG-mLSjG76Q.js +0 -13
- package/dist/bg-BG-wVquMNtT.js +0 -55
- package/dist/bin-Bz6KOIeE.js +0 -18
- package/dist/business-lines-DboUCbXw.js +0 -135
- package/dist/capital-GVQ3svwN.js +0 -17
- package/dist/cash-stack-D9AoDDwt.js +0 -22
- package/dist/certificate-CdEWgHQf.js +0 -17
- package/dist/checkmark-Q7x6tGhy.js +0 -14
- package/dist/checkmark-circle-fill-CsvN5_PL.js +0 -17
- package/dist/checkmark-circle-x7dzbp3I.js +0 -20
- package/dist/checkmark-small-D35myntq.js +0 -14
- package/dist/chevron-down-C2iDorpW.js +0 -14
- package/dist/chevron-left-ztPO84q-.js +0 -14
- package/dist/chevron-right-C_JN0oDt.js +0 -14
- package/dist/chevron-up-CgG8n25g.js +0 -14
- package/dist/circle-Bt3Nlr3q.js +0 -17
- package/dist/circle-small-filled-YMzP6yQU.js +0 -14
- package/dist/clock-BZHremOA.js +0 -20
- package/dist/coins-fkAk6dCo.js +0 -17
- package/dist/contract-BTa4HltT.js +0 -14
- package/dist/cross-Cn09MtQ_.js +0 -14
- package/dist/cross-circle-fill-small-DCz52AuN.js +0 -14
- package/dist/cs-CZ--jOkoHVS.js +0 -55
- package/dist/cs-CZ-BDf9m4Rw.js +0 -113
- package/dist/cs-CZ-BP7niQM9.js +0 -68
- package/dist/cs-CZ-BSWXexr4.js +0 -13
- package/dist/cs-CZ-BsV9NiQ2.js +0 -13
- package/dist/cs-CZ-CyLqoG1j.js +0 -37
- package/dist/cs-CZ-DPVMeRye.js +0 -29
- package/dist/cs-CZ-DY_pQqAT.js +0 -57
- package/dist/cs-CZ-DalFZigH.js +0 -13
- package/dist/da-DK-CI-vfqPo.js +0 -113
- package/dist/da-DK-D4Ojw97o.js +0 -13
- package/dist/da-DK-DU4dCNEw.js +0 -29
- package/dist/da-DK-DYpfNZdP.js +0 -37
- package/dist/da-DK-Dc0QYG8m.js +0 -68
- package/dist/da-DK-JHZnsI59.js +0 -55
- package/dist/da-DK-P3YSaBqs.js +0 -13
- package/dist/da-DK-R_y7YwqQ.js +0 -13
- package/dist/da-DK-jK7c9UL0.js +0 -57
- package/dist/de-DE-BR6CLZw6.js +0 -13
- package/dist/de-DE-BXt1K0Tr.js +0 -37
- package/dist/de-DE-BcuLmcC8.js +0 -13
- package/dist/de-DE-Dz2OsS1F.js +0 -68
- package/dist/de-DE-Dz2l6jRl.js +0 -29
- package/dist/de-DE-VGGEkxUT.js +0 -55
- package/dist/de-DE-nG2MBigU.js +0 -113
- package/dist/de-DE-opyC1JO-.js +0 -13
- package/dist/de-DE-wmerDL2e.js +0 -57
- package/dist/debouncedInputEvent-Bifj90NU.js +0 -109
- package/dist/decision-makers-group-CgddXgrx.js +0 -1944
- package/dist/digital-wallet-D_IpxnkN.js +0 -46
- package/dist/document-1-C08ut-Dt.js +0 -14
- package/dist/document-blurred-2Zpodj3_.js +0 -37
- package/dist/document-cut-off-ClS7RiOp.js +0 -32
- package/dist/document-expired-CjksBq-N.js +0 -38
- package/dist/document-front-DiAairT3.js +0 -30
- package/dist/document-person-vxlA6C5f.js +0 -20
- package/dist/documentUtils-CunPooif.js +0 -218
- package/dist/download-Drhk9k1f.js +0 -17
- package/dist/dropinUtils-DSk8OL7G.js +0 -202
- package/dist/edit-1-CFoDTMvQ.js +0 -14
- package/dist/el-GR-B3FHqTOX.js +0 -13
- package/dist/el-GR-B90M6tcZ.js +0 -37
- package/dist/el-GR-BHG69mXl.js +0 -68
- package/dist/el-GR-BX-MyQZY.js +0 -113
- package/dist/el-GR-Btrk_npt.js +0 -57
- package/dist/el-GR-CWd7XYDU.js +0 -13
- package/dist/el-GR-CofvCav-.js +0 -13
- package/dist/el-GR-MLFY-Gg7.js +0 -29
- package/dist/el-GR-gkaKwnln.js +0 -55
- package/dist/en-US-BPI4FZwa.js +0 -113
- package/dist/en-US-CzEL6t1W.js +0 -55
- package/dist/en-US-D-B35AoN.js +0 -68
- package/dist/en-US-DYo4OF-P.js +0 -29
- package/dist/en-US-Dg505Oh3.js +0 -37
- package/dist/en-US-fyGPkcqX.js +0 -13
- package/dist/en-US-gsp7CD_E.js +0 -57
- package/dist/es-ES-0ROz-BJh.js +0 -29
- package/dist/es-ES-BAg3NqQO.js +0 -13
- package/dist/es-ES-BI_jdT67.js +0 -68
- package/dist/es-ES-BhINIOee.js +0 -13
- package/dist/es-ES-BhNhIf08.js +0 -37
- package/dist/es-ES-Bn9_0wK0.js +0 -55
- package/dist/es-ES-CEp-ttVJ.js +0 -13
- package/dist/es-ES-Q16q2JJ6.js +0 -113
- package/dist/es-ES-Qnc0Q6JH.js +0 -57
- package/dist/et-EE-BMgFCxds.js +0 -37
- package/dist/et-EE-BYSnV6Iq.js +0 -55
- package/dist/et-EE-Bk2IHQWP.js +0 -13
- package/dist/et-EE-C_PZO2aI.js +0 -68
- package/dist/et-EE-Ci8RU2wg.js +0 -13
- package/dist/et-EE-DmShD6oS.js +0 -113
- package/dist/et-EE-TzXANcP2.js +0 -57
- package/dist/et-EE-esci5847.js +0 -29
- package/dist/et-EE-x29FUaYN.js +0 -118
- package/dist/external-link-DCMYUMfW.js +0 -14
- package/dist/fi-FI-B_P4BAda.js +0 -113
- package/dist/fi-FI-CDISJifz.js +0 -13
- package/dist/fi-FI-DjlB2a7k.js +0 -13
- package/dist/fi-FI-Dn2MC8uW.js +0 -57
- package/dist/fi-FI-MiyuQqH8.js +0 -13
- package/dist/fi-FI-PVFqd5Ra.js +0 -55
- package/dist/fi-FI-hwzizPnr.js +0 -68
- package/dist/fi-FI-xXrvDLFe.js +0 -29
- package/dist/fi-FI-ysUrBilO.js +0 -37
- package/dist/fieldConfigurations-D99U6JIQ.js +0 -1402
- package/dist/fr-FR-BSvSKazD.js +0 -37
- package/dist/fr-FR-BWX14yb7.js +0 -57
- package/dist/fr-FR-Bw9O-QAU.js +0 -29
- package/dist/fr-FR-CUdiBCVB.js +0 -113
- package/dist/fr-FR-CYZXbwc9.js +0 -68
- package/dist/fr-FR-DGMVrsJv.js +0 -13
- package/dist/fr-FR-Dx-CiPdB.js +0 -13
- package/dist/fr-FR-aJ3cg4x0.js +0 -13
- package/dist/fr-FR-mJK4hjwD.js +0 -55
- package/dist/funds-in-D8bj0aoE.js +0 -21
- package/dist/getFieldsWithExistingData-BLXGczCN.js +0 -22
- package/dist/getName-_U3PeNHl.js +0 -48
- package/dist/gift-CQ_DEma7.js +0 -14
- package/dist/graph-BJmqglH2.js +0 -21
- package/dist/graph-up-Bq6adtlX.js +0 -20
- package/dist/hasDataChanged-BwDHn0i2.js +0 -19
- package/dist/headquarter-DNYyuuFq.js +0 -21
- package/dist/hotel-BuNql78Z.js +0 -22
- package/dist/house-B6sNRj-B.js +0 -21
- package/dist/hr-HR-BHt_jklG.js +0 -13
- package/dist/hr-HR-BLpGb4f2.js +0 -37
- package/dist/hr-HR-CXpCIMhI.js +0 -113
- package/dist/hr-HR-CZLSQruE.js +0 -57
- package/dist/hr-HR-D8_yhtIo.js +0 -29
- package/dist/hr-HR-VivDwwdW.js +0 -13
- package/dist/hr-HR-bE6cvRCQ.js +0 -68
- package/dist/hr-HR-n7aMHIpM.js +0 -13
- package/dist/hr-HR-qmYyO-nT.js +0 -55
- package/dist/hu-HU-CS-7iNS4.js +0 -55
- package/dist/hu-HU-Ca9Hex26.js +0 -37
- package/dist/hu-HU-DDsdPI5V.js +0 -13
- package/dist/hu-HU-DG-NUDx4.js +0 -68
- package/dist/hu-HU-D_DvlCMw.js +0 -13
- package/dist/hu-HU-DqEBeq-w.js +0 -113
- package/dist/hu-HU-KliQetm5.js +0 -29
- package/dist/hu-HU-WEtpzb41.js +0 -13
- package/dist/hu-HU-kp8Go5hZ.js +0 -57
- package/dist/id-blurred-9dzBOWCE.js +0 -59
- package/dist/id-cut-off-CohJCI2h.js +0 -55
- package/dist/id-front-CSZfvdRg.js +0 -52
- package/dist/id-glare-Q2JWo5ts.js +0 -49
- package/dist/id-verification-instant-BUVBO4R3.js +0 -58
- package/dist/id-verification-manual-B3YZALYU.js +0 -55
- package/dist/iframeWidget-BEBSgwZP.js +0 -234
- package/dist/image-BSihO8lR.js +0 -17
- package/dist/info-vHTZWoJ7.js +0 -21
- package/dist/instant-verification-Dvvkyfmp.js +0 -40
- package/dist/it-IT-B0YGvVgW.js +0 -57
- package/dist/it-IT-BTWkWSJq.js +0 -55
- package/dist/it-IT-C2MZo4KT.js +0 -13
- package/dist/it-IT-DLm11dH5.js +0 -13
- package/dist/it-IT-Erh1DIlj.js +0 -68
- package/dist/it-IT-MwpjRAG6.js +0 -29
- package/dist/it-IT-NCFAqV1F.js +0 -113
- package/dist/it-IT-Qfzc8jnW.js +0 -37
- package/dist/it-IT-yV7ewjWU.js +0 -13
- package/dist/ja-JP-2u5fqLWF.js +0 -29
- package/dist/ja-JP-Bktpl_2b.js +0 -118
- package/dist/ja-JP-CHQ64lw1.js +0 -37
- package/dist/ja-JP-CSz7fEkn.js +0 -55
- package/dist/ja-JP-CWe8f7m4.js +0 -13
- package/dist/ja-JP-C_-moDrA.js +0 -113
- package/dist/ja-JP-Ctsk4z4q.js +0 -151
- package/dist/ja-JP-Dz9IVH4p.js +0 -57
- package/dist/ja-JP-ThzG9vIo.js +0 -68
- package/dist/ja-JP-bz7ekGnF.js +0 -27
- package/dist/localizeDateString-RwwotuyP.js +0 -27
- package/dist/location-Q4oKvnkl.js +0 -17
- package/dist/lt-LT-0RKZeraM.js +0 -37
- package/dist/lt-LT-B6XmKUXx.js +0 -55
- package/dist/lt-LT-BEsBoIQ9.js +0 -29
- package/dist/lt-LT-CU5qHa7a.js +0 -113
- package/dist/lt-LT-CYiW52tl.js +0 -13
- package/dist/lt-LT-Cg9c0kae.js +0 -13
- package/dist/lt-LT-Nd1uRoIj.js +0 -68
- package/dist/lt-LT-W6fTjwB5.js +0 -13
- package/dist/lt-LT-l9rzkFg9.js +0 -57
- package/dist/lv-LV-Bh-WQp0K.js +0 -37
- package/dist/lv-LV-CgMxfFK8.js +0 -13
- package/dist/lv-LV-CpGkmcLz.js +0 -113
- package/dist/lv-LV-CxUmQHF9.js +0 -13
- package/dist/lv-LV-DKhV24CI.js +0 -68
- package/dist/lv-LV-DYbb5pkt.js +0 -57
- package/dist/lv-LV-DsSpy50n.js +0 -55
- package/dist/lv-LV-DsxFGThp.js +0 -13
- package/dist/lv-LV-Veji7-on.js +0 -29
- package/dist/mail-BOdyoVqB.js +0 -14
- package/dist/manual-verification-BvZWqA00.js +0 -41
- package/dist/mapExistingFile-nB9LIvV9.js +0 -156
- package/dist/mapFinancialReportsToFinancialInformation-BgizOY0T.js +0 -67
- package/dist/mapJpAddressSchemaToAddressLocalizations-DnDo_BVY.js +0 -63
- package/dist/mapLegalEntityToIndividualOnfidoSchema-BpjOTE3z.js +0 -143
- package/dist/mapTransferInstrumentToPayoutAccount-DMZUSLNm.js +0 -33
- package/dist/minus-circle-filled-kC2IUvKz.js +0 -17
- package/dist/nl-NL-BMUYBqlF.js +0 -57
- package/dist/nl-NL-Bk-1-C0e.js +0 -13
- package/dist/nl-NL-BuW3jWdI.js +0 -29
- package/dist/nl-NL-CMw-FwQV.js +0 -13
- package/dist/nl-NL-CTf7zH4M.js +0 -55
- package/dist/nl-NL-D7gBNWEY.js +0 -37
- package/dist/nl-NL-DKMs4pB2.js +0 -13
- package/dist/nl-NL-DMpB18Te.js +0 -113
- package/dist/nl-NL-O9GCHMDA.js +0 -68
- package/dist/no-NO-B-oUwe9q.js +0 -13
- package/dist/no-NO-C-gCYc9q.js +0 -37
- package/dist/no-NO-CA0EizAy.js +0 -29
- package/dist/no-NO-CA1aR6Wh.js +0 -68
- package/dist/no-NO-Ca5qoVaU.js +0 -113
- package/dist/no-NO-DKbWxgF-.js +0 -57
- package/dist/no-NO-DN9qf-_I.js +0 -13
- package/dist/no-NO-Dhj0Fh__.js +0 -13
- package/dist/no-NO-RfTK9KAV.js +0 -55
- package/dist/onfido-logo-BWSv__sQ.js +0 -14
- package/dist/options-horizontal-CBmbNv7R.js +0 -18
- package/dist/partner-CPjsrePY.js +0 -18
- package/dist/passport-blurred-B4UDQfmc.js +0 -59
- package/dist/passport-cut-off-C0N2mgLk.js +0 -56
- package/dist/passport-front-BwA7wR91.js +0 -52
- package/dist/passport-front-green-BL4HmtsB.js +0 -232
- package/dist/passport-glare-Mg2ixsYA.js +0 -50
- package/dist/pay-by-link-plane-BVZndh67.js +0 -22
- package/dist/payout-ChUEoLjt.js +0 -20
- package/dist/payout-verification-instant-5u-wvFKv.js +0 -41
- package/dist/payout-verification-manual-BH2mu0UW.js +0 -90
- package/dist/person-DGjUU4S4.js +0 -17
- package/dist/pl-PL-B0zGy_b4.js +0 -57
- package/dist/pl-PL-BKDK0_G8.js +0 -68
- package/dist/pl-PL-BSI0zHO1.js +0 -113
- package/dist/pl-PL-D7nhdbfR.js +0 -29
- package/dist/pl-PL-DGSYzOx6.js +0 -13
- package/dist/pl-PL-Duj3tncM.js +0 -13
- package/dist/pl-PL-Dy8qWH39.js +0 -55
- package/dist/pl-PL-LnVPufjb.js +0 -37
- package/dist/pl-PL-p8YxqOFg.js +0 -13
- package/dist/plaid-logo-CtActXTN.js +0 -14
- package/dist/plus-CWXA5wdX.js +0 -14
- package/dist/plus-circle-filled-CbC0u2Y1.js +0 -17
- package/dist/process-field-configurations-6LtTXNwK.js +0 -324
- package/dist/pt-BR--kaJvtE6.js +0 -57
- package/dist/pt-BR-BbFJsIVX.js +0 -55
- package/dist/pt-BR-Be5ZycMV.js +0 -13
- package/dist/pt-BR-Cj8MlQyq.js +0 -113
- package/dist/pt-BR-Cm4vZocb.js +0 -13
- package/dist/pt-BR-D1nTSLod.js +0 -29
- package/dist/pt-BR-DKrMpM6v.js +0 -13
- package/dist/pt-BR-NtLaWlnZ.js +0 -68
- package/dist/pt-BR-ur86nRrK.js +0 -37
- package/dist/pt-PT-B4F_5NWi.js +0 -55
- package/dist/pt-PT-B9L50746.js +0 -29
- package/dist/pt-PT-BJjCTMYf.js +0 -13
- package/dist/pt-PT-BJkVzfAJ.js +0 -113
- package/dist/pt-PT-BR-BI5Jn.js +0 -13
- package/dist/pt-PT-BZ5ZZm6G.js +0 -57
- package/dist/pt-PT-Bh7v8xbp.js +0 -13
- package/dist/pt-PT-CVNEcs32.js +0 -37
- package/dist/pt-PT-DSxxVA0f.js +0 -68
- package/dist/recurring-CkL4cCM2.js +0 -17
- package/dist/reporting-DerosUNm.js +0 -16
- package/dist/resolveEnvironment-BC4yY4gV.js +0 -164
- package/dist/revenue-accelerate-Dp4Ns_5c.js +0 -17
- package/dist/review-CxIN9azU.js +0 -17
- package/dist/ro-RO-5I4Q_FyK.js +0 -13
- package/dist/ro-RO-B8leE4ZJ.js +0 -13
- package/dist/ro-RO-Bybq8JFn.js +0 -68
- package/dist/ro-RO-CICjAFys.js +0 -55
- package/dist/ro-RO-CdSsgoUG.js +0 -57
- package/dist/ro-RO-DjGku_3y.js +0 -13
- package/dist/ro-RO-DvG65dTt.js +0 -29
- package/dist/ro-RO-RgC5M6CE.js +0 -113
- package/dist/ro-RO-i7lojG2G.js +0 -37
- package/dist/rules-ajv47uCu.js +0 -314
- package/dist/save-Fgy7EDid.js +0 -14
- package/dist/search-C4GZ-Rc1.js +0 -17
- package/dist/show-yPjPmEf8.js +0 -17
- package/dist/singpass-logo-BkMSwiGY.js +0 -17
- package/dist/singpass-verification-instant-hY4eGFwl.js +0 -40
- package/dist/singpass-verification-manual-DwhRpy5Q.js +0 -34
- package/dist/sk-SK-0BVxI7bf.js +0 -113
- package/dist/sk-SK-B5brxU1N.js +0 -37
- package/dist/sk-SK-BMJgOJoa.js +0 -29
- package/dist/sk-SK-BRd5TN22.js +0 -55
- package/dist/sk-SK-BVmoP_EU.js +0 -13
- package/dist/sk-SK-BWwRIx2d.js +0 -13
- package/dist/sk-SK-Bb18qPBw.js +0 -13
- package/dist/sk-SK-BiBWPJUf.js +0 -57
- package/dist/sk-SK-C6rMIxpz.js +0 -68
- package/dist/sl-SI-6s8xycKg.js +0 -13
- package/dist/sl-SI-BMF8YtOm.js +0 -29
- package/dist/sl-SI-BxImW_RL.js +0 -113
- package/dist/sl-SI-CUCrzJQv.js +0 -37
- package/dist/sl-SI-CaJmYb6p.js +0 -13
- package/dist/sl-SI-D8dDckrW.js +0 -55
- package/dist/sl-SI-DtdGMD6i.js +0 -57
- package/dist/sl-SI-ZxyvdgdS.js +0 -13
- package/dist/sl-SI-tPwbFvOI.js +0 -68
- package/dist/solution-payments-CNAat9h7.js +0 -14
- package/dist/store-IuAkDRAp.js +0 -14
- package/dist/sv-SE-B1sbgsnh.js +0 -13
- package/dist/sv-SE-BUq1X9F0.js +0 -113
- package/dist/sv-SE-BYC_f8r7.js +0 -29
- package/dist/sv-SE-C6uPh9g5.js +0 -37
- package/dist/sv-SE-CCFIf86P.js +0 -13
- package/dist/sv-SE-DGpvVvWj.js +0 -55
- package/dist/sv-SE-D_ZnGxiQ.js +0 -13
- package/dist/sv-SE-K1QT1cOt.js +0 -68
- package/dist/sv-SE-kR514dO1.js +0 -57
- package/dist/tax-reporting-graph-DjzwRgE6.js +0 -504
- package/dist/terminal-1-_me9J9h0.js +0 -18
- package/dist/tink-logo-BcIv93ND.js +0 -17
- package/dist/types/components/Business/forms/AdditionalInformation/AdditionalInformationMultiform.d.ts +0 -9
- package/dist/types/components/Business/forms/AdditionalInformation/VerifiedBusinessCard.d.ts +0 -9
- package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -11
- package/dist/types/components/Business/forms/BusinessDetails/BusinessDetails.d.ts +0 -3
- package/dist/types/components/Business/forms/BusinessSelection/BusinessSelectionMultiform.d.ts +0 -14
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructureMultiform.d.ts +0 -4
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiformDropin.d.ts +0 -5
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/types.d.ts +0 -2
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -19
- package/dist/types/components/Individual/fields/DecisionMakerRole/DecisionMakerRole.d.ts +0 -3
- package/dist/types/components/Individual/fields/DecisionMakerRole/NomineeDecisionMakerRole.d.ts +0 -10
- package/dist/types/components/Individual/fields/DecisionMakerRole/types.d.ts +0 -23
- package/dist/types/components/Individual/fields/LocalizedNameFields/types.d.ts +0 -9
- package/dist/types/components/Individual/fields/NameFields/validate.d.ts +0 -4
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentAlreadyUpload.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentInstantVerification.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/IdDocumentUpload.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +0 -53
- package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +0 -15
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/types.d.ts +0 -14
- package/dist/types/components/Individual/forms/Individual/Individual.d.ts +0 -9
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/Identity.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityAu/validate.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityHK/validate.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +0 -2
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/IdentityNZ/validate.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/identityUS/IdentityUS.d.ts +0 -4
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/Identity/types.d.ts +0 -14
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/PersonalDetails.d.ts +0 -3
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/types.d.ts +0 -39
- package/dist/types/components/Individual/forms/Individual/PersonalDetails/validate.d.ts +0 -21
- package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -14
- package/dist/types/components/Individual/forms/Individual/ProofOfResidency/types.d.ts +0 -39
- package/dist/types/components/Individual/forms/Individual/rules.d.ts +0 -40
- package/dist/types/components/Individual/forms/Individual/types.d.ts +0 -51
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +0 -29
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/Identity.types.d.ts +0 -13
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/TypeOfIdentity/index.d.ts +0 -11
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/Identity/validate.d.ts +0 -4
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/validate.d.ts +0 -22
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -22
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/validate.d.ts +0 -6
- package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/ConflictRow.d.ts +0 -12
- package/dist/types/components/Individual/forms/IndividualOnfido/DataConflictsModal/DataConflictsModal.d.ts +0 -24
- package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +0 -17
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -20
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/OnfidoVerificationModal/OnfidoVerificationModal.d.ts +0 -7
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/UploadedDocument/UploadedDocument.d.ts +0 -7
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/individualOnfidoConflictsSchema.d.ts +0 -46
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +0 -4
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +0 -12
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -52
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +0 -46
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +0 -59
- package/dist/types/components/Individual/forms/IndividualOnfido/SignatoryQuestionnaire/SignatoryQuestionnaire.types.d.ts +0 -6
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +0 -13
- package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +0 -7
- package/dist/types/components/Individual/helpers/isOnfidoAutofillFlowEnabled.d.ts +0 -4
- package/dist/types/components/Individual/mapping/adjustIdentificationData.d.ts +0 -3
- package/dist/types/components/Individual/mapping/getIdentityTypeToApiIdentityTypeMap.d.ts +0 -3
- package/dist/types/components/Individual/mapping/individualOnfidoKeyMappings.d.ts +0 -8
- package/dist/types/components/Individual/mapping/mapIndividualOnfidoSchemaToLegalEntity.d.ts +0 -5
- package/dist/types/components/Individual/mapping/mapIndividualToLegalEntity.d.ts +0 -3
- package/dist/types/components/Individual/mapping/mapLegalEntityToIndividual.d.ts +0 -3
- package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualOnfidoSchema.d.ts +0 -3
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +0 -2
- package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/individualOnfidoFormConfig.d.ts +0 -4
- package/dist/types/components/Shared/forms/BusinessTypeSelection/EntityTypeRadioGroupCard.d.ts +0 -11
- package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +0 -3
- package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialReportsToFinancialInformation.d.ts +0 -3
- package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +0 -8
- package/dist/types/components/ui/molecules/Card/Card.d.ts +0 -3
- package/dist/types/components/ui/molecules/Card/types.d.ts +0 -26
- package/dist/types/embeds/EmbedBaseElement.d.ts +0 -41
- package/dist/types/embeds/EmbedCore.d.ts +0 -22
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +0 -13
- package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +0 -12
- package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +0 -12
- package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +0 -12
- package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +0 -12
- package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +0 -12
- package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +0 -16
- package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +0 -14
- package/dist/types/embeds/verification-status/AdyenVerificationStatus.d.ts +0 -20
- package/dist/types-6CojAGL0.js +0 -88
- package/dist/types-DRdQDn19.js +0 -34
- package/dist/types-DnURYYMD.js +0 -74
- package/dist/types-f66rmUFy.js +0 -164
- package/dist/upload-BF65P4KM.js +0 -17
- package/dist/us-check-CYY6Crhr.js +0 -46
- package/dist/us-check-account-number-C7KE5YzX.js +0 -48
- package/dist/us-check-routing-number-DUbhsYAR.js +0 -49
- package/dist/useAssociatedLegalEntity-DlO3x839.js +0 -33
- package/dist/useCreateLegalEntity-bNnaPjOD.js +0 -31
- package/dist/useDataset-ClAqXJGw.js +0 -220
- package/dist/useForm-C8SA0ETz.js +0 -1623
- package/dist/useGlobalData-VlkNij1C.js +0 -68
- package/dist/useMultiForm-C3xbz4Qc.js +0 -864
- package/dist/useOnboardingStatus-Co_xweKQ.js +0 -27
- package/dist/useScenarios-1AMNJb7O.js +0 -46
- package/dist/useTermsOfServiceStatus-DTT-jTFK.js +0 -42
- package/dist/useToastContext-mFlAEux_.js +0 -60
- package/dist/useUnincorporatedPartnershipMembers-DeGZrXXu.js +0 -99
- package/dist/useUpdateBusinessLines-DVnOsDCX.js +0 -46
- package/dist/useUpdateLegalEntity-Hn7ZLWeu.js +0 -39
- package/dist/utils-BH-_hzMa.js +0 -237
- package/dist/utils-BvNcGa2w.js +0 -774
- package/dist/validate-CJSILaC_.js +0 -41
- package/dist/validate-DDHUnwWC.js +0 -100
- package/dist/validationError-CfIII-oi.js +0 -86
- package/dist/warning-circle-fill-CEN1WL7A.js +0 -17
- package/dist/warning-diamond-filled-BfXMlVrG.js +0 -17
- package/dist/webinar-DqjqrNEv.js +0 -22
- package/dist/yapily-logo-CZ4ywjwA.js +0 -17
- /package/dist/types/components/{Shared → Apps}/tasks/TaskList/PayoutAccountTaskListItem.d.ts +0 -0
- /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskList.d.ts +0 -0
- /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListGroup.d.ts +0 -0
- /package/dist/types/components/{Shared → Apps}/tasks/TaskList/TaskListItem.d.ts +0 -0
- /package/dist/types/components/{Shared → Apps}/tasks/TaskList/types.d.ts +0 -0
- /package/dist/types/components/Business/{tasks/BusinessDetailsMultiformDropin → forms/BusinessDetails}/BusinessDetailsMultiform.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/FinancialInformation.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/ReportedValue.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/types.d.ts +0 -0
- /package/dist/types/components/{Shared → Business}/forms/FinancialInformation/validate.d.ts +0 -0
- /package/dist/types/components/Business/tasks/{BusinessDetailsMultiformDropin → BusinessDetailsDropin}/validate.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/AdditionalPersonalDetails.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/AdditionalPersonalDetails → AdditionalPersonalDetails}/Identity/Identity.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/BasicDetails → BasicDetails}/BasicDetails.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/GuidanceQuestion → GuidanceQuestion}/GuidanceQuestion.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/IdDocumentUpload → IdDocumentUpload}/IdDocumentManualUpload.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/IdNowVerificationModal → IdNowVerificationModal}/IdNowVerificationModal.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/IdVerification.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/idVerificationProviderId.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/IdVerification → IdVerification}/types.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/IdVerificationMethod → IdVerificationMethod}/IdVerificationMethod.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/ManualIdUpload → ManualIdUpload}/ManualIdUpload.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/ProofOfRelationship → ProofOfRelationship}/index.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{Individual/ProofOfResidency → ProofOfResidency}/ProofOfResidency.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaire.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/SignatoryQuestionnaire → SignatoryQuestionnaire}/SignatoryQuestionnaireModalContent.d.ts +0 -0
- /package/dist/types/components/Individual/forms/{IndividualOnfido/UboQuestionnaire → UboQuestionnaire}/UboQuestionnaire.d.ts +0 -0
- /package/dist/types/components/Individual/tasks/{IndividualOnfidoDropin/IndividualOnfidoStore.d.ts → IndividualDropin/IndividualStore.d.ts} +0 -0
- /package/dist/types/components/{Individual → Shared}/fields/LocalizedNameFields/LocalizedNameFields.d.ts +0 -0
|
@@ -1,2497 +0,0 @@
|
|
|
1
|
-
;
|
|
2
|
-
{
|
|
3
|
-
try {
|
|
4
|
-
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2751d833-0647-4d90-af14-6f1304635848", e._sentryDebugIdIdentifier = "sentry-dbid-2751d833-0647-4d90-af14-6f1304635848");
|
|
6
|
-
} catch (e) {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
;
|
|
10
|
-
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import { useMemo, useState, useEffect, useCallback, useRef } from "preact/hooks";
|
|
12
|
-
import { u as useScenarios } from "./useScenarios-1AMNJb7O.js";
|
|
13
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-bNnaPjOD.js";
|
|
14
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-Hn7ZLWeu.js";
|
|
15
|
-
import { j as useProviderStatus, p as addressValidators, q as addressFormatters, r as mapAddressLabels } from "./Address-DrRgozSN.js";
|
|
16
|
-
import { c as contactDetailsValidationRules, u as useValidatePhoneNumberImperatively } from "./validate-CJSILaC_.js";
|
|
17
|
-
import { b as useApiContext, a1 as useMutation, k as httpPost, aD as matchesRegex, aP as trimValWithOneSpace, aE as NO_ALPHABET_REGEX, aF as EMOJI_REGEX, aG as hasRepeatedCharacters, aH as isInvalidName, a$ as INDIVIDUAL_VALID_CHAR_REGEX, aN as getFormattingRegEx, aO as SPECIAL_CHARS, aK as standardKatakanaValidator, aL as standardKanjiValidator, C as CountryCodes, X as isEmpty, P as TaskTypes, t as LegalEntityTypes, b0 as getAgeToday, b1 as euCountries, b2 as individualApiKeyMapping, aZ as reverseMapping, b3 as getNomineeFromAssociation, b4 as individualComponentsKeyMapping, b5 as drop, U as createLogger, M as useAccountHolder, W as useI18nContext, a0 as useAnalyticsContext, p as useExperimentsContext, o as useSettingsContext, g as getLegalEntityCountry, b6 as getAllowedDecisionMakerRoles, b7 as filterOutUnwantedAssociationsIfRootLE, aA as cloneObject, b8 as individualDocumentMapping, b9 as individualObscuredFields, af as getOwnEntityAssociations, ba as hasNomineesChanged, bb as attachNomineeToRole, aU as doArraysMatch, j as useQuery, x as skipToken, m as httpGet, u as useTranslation, a2 as useQueryClient, B as Button, L as Loader, bc as individualOnfidoApiKeyMapping, al as Scenarios, am as DecisionMakerTypes, bd as individualOnfidoDocumentMapping, be as individualOnfidoObscuredFields } from "./StoreProvider-l6WD5T55.js";
|
|
18
|
-
import { F as FormContextProvider, a as FormFlow } from "./FormFlow-BVw3rIvU.js";
|
|
19
|
-
import { a as useToastContext } from "./useToastContext-mFlAEux_.js";
|
|
20
|
-
import { g as getPropsFromConfigurations, c as composePerScenarioFormConfigurations } from "./process-field-configurations-6LtTXNwK.js";
|
|
21
|
-
import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-DSk8OL7G.js";
|
|
22
|
-
import { u as useMultiForm } from "./useMultiForm-C3xbz4Qc.js";
|
|
23
|
-
import { m as mapExistingFile, g as getPageName, a as getPage, u as useScenarioConfiguration } from "./mapExistingFile-nB9LIvV9.js";
|
|
24
|
-
import { y as getSSNType, z as defaultFieldMetadata, A as defaultFieldConfig, B as defaultFieldMetadata$1, D as fieldConfig, t as taxInformationDefaultFieldMetadata, i as taxInformationDefaultFieldConfig, E as isEmpty$1, F as getTrustedFields, G as getAsyncIdNumberValidationRule, H as getAsyncPhoneValidationRules, I as setHasMotionCaptureScenario, J as showIndividualMotionCapture, q as individualForms, K as Individual, L as individualDocumentForms, M as idVerificationProviderId, N as idNowModalChildEntityId, O as LandingLayout, x as showIdNowModal, P as check4DigitSsnFailed, Q as individualOnfidoRules, p as individualOnfidoForms, R as isNextStepDisabled, U as shouldShowIdNowModal, V as IndividualOnfido, W as JP_ADDRESS_REQUIRED_FIELDS, X as GuidanceQuestionValues, Y as DECISION_MAKER_TYPES_WITH_JOBTITLE$1 } from "./IndividualOnfido-CmDDWqG_.js";
|
|
25
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CfIII-oi.js";
|
|
26
|
-
import { g as getIdDocument, a as getDocument, c as createDocumentRequest, d as documentApiUtils, m as mergeAttachments, b as getFileExtention } from "./documentUtils-CunPooif.js";
|
|
27
|
-
import { a as datasetUtilities, C as Confirm } from "./useDataset-ClAqXJGw.js";
|
|
28
|
-
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-BLXGczCN.js";
|
|
29
|
-
import { l as localizeDateString } from "./localizeDateString-RwwotuyP.js";
|
|
30
|
-
import { o as omitObscuredFieldsIfUnchanged, I as IFrameWidget } from "./iframeWidget-BEBSgwZP.js";
|
|
31
|
-
import { r as resolveFieldMetadata, w as getLocalizedIdDocumentTypeOptions, I as Image } from "./fieldConfigurations-D99U6JIQ.js";
|
|
32
|
-
import { r as rules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE } from "./rules-ajv47uCu.js";
|
|
33
|
-
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
34
|
-
import { m as mapSchemaFieldsToApiScriptLocalization, a as mapApiScriptLocalizationToSchemaFields } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
35
|
-
import { computed } from "@preact/signals";
|
|
36
|
-
import { Show } from "@preact/signals/utils";
|
|
37
|
-
import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-DnDo_BVY.js";
|
|
38
|
-
import { lazy } from "preact/compat";
|
|
39
|
-
import { M as Modal } from "./Modal-lDK70UQc.js";
|
|
40
|
-
import { a as Alert } from "./Alert-BVHHWVgg.js";
|
|
41
|
-
import { a as getIndividualLegalEntityName } from "./getName-_U3PeNHl.js";
|
|
42
|
-
import { g as getOnfidoIdentityTypeToApiIdentityTypeMap, m as mapLegalEntityToIndividualOnfidoSchema } from "./mapLegalEntityToIndividualOnfidoSchema-BpjOTE3z.js";
|
|
43
|
-
const verifyIdNumber = async (legalEntityId, baseUrl, data) => {
|
|
44
|
-
return await httpPost(
|
|
45
|
-
{
|
|
46
|
-
baseUrl,
|
|
47
|
-
path: `legalEntities/${legalEntityId}/verifications/idNumber`,
|
|
48
|
-
// Handler for unhappy flows, i.e. status != 200, in the idNumber verification process
|
|
49
|
-
errorHandler: async (response) => {
|
|
50
|
-
const responseData = await response;
|
|
51
|
-
if (responseData.status === 422) {
|
|
52
|
-
return { status: 422, message: responseData.detail, errorCode: responseData.errorCode };
|
|
53
|
-
}
|
|
54
|
-
if (responseData.status === 500) {
|
|
55
|
-
return { status: 500, message: "Service did not respond, do not block verification" };
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
data
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
const useVerifyIdNumber = (options) => {
|
|
63
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
64
|
-
return useMutation({
|
|
65
|
-
mutationFn: (data) => verifyIdNumber(rootLegalEntityId.value, baseUrl.value, data),
|
|
66
|
-
...options
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
const startVerificationCheck = async (rootLegalEntityId, baseUrl, data) => {
|
|
70
|
-
return httpPost(
|
|
71
|
-
{
|
|
72
|
-
baseUrl,
|
|
73
|
-
path: `legalEntities/${rootLegalEntityId}/providers/idVerification/process`
|
|
74
|
-
},
|
|
75
|
-
data
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
const useIdVerificationStartCheck = (options) => {
|
|
79
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
80
|
-
return useMutation({
|
|
81
|
-
mutationFn: (data) => startVerificationCheck(rootLegalEntityId.value, baseUrl.value, data),
|
|
82
|
-
...options
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
const nameValidationRulesV4 = {
|
|
86
|
-
firstName: [
|
|
87
|
-
{
|
|
88
|
-
modes: ["blur"],
|
|
89
|
-
validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
|
|
90
|
-
errorMessage: "nameMustContainLetters"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
modes: ["blur"],
|
|
94
|
-
validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
|
|
95
|
-
errorMessage: "checkForTypos"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
lastName: [
|
|
99
|
-
{
|
|
100
|
-
modes: ["blur"],
|
|
101
|
-
validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
|
|
102
|
-
errorMessage: "nameMustContainLetters"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
modes: ["blur"],
|
|
106
|
-
validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
|
|
107
|
-
errorMessage: "checkForTypos"
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
};
|
|
111
|
-
const specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS.replace("-", ""));
|
|
112
|
-
const nameFormatters = {
|
|
113
|
-
firstName: {
|
|
114
|
-
// formatter: trimValWithOneSpace // just trim
|
|
115
|
-
// Example - removing disallowed chars as they are input: then they don't end up in state
|
|
116
|
-
formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
|
|
117
|
-
// trim & replace
|
|
118
|
-
},
|
|
119
|
-
lastName: {
|
|
120
|
-
formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
const onfidoDocumentTypeMapping = [
|
|
124
|
-
{ id: "driversLicense", name: "driversLicense", hasBackPage: true },
|
|
125
|
-
{ id: "identityCard", name: "identityCard", hasBackPage: true },
|
|
126
|
-
{ id: "passport", name: "passport", hasBackPage: false }
|
|
127
|
-
];
|
|
128
|
-
const jaHaniNameValidationRules = {
|
|
129
|
-
jaHaniFirstName: [
|
|
130
|
-
{
|
|
131
|
-
modes: ["blur"],
|
|
132
|
-
validate: (input) => standardKanjiValidator(input),
|
|
133
|
-
errorMessage: "nameMustContainLetters"
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
jaHaniLastName: [
|
|
137
|
-
{
|
|
138
|
-
modes: ["blur"],
|
|
139
|
-
validate: (input) => standardKanjiValidator(input),
|
|
140
|
-
errorMessage: "nameMustContainLetters"
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
};
|
|
144
|
-
const jaKanaNameValidationRules = {
|
|
145
|
-
jaKanaFirstName: [
|
|
146
|
-
{
|
|
147
|
-
modes: ["blur"],
|
|
148
|
-
validate: (input) => standardKatakanaValidator(input),
|
|
149
|
-
errorMessage: "nameMustContainLetters"
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
jaKanaLastName: [
|
|
153
|
-
{
|
|
154
|
-
modes: ["blur"],
|
|
155
|
-
validate: (input) => standardKatakanaValidator(input),
|
|
156
|
-
errorMessage: "nameMustContainLetters"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
};
|
|
160
|
-
const isNotOutOfRangeBirthDateValidatorRule$1 = {
|
|
161
|
-
modes: ["blur"],
|
|
162
|
-
validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
|
|
163
|
-
errorMessage: "invalidDateOfBirth"
|
|
164
|
-
};
|
|
165
|
-
const buildMinimumAgeValidationRule$1 = (minimumAge) => ({
|
|
166
|
-
modes: ["blur"],
|
|
167
|
-
validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
|
|
168
|
-
errorMessage: {
|
|
169
|
-
key: "youMustXYearsOldToContinue",
|
|
170
|
-
values: { minimumAge: minimumAge.toString() }
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
const getCountrySpecificMinimumAgeValidationRule$1 = (country) => {
|
|
174
|
-
if (!country) {
|
|
175
|
-
return buildMinimumAgeValidationRule$1(13);
|
|
176
|
-
}
|
|
177
|
-
if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
|
|
178
|
-
(c) => c === country
|
|
179
|
-
)) {
|
|
180
|
-
return buildMinimumAgeValidationRule$1(16);
|
|
181
|
-
}
|
|
182
|
-
switch (country) {
|
|
183
|
-
case CountryCodes.HongKong:
|
|
184
|
-
case CountryCodes.Singapore:
|
|
185
|
-
return buildMinimumAgeValidationRule$1(18);
|
|
186
|
-
default:
|
|
187
|
-
return buildMinimumAgeValidationRule$1(13);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
const personalDetailsValidators = ({
|
|
191
|
-
country,
|
|
192
|
-
isExperimentEnabled = () => false,
|
|
193
|
-
isSettingEnabled = () => false,
|
|
194
|
-
taskType,
|
|
195
|
-
idNumberType,
|
|
196
|
-
phonePrefix,
|
|
197
|
-
idNumberExempt,
|
|
198
|
-
idNumber,
|
|
199
|
-
existingIdNumber,
|
|
200
|
-
formVerificationErrors,
|
|
201
|
-
taxIdNumberType
|
|
202
|
-
}) => ({
|
|
203
|
-
taxInformation: resolveFieldMetadata(
|
|
204
|
-
taxInformationDefaultFieldConfig[country],
|
|
205
|
-
{
|
|
206
|
-
taxIdNumberType,
|
|
207
|
-
companyType: LegalEntityTypes.INDIVIDUAL
|
|
208
|
-
},
|
|
209
|
-
taxInformationDefaultFieldMetadata
|
|
210
|
-
)?.validators,
|
|
211
|
-
birthDate: (() => {
|
|
212
|
-
const baseValidators = [isNotOutOfRangeBirthDateValidatorRule$1];
|
|
213
|
-
if (isSettingEnabled("enforceLegalAge")) {
|
|
214
|
-
return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
|
|
215
|
-
}
|
|
216
|
-
if (isExperimentEnabled("EnableAgeVerification")) {
|
|
217
|
-
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
|
|
218
|
-
return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
|
|
219
|
-
}
|
|
220
|
-
return [...baseValidators, getCountrySpecificMinimumAgeValidationRule$1(country)];
|
|
221
|
-
}
|
|
222
|
-
return baseValidators;
|
|
223
|
-
})(),
|
|
224
|
-
...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
|
|
225
|
-
...contactDetailsValidationRules,
|
|
226
|
-
phoneNumber: resolveFieldMetadata(
|
|
227
|
-
fieldConfig[phonePrefix ?? country],
|
|
228
|
-
{},
|
|
229
|
-
defaultFieldMetadata$1
|
|
230
|
-
)?.validators,
|
|
231
|
-
idNumber: (() => {
|
|
232
|
-
const derivedIdNumberType = country === CountryCodes.UnitedStates ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
|
|
233
|
-
return idNumberExempt ? {
|
|
234
|
-
validate: () => {
|
|
235
|
-
return idNumberExempt || !isEmpty(idNumber);
|
|
236
|
-
},
|
|
237
|
-
modes: ["blur"]
|
|
238
|
-
} : resolveFieldMetadata(
|
|
239
|
-
defaultFieldConfig[country],
|
|
240
|
-
{ idNumberType: derivedIdNumberType },
|
|
241
|
-
defaultFieldMetadata
|
|
242
|
-
)?.validators;
|
|
243
|
-
})(),
|
|
244
|
-
...jaHaniNameValidationRules,
|
|
245
|
-
...jaKanaNameValidationRules
|
|
246
|
-
});
|
|
247
|
-
const mandateIdVerificationForMotionCapture = (showMotionCapture, derivedProps) => {
|
|
248
|
-
if (!derivedProps) {
|
|
249
|
-
return void 0;
|
|
250
|
-
}
|
|
251
|
-
const copiedDerivedProps = { ...derivedProps };
|
|
252
|
-
if (showMotionCapture) {
|
|
253
|
-
const idVerificationFields = [
|
|
254
|
-
...derivedProps.requiredFields.idVerificationMethod ?? [],
|
|
255
|
-
"idVerificationMethod"
|
|
256
|
-
];
|
|
257
|
-
copiedDerivedProps.allFields.idVerificationMethod = idVerificationFields;
|
|
258
|
-
copiedDerivedProps.requiredFields.idVerificationMethod = idVerificationFields;
|
|
259
|
-
}
|
|
260
|
-
return copiedDerivedProps;
|
|
261
|
-
};
|
|
262
|
-
const mapApiDocumentToIndividualDocuments = (entityId) => {
|
|
263
|
-
const idDocument2 = getIdDocument(entityId);
|
|
264
|
-
const proofOfResidency = getDocument(entityId, "proofOfResidency");
|
|
265
|
-
const proofOfNationalId = getDocument(entityId, "proofOfNationalIdNumber");
|
|
266
|
-
const proofOfRelationship = getDocument(entityId, "proofOfRelationship");
|
|
267
|
-
return {
|
|
268
|
-
idDocument: idDocument2 ? mapApiIdDocumentToSchema(idDocument2) : void 0,
|
|
269
|
-
proofOfResidency: proofOfResidency ? { proofOfResidency: [mapExistingFile(getPageName(proofOfResidency))] } : void 0,
|
|
270
|
-
proofOfNationalId: proofOfNationalId ? { proofOfNationalId: [mapExistingFile(getPageName(proofOfNationalId))] } : void 0,
|
|
271
|
-
proofOfRelationship: proofOfRelationship ? { proofOfRelationship: [mapExistingFile(getPageName(proofOfRelationship))] } : void 0
|
|
272
|
-
};
|
|
273
|
-
};
|
|
274
|
-
const mapApiIdDocumentToSchema = (idDocument2) => {
|
|
275
|
-
const { type, attachments, modificationDate } = idDocument2;
|
|
276
|
-
const { hasBackPage } = getLocalizedIdDocumentTypeOptions().find(({ id }) => id === type);
|
|
277
|
-
let frontPage;
|
|
278
|
-
let backPage;
|
|
279
|
-
if (attachments?.length === 1) {
|
|
280
|
-
frontPage = getPage(idDocument2);
|
|
281
|
-
} else {
|
|
282
|
-
frontPage = hasBackPage ? getPage(idDocument2, "front") : getPage(idDocument2);
|
|
283
|
-
backPage = hasBackPage ? getPage(idDocument2, "back") : void 0;
|
|
284
|
-
}
|
|
285
|
-
return {
|
|
286
|
-
...frontPage ? { idFrontPage: [mapExistingFile(frontPage.pageName ?? "")] } : {},
|
|
287
|
-
...backPage ? { idBackPage: [mapExistingFile(backPage.pageName ?? "")] } : {},
|
|
288
|
-
idDocumentType: type,
|
|
289
|
-
modificationDate
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
const mapIndividualDocumentToApiDocument = async (data, entityId) => {
|
|
293
|
-
if (!data) return void 0;
|
|
294
|
-
const { proofOfNationalId, proofOfResidency, proofOfRelationship } = data;
|
|
295
|
-
const idDocument2 = "idDocument" in data ? data.idDocument : data.manualIdUpload;
|
|
296
|
-
const entityType = "legalEntity";
|
|
297
|
-
const documents = await Promise.all([
|
|
298
|
-
idDocument2?.idFrontPage ? createDocumentRequest({
|
|
299
|
-
entityId,
|
|
300
|
-
entityType,
|
|
301
|
-
documentType: idDocument2.idDocumentType,
|
|
302
|
-
page1: idDocument2.idFrontPage?.[0],
|
|
303
|
-
page2: idDocument2.idBackPage?.[0]
|
|
304
|
-
}) : void 0,
|
|
305
|
-
proofOfNationalId?.proofOfNationalId ? createDocumentRequest({
|
|
306
|
-
entityId,
|
|
307
|
-
entityType,
|
|
308
|
-
documentType: "proofOfNationalIdNumber",
|
|
309
|
-
page1: proofOfNationalId.proofOfNationalId[0]
|
|
310
|
-
}) : void 0,
|
|
311
|
-
proofOfResidency?.proofOfResidency ? createDocumentRequest({
|
|
312
|
-
entityId,
|
|
313
|
-
entityType,
|
|
314
|
-
documentType: "proofOfResidency",
|
|
315
|
-
page1: proofOfResidency.proofOfResidency[0]
|
|
316
|
-
}) : void 0,
|
|
317
|
-
proofOfRelationship?.proofOfRelationship ? createDocumentRequest({
|
|
318
|
-
entityId,
|
|
319
|
-
entityType,
|
|
320
|
-
documentType: "proofOfRelationship",
|
|
321
|
-
page1: proofOfRelationship.proofOfRelationship[0]
|
|
322
|
-
}) : void 0
|
|
323
|
-
]);
|
|
324
|
-
return documents.filter(Boolean);
|
|
325
|
-
};
|
|
326
|
-
const getIdentityTypeToApiIdentityTypeMap = (data) => {
|
|
327
|
-
const { residencyCountry } = data;
|
|
328
|
-
switch (residencyCountry) {
|
|
329
|
-
case CountryCodes.HongKong:
|
|
330
|
-
return {
|
|
331
|
-
passport: "passport",
|
|
332
|
-
driversLicense: "driversLicense",
|
|
333
|
-
proofOfIdentityCard: "nationalIdNumber"
|
|
334
|
-
};
|
|
335
|
-
default:
|
|
336
|
-
return {
|
|
337
|
-
nationalIdNumber: "nationalIdNumber",
|
|
338
|
-
passport: "passport",
|
|
339
|
-
driversLicense: "driversLicense",
|
|
340
|
-
proofOfIdentityCard: "identityCard"
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
const adjustIdentificationData = (data, apiData) => {
|
|
345
|
-
const { typeOfIdentity, idNumber, idNumberExempt } = data;
|
|
346
|
-
const identificationData = {
|
|
347
|
-
...apiData,
|
|
348
|
-
number: idNumber,
|
|
349
|
-
type: getIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
|
|
350
|
-
};
|
|
351
|
-
switch (typeOfIdentity) {
|
|
352
|
-
case "passport":
|
|
353
|
-
return {
|
|
354
|
-
...identificationData,
|
|
355
|
-
cardNumber: ""
|
|
356
|
-
};
|
|
357
|
-
case "driversLicense":
|
|
358
|
-
return {
|
|
359
|
-
...identificationData,
|
|
360
|
-
expiryDate: ""
|
|
361
|
-
};
|
|
362
|
-
default:
|
|
363
|
-
return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
|
|
364
|
-
...identificationData,
|
|
365
|
-
expiryDate: "",
|
|
366
|
-
cardNumber: "",
|
|
367
|
-
nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
const mapIndividualToLegalEntity = (data) => {
|
|
372
|
-
const requestObj = {
|
|
373
|
-
...formatObject(data, individualApiKeyMapping)
|
|
374
|
-
};
|
|
375
|
-
requestObj.type = LegalEntityTypes.INDIVIDUAL;
|
|
376
|
-
const { personalDetails } = data;
|
|
377
|
-
if (!personalDetails) return requestObj;
|
|
378
|
-
requestObj.individual.identificationData = adjustIdentificationData(
|
|
379
|
-
personalDetails,
|
|
380
|
-
requestObj.individual.identificationData
|
|
381
|
-
);
|
|
382
|
-
const localization = [
|
|
383
|
-
mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaHani"),
|
|
384
|
-
mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaKana")
|
|
385
|
-
].filter(({ fields }) => !isEmpty$1(fields));
|
|
386
|
-
if (localization.length) {
|
|
387
|
-
requestObj.individual.name.localization = localization;
|
|
388
|
-
}
|
|
389
|
-
if (personalDetails.phoneNumber?.number) {
|
|
390
|
-
requestObj.individual.phone = {
|
|
391
|
-
number: personalDetails.phoneNumber.number,
|
|
392
|
-
type: "mobile"
|
|
393
|
-
};
|
|
394
|
-
} else {
|
|
395
|
-
delete requestObj.individual.phone;
|
|
396
|
-
}
|
|
397
|
-
return requestObj;
|
|
398
|
-
};
|
|
399
|
-
const mapLegalEntityToIndividual = (legalEntity, isChangingType, isRoleFieldNeeded, parentLegalEntity, isLegalRepresentative) => {
|
|
400
|
-
let individualData = formatObject(
|
|
401
|
-
legalEntity,
|
|
402
|
-
individualComponentsKeyMapping
|
|
403
|
-
);
|
|
404
|
-
individualData = {
|
|
405
|
-
...individualData,
|
|
406
|
-
personalDetails: {
|
|
407
|
-
...individualData?.personalDetails,
|
|
408
|
-
...isChangingType && {
|
|
409
|
-
firstName: "",
|
|
410
|
-
lastName: ""
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
if (!individualData.personalDetails?.idNumberExempt) {
|
|
415
|
-
individualData.personalDetails.idNumberExempt = false;
|
|
416
|
-
}
|
|
417
|
-
const apiIdentityTypeToIdentityTypeMap = reverseMapping(
|
|
418
|
-
getIdentityTypeToApiIdentityTypeMap(individualData.personalDetails)
|
|
419
|
-
);
|
|
420
|
-
if (legalEntity?.individual?.identificationData?.type) {
|
|
421
|
-
individualData.personalDetails.typeOfIdentity = apiIdentityTypeToIdentityTypeMap[legalEntity.individual.identificationData.type];
|
|
422
|
-
}
|
|
423
|
-
if (legalEntity?.documentDetails?.length) {
|
|
424
|
-
individualData = {
|
|
425
|
-
...individualData,
|
|
426
|
-
...mapApiDocumentToIndividualDocuments(legalEntity?.id)
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
if (legalEntity?.individual?.residentialAddress.country === "JP" && legalEntity.individual?.name?.localization) {
|
|
430
|
-
for (const scriptLoc of legalEntity.individual.name.localization) {
|
|
431
|
-
individualData.personalDetails = {
|
|
432
|
-
...individualData.personalDetails,
|
|
433
|
-
...mapApiScriptLocalizationToSchemaFields(scriptLoc)
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
if (!parentLegalEntity?.entityAssociations) {
|
|
438
|
-
return individualData;
|
|
439
|
-
}
|
|
440
|
-
const associations = parentLegalEntity?.entityAssociations?.filter((ea) => ea.legalEntityId === legalEntity?.id) ?? [];
|
|
441
|
-
if (isRoleFieldNeeded) {
|
|
442
|
-
individualData.personalDetails.role = associations.map((ea) => ea.type);
|
|
443
|
-
individualData.personalDetails.jobTitle = associations.find(
|
|
444
|
-
({ jobTitle }) => Boolean(jobTitle)
|
|
445
|
-
)?.jobTitle;
|
|
446
|
-
}
|
|
447
|
-
individualData.personalDetails = getNomineeFromAssociation(
|
|
448
|
-
associations,
|
|
449
|
-
individualData.personalDetails
|
|
450
|
-
);
|
|
451
|
-
if (isLegalRepresentative) {
|
|
452
|
-
individualData.personalDetails.relationship = associations.find(
|
|
453
|
-
({ relationship }) => Boolean(relationship)
|
|
454
|
-
)?.relationship;
|
|
455
|
-
}
|
|
456
|
-
return individualData;
|
|
457
|
-
};
|
|
458
|
-
const identityBase = {
|
|
459
|
-
role: {
|
|
460
|
-
rule: "requiredIfDecisionMakerTask"
|
|
461
|
-
},
|
|
462
|
-
firstName: {
|
|
463
|
-
rule: "REQUIRED"
|
|
464
|
-
},
|
|
465
|
-
lastName: {
|
|
466
|
-
rule: "REQUIRED"
|
|
467
|
-
},
|
|
468
|
-
birthDate: {
|
|
469
|
-
rule: "REQUIRED"
|
|
470
|
-
},
|
|
471
|
-
phoneNumber: {
|
|
472
|
-
rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
|
|
473
|
-
},
|
|
474
|
-
email: {
|
|
475
|
-
rule: "contactsIfRequiredForRole"
|
|
476
|
-
},
|
|
477
|
-
jobTitle: {
|
|
478
|
-
rule: "jobTitleIfRequiredForRole"
|
|
479
|
-
},
|
|
480
|
-
nationality: {
|
|
481
|
-
rule: "nationalityIfRequiredForRole"
|
|
482
|
-
},
|
|
483
|
-
address: {
|
|
484
|
-
rule: "addressIfRequiredForCountry"
|
|
485
|
-
},
|
|
486
|
-
otherAddressInformation: {
|
|
487
|
-
rule: "otherAddressInfoIfRequiredForCountry"
|
|
488
|
-
},
|
|
489
|
-
country: {
|
|
490
|
-
rule: "REQUIRED"
|
|
491
|
-
},
|
|
492
|
-
postalCode: {
|
|
493
|
-
rule: "postalCodeIfRequiredForCountry"
|
|
494
|
-
},
|
|
495
|
-
city: {
|
|
496
|
-
rule: "cityIfRequiredForCountry"
|
|
497
|
-
},
|
|
498
|
-
stateOrProvince: {
|
|
499
|
-
rule: "stateOrProvinceIfRequiredForCountry"
|
|
500
|
-
},
|
|
501
|
-
residencyCountry: {
|
|
502
|
-
rule: "REQUIRED"
|
|
503
|
-
},
|
|
504
|
-
proofOfResidency: {
|
|
505
|
-
rule: "isProofOfResidencyRequired"
|
|
506
|
-
},
|
|
507
|
-
proofOfNationalId: {
|
|
508
|
-
rule: "isProofOfNationalIdRequired"
|
|
509
|
-
},
|
|
510
|
-
relationship: {
|
|
511
|
-
rule: "legalRepresentativeRelationshipRequired"
|
|
512
|
-
},
|
|
513
|
-
proofOfRelationship: {
|
|
514
|
-
rule: "isProofOfRelationshipRequired"
|
|
515
|
-
},
|
|
516
|
-
nomineeDirector: {
|
|
517
|
-
rule: "nomineeDirectorRequiredForCountry"
|
|
518
|
-
},
|
|
519
|
-
nomineeShareholder: {
|
|
520
|
-
rule: "nomineeShareHolderRequiredForCountry"
|
|
521
|
-
},
|
|
522
|
-
jaHaniFirstName: {
|
|
523
|
-
rule: "japaneseFirstAndLastNames"
|
|
524
|
-
},
|
|
525
|
-
jaHaniLastName: {
|
|
526
|
-
rule: "japaneseFirstAndLastNames"
|
|
527
|
-
},
|
|
528
|
-
jaKanaFirstName: {
|
|
529
|
-
rule: "japaneseFirstAndLastNames"
|
|
530
|
-
},
|
|
531
|
-
jaKanaLastName: {
|
|
532
|
-
rule: "japaneseFirstAndLastNames"
|
|
533
|
-
},
|
|
534
|
-
idDocumentType: {
|
|
535
|
-
// If the user has a missing ID error and chooses manual flow
|
|
536
|
-
rule: "isManualIdFlowAndHasMissingData"
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
const identityNumber$1 = {
|
|
540
|
-
idNumber: {
|
|
541
|
-
rule: "idNumberRules",
|
|
542
|
-
obscured: true
|
|
543
|
-
},
|
|
544
|
-
idNumberExempt: {
|
|
545
|
-
rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
|
|
546
|
-
},
|
|
547
|
-
idDocumentType: {
|
|
548
|
-
rule: "manualIdDocumentRequired"
|
|
549
|
-
},
|
|
550
|
-
idFrontPage: {
|
|
551
|
-
rule: "idFrontPageIfManualUpload"
|
|
552
|
-
},
|
|
553
|
-
idBackPage: {
|
|
554
|
-
rule: "backPageIfRequiredForDocumentType"
|
|
555
|
-
},
|
|
556
|
-
idVerificationMethod: {
|
|
557
|
-
rule: "idVerificationRequired"
|
|
558
|
-
},
|
|
559
|
-
instantIdVerificationData: {
|
|
560
|
-
rule: "instantVerificationDataRule"
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
const additionalIdentityInfo$1 = {
|
|
564
|
-
typeOfIdentity: {
|
|
565
|
-
rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
|
|
566
|
-
},
|
|
567
|
-
issuerState: {
|
|
568
|
-
rule: "issuerStateRequired"
|
|
569
|
-
},
|
|
570
|
-
licenseCardNumber: {
|
|
571
|
-
rule: "licenseCardNumberRules"
|
|
572
|
-
},
|
|
573
|
-
expiryDate: {
|
|
574
|
-
rule: "expiryDateRequired"
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
const idDocument = {
|
|
578
|
-
idVerificationMethod: {
|
|
579
|
-
rule: "REQUIRED"
|
|
580
|
-
},
|
|
581
|
-
idDocumentType: {
|
|
582
|
-
rule: "REQUIRED"
|
|
583
|
-
},
|
|
584
|
-
idFrontPage: {
|
|
585
|
-
rule: "idFrontPageIfManualUpload"
|
|
586
|
-
},
|
|
587
|
-
idBackPage: {
|
|
588
|
-
rule: "backPageIfRequiredForDocumentType"
|
|
589
|
-
}
|
|
590
|
-
};
|
|
591
|
-
const nationality$1 = {
|
|
592
|
-
nationality: {
|
|
593
|
-
rule: "REQUIRED"
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
const phoneNumberBase$1 = {
|
|
597
|
-
phoneNumber: {
|
|
598
|
-
rule: "contactsIfRequiredForRole"
|
|
599
|
-
}
|
|
600
|
-
};
|
|
601
|
-
const taxInformationBase$1 = {
|
|
602
|
-
taxInformation: { rule: "countryUsesTaxId" }
|
|
603
|
-
};
|
|
604
|
-
const fieldsPerScenario = {
|
|
605
|
-
L0: drop("address", "birthDate").from(identityBase),
|
|
606
|
-
L1: identityBase,
|
|
607
|
-
L_TAXINFO: { ...identityBase, ...taxInformationBase$1 },
|
|
608
|
-
L1_ID: {
|
|
609
|
-
...identityBase,
|
|
610
|
-
...identityNumber$1,
|
|
611
|
-
...additionalIdentityInfo$1
|
|
612
|
-
},
|
|
613
|
-
L1_IDO: {
|
|
614
|
-
// TODO: change idNumber rule to optional once optional fields are implemented
|
|
615
|
-
...identityBase,
|
|
616
|
-
...identityNumber$1,
|
|
617
|
-
...additionalIdentityInfo$1
|
|
618
|
-
},
|
|
619
|
-
L1_NAT: {
|
|
620
|
-
...identityBase,
|
|
621
|
-
...identityNumber$1,
|
|
622
|
-
...additionalIdentityInfo$1,
|
|
623
|
-
...nationality$1
|
|
624
|
-
},
|
|
625
|
-
L1_IDDOC: idDocument,
|
|
626
|
-
L_PH: phoneNumberBase$1
|
|
627
|
-
};
|
|
628
|
-
const parseIndividualScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, fieldsPerScenario);
|
|
629
|
-
const parseConfiguration$1 = ({ scenarios }) => parseIndividualScenarios(scenarios);
|
|
630
|
-
const logger$1 = createLogger();
|
|
631
|
-
function IndividualDropin({
|
|
632
|
-
taskType = TaskTypes.INDIVIDUAL,
|
|
633
|
-
parentLegalEntity,
|
|
634
|
-
legalEntityResponse,
|
|
635
|
-
handleHomeClick,
|
|
636
|
-
isTargetLegalEntityType,
|
|
637
|
-
country: parentCountry,
|
|
638
|
-
problems: propProblems,
|
|
639
|
-
trustMember,
|
|
640
|
-
onSubmit: externalOnSubmit,
|
|
641
|
-
asModal = false,
|
|
642
|
-
handleBackClick: externalBackClick,
|
|
643
|
-
trustedFields,
|
|
644
|
-
trustedFieldsProvider,
|
|
645
|
-
trustedRoles
|
|
646
|
-
}) {
|
|
647
|
-
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
648
|
-
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
649
|
-
const { i18n } = useI18nContext();
|
|
650
|
-
const userEvents = useAnalyticsContext();
|
|
651
|
-
const { showToast, clearToasts } = useToastContext();
|
|
652
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
653
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
654
|
-
const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
|
|
655
|
-
const isLegalRepresentative = taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
|
|
656
|
-
const dataFromResponse = useMemo(() => {
|
|
657
|
-
if (legalEntityResponse) {
|
|
658
|
-
return mapLegalEntityToIndividual(
|
|
659
|
-
legalEntityResponse,
|
|
660
|
-
isTargetLegalEntityType,
|
|
661
|
-
isRoleFieldNeeded,
|
|
662
|
-
parentLegalEntity,
|
|
663
|
-
isLegalRepresentative
|
|
664
|
-
);
|
|
665
|
-
}
|
|
666
|
-
return {
|
|
667
|
-
personalDetails: {
|
|
668
|
-
residencyCountry: parentCountry
|
|
669
|
-
},
|
|
670
|
-
address: {
|
|
671
|
-
country: parentCountry
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
}, [
|
|
675
|
-
legalEntityResponse,
|
|
676
|
-
parentCountry,
|
|
677
|
-
isTargetLegalEntityType,
|
|
678
|
-
parentLegalEntity,
|
|
679
|
-
isRoleFieldNeeded,
|
|
680
|
-
isLegalRepresentative
|
|
681
|
-
]);
|
|
682
|
-
const documentUtils = documentApiUtils({
|
|
683
|
-
baseUrl: baseUrl.value,
|
|
684
|
-
rootLegalEntityId: rootLegalEntityId.value
|
|
685
|
-
});
|
|
686
|
-
let roleTypes = [];
|
|
687
|
-
const [matchingScenario, setMatchingScenario] = useState();
|
|
688
|
-
const [validationErrors, setValidationErrors] = useState();
|
|
689
|
-
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
690
|
-
const [documents, setDocuments] = useState();
|
|
691
|
-
const [existingAttachments, setExistingAttachments] = useState();
|
|
692
|
-
const [country, setCountry] = useState(
|
|
693
|
-
dataFromResponse?.personalDetails?.residencyCountry ?? parentCountry
|
|
694
|
-
);
|
|
695
|
-
const [hideFooter, setHideFooter] = useState(false);
|
|
696
|
-
const [derivedProps, setDerivedProps] = useState();
|
|
697
|
-
const associatedLegalEntityTrustedFields = useMemo(
|
|
698
|
-
() => legalEntityResponse ? getTrustedFields(legalEntityResponse, individualComponentsKeyMapping) : {},
|
|
699
|
-
[legalEntityResponse]
|
|
700
|
-
);
|
|
701
|
-
const { data: providerStatus } = useProviderStatus({
|
|
702
|
-
providers: ["address", "idDocument"],
|
|
703
|
-
country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : country
|
|
704
|
-
});
|
|
705
|
-
const problems = useMemo(
|
|
706
|
-
() => ({
|
|
707
|
-
...propProblems,
|
|
708
|
-
validationErrors
|
|
709
|
-
}),
|
|
710
|
-
[propProblems, validationErrors]
|
|
711
|
-
);
|
|
712
|
-
useEffect(() => {
|
|
713
|
-
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
714
|
-
userEvents.addTaskEvent("Landed on page", {
|
|
715
|
-
actionType: "start"
|
|
716
|
-
});
|
|
717
|
-
}, []);
|
|
718
|
-
const individualFieldValidations = useCallback(
|
|
719
|
-
(data2) => ({
|
|
720
|
-
personalDetails: personalDetailsValidators({
|
|
721
|
-
country: data2?.personalDetails?.residencyCountry ?? country,
|
|
722
|
-
isExperimentEnabled,
|
|
723
|
-
isSettingEnabled,
|
|
724
|
-
taskType,
|
|
725
|
-
idNumberType: data2?.personalDetails?.typeOfIdentity,
|
|
726
|
-
phonePrefix: data2?.personalDetails?.phoneNumber?.phoneCountryCode,
|
|
727
|
-
idNumberExempt: data2?.personalDetails?.idNumberExempt,
|
|
728
|
-
idNumber: data2?.personalDetails?.idNumber,
|
|
729
|
-
existingIdNumber: dataFromResponse.personalDetails?.idNumber,
|
|
730
|
-
formVerificationErrors: propProblems?.verificationErrors?.personalDetails,
|
|
731
|
-
taxIdNumberType: data2?.personalDetails?.taxInformation?.length ? data2?.personalDetails?.taxInformation[0]?.type : void 0
|
|
732
|
-
}),
|
|
733
|
-
address: addressValidators({
|
|
734
|
-
isExperimentEnabled,
|
|
735
|
-
country: data2?.personalDetails?.residencyCountry ?? country,
|
|
736
|
-
i18n
|
|
737
|
-
})
|
|
738
|
-
}),
|
|
739
|
-
[isExperimentEnabled, isSettingEnabled, taskType]
|
|
740
|
-
);
|
|
741
|
-
const validatePhoneNumber = useValidatePhoneNumberImperatively();
|
|
742
|
-
const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
|
|
743
|
-
const individualFieldAsyncValidations = useCallback(
|
|
744
|
-
(data2) => ({
|
|
745
|
-
personalDetails: {
|
|
746
|
-
phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber,
|
|
747
|
-
idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.personalDetails).idNumber
|
|
748
|
-
}
|
|
749
|
-
}),
|
|
750
|
-
[getAsyncPhoneValidationRules, getAsyncIdNumberValidationRule]
|
|
751
|
-
);
|
|
752
|
-
const defaultData = useMemo(
|
|
753
|
-
() => ({
|
|
754
|
-
...dataFromResponse,
|
|
755
|
-
...documents,
|
|
756
|
-
idVerificationMethod: {
|
|
757
|
-
idVerificationMethod: "instantVerification"
|
|
758
|
-
}
|
|
759
|
-
}),
|
|
760
|
-
[legalEntityResponse, documents, isTargetLegalEntityType, dataFromResponse]
|
|
761
|
-
);
|
|
762
|
-
const formatters = useMemo(
|
|
763
|
-
() => ({
|
|
764
|
-
personalDetails: {
|
|
765
|
-
...nameFormatters
|
|
766
|
-
},
|
|
767
|
-
address: addressFormatters
|
|
768
|
-
}),
|
|
769
|
-
[]
|
|
770
|
-
);
|
|
771
|
-
const form = useMultiForm({
|
|
772
|
-
requiredFields: derivedProps?.requiredFields,
|
|
773
|
-
defaultData,
|
|
774
|
-
rules: individualFieldValidations,
|
|
775
|
-
asyncRules: individualFieldAsyncValidations,
|
|
776
|
-
optionalFields: derivedProps?.optionalFields,
|
|
777
|
-
formatters,
|
|
778
|
-
obscuredFields: {
|
|
779
|
-
personalDetails: ["idNumber"]
|
|
780
|
-
}
|
|
781
|
-
});
|
|
782
|
-
const { data = dataFromResponse } = form;
|
|
783
|
-
useEffect(() => {
|
|
784
|
-
setCountry(data?.personalDetails?.residencyCountry ?? parentCountry);
|
|
785
|
-
}, [data?.personalDetails?.residencyCountry, parentCountry]);
|
|
786
|
-
const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
|
|
787
|
-
useEffect(() => {
|
|
788
|
-
if (!scenarios) return;
|
|
789
|
-
setHasMotionCaptureScenario(scenarios);
|
|
790
|
-
setMatchingScenario(scenarios);
|
|
791
|
-
}, [scenarios]);
|
|
792
|
-
const { fieldConfigurations } = useScenarioConfiguration({
|
|
793
|
-
parseConfiguration: parseConfiguration$1,
|
|
794
|
-
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
795
|
-
setLoadingStatus,
|
|
796
|
-
country
|
|
797
|
-
});
|
|
798
|
-
const fieldsFromCustomRules = useMemo(
|
|
799
|
-
() => rules({
|
|
800
|
-
matchingScenario,
|
|
801
|
-
data,
|
|
802
|
-
country: data?.personalDetails?.residencyCountry ?? country,
|
|
803
|
-
taskType,
|
|
804
|
-
isExperimentEnabled,
|
|
805
|
-
rootLegalEntity: parentLegalEntity,
|
|
806
|
-
problems
|
|
807
|
-
}),
|
|
808
|
-
[country, matchingScenario, data, taskType, problems]
|
|
809
|
-
);
|
|
810
|
-
useEffect(() => {
|
|
811
|
-
const derivedProps2 = getPropsFromConfigurations({
|
|
812
|
-
scenarioConfiguration: fieldConfigurations,
|
|
813
|
-
forms: individualForms,
|
|
814
|
-
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
815
|
-
dataMissingErrors: problems?.missingData ?? [],
|
|
816
|
-
fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
|
|
817
|
-
legalEntityResponse,
|
|
818
|
-
individualApiKeyMapping,
|
|
819
|
-
individualDocumentMapping,
|
|
820
|
-
// We ignore these fields for the purposes of this rule because we know them to be problematic
|
|
821
|
-
[
|
|
822
|
-
"personalDetails.typeOfIdentity",
|
|
823
|
-
"personalDetails.idNumber",
|
|
824
|
-
"address.stateOrProvince",
|
|
825
|
-
"personalDetails.issuerState"
|
|
826
|
-
]
|
|
827
|
-
) : [],
|
|
828
|
-
customRules: fieldsFromCustomRules,
|
|
829
|
-
legalEntityType: legalEntityResponse?.type,
|
|
830
|
-
legalEntityTrustedFields: [],
|
|
831
|
-
remediationFieldAsOptional: true
|
|
832
|
-
});
|
|
833
|
-
const updatedDerivedProps = mandateIdVerificationForMotionCapture(
|
|
834
|
-
showIndividualMotionCapture?.value,
|
|
835
|
-
derivedProps2
|
|
836
|
-
);
|
|
837
|
-
setDerivedProps(updatedDerivedProps);
|
|
838
|
-
}, [
|
|
839
|
-
fieldConfigurations,
|
|
840
|
-
legalEntityResponse,
|
|
841
|
-
fieldsFromCustomRules,
|
|
842
|
-
problems?.remediationActions,
|
|
843
|
-
problems?.missingData
|
|
844
|
-
]);
|
|
845
|
-
const forms = useMemo(() => {
|
|
846
|
-
const formsWithUpdatedName = {
|
|
847
|
-
...individualForms,
|
|
848
|
-
idDocument: {
|
|
849
|
-
...individualForms.idDocument,
|
|
850
|
-
formName: data.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "instantVerification" : "idDocument"
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
const requiredForms = getRequiredForms(
|
|
854
|
-
formsWithUpdatedName,
|
|
855
|
-
derivedProps?.requiredFields,
|
|
856
|
-
derivedProps?.optionalFields
|
|
857
|
-
).filter(
|
|
858
|
-
// Prevent showing the ID verification method step when onfido is not enabled
|
|
859
|
-
(form2) => form2.formId !== "idVerificationMethod" || providerStatus?.statuses?.idDocument?.enabled
|
|
860
|
-
);
|
|
861
|
-
return addValidityToForms(requiredForms, form.isValid, problems);
|
|
862
|
-
}, [
|
|
863
|
-
derivedProps,
|
|
864
|
-
form.isValid,
|
|
865
|
-
problems,
|
|
866
|
-
providerStatus?.statuses?.idDocument?.enabled,
|
|
867
|
-
data.idVerificationMethod?.idVerificationMethod
|
|
868
|
-
]);
|
|
869
|
-
if (isRoleFieldNeeded && parentLegalEntity) {
|
|
870
|
-
roleTypes = getAllowedDecisionMakerRoles(parentLegalEntity, taskType);
|
|
871
|
-
}
|
|
872
|
-
useEffect(() => {
|
|
873
|
-
if (!legalEntityResponse?.documentDetails?.length) return;
|
|
874
|
-
documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
|
|
875
|
-
setExistingAttachments(res[0].attachments);
|
|
876
|
-
setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
|
|
877
|
-
}).catch(() => {
|
|
878
|
-
showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
|
|
879
|
-
});
|
|
880
|
-
}, [legalEntityResponse]);
|
|
881
|
-
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
882
|
-
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
883
|
-
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
884
|
-
const submitLegalEntity = async ({
|
|
885
|
-
dataSubmitted,
|
|
886
|
-
legalEntity,
|
|
887
|
-
idDocumentType
|
|
888
|
-
}) => {
|
|
889
|
-
let updatedLegalEntity;
|
|
890
|
-
const existingLeId = legalEntityResponse?.id;
|
|
891
|
-
if (!existingLeId) {
|
|
892
|
-
updatedLegalEntity = await createLegalEntity(legalEntity);
|
|
893
|
-
userEvents.addTaskEvent("Success", {
|
|
894
|
-
actionType: "submit",
|
|
895
|
-
countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
|
|
896
|
-
roles: dataSubmitted.personalDetails?.role
|
|
897
|
-
});
|
|
898
|
-
} else {
|
|
899
|
-
const patchLegalEntity = { ...drop("type").from(legalEntity), id: existingLeId };
|
|
900
|
-
updatedLegalEntity = await updateLegalEntity(patchLegalEntity);
|
|
901
|
-
userEvents.addTaskEvent("Success", {
|
|
902
|
-
actionType: "submit",
|
|
903
|
-
countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
|
|
904
|
-
documentType: idDocumentType
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
return updatedLegalEntity;
|
|
908
|
-
};
|
|
909
|
-
const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
|
|
910
|
-
const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
|
|
911
|
-
const providerId = idVerificationProviderId.value;
|
|
912
|
-
if (!providerId) throw Error("idVerificationProviderId not yet set");
|
|
913
|
-
const data2 = {
|
|
914
|
-
providerId,
|
|
915
|
-
legalEntityId,
|
|
916
|
-
captureMetadata: onfidoResponse
|
|
917
|
-
};
|
|
918
|
-
await getIdVerificationStartCheck(data2);
|
|
919
|
-
};
|
|
920
|
-
const submitDocuments = async ({
|
|
921
|
-
forms: forms2,
|
|
922
|
-
legalEntity,
|
|
923
|
-
dataSubmitted
|
|
924
|
-
}) => {
|
|
925
|
-
if (!isDocumentsRequired(forms2)) return;
|
|
926
|
-
if (dataSubmitted.idDocument?.instantIdVerificationData) {
|
|
927
|
-
if (providerStatus?.statuses?.idDocument?.enabled === false) {
|
|
928
|
-
throw new Error("Provider unexpectedly disabled instant verification flow");
|
|
929
|
-
}
|
|
930
|
-
await handleInstantIdVerificationStartCheck(
|
|
931
|
-
dataSubmitted.idDocument.instantIdVerificationData,
|
|
932
|
-
legalEntity.id
|
|
933
|
-
);
|
|
934
|
-
} else {
|
|
935
|
-
const formattedDocuments = await mapIndividualDocumentToApiDocument(
|
|
936
|
-
dataSubmitted,
|
|
937
|
-
legalEntity.id
|
|
938
|
-
);
|
|
939
|
-
if (!formattedDocuments || formattedDocuments.length === 0) {
|
|
940
|
-
if (existingAttachments?.length)
|
|
941
|
-
logger$1.log(
|
|
942
|
-
"User has already uploaded documents and is not changing them, nothing needs to be done"
|
|
943
|
-
);
|
|
944
|
-
else
|
|
945
|
-
logger$1.error(
|
|
946
|
-
`formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
|
|
947
|
-
);
|
|
948
|
-
return;
|
|
949
|
-
}
|
|
950
|
-
formattedDocuments[0].attachments = mergeAttachments(
|
|
951
|
-
existingAttachments ?? [],
|
|
952
|
-
formattedDocuments[0]?.attachments ?? []
|
|
953
|
-
).filter((attachment) => attachment.content);
|
|
954
|
-
const uploadedDocuments = await documentUtils.uploadDocuments(
|
|
955
|
-
formattedDocuments,
|
|
956
|
-
legalEntity.id
|
|
957
|
-
);
|
|
958
|
-
uploadedDocuments?.forEach((doc) => {
|
|
959
|
-
userEvents.addTaskEvent("Success", {
|
|
960
|
-
actionType: "upload",
|
|
961
|
-
documentType: doc.type,
|
|
962
|
-
fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
|
|
963
|
-
});
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
};
|
|
967
|
-
const hasRolesChanged = (legalEntity, existingEntityAssociations, newRoles) => {
|
|
968
|
-
const existingRoles = existingEntityAssociations?.filter((ea) => ea.legalEntityId === legalEntity.id)?.map(({ type }) => type);
|
|
969
|
-
return !doArraysMatch(existingRoles, newRoles);
|
|
970
|
-
};
|
|
971
|
-
const attachAssociationToParentLegalEntity = async ({
|
|
972
|
-
legalEntity,
|
|
973
|
-
parentLE,
|
|
974
|
-
dataSubmitted
|
|
975
|
-
}) => {
|
|
976
|
-
const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.personalDetails?.role : taskType === TaskTypes.TRUST_MEMBER_INDIVIDUAL || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL ? trustMember?.roles : null;
|
|
977
|
-
const existingEntityAssociations = getOwnEntityAssociations(parentLE);
|
|
978
|
-
if (newRoles && (hasRolesChanged(legalEntity, existingEntityAssociations, newRoles) || dataFromResponse.personalDetails?.jobTitle !== dataSubmitted?.personalDetails?.jobTitle || hasNomineesChanged(dataFromResponse.personalDetails, dataSubmitted.personalDetails))) {
|
|
979
|
-
const updatedParentLegalEntity = {
|
|
980
|
-
entityAssociations: [
|
|
981
|
-
...newRoles.map((role) => ({
|
|
982
|
-
type: role,
|
|
983
|
-
legalEntityId: legalEntity.id,
|
|
984
|
-
...DECISION_MAKER_TYPES_WITH_JOBTITLE.some((type) => type === role) && {
|
|
985
|
-
jobTitle: dataSubmitted?.personalDetails?.jobTitle
|
|
986
|
-
}
|
|
987
|
-
})) || [],
|
|
988
|
-
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
|
|
989
|
-
]
|
|
990
|
-
};
|
|
991
|
-
if (updatedParentLegalEntity.entityAssociations) {
|
|
992
|
-
updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
|
|
993
|
-
(ea) => attachNomineeToRole(ea, country, dataSubmitted.personalDetails)
|
|
994
|
-
);
|
|
995
|
-
}
|
|
996
|
-
await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
|
|
997
|
-
}
|
|
998
|
-
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity.id) || dataFromResponse?.personalDetails?.relationship !== dataSubmitted?.personalDetails?.relationship)) {
|
|
999
|
-
const newEntityAssociation = {
|
|
1000
|
-
type: "legalRepresentative",
|
|
1001
|
-
legalEntityId: legalEntity.id,
|
|
1002
|
-
relationship: dataSubmitted?.personalDetails?.relationship
|
|
1003
|
-
};
|
|
1004
|
-
const updatedParentLegalEntity = {
|
|
1005
|
-
entityAssociations: [newEntityAssociation, ...existingEntityAssociations]
|
|
1006
|
-
};
|
|
1007
|
-
await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
|
|
1008
|
-
}
|
|
1009
|
-
};
|
|
1010
|
-
const onSubmit = async () => {
|
|
1011
|
-
setLoadingStatus("loading");
|
|
1012
|
-
const dataSubmitted = omitObscuredFieldsIfUnchanged(
|
|
1013
|
-
individualObscuredFields,
|
|
1014
|
-
data,
|
|
1015
|
-
dataFromResponse
|
|
1016
|
-
);
|
|
1017
|
-
if (!dataSubmitted) {
|
|
1018
|
-
return;
|
|
1019
|
-
}
|
|
1020
|
-
try {
|
|
1021
|
-
const legalEntity = mapIndividualToLegalEntity(dataSubmitted);
|
|
1022
|
-
const idDocumentType = idDocumentTypeOptions.find(
|
|
1023
|
-
({ id }) => dataSubmitted?.idDocument?.idDocumentType === id
|
|
1024
|
-
)?.id;
|
|
1025
|
-
legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
|
|
1026
|
-
taskType,
|
|
1027
|
-
legalEntityResponse,
|
|
1028
|
-
accountHolder || void 0
|
|
1029
|
-
);
|
|
1030
|
-
const createdLegalEntity = await submitLegalEntity({
|
|
1031
|
-
dataSubmitted,
|
|
1032
|
-
legalEntity,
|
|
1033
|
-
idDocumentType
|
|
1034
|
-
});
|
|
1035
|
-
setAccountHolder(accountHolder);
|
|
1036
|
-
await submitDocuments({ forms, legalEntity: createdLegalEntity, dataSubmitted });
|
|
1037
|
-
if (parentLegalEntity) {
|
|
1038
|
-
await attachAssociationToParentLegalEntity({
|
|
1039
|
-
legalEntity: createdLegalEntity,
|
|
1040
|
-
parentLE: parentLegalEntity,
|
|
1041
|
-
dataSubmitted
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1044
|
-
setLoadingStatus("success");
|
|
1045
|
-
clearToasts();
|
|
1046
|
-
externalOnSubmit?.(dataSubmitted);
|
|
1047
|
-
} catch (e) {
|
|
1048
|
-
logger$1.error("Failed to update individual", e);
|
|
1049
|
-
if (isValidationError(e)) {
|
|
1050
|
-
setValidationErrors(processValidationErrors(e, TaskTypes.INDIVIDUAL));
|
|
1051
|
-
} else if (isMaintenanceModeError(e)) {
|
|
1052
|
-
showToast({
|
|
1053
|
-
label: i18n.get("maintenanceModeMessage"),
|
|
1054
|
-
variant: "error",
|
|
1055
|
-
duration: "indefinite"
|
|
1056
|
-
});
|
|
1057
|
-
} else {
|
|
1058
|
-
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
1059
|
-
}
|
|
1060
|
-
setLoadingStatus("success");
|
|
1061
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
1062
|
-
actionType: "submit",
|
|
1063
|
-
returnType: e.errorCode,
|
|
1064
|
-
returnValue: e.title
|
|
1065
|
-
});
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1068
|
-
const isDocumentsRequired = (forms2) => forms2.some((form2) => individualDocumentForms.includes(form2.formId));
|
|
1069
|
-
const datasetUtils = datasetUtilities(i18n.locale);
|
|
1070
|
-
const formatIdDocument = (idDocument2) => {
|
|
1071
|
-
if (!idDocument2) return void 0;
|
|
1072
|
-
const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
|
|
1073
|
-
(document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
|
|
1074
|
-
) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
|
|
1075
|
-
if (!documentType) return void 0;
|
|
1076
|
-
const frontPage = idDocument2.idFrontPage?.[0];
|
|
1077
|
-
const backPage = idDocument2.idBackPage?.[0];
|
|
1078
|
-
if (!frontPage) return void 0;
|
|
1079
|
-
return {
|
|
1080
|
-
documentType: i18n.get(documentType.name),
|
|
1081
|
-
...backPage && documentType.hasBackPage ? {
|
|
1082
|
-
frontPage: frontPage.name,
|
|
1083
|
-
backPage: backPage.name
|
|
1084
|
-
} : {
|
|
1085
|
-
fileName: frontPage.name
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
|
-
};
|
|
1089
|
-
const formatFileSummaryData = ({
|
|
1090
|
-
idDocument: idDocument2,
|
|
1091
|
-
proofOfNationalId,
|
|
1092
|
-
proofOfResidency,
|
|
1093
|
-
proofOfRelationship
|
|
1094
|
-
}) => {
|
|
1095
|
-
const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
|
|
1096
|
-
const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
|
|
1097
|
-
const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
|
|
1098
|
-
return {
|
|
1099
|
-
...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
|
|
1100
|
-
idDocument: formatIdDocument(idDocument2)
|
|
1101
|
-
},
|
|
1102
|
-
...proofOfNationalIdFile && {
|
|
1103
|
-
proofOfNationalId: {
|
|
1104
|
-
fileName: proofOfNationalIdFile.name
|
|
1105
|
-
}
|
|
1106
|
-
},
|
|
1107
|
-
...proofOfResidencyFile && {
|
|
1108
|
-
proofOfResidency: {
|
|
1109
|
-
fileName: proofOfResidencyFile.name
|
|
1110
|
-
}
|
|
1111
|
-
},
|
|
1112
|
-
...proofOfRelationshipFile && {
|
|
1113
|
-
proofOfRelationship: {
|
|
1114
|
-
fileName: proofOfRelationshipFile.name
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
};
|
|
1118
|
-
};
|
|
1119
|
-
const formatDataForSummary = () => {
|
|
1120
|
-
let summaryData = cloneObject(data);
|
|
1121
|
-
if (summaryData.personalDetails?.residencyCountry) {
|
|
1122
|
-
summaryData.personalDetails.residencyCountry = datasetUtils.getCountryName(
|
|
1123
|
-
summaryData.personalDetails.residencyCountry
|
|
1124
|
-
);
|
|
1125
|
-
}
|
|
1126
|
-
if (summaryData.personalDetails?.nationality) {
|
|
1127
|
-
summaryData.personalDetails.nationality = datasetUtils.getCountryName(
|
|
1128
|
-
summaryData.personalDetails.nationality
|
|
1129
|
-
);
|
|
1130
|
-
}
|
|
1131
|
-
if (summaryData.address) {
|
|
1132
|
-
summaryData.address = mapAddressLabels(summaryData.address, datasetUtils);
|
|
1133
|
-
}
|
|
1134
|
-
if (isDocumentsRequired(forms)) {
|
|
1135
|
-
individualDocumentForms.forEach((formId) => delete summaryData[formId]);
|
|
1136
|
-
summaryData = { ...summaryData, ...formatFileSummaryData(data) };
|
|
1137
|
-
}
|
|
1138
|
-
if (summaryData.personalDetails?.accountHolder) {
|
|
1139
|
-
summaryData.personalDetails.accountHolder = i18n.get(
|
|
1140
|
-
summaryData.personalDetails.accountHolder
|
|
1141
|
-
);
|
|
1142
|
-
}
|
|
1143
|
-
if (summaryData.personalDetails?.birthDate) {
|
|
1144
|
-
summaryData.personalDetails.birthDate = localizeDateString(
|
|
1145
|
-
summaryData.personalDetails.birthDate,
|
|
1146
|
-
i18n.locale
|
|
1147
|
-
);
|
|
1148
|
-
}
|
|
1149
|
-
if (summaryData.personalDetails?.phoneNumber) {
|
|
1150
|
-
delete summaryData.personalDetails.phoneNumber;
|
|
1151
|
-
summaryData.personalDetails.phoneNumber = data.personalDetails?.phoneNumber?.number;
|
|
1152
|
-
}
|
|
1153
|
-
if (summaryData.personalDetails?.taxInformation) {
|
|
1154
|
-
const taxInformation = summaryData.personalDetails.taxInformation.find(
|
|
1155
|
-
(taxId) => taxId.country === data.personalDetails?.nationality
|
|
1156
|
-
);
|
|
1157
|
-
if (taxInformation) {
|
|
1158
|
-
delete summaryData.personalDetails.taxInformation;
|
|
1159
|
-
summaryData.personalDetails[taxInformation.type] = taxInformation.number;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
return summaryData;
|
|
1163
|
-
};
|
|
1164
|
-
const summaryOmittedKeys = [
|
|
1165
|
-
...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
|
|
1166
|
-
...data?.personalDetails?.idNumberExempt ? ["idNumber"] : []
|
|
1167
|
-
];
|
|
1168
|
-
const {
|
|
1169
|
-
handleNextClick,
|
|
1170
|
-
handleBackClick,
|
|
1171
|
-
activeForm,
|
|
1172
|
-
shouldValidate,
|
|
1173
|
-
gotoFormByFormIndex,
|
|
1174
|
-
steps
|
|
1175
|
-
} = useFormComposer({
|
|
1176
|
-
problems,
|
|
1177
|
-
externalBackClick,
|
|
1178
|
-
forms,
|
|
1179
|
-
onSubmit,
|
|
1180
|
-
triggerValidation: form.triggerValidation
|
|
1181
|
-
// TODO: figure out type of nested keys
|
|
1182
|
-
});
|
|
1183
|
-
return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
1184
|
-
FormFlow,
|
|
1185
|
-
{
|
|
1186
|
-
summary: {
|
|
1187
|
-
data: formatDataForSummary(),
|
|
1188
|
-
omitted: {
|
|
1189
|
-
keys: summaryOmittedKeys
|
|
1190
|
-
},
|
|
1191
|
-
problems
|
|
1192
|
-
},
|
|
1193
|
-
asModal,
|
|
1194
|
-
currentStep: steps.current,
|
|
1195
|
-
disableNextButton: hideFooter,
|
|
1196
|
-
forms,
|
|
1197
|
-
gotoFormByFormIndex,
|
|
1198
|
-
handleBackClick,
|
|
1199
|
-
handleCancelClick: handleHomeClick,
|
|
1200
|
-
handleNextClick,
|
|
1201
|
-
loadingStatus,
|
|
1202
|
-
totalSteps: steps.total,
|
|
1203
|
-
children: /* @__PURE__ */ jsx(
|
|
1204
|
-
Individual,
|
|
1205
|
-
{
|
|
1206
|
-
...derivedProps,
|
|
1207
|
-
data,
|
|
1208
|
-
country,
|
|
1209
|
-
activeForm,
|
|
1210
|
-
forms,
|
|
1211
|
-
taskType,
|
|
1212
|
-
problems,
|
|
1213
|
-
onNext: handleNextClick,
|
|
1214
|
-
onBack: handleBackClick,
|
|
1215
|
-
setHideFooter,
|
|
1216
|
-
legalEntityId: legalEntityResponse?.id,
|
|
1217
|
-
allowedRoles: roleTypes,
|
|
1218
|
-
shouldValidate,
|
|
1219
|
-
accountHolder,
|
|
1220
|
-
parentLegalEntity,
|
|
1221
|
-
trustedFields: !parentLegalEntity ? trustedFields : associatedLegalEntityTrustedFields,
|
|
1222
|
-
trustedFieldsProvider,
|
|
1223
|
-
trustedRoles
|
|
1224
|
-
}
|
|
1225
|
-
)
|
|
1226
|
-
}
|
|
1227
|
-
) });
|
|
1228
|
-
}
|
|
1229
|
-
const isNotOutOfRangeBirthDateValidatorRule = {
|
|
1230
|
-
modes: ["blur"],
|
|
1231
|
-
validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
|
|
1232
|
-
errorMessage: "invalidDateOfBirth"
|
|
1233
|
-
};
|
|
1234
|
-
const buildMinimumAgeValidationRule = (minimumAge) => ({
|
|
1235
|
-
modes: ["blur"],
|
|
1236
|
-
validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
|
|
1237
|
-
errorMessage: {
|
|
1238
|
-
key: "youMustXYearsOldToContinue",
|
|
1239
|
-
values: { minimumAge: minimumAge.toString() }
|
|
1240
|
-
}
|
|
1241
|
-
});
|
|
1242
|
-
const getCountrySpecificMinimumAgeValidationRule = (country) => {
|
|
1243
|
-
if (!country) {
|
|
1244
|
-
return buildMinimumAgeValidationRule(13);
|
|
1245
|
-
}
|
|
1246
|
-
if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
|
|
1247
|
-
(c) => c === country
|
|
1248
|
-
)) {
|
|
1249
|
-
return buildMinimumAgeValidationRule(16);
|
|
1250
|
-
}
|
|
1251
|
-
switch (country) {
|
|
1252
|
-
case CountryCodes.HongKong:
|
|
1253
|
-
case CountryCodes.Singapore:
|
|
1254
|
-
return buildMinimumAgeValidationRule(18);
|
|
1255
|
-
default:
|
|
1256
|
-
return buildMinimumAgeValidationRule(13);
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
const additionalPersonalDetailsValidators = ({
|
|
1260
|
-
country,
|
|
1261
|
-
isExperimentEnabled = () => false,
|
|
1262
|
-
isSettingEnabled = () => false,
|
|
1263
|
-
taskType,
|
|
1264
|
-
idNumberType,
|
|
1265
|
-
idNumberExempt,
|
|
1266
|
-
idNumber,
|
|
1267
|
-
existingIdNumber,
|
|
1268
|
-
formVerificationErrors,
|
|
1269
|
-
i18n,
|
|
1270
|
-
taxIdNumberType
|
|
1271
|
-
}) => ({
|
|
1272
|
-
taxInformation: resolveFieldMetadata(
|
|
1273
|
-
taxInformationDefaultFieldConfig[country],
|
|
1274
|
-
{
|
|
1275
|
-
taxIdNumberType,
|
|
1276
|
-
companyType: LegalEntityTypes.INDIVIDUAL
|
|
1277
|
-
},
|
|
1278
|
-
taxInformationDefaultFieldMetadata
|
|
1279
|
-
)?.validators,
|
|
1280
|
-
birthDate: (() => {
|
|
1281
|
-
const baseValidators = [isNotOutOfRangeBirthDateValidatorRule];
|
|
1282
|
-
if (isSettingEnabled("enforceLegalAge")) {
|
|
1283
|
-
return [...baseValidators, buildMinimumAgeValidationRule(18)];
|
|
1284
|
-
}
|
|
1285
|
-
if (isExperimentEnabled("EnableAgeVerification")) {
|
|
1286
|
-
if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
|
|
1287
|
-
return [...baseValidators, buildMinimumAgeValidationRule(18)];
|
|
1288
|
-
}
|
|
1289
|
-
return [...baseValidators, getCountrySpecificMinimumAgeValidationRule(country)];
|
|
1290
|
-
}
|
|
1291
|
-
return baseValidators;
|
|
1292
|
-
})(),
|
|
1293
|
-
...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
|
|
1294
|
-
...contactDetailsValidationRules,
|
|
1295
|
-
idNumber: (() => {
|
|
1296
|
-
const derivedIdNumberType = country === CountryCodes.UnitedStates || country === CountryCodes.PuertoRico ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
|
|
1297
|
-
return idNumberExempt ? {
|
|
1298
|
-
validate: () => {
|
|
1299
|
-
return idNumberExempt || !isEmpty(idNumber);
|
|
1300
|
-
},
|
|
1301
|
-
modes: ["blur"]
|
|
1302
|
-
} : resolveFieldMetadata(
|
|
1303
|
-
defaultFieldConfig[country],
|
|
1304
|
-
{ idNumberType: derivedIdNumberType },
|
|
1305
|
-
defaultFieldMetadata
|
|
1306
|
-
)?.validators;
|
|
1307
|
-
})(),
|
|
1308
|
-
...addressValidators({
|
|
1309
|
-
isExperimentEnabled,
|
|
1310
|
-
country,
|
|
1311
|
-
i18n
|
|
1312
|
-
})
|
|
1313
|
-
});
|
|
1314
|
-
const basicDetailsValidators = ({
|
|
1315
|
-
isExperimentEnabled = () => false
|
|
1316
|
-
}) => ({
|
|
1317
|
-
...contactDetailsValidationRules,
|
|
1318
|
-
...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0
|
|
1319
|
-
});
|
|
1320
|
-
const getIdNowProviderIdentificationStatus = async (rootLegalEntityId, baseUrl, legalEntityId) => {
|
|
1321
|
-
return httpGet({
|
|
1322
|
-
baseUrl,
|
|
1323
|
-
path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/status`,
|
|
1324
|
-
errorHandler: async (response) => {
|
|
1325
|
-
const responseData = await response;
|
|
1326
|
-
if (responseData.status === 404) {
|
|
1327
|
-
return { status: 404, message: responseData.detail, errorCode: responseData.errorCode };
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
|
-
};
|
|
1332
|
-
const useIdNowIdentificationStatus = (legalEntityId, options) => {
|
|
1333
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1334
|
-
return useQuery({
|
|
1335
|
-
queryKey: legalEntityId === skipToken ? [] : ["idNowProviderIdentificationStatus", legalEntityId],
|
|
1336
|
-
queryFn: legalEntityId === skipToken ? skipToken : () => getIdNowProviderIdentificationStatus(
|
|
1337
|
-
rootLegalEntityId.value,
|
|
1338
|
-
baseUrl.value,
|
|
1339
|
-
legalEntityId
|
|
1340
|
-
),
|
|
1341
|
-
...options
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
1344
|
-
const idNowProviderStartIdentification = async (rootLegalEntityId, baseUrl, legalEntityId) => {
|
|
1345
|
-
return httpPost({
|
|
1346
|
-
baseUrl,
|
|
1347
|
-
path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/start`
|
|
1348
|
-
});
|
|
1349
|
-
};
|
|
1350
|
-
const useIdNowStartIdentification = (legalEntityId, options) => {
|
|
1351
|
-
const { rootLegalEntityId, baseUrl } = useApiContext();
|
|
1352
|
-
return useQuery({
|
|
1353
|
-
queryKey: legalEntityId === skipToken ? [] : ["idNowProviderStartIdentification", legalEntityId],
|
|
1354
|
-
queryFn: legalEntityId === skipToken ? skipToken : () => idNowProviderStartIdentification(rootLegalEntityId.value, baseUrl.value, legalEntityId),
|
|
1355
|
-
...options
|
|
1356
|
-
});
|
|
1357
|
-
};
|
|
1358
|
-
const idnowHeader = "adyen-kyc-idnow-header";
|
|
1359
|
-
const idnowVerificationHeaderIframeContainer = "adyen-kyc-idnow-verification-header-iframe-container";
|
|
1360
|
-
const idnowVerificationHeaderIframe = "adyen-kyc-idnow-verification-header-iframe";
|
|
1361
|
-
const idnowVerificationHeaderImage = "adyen-kyc-idnow-verification-header-image";
|
|
1362
|
-
const styles = {
|
|
1363
|
-
idnowHeader,
|
|
1364
|
-
idnowVerificationHeaderIframeContainer,
|
|
1365
|
-
idnowVerificationHeaderIframe,
|
|
1366
|
-
idnowVerificationHeaderImage
|
|
1367
|
-
};
|
|
1368
|
-
const passportFrontGreenImage = lazy(
|
|
1369
|
-
() => import("./passport-front-green-BL4HmtsB.js")
|
|
1370
|
-
);
|
|
1371
|
-
const isIdNowSuccessful = (status) => {
|
|
1372
|
-
const providerStatus = status?.providerStatus;
|
|
1373
|
-
return providerStatus === "SUCCESS" || providerStatus === "SUCCESS_DATA_CHANGED" || providerStatus === "REVIEW_PENDING";
|
|
1374
|
-
};
|
|
1375
|
-
const IdNowVerificationModal = ({ handleFinish }) => {
|
|
1376
|
-
const { t } = useTranslation(["individual", "common"]);
|
|
1377
|
-
const [isConfirmPresented, setIsConfirmPresented] = useState(false);
|
|
1378
|
-
const [genericError, setGenericError] = useState(false);
|
|
1379
|
-
const widgetContainerRef = useRef(null);
|
|
1380
|
-
const iFrameRef = useRef(null);
|
|
1381
|
-
const iFrameWidgetRef = useRef(null);
|
|
1382
|
-
const [page, setPage] = useState(1);
|
|
1383
|
-
const queryClient = useQueryClient();
|
|
1384
|
-
const { showToast } = useToastContext();
|
|
1385
|
-
const {
|
|
1386
|
-
data: idNowStatus,
|
|
1387
|
-
isLoading: isStatusLoading,
|
|
1388
|
-
refetch: refetchIdNowIdentificationStatus
|
|
1389
|
-
} = useIdNowIdentificationStatus(idNowModalChildEntityId.value?.id ?? skipToken, {
|
|
1390
|
-
enabled: !!idNowModalChildEntityId.value?.id,
|
|
1391
|
-
refetchOnMount: "always",
|
|
1392
|
-
refetchInterval: 1e4,
|
|
1393
|
-
// poll every 10 seconds
|
|
1394
|
-
retry: (failureCount, error) => {
|
|
1395
|
-
if ("status" in error && error.status === 404) return false;
|
|
1396
|
-
return failureCount < 3;
|
|
1397
|
-
}
|
|
1398
|
-
});
|
|
1399
|
-
const {
|
|
1400
|
-
data: idNowStart,
|
|
1401
|
-
isLoading,
|
|
1402
|
-
isError: idNowStartError,
|
|
1403
|
-
refetch: refetchIdNowStartIdentification
|
|
1404
|
-
} = useIdNowStartIdentification(idNowModalChildEntityId.value?.id ?? skipToken, {
|
|
1405
|
-
enabled: !!idNowModalChildEntityId.value?.id && page === 2
|
|
1406
|
-
});
|
|
1407
|
-
const handleDismiss = () => {
|
|
1408
|
-
setIsConfirmPresented(true);
|
|
1409
|
-
};
|
|
1410
|
-
const handleCancelDismiss = () => {
|
|
1411
|
-
setIsConfirmPresented(false);
|
|
1412
|
-
};
|
|
1413
|
-
const handleConfirmDismiss = () => {
|
|
1414
|
-
setPage(1);
|
|
1415
|
-
setGenericError(false);
|
|
1416
|
-
setIsConfirmPresented(false);
|
|
1417
|
-
showIdNowModal.value = false;
|
|
1418
|
-
if (idNowStartError && idNowModalChildEntityId.value?.id) {
|
|
1419
|
-
queryClient.resetQueries({
|
|
1420
|
-
queryKey: ["idNowProviderStartIdentification", idNowModalChildEntityId.value?.id]
|
|
1421
|
-
});
|
|
1422
|
-
}
|
|
1423
|
-
idNowModalChildEntityId.value = void 0;
|
|
1424
|
-
iFrameWidgetRef.current?.unmount();
|
|
1425
|
-
iFrameRef.current?.remove();
|
|
1426
|
-
handleFinish?.();
|
|
1427
|
-
};
|
|
1428
|
-
if (idNowStatus?.status === "finished") {
|
|
1429
|
-
if (isIdNowSuccessful(idNowStatus)) {
|
|
1430
|
-
showToast({
|
|
1431
|
-
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
1432
|
-
variant: "success"
|
|
1433
|
-
});
|
|
1434
|
-
handleConfirmDismiss();
|
|
1435
|
-
} else {
|
|
1436
|
-
if (page === 2) {
|
|
1437
|
-
handleConfirmDismiss();
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
if (!isLoading && idNowStartError) {
|
|
1442
|
-
setGenericError(true);
|
|
1443
|
-
setPage(1);
|
|
1444
|
-
}
|
|
1445
|
-
const initializeIdNowWidget = useCallback(async (url) => {
|
|
1446
|
-
const container = widgetContainerRef.current;
|
|
1447
|
-
if (!container) {
|
|
1448
|
-
return;
|
|
1449
|
-
}
|
|
1450
|
-
const iFrame = document.createElement("iframe");
|
|
1451
|
-
iFrameRef.current = iFrame;
|
|
1452
|
-
iFrame.setAttribute("allowFullscreen", "true");
|
|
1453
|
-
iFrame.classList.add(styles.idnowVerificationHeaderIframe);
|
|
1454
|
-
iFrame.setAttribute("height", "800");
|
|
1455
|
-
iFrame.setAttribute(
|
|
1456
|
-
"allow",
|
|
1457
|
-
"camera *;microphone *;geolocation *;clipboard-read *;clipboard-write *"
|
|
1458
|
-
);
|
|
1459
|
-
container.appendChild(iFrame);
|
|
1460
|
-
try {
|
|
1461
|
-
iFrameWidgetRef.current = new IFrameWidget(iFrame, url, "idnow", "");
|
|
1462
|
-
await iFrameWidgetRef.current.mountAndWaitForResponse();
|
|
1463
|
-
} catch (err) {
|
|
1464
|
-
console.error("Error occurred:", err);
|
|
1465
|
-
setGenericError(true);
|
|
1466
|
-
setPage(1);
|
|
1467
|
-
}
|
|
1468
|
-
}, []);
|
|
1469
|
-
useEffect(() => {
|
|
1470
|
-
if (page === 2 && !isLoading && idNowStart && idNowStart?.url) {
|
|
1471
|
-
(async () => {
|
|
1472
|
-
await refetchIdNowIdentificationStatus();
|
|
1473
|
-
await initializeIdNowWidget(idNowStart.url);
|
|
1474
|
-
})();
|
|
1475
|
-
}
|
|
1476
|
-
return () => {
|
|
1477
|
-
iFrameWidgetRef.current?.unmount();
|
|
1478
|
-
iFrameRef.current?.remove();
|
|
1479
|
-
};
|
|
1480
|
-
}, [isLoading, page, initializeIdNowWidget, refetchIdNowIdentificationStatus, idNowStart]);
|
|
1481
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1482
|
-
!isStatusLoading && /* @__PURE__ */ jsxs(
|
|
1483
|
-
Modal,
|
|
1484
|
-
{
|
|
1485
|
-
size: page === 2 ? "large" : "medium",
|
|
1486
|
-
showCloseButton: !isLoading && !isStatusLoading,
|
|
1487
|
-
onClose: handleDismiss,
|
|
1488
|
-
ariaLabel: t(($) => $["identityVerification"], { ns: "common" }),
|
|
1489
|
-
children: [
|
|
1490
|
-
page === 1 && /* @__PURE__ */ jsx("div", { className: styles.idnowHeader, children: /* @__PURE__ */ jsx(
|
|
1491
|
-
LandingLayout,
|
|
1492
|
-
{
|
|
1493
|
-
media: /* @__PURE__ */ jsx(
|
|
1494
|
-
Image,
|
|
1495
|
-
{
|
|
1496
|
-
className: styles.idnowVerificationHeaderImage,
|
|
1497
|
-
lazyLoadedImage: passportFrontGreenImage
|
|
1498
|
-
}
|
|
1499
|
-
),
|
|
1500
|
-
title: t(($) => $["identityVerification"], { ns: "common" }),
|
|
1501
|
-
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1502
|
-
t(($) => $["idNowDescription"], { ns: "individual" }),
|
|
1503
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
1504
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
1505
|
-
getIndividualLegalEntityName(idNowModalChildEntityId.value) && t(($) => $["idNowDescriptionName"], {
|
|
1506
|
-
ns: "individual",
|
|
1507
|
-
name: getIndividualLegalEntityName(idNowModalChildEntityId.value)
|
|
1508
|
-
})
|
|
1509
|
-
] }),
|
|
1510
|
-
error: !isLoading && genericError ? /* @__PURE__ */ jsx(
|
|
1511
|
-
Alert,
|
|
1512
|
-
{
|
|
1513
|
-
variant: "error",
|
|
1514
|
-
title: t(($) => $["thereWasAnErrorTryAgain"], { ns: "common" })
|
|
1515
|
-
}
|
|
1516
|
-
) : void 0,
|
|
1517
|
-
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1518
|
-
/* @__PURE__ */ jsx(
|
|
1519
|
-
Button,
|
|
1520
|
-
{
|
|
1521
|
-
onClick: async () => {
|
|
1522
|
-
setGenericError(false);
|
|
1523
|
-
setPage(2);
|
|
1524
|
-
await refetchIdNowStartIdentification();
|
|
1525
|
-
},
|
|
1526
|
-
disabled: isLoading || isStatusLoading || idNowStatus?.status === "finished" && isIdNowSuccessful(idNowStatus),
|
|
1527
|
-
fullWidth: true,
|
|
1528
|
-
children: idNowStatus?.status === "pending" ? t(($) => $["continueVerification"], { ns: "common" }) : t(($) => $["startVerification"], { ns: "common" })
|
|
1529
|
-
}
|
|
1530
|
-
),
|
|
1531
|
-
/* @__PURE__ */ jsx(
|
|
1532
|
-
Button,
|
|
1533
|
-
{
|
|
1534
|
-
disabled: isLoading || isStatusLoading,
|
|
1535
|
-
variant: "tertiary",
|
|
1536
|
-
onClick: handleConfirmDismiss,
|
|
1537
|
-
fullWidth: true,
|
|
1538
|
-
children: t(($) => $["finishLater"], { ns: "common" })
|
|
1539
|
-
}
|
|
1540
|
-
)
|
|
1541
|
-
] })
|
|
1542
|
-
}
|
|
1543
|
-
) }),
|
|
1544
|
-
page === 2 && (isLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
|
|
1545
|
-
"div",
|
|
1546
|
-
{
|
|
1547
|
-
ref: widgetContainerRef,
|
|
1548
|
-
className: styles.idnowVerificationHeaderIframeContainer
|
|
1549
|
-
}
|
|
1550
|
-
))
|
|
1551
|
-
]
|
|
1552
|
-
}
|
|
1553
|
-
),
|
|
1554
|
-
isConfirmPresented && /* @__PURE__ */ jsx(
|
|
1555
|
-
Confirm,
|
|
1556
|
-
{
|
|
1557
|
-
confirmText: t(($) => $["leave"], { ns: "common" }),
|
|
1558
|
-
onCancel: handleCancelDismiss,
|
|
1559
|
-
onConfirm: handleConfirmDismiss,
|
|
1560
|
-
title: t(($) => $["unsavedChanges"], { ns: "common" })
|
|
1561
|
-
}
|
|
1562
|
-
)
|
|
1563
|
-
] });
|
|
1564
|
-
};
|
|
1565
|
-
const adjustOnfidoIdentificationData = (data, apiData) => {
|
|
1566
|
-
const { typeOfIdentity, idNumber, idNumberExempt } = data;
|
|
1567
|
-
const identificationData = {
|
|
1568
|
-
...apiData,
|
|
1569
|
-
number: idNumber,
|
|
1570
|
-
type: getOnfidoIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
|
|
1571
|
-
};
|
|
1572
|
-
switch (typeOfIdentity) {
|
|
1573
|
-
case "passport":
|
|
1574
|
-
return {
|
|
1575
|
-
...identificationData,
|
|
1576
|
-
cardNumber: ""
|
|
1577
|
-
};
|
|
1578
|
-
case "driversLicense":
|
|
1579
|
-
return {
|
|
1580
|
-
...identificationData,
|
|
1581
|
-
expiryDate: ""
|
|
1582
|
-
};
|
|
1583
|
-
default:
|
|
1584
|
-
return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
|
|
1585
|
-
...identificationData,
|
|
1586
|
-
expiryDate: "",
|
|
1587
|
-
cardNumber: "",
|
|
1588
|
-
nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
|
|
1589
|
-
};
|
|
1590
|
-
}
|
|
1591
|
-
};
|
|
1592
|
-
const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido, isExperimentEnabled, matchingScenario) => {
|
|
1593
|
-
const legalEntity = {
|
|
1594
|
-
...formatObject(individualOnfido, individualOnfidoApiKeyMapping),
|
|
1595
|
-
type: LegalEntityTypes.INDIVIDUAL
|
|
1596
|
-
};
|
|
1597
|
-
if (individualOnfido.additionalPersonalDetails) {
|
|
1598
|
-
if (isExperimentEnabled("EnableTaxIdRequiredForBusinessAccountsScenarios") && matchingScenario?.includes(Scenarios.L_TAXINFO) && individualOnfido.additionalPersonalDetails?.idNumber && individualOnfido.additionalPersonalDetails?.typeOfIdentity && individualOnfido.additionalPersonalDetails?.country === CountryCodes.Spain) {
|
|
1599
|
-
legalEntity.individual.taxInformation = [
|
|
1600
|
-
{
|
|
1601
|
-
country: individualOnfido.additionalPersonalDetails.country,
|
|
1602
|
-
number: individualOnfido.additionalPersonalDetails.idNumber,
|
|
1603
|
-
type: individualOnfido.additionalPersonalDetails.typeOfIdentity.toUpperCase()
|
|
1604
|
-
}
|
|
1605
|
-
];
|
|
1606
|
-
}
|
|
1607
|
-
legalEntity.individual.identificationData = adjustOnfidoIdentificationData(
|
|
1608
|
-
individualOnfido.additionalPersonalDetails,
|
|
1609
|
-
legalEntity.individual.identificationData
|
|
1610
|
-
);
|
|
1611
|
-
}
|
|
1612
|
-
const nameLocalization = [
|
|
1613
|
-
mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaHani"),
|
|
1614
|
-
mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaKana")
|
|
1615
|
-
].filter(({ fields }) => !isEmpty$1(fields));
|
|
1616
|
-
if (nameLocalization.length) {
|
|
1617
|
-
legalEntity.individual.name.localization = nameLocalization;
|
|
1618
|
-
}
|
|
1619
|
-
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
1620
|
-
individualOnfido.additionalPersonalDetails
|
|
1621
|
-
);
|
|
1622
|
-
if (addressLocalizations.length > 0)
|
|
1623
|
-
legalEntity.individual.residentialAddress.localization = addressLocalizations;
|
|
1624
|
-
if (individualOnfido.basicDetails?.phoneNumber) {
|
|
1625
|
-
const phone = {
|
|
1626
|
-
number: individualOnfido.basicDetails.phoneNumber.number,
|
|
1627
|
-
type: "mobile"
|
|
1628
|
-
};
|
|
1629
|
-
if (phone.number && legalEntity.individual) {
|
|
1630
|
-
legalEntity.individual.phone = phone;
|
|
1631
|
-
} else {
|
|
1632
|
-
delete legalEntity?.individual?.phone;
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
return legalEntity;
|
|
1636
|
-
};
|
|
1637
|
-
const identityOnfidoBase = {
|
|
1638
|
-
role: {
|
|
1639
|
-
rule: "requiredIfDecisionMakerTask"
|
|
1640
|
-
},
|
|
1641
|
-
firstName: {
|
|
1642
|
-
rule: "REQUIRED"
|
|
1643
|
-
},
|
|
1644
|
-
lastName: {
|
|
1645
|
-
rule: "REQUIRED"
|
|
1646
|
-
},
|
|
1647
|
-
birthDate: {
|
|
1648
|
-
rule: "REQUIRED"
|
|
1649
|
-
},
|
|
1650
|
-
phoneNumber: {
|
|
1651
|
-
rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
|
|
1652
|
-
},
|
|
1653
|
-
email: {
|
|
1654
|
-
rule: "contactsIfRequiredForRole"
|
|
1655
|
-
},
|
|
1656
|
-
jobTitle: {
|
|
1657
|
-
rule: "jobTitleIfRequiredForRole"
|
|
1658
|
-
},
|
|
1659
|
-
placeOfBirth: {
|
|
1660
|
-
rule: "isPlaceOfBirthRequired"
|
|
1661
|
-
},
|
|
1662
|
-
nationality: {
|
|
1663
|
-
rule: "nationalityIfRequiredForRole"
|
|
1664
|
-
},
|
|
1665
|
-
address: {
|
|
1666
|
-
rule: "addressIfRequiredForCountry"
|
|
1667
|
-
},
|
|
1668
|
-
otherAddressInformation: {
|
|
1669
|
-
rule: "otherAddressInfoIfRequiredForCountry"
|
|
1670
|
-
},
|
|
1671
|
-
country: {
|
|
1672
|
-
rule: "REQUIRED"
|
|
1673
|
-
},
|
|
1674
|
-
postalCode: {
|
|
1675
|
-
rule: "postalCodeIfRequiredForCountry"
|
|
1676
|
-
},
|
|
1677
|
-
city: {
|
|
1678
|
-
rule: "cityIfRequiredForCountry"
|
|
1679
|
-
},
|
|
1680
|
-
stateOrProvince: {
|
|
1681
|
-
rule: "stateOrProvinceIfRequiredForCountry"
|
|
1682
|
-
},
|
|
1683
|
-
proofOfResidency: {
|
|
1684
|
-
rule: "isProofOfResidencyRequired"
|
|
1685
|
-
},
|
|
1686
|
-
proofOfNationalId: {
|
|
1687
|
-
rule: "isProofOfNationalIdRequired"
|
|
1688
|
-
},
|
|
1689
|
-
relationship: {
|
|
1690
|
-
rule: "legalRepresentativeRelationshipRequired"
|
|
1691
|
-
},
|
|
1692
|
-
proofOfRelationship: {
|
|
1693
|
-
rule: "isProofOfRelationshipRequired"
|
|
1694
|
-
},
|
|
1695
|
-
nomineeDirector: {
|
|
1696
|
-
rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeDirectorRequiredForCountry"]
|
|
1697
|
-
},
|
|
1698
|
-
nomineeShareholder: {
|
|
1699
|
-
rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeShareHolderRequiredForCountry"]
|
|
1700
|
-
},
|
|
1701
|
-
idVerificationMethod: {
|
|
1702
|
-
rule: "isIdVerificationMethodRequired"
|
|
1703
|
-
},
|
|
1704
|
-
idDocument: {
|
|
1705
|
-
// (either from Onfido or previously-uploaded document)
|
|
1706
|
-
rule: "isUsingInstantVerificationOrHasExistingDocument"
|
|
1707
|
-
},
|
|
1708
|
-
idDocumentType: {
|
|
1709
|
-
// If the user has a missing ID error and chooses manual flow
|
|
1710
|
-
rule: "isManualIdFlowAndHasMissingData"
|
|
1711
|
-
},
|
|
1712
|
-
/**
|
|
1713
|
-
* Below fields only relevant if manual ID is needed
|
|
1714
|
-
* @see identityNumber
|
|
1715
|
-
* @see idDocRequired
|
|
1716
|
-
*/
|
|
1717
|
-
idFrontPage: {
|
|
1718
|
-
rule: "hasChosenIdType"
|
|
1719
|
-
},
|
|
1720
|
-
idBackPage: {
|
|
1721
|
-
rule: "backPageIfRequiredForIdType"
|
|
1722
|
-
},
|
|
1723
|
-
// Fields required for Guided decision makers flow
|
|
1724
|
-
isSignatory: {
|
|
1725
|
-
rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
|
|
1726
|
-
},
|
|
1727
|
-
isOwner: {
|
|
1728
|
-
rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
|
|
1729
|
-
},
|
|
1730
|
-
isControllingPerson: {
|
|
1731
|
-
rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
|
|
1732
|
-
},
|
|
1733
|
-
isDirector: {
|
|
1734
|
-
rules: [
|
|
1735
|
-
"isGuidedDecisionMakersFlowEnabled",
|
|
1736
|
-
"requiredIfDecisionMakerTask",
|
|
1737
|
-
"isDirectorRequiredForCountry"
|
|
1738
|
-
]
|
|
1739
|
-
},
|
|
1740
|
-
isNomineeDirector: {
|
|
1741
|
-
rules: [
|
|
1742
|
-
"isGuidedDecisionMakersFlowEnabled",
|
|
1743
|
-
"requiredIfDecisionMakerTask",
|
|
1744
|
-
"nomineeDirectorRequiredForCountry"
|
|
1745
|
-
]
|
|
1746
|
-
},
|
|
1747
|
-
isNomineeShareholder: {
|
|
1748
|
-
rules: [
|
|
1749
|
-
"isGuidedDecisionMakersFlowEnabled",
|
|
1750
|
-
"requiredIfDecisionMakerTask",
|
|
1751
|
-
"nomineeShareHolderRequiredForCountry"
|
|
1752
|
-
]
|
|
1753
|
-
},
|
|
1754
|
-
// Japanese name fields
|
|
1755
|
-
jaHaniFirstName: {
|
|
1756
|
-
rule: "japanSpecificField"
|
|
1757
|
-
},
|
|
1758
|
-
jaHaniLastName: {
|
|
1759
|
-
rule: "japanSpecificField"
|
|
1760
|
-
},
|
|
1761
|
-
jaKanaFirstName: {
|
|
1762
|
-
rule: "japanSpecificField"
|
|
1763
|
-
},
|
|
1764
|
-
jaKanaLastName: {
|
|
1765
|
-
rule: "japanSpecificField"
|
|
1766
|
-
},
|
|
1767
|
-
// Japanese address fields
|
|
1768
|
-
jaHaniAddress: {
|
|
1769
|
-
rule: "japanSpecificField"
|
|
1770
|
-
},
|
|
1771
|
-
jaHaniCity: {
|
|
1772
|
-
rule: "japanSpecificField"
|
|
1773
|
-
},
|
|
1774
|
-
jaHaniStateOrProvince: {
|
|
1775
|
-
rule: "japanSpecificField"
|
|
1776
|
-
},
|
|
1777
|
-
jaKanaCity: {
|
|
1778
|
-
rule: "japanSpecificField"
|
|
1779
|
-
},
|
|
1780
|
-
jaKanaStateOrProvince: {
|
|
1781
|
-
rule: "japanSpecificField"
|
|
1782
|
-
}
|
|
1783
|
-
};
|
|
1784
|
-
const identityNumber = {
|
|
1785
|
-
idNumber: {
|
|
1786
|
-
rule: "idNumberRules",
|
|
1787
|
-
obscured: true
|
|
1788
|
-
},
|
|
1789
|
-
idNumberExempt: {
|
|
1790
|
-
rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
|
|
1791
|
-
},
|
|
1792
|
-
idDocumentType: {
|
|
1793
|
-
// If the user chooses to not provide an ID number, we'll need an ID from them
|
|
1794
|
-
rule: "isManualIdFlowAndNotProvidingIdNumber"
|
|
1795
|
-
}
|
|
1796
|
-
};
|
|
1797
|
-
const additionalIdentityInfo = {
|
|
1798
|
-
typeOfIdentity: {
|
|
1799
|
-
rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
|
|
1800
|
-
},
|
|
1801
|
-
issuerState: {
|
|
1802
|
-
rule: "issuerStateRequired"
|
|
1803
|
-
},
|
|
1804
|
-
licenseCardNumber: {
|
|
1805
|
-
rule: "licenseCardNumberRules"
|
|
1806
|
-
},
|
|
1807
|
-
expiryDate: {
|
|
1808
|
-
rule: "expiryDateRequired"
|
|
1809
|
-
}
|
|
1810
|
-
};
|
|
1811
|
-
const idDocRequired = {
|
|
1812
|
-
// These fields are relevant for the manual ID flow only.
|
|
1813
|
-
// If we get `L1_IDDOC` then we know we need to require a manual ID upload when the manual flow is used
|
|
1814
|
-
idDocumentType: {
|
|
1815
|
-
rule: "isManualIdFlow"
|
|
1816
|
-
}
|
|
1817
|
-
};
|
|
1818
|
-
const nationality = {
|
|
1819
|
-
nationality: {
|
|
1820
|
-
rule: "REQUIRED"
|
|
1821
|
-
}
|
|
1822
|
-
};
|
|
1823
|
-
const phoneNumberBase = {
|
|
1824
|
-
phoneNumber: {
|
|
1825
|
-
rule: "contactsIfRequiredForRole"
|
|
1826
|
-
}
|
|
1827
|
-
};
|
|
1828
|
-
const taxInformationBase = {
|
|
1829
|
-
taxInformation: { rule: "countryUsesTaxId" }
|
|
1830
|
-
};
|
|
1831
|
-
const individualOnfidoFieldsPerScenario = {
|
|
1832
|
-
L0: drop("address", "birthDate").from(identityOnfidoBase),
|
|
1833
|
-
L1: identityOnfidoBase,
|
|
1834
|
-
L1_ID: {
|
|
1835
|
-
...identityOnfidoBase,
|
|
1836
|
-
...identityNumber,
|
|
1837
|
-
...additionalIdentityInfo
|
|
1838
|
-
},
|
|
1839
|
-
L1_IDO: {
|
|
1840
|
-
// TODO: change idNumber rule to optional once optional fields are implemented
|
|
1841
|
-
...identityOnfidoBase,
|
|
1842
|
-
...identityNumber,
|
|
1843
|
-
...additionalIdentityInfo
|
|
1844
|
-
},
|
|
1845
|
-
L1_NAT: {
|
|
1846
|
-
...identityOnfidoBase,
|
|
1847
|
-
...identityNumber,
|
|
1848
|
-
...additionalIdentityInfo,
|
|
1849
|
-
...nationality
|
|
1850
|
-
},
|
|
1851
|
-
L_TAXINFO: { ...identityOnfidoBase, ...taxInformationBase },
|
|
1852
|
-
L1_IDDOC: idDocRequired,
|
|
1853
|
-
L_PH: phoneNumberBase
|
|
1854
|
-
};
|
|
1855
|
-
const parseIndividualOnfidoScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, individualOnfidoFieldsPerScenario);
|
|
1856
|
-
const parseConfiguration = ({ scenarios }) => parseIndividualOnfidoScenarios(scenarios);
|
|
1857
|
-
const logger = createLogger();
|
|
1858
|
-
function IndividualOnfidoDropin({
|
|
1859
|
-
taskType = TaskTypes.INDIVIDUAL,
|
|
1860
|
-
parentLegalEntity,
|
|
1861
|
-
legalEntityResponse,
|
|
1862
|
-
handleHomeClick,
|
|
1863
|
-
isTargetLegalEntityType,
|
|
1864
|
-
country: parentCountry,
|
|
1865
|
-
problems: propProblems,
|
|
1866
|
-
onSubmit: externalOnSubmit,
|
|
1867
|
-
asModal = false,
|
|
1868
|
-
handleBackClick: externalBackClick,
|
|
1869
|
-
trustedFields,
|
|
1870
|
-
trustedFieldsProvider,
|
|
1871
|
-
trustedRoles
|
|
1872
|
-
}) {
|
|
1873
|
-
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
1874
|
-
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1875
|
-
const { i18n } = useI18nContext();
|
|
1876
|
-
const { t } = useTranslation("individual");
|
|
1877
|
-
const userEvents = useAnalyticsContext();
|
|
1878
|
-
const { showToast, clearToasts } = useToastContext();
|
|
1879
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
1880
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
1881
|
-
const queryClient = useQueryClient();
|
|
1882
|
-
const isGuidedDecisionMakersFlowEnabled = isExperimentEnabled("EnableGuidedDecisionMakersFlow") || isExperimentEnabled("DecisionMakersFlowOptimization_GuidedDecisionMakersFlow");
|
|
1883
|
-
const isGuidedDecisionMakersFlowDisabled = isExperimentEnabled("DisableGuidedDecisionMakersFlow");
|
|
1884
|
-
const defaultCountry = "NL";
|
|
1885
|
-
const { data: providerStatus } = useProviderStatus({
|
|
1886
|
-
providers: ["idDocument"],
|
|
1887
|
-
country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : defaultCountry
|
|
1888
|
-
});
|
|
1889
|
-
const isInstantVerificationEnabled = providerStatus?.statuses?.idDocument?.enabled ?? true;
|
|
1890
|
-
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
1891
|
-
const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
|
|
1892
|
-
const dataFromResponse = useMemo(() => {
|
|
1893
|
-
if (legalEntityResponse) {
|
|
1894
|
-
return mapLegalEntityToIndividualOnfidoSchema(
|
|
1895
|
-
legalEntityResponse,
|
|
1896
|
-
isTargetLegalEntityType,
|
|
1897
|
-
isRoleFieldNeeded,
|
|
1898
|
-
parentLegalEntity
|
|
1899
|
-
);
|
|
1900
|
-
}
|
|
1901
|
-
return {
|
|
1902
|
-
additionalPersonalDetails: {
|
|
1903
|
-
country: parentCountry
|
|
1904
|
-
}
|
|
1905
|
-
};
|
|
1906
|
-
}, [
|
|
1907
|
-
legalEntityResponse,
|
|
1908
|
-
parentCountry,
|
|
1909
|
-
isTargetLegalEntityType,
|
|
1910
|
-
isRoleFieldNeeded,
|
|
1911
|
-
parentLegalEntity
|
|
1912
|
-
]);
|
|
1913
|
-
const [matchingScenario, setMatchingScenario] = useState();
|
|
1914
|
-
const [validationErrors, setValidationErrors] = useState();
|
|
1915
|
-
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
1916
|
-
const [existingAttachments, setExistingAttachments] = useState();
|
|
1917
|
-
const [documents, setDocuments] = useState();
|
|
1918
|
-
const [country, setCountry] = useState(
|
|
1919
|
-
dataFromResponse?.additionalPersonalDetails?.country ?? parentCountry
|
|
1920
|
-
);
|
|
1921
|
-
const [derivedProps, setDerivedProps] = useState();
|
|
1922
|
-
const [nextHandler, setNextHandler] = useState();
|
|
1923
|
-
const problems = useMemo(
|
|
1924
|
-
() => ({
|
|
1925
|
-
...propProblems,
|
|
1926
|
-
validationErrors
|
|
1927
|
-
}),
|
|
1928
|
-
[propProblems, validationErrors]
|
|
1929
|
-
);
|
|
1930
|
-
const hasVerificationErrors = propProblems?.verificationErrors && Object.keys(propProblems.verificationErrors).length > 0;
|
|
1931
|
-
useEffect(() => {
|
|
1932
|
-
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1933
|
-
userEvents.addTaskEvent("Landed on page", {
|
|
1934
|
-
actionType: "start"
|
|
1935
|
-
});
|
|
1936
|
-
}, []);
|
|
1937
|
-
const individualFieldValidations = useCallback(
|
|
1938
|
-
(data2) => ({
|
|
1939
|
-
basicDetails: basicDetailsValidators({
|
|
1940
|
-
isExperimentEnabled
|
|
1941
|
-
}),
|
|
1942
|
-
additionalPersonalDetails: additionalPersonalDetailsValidators({
|
|
1943
|
-
country: data2?.additionalPersonalDetails?.country ?? country,
|
|
1944
|
-
isExperimentEnabled,
|
|
1945
|
-
isSettingEnabled,
|
|
1946
|
-
taskType,
|
|
1947
|
-
idNumberType: data2?.additionalPersonalDetails?.typeOfIdentity,
|
|
1948
|
-
idNumberExempt: data2?.additionalPersonalDetails?.idNumberExempt,
|
|
1949
|
-
idNumber: data2?.additionalPersonalDetails?.idNumber,
|
|
1950
|
-
existingIdNumber: dataFromResponse.additionalPersonalDetails?.idNumber,
|
|
1951
|
-
formVerificationErrors: problems?.verificationErrors?.additionalPersonalDetails,
|
|
1952
|
-
i18n,
|
|
1953
|
-
taxIdNumberType: data2?.additionalPersonalDetails?.taxInformation?.length ? data2?.additionalPersonalDetails?.taxInformation[0]?.type : void 0
|
|
1954
|
-
})
|
|
1955
|
-
}),
|
|
1956
|
-
[
|
|
1957
|
-
country,
|
|
1958
|
-
dataFromResponse.additionalPersonalDetails?.idNumber,
|
|
1959
|
-
i18n,
|
|
1960
|
-
isExperimentEnabled,
|
|
1961
|
-
isSettingEnabled,
|
|
1962
|
-
problems?.verificationErrors?.additionalPersonalDetails,
|
|
1963
|
-
taskType
|
|
1964
|
-
]
|
|
1965
|
-
);
|
|
1966
|
-
const validatePhoneNumber = useValidatePhoneNumberImperatively();
|
|
1967
|
-
const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
|
|
1968
|
-
const individualFieldAsyncValidations = useCallback(
|
|
1969
|
-
(data2) => ({
|
|
1970
|
-
basicDetails: {
|
|
1971
|
-
phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber
|
|
1972
|
-
},
|
|
1973
|
-
additionalPersonalDetails: {
|
|
1974
|
-
idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.additionalPersonalDetails).idNumber
|
|
1975
|
-
}
|
|
1976
|
-
}),
|
|
1977
|
-
[verifyIdNumber2, validatePhoneNumber]
|
|
1978
|
-
);
|
|
1979
|
-
const defaultData = useMemo(() => {
|
|
1980
|
-
if (!documents) return dataFromResponse;
|
|
1981
|
-
return {
|
|
1982
|
-
...dataFromResponse,
|
|
1983
|
-
...drop("idDocument").from(documents),
|
|
1984
|
-
idVerificationMethod: {
|
|
1985
|
-
idDocument: documents.idDocument,
|
|
1986
|
-
idVerificationMethod: "existingDocument"
|
|
1987
|
-
}
|
|
1988
|
-
};
|
|
1989
|
-
}, [documents, dataFromResponse]);
|
|
1990
|
-
const form = useMultiForm({
|
|
1991
|
-
requiredFields: derivedProps?.requiredFields,
|
|
1992
|
-
defaultData,
|
|
1993
|
-
rules: individualFieldValidations,
|
|
1994
|
-
asyncRules: individualFieldAsyncValidations,
|
|
1995
|
-
optionalFields: derivedProps?.optionalFields,
|
|
1996
|
-
obscuredFields: {
|
|
1997
|
-
/**takes care of scenario when the 4 digit provided is wrong based on verification errors and
|
|
1998
|
-
* we need to show validation error for defaultData which is already saved
|
|
1999
|
-
**/
|
|
2000
|
-
additionalPersonalDetails: check4DigitSsnFailed(
|
|
2001
|
-
problems?.verificationErrors?.additionalPersonalDetails
|
|
2002
|
-
) ? [] : ["idNumber"]
|
|
2003
|
-
}
|
|
2004
|
-
});
|
|
2005
|
-
const documentUtils = documentApiUtils({
|
|
2006
|
-
baseUrl: baseUrl.value,
|
|
2007
|
-
rootLegalEntityId: rootLegalEntityId.value
|
|
2008
|
-
});
|
|
2009
|
-
const { data, requiredFields } = form;
|
|
2010
|
-
useEffect(() => {
|
|
2011
|
-
setCountry(data?.additionalPersonalDetails?.country ?? parentCountry);
|
|
2012
|
-
}, [data?.additionalPersonalDetails?.country, parentCountry]);
|
|
2013
|
-
const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
|
|
2014
|
-
useEffect(() => {
|
|
2015
|
-
if (!scenarios) return;
|
|
2016
|
-
setHasMotionCaptureScenario(scenarios);
|
|
2017
|
-
setMatchingScenario(scenarios);
|
|
2018
|
-
}, [scenarios]);
|
|
2019
|
-
const { fieldConfigurations } = useScenarioConfiguration({
|
|
2020
|
-
parseConfiguration,
|
|
2021
|
-
legalEntityType: LegalEntityTypes.INDIVIDUAL,
|
|
2022
|
-
setLoadingStatus,
|
|
2023
|
-
country
|
|
2024
|
-
});
|
|
2025
|
-
const fieldsFromCustomRules = useMemo(
|
|
2026
|
-
() => individualOnfidoRules({
|
|
2027
|
-
matchingScenario,
|
|
2028
|
-
data,
|
|
2029
|
-
country: data?.additionalPersonalDetails?.country ?? country,
|
|
2030
|
-
taskType,
|
|
2031
|
-
isExperimentEnabled,
|
|
2032
|
-
rootLegalEntity: parentLegalEntity,
|
|
2033
|
-
problems
|
|
2034
|
-
}),
|
|
2035
|
-
[country, matchingScenario, data, isExperimentEnabled, parentLegalEntity, taskType, problems]
|
|
2036
|
-
);
|
|
2037
|
-
useEffect(() => {
|
|
2038
|
-
const derivedProps2 = getPropsFromConfigurations({
|
|
2039
|
-
scenarioConfiguration: fieldConfigurations,
|
|
2040
|
-
forms: individualOnfidoForms,
|
|
2041
|
-
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
2042
|
-
dataMissingErrors: problems?.missingData ?? [],
|
|
2043
|
-
fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
|
|
2044
|
-
legalEntityResponse,
|
|
2045
|
-
individualOnfidoApiKeyMapping,
|
|
2046
|
-
individualOnfidoDocumentMapping,
|
|
2047
|
-
[
|
|
2048
|
-
"additionalPersonalDetails.typeOfIdentity",
|
|
2049
|
-
"additionalPersonalDetails.idNumber",
|
|
2050
|
-
"additionalPersonalDetails.stateOrProvince",
|
|
2051
|
-
"additionalPersonalDetails.issuerState"
|
|
2052
|
-
]
|
|
2053
|
-
) : [],
|
|
2054
|
-
customRules: fieldsFromCustomRules,
|
|
2055
|
-
legalEntityType: legalEntityResponse?.type,
|
|
2056
|
-
legalEntityTrustedFields: [],
|
|
2057
|
-
remediationFieldAsOptional: true
|
|
2058
|
-
});
|
|
2059
|
-
const updatedDerivedProps = mandateIdVerificationForMotionCapture(
|
|
2060
|
-
showIndividualMotionCapture?.value,
|
|
2061
|
-
derivedProps2
|
|
2062
|
-
);
|
|
2063
|
-
if (updatedDerivedProps) {
|
|
2064
|
-
setDerivedProps(updatedDerivedProps);
|
|
2065
|
-
}
|
|
2066
|
-
}, [
|
|
2067
|
-
fieldConfigurations,
|
|
2068
|
-
legalEntityResponse,
|
|
2069
|
-
fieldsFromCustomRules,
|
|
2070
|
-
problems?.remediationActions,
|
|
2071
|
-
problems?.missingData
|
|
2072
|
-
]);
|
|
2073
|
-
useEffect(() => {
|
|
2074
|
-
if (!legalEntityResponse?.documentDetails?.length) return;
|
|
2075
|
-
documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
|
|
2076
|
-
setExistingAttachments(res[0].attachments);
|
|
2077
|
-
setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
|
|
2078
|
-
}).catch(() => {
|
|
2079
|
-
showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
|
|
2080
|
-
});
|
|
2081
|
-
}, []);
|
|
2082
|
-
const forms = useMemo(() => {
|
|
2083
|
-
const requiredForms = getRequiredForms(
|
|
2084
|
-
individualOnfidoForms,
|
|
2085
|
-
derivedProps?.requiredFields,
|
|
2086
|
-
derivedProps?.optionalFields
|
|
2087
|
-
);
|
|
2088
|
-
const filteredForms = !isInstantVerificationEnabled ? requiredForms.filter((f) => f.formId !== "idVerificationMethod") : requiredForms;
|
|
2089
|
-
return addValidityToForms(filteredForms, form.isValid, problems);
|
|
2090
|
-
}, [derivedProps, form.isValid, isInstantVerificationEnabled, problems]);
|
|
2091
|
-
const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
|
|
2092
|
-
const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
|
|
2093
|
-
const providerId = idVerificationProviderId.value;
|
|
2094
|
-
if (!providerId) throw Error("idVerificationProviderId not yet set");
|
|
2095
|
-
const data2 = {
|
|
2096
|
-
providerId,
|
|
2097
|
-
legalEntityId,
|
|
2098
|
-
captureMetadata: onfidoResponse
|
|
2099
|
-
};
|
|
2100
|
-
await getIdVerificationStartCheck(data2);
|
|
2101
|
-
};
|
|
2102
|
-
const roleTypes = isRoleFieldNeeded && parentLegalEntity ? getAllowedDecisionMakerRoles(parentLegalEntity, taskType, matchingScenario) : [];
|
|
2103
|
-
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
2104
|
-
const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
|
|
2105
|
-
const submitLegalEntity = async ({
|
|
2106
|
-
dataSubmitted,
|
|
2107
|
-
legalEntity,
|
|
2108
|
-
idDocumentType
|
|
2109
|
-
}) => {
|
|
2110
|
-
let updatedLegalEntity;
|
|
2111
|
-
const existingLeId = legalEntityResponse?.id;
|
|
2112
|
-
if (!existingLeId) {
|
|
2113
|
-
updatedLegalEntity = await createLegalEntity(legalEntity);
|
|
2114
|
-
userEvents.addTaskEvent("Success", {
|
|
2115
|
-
actionType: "submit",
|
|
2116
|
-
countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
|
|
2117
|
-
roles: dataSubmitted.basicDetails?.role
|
|
2118
|
-
});
|
|
2119
|
-
} else {
|
|
2120
|
-
updatedLegalEntity = await updateLegalEntity({
|
|
2121
|
-
...drop("type").from(legalEntity),
|
|
2122
|
-
id: existingLeId
|
|
2123
|
-
});
|
|
2124
|
-
userEvents.addTaskEvent("Success", {
|
|
2125
|
-
actionType: "submit",
|
|
2126
|
-
countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
|
|
2127
|
-
documentType: idDocumentType
|
|
2128
|
-
});
|
|
2129
|
-
}
|
|
2130
|
-
return updatedLegalEntity;
|
|
2131
|
-
};
|
|
2132
|
-
const submitDocuments = async ({
|
|
2133
|
-
legalEntity,
|
|
2134
|
-
dataSubmitted
|
|
2135
|
-
}) => {
|
|
2136
|
-
const idDocument2 = dataSubmitted.idVerificationMethod?.idDocument;
|
|
2137
|
-
if (idDocument2?.instantIdVerificationData) {
|
|
2138
|
-
if (providerStatus?.statuses?.idDocument?.enabled === false) {
|
|
2139
|
-
throw new Error("Provider unexpectedly disabled instant verification flow");
|
|
2140
|
-
}
|
|
2141
|
-
await handleInstantIdVerificationStartCheck(
|
|
2142
|
-
idDocument2.instantIdVerificationData,
|
|
2143
|
-
legalEntity.id
|
|
2144
|
-
);
|
|
2145
|
-
} else {
|
|
2146
|
-
const formattedDocuments = await mapIndividualDocumentToApiDocument(
|
|
2147
|
-
dataSubmitted,
|
|
2148
|
-
legalEntity.id
|
|
2149
|
-
);
|
|
2150
|
-
if (!formattedDocuments || formattedDocuments?.length === 0) {
|
|
2151
|
-
if (existingAttachments?.length)
|
|
2152
|
-
logger.log(
|
|
2153
|
-
"User has already uploaded documents and is not changing them, nothing needs to be done"
|
|
2154
|
-
);
|
|
2155
|
-
else
|
|
2156
|
-
logger.error(
|
|
2157
|
-
`formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
|
|
2158
|
-
);
|
|
2159
|
-
return;
|
|
2160
|
-
}
|
|
2161
|
-
formattedDocuments[0].attachments = mergeAttachments(
|
|
2162
|
-
existingAttachments ?? [],
|
|
2163
|
-
formattedDocuments[0]?.attachments ?? []
|
|
2164
|
-
).filter((attachment) => attachment.content);
|
|
2165
|
-
const uploadedDocuments = await documentUtils.uploadDocuments(
|
|
2166
|
-
formattedDocuments,
|
|
2167
|
-
legalEntity.id
|
|
2168
|
-
);
|
|
2169
|
-
uploadedDocuments?.forEach((doc) => {
|
|
2170
|
-
userEvents.addTaskEvent("Success", {
|
|
2171
|
-
actionType: "upload",
|
|
2172
|
-
documentType: doc.type,
|
|
2173
|
-
fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
|
|
2174
|
-
});
|
|
2175
|
-
});
|
|
2176
|
-
}
|
|
2177
|
-
};
|
|
2178
|
-
const hasRolesChanged = (legalEntityId, existingEntityAssociations, newRoles) => {
|
|
2179
|
-
const existingRoles = existingEntityAssociations?.filter((association) => association.legalEntityId === legalEntityId).map(({ type }) => type);
|
|
2180
|
-
return !doArraysMatch(existingRoles, newRoles);
|
|
2181
|
-
};
|
|
2182
|
-
const attachAssociationToParentLegalEntity = async ({
|
|
2183
|
-
legalEntity,
|
|
2184
|
-
parentLE,
|
|
2185
|
-
dataSubmitted
|
|
2186
|
-
}) => {
|
|
2187
|
-
const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.basicDetails?.role : null;
|
|
2188
|
-
const existingEntityAssociations = getOwnEntityAssociations(parentLE);
|
|
2189
|
-
if (newRoles && (hasRolesChanged(legalEntity?.id, existingEntityAssociations, newRoles) || dataFromResponse.basicDetails?.jobTitle !== dataSubmitted?.basicDetails?.jobTitle || hasNomineesChanged(dataFromResponse.basicDetails, dataSubmitted.basicDetails))) {
|
|
2190
|
-
const updatedParentLegalEntity = {
|
|
2191
|
-
entityAssociations: [
|
|
2192
|
-
...newRoles.map((role) => ({
|
|
2193
|
-
type: role,
|
|
2194
|
-
legalEntityId: legalEntity.id,
|
|
2195
|
-
...DECISION_MAKER_TYPES_WITH_JOBTITLE$1.some((type) => type === role) && {
|
|
2196
|
-
jobTitle: dataSubmitted?.basicDetails?.jobTitle
|
|
2197
|
-
}
|
|
2198
|
-
})) || [],
|
|
2199
|
-
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
|
|
2200
|
-
]
|
|
2201
|
-
};
|
|
2202
|
-
const nomineeDataSource = !isGuidedDecisionMakersFlowDisabled && isGuidedDecisionMakersFlowEnabled ? dataSubmitted?.uboQuestionnaire : dataSubmitted.basicDetails;
|
|
2203
|
-
if (nomineeDataSource && updatedParentLegalEntity.entityAssociations) {
|
|
2204
|
-
updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
|
|
2205
|
-
(ea) => attachNomineeToRole(ea, country, nomineeDataSource)
|
|
2206
|
-
);
|
|
2207
|
-
}
|
|
2208
|
-
await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
|
|
2209
|
-
}
|
|
2210
|
-
};
|
|
2211
|
-
const onSubmit = async () => {
|
|
2212
|
-
setLoadingStatus("loading");
|
|
2213
|
-
const dataSubmitted = omitObscuredFieldsIfUnchanged(
|
|
2214
|
-
individualOnfidoObscuredFields,
|
|
2215
|
-
data,
|
|
2216
|
-
dataFromResponse
|
|
2217
|
-
);
|
|
2218
|
-
if (!dataSubmitted) {
|
|
2219
|
-
return;
|
|
2220
|
-
}
|
|
2221
|
-
try {
|
|
2222
|
-
const legalEntity = mapIndividualOnfidoSchemaToLegalEntity(
|
|
2223
|
-
dataSubmitted,
|
|
2224
|
-
isExperimentEnabled,
|
|
2225
|
-
matchingScenario
|
|
2226
|
-
);
|
|
2227
|
-
const idDocumentType = idDocumentTypeOptions.find(
|
|
2228
|
-
({ id }) => dataSubmitted?.idVerificationMethod?.idDocument?.idDocumentType === id
|
|
2229
|
-
)?.id;
|
|
2230
|
-
legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
|
|
2231
|
-
taskType,
|
|
2232
|
-
legalEntityResponse,
|
|
2233
|
-
accountHolder || void 0
|
|
2234
|
-
);
|
|
2235
|
-
const submittedLegalEntity = await submitLegalEntity({
|
|
2236
|
-
dataSubmitted,
|
|
2237
|
-
legalEntity,
|
|
2238
|
-
idDocumentType
|
|
2239
|
-
});
|
|
2240
|
-
setAccountHolder(accountHolder);
|
|
2241
|
-
if (dataSubmitted.idVerificationMethod && dataSubmitted.idVerificationMethod?.idVerificationMethod !== "existingDocument" || hasVerificationErrors) {
|
|
2242
|
-
const isBafinSignatory = dataSubmitted?.basicDetails?.role?.includes(DecisionMakerTypes.SIGNATORY) && matchingScenario?.includes(Scenarios.L_BAFIN);
|
|
2243
|
-
if (!isBafinSignatory) {
|
|
2244
|
-
await submitDocuments({ legalEntity: submittedLegalEntity, dataSubmitted });
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
if (parentLegalEntity) {
|
|
2248
|
-
await attachAssociationToParentLegalEntity({
|
|
2249
|
-
legalEntity: submittedLegalEntity,
|
|
2250
|
-
parentLE: parentLegalEntity,
|
|
2251
|
-
dataSubmitted
|
|
2252
|
-
});
|
|
2253
|
-
queryClient.invalidateQueries({
|
|
2254
|
-
queryKey: ["legalEntity", parentLegalEntity.id],
|
|
2255
|
-
refetchType: "all"
|
|
2256
|
-
});
|
|
2257
|
-
}
|
|
2258
|
-
idNowModalChildEntityId.value = submittedLegalEntity;
|
|
2259
|
-
setLoadingStatus("success");
|
|
2260
|
-
clearToasts();
|
|
2261
|
-
externalOnSubmit?.(dataSubmitted, matchingScenario);
|
|
2262
|
-
} catch (e) {
|
|
2263
|
-
const eventsAdditionalData = {};
|
|
2264
|
-
logger.error("Failed to update individual", e);
|
|
2265
|
-
if (isValidationError(e)) {
|
|
2266
|
-
const getErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
|
|
2267
|
-
if (getErrors && !Object.keys(getErrors).length) {
|
|
2268
|
-
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
2269
|
-
eventsAdditionalData.unmappedErrorNames = e.invalidFields?.map((field) => field.name).filter(Boolean);
|
|
2270
|
-
} else {
|
|
2271
|
-
setValidationErrors(getErrors);
|
|
2272
|
-
}
|
|
2273
|
-
} else if (isMaintenanceModeError(e)) {
|
|
2274
|
-
showToast({
|
|
2275
|
-
label: i18n.get("maintenanceModeMessage"),
|
|
2276
|
-
variant: "error",
|
|
2277
|
-
duration: "indefinite"
|
|
2278
|
-
});
|
|
2279
|
-
} else {
|
|
2280
|
-
showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
|
|
2281
|
-
}
|
|
2282
|
-
setLoadingStatus("success");
|
|
2283
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
2284
|
-
actionType: "submit",
|
|
2285
|
-
additionalData: eventsAdditionalData,
|
|
2286
|
-
returnType: e?.errorCode,
|
|
2287
|
-
returnValue: e?.title || "backend"
|
|
2288
|
-
});
|
|
2289
|
-
}
|
|
2290
|
-
};
|
|
2291
|
-
const datasetUtils = datasetUtilities(i18n.locale);
|
|
2292
|
-
const formatIdDocument = (idDocument2) => {
|
|
2293
|
-
if (!idDocument2) return void 0;
|
|
2294
|
-
const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
|
|
2295
|
-
(document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
|
|
2296
|
-
) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
|
|
2297
|
-
if (!documentType) return void 0;
|
|
2298
|
-
const frontPage = idDocument2.idFrontPage?.[0];
|
|
2299
|
-
const backPage = idDocument2.idBackPage?.[0];
|
|
2300
|
-
if (!frontPage) return void 0;
|
|
2301
|
-
return {
|
|
2302
|
-
documentType: i18n.get(documentType.name),
|
|
2303
|
-
...backPage && documentType.hasBackPage ? {
|
|
2304
|
-
frontPage: frontPage.name,
|
|
2305
|
-
backPage: backPage.name
|
|
2306
|
-
} : {
|
|
2307
|
-
fileName: frontPage.name
|
|
2308
|
-
}
|
|
2309
|
-
};
|
|
2310
|
-
};
|
|
2311
|
-
const formatFileSummaryData = ({
|
|
2312
|
-
idVerificationMethod,
|
|
2313
|
-
manualIdUpload,
|
|
2314
|
-
proofOfNationalId,
|
|
2315
|
-
proofOfResidency,
|
|
2316
|
-
proofOfRelationship
|
|
2317
|
-
}) => {
|
|
2318
|
-
const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
|
|
2319
|
-
const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
|
|
2320
|
-
const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
|
|
2321
|
-
const idDocument2 = idVerificationMethod?.idVerificationMethod === "manualVerification" ? manualIdUpload : idVerificationMethod?.idDocument;
|
|
2322
|
-
return {
|
|
2323
|
-
...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
|
|
2324
|
-
idDocument: formatIdDocument(idDocument2)
|
|
2325
|
-
},
|
|
2326
|
-
...proofOfNationalIdFile && {
|
|
2327
|
-
proofOfNationalId: {
|
|
2328
|
-
fileName: proofOfNationalIdFile.name
|
|
2329
|
-
}
|
|
2330
|
-
},
|
|
2331
|
-
...proofOfResidencyFile && {
|
|
2332
|
-
proofOfResidency: {
|
|
2333
|
-
fileName: proofOfResidencyFile.name
|
|
2334
|
-
}
|
|
2335
|
-
},
|
|
2336
|
-
...proofOfRelationshipFile && {
|
|
2337
|
-
proofOfRelationship: {
|
|
2338
|
-
fileName: proofOfRelationshipFile.name
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
};
|
|
2342
|
-
};
|
|
2343
|
-
const isManualVerificationOrExistingDoc = (idVerificationMethod) => idVerificationMethod === "manualVerification" || idVerificationMethod === "existingDocument";
|
|
2344
|
-
const formatDataForSummary = () => {
|
|
2345
|
-
let summaryData = cloneObject(data);
|
|
2346
|
-
if (summaryData?.basicDetails?.phoneNumber) {
|
|
2347
|
-
summaryData.basicDetails.phoneNumber = summaryData.basicDetails.phoneNumber.number;
|
|
2348
|
-
}
|
|
2349
|
-
if (summaryData.additionalPersonalDetails?.nationality) {
|
|
2350
|
-
summaryData.additionalPersonalDetails.nationality = datasetUtils.getCountryName(
|
|
2351
|
-
summaryData.additionalPersonalDetails.nationality
|
|
2352
|
-
);
|
|
2353
|
-
}
|
|
2354
|
-
if (data.additionalPersonalDetails) {
|
|
2355
|
-
if (country === CountryCodes.Japan) {
|
|
2356
|
-
summaryData.additionalPersonalDetails = {
|
|
2357
|
-
...drop(...JP_ADDRESS_REQUIRED_FIELDS).from(summaryData.additionalPersonalDetails),
|
|
2358
|
-
...mapJpAddressSummary(data.additionalPersonalDetails, datasetUtils)
|
|
2359
|
-
};
|
|
2360
|
-
} else {
|
|
2361
|
-
summaryData.additionalPersonalDetails = {
|
|
2362
|
-
...summaryData.additionalPersonalDetails,
|
|
2363
|
-
...mapAddressLabels(data.additionalPersonalDetails, datasetUtils)
|
|
2364
|
-
};
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
if (summaryData.basicDetails?.accountHolder) {
|
|
2368
|
-
summaryData.basicDetails.accountHolder = i18n.get(summaryData.basicDetails.accountHolder);
|
|
2369
|
-
}
|
|
2370
|
-
if (summaryData.additionalPersonalDetails?.birthDate) {
|
|
2371
|
-
summaryData.additionalPersonalDetails.birthDate = localizeDateString(
|
|
2372
|
-
summaryData.additionalPersonalDetails.birthDate,
|
|
2373
|
-
i18n.locale
|
|
2374
|
-
);
|
|
2375
|
-
}
|
|
2376
|
-
if (isManualVerificationOrExistingDoc(summaryData.idVerificationMethod?.idVerificationMethod) || summaryData.proofOfResidency) {
|
|
2377
|
-
const fileSummaryData = formatFileSummaryData(data);
|
|
2378
|
-
summaryData = { ...summaryData, ...fileSummaryData };
|
|
2379
|
-
summaryData.manualIdUpload = { ...summaryData.idDocument };
|
|
2380
|
-
summaryData.idVerificationMethod.idDocument = { ...summaryData.idDocument };
|
|
2381
|
-
}
|
|
2382
|
-
if (summaryData.additionalPersonalDetails?.taxInformation) {
|
|
2383
|
-
const taxInformation = summaryData.additionalPersonalDetails.taxInformation.find(
|
|
2384
|
-
(taxId) => taxId.country === data.additionalPersonalDetails?.nationality
|
|
2385
|
-
);
|
|
2386
|
-
if (taxInformation) {
|
|
2387
|
-
delete summaryData.additionalPersonalDetails.taxInformation;
|
|
2388
|
-
summaryData.additionalPersonalDetails[taxInformation.type] = taxInformation.number;
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2391
|
-
if (summaryData?.signatoryQuestionnaire) {
|
|
2392
|
-
summaryData.signatoryQuestionnaire = data?.signatoryQuestionnaire?.isSignatory === GuidanceQuestionValues.YES ? [i18n.get("signatorySummaryLabel")] : [];
|
|
2393
|
-
}
|
|
2394
|
-
if (summaryData?.uboQuestionnaire) {
|
|
2395
|
-
const roleFieldToLabelMap = {
|
|
2396
|
-
isOwner: "ownerSummaryLabel",
|
|
2397
|
-
isControllingPerson: "controllingPersonSummaryLabel",
|
|
2398
|
-
isDirector: "directorSummaryLabel"
|
|
2399
|
-
};
|
|
2400
|
-
summaryData.uboQuestionnaire = Object.keys(roleFieldToLabelMap).flatMap(
|
|
2401
|
-
(field) => data?.uboQuestionnaire?.[field] === GuidanceQuestionValues.YES ? [t(($) => $[roleFieldToLabelMap[field]])] : []
|
|
2402
|
-
);
|
|
2403
|
-
}
|
|
2404
|
-
return summaryData;
|
|
2405
|
-
};
|
|
2406
|
-
const omittedKeysForSummary = [
|
|
2407
|
-
...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
|
|
2408
|
-
...data?.additionalPersonalDetails?.idNumberExempt ? ["idNumber"] : [],
|
|
2409
|
-
...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod", "modificationDate"] : []
|
|
2410
|
-
];
|
|
2411
|
-
const isUploadEmpty = !data?.manualIdUpload || Object.keys(data?.manualIdUpload).length === 0;
|
|
2412
|
-
const omittedFormsForSummary = [
|
|
2413
|
-
// 1. Omit idDocument if instant OR (manual/existing AND upload is empty)
|
|
2414
|
-
...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty ? ["idDocument"] : [],
|
|
2415
|
-
// 2. Omit idVerificationMethod if manual or existing
|
|
2416
|
-
...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod"] : []
|
|
2417
|
-
];
|
|
2418
|
-
const customLabelsForSummary = {
|
|
2419
|
-
idVerificationMethod: data?.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "idVerificationMethod" : "idDocument"
|
|
2420
|
-
};
|
|
2421
|
-
const {
|
|
2422
|
-
handleNextClick,
|
|
2423
|
-
handleBackClick,
|
|
2424
|
-
activeForm,
|
|
2425
|
-
shouldValidate,
|
|
2426
|
-
gotoFormByFormIndex,
|
|
2427
|
-
steps
|
|
2428
|
-
} = useFormComposer({
|
|
2429
|
-
problems,
|
|
2430
|
-
externalBackClick,
|
|
2431
|
-
forms,
|
|
2432
|
-
onSubmit,
|
|
2433
|
-
triggerValidation: form.triggerValidation
|
|
2434
|
-
// TODO: figure out type of nested keys
|
|
2435
|
-
});
|
|
2436
|
-
const disableNextButton = computed(() => {
|
|
2437
|
-
const isVerificationMethod = activeForm?.formId === "idVerificationMethod";
|
|
2438
|
-
return isVerificationMethod && !activeForm?.isValid || isNextStepDisabled.value;
|
|
2439
|
-
});
|
|
2440
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2441
|
-
/* @__PURE__ */ jsx(Show, { when: shouldShowIdNowModal, children: /* @__PURE__ */ jsx(IdNowVerificationModal, { handleFinish: handleHomeClick }) }),
|
|
2442
|
-
/* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
|
|
2443
|
-
FormFlow,
|
|
2444
|
-
{
|
|
2445
|
-
summary: {
|
|
2446
|
-
data: formatDataForSummary(),
|
|
2447
|
-
omitted: {
|
|
2448
|
-
keys: omittedKeysForSummary,
|
|
2449
|
-
forms: omittedFormsForSummary
|
|
2450
|
-
},
|
|
2451
|
-
problems,
|
|
2452
|
-
labels: customLabelsForSummary
|
|
2453
|
-
},
|
|
2454
|
-
asModal,
|
|
2455
|
-
currentStep: steps.current,
|
|
2456
|
-
disableNextButton: disableNextButton.value,
|
|
2457
|
-
forms,
|
|
2458
|
-
gotoFormByFormIndex,
|
|
2459
|
-
handleBackClick,
|
|
2460
|
-
handleCancelClick: handleHomeClick,
|
|
2461
|
-
handleNextClick: nextHandler || handleNextClick,
|
|
2462
|
-
loadingStatus,
|
|
2463
|
-
totalSteps: steps.total,
|
|
2464
|
-
children: /* @__PURE__ */ jsx(
|
|
2465
|
-
IndividualOnfido,
|
|
2466
|
-
{
|
|
2467
|
-
...derivedProps,
|
|
2468
|
-
requiredFields,
|
|
2469
|
-
data,
|
|
2470
|
-
defaultCountry: country,
|
|
2471
|
-
activeForm,
|
|
2472
|
-
forms,
|
|
2473
|
-
scenarios,
|
|
2474
|
-
taskType,
|
|
2475
|
-
problems,
|
|
2476
|
-
onNext: handleNextClick,
|
|
2477
|
-
onBack: handleBackClick,
|
|
2478
|
-
legalEntityId: legalEntityResponse?.id,
|
|
2479
|
-
allowedRoles: roleTypes,
|
|
2480
|
-
shouldValidate,
|
|
2481
|
-
accountHolder,
|
|
2482
|
-
parentLegalEntity,
|
|
2483
|
-
trustedFields,
|
|
2484
|
-
trustedFieldsProvider,
|
|
2485
|
-
trustedRoles,
|
|
2486
|
-
setNextHandler,
|
|
2487
|
-
handleHomeClick
|
|
2488
|
-
}
|
|
2489
|
-
)
|
|
2490
|
-
}
|
|
2491
|
-
) })
|
|
2492
|
-
] });
|
|
2493
|
-
}
|
|
2494
|
-
export {
|
|
2495
|
-
IndividualOnfidoDropin as I,
|
|
2496
|
-
IndividualDropin as a
|
|
2497
|
-
};
|