@adyen/kyc-components 4.5.1 → 4.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -43
- package/dist/{AcceptTermsOfServiceComponent-CDgZIoAy.js → AcceptTermsOfServiceComponent-Bd0fuzJX.js} +17 -20
- package/dist/{AccountSetupRejected-Bwu8xLmZ.js → AccountSetupRejected-t4tPei0K.js} +2 -2
- package/dist/{ActionBar-Cs-ZFNhk.js → ActionBar-Ruw6z6LR.js} +2 -2
- package/dist/{Address-Cdkbwzso.js → Address-D0JjbOT4.js} +16 -16
- package/dist/{Avatar-DtFyP488.js → Avatar-Dp70m25u.js} +2 -2
- package/dist/{BusinessFinancingComponent-DmYxCifv.js → BusinessFinancingComponent-DAj2gvCq.js} +5 -5
- package/dist/{BusinessFinancingDropin-DbkFhxJT.js → BusinessFinancingDropin-RImpwNje.js} +31 -34
- package/dist/{BusinessFinancingPage-DulUJR2t.js → BusinessFinancingPage-B3XW6vMz.js} +4 -4
- package/dist/{BusinessTypeSelectionPage-B-vdLokC.js → BusinessTypeSelectionPage-D_yQV_GP.js} +9 -14
- package/dist/{Checkbox-D3Z0AWKj.js → Checkbox-DQGjbUsQ.js} +2 -2
- package/dist/{Confirm-C42kXNcg.js → Confirm-roUo52pe.js} +3 -3
- package/dist/{ConstitutionalDocument-DzgtU8np.js → ConstitutionalDocument-BW87TDZl.js} +336 -92
- package/dist/{ContactDetails--t1QRowR.js → ContactDetails-CGss-4M6.js} +12 -7
- package/dist/{ContextGuidance-C2yYCn3r.js → ContextGuidance-8vbKs48u.js} +2 -2
- package/dist/{CountryField-DzcOrjgs.js → CountryField-Cxih2YUu.js} +3 -3
- package/dist/{CreateIndividualComponent-BGs4XVIx.js → CreateIndividualComponent-k3J84uhw.js} +6 -6
- package/dist/{CreateTransferInstrumentComponent-8qbVjvCk.js → CreateTransferInstrumentComponent-bam-U6uj.js} +5 -5
- package/dist/{Currency-D_JvTwxX.js → Currency-DhqTdIeI.js} +7 -7
- package/dist/{CustomerSupport-C-r0iCOW.js → CustomerSupport-CdhIJFEE.js} +11 -16
- package/dist/{DebugModal-UZ3iEF4d.js → DebugModal-yfBBhyjs.js} +127 -98
- package/dist/DecisionMakerDetails-D0-COO1N.js +275 -0
- package/dist/{DecisionMakerDetailsPage-CORpG8qd.js → DecisionMakerDetailsPage-C-LGLbrJ.js} +10 -10
- package/dist/{DecisionMakers-D_B8GhAP.js → DecisionMakers-Bx51Ewcv.js} +22 -259
- package/dist/{Dropzone-CqXwk4Vf.js → Dropzone-Dy3XmCix.js} +4 -4
- package/dist/{EmbeddedStatus-Cq3s0VKQ.js → EmbeddedStatus-PFK1NCkS.js} +3 -3
- package/dist/{EndStateLayout-DyV9bKDz.js → EndStateLayout-5kx0pljK.js} +2 -2
- package/dist/{EntityAssociation-DoTWA9hu.js → EntityAssociation-BVxUknEP.js} +5 -5
- package/dist/{EntityGuidanceStatus-xpPB9g8U.js → EntityGuidanceStatus-CbP4RqW4.js} +4 -4
- package/dist/{ErrorPanel-BuHWbhfh.js → ErrorPanel-Cn8gzNGG.js} +11 -12
- package/dist/{Field-Dr2nucSo.js → Field-BDI27kIy.js} +2 -2
- package/dist/{FormNavigation-bTHzHm_a.js → FormNavigation-D90R1OgK.js} +3 -3
- package/dist/{Individual.rules-CvBrD7Ad.js → Individual.rules-BrdY-Rew.js} +12 -12
- package/dist/{IndividualDropin-DhipTriL.js → IndividualDropin-D5FrKUb-.js} +252 -97
- package/dist/{InputDate-HsJIDMnw.js → InputDate-nNag-jcu.js} +1 -1
- package/dist/{InputText-Cmp-jxkq.js → InputText-DFjKyN6O.js} +2 -2
- package/dist/{Introduction-CVb0Xx-s.js → Introduction-DhEG_Jvt.js} +4 -9
- package/dist/InvitedDecisionMakerComponent-DT_SCB2u.js +211 -0
- package/dist/{JpAddress-CC_IvY9U.js → JpAddress-DcJCN9dG.js} +11 -11
- package/dist/{LandingLayout-Hw-QdoQL.js → LandingLayout-CC_FGMAs.js} +2 -2
- package/dist/{LegalCompanyNameField-CWRd7AEp.js → LegalCompanyNameField-CgTgIMv8.js} +16 -16
- package/dist/{LegalRepresentativeDetailsPage-CY_iMQTc.js → LegalRepresentativeDetailsPage-D4d4eelX.js} +5 -5
- package/dist/{Link-DDnVkilX.js → Link-C30mEtLP.js} +2 -2
- package/dist/{ListItem-C5VcmY-s.js → ListItem-BQLamvB-.js} +3 -3
- package/dist/{LoaderWrapper-BFpnMaZr.js → LoaderWrapper-CgNgcjW-.js} +2 -2
- package/dist/{ManageIndividualComponent-Cb5wNkz0.js → ManageIndividualComponent-DKVcaPI6.js} +5 -5
- package/dist/{ManageTermsOfServiceComponent-10j2xeZu.js → ManageTermsOfServiceComponent-T_K9BahM.js} +4 -4
- package/dist/{ManageTransferInstrumentComponent-BpnoK4Sd.js → ManageTransferInstrumentComponent-Ch79d8JP.js} +11 -11
- package/dist/{MaskedInput-D6wQgEqZ.js → MaskedInput-B9djDROe.js} +5 -5
- package/dist/{MaybeModal-w8BdVyL9.js → MaybeModal-BYsvKCcc.js} +3 -3
- package/dist/{Modal-CBxIPgQb.js → Modal-727fSuFr.js} +2 -2
- package/dist/{Name-CFTJ-03j.js → Name-BN-K6-N2.js} +4 -4
- package/dist/{NewSummary-Bzl3znax.js → NewSummary-DTuLIMtG.js} +5 -5
- package/dist/{OnboardingDropinComponent-D6UOdrFV.js → OnboardingDropinComponent-CaRk-dgZ.js} +145 -218
- package/dist/{PayoutDetailsDropin-hc2Lwjfg.js → PayoutDetailsDropin-CaJE5U6g.js} +183 -1065
- package/dist/{PayoutDetailsPage-C2UkSM42.js → PayoutDetailsPage-B0i-iUKS.js} +6 -6
- package/dist/{RadioGroup-tAaHg-3v.js → RadioGroup-DQa-nkgM.js} +2 -2
- package/dist/{Review-Bhbx2iLe.js → Review-CgkKBldb.js} +6 -6
- package/dist/{RootBusinessDetailsPage-BtxfStzp.js → RootBusinessDetailsPage-Bh3M9G8g.js} +6 -6
- package/dist/{RootBusinessLinesPage-SBl1RJnK.js → RootBusinessLinesPage-C4wzI8-k.js} +93 -91
- package/dist/{RootIndividualDetailsPage-BKrFR8kJ.js → RootIndividualDetailsPage-GBrzZTH2.js} +7 -6
- package/dist/{Select-CDjrCQMg.js → Select-Bt5Y91sI.js} +4 -4
- package/dist/{SignPCIComponent-CsBd4n0S.js → SignPCIComponent-BxzfAQvx.js} +12 -19
- package/dist/{SingpassSelection-BLw_O_To.js → SingpassSelection-hjBRnBDR.js} +144 -7
- package/dist/{SoleProprietorshipPage-DugLl7bw.js → SoleProprietorshipPage-B6HqJtcC.js} +5 -5
- package/dist/{SourceOfFundsPage-BOpuSCH-.js → SourceOfFundsPage-D6V3pwXP.js} +270 -98
- package/dist/{StepProgressIndicator-U5i4HLMS.js → StepProgressIndicator-DhfpqmVy.js} +2 -2
- package/dist/{StoreProvider-DS3-j_yO.js → StoreProvider-CGAl-5Sk.js} +155 -148
- package/dist/{Summary-B4rVi_1E.js → Summary-DKmu4xU7.js} +25 -22
- package/dist/{TaxInformationField-Gascwiqq.js → TaxInformationField-wLMc_uT-.js} +568 -795
- package/dist/{TaxReportingDropin-BiUeYocK.js → TaxReportingDropin-DsPw-MUV.js} +26 -26
- package/dist/{TextArea-DHLHMQS0.js → TextArea-BGhv4y1a.js} +2 -2
- package/dist/{TileGroup-TQqcisEg.js → TileGroup-D3HIe8QQ.js} +3 -3
- package/dist/{TrustDetailsPage-B9qgsL7n.js → TrustDetailsPage-CWKPHxTe.js} +64 -65
- package/dist/{TrustMemberCompanyPage-Dv8gB3AJ.js → TrustMemberCompanyPage-C89-gUpd.js} +7 -7
- package/dist/{TrustMemberIndividualPage-B61REKTA.js → TrustMemberIndividualPage-Cz-Z8U7w.js} +6 -6
- package/dist/{TrustMemberRoleAndTypePage-B-937gVA.js → TrustMemberRoleAndTypePage-BxzEkGzE.js} +27 -27
- package/dist/{TrustMembersOverview-BUdUHg0i.js → TrustMembersOverview-BtycEgbW.js} +16 -18
- package/dist/{UnincorporatedPartnershipIndividualPage-CiXV1GFq.js → UnincorporatedPartnershipIndividualPage-CSQjYe4p.js} +5 -5
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-DBvCnN3w.js → UnincorporatedPartnershipMemberCompanyPage-ZAQkvjQr.js} +6 -6
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-C5tojfbL.js → UnincorporatedPartnershipMemberRoleAndTypePage-B9bvg2ra.js} +11 -11
- package/dist/{UnincorporatedPartnershipMembersOverview-DPrp3a67.js → UnincorporatedPartnershipMembersOverview-DYDDYisa.js} +7 -7
- package/dist/{VerificationErrorAlert-DUcGedHl.js → VerificationErrorAlert-Sf7ovPdg.js} +3 -3
- package/dist/{ViewVerificationStatusComponent-ucroS2ge.js → ViewVerificationStatusComponent-D6qJacuF.js} +3 -3
- package/dist/adyen-business-financing.js +4 -4
- package/dist/adyen-individual-configuration.js +4 -4
- package/dist/adyen-individual-status.js +4 -4
- package/dist/adyen-invited-decision-maker.js +4 -117
- package/dist/adyen-kyc-components.js +17 -17
- package/dist/adyen-onboarding.js +4 -4
- package/dist/adyen-terms-of-service-management.js +4 -4
- package/dist/adyen-terms-of-service-status.js +4 -4
- package/dist/adyen-transfer-instrument-configuration.js +4 -4
- package/dist/adyen-transfer-instrument-management.js +4 -4
- package/dist/adyen-verification-status.js +4 -4
- package/dist/{bafinUtils-YlO-EQ-z.js → bafinUtils-4YaweTCy.js} +2 -2
- package/dist/{commonValidators-Z8GTyWt2.js → commonValidators-nusLcRK6.js} +1 -1
- package/dist/{dropinUtils-DuoGe_aD.js → dropinUtils-DoPR1iTm.js} +53 -9
- package/dist/en-US-CJDkXFZ6.js +13 -0
- package/dist/en-US-CTbVLoNF.js +13 -0
- package/dist/en-US-CfazE4ht.js +13 -0
- package/dist/{en-US-G607HIyo.js → en-US-DPoDE0uz.js} +7 -7
- package/dist/en-US-DrUYyPhF.js +13 -0
- package/dist/{formUtils-OvyHeoEE.js → formUtils-zdJ_jyqE.js} +3 -3
- package/dist/{getName-DxauASkL.js → getName-Ca2cTXzw.js} +2 -2
- package/dist/{getProblemsForEntity-yYZx85SH.js → getProblemsForEntity-CNltAsMa.js} +2 -2
- package/dist/getTrustedFields-rU6j1TOQ.js +104 -0
- package/dist/{isEmpty-CUJ_MTvj.js → isEmpty-BN2tOceJ.js} +1 -1
- package/dist/japanSupportUtils-B76IOTvL.js +16 -0
- package/dist/{localizeDateString-Cdq_DxXh.js → localizeDateString-9ciBezNu.js} +2 -2
- package/dist/{mapExistingFile-BX4VgHc9.js → mapExistingFile-BS79kq3W.js} +3 -76
- package/dist/{mapJpAddressSchemaToAddressLocalizations-fM535qJi.js → mapJpAddressSchemaToAddressLocalizations--7Bt3usJ.js} +2 -36
- package/dist/{mapLegalEntityToIndividualSchema-CtUOM-Zl.js → mapLegalEntityToIndividualSchema-BxOmNDle.js} +4 -4
- package/dist/{mapTransferInstrumentToPayoutAccount-CwsN-a7n.js → mapTransferInstrumentToPayoutAccount-ONPBT9KF.js} +2 -2
- package/dist/omitObscuredFieldsIfUnchanged-DhUQJrjg.js +29 -0
- package/dist/{patternValidators-vRnpmLkN.js → patternValidators-Cem-Icxv.js} +2 -2
- package/dist/{process-field-configurations-BGd8lBcb.js → process-field-configurations-BWC3i2at.js} +2 -2
- package/dist/{resolveEnvironment-CnQ__7cb.js → resolveEnvironment-BLaPb5Nd.js} +17 -24
- package/dist/{roleMetadata-B5g5kSns.js → roleMetadata-RivmWKE-.js} +3 -3
- package/dist/style.css +230 -275
- package/dist/styles-CLV89_hH.js +230 -275
- package/dist/types/api/toggles/useToggles.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +0 -29
- package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
- package/dist/types/components/BankAccount/forms/BankVerification/verification/{widget → overlay}/types.d.ts +4 -14
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +1 -1
- package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +4 -5
- package/dist/types/components/Business/forms/rules.d.ts +1 -1
- package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsGettingStarted.d.ts +6 -0
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +2 -2
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/validate.d.ts +7 -5
- package/dist/types/components/Business/utils/companyUtil.d.ts +2 -2
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +3 -2
- package/dist/types/components/Business/utils/submit.d.ts +1 -1
- package/dist/types/components/Business/utils/useCompanySearchFeature.d.ts +5 -0
- package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +1 -1
- package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +1 -1
- package/dist/types/components/Contract/tasks/PciDropin/PciDropin.d.ts +1 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +9 -9
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +11 -0
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +15 -0
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/validate.d.ts +5 -4
- package/dist/types/components/Individual/forms/BasicDetails/validate.d.ts +3 -3
- package/dist/types/components/Individual/forms/IdNowVerificationModal/IFrameWidget.d.ts +9 -0
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +1 -1
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -2
- package/dist/types/components/Individual/tasks/DecisionMakers/InvitedDecisionMaker/InvitedDecisionMakerSubmitSuccess/InvitedDecisionMakerSubmitSuccess.d.ts +6 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +15 -0
- package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +14 -0
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -0
- package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +2 -1
- package/dist/types/components/Shared/devex/DebugListener/DebugTogglesAndSettings.d.ts +8 -0
- package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +2 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +12 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/getDefaultRegistrationNumberType.d.ts +4 -4
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → BusinessRegistrationNumberField/RegistrationNumberTypeSelector}/inferCompanyRegistrationNumberType.d.ts +3 -3
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/registrationNumberTypes.d.ts +92 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +8 -1
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +0 -483
- package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -1
- package/dist/types/components/Shared/fields/LegalCompanyNameField/fieldConfig.d.ts +2 -2
- package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedNameFields/validate.d.ts +2 -2
- package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -1
- package/dist/types/components/Shared/fields/PhoneField/types.d.ts +2 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/TaxIdNumberTypeSelector.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/getDefaultTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → TaxInformationField/TaxIdNumberTypeSelector}/inferTaxIdNumberType.d.ts +5 -5
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +1 -2
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +232 -0
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +8 -0
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +14 -0
- package/dist/types/components/Shared/fields/{IdFieldTypeSelector → VatNumberField/VatNumberTypeSelector}/getDefaultVatNumberType.d.ts +2 -2
- package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/inferVatNumberType.d.ts +3 -0
- package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +1 -2
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +10 -1
- package/dist/types/components/Shared/fields/VatNumberField/vatNumberTypes.d.ts +149 -0
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +5 -0
- package/dist/types/components/Shared/forms/Address/utils.d.ts +6 -1
- package/dist/types/components/Shared/forms/Address/validate.d.ts +3 -3
- package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +2 -2
- package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
- package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +2 -2
- package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/context/FormRouterContext/FormRouterContext.d.ts +5 -0
- package/dist/types/context/FormRouterContext/FormRouterContextProvider.d.ts +1 -1
- package/dist/types/context/FormRouterContext/types.d.ts +1 -0
- package/dist/types/context/FormRouterContext/useFormRouterContext.d.ts +4 -0
- package/dist/types/context/SettingsContext/types.d.ts +2 -0
- package/dist/types/context/ToggleContext/ToggleContext.d.ts +2 -0
- package/dist/types/context/ToggleContext/ToggleContextProvider.d.ts +9 -0
- package/dist/types/context/{ExperimentContext → ToggleContext}/types.d.ts +42 -32
- package/dist/types/context/ToggleContext/useToggleContext.d.ts +1 -0
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +3 -3
- package/dist/types/core/UIElement/UIElement.d.ts +3 -2
- package/dist/types/core/models/api/organization.d.ts +1 -1
- package/dist/types/embeds/baseEmbedProps.d.ts +3 -3
- package/dist/types/hooks/useFormComposer.d.ts +1 -0
- package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +1 -1
- package/dist/types/hooks/useTaskLandedEvent.d.ts +7 -0
- package/dist/types/language/types.d.ts +2 -9
- package/dist/types/language/utils.d.ts +2 -2
- package/dist/types/router/routeConfig.d.ts +1 -0
- package/dist/types/stores/globalStore/taskTypes.d.ts +1 -0
- package/dist/types/types/form-rules.d.ts +2 -2
- package/dist/types/utils/api/processCapabilitites.d.ts +1 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/japanSupportUtils.d.ts +2 -2
- package/dist/{types-C_a8jv29.js → types-BLjngIPE.js} +2 -2
- package/dist/{types-_ugkpUNx.js → types-CTwBMnPB.js} +46 -37
- package/dist/{types-H2FCJ1-C.js → types-DmjPF4Sw.js} +2 -2
- package/dist/{types-CQ2p58-6.js → types-Dv0COrvY.js} +3 -2
- package/dist/{types-xe96hgXI.js → types-i_4sFTBn.js} +2 -2
- package/dist/{unincorporated-partnership-B6NRgago.js → unincorporated-partnership-R_fKlee-.js} +2 -2
- package/dist/{useAssociatedLegalEntity-CVzKts0I.js → useAssociatedLegalEntity-sPi1NDib.js} +2 -2
- package/dist/{useBusinessDetailsData-DfwcFRlQ.js → useBusinessDetailsData-Bqk04i4C.js} +443 -397
- package/dist/{useCreateLegalEntity-hrStnY6W.js → useCreateLegalEntity-Bsp9NV_x.js} +2 -2
- package/dist/{useForm-D6L2c9Li.js → useForm-OoKBR6oR.js} +3 -3
- package/dist/{useFormContext-CMsS317D.js → useFormContext-DSPJpGk8.js} +17 -8
- package/dist/{useGlobalData-6k8_ruDF.js → useGlobalData-Crfi88kZ.js} +24 -15
- package/dist/{useMultiForm-DM2vK1Np.js → useMultiForm-CvhpFewv.js} +4 -4
- package/dist/{useOnboardingStatus-DhKdv_Y5.js → useOnboardingStatus-CAHU1D0X.js} +2 -2
- package/dist/{useScenarios-CUR2KnWg.js → useScenarios-DBv_dA-7.js} +2 -2
- package/dist/{useTermsOfServiceStatus-BDMVKqbS.js → useTermsOfServiceStatus-ZQHlgGZB.js} +2 -2
- package/dist/{useToastContext-D4gUb18d.js → useToastContext-fRmLeQb3.js} +2 -2
- package/dist/{useUnincorporatedPartnershipMembers-DR2H0kGz.js → useUnincorporatedPartnershipMembers-DiyYkTfs.js} +5 -5
- package/dist/{useUpdateBusinessLines-DePb7PWG.js → useUpdateBusinessLines-R_TsTeL9.js} +6 -6
- package/dist/{useUpdateLegalEntity-DAa_GfP9.js → useUpdateLegalEntity-B08ICvGj.js} +3 -3
- package/dist/{utils-Dl-sL-p9.js → utils-3lClW_1M.js} +2 -2
- package/dist/{utils-BWV6yYFy.js → utils-B0FPRdWI.js} +22 -2
- package/dist/{utils-CnnnCh8B.js → utils-BRoXRTJU.js} +6 -6
- package/dist/{utils--FMWv23g.js → utils-Bjuz29z7.js} +53 -6
- package/dist/{utils-Cm_KCWsB.js → utils-CPMlF6U8.js} +1 -1
- package/dist/{validate-C7J6rZcj.js → validate-Bkn-4Xav.js} +1 -1
- package/dist/{validate-C-38T_GY.js → validate-DXgI7aOv.js} +3 -3
- package/dist/{validationError-C6qoE3Ei.js → validationError-1Dg0ubhb.js} +2 -2
- package/package.json +1 -5
- package/dist/RadioGroupCard-fFofJm6m.js +0 -152
- package/dist/en-US--1W760fR.js +0 -13
- package/dist/en-US-CKLQU2sJ.js +0 -13
- package/dist/en-US-CozY33On.js +0 -13
- package/dist/en-US-DLY20x1O.js +0 -13
- package/dist/iframeWidget-D0lDhWvH.js +0 -234
- package/dist/instant-verification-UrnuHTYn.js +0 -40
- package/dist/japanSupportUtils-9uEg0pbP.js +0 -16
- package/dist/manual-verification-BO8zgAYT.js +0 -41
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocument.d.ts +0 -5
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirements.d.ts +0 -9
- package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +0 -6
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/BankVerificationWidget.d.ts +0 -3
- package/dist/types/components/BankAccount/forms/BankVerification/verification/widget/iframeWidget.d.ts +0 -32
- package/dist/types/components/Business/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +0 -4
- package/dist/types/components/Business/utils/useCompanySearchExperiments.d.ts +0 -5
- package/dist/types/components/Shared/devex/DebugListener/DebugExperimentsAndSettings.d.ts +0 -7
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/CompanyRegistrationNumberTypeSelector.d.ts +0 -20
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +0 -21
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +0 -3
- package/dist/types/context/ExperimentContext/ExperimentsContext.d.ts +0 -2
- package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +0 -8
- package/dist/types/context/ExperimentContext/useExperimentsContext.d.ts +0 -1
- package/dist/types/utils/bankVerification/dom.d.ts +0 -1
|
@@ -2,35 +2,37 @@
|
|
|
2
2
|
{
|
|
3
3
|
try {
|
|
4
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] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "851cc85b-13b2-4e4a-8680-34e190646115", e._sentryDebugIdIdentifier = "sentry-dbid-851cc85b-13b2-4e4a-8680-34e190646115");
|
|
6
6
|
} catch (e) {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
;
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { memo } from "preact/compat";
|
|
13
|
-
import { useState, useRef, useEffect, useCallback
|
|
14
|
-
import { F as Field } from "./Field-
|
|
15
|
-
import { S as Select } from "./Select-
|
|
16
|
-
import { T as TextArea } from "./TextArea-
|
|
17
|
-
import { S as StateContextSetter } from "./validate-
|
|
18
|
-
import { u as useForm } from "./useForm-
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { C as
|
|
25
|
-
import {
|
|
10
|
+
import { bp as getNestedPropertyKeys, a9 as CountryCodes, L as LegalEntityTypes, u as useTranslation, z as Icon, ah as objectsDeepEqual, aB as Header, w as TaskTypes, aS as keysOf, H as useToggleContext, t as useAccountHolder, ab as translateTranslatable } from "./StoreProvider-CGAl-5Sk.js";
|
|
11
|
+
import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
|
|
12
|
+
import { lazy, memo } from "preact/compat";
|
|
13
|
+
import { useMemo, useState, useRef, useEffect, useCallback } from "preact/hooks";
|
|
14
|
+
import { F as Field } from "./Field-BDI27kIy.js";
|
|
15
|
+
import { S as Select } from "./Select-Bt5Y91sI.js";
|
|
16
|
+
import { T as TextArea } from "./TextArea-BGhv4y1a.js";
|
|
17
|
+
import { S as StateContextSetter } from "./validate-DXgI7aOv.js";
|
|
18
|
+
import { u as useForm } from "./useForm-OoKBR6oR.js";
|
|
19
|
+
import cx from "classnames";
|
|
20
|
+
import { I as Image } from "./unincorporated-partnership-R_fKlee-.js";
|
|
21
|
+
import { D as Dropzone } from "./Dropzone-Dy3XmCix.js";
|
|
22
|
+
import { E as ErrorPanel } from "./ErrorPanel-Cn8gzNGG.js";
|
|
23
|
+
import { c as createFormUtils } from "./formUtils-zdJ_jyqE.js";
|
|
24
|
+
import { C as Checkbox } from "./Checkbox-DQGjbUsQ.js";
|
|
25
|
+
import { C as CompanyTypesValues } from "./bafinUtils-4YaweTCy.js";
|
|
26
|
+
import { m as makeMask, n as numericInputs, a as nonInputs, d as alphanumericInputs, c as customInputs, b as alphaInputs, s as spacer, M as MaskedInput } from "./MaskedInput-B9djDROe.js";
|
|
26
27
|
import { r as resolveFieldMetadata } from "./fieldConfigurations-BUT9DTUH.js";
|
|
27
|
-
import { S as SettingNames } from "./types-
|
|
28
|
-
import { C as COUNTRIES_WITH_STATES_DATASET } from "./utils-
|
|
28
|
+
import { S as SettingNames } from "./types-Dv0COrvY.js";
|
|
29
|
+
import { C as COUNTRIES_WITH_STATES_DATASET } from "./utils-B0FPRdWI.js";
|
|
29
30
|
import { c as createFormRules } from "./form-rules-DhbF2mY4.js";
|
|
30
|
-
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-
|
|
31
|
-
import { i as isDateOlderThanAYear } from "./Address-
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
31
|
+
import { i as isJapanLocalizationEnabled } from "./japanSupportUtils-B76IOTvL.js";
|
|
32
|
+
import { i as isDateOlderThanAYear } from "./Address-D0JjbOT4.js";
|
|
33
|
+
import { u as uppercase } from "./mapExistingFile-BS79kq3W.js";
|
|
34
|
+
import { v as validatePatternOnBlur, a as validateNotEmptyOnBlur } from "./patternValidators-Cem-Icxv.js";
|
|
35
|
+
import { R as RadioGroup } from "./RadioGroup-DQa-nkgM.js";
|
|
34
36
|
const getFieldsWithExistingData = (legalEntity, keyMapping, documentMapping, knownProblematicFields = []) => {
|
|
35
37
|
const apiFieldsWithExistingData = getNestedPropertyKeys(legalEntity);
|
|
36
38
|
const nonDocumentFields = apiFieldsWithExistingData.map((field) => keyMapping[field]).filter(Boolean).filter((field) => !knownProblematicFields.includes(field));
|
|
@@ -2151,6 +2153,74 @@ const getTaxInformationPlaceholderText = ({
|
|
|
2151
2153
|
return "11-0000000";
|
|
2152
2154
|
}
|
|
2153
2155
|
};
|
|
2156
|
+
const getDocumentGuidancePrefix = (documentType) => {
|
|
2157
|
+
switch (documentType) {
|
|
2158
|
+
case "passport":
|
|
2159
|
+
return "passport";
|
|
2160
|
+
case "driversLicense":
|
|
2161
|
+
case "identityCard":
|
|
2162
|
+
return "id";
|
|
2163
|
+
case "bankStatement":
|
|
2164
|
+
case "vatDocument":
|
|
2165
|
+
case "registrationDocument":
|
|
2166
|
+
case "proofOfAddress":
|
|
2167
|
+
case "proofOfResidency":
|
|
2168
|
+
default:
|
|
2169
|
+
return "document";
|
|
2170
|
+
}
|
|
2171
|
+
};
|
|
2172
|
+
const documentBlurredImage = lazy(() => import("./document-blurred-BiWap0xs.js"));
|
|
2173
|
+
const documentCutOffImage = lazy(() => import("./document-cut-off-aQezqOif.js"));
|
|
2174
|
+
const documentExpiredImage = lazy(() => import("./document-expired-BhBXaWWQ.js"));
|
|
2175
|
+
const documentFrontImage = lazy(() => import("./document-front-DYuhZGeQ.js"));
|
|
2176
|
+
const idBlurredImage = lazy(() => import("./id-blurred-B5lHEP8M.js"));
|
|
2177
|
+
const idCutOffImage = lazy(() => import("./id-cut-off-Ba1FRzKO.js"));
|
|
2178
|
+
const idFrontImage = lazy(() => import("./id-front-CpNWN6nG.js"));
|
|
2179
|
+
const idGlareImage = lazy(() => import("./id-glare-DgCQON8k.js"));
|
|
2180
|
+
const passportBlurredImage = lazy(() => import("./passport-blurred-CVG493IJ.js"));
|
|
2181
|
+
const passportCutOffImage = lazy(() => import("./passport-cut-off-COzA_TmB.js"));
|
|
2182
|
+
const passportFrontImage = lazy(() => import("./passport-front-WJleLixT.js"));
|
|
2183
|
+
const passportGlareImage = lazy(() => import("./passport-glare-BP5WnJZj.js"));
|
|
2184
|
+
const documentMap = {
|
|
2185
|
+
"document-blurred": documentBlurredImage,
|
|
2186
|
+
"document-cutoff": documentCutOffImage,
|
|
2187
|
+
"document-expired": documentExpiredImage,
|
|
2188
|
+
"document-front": documentFrontImage,
|
|
2189
|
+
"id-blurred": idBlurredImage,
|
|
2190
|
+
"id-cutoff": idCutOffImage,
|
|
2191
|
+
"id-front": idFrontImage,
|
|
2192
|
+
"id-glare": idGlareImage,
|
|
2193
|
+
"passport-blurred": passportBlurredImage,
|
|
2194
|
+
"passport-cutoff": passportCutOffImage,
|
|
2195
|
+
"passport-front": passportFrontImage,
|
|
2196
|
+
"passport-glare": passportGlareImage
|
|
2197
|
+
};
|
|
2198
|
+
function DocumentGuidance({ type, className }) {
|
|
2199
|
+
const { t } = useTranslation("ui");
|
|
2200
|
+
const documentGuidanceItems = useMemo(() => {
|
|
2201
|
+
const guidancePrefix = getDocumentGuidancePrefix(type);
|
|
2202
|
+
const guidanceItems = [
|
|
2203
|
+
{ svgName: `${guidancePrefix}-front`, translationKey: "good", valid: true },
|
|
2204
|
+
{ svgName: `${guidancePrefix}-cutoff`, translationKey: "notCutOff" },
|
|
2205
|
+
{ svgName: `${guidancePrefix}-blurred`, translationKey: "notBlurry" },
|
|
2206
|
+
guidancePrefix === "document" ? { svgName: `document-expired`, translationKey: "notExpired" } : { svgName: `${guidancePrefix}-glare`, translationKey: "noGlare" }
|
|
2207
|
+
];
|
|
2208
|
+
return type === "constitutionalDocument" ? guidanceItems.filter((item) => item.svgName !== "document-expired") : guidanceItems;
|
|
2209
|
+
}, [type]);
|
|
2210
|
+
return /* @__PURE__ */ jsx("div", { className: cx("adyen-kyc-document-guidance", className), children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-document-guidance__container", children: documentGuidanceItems.map((item) => /* @__PURE__ */ jsxs("figure", { className: "adyen-kyc-document-guidance__item", children: [
|
|
2211
|
+
/* @__PURE__ */ jsx(Image, { lazyLoadedImage: documentMap[item.svgName] }),
|
|
2212
|
+
/* @__PURE__ */ jsxs("figcaption", { className: "adyen-kyc-document-guidance__description", children: [
|
|
2213
|
+
item.valid ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "adyen-kyc-document-guidance__icon" }) : /* @__PURE__ */ jsx(
|
|
2214
|
+
Icon,
|
|
2215
|
+
{
|
|
2216
|
+
name: "cross",
|
|
2217
|
+
className: "adyen-kyc-document-guidance__icon adyen-kyc-document-guidance__icon--invalid"
|
|
2218
|
+
}
|
|
2219
|
+
),
|
|
2220
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc-document-guidance__description-text", children: t(($) => $[item.translationKey]) })
|
|
2221
|
+
] })
|
|
2222
|
+
] }, item.translationKey)) }) });
|
|
2223
|
+
}
|
|
2154
2224
|
const descriptionField = "adyen-kyc-description-field";
|
|
2155
2225
|
const styles = {
|
|
2156
2226
|
descriptionField
|
|
@@ -2313,96 +2383,442 @@ const MemoizedDocumentUpload = memo(
|
|
|
2313
2383
|
DocumentUpload,
|
|
2314
2384
|
(prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.errors, nextProps.errors) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType
|
|
2315
2385
|
);
|
|
2316
|
-
const
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
CompanyTypesValues.SOLE_PROPRIETORSHIP
|
|
2335
|
-
]
|
|
2386
|
+
const countryToTaxInfoTypeMap = {
|
|
2387
|
+
US: "EIN",
|
|
2388
|
+
AU: "ABN",
|
|
2389
|
+
NZ: "IRD",
|
|
2390
|
+
HK: "BRN",
|
|
2391
|
+
SG: "GST"
|
|
2392
|
+
};
|
|
2393
|
+
const isFinancialInformationRequired = (isFinancialInformationFeatureEnabled, taskType, country, capabilities, legalEntityType) => {
|
|
2394
|
+
const isOrganization = legalEntityType === LegalEntityTypes.ORGANIZATION;
|
|
2395
|
+
if (!isFinancialInformationFeatureEnabled || !COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
2396
|
+
return void 0;
|
|
2397
|
+
}
|
|
2398
|
+
if (country === CountryCodes.UnitedKingdom && (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY || taskType === TaskTypes.BUSINESS_DETAILS)) {
|
|
2399
|
+
return "REQUIRED";
|
|
2400
|
+
}
|
|
2401
|
+
if (taskType === TaskTypes.BUSINESS_DETAILS && isOrganization) {
|
|
2402
|
+
if (keysOf(capabilities ?? {}).some((capability) => capability === "issueBankAccount")) {
|
|
2403
|
+
return "REQUIRED";
|
|
2336
2404
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2405
|
+
}
|
|
2406
|
+
return void 0;
|
|
2407
|
+
};
|
|
2408
|
+
function requestingIssuing(rootLegalEntity) {
|
|
2409
|
+
const capabilities = rootLegalEntity?.capabilities ?? {};
|
|
2410
|
+
return "issueCard" in capabilities && capabilities.issueCard?.requested === true || "issueCardConsumer" in capabilities && capabilities.issueCardConsumer?.requested === true || "issueCardCommercial" in capabilities && capabilities.issueCardCommercial?.requested === true || "useCard" in capabilities && capabilities.useCard?.requested === true || "useCardConsumer" in capabilities && capabilities.useCardConsumer?.requested === true || "useCardCommercial" in capabilities && capabilities.useCardCommercial?.requested === true;
|
|
2411
|
+
}
|
|
2412
|
+
function requestingBanking(rootLegalEntity) {
|
|
2413
|
+
const capabilities = rootLegalEntity?.capabilities ?? {};
|
|
2414
|
+
return "issueBankAccount" in capabilities && capabilities.issueBankAccount?.requested === true || "sendToThirdParty" in capabilities && capabilities.sendToThirdParty?.requested === true || "receiveFromThirdParty" in capabilities && capabilities.receiveFromThirdParty?.requested === true;
|
|
2415
|
+
}
|
|
2416
|
+
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
2417
|
+
CountryCodes.Australia,
|
|
2418
|
+
CountryCodes.Gibraltar,
|
|
2419
|
+
CountryCodes.Guernsey,
|
|
2420
|
+
CountryCodes.HongKong,
|
|
2421
|
+
CountryCodes.Ireland,
|
|
2422
|
+
CountryCodes.IsleOfMan,
|
|
2423
|
+
CountryCodes.Jersey,
|
|
2424
|
+
CountryCodes.Malta,
|
|
2425
|
+
CountryCodes.PuertoRico,
|
|
2426
|
+
CountryCodes.Spain,
|
|
2427
|
+
CountryCodes.UnitedKingdom,
|
|
2428
|
+
CountryCodes.UnitedStates
|
|
2429
|
+
];
|
|
2430
|
+
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
2431
|
+
CountryCodes.HongKong,
|
|
2432
|
+
CountryCodes.PuertoRico,
|
|
2433
|
+
CountryCodes.UnitedStates
|
|
2434
|
+
];
|
|
2435
|
+
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [
|
|
2436
|
+
CountryCodes.HongKong
|
|
2437
|
+
];
|
|
2438
|
+
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
|
|
2439
|
+
CountryCodes.Austria,
|
|
2440
|
+
CountryCodes.Canada,
|
|
2441
|
+
CountryCodes.Finland,
|
|
2442
|
+
CountryCodes.Germany,
|
|
2443
|
+
CountryCodes.Lithuania,
|
|
2444
|
+
CountryCodes.Luxembourg,
|
|
2445
|
+
CountryCodes.NewZealand,
|
|
2446
|
+
CountryCodes.Poland,
|
|
2447
|
+
CountryCodes.Sweden,
|
|
2448
|
+
CountryCodes.Switzerland
|
|
2449
|
+
];
|
|
2450
|
+
const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
|
|
2451
|
+
CountryCodes.Canada,
|
|
2452
|
+
CountryCodes.UnitedStates
|
|
2453
|
+
];
|
|
2454
|
+
const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [
|
|
2455
|
+
CountryCodes.Germany
|
|
2456
|
+
];
|
|
2457
|
+
const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
2458
|
+
CountryCodes.Australia,
|
|
2459
|
+
CountryCodes.Canada,
|
|
2460
|
+
CountryCodes.Gibraltar,
|
|
2461
|
+
CountryCodes.HongKong,
|
|
2462
|
+
CountryCodes.NewZealand,
|
|
2463
|
+
CountryCodes.PuertoRico,
|
|
2464
|
+
CountryCodes.Singapore,
|
|
2465
|
+
CountryCodes.UnitedStates,
|
|
2466
|
+
CountryCodes.Guernsey,
|
|
2467
|
+
CountryCodes.Jersey,
|
|
2468
|
+
CountryCodes.IsleOfMan,
|
|
2469
|
+
CountryCodes.Mexico,
|
|
2470
|
+
CountryCodes.Brazil,
|
|
2471
|
+
CountryCodes.Japan
|
|
2472
|
+
];
|
|
2473
|
+
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
|
|
2474
|
+
CountryCodes.Singapore
|
|
2475
|
+
];
|
|
2476
|
+
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
|
|
2477
|
+
// strictly a subset of countries which use tax ID
|
|
2478
|
+
// right now in all countries companies must provide a tax ID - but maybe there will be exemptions in future?
|
|
2479
|
+
];
|
|
2480
|
+
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
2481
|
+
// strictly a subset of countries which use tax ID
|
|
2482
|
+
CountryCodes.Canada,
|
|
2483
|
+
CountryCodes.PuertoRico,
|
|
2484
|
+
CountryCodes.UnitedStates
|
|
2485
|
+
];
|
|
2486
|
+
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [
|
|
2487
|
+
CountryCodes.HongKong,
|
|
2488
|
+
CountryCodes.Singapore
|
|
2489
|
+
];
|
|
2490
|
+
const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
2491
|
+
const COUNTRIES_USING_COMPANY_SEARCH = [
|
|
2492
|
+
CountryCodes.UnitedStates
|
|
2493
|
+
];
|
|
2494
|
+
const COUNTRY_OF_GOVERNING_LAW_POSSIBLE = [
|
|
2495
|
+
CountryCodes.UnitedKingdom
|
|
2496
|
+
];
|
|
2497
|
+
const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
2498
|
+
CountryCodes.Austria,
|
|
2499
|
+
CountryCodes.Belgium,
|
|
2500
|
+
CountryCodes.Croatia,
|
|
2501
|
+
CountryCodes.Cyprus,
|
|
2502
|
+
CountryCodes.Estonia,
|
|
2503
|
+
CountryCodes.Finland,
|
|
2504
|
+
CountryCodes.France,
|
|
2505
|
+
CountryCodes.Germany,
|
|
2506
|
+
CountryCodes.Greece,
|
|
2507
|
+
CountryCodes.Ireland,
|
|
2508
|
+
CountryCodes.Italy,
|
|
2509
|
+
CountryCodes.Latvia,
|
|
2510
|
+
CountryCodes.Lithuania,
|
|
2511
|
+
CountryCodes.Luxembourg,
|
|
2512
|
+
CountryCodes.Malta,
|
|
2513
|
+
CountryCodes.Netherlands,
|
|
2514
|
+
CountryCodes.Portugal,
|
|
2515
|
+
CountryCodes.Slovakia,
|
|
2516
|
+
CountryCodes.Slovenia,
|
|
2517
|
+
CountryCodes.Spain,
|
|
2518
|
+
CountryCodes.UnitedKingdom
|
|
2519
|
+
];
|
|
2520
|
+
const COUNTRIES_REQUIRING_E_INVOICING_CODE = [
|
|
2521
|
+
/**
|
|
2522
|
+
* @description These are the countries for which E-Invoicing code is a compliance requirement. There will be more in the future.
|
|
2523
|
+
*/
|
|
2524
|
+
CountryCodes.Italy
|
|
2525
|
+
];
|
|
2526
|
+
const COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [
|
|
2527
|
+
CountryCodes.Australia
|
|
2528
|
+
];
|
|
2529
|
+
const TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
2530
|
+
// The following countries are commented out just to make it more clear that these
|
|
2531
|
+
// use tax id but since it's the same field as business registration we don't want
|
|
2532
|
+
// to remove those here and have a bad ux. So instead in the map schema part
|
|
2533
|
+
// we copy over the values to the taxinformation object
|
|
2534
|
+
// CountryCodes.Estonia,
|
|
2535
|
+
// CountryCodes.Finland,
|
|
2536
|
+
// CountryCodes.France,
|
|
2537
|
+
// CountryCodes.Latvia,
|
|
2538
|
+
// CountryCodes.Lithuania,
|
|
2539
|
+
// CountryCodes.Portugal,
|
|
2540
|
+
// CountryCodes.Spain,
|
|
2541
|
+
CountryCodes.Austria,
|
|
2542
|
+
CountryCodes.Belgium,
|
|
2543
|
+
CountryCodes.Croatia,
|
|
2544
|
+
CountryCodes.Cyprus,
|
|
2545
|
+
CountryCodes.Germany,
|
|
2546
|
+
CountryCodes.Greece,
|
|
2547
|
+
CountryCodes.Ireland,
|
|
2548
|
+
CountryCodes.Italy,
|
|
2549
|
+
CountryCodes.Luxembourg,
|
|
2550
|
+
CountryCodes.Malta,
|
|
2551
|
+
CountryCodes.Netherlands,
|
|
2552
|
+
CountryCodes.Slovakia,
|
|
2553
|
+
CountryCodes.Slovenia,
|
|
2554
|
+
CountryCodes.UnitedKingdom
|
|
2555
|
+
];
|
|
2556
|
+
function isUsingCompanySearch(country, taskType) {
|
|
2557
|
+
return taskType === TaskTypes.BUSINESS_DETAILS && COUNTRIES_USING_COMPANY_SEARCH.includes(country);
|
|
2558
|
+
}
|
|
2559
|
+
const isRegistrationNumberAbsentStateV4Scenario = (country, entityType) => {
|
|
2560
|
+
return country === CountryCodes.Australia && (entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || entityType === CompanyTypesValues.INCORPORATED_PARTNERSHIP) || country === CountryCodes.NewZealand;
|
|
2561
|
+
};
|
|
2562
|
+
const rules = ({
|
|
2563
|
+
data,
|
|
2564
|
+
defaultData,
|
|
2565
|
+
country,
|
|
2566
|
+
taskType,
|
|
2567
|
+
isFeatureEnabled = () => false,
|
|
2568
|
+
isSettingEnabled = () => false,
|
|
2569
|
+
accountHolder,
|
|
2570
|
+
rootLegalEntity,
|
|
2571
|
+
tinMatched
|
|
2572
|
+
}) => {
|
|
2573
|
+
const countryRequiresDateOfIncorporationForCompanies = () => {
|
|
2574
|
+
if (COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION.includes(country)) {
|
|
2575
|
+
return "REQUIRED";
|
|
2350
2576
|
}
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
]
|
|
2577
|
+
};
|
|
2578
|
+
const countryRequiresFinancialInformation = () => {
|
|
2579
|
+
if (isFeatureEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
2580
|
+
const isFinancialInformationFeatureEnabled = isFeatureEnabled(
|
|
2581
|
+
"EnableFinancialInformationComponentV4"
|
|
2582
|
+
);
|
|
2583
|
+
const leType = rootLegalEntity?.type;
|
|
2584
|
+
return isFinancialInformationRequired(
|
|
2585
|
+
isFinancialInformationFeatureEnabled,
|
|
2586
|
+
taskType,
|
|
2587
|
+
country,
|
|
2588
|
+
rootLegalEntity?.capabilities,
|
|
2589
|
+
leType
|
|
2590
|
+
);
|
|
2366
2591
|
}
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
{
|
|
2370
|
-
|
|
2371
|
-
name: "siret"
|
|
2592
|
+
};
|
|
2593
|
+
return createFormRules({
|
|
2594
|
+
requireDoingBusinessAsName: () => {
|
|
2595
|
+
return data.additionalInformation?.hasDoingBusinessAs ? "REQUIRED" : void 0;
|
|
2372
2596
|
},
|
|
2373
|
-
{
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
}
|
|
2378
|
-
],
|
|
2379
|
-
[CountryCodes.Hungary]: [
|
|
2380
|
-
{
|
|
2381
|
-
id: "nyilvantartasiSzam",
|
|
2382
|
-
name: "huRegistrationNumberForSoleProp",
|
|
2383
|
-
applicableOnlyFor: [CompanyTypesValues.SOLE_PROPRIETORSHIP]
|
|
2384
|
-
}
|
|
2385
|
-
],
|
|
2386
|
-
[CountryCodes.Italy]: [
|
|
2387
|
-
{
|
|
2388
|
-
id: "partitaIVA",
|
|
2389
|
-
name: "codiceFiscalePartitaIVA"
|
|
2597
|
+
countryRequiresStateOrProvince: () => {
|
|
2598
|
+
if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
|
|
2599
|
+
return "REQUIRED";
|
|
2600
|
+
}
|
|
2390
2601
|
},
|
|
2391
|
-
{
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2602
|
+
ifPubliclyTradedCompany: () => {
|
|
2603
|
+
if (data.companyStructure?.entityType === CompanyTypesValues.PUBLIC_COMPANY) {
|
|
2604
|
+
return "REQUIRED";
|
|
2605
|
+
}
|
|
2606
|
+
},
|
|
2607
|
+
countryUsesVat: () => {
|
|
2608
|
+
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
2609
|
+
return data.additionalInformation?.exemptedFromVat ? "OPTIONAL" : "REQUIRED";
|
|
2610
|
+
}
|
|
2611
|
+
},
|
|
2612
|
+
vatNumberType: () => {
|
|
2613
|
+
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
2614
|
+
return "OPTIONAL";
|
|
2615
|
+
}
|
|
2616
|
+
},
|
|
2617
|
+
isVatExempt: () => {
|
|
2618
|
+
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
2619
|
+
return data.additionalInformation?.exemptedFromVat ? "REQUIRED" : "OPTIONAL";
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
countryUsesTaxId: () => {
|
|
2623
|
+
const isExemptFromTax = Boolean(
|
|
2624
|
+
data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
|
|
2625
|
+
);
|
|
2626
|
+
if (TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION.includes(country) && rootLegalEntity?.type === "organization" && // SOE-5931 - TODO: investigate L scenario returned to show this on the backend
|
|
2627
|
+
keysOf(rootLegalEntity.capabilities ?? {}).includes("issueBankAccount")) {
|
|
2628
|
+
return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
|
|
2629
|
+
}
|
|
2630
|
+
if (COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country) && !(taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP.includes(country))) {
|
|
2631
|
+
return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
companyRegistrationNumberExemptionAllowed: () => {
|
|
2635
|
+
const isExemptFromRegistrationNumber = Boolean(
|
|
2636
|
+
data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
|
|
2637
|
+
);
|
|
2638
|
+
if (isFeatureEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(country, data.companyStructure?.entityType)) {
|
|
2639
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2640
|
+
}
|
|
2641
|
+
switch (taskType) {
|
|
2642
|
+
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
2643
|
+
if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country))
|
|
2644
|
+
return;
|
|
2645
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2646
|
+
}
|
|
2647
|
+
default: {
|
|
2648
|
+
switch (country) {
|
|
2649
|
+
case CountryCodes.Germany: {
|
|
2650
|
+
if (data.companyStructure?.entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
|
|
2651
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2652
|
+
}
|
|
2653
|
+
return;
|
|
2654
|
+
}
|
|
2655
|
+
case CountryCodes.Denmark: {
|
|
2656
|
+
if (data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
|
|
2657
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2658
|
+
}
|
|
2659
|
+
return;
|
|
2660
|
+
}
|
|
2661
|
+
// We're no longer collecting registration numbers for new HK entities, but for existing,
|
|
2662
|
+
// we want to offer the exemption if they have a registration number attached. See OXP-7075
|
|
2663
|
+
case CountryCodes.HongKong: {
|
|
2664
|
+
if (country === CountryCodes.HongKong && !defaultData?.additionalInformation?.registrationNumber)
|
|
2665
|
+
return;
|
|
2666
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2667
|
+
}
|
|
2668
|
+
default: {
|
|
2669
|
+
if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country))
|
|
2670
|
+
return;
|
|
2671
|
+
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
},
|
|
2677
|
+
countryOfGoverningLawRequired: () => {
|
|
2678
|
+
if (isFeatureEnabled("EnableCountryOfGoverningLawForUKCompanies") && COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(data.basicInformation?.country)) {
|
|
2679
|
+
return "REQUIRED";
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2682
|
+
countryRequiresRegistrationNumber: () => {
|
|
2683
|
+
const isExemptFromRegistrationNumber = Boolean(
|
|
2684
|
+
data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
|
|
2685
|
+
);
|
|
2686
|
+
switch (taskType) {
|
|
2687
|
+
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
2688
|
+
if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
|
|
2689
|
+
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS.includes(country)) {
|
|
2690
|
+
return "OPTIONAL";
|
|
2691
|
+
}
|
|
2692
|
+
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
2693
|
+
}
|
|
2694
|
+
default: {
|
|
2695
|
+
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
|
|
2696
|
+
return "OPTIONAL";
|
|
2697
|
+
}
|
|
2698
|
+
if (country === CountryCodes.HongKong) {
|
|
2699
|
+
if (!defaultData?.additionalInformation?.registrationNumber) return;
|
|
2700
|
+
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
2701
|
+
}
|
|
2702
|
+
if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
|
|
2703
|
+
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
registrationNumberType: () => {
|
|
2709
|
+
switch (taskType) {
|
|
2710
|
+
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
2711
|
+
if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
|
|
2712
|
+
return "OPTIONAL";
|
|
2713
|
+
}
|
|
2714
|
+
default: {
|
|
2715
|
+
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
|
|
2716
|
+
return "OPTIONAL";
|
|
2717
|
+
}
|
|
2718
|
+
if (COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) return;
|
|
2719
|
+
return "OPTIONAL";
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
countryUsesUenOrGst: () => {
|
|
2724
|
+
if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
2725
|
+
return;
|
|
2726
|
+
}
|
|
2727
|
+
if (COUNTRIES_THAT_USES_UEN_OR_GST.includes(country)) {
|
|
2728
|
+
return "REQUIRED";
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
countryHasTaxExemptions: () => {
|
|
2732
|
+
const isExemptFromTax = Boolean(
|
|
2733
|
+
data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
|
|
2734
|
+
);
|
|
2735
|
+
switch (taskType) {
|
|
2736
|
+
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
2737
|
+
if (!COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) return;
|
|
2738
|
+
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
2739
|
+
}
|
|
2740
|
+
default: {
|
|
2741
|
+
if (isFeatureEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust") {
|
|
2742
|
+
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
2743
|
+
}
|
|
2744
|
+
if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
|
|
2745
|
+
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
},
|
|
2750
|
+
usingCompanySearch: () => {
|
|
2751
|
+
if (isUsingCompanySearch(country, taskType)) {
|
|
2752
|
+
return "REQUIRED";
|
|
2753
|
+
}
|
|
2754
|
+
},
|
|
2755
|
+
countryRequiresFinancialInformation,
|
|
2756
|
+
isDateOfIncorporationRequired: () => {
|
|
2757
|
+
return countryRequiresDateOfIncorporationForCompanies() || countryRequiresFinancialInformation();
|
|
2758
|
+
},
|
|
2759
|
+
isFinancialReportingFieldsRequired: () => {
|
|
2760
|
+
return countryRequiresFinancialInformation() === "REQUIRED" && isDateOlderThanAYear(data.additionalInformation?.dateOfIncorporation) ? "REQUIRED" : void 0;
|
|
2761
|
+
},
|
|
2762
|
+
isIndustryCodeRequired: () => {
|
|
2763
|
+
const needsBusinessLine = requestingIssuing(rootLegalEntity) || requestingBanking(rootLegalEntity);
|
|
2764
|
+
if (isSettingEnabled(SettingNames.AllowBusinessLines) && needsBusinessLine) {
|
|
2765
|
+
return "REQUIRED";
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
annualTurnoverRequired: () => {
|
|
2769
|
+
if (data.companyFinancialInformation?.reportedValueOption === "annualTurnover") {
|
|
2770
|
+
return "REQUIRED";
|
|
2771
|
+
}
|
|
2772
|
+
},
|
|
2773
|
+
balanceSheetTotalRequired: () => {
|
|
2774
|
+
if (data.companyFinancialInformation?.reportedValueOption === "balanceSheetTotal") {
|
|
2775
|
+
return "REQUIRED";
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
isEInvoicingCodeEnabled: () => {
|
|
2779
|
+
if (isFeatureEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
|
|
2780
|
+
return "REQUIRED";
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
ifCountryUsAndTinFailed: () => {
|
|
2784
|
+
if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
2785
|
+
return;
|
|
2786
|
+
}
|
|
2787
|
+
if (tinMatched === false && country === CountryCodes.UnitedStates) {
|
|
2788
|
+
return "REQUIRED";
|
|
2789
|
+
}
|
|
2790
|
+
},
|
|
2791
|
+
businessRequiresCompanyType: () => {
|
|
2792
|
+
if (taskType !== TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
2793
|
+
return "REQUIRED";
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
japaneseLegalCompanyName: () => {
|
|
2797
|
+
if (isJapanLocalizationEnabled(isFeatureEnabled, country)) {
|
|
2798
|
+
return "REQUIRED";
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
};
|
|
2803
|
+
const taxIdNumberOptions = {
|
|
2804
|
+
[CountryCodes.Australia]: [
|
|
2805
|
+
{
|
|
2806
|
+
id: "ABN",
|
|
2807
|
+
name: "australianBusinessNumberAbn"
|
|
2808
|
+
}
|
|
2395
2809
|
],
|
|
2396
|
-
[CountryCodes.
|
|
2810
|
+
[CountryCodes.Austria]: [
|
|
2397
2811
|
{
|
|
2398
|
-
id: "
|
|
2399
|
-
name: "
|
|
2400
|
-
|
|
2401
|
-
|
|
2812
|
+
id: "STEUERNUMMER",
|
|
2813
|
+
name: "taxInformationNumber__AT"
|
|
2814
|
+
}
|
|
2815
|
+
],
|
|
2816
|
+
[CountryCodes.Belgium]: [
|
|
2402
2817
|
{
|
|
2403
|
-
id: "
|
|
2404
|
-
name: "
|
|
2818
|
+
id: "BUSINESS_NUMMER",
|
|
2819
|
+
name: "businessNumber",
|
|
2405
2820
|
applicableOnlyFor: [
|
|
2821
|
+
CompanyTypesValues.SOLE_PROPRIETORSHIP,
|
|
2406
2822
|
CompanyTypesValues.PRIVATE_COMPANY,
|
|
2407
2823
|
CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
|
|
2408
2824
|
CompanyTypesValues.INCORPORATED_ASSOCIATION,
|
|
@@ -2411,193 +2827,52 @@ const companyRegistrationNumberOptions = {
|
|
|
2411
2827
|
CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
|
|
2412
2828
|
CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
|
|
2413
2829
|
]
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
id: "NUMERO_NATIONAL",
|
|
2833
|
+
name: "taxInformationNumber__BE_Individual",
|
|
2834
|
+
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2414
2835
|
}
|
|
2415
2836
|
],
|
|
2416
|
-
[CountryCodes.
|
|
2837
|
+
[CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
|
|
2838
|
+
[CountryCodes.Canada]: [{ id: "BUSINESS_NUMBER", name: "businessNumber" }],
|
|
2839
|
+
[CountryCodes.Croatia]: [
|
|
2417
2840
|
{
|
|
2418
|
-
id: "
|
|
2419
|
-
name: "
|
|
2420
|
-
}
|
|
2841
|
+
id: "OIB",
|
|
2842
|
+
name: "taxInformationNumber__HR"
|
|
2843
|
+
}
|
|
2844
|
+
],
|
|
2845
|
+
[CountryCodes.Cyprus]: [
|
|
2421
2846
|
{
|
|
2422
|
-
id: "
|
|
2423
|
-
name: "
|
|
2424
|
-
applicableOnlyFor: [
|
|
2425
|
-
CompanyTypesValues.PRIVATE_COMPANY,
|
|
2426
|
-
CompanyTypesValues.PUBLIC_COMPANY,
|
|
2427
|
-
CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
|
|
2428
|
-
]
|
|
2847
|
+
id: "TIC",
|
|
2848
|
+
name: "taxInformationNumber__CY"
|
|
2429
2849
|
}
|
|
2430
2850
|
],
|
|
2431
|
-
[CountryCodes.
|
|
2851
|
+
[CountryCodes.Estonia]: [
|
|
2432
2852
|
{
|
|
2433
|
-
id: "
|
|
2434
|
-
name: "
|
|
2853
|
+
id: "ISIKUKOOD",
|
|
2854
|
+
name: "taxInformationNumber__ET_Individual",
|
|
2855
|
+
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2435
2856
|
},
|
|
2436
2857
|
{
|
|
2437
|
-
id: "
|
|
2438
|
-
name: "
|
|
2858
|
+
id: "registrikood",
|
|
2859
|
+
name: "registrikood",
|
|
2860
|
+
applicableOnlyFor: [CompanyTypesValues.PRIVATE_COMPANY]
|
|
2439
2861
|
}
|
|
2440
2862
|
],
|
|
2441
|
-
[CountryCodes.
|
|
2863
|
+
[CountryCodes.Finland]: [
|
|
2442
2864
|
{
|
|
2443
|
-
id: "
|
|
2444
|
-
name: "
|
|
2865
|
+
id: "HENKILOTUNNUS",
|
|
2866
|
+
name: "taxInformationNumber__FI",
|
|
2867
|
+
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2445
2868
|
},
|
|
2446
2869
|
{
|
|
2447
|
-
id: "
|
|
2448
|
-
name: "
|
|
2870
|
+
id: "YTUNNUS",
|
|
2871
|
+
name: "YTunnus",
|
|
2872
|
+
applicableOnlyFor: [CompanyTypesValues.PRIVATE_COMPANY]
|
|
2449
2873
|
}
|
|
2450
2874
|
],
|
|
2451
|
-
[CountryCodes.
|
|
2452
|
-
{
|
|
2453
|
-
id: "charity",
|
|
2454
|
-
name: "charityNumber",
|
|
2455
|
-
applicableOnlyFor: [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE]
|
|
2456
|
-
},
|
|
2457
|
-
{
|
|
2458
|
-
id: "companyNumber",
|
|
2459
|
-
name: "companyNumber",
|
|
2460
|
-
applicableOnlyFor: [
|
|
2461
|
-
CompanyTypesValues.PRIVATE_COMPANY,
|
|
2462
|
-
CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
|
|
2463
|
-
CompanyTypesValues.INCORPORATED_ASSOCIATION,
|
|
2464
|
-
CompanyTypesValues.INCORPORATED_PARTNERSHIP,
|
|
2465
|
-
CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
|
|
2466
|
-
CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
|
|
2467
|
-
CompanyTypesValues.UNLISTED_PUBLIC_COMPANY,
|
|
2468
|
-
CompanyTypesValues.PUBLIC_COMPANY
|
|
2469
|
-
]
|
|
2470
|
-
}
|
|
2471
|
-
]
|
|
2472
|
-
};
|
|
2473
|
-
const getCompanyRegistrationNumberOptions = (country, companyType) => {
|
|
2474
|
-
const optionsForCountry = companyRegistrationNumberOptions[country];
|
|
2475
|
-
if (!companyType || !optionsForCountry) return optionsForCountry;
|
|
2476
|
-
return optionsForCountry.filter(
|
|
2477
|
-
(option) => option.applicableOnlyFor?.includes(companyType) ?? true
|
|
2478
|
-
);
|
|
2479
|
-
};
|
|
2480
|
-
const individualIdNumberOptions = {
|
|
2481
|
-
[CountryCodes.Spain]: [
|
|
2482
|
-
{
|
|
2483
|
-
id: "dni",
|
|
2484
|
-
name: "dni"
|
|
2485
|
-
},
|
|
2486
|
-
{
|
|
2487
|
-
id: "nie",
|
|
2488
|
-
name: "nie"
|
|
2489
|
-
}
|
|
2490
|
-
]
|
|
2491
|
-
};
|
|
2492
|
-
const additionallIdNumberOptions = {
|
|
2493
|
-
[CountryCodes.NewZealand]: [
|
|
2494
|
-
{
|
|
2495
|
-
id: "driversLicense",
|
|
2496
|
-
name: "driversLicense"
|
|
2497
|
-
},
|
|
2498
|
-
{
|
|
2499
|
-
id: "passport",
|
|
2500
|
-
name: "passportNumber"
|
|
2501
|
-
}
|
|
2502
|
-
],
|
|
2503
|
-
[CountryCodes.HongKong]: [
|
|
2504
|
-
{
|
|
2505
|
-
id: "proofOfIdentityCard",
|
|
2506
|
-
name: "stateIssuedProofOfIdentityCard"
|
|
2507
|
-
},
|
|
2508
|
-
{
|
|
2509
|
-
id: "driversLicense",
|
|
2510
|
-
name: "driversLicense"
|
|
2511
|
-
},
|
|
2512
|
-
{
|
|
2513
|
-
id: "passport",
|
|
2514
|
-
name: "passportNumber"
|
|
2515
|
-
}
|
|
2516
|
-
],
|
|
2517
|
-
[CountryCodes.Australia]: [
|
|
2518
|
-
{
|
|
2519
|
-
id: "driversLicense",
|
|
2520
|
-
name: "driversLicense"
|
|
2521
|
-
},
|
|
2522
|
-
{
|
|
2523
|
-
id: "passport",
|
|
2524
|
-
name: "passportNumber"
|
|
2525
|
-
}
|
|
2526
|
-
]
|
|
2527
|
-
};
|
|
2528
|
-
const taxIdNumberOptions = {
|
|
2529
|
-
[CountryCodes.Australia]: [
|
|
2530
|
-
{
|
|
2531
|
-
id: "ABN",
|
|
2532
|
-
name: "australianBusinessNumberAbn"
|
|
2533
|
-
}
|
|
2534
|
-
],
|
|
2535
|
-
[CountryCodes.Austria]: [
|
|
2536
|
-
{
|
|
2537
|
-
id: "STEUERNUMMER",
|
|
2538
|
-
name: "taxInformationNumber__AT"
|
|
2539
|
-
}
|
|
2540
|
-
],
|
|
2541
|
-
[CountryCodes.Belgium]: [
|
|
2542
|
-
{
|
|
2543
|
-
id: "BUSINESS_NUMMER",
|
|
2544
|
-
name: "businessNumber",
|
|
2545
|
-
applicableOnlyFor: [
|
|
2546
|
-
CompanyTypesValues.SOLE_PROPRIETORSHIP,
|
|
2547
|
-
CompanyTypesValues.PRIVATE_COMPANY,
|
|
2548
|
-
CompanyTypesValues.GOVERNMENTAL_ORGANIZATION,
|
|
2549
|
-
CompanyTypesValues.INCORPORATED_ASSOCIATION,
|
|
2550
|
-
CompanyTypesValues.INCORPORATED_PARTNERSHIP,
|
|
2551
|
-
CompanyTypesValues.NON_PROFIT_OR_CHARITABLE,
|
|
2552
|
-
CompanyTypesValues.UNINCORPORATED_PARTNERSHIP,
|
|
2553
|
-
CompanyTypesValues.UNLISTED_PUBLIC_COMPANY
|
|
2554
|
-
]
|
|
2555
|
-
},
|
|
2556
|
-
{
|
|
2557
|
-
id: "NUMERO_NATIONAL",
|
|
2558
|
-
name: "taxInformationNumber__BE_Individual",
|
|
2559
|
-
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2560
|
-
}
|
|
2561
|
-
],
|
|
2562
|
-
[CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
|
|
2563
|
-
[CountryCodes.Canada]: [{ id: "BUSINESS_NUMBER", name: "businessNumber" }],
|
|
2564
|
-
[CountryCodes.Croatia]: [
|
|
2565
|
-
{
|
|
2566
|
-
id: "OIB",
|
|
2567
|
-
name: "taxInformationNumber__HR"
|
|
2568
|
-
}
|
|
2569
|
-
],
|
|
2570
|
-
[CountryCodes.Cyprus]: [
|
|
2571
|
-
{
|
|
2572
|
-
id: "TIC",
|
|
2573
|
-
name: "taxInformationNumber__CY"
|
|
2574
|
-
}
|
|
2575
|
-
],
|
|
2576
|
-
[CountryCodes.Estonia]: [
|
|
2577
|
-
{
|
|
2578
|
-
id: "ISIKUKOOD",
|
|
2579
|
-
name: "taxInformationNumber__ET_Individual",
|
|
2580
|
-
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2581
|
-
},
|
|
2582
|
-
{
|
|
2583
|
-
id: "registrikood",
|
|
2584
|
-
name: "registrikood",
|
|
2585
|
-
applicableOnlyFor: [CompanyTypesValues.PRIVATE_COMPANY]
|
|
2586
|
-
}
|
|
2587
|
-
],
|
|
2588
|
-
[CountryCodes.Finland]: [
|
|
2589
|
-
{
|
|
2590
|
-
id: "HENKILOTUNNUS",
|
|
2591
|
-
name: "taxInformationNumber__FI",
|
|
2592
|
-
applicableOnlyFor: [LegalEntityTypes.INDIVIDUAL]
|
|
2593
|
-
},
|
|
2594
|
-
{
|
|
2595
|
-
id: "YTUNNUS",
|
|
2596
|
-
name: "YTunnus",
|
|
2597
|
-
applicableOnlyFor: [CompanyTypesValues.PRIVATE_COMPANY]
|
|
2598
|
-
}
|
|
2599
|
-
],
|
|
2600
|
-
[CountryCodes.France]: [
|
|
2875
|
+
[CountryCodes.France]: [
|
|
2601
2876
|
{
|
|
2602
2877
|
id: "SIRET",
|
|
2603
2878
|
name: "siret",
|
|
@@ -2842,80 +3117,6 @@ const taxIdNumberOptions = {
|
|
|
2842
3117
|
}
|
|
2843
3118
|
]
|
|
2844
3119
|
};
|
|
2845
|
-
const vatNumberOptions = {
|
|
2846
|
-
[CountryCodes.Austria]: [{ id: "UST-ID", name: "UST-ID" }],
|
|
2847
|
-
[CountryCodes.Belgium]: [{ id: "euVatNumber", name: "euVatNumber" }],
|
|
2848
|
-
[CountryCodes.Bulgaria]: [{ id: "identifikacionenNomerDDS", name: "identifikacionenNomerDDS" }],
|
|
2849
|
-
[CountryCodes.Croatia]: [{ id: "PDVIdBrojOIB", name: "PDVIdBrojOIB" }],
|
|
2850
|
-
[CountryCodes.Cyprus]: [{ id: "arithmosEngraphes", name: "arithmosEngraphes" }],
|
|
2851
|
-
[CountryCodes.CzechRepublic]: [{ id: "DIC", name: "DIC" }],
|
|
2852
|
-
[CountryCodes.Denmark]: [
|
|
2853
|
-
{
|
|
2854
|
-
id: "momsregistreringsnummerCVR",
|
|
2855
|
-
name: "momsregistreringsnummerCVR"
|
|
2856
|
-
},
|
|
2857
|
-
{
|
|
2858
|
-
id: "stamregister",
|
|
2859
|
-
name: "stamregister"
|
|
2860
|
-
}
|
|
2861
|
-
],
|
|
2862
|
-
[CountryCodes.Estonia]: [
|
|
2863
|
-
{ id: "kaibemaksukohustuslaseNumber", name: "kaibemaksukohustuslaseNumber" }
|
|
2864
|
-
],
|
|
2865
|
-
[CountryCodes.Finland]: [
|
|
2866
|
-
{
|
|
2867
|
-
id: "arvonlisaveronumeroMervardesskattenummer",
|
|
2868
|
-
name: "arvonlisaveronumeroMervardesskattenummer"
|
|
2869
|
-
}
|
|
2870
|
-
],
|
|
2871
|
-
[CountryCodes.France]: [
|
|
2872
|
-
{
|
|
2873
|
-
id: "numeroDIdentificationALATaxe",
|
|
2874
|
-
name: "numeroDIdentificationALATaxe"
|
|
2875
|
-
},
|
|
2876
|
-
{
|
|
2877
|
-
id: "NumeroDeTVA",
|
|
2878
|
-
name: "NumeroDeTVA"
|
|
2879
|
-
}
|
|
2880
|
-
],
|
|
2881
|
-
[CountryCodes.Germany]: [{ id: "USt-IdNr", name: "USt-IdNr" }],
|
|
2882
|
-
[CountryCodes.Greece]: [{ id: "grTaxId", name: "grTaxId" }],
|
|
2883
|
-
[CountryCodes.Hungary]: [{ id: "huTaxId", name: "huTaxId" }],
|
|
2884
|
-
[CountryCodes.Ireland]: [{ id: "vatNumber", name: "vatNumber" }],
|
|
2885
|
-
[CountryCodes.Italy]: [{ id: "partitaIVA", name: "partitaIVA" }],
|
|
2886
|
-
[CountryCodes.Latvia]: [{ id: "lvTaxId", name: "lvTaxId" }],
|
|
2887
|
-
[CountryCodes.Liechtenstein]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }],
|
|
2888
|
-
[CountryCodes.Lithuania]: [{ id: "PVMmoketojoKodas", name: "PVMmoketojoKodas" }],
|
|
2889
|
-
[CountryCodes.Luxembourg]: [
|
|
2890
|
-
{ id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
|
|
2891
|
-
],
|
|
2892
|
-
[CountryCodes.Malaysia]: [{ id: "SST", name: "SST" }],
|
|
2893
|
-
[CountryCodes.Malta]: [{ id: "vatNumber", name: "vatNumber" }],
|
|
2894
|
-
[CountryCodes.Monaco]: [
|
|
2895
|
-
{ id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
|
|
2896
|
-
],
|
|
2897
|
-
[CountryCodes.Netherlands]: [{ id: "btwNummer", name: "btwNummer" }],
|
|
2898
|
-
[CountryCodes.Norway]: [{ id: "mvanummer", name: "mvanummer" }],
|
|
2899
|
-
[CountryCodes.Poland]: [{ id: "NIP", name: "NIP" }],
|
|
2900
|
-
[CountryCodes.Portugal]: [{ id: "numerodeIVA", name: "numerodeIVA" }],
|
|
2901
|
-
[CountryCodes.Romania]: [
|
|
2902
|
-
{ id: "codulDeIdentificareFiscala", name: "codulDeIdentificareFiscala" }
|
|
2903
|
-
],
|
|
2904
|
-
[CountryCodes.Slovakia]: [{ id: "skTaxId", name: "skTaxId" }],
|
|
2905
|
-
[CountryCodes.Slovenia]: [{ id: "siTaxId", name: "siTaxId" }],
|
|
2906
|
-
[CountryCodes.Spain]: [{ id: "NIFdeIVA", name: "NIFdeIVA" }],
|
|
2907
|
-
[CountryCodes.Sweden]: [
|
|
2908
|
-
{
|
|
2909
|
-
id: "vatNummerMomsregistreringsnummerOrMomsnummer",
|
|
2910
|
-
name: "vatNummerMomsregistreringsnummerOrMomsnummer"
|
|
2911
|
-
}
|
|
2912
|
-
],
|
|
2913
|
-
[CountryCodes.Switzerland]: [{ id: "Mehrwertsteuernummer", name: "Mehrwertsteuernummer" }],
|
|
2914
|
-
[CountryCodes.UnitedArabEmirates]: [
|
|
2915
|
-
{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }
|
|
2916
|
-
],
|
|
2917
|
-
[CountryCodes.UnitedKingdom]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }]
|
|
2918
|
-
};
|
|
2919
3120
|
const getTaxIdNumberOptions = (country, companyType) => {
|
|
2920
3121
|
const optionsForCountry = taxIdNumberOptions[country];
|
|
2921
3122
|
if (!companyType || !optionsForCountry) return optionsForCountry;
|
|
@@ -2923,430 +3124,6 @@ const getTaxIdNumberOptions = (country, companyType) => {
|
|
|
2923
3124
|
(option) => option.applicableOnlyFor?.includes(companyType) ?? true
|
|
2924
3125
|
);
|
|
2925
3126
|
};
|
|
2926
|
-
const getVatNumberOptions = (country, companyType) => {
|
|
2927
|
-
const optionsForCountry = vatNumberOptions[country];
|
|
2928
|
-
if (!companyType || !optionsForCountry) return optionsForCountry;
|
|
2929
|
-
return optionsForCountry.filter(
|
|
2930
|
-
(option) => option.applicableOnlyFor?.includes(companyType) ?? true
|
|
2931
|
-
);
|
|
2932
|
-
};
|
|
2933
|
-
const countryToTaxInfoTypeMap = {
|
|
2934
|
-
US: "EIN",
|
|
2935
|
-
AU: "ABN",
|
|
2936
|
-
NZ: "IRD",
|
|
2937
|
-
HK: "BRN",
|
|
2938
|
-
SG: "GST"
|
|
2939
|
-
};
|
|
2940
|
-
const isFinancialInformationRequired = (isFinancialInformationExperimentEnabled, taskType, country, capabilities, legalEntityType) => {
|
|
2941
|
-
const isOrganization = legalEntityType === LegalEntityTypes.ORGANIZATION;
|
|
2942
|
-
if (!isFinancialInformationExperimentEnabled || !COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
2943
|
-
return void 0;
|
|
2944
|
-
}
|
|
2945
|
-
if (country === CountryCodes.UnitedKingdom && (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY || taskType === TaskTypes.BUSINESS_DETAILS)) {
|
|
2946
|
-
return "REQUIRED";
|
|
2947
|
-
}
|
|
2948
|
-
if (taskType === TaskTypes.BUSINESS_DETAILS && isOrganization) {
|
|
2949
|
-
if (keysOf(capabilities ?? {}).some((capability) => capability === "issueBankAccount")) {
|
|
2950
|
-
return "REQUIRED";
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
return void 0;
|
|
2954
|
-
};
|
|
2955
|
-
function requestingIssuing(rootLegalEntity) {
|
|
2956
|
-
const capabilities = rootLegalEntity?.capabilities ?? {};
|
|
2957
|
-
return "issueCard" in capabilities && capabilities.issueCard?.requested === true || "issueCardConsumer" in capabilities && capabilities.issueCardConsumer?.requested === true || "issueCardCommercial" in capabilities && capabilities.issueCardCommercial?.requested === true || "useCard" in capabilities && capabilities.useCard?.requested === true || "useCardConsumer" in capabilities && capabilities.useCardConsumer?.requested === true || "useCardCommercial" in capabilities && capabilities.useCardCommercial?.requested === true;
|
|
2958
|
-
}
|
|
2959
|
-
function requestingBanking(rootLegalEntity) {
|
|
2960
|
-
const capabilities = rootLegalEntity?.capabilities ?? {};
|
|
2961
|
-
return "issueBankAccount" in capabilities && capabilities.issueBankAccount?.requested === true || "sendToThirdParty" in capabilities && capabilities.sendToThirdParty?.requested === true || "receiveFromThirdParty" in capabilities && capabilities.receiveFromThirdParty?.requested === true;
|
|
2962
|
-
}
|
|
2963
|
-
const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
2964
|
-
CountryCodes.Australia,
|
|
2965
|
-
CountryCodes.Gibraltar,
|
|
2966
|
-
CountryCodes.Guernsey,
|
|
2967
|
-
CountryCodes.HongKong,
|
|
2968
|
-
CountryCodes.Ireland,
|
|
2969
|
-
CountryCodes.IsleOfMan,
|
|
2970
|
-
CountryCodes.Jersey,
|
|
2971
|
-
CountryCodes.Malta,
|
|
2972
|
-
CountryCodes.PuertoRico,
|
|
2973
|
-
CountryCodes.Spain,
|
|
2974
|
-
CountryCodes.UnitedKingdom,
|
|
2975
|
-
CountryCodes.UnitedStates
|
|
2976
|
-
];
|
|
2977
|
-
const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
2978
|
-
CountryCodes.HongKong,
|
|
2979
|
-
CountryCodes.PuertoRico,
|
|
2980
|
-
CountryCodes.UnitedStates
|
|
2981
|
-
];
|
|
2982
|
-
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [
|
|
2983
|
-
CountryCodes.HongKong
|
|
2984
|
-
];
|
|
2985
|
-
const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
|
|
2986
|
-
CountryCodes.Austria,
|
|
2987
|
-
CountryCodes.Canada,
|
|
2988
|
-
CountryCodes.Finland,
|
|
2989
|
-
CountryCodes.Germany,
|
|
2990
|
-
CountryCodes.Lithuania,
|
|
2991
|
-
CountryCodes.Luxembourg,
|
|
2992
|
-
CountryCodes.NewZealand,
|
|
2993
|
-
CountryCodes.Poland,
|
|
2994
|
-
CountryCodes.Sweden,
|
|
2995
|
-
CountryCodes.Switzerland
|
|
2996
|
-
];
|
|
2997
|
-
const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
|
|
2998
|
-
CountryCodes.Canada,
|
|
2999
|
-
CountryCodes.UnitedStates
|
|
3000
|
-
];
|
|
3001
|
-
const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [
|
|
3002
|
-
CountryCodes.Germany
|
|
3003
|
-
];
|
|
3004
|
-
const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
3005
|
-
CountryCodes.Australia,
|
|
3006
|
-
CountryCodes.Canada,
|
|
3007
|
-
CountryCodes.Gibraltar,
|
|
3008
|
-
CountryCodes.HongKong,
|
|
3009
|
-
CountryCodes.NewZealand,
|
|
3010
|
-
CountryCodes.PuertoRico,
|
|
3011
|
-
CountryCodes.Singapore,
|
|
3012
|
-
CountryCodes.UnitedStates,
|
|
3013
|
-
CountryCodes.Guernsey,
|
|
3014
|
-
CountryCodes.Jersey,
|
|
3015
|
-
CountryCodes.IsleOfMan,
|
|
3016
|
-
CountryCodes.Mexico,
|
|
3017
|
-
CountryCodes.Brazil,
|
|
3018
|
-
CountryCodes.Japan
|
|
3019
|
-
];
|
|
3020
|
-
const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [
|
|
3021
|
-
CountryCodes.Singapore
|
|
3022
|
-
];
|
|
3023
|
-
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
|
|
3024
|
-
// strictly a subset of countries which use tax ID
|
|
3025
|
-
// right now in all countries companies must provide a tax ID - but maybe there will be exemptions in future?
|
|
3026
|
-
];
|
|
3027
|
-
const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
3028
|
-
// strictly a subset of countries which use tax ID
|
|
3029
|
-
CountryCodes.Canada,
|
|
3030
|
-
CountryCodes.PuertoRico,
|
|
3031
|
-
CountryCodes.UnitedStates
|
|
3032
|
-
];
|
|
3033
|
-
const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [
|
|
3034
|
-
CountryCodes.HongKong,
|
|
3035
|
-
CountryCodes.Singapore
|
|
3036
|
-
];
|
|
3037
|
-
const COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
3038
|
-
const COUNTRIES_USING_COMPANY_SEARCH = [
|
|
3039
|
-
CountryCodes.UnitedStates
|
|
3040
|
-
];
|
|
3041
|
-
const COUNTRY_OF_GOVERNING_LAW_POSSIBLE = [
|
|
3042
|
-
CountryCodes.UnitedKingdom
|
|
3043
|
-
];
|
|
3044
|
-
const COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
3045
|
-
CountryCodes.Austria,
|
|
3046
|
-
CountryCodes.Belgium,
|
|
3047
|
-
CountryCodes.Croatia,
|
|
3048
|
-
CountryCodes.Cyprus,
|
|
3049
|
-
CountryCodes.Estonia,
|
|
3050
|
-
CountryCodes.Finland,
|
|
3051
|
-
CountryCodes.France,
|
|
3052
|
-
CountryCodes.Germany,
|
|
3053
|
-
CountryCodes.Greece,
|
|
3054
|
-
CountryCodes.Ireland,
|
|
3055
|
-
CountryCodes.Italy,
|
|
3056
|
-
CountryCodes.Latvia,
|
|
3057
|
-
CountryCodes.Lithuania,
|
|
3058
|
-
CountryCodes.Luxembourg,
|
|
3059
|
-
CountryCodes.Malta,
|
|
3060
|
-
CountryCodes.Netherlands,
|
|
3061
|
-
CountryCodes.Portugal,
|
|
3062
|
-
CountryCodes.Slovakia,
|
|
3063
|
-
CountryCodes.Slovenia,
|
|
3064
|
-
CountryCodes.Spain,
|
|
3065
|
-
CountryCodes.UnitedKingdom
|
|
3066
|
-
];
|
|
3067
|
-
const COUNTRIES_REQUIRING_E_INVOICING_CODE = [
|
|
3068
|
-
/**
|
|
3069
|
-
* @description These are the countries for which E-Invoicing code is a compliance requirement. There will be more in the future.
|
|
3070
|
-
*/
|
|
3071
|
-
CountryCodes.Italy
|
|
3072
|
-
];
|
|
3073
|
-
const COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [
|
|
3074
|
-
CountryCodes.Australia
|
|
3075
|
-
];
|
|
3076
|
-
const TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
3077
|
-
// The following countries are commented out just to make it more clear that these
|
|
3078
|
-
// use tax id but since it's the same field as business registration we don't want
|
|
3079
|
-
// to remove those here and have a bad ux. So instead in the map schema part
|
|
3080
|
-
// we copy over the values to the taxinformation object
|
|
3081
|
-
// CountryCodes.Estonia,
|
|
3082
|
-
// CountryCodes.Finland,
|
|
3083
|
-
// CountryCodes.France,
|
|
3084
|
-
// CountryCodes.Latvia,
|
|
3085
|
-
// CountryCodes.Lithuania,
|
|
3086
|
-
// CountryCodes.Portugal,
|
|
3087
|
-
// CountryCodes.Spain,
|
|
3088
|
-
CountryCodes.Austria,
|
|
3089
|
-
CountryCodes.Belgium,
|
|
3090
|
-
CountryCodes.Croatia,
|
|
3091
|
-
CountryCodes.Cyprus,
|
|
3092
|
-
CountryCodes.Germany,
|
|
3093
|
-
CountryCodes.Greece,
|
|
3094
|
-
CountryCodes.Ireland,
|
|
3095
|
-
CountryCodes.Italy,
|
|
3096
|
-
CountryCodes.Luxembourg,
|
|
3097
|
-
CountryCodes.Malta,
|
|
3098
|
-
CountryCodes.Netherlands,
|
|
3099
|
-
CountryCodes.Slovakia,
|
|
3100
|
-
CountryCodes.Slovenia,
|
|
3101
|
-
CountryCodes.UnitedKingdom
|
|
3102
|
-
];
|
|
3103
|
-
function isUsingCompanySearch(country, taskType) {
|
|
3104
|
-
return taskType === TaskTypes.BUSINESS_DETAILS && COUNTRIES_USING_COMPANY_SEARCH.includes(country);
|
|
3105
|
-
}
|
|
3106
|
-
const isRegistrationNumberAbsentStateV4Scenario = (country, entityType) => {
|
|
3107
|
-
return country === CountryCodes.Australia && (entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || entityType === CompanyTypesValues.INCORPORATED_PARTNERSHIP) || country === CountryCodes.NewZealand;
|
|
3108
|
-
};
|
|
3109
|
-
const rules = ({
|
|
3110
|
-
data,
|
|
3111
|
-
defaultData,
|
|
3112
|
-
country,
|
|
3113
|
-
taskType,
|
|
3114
|
-
isExperimentEnabled = () => false,
|
|
3115
|
-
isSettingEnabled = () => false,
|
|
3116
|
-
accountHolder,
|
|
3117
|
-
rootLegalEntity,
|
|
3118
|
-
tinMatched
|
|
3119
|
-
}) => {
|
|
3120
|
-
const countryRequiresDateOfIncorporationForCompanies = () => {
|
|
3121
|
-
if (COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION.includes(country)) {
|
|
3122
|
-
return "REQUIRED";
|
|
3123
|
-
}
|
|
3124
|
-
};
|
|
3125
|
-
const countryRequiresFinancialInformation = () => {
|
|
3126
|
-
if (isExperimentEnabled("EnableFinancialInformationComponentV4") && COUNTRIES_REQUIRING_FINANCIAL_INFORMATION.includes(country)) {
|
|
3127
|
-
const isFinancialInformationExperimentEnabled = isExperimentEnabled(
|
|
3128
|
-
"EnableFinancialInformationComponentV4"
|
|
3129
|
-
);
|
|
3130
|
-
const leType = rootLegalEntity?.type;
|
|
3131
|
-
return isFinancialInformationRequired(
|
|
3132
|
-
isFinancialInformationExperimentEnabled,
|
|
3133
|
-
taskType,
|
|
3134
|
-
country,
|
|
3135
|
-
rootLegalEntity?.capabilities,
|
|
3136
|
-
leType
|
|
3137
|
-
);
|
|
3138
|
-
}
|
|
3139
|
-
};
|
|
3140
|
-
return createFormRules({
|
|
3141
|
-
requireDoingBusinessAsName: () => {
|
|
3142
|
-
return data.additionalInformation?.hasDoingBusinessAs ? "REQUIRED" : void 0;
|
|
3143
|
-
},
|
|
3144
|
-
countryRequiresStateOrProvince: () => {
|
|
3145
|
-
if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
|
|
3146
|
-
return "REQUIRED";
|
|
3147
|
-
}
|
|
3148
|
-
},
|
|
3149
|
-
ifPubliclyTradedCompany: () => {
|
|
3150
|
-
if (data.companyStructure?.entityType === CompanyTypesValues.PUBLIC_COMPANY) {
|
|
3151
|
-
return "REQUIRED";
|
|
3152
|
-
}
|
|
3153
|
-
},
|
|
3154
|
-
countryUsesVat: () => {
|
|
3155
|
-
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
3156
|
-
return data.additionalInformation?.exemptedFromVat ? "OPTIONAL" : "REQUIRED";
|
|
3157
|
-
}
|
|
3158
|
-
},
|
|
3159
|
-
vatNumberType: () => {
|
|
3160
|
-
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
3161
|
-
return "OPTIONAL";
|
|
3162
|
-
}
|
|
3163
|
-
},
|
|
3164
|
-
isVatExempt: () => {
|
|
3165
|
-
if (!COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country)) {
|
|
3166
|
-
return data.additionalInformation?.exemptedFromVat ? "REQUIRED" : "OPTIONAL";
|
|
3167
|
-
}
|
|
3168
|
-
},
|
|
3169
|
-
countryUsesTaxId: () => {
|
|
3170
|
-
const isExemptFromTax = Boolean(
|
|
3171
|
-
data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
|
|
3172
|
-
);
|
|
3173
|
-
if (TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION.includes(country) && rootLegalEntity?.type === "organization" && // SOE-5931 - TODO: investigate L scenario returned to show this on the backend
|
|
3174
|
-
keysOf(rootLegalEntity.capabilities ?? {}).includes("issueBankAccount")) {
|
|
3175
|
-
return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
|
|
3176
|
-
}
|
|
3177
|
-
if (COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country) && !(taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY && COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP.includes(country))) {
|
|
3178
|
-
return isExemptFromTax ? "OPTIONAL" : "REQUIRED";
|
|
3179
|
-
}
|
|
3180
|
-
},
|
|
3181
|
-
companyRegistrationNumberExemptionAllowed: () => {
|
|
3182
|
-
const isExemptFromRegistrationNumber = Boolean(
|
|
3183
|
-
data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
|
|
3184
|
-
);
|
|
3185
|
-
if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && isRegistrationNumberAbsentStateV4Scenario(country, data.companyStructure?.entityType)) {
|
|
3186
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3187
|
-
}
|
|
3188
|
-
switch (taskType) {
|
|
3189
|
-
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
3190
|
-
if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country))
|
|
3191
|
-
return;
|
|
3192
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3193
|
-
}
|
|
3194
|
-
default: {
|
|
3195
|
-
switch (country) {
|
|
3196
|
-
case CountryCodes.Germany: {
|
|
3197
|
-
if (data.companyStructure?.entityType === CompanyTypesValues.GOVERNMENTAL_ORGANIZATION || data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
|
|
3198
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3199
|
-
}
|
|
3200
|
-
return;
|
|
3201
|
-
}
|
|
3202
|
-
case CountryCodes.Denmark: {
|
|
3203
|
-
if (data.companyStructure?.entityType === CompanyTypesValues.NON_PROFIT_OR_CHARITABLE) {
|
|
3204
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3205
|
-
}
|
|
3206
|
-
return;
|
|
3207
|
-
}
|
|
3208
|
-
// We're no longer collecting registration numbers for new HK entities, but for existing,
|
|
3209
|
-
// we want to offer the exemption if they have a registration number attached. See OXP-7075
|
|
3210
|
-
case CountryCodes.HongKong: {
|
|
3211
|
-
if (country === CountryCodes.HongKong && !defaultData?.additionalInformation?.registrationNumber)
|
|
3212
|
-
return;
|
|
3213
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3214
|
-
}
|
|
3215
|
-
default: {
|
|
3216
|
-
if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country))
|
|
3217
|
-
return;
|
|
3218
|
-
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
3219
|
-
}
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
},
|
|
3224
|
-
countryOfGoverningLawRequired: () => {
|
|
3225
|
-
if (isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies") && COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(data.basicInformation?.country)) {
|
|
3226
|
-
return "REQUIRED";
|
|
3227
|
-
}
|
|
3228
|
-
},
|
|
3229
|
-
countryRequiresRegistrationNumber: () => {
|
|
3230
|
-
const isExemptFromRegistrationNumber = Boolean(
|
|
3231
|
-
data.basicInformation?.exemptedFromRegistrationNumber ?? data.additionalInformation?.exemptedFromRegistrationNumber
|
|
3232
|
-
);
|
|
3233
|
-
switch (taskType) {
|
|
3234
|
-
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
3235
|
-
if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
|
|
3236
|
-
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS.includes(country)) {
|
|
3237
|
-
return "OPTIONAL";
|
|
3238
|
-
}
|
|
3239
|
-
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
3240
|
-
}
|
|
3241
|
-
default: {
|
|
3242
|
-
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
|
|
3243
|
-
return "OPTIONAL";
|
|
3244
|
-
}
|
|
3245
|
-
if (country === CountryCodes.HongKong) {
|
|
3246
|
-
if (!defaultData?.additionalInformation?.registrationNumber) return;
|
|
3247
|
-
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
3248
|
-
}
|
|
3249
|
-
if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
|
|
3250
|
-
return isExemptFromRegistrationNumber ? "OPTIONAL" : "REQUIRED";
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
},
|
|
3255
|
-
registrationNumberType: () => {
|
|
3256
|
-
switch (taskType) {
|
|
3257
|
-
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
3258
|
-
if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
|
|
3259
|
-
return "OPTIONAL";
|
|
3260
|
-
}
|
|
3261
|
-
default: {
|
|
3262
|
-
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
|
|
3263
|
-
return "OPTIONAL";
|
|
3264
|
-
}
|
|
3265
|
-
if (COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) return;
|
|
3266
|
-
return "OPTIONAL";
|
|
3267
|
-
}
|
|
3268
|
-
}
|
|
3269
|
-
},
|
|
3270
|
-
countryUsesUenOrGst: () => {
|
|
3271
|
-
if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
3272
|
-
return;
|
|
3273
|
-
}
|
|
3274
|
-
if (COUNTRIES_THAT_USES_UEN_OR_GST.includes(country)) {
|
|
3275
|
-
return "REQUIRED";
|
|
3276
|
-
}
|
|
3277
|
-
},
|
|
3278
|
-
countryHasTaxExemptions: () => {
|
|
3279
|
-
const isExemptFromTax = Boolean(
|
|
3280
|
-
data.basicInformation?.exemptedFromTax ?? data.additionalInformation?.exemptedFromTax
|
|
3281
|
-
);
|
|
3282
|
-
switch (taskType) {
|
|
3283
|
-
case TaskTypes.SOLE_PROPRIETOR_COMPANY: {
|
|
3284
|
-
if (!COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) return;
|
|
3285
|
-
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
3286
|
-
}
|
|
3287
|
-
default: {
|
|
3288
|
-
if (isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust") {
|
|
3289
|
-
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
3290
|
-
}
|
|
3291
|
-
if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
|
|
3292
|
-
return isExemptFromTax ? "REQUIRED" : "OPTIONAL";
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
}
|
|
3296
|
-
},
|
|
3297
|
-
usingCompanySearch: () => {
|
|
3298
|
-
if (isUsingCompanySearch(country, taskType)) {
|
|
3299
|
-
return "REQUIRED";
|
|
3300
|
-
}
|
|
3301
|
-
},
|
|
3302
|
-
countryRequiresFinancialInformation,
|
|
3303
|
-
isDateOfIncorporationRequired: () => {
|
|
3304
|
-
return countryRequiresDateOfIncorporationForCompanies() || countryRequiresFinancialInformation();
|
|
3305
|
-
},
|
|
3306
|
-
isFinancialReportingFieldsRequired: () => {
|
|
3307
|
-
return countryRequiresFinancialInformation() === "REQUIRED" && isDateOlderThanAYear(data.additionalInformation?.dateOfIncorporation) ? "REQUIRED" : void 0;
|
|
3308
|
-
},
|
|
3309
|
-
isIndustryCodeRequired: () => {
|
|
3310
|
-
const needsBusinessLine = requestingIssuing(rootLegalEntity) || requestingBanking(rootLegalEntity);
|
|
3311
|
-
if (isSettingEnabled(SettingNames.AllowBusinessLines) && needsBusinessLine) {
|
|
3312
|
-
return "REQUIRED";
|
|
3313
|
-
}
|
|
3314
|
-
},
|
|
3315
|
-
annualTurnoverRequired: () => {
|
|
3316
|
-
if (data.companyFinancialInformation?.reportedValueOption === "annualTurnover") {
|
|
3317
|
-
return "REQUIRED";
|
|
3318
|
-
}
|
|
3319
|
-
},
|
|
3320
|
-
balanceSheetTotalRequired: () => {
|
|
3321
|
-
if (data.companyFinancialInformation?.reportedValueOption === "balanceSheetTotal") {
|
|
3322
|
-
return "REQUIRED";
|
|
3323
|
-
}
|
|
3324
|
-
},
|
|
3325
|
-
isEInvoicingCodeEnabled: () => {
|
|
3326
|
-
if (isExperimentEnabled("EnableEInvoicingCodeField") && COUNTRIES_REQUIRING_E_INVOICING_CODE.includes(country)) {
|
|
3327
|
-
return "REQUIRED";
|
|
3328
|
-
}
|
|
3329
|
-
},
|
|
3330
|
-
ifCountryUsAndTinFailed: () => {
|
|
3331
|
-
if (taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
3332
|
-
return;
|
|
3333
|
-
}
|
|
3334
|
-
if (tinMatched === false && country === CountryCodes.UnitedStates) {
|
|
3335
|
-
return "REQUIRED";
|
|
3336
|
-
}
|
|
3337
|
-
},
|
|
3338
|
-
businessRequiresCompanyType: () => {
|
|
3339
|
-
if (taskType !== TaskTypes.SOLE_PROPRIETOR_COMPANY) {
|
|
3340
|
-
return "REQUIRED";
|
|
3341
|
-
}
|
|
3342
|
-
},
|
|
3343
|
-
japaneseLegalCompanyName: () => {
|
|
3344
|
-
if (isJapanLocalizationEnabled(isExperimentEnabled, country)) {
|
|
3345
|
-
return "REQUIRED";
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
});
|
|
3349
|
-
};
|
|
3350
3127
|
const inferTaxIdNumberType = (taxInformation, country, companyType) => {
|
|
3351
3128
|
if (!taxInformation) return void 0;
|
|
3352
3129
|
const optionsForCountry = getTaxIdNumberOptions(country, companyType);
|
|
@@ -3482,7 +3259,7 @@ function TaxInformationField({
|
|
|
3482
3259
|
entityType,
|
|
3483
3260
|
defaultData
|
|
3484
3261
|
}) {
|
|
3485
|
-
const {
|
|
3262
|
+
const { isFeatureEnabled } = useToggleContext();
|
|
3486
3263
|
const { t } = useTranslation("common");
|
|
3487
3264
|
const { accountHolder } = useAccountHolder();
|
|
3488
3265
|
const currentCountryTaxInformation = useMemo(
|
|
@@ -3492,7 +3269,7 @@ function TaxInformationField({
|
|
|
3492
3269
|
const isUsSoleProp = country === "US" && entityType === CompanyTypesValues.SOLE_PROPRIETORSHIP;
|
|
3493
3270
|
const options = getTaxIdNumberOptions(country, entityType);
|
|
3494
3271
|
const showTaxIdExemptedOptions = canExempt && (options?.length ?? 0) > 1 || isUsSoleProp;
|
|
3495
|
-
const canSaveAbsentState =
|
|
3272
|
+
const canSaveAbsentState = isFeatureEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust";
|
|
3496
3273
|
const exemptionLabel = isUsSoleProp ? t(($) => $["socialSecurityNumber"]) : labels.exemptedFromTax;
|
|
3497
3274
|
const shouldRenderInput = isUsSoleProp ? currentCountryTaxInformation?.type === "EIN" : !data.isUen;
|
|
3498
3275
|
const taxIdNumberType = useMemo(() => {
|
|
@@ -3691,31 +3468,27 @@ function TaxInformationField({
|
|
|
3691
3468
|
}
|
|
3692
3469
|
export {
|
|
3693
3470
|
COUNTRY_OF_GOVERNING_LAW_POSSIBLE as C,
|
|
3471
|
+
DocumentGuidance as D,
|
|
3694
3472
|
MemoizedDocumentUpload as M,
|
|
3695
3473
|
StateCodesUS as S,
|
|
3696
3474
|
TaxInformationField as T,
|
|
3697
3475
|
taxInformationDefaultFieldConfig as a,
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3476
|
+
taxIdNumberOptions as b,
|
|
3477
|
+
TAX_INFORMATION_FIELD as c,
|
|
3478
|
+
requestingIssuing as d,
|
|
3479
|
+
getTaxInformationPlaceholderText as e,
|
|
3480
|
+
countryToTaxInfoTypeMap as f,
|
|
3703
3481
|
getFieldsWithExistingData as g,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
businessRegistrationNumberPatterns as q,
|
|
3482
|
+
isRegistrationNumberAbsentStateV4Scenario as h,
|
|
3483
|
+
isUsingCompanySearch as i,
|
|
3484
|
+
getTaxIdNumberOptions as j,
|
|
3485
|
+
COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT as k,
|
|
3486
|
+
rules as l,
|
|
3487
|
+
businessRegistrationNumberMasks as m,
|
|
3488
|
+
businessRegistrationNumberPatterns as n,
|
|
3489
|
+
exemptedFromTaxDefaultFieldMetadata as o,
|
|
3490
|
+
exemptedFromTaxDefaultFieldConfig as p,
|
|
3714
3491
|
requestingBanking as r,
|
|
3715
3492
|
stateFormatGuidanceText as s,
|
|
3716
|
-
taxInformationDefaultFieldMetadata as t
|
|
3717
|
-
getVatNumberOptions as u,
|
|
3718
|
-
vatNumberOptions as v,
|
|
3719
|
-
exemptedFromTaxDefaultFieldMetadata as w,
|
|
3720
|
-
exemptedFromTaxDefaultFieldConfig as x
|
|
3493
|
+
taxInformationDefaultFieldMetadata as t
|
|
3721
3494
|
};
|