@adyen/kyc-components 4.0.0-beta.5 → 4.0.0-compact.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/{AcceptTermsOfServiceComponent-Bjj3cdYk.js → AcceptTermsOfServiceComponent-BF24NWVw.js} +43 -15
- package/dist/{AccountSetupRejected-CSQTnRkO.js → AccountSetupRejected-2t22lJUo.js} +6 -4
- package/dist/Address-DSwfzWFu.js +1076 -0
- package/dist/Alert-C24s_Ygs.js +231 -0
- package/dist/{Avatar-DL_WbHEO.js → Avatar-DQjt5Lk2.js} +2 -2
- package/dist/BusinessDetailsDropin-CRFPvWuD.js +5088 -0
- package/dist/BusinessFinancingComponent-y2_kC8bx.js +45 -0
- package/dist/{BusinessFinancingDropin-MrOVSlPu.js → BusinessFinancingDropin-C-xm14b8.js} +51 -26
- package/dist/BusinessFinancingPage-BOG7yrw6.js +40 -0
- package/dist/{BusinessTypeSelectionPage-DJ5bfr8m.js → BusinessTypeSelectionPage-ujY2jj6B.js} +9 -5
- package/dist/Card-BMuquALf.js +145 -0
- package/dist/Confirm-DwutojkY.js +64 -0
- package/dist/{ContractViewer-z3KbE1Vf.js → ContractViewer-Byp71k2e.js} +34 -46
- package/dist/CountryField-D0YZrov9.js +864 -0
- package/dist/CreateIndividualComponent-VZWLAo0l.js +72 -0
- package/dist/CreateTransferInstrumentComponent-OtReN6Cy.js +67 -0
- package/dist/Currency-BECbMsi5.js +238 -0
- package/dist/{CustomerSupport-CUPUElh7.js → CustomerSupport-B8zC_huY.js} +10 -6
- package/dist/{DebugModal-BC-xS3Y1.js → DebugModal-CshTHx0o.js} +8 -5
- package/dist/DecisionMakerDetailsPage-BJUwR4R7.js +100 -0
- package/dist/{DecisionMakers-5m_hI3ko.js → DecisionMakers-BDNa3HcC.js} +247 -134
- package/dist/DetailViewLayout-Z9cuUp4X.js +65 -0
- package/dist/Dropzone-D6dXhmL4.js +218 -0
- package/dist/{EmbeddedStatus-8yA_zZvi.js → EmbeddedStatus-BHTZcjUN.js} +4 -4
- package/dist/EndStateLayout-CyGtLyvf.js +71 -0
- package/dist/{FormFlow-6j8qCSuK.js → FormFlow-CZ9f5X0C.js} +8 -2
- package/dist/FormNavigation-ezxkIqdb.js +162 -0
- package/dist/{IndividualOnfidoDropin-B0G_nHXY.js → IndividualOnfidoDropin-vuHu-O_C.js} +3240 -258
- package/dist/InputDate-CHygOGiS.js +43 -0
- package/dist/InputGroup-WBfGDV5F.js +32 -0
- package/dist/InputText-BX5sG9WJ.js +161 -0
- package/dist/{Introduction-aPZmTW68.js → Introduction-BsKwELuc.js} +58 -4
- package/dist/{LegalRepresentativeDetailsPage-Beh9_16w.js → LegalRepresentativeDetailsPage-DtMHe1Nq.js} +9 -3
- package/dist/Link-BFdxU8qh.js +35 -0
- package/dist/ManageIndividualComponent-By_fCmN1.js +47 -0
- package/dist/ManageTermsOfServiceComponent-D7F44OPD.js +47 -0
- package/dist/{ManageTransferInstrumentComponent-Ds1QZxxR.js → ManageTransferInstrumentComponent-DywpP5PK.js} +37 -42
- package/dist/MaskedInput-BZ7t98eu.js +799 -0
- package/dist/MaybeModal-CE9kYOrU.js +25 -0
- package/dist/Modal-nMRQDTF7.js +136 -0
- package/dist/{OnboardingDropinComponent-DLvTQVTE.js → OnboardingDropinComponent-B0GrJ_pR.js} +235 -90
- package/dist/PayoutDetailsDropin-BJIqXmPn.js +3694 -0
- package/dist/RadioGroup-CYDXrtrO.js +143 -0
- package/dist/RegistrationAddress-qtMZa31b.js +2334 -0
- package/dist/{Review-DEeOefPe.js → Review-D7NEYFoT.js} +8 -4
- package/dist/{RootBusinessDetailsPage-B2VBJ6x2.js → RootBusinessDetailsPage-rCbGLBEv.js} +66 -44
- package/dist/{RootIndividualDetailsPage-Bi7xeUYJ.js → RootIndividualDetailsPage-B3TkB6Xj.js} +9 -3
- package/dist/SignPCIComponent-C0iYfSl6.js +294 -0
- package/dist/{SingpassSelection--f8TDTJH.js → SingpassSelection-ClMlwfoj.js} +19 -11
- package/dist/SoleProprietorshipPage-JKNrAy74.js +50 -0
- package/dist/{SourceOfFundsPage-avNGxkCP.js → SourceOfFundsPage-D-pN33-9.js} +49 -32
- package/dist/Spacer-BK3jDget.js +18 -0
- package/dist/StepProgressIndicator-BWCQmDeV.js +78 -0
- package/dist/StoreProvider-BlaJzXSZ.js +7072 -0
- package/dist/StructuredList-DaepaiVE.js +38 -0
- package/dist/{TaskItemStatus-DMPUHtWU.js → TaskItemStatus-B38keERo.js} +4 -3
- package/dist/{TaskStatusIndicator-Bfc4X_jG.js → TaskStatusIndicator-BIvTrQtf.js} +3 -3
- package/dist/TaxInformationField-DS0m73if.js +3062 -0
- package/dist/{TaxReportingDropin-B7FXPbLq.js → TaxReportingDropin-CVbVkFhv.js} +28 -17
- package/dist/{TileGroup-DUoq3Lh4.js → TileGroup-CztY53P9.js} +4 -2
- package/dist/{TrustDetailsPage-J4MShc8J.js → TrustDetailsPage-C791Wu5u.js} +506 -19
- package/dist/TrustMemberCompanyPage-BOQ5D3y4.js +60 -0
- package/dist/{TrustMemberIndividualPage-CFo3Is4F.js → TrustMemberIndividualPage-BPIXX2Mh.js} +9 -3
- package/dist/{UnincorporatedPartnershipIndividualPage-CfllAxUK.js → UnincorporatedPartnershipIndividualPage-vzn0R02z.js} +9 -3
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-779IUOW2.js → UnincorporatedPartnershipMemberCompanyPage-C-kGU5Sh.js} +10 -3
- package/dist/{ViewVerificationStatusComponent-ZtYIqtnO.js → ViewVerificationStatusComponent-BTW-Vw9I.js} +4 -3
- package/dist/adyen-business-financing.js +33 -22
- package/dist/adyen-individual-configuration.js +59 -0
- package/dist/adyen-individual-status.js +47 -0
- package/dist/adyen-kyc-components.js +28 -15
- package/dist/adyen-onboarding.js +3 -3
- package/dist/adyen-terms-of-service-management.js +63 -0
- package/dist/adyen-terms-of-service-status.js +47 -0
- package/dist/adyen-transfer-instrument-configuration.js +73 -0
- package/dist/adyen-transfer-instrument-management.js +61 -0
- package/dist/adyen-verification-status.js +44 -36
- package/dist/analytics-3-a-Od7Z.js +61 -0
- package/dist/{LandingLayout-Xi3iuRMx.js → bafinUtils-Bar3qiJA.js} +218 -8
- package/dist/basePatterns-BwdnMQxI.js +15 -0
- package/dist/commonValidators-Bk0SSjsH.js +24 -0
- package/dist/currency-BGwQyxBo.js +36 -0
- package/dist/{da-DK-Adj8R5Qn.js → da-DK-B45X2VaJ.js} +9 -2
- package/dist/da-DK-BJ7aTPir.js +13 -0
- package/dist/{da-DK-Dm8o1giq.js → da-DK-BoQic3Gy.js} +2 -4
- package/dist/{da-DK-4QAKic_C.js → da-DK-D0N1TVVU.js} +4 -1
- package/dist/da-DK-D4H69PX3.js +30 -0
- package/dist/da-DK-DStNe471.js +22 -0
- package/dist/de-DE-C78RLE2G.js +13 -0
- package/dist/de-DE-CGoBPCPv.js +22 -0
- package/dist/{de-DE-BG0tKqvi.js → de-DE-CWvgMDqU.js} +9 -2
- package/dist/{de-DE-BzumFI3T.js → de-DE-Dtuu-nE7.js} +4 -1
- package/dist/{de-DE-DMFaycio.js → de-DE-Dwagawx1.js} +2 -4
- package/dist/de-DE-wp5-H-ov.js +30 -0
- package/dist/{digital-wallet-with-local-currencies-POeLD54e.js → digital-wallet-D_IpxnkN.js} +3 -3
- package/dist/dropinUtils-DHp5v5jB.js +192 -0
- package/dist/emitEvent-CzZf80Am.js +28 -0
- package/dist/{en-US-DLm6gy6T.js → en-US-546hB2Wn.js} +3 -1
- package/dist/{en-US-CkZcSKGh.js → en-US-BbAzROHT.js} +5 -4
- package/dist/en-US-CAm3meB1.js +30 -0
- package/dist/{en-US-SbE0c1gn.js → en-US-DIdQJky-.js} +1 -2
- package/dist/en-US.instructions-Ddr7AO05.js +22 -0
- package/dist/{es-ES-BhQOdKge.js → es-ES-BsQpwaPN.js} +4 -1
- package/dist/{es-ES-pXHx3ODy.js → es-ES-Bsoco8Fj.js} +2 -4
- package/dist/es-ES-BtUSEzkE.js +13 -0
- package/dist/es-ES-CKMfS8Yy.js +22 -0
- package/dist/{es-ES-BM4U0hT3.js → es-ES-DKCCgVF8.js} +9 -2
- package/dist/es-ES-Ds3-DtqZ.js +30 -0
- package/dist/{fi-FI-Djollt2G.js → fi-FI-BJ9RzrL3.js} +4 -1
- package/dist/{fi-FI-DT351N-G.js → fi-FI-ClnsYt3L.js} +2 -4
- package/dist/fi-FI-Cvar63RH.js +13 -0
- package/dist/fi-FI-DPNeTsJS.js +30 -0
- package/dist/{fi-FI-BJ2l42Pj.js → fi-FI-Hhku9Lmc.js} +9 -2
- package/dist/fi-FI-REYOX46I.js +22 -0
- package/dist/fieldConfigurations-B8bDFQ53.js +458 -0
- package/dist/{hr-HR-CNzbyo9r.js → form-rules-DhbF2mY4.js} +3 -5
- package/dist/fr-FR-B5543Fe-.js +13 -0
- package/dist/{fr-FR-g7lmxEsI.js → fr-FR-BYuKsZIb.js} +9 -2
- package/dist/{fr-FR-BNXXNUX_.js → fr-FR-CJI0bIig.js} +2 -4
- package/dist/{fr-FR-l36qBV3a.js → fr-FR-CNR5-s9g.js} +4 -1
- package/dist/fr-FR-ChmNQciP.js +30 -0
- package/dist/fr-FR-D9qaP6nx.js +22 -0
- package/dist/getName-DJlhsDj_.js +41 -0
- package/dist/{hasDataChanged-CTE9vdfO.js → hasDataChanged-BgvxL-Hx.js} +2 -2
- package/dist/iframeWidget-Bftkd3v_.js +234 -0
- package/dist/{payout-verification-instant-BIcnFP-p.js → instant-verification-Dvvkyfmp.js} +3 -3
- package/dist/isEmpty-CuQFhMf0.js +23 -0
- package/dist/{it-IT-BEWyAQUU.js → it-IT-BV9K87FK.js} +4 -1
- package/dist/{it-IT-BeYbInCQ.js → it-IT-BeC2Y1F8.js} +2 -4
- package/dist/it-IT-Biduphjt.js +22 -0
- package/dist/it-IT-Dd6xGSe-.js +13 -0
- package/dist/{it-IT-DYIx7myn.js → it-IT-Nl57jui-.js} +9 -2
- package/dist/it-IT-eCrTB65E.js +30 -0
- package/dist/keys-BpNgnAsD.js +23 -0
- package/dist/{localizeDateString-DaAGYSWR.js → localizeDateString-DHsivjy2.js} +2 -2
- package/dist/{payout-verification-manual-DH9-DdlZ.js → manual-verification-BvZWqA00.js} +3 -3
- package/dist/mapExistingFile-DW5ktJzM.js +231 -0
- package/dist/mapScriptLocalization-CI-Ydp2z.js +72 -0
- package/dist/mapTransferInstrumentToPayoutAccount-CAoOlPMA.js +30 -0
- package/dist/{nl-NL-Cht7cSwD.js → nl-NL-BHkRnVrj.js} +9 -2
- package/dist/{nl-NL-Dbx0ZmI7.js → nl-NL-Cysslsh2.js} +2 -4
- package/dist/nl-NL-D2QKudfh.js +30 -0
- package/dist/nl-NL-DVENFpd5.js +13 -0
- package/dist/{nl-NL-lZcJhRsP.js → nl-NL-DywVQ9km.js} +4 -1
- package/dist/nl-NL-G1wVnmzT.js +22 -0
- package/dist/{no-NO-BEIyAMmZ.js → no-NO-B8oxqfNI.js} +4 -1
- package/dist/no-NO-BTtAuqCb.js +22 -0
- package/dist/no-NO-C_snYWBc.js +30 -0
- package/dist/no-NO-Dn2UkdoI.js +13 -0
- package/dist/{no-NO-BQAqVzF4.js → no-NO-kaAdT9B8.js} +9 -2
- package/dist/{no-NO-C0sfkp82.js → no-NO-zSnPtrDi.js} +2 -4
- package/dist/{pt-PT-BsDCHbWN.js → pt-PT-BvK00TeI.js} +4 -1
- package/dist/pt-PT-C-hbNnsB.js +30 -0
- package/dist/{pt-PT-BY9rcwcF.js → pt-PT-CjsyP_OK.js} +2 -4
- package/dist/pt-PT-Dk48OVtf.js +22 -0
- package/dist/{pt-PT-CBbmkr_J.js → pt-PT-Xm-pm3mb.js} +9 -2
- package/dist/pt-PT-_o5xgnxS.js +13 -0
- package/dist/{resolveEnvironment-D0tYcn_s.js → resolveEnvironment-BGYn6Ls_.js} +3 -3
- package/dist/{rules-DXnRkeBJ.js → rules-DP3jxPzq.js} +5 -2
- package/dist/sl-SI-BB7iVcFI.js +22 -0
- package/dist/sl-SI-BhVTSmhQ.js +30 -0
- package/dist/{sl-SI-C8CMAkD0.js → sl-SI-Br0UEUPL.js} +2 -4
- package/dist/{sl-SI-BB0suyr1.js → sl-SI-D_rqR0D7.js} +9 -2
- package/dist/{sl-SI-BE_ndzZ2.js → sl-SI-NI2OJAvm.js} +4 -1
- package/dist/style.css +3226 -2972
- package/dist/styles-CLV89_hH.js +3226 -2972
- package/dist/sv-SE-66rqYTxi.js +30 -0
- package/dist/{sv-SE-DYruQSzt.js → sv-SE-B3zoXMuH.js} +9 -2
- package/dist/sv-SE-BUfESAQK.js +13 -0
- package/dist/{sv-SE-Bwh0wKFk.js → sv-SE-BtXmvxx4.js} +2 -4
- package/dist/{sv-SE-BryiIPVv.js → sv-SE-CAZpDX9G.js} +4 -1
- package/dist/sv-SE-DbI-1JqN.js +22 -0
- package/dist/translation-DJHWTow9.js +472 -0
- package/dist/types/api/configurations/useScenarios.d.ts +8 -7
- package/dist/types/api/idNowProvider/idNowProvider.types.d.ts +1 -1
- package/dist/types/api/idNowProvider/useIdNowProvider.d.ts +9 -5
- package/dist/types/api/industryCodes/industryCodes.types.d.ts +2 -0
- package/dist/types/api/industryCodes/useIndustryCodes.d.ts +6 -0
- package/dist/types/api/queryKeys.d.ts +2 -1
- package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +1 -0
- package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +3 -3
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +0 -9
- package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +0 -1
- package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +7 -1
- package/dist/types/components/Business/forms/rules.d.ts +1 -3
- package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +1 -2
- package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/ServiceAgreementDropin.d.ts +1 -1
- package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -0
- package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +0 -3
- package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +0 -1
- package/dist/types/components/EmbeddedDropins/AcceptTermsOfServiceComponent/AcceptTermsOfServiceComponent.d.ts +4 -3
- package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +0 -1
- package/dist/types/components/Individual/fields/NameFields/types.d.ts +4 -18
- package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
- package/dist/types/components/Individual/forms/Individual/Individual.d.ts +4 -0
- package/dist/types/components/Individual/forms/Individual/ProofOfRelationship/types.d.ts +0 -5
- package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +1 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/IdNowVerificationModal.d.ts +4 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +17 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +2 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/mapExtractionResultToSchema.d.ts +2 -1
- package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/validateExtractionResult.d.ts +12 -0
- package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +5 -3
- package/dist/types/components/Individual/helpers/bafinUtils.d.ts +35 -0
- package/dist/types/components/Individual/helpers/isDecisionMakerTask.d.ts +2 -0
- package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
- package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -1
- package/dist/types/components/Shared/SingpassBanner/ProviderButton/ProviderButton.d.ts +7 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +1 -1
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -5
- package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +4 -5
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/Trust.d.ts +1 -0
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +1 -2
- package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +2 -1
- package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +2 -1
- package/dist/types/components/ui/atoms/ActionsMenu/ActionsMenu.d.ts +2 -1
- package/dist/types/components/ui/atoms/Button/Button.types.d.ts +4 -5
- package/dist/types/components/ui/atoms/Image/Image.d.ts +18 -0
- package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +2 -1
- package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
- package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +0 -14
- package/dist/types/components/ui/atoms/RadioWithLabel/RadioWithLabel.d.ts +2 -1
- package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -1
- package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -0
- package/dist/types/components/ui/atoms/StepProgressIndicator/StepProgressIndicator.d.ts +2 -1
- package/dist/types/components/ui/atoms/StructuredList/StructuredList.d.ts +2 -1
- package/dist/types/components/ui/atoms/Svg/svgs.d.ts +0 -76
- package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +4 -4
- package/dist/types/components/ui/layout/DetailViewLayout/DetailViewLayout.d.ts +12 -0
- package/dist/types/components/ui/layout/EndStateLayout/EndStateLayout.d.ts +13 -0
- package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +8 -3
- package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +2 -1
- package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -3
- package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +2 -1
- package/dist/types/components/ui/molecules/InputEmail/InputEmail.d.ts +2 -1
- package/dist/types/components/ui/molecules/InputGroup/InputGroup.d.ts +2 -1
- package/dist/types/components/ui/molecules/InputTelephone/InputTelephone.d.ts +2 -1
- package/dist/types/components/ui/molecules/InputText/InputText.d.ts +2 -0
- package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +0 -1
- package/dist/types/components/ui/molecules/Tabs/Tabs.d.ts +1 -1
- package/dist/types/context/StateContext/types.d.ts +1 -1
- package/dist/types/core/models/api/accountIdentification.d.ts +5 -4
- package/dist/types/core/models/api/contracts.d.ts +1 -1
- package/dist/types/core/models/api/get-scenarios.d.ts +11 -5
- package/dist/types/core/models/api/individual.d.ts +5 -10
- package/dist/types/core/models/api/legal-arrangement.d.ts +0 -8
- package/dist/types/core/models/api/organization.d.ts +4 -8
- package/dist/types/core/models/api/scriptLocalization.d.ts +9 -0
- package/dist/types/core/process-field-configurations.d.ts +14 -3
- package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
- package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +1 -5
- package/dist/types/embeds/emitEvent.d.ts +14 -0
- package/dist/types/embeds/{individual → individual-configuration}/AdyenIndividual.d.ts +2 -2
- package/dist/types/embeds/{individual/adyen-individual.types.d.ts → individual-configuration/adyen-individual-configuration.types.d.ts} +2 -2
- package/dist/types/embeds/{manage-individual → individual-status}/AdyenManageIndividual.d.ts +3 -3
- package/dist/types/embeds/{manage-individual/adyen-manage-individual.types.d.ts → individual-status/adyen-individual-status.types.d.ts} +1 -1
- package/dist/types/embeds/{terms-of-service → terms-of-service-management}/AdyenTermsOfService.d.ts +2 -2
- package/dist/types/embeds/{terms-of-service/adyen-terms-of-service.types.d.ts → terms-of-service-management/adyen-terms-of-service-management.types.d.ts} +4 -3
- package/dist/types/embeds/{manage-terms-of-service → terms-of-service-status}/AdyenManageTermsOfService.d.ts +2 -2
- package/dist/types/embeds/{manage-terms-of-service → terms-of-service-status}/adyen-manage-terms-of-service.types.d.ts +1 -1
- package/dist/types/embeds/{transfer-instrument → transfer-instrument-configuration}/AdyenTransferInstrument.d.ts +2 -2
- package/dist/types/embeds/{transfer-instrument/adyen-transfer-instrument.types.d.ts → transfer-instrument-configuration/adyen-transfer-instrument-configuration.types.d.ts} +2 -2
- package/dist/types/embeds/{manage-transfer-instruments → transfer-instrument-management}/AdyenManageTransferInstrument.d.ts +5 -6
- package/dist/types/embeds/{manage-transfer-instruments/adyen-manage-transfer-instruments.types.d.ts → transfer-instrument-management/adyen-transfer-instrument-management.types.d.ts} +3 -4
- package/dist/types/embeds/verification-status/adyen-verification-status.types.d.ts +3 -3
- package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +2 -1
- package/dist/types/hooks/introduction/useShouldShowIntroduction.d.ts +2 -1
- package/dist/types/hooks/useMultiForm/types.d.ts +4 -4
- package/dist/types/language/utils.d.ts +1 -1
- package/dist/types/types/localizedScriptSchema.d.ts +22 -0
- package/dist/types/utils/addLinkedFields.d.ts +7 -1
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/types/utils/formUtils.d.ts +1 -1
- package/dist/types/utils/getDisplayErrorMessage.d.ts +1 -1
- package/dist/types/utils/getName.d.ts +2 -1
- package/dist/types/utils/makeSelectItemForRole.d.ts +1 -1
- package/dist/types/utils/mapScriptLocalization.d.ts +55 -0
- package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +5 -0
- package/dist/types/utils/translation.d.ts +6 -0
- package/dist/types-CAznNNSI.js +160 -0
- package/dist/types-CP1NRoE8.js +74 -0
- package/dist/types-K58FM7k4.js +64 -0
- package/dist/useAssociatedLegalEntity-G30FPhOX.js +33 -0
- package/dist/useDataset-BgvQQEKd.js +120 -0
- package/dist/useForm-C1DW3mPC.js +1694 -0
- package/dist/useFormContext-beqGS11A.js +23 -0
- package/dist/useGlobalData-jb7ua9I6.js +205 -0
- package/dist/{useMultiForm-CuBrV4Tk.js → useMultiForm-BucfLW49.js} +8 -3
- package/dist/{useOnboardingStatus-DUB9BH7M.js → useOnboardingStatus-CTgWLZxC.js} +2 -2
- package/dist/useScenarios-B7IWZ3xW.js +46 -0
- package/dist/{useTermsOfServiceStatus-BblV2n-A.js → useTermsOfServiceStatus-B0dIrYTA.js} +2 -2
- package/dist/useToastContext-DGMeMy5R.js +51 -0
- package/dist/useUnincorporatedPartnershipMembers-BCvmGMOX.js +99 -0
- package/dist/{utils-CoNP20Mi.js → utils-Bwnj33y_.js} +46 -4
- package/dist/utils-CXtNbmpA.js +29 -0
- package/dist/utils-CgOzbb9O.js +159 -0
- package/dist/utils-DNSfZiio.js +70 -0
- package/dist/{validate-BPEF-9EC.js → validate-B5PwC1oL.js} +2 -2
- package/dist/validate-BRz0LPdo.js +382 -0
- package/dist/validate-CvtamBXH.js +605 -0
- package/dist/validationError-DOCbfk7K.js +86 -0
- package/package.json +66 -69
- package/dist/BusinessDetailsDropin-JZ29P1pI.js +0 -2163
- package/dist/BusinessFinancingComponent-AAD0wzc0.js +0 -38
- package/dist/BusinessFinancingPage-DWvnRK3f.js +0 -35
- package/dist/CreateIndividualComponent-CO0NnimV.js +0 -64
- package/dist/CreateTransferInstrumentComponent-CpUB63yl.js +0 -55
- package/dist/DecisionMakerDetailsPage-DBsCSIAU.js +0 -80
- package/dist/FormEndState-s8NUp0x5.js +0 -59
- package/dist/ManageIndividualComponent-C5ll1EKq.js +0 -42
- package/dist/ManageTermsOfServiceComponent-BYgWiamd.js +0 -40
- package/dist/SignPCIComponent-Dgnvmjbr.js +0 -279
- package/dist/SoleProprietorshipPage-DMYrwSK2.js +0 -44
- package/dist/StoreProvider-QThALSrj.js +0 -31918
- package/dist/TrustMemberCompanyPage-DKNQ_vHF.js +0 -54
- package/dist/VerificationErrorAlert-BtsLa_Ty.js +0 -77
- package/dist/adyen-a-filled-czhSM_bc.js +0 -14
- package/dist/adyen-individual.js +0 -50
- package/dist/adyen-manage-individual.js +0 -48
- package/dist/adyen-manage-terms-of-service.js +0 -48
- package/dist/adyen-manage-transfer-instruments.js +0 -63
- package/dist/adyen-terms-of-service.js +0 -60
- package/dist/adyen-transfer-instrument.js +0 -64
- package/dist/arrow-left-Dtc2gya1.js +0 -14
- package/dist/bg-BG-9uVrFuHv.js +0 -23
- package/dist/bg-BG-BY3Wa361.js +0 -54
- package/dist/bg-BG-BiYtb1Tz.js +0 -55
- package/dist/bg-BG-BvSUDgGF.js +0 -13
- package/dist/bg-BG-CMomhopf.js +0 -35
- package/dist/bg-BG-Dy6-IwuZ.js +0 -28
- package/dist/bg-BG-NMIts2sa.js +0 -35
- package/dist/bg-BG-hFblesn-.js +0 -15
- package/dist/cs-CZ-B8IPRc47.js +0 -15
- package/dist/cs-CZ-BEFeaKsV.js +0 -54
- package/dist/cs-CZ-Csr_35T-.js +0 -35
- package/dist/cs-CZ-DMzortvO.js +0 -35
- package/dist/cs-CZ-Dbow28-o.js +0 -28
- package/dist/cs-CZ-Wzc382q6.js +0 -23
- package/dist/cs-CZ-wdftovLe.js +0 -55
- package/dist/cs-CZ-y4mvq4Lv.js +0 -13
- package/dist/da-DK-qgQOVjDp.js +0 -13
- package/dist/de-DE-pSdsxBpQ.js +0 -13
- package/dist/document-plus-NwgAdjyB.js +0 -17
- package/dist/el-GR-B5j7VZ3E.js +0 -54
- package/dist/el-GR-Bvjk5Sw8.js +0 -13
- package/dist/el-GR-CGeBAkDN.js +0 -35
- package/dist/el-GR-CXmTklMq.js +0 -55
- package/dist/el-GR-Cu9HwD-f.js +0 -15
- package/dist/el-GR-DGW388LZ.js +0 -35
- package/dist/el-GR-DerT143K.js +0 -28
- package/dist/el-GR-DfNOPkLq.js +0 -23
- package/dist/en-US-Bq2Twy6x.js +0 -54
- package/dist/es-ES-Dy1uR2H_.js +0 -13
- package/dist/et-EE-BJIsPOnh.js +0 -23
- package/dist/et-EE-CFlzRBEx.js +0 -55
- package/dist/et-EE-D5lRJbMZ.js +0 -35
- package/dist/et-EE-DUWZ2Vqm.js +0 -54
- package/dist/et-EE-Dor3enPS.js +0 -15
- package/dist/et-EE-OJg_PSHf.js +0 -28
- package/dist/et-EE-QLVnr6Vl.js +0 -35
- package/dist/et-EE-d9V24rcf.js +0 -13
- package/dist/fi-FI-B0fnAFV2.js +0 -13
- package/dist/fr-FR-BoKzVp2q.js +0 -13
- package/dist/getFieldsWithExistingData-CUMH8N-C.js +0 -22
- package/dist/hide-CigAXbWC.js +0 -18
- package/dist/hr-HR-B8AZ4eHJ.js +0 -35
- package/dist/hr-HR-CDUE36Dg.js +0 -28
- package/dist/hr-HR-CF0AHQzi.js +0 -13
- package/dist/hr-HR-CnP5sqih.js +0 -54
- package/dist/hr-HR-CzSrqEFA.js +0 -35
- package/dist/hr-HR-DTCY4iL8.js +0 -55
- package/dist/hr-HR-DzS44Gpv.js +0 -23
- package/dist/hu-HU-BSOiZA7a.js +0 -15
- package/dist/hu-HU-BTlpbCpc.js +0 -54
- package/dist/hu-HU-Bmf13NMf.js +0 -28
- package/dist/hu-HU-BznXPoc2.js +0 -55
- package/dist/hu-HU-CSPhOvLC.js +0 -13
- package/dist/hu-HU-DRi6Dz9U.js +0 -35
- package/dist/hu-HU-xCvNM5TU.js +0 -23
- package/dist/hu-HU-zK6nUqWr.js +0 -35
- package/dist/idea-DwJIwJHR.js +0 -18
- package/dist/instant-verification-method-BGfknV9x.js +0 -28
- package/dist/it-IT-BH-eqIKH.js +0 -13
- package/dist/ja-JP-B3yqM_FM.js +0 -13
- package/dist/ja-JP-BUz3qN-V.js +0 -23
- package/dist/ja-JP-BhS-_dIx.js +0 -54
- package/dist/ja-JP-C1OQ16fo.js +0 -35
- package/dist/ja-JP-D7oL6xGY.js +0 -55
- package/dist/ja-JP-GXkLvnQ4.js +0 -15
- package/dist/ja-JP-tx1DbZYD.js +0 -28
- package/dist/ja-JP-weDU8GLW.js +0 -35
- package/dist/lt-LT-B6CJ4ULI.js +0 -23
- package/dist/lt-LT-BUYY0LaT.js +0 -35
- package/dist/lt-LT-BxScCodJ.js +0 -28
- package/dist/lt-LT-DNjXmQPv.js +0 -15
- package/dist/lt-LT-DTQGR9M0.js +0 -54
- package/dist/lt-LT-De7dLXxI.js +0 -55
- package/dist/lt-LT-Lzl_Cbw-.js +0 -13
- package/dist/lt-LT-_MzAcXJo.js +0 -35
- package/dist/lv-LV-B9js9VoA.js +0 -35
- package/dist/lv-LV-BQ4F1GrV.js +0 -54
- package/dist/lv-LV-CRhXAjn6.js +0 -35
- package/dist/lv-LV-ChOoZuhc.js +0 -15
- package/dist/lv-LV-DTtuyfHS.js +0 -23
- package/dist/lv-LV-De9rdme0.js +0 -55
- package/dist/lv-LV-F9_Fiu3w.js +0 -28
- package/dist/lv-LV-y00wN1pj.js +0 -13
- package/dist/mapFinancialReportsToFinancialInformation-Bo2uW3j7.js +0 -66
- package/dist/nl-NL-DmnFXAQC.js +0 -13
- package/dist/no-NO-DbvFfP96.js +0 -13
- package/dist/pl-PL--mmxopYA.js +0 -13
- package/dist/pl-PL-1ylK-_FE.js +0 -35
- package/dist/pl-PL-CqxMKpBm.js +0 -28
- package/dist/pl-PL-D6heiKsH.js +0 -15
- package/dist/pl-PL-DAPGaxWi.js +0 -35
- package/dist/pl-PL-DD3wVcKc.js +0 -55
- package/dist/pl-PL-T6uD5--R.js +0 -23
- package/dist/pl-PL-kGaeUP-w.js +0 -54
- package/dist/plus-small-Dj1WRyFM.js +0 -14
- package/dist/pt-PT-BVzXBFp7.js +0 -13
- package/dist/ro-RO-C83h2zHZ.js +0 -54
- package/dist/ro-RO-CUg8-CQ8.js +0 -55
- package/dist/ro-RO-Cdmevo9A.js +0 -13
- package/dist/ro-RO-DJLWmWZ4.js +0 -35
- package/dist/ro-RO-DL9V1CMj.js +0 -15
- package/dist/ro-RO-Dfx0g3bU.js +0 -35
- package/dist/ro-RO-IY3AMhwm.js +0 -28
- package/dist/ro-RO-Ic1SzBgx.js +0 -23
- package/dist/ru-RU-FZb2upqh.js +0 -13
- package/dist/sk-SK-B7o3L57C.js +0 -35
- package/dist/sk-SK-BDKRZ2mM.js +0 -28
- package/dist/sk-SK-BSioQTMW.js +0 -15
- package/dist/sk-SK-CgLJIuJw.js +0 -54
- package/dist/sk-SK-CiD0FeLN.js +0 -23
- package/dist/sk-SK-Cjrkrb85.js +0 -55
- package/dist/sk-SK-iO863_t2.js +0 -35
- package/dist/sk-SK-nfeuTcY5.js +0 -13
- package/dist/sl-SI-DUTZDqkP.js +0 -13
- package/dist/sv-SE-BTx2XKAp.js +0 -13
- package/dist/types/components/Individual/mapping/mapLocalization.d.ts +0 -3
- package/dist/types/components/ui/atoms/OutlinedIcon/OutlinedIcon.d.ts +0 -5
- package/dist/types/components/ui/atoms/ProviderButton/ProviderButton.d.ts +0 -3
- package/dist/types/components/ui/atoms/ProviderButton/ProviderButton.types.d.ts +0 -5
- package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -2
- package/dist/types/components/ui/molecules/FormEndState/types.d.ts +0 -8
- package/dist/useUpdateLegalEntity-56mDjaQA.js +0 -57
- package/dist/validate-Bgc1XuQl.js +0 -40
- package/dist/zh-CN-wUb4MmTZ.js +0 -13
- package/dist/zh-TW-DNTXHLKa.js +0 -13
- /package/dist/types/embeds/{individual/adyen-individual.d.ts → individual-configuration/adyen-individual-configuration.d.ts} +0 -0
- /package/dist/types/embeds/{manage-individual/adyen-manage-individual.d.ts → individual-status/adyen-individual-status.d.ts} +0 -0
- /package/dist/types/embeds/{manage-terms-of-service/adyen-manage-terms-of-service.d.ts → terms-of-service-management/adyen-terms-of-service-management.d.ts} +0 -0
- /package/dist/types/embeds/{manage-transfer-instruments/adyen-manage-transfer-instruments.d.ts → terms-of-service-status/adyen-terms-of-service-status.d.ts} +0 -0
- /package/dist/types/embeds/{terms-of-service/adyen-terms-of-service.d.ts → transfer-instrument-configuration/adyen-transfer-instrument-configuration.d.ts} +0 -0
- /package/dist/types/embeds/{transfer-instrument/adyen-transfer-instrument.d.ts → transfer-instrument-management/adyen-transfer-instrument-management.d.ts} +0 -0
|
@@ -0,0 +1,2334 @@
|
|
|
1
|
+
;
|
|
2
|
+
{
|
|
3
|
+
try {
|
|
4
|
+
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4943e5bf-29ec-4a2d-9987-5a58715d3a0d", e._sentryDebugIdIdentifier = "sentry-dbid-4943e5bf-29ec-4a2d-9987-5a58715d3a0d");
|
|
6
|
+
} catch (e) {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
;
|
|
10
|
+
import { jsxs, jsx, Fragment } from "preact/jsx-runtime";
|
|
11
|
+
import { memo } from "preact/compat";
|
|
12
|
+
import { af as objectsDeepEqual, a as useTranslation, y as LegalEntityTypes, a8 as CountryCodes, X as useExperimentsContext } from "./StoreProvider-BlaJzXSZ.js";
|
|
13
|
+
import { M as MemoizedDocumentUpload, k as getCompanyRegistrationNumberOptions, s as stateFormatGuidanceText, m as businessRegistrationNumberMasks, n as businessRegistrationNumberPatterns, v as vatNumberOptions, o as getVatNumberOptions } from "./TaxInformationField-DS0m73if.js";
|
|
14
|
+
import { F as Field, C as Checkbox, a as useForm } from "./useForm-C1DW3mPC.js";
|
|
15
|
+
import { m as makeMask, n as numericInputs, s as spacer, M as MaskedInput, a as nonInputs, b as alphaInputs, d as alphanumericInputs } from "./MaskedInput-BZ7t98eu.js";
|
|
16
|
+
import { useMemo, useCallback, useEffect, useRef } from "preact/hooks";
|
|
17
|
+
import { R as RadioGroup } from "./RadioGroup-CYDXrtrO.js";
|
|
18
|
+
import { C as CompanyTypesValues } from "./bafinUtils-Bar3qiJA.js";
|
|
19
|
+
import { f as validatePatternOnBlur, c as validateNotEmptyOnBlur, C as ContextGuidance } from "./fieldConfigurations-B8bDFQ53.js";
|
|
20
|
+
import { I as InputText } from "./InputText-BX5sG9WJ.js";
|
|
21
|
+
import { u as uppercase } from "./mapExistingFile-DW5ktJzM.js";
|
|
22
|
+
import { createElement } from "preact";
|
|
23
|
+
import { f as getFormProps, F as FormHeader, E as ErrorPanel, c as createFormUtils } from "./CountryField-D0YZrov9.js";
|
|
24
|
+
import { S as StateContextSetter } from "./validate-CvtamBXH.js";
|
|
25
|
+
import { o as operationalAddressIsSameIds, A as Address, h as operationalAddressIsSameItems } from "./Address-DSwfzWFu.js";
|
|
26
|
+
const ConstitutionalDocumentTypes = {
|
|
27
|
+
BUSINESS_NAME_FILING: "doingBusinessAsNameFiling",
|
|
28
|
+
TAX_FILING: "taxFiling",
|
|
29
|
+
EMPLOYER_IDENTIFICATION_NUMBER_VERIFICATION_LETTER: "einVerificationLetter",
|
|
30
|
+
BUSINESS_REGISTRATION_DOCUMENT: "businessRegistrationDocument",
|
|
31
|
+
TRUST_DEED: "trustDeed",
|
|
32
|
+
TRUST_INSTRUMENT: "trustInstrument",
|
|
33
|
+
PARTNERSHIP_AGREEMENT: "partnershipAgreement",
|
|
34
|
+
MEETING_MINUTES: "meetingMinutes"
|
|
35
|
+
};
|
|
36
|
+
const getConstitutionDocumentTypeOptionsMapping = (legalEntityType, country) => {
|
|
37
|
+
switch (legalEntityType) {
|
|
38
|
+
case LegalEntityTypes.SOLE_PROPRIETORSHIP:
|
|
39
|
+
switch (country) {
|
|
40
|
+
case "FR":
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
id: ConstitutionalDocumentTypes.BUSINESS_NAME_FILING,
|
|
44
|
+
name: "doingBusinessAsNameFiling__FR"
|
|
45
|
+
},
|
|
46
|
+
{ id: ConstitutionalDocumentTypes.TAX_FILING, name: "taxFiling" },
|
|
47
|
+
{
|
|
48
|
+
id: ConstitutionalDocumentTypes.BUSINESS_REGISTRATION_DOCUMENT,
|
|
49
|
+
name: "businessRegistrationDocument__FR"
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
case "US":
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
id: ConstitutionalDocumentTypes.BUSINESS_NAME_FILING,
|
|
56
|
+
name: "doingBusinessAsNameFiling__US"
|
|
57
|
+
},
|
|
58
|
+
{ id: ConstitutionalDocumentTypes.TAX_FILING, name: "taxFiling__US" },
|
|
59
|
+
{
|
|
60
|
+
id: ConstitutionalDocumentTypes.EMPLOYER_IDENTIFICATION_NUMBER_VERIFICATION_LETTER,
|
|
61
|
+
name: "einVerificationLetter"
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
default:
|
|
65
|
+
return [
|
|
66
|
+
{
|
|
67
|
+
id: ConstitutionalDocumentTypes.BUSINESS_NAME_FILING,
|
|
68
|
+
name: "doingBusinessAsNameFiling"
|
|
69
|
+
},
|
|
70
|
+
{ id: ConstitutionalDocumentTypes.TAX_FILING, name: "taxFiling" }
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
id: ConstitutionalDocumentTypes.PARTNERSHIP_AGREEMENT,
|
|
77
|
+
name: "partnershipAgreement"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: ConstitutionalDocumentTypes.MEETING_MINUTES,
|
|
81
|
+
name: "meetingMinutes"
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
default:
|
|
85
|
+
return [
|
|
86
|
+
{ id: ConstitutionalDocumentTypes.TRUST_DEED, name: "trustDeed" },
|
|
87
|
+
{ id: ConstitutionalDocumentTypes.TRUST_INSTRUMENT, name: "trustInstrument" }
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
function getLegalEntityTypeBasedConstitutionalDocumentHeaderDescriptionTranslationkey(legalEntityType) {
|
|
92
|
+
switch (legalEntityType) {
|
|
93
|
+
case LegalEntityTypes.SOLE_PROPRIETORSHIP:
|
|
94
|
+
return "constitutionalDocumentSoleProprietorshipHeaderDescription";
|
|
95
|
+
case LegalEntityTypes.TRUST:
|
|
96
|
+
return "constitutionalDocumentTrustHeaderDescription";
|
|
97
|
+
case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP:
|
|
98
|
+
return "constitutionalDocumentUnincorporatedPartnershipDescription";
|
|
99
|
+
default:
|
|
100
|
+
return "constitutionalDocumentHeaderDescription";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const unincorporatedPartnershipRequirementsVariants = ["Name", "Details", "UpToDate"];
|
|
104
|
+
function ConstitutionalDocumentUpload({
|
|
105
|
+
id,
|
|
106
|
+
legalEntityType,
|
|
107
|
+
...props
|
|
108
|
+
}) {
|
|
109
|
+
const { t } = useTranslation("common");
|
|
110
|
+
const isUnincorporatedPartnership = legalEntityType === LegalEntityTypes.UNINCORPORATED_PARTNERSHIP;
|
|
111
|
+
const constitutionalDocumentRequirements = getConstitutionDocumentTypeOptionsMapping(
|
|
112
|
+
legalEntityType,
|
|
113
|
+
props.country
|
|
114
|
+
);
|
|
115
|
+
const guidanceContent = /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__guidance adyen-kyc-u-margin-bottom-24", children: [
|
|
116
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["uploadOneOfTheseDocuments"]) }),
|
|
117
|
+
/* @__PURE__ */ jsx("ul", { children: constitutionalDocumentRequirements?.map(({ name }, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[name]) }, i)) }),
|
|
118
|
+
isUnincorporatedPartnership && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
119
|
+
/* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"]) }),
|
|
120
|
+
/* @__PURE__ */ jsx("ul", { children: unincorporatedPartnershipRequirementsVariants.map((item, i) => /* @__PURE__ */ jsx("li", { children: t(
|
|
121
|
+
($) => $[`documentRequirementsUnincorporatedPartnership${item}`]
|
|
122
|
+
) }, i)) })
|
|
123
|
+
] }),
|
|
124
|
+
props.country !== "US" && !isUnincorporatedPartnership && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-y-16", children: /* @__PURE__ */ jsxs("span", { children: [
|
|
125
|
+
t(($) => $["infoInUploadedDocumentIsTrue"]),
|
|
126
|
+
" "
|
|
127
|
+
] }) })
|
|
128
|
+
] });
|
|
129
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
130
|
+
MemoizedDocumentUpload,
|
|
131
|
+
{
|
|
132
|
+
...props,
|
|
133
|
+
documentType: "constitutionalDocument",
|
|
134
|
+
documentField: "constitutionalDocument",
|
|
135
|
+
heading: t(($) => $["constitutionalDocumentHeader"]),
|
|
136
|
+
description: t(
|
|
137
|
+
($) => $[getLegalEntityTypeBasedConstitutionalDocumentHeaderDescriptionTranslationkey(
|
|
138
|
+
legalEntityType
|
|
139
|
+
)]
|
|
140
|
+
),
|
|
141
|
+
guidanceContent,
|
|
142
|
+
id,
|
|
143
|
+
hidePageCount: true
|
|
144
|
+
}
|
|
145
|
+
) });
|
|
146
|
+
}
|
|
147
|
+
const MemoizedConstitutionalDocument = memo(
|
|
148
|
+
ConstitutionalDocumentUpload,
|
|
149
|
+
(prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.shouldValidate === nextProps.shouldValidate
|
|
150
|
+
);
|
|
151
|
+
function CompanyRegistrationNumberTypeSelector({
|
|
152
|
+
country,
|
|
153
|
+
companyType,
|
|
154
|
+
selected,
|
|
155
|
+
setSelected,
|
|
156
|
+
exemptedOption
|
|
157
|
+
}) {
|
|
158
|
+
const { t } = useTranslation("common");
|
|
159
|
+
const options = useMemo(() => {
|
|
160
|
+
const availableOptions = getCompanyRegistrationNumberOptions(country, companyType) ?? [];
|
|
161
|
+
if (availableOptions.length === 0 || !exemptedOption) return availableOptions;
|
|
162
|
+
return [
|
|
163
|
+
...availableOptions,
|
|
164
|
+
{
|
|
165
|
+
id: "exempted",
|
|
166
|
+
name: exemptedOption
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
}, [companyType, country, exemptedOption]);
|
|
170
|
+
const handleSelect = useCallback(
|
|
171
|
+
(selectedStr) => {
|
|
172
|
+
const newSelected = selectedStr;
|
|
173
|
+
if (newSelected === "exempted") {
|
|
174
|
+
if (exemptedOption) {
|
|
175
|
+
setSelected(newSelected);
|
|
176
|
+
}
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setSelected(newSelected);
|
|
180
|
+
},
|
|
181
|
+
[exemptedOption, setSelected]
|
|
182
|
+
);
|
|
183
|
+
useEffect(() => {
|
|
184
|
+
if (options.length > 0 && (!selected || !options.some((option) => option.id === selected))) {
|
|
185
|
+
if (selected === "exempted") return;
|
|
186
|
+
setSelected(options[0].id);
|
|
187
|
+
}
|
|
188
|
+
}, [options, selected, setSelected]);
|
|
189
|
+
if (options.length <= 1) return null;
|
|
190
|
+
return /* @__PURE__ */ jsx(
|
|
191
|
+
Field,
|
|
192
|
+
{
|
|
193
|
+
el: "fieldset",
|
|
194
|
+
name: "companyRegistrationNumberType",
|
|
195
|
+
label: t(($) => $["whichTypeOfRegistrationNumberDoYouHave"]),
|
|
196
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
197
|
+
RadioGroup,
|
|
198
|
+
{
|
|
199
|
+
...childProps,
|
|
200
|
+
name: "companyRegistrationNumberType",
|
|
201
|
+
items: options,
|
|
202
|
+
value: selected,
|
|
203
|
+
onChange: handleSelect
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
const registrationNumberDefaultFieldMetadata = {
|
|
210
|
+
label: "registrationNumber"
|
|
211
|
+
};
|
|
212
|
+
const registrationNumberDefaultFieldConfig = {
|
|
213
|
+
[CountryCodes.Australia]: ({ companyType }) => {
|
|
214
|
+
if (companyType === CompanyTypesValues.INCORPORATED_ASSOCIATION) {
|
|
215
|
+
return {
|
|
216
|
+
label: "incorporatedAssociationRegistrationNumber",
|
|
217
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Australia].associationIncorporated,
|
|
218
|
+
validators: validatePatternOnBlur(
|
|
219
|
+
businessRegistrationNumberPatterns[CountryCodes.Australia].associationIncorporated
|
|
220
|
+
),
|
|
221
|
+
helperText: "findYourIncorporatedAssociationNumberInThePublicRegistryForYourState",
|
|
222
|
+
guidanceText: {
|
|
223
|
+
key: "enterXToYCharactersForExample",
|
|
224
|
+
values: {
|
|
225
|
+
minChars: "3",
|
|
226
|
+
maxChars: "20",
|
|
227
|
+
example: "200312345A"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
label: "australianBusinessNumberAcn",
|
|
234
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Australia].default,
|
|
235
|
+
validators: validatePatternOnBlur(
|
|
236
|
+
businessRegistrationNumberPatterns[CountryCodes.Australia].default
|
|
237
|
+
),
|
|
238
|
+
guidanceText: {
|
|
239
|
+
key: "enterNDigitsForExample",
|
|
240
|
+
values: {
|
|
241
|
+
numDigits: "9",
|
|
242
|
+
example: "123 456 789"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
[CountryCodes.Austria]: ({ registrationNumberType }) => registrationNumberType === "ZVR" ? {
|
|
248
|
+
label: "zentralesVereinsregisterId",
|
|
249
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Austria].ZVR,
|
|
250
|
+
validators: validatePatternOnBlur(
|
|
251
|
+
businessRegistrationNumberPatterns[CountryCodes.Austria].ZVR
|
|
252
|
+
),
|
|
253
|
+
guidanceText: {
|
|
254
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
255
|
+
values: {
|
|
256
|
+
numDigits: "9-10",
|
|
257
|
+
example: "AT-ZVR-555769679"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
} : {
|
|
261
|
+
label: "firmenbuchnummer",
|
|
262
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Austria].firmenbuchnummer,
|
|
263
|
+
validators: validatePatternOnBlur(
|
|
264
|
+
businessRegistrationNumberPatterns[CountryCodes.Austria].firmenbuchnummer
|
|
265
|
+
),
|
|
266
|
+
guidanceText: {
|
|
267
|
+
key: "enterAMaximumOfNCharactersWithAMixForExample",
|
|
268
|
+
values: {
|
|
269
|
+
maxChars: "9",
|
|
270
|
+
example: "T1001a, FN89060n"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
[CountryCodes.Belgium]: {
|
|
275
|
+
label: "enterpriseNumber",
|
|
276
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Belgium].default,
|
|
277
|
+
validators: validatePatternOnBlur(
|
|
278
|
+
businessRegistrationNumberPatterns[CountryCodes.Belgium].default
|
|
279
|
+
),
|
|
280
|
+
guidanceText: {
|
|
281
|
+
key: "enterNDigitsForExample",
|
|
282
|
+
values: {
|
|
283
|
+
numDigits: "10",
|
|
284
|
+
example: "1234567890"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
[CountryCodes.Brazil]: {
|
|
289
|
+
label: "CNPJ",
|
|
290
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Brazil].default,
|
|
291
|
+
validators: validatePatternOnBlur(
|
|
292
|
+
businessRegistrationNumberPatterns[CountryCodes.Brazil].default
|
|
293
|
+
),
|
|
294
|
+
guidanceText: {
|
|
295
|
+
key: "enterNDigitsForExample",
|
|
296
|
+
values: {
|
|
297
|
+
numDigits: "14",
|
|
298
|
+
example: "28.773.626/8318-21"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
[CountryCodes.Bulgaria]: {
|
|
303
|
+
label: "uniqueIdentificationCode",
|
|
304
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Bulgaria].default,
|
|
305
|
+
validators: validatePatternOnBlur(
|
|
306
|
+
businessRegistrationNumberPatterns[CountryCodes.Bulgaria].default
|
|
307
|
+
),
|
|
308
|
+
guidanceText: {
|
|
309
|
+
key: "enterNDigitsForExample",
|
|
310
|
+
values: {
|
|
311
|
+
numDigits: "9",
|
|
312
|
+
example: "812114069"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
[CountryCodes.Canada]: {
|
|
317
|
+
label: "businessIncorporationNumber",
|
|
318
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Canada].default,
|
|
319
|
+
validators: validatePatternOnBlur(
|
|
320
|
+
businessRegistrationNumberPatterns[CountryCodes.Canada].default
|
|
321
|
+
),
|
|
322
|
+
guidanceText: {
|
|
323
|
+
key: "enterXToYCharactersForExample",
|
|
324
|
+
values: {
|
|
325
|
+
minChars: "5",
|
|
326
|
+
maxChars: "10",
|
|
327
|
+
example: "BC1234567"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
[CountryCodes.Croatia]: ({ companyType }) => {
|
|
332
|
+
switch (companyType) {
|
|
333
|
+
case CompanyTypesValues.SOLE_PROPRIETORSHIP:
|
|
334
|
+
return {
|
|
335
|
+
label: "MBO",
|
|
336
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Croatia].soleProprietorship,
|
|
337
|
+
validators: validatePatternOnBlur(
|
|
338
|
+
businessRegistrationNumberPatterns[CountryCodes.Croatia].soleProprietorship
|
|
339
|
+
),
|
|
340
|
+
guidanceText: {
|
|
341
|
+
key: "enterNDigitsForExample",
|
|
342
|
+
values: {
|
|
343
|
+
numDigits: "8",
|
|
344
|
+
example: "12345678"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
default:
|
|
349
|
+
return {
|
|
350
|
+
label: "MBS",
|
|
351
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Croatia].default,
|
|
352
|
+
validators: validatePatternOnBlur(
|
|
353
|
+
businessRegistrationNumberPatterns[CountryCodes.Croatia].default
|
|
354
|
+
),
|
|
355
|
+
guidanceText: {
|
|
356
|
+
key: "enterNDigitsForExample",
|
|
357
|
+
values: {
|
|
358
|
+
numDigits: "9",
|
|
359
|
+
example: "080020970"
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
[CountryCodes.Cyprus]: {
|
|
366
|
+
label: "cyRegistrationNumber",
|
|
367
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Cyprus].default,
|
|
368
|
+
validators: validatePatternOnBlur(
|
|
369
|
+
businessRegistrationNumberPatterns[CountryCodes.Cyprus].default
|
|
370
|
+
),
|
|
371
|
+
guidanceText: {
|
|
372
|
+
key: "enterEnglishLetterFollowedByXtoYDigitsForExample",
|
|
373
|
+
values: {
|
|
374
|
+
minDigits: "1",
|
|
375
|
+
maxDigits: "8",
|
|
376
|
+
example: "C12345678"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
[CountryCodes.CzechRepublic]: {
|
|
381
|
+
label: "ICO",
|
|
382
|
+
mask: businessRegistrationNumberMasks[CountryCodes.CzechRepublic].default,
|
|
383
|
+
validators: validatePatternOnBlur(
|
|
384
|
+
businessRegistrationNumberPatterns[CountryCodes.CzechRepublic].default
|
|
385
|
+
),
|
|
386
|
+
guidanceText: {
|
|
387
|
+
key: "enterXToYDigitsForExample",
|
|
388
|
+
values: {
|
|
389
|
+
minDigits: "8",
|
|
390
|
+
maxDigits: "10",
|
|
391
|
+
example: "12345678"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
[CountryCodes.Denmark]: {
|
|
396
|
+
label: "CVR-nummer",
|
|
397
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Denmark].default,
|
|
398
|
+
validators: validatePatternOnBlur(
|
|
399
|
+
businessRegistrationNumberPatterns[CountryCodes.Denmark].default
|
|
400
|
+
),
|
|
401
|
+
guidanceText: {
|
|
402
|
+
key: "enterNDigitsForExample",
|
|
403
|
+
values: {
|
|
404
|
+
numDigits: "8",
|
|
405
|
+
example: "22756214"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
[CountryCodes.Estonia]: {
|
|
410
|
+
label: "registrikood",
|
|
411
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Estonia].default,
|
|
412
|
+
validators: validatePatternOnBlur(
|
|
413
|
+
businessRegistrationNumberPatterns[CountryCodes.Estonia].default
|
|
414
|
+
),
|
|
415
|
+
guidanceText: {
|
|
416
|
+
key: "enterNDigitsForExample",
|
|
417
|
+
values: {
|
|
418
|
+
numDigits: "8",
|
|
419
|
+
example: "10345833"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
[CountryCodes.Finland]: {
|
|
424
|
+
label: "YTunnus",
|
|
425
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Finland].default,
|
|
426
|
+
validators: validatePatternOnBlur(
|
|
427
|
+
businessRegistrationNumberPatterns[CountryCodes.Finland].default
|
|
428
|
+
),
|
|
429
|
+
guidanceText: {
|
|
430
|
+
key: "enterNDigitsForExample",
|
|
431
|
+
values: {
|
|
432
|
+
numDigits: "8",
|
|
433
|
+
example: "1234567-8"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
[CountryCodes.France]: ({ registrationNumberType }) => registrationNumberType === "RNA" ? {
|
|
438
|
+
label: "rnaNumber",
|
|
439
|
+
mask: businessRegistrationNumberMasks[CountryCodes.France].RNA,
|
|
440
|
+
validators: validatePatternOnBlur(
|
|
441
|
+
businessRegistrationNumberPatterns[CountryCodes.France].RNA
|
|
442
|
+
),
|
|
443
|
+
guidanceText: {
|
|
444
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
445
|
+
values: {
|
|
446
|
+
numDigits: "9",
|
|
447
|
+
example: "W123456789 or W9M1234567"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
} : {
|
|
451
|
+
label: "siret",
|
|
452
|
+
mask: businessRegistrationNumberMasks[CountryCodes.France].SIRET,
|
|
453
|
+
validators: validatePatternOnBlur(
|
|
454
|
+
businessRegistrationNumberPatterns[CountryCodes.France].SIRET
|
|
455
|
+
),
|
|
456
|
+
guidanceText: {
|
|
457
|
+
key: "enterNDigitsForExample",
|
|
458
|
+
values: {
|
|
459
|
+
numDigits: "14",
|
|
460
|
+
example: "542051180-00066"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
[CountryCodes.Germany]: {
|
|
465
|
+
label: "handelsregisternummerOrVereinsregisternummer",
|
|
466
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Germany].default,
|
|
467
|
+
validators: validatePatternOnBlur(
|
|
468
|
+
businessRegistrationNumberPatterns[CountryCodes.Germany].default
|
|
469
|
+
),
|
|
470
|
+
guidanceText: {
|
|
471
|
+
key: "enterAMaximumOfNCharactersWithAMixForExample",
|
|
472
|
+
values: {
|
|
473
|
+
maxChars: "20",
|
|
474
|
+
example: "HRB100484, HRA123456ABCDE-A1234, VR350378A"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
[CountryCodes.Gibraltar]: {
|
|
479
|
+
label: "companyRegistrationNumber",
|
|
480
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Gibraltar].default,
|
|
481
|
+
validators: validatePatternOnBlur(
|
|
482
|
+
businessRegistrationNumberPatterns[CountryCodes.Gibraltar].default
|
|
483
|
+
),
|
|
484
|
+
guidanceText: {
|
|
485
|
+
key: "enterAMaximumOfNCharactersForExample",
|
|
486
|
+
values: {
|
|
487
|
+
maxChars: "8",
|
|
488
|
+
example: "04366849"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
[CountryCodes.Greece]: {
|
|
493
|
+
label: "GEMI-number",
|
|
494
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Greece].default,
|
|
495
|
+
validators: validatePatternOnBlur(
|
|
496
|
+
businessRegistrationNumberPatterns[CountryCodes.Greece].default
|
|
497
|
+
),
|
|
498
|
+
guidanceText: {
|
|
499
|
+
key: "enterNDigitsForExample",
|
|
500
|
+
values: {
|
|
501
|
+
numDigits: "12",
|
|
502
|
+
example: "757001000000"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
[CountryCodes.Guernsey]: {
|
|
507
|
+
label: "registrationNumber",
|
|
508
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Guernsey].default,
|
|
509
|
+
validators: validatePatternOnBlur(
|
|
510
|
+
businessRegistrationNumberPatterns[CountryCodes.Guernsey].default
|
|
511
|
+
),
|
|
512
|
+
guidanceText: {
|
|
513
|
+
key: "enterAMaximumOfNDigitsForExample",
|
|
514
|
+
values: {
|
|
515
|
+
maxDigits: "9",
|
|
516
|
+
example: "123456"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
[CountryCodes.HongKong]: {
|
|
521
|
+
label: "companyRegistrationNumber__HK",
|
|
522
|
+
mask: businessRegistrationNumberMasks[CountryCodes.HongKong].default,
|
|
523
|
+
validators: validatePatternOnBlur(
|
|
524
|
+
businessRegistrationNumberPatterns[CountryCodes.HongKong].default
|
|
525
|
+
),
|
|
526
|
+
guidanceText: {
|
|
527
|
+
key: "enterNDigitsForExample",
|
|
528
|
+
values: {
|
|
529
|
+
numDigits: "7",
|
|
530
|
+
example: "1234567"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
[CountryCodes.Hungary]: ({ companyType }) => {
|
|
535
|
+
if (companyType === CompanyTypesValues.SOLE_PROPRIETORSHIP) {
|
|
536
|
+
return {
|
|
537
|
+
label: "huRegistrationNumberForSoleProp",
|
|
538
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Hungary].nyilvantartasiSzam,
|
|
539
|
+
validators: validatePatternOnBlur(
|
|
540
|
+
businessRegistrationNumberPatterns[CountryCodes.Hungary].nyilvantartasiSzam
|
|
541
|
+
),
|
|
542
|
+
guidanceText: {
|
|
543
|
+
key: "enterXToYDigitsForExample",
|
|
544
|
+
values: {
|
|
545
|
+
minDigits: "7",
|
|
546
|
+
maxDigits: "10",
|
|
547
|
+
example: "06123456"
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
return {
|
|
553
|
+
label: "huRegistrationNumber",
|
|
554
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Hungary].default,
|
|
555
|
+
validators: validatePatternOnBlur(
|
|
556
|
+
businessRegistrationNumberPatterns[CountryCodes.Hungary].default
|
|
557
|
+
),
|
|
558
|
+
guidanceText: {
|
|
559
|
+
key: "enterNDigitsForExample",
|
|
560
|
+
values: {
|
|
561
|
+
numDigits: "10",
|
|
562
|
+
example: "06-12-345678"
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
},
|
|
567
|
+
[CountryCodes.Ireland]: {
|
|
568
|
+
label: "companyNumber",
|
|
569
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Ireland].default,
|
|
570
|
+
validators: validatePatternOnBlur(
|
|
571
|
+
businessRegistrationNumberPatterns[CountryCodes.Ireland].default
|
|
572
|
+
),
|
|
573
|
+
guidanceText: {
|
|
574
|
+
key: "enterAMaximumOfNDigitsForExample",
|
|
575
|
+
values: {
|
|
576
|
+
maxDigits: "8",
|
|
577
|
+
example: "10123456"
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
[CountryCodes.IsleOfMan]: {
|
|
582
|
+
label: "registrationNumber",
|
|
583
|
+
mask: businessRegistrationNumberMasks[CountryCodes.IsleOfMan].default,
|
|
584
|
+
validators: validatePatternOnBlur(
|
|
585
|
+
businessRegistrationNumberPatterns[CountryCodes.IsleOfMan].default
|
|
586
|
+
),
|
|
587
|
+
guidanceText: {
|
|
588
|
+
key: "enterNDigitsAndThen1LetterForExample",
|
|
589
|
+
values: {
|
|
590
|
+
numDigits: "6",
|
|
591
|
+
example: "114293C"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
[CountryCodes.Italy]: ({ registrationNumberType }) => {
|
|
596
|
+
switch (registrationNumberType) {
|
|
597
|
+
case "CCIAA":
|
|
598
|
+
return {
|
|
599
|
+
label: "CCIAA",
|
|
600
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Italy].CCIAA,
|
|
601
|
+
validators: validatePatternOnBlur(
|
|
602
|
+
businessRegistrationNumberPatterns[CountryCodes.Italy].CCIAA
|
|
603
|
+
),
|
|
604
|
+
guidanceText: {
|
|
605
|
+
key: "enterNLettersAndThenXToYDigitsForExample",
|
|
606
|
+
values: {
|
|
607
|
+
numLetters: "2",
|
|
608
|
+
minDigits: "6",
|
|
609
|
+
maxDigits: "7",
|
|
610
|
+
example: "TO0091712"
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
case "partitaIVA":
|
|
615
|
+
default:
|
|
616
|
+
return {
|
|
617
|
+
label: "codiceFiscalePartitaIVA",
|
|
618
|
+
validators: validatePatternOnBlur(/^\d{11}$/),
|
|
619
|
+
mask: {
|
|
620
|
+
mask: makeMask(spacer, ...numericInputs(11))
|
|
621
|
+
},
|
|
622
|
+
guidanceText: {
|
|
623
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
624
|
+
values: {
|
|
625
|
+
numDigits: "11",
|
|
626
|
+
example: "47040001100"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
[CountryCodes.Japan]: {
|
|
633
|
+
label: "corporateRegistrationNumber",
|
|
634
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Japan].default,
|
|
635
|
+
validators: validatePatternOnBlur(
|
|
636
|
+
businessRegistrationNumberPatterns[CountryCodes.Japan].default
|
|
637
|
+
),
|
|
638
|
+
guidanceText: {
|
|
639
|
+
key: "enterAMaximumOfNCharactersForExample",
|
|
640
|
+
values: {
|
|
641
|
+
maxChars: "12",
|
|
642
|
+
example: "224863141686"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
[CountryCodes.Jersey]: {
|
|
647
|
+
label: "registrationNumber",
|
|
648
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Jersey].default,
|
|
649
|
+
validators: validatePatternOnBlur(
|
|
650
|
+
businessRegistrationNumberPatterns[CountryCodes.Jersey].default
|
|
651
|
+
),
|
|
652
|
+
guidanceText: {
|
|
653
|
+
key: "enterAMaximumOfNCharactersForExample",
|
|
654
|
+
values: {
|
|
655
|
+
maxChars: "9",
|
|
656
|
+
example: "123722"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
[CountryCodes.Latvia]: {
|
|
661
|
+
label: "lvRegistrationNumber",
|
|
662
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Latvia].default,
|
|
663
|
+
validators: validatePatternOnBlur(
|
|
664
|
+
businessRegistrationNumberPatterns[CountryCodes.Latvia].default
|
|
665
|
+
),
|
|
666
|
+
guidanceText: {
|
|
667
|
+
key: "enterNDigitsForExample",
|
|
668
|
+
values: {
|
|
669
|
+
numDigits: "11",
|
|
670
|
+
example: "50003251661"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
[CountryCodes.Liechtenstein]: {
|
|
675
|
+
label: "liRegistrationNumber",
|
|
676
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Liechtenstein].default,
|
|
677
|
+
validators: validatePatternOnBlur(
|
|
678
|
+
businessRegistrationNumberPatterns[CountryCodes.Liechtenstein].default
|
|
679
|
+
),
|
|
680
|
+
guidanceText: {
|
|
681
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
682
|
+
values: {
|
|
683
|
+
numDigits: "11",
|
|
684
|
+
example: "FL-0001.012.124-5"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
[CountryCodes.Lithuania]: {
|
|
689
|
+
label: "ltRegistrationNumber",
|
|
690
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Lithuania].default,
|
|
691
|
+
validators: validatePatternOnBlur(
|
|
692
|
+
businessRegistrationNumberPatterns[CountryCodes.Lithuania].default
|
|
693
|
+
),
|
|
694
|
+
guidanceText: {
|
|
695
|
+
key: "enterXToYDigitsForExample",
|
|
696
|
+
values: {
|
|
697
|
+
minDigits: "6",
|
|
698
|
+
maxDigits: "9",
|
|
699
|
+
example: "123456789"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
[CountryCodes.Luxembourg]: {
|
|
704
|
+
label: "luRegistrationNumber",
|
|
705
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Luxembourg].default,
|
|
706
|
+
validators: validatePatternOnBlur(
|
|
707
|
+
businessRegistrationNumberPatterns[CountryCodes.Luxembourg].default
|
|
708
|
+
),
|
|
709
|
+
guidanceText: {
|
|
710
|
+
key: "enter1LetterAndThenNDigitsForExample",
|
|
711
|
+
values: {
|
|
712
|
+
example: "C127766"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
[CountryCodes.Malta]: {
|
|
717
|
+
label: "companyRegistrationNumber",
|
|
718
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Malta].default,
|
|
719
|
+
validators: validatePatternOnBlur(
|
|
720
|
+
businessRegistrationNumberPatterns[CountryCodes.Malta].default
|
|
721
|
+
),
|
|
722
|
+
guidanceText: {
|
|
723
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
724
|
+
values: {
|
|
725
|
+
minDigits: "4",
|
|
726
|
+
maxDigits: "6",
|
|
727
|
+
example: "C 43070, P 1234"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
[CountryCodes.Malaysia]: {
|
|
732
|
+
label: "SSM",
|
|
733
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Malaysia].default,
|
|
734
|
+
validators: validatePatternOnBlur(
|
|
735
|
+
businessRegistrationNumberPatterns[CountryCodes.Malaysia].default
|
|
736
|
+
),
|
|
737
|
+
guidanceText: {
|
|
738
|
+
key: "enterXOrYDigitsForExample",
|
|
739
|
+
values: {
|
|
740
|
+
xDigits: "7",
|
|
741
|
+
yDigits: "12",
|
|
742
|
+
example: "1234567, 201901000005"
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
[CountryCodes.Mexico]: {
|
|
747
|
+
label: "RFC",
|
|
748
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Mexico].default,
|
|
749
|
+
validators: validatePatternOnBlur(
|
|
750
|
+
businessRegistrationNumberPatterns[CountryCodes.Mexico].default
|
|
751
|
+
),
|
|
752
|
+
guidanceText: {
|
|
753
|
+
key: "enterNDigitsForExample",
|
|
754
|
+
values: {
|
|
755
|
+
numDigits: "12",
|
|
756
|
+
example: "LFM200817DGA"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
[CountryCodes.Monaco]: ({ companyType }) => companyType === CompanyTypesValues.SOLE_PROPRIETORSHIP ? {
|
|
761
|
+
label: "mcRegistrationNumberSoleProp",
|
|
762
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Monaco].soleProprietorship,
|
|
763
|
+
validators: validatePatternOnBlur(
|
|
764
|
+
businessRegistrationNumberPatterns[CountryCodes.Monaco].soleProprietorship
|
|
765
|
+
),
|
|
766
|
+
guidanceText: {
|
|
767
|
+
key: "enterXToYCharactersWithAMixForExample",
|
|
768
|
+
values: {
|
|
769
|
+
minChars: "8",
|
|
770
|
+
maxChars: "11",
|
|
771
|
+
example: "8732P92873"
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
} : {
|
|
775
|
+
label: "mcRegistrationNumber",
|
|
776
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Monaco].default,
|
|
777
|
+
validators: validatePatternOnBlur(
|
|
778
|
+
businessRegistrationNumberPatterns[CountryCodes.Monaco].default
|
|
779
|
+
),
|
|
780
|
+
guidanceText: {
|
|
781
|
+
key: "enterXToYCharactersWithAMixForExample",
|
|
782
|
+
values: {
|
|
783
|
+
minChars: "8",
|
|
784
|
+
maxChars: "11",
|
|
785
|
+
example: "84SB02071"
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
[CountryCodes.Netherlands]: {
|
|
790
|
+
label: "chamberOfCommerceRegistrationNumber",
|
|
791
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Netherlands].default,
|
|
792
|
+
validators: validatePatternOnBlur(
|
|
793
|
+
businessRegistrationNumberPatterns[CountryCodes.Netherlands].default
|
|
794
|
+
),
|
|
795
|
+
guidanceText: {
|
|
796
|
+
key: "enterNDigitsForExample",
|
|
797
|
+
values: {
|
|
798
|
+
numDigits: "8",
|
|
799
|
+
example: "34179503"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
[CountryCodes.NewZealand]: ({ registrationNumberType }) => registrationNumberType === "NZBN" ? {
|
|
804
|
+
label: "NZBN",
|
|
805
|
+
mask: businessRegistrationNumberMasks[CountryCodes.NewZealand].NZBN,
|
|
806
|
+
validators: validatePatternOnBlur(
|
|
807
|
+
businessRegistrationNumberPatterns[CountryCodes.NewZealand].NZBN
|
|
808
|
+
),
|
|
809
|
+
guidanceText: {
|
|
810
|
+
key: "enterNDigitsForExample",
|
|
811
|
+
values: {
|
|
812
|
+
numDigits: "13",
|
|
813
|
+
example: "1234567890123"
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
} : {
|
|
817
|
+
label: "companyNumberNZ",
|
|
818
|
+
mask: businessRegistrationNumberMasks[CountryCodes.NewZealand].companyNumberNZ,
|
|
819
|
+
validators: validatePatternOnBlur(
|
|
820
|
+
businessRegistrationNumberPatterns[CountryCodes.NewZealand].companyNumberNZ
|
|
821
|
+
),
|
|
822
|
+
guidanceText: {
|
|
823
|
+
key: "enterNDigitsForExample",
|
|
824
|
+
values: {
|
|
825
|
+
numDigits: "7",
|
|
826
|
+
example: "1234567"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
[CountryCodes.Norway]: {
|
|
831
|
+
label: "organisasjonsnummer",
|
|
832
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Norway].default,
|
|
833
|
+
validators: validatePatternOnBlur(
|
|
834
|
+
businessRegistrationNumberPatterns[CountryCodes.Norway].default
|
|
835
|
+
),
|
|
836
|
+
guidanceText: {
|
|
837
|
+
key: "enterNDigitsForExample",
|
|
838
|
+
values: {
|
|
839
|
+
numDigits: "9",
|
|
840
|
+
example: "923609016"
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
[CountryCodes.Poland]: ({ registrationNumberType }) => registrationNumberType === "krsNumber" ? {
|
|
845
|
+
label: "krsNumber",
|
|
846
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Poland].krsNumber,
|
|
847
|
+
validators: validatePatternOnBlur(
|
|
848
|
+
businessRegistrationNumberPatterns[CountryCodes.Poland].krsNumber
|
|
849
|
+
),
|
|
850
|
+
guidanceText: {
|
|
851
|
+
key: "enterNDigitsForExample",
|
|
852
|
+
values: {
|
|
853
|
+
numDigits: "10",
|
|
854
|
+
example: "1234567890"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
} : {
|
|
858
|
+
label: "regon",
|
|
859
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Poland].regon,
|
|
860
|
+
validators: validatePatternOnBlur(
|
|
861
|
+
businessRegistrationNumberPatterns[CountryCodes.Poland].regon
|
|
862
|
+
),
|
|
863
|
+
guidanceText: {
|
|
864
|
+
key: "enterNDigitsForExample",
|
|
865
|
+
values: {
|
|
866
|
+
numDigits: "9",
|
|
867
|
+
example: "123456789"
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
[CountryCodes.Portugal]: {
|
|
872
|
+
label: "NIPC",
|
|
873
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Portugal].default,
|
|
874
|
+
validators: validatePatternOnBlur(
|
|
875
|
+
businessRegistrationNumberPatterns[CountryCodes.Portugal].default
|
|
876
|
+
),
|
|
877
|
+
guidanceText: {
|
|
878
|
+
key: "enterNDigitsForExample",
|
|
879
|
+
values: {
|
|
880
|
+
numDigits: "9",
|
|
881
|
+
example: "123456789"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
[CountryCodes.PuertoRico]: {
|
|
886
|
+
// should exactly match CountryCodes.UnitedStates
|
|
887
|
+
},
|
|
888
|
+
[CountryCodes.Romania]: ({ registrationNumberType }) => registrationNumberType === "roRegNumberOldFormat" ? {
|
|
889
|
+
label: "roRegNumberOldFormat_label",
|
|
890
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Romania].roRegNumberOldFormat,
|
|
891
|
+
validators: validatePatternOnBlur(
|
|
892
|
+
businessRegistrationNumberPatterns[CountryCodes.Romania].roRegNumberOldFormat
|
|
893
|
+
),
|
|
894
|
+
guidanceText: {
|
|
895
|
+
key: "roRegNumberOldFormat_maskGuidance"
|
|
896
|
+
}
|
|
897
|
+
} : {
|
|
898
|
+
label: "roRegNumberNewFormat_label",
|
|
899
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Romania].roRegNumberNewFormat,
|
|
900
|
+
validators: validatePatternOnBlur(
|
|
901
|
+
businessRegistrationNumberPatterns[CountryCodes.Romania].roRegNumberNewFormat
|
|
902
|
+
),
|
|
903
|
+
guidanceText: {
|
|
904
|
+
key: "roRegNumberNewFormat_maskGuidance"
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
[CountryCodes.Singapore]: {
|
|
908
|
+
label: "uen",
|
|
909
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Singapore].default,
|
|
910
|
+
validators: validatePatternOnBlur(
|
|
911
|
+
businessRegistrationNumberPatterns[CountryCodes.Singapore].default
|
|
912
|
+
),
|
|
913
|
+
guidanceText: {
|
|
914
|
+
key: "enterXToYCharactersWithAMixForExample",
|
|
915
|
+
values: {
|
|
916
|
+
minChars: "9",
|
|
917
|
+
maxChars: "10",
|
|
918
|
+
example: "200312345A"
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
[CountryCodes.Slovakia]: {
|
|
923
|
+
label: "skRegistrationNumber",
|
|
924
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Slovakia].default,
|
|
925
|
+
validators: validatePatternOnBlur(
|
|
926
|
+
businessRegistrationNumberPatterns[CountryCodes.Slovakia].default
|
|
927
|
+
),
|
|
928
|
+
guidanceText: {
|
|
929
|
+
key: "enterNDigitsForExample",
|
|
930
|
+
values: {
|
|
931
|
+
numDigits: "8",
|
|
932
|
+
example: "12345678"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
[CountryCodes.Slovenia]: {
|
|
937
|
+
label: "siRegistrationNumber",
|
|
938
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Slovenia].default,
|
|
939
|
+
validators: validatePatternOnBlur(
|
|
940
|
+
businessRegistrationNumberPatterns[CountryCodes.Slovenia].default
|
|
941
|
+
),
|
|
942
|
+
guidanceText: {
|
|
943
|
+
key: "enterNDigitsForExample",
|
|
944
|
+
values: {
|
|
945
|
+
numDigits: "10",
|
|
946
|
+
example: "1006500006"
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
[CountryCodes.Spain]: {
|
|
951
|
+
label: "NIF",
|
|
952
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Spain].default,
|
|
953
|
+
validators: validatePatternOnBlur(
|
|
954
|
+
businessRegistrationNumberPatterns[CountryCodes.Spain].default
|
|
955
|
+
),
|
|
956
|
+
guidanceText: {
|
|
957
|
+
key: "enter1LetterAndThenNDigitsForExample",
|
|
958
|
+
values: {
|
|
959
|
+
numDigits: "8",
|
|
960
|
+
example: "A39000013"
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
[CountryCodes.Sweden]: {
|
|
965
|
+
label: "organisationsnummer",
|
|
966
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Sweden].default,
|
|
967
|
+
validators: validatePatternOnBlur(
|
|
968
|
+
businessRegistrationNumberPatterns[CountryCodes.Sweden].default
|
|
969
|
+
),
|
|
970
|
+
guidanceText: {
|
|
971
|
+
key: "enterNDigitsForExample",
|
|
972
|
+
values: {
|
|
973
|
+
numDigits: "10",
|
|
974
|
+
example: "202100-5489"
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
[CountryCodes.Switzerland]: {
|
|
979
|
+
label: "chRegistrationNumber",
|
|
980
|
+
mask: businessRegistrationNumberMasks[CountryCodes.Switzerland].default,
|
|
981
|
+
validators: validatePatternOnBlur(
|
|
982
|
+
businessRegistrationNumberPatterns[CountryCodes.Switzerland].default
|
|
983
|
+
),
|
|
984
|
+
guidanceText: {
|
|
985
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
986
|
+
values: {
|
|
987
|
+
numDigits: "9",
|
|
988
|
+
example: "CHE-123.456.789"
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
[CountryCodes.UnitedArabEmirates]: {
|
|
993
|
+
label: "commercialLicence",
|
|
994
|
+
validators: validateNotEmptyOnBlur
|
|
995
|
+
},
|
|
996
|
+
[CountryCodes.UnitedKingdom]: ({ companyType, registrationNumberType }) => {
|
|
997
|
+
const defaultConfig = {
|
|
998
|
+
label: "companyNumber",
|
|
999
|
+
mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].default,
|
|
1000
|
+
validators: validatePatternOnBlur(
|
|
1001
|
+
businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].default
|
|
1002
|
+
),
|
|
1003
|
+
guidanceText: {
|
|
1004
|
+
key: "enterNCharactersForExample",
|
|
1005
|
+
values: {
|
|
1006
|
+
numChars: "8",
|
|
1007
|
+
example: "43668490"
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
switch (companyType) {
|
|
1012
|
+
case "nonProfit":
|
|
1013
|
+
switch (registrationNumberType) {
|
|
1014
|
+
case "charity":
|
|
1015
|
+
return {
|
|
1016
|
+
label: "charityNumber",
|
|
1017
|
+
mask: businessRegistrationNumberMasks[CountryCodes.UnitedKingdom].nonProfit,
|
|
1018
|
+
validators: validatePatternOnBlur(
|
|
1019
|
+
businessRegistrationNumberPatterns[CountryCodes.UnitedKingdom].nonProfit
|
|
1020
|
+
),
|
|
1021
|
+
guidanceText: {
|
|
1022
|
+
key: "enterThreeDifferingOptionsForExample",
|
|
1023
|
+
values: {
|
|
1024
|
+
firstOption: "6, 7 or 8 digits",
|
|
1025
|
+
secondOption: "6 digits with a 2-letter prefix",
|
|
1026
|
+
thirdOption: "6 digits with a suffix like -0",
|
|
1027
|
+
firstExample: "123456",
|
|
1028
|
+
secondExample: "SC012345",
|
|
1029
|
+
thirdExample: "123456-0"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
default:
|
|
1034
|
+
return defaultConfig;
|
|
1035
|
+
}
|
|
1036
|
+
default:
|
|
1037
|
+
return defaultConfig;
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
[CountryCodes.UnitedStates]: ({ state }) => ({
|
|
1041
|
+
label: "registrationNumber__US",
|
|
1042
|
+
mask: state ? businessRegistrationNumberMasks[CountryCodes.UnitedStates][state] : businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
|
|
1043
|
+
validators: state ? validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates][state]) : validatePatternOnBlur(
|
|
1044
|
+
businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default
|
|
1045
|
+
),
|
|
1046
|
+
guidanceText: state ? stateFormatGuidanceText[state] : stateFormatGuidanceText.default
|
|
1047
|
+
})
|
|
1048
|
+
};
|
|
1049
|
+
const exemptFromRegistrationNumberDefaultFieldMetadata = {
|
|
1050
|
+
label: "iDontHaveARegistrationNumber"
|
|
1051
|
+
};
|
|
1052
|
+
const exemptFromRegistrationNumberDefaultFieldConfig = {
|
|
1053
|
+
[CountryCodes.Australia]: {
|
|
1054
|
+
label: "doNotHaveAcn"
|
|
1055
|
+
},
|
|
1056
|
+
[CountryCodes.Austria]: {
|
|
1057
|
+
label: "doNotHaveFirmenbuchnummer"
|
|
1058
|
+
},
|
|
1059
|
+
[CountryCodes.Finland]: {
|
|
1060
|
+
label: "doNotHaveYTunnus"
|
|
1061
|
+
},
|
|
1062
|
+
[CountryCodes.HongKong]: {
|
|
1063
|
+
label: "iDoNotHaveCompanyRegistrationNumber"
|
|
1064
|
+
},
|
|
1065
|
+
[CountryCodes.Germany]: {
|
|
1066
|
+
label: "doNotHaveHandelsregisternummerOrVereinsregisternummer"
|
|
1067
|
+
},
|
|
1068
|
+
[CountryCodes.Lithuania]: {
|
|
1069
|
+
label: "doNotHaveLtRegistrationNumber"
|
|
1070
|
+
},
|
|
1071
|
+
[CountryCodes.Luxembourg]: {
|
|
1072
|
+
label: "doNotHaveLuRegistrationNumber"
|
|
1073
|
+
},
|
|
1074
|
+
[CountryCodes.Poland]: {
|
|
1075
|
+
label: "doNotHaveRegonKrsNumber"
|
|
1076
|
+
},
|
|
1077
|
+
[CountryCodes.PuertoRico]: {
|
|
1078
|
+
label: "doNotHaveEIN"
|
|
1079
|
+
},
|
|
1080
|
+
[CountryCodes.Sweden]: {
|
|
1081
|
+
label: "doNotHaveOrganisationsnummer"
|
|
1082
|
+
},
|
|
1083
|
+
[CountryCodes.Switzerland]: {
|
|
1084
|
+
label: "doNotHaveChRegistrationNumber"
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
const inferCompanyRegistrationNumberType = (registrationNumber, country, companyType) => {
|
|
1088
|
+
const optionsForCountry = getCompanyRegistrationNumberOptions(country, companyType);
|
|
1089
|
+
const metadataFn = registrationNumberDefaultFieldConfig[country];
|
|
1090
|
+
if (!optionsForCountry) return void 0;
|
|
1091
|
+
if (optionsForCountry.length === 1)
|
|
1092
|
+
return optionsForCountry[0].id;
|
|
1093
|
+
if (!optionsForCountry || !metadataFn) return void 0;
|
|
1094
|
+
const allMetaData = optionsForCountry.reduce(
|
|
1095
|
+
(acc, option) => {
|
|
1096
|
+
const meta = typeof metadataFn === "function" ? metadataFn({
|
|
1097
|
+
registrationNumberType: option.id,
|
|
1098
|
+
companyType
|
|
1099
|
+
}) : metadataFn;
|
|
1100
|
+
if (meta.label && !acc[meta.label]) {
|
|
1101
|
+
acc[meta.label] = meta;
|
|
1102
|
+
}
|
|
1103
|
+
return acc;
|
|
1104
|
+
},
|
|
1105
|
+
{}
|
|
1106
|
+
);
|
|
1107
|
+
for (const option of optionsForCountry) {
|
|
1108
|
+
const fieldMetadata = allMetaData[option.name];
|
|
1109
|
+
if (!fieldMetadata?.validators) continue;
|
|
1110
|
+
const validators = Array.isArray(fieldMetadata.validators) ? fieldMetadata.validators : [fieldMetadata.validators];
|
|
1111
|
+
if (validators.every((validator) => validator.validate(registrationNumber))) {
|
|
1112
|
+
return option.id;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
function getDefaultRegistrationNumberType(registrationNumber, country, companyType) {
|
|
1117
|
+
return registrationNumber ? inferCompanyRegistrationNumberType(registrationNumber, country, companyType) : getCompanyRegistrationNumberOptions(country, companyType)?.[0]?.id;
|
|
1118
|
+
}
|
|
1119
|
+
const BUSINESS_REGISTRATION_NUMBER_FIELD = ["registrationNumber", "registrationNumberType", "exemptedFromRegistrationNumber"];
|
|
1120
|
+
function BusinessRegistrationNumberField({
|
|
1121
|
+
data,
|
|
1122
|
+
valid,
|
|
1123
|
+
errors,
|
|
1124
|
+
labels,
|
|
1125
|
+
mask,
|
|
1126
|
+
guidanceText,
|
|
1127
|
+
helperText,
|
|
1128
|
+
placeholders,
|
|
1129
|
+
readonly,
|
|
1130
|
+
shouldValidate,
|
|
1131
|
+
optional,
|
|
1132
|
+
handleChangeFor,
|
|
1133
|
+
country,
|
|
1134
|
+
canExempt,
|
|
1135
|
+
companyType
|
|
1136
|
+
}) {
|
|
1137
|
+
const registrationNumberOptions = getCompanyRegistrationNumberOptions(country, companyType);
|
|
1138
|
+
const defaultType = getDefaultRegistrationNumberType(
|
|
1139
|
+
data.registrationNumber,
|
|
1140
|
+
country,
|
|
1141
|
+
companyType
|
|
1142
|
+
);
|
|
1143
|
+
const showExemptedOption = canExempt && !!registrationNumberOptions && registrationNumberOptions.length > 1;
|
|
1144
|
+
const registrationNumberType = data.exemptedFromRegistrationNumber ? "exempted" : data.registrationNumberType ? data.registrationNumberType : defaultType;
|
|
1145
|
+
const handleRegistrationNumberChange = (e, mode) => {
|
|
1146
|
+
const value = typeof e === "string" ? e : e.target?.value;
|
|
1147
|
+
handleChangeFor("registrationNumber", mode)(value);
|
|
1148
|
+
handleChangeFor("registrationNumberType")(registrationNumberType);
|
|
1149
|
+
};
|
|
1150
|
+
const handleExemptedFromRegistrationNumber = (exempt) => {
|
|
1151
|
+
if (exempt) handleChangeFor("registrationNumber")("");
|
|
1152
|
+
handleChangeFor("exemptedFromRegistrationNumber")(exempt);
|
|
1153
|
+
};
|
|
1154
|
+
const handleCompanyRegistrationNumberTypeChange = (regNumberType) => {
|
|
1155
|
+
if (regNumberType === "exempted") {
|
|
1156
|
+
if (!canExempt) {
|
|
1157
|
+
throw Error(`${country} does not allow tax exemptions`);
|
|
1158
|
+
}
|
|
1159
|
+
handleChangeFor("registrationNumber")("");
|
|
1160
|
+
handleChangeFor("exemptedFromRegistrationNumber")(true);
|
|
1161
|
+
handleChangeFor("registrationNumberType")(void 0);
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
if (canExempt && data.exemptedFromRegistrationNumber === true) {
|
|
1165
|
+
handleChangeFor("exemptedFromRegistrationNumber")(false);
|
|
1166
|
+
}
|
|
1167
|
+
handleChangeFor("registrationNumber")("");
|
|
1168
|
+
handleChangeFor("registrationNumberType")(regNumberType);
|
|
1169
|
+
};
|
|
1170
|
+
if (registrationNumberType && registrationNumberType !== "exempted") {
|
|
1171
|
+
const countryHasType = registrationNumberOptions?.find(
|
|
1172
|
+
(option) => option.id === registrationNumberType
|
|
1173
|
+
);
|
|
1174
|
+
if (!countryHasType) {
|
|
1175
|
+
handleChangeFor("registrationNumberType")(defaultType);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-field__business-registration", children: [
|
|
1179
|
+
/* @__PURE__ */ jsx(
|
|
1180
|
+
CompanyRegistrationNumberTypeSelector,
|
|
1181
|
+
{
|
|
1182
|
+
companyType,
|
|
1183
|
+
country,
|
|
1184
|
+
setSelected: handleCompanyRegistrationNumberTypeChange,
|
|
1185
|
+
selected: registrationNumberType,
|
|
1186
|
+
exemptedOption: showExemptedOption ? labels.exemptedFromRegistrationNumber : false
|
|
1187
|
+
}
|
|
1188
|
+
),
|
|
1189
|
+
/* @__PURE__ */ jsx(
|
|
1190
|
+
MaskedInput,
|
|
1191
|
+
{
|
|
1192
|
+
"aria-required": true,
|
|
1193
|
+
"aria-invalid": !valid.registrationNumber,
|
|
1194
|
+
name: "registrationNumber",
|
|
1195
|
+
type: "text",
|
|
1196
|
+
value: data?.registrationNumber ?? "",
|
|
1197
|
+
label: labels.registrationNumber ?? "",
|
|
1198
|
+
formatGuidance: guidanceText?.registrationNumber ?? "",
|
|
1199
|
+
placeholder: placeholders?.registrationNumber,
|
|
1200
|
+
errorMessage: errors.registrationNumber,
|
|
1201
|
+
isValid: Boolean(valid.registrationNumber),
|
|
1202
|
+
onInput: (e) => handleRegistrationNumberChange(e, "input"),
|
|
1203
|
+
onBlur: (e) => handleRegistrationNumberChange(e, "blur"),
|
|
1204
|
+
disabled: data.exemptedFromRegistrationNumber,
|
|
1205
|
+
optional,
|
|
1206
|
+
readonly,
|
|
1207
|
+
shouldValidate: !optional && shouldValidate,
|
|
1208
|
+
helper: helperText?.registrationNumber,
|
|
1209
|
+
...mask
|
|
1210
|
+
}
|
|
1211
|
+
),
|
|
1212
|
+
canExempt && !showExemptedOption && /* @__PURE__ */ jsx(Field, { name: "exemptedFromRegistrationNumber", children: (childProps) => /* @__PURE__ */ jsx(
|
|
1213
|
+
Checkbox,
|
|
1214
|
+
{
|
|
1215
|
+
...childProps,
|
|
1216
|
+
"aria-required": false,
|
|
1217
|
+
"aria-invalid": false,
|
|
1218
|
+
name: "exemptedFromRegistrationNumber",
|
|
1219
|
+
value: "exemptedFromRegistrationNumber",
|
|
1220
|
+
checked: Boolean(data.exemptedFromRegistrationNumber),
|
|
1221
|
+
label: labels?.exemptedFromRegistrationNumber,
|
|
1222
|
+
readonly,
|
|
1223
|
+
onChange: handleExemptedFromRegistrationNumber
|
|
1224
|
+
}
|
|
1225
|
+
) })
|
|
1226
|
+
] });
|
|
1227
|
+
}
|
|
1228
|
+
const DBA_NAME_FIELD = [
|
|
1229
|
+
"hasDoingBusinessAs",
|
|
1230
|
+
"doingBusinessAs"
|
|
1231
|
+
];
|
|
1232
|
+
function DBANameField({
|
|
1233
|
+
data,
|
|
1234
|
+
valid,
|
|
1235
|
+
errors,
|
|
1236
|
+
labels,
|
|
1237
|
+
helperText,
|
|
1238
|
+
readonly,
|
|
1239
|
+
handleChangeFor
|
|
1240
|
+
}) {
|
|
1241
|
+
const { t } = useTranslation("common");
|
|
1242
|
+
const hasDoingBusinessAsValue = useMemo(() => {
|
|
1243
|
+
if (typeof data.hasDoingBusinessAs !== "boolean") return void 0;
|
|
1244
|
+
return data.hasDoingBusinessAs ? "yes" : "no";
|
|
1245
|
+
}, [data.hasDoingBusinessAs]);
|
|
1246
|
+
const handleHasDoingBusinessAsChange = (val) => {
|
|
1247
|
+
handleChangeFor("hasDoingBusinessAs")(val === "yes" ? true : false);
|
|
1248
|
+
};
|
|
1249
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1250
|
+
/* @__PURE__ */ jsx(
|
|
1251
|
+
Field,
|
|
1252
|
+
{
|
|
1253
|
+
el: "fieldset",
|
|
1254
|
+
name: "hasDoingBusinessAsName",
|
|
1255
|
+
label: labels.hasDoingBusinessAs ?? t(($) => $["hasDba"]),
|
|
1256
|
+
helper: helperText?.hasDoingBusinessAs ?? t(($) => $["hasDba__helperText"]),
|
|
1257
|
+
isValid: valid.hasDoingBusinessAs,
|
|
1258
|
+
errorMessage: errors.hasDoingBusinessAs,
|
|
1259
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1260
|
+
RadioGroup,
|
|
1261
|
+
{
|
|
1262
|
+
...childProps,
|
|
1263
|
+
name: "hasDoingBusinessAs",
|
|
1264
|
+
items: [
|
|
1265
|
+
{ id: "yes", name: "yes" },
|
|
1266
|
+
{ id: "no", name: "no" }
|
|
1267
|
+
],
|
|
1268
|
+
value: hasDoingBusinessAsValue,
|
|
1269
|
+
onChange: handleHasDoingBusinessAsChange,
|
|
1270
|
+
horizontal: true
|
|
1271
|
+
}
|
|
1272
|
+
)
|
|
1273
|
+
}
|
|
1274
|
+
),
|
|
1275
|
+
data.hasDoingBusinessAs && /* @__PURE__ */ jsx(
|
|
1276
|
+
Field,
|
|
1277
|
+
{
|
|
1278
|
+
name: "doingBusinessAs",
|
|
1279
|
+
label: labels.doingBusinessAs ?? t(($) => $["dbaName"]),
|
|
1280
|
+
errorMessage: errors.doingBusinessAs,
|
|
1281
|
+
isValid: valid.doingBusinessAs,
|
|
1282
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
1283
|
+
InputText,
|
|
1284
|
+
{
|
|
1285
|
+
...childProps,
|
|
1286
|
+
"aria-required": true,
|
|
1287
|
+
"aria-invalid": !valid.doingBusinessAs,
|
|
1288
|
+
name: "doingBusinessAs",
|
|
1289
|
+
value: data.doingBusinessAs,
|
|
1290
|
+
readonly,
|
|
1291
|
+
onInput: handleChangeFor("doingBusinessAs", "input"),
|
|
1292
|
+
onBlur: handleChangeFor("doingBusinessAs", "blur")
|
|
1293
|
+
}
|
|
1294
|
+
)
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1297
|
+
] });
|
|
1298
|
+
}
|
|
1299
|
+
const doingBusinessAsAbsentFieldMetadata = {
|
|
1300
|
+
validators: [validateNotEmptyOnBlur]
|
|
1301
|
+
};
|
|
1302
|
+
const doingBusinessAsFieldMetadata = {
|
|
1303
|
+
label: "doingBusinessAs",
|
|
1304
|
+
validators: [validateNotEmptyOnBlur]
|
|
1305
|
+
};
|
|
1306
|
+
const vatAbsenceReasonMetadata = {
|
|
1307
|
+
validators: [validateNotEmptyOnBlur]
|
|
1308
|
+
};
|
|
1309
|
+
const defaultFieldMetadata = {
|
|
1310
|
+
label: "vatNumber"
|
|
1311
|
+
};
|
|
1312
|
+
const defaultFieldConfig = {
|
|
1313
|
+
[CountryCodes.Austria]: {
|
|
1314
|
+
label: "UST-ID",
|
|
1315
|
+
validators: validatePatternOnBlur(/^ATU\d{8}$/),
|
|
1316
|
+
mask: {
|
|
1317
|
+
mask: makeMask(...nonInputs("ATU", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1318
|
+
},
|
|
1319
|
+
guidanceText: {
|
|
1320
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1321
|
+
values: {
|
|
1322
|
+
numDigits: "8",
|
|
1323
|
+
example: "ATU51507409"
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
[CountryCodes.Belgium]: {
|
|
1328
|
+
label: "euVatNumber",
|
|
1329
|
+
validators: validatePatternOnBlur(/^BE[10]\d{9}$/),
|
|
1330
|
+
mask: {
|
|
1331
|
+
mask: makeMask(...nonInputs("BE", { includeInValue: true }), spacer, ...numericInputs(10))
|
|
1332
|
+
},
|
|
1333
|
+
guidanceText: {
|
|
1334
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1335
|
+
values: {
|
|
1336
|
+
numDigits: "10",
|
|
1337
|
+
example: "BE1234567890"
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
[CountryCodes.Bulgaria]: {
|
|
1342
|
+
label: "identifikacionenNomerDDS",
|
|
1343
|
+
validators: validatePatternOnBlur(/^BG\d{9,10}$/),
|
|
1344
|
+
mask: {
|
|
1345
|
+
mask: makeMask(
|
|
1346
|
+
...nonInputs("BG", { includeInValue: true }),
|
|
1347
|
+
spacer,
|
|
1348
|
+
...numericInputs(9),
|
|
1349
|
+
...numericInputs(1, true)
|
|
1350
|
+
)
|
|
1351
|
+
},
|
|
1352
|
+
guidanceText: {
|
|
1353
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
1354
|
+
values: {
|
|
1355
|
+
minDigits: "9",
|
|
1356
|
+
maxDigits: "10",
|
|
1357
|
+
example: "BG1234567890"
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
[CountryCodes.Croatia]: {
|
|
1362
|
+
label: "PDVIdBrojOIB",
|
|
1363
|
+
validators: validatePatternOnBlur(/^HR\d{11}$/),
|
|
1364
|
+
mask: {
|
|
1365
|
+
mask: makeMask(...nonInputs("HR", { includeInValue: true }), spacer, ...numericInputs(11))
|
|
1366
|
+
},
|
|
1367
|
+
guidanceText: {
|
|
1368
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1369
|
+
values: {
|
|
1370
|
+
numDigits: "11",
|
|
1371
|
+
example: "HR94577403194"
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
[CountryCodes.Cyprus]: {
|
|
1376
|
+
label: "arithmosEngraphes",
|
|
1377
|
+
validators: validatePatternOnBlur(/^CY[A-Z0-9]{9}$/),
|
|
1378
|
+
mask: {
|
|
1379
|
+
mask: makeMask(
|
|
1380
|
+
...nonInputs("CY", { includeInValue: true }),
|
|
1381
|
+
spacer,
|
|
1382
|
+
...alphanumericInputs(9)
|
|
1383
|
+
),
|
|
1384
|
+
transformOnType: uppercase
|
|
1385
|
+
},
|
|
1386
|
+
guidanceText: {
|
|
1387
|
+
key: "enterTheRemainingNCharactersForExample",
|
|
1388
|
+
values: {
|
|
1389
|
+
numChars: "9",
|
|
1390
|
+
example: "CY12345678X"
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
[CountryCodes.CzechRepublic]: {
|
|
1395
|
+
label: "DIC",
|
|
1396
|
+
validators: validatePatternOnBlur(/^CZ\d{8,10}$/),
|
|
1397
|
+
mask: {
|
|
1398
|
+
mask: makeMask(
|
|
1399
|
+
...nonInputs("CZ", { includeInValue: true }),
|
|
1400
|
+
spacer,
|
|
1401
|
+
...numericInputs(8),
|
|
1402
|
+
...numericInputs(2, true)
|
|
1403
|
+
)
|
|
1404
|
+
},
|
|
1405
|
+
guidanceText: {
|
|
1406
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
1407
|
+
values: {
|
|
1408
|
+
minDigits: "8",
|
|
1409
|
+
maxDigits: "10",
|
|
1410
|
+
example: "CZ00177041"
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
[CountryCodes.Denmark]: ({ vatNumberType }) => {
|
|
1415
|
+
switch (vatNumberType) {
|
|
1416
|
+
case "stamregister":
|
|
1417
|
+
return {
|
|
1418
|
+
label: "stamregister",
|
|
1419
|
+
validators: validatePatternOnBlur(/^SE\d{8}$/),
|
|
1420
|
+
mask: {
|
|
1421
|
+
mask: makeMask(
|
|
1422
|
+
...nonInputs("SE", { includeInValue: true }),
|
|
1423
|
+
spacer,
|
|
1424
|
+
...numericInputs(8)
|
|
1425
|
+
)
|
|
1426
|
+
},
|
|
1427
|
+
guidanceText: {
|
|
1428
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1429
|
+
values: {
|
|
1430
|
+
numDigits: "8",
|
|
1431
|
+
example: "SE12345678"
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
case "momsregistreringsnummerCVR":
|
|
1436
|
+
default:
|
|
1437
|
+
return {
|
|
1438
|
+
label: "momsregistreringsnummerCVR",
|
|
1439
|
+
validators: validatePatternOnBlur(/^DK\d{8}$/),
|
|
1440
|
+
mask: {
|
|
1441
|
+
mask: makeMask(
|
|
1442
|
+
...nonInputs("DK", { includeInValue: true }),
|
|
1443
|
+
spacer,
|
|
1444
|
+
...numericInputs(8)
|
|
1445
|
+
)
|
|
1446
|
+
},
|
|
1447
|
+
guidanceText: {
|
|
1448
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1449
|
+
values: {
|
|
1450
|
+
numDigits: "8",
|
|
1451
|
+
example: "DK12345678"
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
[CountryCodes.Estonia]: {
|
|
1458
|
+
label: "kaibemaksukohustuslaseNumber",
|
|
1459
|
+
validators: validatePatternOnBlur(/^EE\d{9}$/),
|
|
1460
|
+
mask: {
|
|
1461
|
+
mask: makeMask(...nonInputs("EE", { includeInValue: true }), spacer, ...numericInputs(9))
|
|
1462
|
+
},
|
|
1463
|
+
guidanceText: {
|
|
1464
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1465
|
+
values: {
|
|
1466
|
+
numDigits: "9",
|
|
1467
|
+
example: "EE100254507"
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
[CountryCodes.Finland]: {
|
|
1472
|
+
label: "arvonlisaveronumeroMervardesskattenummer",
|
|
1473
|
+
validators: validatePatternOnBlur(/^FI\d{8}$/),
|
|
1474
|
+
mask: {
|
|
1475
|
+
mask: makeMask(...nonInputs("FI", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1476
|
+
},
|
|
1477
|
+
guidanceText: {
|
|
1478
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1479
|
+
values: {
|
|
1480
|
+
numDigits: "9",
|
|
1481
|
+
example: "FI12345678"
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
[CountryCodes.France]: ({ vatNumberType }) => {
|
|
1486
|
+
const sharedMetadata = {
|
|
1487
|
+
validators: validatePatternOnBlur(/^FR\d{11}$/),
|
|
1488
|
+
mask: {
|
|
1489
|
+
mask: makeMask(...nonInputs("FR", { includeInValue: true }), spacer, ...numericInputs(11))
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
switch (vatNumberType) {
|
|
1493
|
+
case "NumeroDeTVA":
|
|
1494
|
+
return {
|
|
1495
|
+
...sharedMetadata,
|
|
1496
|
+
label: "NumeroDeTVA",
|
|
1497
|
+
guidanceText: {
|
|
1498
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1499
|
+
values: {
|
|
1500
|
+
numDigits: "11",
|
|
1501
|
+
example: "FR12999999999"
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
case "numeroDIdentificationALATaxe":
|
|
1506
|
+
default:
|
|
1507
|
+
return {
|
|
1508
|
+
...sharedMetadata,
|
|
1509
|
+
label: "numeroDIdentificationALATaxe",
|
|
1510
|
+
guidanceText: {
|
|
1511
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1512
|
+
values: {
|
|
1513
|
+
numDigits: "11",
|
|
1514
|
+
example: "FR12345678901"
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
};
|
|
1518
|
+
}
|
|
1519
|
+
},
|
|
1520
|
+
[CountryCodes.Germany]: {
|
|
1521
|
+
label: "USt-IdNr",
|
|
1522
|
+
validators: validatePatternOnBlur(/^DE\d{9}$/),
|
|
1523
|
+
mask: {
|
|
1524
|
+
mask: makeMask(...nonInputs("DE", { includeInValue: true }), spacer, ...numericInputs(9))
|
|
1525
|
+
},
|
|
1526
|
+
guidanceText: {
|
|
1527
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1528
|
+
values: {
|
|
1529
|
+
numDigits: "9",
|
|
1530
|
+
example: "DE115235681"
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
[CountryCodes.Greece]: {
|
|
1535
|
+
label: "grTaxId",
|
|
1536
|
+
validators: validatePatternOnBlur(/^EL\d{9}$/),
|
|
1537
|
+
mask: {
|
|
1538
|
+
mask: makeMask(...nonInputs("EL", { includeInValue: true }), spacer, ...numericInputs(9))
|
|
1539
|
+
},
|
|
1540
|
+
guidanceText: {
|
|
1541
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1542
|
+
values: {
|
|
1543
|
+
numDigits: "9",
|
|
1544
|
+
example: "EL123456789"
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
},
|
|
1548
|
+
[CountryCodes.Hungary]: {
|
|
1549
|
+
label: "huTaxId",
|
|
1550
|
+
validators: validatePatternOnBlur(/^HU\d{8}$/),
|
|
1551
|
+
mask: {
|
|
1552
|
+
mask: makeMask(...nonInputs("HU", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1553
|
+
},
|
|
1554
|
+
guidanceText: {
|
|
1555
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1556
|
+
values: {
|
|
1557
|
+
numDigits: "8",
|
|
1558
|
+
example: "HU12345678"
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
[CountryCodes.Ireland]: {
|
|
1563
|
+
label: "vatNumber",
|
|
1564
|
+
validators: validatePatternOnBlur(/^IE[A-Z0-9]{8,9}$/),
|
|
1565
|
+
mask: {
|
|
1566
|
+
mask: makeMask(
|
|
1567
|
+
...nonInputs("IE", { includeInValue: true }),
|
|
1568
|
+
spacer,
|
|
1569
|
+
...alphanumericInputs(8),
|
|
1570
|
+
...alphanumericInputs(1, true)
|
|
1571
|
+
),
|
|
1572
|
+
transformOnType: uppercase
|
|
1573
|
+
},
|
|
1574
|
+
guidanceText: {
|
|
1575
|
+
key: "enterTheRemainingXToYCharactersForExample",
|
|
1576
|
+
values: {
|
|
1577
|
+
minChars: "8",
|
|
1578
|
+
maxChars: "9",
|
|
1579
|
+
example: "IE999999XX"
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
},
|
|
1583
|
+
[CountryCodes.Italy]: {
|
|
1584
|
+
label: "partitaIVA",
|
|
1585
|
+
validators: validatePatternOnBlur(/^IT\d{11}$/),
|
|
1586
|
+
mask: {
|
|
1587
|
+
mask: makeMask(...nonInputs("IT", { includeInValue: true }), spacer, ...numericInputs(11))
|
|
1588
|
+
},
|
|
1589
|
+
guidanceText: {
|
|
1590
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1591
|
+
values: {
|
|
1592
|
+
numDigits: "11",
|
|
1593
|
+
example: "IT47040001100"
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
[CountryCodes.Latvia]: {
|
|
1598
|
+
label: "lvTaxId",
|
|
1599
|
+
validators: validatePatternOnBlur(/^LV\d{11}$/),
|
|
1600
|
+
mask: {
|
|
1601
|
+
mask: makeMask(...nonInputs("LV", { includeInValue: true }), spacer, ...numericInputs(11))
|
|
1602
|
+
},
|
|
1603
|
+
guidanceText: {
|
|
1604
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1605
|
+
values: {
|
|
1606
|
+
numDigits: "11",
|
|
1607
|
+
example: "LV43603021620"
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
[CountryCodes.Liechtenstein]: {
|
|
1612
|
+
label: "vatRegistrationNumber",
|
|
1613
|
+
validators: validatePatternOnBlur(/^[0-9]{1,6}$/),
|
|
1614
|
+
mask: {
|
|
1615
|
+
mask: makeMask(...numericInputs(1), ...numericInputs(5, true))
|
|
1616
|
+
},
|
|
1617
|
+
guidanceText: {
|
|
1618
|
+
key: "enterAMaximumOfNDigitsForExample",
|
|
1619
|
+
values: {
|
|
1620
|
+
maxDigits: "6",
|
|
1621
|
+
example: "123456"
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
[CountryCodes.Lithuania]: {
|
|
1626
|
+
label: "PVMmoketojoKodas",
|
|
1627
|
+
validators: validatePatternOnBlur(/^LT\d{9,12}$/),
|
|
1628
|
+
mask: {
|
|
1629
|
+
mask: makeMask(
|
|
1630
|
+
...nonInputs("LT", { includeInValue: true }),
|
|
1631
|
+
spacer,
|
|
1632
|
+
...numericInputs(9),
|
|
1633
|
+
...numericInputs(3, true)
|
|
1634
|
+
)
|
|
1635
|
+
},
|
|
1636
|
+
guidanceText: {
|
|
1637
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
1638
|
+
values: {
|
|
1639
|
+
minDigits: "9",
|
|
1640
|
+
maxDigits: "12",
|
|
1641
|
+
example: "LT664517219"
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
[CountryCodes.Luxembourg]: {
|
|
1646
|
+
label: "numeroDIdentificationALATaxe",
|
|
1647
|
+
validators: validatePatternOnBlur(/^LU\d{8}$/),
|
|
1648
|
+
mask: {
|
|
1649
|
+
mask: makeMask(...nonInputs("LU", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1650
|
+
},
|
|
1651
|
+
guidanceText: {
|
|
1652
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1653
|
+
values: {
|
|
1654
|
+
numDigits: "8",
|
|
1655
|
+
example: "LU18928066"
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
[CountryCodes.Malaysia]: {
|
|
1660
|
+
label: "SST",
|
|
1661
|
+
validators: validatePatternOnBlur(/^([A-Z]\d{2}[-]\d{4}[-]\d{8}|\d{12})$/),
|
|
1662
|
+
guidanceText: {
|
|
1663
|
+
key: "enterXOrYCharactersForExample",
|
|
1664
|
+
values: {
|
|
1665
|
+
xChars: "12",
|
|
1666
|
+
yChars: "14",
|
|
1667
|
+
example: "123456789012, D11-1808-20032117"
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
[CountryCodes.Malta]: {
|
|
1672
|
+
label: "vatNumber",
|
|
1673
|
+
validators: validatePatternOnBlur(/^MT\d{8}$/),
|
|
1674
|
+
mask: {
|
|
1675
|
+
mask: makeMask(...nonInputs("MT", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1676
|
+
},
|
|
1677
|
+
guidanceText: {
|
|
1678
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1679
|
+
values: {
|
|
1680
|
+
numDigits: "8",
|
|
1681
|
+
example: "MT12345678"
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
[CountryCodes.Monaco]: {
|
|
1686
|
+
label: "numeroDIdentificationALATaxe",
|
|
1687
|
+
validators: validatePatternOnBlur(/^FR[0-9]{11}$/),
|
|
1688
|
+
mask: {
|
|
1689
|
+
mask: makeMask(...nonInputs("FR", { includeInValue: true }), spacer, ...numericInputs(11))
|
|
1690
|
+
},
|
|
1691
|
+
guidanceText: {
|
|
1692
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1693
|
+
values: {
|
|
1694
|
+
numDigits: "11",
|
|
1695
|
+
example: "FR12345678999"
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
},
|
|
1699
|
+
[CountryCodes.Netherlands]: {
|
|
1700
|
+
label: "btwNummer",
|
|
1701
|
+
validators: validatePatternOnBlur(/^NL\d{9}B\d{2}$/),
|
|
1702
|
+
mask: {
|
|
1703
|
+
mask: makeMask(
|
|
1704
|
+
...nonInputs("NL", { includeInValue: true }),
|
|
1705
|
+
spacer,
|
|
1706
|
+
...numericInputs(9),
|
|
1707
|
+
spacer,
|
|
1708
|
+
...nonInputs("B", { includeInValue: true }),
|
|
1709
|
+
spacer,
|
|
1710
|
+
...numericInputs(2)
|
|
1711
|
+
),
|
|
1712
|
+
transformOnType: uppercase
|
|
1713
|
+
},
|
|
1714
|
+
guidanceText: {
|
|
1715
|
+
key: "enterTheRemainingNCharactersForExample",
|
|
1716
|
+
values: {
|
|
1717
|
+
numChars: "12",
|
|
1718
|
+
example: "NL123456789B01"
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
[CountryCodes.Norway]: {
|
|
1723
|
+
label: "mvanummer",
|
|
1724
|
+
validators: validatePatternOnBlur(/^\d{9}MVA$/),
|
|
1725
|
+
mask: {
|
|
1726
|
+
mask: makeMask(
|
|
1727
|
+
...numericInputs(9),
|
|
1728
|
+
...nonInputs("MVA", { includeInValue: true, displayEagerly: true })
|
|
1729
|
+
)
|
|
1730
|
+
},
|
|
1731
|
+
guidanceText: {
|
|
1732
|
+
key: "enterNDigitsForExample",
|
|
1733
|
+
values: {
|
|
1734
|
+
numDigits: "9",
|
|
1735
|
+
example: "123456789MVA"
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1739
|
+
[CountryCodes.Poland]: {
|
|
1740
|
+
label: "NIP",
|
|
1741
|
+
validators: validatePatternOnBlur(/^PL\d{10}$/),
|
|
1742
|
+
mask: {
|
|
1743
|
+
mask: makeMask(...nonInputs("PL", { includeInValue: true }), spacer, ...numericInputs(10))
|
|
1744
|
+
},
|
|
1745
|
+
guidanceText: {
|
|
1746
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1747
|
+
values: {
|
|
1748
|
+
numDigits: "10",
|
|
1749
|
+
example: "PL1234567890"
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
[CountryCodes.Portugal]: {
|
|
1754
|
+
label: "numerodeIVA",
|
|
1755
|
+
validators: validatePatternOnBlur(/^PT\d{9}$/),
|
|
1756
|
+
mask: {
|
|
1757
|
+
mask: makeMask(...nonInputs("PT", { includeInValue: true }), spacer, ...numericInputs(9))
|
|
1758
|
+
},
|
|
1759
|
+
guidanceText: {
|
|
1760
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1761
|
+
values: {
|
|
1762
|
+
numDigits: "9",
|
|
1763
|
+
example: "PT123456789"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
[CountryCodes.Romania]: {
|
|
1768
|
+
label: "codulDeIdentificareFiscala",
|
|
1769
|
+
validators: validatePatternOnBlur(/^RO\d{2,12}$/),
|
|
1770
|
+
mask: {
|
|
1771
|
+
mask: makeMask(
|
|
1772
|
+
...nonInputs("RO", { includeInValue: true }),
|
|
1773
|
+
spacer,
|
|
1774
|
+
...numericInputs(2),
|
|
1775
|
+
...numericInputs(8, true)
|
|
1776
|
+
)
|
|
1777
|
+
},
|
|
1778
|
+
guidanceText: {
|
|
1779
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
1780
|
+
values: {
|
|
1781
|
+
minDigits: "2",
|
|
1782
|
+
maxDigits: "10",
|
|
1783
|
+
example: "RO12345678"
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
[CountryCodes.Slovakia]: {
|
|
1788
|
+
label: "skTaxId",
|
|
1789
|
+
validators: validatePatternOnBlur(/^SK\d{10}$/),
|
|
1790
|
+
mask: {
|
|
1791
|
+
mask: makeMask(...nonInputs("SK", { includeInValue: true }), spacer, ...numericInputs(10))
|
|
1792
|
+
},
|
|
1793
|
+
guidanceText: {
|
|
1794
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1795
|
+
values: {
|
|
1796
|
+
numDigits: "10",
|
|
1797
|
+
example: "SK1234567890"
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
[CountryCodes.Slovenia]: {
|
|
1802
|
+
label: "siTaxId",
|
|
1803
|
+
validators: validatePatternOnBlur(/^SI\d{8}$/),
|
|
1804
|
+
mask: {
|
|
1805
|
+
mask: makeMask(...nonInputs("SI", { includeInValue: true }), spacer, ...numericInputs(8))
|
|
1806
|
+
},
|
|
1807
|
+
guidanceText: {
|
|
1808
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1809
|
+
values: {
|
|
1810
|
+
numDigits: "8",
|
|
1811
|
+
example: "SI12345678"
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
[CountryCodes.Spain]: {
|
|
1816
|
+
label: "NIFdeIVA",
|
|
1817
|
+
validators: validatePatternOnBlur(/^ES[A-Z0-9]\d{7}[A-Z0-9]$/),
|
|
1818
|
+
mask: {
|
|
1819
|
+
mask: makeMask(
|
|
1820
|
+
...nonInputs("ES", { includeInValue: true }),
|
|
1821
|
+
spacer,
|
|
1822
|
+
...alphanumericInputs(9)
|
|
1823
|
+
),
|
|
1824
|
+
transformOnType: uppercase
|
|
1825
|
+
},
|
|
1826
|
+
guidanceText: {
|
|
1827
|
+
key: "enterTheRemainingNCharactersForExample",
|
|
1828
|
+
values: {
|
|
1829
|
+
numChars: "9",
|
|
1830
|
+
example: "ES12345678X"
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
[CountryCodes.Sweden]: {
|
|
1835
|
+
label: "vatNummerMomsregistreringsnummerOrMomsnummer",
|
|
1836
|
+
validators: validatePatternOnBlur(/^SE\d{12}$/),
|
|
1837
|
+
mask: {
|
|
1838
|
+
mask: makeMask(...nonInputs("SE", { includeInValue: true }), spacer, ...numericInputs(12))
|
|
1839
|
+
},
|
|
1840
|
+
guidanceText: {
|
|
1841
|
+
key: "enterTheRemainingNDigitsForExample",
|
|
1842
|
+
values: {
|
|
1843
|
+
numDigits: "12",
|
|
1844
|
+
example: "SE123456789001"
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
},
|
|
1848
|
+
[CountryCodes.Switzerland]: {
|
|
1849
|
+
label: "Mehrwertsteuernummer",
|
|
1850
|
+
// CHE123456789TVA | CHE....MWST | CHE.......IVA
|
|
1851
|
+
validators: validatePatternOnBlur(/^CHE\d{9}(TVA|MWST|IVA)$/),
|
|
1852
|
+
mask: {
|
|
1853
|
+
mask: makeMask(
|
|
1854
|
+
...nonInputs("CHE", { includeInValue: true }),
|
|
1855
|
+
...nonInputs(" - "),
|
|
1856
|
+
...numericInputs(3),
|
|
1857
|
+
...nonInputs(" . "),
|
|
1858
|
+
...numericInputs(3),
|
|
1859
|
+
...nonInputs(" . "),
|
|
1860
|
+
...numericInputs(3),
|
|
1861
|
+
spacer,
|
|
1862
|
+
...alphaInputs(3),
|
|
1863
|
+
...alphaInputs(1, true)
|
|
1864
|
+
),
|
|
1865
|
+
transformOnType: uppercase
|
|
1866
|
+
},
|
|
1867
|
+
guidanceText: {
|
|
1868
|
+
key: "enterTheRemainingNDigitsThenXToYLettersForExample",
|
|
1869
|
+
values: {
|
|
1870
|
+
numDigits: "9",
|
|
1871
|
+
minLetters: "3",
|
|
1872
|
+
maxLetters: "4",
|
|
1873
|
+
example: "CHE-123.456.789 TVA"
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
},
|
|
1877
|
+
[CountryCodes.UnitedArabEmirates]: {
|
|
1878
|
+
label: "vatRegistrationNumber",
|
|
1879
|
+
validators: validateNotEmptyOnBlur
|
|
1880
|
+
},
|
|
1881
|
+
[CountryCodes.UnitedKingdom]: {
|
|
1882
|
+
label: "vatRegistrationNumber",
|
|
1883
|
+
validators: validatePatternOnBlur(/^GB\d{9,12}$/),
|
|
1884
|
+
mask: {
|
|
1885
|
+
mask: makeMask(
|
|
1886
|
+
...nonInputs("GB", { includeInValue: true }),
|
|
1887
|
+
spacer,
|
|
1888
|
+
...numericInputs(9),
|
|
1889
|
+
...numericInputs(3, true)
|
|
1890
|
+
)
|
|
1891
|
+
},
|
|
1892
|
+
guidanceText: {
|
|
1893
|
+
key: "enterTheRemainingXToYDigitsForExample",
|
|
1894
|
+
values: {
|
|
1895
|
+
minDigits: "9",
|
|
1896
|
+
maxDigits: "12",
|
|
1897
|
+
example: "GB1234567890"
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
/**
|
|
1902
|
+
* NOT YET SUPPORTED
|
|
1903
|
+
* These are brought over from the old pattern files. We have no idea if they are accurate or not.
|
|
1904
|
+
* See https://en.wikipedia.org/wiki/VAT_identification_number
|
|
1905
|
+
*/
|
|
1906
|
+
[CountryCodes.Albania]: {
|
|
1907
|
+
validators: validatePatternOnBlur(/^[JKLM][A-Z0-9]{8}[A-Z]$/)
|
|
1908
|
+
},
|
|
1909
|
+
[CountryCodes.Belarus]: {
|
|
1910
|
+
validators: validatePatternOnBlur(/^\d{9}$/)
|
|
1911
|
+
},
|
|
1912
|
+
[CountryCodes.RussianFederation]: {
|
|
1913
|
+
validators: validatePatternOnBlur(/^(\d{10}|\d{12})$/)
|
|
1914
|
+
},
|
|
1915
|
+
[CountryCodes.SanMarino]: {
|
|
1916
|
+
validators: validatePatternOnBlur(/^\d{5}$/)
|
|
1917
|
+
},
|
|
1918
|
+
[CountryCodes.Serbia]: {
|
|
1919
|
+
validators: validatePatternOnBlur(/^\d{9}$/)
|
|
1920
|
+
},
|
|
1921
|
+
[CountryCodes.Turkey]: {
|
|
1922
|
+
validators: validatePatternOnBlur(/^\d{10}$/)
|
|
1923
|
+
},
|
|
1924
|
+
[CountryCodes.Ukraine]: {
|
|
1925
|
+
validators: validatePatternOnBlur(/^\d{12}$/)
|
|
1926
|
+
},
|
|
1927
|
+
[CountryCodes.Argentina]: {
|
|
1928
|
+
validators: validatePatternOnBlur(/^\d{11}$/)
|
|
1929
|
+
},
|
|
1930
|
+
[CountryCodes.Chile]: {
|
|
1931
|
+
validators: validatePatternOnBlur(/^\d{9}$/)
|
|
1932
|
+
},
|
|
1933
|
+
[CountryCodes.Colombia]: {
|
|
1934
|
+
validators: validatePatternOnBlur(/^\d{10}$/)
|
|
1935
|
+
},
|
|
1936
|
+
[CountryCodes.CostaRica]: {
|
|
1937
|
+
validators: validatePatternOnBlur(/^\d{9,12}$/)
|
|
1938
|
+
},
|
|
1939
|
+
[CountryCodes.Ecuador]: {
|
|
1940
|
+
validators: validatePatternOnBlur(/^\d{13}$/)
|
|
1941
|
+
},
|
|
1942
|
+
[CountryCodes.Guatemala]: {
|
|
1943
|
+
validators: validatePatternOnBlur(/^\d{8}$/)
|
|
1944
|
+
},
|
|
1945
|
+
[CountryCodes.Peru]: {
|
|
1946
|
+
validators: validatePatternOnBlur(/^\d{11}$/)
|
|
1947
|
+
},
|
|
1948
|
+
[CountryCodes.Venezuela]: {
|
|
1949
|
+
validators: validatePatternOnBlur(/^[JGVE]-\d{8}-?\d$/)
|
|
1950
|
+
}
|
|
1951
|
+
};
|
|
1952
|
+
const inferVatNumberType = (vatNumber, country) => {
|
|
1953
|
+
const optionsForCountry = vatNumberOptions[country];
|
|
1954
|
+
const metadataFn = defaultFieldConfig[country];
|
|
1955
|
+
if (!optionsForCountry || !metadataFn) return void 0;
|
|
1956
|
+
for (const option of optionsForCountry) {
|
|
1957
|
+
const fieldMetadata = typeof metadataFn === "function" ? metadataFn({
|
|
1958
|
+
vatNumberType: option.id
|
|
1959
|
+
}) : metadataFn;
|
|
1960
|
+
if (!fieldMetadata.validators) continue;
|
|
1961
|
+
const validators = Array.isArray(fieldMetadata.validators) ? fieldMetadata.validators : [fieldMetadata.validators];
|
|
1962
|
+
if (validators.every((validator) => validator.validate(vatNumber))) {
|
|
1963
|
+
return option.id;
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
};
|
|
1967
|
+
function getDefaultVatNumberType(vatNumber, country) {
|
|
1968
|
+
return vatNumber ? inferVatNumberType(vatNumber, country) : vatNumberOptions[country]?.[0]?.id;
|
|
1969
|
+
}
|
|
1970
|
+
function VatNumberTypeSelector({
|
|
1971
|
+
country,
|
|
1972
|
+
companyType,
|
|
1973
|
+
selected,
|
|
1974
|
+
setSelected,
|
|
1975
|
+
exemptedOption
|
|
1976
|
+
}) {
|
|
1977
|
+
const { t } = useTranslation("common");
|
|
1978
|
+
const handleSelect = useCallback(
|
|
1979
|
+
(selectedStr) => {
|
|
1980
|
+
const newSelected = selectedStr;
|
|
1981
|
+
if (newSelected === "exempted") {
|
|
1982
|
+
if (exemptedOption) {
|
|
1983
|
+
setSelected(newSelected);
|
|
1984
|
+
}
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
setSelected(newSelected);
|
|
1988
|
+
},
|
|
1989
|
+
[exemptedOption, setSelected]
|
|
1990
|
+
);
|
|
1991
|
+
const options = useMemo(() => {
|
|
1992
|
+
const availableOptions = getVatNumberOptions(country, companyType) ?? [];
|
|
1993
|
+
if (availableOptions.length === 0 || !exemptedOption) return availableOptions;
|
|
1994
|
+
return [
|
|
1995
|
+
...availableOptions,
|
|
1996
|
+
{
|
|
1997
|
+
id: "exempted",
|
|
1998
|
+
name: exemptedOption
|
|
1999
|
+
}
|
|
2000
|
+
];
|
|
2001
|
+
}, [country, companyType, exemptedOption]);
|
|
2002
|
+
useEffect(() => {
|
|
2003
|
+
if (!selected && options.length > 0) {
|
|
2004
|
+
handleSelect(options[0].id);
|
|
2005
|
+
}
|
|
2006
|
+
}, [options, selected, handleSelect]);
|
|
2007
|
+
if (options.length <= 1) return null;
|
|
2008
|
+
return /* @__PURE__ */ jsx(
|
|
2009
|
+
Field,
|
|
2010
|
+
{
|
|
2011
|
+
el: "fieldset",
|
|
2012
|
+
name: "vatNumberType",
|
|
2013
|
+
label: t(($) => $["whichTypeOfTaxIdNumberDoYouHave"]),
|
|
2014
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2015
|
+
RadioGroup,
|
|
2016
|
+
{
|
|
2017
|
+
...childProps,
|
|
2018
|
+
name: "vatNumberType",
|
|
2019
|
+
items: options,
|
|
2020
|
+
value: selected,
|
|
2021
|
+
onChange: handleSelect
|
|
2022
|
+
}
|
|
2023
|
+
)
|
|
2024
|
+
}
|
|
2025
|
+
);
|
|
2026
|
+
}
|
|
2027
|
+
const VAT_NUMBER_FIELD = [
|
|
2028
|
+
"vatNumber",
|
|
2029
|
+
"vatNumberType",
|
|
2030
|
+
"exemptedFromVat",
|
|
2031
|
+
"vatAbsenceReason"
|
|
2032
|
+
];
|
|
2033
|
+
function VatNumberField({
|
|
2034
|
+
data,
|
|
2035
|
+
valid,
|
|
2036
|
+
errors,
|
|
2037
|
+
labels,
|
|
2038
|
+
mask,
|
|
2039
|
+
guidanceText,
|
|
2040
|
+
placeholders,
|
|
2041
|
+
readonly,
|
|
2042
|
+
optional,
|
|
2043
|
+
shouldValidate,
|
|
2044
|
+
handleChangeFor,
|
|
2045
|
+
canExempt,
|
|
2046
|
+
country
|
|
2047
|
+
}) {
|
|
2048
|
+
const { isExperimentEnabled } = useExperimentsContext();
|
|
2049
|
+
const options = vatNumberOptions[country];
|
|
2050
|
+
const defaultType = getDefaultVatNumberType(data.vatNumber, country);
|
|
2051
|
+
const vatAbsenceReasons = isExperimentEnabled("ShowExtraTaxExemptionReasons") ? ["belowTaxThreshold", "industryExemption", "countryWithoutVatOrGstSystem"] : ["belowTaxThreshold", "industryExemption"];
|
|
2052
|
+
const showVatExemptedOptions = canExempt && options?.length > 1;
|
|
2053
|
+
const vatNumberType = data.exemptedFromVat ? "exempted" : data.vatNumberType ? data.vatNumberType : defaultType;
|
|
2054
|
+
const handleVatNumberChange = (e, mode) => {
|
|
2055
|
+
const value = typeof e === "string" ? e : e.target?.value;
|
|
2056
|
+
handleChangeFor("vatNumber", mode)(value);
|
|
2057
|
+
handleChangeFor("vatNumberType")(vatNumberType);
|
|
2058
|
+
};
|
|
2059
|
+
const handleVatNumberTypeChange = (vatType, exemptValue) => {
|
|
2060
|
+
if (vatType === "exempted") {
|
|
2061
|
+
if (!canExempt) {
|
|
2062
|
+
throw Error(`${country} does not allow VAT exemptions`);
|
|
2063
|
+
}
|
|
2064
|
+
handleChangeFor("exemptedFromVat")(exemptValue);
|
|
2065
|
+
handleChangeFor("vatNumber")(null);
|
|
2066
|
+
handleChangeFor("vatNumberType")(void 0);
|
|
2067
|
+
return;
|
|
2068
|
+
}
|
|
2069
|
+
handleChangeFor("vatNumberType")(vatType);
|
|
2070
|
+
};
|
|
2071
|
+
if (vatNumberType && vatNumberType !== "exempted") {
|
|
2072
|
+
const countryHasType = options.find((option) => option.id === vatNumberType);
|
|
2073
|
+
if (!countryHasType) {
|
|
2074
|
+
handleChangeFor("vatNumberType")(defaultType);
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-field__vat-number", children: [
|
|
2078
|
+
/* @__PURE__ */ jsx(
|
|
2079
|
+
VatNumberTypeSelector,
|
|
2080
|
+
{
|
|
2081
|
+
country,
|
|
2082
|
+
setSelected: handleVatNumberTypeChange,
|
|
2083
|
+
selected: vatNumberType,
|
|
2084
|
+
exemptedOption: showVatExemptedOptions ? labels.exemptedFromVat : false
|
|
2085
|
+
}
|
|
2086
|
+
),
|
|
2087
|
+
/* @__PURE__ */ jsx(
|
|
2088
|
+
MaskedInput,
|
|
2089
|
+
{
|
|
2090
|
+
type: "text",
|
|
2091
|
+
"aria-required": true,
|
|
2092
|
+
"aria-invalid": !valid.vatNumber,
|
|
2093
|
+
name: "vatNumber",
|
|
2094
|
+
value: data?.vatNumber ?? "",
|
|
2095
|
+
label: labels.vatNumber ?? "",
|
|
2096
|
+
formatGuidance: guidanceText?.vatNumber ?? "",
|
|
2097
|
+
placeholder: placeholders?.vatNumber,
|
|
2098
|
+
errorMessage: errors.vatNumber,
|
|
2099
|
+
isValid: Boolean(valid.vatNumber),
|
|
2100
|
+
onInput: (e) => handleVatNumberChange(e, "input"),
|
|
2101
|
+
onBlur: (e) => handleVatNumberChange(e, "blur"),
|
|
2102
|
+
disabled: data.exemptedFromVat,
|
|
2103
|
+
readonly,
|
|
2104
|
+
optional,
|
|
2105
|
+
shouldValidate,
|
|
2106
|
+
...mask
|
|
2107
|
+
}
|
|
2108
|
+
),
|
|
2109
|
+
canExempt && !showVatExemptedOptions && /* @__PURE__ */ jsx(Field, { name: "exemptedFromVat", children: (childProps) => /* @__PURE__ */ jsx(
|
|
2110
|
+
Checkbox,
|
|
2111
|
+
{
|
|
2112
|
+
...childProps,
|
|
2113
|
+
"aria-required": false,
|
|
2114
|
+
"aria-invalid": false,
|
|
2115
|
+
name: "exemptedFromVat",
|
|
2116
|
+
label: labels?.exemptedFromVat,
|
|
2117
|
+
value: "exemptedFromVat",
|
|
2118
|
+
checked: Boolean(data.exemptedFromVat),
|
|
2119
|
+
onChange: (e) => handleVatNumberTypeChange("exempted", e)
|
|
2120
|
+
}
|
|
2121
|
+
) }),
|
|
2122
|
+
data.exemptedFromVat && /* @__PURE__ */ jsx(
|
|
2123
|
+
Field,
|
|
2124
|
+
{
|
|
2125
|
+
el: "fieldset",
|
|
2126
|
+
name: "vatAbsenceReason",
|
|
2127
|
+
label: labels?.vatAbsenceReason,
|
|
2128
|
+
errorMessage: errors.vatAbsenceReason,
|
|
2129
|
+
isValid: valid.vatAbsenceReason,
|
|
2130
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2131
|
+
RadioGroup,
|
|
2132
|
+
{
|
|
2133
|
+
...childProps,
|
|
2134
|
+
name: "vatAbsenceReason",
|
|
2135
|
+
onChange: handleChangeFor("vatAbsenceReason"),
|
|
2136
|
+
value: data.vatAbsenceReason,
|
|
2137
|
+
items: vatAbsenceReasons.map((reason) => ({ id: reason, name: reason }))
|
|
2138
|
+
}
|
|
2139
|
+
)
|
|
2140
|
+
}
|
|
2141
|
+
)
|
|
2142
|
+
] });
|
|
2143
|
+
}
|
|
2144
|
+
const registrationAddressValidationRules = {
|
|
2145
|
+
operationalAddressIsSame: {
|
|
2146
|
+
modes: ["blur"],
|
|
2147
|
+
validate: (operationalAddressIsSame) => !!operationalAddressIsSame,
|
|
2148
|
+
errorMessage: "fieldIsRequired"
|
|
2149
|
+
}
|
|
2150
|
+
};
|
|
2151
|
+
const registrationAddressFields = [
|
|
2152
|
+
"registrationAddress",
|
|
2153
|
+
"operationalAddress",
|
|
2154
|
+
"operationalAddressIsSame"
|
|
2155
|
+
];
|
|
2156
|
+
const registrationAddressForms = {
|
|
2157
|
+
registrationAddress: {
|
|
2158
|
+
formId: "registrationAddress"
|
|
2159
|
+
},
|
|
2160
|
+
operationalAddress: {
|
|
2161
|
+
formId: "operationalAddress"
|
|
2162
|
+
}
|
|
2163
|
+
};
|
|
2164
|
+
const registrationAddressFormID = registrationAddressForms.registrationAddress.formId;
|
|
2165
|
+
const operationalAddressFormID = registrationAddressForms.operationalAddress.formId;
|
|
2166
|
+
function RegistrationAddress(props) {
|
|
2167
|
+
const { t } = useTranslation("common");
|
|
2168
|
+
const { id, heading, description, country, data, validators, problems } = props;
|
|
2169
|
+
const {
|
|
2170
|
+
requiredFields: registrationAddressRequiredFields,
|
|
2171
|
+
optionalFields: registrationAddressOptionalFields,
|
|
2172
|
+
readOnlyFields: registrationAddressReadOnlyFields,
|
|
2173
|
+
obscuredFields: registrationAddressObscuredFields,
|
|
2174
|
+
verifyFields: registrationAddressVerifyFields,
|
|
2175
|
+
trustedFields: registrationAddressTrustedFields
|
|
2176
|
+
} = getFormProps(props, registrationAddressFormID);
|
|
2177
|
+
const {
|
|
2178
|
+
data: formData,
|
|
2179
|
+
valid: formValid,
|
|
2180
|
+
errors: formErrors,
|
|
2181
|
+
fieldProblems: formFieldProblems,
|
|
2182
|
+
handleChangeFor,
|
|
2183
|
+
setValid
|
|
2184
|
+
} = useForm({
|
|
2185
|
+
...props,
|
|
2186
|
+
schema: ["operationalAddressIsSame"],
|
|
2187
|
+
defaultData: data,
|
|
2188
|
+
rules: validators || registrationAddressValidationRules,
|
|
2189
|
+
obscuredFields: [],
|
|
2190
|
+
optionalFields: registrationAddressOptionalFields,
|
|
2191
|
+
trustedFields: registrationAddressTrustedFields
|
|
2192
|
+
});
|
|
2193
|
+
const mergedProps = {
|
|
2194
|
+
...props,
|
|
2195
|
+
requiredFields: registrationAddressRequiredFields,
|
|
2196
|
+
optionalFields: registrationAddressOptionalFields,
|
|
2197
|
+
readOnlyFields: registrationAddressReadOnlyFields,
|
|
2198
|
+
obscuredFields: registrationAddressObscuredFields,
|
|
2199
|
+
trustedFields: registrationAddressTrustedFields
|
|
2200
|
+
};
|
|
2201
|
+
const formUtils = createFormUtils(mergedProps, t);
|
|
2202
|
+
const stateRef = useRef({ setState: null });
|
|
2203
|
+
useEffect(() => {
|
|
2204
|
+
stateRef?.current?.setState?.({
|
|
2205
|
+
type: "addToState",
|
|
2206
|
+
value: {
|
|
2207
|
+
data: formData,
|
|
2208
|
+
valid: formValid,
|
|
2209
|
+
errors: formErrors,
|
|
2210
|
+
fieldProblems: formFieldProblems,
|
|
2211
|
+
dataStoreId: id,
|
|
2212
|
+
schema: [
|
|
2213
|
+
"registrationAddress",
|
|
2214
|
+
"operationalAddressIsSame",
|
|
2215
|
+
...isOperationAddressNotSame() ? ["operationalAddress"] : []
|
|
2216
|
+
]
|
|
2217
|
+
}
|
|
2218
|
+
});
|
|
2219
|
+
}, [formData, formValid, formErrors, formFieldProblems]);
|
|
2220
|
+
const isOperationAddressNotSame = () => formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME;
|
|
2221
|
+
const registrationAddressFormProps = getFormProps(props, registrationAddressFormID);
|
|
2222
|
+
const operationalAddressFormProps = getFormProps(props, operationalAddressFormID);
|
|
2223
|
+
const handleRegistrationAddressChange = (state) => {
|
|
2224
|
+
handleChangeFor("registrationAddress")(state.data);
|
|
2225
|
+
setValid("registrationAddress", Boolean(state.isValid));
|
|
2226
|
+
};
|
|
2227
|
+
const handleOperationalAddressChange = (state) => {
|
|
2228
|
+
handleChangeFor("operationalAddress")(state.data);
|
|
2229
|
+
setValid("operationalAddress", Boolean(state.isValid));
|
|
2230
|
+
};
|
|
2231
|
+
const handleOperationalAddressIsSameChange = (value) => {
|
|
2232
|
+
handleChangeFor("operationalAddressIsSame")(value);
|
|
2233
|
+
if (value === "OperationAddressAnswerYes") setValid("operationalAddress", true);
|
|
2234
|
+
};
|
|
2235
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2236
|
+
/* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
|
|
2237
|
+
/* @__PURE__ */ jsx(FormHeader, { heading, description }),
|
|
2238
|
+
/* @__PURE__ */ jsx(
|
|
2239
|
+
ErrorPanel,
|
|
2240
|
+
{
|
|
2241
|
+
verificationErrors: id ? problems?.verificationErrors?.[id] : void 0,
|
|
2242
|
+
validationErrors: id ? problems?.validationErrors?.[id] : void 0,
|
|
2243
|
+
formUtils,
|
|
2244
|
+
id: "ariaErrorField"
|
|
2245
|
+
}
|
|
2246
|
+
),
|
|
2247
|
+
/* @__PURE__ */ jsx(
|
|
2248
|
+
ContextGuidance,
|
|
2249
|
+
{
|
|
2250
|
+
titleId: "whyDoINeedToFillInThisInformation",
|
|
2251
|
+
contentId: "reasonForFillingCompanyAddressDetails",
|
|
2252
|
+
title: t(($) => $["whyDoINeedToFillInThisInformation"]),
|
|
2253
|
+
content: t(($) => $["reasonForFillingCompanyAddressDetails"])
|
|
2254
|
+
}
|
|
2255
|
+
),
|
|
2256
|
+
/* @__PURE__ */ jsx(
|
|
2257
|
+
Address,
|
|
2258
|
+
{
|
|
2259
|
+
...registrationAddressFormProps,
|
|
2260
|
+
data: { ...registrationAddressFormProps?.data, country },
|
|
2261
|
+
hideCountry: true,
|
|
2262
|
+
id,
|
|
2263
|
+
addressType: "registrationAddress",
|
|
2264
|
+
optionalFields: ["otherAddressInformation"],
|
|
2265
|
+
onChange: handleRegistrationAddressChange
|
|
2266
|
+
}
|
|
2267
|
+
),
|
|
2268
|
+
/* @__PURE__ */ jsx(
|
|
2269
|
+
FormHeader,
|
|
2270
|
+
{
|
|
2271
|
+
className: "adyen-kyc-u-margin-top-32",
|
|
2272
|
+
heading: t(($) => $["operationalAddressHeader"])
|
|
2273
|
+
}
|
|
2274
|
+
),
|
|
2275
|
+
/* @__PURE__ */ jsx(
|
|
2276
|
+
Field,
|
|
2277
|
+
{
|
|
2278
|
+
el: "fieldset",
|
|
2279
|
+
name: "operationalAddressIsSame",
|
|
2280
|
+
label: formUtils.getLabel("operationalAddressIsSame"),
|
|
2281
|
+
errorMessage: formErrors.operationalAddressIsSame?.errorMessage,
|
|
2282
|
+
children: (childProps) => /* @__PURE__ */ jsx(
|
|
2283
|
+
RadioGroup,
|
|
2284
|
+
{
|
|
2285
|
+
...childProps,
|
|
2286
|
+
name: "operationalAddressIsSame",
|
|
2287
|
+
items: operationalAddressIsSameItems,
|
|
2288
|
+
value: formData.operationalAddressIsSame,
|
|
2289
|
+
disabled: formUtils.isReadOnly("operationalAddressIsSame"),
|
|
2290
|
+
onChange: handleOperationalAddressIsSameChange,
|
|
2291
|
+
"aria-required": true,
|
|
2292
|
+
"aria-invalid": !formValid.operationalAddressIsSame
|
|
2293
|
+
}
|
|
2294
|
+
)
|
|
2295
|
+
}
|
|
2296
|
+
),
|
|
2297
|
+
isOperationAddressNotSame() && /* @__PURE__ */ createElement(
|
|
2298
|
+
Address,
|
|
2299
|
+
{
|
|
2300
|
+
...operationalAddressFormProps,
|
|
2301
|
+
key: "operationalAddress",
|
|
2302
|
+
data: { ...operationalAddressFormProps?.data, country },
|
|
2303
|
+
hideCountry: true,
|
|
2304
|
+
id,
|
|
2305
|
+
optionalFields: ["otherAddressInformation"],
|
|
2306
|
+
addressType: "operationalAddress",
|
|
2307
|
+
onChange: handleOperationalAddressChange
|
|
2308
|
+
}
|
|
2309
|
+
)
|
|
2310
|
+
] });
|
|
2311
|
+
}
|
|
2312
|
+
export {
|
|
2313
|
+
BUSINESS_REGISTRATION_NUMBER_FIELD as B,
|
|
2314
|
+
DBA_NAME_FIELD as D,
|
|
2315
|
+
MemoizedConstitutionalDocument as M,
|
|
2316
|
+
RegistrationAddress as R,
|
|
2317
|
+
VAT_NUMBER_FIELD as V,
|
|
2318
|
+
defaultFieldConfig as a,
|
|
2319
|
+
registrationNumberDefaultFieldConfig as b,
|
|
2320
|
+
doingBusinessAsFieldMetadata as c,
|
|
2321
|
+
defaultFieldMetadata as d,
|
|
2322
|
+
doingBusinessAsAbsentFieldMetadata as e,
|
|
2323
|
+
DBANameField as f,
|
|
2324
|
+
BusinessRegistrationNumberField as g,
|
|
2325
|
+
VatNumberField as h,
|
|
2326
|
+
exemptFromRegistrationNumberDefaultFieldMetadata as i,
|
|
2327
|
+
registrationAddressFields as j,
|
|
2328
|
+
getDefaultVatNumberType as k,
|
|
2329
|
+
exemptFromRegistrationNumberDefaultFieldConfig as l,
|
|
2330
|
+
getDefaultRegistrationNumberType as m,
|
|
2331
|
+
inferCompanyRegistrationNumberType as n,
|
|
2332
|
+
registrationNumberDefaultFieldMetadata as r,
|
|
2333
|
+
vatAbsenceReasonMetadata as v
|
|
2334
|
+
};
|