@adyen/kyc-components 4.26.0 → 4.27.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceWorkflow-CBSueOOP.js → AcceptTermsOfServiceWorkflow-CLxIT19W.js} +4 -4
- package/dist/{Accordion-BAdwrgCR.js → Accordion-CTQfC17W.js} +1 -1
- package/dist/{AccountSetupRejected-CDm8QalJ.js → AccountSetupRejected-Cuu1cHgb.js} +2 -2
- package/dist/{AdaptiveWorkflow-foHLHsbM.js → AdaptiveWorkflow-Du4hN8Ry.js} +22 -22
- package/dist/{AdaptiveWorkflowComponent-B8rbDAPW.js → AdaptiveWorkflowComponent-CoOpFWm7.js} +5 -5
- package/dist/{AddressFields-Bvp46aUT.js → AddressFields-Dzoa4PU5.js} +33 -72
- package/dist/{Avatar-C2zeqSSB.js → Avatar-yJfk9A6l.js} +1 -1
- package/dist/{BusinessFinancingDropin-BSLyffh0.js → BusinessFinancingDropin-DP6b5D85.js} +123 -55
- package/dist/{BusinessFinancingPage-D6gMziy2.js → BusinessFinancingPage-BIGEXFdp.js} +6 -6
- package/dist/{BusinessRegistrationNumberField-C53lsFml.js → BusinessRegistrationNumberField-B2n9ugLK.js} +6 -6
- package/dist/{BusinessRegistrationNumberFieldGroup-CneaE9tx.js → BusinessRegistrationNumberFieldGroup-BvKp9WMt.js} +6 -6
- package/dist/{BusinessTypeSelectionPage-Dy0711dl.js → BusinessTypeSelectionPage-xRXq2lGM.js} +13 -13
- package/dist/{Button-Dwr6jvJZ.js → Button-BYafPrZH.js} +1 -1
- package/dist/{Checkbox-BQIr-4_9.js → Checkbox-qFA2J_1r.js} +8 -8
- package/dist/{ComponentGroup-4nWlAgLE.js → ComponentGroup-CyykPP2r.js} +3 -3
- package/dist/{ConstitutionalDocument-RK9aBLna.js → ConstitutionalDocument-DzLLKoWV.js} +19 -26
- package/dist/{ContactDetails-DiNSGqCa.js → ContactDetails-CcWafw_y.js} +5 -5
- package/dist/{ContextGuidance-qwuLBa1O.js → ContextGuidance-gAsOnDqD.js} +3 -3
- package/dist/{CountryField-vJCcPR1M.js → CountryField-Dxuy2L9C.js} +4 -4
- package/dist/{Currency-CE-ywuDo.js → Currency-CAEcQwe6.js} +16 -10
- package/dist/{CustomerSupport-CcurAHew.js → CustomerSupport-C1nrEyEr.js} +29 -16
- package/dist/{DateField-O2Vtrn7y.js → DateField-D8GSp5fV.js} +4 -4
- package/dist/{DebugModal-CZ8JW9pA.js → DebugModal-Bwhnd1v5.js} +10 -10
- package/dist/{DecisionMakerDetails-DC2Ej2ns.js → DecisionMakerDetails-DHsxYfa3.js} +79 -174
- package/dist/{DecisionMakerDetailsPage-Dy3bSLxg.js → DecisionMakerDetailsPage-DoisZYll.js} +9 -9
- package/dist/{DecisionMakers-CzV7Whwu.js → DecisionMakers-BD5J47Zs.js} +17 -18
- package/dist/{Dropzone-Dh1tAtrG.js → Dropzone-CTz4GiZE.js} +7 -7
- package/dist/{EmailField-BVVBcDtc.js → EmailField-DoEYalIM.js} +4 -4
- package/dist/{EmbeddedStatus-4YjyzkcD.js → EmbeddedStatus-mdQsQfof.js} +2 -2
- package/dist/{EndStateLayout-C5Pqler-.js → EndStateLayout-B-M90Rnh.js} +2 -2
- package/dist/{EntityAssociation-Cfw9pWHA.js → EntityAssociation-aB7bppFQ.js} +6 -6
- package/dist/{ErrorPanel-BlLWphde.js → ErrorPanel-CuoQueZk.js} +10 -17
- package/dist/{GlobalEntryModal-DE543xEp.js → GlobalEntryModal-ZuajLl8B.js} +439 -298
- package/dist/{GlobalEntryPage-9U3nCl7d.js → GlobalEntryPage-WrN5mVJe.js} +7 -8
- package/dist/{Icon-_YUEZg1p.js → Icon-jVvV1zXc.js} +1 -1
- package/dist/{IdentityNumber-9bSJ9MaL.js → IdentityNumber-IDvVA7_z.js} +5 -5
- package/dist/{IdentityNumberFieldGroup-CJ-4hw-M.js → IdentityNumberFieldGroup-CW8lJ6_d.js} +2 -2
- package/dist/{IdentityScreeningWorkflow-Bha_FYLN.js → IdentityScreeningWorkflow-TfHCTDlp.js} +12 -13
- package/dist/{IndividualDropin-QrtK-WO2.js → IndividualDropin-MpaDWh9N.js} +147 -223
- package/dist/{IndustryCodeFieldGroup-uUq6Wlye.js → IndustryCodeFieldGroup-DsJF3GOE.js} +5 -5
- package/dist/{InputDate-DeCynmMZ.js → InputDate-Bmx3_p-j.js} +8 -4
- package/dist/{InputText-CimBq-8I.js → InputText-CGngUMdf.js} +2 -2
- package/dist/{Introduction-CB1vutfx.js → Introduction-Dt8pjcxt.js} +6 -6
- package/dist/{InvitedDecisionMakerComponent-C_692Uhy.js → InvitedDecisionMakerComponent-1oXTODfv.js} +13 -14
- package/dist/{JpAddressFields-CVKfCLia.js → JpAddressFields-DhzFwu0N.js} +9 -10
- package/dist/{LegalCompanyNameField-C6W0bxo-.js → LegalCompanyNameField-BsY3tJfX.js} +5 -5
- package/dist/{LegalRepresentativeDetailsPage-BH_ZofFb.js → LegalRepresentativeDetailsPage-C50GRV2l.js} +4 -4
- package/dist/{Link-D0Yqc2r0.js → Link-DwPkGikd.js} +1 -1
- package/dist/{ListItem-DY-qq1lS.js → ListItem-n927geYb.js} +2 -2
- package/dist/{Modal-DyKW1wuk.js → Modal-ChWNV9yG.js} +3 -3
- package/dist/{Name-DMfnyTY6.js → Name-C8hhvQlN.js} +4 -4
- package/dist/{NumberField-BsTw6i4a.js → NumberField-C7vHy7Yz.js} +4 -4
- package/dist/{PatriotActDisclosure-CZgaYJOE.js → PatriotActDisclosure-CAvpE8su.js} +10 -10
- package/dist/{PayoutDetailsDropin-4l6--jF2.js → PayoutDetailsDropin-ILM3oK4r.js} +41 -43
- package/dist/{PayoutDetailsPage-DHLrUoda.js → PayoutDetailsPage-DfZYYplh.js} +5 -5
- package/dist/{Review-DfUNBq2-.js → Review-D_I4FUVw.js} +6 -6
- package/dist/{RootBusinessDetailsPage-DGGRmDJr.js → RootBusinessDetailsPage-CoOUMflT.js} +4 -4
- package/dist/{RootBusinessLinesPage-0X_Pg8ZU.js → RootBusinessLinesPage-DYz9wrU_.js} +22 -23
- package/dist/{RootIndividualDetailsPage-C3g8yQkw.js → RootIndividualDetailsPage-C42YybJq.js} +6 -6
- package/dist/{Select-b8cQ38Yi.js → Select-BMGxcmZy.js} +92 -92
- package/dist/{SignPCIComponent-Cx7hmS8Z.js → SignPCIComponent-B4RkNT1l.js} +14 -14
- package/dist/{SingpassSelection-tt8yuzxX.js → SingpassSelection-Usq1Kdpp.js} +5 -5
- package/dist/{SoleProprietorshipPage-Z9PTJTCi.js → SoleProprietorshipPage-tEf2zwhT.js} +4 -4
- package/dist/{SourceOfFundsPage-DHsqkOJp.js → SourceOfFundsPage-BXG5weCA.js} +24 -24
- package/dist/{SourceOfFundsWorkflow-6rO4Wt3d.js → SourceOfFundsWorkflow-BWWLrVaR.js} +4 -4
- package/dist/StateField-TYw5No81.js +364 -0
- package/dist/{Step-CgpBaVfH.js → Step-D8w1jd5O.js} +5 -5
- package/dist/Summary-BwvaKucT.js +21 -0
- package/dist/{SummarySection-Dtx_G11I.js → SummarySection-5L--khYg.js} +5 -19
- package/dist/{Task-BsE88vzp.js → Task-dSDYu-xr.js} +7 -7
- package/dist/{TaskGroup-C7G7V91U.js → TaskGroup-298zewpP.js} +3 -3
- package/dist/{TaskListItem-CWu40zb6.js → TaskListItem-jRIQ_fJt.js} +10 -10
- package/dist/{TaskStepperContextProvider-9wlnwii7.js → TaskStepperContextProvider-DiMf4UV6.js} +1 -1
- package/dist/{TaskVerificationStatus-zoxTZ2mt.js → TaskVerificationStatus-C1CllzL1.js} +17 -17
- package/dist/{TaxInformationFieldGroup-B_uFZqqw.js → TaxInformationFieldGroup-BkyZwtUe.js} +7 -7
- package/dist/{TaxReportingDropin-CJ3NB9BQ.js → TaxReportingDropin-BVohPujf.js} +13 -15
- package/dist/{TaxReportingWorkflow-B43zKtsp.js → TaxReportingWorkflow-BdVibdaP.js} +4 -4
- package/dist/{TermsOfServiceManagement-B64PXaru.js → TermsOfServiceManagement-Bh0BJ4wb.js} +46 -43
- package/dist/{TextArea-sSSxe4Li.js → TextArea-BaoeEZvH.js} +4 -4
- package/dist/{TextField-Dhohtwdr.js → TextField-BWevK7LS.js} +5 -5
- package/dist/{TrustDetailsPage-BUYCMRkb.js → TrustDetailsPage-B5x1-NPO.js} +61 -54
- package/dist/{TrustMemberCompanyPage-DIBfqWyQ.js → TrustMemberCompanyPage-Ck2UKJma.js} +5 -5
- package/dist/{TrustMemberIndividualPage-v-Yzq_IP.js → TrustMemberIndividualPage-CTUh7yn9.js} +4 -4
- package/dist/{TrustMemberRoleAndTypePage-VVMP9pyy.js → TrustMemberRoleAndTypePage-D5_AZAMj.js} +43 -36
- package/dist/{TrustMembersOverview-CpYhIhrk.js → TrustMembersOverview-Dbt3KQhv.js} +13 -13
- package/dist/{UboTaskItem-CR4jrdN5.js → UboTaskItem-CV0B4ONJ.js} +7 -7
- package/dist/{UnincorporatedPartnershipIndividualPage-1hKd_Css.js → UnincorporatedPartnershipIndividualPage-g9PpNHfH.js} +4 -4
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-CQ_jQfvD.js → UnincorporatedPartnershipMemberCompanyPage-Chd2k8jM.js} +5 -5
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-yyfNjmYl.js → UnincorporatedPartnershipMemberRoleAndTypePage-C7AvOkFK.js} +9 -9
- package/dist/{UnincorporatedPartnershipMembersOverview-BOlWKeWw.js → UnincorporatedPartnershipMembersOverview-m3TgX08K.js} +6 -6
- package/dist/{VerificationErrorAlert-BrR02W5c.js → VerificationErrorAlert-yOZ8yz_8.js} +3 -3
- package/dist/{WebsiteField-BxJd5tYn.js → WebsiteField-Cn_VPhTx.js} +5 -5
- package/dist/{Workflow-lip-FQM9.js → Workflow-BUgUDsPv.js} +6 -6
- package/dist/{accountHolderUtils-DKRzOKWL.js → accountHolderUtils-DhbLva46.js} +1 -1
- package/dist/adyen-business-financing.js +7 -7
- package/dist/adyen-individual-configuration.js +6 -6
- package/dist/adyen-individual-status.js +5 -5
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +30 -30
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +3 -3
- package/dist/adyen-transfer-instrument-configuration.js +5 -5
- package/dist/adyen-transfer-instrument-management.js +13 -13
- package/dist/adyen-verification-status.js +3 -3
- package/dist/{bafinUtils-DvMDkIIg.js → bafinUtils-4C7AJpnd.js} +519 -531
- package/dist/{constants-D0Os_pjB.js → constants-dKwpavyU.js} +6 -6
- package/dist/{dropinUtils-COH_5oC3.js → dropinUtils-D7sD4BX1.js} +165 -364
- package/dist/en-US-8KLaHQaT.js +7 -0
- package/dist/{en-US-Cz4JoU20.js → en-US-BMMx67Za.js} +16 -2
- package/dist/{en-US-nYL_eSJ-.js → en-US-BfRvYdHX.js} +8 -2
- package/dist/en-US-DGdFfmUC.js +136 -0
- package/dist/{en-US.instructions-BVNIyLRs.js → en-US.instructions-myDXMUbk.js} +2 -1
- package/dist/{error-CljcfMBy.js → error-vhREufv_.js} +2 -2
- package/dist/formatDataForSummary-CNiewg8c.js +498 -0
- package/dist/{formatValidationError-DAnv_psF.js → formatValidationError-BO9k5bVJ.js} +2 -2
- package/dist/{getDefaultRegistrationNumberType-V2vtKe2c.js → getDefaultRegistrationNumberType-BWN86JDR.js} +4 -4
- package/dist/{getProblemsForEntity-mdb3Bfpj.js → getProblemsForEntity-FHk416BA.js} +1 -1
- package/dist/{getTrustedDecisionMakers-D89oYOLp.js → getTrustedDecisionMakers-DByctgob.js} +1 -1
- package/dist/{getValidationError-BpqwVNUc.js → getValidationError--VxsluPA.js} +2 -2
- package/dist/{legalArrangementUtils-Crgt_L7h.js → legalArrangementUtils-CHlmmcB8.js} +11 -2
- package/dist/{mapAddressLocalizationToJpAddressSchema-BBdzPvJl.js → mapAddressLocalizationToJpAddressSchema-Di3_rcrj.js} +2 -2
- package/dist/{mapExistingFile-BXfeQxev.js → mapExistingFile-CqbTLZ6i.js} +1 -1
- package/dist/mapJpAddressSchemaToAddressLocalizations-TLZ9foPF.js +19 -0
- package/dist/{mapTransferInstrumentToPayoutAccount-D64cPTBm.js → mapTransferInstrumentToPayoutAccount-BLq2P8NF.js} +2 -2
- package/dist/{processCapabilities-FL4-KAbd.js → processCapabilities-B75YIdXZ.js} +11 -4
- package/dist/{processValidationErrors-DbnkpAs6.js → processValidationErrors-DKn7wWTY.js} +4 -4
- package/dist/{resolveEnvironment-NlZWcle4.js → resolveEnvironment-CrNBwIpQ.js} +53 -16
- package/dist/roleMetadata-CmxqSnzp.js +57 -0
- package/dist/style.css +166 -230
- package/dist/styles-DYaAeu4q.js +166 -230
- package/dist/trustMemberType-Ix2sf6e_.js +13 -0
- package/dist/types/api/address/useAddressCleanse.d.ts +2 -0
- package/dist/types/api/address/useRetrieveAddress.d.ts +1 -0
- package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +1 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +7 -2
- package/dist/types/components/Business/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
- package/dist/types/components/Business/forms/rules.d.ts +3 -1
- package/dist/types/components/Business/utils/formatDataForSummary.d.ts +2 -1
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +78 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +3 -0
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +2 -1
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +6 -3
- package/dist/types/components/EFP/tasks/BusinessFinancingDropin/validate.d.ts +3 -0
- package/dist/types/components/GlobalEntry/fields/DbaQuestionnaire/DbaQuestionnaire.d.ts +3 -0
- package/dist/types/components/GlobalEntry/fields/DbaQuestionnaire/types.d.ts +5 -0
- package/dist/types/components/GlobalEntry/fields/LlcQuestionnaire/LlcQuestionnaire.d.ts +3 -0
- package/dist/types/components/GlobalEntry/fields/LlcQuestionnaire/types.d.ts +5 -0
- package/dist/types/components/GlobalEntry/fields/PaperworkQuestionnaire/PaperworkQuestionnaire.d.ts +1 -6
- package/dist/types/components/GlobalEntry/fields/PaperworkQuestionnaire/fieldConfig.d.ts +11 -0
- package/dist/types/components/GlobalEntry/fields/PaperworkQuestionnaire/types.d.ts +6 -1
- package/dist/types/components/GlobalEntry/fields/Questionnaire/Questionnaire.d.ts +2 -0
- package/dist/types/components/GlobalEntry/fields/Questionnaire/types.d.ts +17 -0
- package/dist/types/components/GlobalEntry/fields/TrustQuestionnaire/TrustQuestionnaire.d.ts +3 -0
- package/dist/types/components/GlobalEntry/fields/TrustQuestionnaire/types.d.ts +5 -0
- package/dist/types/components/GlobalEntry/forms/EntityInformation/EntityInformation.d.ts +1 -3
- package/dist/types/components/GlobalEntry/forms/EntityInformation/types.d.ts +1 -2
- package/dist/types/components/GlobalEntry/forms/RegistrationInformation/types.d.ts +5 -1
- package/dist/types/components/GlobalEntry/mapping/globalEntryKeyMapping.d.ts +0 -3
- package/dist/types/components/GlobalEntry/mapping/mapGlobalEntrySchemaToLegalEntity.d.ts +2 -3
- package/dist/types/components/GlobalEntry/mapping/mapLegalEntityToGlobalEntrySchema.d.ts +1 -6
- package/dist/types/components/GlobalEntry/rules.d.ts +5 -2
- package/dist/types/components/GlobalEntry/utils/getAvailableCompanyStructures.d.ts +2 -1
- package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +1 -4
- package/dist/types/components/GlobalEntry/utils/utils.d.ts +7 -4
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -2
- package/dist/types/components/Individual/forms/Individual.rules.d.ts +7 -6
- package/dist/types/components/Individual/helpers/findRelevantTaxInformation.d.ts +8 -2
- package/dist/types/components/Individual/helpers/getSubmittableTaxInformation.d.ts +20 -0
- package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +5 -3
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +6 -67
- package/dist/types/components/Individual/tasks/IndividualDropin/IndividualSummary.d.ts +27 -0
- package/dist/types/components/Individual/utils/formatDataForSummary.d.ts +49 -0
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +0 -5
- package/dist/types/components/Shared/Summary/Summary.d.ts +10 -7
- package/dist/types/components/Shared/Summary/types.d.ts +3 -21
- package/dist/types/components/Shared/SummarySection/SummaryBulletList.d.ts +8 -0
- package/dist/types/components/Shared/fields/RegistrationAndOperationalAddressFields/types.d.ts +2 -0
- package/dist/types/components/Shared/fields/RegistrationAndOperationalAddressFields/utils.d.ts +2 -4
- package/dist/types/components/Shared/fields/ReportedValueOptionField/types.d.ts +3 -0
- package/dist/types/components/Shared/forms/Address/constants.d.ts +2 -0
- package/dist/types/components/Shared/forms/Address/localized/jp/JpAddressFields.d.ts +2 -9
- package/dist/types/components/Shared/forms/Address/localized/jp/mapAddressLocalizationToJpAddressSchema.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.d.ts +2 -2
- package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +2 -4
- package/dist/types/components/Shared/forms/Address/rules.d.ts +13 -0
- package/dist/types/components/Shared/forms/Address/types.d.ts +7 -1
- package/dist/types/components/Shared/forms/Address/utils.d.ts +5 -11
- package/dist/types/components/Trust/forms/Trust/rules.d.ts +3 -1
- package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +2 -3
- package/dist/types/components/Trust/utils/formatDataForSummary.d.ts +2 -1
- package/dist/types/core/EmbedShell/EmbedShell.d.ts +4 -1
- package/dist/types/core/EmbedShell/useTheme.d.ts +9 -0
- package/dist/types/embeds/onboarding/adyen-onboarding.d.ts +1 -1
- package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +8 -0
- package/dist/types/hooks/useStoredStateOrProvince.d.ts +9 -0
- package/dist/types/types/datasets/state-code.d.ts +36 -1
- package/dist/types/types/form-rules.d.ts +2 -2
- package/dist/types/utils/analytics/getPrefilledDetails.d.ts +3 -0
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/fieldConfigurations.d.ts +1 -1
- package/dist/types/utils/legalArrangementUtils.d.ts +2 -0
- package/dist/{types-BymnGWO9.js → types-DVMWWwBT.js} +1 -1
- package/dist/{form-rules-CRMDL7v8.js → unincorporatedPartnership-Dr3lPgDv.js} +38 -4
- package/dist/{useBusinessDetailsData-CcxnigRY.js → useBusinessDetailsData-DrN9ZzIG.js} +100 -90
- package/dist/{useCanSeeIntroduction-COjEJwSQ.js → useCanSeeIntroduction-BDarBkmx.js} +2 -2
- package/dist/useCreateLegalEntity-CgzVD39K.js +24 -0
- package/dist/{useDataMissingRemediations-DKjYzfe2.js → useDataMissingRemediations-BfC7ECSn.js} +1 -1
- package/dist/{useForm-B-WTDdmc.js → useForm-Cibudto5.js} +3 -3
- package/dist/{useHideTaskStepper-BgCN--mG.js → useHideTaskStepper-Betx9MGy.js} +1 -1
- package/dist/{useId-DHoBdW3X.js → useId-e2xn6OME.js} +2 -2
- package/dist/{useNavigate-CQxBS2lg.js → useNavigate-DxEfo192.js} +33 -33
- package/dist/{useSalesChannels-y8Arf4LC.js → useSalesChannels-C09EqYFN.js} +1 -1
- package/dist/{useTaskLandedEvent-B4E45deF.js → useTaskLandedEvent-C-kML6lH.js} +1 -1
- package/dist/{useTrustMembers-BN5zllxF.js → useTrustMembers-CZ28rgNA.js} +3 -3
- package/dist/{useUnincorporatedPartnershipMembers-DcfQJdVZ.js → useUnincorporatedPartnershipMembers-e3nDscEc.js} +2 -2
- package/dist/{utils-CHeUbOCF.js → utils-C3-aLHsN.js} +3 -3
- package/dist/{utils-Cfwr1ukp.js → utils-C_z60qSD.js} +4 -5
- package/dist/{utils-BFxg3gPM.js → utils-ChZNfG5_.js} +1 -1
- package/dist/utils-gszwUnoh.js +49 -0
- package/dist/{validate-DTxPR5js.js → validate-BDG97Hw4.js} +4 -4
- package/dist/{validate-DxdZ3j2v.js → validate-C1VibHZH.js} +26 -2
- package/dist/{validate-cWwt79cT.js → validate-Dve-kxSi.js} +11 -5
- package/dist/{validate-BbY2FS3b.js → validate-bah41KLb.js} +20 -9
- package/dist/{validateExtractionResult-IRRMwcNi.js → validateExtractionResult-D3AuQo5-.js} +3 -3
- package/package.json +6 -5
- package/dist/Image-CxnjHtP1.js +0 -33
- package/dist/List-qvNxW9lm.js +0 -72
- package/dist/StateField-fSYeyb3x.js +0 -296
- package/dist/en-US-U0d3NI20.js +0 -7
- package/dist/mapJpAddressSchemaToAddressLocalizations-D5Z5Swb4.js +0 -75
- package/dist/mapLegalEntityToIndividualSchema-DhZ0rxIP.js +0 -254
- package/dist/trustMemberGuidance-BpeDHAJP.js +0 -27
- package/dist/types/components/Shared/NewSummary/NewSummary.d.ts +0 -10
- package/dist/types/components/Shared/Summary/summaryItem.d.ts +0 -17
- package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +0 -17
- package/dist/unincorporatedPartnership-BbNowjM2.js +0 -11
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
try {
|
|
2
2
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "aaa8c2f1-bbb4-4871-acb0-27f69ad0bf46", e._sentryDebugIdIdentifier = "sentry-dbid-aaa8c2f1-bbb4-4871-acb0-27f69ad0bf46");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { r as useTranslation } from "./translation-CpH8D2NK.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as Icon } from "./Icon-
|
|
6
|
+
import { C as Alert, I as listToRecord, gt as useAccountHolder } from "./resolveEnvironment-CrNBwIpQ.js";
|
|
7
|
+
import { t as Icon } from "./Icon-jVvV1zXc.js";
|
|
8
8
|
import { t as Typography } from "./Typography-CAc_f5Iq.js";
|
|
9
|
-
import { t as Button } from "./Button-
|
|
9
|
+
import { t as Button } from "./Button-BYafPrZH.js";
|
|
10
10
|
import { i as noop, s as keysOf } from "./genUtils-nphCwt1A.js";
|
|
11
11
|
import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
|
|
12
12
|
import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
|
|
13
13
|
import { t as DecisionMakerTypes } from "./decisionMaker-CR0qaGWQ.js";
|
|
14
14
|
import { t as Scenarios } from "./scenarios-nibtmpSb.js";
|
|
15
|
-
import { i as useToggleContext, t as Checkbox } from "./Checkbox-
|
|
16
|
-
import { i as useAnalyticsContext, r as KEYBOARD_KEYS, t as Modal } from "./Modal-
|
|
17
|
-
import { t as useId } from "./useId-
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { s as Confirm } from "./utils-
|
|
21
|
-
import {
|
|
15
|
+
import { i as useToggleContext, t as Checkbox } from "./Checkbox-qFA2J_1r.js";
|
|
16
|
+
import { i as useAnalyticsContext, r as KEYBOARD_KEYS, t as Modal } from "./Modal-ChWNV9yG.js";
|
|
17
|
+
import { t as useId } from "./useId-e2xn6OME.js";
|
|
18
|
+
import { a as resolveFieldMetadata } from "./unincorporatedPartnership-Dr3lPgDv.js";
|
|
19
|
+
import { a as translateTranslatable, o as Field } from "./Select-BMGxcmZy.js";
|
|
20
|
+
import { s as Confirm } from "./utils-C3-aLHsN.js";
|
|
21
|
+
import { m as isEmpty } from "./StateField-TYw5No81.js";
|
|
22
|
+
import { A as uppercase, F as nonInputs, I as numericInputs, L as spacer, M as alphanumericInputs, N as customInputs, O as validateNotEmptyOnBlur, P as makeMask, a as MaskedInput, i as RadioWithLabel, j as alphaInputs, k as validatePatternOnBlur, r as RadioGroup } from "./dropinUtils-D7sD4BX1.js";
|
|
22
23
|
import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
23
24
|
import cx from "classnames";
|
|
24
25
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
@@ -996,440 +997,169 @@ var businessRegistrationNumberPatterns = {
|
|
|
996
997
|
default: /^\d{9}$/
|
|
997
998
|
}
|
|
998
999
|
};
|
|
1000
|
+
var Tile_module_default = {
|
|
1001
|
+
"tile-container": "_tile-container_gy997_1",
|
|
1002
|
+
tileContainer: "_tile-container_gy997_1",
|
|
1003
|
+
tile: "_tile_gy997_1",
|
|
1004
|
+
"tile-icon": "_tile-icon_gy997_18",
|
|
1005
|
+
tileIcon: "_tile-icon_gy997_18",
|
|
1006
|
+
"tile-title": "_tile-title_gy997_35",
|
|
1007
|
+
tileTitle: "_tile-title_gy997_35",
|
|
1008
|
+
"tile-checkbox": "_tile-checkbox_gy997_49",
|
|
1009
|
+
tileCheckbox: "_tile-checkbox_gy997_49",
|
|
1010
|
+
"tile-container-horizontal": "_tile-container-horizontal_gy997_89",
|
|
1011
|
+
tileContainerHorizontal: "_tile-container-horizontal_gy997_89",
|
|
1012
|
+
"tile-label": "_tile-label_gy997_100",
|
|
1013
|
+
tileLabel: "_tile-label_gy997_100"
|
|
1014
|
+
};
|
|
999
1015
|
//#endregion
|
|
1000
|
-
//#region src/
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
* // jaKanaFirstName: 'アレキサンダー',
|
|
1018
|
-
* // jaKanaLastName: 'パトリック'
|
|
1019
|
-
* // }
|
|
1020
|
-
* ```
|
|
1021
|
-
*
|
|
1022
|
-
*/
|
|
1023
|
-
function mapApiScriptLocalizationToSchemaFields(localization) {
|
|
1024
|
-
const schema = {};
|
|
1025
|
-
const scriptNameInSchema = localization.script.replace("-", "");
|
|
1026
|
-
for (const [field, value] of Object.entries(localization.fields)) schema[scriptNameInSchema + field[0].toUpperCase() + field.slice(1)] = value;
|
|
1027
|
-
return schema;
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
* Given a schema and a script, takes the fields prefixed with that script and produces a {@link ScriptLocalization}.
|
|
1031
|
-
*
|
|
1032
|
-
* E.g.
|
|
1033
|
-
* ```ts
|
|
1034
|
-
* const schema = {
|
|
1035
|
-
* firstName: 'Alex',
|
|
1036
|
-
* lastName: 'Tompkins',
|
|
1037
|
-
* jaKanaFirstName: 'アレキサンダー',
|
|
1038
|
-
* jaKanaLastName: 'パトリック',
|
|
1039
|
-
* jaHaniFirstName: 'pretend this is hiragana',
|
|
1040
|
-
* jaHaniLastName: 'this too',
|
|
1041
|
-
* };
|
|
1042
|
-
*
|
|
1043
|
-
* const localization = mapSchemaFieldsToApiScriptLocalization(schema, 'jaKana');
|
|
1044
|
-
* console.log(localization);
|
|
1045
|
-
* // {
|
|
1046
|
-
* // script: 'ja-Kana',
|
|
1047
|
-
* // fields: { firstName: 'アレキサンダー', lastName: 'パトリック' },
|
|
1048
|
-
* // };
|
|
1049
|
-
* ```
|
|
1050
|
-
*/
|
|
1051
|
-
function mapSchemaFieldsToApiScriptLocalization(data, script) {
|
|
1052
|
-
const fields = {};
|
|
1053
|
-
for (const [schemaField, value] of Object.entries(data)) if (schemaField.startsWith(script)) {
|
|
1054
|
-
let fieldName = schemaField.replace(script, "");
|
|
1055
|
-
fieldName = fieldName[0].toLowerCase() + fieldName.slice(1);
|
|
1056
|
-
fields[fieldName] = value;
|
|
1057
|
-
}
|
|
1058
|
-
return {
|
|
1059
|
-
script: `${script.slice(0, 2)}-${script.slice(2)}`,
|
|
1060
|
-
fields
|
|
1016
|
+
//#region src/components/ui/atoms/Tile/Tile.tsx
|
|
1017
|
+
function Tile({ checked, disabled, icon, id, inputType = "checkbox", isHorizontal, label, name, className, onChange, subTitle, value }) {
|
|
1018
|
+
const inputNode = useRef(null);
|
|
1019
|
+
const uniqId = useId("tile");
|
|
1020
|
+
const idUse = id ?? uniqId;
|
|
1021
|
+
const handleChange = (e) => {
|
|
1022
|
+
if (disabled) return;
|
|
1023
|
+
onChange?.(e.currentTarget.checked);
|
|
1024
|
+
inputNode.current?.focus();
|
|
1025
|
+
};
|
|
1026
|
+
const handleClick = (e) => {
|
|
1027
|
+
if (disabled || inputType === "radio") return;
|
|
1028
|
+
if (checked) {
|
|
1029
|
+
e.preventDefault();
|
|
1030
|
+
onChange?.(false);
|
|
1031
|
+
inputNode.current?.focus();
|
|
1032
|
+
}
|
|
1061
1033
|
};
|
|
1034
|
+
const handleOnKeyDown = (e) => {
|
|
1035
|
+
if (e.key === KEYBOARD_KEYS.enter || e.key === KEYBOARD_KEYS.space) {
|
|
1036
|
+
e.preventDefault();
|
|
1037
|
+
if (disabled) return;
|
|
1038
|
+
if (inputType === "radio" && !checked) {
|
|
1039
|
+
onChange?.(true);
|
|
1040
|
+
inputNode.current?.focus();
|
|
1041
|
+
} else if (inputType === "checkbox") {
|
|
1042
|
+
onChange?.(!checked);
|
|
1043
|
+
inputNode.current?.focus();
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1048
|
+
className: cx(Tile_module_default.tileContainer, className, { [Tile_module_default.tileContainerHorizontal]: isHorizontal }),
|
|
1049
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
1050
|
+
ref: inputNode,
|
|
1051
|
+
className: Tile_module_default.tileCheckbox,
|
|
1052
|
+
disabled,
|
|
1053
|
+
checked: !!checked,
|
|
1054
|
+
value,
|
|
1055
|
+
id: idUse,
|
|
1056
|
+
name,
|
|
1057
|
+
type: inputType,
|
|
1058
|
+
onKeyDown: handleOnKeyDown,
|
|
1059
|
+
onChange: handleChange,
|
|
1060
|
+
onClick: handleClick,
|
|
1061
|
+
"aria-disabled": disabled,
|
|
1062
|
+
tabIndex: disabled ? -1 : 0
|
|
1063
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
1064
|
+
htmlFor: idUse,
|
|
1065
|
+
className: Tile_module_default.tile,
|
|
1066
|
+
children: [icon && /* @__PURE__ */ jsx("div", {
|
|
1067
|
+
className: Tile_module_default.tileIcon,
|
|
1068
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1069
|
+
name: icon,
|
|
1070
|
+
testId: icon
|
|
1071
|
+
})
|
|
1072
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1073
|
+
className: Tile_module_default.tileLabel,
|
|
1074
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
1075
|
+
el: "h4",
|
|
1076
|
+
variant: "body-strongest",
|
|
1077
|
+
className: Tile_module_default.tileTitle,
|
|
1078
|
+
children: label
|
|
1079
|
+
}), subTitle && /* @__PURE__ */ jsx(Typography, {
|
|
1080
|
+
el: "p",
|
|
1081
|
+
variant: "body",
|
|
1082
|
+
children: subTitle
|
|
1083
|
+
})]
|
|
1084
|
+
})]
|
|
1085
|
+
})]
|
|
1086
|
+
});
|
|
1062
1087
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1088
|
+
var TileGroup_module_default = {
|
|
1089
|
+
"tile-group": "_tile-group_6rtof_1",
|
|
1090
|
+
tileGroup: "_tile-group_6rtof_1",
|
|
1091
|
+
"tile-container": "_tile-container_6rtof_8",
|
|
1092
|
+
tileContainer: "_tile-container_6rtof_8",
|
|
1093
|
+
"tile-group-error": "_tile-group-error_6rtof_14",
|
|
1094
|
+
tileGroupError: "_tile-group-error_6rtof_14",
|
|
1095
|
+
"tile-group-error-icon": "_tile-group-error-icon_6rtof_27",
|
|
1096
|
+
tileGroupErrorIcon: "_tile-group-error-icon_6rtof_27",
|
|
1097
|
+
"tile-group-horizontal": "_tile-group-horizontal_6rtof_32",
|
|
1098
|
+
tileGroupHorizontal: "_tile-group-horizontal_6rtof_32"
|
|
1070
1099
|
};
|
|
1071
1100
|
//#endregion
|
|
1072
|
-
//#region src/
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
* Determines whether a registration-number exemption can be offered for a country and company type.
|
|
1135
|
-
*
|
|
1136
|
-
* Provide `companyType` when checking a specific entity (including a sole proprietorship); this checks
|
|
1137
|
-
* that exact type against the country's rule. Omit it when deciding whether to show the exemption option
|
|
1138
|
-
* for all company types in that country; it is then available only when at least one
|
|
1139
|
-
* non-sole-proprietorship type is eligible.
|
|
1140
|
-
*
|
|
1141
|
-
* This distinction prevents sole-proprietorship-only countries from exposing the exemption to
|
|
1142
|
-
* businesses while still allowing unrestricted countries (an empty rule) for every entity type.
|
|
1143
|
-
*/
|
|
1144
|
-
var isRegistrationExemptionAllowed = ({ country, companyType }) => {
|
|
1145
|
-
const allowedCompanyTypes = REGISTRATION_NUMBER_EXEMPTION_RULES[country];
|
|
1146
|
-
if (!allowedCompanyTypes) return false;
|
|
1147
|
-
if (allowedCompanyTypes.length === 0) return true;
|
|
1148
|
-
return companyType ? allowedCompanyTypes.includes(companyType) : allowedCompanyTypes.some((allowedCompanyType) => allowedCompanyType !== "soleProprietorship");
|
|
1149
|
-
};
|
|
1150
|
-
var isRegistrationNumberAbsentStateV4Scenario = (country, entityType) => country === CountryCodes.Australia && (entityType === "governmentalOrganization" || entityType === "partnershipIncorporated") || country === CountryCodes.NewZealand;
|
|
1151
|
-
var COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
1152
|
-
CountryCodes.HongKong,
|
|
1153
|
-
CountryCodes.Mexico,
|
|
1154
|
-
CountryCodes.PuertoRico,
|
|
1155
|
-
CountryCodes.UnitedStates
|
|
1156
|
-
];
|
|
1157
|
-
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
1158
|
-
/**
|
|
1159
|
-
* Also used to determine what documenttype needs to be used
|
|
1160
|
-
* when uploading tax document in mapping.ts
|
|
1161
|
-
* */
|
|
1162
|
-
var COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
1163
|
-
CountryCodes.Australia,
|
|
1164
|
-
CountryCodes.Canada,
|
|
1165
|
-
CountryCodes.Gibraltar,
|
|
1166
|
-
CountryCodes.HongKong,
|
|
1167
|
-
CountryCodes.NewZealand,
|
|
1168
|
-
CountryCodes.PuertoRico,
|
|
1169
|
-
CountryCodes.Singapore,
|
|
1170
|
-
CountryCodes.UnitedStates,
|
|
1171
|
-
CountryCodes.Guernsey,
|
|
1172
|
-
CountryCodes.Jersey,
|
|
1173
|
-
CountryCodes.IsleOfMan,
|
|
1174
|
-
CountryCodes.Mexico,
|
|
1175
|
-
CountryCodes.Brazil,
|
|
1176
|
-
CountryCodes.Japan
|
|
1177
|
-
];
|
|
1178
|
-
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [];
|
|
1179
|
-
var COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
1180
|
-
CountryCodes.Austria,
|
|
1181
|
-
CountryCodes.Belgium,
|
|
1182
|
-
CountryCodes.Croatia,
|
|
1183
|
-
CountryCodes.Cyprus,
|
|
1184
|
-
CountryCodes.Estonia,
|
|
1185
|
-
CountryCodes.Finland,
|
|
1186
|
-
CountryCodes.France,
|
|
1187
|
-
CountryCodes.Germany,
|
|
1188
|
-
CountryCodes.Greece,
|
|
1189
|
-
CountryCodes.Ireland,
|
|
1190
|
-
CountryCodes.Italy,
|
|
1191
|
-
CountryCodes.Latvia,
|
|
1192
|
-
CountryCodes.Lithuania,
|
|
1193
|
-
CountryCodes.Luxembourg,
|
|
1194
|
-
CountryCodes.Malta,
|
|
1195
|
-
CountryCodes.Netherlands,
|
|
1196
|
-
CountryCodes.Portugal,
|
|
1197
|
-
CountryCodes.Slovakia,
|
|
1198
|
-
CountryCodes.Slovenia,
|
|
1199
|
-
CountryCodes.Spain,
|
|
1200
|
-
CountryCodes.UnitedKingdom
|
|
1201
|
-
];
|
|
1202
|
-
var COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [CountryCodes.Australia];
|
|
1203
|
-
var TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
1204
|
-
CountryCodes.Austria,
|
|
1205
|
-
CountryCodes.Belgium,
|
|
1206
|
-
CountryCodes.Croatia,
|
|
1207
|
-
CountryCodes.Cyprus,
|
|
1208
|
-
CountryCodes.Germany,
|
|
1209
|
-
CountryCodes.Greece,
|
|
1210
|
-
CountryCodes.Ireland,
|
|
1211
|
-
CountryCodes.Luxembourg,
|
|
1212
|
-
CountryCodes.Malta,
|
|
1213
|
-
CountryCodes.Netherlands,
|
|
1214
|
-
CountryCodes.Slovakia,
|
|
1215
|
-
CountryCodes.Slovenia
|
|
1216
|
-
];
|
|
1217
|
-
/**
|
|
1218
|
-
* Sole proprietorship specific rules
|
|
1219
|
-
*/
|
|
1220
|
-
var COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
1221
|
-
CountryCodes.Australia,
|
|
1222
|
-
CountryCodes.Gibraltar,
|
|
1223
|
-
CountryCodes.Guernsey,
|
|
1224
|
-
CountryCodes.HongKong,
|
|
1225
|
-
CountryCodes.Ireland,
|
|
1226
|
-
CountryCodes.IsleOfMan,
|
|
1227
|
-
CountryCodes.Jersey,
|
|
1228
|
-
CountryCodes.Malta,
|
|
1229
|
-
CountryCodes.Mexico,
|
|
1230
|
-
CountryCodes.PuertoRico,
|
|
1231
|
-
CountryCodes.Spain,
|
|
1232
|
-
CountryCodes.UnitedKingdom,
|
|
1233
|
-
CountryCodes.UnitedStates
|
|
1234
|
-
];
|
|
1235
|
-
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
1236
|
-
CountryCodes.Canada,
|
|
1237
|
-
CountryCodes.PuertoRico,
|
|
1238
|
-
CountryCodes.UnitedStates
|
|
1239
|
-
];
|
|
1240
|
-
var COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.Singapore];
|
|
1241
|
-
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [CountryCodes.Germany];
|
|
1242
|
-
var isUsingCompanySearch = (country, taskType) => {
|
|
1243
|
-
if (taskType !== TaskTypes.BUSINESS_DETAILS && taskType !== TaskTypes.GLOBAL_ENTRY) return false;
|
|
1244
|
-
return COUNTRIES_USING_COMPANY_SEARCH.includes(country);
|
|
1245
|
-
};
|
|
1246
|
-
/**
|
|
1247
|
-
* A Japanese business has a kanji legal name and a katakana reading of it, neither of which can be
|
|
1248
|
-
* derived from the roman one, so they travel beside it as script localizations.
|
|
1249
|
-
*
|
|
1250
|
-
* @param data the form section holding the localized name fields, whatever the task calls it
|
|
1251
|
-
* @returns the localizations that were filled in, so an empty array when neither was asked for
|
|
1252
|
-
*/
|
|
1253
|
-
var mapJapaneseLegalNamesToLocalization = (data) => [mapSchemaFieldsToApiScriptLocalization(data, "jaHani"), mapSchemaFieldsToApiScriptLocalization(data, "jaKana")].filter(({ fields }) => !isEmpty(fields)).map(({ script, fields }) => ({
|
|
1254
|
-
script,
|
|
1255
|
-
fields: { legalName: fields.legalCompanyName }
|
|
1256
|
-
}));
|
|
1257
|
-
/**
|
|
1258
|
-
* Reads the kanji and katakana legal names back out of the script localizations, so they can
|
|
1259
|
-
* prefill the fields they came from.
|
|
1260
|
-
*
|
|
1261
|
-
* @param localization the organization's script localizations, when it has any
|
|
1262
|
-
*/
|
|
1263
|
-
var mapLocalizationToJapaneseLegalNames = (localization) => (localization ?? []).reduce((schemaFields, { script, fields }) => ({
|
|
1264
|
-
...schemaFields,
|
|
1265
|
-
...mapApiScriptLocalizationToSchemaFields({
|
|
1266
|
-
script,
|
|
1267
|
-
fields: { legalCompanyName: fields?.legalName }
|
|
1268
|
-
})
|
|
1269
|
-
}), {});
|
|
1270
|
-
var Tile_module_default = {
|
|
1271
|
-
"tile-container": "_tile-container_17be3_1",
|
|
1272
|
-
tileContainer: "_tile-container_17be3_1",
|
|
1273
|
-
tile: "_tile_17be3_1",
|
|
1274
|
-
"tile-icon": "_tile-icon_17be3_18",
|
|
1275
|
-
tileIcon: "_tile-icon_17be3_18",
|
|
1276
|
-
"tile-title": "_tile-title_17be3_35",
|
|
1277
|
-
tileTitle: "_tile-title_17be3_35",
|
|
1278
|
-
"tile-checkbox": "_tile-checkbox_17be3_49",
|
|
1279
|
-
tileCheckbox: "_tile-checkbox_17be3_49",
|
|
1280
|
-
"tile-container-horizontal": "_tile-container-horizontal_17be3_89",
|
|
1281
|
-
tileContainerHorizontal: "_tile-container-horizontal_17be3_89",
|
|
1282
|
-
"tile-label": "_tile-label_17be3_100",
|
|
1283
|
-
tileLabel: "_tile-label_17be3_100"
|
|
1284
|
-
};
|
|
1285
|
-
//#endregion
|
|
1286
|
-
//#region src/components/ui/atoms/Tile/Tile.tsx
|
|
1287
|
-
function Tile({ checked, disabled, icon, id, inputType = "checkbox", isHorizontal, label, name, className, onChange, subTitle, value }) {
|
|
1288
|
-
const inputNode = useRef(null);
|
|
1289
|
-
const uniqId = useId("tile");
|
|
1290
|
-
const idUse = id ?? uniqId;
|
|
1291
|
-
const handleChange = (e) => {
|
|
1292
|
-
if (disabled) return;
|
|
1293
|
-
onChange?.(e.currentTarget.checked);
|
|
1294
|
-
inputNode.current?.focus();
|
|
1295
|
-
};
|
|
1296
|
-
const handleClick = (e) => {
|
|
1297
|
-
if (disabled || inputType === "radio") return;
|
|
1298
|
-
if (checked) {
|
|
1299
|
-
e.preventDefault();
|
|
1300
|
-
onChange?.(false);
|
|
1301
|
-
inputNode.current?.focus();
|
|
1302
|
-
}
|
|
1303
|
-
};
|
|
1304
|
-
const handleOnKeyDown = (e) => {
|
|
1305
|
-
if (e.key === KEYBOARD_KEYS.enter || e.key === KEYBOARD_KEYS.space) {
|
|
1306
|
-
e.preventDefault();
|
|
1307
|
-
if (disabled) return;
|
|
1308
|
-
if (inputType === "radio" && !checked) {
|
|
1309
|
-
onChange?.(true);
|
|
1310
|
-
inputNode.current?.focus();
|
|
1311
|
-
} else if (inputType === "checkbox") {
|
|
1312
|
-
onChange?.(!checked);
|
|
1313
|
-
inputNode.current?.focus();
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1318
|
-
className: cx(Tile_module_default.tileContainer, className, { [Tile_module_default.tileContainerHorizontal]: isHorizontal }),
|
|
1319
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
1320
|
-
ref: inputNode,
|
|
1321
|
-
className: Tile_module_default.tileCheckbox,
|
|
1322
|
-
disabled,
|
|
1323
|
-
checked: !!checked,
|
|
1324
|
-
value,
|
|
1325
|
-
id: idUse,
|
|
1326
|
-
name,
|
|
1327
|
-
type: inputType,
|
|
1328
|
-
onKeyDown: handleOnKeyDown,
|
|
1329
|
-
onChange: handleChange,
|
|
1330
|
-
onClick: handleClick,
|
|
1331
|
-
"aria-disabled": disabled,
|
|
1332
|
-
tabIndex: disabled ? -1 : 0
|
|
1333
|
-
}), /* @__PURE__ */ jsxs("label", {
|
|
1334
|
-
htmlFor: idUse,
|
|
1335
|
-
className: Tile_module_default.tile,
|
|
1336
|
-
children: [icon && /* @__PURE__ */ jsx("div", {
|
|
1337
|
-
className: Tile_module_default.tileIcon,
|
|
1338
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1339
|
-
name: icon,
|
|
1340
|
-
testId: icon
|
|
1341
|
-
})
|
|
1342
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1343
|
-
className: Tile_module_default.tileLabel,
|
|
1344
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
1345
|
-
el: "h4",
|
|
1346
|
-
variant: "body-strongest",
|
|
1347
|
-
className: Tile_module_default.tileTitle,
|
|
1348
|
-
children: label
|
|
1349
|
-
}), subTitle && /* @__PURE__ */ jsx(Typography, {
|
|
1350
|
-
el: "p",
|
|
1351
|
-
variant: "body",
|
|
1352
|
-
children: subTitle
|
|
1353
|
-
})]
|
|
1354
|
-
})]
|
|
1355
|
-
})]
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
var TileGroup_module_default = {
|
|
1359
|
-
"tile-group": "_tile-group_6rtof_1",
|
|
1360
|
-
tileGroup: "_tile-group_6rtof_1",
|
|
1361
|
-
"tile-container": "_tile-container_6rtof_8",
|
|
1362
|
-
tileContainer: "_tile-container_6rtof_8",
|
|
1363
|
-
"tile-group-error": "_tile-group-error_6rtof_14",
|
|
1364
|
-
tileGroupError: "_tile-group-error_6rtof_14",
|
|
1365
|
-
"tile-group-error-icon": "_tile-group-error-icon_6rtof_27",
|
|
1366
|
-
tileGroupErrorIcon: "_tile-group-error-icon_6rtof_27",
|
|
1367
|
-
"tile-group-horizontal": "_tile-group-horizontal_6rtof_32",
|
|
1368
|
-
tileGroupHorizontal: "_tile-group-horizontal_6rtof_32"
|
|
1369
|
-
};
|
|
1370
|
-
//#endregion
|
|
1371
|
-
//#region src/components/ui/atoms/TileGroup/TileGroup.tsx
|
|
1372
|
-
function TileGroup({ tiles, selected, allowMultiple = false, isHorizontal, name: nameProp, maxSelected = Infinity, errorMessage, onChange = noop, enableTracking = false, trackingFieldName }) {
|
|
1373
|
-
const uniqName = useId("tile");
|
|
1374
|
-
const name = nameProp ?? uniqName;
|
|
1375
|
-
const finalName = allowMultiple ? `${name}[]` : name;
|
|
1376
|
-
const inputType = allowMultiple ? "checkbox" : "radio";
|
|
1377
|
-
const userEvents = useAnalyticsContext();
|
|
1378
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [!!errorMessage?.message && /* @__PURE__ */ jsxs("div", {
|
|
1379
|
-
"aria-live": "polite",
|
|
1380
|
-
className: TileGroup_module_default.tileGroupError,
|
|
1381
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1382
|
-
className: TileGroup_module_default.tileGroupErrorIcon,
|
|
1383
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "field-error" })
|
|
1384
|
-
}), errorMessage.message]
|
|
1385
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1386
|
-
className: cx(TileGroup_module_default.tileGroup, { [TileGroup_module_default.tileGroupHorizontal]: isHorizontal }),
|
|
1387
|
-
children: tiles.map((tile) => {
|
|
1388
|
-
const { value, id, icon, subTitle, label, disabled } = tile;
|
|
1389
|
-
const handleChange = (checked) => {
|
|
1390
|
-
const newSelected = updateSelectedChoices(tile, checked, selected, allowMultiple);
|
|
1391
|
-
if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
|
|
1392
|
-
actionType: "input",
|
|
1393
|
-
field: trackingFieldName ?? name,
|
|
1394
|
-
returnValue: typeof newSelected === "string" ? newSelected : void 0
|
|
1395
|
-
});
|
|
1396
|
-
onChange(newSelected);
|
|
1397
|
-
};
|
|
1398
|
-
return /* @__PURE__ */ jsx(Tile, {
|
|
1399
|
-
name: finalName,
|
|
1400
|
-
className: TileGroup_module_default.tileContainer,
|
|
1401
|
-
inputType,
|
|
1402
|
-
isHorizontal,
|
|
1403
|
-
checked: choiceIsSelected(tile, selected, allowMultiple),
|
|
1404
|
-
label,
|
|
1405
|
-
id,
|
|
1406
|
-
subTitle,
|
|
1407
|
-
icon,
|
|
1408
|
-
disabled: !disabled && allowMultiple && selected.length >= maxSelected ? !choiceIsSelected(tile, selected, allowMultiple) : disabled,
|
|
1409
|
-
value,
|
|
1410
|
-
onChange: handleChange
|
|
1411
|
-
}, id);
|
|
1412
|
-
})
|
|
1413
|
-
})] });
|
|
1414
|
-
}
|
|
1415
|
-
function choiceIsSelected({ value }, selected, allowMultiple) {
|
|
1416
|
-
if (!allowMultiple) return value === selected;
|
|
1417
|
-
return selected.includes(value);
|
|
1418
|
-
}
|
|
1419
|
-
function updateSelectedChoices({ value }, checked, selected, allowMultiple) {
|
|
1420
|
-
if (!allowMultiple) return checked ? value : "";
|
|
1421
|
-
if (Array.isArray(selected)) {
|
|
1422
|
-
if (checked) return allowMultiple ? [...selected, value] : [value];
|
|
1423
|
-
return selected.filter((selectedChoice) => selectedChoice !== value);
|
|
1424
|
-
}
|
|
1425
|
-
return [];
|
|
1426
|
-
}
|
|
1427
|
-
//#endregion
|
|
1428
|
-
//#region src/components/Shared/fields/TaxInformationField/taxIdNumberTypes.ts
|
|
1429
|
-
var restrictedEntityTypes = [
|
|
1430
|
-
"soleProprietorship",
|
|
1431
|
-
"trust",
|
|
1432
|
-
"individual"
|
|
1101
|
+
//#region src/components/ui/atoms/TileGroup/TileGroup.tsx
|
|
1102
|
+
function TileGroup({ tiles, selected, allowMultiple = false, isHorizontal, name: nameProp, maxSelected = Infinity, errorMessage, onChange = noop, enableTracking = false, trackingFieldName }) {
|
|
1103
|
+
const uniqName = useId("tile");
|
|
1104
|
+
const name = nameProp ?? uniqName;
|
|
1105
|
+
const finalName = allowMultiple ? `${name}[]` : name;
|
|
1106
|
+
const inputType = allowMultiple ? "checkbox" : "radio";
|
|
1107
|
+
const userEvents = useAnalyticsContext();
|
|
1108
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [!!errorMessage?.message && /* @__PURE__ */ jsxs("div", {
|
|
1109
|
+
"aria-live": "polite",
|
|
1110
|
+
className: TileGroup_module_default.tileGroupError,
|
|
1111
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1112
|
+
className: TileGroup_module_default.tileGroupErrorIcon,
|
|
1113
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "field-error" })
|
|
1114
|
+
}), errorMessage.message]
|
|
1115
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1116
|
+
className: cx(TileGroup_module_default.tileGroup, { [TileGroup_module_default.tileGroupHorizontal]: isHorizontal }),
|
|
1117
|
+
children: tiles.map((tile) => {
|
|
1118
|
+
const { value, id, icon, subTitle, label, disabled } = tile;
|
|
1119
|
+
const handleChange = (checked) => {
|
|
1120
|
+
const newSelected = updateSelectedChoices(tile, checked, selected, allowMultiple);
|
|
1121
|
+
if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
|
|
1122
|
+
actionType: "input",
|
|
1123
|
+
field: trackingFieldName ?? name,
|
|
1124
|
+
returnValue: typeof newSelected === "string" ? newSelected : void 0
|
|
1125
|
+
});
|
|
1126
|
+
onChange(newSelected);
|
|
1127
|
+
};
|
|
1128
|
+
return /* @__PURE__ */ jsx(Tile, {
|
|
1129
|
+
name: finalName,
|
|
1130
|
+
className: TileGroup_module_default.tileContainer,
|
|
1131
|
+
inputType,
|
|
1132
|
+
isHorizontal,
|
|
1133
|
+
checked: choiceIsSelected(tile, selected, allowMultiple),
|
|
1134
|
+
label,
|
|
1135
|
+
id,
|
|
1136
|
+
subTitle,
|
|
1137
|
+
icon,
|
|
1138
|
+
disabled: !disabled && allowMultiple && selected.length >= maxSelected ? !choiceIsSelected(tile, selected, allowMultiple) : disabled,
|
|
1139
|
+
value,
|
|
1140
|
+
onChange: handleChange
|
|
1141
|
+
}, id);
|
|
1142
|
+
})
|
|
1143
|
+
})] });
|
|
1144
|
+
}
|
|
1145
|
+
function choiceIsSelected({ value }, selected, allowMultiple) {
|
|
1146
|
+
if (!allowMultiple) return value === selected;
|
|
1147
|
+
return selected.includes(value);
|
|
1148
|
+
}
|
|
1149
|
+
function updateSelectedChoices({ value }, checked, selected, allowMultiple) {
|
|
1150
|
+
if (!allowMultiple) return checked ? value : "";
|
|
1151
|
+
if (Array.isArray(selected)) {
|
|
1152
|
+
if (checked) return allowMultiple ? [...selected, value] : [value];
|
|
1153
|
+
return selected.filter((selectedChoice) => selectedChoice !== value);
|
|
1154
|
+
}
|
|
1155
|
+
return [];
|
|
1156
|
+
}
|
|
1157
|
+
//#endregion
|
|
1158
|
+
//#region src/components/Shared/fields/TaxInformationField/taxIdNumberTypes.ts
|
|
1159
|
+
var restrictedEntityTypes = [
|
|
1160
|
+
"soleProprietorship",
|
|
1161
|
+
"trust",
|
|
1162
|
+
"individual"
|
|
1433
1163
|
];
|
|
1434
1164
|
var isRestrictedEntityType = (entityType) => Boolean(entityType && restrictedEntityTypes.includes(entityType));
|
|
1435
1165
|
var isApplicableOnlyForSingleRestrictedType = (option) => {
|
|
@@ -1747,100 +1477,358 @@ var taxIdNumberOptions = {
|
|
|
1747
1477
|
applicableOnlyFor: ["individual"]
|
|
1748
1478
|
}
|
|
1749
1479
|
],
|
|
1750
|
-
[CountryCodes.Slovakia]: [{
|
|
1751
|
-
id: "RODNE_CISLO",
|
|
1752
|
-
name: "taxInformationNumber__SK_Individual",
|
|
1753
|
-
applicableOnlyFor: ["individual"]
|
|
1754
|
-
}, {
|
|
1755
|
-
id: "NATIONAL_IDENTIFICATION_NUMBER",
|
|
1756
|
-
name: "taxInformationNumber__SK_Org",
|
|
1757
|
-
applicableOnlyFor: ["privateCompany"]
|
|
1758
|
-
}],
|
|
1759
|
-
[CountryCodes.Slovenia]: [{
|
|
1760
|
-
id: "SI_TAX_NUMBER",
|
|
1761
|
-
name: "taxInformationNumber__SI_Individual",
|
|
1762
|
-
applicableOnlyFor: ["individual"]
|
|
1763
|
-
}, {
|
|
1764
|
-
id: "NATIONAL_IDENTIFICATION_NUMBER",
|
|
1765
|
-
name: "taxInformationNumber__SI_Org",
|
|
1766
|
-
applicableOnlyFor: ["privateCompany"]
|
|
1767
|
-
}],
|
|
1768
|
-
[CountryCodes.SouthAfrica]: [{
|
|
1769
|
-
id: "INCOME_TAX_REFERENCE_NUMBER",
|
|
1770
|
-
name: "taxInformationNumber__ZA",
|
|
1771
|
-
applicableOnlyFor: ["individual"]
|
|
1772
|
-
}],
|
|
1773
|
-
[CountryCodes.Spain]: [
|
|
1774
|
-
{
|
|
1775
|
-
id: "DNI",
|
|
1776
|
-
name: "dni",
|
|
1777
|
-
applicableOnlyFor: ["individual"]
|
|
1778
|
-
},
|
|
1779
|
-
{
|
|
1780
|
-
id: "NIE",
|
|
1781
|
-
name: "nie",
|
|
1782
|
-
applicableOnlyFor: ["individual"]
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
id: "NIF",
|
|
1786
|
-
name: "NIF",
|
|
1787
|
-
applicableOnlyFor: ["privateCompany"]
|
|
1788
|
-
}
|
|
1480
|
+
[CountryCodes.Slovakia]: [{
|
|
1481
|
+
id: "RODNE_CISLO",
|
|
1482
|
+
name: "taxInformationNumber__SK_Individual",
|
|
1483
|
+
applicableOnlyFor: ["individual"]
|
|
1484
|
+
}, {
|
|
1485
|
+
id: "NATIONAL_IDENTIFICATION_NUMBER",
|
|
1486
|
+
name: "taxInformationNumber__SK_Org",
|
|
1487
|
+
applicableOnlyFor: ["privateCompany"]
|
|
1488
|
+
}],
|
|
1489
|
+
[CountryCodes.Slovenia]: [{
|
|
1490
|
+
id: "SI_TAX_NUMBER",
|
|
1491
|
+
name: "taxInformationNumber__SI_Individual",
|
|
1492
|
+
applicableOnlyFor: ["individual"]
|
|
1493
|
+
}, {
|
|
1494
|
+
id: "NATIONAL_IDENTIFICATION_NUMBER",
|
|
1495
|
+
name: "taxInformationNumber__SI_Org",
|
|
1496
|
+
applicableOnlyFor: ["privateCompany"]
|
|
1497
|
+
}],
|
|
1498
|
+
[CountryCodes.SouthAfrica]: [{
|
|
1499
|
+
id: "INCOME_TAX_REFERENCE_NUMBER",
|
|
1500
|
+
name: "taxInformationNumber__ZA",
|
|
1501
|
+
applicableOnlyFor: ["individual"]
|
|
1502
|
+
}],
|
|
1503
|
+
[CountryCodes.Spain]: [
|
|
1504
|
+
{
|
|
1505
|
+
id: "DNI",
|
|
1506
|
+
name: "dni",
|
|
1507
|
+
applicableOnlyFor: ["individual"]
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
id: "NIE",
|
|
1511
|
+
name: "nie",
|
|
1512
|
+
applicableOnlyFor: ["individual"]
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
id: "NIF",
|
|
1516
|
+
name: "NIF",
|
|
1517
|
+
applicableOnlyFor: ["privateCompany"]
|
|
1518
|
+
}
|
|
1519
|
+
],
|
|
1520
|
+
[CountryCodes.Sweden]: [{
|
|
1521
|
+
id: "PERSONNUMMER",
|
|
1522
|
+
name: "taxInformationNumber__SE",
|
|
1523
|
+
applicableOnlyFor: ["individual"]
|
|
1524
|
+
}],
|
|
1525
|
+
[CountryCodes.Switzerland]: [{
|
|
1526
|
+
id: "AHV_NUMBER",
|
|
1527
|
+
name: "taxInformationNumber__CH",
|
|
1528
|
+
applicableOnlyFor: ["individual"]
|
|
1529
|
+
}],
|
|
1530
|
+
[CountryCodes.UnitedArabEmirates]: [{
|
|
1531
|
+
id: "EMIRATES_ID",
|
|
1532
|
+
name: "taxInformationNumber__AE",
|
|
1533
|
+
applicableOnlyFor: ["individual"]
|
|
1534
|
+
}],
|
|
1535
|
+
[CountryCodes.UnitedKingdom]: [{
|
|
1536
|
+
id: "UTR",
|
|
1537
|
+
name: "utr"
|
|
1538
|
+
}, {
|
|
1539
|
+
id: "NINO",
|
|
1540
|
+
name: "nationalInsuranceNumber",
|
|
1541
|
+
applicableOnlyFor: ["individual"]
|
|
1542
|
+
}],
|
|
1543
|
+
[CountryCodes.UnitedStates]: [{
|
|
1544
|
+
id: "EIN",
|
|
1545
|
+
name: "ein"
|
|
1546
|
+
}]
|
|
1547
|
+
};
|
|
1548
|
+
var getTaxIdNumberOptions = (country, companyType) => {
|
|
1549
|
+
const optionsForCountry = taxIdNumberOptions[country];
|
|
1550
|
+
if (!optionsForCountry) return optionsForCountry;
|
|
1551
|
+
if (isRestrictedEntityType(companyType)) return optionsForCountry.filter((option) => option.applicableOnlyFor?.includes(companyType) ?? true);
|
|
1552
|
+
return optionsForCountry.filter((option) => !isApplicableOnlyForSingleRestrictedType(option));
|
|
1553
|
+
};
|
|
1554
|
+
var getTaxIdNumberSelectorOptions = (country, companyType, exemptedOptionLabel) => {
|
|
1555
|
+
const availableOptions = getTaxIdNumberOptions(country, companyType) ?? [];
|
|
1556
|
+
if (availableOptions.length === 0 || !exemptedOptionLabel) return availableOptions;
|
|
1557
|
+
return [...availableOptions, {
|
|
1558
|
+
id: "exempted",
|
|
1559
|
+
name: exemptedOptionLabel
|
|
1560
|
+
}];
|
|
1561
|
+
};
|
|
1562
|
+
function getValidCompanyTypesForTaxIdNumberType(country, taxIdNumberType) {
|
|
1563
|
+
if (!taxIdNumberType) return void 0;
|
|
1564
|
+
const taxIdOption = taxIdNumberOptions[country]?.find((option) => option.id === taxIdNumberType);
|
|
1565
|
+
if (!taxIdOption?.applicableOnlyFor) return void 0;
|
|
1566
|
+
const validCompanyTypes = taxIdOption.applicableOnlyFor.filter((type) => type !== "individual" && type !== "trust" && type !== "unincorporatedPartnership");
|
|
1567
|
+
return validCompanyTypes.length > 0 ? validCompanyTypes : void 0;
|
|
1568
|
+
}
|
|
1569
|
+
//#endregion
|
|
1570
|
+
//#region src/utils/mapScriptLocalization.ts
|
|
1571
|
+
/**
|
|
1572
|
+
* Takes a {@link ScriptLocalization} and converts it into a schema with matching field names.
|
|
1573
|
+
*
|
|
1574
|
+
* E.g.
|
|
1575
|
+
* ```ts
|
|
1576
|
+
* const scriptLocalization = {
|
|
1577
|
+
* script: 'ja-Kana',
|
|
1578
|
+
* fields: {
|
|
1579
|
+
* firstName: 'アレキサンダー',
|
|
1580
|
+
* lastName: 'パトリック',
|
|
1581
|
+
* },
|
|
1582
|
+
* } as const;
|
|
1583
|
+
*
|
|
1584
|
+
* const schema = mapApiScriptLocalizationToSchemaFields(scriptLocalization);
|
|
1585
|
+
* console.log(schema);
|
|
1586
|
+
* // {
|
|
1587
|
+
* // jaKanaFirstName: 'アレキサンダー',
|
|
1588
|
+
* // jaKanaLastName: 'パトリック'
|
|
1589
|
+
* // }
|
|
1590
|
+
* ```
|
|
1591
|
+
*
|
|
1592
|
+
*/
|
|
1593
|
+
function mapApiScriptLocalizationToSchemaFields(localization) {
|
|
1594
|
+
const schema = {};
|
|
1595
|
+
const scriptNameInSchema = localization.script.replace("-", "");
|
|
1596
|
+
for (const [field, value] of Object.entries(localization.fields)) schema[scriptNameInSchema + field[0].toUpperCase() + field.slice(1)] = value;
|
|
1597
|
+
return schema;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Given a schema and a script, takes the fields prefixed with that script and produces a {@link ScriptLocalization}.
|
|
1601
|
+
*
|
|
1602
|
+
* E.g.
|
|
1603
|
+
* ```ts
|
|
1604
|
+
* const schema = {
|
|
1605
|
+
* firstName: 'Alex',
|
|
1606
|
+
* lastName: 'Tompkins',
|
|
1607
|
+
* jaKanaFirstName: 'アレキサンダー',
|
|
1608
|
+
* jaKanaLastName: 'パトリック',
|
|
1609
|
+
* jaHaniFirstName: 'pretend this is hiragana',
|
|
1610
|
+
* jaHaniLastName: 'this too',
|
|
1611
|
+
* };
|
|
1612
|
+
*
|
|
1613
|
+
* const localization = mapSchemaFieldsToApiScriptLocalization(schema, 'jaKana');
|
|
1614
|
+
* console.log(localization);
|
|
1615
|
+
* // {
|
|
1616
|
+
* // script: 'ja-Kana',
|
|
1617
|
+
* // fields: { firstName: 'アレキサンダー', lastName: 'パトリック' },
|
|
1618
|
+
* // };
|
|
1619
|
+
* ```
|
|
1620
|
+
*/
|
|
1621
|
+
function mapSchemaFieldsToApiScriptLocalization(data, script) {
|
|
1622
|
+
const fields = {};
|
|
1623
|
+
for (const [schemaField, value] of Object.entries(data)) if (schemaField.startsWith(script)) {
|
|
1624
|
+
let fieldName = schemaField.replace(script, "");
|
|
1625
|
+
fieldName = fieldName[0].toLowerCase() + fieldName.slice(1);
|
|
1626
|
+
fields[fieldName] = value;
|
|
1627
|
+
}
|
|
1628
|
+
return {
|
|
1629
|
+
script: `${script.slice(0, 2)}-${script.slice(2)}`,
|
|
1630
|
+
fields
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
//#endregion
|
|
1634
|
+
//#region src/utils/businessUtils.ts
|
|
1635
|
+
/**
|
|
1636
|
+
* @description Countries in this list use the provider-backed company search flow.
|
|
1637
|
+
* For these countries, business details can be prefilled from provider results,
|
|
1638
|
+
* and search/verification may require tax identifiers (for example TIN or VAT)
|
|
1639
|
+
* in addition to company name/registration details.
|
|
1640
|
+
*
|
|
1641
|
+
* If a country is in this list, it means it will attempt to make an api call for company search.
|
|
1642
|
+
* If the api doesnt have a provider for that country, it will return no results like below
|
|
1643
|
+
* ```
|
|
1644
|
+
* {
|
|
1645
|
+
* "results": [],
|
|
1646
|
+
* "provider": "NO_PROVIDER"
|
|
1647
|
+
* }
|
|
1648
|
+
* ```
|
|
1649
|
+
*/
|
|
1650
|
+
var COUNTRIES_USING_COMPANY_SEARCH = [
|
|
1651
|
+
CountryCodes.UnitedStates,
|
|
1652
|
+
CountryCodes.UnitedKingdom,
|
|
1653
|
+
CountryCodes.Germany,
|
|
1654
|
+
CountryCodes.France
|
|
1655
|
+
];
|
|
1656
|
+
/**
|
|
1657
|
+
* Source of truth for registration-number exemption eligibility in Business Details.
|
|
1658
|
+
*
|
|
1659
|
+
* This map defines which company types can use `exemptedFromRegistrationNumber`, grouped by
|
|
1660
|
+
* country. All exemption checks should be derived from this structure to keep behavior consistent
|
|
1661
|
+
* across form rules.
|
|
1662
|
+
*
|
|
1663
|
+
* Interpretation:
|
|
1664
|
+
* - Non-empty array: exemption is allowed only for the listed company types.
|
|
1665
|
+
* - Empty array: exemption is allowed for that country without company-type restrictions.
|
|
1666
|
+
*
|
|
1667
|
+
*/
|
|
1668
|
+
var REGISTRATION_NUMBER_EXEMPTION_RULES = {
|
|
1669
|
+
[CountryCodes.Australia]: ["governmentalOrganization", "partnershipIncorporated"],
|
|
1670
|
+
[CountryCodes.Austria]: ["soleProprietorship"],
|
|
1671
|
+
[CountryCodes.Canada]: ["soleProprietorship"],
|
|
1672
|
+
[CountryCodes.Denmark]: ["nonProfit"],
|
|
1673
|
+
[CountryCodes.Finland]: ["soleProprietorship"],
|
|
1674
|
+
[CountryCodes.Germany]: [
|
|
1675
|
+
"governmentalOrganization",
|
|
1676
|
+
"nonProfit",
|
|
1677
|
+
"soleProprietorship"
|
|
1678
|
+
],
|
|
1679
|
+
[CountryCodes.HongKong]: [
|
|
1680
|
+
"privateCompany",
|
|
1681
|
+
"nonProfit",
|
|
1682
|
+
"listedPublicCompany",
|
|
1683
|
+
"unlistedPublicCompany",
|
|
1684
|
+
"governmentalOrganization",
|
|
1685
|
+
"partnershipIncorporated",
|
|
1686
|
+
"associationIncorporated"
|
|
1789
1687
|
],
|
|
1790
|
-
[CountryCodes.
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
[CountryCodes.Switzerland]: [
|
|
1796
|
-
id: "AHV_NUMBER",
|
|
1797
|
-
name: "taxInformationNumber__CH",
|
|
1798
|
-
applicableOnlyFor: ["individual"]
|
|
1799
|
-
}],
|
|
1800
|
-
[CountryCodes.UnitedArabEmirates]: [{
|
|
1801
|
-
id: "EMIRATES_ID",
|
|
1802
|
-
name: "taxInformationNumber__AE",
|
|
1803
|
-
applicableOnlyFor: ["individual"]
|
|
1804
|
-
}],
|
|
1805
|
-
[CountryCodes.UnitedKingdom]: [{
|
|
1806
|
-
id: "UTR",
|
|
1807
|
-
name: "utr"
|
|
1808
|
-
}, {
|
|
1809
|
-
id: "NINO",
|
|
1810
|
-
name: "nationalInsuranceNumber",
|
|
1811
|
-
applicableOnlyFor: ["individual"]
|
|
1812
|
-
}],
|
|
1813
|
-
[CountryCodes.UnitedStates]: [{
|
|
1814
|
-
id: "EIN",
|
|
1815
|
-
name: "ein"
|
|
1816
|
-
}]
|
|
1817
|
-
};
|
|
1818
|
-
var getTaxIdNumberOptions = (country, companyType) => {
|
|
1819
|
-
const optionsForCountry = taxIdNumberOptions[country];
|
|
1820
|
-
if (!optionsForCountry) return optionsForCountry;
|
|
1821
|
-
if (isRestrictedEntityType(companyType)) return optionsForCountry.filter((option) => option.applicableOnlyFor?.includes(companyType) ?? true);
|
|
1822
|
-
return optionsForCountry.filter((option) => !isApplicableOnlyForSingleRestrictedType(option));
|
|
1688
|
+
[CountryCodes.Lithuania]: ["soleProprietorship"],
|
|
1689
|
+
[CountryCodes.Luxembourg]: ["soleProprietorship"],
|
|
1690
|
+
[CountryCodes.NewZealand]: [],
|
|
1691
|
+
[CountryCodes.Poland]: ["soleProprietorship"],
|
|
1692
|
+
[CountryCodes.Sweden]: ["soleProprietorship"],
|
|
1693
|
+
[CountryCodes.Switzerland]: ["soleProprietorship"]
|
|
1823
1694
|
};
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1695
|
+
/**
|
|
1696
|
+
* Determines whether a registration-number exemption can be offered for a country and company type.
|
|
1697
|
+
*
|
|
1698
|
+
* Provide `companyType` when checking a specific entity (including a sole proprietorship); this checks
|
|
1699
|
+
* that exact type against the country's rule. Omit it when deciding whether to show the exemption option
|
|
1700
|
+
* for all company types in that country; it is then available only when at least one
|
|
1701
|
+
* non-sole-proprietorship type is eligible.
|
|
1702
|
+
*
|
|
1703
|
+
* This distinction prevents sole-proprietorship-only countries from exposing the exemption to
|
|
1704
|
+
* businesses while still allowing unrestricted countries (an empty rule) for every entity type.
|
|
1705
|
+
*/
|
|
1706
|
+
var isRegistrationExemptionAllowed = ({ country, companyType }) => {
|
|
1707
|
+
const allowedCompanyTypes = REGISTRATION_NUMBER_EXEMPTION_RULES[country];
|
|
1708
|
+
if (!allowedCompanyTypes) return false;
|
|
1709
|
+
if (allowedCompanyTypes.length === 0) return true;
|
|
1710
|
+
return companyType ? allowedCompanyTypes.includes(companyType) : allowedCompanyTypes.some((allowedCompanyType) => allowedCompanyType !== "soleProprietorship");
|
|
1831
1711
|
};
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1712
|
+
var isRegistrationNumberAbsentStateV4Scenario = (country, entityType) => country === CountryCodes.Australia && (entityType === "governmentalOrganization" || entityType === "partnershipIncorporated") || country === CountryCodes.NewZealand;
|
|
1713
|
+
var COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
1714
|
+
CountryCodes.HongKong,
|
|
1715
|
+
CountryCodes.Mexico,
|
|
1716
|
+
CountryCodes.PuertoRico,
|
|
1717
|
+
CountryCodes.UnitedStates
|
|
1718
|
+
];
|
|
1719
|
+
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
1720
|
+
/**
|
|
1721
|
+
* Also used to determine what documenttype needs to be used
|
|
1722
|
+
* when uploading tax document in mapping.ts
|
|
1723
|
+
* */
|
|
1724
|
+
var COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
1725
|
+
CountryCodes.Australia,
|
|
1726
|
+
CountryCodes.Canada,
|
|
1727
|
+
CountryCodes.Gibraltar,
|
|
1728
|
+
CountryCodes.HongKong,
|
|
1729
|
+
CountryCodes.NewZealand,
|
|
1730
|
+
CountryCodes.PuertoRico,
|
|
1731
|
+
CountryCodes.Singapore,
|
|
1732
|
+
CountryCodes.UnitedStates,
|
|
1733
|
+
CountryCodes.Guernsey,
|
|
1734
|
+
CountryCodes.Jersey,
|
|
1735
|
+
CountryCodes.IsleOfMan,
|
|
1736
|
+
CountryCodes.Mexico,
|
|
1737
|
+
CountryCodes.Brazil,
|
|
1738
|
+
CountryCodes.Japan
|
|
1739
|
+
];
|
|
1740
|
+
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [];
|
|
1741
|
+
var COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
1742
|
+
CountryCodes.Austria,
|
|
1743
|
+
CountryCodes.Belgium,
|
|
1744
|
+
CountryCodes.Croatia,
|
|
1745
|
+
CountryCodes.Cyprus,
|
|
1746
|
+
CountryCodes.Estonia,
|
|
1747
|
+
CountryCodes.Finland,
|
|
1748
|
+
CountryCodes.France,
|
|
1749
|
+
CountryCodes.Germany,
|
|
1750
|
+
CountryCodes.Greece,
|
|
1751
|
+
CountryCodes.Ireland,
|
|
1752
|
+
CountryCodes.Italy,
|
|
1753
|
+
CountryCodes.Latvia,
|
|
1754
|
+
CountryCodes.Lithuania,
|
|
1755
|
+
CountryCodes.Luxembourg,
|
|
1756
|
+
CountryCodes.Malta,
|
|
1757
|
+
CountryCodes.Netherlands,
|
|
1758
|
+
CountryCodes.Portugal,
|
|
1759
|
+
CountryCodes.Slovakia,
|
|
1760
|
+
CountryCodes.Slovenia,
|
|
1761
|
+
CountryCodes.Spain,
|
|
1762
|
+
CountryCodes.UnitedKingdom
|
|
1763
|
+
];
|
|
1764
|
+
var COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [CountryCodes.Australia];
|
|
1765
|
+
var TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
1766
|
+
CountryCodes.Austria,
|
|
1767
|
+
CountryCodes.Belgium,
|
|
1768
|
+
CountryCodes.Croatia,
|
|
1769
|
+
CountryCodes.Cyprus,
|
|
1770
|
+
CountryCodes.Germany,
|
|
1771
|
+
CountryCodes.Greece,
|
|
1772
|
+
CountryCodes.Ireland,
|
|
1773
|
+
CountryCodes.Luxembourg,
|
|
1774
|
+
CountryCodes.Malta,
|
|
1775
|
+
CountryCodes.Netherlands,
|
|
1776
|
+
CountryCodes.Slovakia,
|
|
1777
|
+
CountryCodes.Slovenia
|
|
1778
|
+
];
|
|
1779
|
+
/**
|
|
1780
|
+
* Sole proprietorship specific rules
|
|
1781
|
+
*/
|
|
1782
|
+
var COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
1783
|
+
CountryCodes.Australia,
|
|
1784
|
+
CountryCodes.Gibraltar,
|
|
1785
|
+
CountryCodes.Guernsey,
|
|
1786
|
+
CountryCodes.HongKong,
|
|
1787
|
+
CountryCodes.Ireland,
|
|
1788
|
+
CountryCodes.IsleOfMan,
|
|
1789
|
+
CountryCodes.Jersey,
|
|
1790
|
+
CountryCodes.Malta,
|
|
1791
|
+
CountryCodes.Mexico,
|
|
1792
|
+
CountryCodes.PuertoRico,
|
|
1793
|
+
CountryCodes.Spain,
|
|
1794
|
+
CountryCodes.UnitedKingdom,
|
|
1795
|
+
CountryCodes.UnitedStates
|
|
1796
|
+
];
|
|
1797
|
+
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
1798
|
+
CountryCodes.Canada,
|
|
1799
|
+
CountryCodes.PuertoRico,
|
|
1800
|
+
CountryCodes.UnitedStates
|
|
1801
|
+
];
|
|
1802
|
+
var COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.Singapore];
|
|
1803
|
+
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [CountryCodes.Germany];
|
|
1804
|
+
var isUsingCompanySearch = (country, taskType) => {
|
|
1805
|
+
if (taskType !== TaskTypes.BUSINESS_DETAILS && taskType !== TaskTypes.GLOBAL_ENTRY) return false;
|
|
1806
|
+
return COUNTRIES_USING_COMPANY_SEARCH.includes(country);
|
|
1843
1807
|
};
|
|
1808
|
+
/**
|
|
1809
|
+
* A Japanese business has a kanji legal name and a katakana reading of it, neither of which can be
|
|
1810
|
+
* derived from the roman one, so they travel beside it as script localizations.
|
|
1811
|
+
*
|
|
1812
|
+
* @param data the form section holding the localized name fields, whatever the task calls it
|
|
1813
|
+
* @returns the localizations that were filled in, so an empty array when neither was asked for
|
|
1814
|
+
*/
|
|
1815
|
+
var mapJapaneseLegalNamesToLocalization = (data) => [mapSchemaFieldsToApiScriptLocalization(data, "jaHani"), mapSchemaFieldsToApiScriptLocalization(data, "jaKana")].filter(({ fields }) => !isEmpty(fields)).map(({ script, fields }) => ({
|
|
1816
|
+
script,
|
|
1817
|
+
fields: { legalName: fields.legalCompanyName }
|
|
1818
|
+
}));
|
|
1819
|
+
/**
|
|
1820
|
+
* Reads the kanji and katakana legal names back out of the script localizations, so they can
|
|
1821
|
+
* prefill the fields they came from.
|
|
1822
|
+
*
|
|
1823
|
+
* @param localization the organization's script localizations, when it has any
|
|
1824
|
+
*/
|
|
1825
|
+
var mapLocalizationToJapaneseLegalNames = (localization) => (localization ?? []).reduce((schemaFields, { script, fields }) => ({
|
|
1826
|
+
...schemaFields,
|
|
1827
|
+
...mapApiScriptLocalizationToSchemaFields({
|
|
1828
|
+
script,
|
|
1829
|
+
fields: { legalCompanyName: fields?.legalName }
|
|
1830
|
+
})
|
|
1831
|
+
}), {});
|
|
1844
1832
|
//#endregion
|
|
1845
1833
|
//#region src/utils/textTransformation/toFullWidth.ts
|
|
1846
1834
|
var applyDelta = (delta) => (char) => String.fromCharCode(char.charCodeAt(0) + delta);
|
|
@@ -3545,4 +3533,4 @@ var isBafinSignatoryFlow = ({ taskType, data, scenarios }) => {
|
|
|
3545
3533
|
return false;
|
|
3546
3534
|
};
|
|
3547
3535
|
//#endregion
|
|
3548
|
-
export {
|
|
3536
|
+
export { COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS as A, mapSchemaFieldsToApiScriptLocalization as B, COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION as C, COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER as D, COUNTRIES_USING_COMPANY_SEARCH as E, isRegistrationNumberAbsentStateV4Scenario as F, businessRegistrationNumberPatterns as G, getValidCompanyTypesForTaxIdNumberType as H, isUsingCompanySearch as I, businessRegistrationNumberMasks as K, mapJapaneseLegalNamesToLocalization as L, REGISTRATION_NUMBER_EXEMPTION_RULES as M, TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION as N, COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS as O, isRegistrationExemptionAllowed as P, mapLocalizationToJapaneseLegalNames as R, COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION as S, COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT as T, taxIdNumberOptions as U, getTaxIdNumberOptions as V, TileGroup as W, getTaxInformationPlaceholderText as _, idNowPostSubmit as a, toFullWidth as b, DataConflictsModal as c, removeTaxInfoForCountry as d, upsertTaxInfoForCountry as f, exemptedFromTaxDefaultFieldMetadata as g, exemptedFromTaxDefaultFieldConfig as h, idNowModalChildEntityId as i, COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 as j, COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES as k, TAX_INFORMATION_FIELD as l, findExistingTaxInformation as m, isBafinSignatoryFlow as n, shouldShowIdNowModal as o, TaxIdNumberTypeSelector as p, stateFormatGuidanceText as q, removeIdVerificationProblemsForBafinSignatory as r, showIdNowModal as s, getIdNowMissingDataPoints as t, TaxInformationField as u, taxInformationDefaultFieldConfig as v, COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP as w, COUNTRIES_REQUIRING_FINANCIAL_INFORMATION as x, taxInformationDefaultFieldMetadata as y, mapApiScriptLocalizationToSchemaFields as z };
|