@adyen/kyc-components 4.22.0-beta.0 → 4.22.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcceptTermsOfServiceWorkflow-D2mvc_PB.js → AcceptTermsOfServiceWorkflow-CLA1JNzc.js} +4 -4
- package/dist/{Accordion-DEivLTcw.js → Accordion-Cwp-Xc7e.js} +1 -1
- package/dist/{AccountSetupRejected-pcQcFAhQ.js → AccountSetupRejected-B2h3LRDZ.js} +1 -1
- package/dist/{AdaptiveWorkflow-C0EsaW8F.js → AdaptiveWorkflow-BHooRzh_.js} +16 -16
- package/dist/{AdaptiveWorkflowComponent-Nk2CJaU4.js → AdaptiveWorkflowComponent-D1EALddI.js} +3 -3
- package/dist/{AddressFields-3kqeRdC_.js → AddressFields-CU23S3JV.js} +10 -10
- package/dist/{Avatar-DHyXCNwV.js → Avatar-BbOb0bui.js} +1 -1
- package/dist/{BusinessFinancingDropin-BOECqGNd.js → BusinessFinancingDropin-Cc0oB8ka.js} +24 -26
- package/dist/{BusinessFinancingPage-DSy5an97.js → BusinessFinancingPage-D0EmBl9D.js} +3 -3
- package/dist/{BusinessRegistrationNumberField-DHccXqsX.js → BusinessRegistrationNumberField-c8mvmS4m.js} +5 -5
- package/dist/{BusinessRegistrationNumberFieldGroup-2e9GKH-i.js → BusinessRegistrationNumberFieldGroup-DNZALTo_.js} +5 -5
- package/dist/{BusinessTypeSelectionPage-BraXRUrg.js → BusinessTypeSelectionPage-CYjrUqoM.js} +12 -12
- package/dist/{Button-nDbNtBn3.js → Button-oqvTDztg.js} +1 -1
- package/dist/{Checkbox-BiKnP2fS.js → Checkbox-2Rp9bWYN.js} +1 -1
- package/dist/{ComponentGroup-Due-N8Yz.js → ComponentGroup-DbWo8fnI.js} +3 -3
- package/dist/{ConstitutionalDocument-CtRHXMb9.js → ConstitutionalDocument-64rqHz7d.js} +14 -14
- package/dist/{ContactDetails-Syyy5BfB.js → ContactDetails-ucx3UuP8.js} +5 -5
- package/dist/{ContextGuidance-D8leB0D6.js → ContextGuidance-CIwiyrm9.js} +2 -2
- package/dist/{Currency-CFsMnSP0.js → Currency-fvQfdQ2i.js} +5 -5
- package/dist/{CustomerSupport-DqayB3BM.js → CustomerSupport-CHHRYNTG.js} +11 -11
- package/dist/{DataConflictsModal-Bz2SYyi5.js → DataConflictsModal-BJHJVW3V.js} +6 -6
- package/dist/{DebugModal-fH0uKl1E.js → DebugModal-CptS2b87.js} +10 -10
- package/dist/{DecisionMakerDetails-7IPREpy1.js → DecisionMakerDetails-a_G8S1S9.js} +12 -12
- package/dist/{DecisionMakerDetailsPage-Bs9q7sxc.js → DecisionMakerDetailsPage-BsiheWPy.js} +7 -7
- package/dist/{DecisionMakers-Dw66GRhZ.js → DecisionMakers-DC3r2UzN.js} +12 -12
- package/dist/{Dropzone-CjLSK2UN.js → Dropzone-CTdbCPiL.js} +7 -7
- package/dist/{EmbeddedStatus-BIVFBjzu.js → EmbeddedStatus-DqanSUWu.js} +3 -3
- package/dist/{EndStateLayout-D2CSEwEn.js → EndStateLayout-CRNRpDeu.js} +2 -2
- package/dist/{EntityAssociation-LF_5ihhI.js → EntityAssociation-DqTOqixv.js} +6 -6
- package/dist/{ErrorPanel-tLtZnFnX.js → ErrorPanel-jcVYNW8o.js} +2 -2
- package/dist/{GlobalEntryModal-CY-t1fGQ.js → GlobalEntryModal-Bwy0lfz2.js} +209 -47
- package/dist/{GlobalEntryPage-xX4ruKnx.js → GlobalEntryPage-DPKND7LX.js} +11 -8
- package/dist/{Icon-BcaP-f1D.js → Icon-BblJeZYj.js} +1 -1
- package/dist/{IdentityNumber-4ky6SOcb.js → IdentityNumber-D9t0xamT.js} +5 -5
- package/dist/{IdentityNumberFieldGroup-BKKmSfLG.js → IdentityNumberFieldGroup-0Ll_77LW.js} +2 -2
- package/dist/{IdentityScreeningWorkflow-D0eNj4nD.js → IdentityScreeningWorkflow-DESXjfuC.js} +12 -12
- package/dist/{Individual.rules-PKwY3D-0.js → Individual.rules-4BHmKpNa.js} +4 -4
- package/dist/{IndividualDropin-DrQiG_Vy.js → IndividualDropin-CMejkT3R.js} +36 -39
- package/dist/{IndustryCodeFieldGroup-jm8KFccr.js → IndustryCodeFieldGroup-xFrcCogG.js} +4 -4
- package/dist/{InputDate-C14J5Af2.js → InputDate-DMcomeFj.js} +2 -2
- package/dist/{InputText-Dr-Wg0uc.js → InputText-BqeL5dXt.js} +3 -3
- package/dist/{Introduction-DXAxkrDG.js → Introduction-6WPMkIpx.js} +6 -6
- package/dist/{InvitedDecisionMakerComponent-CPMIUjiE.js → InvitedDecisionMakerComponent-w0xQxDgC.js} +9 -9
- package/dist/{JpAddressFields-olKUlhpt.js → JpAddressFields-Cic1nSNI.js} +8 -8
- package/dist/{LegalCompanyNameField-BrdI-awc.js → LegalCompanyNameField-Dl60xD84.js} +5 -5
- package/dist/{LegalName-CWoSqy0V.js → LegalName-DDKN6L93.js} +3 -3
- package/dist/{LegalRepresentativeDetailsPage-Ca3FLoSd.js → LegalRepresentativeDetailsPage-B2ubp7Rb.js} +3 -3
- package/dist/{Link-opuU6bLF.js → Link-Bb1XDrs1.js} +1 -1
- package/dist/{ListItem-CbjOa0L_.js → ListItem-CI4fqIkg.js} +2 -2
- package/dist/{Modal-BDNS-0rS.js → Modal-By_wpf9o.js} +2 -2
- package/dist/{Name-CxlxPgUR.js → Name-BpKVUmoY.js} +4 -4
- package/dist/{NewSummary-mLsovGX8.js → NewSummary-Bmi54FYk.js} +6 -6
- package/dist/{PatriotActDisclosure-kOnDnF8P.js → PatriotActDisclosure-DsZX3cb-.js} +9 -9
- package/dist/{PayoutDetailsDropin-CZ77wefd.js → PayoutDetailsDropin-BkzjalFb.js} +24 -24
- package/dist/{PayoutDetailsPage-Cyy-fDbK.js → PayoutDetailsPage-BLbHUm0I.js} +4 -4
- package/dist/{RadioGroup-C0mNADXE.js → RadioGroup-e6Ty_ggj.js} +11 -11
- package/dist/{Review-CDtJh9j3.js → Review-BG_iSaAN.js} +6 -6
- package/dist/{RootBusinessDetailsPage-CnVWFx0H.js → RootBusinessDetailsPage-D6ZEfFr4.js} +3 -3
- package/dist/{RootBusinessLinesPage-Dtx9X-mD.js → RootBusinessLinesPage-B6Swhdyx.js} +20 -20
- package/dist/{RootIndividualDetailsPage-q8PZ0Khk.js → RootIndividualDetailsPage-2Bu7fbyB.js} +4 -4
- package/dist/{Select-UO37dd_q.js → Select-CrcaoG0i.js} +6 -6
- package/dist/{SignPCIComponent-D21OqVWo.js → SignPCIComponent-B4Iz8PXX.js} +12 -12
- package/dist/{SingpassSelection-CRYphIRT.js → SingpassSelection-D2NSiGzi.js} +4 -4
- package/dist/{SoleProprietorshipPage-BKB0sRiP.js → SoleProprietorshipPage-bJ6oea6W.js} +3 -3
- package/dist/{SourceOfFundsPage-C2ZEp0lT.js → SourceOfFundsPage-Bu9e93PV.js} +23 -25
- package/dist/{SourceOfFundsWorkflow-Cy12c7ou.js → SourceOfFundsWorkflow-CW7McbuG.js} +4 -4
- package/dist/{StateField-CWS8eXex.js → StateField-BnyUQjAj.js} +46 -5
- package/dist/{Step-CYG94mSp.js → Step-CZq7qzCe.js} +4 -4
- package/dist/{Task-D6xuGucd.js → Task-Jhx4xFyF.js} +7 -7
- package/dist/{TaskGroup-C4ND30dB.js → TaskGroup-CHPDt1lw.js} +3 -3
- package/dist/{TaskListItem-Dc6n6llv.js → TaskListItem-BAHYod3y.js} +10 -10
- package/dist/{TaskStepperContextProvider-CvChF1W5.js → TaskStepperContextProvider-BtpYUg5S.js} +1 -1
- package/dist/{TaskVerificationStatus-pjPK5vVN.js → TaskVerificationStatus-onOyOzoM.js} +1 -1
- package/dist/{TaxInformationFieldGroup-BACQgHQ7.js → TaxInformationFieldGroup-D4bSgrDG.js} +7 -7
- package/dist/{TaxReportingDropin-DmOclyYQ.js → TaxReportingDropin-BD-WaKf5.js} +13 -13
- package/dist/{TaxReportingWorkflow-CBEB7oAn.js → TaxReportingWorkflow-UVCd2CGW.js} +4 -4
- package/dist/{TermsOfServiceManagement-No_9QGjv.js → TermsOfServiceManagement-Czlvu-_X.js} +11 -11
- package/dist/{TextArea-BzY5efza.js → TextArea-Doiwq6Fz.js} +4 -4
- package/dist/{TrustDetailsPage-BHjbebZX.js → TrustDetailsPage-Do_Pgp5e.js} +21 -23
- package/dist/{TrustMemberCompanyPage-BSe-Pn1O.js → TrustMemberCompanyPage-COKJWVwj.js} +4 -4
- package/dist/{TrustMemberIndividualPage-DxlZQF6W.js → TrustMemberIndividualPage-BTzYVATe.js} +3 -3
- package/dist/{TrustMemberRoleAndTypePage-AtlXyfKk.js → TrustMemberRoleAndTypePage-CvT2NyPL.js} +15 -16
- package/dist/{TrustMembersOverview-DpmUv4Vj.js → TrustMembersOverview-Dx2d70H1.js} +10 -10
- package/dist/{UboTaskItem-ESC2Ze3o.js → UboTaskItem-DItfn-Pd.js} +7 -7
- package/dist/{UnincorporatedPartnershipIndividualPage-BVpz27KZ.js → UnincorporatedPartnershipIndividualPage-CLBFd1-S.js} +3 -3
- package/dist/{UnincorporatedPartnershipMemberCompanyPage-BBxtLGt0.js → UnincorporatedPartnershipMemberCompanyPage-5RlKVr20.js} +4 -4
- package/dist/{UnincorporatedPartnershipMemberRoleAndTypePage-BuI7aE3O.js → UnincorporatedPartnershipMemberRoleAndTypePage-D3j7kPUH.js} +8 -8
- package/dist/{UnincorporatedPartnershipMembersOverview-sE8-A2hQ.js → UnincorporatedPartnershipMembersOverview-BrypfDgd.js} +6 -6
- package/dist/{VerificationErrorAlert-BCEhkhpr.js → VerificationErrorAlert-Dg0EN5Gg.js} +2 -2
- package/dist/{Workflow-CzSGihyD.js → Workflow-BbFLvLAf.js} +6 -6
- package/dist/{accountHolderUtils-3WiED1-j.js → accountHolderUtils-BnH2f3aW.js} +1 -1
- package/dist/adyen-business-financing.js +4 -4
- package/dist/adyen-individual-configuration.js +3 -3
- package/dist/adyen-individual-status.js +3 -3
- package/dist/adyen-invited-decision-maker.js +3 -3
- package/dist/adyen-onboarding.js +34 -25
- package/dist/adyen-terms-of-service-management.js +3 -3
- package/dist/adyen-terms-of-service-status.js +3 -3
- package/dist/adyen-transfer-instrument-configuration.js +3 -3
- package/dist/adyen-transfer-instrument-management.js +10 -10
- package/dist/adyen-verification-status.js +3 -3
- package/dist/{bafinUtils-h8n1IbJ9.js → bafinUtils-F8i4raV6.js} +9 -9
- package/dist/{constants-B9iXz9xK.js → constants-C1GRcz1y.js} +4 -4
- package/dist/{error-CHFF8jLc.js → error-3d6yiTPF.js} +3 -3
- package/dist/{form-rules-CKwx5XtT.js → form-rules-BhIs9ilj.js} +5 -5
- package/dist/{formatValidationError-DZ1CxHdw.js → formatValidationError-DdKr3rgo.js} +1 -1
- package/dist/{getDefaultRegistrationNumberType-6m6DEmW8.js → getDefaultRegistrationNumberType-CfU1YUaz.js} +5 -5
- package/dist/{getTrustedDecisionMakers-qs2frwk2.js → getTrustedDecisionMakers-Brlr-pKL.js} +1 -1
- package/dist/{mapJpAddressSchemaToAddressLocalizations-CX2djRYM.js → mapJpAddressSchemaToAddressLocalizations-CWb68lJV.js} +2 -2
- package/dist/{mapLegalEntityToIndividualSchema-ChE9qTUB.js → mapLegalEntityToIndividualSchema-B3XhBnaa.js} +6 -6
- package/dist/{mapTransferInstrumentToPayoutAccount-BmSbFaJJ.js → mapTransferInstrumentToPayoutAccount-n4ffPJ2c.js} +2 -2
- package/dist/{processValidationErrors-CRWq2tu-.js → processValidationErrors-BfqJR1rP.js} +3 -3
- package/dist/{resolveEnvironment-D2iMH7UD.js → resolveEnvironment-Bp-RuIhz.js} +9 -9
- package/dist/types/components/GlobalEntry/globalEntryKeyMapping.d.ts +15 -0
- package/dist/types/components/GlobalEntry/tasks/GlobalEntryModal.d.ts +6 -2
- package/dist/types/components/GlobalEntry/tasks/GlobalEntryPage.d.ts +5 -1
- package/dist/types/components/GlobalEntry/utils.d.ts +22 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.d.ts +1 -1
- package/dist/types/components/Shared/FormFlow/FormFlow.types.d.ts +1 -0
- package/dist/types/router/routeConfig.d.ts +1 -1
- package/dist/{types-Bdfu7HN6.js → types-C6GnB9nH.js} +1 -1
- package/dist/{useBusinessDetailsData-DZQuIMNw.js → useBusinessDetailsData-UyUhXzON.js} +38 -41
- package/dist/{useCanSeeIntroduction-BGYdkMIE.js → useCanSeeIntroduction-C6qXZZe8.js} +2 -2
- package/dist/{useForm-BJq32Ve1.js → useForm-BhfuVkAR.js} +2 -2
- package/dist/{useHideTaskStepper-CcCmW80A.js → useHideTaskStepper-Dlzsx-RK.js} +1 -1
- package/dist/{useId-BMocIuPK.js → useId-DqpXTon5.js} +1 -1
- package/dist/{useNavigate-D4ypqPBN.js → useNavigate-Xc0HARgb.js} +33 -33
- package/dist/{useSalesChannels-BCzs8Xya.js → useSalesChannels-gzi6QOI7.js} +2 -2
- package/dist/{useTaskLandedEvent-Cf1fN_gV.js → useTaskLandedEvent-BXv-wuAJ.js} +1 -1
- package/dist/{useTrustMembers-DqpnYNNj.js → useTrustMembers-wjNlRtOm.js} +1 -1
- package/dist/{useUnincorporatedPartnershipMembers-w3dG_nyc.js → useUnincorporatedPartnershipMembers-CfpBIS06.js} +1 -1
- package/dist/{utils-BMhvbUV1.js → utils-DebuaWe9.js} +4 -4
- package/dist/{StructuredList-CqZM_5X9.js → utils-DyriwmGv.js} +94 -5
- package/dist/{validate-DiEa5w30.js → validate-C2fajdCR.js} +4 -4
- package/dist/{validate-RLWN-I5L.js → validate-DruWE6jY.js} +2 -2
- package/dist/{validate-Dfw99Sal.js → validate-DzNLLQoR.js} +3 -3
- package/dist/{validate-BqIbVY0E.js → validate-MsZ6MiUq.js} +7 -7
- package/dist/{validateExtractionResult-DueyX5oY.js → validateExtractionResult-BfwUJj1D.js} +2 -2
- package/dist/{validationError-BhICjGiF.js → validationError-DudGlB6v.js} +2 -2
- package/package.json +1 -1
- package/dist/useCreateLegalEntity-CYZd_62a.js +0 -24
- package/dist/useUpdateLegalEntity-CvACAgDP.js +0 -29
- package/dist/utils-DdHbAadK.js +0 -80
|
@@ -1,32 +1,36 @@
|
|
|
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] = "1e5c168c-f150-4f88-8412-5ef3e319f6a5", e._sentryDebugIdIdentifier = "sentry-dbid-1e5c168c-f150-4f88-8412-5ef3e319f6a5");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { n as addResourceBundles, r as useTranslation } from "./translation-BOm4lmPx.js";
|
|
6
|
-
import { A as _rolldown_dynamic_import_helper_default, E as useAllowedCountries, j as useToggleContext, k as Header, pt as useAccountHolder, v as isPartOfUnincorporatedPartnership, x as Alert } from "./resolveEnvironment-
|
|
6
|
+
import { A as _rolldown_dynamic_import_helper_default, E as useAllowedCountries, j as useToggleContext, k as Header, pt as useAccountHolder, v as isPartOfUnincorporatedPartnership, x as Alert } from "./resolveEnvironment-Bp-RuIhz.js";
|
|
7
|
+
import { t as createLogger } from "./logger-Z8AeTE4x.js";
|
|
7
8
|
import { t as Typography } from "./Typography-CAc_f5Iq.js";
|
|
8
|
-
import { t as Button } from "./Button-
|
|
9
|
+
import { t as Button } from "./Button-oqvTDztg.js";
|
|
9
10
|
import { t as LegalEntityTypes } from "./legal-entity-type-0MfCGzUf.js";
|
|
10
11
|
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-CNE5uei8.js";
|
|
11
12
|
import { s as keysOf } from "./genUtils-Ce61IJs8.js";
|
|
12
13
|
import { t as StackLayout } from "./StackLayout-IUdNMDgW.js";
|
|
13
14
|
import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
|
|
15
|
+
import { y as reverseMapping } from "./processCapabilities-BfskhjUw.js";
|
|
14
16
|
import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
|
|
15
|
-
import { f as hasSolePropInLegalEntity } from "./entityAssociationUtil-CLBR9osP.js";
|
|
16
|
-
import { t as InputText } from "./InputText-
|
|
17
|
-
import { _ as getPropsFromConfigurations, m as resolveFieldMetadata, t as createFormRules } from "./form-rules-
|
|
18
|
-
import { t as ListItem } from "./ListItem-
|
|
19
|
-
import { t as getFormSlice } from "./getFormSlice-DzRO0UUx.js";
|
|
17
|
+
import { f as hasSolePropInLegalEntity, s as getOwnEntityAssociations } from "./entityAssociationUtil-CLBR9osP.js";
|
|
18
|
+
import { t as InputText } from "./InputText-BqeL5dXt.js";
|
|
19
|
+
import { _ as getPropsFromConfigurations, m as resolveFieldMetadata, t as createFormRules } from "./form-rules-BhIs9ilj.js";
|
|
20
|
+
import { t as ListItem } from "./ListItem-CI4fqIkg.js";
|
|
21
|
+
import { n as useAssociatedLegalEntity, t as getFormSlice } from "./getFormSlice-DzRO0UUx.js";
|
|
20
22
|
import { t as Card } from "./Card-BCGLpdw7.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
23
|
+
import { r as useToastContext } from "./useId-DqpXTon5.js";
|
|
24
|
+
import { A as TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION, C as COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER, D as COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS, E as COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES, F as taxInformationDefaultFieldConfig, H as CompanyTypesValues, I as taxInformationDefaultFieldMetadata, O as COUNTRIES_WITH_POSSIBLE_TRUSTEE_TAXID_ABSENT_V4, P as getTaxInformationPlaceholderText, S as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, T as COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS, V as isJapanLocalizationEnabled, b as COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION, c as TileGroup, j as isUsingCompanySearch, k as REGISTRATION_NUMBER_EXEMPTION_RULES, l as TAX_INFORMATION_FIELD, u as TaxInformationField, w as COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS, x as COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP, y as COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION } from "./bafinUtils-F8i4raV6.js";
|
|
25
|
+
import { r as Field } from "./Select-CrcaoG0i.js";
|
|
26
|
+
import { r as formatObject } from "./utils-DyriwmGv.js";
|
|
27
|
+
import { d as COUNTRIES_WITH_STATES_DATASET, m as useCreateLegalEntity, n as StateField, p as useUpdateLegalEntity, r as stateFieldMetadata, t as STATE_FIELD } from "./StateField-BnyUQjAj.js";
|
|
28
|
+
import { M as FormContextProvider, d as useFormContext, f as addValidityToForms, g as useMultiForm, k as createFormUtils, l as COUNTRY_FIELD, m as FormFlow, p as getRequiredForms, u as CountryField, y as useFormComposer } from "./RadioGroup-e6Ty_ggj.js";
|
|
24
29
|
import { t as List } from "./List-ywoRPg-q.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { n as BusinessRegistrationNumberField, t as BUSINESS_REGISTRATION_NUMBER_FIELD } from "./BusinessRegistrationNumberField-DHccXqsX.js";
|
|
30
|
+
import { a as defaultFieldMetadata, i as defaultFieldConfigV4, o as defaultFieldMetadataV4, r as defaultFieldConfig, t as LEGAL_COMPANY_NAME_FIELD } from "./LegalCompanyNameField-Dl60xD84.js";
|
|
31
|
+
import { c as CountryOfGoverningLawField, i as isRegistrationExemptionAllowed, l as useLegalCompanyNameField, o as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, s as COUNTRY_OF_GOVERNING_LAW_FIELD, t as CountryOfGoverningLawFieldValidation } from "./validate-MsZ6MiUq.js";
|
|
32
|
+
import { l as registrationNumberDefaultFieldConfig, u as registrationNumberDefaultFieldMetadata } from "./getDefaultRegistrationNumberType-CfU1YUaz.js";
|
|
33
|
+
import { n as BusinessRegistrationNumberField, t as BUSINESS_REGISTRATION_NUMBER_FIELD } from "./BusinessRegistrationNumberField-c8mvmS4m.js";
|
|
30
34
|
import { useCallback, useEffect, useMemo, useState } from "preact/compat";
|
|
31
35
|
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
32
36
|
import { signal } from "@preact/signals";
|
|
@@ -276,36 +280,169 @@ var UnincorporatedOrganizationTypeField = ({ data, valid, errors, handleChangeFo
|
|
|
276
280
|
})] });
|
|
277
281
|
};
|
|
278
282
|
//#endregion
|
|
283
|
+
//#region src/components/GlobalEntry/globalEntryKeyMapping.ts
|
|
284
|
+
/**
|
|
285
|
+
* Schema-keyed mapping, for reading a legal entity into the form schema.
|
|
286
|
+
*/
|
|
287
|
+
var globalEntryKeyMappingForOrgs = {
|
|
288
|
+
"entityInformation.country": "organization.registeredAddress.country",
|
|
289
|
+
"entityInformation.stateOrProvince": "organization.registeredAddress.stateOrProvince",
|
|
290
|
+
"registrationInformation.legalCompanyName": "organization.legalName",
|
|
291
|
+
"registrationInformation.registrationNumber": "organization.registrationNumber",
|
|
292
|
+
"registrationInformation.exemptedFromRegistrationNumber": "organization.registrationNumberAbsent",
|
|
293
|
+
"registrationInformation.taxInformation": "organization.taxInformation",
|
|
294
|
+
"registrationInformation.countryOfGoverningLaw": "organization.countryOfGoverningLaw"
|
|
295
|
+
};
|
|
296
|
+
var globalEntryKeyMappingForIndividuals = {
|
|
297
|
+
"entityInformation.country": "individual.residentialAddress.country",
|
|
298
|
+
"entityInformation.stateOrProvince": "individual.residentialAddress.stateOrProvince"
|
|
299
|
+
};
|
|
300
|
+
var globalEntryKeyMappingForSoleProps = {
|
|
301
|
+
"entityInformation.country": "soleProprietorship.registeredAddress.country",
|
|
302
|
+
"entityInformation.stateOrProvince": "soleProprietorship.registeredAddress.stateOrProvince",
|
|
303
|
+
"registrationInformation.legalCompanyName": "soleProprietorship.name",
|
|
304
|
+
"registrationInformation.registrationNumber": "soleProprietorship.registrationNumber",
|
|
305
|
+
"registrationInformation.taxInformation": "soleProprietorship.taxInformation",
|
|
306
|
+
"registrationInformation.exemptedFromTax": "soleProprietorship.taxAbsent",
|
|
307
|
+
"registrationInformation.countryOfGoverningLaw": "soleProprietorship.countryOfGoverningLaw"
|
|
308
|
+
};
|
|
309
|
+
/** Api-keyed mapping, for building the legal entity request from the form schema */
|
|
310
|
+
var globalEntryApiKeyMappingForOrgs = reverseMapping(globalEntryKeyMappingForOrgs);
|
|
311
|
+
/** Api-keyed mapping, for building the sole proprietorship request from the form schema */
|
|
312
|
+
var globalEntryApiKeyMappingForSoleProps = reverseMapping(globalEntryKeyMappingForSoleProps);
|
|
313
|
+
/** Api-keyed mapping, for building the legal entity request from the form schema */
|
|
314
|
+
var globalEntryApiKeyMappingForIndividuals = reverseMapping(globalEntryKeyMappingForIndividuals);
|
|
315
|
+
//#endregion
|
|
279
316
|
//#region src/components/GlobalEntry/utils.ts
|
|
280
317
|
var getGlobalEntryCompanyType = (legalEntity, data) => {
|
|
281
318
|
if (data.entityInformation.entitySetup === "partOfABusiness") {
|
|
282
319
|
if (legalEntity?.organization?.type) return legalEntity?.organization?.type || void 0;
|
|
283
320
|
}
|
|
284
|
-
if (data.entityInformation.entitySetup === "justMe")
|
|
321
|
+
if (data.entityInformation.entitySetup === "justMe") {
|
|
322
|
+
const hasSoleProprietorshipAssociation = legalEntity && hasSolePropInLegalEntity(legalEntity);
|
|
323
|
+
return data.registrationInformation.filedPaperwork === "yes" || hasSoleProprietorshipAssociation ? CompanyTypesValues.SOLE_PROPRIETORSHIP : LegalEntityTypes.INDIVIDUAL;
|
|
324
|
+
}
|
|
285
325
|
};
|
|
286
|
-
var
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
326
|
+
var determineEntitySetup = (legalEntity) => {
|
|
327
|
+
if (isPartOfUnincorporatedPartnership(legalEntity) && legalEntity.type === "individual") return "partOfABusiness";
|
|
328
|
+
if (legalEntity.type === "individual") return "justMe";
|
|
329
|
+
return "partOfABusiness";
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* @param legalEntity the root entity
|
|
333
|
+
* @param associatedSoleProp the proprietorship associated to the root, when there is one. It holds
|
|
334
|
+
* the registration details the root does not, so editing an existing proprietorship prefills.
|
|
335
|
+
*/
|
|
336
|
+
var mapLegalEntityToGlobalEntrySchema = (legalEntity, associatedSoleProp) => {
|
|
337
|
+
const soleProprietorship = associatedSoleProp?.soleProprietorship ?? (legalEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? legalEntity.soleProprietorship : void 0);
|
|
338
|
+
const isSoleProprietorship = !!soleProprietorship;
|
|
339
|
+
const taxInformation = isSoleProprietorship ? soleProprietorship.taxInformation : legalEntity.organization?.taxInformation;
|
|
340
|
+
const registrationNumber = isSoleProprietorship ? soleProprietorship.registrationNumber : legalEntity.organization?.registrationNumber;
|
|
290
341
|
const currentCountryTaxInformation = taxInformation?.find((taxInformationItem) => taxInformationItem.country === getLegalEntityCountry(legalEntity));
|
|
291
342
|
const isUen = currentCountryTaxInformation?.type === "UEN";
|
|
292
343
|
return {
|
|
293
344
|
entityInformation: {
|
|
294
|
-
entitySetup: legalEntity
|
|
345
|
+
entitySetup: determineEntitySetup(legalEntity),
|
|
295
346
|
country: getLegalEntityCountry(legalEntity)
|
|
296
347
|
},
|
|
297
348
|
registrationInformation: {
|
|
298
|
-
filedPaperwork: null,
|
|
299
|
-
unincorporatedOrganizationType:
|
|
300
|
-
legalCompanyName: isSoleProprietorship ?
|
|
349
|
+
filedPaperwork: taxInformation ? "yes" : isPartOfUnincorporatedPartnership(legalEntity) ? "no" : null,
|
|
350
|
+
unincorporatedOrganizationType: isPartOfUnincorporatedPartnership(legalEntity) ? "unincorporatedPartnership" : void 0,
|
|
351
|
+
legalCompanyName: isSoleProprietorship ? soleProprietorship.name : legalEntity.organization?.legalName,
|
|
301
352
|
registrationNumber: isUen ? currentCountryTaxInformation?.number : registrationNumber,
|
|
302
|
-
exemptedFromRegistrationNumber: isSoleProprietorship ?
|
|
353
|
+
exemptedFromRegistrationNumber: isSoleProprietorship ? soleProprietorship.taxAbsent : legalEntity.organization?.registrationNumberAbsent,
|
|
354
|
+
countryOfGoverningLaw: isSoleProprietorship ? soleProprietorship.countryOfGoverningLaw : legalEntity.organization?.countryOfGoverningLaw,
|
|
303
355
|
taxInformation,
|
|
304
356
|
isUen
|
|
305
357
|
},
|
|
306
358
|
primaryPartner: { primaryPartnerType: isPartOfUnincorporatedPartnership(legalEntity) ? legalEntity.type === "individual" ? "individual" : "organization" : void 0 }
|
|
307
359
|
};
|
|
308
360
|
};
|
|
361
|
+
var isSoleProprietorship = (data) => data.entityInformation?.entitySetup === "justMe" && data.registrationInformation?.filedPaperwork === "yes";
|
|
362
|
+
var isUnincorporatedPartnership = (data) => data.entityInformation?.entitySetup === "partOfABusiness" && data.registrationInformation?.unincorporatedOrganizationType === "unincorporatedPartnership";
|
|
363
|
+
/**
|
|
364
|
+
* If switching to a non-SoleProp or a non-UnincorporatedPartnership, the associations
|
|
365
|
+
* should be dropped.
|
|
366
|
+
*/
|
|
367
|
+
var shouldClearEntityAssociations = (data, legalEntity) => getOwnEntityAssociations(legalEntity).length > 0 && !isSoleProprietorship(data) && !isUnincorporatedPartnership(data);
|
|
368
|
+
/**
|
|
369
|
+
* `justMe` is always a natural person. Being part of a business only makes the entity an
|
|
370
|
+
* `organization` when the primary partner is not an individual, because an individual partner in an
|
|
371
|
+
* unincorporated partnership stays an individual legal entity.
|
|
372
|
+
*/
|
|
373
|
+
var determineLegalEntityType = (data) => data.entityInformation?.entitySetup === "partOfABusiness" && data.primaryPartner?.primaryPartnerType !== "individual" ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.INDIVIDUAL;
|
|
374
|
+
var determineEntityAssociations = (data, legalEntity, newSoleProp) => {
|
|
375
|
+
/** Sole props are the only association we create and associate in Global Entry */
|
|
376
|
+
if (newSoleProp) return [{
|
|
377
|
+
type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
378
|
+
legalEntityId: newSoleProp.id
|
|
379
|
+
}];
|
|
380
|
+
return shouldClearEntityAssociations(data, legalEntity) ? [] : void 0;
|
|
381
|
+
};
|
|
382
|
+
var mapGlobalEntrySchemaToLegalEntity = (data, legalEntity, newSoleProp) => {
|
|
383
|
+
const mapping = determineLegalEntityType(data) === LegalEntityTypes.ORGANIZATION ? globalEntryApiKeyMappingForOrgs : globalEntryApiKeyMappingForIndividuals;
|
|
384
|
+
const entityAssociations = determineEntityAssociations(data, legalEntity, newSoleProp);
|
|
385
|
+
return {
|
|
386
|
+
...formatObject(data, mapping),
|
|
387
|
+
id: legalEntity.id,
|
|
388
|
+
type: determineLegalEntityType(data),
|
|
389
|
+
...entityAssociations && { entityAssociations }
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
var mapGlobalEntrySchemaToSoleProp = (data) => {
|
|
393
|
+
const { soleProprietorship } = formatObject(data, globalEntryApiKeyMappingForSoleProps);
|
|
394
|
+
return {
|
|
395
|
+
type: LegalEntityTypes.SOLE_PROPRIETORSHIP,
|
|
396
|
+
soleProprietorship: {
|
|
397
|
+
...soleProprietorship,
|
|
398
|
+
/**
|
|
399
|
+
* A proprietorship always has a governing law, but the field is only put to the user in the
|
|
400
|
+
* countries that can differ from where they registered, so the rest fall back to that.
|
|
401
|
+
*/
|
|
402
|
+
countryOfGoverningLaw: data.registrationInformation?.countryOfGoverningLaw ?? data.entityInformation?.country
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* The account holder is derived from the form data, not sent to the API and is kept client-side.
|
|
408
|
+
*/
|
|
409
|
+
var determineAccountHolder = (data) => {
|
|
410
|
+
const entitySetup = data.entityInformation?.entitySetup;
|
|
411
|
+
const { filedPaperwork, unincorporatedOrganizationType } = data.registrationInformation;
|
|
412
|
+
if (entitySetup === "justMe") return filedPaperwork === "yes" ? "mySoleProprietorName" : "myName";
|
|
413
|
+
if (entitySetup === "partOfABusiness") {
|
|
414
|
+
if (unincorporatedOrganizationType === "unincorporatedPartnership") return "anUnincorporatedPartnership";
|
|
415
|
+
if (filedPaperwork === "yes") return "theCompanyIWorkFor";
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
var submitGlobalEntry = async ({ legalEntity, associatedSoleProp, data, updateLegalEntity, createLegalEntity }) => {
|
|
419
|
+
let newSoleProp;
|
|
420
|
+
if (isSoleProprietorship(data)) {
|
|
421
|
+
const mappedSolePropData = mapGlobalEntrySchemaToSoleProp(data);
|
|
422
|
+
if (associatedSoleProp?.id) {
|
|
423
|
+
const { type: _type, ...soleProprietorshipDetails } = mappedSolePropData;
|
|
424
|
+
await updateLegalEntity({
|
|
425
|
+
...soleProprietorshipDetails,
|
|
426
|
+
id: associatedSoleProp.id
|
|
427
|
+
});
|
|
428
|
+
} else
|
|
429
|
+
/**
|
|
430
|
+
* Created first so the entity can be associated to it below, which keeps this to a single
|
|
431
|
+
* write against the entity itself.
|
|
432
|
+
*/
|
|
433
|
+
newSoleProp = await createLegalEntity(mappedSolePropData);
|
|
434
|
+
}
|
|
435
|
+
const { type: targetType, ...legalEntityData } = mapGlobalEntrySchemaToLegalEntity(data, legalEntity, newSoleProp ? newSoleProp : void 0);
|
|
436
|
+
/**
|
|
437
|
+
* LEM rejects a change of type in the same request as the data
|
|
438
|
+
*/
|
|
439
|
+
if (targetType !== legalEntity.type) await updateLegalEntity({
|
|
440
|
+
id: legalEntity.id,
|
|
441
|
+
type: targetType
|
|
442
|
+
});
|
|
443
|
+
await updateLegalEntity(legalEntityData);
|
|
444
|
+
return determineAccountHolder(data);
|
|
445
|
+
};
|
|
309
446
|
//#endregion
|
|
310
447
|
//#region src/components/GlobalEntry/forms/RegistrationInformation/RegistrationInformation.tsx
|
|
311
448
|
var REGISTRATION_INFORMATION_FIELDS = [
|
|
@@ -479,10 +616,10 @@ var globalEntryFieldRuleConfigurations = {
|
|
|
479
616
|
exemptedFromTax: { rule: "countryHasTaxExemptions" }
|
|
480
617
|
};
|
|
481
618
|
var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => false, country, taskType, rootLegalEntity }) => {
|
|
482
|
-
const
|
|
619
|
+
const hasFiledPaperwork = data.registrationInformation?.filedPaperwork === "yes";
|
|
483
620
|
const hasAnsweredPaperworkQuestion = !!data.registrationInformation?.filedPaperwork;
|
|
484
621
|
const isPartOfABusiness = data.entityInformation?.entitySetup === "partOfABusiness";
|
|
485
|
-
const isSoleProp = data
|
|
622
|
+
const isSoleProp = isSoleProprietorship(data);
|
|
486
623
|
const isExemptFromRegistrationNumber = Boolean(data.registrationInformation?.exemptedFromRegistrationNumber);
|
|
487
624
|
const existingRegistrationNumber = rootLegalEntity?.type === "soleProprietorship" ? rootLegalEntity.soleProprietorship?.registrationNumber : rootLegalEntity?.organization?.registrationNumber;
|
|
488
625
|
const isUnincorporatedOrganization = isPartOfABusiness && data?.registrationInformation?.filedPaperwork === "no";
|
|
@@ -497,15 +634,15 @@ var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => fa
|
|
|
497
634
|
},
|
|
498
635
|
filedPaperworkRequired: () => "REQUIRED",
|
|
499
636
|
unincorporatedOrganizationTypeRequired: () => isUnincorporatedOrganization ? "REQUIRED" : void 0,
|
|
500
|
-
legalCompanyNameRequired: () =>
|
|
637
|
+
legalCompanyNameRequired: () => hasFiledPaperwork ? "REQUIRED" : void 0,
|
|
501
638
|
jaHaniLegalCompanyName: () => {
|
|
502
|
-
if (
|
|
639
|
+
if (hasFiledPaperwork && isJapanLocalizationEnabled(isFeatureEnabled, country)) return "REQUIRED";
|
|
503
640
|
},
|
|
504
641
|
jaKanaLegalCompanyName: () => {
|
|
505
|
-
if (
|
|
642
|
+
if (hasFiledPaperwork && isJapanLocalizationEnabled(isFeatureEnabled, country)) return "REQUIRED";
|
|
506
643
|
},
|
|
507
644
|
countryRequiresRegistrationNumber: () => {
|
|
508
|
-
if (!
|
|
645
|
+
if (!hasFiledPaperwork) return;
|
|
509
646
|
if (isSoleProp) {
|
|
510
647
|
if (COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country)) return;
|
|
511
648
|
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER_SOLE_PROPS.includes(country)) return "OPTIONAL";
|
|
@@ -521,7 +658,7 @@ var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => fa
|
|
|
521
658
|
}
|
|
522
659
|
},
|
|
523
660
|
registrationNumberType: () => {
|
|
524
|
-
if (!
|
|
661
|
+
if (!hasFiledPaperwork) return;
|
|
525
662
|
if (isSoleProp) return COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION.includes(country) ? void 0 : "OPTIONAL";
|
|
526
663
|
if (isPartOfABusiness) {
|
|
527
664
|
if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) return "OPTIONAL";
|
|
@@ -530,7 +667,7 @@ var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => fa
|
|
|
530
667
|
}
|
|
531
668
|
},
|
|
532
669
|
companyRegistrationNumberExemptionAllowed: () => {
|
|
533
|
-
if (!
|
|
670
|
+
if (!hasFiledPaperwork) return;
|
|
534
671
|
if (isSoleProp) {
|
|
535
672
|
if (!COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS.includes(country)) return;
|
|
536
673
|
return isExemptFromRegistrationNumber ? "REQUIRED" : "OPTIONAL";
|
|
@@ -561,7 +698,7 @@ var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => fa
|
|
|
561
698
|
taxInformationRequired: () => {
|
|
562
699
|
const requiredUnlessExempt = Boolean(data.registrationInformation?.exemptedFromTax) ? "OPTIONAL" : "REQUIRED";
|
|
563
700
|
const usesTaxIdInsteadOfVat = COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT.includes(country);
|
|
564
|
-
if (!
|
|
701
|
+
if (!hasFiledPaperwork) return;
|
|
565
702
|
if (isPartOfABusiness) {
|
|
566
703
|
if (rootLegalEntity?.type === "organization" && keysOf(rootLegalEntity.capabilities ?? {}).includes("issueBankAccount")) {
|
|
567
704
|
if (TAX_ID_REQUIRED_COUNTRIES_ORGANIZATION.includes(country)) return requiredUnlessExempt;
|
|
@@ -575,7 +712,7 @@ var globalEntryCustomRules = ({ accountHolder, data, isFeatureEnabled = () => fa
|
|
|
575
712
|
}
|
|
576
713
|
},
|
|
577
714
|
countryHasTaxExemptions: () => {
|
|
578
|
-
if (!
|
|
715
|
+
if (!hasFiledPaperwork) return;
|
|
579
716
|
const isExemptFromTax = Boolean(data.registrationInformation?.exemptedFromTax);
|
|
580
717
|
if (isSoleProp) {
|
|
581
718
|
if (!COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS.includes(country)) return;
|
|
@@ -627,25 +764,27 @@ var globalEntryValidationRules = ({ data, legalEntity, isFeatureEnabled = () =>
|
|
|
627
764
|
//#region src/components/GlobalEntry/tasks/GlobalEntry.tsx
|
|
628
765
|
var GlobalEntry = ({ activeForm, legalEntity, shouldValidate, country }) => {
|
|
629
766
|
switch (activeForm.formId) {
|
|
630
|
-
case
|
|
767
|
+
case globalEntryForms.entityInformation.formId: return /* @__PURE__ */ jsx(EntityInformation, {
|
|
631
768
|
id: activeForm.formId,
|
|
632
769
|
country
|
|
633
770
|
});
|
|
634
|
-
case
|
|
771
|
+
case globalEntryForms.registrationInformation.formId: return /* @__PURE__ */ jsx(RegistrationInformation, {
|
|
635
772
|
id: activeForm.formId,
|
|
636
773
|
legalEntity,
|
|
637
774
|
shouldValidate,
|
|
638
775
|
country
|
|
639
776
|
});
|
|
640
|
-
case
|
|
777
|
+
case globalEntryForms.primaryPartner.formId: return /* @__PURE__ */ jsx(PrimaryPartner, { id: activeForm.formId });
|
|
641
778
|
default: return null;
|
|
642
779
|
}
|
|
643
780
|
};
|
|
644
781
|
//#endregion
|
|
645
782
|
//#region src/components/GlobalEntry/tasks/GlobalEntryModal.tsx
|
|
646
|
-
var GlobalEntryModal = ({ rootLegalEntity }) => {
|
|
647
|
-
const { i18n } = useTranslation("globalEntry");
|
|
783
|
+
var GlobalEntryModal = ({ rootLegalEntity, onComplete }) => {
|
|
784
|
+
const { i18n, t } = useTranslation(["common", "globalEntry"]);
|
|
648
785
|
const { isFeatureEnabled } = useToggleContext();
|
|
786
|
+
const logger = createLogger();
|
|
787
|
+
const { showToast } = useToastContext();
|
|
649
788
|
const { accountHolder } = useAccountHolder();
|
|
650
789
|
const [derivedProps, setDerivedProps] = useState();
|
|
651
790
|
addResourceBundles(i18n, [{
|
|
@@ -718,8 +857,10 @@ var GlobalEntryModal = ({ rootLegalEntity }) => {
|
|
|
718
857
|
legalEntity: rootLegalEntity,
|
|
719
858
|
isFeatureEnabled
|
|
720
859
|
}), [isFeatureEnabled, rootLegalEntity]);
|
|
860
|
+
/** Holds the registration details when the user already trades as a sole proprietor */
|
|
861
|
+
const { data: associatedSoleProp } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityTypes.SOLE_PROPRIETORSHIP);
|
|
721
862
|
const multiForm = useMultiForm({
|
|
722
|
-
defaultData: useMemo(() => mapLegalEntityToGlobalEntrySchema(rootLegalEntity), [rootLegalEntity]),
|
|
863
|
+
defaultData: useMemo(() => mapLegalEntityToGlobalEntrySchema(rootLegalEntity, associatedSoleProp), [rootLegalEntity, associatedSoleProp]),
|
|
723
864
|
requiredFields: derivedProps?.requiredFields,
|
|
724
865
|
optionalFields: derivedProps?.optionalFields,
|
|
725
866
|
allFields: derivedProps?.allFields,
|
|
@@ -753,12 +894,32 @@ var GlobalEntryModal = ({ rootLegalEntity }) => {
|
|
|
753
894
|
}));
|
|
754
895
|
}, [rootLegalEntity?.type, rules]);
|
|
755
896
|
const forms = useMemo(() => {
|
|
756
|
-
return addValidityToForms(getRequiredForms(globalEntryForms, derivedProps?.requiredFields, derivedProps?.optionalFields), formValidity, void 0);
|
|
897
|
+
return addValidityToForms(getRequiredForms(globalEntryForms, derivedProps?.requiredFields, derivedProps?.optionalFields, true), formValidity, void 0);
|
|
757
898
|
}, [derivedProps, formValidity]);
|
|
758
|
-
const {
|
|
759
|
-
|
|
899
|
+
const { mutateAsync: updateLegalEntity, isPending: isUpdatingLegalEntity } = useUpdateLegalEntity();
|
|
900
|
+
const { mutateAsync: createLegalEntity, isPending: isCreatingLegalEntity } = useCreateLegalEntity();
|
|
901
|
+
const isSubmitting = isUpdatingLegalEntity || isCreatingLegalEntity;
|
|
902
|
+
const handleSubmit = async () => {
|
|
903
|
+
try {
|
|
904
|
+
const newAccountHolder = await submitGlobalEntry({
|
|
905
|
+
legalEntity: rootLegalEntity,
|
|
906
|
+
associatedSoleProp,
|
|
907
|
+
data,
|
|
908
|
+
updateLegalEntity,
|
|
909
|
+
createLegalEntity
|
|
910
|
+
});
|
|
911
|
+
if (newAccountHolder) onComplete(newAccountHolder);
|
|
760
912
|
showGlobalEntryModal.value = false;
|
|
761
|
-
}
|
|
913
|
+
} catch (err) {
|
|
914
|
+
logger.error(err);
|
|
915
|
+
showToast({
|
|
916
|
+
label: t(($) => $["failedToUpdateDetails"], { ns: "common" }),
|
|
917
|
+
variant: "error"
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
const { activeForm, handleNextClick, handleBackClick, steps, gotoFormByFormId, gotoFormByFormIndex, shouldValidate } = useFormComposer({
|
|
922
|
+
onSubmit: handleSubmit,
|
|
762
923
|
forms,
|
|
763
924
|
triggerValidation
|
|
764
925
|
});
|
|
@@ -773,9 +934,10 @@ var GlobalEntryModal = ({ rootLegalEntity }) => {
|
|
|
773
934
|
forms,
|
|
774
935
|
gotoFormByFormIndex,
|
|
775
936
|
gotoFormByFormId,
|
|
776
|
-
loadingStatus: "success",
|
|
937
|
+
loadingStatus: isSubmitting ? "loading" : "success",
|
|
777
938
|
currentStep: steps.current,
|
|
778
939
|
totalSteps: steps.total,
|
|
940
|
+
isGlobalEntry: true,
|
|
779
941
|
children: /* @__PURE__ */ jsx(GlobalEntry, {
|
|
780
942
|
activeForm,
|
|
781
943
|
shouldValidate,
|
|
@@ -1,22 +1,22 @@
|
|
|
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] = "57ba3083-f87d-4171-b6e5-a80afff55f92", e._sentryDebugIdIdentifier = "sentry-dbid-57ba3083-f87d-4171-b6e5-a80afff55f92");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { n as addResourceBundles, r as useTranslation } from "./translation-BOm4lmPx.js";
|
|
6
|
-
import { A as _rolldown_dynamic_import_helper_default } from "./resolveEnvironment-
|
|
6
|
+
import { A as _rolldown_dynamic_import_helper_default } from "./resolveEnvironment-Bp-RuIhz.js";
|
|
7
7
|
import { t as Loader } from "./Loader-BEpMlKm2.js";
|
|
8
|
-
import { t as Button } from "./Button-
|
|
8
|
+
import { t as Button } from "./Button-oqvTDztg.js";
|
|
9
9
|
import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-QQXN6YOm.js";
|
|
10
|
-
import { v as LandingLayout } from "./form-rules-
|
|
11
|
-
import { n as showGlobalEntryModal, t as GlobalEntryModal } from "./GlobalEntryModal-
|
|
10
|
+
import { v as LandingLayout } from "./form-rules-BhIs9ilj.js";
|
|
11
|
+
import { n as showGlobalEntryModal, t as GlobalEntryModal } from "./GlobalEntryModal-Bwy0lfz2.js";
|
|
12
12
|
import { t as Image } from "./Image-D82terx4.js";
|
|
13
|
-
import { t as Link } from "./Link-
|
|
13
|
+
import { t as Link } from "./Link-Bb1XDrs1.js";
|
|
14
14
|
import { lazy } from "preact/compat";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
16
16
|
import { Show } from "@preact/signals/utils";
|
|
17
17
|
//#region src/components/GlobalEntry/tasks/GlobalEntryPage.tsx
|
|
18
18
|
var globalEntryIllustration = lazy(() => import("./global-entry-illustration-By_EjQFM.js"));
|
|
19
|
-
var GlobalEntryPage = () => {
|
|
19
|
+
var GlobalEntryPage = ({ onComplete }) => {
|
|
20
20
|
const { t, i18n } = useTranslation(["common", "globalEntry"]);
|
|
21
21
|
const { data: rootLe } = useLegalEntity(ROOT_LE);
|
|
22
22
|
addResourceBundles(i18n, [{
|
|
@@ -68,7 +68,10 @@ var GlobalEntryPage = () => {
|
|
|
68
68
|
})
|
|
69
69
|
}), /* @__PURE__ */ jsx(Show, {
|
|
70
70
|
when: showGlobalEntryModal,
|
|
71
|
-
children: /* @__PURE__ */ jsx(GlobalEntryModal, {
|
|
71
|
+
children: /* @__PURE__ */ jsx(GlobalEntryModal, {
|
|
72
|
+
rootLegalEntity: rootLe,
|
|
73
|
+
onComplete
|
|
74
|
+
})
|
|
72
75
|
})] });
|
|
73
76
|
};
|
|
74
77
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
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] = "3c237606-2288-4054-a0c6-7a52365c541b", e._sentryDebugIdIdentifier = "sentry-dbid-3c237606-2288-4054-a0c6-7a52365c541b");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { t as createLogger } from "./logger-Z8AeTE4x.js";
|
|
6
6
|
import { Suspense, lazy } from "preact/compat";
|
|
@@ -1,13 +1,13 @@
|
|
|
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] = "a8ba07e8-d319-42b8-8dc6-cdef81b61afc", e._sentryDebugIdIdentifier = "sentry-dbid-a8ba07e8-d319-42b8-8dc6-cdef81b61afc");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { r as useTranslation } from "./translation-BOm4lmPx.js";
|
|
6
6
|
import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
|
|
7
|
-
import { a as customInputs, c as numericInputs, i as alphanumericInputs, l as spacer, m as resolveFieldMetadata, n as uppercase, o as makeMask, r as alphaInputs, s as nonInputs, u as MaskedInput } from "./form-rules-
|
|
8
|
-
import { f as translateTranslatable, r as Field } from "./Select-
|
|
9
|
-
import { A as mergeFieldMetadataIntoProps, c as validatePatternOnBlur, k as createFormUtils } from "./RadioGroup-
|
|
10
|
-
import { t as Checkbox } from "./Checkbox-
|
|
7
|
+
import { a as customInputs, c as numericInputs, i as alphanumericInputs, l as spacer, m as resolveFieldMetadata, n as uppercase, o as makeMask, r as alphaInputs, s as nonInputs, u as MaskedInput } from "./form-rules-BhIs9ilj.js";
|
|
8
|
+
import { f as translateTranslatable, r as Field } from "./Select-CrcaoG0i.js";
|
|
9
|
+
import { A as mergeFieldMetadataIntoProps, c as validatePatternOnBlur, k as createFormUtils } from "./RadioGroup-e6Ty_ggj.js";
|
|
10
|
+
import { t as Checkbox } from "./Checkbox-2Rp9bWYN.js";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
12
12
|
//#region src/utils/regex/countryIdNumberPatterns.ts
|
|
13
13
|
var CountryIdNumberPatterns = {
|
|
@@ -1,8 +1,8 @@
|
|
|
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] = "3ce9e96b-8c49-40b4-aa07-49632160b31a", e._sentryDebugIdIdentifier = "sentry-dbid-3ce9e96b-8c49-40b4-aa07-49632160b31a");
|
|
4
4
|
} catch (e) {}
|
|
5
|
-
import { t as IdentityNumber } from "./IdentityNumber-
|
|
5
|
+
import { t as IdentityNumber } from "./IdentityNumber-D9t0xamT.js";
|
|
6
6
|
import { n as withForm } from "./formHook-Dgi2CgbT.js";
|
|
7
7
|
import { useCallback } from "preact/hooks";
|
|
8
8
|
import { jsx } from "preact/jsx-runtime";
|
package/dist/{IdentityScreeningWorkflow-D0eNj4nD.js → IdentityScreeningWorkflow-DESXjfuC.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
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] = "6c2cebbd-0b32-4160-b959-545830e6cc4c", e._sentryDebugIdIdentifier = "sentry-dbid-6c2cebbd-0b32-4160-b959-545830e6cc4c");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { r as useTranslation, t as Trans } from "./translation-BOm4lmPx.js";
|
|
6
|
-
import { x as Alert } from "./resolveEnvironment-
|
|
6
|
+
import { x as Alert } from "./resolveEnvironment-Bp-RuIhz.js";
|
|
7
7
|
import { t as createLogger } from "./logger-Z8AeTE4x.js";
|
|
8
8
|
import { t as Loader } from "./Loader-BEpMlKm2.js";
|
|
9
|
-
import { t as Button } from "./Button-
|
|
9
|
+
import { t as Button } from "./Button-oqvTDztg.js";
|
|
10
10
|
import { r as useLegalEntity } from "./useLegalEntity-QQXN6YOm.js";
|
|
11
|
-
import { t as Modal } from "./Modal-
|
|
12
|
-
import { v as LandingLayout } from "./form-rules-
|
|
13
|
-
import { t as EndStateLayout } from "./EndStateLayout-
|
|
14
|
-
import { p as LoaderWrapper } from "./Select-
|
|
15
|
-
import { h as FormFlow_module_default } from "./RadioGroup-
|
|
11
|
+
import { t as Modal } from "./Modal-By_wpf9o.js";
|
|
12
|
+
import { v as LandingLayout } from "./form-rules-BhIs9ilj.js";
|
|
13
|
+
import { t as EndStateLayout } from "./EndStateLayout-CRNRpDeu.js";
|
|
14
|
+
import { p as LoaderWrapper } from "./Select-CrcaoG0i.js";
|
|
15
|
+
import { h as FormFlow_module_default } from "./RadioGroup-e6Ty_ggj.js";
|
|
16
16
|
import { t as Image } from "./Image-D82terx4.js";
|
|
17
|
-
import { t as Link } from "./Link-
|
|
18
|
-
import { a as fromIndividualConflictSchema, d as useExtractDocumentInformation, i as mapExtractionResultToSchema, l as useDataConflicts, n as UploadedDocument, o as toIndividualConflictSchema, r as useIdVerificationToken, s as IdVerificationMethod_module_default, t as validateExtractionResult } from "./validateExtractionResult-
|
|
19
|
-
import { t as DataConflictsModal } from "./DataConflictsModal-
|
|
17
|
+
import { t as Link } from "./Link-Bb1XDrs1.js";
|
|
18
|
+
import { a as fromIndividualConflictSchema, d as useExtractDocumentInformation, i as mapExtractionResultToSchema, l as useDataConflicts, n as UploadedDocument, o as toIndividualConflictSchema, r as useIdVerificationToken, s as IdVerificationMethod_module_default, t as validateExtractionResult } from "./validateExtractionResult-BfwUJj1D.js";
|
|
19
|
+
import { t as DataConflictsModal } from "./DataConflictsModal-BJHJVW3V.js";
|
|
20
20
|
import { t as useTaskStepperContext } from "./useTaskStepperContext-DCNMsKUc.js";
|
|
21
|
-
import { t as useHideTaskStepper } from "./useHideTaskStepper-
|
|
21
|
+
import { t as useHideTaskStepper } from "./useHideTaskStepper-Dlzsx-RK.js";
|
|
22
22
|
import { lazy } from "preact/compat";
|
|
23
23
|
import { useEffect as useEffect$1, useRef as useRef$1, useState as useState$1 } from "preact/hooks";
|
|
24
24
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
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] = "5d455b14-b927-4752-92bd-2e20db3fbfc5", e._sentryDebugIdIdentifier = "sentry-dbid-5d455b14-b927-4752-92bd-2e20db3fbfc5");
|
|
4
4
|
} catch (e) {}
|
|
5
5
|
import { t as getLegalEntityCountry } from "./getLegalEntityCountry-CNE5uei8.js";
|
|
6
6
|
import { t as CountryCodes } from "./country-code-CJk2hdPu.js";
|
|
@@ -10,9 +10,9 @@ import { t as DecisionMakerTypes } from "./decision-maker-type-NR4GFAeT.js";
|
|
|
10
10
|
import { t as Scenarios } from "./get-scenarios-Bb-paHmJ.js";
|
|
11
11
|
import { t as getAvailableDecisionMakerRoleTypes } from "./decisionMaker-M0Tm92JR.js";
|
|
12
12
|
import { i as isLowRiskCountry } from "./country-DkgapJ4w.js";
|
|
13
|
-
import { t as createFormRules } from "./form-rules-
|
|
14
|
-
import { V as isJapanLocalizationEnabled, n as isBafinSignatoryFlow } from "./bafinUtils-
|
|
15
|
-
import { d as COUNTRIES_WITH_STATES_DATASET, i as getAddressSchemaForCountry } from "./StateField-
|
|
13
|
+
import { t as createFormRules } from "./form-rules-BhIs9ilj.js";
|
|
14
|
+
import { V as isJapanLocalizationEnabled, n as isBafinSignatoryFlow } from "./bafinUtils-F8i4raV6.js";
|
|
15
|
+
import { d as COUNTRIES_WITH_STATES_DATASET, i as getAddressSchemaForCountry } from "./StateField-BnyUQjAj.js";
|
|
16
16
|
import { t as getLocalizedIdDocumentTypeOptions } from "./utils-Br7Ah3uy.js";
|
|
17
17
|
//#region src/components/Individual/forms/Individual.rules.ts
|
|
18
18
|
var REQUIRED = "REQUIRED";
|