@adyen/kyc-components 3.57.0 → 3.57.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/es/{B4MFY5CR-Btb_2-pV.js → B4MFY5CR-D75YgS09.js} +1 -1
- package/dist/es/{HO4MOOFI-BjUBJSdM.js → HO4MOOFI-DNsHY5mz.js} +2 -2
- package/dist/es/{HUY7CZI3-BcIThR0Y.js → HUY7CZI3-COPs-NYa.js} +2 -2
- package/dist/es/{Introduction-BtT5M7Db.js → Introduction-CYuHFb7b.js} +1 -1
- package/dist/es/adyen-kyc-components.es.js +1 -1
- package/dist/es/{css-q1a-Ur7J.js → css-DnOp_BRh.js} +1 -1
- package/dist/es/{index-Bk0fvPZ4.js → index-D2pgAbpu.js} +285 -164
- package/dist/es/{json-BRkB-KFu.js → json-DvF_GzGv.js} +1 -1
- package/dist/es/{plaintext-D03i-amR.js → plaintext-CBZzipLc.js} +1 -1
- package/dist/es/{yaml-BjlWN5Jw.js → yaml-CjI4QAHh.js} +1 -1
- package/dist/types/components/Business/utils/companyUtil.d.ts +3 -2
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +21 -0
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +191 -25
- package/dist/types/components/Shared/fields/IdFieldTypeSelector/inferVatNumberType.d.ts +3 -0
- package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -1
- package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +0 -1
- package/dist/types/components/Shared/fields/VatNumberField/fieldConfig.d.ts +2 -2
- package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +3 -3
- package/dist/types/core/models/api/company-types-value.d.ts +1 -0
- package/dist/types/core/models/api/organization.d.ts +2 -2
- package/dist/types/utils/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { h as createContext, i as createSignal, o as onMount, j as createEffect, e as createMemo, f as createComponent, P as Portal, k as Show, l as template, m as insert, n as createRenderEffect, p as className, q as clearDelegatedEvents, r as delegateEvents, s as useContext, v as onCleanup, w as sortFns, x as mutationSortFns, y as on, z as setAttribute, A as getSidedProp, C as use, D as createUniqueId, E as batch, F as getQueryStatusLabel, G as getMutationStatusColor, H as getQueryStatusColor, I as getQueryStatusColorByLabel, J as displayValue, K as For, M as convertRemToPixels, N as untrack, $ as $TRACK, O as useTransition, Q as spread, R as mergeProps, U as createRoot, V as serialize, W as Index, X as updateNestedDataByPath, Y as addEventListener, Z as stringify, _ as Match, a0 as Switch, a1 as deleteNestedDataByPath, a2 as splitProps, a3 as Dynamic, a4 as createComputed } from "./index-
|
|
4
|
+
import { h as createContext, i as createSignal, o as onMount, j as createEffect, e as createMemo, f as createComponent, P as Portal, k as Show, l as template, m as insert, n as createRenderEffect, p as className, q as clearDelegatedEvents, r as delegateEvents, s as useContext, v as onCleanup, w as sortFns, x as mutationSortFns, y as on, z as setAttribute, A as getSidedProp, C as use, D as createUniqueId, E as batch, F as getQueryStatusLabel, G as getMutationStatusColor, H as getQueryStatusColor, I as getQueryStatusColorByLabel, J as displayValue, K as For, M as convertRemToPixels, N as untrack, $ as $TRACK, O as useTransition, Q as spread, R as mergeProps, U as createRoot, V as serialize, W as Index, X as updateNestedDataByPath, Y as addEventListener, Z as stringify, _ as Match, a0 as Switch, a1 as deleteNestedDataByPath, a2 as splitProps, a3 as Dynamic, a4 as createComputed } from "./index-D2pgAbpu.js";
|
|
5
5
|
var isNonNullable = (i2) => i2 != null;
|
|
6
6
|
var filterNonNullable = (arr) => arr.filter(isNonNullable);
|
|
7
7
|
function chain(callbacks) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-
|
|
2
|
-
import { d as getPreferredColorScheme, e as createMemo, f as createComponent } from "./index-
|
|
1
|
+
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./B4MFY5CR-D75YgS09.js";
|
|
2
|
+
import { d as getPreferredColorScheme, e as createMemo, f as createComponent } from "./index-D2pgAbpu.js";
|
|
3
3
|
var DevtoolsComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-
|
|
2
|
-
import { d as getPreferredColorScheme, e as createMemo, f as createComponent } from "./index-
|
|
1
|
+
import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, b as ParentPanel, C as ContentView, Q as QueryDevtoolsContext } from "./B4MFY5CR-D75YgS09.js";
|
|
2
|
+
import { d as getPreferredColorScheme, e as createMemo, f as createComponent } from "./index-D2pgAbpu.js";
|
|
3
3
|
var DevtoolsPanelComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
|
|
2
2
|
import { useMemo as useMemo$1, useState, useEffect } from "preact/hooks";
|
|
3
|
-
import { T as TaskTypes, L as LegalEntityType, u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized, g as getTranslationKeysByPrefix, b as useI18nContext, c as userEvents, S as StepProgressIndicator, B as Button } from "./index-
|
|
3
|
+
import { T as TaskTypes, L as LegalEntityType, u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized, g as getTranslationKeysByPrefix, b as useI18nContext, c as userEvents, S as StepProgressIndicator, B as Button } from "./index-D2pgAbpu.js";
|
|
4
4
|
import { useMemo } from "preact/compat";
|
|
5
5
|
var IntroductionScreens = ((IntroductionScreens2) => {
|
|
6
6
|
IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
|
|
@@ -10038,6 +10038,7 @@ var CompanyTypesValue = /* @__PURE__ */ ((CompanyTypesValue2) => {
|
|
|
10038
10038
|
CompanyTypesValue2["PRIVATE_COMPANY"] = "privateCompany";
|
|
10039
10039
|
CompanyTypesValue2["PUBLIC_COMPANY"] = "listedPublicCompany";
|
|
10040
10040
|
CompanyTypesValue2["UNLISTED_PUBLIC_COMPANY"] = "unlistedPublicCompany";
|
|
10041
|
+
CompanyTypesValue2["UNINCORPORATED_PARTNERSHIP"] = "unincorporatedPartnership";
|
|
10041
10042
|
CompanyTypesValue2["INCORPORATED_PARTNERSHIP"] = "partnershipIncorporated";
|
|
10042
10043
|
CompanyTypesValue2["INCORPORATED_ASSOCIATION"] = "associationIncorporated";
|
|
10043
10044
|
CompanyTypesValue2["GOVERNMENTAL_ORGANIZATION"] = "governmentalOrganization";
|
|
@@ -18994,36 +18995,33 @@ const additionallIdNumberOptions = {
|
|
|
18994
18995
|
]
|
|
18995
18996
|
};
|
|
18996
18997
|
const taxIdNumberOptions = {
|
|
18997
|
-
[CountryCodes.
|
|
18998
|
-
{
|
|
18999
|
-
id: "momsregistreringsnummerCVR",
|
|
19000
|
-
name: "momsregistreringsnummerCVR"
|
|
19001
|
-
},
|
|
18998
|
+
[CountryCodes.Australia]: [
|
|
19002
18999
|
{
|
|
19003
|
-
id: "
|
|
19004
|
-
name: "
|
|
19000
|
+
id: "ABN",
|
|
19001
|
+
name: "australianBusinessNumberAbn",
|
|
19002
|
+
applicableOnlyFor: [
|
|
19003
|
+
CompanyTypesValue.UNINCORPORATED_PARTNERSHIP,
|
|
19004
|
+
CompanyTypesValue.SOLE_PROPRIETORSHIP,
|
|
19005
|
+
LegalEntityType.TRUST
|
|
19006
|
+
]
|
|
19005
19007
|
}
|
|
19006
19008
|
],
|
|
19007
|
-
[CountryCodes.
|
|
19008
|
-
|
|
19009
|
-
|
|
19010
|
-
name: "numeroDIdentificationALATaxe"
|
|
19011
|
-
},
|
|
19009
|
+
[CountryCodes.Belgium]: [{ id: "BUSINESS_NUMMER", name: "businessNumber" }],
|
|
19010
|
+
[CountryCodes.Brazil]: [{ id: "CNPJ", name: "CNPJ" }],
|
|
19011
|
+
[CountryCodes.Germany]: [
|
|
19012
19012
|
{
|
|
19013
|
-
id: "
|
|
19014
|
-
name: "
|
|
19013
|
+
id: "STEUERNUMMER",
|
|
19014
|
+
name: "taxInformationNumber"
|
|
19015
19015
|
}
|
|
19016
19016
|
],
|
|
19017
|
-
[CountryCodes.
|
|
19018
|
-
|
|
19019
|
-
id: "GST",
|
|
19020
|
-
name: "gst"
|
|
19021
|
-
},
|
|
19017
|
+
[CountryCodes.Guernsey]: [{ id: "GG_REGISTRATION_NUMBER", name: "taxInformationNumber" }],
|
|
19018
|
+
[CountryCodes.HongKong]: [
|
|
19022
19019
|
{
|
|
19023
|
-
id: "
|
|
19024
|
-
name: "
|
|
19020
|
+
id: "BRN",
|
|
19021
|
+
name: "taxInformationNumber__HK"
|
|
19025
19022
|
}
|
|
19026
19023
|
],
|
|
19024
|
+
[CountryCodes.Japan]: [{ id: "CORPORATE_NUMBER", name: "taxInformationNumber" }],
|
|
19027
19025
|
[CountryCodes.Jersey]: [
|
|
19028
19026
|
{
|
|
19029
19027
|
id: "taxIdentificationNumber",
|
|
@@ -19035,28 +19033,114 @@ const taxIdNumberOptions = {
|
|
|
19035
19033
|
applicableOnlyFor: [CompanyTypesValue.SOLE_PROPRIETORSHIP]
|
|
19036
19034
|
}
|
|
19037
19035
|
],
|
|
19036
|
+
[CountryCodes.Netherlands]: [
|
|
19037
|
+
{
|
|
19038
|
+
id: "RSIN",
|
|
19039
|
+
name: "taxInformationNumber"
|
|
19040
|
+
}
|
|
19041
|
+
],
|
|
19042
|
+
[CountryCodes.NewZealand]: [
|
|
19043
|
+
{
|
|
19044
|
+
id: "IRD",
|
|
19045
|
+
name: "irdNumber"
|
|
19046
|
+
}
|
|
19047
|
+
],
|
|
19038
19048
|
[CountryCodes.PuertoRico]: [
|
|
19039
19049
|
{
|
|
19040
19050
|
id: "EIN",
|
|
19041
19051
|
name: "ein"
|
|
19052
|
+
}
|
|
19053
|
+
],
|
|
19054
|
+
[CountryCodes.Singapore]: [
|
|
19055
|
+
{
|
|
19056
|
+
id: "GST",
|
|
19057
|
+
name: "gst"
|
|
19042
19058
|
},
|
|
19043
19059
|
{
|
|
19044
|
-
id: "
|
|
19045
|
-
name: "
|
|
19046
|
-
applicableOnlyFor: [CompanyTypesValue.SOLE_PROPRIETORSHIP]
|
|
19060
|
+
id: "UEN",
|
|
19061
|
+
name: "uen"
|
|
19047
19062
|
}
|
|
19048
19063
|
],
|
|
19049
19064
|
[CountryCodes.UnitedStates]: [
|
|
19050
19065
|
{
|
|
19051
19066
|
id: "EIN",
|
|
19052
19067
|
name: "ein"
|
|
19068
|
+
}
|
|
19069
|
+
]
|
|
19070
|
+
};
|
|
19071
|
+
const vatNumberOptions = {
|
|
19072
|
+
[CountryCodes.Austria]: [{ id: "UST-ID", name: "UST-ID" }],
|
|
19073
|
+
[CountryCodes.Belgium]: [{ id: "euVatNumber", name: "euVatNumber" }],
|
|
19074
|
+
[CountryCodes.Bulgaria]: [{ id: "identifikacionenNomerDDS", name: "identifikacionenNomerDDS" }],
|
|
19075
|
+
[CountryCodes.Croatia]: [{ id: "PDVIdBrojOIB", name: "PDVIdBrojOIB" }],
|
|
19076
|
+
[CountryCodes.Cyprus]: [{ id: "arithmosEngraphes", name: "arithmosEngraphes" }],
|
|
19077
|
+
[CountryCodes.CzechRepublic]: [{ id: "DIC", name: "DIC" }],
|
|
19078
|
+
[CountryCodes.Denmark]: [
|
|
19079
|
+
{
|
|
19080
|
+
id: "momsregistreringsnummerCVR",
|
|
19081
|
+
name: "momsregistreringsnummerCVR"
|
|
19053
19082
|
},
|
|
19054
19083
|
{
|
|
19055
|
-
id: "
|
|
19056
|
-
name: "
|
|
19057
|
-
applicableOnlyFor: [CompanyTypesValue.SOLE_PROPRIETORSHIP]
|
|
19084
|
+
id: "stamregister",
|
|
19085
|
+
name: "stamregister"
|
|
19058
19086
|
}
|
|
19059
|
-
]
|
|
19087
|
+
],
|
|
19088
|
+
[CountryCodes.Estonia]: [
|
|
19089
|
+
{ id: "kaibemaksukohustuslaseNumber", name: "kaibemaksukohustuslaseNumber" }
|
|
19090
|
+
],
|
|
19091
|
+
[CountryCodes.Finland]: [
|
|
19092
|
+
{
|
|
19093
|
+
id: "arvonlisaveronumeroMervardesskattenummer",
|
|
19094
|
+
name: "arvonlisaveronumeroMervardesskattenummer"
|
|
19095
|
+
}
|
|
19096
|
+
],
|
|
19097
|
+
[CountryCodes.France]: [
|
|
19098
|
+
{
|
|
19099
|
+
id: "numeroDIdentificationALATaxe",
|
|
19100
|
+
name: "numeroDIdentificationALATaxe"
|
|
19101
|
+
},
|
|
19102
|
+
{
|
|
19103
|
+
id: "NumeroDeTVA",
|
|
19104
|
+
name: "NumeroDeTVA"
|
|
19105
|
+
}
|
|
19106
|
+
],
|
|
19107
|
+
[CountryCodes.Germany]: [{ id: "USt-IdNr", name: "USt-IdNr" }],
|
|
19108
|
+
[CountryCodes.Greece]: [{ id: "grTaxId", name: "grTaxId" }],
|
|
19109
|
+
[CountryCodes.Hungary]: [{ id: "huTaxId", name: "huTaxId" }],
|
|
19110
|
+
[CountryCodes.Ireland]: [{ id: "vatNumber", name: "vatNumber" }],
|
|
19111
|
+
[CountryCodes.Italy]: [{ id: "partitaIVA", name: "partitaIVA" }],
|
|
19112
|
+
[CountryCodes.Latvia]: [{ id: "lvTaxId", name: "lvTaxId" }],
|
|
19113
|
+
[CountryCodes.Liechtenstein]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }],
|
|
19114
|
+
[CountryCodes.Lithuania]: [{ id: "PVMmoketojoKodas", name: "PVMmoketojoKodas" }],
|
|
19115
|
+
[CountryCodes.Luxembourg]: [
|
|
19116
|
+
{ id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
|
|
19117
|
+
],
|
|
19118
|
+
[CountryCodes.Malaysia]: [{ id: "SST", name: "SST" }],
|
|
19119
|
+
[CountryCodes.Malta]: [{ id: "vatNumber", name: "vatNumber" }],
|
|
19120
|
+
[CountryCodes.Monaco]: [
|
|
19121
|
+
{ id: "numeroDIdentificationALATaxe", name: "numeroDIdentificationALATaxe" }
|
|
19122
|
+
],
|
|
19123
|
+
[CountryCodes.Netherlands]: [{ id: "btwNummer", name: "btwNummer" }],
|
|
19124
|
+
[CountryCodes.Norway]: [{ id: "mvanummer", name: "mvanummer" }],
|
|
19125
|
+
[CountryCodes.Poland]: [{ id: "NIP", name: "NIP" }],
|
|
19126
|
+
[CountryCodes.Portugal]: [{ id: "numerodeIVA", name: "numerodeIVA" }],
|
|
19127
|
+
[CountryCodes.Romania]: [
|
|
19128
|
+
{ id: "codulDeIdentificareFiscala", name: "codulDeIdentificareFiscala" }
|
|
19129
|
+
],
|
|
19130
|
+
[CountryCodes.Slovakia]: [{ id: "skTaxId", name: "skTaxId" }],
|
|
19131
|
+
[CountryCodes.Slovenia]: [{ id: "siTaxId", name: "siTaxId" }],
|
|
19132
|
+
[CountryCodes.Spain]: [{ id: "NIFdeIVA", name: "NIFdeIVA" }],
|
|
19133
|
+
[CountryCodes.Sweden]: [
|
|
19134
|
+
{
|
|
19135
|
+
id: "vatNummerMomsregistreringsnummerOrMomsnummer",
|
|
19136
|
+
name: "vatNummerMomsregistreringsnummerOrMomsnummer"
|
|
19137
|
+
}
|
|
19138
|
+
],
|
|
19139
|
+
[CountryCodes.Switzerland]: [{ id: "Mehrwertsteuernummer", name: "Mehrwertsteuernummer" }],
|
|
19140
|
+
[CountryCodes.UnitedArabEmirates]: [
|
|
19141
|
+
{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }
|
|
19142
|
+
],
|
|
19143
|
+
[CountryCodes.UnitedKingdom]: [{ id: "vatRegistrationNumber", name: "vatRegistrationNumber" }]
|
|
19060
19144
|
};
|
|
19061
19145
|
const getTaxIdNumberOptions = (country, companyType) => {
|
|
19062
19146
|
const optionsForCountry = taxIdNumberOptions[country];
|
|
@@ -19070,6 +19154,16 @@ const getTaxIdNumberOptions = (country, companyType) => {
|
|
|
19070
19154
|
}
|
|
19071
19155
|
);
|
|
19072
19156
|
};
|
|
19157
|
+
const getVatNumberOptions = (country, companyType) => {
|
|
19158
|
+
const optionsForCountry = vatNumberOptions[country];
|
|
19159
|
+
if (!companyType || !optionsForCountry) return optionsForCountry;
|
|
19160
|
+
return optionsForCountry.filter(
|
|
19161
|
+
(option) => {
|
|
19162
|
+
var _a2;
|
|
19163
|
+
return ((_a2 = option.applicableOnlyFor) == null ? void 0 : _a2.includes(companyType)) ?? true;
|
|
19164
|
+
}
|
|
19165
|
+
);
|
|
19166
|
+
};
|
|
19073
19167
|
function CompanyRegistrationNumberTypeSelector({
|
|
19074
19168
|
country,
|
|
19075
19169
|
companyType,
|
|
@@ -19563,86 +19657,37 @@ const defaultFieldConfig$4 = {
|
|
|
19563
19657
|
}
|
|
19564
19658
|
}
|
|
19565
19659
|
},
|
|
19566
|
-
[CountryCodes.UnitedStates]:
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
},
|
|
19581
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19582
|
-
guidanceText: {
|
|
19583
|
-
key: "enterNDigitsForExample",
|
|
19584
|
-
values: {
|
|
19585
|
-
format: "123-45-6789"
|
|
19586
|
-
}
|
|
19587
|
-
}
|
|
19588
|
-
};
|
|
19589
|
-
default:
|
|
19590
|
-
return {
|
|
19591
|
-
label: "taxInformationNumber__US",
|
|
19592
|
-
helperText: "taxInformationNumber__helperText__US",
|
|
19593
|
-
placeholder: "taxInformationNumber__placeHolder__US",
|
|
19594
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19595
|
-
mask: {
|
|
19596
|
-
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
19597
|
-
},
|
|
19598
|
-
guidanceText: {
|
|
19599
|
-
key: "validationPleaseEnterAValidEINWithFormat",
|
|
19600
|
-
values: {
|
|
19601
|
-
format: "XX-XXXXXXX"
|
|
19602
|
-
}
|
|
19603
|
-
}
|
|
19604
|
-
};
|
|
19660
|
+
[CountryCodes.UnitedStates]: {
|
|
19661
|
+
label: "taxInformationNumber__US",
|
|
19662
|
+
helperText: "taxInformationNumber__helperText__US",
|
|
19663
|
+
placeholder: "taxInformationNumber__placeHolder__US",
|
|
19664
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19665
|
+
mask: {
|
|
19666
|
+
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
19667
|
+
},
|
|
19668
|
+
guidanceText: {
|
|
19669
|
+
key: "validationPleaseEnterAValidEINWithFormat",
|
|
19670
|
+
values: {
|
|
19671
|
+
format: "XX-XXXXXXX",
|
|
19672
|
+
example: "98-7654321"
|
|
19673
|
+
}
|
|
19605
19674
|
}
|
|
19606
19675
|
},
|
|
19607
|
-
[CountryCodes.PuertoRico]:
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19623
|
-
guidanceText: {
|
|
19624
|
-
key: "enterNDigitsForExample",
|
|
19625
|
-
values: {
|
|
19626
|
-
format: "123-45-6789"
|
|
19627
|
-
}
|
|
19628
|
-
}
|
|
19629
|
-
};
|
|
19630
|
-
default:
|
|
19631
|
-
return {
|
|
19632
|
-
label: "taxInformationNumber__US",
|
|
19633
|
-
helperText: "taxInformationNumber__helperText__US",
|
|
19634
|
-
placeholder: "taxInformationNumber__placeHolder__US",
|
|
19635
|
-
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19636
|
-
mask: {
|
|
19637
|
-
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
19638
|
-
},
|
|
19639
|
-
guidanceText: {
|
|
19640
|
-
key: "validationPleaseEnterAValidEINWithFormat",
|
|
19641
|
-
values: {
|
|
19642
|
-
format: "XX-XXXXXXX"
|
|
19643
|
-
}
|
|
19644
|
-
}
|
|
19645
|
-
};
|
|
19676
|
+
[CountryCodes.PuertoRico]: {
|
|
19677
|
+
// should exactly match CountryCodes.UnitedStates
|
|
19678
|
+
label: "taxInformationNumber__US",
|
|
19679
|
+
helperText: "taxInformationNumber__helperText__US",
|
|
19680
|
+
placeholder: "taxInformationNumber__placeHolder__US",
|
|
19681
|
+
validators: validatePatternOnBlur(/^\d{9}$/),
|
|
19682
|
+
mask: {
|
|
19683
|
+
mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
|
|
19684
|
+
},
|
|
19685
|
+
guidanceText: {
|
|
19686
|
+
key: "validationPleaseEnterAValidEINWithFormat",
|
|
19687
|
+
values: {
|
|
19688
|
+
format: "XX-XXXXXXX",
|
|
19689
|
+
example: "98-7654321"
|
|
19690
|
+
}
|
|
19646
19691
|
}
|
|
19647
19692
|
},
|
|
19648
19693
|
[CountryCodes.Guernsey]: ({ companyType }) => {
|
|
@@ -19806,6 +19851,22 @@ const defaultFieldConfig$4 = {
|
|
|
19806
19851
|
validators: validatePatternOnBlur(/^\d{12}$/)
|
|
19807
19852
|
}
|
|
19808
19853
|
};
|
|
19854
|
+
const inferTaxIdNumberType = (taxId, country, companyType) => {
|
|
19855
|
+
const optionsForCountry = taxIdNumberOptions[country];
|
|
19856
|
+
const metadataFn = defaultFieldConfig$4[country];
|
|
19857
|
+
if (!optionsForCountry || !metadataFn || typeof metadataFn !== "function") return void 0;
|
|
19858
|
+
for (const option of optionsForCountry) {
|
|
19859
|
+
const fieldMetadata = metadataFn({
|
|
19860
|
+
taxIdNumberType: option.id,
|
|
19861
|
+
companyType
|
|
19862
|
+
});
|
|
19863
|
+
if (!fieldMetadata.validators) continue;
|
|
19864
|
+
const validators = Array.isArray(fieldMetadata.validators) ? fieldMetadata.validators : [fieldMetadata.validators];
|
|
19865
|
+
if (validators.every((validator) => validator.validate(taxId))) {
|
|
19866
|
+
return option.id;
|
|
19867
|
+
}
|
|
19868
|
+
}
|
|
19869
|
+
};
|
|
19809
19870
|
const vatAbsenceReasonMetadata = {
|
|
19810
19871
|
validators: [validateNotEmptyOnBlur]
|
|
19811
19872
|
};
|
|
@@ -20452,19 +20513,17 @@ const defaultFieldConfig$3 = {
|
|
|
20452
20513
|
validators: validatePatternOnBlur(/^[JGVE]-\d{8}-?\d$/)
|
|
20453
20514
|
}
|
|
20454
20515
|
};
|
|
20455
|
-
const
|
|
20456
|
-
const optionsForCountry =
|
|
20457
|
-
const metadataFn = defaultFieldConfig$3[country]
|
|
20516
|
+
const inferVatNumberType = (vatNumber, country) => {
|
|
20517
|
+
const optionsForCountry = vatNumberOptions[country];
|
|
20518
|
+
const metadataFn = defaultFieldConfig$3[country];
|
|
20458
20519
|
if (!optionsForCountry || !metadataFn || typeof metadataFn !== "function") return void 0;
|
|
20459
20520
|
for (const option of optionsForCountry) {
|
|
20460
20521
|
const fieldMetadata = metadataFn({
|
|
20461
|
-
|
|
20462
|
-
vatNumberType: option.id,
|
|
20463
|
-
companyType
|
|
20522
|
+
vatNumberType: option.id
|
|
20464
20523
|
});
|
|
20465
20524
|
if (!fieldMetadata.validators) continue;
|
|
20466
20525
|
const validators = Array.isArray(fieldMetadata.validators) ? fieldMetadata.validators : [fieldMetadata.validators];
|
|
20467
|
-
if (validators.every((validator) => validator.validate(
|
|
20526
|
+
if (validators.every((validator) => validator.validate(vatNumber))) {
|
|
20468
20527
|
return option.id;
|
|
20469
20528
|
}
|
|
20470
20529
|
}
|
|
@@ -20731,7 +20790,6 @@ function TaxInformationField({
|
|
|
20731
20790
|
country,
|
|
20732
20791
|
canExempt,
|
|
20733
20792
|
registrationNumber,
|
|
20734
|
-
isUen,
|
|
20735
20793
|
companyType,
|
|
20736
20794
|
taxIdNumberType,
|
|
20737
20795
|
setTaxIdNumberType,
|
|
@@ -20796,24 +20854,24 @@ function TaxInformationField({
|
|
|
20796
20854
|
const taxInfo = canSaveAbsentState ? {
|
|
20797
20855
|
country,
|
|
20798
20856
|
number: value,
|
|
20799
|
-
type:
|
|
20857
|
+
type: taxIdNumberType,
|
|
20800
20858
|
numberAbsent: false
|
|
20801
20859
|
} : {
|
|
20802
20860
|
country,
|
|
20803
20861
|
number: value,
|
|
20804
|
-
type:
|
|
20862
|
+
type: taxIdNumberType
|
|
20805
20863
|
};
|
|
20806
20864
|
return handleChangeFor("taxInformation", "input")([taxInfo]);
|
|
20807
20865
|
}
|
|
20808
20866
|
const newTaxId = canSaveAbsentState ? {
|
|
20809
20867
|
country,
|
|
20810
20868
|
number: value,
|
|
20811
|
-
type:
|
|
20869
|
+
type: taxIdNumberType,
|
|
20812
20870
|
numberAbsent: false
|
|
20813
20871
|
} : {
|
|
20814
20872
|
country,
|
|
20815
20873
|
number: value,
|
|
20816
|
-
type:
|
|
20874
|
+
type: taxIdNumberType
|
|
20817
20875
|
};
|
|
20818
20876
|
const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
|
|
20819
20877
|
const updatedTaxInformation = taxInformation.map((taxInfo) => {
|
|
@@ -20821,12 +20879,12 @@ function TaxInformationField({
|
|
|
20821
20879
|
return canSaveAbsentState ? {
|
|
20822
20880
|
country,
|
|
20823
20881
|
number: value,
|
|
20824
|
-
type:
|
|
20882
|
+
type: taxIdNumberType,
|
|
20825
20883
|
numberAbsent: false
|
|
20826
20884
|
} : {
|
|
20827
20885
|
country,
|
|
20828
20886
|
number: value,
|
|
20829
|
-
type:
|
|
20887
|
+
type: taxIdNumberType
|
|
20830
20888
|
};
|
|
20831
20889
|
});
|
|
20832
20890
|
return handleChangeFor("taxInformation", "input")(updatedTaxInformation);
|
|
@@ -20837,24 +20895,24 @@ function TaxInformationField({
|
|
|
20837
20895
|
const taxInfo = canSaveAbsentState ? {
|
|
20838
20896
|
country,
|
|
20839
20897
|
number: value,
|
|
20840
|
-
type:
|
|
20898
|
+
type: taxIdNumberType,
|
|
20841
20899
|
numberAbsent: false
|
|
20842
20900
|
} : {
|
|
20843
20901
|
country,
|
|
20844
20902
|
number: value,
|
|
20845
|
-
type:
|
|
20903
|
+
type: taxIdNumberType
|
|
20846
20904
|
};
|
|
20847
20905
|
return handleChangeFor("taxInformation", "blur")([taxInfo]);
|
|
20848
20906
|
}
|
|
20849
20907
|
const newTaxId = canSaveAbsentState ? {
|
|
20850
20908
|
country,
|
|
20851
20909
|
number: value,
|
|
20852
|
-
type:
|
|
20910
|
+
type: taxIdNumberType,
|
|
20853
20911
|
numberAbsent: false
|
|
20854
20912
|
} : {
|
|
20855
20913
|
country,
|
|
20856
20914
|
number: value,
|
|
20857
|
-
type:
|
|
20915
|
+
type: taxIdNumberType
|
|
20858
20916
|
};
|
|
20859
20917
|
const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
|
|
20860
20918
|
const updatedTaxInformation = taxInformation.map((taxInfo) => {
|
|
@@ -20862,12 +20920,12 @@ function TaxInformationField({
|
|
|
20862
20920
|
return canSaveAbsentState ? {
|
|
20863
20921
|
country,
|
|
20864
20922
|
number: value,
|
|
20865
|
-
type:
|
|
20923
|
+
type: taxIdNumberType,
|
|
20866
20924
|
numberAbsent: false
|
|
20867
20925
|
} : {
|
|
20868
20926
|
country,
|
|
20869
20927
|
number: value,
|
|
20870
|
-
type:
|
|
20928
|
+
type: taxIdNumberType
|
|
20871
20929
|
};
|
|
20872
20930
|
});
|
|
20873
20931
|
return handleChangeFor("taxInformation", "blur")(updatedTaxInformation);
|
|
@@ -20915,7 +20973,7 @@ function TaxInformationField({
|
|
|
20915
20973
|
return;
|
|
20916
20974
|
}
|
|
20917
20975
|
}
|
|
20918
|
-
if (
|
|
20976
|
+
if (country === "SG") {
|
|
20919
20977
|
if (taxIdType === "UEN") {
|
|
20920
20978
|
handleChangeFor("isUen")(true);
|
|
20921
20979
|
setUenAsTaxId(registrationNumber);
|
|
@@ -21070,6 +21128,55 @@ function TradingNameField({
|
|
|
21070
21128
|
)
|
|
21071
21129
|
] });
|
|
21072
21130
|
}
|
|
21131
|
+
function VatNumberTypeSelector({
|
|
21132
|
+
country,
|
|
21133
|
+
companyType,
|
|
21134
|
+
selected,
|
|
21135
|
+
setSelected,
|
|
21136
|
+
exemptedOption
|
|
21137
|
+
}) {
|
|
21138
|
+
const { i18n } = useI18nContext();
|
|
21139
|
+
const handleSelect = useCallback(
|
|
21140
|
+
(selectedStr) => {
|
|
21141
|
+
const newSelected = selectedStr;
|
|
21142
|
+
if (newSelected === "exempted") {
|
|
21143
|
+
if (exemptedOption) {
|
|
21144
|
+
setSelected(newSelected);
|
|
21145
|
+
}
|
|
21146
|
+
return;
|
|
21147
|
+
}
|
|
21148
|
+
setSelected(newSelected);
|
|
21149
|
+
},
|
|
21150
|
+
[exemptedOption, setSelected]
|
|
21151
|
+
);
|
|
21152
|
+
const options = useMemo(() => {
|
|
21153
|
+
const availableOptions = getVatNumberOptions(country, companyType) ?? [];
|
|
21154
|
+
if (availableOptions.length === 0 || !exemptedOption) return availableOptions;
|
|
21155
|
+
return [
|
|
21156
|
+
...availableOptions,
|
|
21157
|
+
{
|
|
21158
|
+
id: "exempted",
|
|
21159
|
+
name: exemptedOption
|
|
21160
|
+
}
|
|
21161
|
+
];
|
|
21162
|
+
}, [country, companyType, exemptedOption]);
|
|
21163
|
+
useEffect(() => {
|
|
21164
|
+
if (!selected && options.length > 0) {
|
|
21165
|
+
handleSelect(options[0].id);
|
|
21166
|
+
}
|
|
21167
|
+
}, [options, selected, handleSelect]);
|
|
21168
|
+
if (options.length <= 1) return null;
|
|
21169
|
+
return /* @__PURE__ */ jsx(Field, { name: "vatNumberType", label: i18n.get("whichTypeOfTaxIdNumberDoYouHave"), children: (childProps) => /* @__PURE__ */ jsx(
|
|
21170
|
+
RadioGroup,
|
|
21171
|
+
{
|
|
21172
|
+
...childProps,
|
|
21173
|
+
name: "vatNumberType",
|
|
21174
|
+
items: options,
|
|
21175
|
+
value: selected,
|
|
21176
|
+
onChange: handleSelect
|
|
21177
|
+
}
|
|
21178
|
+
) });
|
|
21179
|
+
}
|
|
21073
21180
|
const VAT_NUMBER_FIELD = [
|
|
21074
21181
|
"vatNumber",
|
|
21075
21182
|
"exemptedFromVat",
|
|
@@ -21098,7 +21205,7 @@ function VatNumberField({
|
|
|
21098
21205
|
ExperimentNames.ShowExtraTaxExemptionReasons
|
|
21099
21206
|
);
|
|
21100
21207
|
const vatAbsenceReasons2 = showExtraTaxExemptionReasons ? ["belowTaxThreshold", "industryExemption", "countryWithoutVatOrGstSystem"] : ["belowTaxThreshold", "industryExemption"];
|
|
21101
|
-
const showVatExemptedOptions = canExempt && ((_a2 =
|
|
21208
|
+
const showVatExemptedOptions = canExempt && ((_a2 = vatNumberOptions[country]) == null ? void 0 : _a2.length) > 1;
|
|
21102
21209
|
const handleVatNumberTypeChange = (vatType) => {
|
|
21103
21210
|
if (vatType === "exempted") {
|
|
21104
21211
|
if (!canExempt) {
|
|
@@ -21115,7 +21222,7 @@ function VatNumberField({
|
|
|
21115
21222
|
};
|
|
21116
21223
|
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-field__vat-number", children: [
|
|
21117
21224
|
/* @__PURE__ */ jsx(
|
|
21118
|
-
|
|
21225
|
+
VatNumberTypeSelector,
|
|
21119
21226
|
{
|
|
21120
21227
|
country,
|
|
21121
21228
|
setSelected: handleVatNumberTypeChange,
|
|
@@ -21219,7 +21326,7 @@ function CompanyRegistrationDetails(props) {
|
|
|
21219
21326
|
);
|
|
21220
21327
|
const requiredFields = isEmpty(mergedProps.requiredFields) ? companyRegistrationDetailsFields : mergedProps.requiredFields;
|
|
21221
21328
|
const legalCompanyName = companyNameAndCountry == null ? void 0 : companyNameAndCountry.legalCompanyName;
|
|
21222
|
-
const defaultVatNumberType = ((_a2 = mergedProps.data) == null ? void 0 : _a2.vatNumber) ?
|
|
21329
|
+
const defaultVatNumberType = ((_a2 = mergedProps.data) == null ? void 0 : _a2.vatNumber) ? inferVatNumberType((_b2 = mergedProps.data) == null ? void 0 : _b2.vatNumber, country) : (_c2 = vatNumberOptions[country]) == null ? void 0 : _c2[0].id;
|
|
21223
21330
|
const [vatNumberType, setVatNumberType] = useState(
|
|
21224
21331
|
defaultVatNumberType
|
|
21225
21332
|
);
|
|
@@ -21532,12 +21639,12 @@ function CompanyRegistrationDetails(props) {
|
|
|
21532
21639
|
shouldValidate: mergedProps.shouldValidate,
|
|
21533
21640
|
handleChangeFor,
|
|
21534
21641
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
21535
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
21536
21642
|
country,
|
|
21537
21643
|
companyType: mergedProps.companyType,
|
|
21538
21644
|
taxIdNumberType,
|
|
21539
21645
|
setTaxIdNumberType,
|
|
21540
|
-
defaultData: (_j2 = mergedProps.data) == null ? void 0 : _j2.taxInformation
|
|
21646
|
+
defaultData: (_j2 = mergedProps.data) == null ? void 0 : _j2.taxInformation,
|
|
21647
|
+
registrationNumber: data.registrationNumber
|
|
21541
21648
|
}
|
|
21542
21649
|
) }),
|
|
21543
21650
|
formUtils.isRequiredField("dateOfIncorporation") && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
@@ -28286,12 +28393,12 @@ function TrustRegistrationDetails(props) {
|
|
|
28286
28393
|
shouldValidate: mergedProps.shouldValidate,
|
|
28287
28394
|
handleChangeFor,
|
|
28288
28395
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
28289
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
28290
28396
|
country,
|
|
28291
28397
|
companyType: LegalEntityType.TRUST,
|
|
28292
28398
|
taxIdNumberType,
|
|
28293
28399
|
setTaxIdNumberType,
|
|
28294
|
-
defaultData: (_g2 = mergedProps.data) == null ? void 0 : _g2.taxInformation
|
|
28400
|
+
defaultData: (_g2 = mergedProps.data) == null ? void 0 : _g2.taxInformation,
|
|
28401
|
+
registrationNumber: data.registrationNumber
|
|
28295
28402
|
}
|
|
28296
28403
|
),
|
|
28297
28404
|
formUtils.isRequiredField("registrationNumber") && /* @__PURE__ */ jsx(
|
|
@@ -31625,7 +31732,7 @@ function AdditionalInformation({
|
|
|
31625
31732
|
handleAddressSearch,
|
|
31626
31733
|
handleFindAddress
|
|
31627
31734
|
}) {
|
|
31628
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
31735
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
31629
31736
|
const { basicInformation } = useGlobalData();
|
|
31630
31737
|
const { updateStateSlice } = useGlobalDataSlice(ADDITIONAL_INFORMATION_FORM_ID);
|
|
31631
31738
|
const { i18n } = useI18nContext();
|
|
@@ -31672,12 +31779,12 @@ function AdditionalInformation({
|
|
|
31672
31779
|
);
|
|
31673
31780
|
const defaultRegistrationNumberType = (data == null ? void 0 : data.registrationNumber) ? inferCompanyRegistrationNumberType(data == null ? void 0 : data.registrationNumber, country, companyType) : registrationNumberOptions == null ? void 0 : registrationNumberOptions[0].id;
|
|
31674
31781
|
const [registrationNumberType, setRegistrationNumberType] = useState(defaultRegistrationNumberType);
|
|
31675
|
-
const
|
|
31676
|
-
const defaultTaxIdNumberType =
|
|
31782
|
+
const existingTaxInformation = (_a2 = data == null ? void 0 : data.taxInformation) == null ? void 0 : _a2.find((taxId) => taxId.country === country);
|
|
31783
|
+
const defaultTaxIdNumberType = (existingTaxInformation == null ? void 0 : existingTaxInformation.type) ?? ((existingTaxInformation == null ? void 0 : existingTaxInformation.number) ? inferTaxIdNumberType(existingTaxInformation == null ? void 0 : existingTaxInformation.number, country, companyType) : (_c2 = (_b2 = getTaxIdNumberOptions(country, companyType)) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.id);
|
|
31677
31784
|
const [taxIdNumberType, setTaxIdNumberType] = useState(
|
|
31678
31785
|
defaultTaxIdNumberType
|
|
31679
31786
|
);
|
|
31680
|
-
const defaultVatNumberType = (data == null ? void 0 : data.vatNumber) ?
|
|
31787
|
+
const defaultVatNumberType = (data == null ? void 0 : data.vatNumber) ? inferVatNumberType(data == null ? void 0 : data.vatNumber, country) : (_e2 = (_d2 = vatNumberOptions[country]) == null ? void 0 : _d2[0]) == null ? void 0 : _e2.id;
|
|
31681
31788
|
const [vatNumberType, setVatNumberType] = useState(
|
|
31682
31789
|
defaultVatNumberType
|
|
31683
31790
|
);
|
|
@@ -31690,9 +31797,6 @@ function AdditionalInformation({
|
|
|
31690
31797
|
} else {
|
|
31691
31798
|
fieldsToRemove.push("vatAbsenceReason");
|
|
31692
31799
|
}
|
|
31693
|
-
if (currentData.isUen) {
|
|
31694
|
-
fieldsToRemove.push("taxInformation", "exemptedFromTax");
|
|
31695
|
-
}
|
|
31696
31800
|
if (currentData.exemptedFromTax && !isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
|
|
31697
31801
|
fieldsToRemove.push("taxInformation");
|
|
31698
31802
|
}
|
|
@@ -31847,7 +31951,7 @@ function AdditionalInformation({
|
|
|
31847
31951
|
valid: formValid,
|
|
31848
31952
|
fieldProblems: formFieldProblems
|
|
31849
31953
|
});
|
|
31850
|
-
}, [formSchema, formData, formErrors, formValid, formFieldProblems]);
|
|
31954
|
+
}, [formSchema, formData, formErrors, formValid, formFieldProblems, updateStateSlice]);
|
|
31851
31955
|
const verifiedAddress = useMemo(() => {
|
|
31852
31956
|
if (!verifiedBusiness) return void 0;
|
|
31853
31957
|
return verifiedBusiness.isPrincipalAddress || verifiedBusiness.state && (basicInformation == null ? void 0 : basicInformation.stateOrProvince) !== verifiedBusiness.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness), country } } : {
|
|
@@ -31906,7 +32010,7 @@ function AdditionalInformation({
|
|
|
31906
32010
|
});
|
|
31907
32011
|
}
|
|
31908
32012
|
return i18n.get("registeredBusinessAddressDescription");
|
|
31909
|
-
}, [datasetUtils, (
|
|
32013
|
+
}, [datasetUtils, (_f2 = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _f2.country, i18n]);
|
|
31910
32014
|
const requiredFieldsForDBANameField = useMemo(() => {
|
|
31911
32015
|
return requiredFields == null ? void 0 : requiredFields.filter(
|
|
31912
32016
|
(field) => ["doingBusinessAs", "doingBusinessAsAbsent"].includes(field)
|
|
@@ -32000,12 +32104,12 @@ function AdditionalInformation({
|
|
|
32000
32104
|
shouldValidate,
|
|
32001
32105
|
handleChangeFor,
|
|
32002
32106
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
32003
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
32004
32107
|
country,
|
|
32005
32108
|
companyType,
|
|
32006
32109
|
taxIdNumberType,
|
|
32007
32110
|
setTaxIdNumberType,
|
|
32008
|
-
defaultData: data == null ? void 0 : data.taxInformation
|
|
32111
|
+
defaultData: data == null ? void 0 : data.taxInformation,
|
|
32112
|
+
registrationNumber: formData == null ? void 0 : formData.registrationNumber
|
|
32009
32113
|
}
|
|
32010
32114
|
) }),
|
|
32011
32115
|
showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
@@ -32139,7 +32243,7 @@ function AdditionalInformation({
|
|
|
32139
32243
|
...mergedDefaultData == null ? void 0 : mergedDefaultData.registrationAddress,
|
|
32140
32244
|
country
|
|
32141
32245
|
},
|
|
32142
|
-
labels: getAddressSchemaLabelsByCountry(((
|
|
32246
|
+
labels: getAddressSchemaLabelsByCountry(((_g2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _g2.country) ?? country),
|
|
32143
32247
|
requiredFields: addressSchema,
|
|
32144
32248
|
shouldValidate,
|
|
32145
32249
|
hideCountry: true,
|
|
@@ -32160,7 +32264,7 @@ function AdditionalInformation({
|
|
|
32160
32264
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("principalPlaceOfBusiness") }),
|
|
32161
32265
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("principalPlaceOfBusinessDescription") })
|
|
32162
32266
|
] }),
|
|
32163
|
-
(!((
|
|
32267
|
+
(!((_h2 = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _h2.poBox) || !isPreventPoBoxEnabled) && /* @__PURE__ */ jsx(
|
|
32164
32268
|
Field,
|
|
32165
32269
|
{
|
|
32166
32270
|
name: "operationalAddressIsSame",
|
|
@@ -32191,7 +32295,7 @@ function AdditionalInformation({
|
|
|
32191
32295
|
...mergedDefaultData == null ? void 0 : mergedDefaultData.operationalAddress,
|
|
32192
32296
|
country
|
|
32193
32297
|
},
|
|
32194
|
-
labels: getAddressSchemaLabelsByCountry(((
|
|
32298
|
+
labels: getAddressSchemaLabelsByCountry(((_i2 = data == null ? void 0 : data.operationalAddress) == null ? void 0 : _i2.country) ?? country),
|
|
32195
32299
|
requiredFields: addressSchema,
|
|
32196
32300
|
shouldValidate,
|
|
32197
32301
|
hideCountry: true,
|
|
@@ -32900,7 +33004,6 @@ function BasicInformation({
|
|
|
32900
33004
|
handleChangeFor,
|
|
32901
33005
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
32902
33006
|
registrationNumber: formData.registrationNumber,
|
|
32903
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
32904
33007
|
country: formData.country ?? country,
|
|
32905
33008
|
companyType,
|
|
32906
33009
|
taxIdNumberType,
|
|
@@ -33218,11 +33321,24 @@ const mapDbaName = (legalEntity) => {
|
|
|
33218
33321
|
}
|
|
33219
33322
|
return dbaName;
|
|
33220
33323
|
};
|
|
33324
|
+
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
33325
|
+
const currentCountryTaxInfo = taxInformation == null ? void 0 : taxInformation.find((taxInfo) => taxInfo.country === country);
|
|
33326
|
+
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
33327
|
+
return {
|
|
33328
|
+
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
33329
|
+
isUen: currentCountryTaxInfo.type === "UEN"
|
|
33330
|
+
};
|
|
33331
|
+
};
|
|
33221
33332
|
const mapAdditionalInformation = (data, legalEntity) => {
|
|
33222
33333
|
if (!data) return;
|
|
33223
33334
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
33224
|
-
const dbaNameFields = mapDbaName(legalEntity);
|
|
33225
33335
|
const currentCountry = entity == null ? void 0 : entity.registeredAddress.country;
|
|
33336
|
+
const dbaNameFields = mapDbaName(legalEntity);
|
|
33337
|
+
const isUen = mapIsUen(
|
|
33338
|
+
data.taxInformation,
|
|
33339
|
+
data.registrationNumber,
|
|
33340
|
+
currentCountry
|
|
33341
|
+
);
|
|
33226
33342
|
const operationalAddressIsSame = (entity == null ? void 0 : entity.principalPlaceOfBusiness) && !objectsDeepEqual(entity == null ? void 0 : entity.principalPlaceOfBusiness, entity == null ? void 0 : entity.registeredAddress) ? operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME : operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME;
|
|
33227
33343
|
const result = entriesOf(data).reduce(
|
|
33228
33344
|
(acc, [field]) => {
|
|
@@ -33242,7 +33358,7 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
33242
33358
|
},
|
|
33243
33359
|
{ operationalAddressIsSame }
|
|
33244
33360
|
);
|
|
33245
|
-
return { ...result, ...dbaNameFields };
|
|
33361
|
+
return { ...result, ...dbaNameFields, ...isUen };
|
|
33246
33362
|
};
|
|
33247
33363
|
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
33248
33364
|
if (!legalEntity) return {};
|
|
@@ -33980,7 +34096,7 @@ const formatAdditionalInformation = (data, labels2, country, companyType, i18n)
|
|
|
33980
34096
|
return {
|
|
33981
34097
|
[((_b2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _b2.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
33982
34098
|
[registrationNumberLabel]: data.registrationNumber,
|
|
33983
|
-
[taxIdLabel]: (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => country === taxId.country)) == null ? void 0 : _d2.number,
|
|
34099
|
+
[taxIdLabel]: data.isUen ? void 0 : (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => country === taxId.country)) == null ? void 0 : _d2.number,
|
|
33984
34100
|
[((_e2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _e2.vatNumber) ?? "vatNumber"]: data.vatNumber,
|
|
33985
34101
|
[((_f2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _f2.vatAbsenceReason) ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
|
|
33986
34102
|
[((_g2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _g2.dateOfIncorporation) ?? "dateOfIncorporation"]: data.dateOfIncorporation,
|
|
@@ -34324,8 +34440,13 @@ function BusinessDetailsDropin({
|
|
|
34324
34440
|
onChange == null ? void 0 : onChange(currentState);
|
|
34325
34441
|
}, [currentState, onChange]);
|
|
34326
34442
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
34327
|
-
const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
34328
34443
|
const formWith2Views = "basicInformation";
|
|
34444
|
+
const isAssociationTaskType = useMemo(() => {
|
|
34445
|
+
if (!taskType) {
|
|
34446
|
+
return accountHolder !== "theCompanyIWorkFor";
|
|
34447
|
+
}
|
|
34448
|
+
return taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
34449
|
+
}, [accountHolder, taskType]);
|
|
34329
34450
|
const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
34330
34451
|
const isManualTinVerificationEnabledAndUS = isExperimentEnabled(ExperimentNames.EnableManualCompanyTinVerification) && country === CountryCodes.UnitedStates;
|
|
34331
34452
|
const currentCountry = useMemo(
|
|
@@ -34360,7 +34481,7 @@ function BusinessDetailsDropin({
|
|
|
34360
34481
|
const [tinMatched, setTinMatched] = useState(void 0);
|
|
34361
34482
|
const [initialData, setInitialData] = useState(() => {
|
|
34362
34483
|
return mapLegalEntityToBusinessDetailsSchema(
|
|
34363
|
-
|
|
34484
|
+
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
34364
34485
|
isSoleProp ? legalEntityResponse : void 0
|
|
34365
34486
|
);
|
|
34366
34487
|
});
|
|
@@ -51071,7 +51192,7 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
|
51071
51192
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
51072
51193
|
};
|
|
51073
51194
|
const Introduction = lazy$1(
|
|
51074
|
-
async () => (await import("./Introduction-
|
|
51195
|
+
async () => (await import("./Introduction-CYuHFb7b.js")).Introduction
|
|
51075
51196
|
);
|
|
51076
51197
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
51077
51198
|
const logger$d = createLogger("DropinComposer");
|
|
@@ -56068,7 +56189,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
56068
56189
|
if (__privateGet(this, _Component)) {
|
|
56069
56190
|
Devtools = __privateGet(this, _Component);
|
|
56070
56191
|
} else {
|
|
56071
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
56192
|
+
Devtools = lazy(() => import("./HO4MOOFI-DNsHY5mz.js"));
|
|
56072
56193
|
__privateSet(this, _Component, Devtools);
|
|
56073
56194
|
}
|
|
56074
56195
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -56190,7 +56311,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
56190
56311
|
if (__privateGet(this, _Component2)) {
|
|
56191
56312
|
Devtools = __privateGet(this, _Component2);
|
|
56192
56313
|
} else {
|
|
56193
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
56314
|
+
Devtools = lazy(() => import("./HUY7CZI3-COPs-NYa.js"));
|
|
56194
56315
|
__privateSet(this, _Component2, Devtools);
|
|
56195
56316
|
}
|
|
56196
56317
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|
|
@@ -56411,7 +56532,7 @@ const useAnalytics = ({
|
|
|
56411
56532
|
componentName,
|
|
56412
56533
|
onboardingVersion
|
|
56413
56534
|
}) => {
|
|
56414
|
-
const sdkVersion = "3.57.
|
|
56535
|
+
const sdkVersion = "3.57.1";
|
|
56415
56536
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
56416
56537
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
56417
56538
|
const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
|
|
@@ -56902,7 +57023,7 @@ const ConfigurationApiProvider = ({
|
|
|
56902
57023
|
[authContext, rootLegalEntityId]
|
|
56903
57024
|
);
|
|
56904
57025
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
56905
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.57.
|
|
57026
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.57.1" }),
|
|
56906
57027
|
children2
|
|
56907
57028
|
] });
|
|
56908
57029
|
};
|
|
@@ -57477,10 +57598,10 @@ const transformModule = (highlights, codeNode, scope) => {
|
|
|
57477
57598
|
};
|
|
57478
57599
|
const supportedModules = ["plaintext", "json", "yaml", "css"];
|
|
57479
57600
|
const moduleMap = {
|
|
57480
|
-
plaintext: () => import("./plaintext-
|
|
57481
|
-
json: () => import("./json-
|
|
57482
|
-
yaml: () => import("./yaml-
|
|
57483
|
-
css: () => import("./css-
|
|
57601
|
+
plaintext: () => import("./plaintext-CBZzipLc.js"),
|
|
57602
|
+
json: () => import("./json-DvF_GzGv.js"),
|
|
57603
|
+
yaml: () => import("./yaml-CjI4QAHh.js"),
|
|
57604
|
+
css: () => import("./css-DnOp_BRh.js")
|
|
57484
57605
|
};
|
|
57485
57606
|
const getModule = async (name) => {
|
|
57486
57607
|
if (!supportedModules.includes(name)) {
|
|
@@ -57771,7 +57892,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
57771
57892
|
const [tab, setTab] = useState("metadata");
|
|
57772
57893
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
57773
57894
|
const metadata = {
|
|
57774
|
-
sdkVersion: "3.57.
|
|
57895
|
+
sdkVersion: "3.57.1",
|
|
57775
57896
|
locale: i18n.locale,
|
|
57776
57897
|
rootLegalEntityId: rootLegalEntity.id
|
|
57777
57898
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { LegalArrangement } from '#core/models/api/legal-arrangement';
|
|
2
|
-
import type { Organization
|
|
2
|
+
import type { Organization } from '#core/models/api/organization';
|
|
3
3
|
import type { SoleProprietor } from '#core/models/api/sole-proprietor';
|
|
4
4
|
import type { Trust } from '#core/models/api/trust';
|
|
5
5
|
import type { CountryCode } from '#core/models/country-code';
|
|
6
|
+
import type { TaxIdNumberType } from '#shared/fields/IdFieldTypeSelector/countryIdNumberTypes';
|
|
6
7
|
import type { CompanyNameAndCountrySchema } from '#shared/forms/CompanyNameAndCountry/types';
|
|
7
|
-
export declare const countryToTaxInfoTypeMap: Record<string,
|
|
8
|
+
export declare const countryToTaxInfoTypeMap: Record<string, TaxIdNumberType>;
|
|
8
9
|
export declare const updateTaxInformation: <T extends Organization | SoleProprietor | Trust>({ taxId, country, exemptedFromTax, isUen, entity, }: {
|
|
9
10
|
taxId: string;
|
|
10
11
|
country: CountryCode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CompanyTypesValue } from '#core/models/api/company-types-value';
|
|
2
|
+
import type { LegalEntityType } from '#core/models/api/legal-entity-type';
|
|
3
|
+
import type { CountryCode } from '#core/models/country-code';
|
|
4
|
+
import type { TranslationKey } from '#language/types';
|
|
5
|
+
import type { VatNumberType } from './countryIdNumberTypes';
|
|
6
|
+
interface PropsWithNoExemption {
|
|
7
|
+
exemptedOption?: false;
|
|
8
|
+
selected: VatNumberType | undefined;
|
|
9
|
+
setSelected: (type: VatNumberType) => void;
|
|
10
|
+
}
|
|
11
|
+
interface PropsWithVatNumberExemption {
|
|
12
|
+
exemptedOption: TranslationKey;
|
|
13
|
+
selected: VatNumberType | 'exempted' | undefined;
|
|
14
|
+
setSelected: (type: VatNumberType | 'exempted') => void;
|
|
15
|
+
}
|
|
16
|
+
type VatNumberTypeSelectorProps = {
|
|
17
|
+
country: CountryCode;
|
|
18
|
+
companyType?: CompanyTypesValue | LegalEntityType.TRUST;
|
|
19
|
+
} & (PropsWithNoExemption | PropsWithVatNumberExemption);
|
|
20
|
+
export declare function VatNumberTypeSelector({ country, companyType, selected, setSelected, exemptedOption, }: VatNumberTypeSelectorProps): import("preact/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CompanyTypesValue } from '#core/models/api/company-types-value';
|
|
2
|
-
import
|
|
2
|
+
import { LegalEntityType } from '#core/models/api/legal-entity-type';
|
|
3
3
|
import type { CountryCode } from '#core/models/country-code';
|
|
4
4
|
import type { TranslationKey } from '#language/types';
|
|
5
5
|
export interface CompanyRegistrationNumberOption {
|
|
@@ -16,6 +16,11 @@ export interface TaxIdNumberOption {
|
|
|
16
16
|
name: TranslationKey;
|
|
17
17
|
applicableOnlyFor?: ReadonlyArray<CompanyTypesValue | LegalEntityType.TRUST>;
|
|
18
18
|
}
|
|
19
|
+
export interface VatNumberOption {
|
|
20
|
+
id: string;
|
|
21
|
+
name: TranslationKey;
|
|
22
|
+
applicableOnlyFor?: ReadonlyArray<CompanyTypesValue | LegalEntityType.TRUST>;
|
|
23
|
+
}
|
|
19
24
|
export declare const companyRegistrationNumberOptions: {
|
|
20
25
|
readonly PL: readonly [{
|
|
21
26
|
readonly id: "regon";
|
|
@@ -99,26 +104,34 @@ export declare const additionallIdNumberOptions: {
|
|
|
99
104
|
};
|
|
100
105
|
export type IndividualIdNumberType = (typeof individualIdNumberOptions)[keyof typeof individualIdNumberOptions][number]['id'] | (typeof additionallIdNumberOptions)[keyof typeof additionallIdNumberOptions][number]['id'] | 'ssn' | 'ssnLastFour' | 'nationalIdNumber';
|
|
101
106
|
export declare const taxIdNumberOptions: {
|
|
102
|
-
readonly
|
|
103
|
-
readonly id: "
|
|
104
|
-
readonly name: "
|
|
105
|
-
|
|
106
|
-
readonly id: "stamregister";
|
|
107
|
-
readonly name: "stamregister";
|
|
107
|
+
readonly AU: readonly [{
|
|
108
|
+
readonly id: "ABN";
|
|
109
|
+
readonly name: "australianBusinessNumberAbn";
|
|
110
|
+
readonly applicableOnlyFor: readonly [CompanyTypesValue.UNINCORPORATED_PARTNERSHIP, CompanyTypesValue.SOLE_PROPRIETORSHIP, LegalEntityType.TRUST];
|
|
108
111
|
}];
|
|
109
|
-
readonly
|
|
110
|
-
readonly id: "
|
|
111
|
-
readonly name: "
|
|
112
|
-
}, {
|
|
113
|
-
readonly id: "NumeroDeTVA";
|
|
114
|
-
readonly name: "NumeroDeTVA";
|
|
112
|
+
readonly BE: readonly [{
|
|
113
|
+
readonly id: "BUSINESS_NUMMER";
|
|
114
|
+
readonly name: "businessNumber";
|
|
115
115
|
}];
|
|
116
|
-
readonly
|
|
117
|
-
readonly id: "
|
|
118
|
-
readonly name: "
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
readonly
|
|
116
|
+
readonly BR: readonly [{
|
|
117
|
+
readonly id: "CNPJ";
|
|
118
|
+
readonly name: "CNPJ";
|
|
119
|
+
}];
|
|
120
|
+
readonly DE: readonly [{
|
|
121
|
+
readonly id: "STEUERNUMMER";
|
|
122
|
+
readonly name: "taxInformationNumber";
|
|
123
|
+
}];
|
|
124
|
+
readonly GG: readonly [{
|
|
125
|
+
readonly id: "GG_REGISTRATION_NUMBER";
|
|
126
|
+
readonly name: "taxInformationNumber";
|
|
127
|
+
}];
|
|
128
|
+
readonly HK: readonly [{
|
|
129
|
+
readonly id: "BRN";
|
|
130
|
+
readonly name: "taxInformationNumber__HK";
|
|
131
|
+
}];
|
|
132
|
+
readonly JP: readonly [{
|
|
133
|
+
readonly id: "CORPORATE_NUMBER";
|
|
134
|
+
readonly name: "taxInformationNumber";
|
|
122
135
|
}];
|
|
123
136
|
readonly JE: readonly [{
|
|
124
137
|
readonly id: "taxIdentificationNumber";
|
|
@@ -128,22 +141,175 @@ export declare const taxIdNumberOptions: {
|
|
|
128
141
|
readonly name: "socialSecurityNumber";
|
|
129
142
|
readonly applicableOnlyFor: readonly [CompanyTypesValue.SOLE_PROPRIETORSHIP];
|
|
130
143
|
}];
|
|
144
|
+
readonly NL: readonly [{
|
|
145
|
+
readonly id: "RSIN";
|
|
146
|
+
readonly name: "taxInformationNumber";
|
|
147
|
+
}];
|
|
148
|
+
readonly NZ: readonly [{
|
|
149
|
+
readonly id: "IRD";
|
|
150
|
+
readonly name: "irdNumber";
|
|
151
|
+
}];
|
|
131
152
|
readonly PR: readonly [{
|
|
132
153
|
readonly id: "EIN";
|
|
133
154
|
readonly name: "ein";
|
|
155
|
+
}];
|
|
156
|
+
readonly SG: readonly [{
|
|
157
|
+
readonly id: "GST";
|
|
158
|
+
readonly name: "gst";
|
|
134
159
|
}, {
|
|
135
|
-
readonly id: "
|
|
136
|
-
readonly name: "
|
|
137
|
-
readonly applicableOnlyFor: readonly [CompanyTypesValue.SOLE_PROPRIETORSHIP];
|
|
160
|
+
readonly id: "UEN";
|
|
161
|
+
readonly name: "uen";
|
|
138
162
|
}];
|
|
139
163
|
readonly US: readonly [{
|
|
140
164
|
readonly id: "EIN";
|
|
141
165
|
readonly name: "ein";
|
|
166
|
+
}];
|
|
167
|
+
};
|
|
168
|
+
export declare const vatNumberOptions: {
|
|
169
|
+
readonly AT: readonly [{
|
|
170
|
+
readonly id: "UST-ID";
|
|
171
|
+
readonly name: "UST-ID";
|
|
172
|
+
}];
|
|
173
|
+
readonly BE: readonly [{
|
|
174
|
+
readonly id: "euVatNumber";
|
|
175
|
+
readonly name: "euVatNumber";
|
|
176
|
+
}];
|
|
177
|
+
readonly BG: readonly [{
|
|
178
|
+
readonly id: "identifikacionenNomerDDS";
|
|
179
|
+
readonly name: "identifikacionenNomerDDS";
|
|
180
|
+
}];
|
|
181
|
+
readonly HR: readonly [{
|
|
182
|
+
readonly id: "PDVIdBrojOIB";
|
|
183
|
+
readonly name: "PDVIdBrojOIB";
|
|
184
|
+
}];
|
|
185
|
+
readonly CY: readonly [{
|
|
186
|
+
readonly id: "arithmosEngraphes";
|
|
187
|
+
readonly name: "arithmosEngraphes";
|
|
188
|
+
}];
|
|
189
|
+
readonly CZ: readonly [{
|
|
190
|
+
readonly id: "DIC";
|
|
191
|
+
readonly name: "DIC";
|
|
192
|
+
}];
|
|
193
|
+
readonly DK: readonly [{
|
|
194
|
+
readonly id: "momsregistreringsnummerCVR";
|
|
195
|
+
readonly name: "momsregistreringsnummerCVR";
|
|
142
196
|
}, {
|
|
143
|
-
readonly id: "
|
|
144
|
-
readonly name: "
|
|
145
|
-
|
|
197
|
+
readonly id: "stamregister";
|
|
198
|
+
readonly name: "stamregister";
|
|
199
|
+
}];
|
|
200
|
+
readonly EE: readonly [{
|
|
201
|
+
readonly id: "kaibemaksukohustuslaseNumber";
|
|
202
|
+
readonly name: "kaibemaksukohustuslaseNumber";
|
|
203
|
+
}];
|
|
204
|
+
readonly FI: readonly [{
|
|
205
|
+
readonly id: "arvonlisaveronumeroMervardesskattenummer";
|
|
206
|
+
readonly name: "arvonlisaveronumeroMervardesskattenummer";
|
|
207
|
+
}];
|
|
208
|
+
readonly FR: readonly [{
|
|
209
|
+
readonly id: "numeroDIdentificationALATaxe";
|
|
210
|
+
readonly name: "numeroDIdentificationALATaxe";
|
|
211
|
+
}, {
|
|
212
|
+
readonly id: "NumeroDeTVA";
|
|
213
|
+
readonly name: "NumeroDeTVA";
|
|
214
|
+
}];
|
|
215
|
+
readonly DE: readonly [{
|
|
216
|
+
readonly id: "USt-IdNr";
|
|
217
|
+
readonly name: "USt-IdNr";
|
|
218
|
+
}];
|
|
219
|
+
readonly GR: readonly [{
|
|
220
|
+
readonly id: "grTaxId";
|
|
221
|
+
readonly name: "grTaxId";
|
|
222
|
+
}];
|
|
223
|
+
readonly HU: readonly [{
|
|
224
|
+
readonly id: "huTaxId";
|
|
225
|
+
readonly name: "huTaxId";
|
|
226
|
+
}];
|
|
227
|
+
readonly IE: readonly [{
|
|
228
|
+
readonly id: "vatNumber";
|
|
229
|
+
readonly name: "vatNumber";
|
|
230
|
+
}];
|
|
231
|
+
readonly IT: readonly [{
|
|
232
|
+
readonly id: "partitaIVA";
|
|
233
|
+
readonly name: "partitaIVA";
|
|
234
|
+
}];
|
|
235
|
+
readonly LV: readonly [{
|
|
236
|
+
readonly id: "lvTaxId";
|
|
237
|
+
readonly name: "lvTaxId";
|
|
238
|
+
}];
|
|
239
|
+
readonly LI: readonly [{
|
|
240
|
+
readonly id: "vatRegistrationNumber";
|
|
241
|
+
readonly name: "vatRegistrationNumber";
|
|
242
|
+
}];
|
|
243
|
+
readonly LT: readonly [{
|
|
244
|
+
readonly id: "PVMmoketojoKodas";
|
|
245
|
+
readonly name: "PVMmoketojoKodas";
|
|
246
|
+
}];
|
|
247
|
+
readonly LU: readonly [{
|
|
248
|
+
readonly id: "numeroDIdentificationALATaxe";
|
|
249
|
+
readonly name: "numeroDIdentificationALATaxe";
|
|
250
|
+
}];
|
|
251
|
+
readonly MY: readonly [{
|
|
252
|
+
readonly id: "SST";
|
|
253
|
+
readonly name: "SST";
|
|
254
|
+
}];
|
|
255
|
+
readonly MT: readonly [{
|
|
256
|
+
readonly id: "vatNumber";
|
|
257
|
+
readonly name: "vatNumber";
|
|
258
|
+
}];
|
|
259
|
+
readonly MC: readonly [{
|
|
260
|
+
readonly id: "numeroDIdentificationALATaxe";
|
|
261
|
+
readonly name: "numeroDIdentificationALATaxe";
|
|
262
|
+
}];
|
|
263
|
+
readonly NL: readonly [{
|
|
264
|
+
readonly id: "btwNummer";
|
|
265
|
+
readonly name: "btwNummer";
|
|
266
|
+
}];
|
|
267
|
+
readonly NO: readonly [{
|
|
268
|
+
readonly id: "mvanummer";
|
|
269
|
+
readonly name: "mvanummer";
|
|
270
|
+
}];
|
|
271
|
+
readonly PL: readonly [{
|
|
272
|
+
readonly id: "NIP";
|
|
273
|
+
readonly name: "NIP";
|
|
274
|
+
}];
|
|
275
|
+
readonly PT: readonly [{
|
|
276
|
+
readonly id: "numerodeIVA";
|
|
277
|
+
readonly name: "numerodeIVA";
|
|
278
|
+
}];
|
|
279
|
+
readonly RO: readonly [{
|
|
280
|
+
readonly id: "codulDeIdentificareFiscala";
|
|
281
|
+
readonly name: "codulDeIdentificareFiscala";
|
|
282
|
+
}];
|
|
283
|
+
readonly SK: readonly [{
|
|
284
|
+
readonly id: "skTaxId";
|
|
285
|
+
readonly name: "skTaxId";
|
|
286
|
+
}];
|
|
287
|
+
readonly SI: readonly [{
|
|
288
|
+
readonly id: "siTaxId";
|
|
289
|
+
readonly name: "siTaxId";
|
|
290
|
+
}];
|
|
291
|
+
readonly ES: readonly [{
|
|
292
|
+
readonly id: "NIFdeIVA";
|
|
293
|
+
readonly name: "NIFdeIVA";
|
|
294
|
+
}];
|
|
295
|
+
readonly SE: readonly [{
|
|
296
|
+
readonly id: "vatNummerMomsregistreringsnummerOrMomsnummer";
|
|
297
|
+
readonly name: "vatNummerMomsregistreringsnummerOrMomsnummer";
|
|
298
|
+
}];
|
|
299
|
+
readonly CH: readonly [{
|
|
300
|
+
readonly id: "Mehrwertsteuernummer";
|
|
301
|
+
readonly name: "Mehrwertsteuernummer";
|
|
302
|
+
}];
|
|
303
|
+
readonly AE: readonly [{
|
|
304
|
+
readonly id: "vatRegistrationNumber";
|
|
305
|
+
readonly name: "vatRegistrationNumber";
|
|
306
|
+
}];
|
|
307
|
+
readonly GB: readonly [{
|
|
308
|
+
readonly id: "vatRegistrationNumber";
|
|
309
|
+
readonly name: "vatRegistrationNumber";
|
|
146
310
|
}];
|
|
147
311
|
};
|
|
148
312
|
export declare const getTaxIdNumberOptions: (country: CountryCode, companyType: CompanyTypesValue | LegalEntityType.TRUST | undefined) => readonly TaxIdNumberOption[] | undefined;
|
|
313
|
+
export declare const getVatNumberOptions: (country: CountryCode, companyType: CompanyTypesValue | LegalEntityType.TRUST | undefined) => readonly VatNumberOption[] | undefined;
|
|
149
314
|
export type TaxIdNumberType = (typeof taxIdNumberOptions)[keyof typeof taxIdNumberOptions][number]['id'];
|
|
315
|
+
export type VatNumberType = (typeof vatNumberOptions)[keyof typeof vatNumberOptions][number]['id'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { JSX } from 'preact';
|
|
2
2
|
import type { TaxInformationFieldProps, TaxInformationFieldSchema } from './types';
|
|
3
3
|
export declare const TAX_INFORMATION_FIELD: Array<keyof TaxInformationFieldSchema>;
|
|
4
|
-
export declare function TaxInformationField({ data, valid, errors, labels, mask, guidanceText, placeholders, readonly, optional, shouldValidate, handleChangeFor, country, canExempt, registrationNumber,
|
|
4
|
+
export declare function TaxInformationField({ data, valid, errors, labels, mask, guidanceText, placeholders, readonly, optional, shouldValidate, handleChangeFor, country, canExempt, registrationNumber, companyType, taxIdNumberType, setTaxIdNumberType, defaultData, }: TaxInformationFieldProps): JSX.Element;
|
|
@@ -18,5 +18,4 @@ export interface TaxInformationFieldProps extends BaseFormFieldProps<TaxInformat
|
|
|
18
18
|
setTaxIdNumberType: Dispatch<StateUpdater<TaxIdNumberType | undefined>>;
|
|
19
19
|
companyType?: CompanyTypesValue | LegalEntityType.TRUST;
|
|
20
20
|
registrationNumber?: string;
|
|
21
|
-
isUen?: boolean;
|
|
22
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FieldMetadata } from '#core/models/country-config';
|
|
2
2
|
import type { PerCountryFieldConfig } from '#core/models/field-configurations';
|
|
3
|
-
import type {
|
|
3
|
+
import type { VatNumberType } from '../IdFieldTypeSelector/countryIdNumberTypes';
|
|
4
4
|
import type { VatNumberFieldSchema } from './types';
|
|
5
5
|
export declare const vatAbsenceReasonMetadata: FieldMetadata<VatNumberFieldSchema, 'vatAbsenceReason'>;
|
|
6
6
|
interface FieldConfigParams {
|
|
7
|
-
vatNumberType:
|
|
7
|
+
vatNumberType: VatNumberType | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const defaultFieldMetadata: FieldMetadata<VatNumberFieldSchema, 'vatNumber'>;
|
|
10
10
|
export declare const defaultFieldConfig: PerCountryFieldConfig<VatNumberFieldSchema, 'vatNumber', FieldConfigParams>;
|
|
@@ -2,7 +2,7 @@ import type { Dispatch, StateUpdater } from 'preact/hooks';
|
|
|
2
2
|
import type { BaseFormFieldProps } from '#core/hooks/useForm/types';
|
|
3
3
|
import type { VatAbsenceReason } from '#core/models/api/organization';
|
|
4
4
|
import type { CountryCode } from '#core/models/country-code';
|
|
5
|
-
import type {
|
|
5
|
+
import type { VatNumberType } from '../IdFieldTypeSelector/countryIdNumberTypes';
|
|
6
6
|
export interface VatNumberFieldSchema {
|
|
7
7
|
vatNumber?: string | undefined;
|
|
8
8
|
exemptedFromVat?: boolean;
|
|
@@ -11,6 +11,6 @@ export interface VatNumberFieldSchema {
|
|
|
11
11
|
export interface VatNumberFieldProps extends BaseFormFieldProps<VatNumberFieldSchema> {
|
|
12
12
|
country: CountryCode;
|
|
13
13
|
canExempt: boolean;
|
|
14
|
-
vatNumberType:
|
|
15
|
-
setVatNumberType: Dispatch<StateUpdater<
|
|
14
|
+
vatNumberType: VatNumberType | undefined;
|
|
15
|
+
setVatNumberType: Dispatch<StateUpdater<VatNumberType | undefined>>;
|
|
16
16
|
}
|
|
@@ -5,6 +5,7 @@ export declare enum CompanyTypesValue {
|
|
|
5
5
|
PRIVATE_COMPANY = "privateCompany",
|
|
6
6
|
PUBLIC_COMPANY = "listedPublicCompany",
|
|
7
7
|
UNLISTED_PUBLIC_COMPANY = "unlistedPublicCompany",
|
|
8
|
+
UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership",
|
|
8
9
|
INCORPORATED_PARTNERSHIP = "partnershipIncorporated",
|
|
9
10
|
INCORPORATED_ASSOCIATION = "associationIncorporated",
|
|
10
11
|
GOVERNMENTAL_ORGANIZATION = "governmentalOrganization",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TaxIdNumberType } from '#shared/fields/IdFieldTypeSelector/countryIdNumberTypes';
|
|
1
2
|
import type { CountryCode } from '../country-code';
|
|
2
3
|
import type { Address } from './address';
|
|
3
4
|
import type { CompanyTypesValue } from './company-types-value';
|
|
@@ -45,7 +46,6 @@ export type VatAbsenceReason = (typeof vatAbsenceReasons)[number];
|
|
|
45
46
|
export type TaxInformation = {
|
|
46
47
|
country: CountryCode;
|
|
47
48
|
number?: string;
|
|
48
|
-
type?:
|
|
49
|
+
type?: TaxIdNumberType;
|
|
49
50
|
numberAbsent?: boolean;
|
|
50
51
|
};
|
|
51
|
-
export type TaxInformationType = 'SSN' | 'EIN' | 'ITIN' | 'ABN' | 'UEN' | 'GST' | 'IRD' | 'BRN';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ExistingLegalEntity } from '#core/models/api/legal-entity';
|
|
2
|
+
import type { TaxInformation } from '#core/models/api/organization';
|
|
3
|
+
import type { CountryCode } from '#core/models/country-code';
|
|
2
4
|
import type { DBANameFieldSchema } from '#shared/fields/DBANameField/types';
|
|
5
|
+
import type { AdditionalInformationSchema } from '../../../components/Business/forms/AdditionalInformation/types';
|
|
3
6
|
import type { BusinessDetailsSchema } from '../../../components/Business/forms/BusinessDetails/types';
|
|
4
7
|
export declare const mapApiDocumentToBusinessDetailsDocuments: (entityId: string) => BusinessDetailsSchema;
|
|
5
8
|
export declare const mapDbaName: (legalEntity: ExistingLegalEntity) => DBANameFieldSchema;
|
|
9
|
+
export declare const mapIsUen: (taxInformation: TaxInformation[] | undefined, registrationNumber: string | undefined, country: CountryCode | undefined) => Partial<AdditionalInformationSchema>;
|
|
6
10
|
export declare const mapLegalEntityToBusinessDetailsSchema: (legalEntity: ExistingLegalEntity | undefined, parentEntity?: ExistingLegalEntity) => BusinessDetailsSchema;
|