@adyen/kyc-components 4.0.0-compact.3 → 4.0.0-compact.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/4-people-BtDi7O9A.js +24 -0
- package/dist/AcceptTermsOfServiceComponent-BFqDontt.js +650 -0
- package/dist/Accordion-B2vSnESS.js +88 -0
- package/dist/AccountSetupRejected-f8rcBzZj.js +26 -0
- package/dist/ActionBar-CijauUSe.js +31 -0
- package/dist/Address-Bj7zJ6yZ.js +1112 -0
- package/dist/Alert-CFmX9yNV.js +169 -0
- package/dist/Avatar-DWU7t_0U.js +60 -0
- package/dist/BusinessFinancingComponent-_DvatBRp.js +55 -0
- package/dist/BusinessFinancingDropin-BuATaIOz.js +2235 -0
- package/dist/BusinessFinancingPage-Bpu78Ynn.js +43 -0
- package/dist/BusinessTypeSelectionPage-gsT7g7u8.js +446 -0
- package/dist/Card-OQuFzmxm.js +90 -0
- package/dist/Checkbox-5Sc5pzsh.js +74 -0
- package/dist/Confirm-C0J_JwMM.js +64 -0
- package/dist/ConstitutionalDocument-Bw5T0g5Q.js +2361 -0
- package/dist/ContactDetails-CXTim9KR.js +396 -0
- package/dist/ContextGuidance-074d6FWy.js +34 -0
- package/dist/ContractViewer-DcQHIGMU.js +935 -0
- package/dist/CountryField-DxZlK1rV.js +66 -0
- package/dist/CreateIndividualComponent-BppUrKMC.js +65 -0
- package/dist/CreateTransferInstrumentComponent-Cl2NOJb6.js +56 -0
- package/dist/Currency-CIgj9KwH.js +238 -0
- package/dist/CustomerSupport-UenL9SqQ.js +156 -0
- package/dist/DebugModal-KXKodU9u.js +416 -0
- package/dist/DecisionMakerDetailsPage-Xwe1qYtH.js +104 -0
- package/dist/DecisionMakers-CJDodZSl.js +858 -0
- package/dist/Dropzone-kpihpy7N.js +224 -0
- package/dist/EmbeddedStatus-BJjPDUeS.js +97 -0
- package/dist/EndStateLayout-Cx1NUGVq.js +71 -0
- package/dist/EntityAssociation-BtQeHZOq.js +178 -0
- package/dist/EntityGuidanceStatus-DyMVy3R4.js +106 -0
- package/dist/ErrorPanel-CAALFKmE.js +194 -0
- package/dist/Field-Bs7wGDqk.js +141 -0
- package/dist/FormNavigation-BtSvWPRY.js +144 -0
- package/dist/FormWrapper-B3N3YosC.js +135 -0
- package/dist/Header-vslG1ugE.js +83 -0
- package/dist/Image-CAucF9wz.js +27 -0
- package/dist/Individual.rules-CP2tzjmO.js +383 -0
- package/dist/IndividualDropin-xfXkDkrM.js +5168 -0
- package/dist/InputDate-CLxqciJA.js +43 -0
- package/dist/InputGroup-WBfGDV5F.js +32 -0
- package/dist/InputText-BdCbTzL9.js +134 -0
- package/dist/Introduction-BRWdnVv5.js +256 -0
- package/dist/JpAddress-BSEenMj0.js +329 -0
- package/dist/LandingLayout-kl7TkBGx.js +60 -0
- package/dist/LegalCompanyNameField-DzAxAnD9.js +138 -0
- package/dist/LegalRepresentativeDetailsPage--yY_D66i.js +55 -0
- package/dist/Link-CXYU8cLY.js +35 -0
- package/dist/List-BAzyC6sw.js +83 -0
- package/dist/ListItem-HD5_HiQ2.js +69 -0
- package/dist/LoaderWrapper-C2PvjjQc.js +42 -0
- package/dist/ManageIndividualComponent-BGaAbJjj.js +46 -0
- package/dist/ManageTermsOfServiceComponent-DFjaajE4.js +52 -0
- package/dist/ManageTransferInstrumentComponent-Dndkwh_d.js +292 -0
- package/dist/MaskedInput-BSW18fxr.js +811 -0
- package/dist/MaybeModal-xIjl3I31.js +36 -0
- package/dist/Modal-CZ-HuGUO.js +147 -0
- package/dist/Name-D6EhveoK.js +81 -0
- package/dist/OnboardingDropinComponent-CHtcVTHh.js +2672 -0
- package/dist/PayoutDetailsDropin-C2pNMAZS.js +4978 -0
- package/dist/Radio-BMtxBpnn.js +39 -0
- package/dist/RadioGroup-CxcIXYzs.js +100 -0
- package/dist/RadioGroupCard-Y214QWmQ.js +152 -0
- package/dist/Review-B2NCN4h_.js +84 -0
- package/dist/RootBusinessDetailsPage-hr5fLCIH.js +50 -0
- package/dist/RootBusinessLinesPage-DSna9haW.js +1553 -0
- package/dist/RootIndividualDetailsPage-BItguz9n.js +62 -0
- package/dist/Select-DaCJsYNl.js +868 -0
- package/dist/SignPCIComponent-C2YjBxQM.js +307 -0
- package/dist/SingpassSelection-B3ozCH9I.js +132 -0
- package/dist/SoleProprietorshipPage-DIzzhgjr.js +50 -0
- package/dist/SourceOfFundsPage-C3kXyE7G.js +2162 -0
- package/dist/Spacer-BK3jDget.js +18 -0
- package/dist/StepProgressIndicator-BSGlNU3K.js +78 -0
- package/dist/StoreProvider-99-ewU62.js +4793 -0
- package/dist/StructuredList-CVMZBzwq.js +61 -0
- package/dist/Summary-D0GcSMNn.js +220 -0
- package/dist/TaskVerificationStatus-DZIw2ztV.js +129 -0
- package/dist/TaxInformationField-BxQvx1zK.js +3741 -0
- package/dist/TaxReportingDropin-BqvAQH2c.js +503 -0
- package/dist/TextArea-BjsWgkR-.js +103 -0
- package/dist/TileGroup-C-5-VREz.js +203 -0
- package/dist/TrustDetailsPage-YROGiuFJ.js +2172 -0
- package/dist/TrustMemberCompanyPage-Z2EuqPEI.js +68 -0
- package/dist/TrustMemberIndividualPage-DmNp3D89.js +64 -0
- package/dist/TrustMemberRoleAndTypePage-BEOtdItr.js +1087 -0
- package/dist/TrustMembersOverview-GybHMIEU.js +439 -0
- package/dist/UnincorporatedPartnershipIndividualPage-BCYxSTlv.js +63 -0
- package/dist/UnincorporatedPartnershipMemberCompanyPage-Buez4OHl.js +71 -0
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-Cfpe0BuU.js +292 -0
- package/dist/UnincorporatedPartnershipMembersOverview-B3Vi088r.js +173 -0
- package/dist/VerificationErrorAlert-C6_ewC7c.js +60 -0
- package/dist/ViewVerificationStatusComponent-DpA4jlct.js +181 -0
- package/dist/accountHolderUtils-Btu9mMnM.js +66 -0
- package/dist/adyen-business-financing.js +8 -4
- 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-CIGv_BK8.js +80 -0
- package/dist/bag-BXVWLrwo.js +14 -0
- package/dist/bank-1GvaHPAZ.js +14 -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-DTt6he7v.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/currency-CrdnaaDu.js +35 -0
- package/dist/da-DK-B3Pg-MWO.js +13 -0
- package/dist/da-DK-CGWvmdkq.js +38 -0
- package/dist/da-DK-Cd5IQPv3.js +75 -0
- package/dist/da-DK-DQ4ZYSea.js +65 -0
- package/dist/da-DK-DzcTI92X.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-CWEW2yqg.js +63 -0
- package/dist/de-DE-CkbOZ6S_.js +65 -0
- package/dist/de-DE-DHDJhahG.js +38 -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--st1YpV6.js +200 -0
- package/dist/edit-1-DAqtnOIx.js +14 -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-DYP6rAvA.js +75 -0
- package/dist/en-US-DoiQhi0j.js +38 -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/external-link-Cg6pJaSJ.js +14 -0
- package/dist/fi-FI-57-xkioo.js +38 -0
- package/dist/fi-FI-BJLU1JHw.js +75 -0
- package/dist/fi-FI-BUixKfXH.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-C_sWWLS3.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-DPehHVb6.js +13 -0
- package/dist/fr-FR-VoxPkXSc.js +63 -0
- package/dist/funds-in-CInoUdmG.js +21 -0
- package/dist/getName-CnZDw7kV.js +41 -0
- package/dist/getProblemsForEntity-D8qEVVOM.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/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-DqeucjDU.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-CUuXL9Na.js +23 -0
- package/dist/isNewEntity-7Vw_eQBr.js +13 -0
- package/dist/it-IT-5a7NHVFo.js +65 -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-B3wVYIJU.js +151 -0
- package/dist/ja-JP-Bc4U0S8-.js +75 -0
- package/dist/ja-JP-BoxeBgOv.js +32 -0
- package/dist/ja-JP-BqluCflj.js +63 -0
- package/dist/ja-JP-Bv3ru9Xq.js +125 -0
- package/dist/ja-JP-CbgaW99b.js +54 -0
- package/dist/ja-JP-CceCDXLB.js +55 -0
- package/dist/ja-JP-CvNJvxkQ.js +218 -0
- package/dist/ja-JP-DL0IjTzn.js +13 -0
- package/dist/ja-JP-DSvZhFNY.js +65 -0
- package/dist/ja-JP-FWHXsXlW.js +24 -0
- package/dist/ja-JP-bz7ekGnF.js +27 -0
- package/dist/ja-JP-g6VOUGXZ.js +136 -0
- package/dist/ja-JP-vv3-YsHU.js +38 -0
- package/dist/japanSupportUtils-CGWcXGP2.js +16 -0
- package/dist/jpAddressSchema-DEOyz9Yo.js +26 -0
- package/dist/localizeDateString-D6tFShQu.js +27 -0
- package/dist/location-itJfxrDQ.js +17 -0
- package/dist/mail-VHTlAusn.js +14 -0
- package/dist/manual-verification-BO8zgAYT.js +41 -0
- package/dist/mapExistingFile-BM9f5AeG.js +230 -0
- package/dist/mapJpAddressSchemaToAddressLocalizations-Cu4hdrYE.js +162 -0
- package/dist/mapLegalEntityToIndividualSchema-DVKTWyvx.js +206 -0
- package/dist/mapTransferInstrumentToPayoutAccount--gtugk3J.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-D1b5RUJ0.js +38 -0
- package/dist/nl-NL-KQ6bciOb.js +13 -0
- package/dist/nl-NL-SjOGmGk5.js +13 -0
- package/dist/nl-NL-lcNM54vV.js +63 -0
- package/dist/no-NO-BAWVf0GX.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-vYKnE5-t.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/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-Dl2Isz78.js +324 -0
- package/dist/pt-BR-BRdIEO2O.js +38 -0
- package/dist/pt-BR-BaTE6BB_.js +75 -0
- package/dist/pt-BR-BfDe_8iW.js +13 -0
- package/dist/pt-BR-BxoOF8jB.js +65 -0
- package/dist/pt-BR-Ct4s4jXV.js +13 -0
- package/dist/pt-BR-DA44Wgbt.js +63 -0
- package/dist/recurring-DKNs9K3x.js +17 -0
- package/dist/reporting-D5ABpLO_.js +16 -0
- package/dist/resolveEnvironment-B_JokQ0n.js +84 -0
- package/dist/revenue-accelerate-D7Sp0V4a.js +17 -0
- package/dist/review-D4TUjcWF.js +17 -0
- package/dist/roleMetadata-eM6T7GeQ.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/sl-SI-BAIm-qBe.js +13 -0
- package/dist/sl-SI-BZpXMHiG.js +13 -0
- package/dist/sl-SI-CvUzNn9Z.js +38 -0
- package/dist/sl-SI-D8dDckrW.js +55 -0
- package/dist/sl-SI-DEaeEVKB.js +24 -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-DqUEy_Cm.js +32 -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 +2642 -2946
- package/dist/styles-CLV89_hH.js +2642 -2946
- 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-BsLkPEzn.js +38 -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/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/useClearCompanyData.d.ts +2 -2
- package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -2
- package/dist/types/api/companySelection/useCompanySelection.d.ts +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +0 -2
- package/dist/types/components/Business/forms/AdditionalInformation/utils.d.ts +0 -3
- package/dist/types/components/Business/forms/BusinessDetails/form-ids.d.ts +2 -0
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +12 -11
- package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +2 -1
- package/dist/types/components/Business/forms/BusinessSelection/BusinessInformationCard/BusinessInformationCard.d.ts +4 -4
- package/dist/types/components/Business/forms/CompanyStructure/CompanyStructure.d.ts +0 -1
- 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/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 -1
- package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +1 -1
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +0 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +7 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -4
- package/dist/types/components/Business/utils/companyUtil.d.ts +0 -10
- package/dist/types/components/Business/utils/useBusinessDetailsData.d.ts +21 -0
- package/dist/types/components/BusinessLines/constants.d.ts +2 -0
- package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +10 -10
- package/dist/types/components/BusinessLines/fields/SctaField/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +1 -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 +2 -0
- package/dist/types/components/BusinessLines/tasks/utils.d.ts +10 -7
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
- 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 +5771 -541
- 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 +14 -3
- 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 -0
- 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 +121 -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/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 +2 -2
- 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/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/Loader/Loader.d.ts +11 -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/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 +19 -42
- 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/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/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 +1 -1
- package/dist/types/stores/globalStore/taskStatus.d.ts +5 -3
- package/dist/types/types/assert.d.ts +1 -0
- package/dist/types/types/form-rules.d.ts +0 -1
- 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/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 +2 -1
- 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 +2 -1
- package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +3 -2
- package/dist/types-B7GElie6.js +138 -0
- package/dist/types-BQL9Lsg4.js +74 -0
- package/dist/types-C8io4KaH.js +64 -0
- package/dist/types-DwXc_yI8.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-ETDoz1H2.js +34 -0
- package/dist/useBusinessDetailsData-FrL0b9Ni.js +5197 -0
- package/dist/useBusinessLines-C5NQ5pE8.js +29 -0
- package/dist/useCanSeeIntroduction-BdZJ7k-_.js +48 -0
- package/dist/useCreateLegalEntity-DrcLoNYT.js +32 -0
- package/dist/useDataMissingRemediations-Zgtpw7uZ.js +41 -0
- package/dist/useDataset-Cap5ZjTr.js +76 -0
- package/dist/useDeleteTransferInstrument-B2wRj-qL.js +32 -0
- package/dist/useForm-DqUW2TbW.js +582 -0
- package/dist/useFormContext-CkuaJPUI.js +201 -0
- package/dist/useGlobalData-5Z6W3or1.js +68 -0
- package/dist/useId-BZ0PA7jP.js +24 -0
- package/dist/useMultiForm-Dm2IEMH9.js +873 -0
- package/dist/useNavigate-CI0N-POy.js +265 -0
- package/dist/useOnboardingStatus-H7Xqe2GC.js +28 -0
- package/dist/usePciQuestionnaireList-BF7TPjbQ.js +29 -0
- package/dist/useSalesChannels-DYGRfKeh.js +65 -0
- package/dist/useScenarios-CibP5LVa.js +48 -0
- package/dist/useSetting-CbBaitp6.js +19 -0
- package/dist/useTaskStatus-1OZ2clnm.js +51 -0
- package/dist/useTermsOfServiceStatus-Dg_nBQgt.js +43 -0
- package/dist/useToastContext-D643iewp.js +49 -0
- package/dist/useTrustMembers-BTCDIu6B.js +163 -0
- package/dist/useUnincorporatedPartnershipMembers-BM9dNg4i.js +99 -0
- package/dist/useUpdateBusinessLines-BuW6Vnof.js +339 -0
- package/dist/useUpdateLegalEntity-tRw1V_Mt.js +40 -0
- package/dist/utils-BasWTkqk.js +159 -0
- package/dist/utils-BnolcW6V.js +237 -0
- package/dist/utils-D9h2Aq2w.js +778 -0
- package/dist/utils-PkTZS9uf.js +58 -0
- package/dist/utils-b_KUV0wb.js +29 -0
- package/dist/validate-CtxacqMv.js +434 -0
- package/dist/validate-K0fmvoFj.js +108 -0
- package/dist/validationError-DdlWONz2.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 +88 -56
- package/dist/4-people-BzyXLUF9.js +0 -24
- package/dist/AcceptTermsOfServiceComponent-DmtE39CC.js +0 -642
- package/dist/Accordion-C-BvE1VA.js +0 -88
- package/dist/AccountSetupRejected-DDoI43lB.js +0 -26
- package/dist/ActionBar-Dzrzolec.js +0 -31
- package/dist/Address-e41CN3CB.js +0 -1317
- package/dist/Alert-Dk-oZlnx.js +0 -159
- package/dist/Avatar-efxn8pKz.js +0 -60
- package/dist/BusinessDetailsDropin-DDh_D2hv.js +0 -2359
- package/dist/BusinessFinancingComponent-C04uRrhE.js +0 -55
- package/dist/BusinessFinancingDropin-_OlSqohS.js +0 -1843
- package/dist/BusinessFinancingPage-DdMugwOa.js +0 -43
- package/dist/BusinessTypeSelectionPage-vkCTEFEJ.js +0 -426
- package/dist/Card-CqXQA0AI.js +0 -82
- package/dist/ConstitutionalDocument-CcwyClZ7.js +0 -143
- package/dist/ContractViewer-Byp71k2e.js +0 -935
- package/dist/CountryField-CzRN1OE8.js +0 -843
- package/dist/CreateIndividualComponent-BNeY6u8q.js +0 -71
- package/dist/CreateTransferInstrumentComponent-B8cNHRdF.js +0 -63
- package/dist/Currency-BBt4yo5i.js +0 -183
- package/dist/CustomerSupport-CObTT8cH.js +0 -153
- package/dist/DebugModal-DJcim6UP.js +0 -413
- package/dist/DecisionMakerDetailsPage-CrQgRW8X.js +0 -106
- package/dist/DecisionMakers-B-3aMddf.js +0 -842
- package/dist/EmbeddedStatus-C_5DguHv.js +0 -99
- package/dist/EndStateLayout-CwdrDEYY.js +0 -71
- package/dist/EntityAssociation-C413vcu6.js +0 -159
- package/dist/EntityGuidanceStatus-C6b8i7os.js +0 -105
- package/dist/FormFlow-PppMJ6OA.js +0 -186
- package/dist/FormNavigation-DL47b_QR.js +0 -144
- package/dist/FormWrapper-BOrTn1C8.js +0 -135
- package/dist/IndividualOnfido-CmmyKC7J.js +0 -9631
- package/dist/IndividualOnfidoDropin-BsCb6dvy.js +0 -2569
- package/dist/InputText-BfL9DgWp.js +0 -249
- package/dist/Introduction-CBMl7v2M.js +0 -300
- package/dist/JpAddress-BCwWQ0Ul.js +0 -271
- package/dist/LegalRepresentativeDetailsPage-CDURNY_v.js +0 -60
- package/dist/ListItem-BhUSZdS5.js +0 -69
- package/dist/ManageIndividualComponent-wYIuZdQ8.js +0 -46
- package/dist/ManageTermsOfServiceComponent-6RBHbbsn.js +0 -52
- package/dist/ManageTransferInstrumentComponent-BDyWbySW.js +0 -287
- package/dist/MaybeModal-CG0BAO68.js +0 -36
- package/dist/Modal-CJ_hgcGb.js +0 -149
- package/dist/OnboardingDropinComponent-D3dYF_4W.js +0 -7617
- package/dist/PayoutDetailsDropin-DxALk48X.js +0 -4840
- package/dist/Review-C_JnI94L.js +0 -83
- package/dist/RootBusinessDetailsPage-BE3Uck1r.js +0 -46
- package/dist/RootBusinessLinesPage-DknXuZgi.js +0 -1484
- package/dist/RootIndividualDetailsPage-BIj988Sh.js +0 -71
- package/dist/SignPCIComponent-BjVEKTlw.js +0 -304
- package/dist/SingpassSelection-Bkbz_bGo.js +0 -130
- package/dist/SoleProprietorshipPage-DSOEsSfJ.js +0 -46
- package/dist/SourceOfFundsPage-cWwthA_A.js +0 -2383
- package/dist/Spacer-D4I0f08n.js +0 -1416
- package/dist/StepProgressIndicator-FNAEisRr.js +0 -78
- package/dist/StoreProvider-jtUYKLRz.js +0 -7707
- package/dist/Summary-COehg8IT.js +0 -204
- package/dist/TaxReportingDropin-BBkhMcPn.js +0 -501
- package/dist/TrustDetailsPage-50i4_lFA.js +0 -2149
- package/dist/TrustMemberCompanyPage-v2Md1srF.js +0 -57
- package/dist/TrustMemberIndividualPage-Bn6TXkhN.js +0 -66
- package/dist/TrustMemberRoleAndTypePage-C_NPNe6_.js +0 -985
- package/dist/TrustMembersOverview-FcSsQZ3Z.js +0 -438
- package/dist/UnincorporatedPartnershipIndividualPage-zsyk9RTz.js +0 -65
- package/dist/UnincorporatedPartnershipMemberCompanyPage-FP75ZgOg.js +0 -60
- package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-n6SndOAj.js +0 -281
- package/dist/UnincorporatedPartnershipMembersOverview-BbW2q9EI.js +0 -172
- package/dist/VerificationErrorAlert-B7jRGdgn.js +0 -79
- package/dist/ViewVerificationStatusComponent-CuUmC319.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/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-maan7Z5S.js +0 -17
- package/dist/cross-circle-fill-small-DCz52AuN.js +0 -14
- package/dist/da-DK-BlU1EczG.js +0 -30
- package/dist/da-DK-DEdQ-QPp.js +0 -13
- package/dist/da-DK-DYpfNZdP.js +0 -37
- package/dist/da-DK-Dc0QYG8m.js +0 -68
- package/dist/da-DK-DqkN5oIu.js +0 -13
- package/dist/da-DK-jK7c9UL0.js +0 -57
- package/dist/de-DE-BXt1K0Tr.js +0 -37
- package/dist/de-DE-COuUdtao.js +0 -13
- package/dist/de-DE-DrSSblam.js +0 -13
- package/dist/de-DE-Dz2OsS1F.js +0 -68
- package/dist/de-DE-s0B-XZyp.js +0 -30
- package/dist/de-DE-wmerDL2e.js +0 -57
- package/dist/debouncedInputEvent-HhImBs4O.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-DIcRD9lR.js +0 -218
- package/dist/download-Drhk9k1f.js +0 -17
- package/dist/dropinUtils-BK1u6OTG.js +0 -200
- package/dist/edit-1-CFoDTMvQ.js +0 -14
- package/dist/el-GR-CdgLZhuO.js +0 -13
- package/dist/en-US-CzEL6t1W.js +0 -55
- package/dist/en-US-D-B35AoN.js +0 -68
- package/dist/en-US-Dg505Oh3.js +0 -37
- package/dist/en-US-d4WBvUW7.js +0 -118
- package/dist/en-US-fyGPkcqX.js +0 -13
- package/dist/en-US-gsp7CD_E.js +0 -57
- package/dist/es-ES-BI_jdT67.js +0 -68
- package/dist/es-ES-BhNhIf08.js +0 -37
- package/dist/es-ES-DNGEW6V_.js +0 -13
- package/dist/es-ES-Qnc0Q6JH.js +0 -57
- package/dist/es-ES-ShWaSuJd.js +0 -13
- package/dist/es-ES-esfwvKwz.js +0 -30
- package/dist/external-link-DCMYUMfW.js +0 -14
- package/dist/fi-FI-ChApf7lf.js +0 -13
- package/dist/fi-FI-CjB6QC01.js +0 -30
- package/dist/fi-FI-CoI_94Fv.js +0 -13
- package/dist/fi-FI-Dn2MC8uW.js +0 -57
- package/dist/fi-FI-hwzizPnr.js +0 -68
- package/dist/fi-FI-ysUrBilO.js +0 -37
- package/dist/fr-FR-BSvSKazD.js +0 -37
- package/dist/fr-FR-BWX14yb7.js +0 -57
- package/dist/fr-FR-Br7OeDIe.js +0 -13
- package/dist/fr-FR-C1XqLftn.js +0 -30
- package/dist/fr-FR-CYZXbwc9.js +0 -68
- package/dist/fr-FR-Q3urMjbl.js +0 -13
- package/dist/funds-in-D8bj0aoE.js +0 -21
- package/dist/getFieldsWithExistingData-DxCFyXNd.js +0 -22
- package/dist/getName-BS-pHwl0.js +0 -41
- 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-CWdnpJrE.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/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-Uz4rHS0r.js +0 -234
- package/dist/image-BSihO8lR.js +0 -17
- package/dist/info-filled-SQotHmT9.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-BAvsF2TB.js +0 -13
- package/dist/it-IT-C_YDqVNT.js +0 -30
- package/dist/it-IT-Erh1DIlj.js +0 -68
- package/dist/it-IT-Qfzc8jnW.js +0 -37
- package/dist/it-IT-vdMlF0Ha.js +0 -13
- package/dist/localizeDateString-DgSdo3D5.js +0 -27
- package/dist/location-Q4oKvnkl.js +0 -17
- package/dist/mail-BOdyoVqB.js +0 -14
- package/dist/manual-verification-BvZWqA00.js +0 -41
- package/dist/mapExistingFile-CqrlnmFQ.js +0 -156
- package/dist/mapFinancialReportsToFinancialInformation-ZmhVRj3f.js +0 -67
- package/dist/mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js +0 -63
- package/dist/mapLegalEntityToIndividualOnfidoSchema-COcit7Hx.js +0 -146
- package/dist/mapTransferInstrumentToPayoutAccount-DfJHF9H8.js +0 -33
- package/dist/minus-circle-filled-kC2IUvKz.js +0 -17
- package/dist/nl-NL-BMUYBqlF.js +0 -57
- package/dist/nl-NL-BwKrj-29.js +0 -13
- package/dist/nl-NL-C3YJkSIj.js +0 -13
- package/dist/nl-NL-D7gBNWEY.js +0 -37
- package/dist/nl-NL-DyeSX0PH.js +0 -30
- package/dist/nl-NL-O9GCHMDA.js +0 -68
- package/dist/no-NO-B6OPS2CA.js +0 -13
- package/dist/no-NO-C-gCYc9q.js +0 -37
- package/dist/no-NO-CA1aR6Wh.js +0 -68
- package/dist/no-NO-D4BECLky.js +0 -130
- package/dist/no-NO-DKbWxgF-.js +0 -57
- package/dist/no-NO-DPRsAb_o.js +0 -30
- 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/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-N1jHgPa8.js +0 -324
- package/dist/pt-BR--kaJvtE6.js +0 -57
- package/dist/pt-BR-BKQRvAfq.js +0 -13
- package/dist/pt-BR-C-C4ZJ9x.js +0 -30
- package/dist/pt-BR-NtLaWlnZ.js +0 -68
- package/dist/pt-BR-gh27BC86.js +0 -13
- package/dist/pt-BR-ur86nRrK.js +0 -37
- package/dist/pt-PT-B4F_5NWi.js +0 -55
- package/dist/pt-PT-BZ5ZZm6G.js +0 -57
- package/dist/pt-PT-Bf4IV7wp.js +0 -13
- package/dist/pt-PT-CFY1O_K0.js +0 -13
- package/dist/pt-PT-CIo3mlXL.js +0 -24
- package/dist/pt-PT-CVNEcs32.js +0 -37
- package/dist/pt-PT-D2Xe-OdG.js +0 -13
- package/dist/pt-PT-DSxxVA0f.js +0 -68
- package/dist/pt-PT-DVKtHjIY.js +0 -13
- package/dist/pt-PT-DYihdcJx.js +0 -13
- package/dist/pt-PT-Dm5DRDrd.js +0 -32
- package/dist/pt-PT-DpDxAynk.js +0 -13
- package/dist/pt-PT-JVqqgvPs.js +0 -54
- package/dist/pt-PT-LbneTcRx.js +0 -30
- package/dist/pt-PT-TKg5FLat.js +0 -27
- package/dist/recurring-CkL4cCM2.js +0 -17
- package/dist/reporting-DerosUNm.js +0 -16
- package/dist/resolveEnvironment-DZ77JxLV.js +0 -164
- package/dist/revenue-accelerate-Dp4Ns_5c.js +0 -17
- package/dist/review-CxIN9azU.js +0 -17
- package/dist/rules-_v8BprU3.js +0 -317
- 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/sl-SI-8SzKx7XD.js +0 -30
- package/dist/sl-SI-CUCrzJQv.js +0 -37
- package/dist/sl-SI-DdjgSySI.js +0 -13
- package/dist/sl-SI-DtdGMD6i.js +0 -57
- package/dist/solution-payments-CNAat9h7.js +0 -14
- package/dist/store-IuAkDRAp.js +0 -14
- package/dist/sv-SE-B7cpKp1l.js +0 -30
- package/dist/sv-SE-BHkYspm-.js +0 -130
- package/dist/sv-SE-C6uPh9g5.js +0 -37
- package/dist/sv-SE-K1QT1cOt.js +0 -68
- package/dist/sv-SE-kR514dO1.js +0 -57
- package/dist/sv-SE-zTiw1bUU.js +0 -13
- 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/tasks/BusinessDetailsDropin/mandatoryFields.d.ts +0 -3
- 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 -41
- 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 -14
- 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-BnnF5_7m.js +0 -34
- package/dist/types-D0u3f6aG.js +0 -87
- package/dist/types-Dk94b8kx.js +0 -161
- package/dist/types-sYQKhaSL.js +0 -74
- 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-00JVCmQ7.js +0 -33
- package/dist/useCreateLegalEntity-BvvwB9r0.js +0 -31
- package/dist/useDataset-8WyOJBhU.js +0 -220
- package/dist/useForm-DLxHtZTP.js +0 -1624
- package/dist/useGlobalData-D9dz7GIi.js +0 -68
- package/dist/useMultiForm--sSlt50X.js +0 -864
- package/dist/useOnboardingStatus-91zhqzLd.js +0 -27
- package/dist/useScenarios-CqKpYbe_.js +0 -46
- package/dist/useTermsOfServiceStatus-DLQVpbik.js +0 -42
- package/dist/useToastContext-FI3dwzzs.js +0 -60
- package/dist/useUnincorporatedPartnershipMembers-CdQDPlZq.js +0 -99
- package/dist/useUpdateBusinessLines-BulhyPjH.js +0 -46
- package/dist/useUpdateLegalEntity-Q3Icdeo6.js +0 -39
- package/dist/utils-DQLhii3U.js +0 -774
- package/dist/utils-DV0_GilJ.js +0 -237
- package/dist/validate-BD3wn-YX.js +0 -100
- package/dist/validate-H-iE__-w.js +0 -41
- package/dist/validationError-B5aoMbe_.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/{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/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,2359 +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] = "6bd99c14-1e9d-4878-bca1-7c53c4630e16", e._sentryDebugIdIdentifier = "sentry-dbid-6bd99c14-1e9d-4878-bca1-7c53c4630e16");
|
|
6
|
-
} catch (e) {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
;
|
|
10
|
-
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
11
|
-
import { u as useTranslation, B as Button, G as Typography, C as CountryCodes, O as TaskTypes, r as LegalEntityTypes, W as isEmpty, a0 as entriesOf, bC as businessDetailsComponentsKeyMapping, bD as solePropBusinessDetailsKeyMapping, aj as objectsDeepEqual, ap as keysOf, i as isUndefinedOrNull, bE as solePropBusinessDetailsApiKeyMapping, bp as businessDetailsApiKeyMapping, P as createLogger, b8 as filterOutUnwantedAssociationsIfRootLE, b6 as drop, af as getOwnEntityAssociations, aV as doArraysMatch, b as useApiContext, a2 as useAnalyticsContext, a1 as useQueryClient, X as useExperimentsContext, o as useSettingsContext, K as useAccountHolder, bF as solePropBusinessDetailsDocumentMapping, bG as businessDetailsDocumentMapping } from "./StoreProvider-jtUYKLRz.js";
|
|
12
|
-
import { useState, useEffect, useMemo, useCallback } from "preact/hooks";
|
|
13
|
-
import { F as FinancialInformation, A as AdditionalInformation, C as CompanyStructure, B as BusinessSelection, h as BasicInformation, i as getDefaultRegistrationNumberType, j as getDefaultVatNumberType, o as operationalAddressIsSameIds, k as FIELDS_NEEDED_FOR_COMPANY_SEARCH, v as verifiedBusiness, l as isVerifiedSingleCompanySearchResult, m as companyTypeMetadata, p as documentFormsIds, r as registrationNumberDefaultFieldMetadata, q as inferCompanyRegistrationNumberType, s as registrationNumberDefaultFieldConfig, t as stockTickerSymbolFieldMetadata, w as stockISINFieldMetadata, x as stockExchangeMICFieldMetadata, y as dateOfIncorporationFieldMetadata, z as industryCodeFieldMetadata, D as eInvoicingCodeFieldMetadata, G as vatAbsenceReasonMetadata, H as exemptFromRegistrationNumberDefaultFieldMetadata, I as doingBusinessAsFieldMetadata, J as doingBusinessAsAbsentFieldMetadata, K as defaultFieldMetadata, L as defaultFieldConfig, M as defaultFieldMetadata$1, N as defaultFieldConfig$1, P as defaultFieldMetadataV4, Q as defaultFieldMetadata$2, R as defaultFieldConfigV4, S as defaultFieldConfig$2, g as getForms, T as useBusinessLines, U as financialInfoValidationWithEmployeesRules, V as tinMatched, W as businessMismatchModalOpen, X as useCompanySearch, Y as useVerifyTin, Z as handleCompanySelection, _ as applyVerifiedBusinessData } from "./OnboardingDropinComponent-D3dYF_4W.js";
|
|
14
|
-
import { u as useCreateBusinessLine, a as useUpdateBusinessLine } from "./useUpdateBusinessLines-BulhyPjH.js";
|
|
15
|
-
import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BvvwB9r0.js";
|
|
16
|
-
import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-Q3Icdeo6.js";
|
|
17
|
-
import { F as FormContextProvider, a as FormFlow } from "./FormFlow-PppMJ6OA.js";
|
|
18
|
-
import { a as useToastContext } from "./useToastContext-FI3dwzzs.js";
|
|
19
|
-
import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-N1jHgPa8.js";
|
|
20
|
-
import { a as addValidityToForms, u as useFormComposer } from "./dropinUtils-BK1u6OTG.js";
|
|
21
|
-
import { u as useMultiForm } from "./useMultiForm--sSlt50X.js";
|
|
22
|
-
import { m as mapExistingFile, g as getPageName, u as useScenarioConfiguration } from "./mapExistingFile-CqrlnmFQ.js";
|
|
23
|
-
import { a as datasetUtilities, C as Confirm } from "./useDataset-8WyOJBhU.js";
|
|
24
|
-
import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./documentUtils-DIcRD9lR.js";
|
|
25
|
-
import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-DxCFyXNd.js";
|
|
26
|
-
import { f as formatCurrency, A as ALLOWED_SOF_SERVICES } from "./utils-DQLhii3U.js";
|
|
27
|
-
import { u as useFormContext, i as isDateOlderThanAYear, o as mapAddressLabels, p as getKeyForField } from "./Address-e41CN3CB.js";
|
|
28
|
-
import { _ as MemoizedDocumentUpload, C as CompanyTypesValues, l as COUNTRIES_USING_COMPANY_SEARCH, $ as isRegistrationNumberAbsentStateV4Scenario, B as isEmpty$1, a0 as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, r as requestingBanking, e as requestingIssuing, a as getCompanyRegistrationNumberOptions, t as taxInformationDefaultFieldMetadata, a1 as countryToTaxInfoTypeMap, f as taxInformationDefaultFieldConfig, a2 as rules } from "./IndividualOnfido-CmmyKC7J.js";
|
|
29
|
-
import { M as MemoizedConstitutionalDocument } from "./ConstitutionalDocument-CcwyClZ7.js";
|
|
30
|
-
import { M as Modal, a as ModalContent } from "./Modal-CJ_hgcGb.js";
|
|
31
|
-
import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
|
|
32
|
-
import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-ZmhVRj3f.js";
|
|
33
|
-
import { f as formatObject } from "./utils-DNSfZiio.js";
|
|
34
|
-
import { S as SettingNames } from "./InputText-BfL9DgWp.js";
|
|
35
|
-
import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-D6HjhjJT.js";
|
|
36
|
-
import { o as organizationTypesToSkipCompanyStructureForm } from "./utils-DV0_GilJ.js";
|
|
37
|
-
import { s as summaryItem } from "./CountryField-CzRN1OE8.js";
|
|
38
|
-
import { s as summaryStep } from "./Summary-COehg8IT.js";
|
|
39
|
-
import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-B5aoMbe_.js";
|
|
40
|
-
import { r as resolveFieldMetadata } from "./Spacer-D4I0f08n.js";
|
|
41
|
-
const stripWhitespace = (str) => str.replace(/\s/g, "");
|
|
42
|
-
const toNormalizedString = (s) => stripWhitespace(s.toLowerCase());
|
|
43
|
-
const isNormalizedStringMatch = (s1, s2) => toNormalizedString(s1) === toNormalizedString(s2);
|
|
44
|
-
const documentTypes$2 = [
|
|
45
|
-
{ id: "Internal company document", name: "internalCompanyDocument" },
|
|
46
|
-
{ id: "Business registry statement", name: "businessRegistryStatement" }
|
|
47
|
-
];
|
|
48
|
-
const GuidanceContent$4 = ({ t }) => {
|
|
49
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
50
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
51
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
52
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
|
|
53
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
|
|
54
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
55
|
-
] })
|
|
56
|
-
] }) });
|
|
57
|
-
};
|
|
58
|
-
function ProofOfDirectorDocument({ id, country, ...props }) {
|
|
59
|
-
const { t } = useTranslation(["common", "business"]);
|
|
60
|
-
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
|
|
61
|
-
return /* @__PURE__ */ jsx(
|
|
62
|
-
MemoizedDocumentUpload,
|
|
63
|
-
{
|
|
64
|
-
...props,
|
|
65
|
-
id,
|
|
66
|
-
heading: t(($) => $["uploadYourOrganizationProofOfDirector"], { ns: "business" }),
|
|
67
|
-
description: t(($) => $["weNeedAnOfficialDocument"], { ns: "business" }),
|
|
68
|
-
documentField: "proofOfDirector",
|
|
69
|
-
documentType: "proofOfDirector",
|
|
70
|
-
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, { t }),
|
|
71
|
-
country,
|
|
72
|
-
hidePageCount: true,
|
|
73
|
-
documentTypeSelect: {
|
|
74
|
-
selectedType: selectedDocumentName,
|
|
75
|
-
setSelectedType: setSelectedDocumentName,
|
|
76
|
-
options: documentTypes$2
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
const DOC_TYPE_FOR_MULTI_UPLOAD = "Organizational chart and supporting document";
|
|
82
|
-
const documentTypes$1 = [
|
|
83
|
-
{ id: "Certified Organizational chart", name: "certifiedOrganizationalChart" },
|
|
84
|
-
{
|
|
85
|
-
id: "Organizational chart and supporting document",
|
|
86
|
-
name: "organizationalChartAndSupportingDocument"
|
|
87
|
-
}
|
|
88
|
-
];
|
|
89
|
-
const GuidanceContent$3 = ({
|
|
90
|
-
selectedDocumentName,
|
|
91
|
-
t
|
|
92
|
-
}) => {
|
|
93
|
-
const [showGuidanceModal, setShowGuidanceModal] = useState(false);
|
|
94
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
95
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
96
|
-
selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
|
|
97
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
|
|
98
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
|
|
99
|
-
ns: "business"
|
|
100
|
-
}) }),
|
|
101
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
|
|
102
|
-
ns: "business"
|
|
103
|
-
}) })
|
|
104
|
-
] }) : /* @__PURE__ */ jsxs("ul", { children: [
|
|
105
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
|
|
106
|
-
ns: "business"
|
|
107
|
-
}) }),
|
|
108
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
109
|
-
/* @__PURE__ */ jsx("li", { children: t(
|
|
110
|
-
($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
|
|
111
|
-
{
|
|
112
|
-
ns: "business"
|
|
113
|
-
}
|
|
114
|
-
) }),
|
|
115
|
-
/* @__PURE__ */ jsxs("li", { children: [
|
|
116
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
117
|
-
t(($) => $["one"], { ns: "common" }),
|
|
118
|
-
" "
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
|
|
121
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
122
|
-
" ",
|
|
123
|
-
t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
|
|
124
|
-
ns: "business"
|
|
125
|
-
})
|
|
126
|
-
] })
|
|
127
|
-
] })
|
|
128
|
-
] })
|
|
129
|
-
] }),
|
|
130
|
-
showGuidanceModal && /* @__PURE__ */ jsx(
|
|
131
|
-
Modal,
|
|
132
|
-
{
|
|
133
|
-
size: "small",
|
|
134
|
-
onClose: () => setShowGuidanceModal(false),
|
|
135
|
-
ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
|
|
136
|
-
children: /* @__PURE__ */ jsxs(ModalContent, { children: [
|
|
137
|
-
/* @__PURE__ */ jsx(
|
|
138
|
-
Typography,
|
|
139
|
-
{
|
|
140
|
-
el: "h1",
|
|
141
|
-
variant: "title-l",
|
|
142
|
-
className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
|
|
143
|
-
children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
|
|
147
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
148
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
|
|
149
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
|
|
150
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
|
|
151
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
|
|
152
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
|
|
153
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
|
|
154
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
|
|
155
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
|
|
156
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
|
|
157
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
|
|
158
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
|
|
159
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
|
|
160
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
|
|
161
|
-
] })
|
|
162
|
-
] })
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
] }) });
|
|
166
|
-
};
|
|
167
|
-
function ProofOfOwnershipDocument({ id, country, ...props }) {
|
|
168
|
-
const { t } = useTranslation(["common", "business"]);
|
|
169
|
-
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
|
|
170
|
-
const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
|
|
171
|
-
useEffect(() => {
|
|
172
|
-
if (props.data?.proofOfOwnership?.length === 2) {
|
|
173
|
-
setSelectedDocumentName(DOC_TYPE_FOR_MULTI_UPLOAD);
|
|
174
|
-
}
|
|
175
|
-
}, [props.data?.proofOfOwnership]);
|
|
176
|
-
return /* @__PURE__ */ jsx(
|
|
177
|
-
MemoizedDocumentUpload,
|
|
178
|
-
{
|
|
179
|
-
...props,
|
|
180
|
-
id,
|
|
181
|
-
heading: t(($) => $["uploadYourOrganizationProofOfOwnership"], { ns: "business" }),
|
|
182
|
-
description: t(($) => $["weNeedAnOfficialDocumentForOwnership"], { ns: "business" }),
|
|
183
|
-
documentField: "proofOfOwnership",
|
|
184
|
-
documentType: "proofOfOwnership",
|
|
185
|
-
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName, t }),
|
|
186
|
-
country,
|
|
187
|
-
label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
|
|
188
|
-
documentTypeSelect: {
|
|
189
|
-
selectedType: selectedDocumentName,
|
|
190
|
-
setSelectedType: setSelectedDocumentName,
|
|
191
|
-
options: documentTypes$1
|
|
192
|
-
},
|
|
193
|
-
hidePageCount: true,
|
|
194
|
-
supportsMultipleUploads: supportsMultiple,
|
|
195
|
-
maxNumberOfFiles: supportsMultiple ? 2 : 1,
|
|
196
|
-
extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
const documentTypes = [
|
|
201
|
-
{ id: "Trade registry document", name: "tradeRegistryDocument" },
|
|
202
|
-
{ id: "Internal company document", name: "internalCompanyDocument" }
|
|
203
|
-
];
|
|
204
|
-
const GuidanceContent$2 = ({ t }) => {
|
|
205
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
206
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
207
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
208
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
|
|
209
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
|
|
210
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
|
|
211
|
-
] })
|
|
212
|
-
] }) });
|
|
213
|
-
};
|
|
214
|
-
function ProofOfSignatoryDocument({ id, country, ...props }) {
|
|
215
|
-
const { t } = useTranslation(["common", "business"]);
|
|
216
|
-
const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
|
|
217
|
-
return /* @__PURE__ */ jsx(
|
|
218
|
-
MemoizedDocumentUpload,
|
|
219
|
-
{
|
|
220
|
-
...props,
|
|
221
|
-
id,
|
|
222
|
-
heading: t(($) => $["uploadYourOrganizationProofOfSignatory"], { ns: "business" }),
|
|
223
|
-
description: t(($) => $["weNeedAnOfficialDocumentSignatory"], { ns: "business" }),
|
|
224
|
-
documentField: "proofOfSignatory",
|
|
225
|
-
documentType: "proofOfSignatory",
|
|
226
|
-
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, { t }),
|
|
227
|
-
country,
|
|
228
|
-
hidePageCount: true,
|
|
229
|
-
documentTypeSelect: {
|
|
230
|
-
selectedType: selectedDocumentName,
|
|
231
|
-
setSelectedType: setSelectedDocumentName,
|
|
232
|
-
options: documentTypes
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
const ACCEPTED_DOCUMENTS_MAP$1 = {
|
|
238
|
-
[CountryCodes.PuertoRico]: {
|
|
239
|
-
// should exactly match CountryCodes.UnitedStates
|
|
240
|
-
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
241
|
-
header: "acceptedDocumentsForPrivateCompanies",
|
|
242
|
-
documents: [
|
|
243
|
-
"certificateOfIncorporation",
|
|
244
|
-
"certificateOfFormation",
|
|
245
|
-
"secretaryOfStateFiling__PR"
|
|
246
|
-
]
|
|
247
|
-
},
|
|
248
|
-
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
249
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
250
|
-
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
251
|
-
},
|
|
252
|
-
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
253
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
254
|
-
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
255
|
-
},
|
|
256
|
-
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
257
|
-
header: "acceptedDocumentsForGovernment",
|
|
258
|
-
documents: ["charter"]
|
|
259
|
-
},
|
|
260
|
-
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
261
|
-
header: "acceptedDocumentsForNonProfit",
|
|
262
|
-
documents: [
|
|
263
|
-
"articlesOfIncorporation",
|
|
264
|
-
"meetingRecords",
|
|
265
|
-
"secretaryOfStateRegDoc__PR",
|
|
266
|
-
"certificateOfIncumbency"
|
|
267
|
-
]
|
|
268
|
-
},
|
|
269
|
-
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
270
|
-
header: "acceptedDocumentsForPartnerships",
|
|
271
|
-
documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
[CountryCodes.UnitedStates]: {
|
|
275
|
-
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
276
|
-
header: "acceptedDocumentsForPrivateCompanies",
|
|
277
|
-
documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
|
|
278
|
-
},
|
|
279
|
-
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
280
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
281
|
-
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
282
|
-
},
|
|
283
|
-
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
284
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
285
|
-
documents: ["certificateOfIncorporation", "certificateOfFormation"]
|
|
286
|
-
},
|
|
287
|
-
[CompanyTypesValues.GOVERNMENTAL_ORGANIZATION]: {
|
|
288
|
-
header: "acceptedDocumentsForGovernment",
|
|
289
|
-
documents: ["charter"]
|
|
290
|
-
},
|
|
291
|
-
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
292
|
-
header: "acceptedDocumentsForNonProfit",
|
|
293
|
-
documents: [
|
|
294
|
-
"articlesOfIncorporation",
|
|
295
|
-
"meetingRecords",
|
|
296
|
-
"secretaryOfStateRegDoc",
|
|
297
|
-
"certificateOfIncumbency"
|
|
298
|
-
]
|
|
299
|
-
},
|
|
300
|
-
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
301
|
-
header: "acceptedDocumentsForPartnerships",
|
|
302
|
-
documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
const GuidanceContent$1 = ({
|
|
307
|
-
country,
|
|
308
|
-
companyType,
|
|
309
|
-
t
|
|
310
|
-
}) => {
|
|
311
|
-
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
|
|
312
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
313
|
-
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
314
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
315
|
-
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
316
|
-
] }),
|
|
317
|
-
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
318
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
319
|
-
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
|
|
320
|
-
] })
|
|
321
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
322
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
323
|
-
/* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
|
|
324
|
-
] }) });
|
|
325
|
-
};
|
|
326
|
-
function RegistrationDocument({
|
|
327
|
-
id,
|
|
328
|
-
country,
|
|
329
|
-
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
330
|
-
...props
|
|
331
|
-
}) {
|
|
332
|
-
const { t } = useTranslation(["common", "business"]);
|
|
333
|
-
return /* @__PURE__ */ jsx(
|
|
334
|
-
MemoizedDocumentUpload,
|
|
335
|
-
{
|
|
336
|
-
...props,
|
|
337
|
-
id,
|
|
338
|
-
heading: t(($) => $["companyRegistrationDocumentFormHeading"], { ns: "business" }),
|
|
339
|
-
description: t(($) => $["companyRegistrationDocumentFormDescription"], { ns: "business" }),
|
|
340
|
-
documentField: "registrationDocument",
|
|
341
|
-
documentType: "registrationDocument",
|
|
342
|
-
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType, t }),
|
|
343
|
-
companyType,
|
|
344
|
-
country,
|
|
345
|
-
hidePageCount: true
|
|
346
|
-
}
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
const ACCEPTED_DOCUMENTS_MAP = {
|
|
350
|
-
[CountryCodes.PuertoRico]: {
|
|
351
|
-
// should exactly match CountryCodes.UnitedStates
|
|
352
|
-
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
353
|
-
header: "acceptedDocumentsForPrivateCompanies",
|
|
354
|
-
documents: ["irsCP575"]
|
|
355
|
-
},
|
|
356
|
-
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
357
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
358
|
-
documents: ["annualReport", "secForm10k"]
|
|
359
|
-
},
|
|
360
|
-
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
361
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
362
|
-
documents: ["annualReport", "secForm10k"]
|
|
363
|
-
},
|
|
364
|
-
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
365
|
-
header: "acceptedDocumentsForNonProfit",
|
|
366
|
-
documents: ["annualReport"]
|
|
367
|
-
},
|
|
368
|
-
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
369
|
-
header: "acceptedDocumentsForPartnerships",
|
|
370
|
-
documents: ["irsScheduleK1"]
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
[CountryCodes.UnitedStates]: {
|
|
374
|
-
[CompanyTypesValues.PRIVATE_COMPANY]: {
|
|
375
|
-
header: "acceptedDocumentsForPrivateCompanies",
|
|
376
|
-
documents: ["irsCP575"]
|
|
377
|
-
},
|
|
378
|
-
[CompanyTypesValues.PUBLIC_COMPANY]: {
|
|
379
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
380
|
-
documents: ["annualReport", "secForm10k"]
|
|
381
|
-
},
|
|
382
|
-
[CompanyTypesValues.UNLISTED_PUBLIC_COMPANY]: {
|
|
383
|
-
header: "acceptedDocumentsForPublicCompanies",
|
|
384
|
-
documents: ["annualReport", "secForm10k"]
|
|
385
|
-
},
|
|
386
|
-
[CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]: {
|
|
387
|
-
header: "acceptedDocumentsForNonProfit",
|
|
388
|
-
documents: ["annualReport"]
|
|
389
|
-
},
|
|
390
|
-
[CompanyTypesValues.INCORPORATED_PARTNERSHIP]: {
|
|
391
|
-
header: "acceptedDocumentsForPartnerships",
|
|
392
|
-
documents: ["irsScheduleK1"]
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
const GuidanceContent = ({
|
|
397
|
-
country,
|
|
398
|
-
companyType
|
|
399
|
-
}) => {
|
|
400
|
-
const { t } = useTranslation(["common", "business"]);
|
|
401
|
-
const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
|
|
402
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
403
|
-
acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
404
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
|
|
405
|
-
/* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
|
|
406
|
-
] }),
|
|
407
|
-
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
408
|
-
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
409
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
410
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
|
|
411
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
|
|
412
|
-
] })
|
|
413
|
-
] })
|
|
414
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
415
|
-
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
|
|
416
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
417
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
418
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
419
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
420
|
-
] })
|
|
421
|
-
] }) });
|
|
422
|
-
};
|
|
423
|
-
function TaxDocument({
|
|
424
|
-
id,
|
|
425
|
-
country,
|
|
426
|
-
companyType = CompanyTypesValues.PRIVATE_COMPANY,
|
|
427
|
-
...props
|
|
428
|
-
}) {
|
|
429
|
-
const { t } = useTranslation("business");
|
|
430
|
-
return /* @__PURE__ */ jsx(
|
|
431
|
-
MemoizedDocumentUpload,
|
|
432
|
-
{
|
|
433
|
-
...props,
|
|
434
|
-
id,
|
|
435
|
-
heading: t(($) => $["companyTaxDocumentFormHeading"]),
|
|
436
|
-
description: t(($) => $["companyTaxDocumentFormDescription"]),
|
|
437
|
-
documentField: "taxDocument",
|
|
438
|
-
documentType: "proofOfOrganizationTaxInfo",
|
|
439
|
-
guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
|
|
440
|
-
companyType,
|
|
441
|
-
country,
|
|
442
|
-
hidePageCount: true
|
|
443
|
-
}
|
|
444
|
-
);
|
|
445
|
-
}
|
|
446
|
-
function BusinessDetailsMultiform({
|
|
447
|
-
taskType,
|
|
448
|
-
country,
|
|
449
|
-
activeForm,
|
|
450
|
-
shouldValidate,
|
|
451
|
-
problems = {},
|
|
452
|
-
handleNextClick,
|
|
453
|
-
handleBackClick,
|
|
454
|
-
setLoadingStatus,
|
|
455
|
-
isTopLevelEntity
|
|
456
|
-
}) {
|
|
457
|
-
const { t } = useTranslation(["common", "business"]);
|
|
458
|
-
const { form } = useFormContext();
|
|
459
|
-
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
|
|
460
|
-
function handleChange(formName, fieldName, mode) {
|
|
461
|
-
return form.handleChangeFor(fieldName, formName, mode);
|
|
462
|
-
}
|
|
463
|
-
const renderActiveForm = (activeForm2) => {
|
|
464
|
-
switch (activeForm2.formId) {
|
|
465
|
-
case "basicInformation":
|
|
466
|
-
return /* @__PURE__ */ jsx(
|
|
467
|
-
BasicInformation,
|
|
468
|
-
{
|
|
469
|
-
id: activeForm2.formId,
|
|
470
|
-
country,
|
|
471
|
-
shouldValidate,
|
|
472
|
-
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
473
|
-
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
474
|
-
companyType,
|
|
475
|
-
isTopLevelEntity,
|
|
476
|
-
disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
|
|
477
|
-
}
|
|
478
|
-
);
|
|
479
|
-
case "businessSelection":
|
|
480
|
-
return /* @__PURE__ */ jsx(
|
|
481
|
-
BusinessSelection,
|
|
482
|
-
{
|
|
483
|
-
id: activeForm2.formId,
|
|
484
|
-
country,
|
|
485
|
-
shouldValidate,
|
|
486
|
-
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
487
|
-
verificationErrors: problems.verificationErrors?.[activeForm2.formId],
|
|
488
|
-
handleNextClick,
|
|
489
|
-
handleBackClick,
|
|
490
|
-
setLoadingStatus
|
|
491
|
-
}
|
|
492
|
-
);
|
|
493
|
-
case "companyStructure":
|
|
494
|
-
return /* @__PURE__ */ jsx(
|
|
495
|
-
CompanyStructure,
|
|
496
|
-
{
|
|
497
|
-
id: activeForm2.formId,
|
|
498
|
-
country,
|
|
499
|
-
shouldValidate,
|
|
500
|
-
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
501
|
-
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
502
|
-
}
|
|
503
|
-
);
|
|
504
|
-
case "additionalInformation":
|
|
505
|
-
return /* @__PURE__ */ jsx(
|
|
506
|
-
AdditionalInformation,
|
|
507
|
-
{
|
|
508
|
-
id: activeForm2.formId,
|
|
509
|
-
country,
|
|
510
|
-
companyType,
|
|
511
|
-
shouldValidate,
|
|
512
|
-
validationErrors: problems.validationErrors?.[activeForm2.formId],
|
|
513
|
-
verificationErrors: problems.verificationErrors?.[activeForm2.formId]
|
|
514
|
-
}
|
|
515
|
-
);
|
|
516
|
-
case "companyTaxDocument":
|
|
517
|
-
return country === "US" ? /* @__PURE__ */ jsx(
|
|
518
|
-
TaxDocument,
|
|
519
|
-
{
|
|
520
|
-
id: activeForm2.formId,
|
|
521
|
-
country,
|
|
522
|
-
companyType,
|
|
523
|
-
shouldValidate,
|
|
524
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
525
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
526
|
-
data: form.data.companyTaxDocument,
|
|
527
|
-
errors: form.errors.companyTaxDocument,
|
|
528
|
-
valid: form.valid.companyTaxDocument,
|
|
529
|
-
allFields: form.allFields?.companyTaxDocument,
|
|
530
|
-
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
531
|
-
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
532
|
-
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
533
|
-
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
|
|
534
|
-
}
|
|
535
|
-
) : /* @__PURE__ */ jsx(
|
|
536
|
-
MemoizedDocumentUpload,
|
|
537
|
-
{
|
|
538
|
-
id: activeForm2.formId,
|
|
539
|
-
country,
|
|
540
|
-
companyType,
|
|
541
|
-
shouldValidate,
|
|
542
|
-
heading: t(($) => $["companyTaxDocumentFormHeading"], { ns: "business" }),
|
|
543
|
-
description: t(($) => $["companyTaxDocumentFormDescription"], { ns: "business" }),
|
|
544
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
545
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
|
|
546
|
-
data: form.data.companyTaxDocument,
|
|
547
|
-
errors: form.errors.companyTaxDocument,
|
|
548
|
-
valid: form.valid.companyTaxDocument,
|
|
549
|
-
allFields: form.allFields?.companyTaxDocument,
|
|
550
|
-
requiredFields: form.requiredFields?.companyTaxDocument,
|
|
551
|
-
optionalFields: form.optionalFields?.companyTaxDocument,
|
|
552
|
-
trustedFields: form.trustedFields?.companyTaxDocument,
|
|
553
|
-
handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
|
|
554
|
-
documentField: "taxDocument",
|
|
555
|
-
documentType: "vatDocument",
|
|
556
|
-
hidePageCount: true,
|
|
557
|
-
guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
|
|
558
|
-
/* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
|
|
559
|
-
" ",
|
|
560
|
-
t(($) => $["requirements"], { ns: "common" })
|
|
561
|
-
] }),
|
|
562
|
-
/* @__PURE__ */ jsxs("ul", { children: [
|
|
563
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
|
|
564
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
|
|
565
|
-
/* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
|
|
566
|
-
] })
|
|
567
|
-
] })
|
|
568
|
-
}
|
|
569
|
-
);
|
|
570
|
-
case "companyRegistrationDocument":
|
|
571
|
-
return /* @__PURE__ */ jsx(
|
|
572
|
-
RegistrationDocument,
|
|
573
|
-
{
|
|
574
|
-
id: activeForm2.formId,
|
|
575
|
-
country,
|
|
576
|
-
companyType,
|
|
577
|
-
data: form.data.companyRegistrationDocument,
|
|
578
|
-
errors: form.errors.companyRegistrationDocument,
|
|
579
|
-
valid: form.valid.companyRegistrationDocument,
|
|
580
|
-
allFields: form.allFields?.companyRegistrationDocument,
|
|
581
|
-
requiredFields: form.requiredFields?.companyRegistrationDocument,
|
|
582
|
-
optionalFields: form.optionalFields?.companyRegistrationDocument,
|
|
583
|
-
trustedFields: form.trustedFields?.companyRegistrationDocument,
|
|
584
|
-
handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
|
|
585
|
-
shouldValidate,
|
|
586
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
587
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
588
|
-
}
|
|
589
|
-
);
|
|
590
|
-
case "companyProofOfDirectorDocument":
|
|
591
|
-
return /* @__PURE__ */ jsx(
|
|
592
|
-
ProofOfDirectorDocument,
|
|
593
|
-
{
|
|
594
|
-
id: activeForm2.formId,
|
|
595
|
-
country,
|
|
596
|
-
data: form.data?.companyProofOfDirectorDocument,
|
|
597
|
-
errors: form.errors.companyProofOfDirectorDocument,
|
|
598
|
-
valid: form.valid.companyProofOfDirectorDocument,
|
|
599
|
-
allFields: form.allFields?.companyProofOfDirectorDocument,
|
|
600
|
-
requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
|
|
601
|
-
optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
|
|
602
|
-
trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
|
|
603
|
-
handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
|
|
604
|
-
shouldValidate,
|
|
605
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
606
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
607
|
-
}
|
|
608
|
-
);
|
|
609
|
-
case "companyProofOfSignatoryDocument":
|
|
610
|
-
return /* @__PURE__ */ jsx(
|
|
611
|
-
ProofOfSignatoryDocument,
|
|
612
|
-
{
|
|
613
|
-
id: activeForm2.formId,
|
|
614
|
-
country,
|
|
615
|
-
data: form.data?.companyProofOfSignatoryDocument,
|
|
616
|
-
errors: form.errors.companyProofOfSignatoryDocument,
|
|
617
|
-
valid: form.valid.companyProofOfSignatoryDocument,
|
|
618
|
-
allFields: form.allFields?.companyProofOfSignatoryDocument,
|
|
619
|
-
requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
|
|
620
|
-
optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
|
|
621
|
-
trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
|
|
622
|
-
handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
|
|
623
|
-
shouldValidate,
|
|
624
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
625
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
626
|
-
}
|
|
627
|
-
);
|
|
628
|
-
case "companyProofOfOwnershipDocument":
|
|
629
|
-
return /* @__PURE__ */ jsx(
|
|
630
|
-
ProofOfOwnershipDocument,
|
|
631
|
-
{
|
|
632
|
-
id: activeForm2.formId,
|
|
633
|
-
country,
|
|
634
|
-
data: form.data?.companyProofOfOwnershipDocument,
|
|
635
|
-
errors: form.errors.companyProofOfOwnershipDocument,
|
|
636
|
-
valid: form.valid.companyProofOfOwnershipDocument,
|
|
637
|
-
allFields: form.allFields?.companyProofOfOwnershipDocument,
|
|
638
|
-
requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
|
|
639
|
-
optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
|
|
640
|
-
trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
|
|
641
|
-
handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
|
|
642
|
-
shouldValidate,
|
|
643
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
644
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
645
|
-
}
|
|
646
|
-
);
|
|
647
|
-
case "companyConstitutionalDocument":
|
|
648
|
-
return /* @__PURE__ */ jsx(
|
|
649
|
-
MemoizedConstitutionalDocument,
|
|
650
|
-
{
|
|
651
|
-
id: activeForm2.formId,
|
|
652
|
-
legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
653
|
-
country,
|
|
654
|
-
data: form.data?.companyConstitutionalDocument,
|
|
655
|
-
errors: form.errors.companyConstitutionalDocument,
|
|
656
|
-
valid: form.valid.companyConstitutionalDocument,
|
|
657
|
-
allFields: form.allFields?.companyConstitutionalDocument,
|
|
658
|
-
requiredFields: form.requiredFields?.companyConstitutionalDocument,
|
|
659
|
-
optionalFields: form.optionalFields?.companyConstitutionalDocument,
|
|
660
|
-
trustedFields: form.trustedFields?.companyConstitutionalDocument,
|
|
661
|
-
handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
|
|
662
|
-
shouldValidate,
|
|
663
|
-
fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
|
|
664
|
-
formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
|
|
665
|
-
}
|
|
666
|
-
);
|
|
667
|
-
case "companyFinancialInformation":
|
|
668
|
-
return /* @__PURE__ */ jsx(
|
|
669
|
-
FinancialInformation,
|
|
670
|
-
{
|
|
671
|
-
multiForm: form,
|
|
672
|
-
id: activeForm2.formId,
|
|
673
|
-
country,
|
|
674
|
-
data: form.data?.companyFinancialInformation,
|
|
675
|
-
allFields: form.allFields?.companyFinancialInformation,
|
|
676
|
-
requiredFields: form.requiredFields?.companyFinancialInformation,
|
|
677
|
-
optionalFields: form.optionalFields?.companyFinancialInformation,
|
|
678
|
-
trustedFields: form.trustedFields?.companyFinancialInformation,
|
|
679
|
-
shouldValidate
|
|
680
|
-
}
|
|
681
|
-
);
|
|
682
|
-
default:
|
|
683
|
-
return null;
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
|
|
687
|
-
}
|
|
688
|
-
const CompanyStructureValidation = {
|
|
689
|
-
entityType: {
|
|
690
|
-
modes: ["blur"],
|
|
691
|
-
validate: (entityType) => !isEmpty(entityType),
|
|
692
|
-
errorMessage: "fieldIsRequired"
|
|
693
|
-
}
|
|
694
|
-
};
|
|
695
|
-
const mapApiDocumentToBusinessDetailsDocuments = (entityId) => {
|
|
696
|
-
const registrationDocument = getDocument(entityId, "registrationDocument") ?? null;
|
|
697
|
-
const taxDocument = getDocument(entityId, "vatDocument") ?? getDocument(entityId, "proofOfOrganizationTaxInfo") ?? null;
|
|
698
|
-
const proofOfDirector = getDocument(entityId, "proofOfDirector") ?? null;
|
|
699
|
-
const proofOfSignatory = getDocument(entityId, "proofOfSignatory") ?? null;
|
|
700
|
-
const proofOfOwnership = getDocument(entityId, "proofOfOwnership") ?? null;
|
|
701
|
-
const constitutionalDocument = getDocument(entityId, "constitutionalDocument") ?? null;
|
|
702
|
-
return {
|
|
703
|
-
companyRegistrationDocument: registrationDocument ? { registrationDocument: [mapExistingFile(getPageName(registrationDocument))] } : void 0,
|
|
704
|
-
companyTaxDocument: taxDocument ? { taxDocument: [mapExistingFile(getPageName(taxDocument))] } : void 0,
|
|
705
|
-
companyProofOfDirectorDocument: proofOfDirector ? { proofOfDirector: [mapExistingFile(getPageName(proofOfDirector))] } : void 0,
|
|
706
|
-
companyProofOfSignatoryDocument: proofOfSignatory ? { proofOfSignatory: [mapExistingFile(getPageName(proofOfSignatory))] } : void 0,
|
|
707
|
-
companyProofOfOwnershipDocument: proofOfOwnership ? { proofOfOwnership: [mapExistingFile(getPageName(proofOfOwnership))] } : void 0,
|
|
708
|
-
companyConstitutionalDocument: constitutionalDocument ? {
|
|
709
|
-
constitutionalDocument: [mapExistingFile(getPageName(constitutionalDocument))]
|
|
710
|
-
} : void 0
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
const mapBasicInformation = (data) => {
|
|
714
|
-
if (!data) return;
|
|
715
|
-
return !!data.country && COUNTRIES_USING_COMPANY_SEARCH.includes(data.country) ? data : entriesOf(data).reduce((acc, [field]) => {
|
|
716
|
-
if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
|
|
717
|
-
return {
|
|
718
|
-
...acc,
|
|
719
|
-
[field]: data[field]
|
|
720
|
-
};
|
|
721
|
-
}
|
|
722
|
-
return acc;
|
|
723
|
-
}, {});
|
|
724
|
-
};
|
|
725
|
-
const mapDbaName = (legalEntity) => {
|
|
726
|
-
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
727
|
-
const dbaName = {};
|
|
728
|
-
if (typeof entity?.doingBusinessAsAbsent !== "undefined") {
|
|
729
|
-
dbaName.hasDoingBusinessAs = !entity.doingBusinessAsAbsent;
|
|
730
|
-
} else {
|
|
731
|
-
if (entity?.doingBusinessAs) {
|
|
732
|
-
dbaName.hasDoingBusinessAs = entity?.doingBusinessAs !== (legalEntity.type === "organization" ? legalEntity.organization?.legalName : legalEntity.soleProprietorship?.name);
|
|
733
|
-
} else {
|
|
734
|
-
dbaName.hasDoingBusinessAs = void 0;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
if (legalEntity.organization?.doingBusinessAs) {
|
|
738
|
-
dbaName.doingBusinessAs = legalEntity.organization?.doingBusinessAs;
|
|
739
|
-
}
|
|
740
|
-
return dbaName;
|
|
741
|
-
};
|
|
742
|
-
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
743
|
-
const currentCountryTaxInfo = taxInformation?.find((taxInfo) => taxInfo.country === country);
|
|
744
|
-
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
745
|
-
return {
|
|
746
|
-
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
747
|
-
isUen: currentCountryTaxInfo.type === "UEN"
|
|
748
|
-
};
|
|
749
|
-
};
|
|
750
|
-
const mapAdditionalInformation = (data, legalEntity) => {
|
|
751
|
-
if (!data) return;
|
|
752
|
-
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
753
|
-
const currentCountry = entity?.registeredAddress.country;
|
|
754
|
-
const dbaNameFields = mapDbaName(legalEntity);
|
|
755
|
-
const isUen = mapIsUen(
|
|
756
|
-
data.taxInformation,
|
|
757
|
-
data.registrationNumber,
|
|
758
|
-
currentCountry
|
|
759
|
-
);
|
|
760
|
-
const companyType = legalEntity.type === "organization" ? legalEntity.organization?.type : CompanyTypesValues.SOLE_PROPRIETORSHIP;
|
|
761
|
-
const registrationNumberType = getDefaultRegistrationNumberType(
|
|
762
|
-
entity?.registrationNumber,
|
|
763
|
-
currentCountry,
|
|
764
|
-
companyType
|
|
765
|
-
);
|
|
766
|
-
const vatNumberType = getDefaultVatNumberType(entity?.vatNumber, currentCountry);
|
|
767
|
-
const operationalAddressIsSame = entity?.principalPlaceOfBusiness && !objectsDeepEqual(entity?.principalPlaceOfBusiness, entity?.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
768
|
-
if (entity?.registeredAddress?.localization) {
|
|
769
|
-
data.registrationAddress = {
|
|
770
|
-
...data.registrationAddress,
|
|
771
|
-
...mapAddressLocalizationToJpAddressSchema(entity.registeredAddress.localization)
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
if (entity?.principalPlaceOfBusiness?.localization) {
|
|
775
|
-
data.operationalAddress = {
|
|
776
|
-
...data.operationalAddress,
|
|
777
|
-
...mapAddressLocalizationToJpAddressSchema(entity.principalPlaceOfBusiness.localization)
|
|
778
|
-
};
|
|
779
|
-
}
|
|
780
|
-
const result = entriesOf(data).reduce(
|
|
781
|
-
(acc, [field]) => {
|
|
782
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) {
|
|
783
|
-
return {
|
|
784
|
-
...acc,
|
|
785
|
-
[field]: data[field]
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
if (!FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) {
|
|
789
|
-
return {
|
|
790
|
-
...acc,
|
|
791
|
-
[field]: data[field]
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
return acc;
|
|
795
|
-
},
|
|
796
|
-
{ operationalAddressIsSame, registrationNumberType, vatNumberType }
|
|
797
|
-
);
|
|
798
|
-
return { ...result, ...dbaNameFields, ...isUen };
|
|
799
|
-
};
|
|
800
|
-
const mapLegalNameLocalization = (data) => {
|
|
801
|
-
const localization = data.organization?.localization;
|
|
802
|
-
if (!localization) return {};
|
|
803
|
-
let result = {};
|
|
804
|
-
for (const { script, fields } of localization) {
|
|
805
|
-
const schemaFieldsFromLocalization = mapApiScriptLocalizationToSchemaFields({
|
|
806
|
-
script,
|
|
807
|
-
fields: {
|
|
808
|
-
// mismatch between API `legalName` and schema `legalCompanyName`
|
|
809
|
-
legalCompanyName: fields.legalName
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
result = {
|
|
813
|
-
...result,
|
|
814
|
-
...schemaFieldsFromLocalization
|
|
815
|
-
};
|
|
816
|
-
}
|
|
817
|
-
return result;
|
|
818
|
-
};
|
|
819
|
-
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
820
|
-
if (!legalEntity) return {};
|
|
821
|
-
const {
|
|
822
|
-
companyRegistrationDocument,
|
|
823
|
-
companyTaxDocument,
|
|
824
|
-
companyProofOfDirectorDocument,
|
|
825
|
-
companyProofOfSignatoryDocument,
|
|
826
|
-
companyProofOfOwnershipDocument,
|
|
827
|
-
companyConstitutionalDocument
|
|
828
|
-
} = mapApiDocumentToBusinessDetailsDocuments(legalEntity.id);
|
|
829
|
-
const buildSolePropSchema = () => {
|
|
830
|
-
const solePropData = formatObject(
|
|
831
|
-
legalEntity,
|
|
832
|
-
solePropBusinessDetailsKeyMapping
|
|
833
|
-
);
|
|
834
|
-
const country = solePropData?.additionalInformation?.registrationAddress?.country ?? parentEntity?.individual?.residentialAddress.country;
|
|
835
|
-
if (legalEntity?.soleProprietorship?.financialReports && solePropData) {
|
|
836
|
-
solePropData.companyFinancialInformation = mapFinancialReportsToFinancialInformation(
|
|
837
|
-
legalEntity.soleProprietorship.financialReports
|
|
838
|
-
);
|
|
839
|
-
}
|
|
840
|
-
return {
|
|
841
|
-
...solePropData,
|
|
842
|
-
basicInformation: {
|
|
843
|
-
...solePropData?.basicInformation,
|
|
844
|
-
country
|
|
845
|
-
},
|
|
846
|
-
companyConstitutionalDocument
|
|
847
|
-
};
|
|
848
|
-
};
|
|
849
|
-
const orgSchema = {
|
|
850
|
-
...formatObject(legalEntity, businessDetailsComponentsKeyMapping),
|
|
851
|
-
businessSelection: {},
|
|
852
|
-
companyRegistrationDocument,
|
|
853
|
-
companyTaxDocument,
|
|
854
|
-
companyProofOfDirectorDocument,
|
|
855
|
-
companyProofOfSignatoryDocument,
|
|
856
|
-
companyProofOfOwnershipDocument,
|
|
857
|
-
companyFinancialInformation: {}
|
|
858
|
-
};
|
|
859
|
-
const businessDetailsSchema = legalEntity.type === "organization" ? orgSchema : buildSolePropSchema();
|
|
860
|
-
return entriesOf(businessDetailsSchema).reduce((componentData, [key]) => {
|
|
861
|
-
switch (key) {
|
|
862
|
-
case "basicInformation": {
|
|
863
|
-
return {
|
|
864
|
-
...componentData,
|
|
865
|
-
[key]: {
|
|
866
|
-
...mapBasicInformation(businessDetailsSchema[key]),
|
|
867
|
-
...mapLegalNameLocalization(legalEntity)
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
case "businessSelection": {
|
|
872
|
-
return {
|
|
873
|
-
...componentData,
|
|
874
|
-
[key]: {
|
|
875
|
-
hasSelectedBusiness: false
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
case "companyStructure": {
|
|
880
|
-
return {
|
|
881
|
-
...componentData,
|
|
882
|
-
[key]: {
|
|
883
|
-
...businessDetailsSchema[key]
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
case "additionalInformation": {
|
|
888
|
-
return {
|
|
889
|
-
...componentData,
|
|
890
|
-
[key]: mapAdditionalInformation(businessDetailsSchema[key], legalEntity)
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
case "companyRegistrationDocument": {
|
|
894
|
-
return {
|
|
895
|
-
...componentData,
|
|
896
|
-
[key]: businessDetailsSchema[key]
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
case "companyTaxDocument": {
|
|
900
|
-
return {
|
|
901
|
-
...componentData,
|
|
902
|
-
[key]: businessDetailsSchema[key]
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
case "companyProofOfDirectorDocument": {
|
|
906
|
-
return {
|
|
907
|
-
...componentData,
|
|
908
|
-
[key]: businessDetailsSchema[key]
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
case "companyProofOfSignatoryDocument": {
|
|
912
|
-
return {
|
|
913
|
-
...componentData,
|
|
914
|
-
[key]: businessDetailsSchema[key]
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
case "companyProofOfOwnershipDocument": {
|
|
918
|
-
return {
|
|
919
|
-
...componentData,
|
|
920
|
-
[key]: businessDetailsSchema[key]
|
|
921
|
-
};
|
|
922
|
-
}
|
|
923
|
-
case "companyConstitutionalDocument": {
|
|
924
|
-
return {
|
|
925
|
-
...componentData,
|
|
926
|
-
[key]: businessDetailsSchema[key]
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
case "companyFinancialInformation": {
|
|
930
|
-
const financialReports = legalEntity.type === "organization" ? legalEntity?.organization?.financialReports : legalEntity?.soleProprietorship?.financialReports;
|
|
931
|
-
return financialReports?.length ? {
|
|
932
|
-
...componentData,
|
|
933
|
-
[key]: mapFinancialReportsToFinancialInformation(financialReports)
|
|
934
|
-
} : componentData;
|
|
935
|
-
}
|
|
936
|
-
default:
|
|
937
|
-
return componentData;
|
|
938
|
-
}
|
|
939
|
-
}, {});
|
|
940
|
-
};
|
|
941
|
-
const businessDetailsBase = {
|
|
942
|
-
/* Base required fields */
|
|
943
|
-
country: { rule: "REQUIRED" },
|
|
944
|
-
entityType: { rule: "businessRequiresCompanyType" },
|
|
945
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
946
|
-
jaHaniLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
947
|
-
jaKanaLegalCompanyName: { rule: "japaneseLegalCompanyName" },
|
|
948
|
-
hasDoingBusinessAs: { rule: "REQUIRED" },
|
|
949
|
-
doingBusinessAs: { rule: "requireDoingBusinessAsName" },
|
|
950
|
-
registrationAddress: { rule: "REQUIRED" },
|
|
951
|
-
operationalAddressIsSame: { rule: "REQUIRED" },
|
|
952
|
-
/* Base optional fields */
|
|
953
|
-
operationalAddress: { rule: "OPTIONAL" },
|
|
954
|
-
/* Fields with custom country specific rules */
|
|
955
|
-
hasSelectedBusiness: { rule: "requireBusinessSelection" },
|
|
956
|
-
stockExchangeMIC: { rule: "ifPubliclyTradedCompany" },
|
|
957
|
-
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
958
|
-
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
959
|
-
dateOfIncorporation: { rule: "isDateOfIncorporationRequired" },
|
|
960
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
961
|
-
registrationNumber: { rule: "countryRequiresRegistrationNumber" },
|
|
962
|
-
registrationNumberType: { rule: "registrationNumberType" },
|
|
963
|
-
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
964
|
-
eInvoicingCode: { rule: "isEInvoicingCodeEnabled" },
|
|
965
|
-
countryOfGoverningLaw: { rule: "countryOfGoverningLawRequired" },
|
|
966
|
-
taxDocument: { rule: "ifCountryUsAndTinFailed" },
|
|
967
|
-
/* Fields derived from capabilities */
|
|
968
|
-
industryCodes: { rule: "isIndustryCodeRequired" }
|
|
969
|
-
};
|
|
970
|
-
const taxInformationBase = {
|
|
971
|
-
vatNumber: { rule: "countryUsesVat" },
|
|
972
|
-
vatNumberType: { rule: "vatNumberType" },
|
|
973
|
-
exemptedFromVat: { rule: "isVatExempt" },
|
|
974
|
-
vatAbsenceReason: { rule: "isVatExempt" },
|
|
975
|
-
taxInformation: { rule: "countryUsesTaxId" },
|
|
976
|
-
exemptedFromTax: { rule: "countryHasTaxExemptions" },
|
|
977
|
-
isUen: { rule: "countryUsesUenOrGst" }
|
|
978
|
-
};
|
|
979
|
-
const financialInformationBase = {
|
|
980
|
-
numberOfEmployees: { rule: "countryRequiresFinancialInformation" },
|
|
981
|
-
financialReportingDate: { rule: "isFinancialReportingFieldsRequired" },
|
|
982
|
-
currency: { rule: "isFinancialReportingFieldsRequired" },
|
|
983
|
-
reportedValueOption: { rule: "isFinancialReportingFieldsRequired" },
|
|
984
|
-
annualTurnover: { rule: "annualTurnoverRequired" },
|
|
985
|
-
netAssets: { rule: "netAssetsRequired" },
|
|
986
|
-
balanceSheetTotal: { rule: "balanceSheetTotalRequired" }
|
|
987
|
-
};
|
|
988
|
-
const businessDetailsFieldsPerScenario = {
|
|
989
|
-
L0: {
|
|
990
|
-
country: { rule: "REQUIRED" },
|
|
991
|
-
legalCompanyName: { rule: "REQUIRED" },
|
|
992
|
-
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
993
|
-
...financialInformationBase
|
|
994
|
-
},
|
|
995
|
-
L1: {
|
|
996
|
-
...businessDetailsBase,
|
|
997
|
-
...financialInformationBase
|
|
998
|
-
},
|
|
999
|
-
L: {
|
|
1000
|
-
...businessDetailsBase,
|
|
1001
|
-
...taxInformationBase,
|
|
1002
|
-
...financialInformationBase
|
|
1003
|
-
},
|
|
1004
|
-
L_PROOFOFADDRESS: {
|
|
1005
|
-
// TODO this field does not exist
|
|
1006
|
-
// proofOfAddressDocument: { rule: 'REQUIRED' },
|
|
1007
|
-
},
|
|
1008
|
-
L_REGDOC: {
|
|
1009
|
-
registrationDocument: { rule: "REQUIRED" }
|
|
1010
|
-
},
|
|
1011
|
-
L_TAXDOC: {
|
|
1012
|
-
taxDocument: { rule: "REQUIRED" }
|
|
1013
|
-
},
|
|
1014
|
-
L_BAFIN: {
|
|
1015
|
-
legalForm: { rule: "REQUIRED" }
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
const adjustFormData = (oldFormData, newFormData) => {
|
|
1019
|
-
const schema = Array.from((/* @__PURE__ */ new Set([...keysOf(oldFormData), ...keysOf(newFormData)])).keys());
|
|
1020
|
-
return schema.reduce((acc, key) => {
|
|
1021
|
-
const oldValue = oldFormData[key];
|
|
1022
|
-
const newValue = newFormData[key];
|
|
1023
|
-
if (!isUndefinedOrNull(newValue)) return { ...acc, [key]: newValue };
|
|
1024
|
-
if (Array.isArray(oldValue)) return { ...acc, [key]: [] };
|
|
1025
|
-
if (typeof oldValue === "number") return { ...acc, [key]: null };
|
|
1026
|
-
if (typeof oldValue === "string") return { ...acc, [key]: "" };
|
|
1027
|
-
return { ...acc, [key]: "" };
|
|
1028
|
-
}, {});
|
|
1029
|
-
};
|
|
1030
|
-
const setRemovedFieldsOnSchemaToDeletedValue = (newData, existingData) => {
|
|
1031
|
-
const formIds = Array.from((/* @__PURE__ */ new Set([...keysOf(existingData), ...keysOf(newData)])).keys());
|
|
1032
|
-
return formIds.reduce((adjusted, formId) => {
|
|
1033
|
-
const oldFormData = existingData[formId];
|
|
1034
|
-
const newFormData = newData[formId];
|
|
1035
|
-
if (isUndefinedOrNull(oldFormData)) return { ...adjusted, [formId]: newFormData };
|
|
1036
|
-
if (isUndefinedOrNull(newFormData)) return adjusted;
|
|
1037
|
-
return { ...adjusted, [formId]: adjustFormData(oldFormData, newFormData) };
|
|
1038
|
-
}, {});
|
|
1039
|
-
};
|
|
1040
|
-
const formatFinancialInformationSummary = (data, language, country, dateOfIncorporation) => {
|
|
1041
|
-
let summary;
|
|
1042
|
-
if (!data) return void 0;
|
|
1043
|
-
if (dateOfIncorporation && !isDateOlderThanAYear(dateOfIncorporation)) {
|
|
1044
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
1045
|
-
summary = { numberOfEmployees: `${data.numberOfEmployees}` };
|
|
1046
|
-
return summary;
|
|
1047
|
-
}
|
|
1048
|
-
return void 0;
|
|
1049
|
-
}
|
|
1050
|
-
summary = {
|
|
1051
|
-
currency: data.currency,
|
|
1052
|
-
financialReportingDate: data.financialReportingDate
|
|
1053
|
-
};
|
|
1054
|
-
if (country === CountryCodes.UnitedKingdom) {
|
|
1055
|
-
summary.numberOfEmployees = `${data.numberOfEmployees}`;
|
|
1056
|
-
}
|
|
1057
|
-
if (data.balanceSheetTotal) {
|
|
1058
|
-
summary.balanceSheetTotal = summaryItem(
|
|
1059
|
-
"balanceSheetTotal",
|
|
1060
|
-
formatCurrency(data.balanceSheetTotal, data.currency, language)
|
|
1061
|
-
);
|
|
1062
|
-
}
|
|
1063
|
-
if (data.annualTurnover) {
|
|
1064
|
-
summary.annualTurnover = formatCurrency(data.annualTurnover, data.currency, language);
|
|
1065
|
-
}
|
|
1066
|
-
return summary;
|
|
1067
|
-
};
|
|
1068
|
-
const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
1069
|
-
const {
|
|
1070
|
-
companyRegistrationDocument,
|
|
1071
|
-
companyTaxDocument,
|
|
1072
|
-
companyProofOfDirectorDocument,
|
|
1073
|
-
companyConstitutionalDocument,
|
|
1074
|
-
companyProofOfSignatoryDocument,
|
|
1075
|
-
companyProofOfOwnershipDocument,
|
|
1076
|
-
basicInformation
|
|
1077
|
-
} = data;
|
|
1078
|
-
const taxDocumentType = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(
|
|
1079
|
-
basicInformation?.country
|
|
1080
|
-
) ? "proofOfOrganizationTaxInfo" : "vatDocument";
|
|
1081
|
-
const documents = await Promise.all([
|
|
1082
|
-
createDocumentRequest({
|
|
1083
|
-
entityId,
|
|
1084
|
-
entityType: "legalEntity",
|
|
1085
|
-
documentType: "registrationDocument",
|
|
1086
|
-
page1: companyRegistrationDocument?.registrationDocument?.[0]
|
|
1087
|
-
}),
|
|
1088
|
-
createDocumentRequest({
|
|
1089
|
-
entityId,
|
|
1090
|
-
entityType: "legalEntity",
|
|
1091
|
-
documentType: taxDocumentType,
|
|
1092
|
-
page1: companyTaxDocument?.taxDocument?.[0]
|
|
1093
|
-
}),
|
|
1094
|
-
createDocumentRequest({
|
|
1095
|
-
entityId,
|
|
1096
|
-
entityType: "legalEntity",
|
|
1097
|
-
documentType: "proofOfDirector",
|
|
1098
|
-
page1: companyProofOfDirectorDocument?.proofOfDirector?.[0]
|
|
1099
|
-
}),
|
|
1100
|
-
createDocumentRequest({
|
|
1101
|
-
entityId,
|
|
1102
|
-
entityType: "legalEntity",
|
|
1103
|
-
documentType: "constitutionalDocument",
|
|
1104
|
-
page1: companyConstitutionalDocument?.constitutionalDocument?.[0]
|
|
1105
|
-
}),
|
|
1106
|
-
createDocumentRequest({
|
|
1107
|
-
entityId,
|
|
1108
|
-
entityType: "legalEntity",
|
|
1109
|
-
documentType: "proofOfSignatory",
|
|
1110
|
-
page1: companyProofOfSignatoryDocument?.proofOfSignatory?.[0]
|
|
1111
|
-
}),
|
|
1112
|
-
createDocumentRequest({
|
|
1113
|
-
entityId,
|
|
1114
|
-
entityType: "legalEntity",
|
|
1115
|
-
documentType: "proofOfOwnership",
|
|
1116
|
-
page1: companyProofOfOwnershipDocument?.proofOfOwnership?.[0],
|
|
1117
|
-
page2: companyProofOfOwnershipDocument?.proofOfOwnership?.[1]
|
|
1118
|
-
})
|
|
1119
|
-
]);
|
|
1120
|
-
return documents.filter(Boolean);
|
|
1121
|
-
};
|
|
1122
|
-
const mapBusinessDetailsSchemaToLegalEntity = (data, accountHolder, isExperimentEnabled) => {
|
|
1123
|
-
const requestObj = {
|
|
1124
|
-
...formatObject(
|
|
1125
|
-
data,
|
|
1126
|
-
accountHolder === "mySoleProprietorName" ? solePropBusinessDetailsApiKeyMapping : businessDetailsApiKeyMapping
|
|
1127
|
-
)
|
|
1128
|
-
};
|
|
1129
|
-
delete requestObj.organization?.legalFormDescription;
|
|
1130
|
-
const canSaveRegNumberAbsentState = isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(
|
|
1131
|
-
data.basicInformation?.country,
|
|
1132
|
-
data.companyStructure?.entityType
|
|
1133
|
-
);
|
|
1134
|
-
const taxData = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
1135
|
-
data.basicInformation?.country
|
|
1136
|
-
) ? data.basicInformation?.taxInformation : data.additionalInformation?.taxInformation;
|
|
1137
|
-
const registrationNumber = COUNTRIES_USING_COMPANY_SEARCH.includes(
|
|
1138
|
-
data.basicInformation?.country
|
|
1139
|
-
) ? data.basicInformation?.registrationNumber : data.additionalInformation?.registrationNumber;
|
|
1140
|
-
const localization = [
|
|
1141
|
-
mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaHani"),
|
|
1142
|
-
mapSchemaFieldsToApiScriptLocalization(data.basicInformation ?? {}, "jaKana")
|
|
1143
|
-
].filter(({ fields }) => !isEmpty$1(fields)).map(({ script, fields }) => ({
|
|
1144
|
-
script,
|
|
1145
|
-
// mismatch between API `legalName` and schema `legalCompanyName`
|
|
1146
|
-
fields: { legalName: fields.legalCompanyName }
|
|
1147
|
-
}));
|
|
1148
|
-
const doingBusinessAs = data.additionalInformation?.doingBusinessAs ?? "";
|
|
1149
|
-
const entityObject = isEmpty$1(data.companyStructure) ? requestObj.soleProprietorship : requestObj.organization;
|
|
1150
|
-
if (entityObject) {
|
|
1151
|
-
if (taxData) {
|
|
1152
|
-
entityObject.taxInformation = taxData;
|
|
1153
|
-
}
|
|
1154
|
-
if (!!requestObj.soleProprietorship && !requestObj.soleProprietorship?.countryOfGoverningLaw && !!data.basicInformation?.country) {
|
|
1155
|
-
requestObj.soleProprietorship.countryOfGoverningLaw = data.basicInformation.country;
|
|
1156
|
-
}
|
|
1157
|
-
if (registrationNumber) {
|
|
1158
|
-
entityObject.registrationNumber = registrationNumber;
|
|
1159
|
-
if (canSaveRegNumberAbsentState && requestObj.organization) {
|
|
1160
|
-
requestObj.organization.registrationNumberAbsent = false;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
if (requestObj.organization && entityObject && localization.length > 0) {
|
|
1164
|
-
entityObject.localization = localization;
|
|
1165
|
-
}
|
|
1166
|
-
if (data.additionalInformation?.exemptedFromRegistrationNumber && canSaveRegNumberAbsentState && requestObj.organization) {
|
|
1167
|
-
requestObj.organization.registrationNumberAbsent = data.additionalInformation?.exemptedFromRegistrationNumber;
|
|
1168
|
-
}
|
|
1169
|
-
if (data.additionalInformation?.vatAbsenceReason) {
|
|
1170
|
-
entityObject.vatNumber = "";
|
|
1171
|
-
}
|
|
1172
|
-
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
1173
|
-
if (typeof data.additionalInformation?.hasDoingBusinessAs !== "undefined") {
|
|
1174
|
-
entityObject.doingBusinessAsAbsent = !data.additionalInformation?.hasDoingBusinessAs;
|
|
1175
|
-
}
|
|
1176
|
-
} else {
|
|
1177
|
-
entityObject.doingBusinessAs = doingBusinessAs || data.basicInformation?.legalCompanyName;
|
|
1178
|
-
delete entityObject.doingBusinessAsAbsent;
|
|
1179
|
-
}
|
|
1180
|
-
if (data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && entityObject.principalPlaceOfBusiness) {
|
|
1181
|
-
entityObject.principalPlaceOfBusiness = entityObject.registeredAddress;
|
|
1182
|
-
}
|
|
1183
|
-
if (entityObject.registeredAddress) {
|
|
1184
|
-
const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
|
|
1185
|
-
data.additionalInformation?.registrationAddress
|
|
1186
|
-
);
|
|
1187
|
-
if (addressLocalizations.length > 0)
|
|
1188
|
-
entityObject.registeredAddress.localization = addressLocalizations;
|
|
1189
|
-
}
|
|
1190
|
-
if (!isEmpty$1(data.companyFinancialInformation)) {
|
|
1191
|
-
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1192
|
-
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1193
|
-
);
|
|
1194
|
-
entityObject.financialReports = [
|
|
1195
|
-
mapFinancialInformationToFinancialReport(
|
|
1196
|
-
data.companyFinancialInformation,
|
|
1197
|
-
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1198
|
-
)
|
|
1199
|
-
];
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
requestObj.type = requestObj.organization ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1203
|
-
if (entityObject?.registeredAddress.country === "US") {
|
|
1204
|
-
delete entityObject.registrationNumber;
|
|
1205
|
-
}
|
|
1206
|
-
if (!canSaveRegNumberAbsentState) {
|
|
1207
|
-
delete requestObj.organization?.registrationNumberAbsent;
|
|
1208
|
-
}
|
|
1209
|
-
return requestObj;
|
|
1210
|
-
};
|
|
1211
|
-
function buildRequiredForms({
|
|
1212
|
-
config: {
|
|
1213
|
-
forms,
|
|
1214
|
-
requiredFields,
|
|
1215
|
-
optionalFields,
|
|
1216
|
-
isValid,
|
|
1217
|
-
problems,
|
|
1218
|
-
isSettingEnabled,
|
|
1219
|
-
accountHolder,
|
|
1220
|
-
legalEntityResponse
|
|
1221
|
-
},
|
|
1222
|
-
options
|
|
1223
|
-
}) {
|
|
1224
|
-
const skipCompanyStructure = !!verifiedBusiness.value?.legalForm || isSettingEnabled(SettingNames.AllowLegalEntityTypeChange) && organizationTypesToSkipCompanyStructureForm.includes(
|
|
1225
|
-
legalEntityResponse?.organization?.type ?? ""
|
|
1226
|
-
) && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership";
|
|
1227
|
-
const filteredForms = Object.values(forms).filter(({ formId }) => {
|
|
1228
|
-
if (formId === "businessSelection") {
|
|
1229
|
-
if (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value) return false;
|
|
1230
|
-
}
|
|
1231
|
-
if (formId === "companyStructure") {
|
|
1232
|
-
if (skipCompanyStructure) return false;
|
|
1233
|
-
}
|
|
1234
|
-
if (requiredFields || optionalFields) {
|
|
1235
|
-
return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
|
|
1236
|
-
}
|
|
1237
|
-
return true;
|
|
1238
|
-
});
|
|
1239
|
-
const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
|
|
1240
|
-
return addValidityToForms(requiredForms, isValid, problems);
|
|
1241
|
-
}
|
|
1242
|
-
const isDocumentsRequired = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
1243
|
-
const formatBasicInformation = (data, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
1244
|
-
const country = data?.country;
|
|
1245
|
-
const registrationNumberLabel = resolveFieldMetadata(
|
|
1246
|
-
registrationNumberDefaultFieldConfig[country],
|
|
1247
|
-
{
|
|
1248
|
-
companyType,
|
|
1249
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1250
|
-
},
|
|
1251
|
-
registrationNumberDefaultFieldMetadata
|
|
1252
|
-
).label;
|
|
1253
|
-
const taxIdLabel = resolveFieldMetadata(
|
|
1254
|
-
taxInformationDefaultFieldConfig[country],
|
|
1255
|
-
{
|
|
1256
|
-
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1257
|
-
// TODO use type selector
|
|
1258
|
-
companyType: void 0
|
|
1259
|
-
},
|
|
1260
|
-
taxInformationDefaultFieldMetadata
|
|
1261
|
-
).label;
|
|
1262
|
-
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
1263
|
-
return {
|
|
1264
|
-
["legalCompanyName"]: data.legalCompanyName,
|
|
1265
|
-
country: datasetUtils.getCountryName(data.country),
|
|
1266
|
-
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
1267
|
-
data.stateOrProvince,
|
|
1268
|
-
data.country
|
|
1269
|
-
),
|
|
1270
|
-
[taxIdLabel]: data.taxInformation?.find((taxId) => data.country === taxId.country)?.number,
|
|
1271
|
-
[registrationNumberLabel]: data.registrationNumber,
|
|
1272
|
-
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
1273
|
-
};
|
|
1274
|
-
};
|
|
1275
|
-
const formatAdditionalInformation = (data, country, companyType, t) => {
|
|
1276
|
-
const registrationNumberLabel = resolveFieldMetadata(
|
|
1277
|
-
registrationNumberDefaultFieldConfig[country],
|
|
1278
|
-
{
|
|
1279
|
-
companyType,
|
|
1280
|
-
registrationNumberType: data.registrationNumber ? inferCompanyRegistrationNumberType(data?.registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id
|
|
1281
|
-
},
|
|
1282
|
-
registrationNumberDefaultFieldMetadata
|
|
1283
|
-
).label;
|
|
1284
|
-
const taxIdLabel = resolveFieldMetadata(
|
|
1285
|
-
taxInformationDefaultFieldConfig[country],
|
|
1286
|
-
{
|
|
1287
|
-
taxIdNumberType: countryToTaxInfoTypeMap[country] ?? void 0,
|
|
1288
|
-
// TODO use type selector
|
|
1289
|
-
companyType: void 0
|
|
1290
|
-
},
|
|
1291
|
-
taxInformationDefaultFieldMetadata
|
|
1292
|
-
).label;
|
|
1293
|
-
return {
|
|
1294
|
-
["businessStructure"]: data.legalFormLabel,
|
|
1295
|
-
["doingBusinessAs"]: data.doingBusinessAs,
|
|
1296
|
-
["industry"]: data.industryCodes?.[0].name,
|
|
1297
|
-
[registrationNumberLabel]: data.registrationNumber,
|
|
1298
|
-
[taxIdLabel]: data.isUen ? void 0 : data.taxInformation?.find((taxId) => country === taxId.country)?.number,
|
|
1299
|
-
["vatNumber"]: data.vatNumber,
|
|
1300
|
-
["vatAbsenceReason"]: data.vatAbsenceReason ? t(($) => $[data.vatAbsenceReason], { ns: "common" }) : void 0,
|
|
1301
|
-
["dateOfIncorporation"]: data.dateOfIncorporation,
|
|
1302
|
-
["stockExchangeMIC"]: data.stockExchangeMIC,
|
|
1303
|
-
["stockISIN"]: data.stockISIN,
|
|
1304
|
-
["stockTickerSymbol"]: data.stockTickerSymbol,
|
|
1305
|
-
["eInvoicingCode"]: data.eInvoicingCode
|
|
1306
|
-
};
|
|
1307
|
-
};
|
|
1308
|
-
const formatDataForSummary = (data, forms, t, language, isExperimentEnabled) => {
|
|
1309
|
-
const datasetUtils = datasetUtilities(language);
|
|
1310
|
-
return entriesOf(data).reduce((summaryData, [form]) => {
|
|
1311
|
-
if (!form || !data[form]) return summaryData;
|
|
1312
|
-
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1313
|
-
"EnableCountryOfGoverningLawForUKCompanies"
|
|
1314
|
-
);
|
|
1315
|
-
switch (form) {
|
|
1316
|
-
case "basicInformation":
|
|
1317
|
-
return {
|
|
1318
|
-
...summaryData,
|
|
1319
|
-
[form]: formatBasicInformation(
|
|
1320
|
-
data[form],
|
|
1321
|
-
datasetUtils,
|
|
1322
|
-
data.companyStructure?.entityType,
|
|
1323
|
-
isCountryOfGoverningLawEnabled
|
|
1324
|
-
)
|
|
1325
|
-
};
|
|
1326
|
-
case "companyStructure":
|
|
1327
|
-
return {
|
|
1328
|
-
...summaryData,
|
|
1329
|
-
[form]: {
|
|
1330
|
-
entityType: t(
|
|
1331
|
-
($) => $[companyTypeMetadata[data["companyStructure"]?.entityType]?.name],
|
|
1332
|
-
{
|
|
1333
|
-
ns: "business"
|
|
1334
|
-
}
|
|
1335
|
-
)
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
case "additionalInformation":
|
|
1339
|
-
return {
|
|
1340
|
-
...summaryData,
|
|
1341
|
-
[form]: {
|
|
1342
|
-
hasInnerForms: true,
|
|
1343
|
-
additionalInformationFormName: formatAdditionalInformation(
|
|
1344
|
-
data[form],
|
|
1345
|
-
data.basicInformation?.country,
|
|
1346
|
-
data.companyStructure?.entityType,
|
|
1347
|
-
t
|
|
1348
|
-
),
|
|
1349
|
-
registrationAddress: data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].registrationAddress, datasetUtils) : mapAddressLabels(data[form].registrationAddress, datasetUtils),
|
|
1350
|
-
operationalAddress: data[form].operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME ? data.basicInformation?.country === CountryCodes.Japan ? mapJpAddressSummary(data[form].operationalAddress, datasetUtils) : mapAddressLabels(data[form].operationalAddress, datasetUtils) : void 0
|
|
1351
|
-
}
|
|
1352
|
-
};
|
|
1353
|
-
case "companyRegistrationDocument":
|
|
1354
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1355
|
-
return {
|
|
1356
|
-
...summaryData,
|
|
1357
|
-
[form]: {
|
|
1358
|
-
companyRegistrationDocument: {
|
|
1359
|
-
fileName: data[form].registrationDocument?.[0]?.name
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
};
|
|
1363
|
-
case "companyTaxDocument":
|
|
1364
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1365
|
-
return {
|
|
1366
|
-
...summaryData,
|
|
1367
|
-
[form]: {
|
|
1368
|
-
companyTaxDocument: {
|
|
1369
|
-
fileName: data[form].taxDocument?.[0]?.name
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
};
|
|
1373
|
-
case "companyProofOfDirectorDocument":
|
|
1374
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1375
|
-
return {
|
|
1376
|
-
...summaryData,
|
|
1377
|
-
[form]: {
|
|
1378
|
-
companyProofOfDirectorDocument: {
|
|
1379
|
-
fileName: data[form].proofOfDirector?.[0]?.name
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
};
|
|
1383
|
-
case "companyProofOfSignatoryDocument":
|
|
1384
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1385
|
-
return {
|
|
1386
|
-
...summaryData,
|
|
1387
|
-
[form]: {
|
|
1388
|
-
companyProofOfSignatoryDocument: {
|
|
1389
|
-
fileName: data[form].proofOfSignatory?.[0]?.name
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
};
|
|
1393
|
-
case "companyProofOfOwnershipDocument":
|
|
1394
|
-
if (!isDocumentsRequired(forms)) return summaryData;
|
|
1395
|
-
return {
|
|
1396
|
-
...summaryData,
|
|
1397
|
-
[form]: {
|
|
1398
|
-
companyProofOfOwnershipDocument: {
|
|
1399
|
-
fileName: data[form].proofOfOwnership?.map((doc) => doc.name).join("\n")
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
};
|
|
1403
|
-
case "companyFinancialInformation": {
|
|
1404
|
-
const isIncorporationDateDependencyEnabled = isExperimentEnabled(
|
|
1405
|
-
"EnableIncorporationDateBasedFinancialValidationForHO"
|
|
1406
|
-
);
|
|
1407
|
-
return {
|
|
1408
|
-
...summaryData,
|
|
1409
|
-
[form]: formatFinancialInformationSummary(
|
|
1410
|
-
data[form],
|
|
1411
|
-
language,
|
|
1412
|
-
data?.basicInformation?.country,
|
|
1413
|
-
isIncorporationDateDependencyEnabled ? data?.additionalInformation?.dateOfIncorporation : void 0
|
|
1414
|
-
)
|
|
1415
|
-
};
|
|
1416
|
-
}
|
|
1417
|
-
default:
|
|
1418
|
-
return summaryData;
|
|
1419
|
-
}
|
|
1420
|
-
}, {});
|
|
1421
|
-
};
|
|
1422
|
-
async function submitDocuments({
|
|
1423
|
-
data,
|
|
1424
|
-
legalEntity,
|
|
1425
|
-
forms,
|
|
1426
|
-
documentUtils,
|
|
1427
|
-
userEvents
|
|
1428
|
-
}) {
|
|
1429
|
-
if (!isDocumentsRequired(forms)) return;
|
|
1430
|
-
const logger = createLogger();
|
|
1431
|
-
const formattedDocument = await mapBusinessDetailsDocumentToApiDocument(data, legalEntity.id);
|
|
1432
|
-
try {
|
|
1433
|
-
if (formattedDocument) {
|
|
1434
|
-
await documentUtils.uploadDocuments(formattedDocument, legalEntity.id);
|
|
1435
|
-
formattedDocument.forEach((doc) => {
|
|
1436
|
-
userEvents?.addTaskEvent("Success", {
|
|
1437
|
-
actionType: "upload",
|
|
1438
|
-
documentType: doc.type,
|
|
1439
|
-
fileExtention: doc.attachments?.map((item) => getFileExtention(item.pageName)).filter((item) => item !== void 0) ?? []
|
|
1440
|
-
});
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
} catch (err) {
|
|
1444
|
-
logger.error(err);
|
|
1445
|
-
userEvents.addTaskEvent("Encountered error", {
|
|
1446
|
-
actionType: "upload",
|
|
1447
|
-
returnType: err.errorCode,
|
|
1448
|
-
returnValue: err.title ?? err.message
|
|
1449
|
-
});
|
|
1450
|
-
}
|
|
1451
|
-
}
|
|
1452
|
-
async function submit({
|
|
1453
|
-
data,
|
|
1454
|
-
legalEntityResponse,
|
|
1455
|
-
associatedLegalArrangement,
|
|
1456
|
-
nestedLegalEntity,
|
|
1457
|
-
nestedLegalEntityDetails,
|
|
1458
|
-
problems,
|
|
1459
|
-
taskType,
|
|
1460
|
-
accountHolder,
|
|
1461
|
-
forms,
|
|
1462
|
-
documentUtils,
|
|
1463
|
-
t,
|
|
1464
|
-
showToast,
|
|
1465
|
-
setLoadingStatus,
|
|
1466
|
-
setProblems,
|
|
1467
|
-
handleUpdateLegalEntity,
|
|
1468
|
-
createLegalEntity,
|
|
1469
|
-
onExternalSubmit,
|
|
1470
|
-
isExperimentEnabled,
|
|
1471
|
-
userEvents,
|
|
1472
|
-
efpBusinessLines,
|
|
1473
|
-
createBusinessLine,
|
|
1474
|
-
updateBusinessLine
|
|
1475
|
-
}) {
|
|
1476
|
-
const logger = createLogger();
|
|
1477
|
-
setLoadingStatus("loading");
|
|
1478
|
-
let trackingPayload = {
|
|
1479
|
-
actionType: "submit",
|
|
1480
|
-
companyStructure: data.companyStructure?.entityType,
|
|
1481
|
-
countryOfRegistration: data.basicInformation?.country,
|
|
1482
|
-
legalEntityName: accountHolder === "theCompanyIWorkFor" ? data.basicInformation?.legalCompanyName : void 0,
|
|
1483
|
-
// Only send legalCompanyName for organizations
|
|
1484
|
-
usedAdditionalAddress: data.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
1485
|
-
};
|
|
1486
|
-
const entityToUpdate = (() => {
|
|
1487
|
-
switch (taskType) {
|
|
1488
|
-
case TaskTypes.SOLE_PROPRIETOR_COMPANY:
|
|
1489
|
-
return associatedLegalArrangement;
|
|
1490
|
-
case TaskTypes.TRUST_MEMBER_COMPANY:
|
|
1491
|
-
case TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY:
|
|
1492
|
-
return nestedLegalEntity;
|
|
1493
|
-
case TaskTypes.BUSINESS_DETAILS:
|
|
1494
|
-
default:
|
|
1495
|
-
return legalEntityResponse;
|
|
1496
|
-
}
|
|
1497
|
-
})();
|
|
1498
|
-
const handleSubmitLegalEntity = async (legalEntity) => {
|
|
1499
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY && !nestedLegalEntity?.id || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1500
|
-
return await createLegalEntity(legalEntity);
|
|
1501
|
-
} else {
|
|
1502
|
-
return handleUpdateLegalEntity({
|
|
1503
|
-
...drop("type").from(legalEntity),
|
|
1504
|
-
id: entityToUpdate?.id ?? legalEntityResponse.id
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
|
-
};
|
|
1508
|
-
const associateLegalEntityWithParent = async ({
|
|
1509
|
-
legalEntity,
|
|
1510
|
-
associatedLegalArrangement: associatedLegalArrangement2,
|
|
1511
|
-
nestedLegalEntityDetails: nestedLegalEntityDetails2
|
|
1512
|
-
}) => {
|
|
1513
|
-
if (nestedLegalEntityDetails2 && associatedLegalArrangement2) {
|
|
1514
|
-
const existingEntityAssociations = getOwnEntityAssociations(associatedLegalArrangement2);
|
|
1515
|
-
const existingRoles = existingEntityAssociations.filter((ea) => ea.legalEntityId === associatedLegalArrangement2.id).map(({ type }) => type);
|
|
1516
|
-
const newRoles = nestedLegalEntityDetails2?.roles ?? [];
|
|
1517
|
-
const rolesChanged = !doArraysMatch(existingRoles, newRoles);
|
|
1518
|
-
if (rolesChanged) {
|
|
1519
|
-
const updatedAssociations = {
|
|
1520
|
-
entityAssociations: [
|
|
1521
|
-
...newRoles.map((role) => ({
|
|
1522
|
-
type: role,
|
|
1523
|
-
legalEntityId: legalEntity.id
|
|
1524
|
-
})) || [],
|
|
1525
|
-
...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
|
|
1526
|
-
]
|
|
1527
|
-
};
|
|
1528
|
-
await handleUpdateLegalEntity({
|
|
1529
|
-
...updatedAssociations,
|
|
1530
|
-
id: associatedLegalArrangement2.id
|
|
1531
|
-
});
|
|
1532
|
-
}
|
|
1533
|
-
return;
|
|
1534
|
-
} else {
|
|
1535
|
-
const updatedAssociations = {
|
|
1536
|
-
entityAssociations: [
|
|
1537
|
-
{
|
|
1538
|
-
type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
1539
|
-
legalEntityId: legalEntity.id
|
|
1540
|
-
}
|
|
1541
|
-
]
|
|
1542
|
-
};
|
|
1543
|
-
await handleUpdateLegalEntity({ ...updatedAssociations, id: legalEntityResponse.id });
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, void 0) : null;
|
|
1547
|
-
const filteredData = savedLegalEntityData ? setRemovedFieldsOnSchemaToDeletedValue(data, savedLegalEntityData) : data;
|
|
1548
|
-
if (filteredData?.additionalInformation && !filteredData?.additionalInformation?.taxInformation) {
|
|
1549
|
-
filteredData.additionalInformation.taxInformation = void 0;
|
|
1550
|
-
}
|
|
1551
|
-
const isCountryOfGoverningLawEnabled = isExperimentEnabled(
|
|
1552
|
-
"EnableCountryOfGoverningLawForUKCompanies"
|
|
1553
|
-
);
|
|
1554
|
-
const countryOfGoverningLaw = getCountryOfGoverningLaw(
|
|
1555
|
-
isCountryOfGoverningLawEnabled,
|
|
1556
|
-
filteredData?.basicInformation
|
|
1557
|
-
);
|
|
1558
|
-
if (filteredData?.basicInformation) {
|
|
1559
|
-
if (countryOfGoverningLaw) {
|
|
1560
|
-
filteredData.basicInformation.countryOfGoverningLaw = countryOfGoverningLaw;
|
|
1561
|
-
} else {
|
|
1562
|
-
delete filteredData.basicInformation.countryOfGoverningLaw;
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
const primaryIndustryCode = data.additionalInformation?.industryCodes && data.additionalInformation.industryCodes[0].id;
|
|
1566
|
-
if (createBusinessLine && updateBusinessLine && primaryIndustryCode) {
|
|
1567
|
-
const bankingBusinessLines = [];
|
|
1568
|
-
const issuingBusinessLines = [];
|
|
1569
|
-
if (efpBusinessLines) {
|
|
1570
|
-
for (const bl of efpBusinessLines) {
|
|
1571
|
-
if (bl.service === "banking") bankingBusinessLines.push(bl);
|
|
1572
|
-
else issuingBusinessLines.push(bl);
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
const promises = [];
|
|
1576
|
-
const operations = [];
|
|
1577
|
-
const updateOrCreateBusinessLinesIfNeeded = (businessLines, requestedCapability, service) => {
|
|
1578
|
-
if (businessLines.length) {
|
|
1579
|
-
for (const bl of businessLines) {
|
|
1580
|
-
if (bl.industryCode === primaryIndustryCode) continue;
|
|
1581
|
-
const payload = {
|
|
1582
|
-
id: bl.id,
|
|
1583
|
-
legalEntityId: legalEntityResponse.id,
|
|
1584
|
-
industryCode: primaryIndustryCode,
|
|
1585
|
-
service
|
|
1586
|
-
};
|
|
1587
|
-
promises.push(updateBusinessLine(payload));
|
|
1588
|
-
operations.push(payload);
|
|
1589
|
-
}
|
|
1590
|
-
} else if (requestedCapability) {
|
|
1591
|
-
const payload = {
|
|
1592
|
-
legalEntityId: legalEntityResponse.id,
|
|
1593
|
-
industryCode: primaryIndustryCode,
|
|
1594
|
-
service
|
|
1595
|
-
};
|
|
1596
|
-
promises.push(createBusinessLine(payload));
|
|
1597
|
-
operations.push(payload);
|
|
1598
|
-
}
|
|
1599
|
-
};
|
|
1600
|
-
updateOrCreateBusinessLinesIfNeeded(
|
|
1601
|
-
bankingBusinessLines,
|
|
1602
|
-
requestingBanking(legalEntityResponse),
|
|
1603
|
-
"banking"
|
|
1604
|
-
);
|
|
1605
|
-
updateOrCreateBusinessLinesIfNeeded(
|
|
1606
|
-
issuingBusinessLines,
|
|
1607
|
-
requestingIssuing(legalEntityResponse),
|
|
1608
|
-
"issuing"
|
|
1609
|
-
);
|
|
1610
|
-
let hadRejection = false;
|
|
1611
|
-
(await Promise.allSettled(promises)).forEach((result, idx) => {
|
|
1612
|
-
if (result.status !== "rejected") return;
|
|
1613
|
-
const op = operations[idx];
|
|
1614
|
-
logger.log(
|
|
1615
|
-
`Failed to ${op.id ? "update" : "create"} business line with payload: ${JSON.stringify(op)}`
|
|
1616
|
-
);
|
|
1617
|
-
hadRejection = true;
|
|
1618
|
-
});
|
|
1619
|
-
const eventPayload = {
|
|
1620
|
-
actionType: trackingPayload.actionType,
|
|
1621
|
-
legalEntityName: trackingPayload.legalEntityName
|
|
1622
|
-
};
|
|
1623
|
-
if (!hadRejection) {
|
|
1624
|
-
userEvents?.addTaskEvent("Success", eventPayload);
|
|
1625
|
-
} else {
|
|
1626
|
-
userEvents?.addTaskEvent("Encountered error", {
|
|
1627
|
-
...eventPayload,
|
|
1628
|
-
returnType: "businessLines",
|
|
1629
|
-
returnValue: "couldNotCreateOrUpdateBusinessLine"
|
|
1630
|
-
});
|
|
1631
|
-
showToast({
|
|
1632
|
-
label: t(($) => $["failedToUpdateEfpBusinessLines"], { ns: "business" }),
|
|
1633
|
-
variant: "error"
|
|
1634
|
-
});
|
|
1635
|
-
return setLoadingStatus("success");
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
try {
|
|
1639
|
-
const mappedLegalEntity = {
|
|
1640
|
-
...mapBusinessDetailsSchemaToLegalEntity(filteredData, accountHolder, isExperimentEnabled),
|
|
1641
|
-
entityAssociations: filterOutUnwantedAssociationsIfRootLE(
|
|
1642
|
-
taskType,
|
|
1643
|
-
entityToUpdate,
|
|
1644
|
-
accountHolder
|
|
1645
|
-
)
|
|
1646
|
-
};
|
|
1647
|
-
if (mappedLegalEntity.type === LegalEntityTypes.ORGANIZATION && legalEntityResponse.organization?.countryOfGoverningLaw !== mappedLegalEntity.organization?.countryOfGoverningLaw && legalEntityResponse.organization?.support) {
|
|
1648
|
-
mappedLegalEntity.organization.support = determineCustomerSupport(
|
|
1649
|
-
legalEntityResponse.organization.support,
|
|
1650
|
-
mappedLegalEntity.organization?.countryOfGoverningLaw
|
|
1651
|
-
);
|
|
1652
|
-
}
|
|
1653
|
-
const legalEntity = await handleSubmitLegalEntity(mappedLegalEntity);
|
|
1654
|
-
if (taskType === TaskTypes.TRUST_MEMBER_COMPANY || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY || taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && !associatedLegalArrangement?.id) {
|
|
1655
|
-
await associateLegalEntityWithParent({
|
|
1656
|
-
legalEntity,
|
|
1657
|
-
associatedLegalArrangement,
|
|
1658
|
-
nestedLegalEntityDetails
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
await submitDocuments({
|
|
1662
|
-
data,
|
|
1663
|
-
legalEntity,
|
|
1664
|
-
documentUtils,
|
|
1665
|
-
forms,
|
|
1666
|
-
userEvents
|
|
1667
|
-
});
|
|
1668
|
-
userEvents?.addTaskEvent("Success", trackingPayload);
|
|
1669
|
-
showToast({
|
|
1670
|
-
label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
|
|
1671
|
-
variant: "success"
|
|
1672
|
-
});
|
|
1673
|
-
onExternalSubmit?.(data);
|
|
1674
|
-
} catch (err) {
|
|
1675
|
-
if (isValidationError(err)) {
|
|
1676
|
-
const getErrors = processValidationErrors(err, TaskTypes.BUSINESS_DETAILS);
|
|
1677
|
-
if (getErrors && !Object.keys(getErrors).length) {
|
|
1678
|
-
showToast({
|
|
1679
|
-
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
1680
|
-
variant: "error"
|
|
1681
|
-
});
|
|
1682
|
-
const unmappedErrorNames = err.invalidFields?.map((field) => field.name).filter(Boolean) ?? [];
|
|
1683
|
-
if (unmappedErrorNames.length) {
|
|
1684
|
-
trackingPayload = {
|
|
1685
|
-
...trackingPayload,
|
|
1686
|
-
additionalData: { unmappedErrorNames }
|
|
1687
|
-
};
|
|
1688
|
-
}
|
|
1689
|
-
} else {
|
|
1690
|
-
setProblems({
|
|
1691
|
-
...problems,
|
|
1692
|
-
validationErrors: getErrors
|
|
1693
|
-
});
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
if (isMaintenanceModeError(err)) {
|
|
1697
|
-
showToast({
|
|
1698
|
-
label: t(($) => $["maintenanceModeMessage"], { ns: "common" }),
|
|
1699
|
-
variant: "error",
|
|
1700
|
-
duration: "indefinite"
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
|
-
if (!isValidationError(err) && !isMaintenanceModeError(err)) {
|
|
1704
|
-
showToast({
|
|
1705
|
-
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
1706
|
-
variant: "error"
|
|
1707
|
-
});
|
|
1708
|
-
}
|
|
1709
|
-
logger.error(err);
|
|
1710
|
-
userEvents?.addTaskEvent("Encountered error", {
|
|
1711
|
-
...trackingPayload,
|
|
1712
|
-
returnType: err?.errorCode,
|
|
1713
|
-
returnValue: err?.title || "backend"
|
|
1714
|
-
});
|
|
1715
|
-
} finally {
|
|
1716
|
-
setLoadingStatus("success");
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
const getCountryOfGoverningLaw = (isCountryOfGoverningLawEnabled, basicData) => {
|
|
1720
|
-
if (!isCountryOfGoverningLawEnabled || basicData?.country !== CountryCodes.UnitedKingdom) {
|
|
1721
|
-
return void 0;
|
|
1722
|
-
}
|
|
1723
|
-
if (isCountryOfGoverningLawEnabled && basicData?.country === CountryCodes.UnitedKingdom && !basicData?.countryOfGoverningLaw) {
|
|
1724
|
-
return CountryCodes.UnitedKingdom;
|
|
1725
|
-
}
|
|
1726
|
-
return basicData?.countryOfGoverningLaw;
|
|
1727
|
-
};
|
|
1728
|
-
const determineCustomerSupport = (customerSupport, country) => {
|
|
1729
|
-
switch (country) {
|
|
1730
|
-
case CountryCodes.Japan:
|
|
1731
|
-
return unsetCustomerSupportNumber(customerSupport);
|
|
1732
|
-
default:
|
|
1733
|
-
return customerSupport;
|
|
1734
|
-
}
|
|
1735
|
-
};
|
|
1736
|
-
const unsetCustomerSupportNumber = (customerSupport) => {
|
|
1737
|
-
return customerSupport ? {
|
|
1738
|
-
email: customerSupport.email,
|
|
1739
|
-
phone: { number: "", type: "mobile" }
|
|
1740
|
-
} : void 0;
|
|
1741
|
-
};
|
|
1742
|
-
const CountryFieldValidation = () => ({
|
|
1743
|
-
country: {
|
|
1744
|
-
modes: ["blur"],
|
|
1745
|
-
validate: (country) => !isEmpty(country),
|
|
1746
|
-
errorMessage: "fieldIsRequired"
|
|
1747
|
-
}
|
|
1748
|
-
});
|
|
1749
|
-
const CountryOfGoverningLawFieldValidation = () => ({
|
|
1750
|
-
countryOfGoverningLaw: {
|
|
1751
|
-
modes: ["blur"],
|
|
1752
|
-
validate: (countryOfGoverningLaw) => !isEmpty(countryOfGoverningLaw),
|
|
1753
|
-
errorMessage: "fieldIsRequired"
|
|
1754
|
-
}
|
|
1755
|
-
});
|
|
1756
|
-
function basicInformationValidators({
|
|
1757
|
-
country,
|
|
1758
|
-
taxIdNumberType,
|
|
1759
|
-
companyType,
|
|
1760
|
-
registrationNumberType,
|
|
1761
|
-
state,
|
|
1762
|
-
isExperimentEnabled
|
|
1763
|
-
}) {
|
|
1764
|
-
return {
|
|
1765
|
-
country: CountryFieldValidation().country,
|
|
1766
|
-
countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
|
|
1767
|
-
legalCompanyName: resolveFieldMetadata(
|
|
1768
|
-
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
|
|
1769
|
-
{ isBusiness: true },
|
|
1770
|
-
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
|
|
1771
|
-
)?.validators,
|
|
1772
|
-
taxInformation: resolveFieldMetadata(
|
|
1773
|
-
taxInformationDefaultFieldConfig[country],
|
|
1774
|
-
{
|
|
1775
|
-
taxIdNumberType,
|
|
1776
|
-
companyType
|
|
1777
|
-
},
|
|
1778
|
-
taxInformationDefaultFieldMetadata
|
|
1779
|
-
)?.validators,
|
|
1780
|
-
stateOrProvince: resolveFieldMetadata(
|
|
1781
|
-
defaultFieldConfig$1[country],
|
|
1782
|
-
{ isBusiness: true },
|
|
1783
|
-
defaultFieldMetadata$1
|
|
1784
|
-
)?.validators,
|
|
1785
|
-
registrationNumber: resolveFieldMetadata(
|
|
1786
|
-
registrationNumberDefaultFieldConfig[country],
|
|
1787
|
-
{
|
|
1788
|
-
companyType,
|
|
1789
|
-
registrationNumberType,
|
|
1790
|
-
state,
|
|
1791
|
-
isExperimentEnabled
|
|
1792
|
-
},
|
|
1793
|
-
registrationNumberDefaultFieldMetadata
|
|
1794
|
-
)?.validators
|
|
1795
|
-
};
|
|
1796
|
-
}
|
|
1797
|
-
function businessSelectionValidators() {
|
|
1798
|
-
return {
|
|
1799
|
-
hasSelectedBusiness: {
|
|
1800
|
-
modes: ["blur", "input"],
|
|
1801
|
-
validate: (value) => typeof value === "boolean",
|
|
1802
|
-
// indicates a selection was made
|
|
1803
|
-
errorMessage: "fieldIsRequired"
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
}
|
|
1807
|
-
function additionalInformationValidators({
|
|
1808
|
-
country,
|
|
1809
|
-
taxIdNumberType,
|
|
1810
|
-
companyType,
|
|
1811
|
-
registrationNumberType,
|
|
1812
|
-
vatNumberType,
|
|
1813
|
-
isExperimentEnabled
|
|
1814
|
-
}) {
|
|
1815
|
-
return {
|
|
1816
|
-
hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
|
|
1817
|
-
doingBusinessAs: doingBusinessAsFieldMetadata.validators,
|
|
1818
|
-
registrationNumber: resolveFieldMetadata(
|
|
1819
|
-
registrationNumberDefaultFieldConfig[country],
|
|
1820
|
-
{
|
|
1821
|
-
companyType,
|
|
1822
|
-
registrationNumberType,
|
|
1823
|
-
isExperimentEnabled
|
|
1824
|
-
},
|
|
1825
|
-
registrationNumberDefaultFieldMetadata
|
|
1826
|
-
)?.validators,
|
|
1827
|
-
exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
|
|
1828
|
-
taxInformation: resolveFieldMetadata(
|
|
1829
|
-
taxInformationDefaultFieldConfig[country],
|
|
1830
|
-
{
|
|
1831
|
-
taxIdNumberType,
|
|
1832
|
-
companyType
|
|
1833
|
-
},
|
|
1834
|
-
taxInformationDefaultFieldMetadata
|
|
1835
|
-
).validators,
|
|
1836
|
-
vatNumber: resolveFieldMetadata(
|
|
1837
|
-
defaultFieldConfig[country],
|
|
1838
|
-
{ vatNumberType },
|
|
1839
|
-
defaultFieldMetadata
|
|
1840
|
-
).validators,
|
|
1841
|
-
vatAbsenceReason: vatAbsenceReasonMetadata.validators,
|
|
1842
|
-
eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
|
|
1843
|
-
industryCodes: industryCodeFieldMetadata.validators,
|
|
1844
|
-
dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
|
|
1845
|
-
stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
|
|
1846
|
-
stockISIN: stockISINFieldMetadata.validators,
|
|
1847
|
-
stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
|
|
1848
|
-
};
|
|
1849
|
-
}
|
|
1850
|
-
function BusinessDetailsDropin({
|
|
1851
|
-
taskType = TaskTypes.BUSINESS_DETAILS,
|
|
1852
|
-
country: propCountry,
|
|
1853
|
-
problems: propProblems,
|
|
1854
|
-
legalEntityResponse,
|
|
1855
|
-
associatedLegalArrangement,
|
|
1856
|
-
// initially undefined when creating entity
|
|
1857
|
-
nestedLegalEntity,
|
|
1858
|
-
// initially undefined when creating entity
|
|
1859
|
-
nestedLegalEntityDetails,
|
|
1860
|
-
// has entity roles for association logic
|
|
1861
|
-
onSubmit: onExternalSubmit,
|
|
1862
|
-
handleHomeClick,
|
|
1863
|
-
asModal = false
|
|
1864
|
-
}) {
|
|
1865
|
-
const { t, i18n } = useTranslation(["common", "business"]);
|
|
1866
|
-
const { baseUrl, rootLegalEntityId } = useApiContext();
|
|
1867
|
-
const userEvents = useAnalyticsContext();
|
|
1868
|
-
const { showToast } = useToastContext();
|
|
1869
|
-
const queryClient = useQueryClient();
|
|
1870
|
-
const { isExperimentEnabled } = useExperimentsContext();
|
|
1871
|
-
const { isSettingEnabled } = useSettingsContext();
|
|
1872
|
-
const { accountHolder, setAccountHolder } = useAccountHolder();
|
|
1873
|
-
const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
|
|
1874
|
-
const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
|
|
1875
|
-
const logger = createLogger();
|
|
1876
|
-
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
1877
|
-
const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
1878
|
-
const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
|
|
1879
|
-
const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
|
|
1880
|
-
const [country, setCountry] = useState(propCountry);
|
|
1881
|
-
const [documents, setDocuments] = useState();
|
|
1882
|
-
const [problems, setProblems] = useState(propProblems ?? {});
|
|
1883
|
-
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
1884
|
-
const [derivedProps, setDerivedProps] = useState();
|
|
1885
|
-
const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
|
|
1886
|
-
const defaultForms = useMemo(() => getForms(country), [country]);
|
|
1887
|
-
const documentUtils = documentApiUtils({
|
|
1888
|
-
baseUrl: baseUrl.value,
|
|
1889
|
-
rootLegalEntityId: rootLegalEntityId.value
|
|
1890
|
-
});
|
|
1891
|
-
useEffect(() => {
|
|
1892
|
-
if (!subjectEntity?.documentDetails?.length) return;
|
|
1893
|
-
documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity?.id).then(() => {
|
|
1894
|
-
setDocuments(mapApiDocumentToBusinessDetailsDocuments(subjectEntity?.id));
|
|
1895
|
-
}).catch(() => {
|
|
1896
|
-
showToast({
|
|
1897
|
-
label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
|
|
1898
|
-
variant: "error"
|
|
1899
|
-
});
|
|
1900
|
-
});
|
|
1901
|
-
}, [subjectEntity?.documentDetails, subjectEntity?.id]);
|
|
1902
|
-
useEffect(() => {
|
|
1903
|
-
userEvents.updateBaseTrackingPayload({ task: taskType });
|
|
1904
|
-
userEvents.addTaskEvent("Landed on page", {
|
|
1905
|
-
actionType: "start"
|
|
1906
|
-
});
|
|
1907
|
-
}, []);
|
|
1908
|
-
const parseConfiguration = useCallback(
|
|
1909
|
-
({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
|
|
1910
|
-
[]
|
|
1911
|
-
);
|
|
1912
|
-
const { fieldConfigurations } = useScenarioConfiguration({
|
|
1913
|
-
legalEntityType,
|
|
1914
|
-
parseConfiguration,
|
|
1915
|
-
setLoadingStatus,
|
|
1916
|
-
country
|
|
1917
|
-
});
|
|
1918
|
-
const { data: efpBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES, {
|
|
1919
|
-
enabled: isSettingEnabled("allowBusinessLines")
|
|
1920
|
-
});
|
|
1921
|
-
const defaultData = useMemo(() => {
|
|
1922
|
-
const mapped = mapLegalEntityToBusinessDetailsSchema(
|
|
1923
|
-
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
1924
|
-
isSoleProp ? legalEntityResponse : void 0
|
|
1925
|
-
);
|
|
1926
|
-
const initialEfpBusinessLineData = isSettingEnabled("allowBusinessLines") && efpBusinessLines && efpBusinessLines.length > 0 ? {
|
|
1927
|
-
additionalInformation: {
|
|
1928
|
-
...mapped.additionalInformation,
|
|
1929
|
-
industryCodes: [
|
|
1930
|
-
{
|
|
1931
|
-
id: efpBusinessLines[0].industryCode,
|
|
1932
|
-
name: `${efpBusinessLines[0].industryCode} - ${efpBusinessLines[0].industryCodeDescription}`
|
|
1933
|
-
}
|
|
1934
|
-
]
|
|
1935
|
-
}
|
|
1936
|
-
} : {};
|
|
1937
|
-
return {
|
|
1938
|
-
...mapped,
|
|
1939
|
-
...documents,
|
|
1940
|
-
...initialEfpBusinessLineData
|
|
1941
|
-
};
|
|
1942
|
-
}, [
|
|
1943
|
-
isAssociationTaskType,
|
|
1944
|
-
legalEntityResponse,
|
|
1945
|
-
isSoleProp,
|
|
1946
|
-
associatedLegalArrangement,
|
|
1947
|
-
nestedLegalEntity,
|
|
1948
|
-
documents,
|
|
1949
|
-
efpBusinessLines,
|
|
1950
|
-
isSettingEnabled
|
|
1951
|
-
]);
|
|
1952
|
-
const buildFieldValidations = useCallback(
|
|
1953
|
-
(data) => {
|
|
1954
|
-
const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
|
|
1955
|
-
const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
|
|
1956
|
-
const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
|
|
1957
|
-
return {
|
|
1958
|
-
basicInformation: basicInformationValidators({
|
|
1959
|
-
country,
|
|
1960
|
-
state: data?.basicInformation?.stateOrProvince,
|
|
1961
|
-
companyType: data?.companyStructure?.entityType,
|
|
1962
|
-
taxIdNumberType: taxIdType,
|
|
1963
|
-
registrationNumberType: regNumberType,
|
|
1964
|
-
isExperimentEnabled
|
|
1965
|
-
}),
|
|
1966
|
-
businessSelection: businessSelectionValidators(),
|
|
1967
|
-
companyStructure: CompanyStructureValidation,
|
|
1968
|
-
additionalInformation: additionalInformationValidators({
|
|
1969
|
-
country,
|
|
1970
|
-
taxIdNumberType: taxIdType,
|
|
1971
|
-
companyType: data?.companyStructure?.entityType,
|
|
1972
|
-
registrationNumberType: regNumberType,
|
|
1973
|
-
vatNumberType: data?.additionalInformation?.vatNumberType,
|
|
1974
|
-
isExperimentEnabled
|
|
1975
|
-
}),
|
|
1976
|
-
financialInformation: financialInfoValidationWithEmployeesRules
|
|
1977
|
-
};
|
|
1978
|
-
},
|
|
1979
|
-
[country, isExperimentEnabled]
|
|
1980
|
-
);
|
|
1981
|
-
const multiForm = useMultiForm({
|
|
1982
|
-
defaultData,
|
|
1983
|
-
allFields: derivedProps?.allFields,
|
|
1984
|
-
requiredFields: derivedProps?.requiredFields,
|
|
1985
|
-
optionalFields: derivedProps?.optionalFields,
|
|
1986
|
-
obscuredFields: derivedProps?.obscuredFields,
|
|
1987
|
-
trustedFields: derivedProps?.trustedFields,
|
|
1988
|
-
rules: buildFieldValidations
|
|
1989
|
-
});
|
|
1990
|
-
const isTinMatched = tinMatched.value;
|
|
1991
|
-
const customRules = useMemo(
|
|
1992
|
-
() => rules({
|
|
1993
|
-
data: multiForm.data,
|
|
1994
|
-
country,
|
|
1995
|
-
taskType,
|
|
1996
|
-
isExperimentEnabled,
|
|
1997
|
-
isSettingEnabled,
|
|
1998
|
-
accountHolder,
|
|
1999
|
-
tinMatched: isTinMatched,
|
|
2000
|
-
rootLegalEntity: legalEntityResponse
|
|
2001
|
-
}),
|
|
2002
|
-
[
|
|
2003
|
-
multiForm.data,
|
|
2004
|
-
country,
|
|
2005
|
-
taskType,
|
|
2006
|
-
isExperimentEnabled,
|
|
2007
|
-
isSettingEnabled,
|
|
2008
|
-
accountHolder,
|
|
2009
|
-
isTinMatched,
|
|
2010
|
-
legalEntityResponse
|
|
2011
|
-
]
|
|
2012
|
-
);
|
|
2013
|
-
useEffect(() => {
|
|
2014
|
-
const props = getPropsFromConfigurations({
|
|
2015
|
-
scenarioConfiguration: fieldConfigurations,
|
|
2016
|
-
forms: defaultForms,
|
|
2017
|
-
remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
|
|
2018
|
-
dataMissingErrors: problems?.missingData ?? [],
|
|
2019
|
-
fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
|
|
2020
|
-
subjectEntity,
|
|
2021
|
-
solePropBusinessDetailsApiKeyMapping,
|
|
2022
|
-
solePropBusinessDetailsDocumentMapping
|
|
2023
|
-
) : getFieldsWithExistingData(
|
|
2024
|
-
subjectEntity,
|
|
2025
|
-
businessDetailsApiKeyMapping,
|
|
2026
|
-
businessDetailsDocumentMapping
|
|
2027
|
-
) : [],
|
|
2028
|
-
customRules,
|
|
2029
|
-
legalEntityType: subjectEntity?.type,
|
|
2030
|
-
legalEntityTrustedFields: trustedFields
|
|
2031
|
-
});
|
|
2032
|
-
setDerivedProps(props);
|
|
2033
|
-
}, [
|
|
2034
|
-
customRules,
|
|
2035
|
-
defaultForms,
|
|
2036
|
-
subjectEntity,
|
|
2037
|
-
problems?.missingData,
|
|
2038
|
-
problems?.remediationActions,
|
|
2039
|
-
trustedFields,
|
|
2040
|
-
fieldConfigurations
|
|
2041
|
-
]);
|
|
2042
|
-
const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
|
|
2043
|
-
if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
|
|
2044
|
-
setCountry(multiForm.data?.basicInformation?.country);
|
|
2045
|
-
setPrevCountry(multiForm.data.basicInformation?.country);
|
|
2046
|
-
setTrustedFields(void 0);
|
|
2047
|
-
verifiedBusiness.value = void 0;
|
|
2048
|
-
tinMatched.value = void 0;
|
|
2049
|
-
businessMismatchModalOpen.value = false;
|
|
2050
|
-
}
|
|
2051
|
-
const [forms, setForms] = useState(
|
|
2052
|
-
buildRequiredForms({
|
|
2053
|
-
config: {
|
|
2054
|
-
forms: defaultForms,
|
|
2055
|
-
requiredFields: derivedProps?.requiredFields,
|
|
2056
|
-
optionalFields: derivedProps?.optionalFields,
|
|
2057
|
-
isValid: multiForm.isValid ?? {},
|
|
2058
|
-
problems,
|
|
2059
|
-
isSettingEnabled,
|
|
2060
|
-
accountHolder,
|
|
2061
|
-
legalEntityResponse
|
|
2062
|
-
},
|
|
2063
|
-
options: {
|
|
2064
|
-
hasNoSearchResults: false
|
|
2065
|
-
}
|
|
2066
|
-
})
|
|
2067
|
-
);
|
|
2068
|
-
const updateForms = useCallback(
|
|
2069
|
-
({ searchResults }) => {
|
|
2070
|
-
const updatedForms = buildRequiredForms({
|
|
2071
|
-
config: {
|
|
2072
|
-
forms: defaultForms,
|
|
2073
|
-
requiredFields: derivedProps?.requiredFields,
|
|
2074
|
-
optionalFields: derivedProps?.optionalFields,
|
|
2075
|
-
isValid: multiForm.isValid ?? {},
|
|
2076
|
-
problems,
|
|
2077
|
-
isSettingEnabled,
|
|
2078
|
-
accountHolder,
|
|
2079
|
-
legalEntityResponse
|
|
2080
|
-
},
|
|
2081
|
-
options: {
|
|
2082
|
-
hasNoSearchResults: searchResults && !searchResults.length
|
|
2083
|
-
}
|
|
2084
|
-
});
|
|
2085
|
-
setForms(updatedForms);
|
|
2086
|
-
return updatedForms;
|
|
2087
|
-
},
|
|
2088
|
-
[
|
|
2089
|
-
defaultForms,
|
|
2090
|
-
derivedProps?.optionalFields,
|
|
2091
|
-
derivedProps?.requiredFields,
|
|
2092
|
-
multiForm.isValid,
|
|
2093
|
-
problems,
|
|
2094
|
-
isSettingEnabled,
|
|
2095
|
-
accountHolder,
|
|
2096
|
-
legalEntityResponse
|
|
2097
|
-
]
|
|
2098
|
-
);
|
|
2099
|
-
const summaryData = useMemo(
|
|
2100
|
-
() => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
|
|
2101
|
-
[multiForm.data, forms, t, i18n.language, isExperimentEnabled]
|
|
2102
|
-
);
|
|
2103
|
-
const { mutateAsync: createBusinessLine } = useCreateBusinessLine();
|
|
2104
|
-
const { mutateAsync: updateBusinessLine } = useUpdateBusinessLine();
|
|
2105
|
-
const submitTask = useCallback(() => {
|
|
2106
|
-
setAccountHolder(accountHolder);
|
|
2107
|
-
return submit({
|
|
2108
|
-
data: multiForm.data,
|
|
2109
|
-
legalEntityResponse,
|
|
2110
|
-
associatedLegalArrangement,
|
|
2111
|
-
nestedLegalEntity,
|
|
2112
|
-
nestedLegalEntityDetails,
|
|
2113
|
-
problems,
|
|
2114
|
-
taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
|
|
2115
|
-
accountHolder: accountHolder ?? "theCompanyIWorkFor",
|
|
2116
|
-
forms,
|
|
2117
|
-
documentUtils,
|
|
2118
|
-
t,
|
|
2119
|
-
showToast,
|
|
2120
|
-
setLoadingStatus,
|
|
2121
|
-
setProblems,
|
|
2122
|
-
handleUpdateLegalEntity: updateLegalEntity,
|
|
2123
|
-
createLegalEntity,
|
|
2124
|
-
onExternalSubmit,
|
|
2125
|
-
isExperimentEnabled,
|
|
2126
|
-
userEvents,
|
|
2127
|
-
efpBusinessLines,
|
|
2128
|
-
createBusinessLine,
|
|
2129
|
-
updateBusinessLine
|
|
2130
|
-
});
|
|
2131
|
-
}, [
|
|
2132
|
-
setAccountHolder,
|
|
2133
|
-
accountHolder,
|
|
2134
|
-
multiForm.data,
|
|
2135
|
-
legalEntityResponse,
|
|
2136
|
-
associatedLegalArrangement,
|
|
2137
|
-
nestedLegalEntity,
|
|
2138
|
-
nestedLegalEntityDetails,
|
|
2139
|
-
problems,
|
|
2140
|
-
taskType,
|
|
2141
|
-
forms,
|
|
2142
|
-
documentUtils,
|
|
2143
|
-
t,
|
|
2144
|
-
showToast,
|
|
2145
|
-
updateLegalEntity,
|
|
2146
|
-
createLegalEntity,
|
|
2147
|
-
onExternalSubmit,
|
|
2148
|
-
isExperimentEnabled,
|
|
2149
|
-
userEvents,
|
|
2150
|
-
efpBusinessLines,
|
|
2151
|
-
createBusinessLine,
|
|
2152
|
-
updateBusinessLine
|
|
2153
|
-
]);
|
|
2154
|
-
const {
|
|
2155
|
-
handleNextClick,
|
|
2156
|
-
handleBackClick,
|
|
2157
|
-
activeForm,
|
|
2158
|
-
shouldValidate,
|
|
2159
|
-
gotoFormByFormIndex,
|
|
2160
|
-
steps
|
|
2161
|
-
} = useFormComposer({
|
|
2162
|
-
problems,
|
|
2163
|
-
forms,
|
|
2164
|
-
onSubmit: submitTask,
|
|
2165
|
-
triggerValidation: multiForm.triggerValidation
|
|
2166
|
-
});
|
|
2167
|
-
const handleBusinessMismatchContinue = () => {
|
|
2168
|
-
setTrustedFields([]);
|
|
2169
|
-
businessMismatchModalOpen.value = false;
|
|
2170
|
-
handleNextClick();
|
|
2171
|
-
};
|
|
2172
|
-
const handleBusinessMismatchCancel = () => {
|
|
2173
|
-
handleBackClick?.();
|
|
2174
|
-
businessMismatchModalOpen.value = false;
|
|
2175
|
-
tinMatched.value = false;
|
|
2176
|
-
};
|
|
2177
|
-
const companySearchQueryInput = {
|
|
2178
|
-
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2179
|
-
country: multiForm.data?.basicInformation?.country,
|
|
2180
|
-
state: multiForm.data?.basicInformation?.stateOrProvince,
|
|
2181
|
-
registrationNumber: multiForm.data?.basicInformation?.registrationNumber
|
|
2182
|
-
};
|
|
2183
|
-
const verifyTinQueryInput = {
|
|
2184
|
-
name: multiForm.data.basicInformation?.legalCompanyName ?? "",
|
|
2185
|
-
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
2186
|
-
};
|
|
2187
|
-
const {
|
|
2188
|
-
data: companySearchResponse,
|
|
2189
|
-
isLoading: searchingCompanies,
|
|
2190
|
-
isError: searchingError
|
|
2191
|
-
} = useCompanySearch(companySearchQueryInput, {
|
|
2192
|
-
enabled: false
|
|
2193
|
-
});
|
|
2194
|
-
useEffect(() => {
|
|
2195
|
-
if (!searchingCompanies && companySearchResponse?.results) {
|
|
2196
|
-
userEvents.addPageEvent("Success", {
|
|
2197
|
-
actionType: "submit",
|
|
2198
|
-
returnValue: "companySearch",
|
|
2199
|
-
additionalData: {
|
|
2200
|
-
numberOfResults: companySearchResponse?.results.length
|
|
2201
|
-
}
|
|
2202
|
-
});
|
|
2203
|
-
}
|
|
2204
|
-
}, [searchingCompanies, userEvents, subjectEntity, companySearchResponse?.results]);
|
|
2205
|
-
const companySelectionInput = {
|
|
2206
|
-
company: companySearchResponse?.results[0],
|
|
2207
|
-
state: multiForm.data.basicInformation?.stateOrProvince,
|
|
2208
|
-
name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2209
|
-
tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
|
|
2210
|
-
};
|
|
2211
|
-
useVerifyTin(verifyTinQueryInput, { enabled: false });
|
|
2212
|
-
const attemptBusinessSearch = async () => {
|
|
2213
|
-
if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
|
|
2214
|
-
const currentForms = updateForms({ searchResults: [] });
|
|
2215
|
-
return handleNextClick(currentForms);
|
|
2216
|
-
}
|
|
2217
|
-
try {
|
|
2218
|
-
setLoadingStatus("loading");
|
|
2219
|
-
tinMatched.value = void 0;
|
|
2220
|
-
verifiedBusiness.value = void 0;
|
|
2221
|
-
isVerifiedSingleCompanySearchResult.value = false;
|
|
2222
|
-
const searchResponse = await queryClient.fetchQuery({
|
|
2223
|
-
queryKey: ["companySearch", companySearchQueryInput]
|
|
2224
|
-
});
|
|
2225
|
-
let currentForms = updateForms({ searchResults: searchResponse.results });
|
|
2226
|
-
const handleTinResponse = (matched) => {
|
|
2227
|
-
if (matched) {
|
|
2228
|
-
tinMatched.value = true;
|
|
2229
|
-
} else {
|
|
2230
|
-
businessMismatchModalOpen.value = true;
|
|
2231
|
-
tinMatched.value = false;
|
|
2232
|
-
}
|
|
2233
|
-
return tinMatched.value;
|
|
2234
|
-
};
|
|
2235
|
-
if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
|
|
2236
|
-
multiForm.data?.basicInformation?.legalCompanyName ?? "",
|
|
2237
|
-
searchResponse.results[0].name
|
|
2238
|
-
)) {
|
|
2239
|
-
const companySelectionResponse = await handleCompanySelection(
|
|
2240
|
-
rootLegalEntityId.value,
|
|
2241
|
-
baseUrl.value,
|
|
2242
|
-
{ ...companySelectionInput, company: searchResponse.results[0] }
|
|
2243
|
-
);
|
|
2244
|
-
if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
|
|
2245
|
-
verifiedBusiness.value = companySelectionResponse;
|
|
2246
|
-
isVerifiedSingleCompanySearchResult.value = true;
|
|
2247
|
-
applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
|
|
2248
|
-
currentForms = updateForms({ searchResults: searchResponse.results });
|
|
2249
|
-
} else {
|
|
2250
|
-
return setLoadingStatus("success");
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
if (!searchResponse.results.length) {
|
|
2254
|
-
const tinVerificationResponse = await queryClient.fetchQuery({
|
|
2255
|
-
queryKey: ["verifyTin", verifyTinQueryInput]
|
|
2256
|
-
});
|
|
2257
|
-
if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
|
|
2258
|
-
return setLoadingStatus("success");
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
setLoadingStatus("success");
|
|
2262
|
-
return handleNextClick(currentForms);
|
|
2263
|
-
} catch (e) {
|
|
2264
|
-
logger.error(e);
|
|
2265
|
-
setLoadingStatus("error");
|
|
2266
|
-
const currentForms = updateForms({ searchResults: [] });
|
|
2267
|
-
return handleNextClick(currentForms);
|
|
2268
|
-
}
|
|
2269
|
-
};
|
|
2270
|
-
const overrideNextClick = async () => {
|
|
2271
|
-
if (!activeForm.isValid) return handleNextClick();
|
|
2272
|
-
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
|
|
2273
|
-
return handleNextClick();
|
|
2274
|
-
}
|
|
2275
|
-
switch (activeForm.formId) {
|
|
2276
|
-
case "basicInformation": {
|
|
2277
|
-
return await attemptBusinessSearch();
|
|
2278
|
-
}
|
|
2279
|
-
case "businessSelection": {
|
|
2280
|
-
const currentForms = updateForms({
|
|
2281
|
-
searchResults: companySearchResponse?.results
|
|
2282
|
-
});
|
|
2283
|
-
return handleNextClick(currentForms);
|
|
2284
|
-
}
|
|
2285
|
-
default:
|
|
2286
|
-
return handleNextClick();
|
|
2287
|
-
}
|
|
2288
|
-
};
|
|
2289
|
-
useEffect(() => {
|
|
2290
|
-
updateForms({
|
|
2291
|
-
searchResults: searchingError ? [] : companySearchResponse?.results
|
|
2292
|
-
});
|
|
2293
|
-
}, [updateForms, companySearchResponse?.results, searchingError]);
|
|
2294
|
-
return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
|
|
2295
|
-
FormFlow,
|
|
2296
|
-
{
|
|
2297
|
-
summary: {
|
|
2298
|
-
data: summaryData,
|
|
2299
|
-
omitted: {
|
|
2300
|
-
keys: ["operationalAddressIsSame"],
|
|
2301
|
-
forms: ["businessSelection"]
|
|
2302
|
-
},
|
|
2303
|
-
problems,
|
|
2304
|
-
showLegalCaption: true
|
|
2305
|
-
},
|
|
2306
|
-
asModal,
|
|
2307
|
-
currentStep: steps.current,
|
|
2308
|
-
totalSteps: steps.total,
|
|
2309
|
-
forms,
|
|
2310
|
-
disableNextButton: activeForm.formId === "businessSelection",
|
|
2311
|
-
gotoFormByFormIndex,
|
|
2312
|
-
handleNextClick: overrideNextClick,
|
|
2313
|
-
handleBackClick,
|
|
2314
|
-
handleCancelClick: handleHomeClick,
|
|
2315
|
-
loadingStatus,
|
|
2316
|
-
children: [
|
|
2317
|
-
/* @__PURE__ */ jsx(
|
|
2318
|
-
BusinessDetailsMultiform,
|
|
2319
|
-
{
|
|
2320
|
-
taskType,
|
|
2321
|
-
activeForm,
|
|
2322
|
-
country,
|
|
2323
|
-
shouldValidate,
|
|
2324
|
-
problems,
|
|
2325
|
-
handleNextClick: overrideNextClick,
|
|
2326
|
-
handleBackClick,
|
|
2327
|
-
setLoadingStatus,
|
|
2328
|
-
isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
|
|
2329
|
-
}
|
|
2330
|
-
),
|
|
2331
|
-
businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
|
|
2332
|
-
Confirm,
|
|
2333
|
-
{
|
|
2334
|
-
title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
|
|
2335
|
-
ns: "business"
|
|
2336
|
-
}),
|
|
2337
|
-
description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
|
|
2338
|
-
ns: "business"
|
|
2339
|
-
}),
|
|
2340
|
-
cancelText: t(
|
|
2341
|
-
($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
|
|
2342
|
-
{ ns: "business" }
|
|
2343
|
-
),
|
|
2344
|
-
confirmText: t(
|
|
2345
|
-
($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
|
|
2346
|
-
{ ns: "business" }
|
|
2347
|
-
),
|
|
2348
|
-
onCancel: handleBusinessMismatchCancel,
|
|
2349
|
-
onConfirm: handleBusinessMismatchContinue,
|
|
2350
|
-
analyticsEventLabel: "tinVerificationFailureModal"
|
|
2351
|
-
}
|
|
2352
|
-
)
|
|
2353
|
-
]
|
|
2354
|
-
}
|
|
2355
|
-
) });
|
|
2356
|
-
}
|
|
2357
|
-
export {
|
|
2358
|
-
BusinessDetailsDropin as B
|
|
2359
|
-
};
|