@adyen/kyc-components 4.20.0 → 4.21.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AcceptTermsOfServiceWorkflow-BX4PavSh.js +28 -0
- package/dist/{Accordion-BWdAGMRb.js → Accordion-DC7Iuj-J.js} +3 -2
- package/dist/{AccountSetupRejected-Ku1FCk8G.js → AccountSetupRejected-U97LE7iR.js} +2 -2
- package/dist/AdaptiveWorkflow-DnvzkolP.js +210 -0
- package/dist/{AdaptiveWorkflowComponent-ZC8yOYn_.js → AdaptiveWorkflowComponent-nyRU4M-H.js} +35 -34
- package/dist/{AddressField-S_TJHHgc.js → AddressField-OygGZ6XH.js} +13 -79
- package/dist/{Avatar-CeZIQS8n.js → Avatar-BKTdqNpO.js} +2 -2
- package/dist/{BusinessFinancingDropin-T0Q5IO1m.js → BusinessFinancingDropin-BGFKtVmf.js} +155 -36
- package/dist/{BusinessFinancingPage-D2CulkQb.js → BusinessFinancingPage-HggLO02u.js} +34 -34
- package/dist/{BusinessRegistrationNumberField-BZD5POn0.js → BusinessRegistrationNumberField-CLtSzZ4H.js} +28 -133
- package/dist/BusinessRegistrationNumberFieldGroup-BfuSULya.js +172 -0
- package/dist/{BusinessTypeSelectionPage-BtJLsGtX.js → BusinessTypeSelectionPage-C9BYbNj1.js} +19 -16
- package/dist/{Button-Cm7cT6BX.js → Button-DSD_afG_.js} +4 -85
- package/dist/{Checkbox-faFUul66.js → Checkbox-B-hhlkoQ.js} +2 -2
- package/dist/{CompanyRegistrationNumberTypeSelector-v4sUJ8TM.js → CompanyRegistrationNumberTypeSelector-BlW3-gmE.js} +6 -8
- package/dist/ComponentGroup-o36ZWZoO.js +32 -0
- package/dist/{ContactDetails-CUwCotpR.js → ContactDetails-DwH0Wdi1.js} +8 -9
- package/dist/{ContextGuidance-M7lR8QJv.js → ContextGuidance-Digds0A2.js} +3 -3
- package/dist/{Currency-BOFjRr_4.js → Currency-BSsyM5Mm.js} +9 -8
- package/dist/{CustomerSupport-BE7qg8WI.js → CustomerSupport-CrNlpDnm.js} +16 -15
- package/dist/{DataConflictsModal-Ez5mMzqA.js → DataConflictsModal-CnePHHgB.js} +10 -9
- package/dist/{DebugModal-B2-a1_2A.js → DebugModal-BSNHP5Ae.js} +13 -13
- package/dist/{DecisionMakerDetails-D8vYcBse.js → DecisionMakerDetails-DwU-PnMz.js} +59 -22
- package/dist/{DecisionMakerDetailsPage-CHLINVDC.js → DecisionMakerDetailsPage-B6soHNL0.js} +35 -17
- package/dist/{DecisionMakers-Cnafi8Ul.js → DecisionMakers-Cq0TqVBQ.js} +22 -20
- package/dist/{Dropzone-D3mN45cH.js → Dropzone-JYR4c6bX.js} +9 -7
- package/dist/{EmbeddedStatus-uz3Ivsyw.js → EmbeddedStatus-CkSg9-9r.js} +5 -4
- package/dist/{EndStateLayout-BUK64Vqu.js → EndStateLayout-CarfWtTC.js} +4 -3
- package/dist/{EntityAssociation-DjEleBIE.js → EntityAssociation-DjvGgE2E.js} +7 -7
- package/dist/{ErrorPanel-Be6eGO6I.js → ErrorPanel-CMHH1nTS.js} +6 -6
- package/dist/GlobalEntryModal-CFk22iXk.js +589 -0
- package/dist/{GlobalEntryPage-3_PbpcUB.js → GlobalEntryPage-DjJZ8GP4.js} +35 -34
- package/dist/Icon-CurE93CX.js +175 -0
- package/dist/{validateExtractionResult-QkXKfGje.js → IdentityNumber-DHn--v-7.js} +7 -344
- package/dist/IdentityNumberFieldGroup-ivJ1jyGI.js +57 -0
- package/dist/IdentityScreeningWorkflow-zNOsMLhY.js +307 -0
- package/dist/{Image-8SOcICah.js → Image-D82terx4.js} +2 -2
- package/dist/{Individual.rules-Ozgltft8.js → Individual.rules-CKRy22gy.js} +9 -10
- package/dist/{IndividualDropin-DXAyTcGh.js → IndividualDropin-iGwLttHz.js} +86 -82
- package/dist/IndustryCodeFieldGroup-9CC2Ujpm.js +188 -0
- package/dist/{InputDate-DDVX2D-5.js → InputDate-9I-vTE2B.js} +2 -2
- package/dist/{InputText-Cf9ccCaj.js → InputText-Co02nT5L.js} +41 -6
- package/dist/{Introduction-ChXvkTjG.js → Introduction-BrP3b2Vs.js} +9 -8
- package/dist/{InvitedDecisionMakerComponent-BpToVKx6.js → InvitedDecisionMakerComponent-DmZh2BsQ.js} +48 -46
- package/dist/{JpAddressFields-tIf74G41.js → JpAddressFields-_PYHM7ee.js} +51 -11
- package/dist/{LegalCompanyNameField-BfkXdcjt.js → LegalCompanyNameField-C04RZp2O.js} +5 -5
- package/dist/LegalName-uERLVj_B.js +33 -0
- package/dist/{LegalRepresentativeDetailsPage-CJNdb_Yi.js → LegalRepresentativeDetailsPage-Ci3oO3ix.js} +11 -11
- package/dist/{Link-B7RA2gSt.js → Link-B-gN0d8l.js} +2 -2
- package/dist/{ListItem-Cy46BXUv.js → ListItem-BGdnopqb.js} +3 -3
- package/dist/Loader-BEpMlKm2.js +92 -0
- package/dist/{Modal-nylR9F4X.js → Modal-C6gfqa3Z.js} +3 -3
- package/dist/{Name-SuGGhRna.js → Name-PDN2ZxmV.js} +5 -5
- package/dist/{NewSummary-u_1KGI2X.js → NewSummary-BKUTkBAU.js} +10 -9
- package/dist/{PatriotActDisclosure-CudamdZG.js → PatriotActDisclosure-D6J1hjaU.js} +110 -222
- package/dist/{PayoutDetailsDropin-CGuM-jhl.js → PayoutDetailsDropin-CEbLLMkT.js} +243 -156
- package/dist/{PayoutDetailsPage-B-iD21gT.js → PayoutDetailsPage-z-U987Uw.js} +9 -9
- package/dist/{CountryField-BC0wDSlI.js → RadioGroup-B_lHSMq9.js} +168 -13
- package/dist/{Review-C18hR0ho.js → Review-DRxhY1FP.js} +8 -8
- package/dist/RootBusinessDetailsPage-Dgezqj6k.js +68 -0
- package/dist/{RootBusinessLinesPage-Cwqxq4ct.js → RootBusinessLinesPage-DHL_atq0.js} +34 -30
- package/dist/{RootIndividualDetailsPage-C1Ulh9yT.js → RootIndividualDetailsPage-DmF9Av8J.js} +12 -12
- package/dist/{Select-Dmn4bMEK.js → Select-PqhoL_oQ.js} +11 -8
- package/dist/{useSettingsContext-Bpf4UqRT.js → SettingsContext-Dl-9WWCI.js} +2 -8
- package/dist/{SignPCIComponent-DJYIl0JN.js → SignPCIComponent-BT1s1NJx.js} +44 -43
- package/dist/{SingpassSelection-nwwRlowI.js → SingpassSelection-B91AO2sW.js} +7 -6
- package/dist/SoleProprietorshipPage-Cy7D2N5d.js +70 -0
- package/dist/{SourceOfFundsPage-_zuCmR_g.js → SourceOfFundsPage-Co81WwYJ.js} +40 -38
- package/dist/SourceOfFundsWorkflow-xv-wmYjn.js +28 -0
- package/dist/{utils-eFdC-IQw.js → StateField-uZDljrxJ.js} +82 -8
- package/dist/Step-cy9IjT4h.js +195 -0
- package/dist/{StructuredList-DpzDjXNV.js → StructuredList-BKWmLAYe.js} +6 -5
- package/dist/Task-B05SmIvp.js +129 -0
- package/dist/TaskGroup-CCneo6Tt.js +46 -0
- package/dist/{TaskListItem-CKO2Us74.js → TaskListItem-DRUWL-3r.js} +12 -58
- package/dist/TaskStepperContextProvider-DuM9tlet.js +81 -0
- package/dist/{TaskVerificationStatus-DMj8rsZ_.js → TaskVerificationStatus-DCfFNRJc.js} +4 -3
- package/dist/TaxInformationFieldGroup-pBDZmrIx.js +288 -0
- package/dist/{TaxReportingDropin-DhSxTmTT.js → TaxReportingDropin-DLiaJcDy.js} +23 -21
- package/dist/TaxReportingWorkflow-BD7DTvXl.js +28 -0
- package/dist/{TermsOfServiceManagement-CeJZwKwl.js → TermsOfServiceManagement-dIJFQSNn.js} +49 -47
- package/dist/{TextArea-CoS-i-FF.js → TextArea-E1LIeudB.js} +7 -13
- package/dist/{TrustDetailsPage-BwrCUski.js → TrustDetailsPage-CVIKeFQW.js} +433 -442
- package/dist/TrustMemberCompanyPage-B5F1D3QE.js +109 -0
- package/dist/{TrustMemberIndividualPage-B3_G3BPJ.js → TrustMemberIndividualPage-BovRg-Mq.js} +12 -12
- package/dist/{TrustMemberRoleAndTypePage-CVvfVi_N.js → TrustMemberRoleAndTypePage-CofPOUX5.js} +48 -47
- package/dist/{TrustMembersOverview-CUHU8cFd.js → TrustMembersOverview-d_SZlrW5.js} +42 -40
- package/dist/Typography-CAc_f5Iq.js +80 -0
- package/dist/UboTaskItem-CG07K7K_.js +115 -0
- package/dist/{UnincorporatedPartnershipIndividualPage-CYNhHZk8.js → UnincorporatedPartnershipIndividualPage-kobyT_Sc.js} +11 -11
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-BC9dJEH3.js → UnincorporatedPartnershipMemberCompanyPage-MvFM-iYR.js} +36 -36
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-BcNgMOlJ.js → UnincorporatedPartnershipMemberRoleAndTypePage-DWu78HTQ.js} +12 -12
- package/dist/{UnincorporatedPartnershipMembersOverview-CSTERzB3.js → UnincorporatedPartnershipMembersOverview-B-WsX9qd.js} +10 -9
- package/dist/{VerificationErrorAlert-Ci453mfn.js → VerificationErrorAlert-D6Fwj_k3.js} +5 -5
- package/dist/Workflow-CZMd0lUc.js +228 -0
- package/dist/{accountHolderUtils-zbNnEvvh.js → accountHolderUtils-Bf4y2QFq.js} +3 -3
- package/dist/adyen-business-financing.js +35 -35
- package/dist/adyen-individual-configuration.js +37 -37
- package/dist/adyen-individual-status.js +34 -34
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +67 -63
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +6 -6
- package/dist/adyen-transfer-instrument-configuration.js +33 -33
- package/dist/adyen-transfer-instrument-management.js +44 -41
- package/dist/adyen-verification-status.js +8 -6
- package/dist/{utils-Be9xux9M.js → bafinUtils-CT-a64QP.js} +684 -167
- package/dist/{bg-BG-qQc6pN4K.js → bg-BG-BeFIiwVZ.js} +3 -1
- package/dist/bg-BG-CXqERnFH.js +7 -0
- package/dist/bg-BG-D4mSRREu.js +7 -0
- package/dist/{bg-BG-Smu9r9Kp.js → bg-BG-DpSUitm0.js} +12 -2
- package/dist/{constants-CgndY-Nk.js → constants-B8ghpskV.js} +5 -5
- package/dist/{countries-CPj8hkLs.js → countries-BE4iGVAo.js} +1 -1
- package/dist/{country-IYuKDSdC.js → country-DkgapJ4w.js} +2 -2
- package/dist/cs-CZ-C_VaBRMS.js +23 -0
- package/dist/cs-CZ-DAXMHrMi.js +7 -0
- package/dist/{cs-CZ-Jsmhr_B3.js → cs-CZ-DHfA1xjQ.js} +3 -1
- package/dist/cs-CZ-DySBJFlc.js +7 -0
- package/dist/{da-DK-CXZXQspY.js → da-DK--DlccBc0.js} +3 -1
- package/dist/da-DK-BVaEiAWd.js +7 -0
- package/dist/da-DK-BfaKncp5.js +23 -0
- package/dist/da-DK-BuvKW6Sq.js +7 -0
- package/dist/de-DE-BQaqplTp.js +7 -0
- package/dist/{de-DE-BRJ0jBty.js → de-DE-B_iHAkLT.js} +3 -1
- package/dist/de-DE-BqujMxXu.js +7 -0
- package/dist/de-DE-GUfA18ps.js +23 -0
- package/dist/{decisionMaker-Dt53wKqO.js → decisionMaker-M0Tm92JR.js} +1 -1
- package/dist/{decisionMakerRoles-CTy0faoW.js → decisionMakerRoles-DbKnutwk.js} +3 -3
- package/dist/el-GR-B1NjHThy.js +7 -0
- package/dist/el-GR-C6jyW53I.js +7 -0
- package/dist/{el-GR-DEBvBgI-.js → el-GR-CJqHd-CD.js} +12 -2
- package/dist/{el-GR-BMGYrO4V.js → el-GR-D09thseu.js} +3 -1
- package/dist/en-US-C3i5Oge2.js +7 -0
- package/dist/en-US-CJPD8qHc.js +7 -0
- package/dist/{en-US-BFM81i9K.js → en-US-CO9xzDL5.js} +1 -4
- package/dist/en-US-D4NrsDmW.js +7 -0
- package/dist/{en-US.instructions-pRLq5gXB.js → en-US.instructions-CqF1qVJV.js} +2 -1
- package/dist/{entityAssociationUtil-DLXInibJ.js → entityAssociationUtil-CLBR9osP.js} +1 -1
- package/dist/{error-Dw40w6WM.js → error-DIUYkZG-.js} +3 -3
- package/dist/es-ES-BM5RTwb7.js +7 -0
- package/dist/{es-ES-pt4yy_U2.js → es-ES-Bpxn6XGC.js} +3 -1
- package/dist/es-ES-C64v4NJD.js +7 -0
- package/dist/es-ES-IobfbI71.js +23 -0
- package/dist/es-LA--YYwwbVo.js +23 -0
- package/dist/es-LA-B7pY2dp1.js +7 -0
- package/dist/es-LA-CcMAcJ7u.js +7 -0
- package/dist/{es-LA-CGrMi4rR.js → es-LA-CjxlB1WZ.js} +3 -1
- package/dist/et-EE-DqYCOl2Y.js +23 -0
- package/dist/{et-EE-dDMeDiTJ.js → et-EE-Dtc7YYb4.js} +3 -1
- package/dist/{et-EE-BGpsJPjk.js → et-EE-FtKFvr3u.js} +2 -2
- package/dist/{et-EE-OAYKzRjG.js → et-EE-wDQx9HoZ.js} +2 -2
- package/dist/{fi-FI-iRb7nS7X.js → fi-FI-DBhYlO4B.js} +3 -1
- package/dist/{fi-FI-BTG87BwH.js → fi-FI-DSCFTLoG.js} +12 -2
- package/dist/fi-FI-KMP96Qxc.js +7 -0
- package/dist/fi-FI-SFw2grVp.js +7 -0
- package/dist/{MaskedInput-DhHmuLSN.js → form-rules-DCZ-uyGo.js} +378 -14
- package/dist/formHook-Dgi2CgbT.js +24 -0
- package/dist/{formatValidationError-XKzTY3nX.js → formatValidationError-HjSxukRu.js} +2 -2
- package/dist/fr-FR-C8IPWMDL.js +7 -0
- package/dist/fr-FR-Dsh0Vb20.js +7 -0
- package/dist/{fr-FR-DUrcyeOg.js → fr-FR-N8UDU_0Y.js} +3 -1
- package/dist/fr-FR-ZWnkRO7z.js +23 -0
- package/dist/{AnalyticsContext-BnRQ9H1u.js → genUtils-Ce61IJs8.js} +2 -17
- package/dist/{getLegalEntityCountry-BHh7Ux8v.js → getLegalEntityCountry-CNE5uei8.js} +1 -1
- package/dist/{getName-C5jqdkJg.js → getName-s7qmFean.js} +2 -2
- package/dist/{getProblemsForEntity-DStlTvE-.js → getProblemsForEntity-CTxd78-9.js} +4 -4
- package/dist/{getTrustedDecisionMakers-CAbhvydj.js → getTrustedDecisionMakers-DWVtW7JE.js} +2 -2
- package/dist/hr-HR-2a3ywU0e.js +23 -0
- package/dist/hr-HR-COvc9TZy.js +7 -0
- package/dist/hr-HR-Cqgf9B0v.js +7 -0
- package/dist/{hr-HR-LnDb18bf.js → hr-HR-GLRwxTIZ.js} +3 -1
- package/dist/{http-D6AdUBhO.js → http-DsJtugN1.js} +2 -2
- package/dist/hu-HU-BOXBLK1a.js +23 -0
- package/dist/{hu-HU-VLUIAFMp.js → hu-HU-DIjDe5aa.js} +2 -2
- package/dist/{hu-HU-D9Avt-9f.js → hu-HU-DyM1X3r6.js} +2 -2
- package/dist/{hu-HU-Cc7wqn6A.js → hu-HU-s1MKqwI4.js} +3 -1
- package/dist/{isEmpty-MyMko24J.js → isEmpty-DD8Insy0.js} +2 -2
- package/dist/{it-IT-BPA_Upt_.js → it-IT-2reNk09A.js} +3 -1
- package/dist/it-IT-BKTDLRBT.js +7 -0
- package/dist/it-IT-Dj2NtH7G.js +23 -0
- package/dist/it-IT-xXO07yyz.js +7 -0
- package/dist/{ja-JP-CYb1SAoz.js → ja-JP-Bf97gKqg.js} +3 -1
- package/dist/ja-JP-BhHK_ru2.js +7 -0
- package/dist/ja-JP-DbLRpEVj.js +7 -0
- package/dist/{ja-JP-Yi2wExJE.js → ja-JP-lXTbRXBb.js} +12 -2
- package/dist/{localizeDateString-D-MlYN4V.js → localizeDateString-Dxlqr4rL.js} +2 -2
- package/dist/logger-Z8AeTE4x.js +29 -0
- package/dist/{lt-LT-B9Nm7OZQ.js → lt-LT-BUgsY7cD.js} +3 -1
- package/dist/lt-LT-Be3q6tyu.js +7 -0
- package/dist/lt-LT-Btr5el2q.js +7 -0
- package/dist/lt-LT-COUN4qC5.js +23 -0
- package/dist/lv-LV-8wOWTo3r.js +7 -0
- package/dist/{lv-LV-DkjsE74u.js → lv-LV-BpniO6xp.js} +3 -1
- package/dist/lv-LV-DCeyOqHY.js +7 -0
- package/dist/lv-LV-DKbvF9t_.js +23 -0
- package/dist/{mapExistingFile-LvvzPjnk.js → mapExistingFile-R6-FnjjY.js} +2 -2
- package/dist/{mapJpAddressSchemaToAddressLocalizations-DzLVWIs7.js → mapJpAddressSchemaToAddressLocalizations-CnoGHZz_.js} +3 -3
- package/dist/{mapLegalEntityToIndividualSchema-DdNuOsAz.js → mapLegalEntityToIndividualSchema-C5lQR5IO.js} +10 -9
- package/dist/{mapTransferInstrumentToPayoutAccount-cKBtK0Qx.js → mapTransferInstrumentToPayoutAccount-D-RdVquH.js} +3 -3
- package/dist/nl-NL-CdHkQcOS.js +7 -0
- package/dist/nl-NL-CtK4OR3t.js +23 -0
- package/dist/nl-NL-Dyb3tkBi.js +7 -0
- package/dist/{nl-NL-BtdPxlFm.js → nl-NL-_B3Ey_x1.js} +3 -1
- package/dist/no-NO-B-xCUkf4.js +7 -0
- package/dist/no-NO-CxZumo2p.js +23 -0
- package/dist/{no-NO-BIhMgC99.js → no-NO-CytzrDfA.js} +3 -1
- package/dist/no-NO-DXDddmYv.js +7 -0
- package/dist/pl-PL-CBwRmIu5.js +7 -0
- package/dist/pl-PL-Cc09pXO8.js +7 -0
- package/dist/pl-PL-Csv1Lg5y.js +23 -0
- package/dist/{pl-PL-BT6NmGgO.js → pl-PL-DLBeIbY5.js} +3 -1
- package/dist/{processCapabilities-BSpmJOEd.js → processCapabilities-uXoRmB5x.js} +2 -2
- package/dist/{processValidationErrors-DgBZ7oLn.js → processValidationErrors-Cm3cBtN7.js} +3 -3
- package/dist/{pt-BR-B0SUw4uu.js → pt-BR-Cf5Jif3w.js} +3 -1
- package/dist/pt-BR-DA4PVtVa2.js +7 -0
- package/dist/pt-BR-IBsCApUj.js +23 -0
- package/dist/pt-BR-hMhyqixD.js +7 -0
- package/dist/pt-PT-CYKk0WDI.js +23 -0
- package/dist/{pt-PT-KikTTc5A.js → pt-PT-Cg7oMqTO.js} +3 -1
- package/dist/pt-PT-D2qX_lOd.js +7 -0
- package/dist/pt-PT-QU0CQs-d.js +7 -0
- package/dist/{resolveEnvironment-I0NAzeCT.js → resolveEnvironment-wbFNXSP-.js} +68 -46
- package/dist/ro-RO-23qEGblz.js +23 -0
- package/dist/ro-RO-CQjOM8e-.js +7 -0
- package/dist/ro-RO-DNye-gMC.js +7 -0
- package/dist/{ro-RO-DajmyI4j.js → ro-RO-UHWXt9rv.js} +3 -1
- package/dist/sk-SK-2jlbtz2r.js +7 -0
- package/dist/{sk-SK-DJWcs0qJ.js → sk-SK-BQHhBpDH.js} +3 -1
- package/dist/sk-SK-CwbBfCsU.js +7 -0
- package/dist/sk-SK-D8j8B4ng.js +23 -0
- package/dist/sl-SI-333ryFnM.js +23 -0
- package/dist/sl-SI-9XdXVgB8.js +7 -0
- package/dist/{sl-SI-C_QeUL6t.js → sl-SI-CTrggdef.js} +3 -1
- package/dist/sl-SI-Cyx0QtxG.js +7 -0
- package/dist/style.css +693 -672
- package/dist/styles-DYaAeu4q.js +693 -672
- package/dist/{sv-SE-D3MOTV-T.js → sv-SE-Bk55FXGN.js} +3 -1
- package/dist/sv-SE-CqhSdYBe.js +7 -0
- package/dist/sv-SE-CwsP7bTA.js +23 -0
- package/dist/sv-SE-kbf3zbjX.js +7 -0
- package/dist/{translation-DH4IlMCP.js → translation-BOm4lmPx.js} +3 -271
- package/dist/types/adaptiveWorkflow/AdaptiveWorkflow.d.ts +5 -2
- package/dist/types/adaptiveWorkflow/component-registry.d.ts +32 -39
- package/dist/types/adaptiveWorkflow/components/Fields/BusinessRegistrationNumber/BusinessRegistrationNumberFieldGroup.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/components/Fields/BusinessRegistrationNumber/ExemptedFromRegistrationNumberField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/BusinessRegistrationNumber/RegistrationNumberInputField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/BusinessRegistrationNumber/RegistrationNumberTypeSelectorField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/IdentityNumber/IdentityNumberFieldGroup.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/components/Fields/IndustryCode/IndustryCodeFieldGroup.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/components/Fields/LegalName.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/ExemptedFromTaxField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxIdNumberInputField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxIdTypeSelectorField.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxInformationFieldGroup.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/components/Layout/DynamicForm/{useCustomerDataV2.d.ts → useCustomerData.d.ts} +4 -9
- package/dist/types/adaptiveWorkflow/components/Layout/Steps/IdentityScreeningWorkflow/IdentityScreening.d.ts +19 -0
- package/dist/types/adaptiveWorkflow/components/Layout/Steps/{IdentityScreeningWorkflow.d.ts → IdentityScreeningWorkflow/IdentityScreeningWorkflow.d.ts} +1 -1
- package/dist/types/adaptiveWorkflow/components/Layout/Steps/Step/contextMap.d.ts +8 -1
- package/dist/types/adaptiveWorkflow/components/Layout/Task/contextMap.d.ts +9 -1
- package/dist/types/adaptiveWorkflow/components/Layout/TaskGroup/contextMap.d.ts +8 -1
- package/dist/types/adaptiveWorkflow/components/Layout/Workflow/Workflow.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/{WorkflowEndState → Layout/Workflow/WorkflowEndState}/WorkflowEndState.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/{WorkflowHeading → Layout/Workflow/WorkflowHeading}/WorkflowHeading.d.ts +1 -1
- package/dist/types/adaptiveWorkflow/components/NodeRenderer/NodeRenderer.d.ts +4 -5
- package/dist/types/adaptiveWorkflow/components/types.d.ts +4 -108
- package/dist/types/{context → adaptiveWorkflow/context}/WorkflowContext/WorkflowContext.d.ts +2 -2
- package/dist/types/adaptiveWorkflow/formHook.d.ts +2 -2
- package/dist/types/api/adaptive/adaptiveWorkflow.types.d.ts +2 -3
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutSummary.d.ts +14 -0
- package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +2 -1
- package/dist/types/components/Business/forms/rules.constants.d.ts +0 -17
- package/dist/types/components/Business/utils/utils.d.ts +0 -1
- package/dist/types/components/GlobalEntry/constants.d.ts +0 -22
- package/dist/types/components/GlobalEntry/fields/EntitySetupField/EntitySetupField.d.ts +2 -1
- package/dist/types/components/GlobalEntry/fields/EntitySetupField/types.d.ts +1 -1
- package/dist/types/components/GlobalEntry/fields/PaperworkQuestionnaire/PaperworkQuestionnaire.d.ts +1 -1
- package/dist/types/components/GlobalEntry/fields/PaperworkQuestionnaire/types.d.ts +1 -1
- package/dist/types/components/GlobalEntry/fields/UnincorporatedOrganizationTypeField/UnincorporatedOrganizationTypeField.d.ts +2 -1
- package/dist/types/components/GlobalEntry/fields/UnincorporatedOrganizationTypeField/types.d.ts +1 -1
- package/dist/types/components/GlobalEntry/forms/EntityInformation/EntityInformation.d.ts +4 -1
- package/dist/types/components/GlobalEntry/forms/EntityInformation/types.d.ts +2 -1
- package/dist/types/components/GlobalEntry/forms/RegistrationInformation/RegistrationInformation.d.ts +8 -2
- package/dist/types/components/GlobalEntry/forms/RegistrationInformation/types.d.ts +5 -1
- package/dist/types/components/GlobalEntry/rules.d.ts +23 -0
- package/dist/types/components/GlobalEntry/tasks/GlobalEntry.d.ts +6 -1
- package/dist/types/components/GlobalEntry/utils.d.ts +3 -0
- package/dist/types/components/GlobalEntry/validate.d.ts +9 -1
- package/dist/types/components/Individual/forms/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +4 -1
- package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +7 -2
- package/dist/types/components/Shared/SummarySection/SummarySection.d.ts +1 -0
- package/dist/types/components/Shared/VerifiedWith/VerifiedWith.d.ts +7 -0
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +0 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/CountryOfGoverningLawField.d.ts +1 -1
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/constants.d.ts +2 -0
- package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/StateField.d.ts +1 -1
- package/dist/types/components/Shared/fields/StateField/types.d.ts +3 -2
- package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +4 -0
- package/dist/types/components/Shared/forms/Address/AddressFields.d.ts +1 -2
- package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
- package/dist/types/components/Trust/forms/Trust/Trust.d.ts +13 -0
- package/dist/types/components/Trust/forms/Trust/form-ids.d.ts +2 -0
- package/dist/types/components/Trust/{tasks/TrustDropin/Trust.d.ts → forms/Trust/forms.d.ts} +3 -4
- package/dist/types/components/Trust/forms/Trust/types.d.ts +1 -20
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetails.d.ts +2 -3
- package/dist/types/components/Trust/forms/TrustRegistrationDetails/types.d.ts +2 -2
- package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +3 -3
- package/dist/types/components/Trust/tasks/TrustDropin/TrustDropin.d.ts +1 -1
- package/dist/types/components/Trust/tasks/TrustDropin/types.d.ts +15 -0
- package/dist/types/router/routeConfig.d.ts +1 -1
- package/dist/types/utils/businessUtils.d.ts +19 -0
- package/dist/types/utils/entityStatusUtil.d.ts +1 -1
- package/dist/{types-BLWT7WnU.js → types-Ai_80DXu.js} +1 -1
- package/dist/{types-B4LsyK73.js → types-BeveNAZK.js} +1 -1
- package/dist/{types-Bm4RGrSI.js → types-CdxNdaM6.js} +1 -1
- package/dist/useAdaptiveWorkflow-DsQESk9f.js +28 -0
- package/dist/{useAssociatedLegalEntity-CzQlHWXy.js → useAssociatedLegalEntity-BdcoiUby.js} +3 -3
- package/dist/{useBusinessDetailsData-D2SKV7CO.js → useBusinessDetailsData-D6CY5gWd.js} +93 -186
- package/dist/{useBusinessLines-D-rc-Z6G.js → useBusinessLines-BhSN6qCH.js} +2 -2
- package/dist/{useCanSeeIntroduction-DGtlX3lt.js → useCanSeeIntroduction-Ci3FC4DJ.js} +4 -5
- package/dist/{useCreateLegalEntity-Ctdmk3Ky.js → useCreateLegalEntity-CYZd_62a.js} +2 -2
- package/dist/{useDataMissingRemediations-DNZ_UDbI.js → useDataMissingRemediations-Cd-jucOu.js} +3 -3
- package/dist/{useForm-T9qxtTlE.js → useForm-D9htlwjI.js} +5 -5
- package/dist/useHideTaskStepper-MdPt1zI8.js +25 -0
- package/dist/{useId-InBEunao.js → useId-zuKUQ8ly.js} +4 -4
- package/dist/useIndustryCodes-uAj90IyS.js +32 -0
- package/dist/{useLegalEntity-DR51Q4mE.js → useLegalEntity-QQXN6YOm.js} +2 -2
- package/dist/{useNavigate-BT8Z1amQ.js → useNavigate-BPlIHbOr.js} +33 -33
- package/dist/{useOnboardingStatus-op5TyMUR.js → useOnboardingStatus-CsGUjkm-.js} +2 -2
- package/dist/{usePciQuestionnaireList-BZsgbrTy.js → usePciQuestionnaireList-CFNJD8pS.js} +2 -2
- package/dist/{useSalesChannels-Mi6DmHab.js → useSalesChannels-CSp1PYlL.js} +5 -5
- package/dist/{useScenarios-Bne3C0PV.js → useScenarios-CGcmXgJv.js} +3 -3
- package/dist/{useTaskLandedEvent-C7fcguXK.js → useTaskLandedEvent-BCvoFRym.js} +2 -2
- package/dist/{useTaskStatus-Be6XyW54.js → useTaskStatus-CgrhdaE_.js} +2 -2
- package/dist/useTaskStepperContext-BIEhTt1x.js +15 -0
- package/dist/{useTermsOfServiceStatus-D0NHUKl_.js → useTermsOfServiceStatus-DbJDklA2.js} +2 -2
- package/dist/{useTrustMembers-B0Rg3wyX.js → useTrustMembers-BR2VfPMj.js} +6 -6
- package/dist/{useUnincorporatedPartnershipMembers-C5CNWe_U.js → useUnincorporatedPartnershipMembers-00l8eNLk.js} +5 -5
- package/dist/{useUpdateBusinessLines-D6D9DAn1.js → useUpdateBusinessLines-DCKYTzxd.js} +4 -29
- package/dist/{useUpdateLegalEntity-DtWHsFZ9.js → useUpdateLegalEntity-B6oM8kXX.js} +3 -3
- package/dist/{utils-BKAldHdP.js → utils-2s4JuDg2.js} +8 -8
- package/dist/{utils-DwujAUJC.js → utils-Br7Ah3uy.js} +1 -1
- package/dist/utils-CFaGY5aD.js +52 -0
- package/dist/{validate-DRp09YPF.js → validate-B7VTIiia.js} +1 -1
- package/dist/{validate-BNu91k9j.js → validate-D3UP_q_2.js} +10 -6
- package/dist/validate-Pfp0KXdh.js +125 -0
- package/dist/{validate-BtvWBgdt.js → validate-_NwYQ8tj.js} +4 -4
- package/dist/validateExtractionResult-BnSV5Z6F.js +343 -0
- package/dist/{validationError-D5iB4HOa.js → validationError-BgIcYxoa.js} +2 -2
- package/package.json +2 -2
- package/dist/AdaptiveWorkflow-DGwymf21.js +0 -5112
- package/dist/Address-DmDfexg6.js +0 -133
- package/dist/GlobalEntryModal-D6dN9IAJ.js +0 -353
- package/dist/JpAddress-DOw7YLKt.js +0 -284
- package/dist/JpAddress.module-OYxAFctC.js +0 -48
- package/dist/RadioGroup-C4csROhR.js +0 -84
- package/dist/RootBusinessDetailsPage-CFdd54bg.js +0 -68
- package/dist/SoleProprietorshipPage-C8FIHuAF.js +0 -70
- package/dist/TrustMemberCompanyPage-Da8JTcd4.js +0 -109
- package/dist/bafinUtils-9rBblM1a.js +0 -276
- package/dist/bg-BG-BkIvSbsH.js +0 -7
- package/dist/bg-BG-Bmveyt6S.js +0 -7
- package/dist/cs-CZ-BQ5B0-Kt.js +0 -13
- package/dist/cs-CZ-CPvgcrDs.js +0 -7
- package/dist/cs-CZ-D5CQd_YI.js +0 -7
- package/dist/da-DK-Bl0-8FN4.js +0 -7
- package/dist/da-DK-CXAIXO3c.js +0 -13
- package/dist/da-DK-D5969QKP.js +0 -7
- package/dist/de-DE-DFQGGPCj.js +0 -13
- package/dist/de-DE-Hah2EvAY.js +0 -7
- package/dist/de-DE-uDUBu-3n.js +0 -7
- package/dist/debugStore-DpSgCNGn.js +0 -40
- package/dist/el-GR-C9KGlGa7.js +0 -7
- package/dist/el-GR-DWh7gn7M.js +0 -7
- package/dist/en-US-DqhKW1eC.js +0 -7
- package/dist/en-US-MqobYcqc.js +0 -7
- package/dist/en-US-X8pjkwa3.js +0 -7
- package/dist/es-ES-C7XCTACS.js +0 -7
- package/dist/es-ES-DSwi-qfd.js +0 -7
- package/dist/es-ES-_qbfha1o.js +0 -13
- package/dist/es-LA-0IrX8yr2.js +0 -7
- package/dist/es-LA-1H8dAUVR.js +0 -7
- package/dist/es-LA-DF0v3VMe.js +0 -13
- package/dist/et-EE-evCiUrFW.js +0 -13
- package/dist/fi-FI-BdrXeX9d.js +0 -7
- package/dist/fi-FI-Cdof5NRG.js +0 -7
- package/dist/fieldConfigurations-CZCFghnK.js +0 -11
- package/dist/form-rules-DV3hxYqZ.js +0 -359
- package/dist/fr-FR-DIiBHkhs.js +0 -13
- package/dist/fr-FR-NOULV1vy.js +0 -7
- package/dist/fr-FR-hleHEr-Y.js +0 -7
- package/dist/hr-HR--ti3n_XO.js +0 -7
- package/dist/hr-HR-2h3d5-q3.js +0 -7
- package/dist/hr-HR-DofgeWWO.js +0 -13
- package/dist/hu-HU-FdLZGnBz.js +0 -13
- package/dist/it-IT-CWIAGNlE.js +0 -7
- package/dist/it-IT-CXgZZgyU.js +0 -13
- package/dist/it-IT-Dq5z7p1-.js +0 -7
- package/dist/ja-JP-C1c2UPpy.js +0 -7
- package/dist/ja-JP-Dyhw0Ycj.js +0 -7
- package/dist/japanSupportUtils-H5Zfox2v.js +0 -11
- package/dist/lt-LT-BMI4JzrS.js +0 -7
- package/dist/lt-LT-BZ6seLuB.js +0 -13
- package/dist/lt-LT-C62dFtWW.js +0 -7
- package/dist/lv-LV-CMYrAWqu.js +0 -13
- package/dist/lv-LV-LkNZQ__4.js +0 -7
- package/dist/lv-LV-W0I-UUyj.js +0 -7
- package/dist/nl-NL-C9HoBicG.js +0 -7
- package/dist/nl-NL-CC2r7Ldv.js +0 -7
- package/dist/nl-NL-CiH1raQa.js +0 -13
- package/dist/no-NO-Bo9rlROU.js +0 -7
- package/dist/no-NO-Ce2vzrp7.js +0 -13
- package/dist/no-NO-V7_rz3uN.js +0 -7
- package/dist/patternValidators-C8cRrD-t.js +0 -73
- package/dist/pl-PL-2QyKX67Y.js +0 -7
- package/dist/pl-PL-STp7eeFE.js +0 -7
- package/dist/pl-PL-aErZF5Xz.js +0 -13
- package/dist/pt-BR-CFGpH3BW.js +0 -7
- package/dist/pt-BR-D08Fo1qY.js +0 -7
- package/dist/pt-BR-hRRebYjo.js +0 -13
- package/dist/pt-PT-BAQWYDe6.js +0 -7
- package/dist/pt-PT-BHR4CEnv.js +0 -7
- package/dist/pt-PT-UAIvemf-.js +0 -13
- package/dist/ro-RO-BJeKitCz.js +0 -13
- package/dist/ro-RO-ni-ZNqXU.js +0 -7
- package/dist/ro-RO-wG0rfL5w.js +0 -7
- package/dist/sk-SK-DJinBnS1.js +0 -7
- package/dist/sk-SK-DQAGAOJW.js +0 -7
- package/dist/sk-SK-ztSYyXUE.js +0 -13
- package/dist/sl-SI-B-MLX0nT.js +0 -7
- package/dist/sl-SI-BY4TzP-F.js +0 -13
- package/dist/sl-SI-DUaLO_J7.js +0 -7
- package/dist/sv-SE-5uxyEq2a.js +0 -7
- package/dist/sv-SE-CNQCI2nX.js +0 -7
- package/dist/sv-SE-CrUbxniG.js +0 -13
- package/dist/toFullWidth-Dgy4X4i8.js +0 -52
- package/dist/types/adaptiveWorkflow/component-registry-v2.d.ts +0 -46
- package/dist/types/adaptiveWorkflow/components/DynamicForm/DynamicForm.d.ts +0 -8
- package/dist/types/adaptiveWorkflow/components/DynamicForm/contextMap.d.ts +0 -2
- package/dist/types/adaptiveWorkflow/components/DynamicForm/useCustomerData.d.ts +0 -25
- package/dist/types/adaptiveWorkflow/components/Fields/AcceptTermsOfServiceWorkflow/AcceptTermsOfServiceWorkflow.d.ts +0 -5
- package/dist/types/adaptiveWorkflow/components/Fields/IdentityScreening/IdentityScreeningWorkflow.d.ts +0 -18
- package/dist/types/adaptiveWorkflow/components/Fields/SourceOfFundsWorkflow/SourceOfFundsWorkflow.d.ts +0 -6
- package/dist/types/adaptiveWorkflow/components/Fields/TaxReportingWorkflow/TaxReportingWorkflow.d.ts +0 -6
- package/dist/types/adaptiveWorkflow/components/SpecializedComponent/SpecializedComponent.d.ts +0 -34
- package/dist/types/adaptiveWorkflow/components/SubTask/SubTask.d.ts +0 -7
- package/dist/types/adaptiveWorkflow/components/SubTask/contextMap.d.ts +0 -2
- package/dist/types/adaptiveWorkflow/components/Task/Task.d.ts +0 -6
- package/dist/types/adaptiveWorkflow/components/Task/contextMap.d.ts +0 -2
- package/dist/types/adaptiveWorkflow/components/TaskGroup/TaskGroup.d.ts +0 -6
- package/dist/types/adaptiveWorkflow/components/TaskGroup/contextMap.d.ts +0 -2
- package/dist/types/adaptiveWorkflow/components/TaskGroupParser/TaskGroupParser.d.ts +0 -7
- package/dist/types/adaptiveWorkflow/components/TaskItems/UboTaskItem/UboTaskItem.d.ts +0 -16
- package/dist/types/adaptiveWorkflow/components/TaskParser/TaskParser.d.ts +0 -7
- package/dist/types/components/Shared/forms/Address/localized/jp/JpAddress.d.ts +0 -7
- package/dist/uppercase-DvjwUM0n.js +0 -7
- /package/dist/types/{context → adaptiveWorkflow/context}/WorkflowContext/WorkflowContextProvider.d.ts +0 -0
- /package/dist/types/{context → adaptiveWorkflow/context}/WorkflowContext/useWorkflowContext.d.ts +0 -0
|
@@ -1,18 +1,96 @@
|
|
|
1
1
|
try {
|
|
2
2
|
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3877dfbe-4db5-4680-89f6-907f0f567b18", e._sentryDebugIdIdentifier = "sentry-dbid-3877dfbe-4db5-4680-89f6-907f0f567b18");
|
|
4
4
|
} catch (e) {}
|
|
5
|
-
import { r as useTranslation } from "./translation-
|
|
5
|
+
import { r as useTranslation } from "./translation-BOm4lmPx.js";
|
|
6
|
+
import { j as useToggleContext, mt as useAccountHolder } from "./resolveEnvironment-wbFNXSP-.js";
|
|
7
|
+
import { t as Icon } from "./Icon-CurE93CX.js";
|
|
8
|
+
import { t as Typography } from "./Typography-CAc_f5Iq.js";
|
|
6
9
|
import { t as LegalEntityTypes } from "./legal-entity-type-0MfCGzUf.js";
|
|
10
|
+
import { i as noop } from "./genUtils-Ce61IJs8.js";
|
|
7
11
|
import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { a as
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
|
|
13
|
+
import { t as DecisionMakerTypes } from "./decision-maker-type-NR4GFAeT.js";
|
|
14
|
+
import { t as Scenarios } from "./get-scenarios-Bb-paHmJ.js";
|
|
15
|
+
import { i as useAnalyticsContext, r as KEYBOARD_KEYS } from "./Modal-C6gfqa3Z.js";
|
|
16
|
+
import { a as uppercase, c as customInputs, d as numericInputs, f as spacer, l as makeMask, n as MaskedInput, o as alphaInputs, s as alphanumericInputs, u as nonInputs } from "./form-rules-DCZ-uyGo.js";
|
|
17
|
+
import { t as useId } from "./useId-zuKUQ8ly.js";
|
|
18
|
+
import { f as translateTranslatable, r as Field } from "./Select-PqhoL_oQ.js";
|
|
19
|
+
import { c as validatePatternOnBlur, l as resolveFieldMetadata, s as validateNotEmptyOnBlur, t as RadioGroup } from "./RadioGroup-B_lHSMq9.js";
|
|
20
|
+
import { t as Checkbox } from "./Checkbox-B-hhlkoQ.js";
|
|
21
|
+
import { useCallback, useEffect, useMemo, useRef } from "preact/hooks";
|
|
22
|
+
import cx from "classnames";
|
|
23
|
+
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
24
|
+
import { computed, signal } from "@preact/signals";
|
|
25
|
+
//#region src/core/models/api/company-types-value.ts
|
|
26
|
+
/**
|
|
27
|
+
* These are the Company type values present in LEM (note these differ from the values present in KYC)
|
|
28
|
+
*/
|
|
29
|
+
var CompanyTypesValues = {
|
|
30
|
+
PRIVATE_COMPANY: "privateCompany",
|
|
31
|
+
PUBLIC_COMPANY: "listedPublicCompany",
|
|
32
|
+
UNLISTED_PUBLIC_COMPANY: "unlistedPublicCompany",
|
|
33
|
+
UNINCORPORATED_PARTNERSHIP: "unincorporatedPartnership",
|
|
34
|
+
INCORPORATED_PARTNERSHIP: "partnershipIncorporated",
|
|
35
|
+
INCORPORATED_ASSOCIATION: "associationIncorporated",
|
|
36
|
+
GOVERNMENTAL_ORGANIZATION: "governmentalOrganization",
|
|
37
|
+
NON_PROFIT_OR_CHARITABLE: "nonProfit",
|
|
38
|
+
SOLE_PROPRIETORSHIP: "soleProprietorship"
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/utils/japanSupportUtils.ts
|
|
42
|
+
var isJapanLocalizationEnabled = (isFeatureEnabled = () => false, country) => {
|
|
43
|
+
return country === CountryCodes.Japan && isFeatureEnabled("EnableJapanLocalization");
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/utils/textTransformation/toFullWidth.ts
|
|
47
|
+
var applyDelta = (delta) => (char) => String.fromCharCode(char.charCodeAt(0) + delta);
|
|
48
|
+
/**
|
|
49
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize#nfkc
|
|
50
|
+
*/
|
|
51
|
+
var standardNormalization = (input) => input.normalize("NFKC");
|
|
52
|
+
/**
|
|
53
|
+
* The order here does matter, since the characters matched by each converter may overlap.
|
|
54
|
+
*/
|
|
55
|
+
var converters = [
|
|
56
|
+
{
|
|
57
|
+
name: "latin",
|
|
58
|
+
match: /[!-~]/g,
|
|
59
|
+
convert: applyDelta(65248)
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "hangul1",
|
|
63
|
+
match: /[ᄀ-ᄒ]/g,
|
|
64
|
+
convert: standardNormalization
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "hangul2",
|
|
68
|
+
match: /[ᅡ-ᅵ]/g,
|
|
69
|
+
convert: standardNormalization
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "katakana",
|
|
73
|
+
match: /[\uff60-\uff9f]+/g,
|
|
74
|
+
convert: standardNormalization
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "extras",
|
|
78
|
+
match: /[¢£¬¯¦¥₩\u0020|←↑→↓■°]/g,
|
|
79
|
+
convert: (char) => {
|
|
80
|
+
return "¢£¬ ̄¦¥₩ |←↑→↓■○"["¢£¬¯¦¥₩ |←↑→↓■°".indexOf(char)];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* Replaces half-width characters with full-width characters.
|
|
86
|
+
* Includes Latin characters, Katakana, Hangul and various symbols.
|
|
87
|
+
*/
|
|
88
|
+
var toFullWidth = (value) => {
|
|
89
|
+
let input = value;
|
|
90
|
+
for (const { match, convert } of converters) input = input.replaceAll(match, convert);
|
|
91
|
+
return input;
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
16
94
|
//#region src/types/datasets/state-code.ts
|
|
17
95
|
var StateCodesUS = {
|
|
18
96
|
Alabama: "AL",
|
|
@@ -1742,6 +1820,132 @@ var getTaxInformationPlaceholderText = ({ country, companyType, taxIdNumberType
|
|
|
1742
1820
|
}
|
|
1743
1821
|
};
|
|
1744
1822
|
//#endregion
|
|
1823
|
+
//#region src/components/Business/forms/rules.constants.ts
|
|
1824
|
+
/**
|
|
1825
|
+
* Source of truth for registration-number exemption eligibility in Business Details.
|
|
1826
|
+
*
|
|
1827
|
+
* This map defines which organization entity types can use
|
|
1828
|
+
* `exemptedFromRegistrationNumber`, grouped by country. All exemption checks should
|
|
1829
|
+
* be derived from this structure to keep behavior consistent across form rules.
|
|
1830
|
+
*
|
|
1831
|
+
* Interpretation:
|
|
1832
|
+
* - Non-empty array: exemption is allowed only for the listed entity types.
|
|
1833
|
+
* - Empty array: exemption is allowed for that country without entity-type restrictions.
|
|
1834
|
+
*
|
|
1835
|
+
*/
|
|
1836
|
+
var REGISTRATION_NUMBER_EXEMPTION_RULES = {
|
|
1837
|
+
[CountryCodes.Australia]: [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION, CompanyTypesValues.INCORPORATED_PARTNERSHIP],
|
|
1838
|
+
[CountryCodes.Denmark]: [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE],
|
|
1839
|
+
[CountryCodes.Germany]: [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION, CompanyTypesValues.NON_PROFIT_OR_CHARITABLE],
|
|
1840
|
+
[CountryCodes.HongKong]: [],
|
|
1841
|
+
[CountryCodes.NewZealand]: []
|
|
1842
|
+
};
|
|
1843
|
+
var COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
1844
|
+
CountryCodes.HongKong,
|
|
1845
|
+
CountryCodes.Mexico,
|
|
1846
|
+
CountryCodes.PuertoRico,
|
|
1847
|
+
CountryCodes.UnitedStates
|
|
1848
|
+
];
|
|
1849
|
+
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
1850
|
+
/**
|
|
1851
|
+
* Also used to determine what documenttype needs to be used
|
|
1852
|
+
* when uploading tax document in mapping.ts
|
|
1853
|
+
* */
|
|
1854
|
+
var COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
1855
|
+
CountryCodes.Australia,
|
|
1856
|
+
CountryCodes.Canada,
|
|
1857
|
+
CountryCodes.Gibraltar,
|
|
1858
|
+
CountryCodes.HongKong,
|
|
1859
|
+
CountryCodes.NewZealand,
|
|
1860
|
+
CountryCodes.PuertoRico,
|
|
1861
|
+
CountryCodes.Singapore,
|
|
1862
|
+
CountryCodes.UnitedStates,
|
|
1863
|
+
CountryCodes.Guernsey,
|
|
1864
|
+
CountryCodes.Jersey,
|
|
1865
|
+
CountryCodes.IsleOfMan,
|
|
1866
|
+
CountryCodes.Mexico,
|
|
1867
|
+
CountryCodes.Brazil,
|
|
1868
|
+
CountryCodes.Japan
|
|
1869
|
+
];
|
|
1870
|
+
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [];
|
|
1871
|
+
var COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
1872
|
+
var COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
1873
|
+
var COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
1874
|
+
CountryCodes.Austria,
|
|
1875
|
+
CountryCodes.Belgium,
|
|
1876
|
+
CountryCodes.Croatia,
|
|
1877
|
+
CountryCodes.Cyprus,
|
|
1878
|
+
CountryCodes.Estonia,
|
|
1879
|
+
CountryCodes.Finland,
|
|
1880
|
+
CountryCodes.France,
|
|
1881
|
+
CountryCodes.Germany,
|
|
1882
|
+
CountryCodes.Greece,
|
|
1883
|
+
CountryCodes.Ireland,
|
|
1884
|
+
CountryCodes.Italy,
|
|
1885
|
+
CountryCodes.Latvia,
|
|
1886
|
+
CountryCodes.Lithuania,
|
|
1887
|
+
CountryCodes.Luxembourg,
|
|
1888
|
+
CountryCodes.Malta,
|
|
1889
|
+
CountryCodes.Netherlands,
|
|
1890
|
+
CountryCodes.Portugal,
|
|
1891
|
+
CountryCodes.Slovakia,
|
|
1892
|
+
CountryCodes.Slovenia,
|
|
1893
|
+
CountryCodes.Spain,
|
|
1894
|
+
CountryCodes.UnitedKingdom
|
|
1895
|
+
];
|
|
1896
|
+
var COUNTRIES_REQUIRING_E_INVOICING_CODE = [CountryCodes.Italy];
|
|
1897
|
+
var COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [CountryCodes.Australia];
|
|
1898
|
+
var TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
1899
|
+
CountryCodes.Austria,
|
|
1900
|
+
CountryCodes.Belgium,
|
|
1901
|
+
CountryCodes.Croatia,
|
|
1902
|
+
CountryCodes.Cyprus,
|
|
1903
|
+
CountryCodes.Germany,
|
|
1904
|
+
CountryCodes.Greece,
|
|
1905
|
+
CountryCodes.Ireland,
|
|
1906
|
+
CountryCodes.Luxembourg,
|
|
1907
|
+
CountryCodes.Malta,
|
|
1908
|
+
CountryCodes.Netherlands,
|
|
1909
|
+
CountryCodes.Slovakia,
|
|
1910
|
+
CountryCodes.Slovenia
|
|
1911
|
+
];
|
|
1912
|
+
/**
|
|
1913
|
+
* Sole proprietorship specific rules
|
|
1914
|
+
*/
|
|
1915
|
+
var COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
1916
|
+
CountryCodes.Australia,
|
|
1917
|
+
CountryCodes.Gibraltar,
|
|
1918
|
+
CountryCodes.Guernsey,
|
|
1919
|
+
CountryCodes.HongKong,
|
|
1920
|
+
CountryCodes.Ireland,
|
|
1921
|
+
CountryCodes.IsleOfMan,
|
|
1922
|
+
CountryCodes.Jersey,
|
|
1923
|
+
CountryCodes.Malta,
|
|
1924
|
+
CountryCodes.PuertoRico,
|
|
1925
|
+
CountryCodes.Spain,
|
|
1926
|
+
CountryCodes.UnitedKingdom,
|
|
1927
|
+
CountryCodes.UnitedStates
|
|
1928
|
+
];
|
|
1929
|
+
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
1930
|
+
CountryCodes.Canada,
|
|
1931
|
+
CountryCodes.PuertoRico,
|
|
1932
|
+
CountryCodes.UnitedStates
|
|
1933
|
+
];
|
|
1934
|
+
var COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
|
|
1935
|
+
CountryCodes.Austria,
|
|
1936
|
+
CountryCodes.Canada,
|
|
1937
|
+
CountryCodes.Finland,
|
|
1938
|
+
CountryCodes.Germany,
|
|
1939
|
+
CountryCodes.Lithuania,
|
|
1940
|
+
CountryCodes.Luxembourg,
|
|
1941
|
+
CountryCodes.NewZealand,
|
|
1942
|
+
CountryCodes.Poland,
|
|
1943
|
+
CountryCodes.Sweden,
|
|
1944
|
+
CountryCodes.Switzerland
|
|
1945
|
+
];
|
|
1946
|
+
var COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.Singapore];
|
|
1947
|
+
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [CountryCodes.Germany];
|
|
1948
|
+
//#endregion
|
|
1745
1949
|
//#region src/components/Shared/fields/TaxInformationField/taxIdNumberTypes.ts
|
|
1746
1950
|
var restrictedEntityTypes = [
|
|
1747
1951
|
CompanyTypesValues.SOLE_PROPRIETORSHIP,
|
|
@@ -2033,6 +2237,14 @@ var getTaxIdNumberOptions = (country, companyType) => {
|
|
|
2033
2237
|
if (isRestrictedEntityType(companyType)) return optionsForCountry.filter((option) => option.applicableOnlyFor?.includes(companyType) ?? true);
|
|
2034
2238
|
return optionsForCountry.filter((option) => !isApplicableOnlyForSingleRestrictedType(option));
|
|
2035
2239
|
};
|
|
2240
|
+
var getTaxIdNumberSelectorOptions = (country, companyType, exemptedOptionLabel) => {
|
|
2241
|
+
const availableOptions = getTaxIdNumberOptions(country, companyType) ?? [];
|
|
2242
|
+
if (availableOptions.length === 0 || !exemptedOptionLabel) return availableOptions;
|
|
2243
|
+
return [...availableOptions, {
|
|
2244
|
+
id: "exempted",
|
|
2245
|
+
name: exemptedOptionLabel
|
|
2246
|
+
}];
|
|
2247
|
+
};
|
|
2036
2248
|
function getValidCompanyTypesForTaxIdNumberType(country, taxIdNumberType) {
|
|
2037
2249
|
if (!taxIdNumberType) return void 0;
|
|
2038
2250
|
const taxIdOption = taxIdNumberOptions[country]?.find((option) => option.id === taxIdNumberType);
|
|
@@ -2099,154 +2311,6 @@ function getDefaultTaxIdNumberType(taxInformation, country, entityType) {
|
|
|
2099
2311
|
return existingTaxInformation?.type ?? (existingTaxInformation?.number ? inferTaxIdNumberType(taxInformation, country, entityType) : getTaxIdNumberOptions(country, entityType)?.[0]?.id);
|
|
2100
2312
|
}
|
|
2101
2313
|
//#endregion
|
|
2102
|
-
//#region src/components/Business/forms/rules.constants.ts
|
|
2103
|
-
/**
|
|
2104
|
-
* Source of truth for registration-number exemption eligibility in Business Details.
|
|
2105
|
-
*
|
|
2106
|
-
* This map defines which organization entity types can use
|
|
2107
|
-
* `exemptedFromRegistrationNumber`, grouped by country. All exemption checks should
|
|
2108
|
-
* be derived from this structure to keep behavior consistent across form rules.
|
|
2109
|
-
*
|
|
2110
|
-
* Interpretation:
|
|
2111
|
-
* - Non-empty array: exemption is allowed only for the listed entity types.
|
|
2112
|
-
* - Empty array: exemption is allowed for that country without entity-type restrictions.
|
|
2113
|
-
*
|
|
2114
|
-
*/
|
|
2115
|
-
var REGISTRATION_NUMBER_EXEMPTION_RULES = {
|
|
2116
|
-
[CountryCodes.Australia]: [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION, CompanyTypesValues.INCORPORATED_PARTNERSHIP],
|
|
2117
|
-
[CountryCodes.Denmark]: [CompanyTypesValues.NON_PROFIT_OR_CHARITABLE],
|
|
2118
|
-
[CountryCodes.Germany]: [CompanyTypesValues.GOVERNMENTAL_ORGANIZATION, CompanyTypesValues.NON_PROFIT_OR_CHARITABLE],
|
|
2119
|
-
[CountryCodes.HongKong]: [],
|
|
2120
|
-
[CountryCodes.NewZealand]: []
|
|
2121
|
-
};
|
|
2122
|
-
/**
|
|
2123
|
-
* @description Countries in this list use the provider-backed company search flow.
|
|
2124
|
-
* For these countries, business details can be prefilled from provider results,
|
|
2125
|
-
* and search/verification may require tax identifiers (for example TIN or VAT)
|
|
2126
|
-
* in addition to company name/registration details.
|
|
2127
|
-
*
|
|
2128
|
-
* If a country is in this list, it means it will attempt to make an api call for company search.
|
|
2129
|
-
* If the api doesnt have a provider for that country, it will return no results like below
|
|
2130
|
-
* ```
|
|
2131
|
-
* {
|
|
2132
|
-
* "results": [],
|
|
2133
|
-
* "provider": "NO_PROVIDER"
|
|
2134
|
-
* }
|
|
2135
|
-
* ```
|
|
2136
|
-
*/
|
|
2137
|
-
var COUNTRIES_USING_COMPANY_SEARCH = [
|
|
2138
|
-
CountryCodes.UnitedStates,
|
|
2139
|
-
CountryCodes.UnitedKingdom,
|
|
2140
|
-
CountryCodes.Germany,
|
|
2141
|
-
CountryCodes.France
|
|
2142
|
-
];
|
|
2143
|
-
var COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [
|
|
2144
|
-
CountryCodes.HongKong,
|
|
2145
|
-
CountryCodes.Mexico,
|
|
2146
|
-
CountryCodes.PuertoRico,
|
|
2147
|
-
CountryCodes.UnitedStates
|
|
2148
|
-
];
|
|
2149
|
-
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [CountryCodes.Canada, CountryCodes.UnitedStates];
|
|
2150
|
-
/**
|
|
2151
|
-
* Also used to determine what documenttype needs to be used
|
|
2152
|
-
* when uploading tax document in mapping.ts
|
|
2153
|
-
* */
|
|
2154
|
-
var COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [
|
|
2155
|
-
CountryCodes.Australia,
|
|
2156
|
-
CountryCodes.Canada,
|
|
2157
|
-
CountryCodes.Gibraltar,
|
|
2158
|
-
CountryCodes.HongKong,
|
|
2159
|
-
CountryCodes.NewZealand,
|
|
2160
|
-
CountryCodes.PuertoRico,
|
|
2161
|
-
CountryCodes.Singapore,
|
|
2162
|
-
CountryCodes.UnitedStates,
|
|
2163
|
-
CountryCodes.Guernsey,
|
|
2164
|
-
CountryCodes.Jersey,
|
|
2165
|
-
CountryCodes.IsleOfMan,
|
|
2166
|
-
CountryCodes.Mexico,
|
|
2167
|
-
CountryCodes.Brazil,
|
|
2168
|
-
CountryCodes.Japan
|
|
2169
|
-
];
|
|
2170
|
-
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [];
|
|
2171
|
-
var COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
|
|
2172
|
-
var COUNTRIES_THAT_USES_UEN_OR_GST = [CountryCodes.Singapore];
|
|
2173
|
-
var COUNTRY_OF_GOVERNING_LAW_POSSIBLE = [CountryCodes.UnitedKingdom];
|
|
2174
|
-
var COUNTRIES_REQUIRING_FINANCIAL_INFORMATION = [
|
|
2175
|
-
CountryCodes.Austria,
|
|
2176
|
-
CountryCodes.Belgium,
|
|
2177
|
-
CountryCodes.Croatia,
|
|
2178
|
-
CountryCodes.Cyprus,
|
|
2179
|
-
CountryCodes.Estonia,
|
|
2180
|
-
CountryCodes.Finland,
|
|
2181
|
-
CountryCodes.France,
|
|
2182
|
-
CountryCodes.Germany,
|
|
2183
|
-
CountryCodes.Greece,
|
|
2184
|
-
CountryCodes.Ireland,
|
|
2185
|
-
CountryCodes.Italy,
|
|
2186
|
-
CountryCodes.Latvia,
|
|
2187
|
-
CountryCodes.Lithuania,
|
|
2188
|
-
CountryCodes.Luxembourg,
|
|
2189
|
-
CountryCodes.Malta,
|
|
2190
|
-
CountryCodes.Netherlands,
|
|
2191
|
-
CountryCodes.Portugal,
|
|
2192
|
-
CountryCodes.Slovakia,
|
|
2193
|
-
CountryCodes.Slovenia,
|
|
2194
|
-
CountryCodes.Spain,
|
|
2195
|
-
CountryCodes.UnitedKingdom
|
|
2196
|
-
];
|
|
2197
|
-
var COUNTRIES_REQUIRING_E_INVOICING_CODE = [CountryCodes.Italy];
|
|
2198
|
-
var COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 = [CountryCodes.Australia];
|
|
2199
|
-
var TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION = [
|
|
2200
|
-
CountryCodes.Austria,
|
|
2201
|
-
CountryCodes.Belgium,
|
|
2202
|
-
CountryCodes.Croatia,
|
|
2203
|
-
CountryCodes.Cyprus,
|
|
2204
|
-
CountryCodes.Germany,
|
|
2205
|
-
CountryCodes.Greece,
|
|
2206
|
-
CountryCodes.Ireland,
|
|
2207
|
-
CountryCodes.Luxembourg,
|
|
2208
|
-
CountryCodes.Malta,
|
|
2209
|
-
CountryCodes.Netherlands,
|
|
2210
|
-
CountryCodes.Slovakia,
|
|
2211
|
-
CountryCodes.Slovenia
|
|
2212
|
-
];
|
|
2213
|
-
/**
|
|
2214
|
-
* Sole proprietorship specific rules
|
|
2215
|
-
*/
|
|
2216
|
-
var COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [
|
|
2217
|
-
CountryCodes.Australia,
|
|
2218
|
-
CountryCodes.Gibraltar,
|
|
2219
|
-
CountryCodes.Guernsey,
|
|
2220
|
-
CountryCodes.HongKong,
|
|
2221
|
-
CountryCodes.Ireland,
|
|
2222
|
-
CountryCodes.IsleOfMan,
|
|
2223
|
-
CountryCodes.Jersey,
|
|
2224
|
-
CountryCodes.Malta,
|
|
2225
|
-
CountryCodes.PuertoRico,
|
|
2226
|
-
CountryCodes.Spain,
|
|
2227
|
-
CountryCodes.UnitedKingdom,
|
|
2228
|
-
CountryCodes.UnitedStates
|
|
2229
|
-
];
|
|
2230
|
-
var COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
|
|
2231
|
-
CountryCodes.Canada,
|
|
2232
|
-
CountryCodes.PuertoRico,
|
|
2233
|
-
CountryCodes.UnitedStates
|
|
2234
|
-
];
|
|
2235
|
-
var COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [
|
|
2236
|
-
CountryCodes.Austria,
|
|
2237
|
-
CountryCodes.Canada,
|
|
2238
|
-
CountryCodes.Finland,
|
|
2239
|
-
CountryCodes.Germany,
|
|
2240
|
-
CountryCodes.Lithuania,
|
|
2241
|
-
CountryCodes.Luxembourg,
|
|
2242
|
-
CountryCodes.NewZealand,
|
|
2243
|
-
CountryCodes.Poland,
|
|
2244
|
-
CountryCodes.Sweden,
|
|
2245
|
-
CountryCodes.Switzerland
|
|
2246
|
-
];
|
|
2247
|
-
var COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.Singapore];
|
|
2248
|
-
var COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS = [CountryCodes.Germany];
|
|
2249
|
-
//#endregion
|
|
2250
2314
|
//#region src/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.tsx
|
|
2251
2315
|
function TaxIdNumberTypeSelector({ country, companyType, selected, setSelected, exemptedOptionLabel, isUsSoleProp, errorMessage }) {
|
|
2252
2316
|
const { t } = useTranslation("common");
|
|
@@ -2258,14 +2322,7 @@ function TaxIdNumberTypeSelector({ country, companyType, selected, setSelected,
|
|
|
2258
2322
|
}
|
|
2259
2323
|
setSelected(newSelected);
|
|
2260
2324
|
}, [exemptedOptionLabel, setSelected]);
|
|
2261
|
-
const options = useMemo(() =>
|
|
2262
|
-
const availableOptions = getTaxIdNumberOptions(country, companyType) ?? [];
|
|
2263
|
-
if (availableOptions.length === 0 || !exemptedOptionLabel) return availableOptions;
|
|
2264
|
-
return [...availableOptions, {
|
|
2265
|
-
id: "exempted",
|
|
2266
|
-
name: exemptedOptionLabel
|
|
2267
|
-
}];
|
|
2268
|
-
}, [
|
|
2325
|
+
const options = useMemo(() => getTaxIdNumberSelectorOptions(country, companyType, exemptedOptionLabel), [
|
|
2269
2326
|
country,
|
|
2270
2327
|
companyType,
|
|
2271
2328
|
exemptedOptionLabel
|
|
@@ -2312,4 +2369,464 @@ function removeTaxInfoForCountry(taxInformation, country) {
|
|
|
2312
2369
|
return taxInformation?.filter((t) => t.country !== country);
|
|
2313
2370
|
}
|
|
2314
2371
|
//#endregion
|
|
2315
|
-
|
|
2372
|
+
//#region src/components/Shared/fields/TaxInformationField/TaxInformationField.tsx
|
|
2373
|
+
var TAX_INFORMATION_FIELD = [
|
|
2374
|
+
"taxInformation",
|
|
2375
|
+
"exemptedFromTax",
|
|
2376
|
+
"isUen"
|
|
2377
|
+
];
|
|
2378
|
+
/**
|
|
2379
|
+
* Renders a dynamic form field for tax identification information, adapting its display
|
|
2380
|
+
* and behavior based on country and company type. It supports various tax ID input
|
|
2381
|
+
* scenarios, including two specialized handling for US Sole Proprietorships (where SSN option acts as exemption selection)
|
|
2382
|
+
* and Singapore Companies (where registration number (UEN) can be used for tax ID).
|
|
2383
|
+
*/
|
|
2384
|
+
function TaxInformationField({ data, valid, errors, labels, mask, placeholder, readonly, optional, shouldValidate, handleChangeFor, country, canExempt, registrationNumber, entityType, defaultData }) {
|
|
2385
|
+
const { isFeatureEnabled } = useToggleContext();
|
|
2386
|
+
const { t } = useTranslation("common");
|
|
2387
|
+
const { accountHolder } = useAccountHolder();
|
|
2388
|
+
const currentCountryTaxInformation = useMemo(() => data?.taxInformation?.find((taxInfo) => taxInfo.country === country) ?? (!data.exemptedFromTax ? defaultData?.find((taxInfo) => taxInfo.country === country) : void 0), [
|
|
2389
|
+
data?.taxInformation,
|
|
2390
|
+
data.exemptedFromTax,
|
|
2391
|
+
defaultData,
|
|
2392
|
+
country
|
|
2393
|
+
]);
|
|
2394
|
+
const isUsSoleProp = country === "US" && entityType === CompanyTypesValues.SOLE_PROPRIETORSHIP;
|
|
2395
|
+
const options = getTaxIdNumberOptions(country, entityType);
|
|
2396
|
+
const showTaxIdExemptedOptions = canExempt && (options?.length ?? 0) > 1 || isUsSoleProp;
|
|
2397
|
+
const canSaveAbsentState = isFeatureEnabled("EnableRegistrationAndTaxAbsentStatesV4") && COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4.includes(country) && accountHolder === "aTrust";
|
|
2398
|
+
const exemptionLabel = isUsSoleProp ? t(($) => $["socialSecurityNumber"]) : labels.exemptedFromTax;
|
|
2399
|
+
const selectorOptions = getTaxIdNumberSelectorOptions(country, entityType, showTaxIdExemptedOptions ? exemptionLabel : void 0);
|
|
2400
|
+
const shouldRenderInput = isUsSoleProp ? currentCountryTaxInformation?.type === "EIN" : !data.isUen;
|
|
2401
|
+
const taxIdNumberType = useMemo(() => {
|
|
2402
|
+
if (data.exemptedFromTax) return "exempted";
|
|
2403
|
+
if (currentCountryTaxInformation?.type) return currentCountryTaxInformation.type;
|
|
2404
|
+
if (isUsSoleProp) return void 0;
|
|
2405
|
+
return getDefaultTaxIdNumberType(data.taxInformation, country, entityType);
|
|
2406
|
+
}, [
|
|
2407
|
+
country,
|
|
2408
|
+
currentCountryTaxInformation?.type,
|
|
2409
|
+
data.exemptedFromTax,
|
|
2410
|
+
data.taxInformation,
|
|
2411
|
+
entityType,
|
|
2412
|
+
isUsSoleProp
|
|
2413
|
+
]);
|
|
2414
|
+
const shouldDisplayErrorOnSelector = selectorOptions.length > 1 && taxIdNumberType === void 0;
|
|
2415
|
+
const selectorError = shouldDisplayErrorOnSelector ? errors.taxInformation : void 0;
|
|
2416
|
+
const inputError = shouldDisplayErrorOnSelector ? void 0 : errors.taxInformation;
|
|
2417
|
+
const fieldMetadata = resolveFieldMetadata(taxInformationDefaultFieldConfig[country], {
|
|
2418
|
+
taxIdNumberType: currentCountryTaxInformation?.type,
|
|
2419
|
+
companyType: entityType
|
|
2420
|
+
}, taxInformationDefaultFieldMetadata);
|
|
2421
|
+
const updateTaxInfo = useCallback((mode, newEntry) => {
|
|
2422
|
+
const entry = canSaveAbsentState ? {
|
|
2423
|
+
...newEntry,
|
|
2424
|
+
numberAbsent: newEntry.numberAbsent ?? false
|
|
2425
|
+
} : newEntry;
|
|
2426
|
+
handleChangeFor("taxInformation", mode)(upsertTaxInfoForCountry(data.taxInformation, country, entry));
|
|
2427
|
+
}, [
|
|
2428
|
+
canSaveAbsentState,
|
|
2429
|
+
country,
|
|
2430
|
+
data.taxInformation,
|
|
2431
|
+
handleChangeFor
|
|
2432
|
+
]);
|
|
2433
|
+
const updateTaxType = useCallback((type, mode) => {
|
|
2434
|
+
updateTaxInfo(mode, {
|
|
2435
|
+
country,
|
|
2436
|
+
number: currentCountryTaxInformation?.number,
|
|
2437
|
+
type
|
|
2438
|
+
});
|
|
2439
|
+
}, [
|
|
2440
|
+
country,
|
|
2441
|
+
currentCountryTaxInformation?.number,
|
|
2442
|
+
updateTaxInfo
|
|
2443
|
+
]);
|
|
2444
|
+
const resetToDefaultData = useCallback(() => {
|
|
2445
|
+
if (defaultData !== void 0) handleChangeFor("taxInformation", "input")(defaultData);
|
|
2446
|
+
}, [defaultData, handleChangeFor]);
|
|
2447
|
+
const removeCountryTaxInfo = useCallback(() => {
|
|
2448
|
+
handleChangeFor("taxInformation", "input")(removeTaxInfoForCountry(data.taxInformation, country));
|
|
2449
|
+
}, [
|
|
2450
|
+
country,
|
|
2451
|
+
data.taxInformation,
|
|
2452
|
+
handleChangeFor
|
|
2453
|
+
]);
|
|
2454
|
+
const setUenAsTaxId = useCallback((uen) => {
|
|
2455
|
+
updateTaxInfo("blur", {
|
|
2456
|
+
country,
|
|
2457
|
+
number: uen ?? "",
|
|
2458
|
+
type: "UEN"
|
|
2459
|
+
});
|
|
2460
|
+
}, [country, updateTaxInfo]);
|
|
2461
|
+
const addTaxAbsentStatus = useCallback((exempted) => {
|
|
2462
|
+
handleChangeFor("taxInformation", "input")(upsertTaxInfoForCountry(data.taxInformation, country, {
|
|
2463
|
+
country,
|
|
2464
|
+
numberAbsent: exempted
|
|
2465
|
+
}));
|
|
2466
|
+
}, [
|
|
2467
|
+
country,
|
|
2468
|
+
data.taxInformation,
|
|
2469
|
+
handleChangeFor
|
|
2470
|
+
]);
|
|
2471
|
+
const handleTaxNumberChange = useCallback((e, mode) => {
|
|
2472
|
+
updateTaxInfo(mode, {
|
|
2473
|
+
country,
|
|
2474
|
+
number: e ? typeof e === "string" ? e : e.currentTarget.value : void 0,
|
|
2475
|
+
type: currentCountryTaxInformation?.type ?? (taxIdNumberType !== "exempted" ? taxIdNumberType : void 0)
|
|
2476
|
+
});
|
|
2477
|
+
}, [
|
|
2478
|
+
country,
|
|
2479
|
+
currentCountryTaxInformation?.type,
|
|
2480
|
+
taxIdNumberType,
|
|
2481
|
+
updateTaxInfo
|
|
2482
|
+
]);
|
|
2483
|
+
const handleTaxIdNumberTypeChange = useCallback((taxIdType) => {
|
|
2484
|
+
if (!canExempt && taxIdType === "exempted") throw Error(`${country} does not allow tax exemptions`);
|
|
2485
|
+
if (taxIdType === "exempted") {
|
|
2486
|
+
handleChangeFor("exemptedFromTax")(true);
|
|
2487
|
+
updateTaxType(void 0, "input");
|
|
2488
|
+
return canSaveAbsentState ? addTaxAbsentStatus(true) : removeCountryTaxInfo();
|
|
2489
|
+
}
|
|
2490
|
+
handleChangeFor("exemptedFromTax")(false);
|
|
2491
|
+
if (country === "SG") if (taxIdType === "UEN") {
|
|
2492
|
+
handleChangeFor("isUen")(true);
|
|
2493
|
+
setUenAsTaxId(registrationNumber);
|
|
2494
|
+
} else {
|
|
2495
|
+
handleChangeFor("isUen")(false);
|
|
2496
|
+
removeCountryTaxInfo();
|
|
2497
|
+
}
|
|
2498
|
+
updateTaxType(taxIdType, "input");
|
|
2499
|
+
}, [
|
|
2500
|
+
addTaxAbsentStatus,
|
|
2501
|
+
canExempt,
|
|
2502
|
+
canSaveAbsentState,
|
|
2503
|
+
country,
|
|
2504
|
+
handleChangeFor,
|
|
2505
|
+
updateTaxType,
|
|
2506
|
+
registrationNumber,
|
|
2507
|
+
removeCountryTaxInfo,
|
|
2508
|
+
setUenAsTaxId
|
|
2509
|
+
]);
|
|
2510
|
+
const handleExemptedFromTaxChange = useCallback((exempted) => {
|
|
2511
|
+
handleChangeFor("exemptedFromTax")(exempted);
|
|
2512
|
+
if (canSaveAbsentState) addTaxAbsentStatus(exempted);
|
|
2513
|
+
else removeCountryTaxInfo();
|
|
2514
|
+
}, [
|
|
2515
|
+
addTaxAbsentStatus,
|
|
2516
|
+
canSaveAbsentState,
|
|
2517
|
+
handleChangeFor,
|
|
2518
|
+
removeCountryTaxInfo
|
|
2519
|
+
]);
|
|
2520
|
+
const prevCountryRef = useRef(country);
|
|
2521
|
+
useEffect(() => {
|
|
2522
|
+
if (!country || prevCountryRef.current === country) return;
|
|
2523
|
+
prevCountryRef.current = country;
|
|
2524
|
+
const hasSavedTaxId = defaultData?.find((taxId) => taxId.country === country);
|
|
2525
|
+
if (currentCountryTaxInformation && !hasSavedTaxId) return;
|
|
2526
|
+
if (entityType === CompanyTypesValues.SOLE_PROPRIETORSHIP) return;
|
|
2527
|
+
resetToDefaultData();
|
|
2528
|
+
}, [country]);
|
|
2529
|
+
useEffect(() => {
|
|
2530
|
+
if (country === "SG" && data.isUen && registrationNumber && registrationNumber !== currentCountryTaxInformation?.number) setUenAsTaxId(registrationNumber);
|
|
2531
|
+
}, [
|
|
2532
|
+
registrationNumber,
|
|
2533
|
+
currentCountryTaxInformation?.number,
|
|
2534
|
+
data.isUen,
|
|
2535
|
+
country,
|
|
2536
|
+
setUenAsTaxId
|
|
2537
|
+
]);
|
|
2538
|
+
const isInitialized = useRef(false);
|
|
2539
|
+
if (!isInitialized.current && country === "SG" && !defaultData?.find((taxInfo) => taxInfo.country === country)?.number) {
|
|
2540
|
+
isInitialized.current = true;
|
|
2541
|
+
handleChangeFor("isUen")(false);
|
|
2542
|
+
}
|
|
2543
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2544
|
+
/* @__PURE__ */ jsx(TaxIdNumberTypeSelector, {
|
|
2545
|
+
country,
|
|
2546
|
+
companyType: entityType,
|
|
2547
|
+
setSelected: handleTaxIdNumberTypeChange,
|
|
2548
|
+
selected: taxIdNumberType,
|
|
2549
|
+
exemptedOptionLabel: showTaxIdExemptedOptions ? exemptionLabel : void 0,
|
|
2550
|
+
isUsSoleProp,
|
|
2551
|
+
errorMessage: selectorError
|
|
2552
|
+
}),
|
|
2553
|
+
shouldRenderInput && /* @__PURE__ */ jsx(MaskedInput, {
|
|
2554
|
+
type: "text",
|
|
2555
|
+
"aria-required": true,
|
|
2556
|
+
"aria-invalid": !valid.taxInformation,
|
|
2557
|
+
name: "taxInformation",
|
|
2558
|
+
label: labels.taxInformation ?? "",
|
|
2559
|
+
formatGuidance: translateTranslatable(t, fieldMetadata.guidanceText),
|
|
2560
|
+
value: currentCountryTaxInformation?.number ?? "",
|
|
2561
|
+
errorMessage: inputError,
|
|
2562
|
+
placeholder,
|
|
2563
|
+
isValid: Boolean(valid.taxInformation) && !!currentCountryTaxInformation,
|
|
2564
|
+
onInput: (e) => handleTaxNumberChange(e, "input"),
|
|
2565
|
+
onBlur: (e) => handleTaxNumberChange(e, "blur"),
|
|
2566
|
+
disabled: data.exemptedFromTax || data.isUen,
|
|
2567
|
+
readonly,
|
|
2568
|
+
optional,
|
|
2569
|
+
shouldValidate,
|
|
2570
|
+
...mask
|
|
2571
|
+
}),
|
|
2572
|
+
canExempt && !showTaxIdExemptedOptions && /* @__PURE__ */ jsx(Field, {
|
|
2573
|
+
name: "exemptedFromTax",
|
|
2574
|
+
children: (childProps) => /* @__PURE__ */ jsx(Checkbox, {
|
|
2575
|
+
...childProps,
|
|
2576
|
+
"aria-required": false,
|
|
2577
|
+
"aria-invalid": false,
|
|
2578
|
+
name: "exemptedFromTax",
|
|
2579
|
+
label: labels.exemptedFromTax,
|
|
2580
|
+
value: "exemptedFromTax",
|
|
2581
|
+
checked: Boolean(data.exemptedFromTax),
|
|
2582
|
+
onChange: handleExemptedFromTaxChange
|
|
2583
|
+
})
|
|
2584
|
+
})
|
|
2585
|
+
] });
|
|
2586
|
+
}
|
|
2587
|
+
var Tile_module_default = {
|
|
2588
|
+
"tile-container": "_tile-container_685mc_1",
|
|
2589
|
+
tileContainer: "_tile-container_685mc_1",
|
|
2590
|
+
tile: "_tile_685mc_1",
|
|
2591
|
+
"tile-icon": "_tile-icon_685mc_18",
|
|
2592
|
+
tileIcon: "_tile-icon_685mc_18",
|
|
2593
|
+
"tile-title": "_tile-title_685mc_35",
|
|
2594
|
+
tileTitle: "_tile-title_685mc_35",
|
|
2595
|
+
"tile-checkbox": "_tile-checkbox_685mc_49",
|
|
2596
|
+
tileCheckbox: "_tile-checkbox_685mc_49",
|
|
2597
|
+
"tile-container-horizontal": "_tile-container-horizontal_685mc_89",
|
|
2598
|
+
tileContainerHorizontal: "_tile-container-horizontal_685mc_89",
|
|
2599
|
+
"tile-label": "_tile-label_685mc_100",
|
|
2600
|
+
tileLabel: "_tile-label_685mc_100"
|
|
2601
|
+
};
|
|
2602
|
+
//#endregion
|
|
2603
|
+
//#region src/components/ui/atoms/Tile/Tile.tsx
|
|
2604
|
+
function Tile({ checked, disabled, icon, id, inputType = "checkbox", isHorizontal, label, name, className, onChange, subTitle, value }) {
|
|
2605
|
+
const inputNode = useRef(null);
|
|
2606
|
+
const uniqId = useId("tile");
|
|
2607
|
+
const idUse = id ?? uniqId;
|
|
2608
|
+
const handleChange = (e) => {
|
|
2609
|
+
if (disabled) return;
|
|
2610
|
+
onChange?.(e.currentTarget.checked);
|
|
2611
|
+
inputNode.current?.focus();
|
|
2612
|
+
};
|
|
2613
|
+
const handleClick = (e) => {
|
|
2614
|
+
if (disabled || inputType === "radio") return;
|
|
2615
|
+
if (checked) {
|
|
2616
|
+
e.preventDefault();
|
|
2617
|
+
onChange?.(false);
|
|
2618
|
+
inputNode.current?.focus();
|
|
2619
|
+
}
|
|
2620
|
+
};
|
|
2621
|
+
const handleOnKeyDown = (e) => {
|
|
2622
|
+
if (e.key === KEYBOARD_KEYS.enter || e.key === KEYBOARD_KEYS.space) {
|
|
2623
|
+
e.preventDefault();
|
|
2624
|
+
if (disabled) return;
|
|
2625
|
+
if (inputType === "radio" && !checked) {
|
|
2626
|
+
onChange?.(true);
|
|
2627
|
+
inputNode.current?.focus();
|
|
2628
|
+
} else if (inputType === "checkbox") {
|
|
2629
|
+
onChange?.(!checked);
|
|
2630
|
+
inputNode.current?.focus();
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
};
|
|
2634
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2635
|
+
className: cx(Tile_module_default.tileContainer, className, { [Tile_module_default.tileContainerHorizontal]: isHorizontal }),
|
|
2636
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2637
|
+
ref: inputNode,
|
|
2638
|
+
className: Tile_module_default.tileCheckbox,
|
|
2639
|
+
disabled,
|
|
2640
|
+
checked: !!checked,
|
|
2641
|
+
value,
|
|
2642
|
+
id: idUse,
|
|
2643
|
+
name,
|
|
2644
|
+
type: inputType,
|
|
2645
|
+
onKeyDown: handleOnKeyDown,
|
|
2646
|
+
onChange: handleChange,
|
|
2647
|
+
onClick: handleClick,
|
|
2648
|
+
"aria-disabled": disabled,
|
|
2649
|
+
tabIndex: disabled ? -1 : 0
|
|
2650
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
2651
|
+
htmlFor: idUse,
|
|
2652
|
+
className: Tile_module_default.tile,
|
|
2653
|
+
children: [icon && /* @__PURE__ */ jsx("div", {
|
|
2654
|
+
className: Tile_module_default.tileIcon,
|
|
2655
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
2656
|
+
name: icon,
|
|
2657
|
+
testId: icon
|
|
2658
|
+
})
|
|
2659
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
2660
|
+
className: Tile_module_default.tileLabel,
|
|
2661
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
2662
|
+
el: "h4",
|
|
2663
|
+
variant: "body-strongest",
|
|
2664
|
+
className: Tile_module_default.tileTitle,
|
|
2665
|
+
children: label
|
|
2666
|
+
}), subTitle && /* @__PURE__ */ jsx(Typography, {
|
|
2667
|
+
el: "p",
|
|
2668
|
+
variant: "body",
|
|
2669
|
+
children: subTitle
|
|
2670
|
+
})]
|
|
2671
|
+
})]
|
|
2672
|
+
})]
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
var TileGroup_module_default = {
|
|
2676
|
+
"tile-group": "_tile-group_6rtof_1",
|
|
2677
|
+
tileGroup: "_tile-group_6rtof_1",
|
|
2678
|
+
"tile-container": "_tile-container_6rtof_8",
|
|
2679
|
+
tileContainer: "_tile-container_6rtof_8",
|
|
2680
|
+
"tile-group-error": "_tile-group-error_6rtof_14",
|
|
2681
|
+
tileGroupError: "_tile-group-error_6rtof_14",
|
|
2682
|
+
"tile-group-error-icon": "_tile-group-error-icon_6rtof_27",
|
|
2683
|
+
tileGroupErrorIcon: "_tile-group-error-icon_6rtof_27",
|
|
2684
|
+
"tile-group-horizontal": "_tile-group-horizontal_6rtof_32",
|
|
2685
|
+
tileGroupHorizontal: "_tile-group-horizontal_6rtof_32"
|
|
2686
|
+
};
|
|
2687
|
+
//#endregion
|
|
2688
|
+
//#region src/components/ui/atoms/TileGroup/TileGroup.tsx
|
|
2689
|
+
function TileGroup({ tiles, selected, allowMultiple = false, isHorizontal, name: nameProp, maxSelected = Infinity, errorMessage, onChange = noop, enableTracking = false, trackingFieldName }) {
|
|
2690
|
+
const uniqName = useId("tile");
|
|
2691
|
+
const name = nameProp ?? uniqName;
|
|
2692
|
+
const finalName = allowMultiple ? `${name}[]` : name;
|
|
2693
|
+
const inputType = allowMultiple ? "checkbox" : "radio";
|
|
2694
|
+
const userEvents = useAnalyticsContext();
|
|
2695
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [!!errorMessage?.message && /* @__PURE__ */ jsxs("div", {
|
|
2696
|
+
"aria-live": "polite",
|
|
2697
|
+
className: TileGroup_module_default.tileGroupError,
|
|
2698
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2699
|
+
className: TileGroup_module_default.tileGroupErrorIcon,
|
|
2700
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "field-error" })
|
|
2701
|
+
}), errorMessage.message]
|
|
2702
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
2703
|
+
className: cx(TileGroup_module_default.tileGroup, { [TileGroup_module_default.tileGroupHorizontal]: isHorizontal }),
|
|
2704
|
+
children: tiles.map((tile) => {
|
|
2705
|
+
const { value, id, icon, subTitle, label, disabled } = tile;
|
|
2706
|
+
const handleChange = (checked) => {
|
|
2707
|
+
const newSelected = updateSelectedChoices(tile, checked, selected, allowMultiple);
|
|
2708
|
+
if (enableTracking) userEvents.addFieldEvent("Interacted with form field", {
|
|
2709
|
+
actionType: "input",
|
|
2710
|
+
field: trackingFieldName ?? name,
|
|
2711
|
+
returnValue: typeof newSelected === "string" ? newSelected : void 0
|
|
2712
|
+
});
|
|
2713
|
+
onChange(newSelected);
|
|
2714
|
+
};
|
|
2715
|
+
return /* @__PURE__ */ jsx(Tile, {
|
|
2716
|
+
name: finalName,
|
|
2717
|
+
className: TileGroup_module_default.tileContainer,
|
|
2718
|
+
inputType,
|
|
2719
|
+
isHorizontal,
|
|
2720
|
+
checked: choiceIsSelected(tile, selected, allowMultiple),
|
|
2721
|
+
label,
|
|
2722
|
+
id,
|
|
2723
|
+
subTitle,
|
|
2724
|
+
icon,
|
|
2725
|
+
disabled: !disabled && allowMultiple && selected.length >= maxSelected ? !choiceIsSelected(tile, selected, allowMultiple) : disabled,
|
|
2726
|
+
value,
|
|
2727
|
+
onChange: handleChange
|
|
2728
|
+
}, id);
|
|
2729
|
+
})
|
|
2730
|
+
})] });
|
|
2731
|
+
}
|
|
2732
|
+
function choiceIsSelected({ value }, selected, allowMultiple) {
|
|
2733
|
+
if (!allowMultiple) return value === selected;
|
|
2734
|
+
return selected.includes(value);
|
|
2735
|
+
}
|
|
2736
|
+
function updateSelectedChoices({ value }, checked, selected, allowMultiple) {
|
|
2737
|
+
if (!allowMultiple) return checked ? value : "";
|
|
2738
|
+
if (Array.isArray(selected)) {
|
|
2739
|
+
if (checked) return allowMultiple ? [...selected, value] : [value];
|
|
2740
|
+
return selected.filter((selectedChoice) => selectedChoice !== value);
|
|
2741
|
+
}
|
|
2742
|
+
return [];
|
|
2743
|
+
}
|
|
2744
|
+
//#endregion
|
|
2745
|
+
//#region src/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.ts
|
|
2746
|
+
var showIdNowModal = signal(false);
|
|
2747
|
+
var idNowModalChildEntityId = signal();
|
|
2748
|
+
var idNowPostSubmit = signal(false);
|
|
2749
|
+
var shouldShowIdNowModal = computed(() => {
|
|
2750
|
+
const idNowModalChildEntityIdValue = !!idNowModalChildEntityId.value;
|
|
2751
|
+
return showIdNowModal.value && idNowModalChildEntityIdValue;
|
|
2752
|
+
});
|
|
2753
|
+
//#endregion
|
|
2754
|
+
//#region src/components/Individual/helpers/bafinUtils.ts
|
|
2755
|
+
/**
|
|
2756
|
+
* Checks whether the legal entity has both required data points for IDnow verification:
|
|
2757
|
+
* birth city (placeOfBirth) and nationality.
|
|
2758
|
+
*/
|
|
2759
|
+
var hasRequiredDataForIdNow = (legalEntity) => Boolean(legalEntity.individual?.birthData?.placeOfBirth && legalEntity.individual?.nationality);
|
|
2760
|
+
/**
|
|
2761
|
+
* For an IDnow-qualified BAFIN signatory, returns an object describing which of the required
|
|
2762
|
+
* data points (placeOfBirth, nationality) are still missing, or `{ missingSelfie: true }` when
|
|
2763
|
+
* both are present but the selfie verification is still needed, or `null` when no action is needed.
|
|
2764
|
+
*
|
|
2765
|
+
* Returns `null` when any of the following conditions are true:
|
|
2766
|
+
* - The entity is not a signatory, or the L_BAFIN scenario is not active
|
|
2767
|
+
* - The `2_215` (live-selfie) remediation code is absent from problems
|
|
2768
|
+
*/
|
|
2769
|
+
var getIdNowMissingDataPoints = (problems, legalEntity, scenarios, roles) => {
|
|
2770
|
+
if (!roles.includes(DecisionMakerTypes.SIGNATORY) || !scenarios?.includes(Scenarios.L_BAFIN)) return null;
|
|
2771
|
+
if (!problems) return null;
|
|
2772
|
+
if (!problems.missingData?.some((item) => item.remediatingActions?.some((action) => action.code === "2_215"))) return null;
|
|
2773
|
+
const missingPlaceOfBirth = !legalEntity.individual?.birthData?.placeOfBirth;
|
|
2774
|
+
const missingNationality = !legalEntity.individual?.nationality;
|
|
2775
|
+
if (!missingPlaceOfBirth && !missingNationality) return { missingSelfie: true };
|
|
2776
|
+
return {
|
|
2777
|
+
missingPlaceOfBirth,
|
|
2778
|
+
missingNationality
|
|
2779
|
+
};
|
|
2780
|
+
};
|
|
2781
|
+
/**
|
|
2782
|
+
* For the BAFIN signatory flow, certain ID verification errors and remediation actions are not applicable.
|
|
2783
|
+
* This utility function takes a problems object and returns a new, deeply cloned object with all
|
|
2784
|
+
* ID verification-related issues removed.
|
|
2785
|
+
*
|
|
2786
|
+
* Specifically, it removes:
|
|
2787
|
+
* - 'missingData' entries related to ID document upload ('1_301').
|
|
2788
|
+
* - The '1_301' remediation action from `remediationActions`.
|
|
2789
|
+
* - The entire `idVerificationMethod` object from `verificationErrors`.
|
|
2790
|
+
* - Any nested sub-errors with code '1_301' from `basicDetails` and `additionalPersonalDetails`.
|
|
2791
|
+
*
|
|
2792
|
+
* @param problems - The original entity problems object.
|
|
2793
|
+
* @returns A new `EntityProblems` object with BAFIN-specific modifications.
|
|
2794
|
+
*/
|
|
2795
|
+
var removeIdVerificationProblemsForBafinSignatory = (problems, decisionMakerLe) => {
|
|
2796
|
+
const newProblems = structuredClone(problems);
|
|
2797
|
+
if (newProblems.missingData?.some((item) => item.remediatingActions?.some((action) => action.code === "1_301" || action.code === "2_215"))) {
|
|
2798
|
+
if (hasRequiredDataForIdNow(decisionMakerLe)) setTimeout(() => {
|
|
2799
|
+
idNowModalChildEntityId.value = decisionMakerLe;
|
|
2800
|
+
showIdNowModal.value = true;
|
|
2801
|
+
}, 100);
|
|
2802
|
+
}
|
|
2803
|
+
if (Array.isArray(newProblems.missingData)) newProblems.missingData = newProblems.missingData.filter((item) => !item.remediatingActions?.some((action) => action.code === "1_301" || action.code === "2_215"));
|
|
2804
|
+
if (newProblems.remediationActions?.["1_301"]) delete newProblems.remediationActions["1_301"];
|
|
2805
|
+
if (newProblems.remediationActions?.["2_215"]) delete newProblems.remediationActions["2_215"];
|
|
2806
|
+
if (newProblems.verificationErrors?.idVerificationMethod) delete newProblems.verificationErrors.idVerificationMethod;
|
|
2807
|
+
["basicDetails", "additionalPersonalDetails"].forEach((formName) => {
|
|
2808
|
+
const subErrors = newProblems.verificationErrors?.[formName]?.["1_30"]?.["1_3000"];
|
|
2809
|
+
if (newProblems.verificationErrors?.[formName]?.["1_30"] && Array.isArray(subErrors)) newProblems.verificationErrors[formName]["1_30"]["1_3000"] = subErrors.filter((error) => error.code !== "1_301");
|
|
2810
|
+
});
|
|
2811
|
+
return newProblems;
|
|
2812
|
+
};
|
|
2813
|
+
/**
|
|
2814
|
+
* Type guard to check if the data object is a LegalEntityAssociation.
|
|
2815
|
+
*/
|
|
2816
|
+
var isLegalEntityAssociation = (data) => "legalEntityId" in data;
|
|
2817
|
+
/**
|
|
2818
|
+
* Checks if the current context matches the specific flow for a BAFIN signatory.
|
|
2819
|
+
* This is true when the task is for a decision maker, their role is 'signatory',
|
|
2820
|
+
* and the BAFIN scenario is active.
|
|
2821
|
+
*
|
|
2822
|
+
* @param params - The parameters for the check.
|
|
2823
|
+
* @returns `true` if the conditions for the BAFIN signatory flow are met.
|
|
2824
|
+
*/
|
|
2825
|
+
var isBafinSignatoryFlow = ({ taskType, data, scenarios }) => {
|
|
2826
|
+
if (!data || !scenarios) return false;
|
|
2827
|
+
const isSignatory = isLegalEntityAssociation(data) ? data.type === DecisionMakerTypes.SIGNATORY : data.basicDetails?.role?.includes(DecisionMakerTypes.SIGNATORY);
|
|
2828
|
+
if (taskType === TaskTypes.DECISION_MAKER && isSignatory) return scenarios.includes(Scenarios.L_BAFIN);
|
|
2829
|
+
return false;
|
|
2830
|
+
};
|
|
2831
|
+
//#endregion
|
|
2832
|
+
export { COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS as A, businessRegistrationNumberMasks as B, COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION as C, COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS as D, COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER as E, exemptedFromTaxDefaultFieldMetadata as F, toFullWidth as H, getTaxInformationPlaceholderText as I, taxInformationDefaultFieldConfig as L, REGISTRATION_NUMBER_EXEMPTION_RULES as M, TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION as N, COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS as O, exemptedFromTaxDefaultFieldConfig as P, taxInformationDefaultFieldMetadata as R, COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP as S, COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT as T, isJapanLocalizationEnabled as U, stateFormatGuidanceText as V, CompanyTypesValues as W, taxIdNumberOptions as _, idNowPostSubmit as a, COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION as b, TileGroup as c, removeTaxInfoForCountry as d, upsertTaxInfoForCountry as f, getValidCompanyTypesForTaxIdNumberType as g, getTaxIdNumberOptions as h, idNowModalChildEntityId as i, COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4 as j, COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES as k, TAX_INFORMATION_FIELD as l, getDefaultTaxIdNumberType as m, isBafinSignatoryFlow as n, shouldShowIdNowModal as o, TaxIdNumberTypeSelector as p, removeIdVerificationProblemsForBafinSignatory as r, showIdNowModal as s, getIdNowMissingDataPoints as t, TaxInformationField as u, COUNTRIES_REQUIRING_E_INVOICING_CODE as v, COUNTRIES_THAT_USES_UEN_OR_GST as w, COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION as x, COUNTRIES_REQUIRING_FINANCIAL_INFORMATION as y, businessRegistrationNumberPatterns as z };
|