@adyen/kyc-components 3.57.0 → 3.57.2
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-DkZtb7d3.js} +1 -1
- package/dist/es/{HO4MOOFI-BjUBJSdM.js → HO4MOOFI-wzF0N7iv.js} +2 -2
- package/dist/es/{HUY7CZI3-BcIThR0Y.js → HUY7CZI3-BK_rqYHa.js} +2 -2
- package/dist/es/{Introduction-BtT5M7Db.js → Introduction-DhHhXrxa.js} +1 -1
- package/dist/es/adyen-kyc-components.es.js +1 -1
- package/dist/es/{css-q1a-Ur7J.js → css-Bnf6yr_R.js} +1 -1
- package/dist/es/{index-Bk0fvPZ4.js → index-BSMeMrJR.js} +296 -169
- package/dist/es/{json-BRkB-KFu.js → json-BOvlLUxr.js} +1 -1
- package/dist/es/{plaintext-D03i-amR.js → plaintext-BFkPKRSv.js} +1 -1
- package/dist/es/{yaml-BjlWN5Jw.js → yaml-BvMTQEly.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
|
@@ -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,
|
|
@@ -20791,29 +20849,34 @@ function TaxInformationField({
|
|
|
20791
20849
|
});
|
|
20792
20850
|
return handleChangeFor("taxInformation", "blur")(updatedTaxInformation);
|
|
20793
20851
|
};
|
|
20852
|
+
useEffect(() => {
|
|
20853
|
+
if (country === "SG" && data.isUen && (currentCountryTaxInformation == null ? void 0 : currentCountryTaxInformation.number) !== registrationNumber) {
|
|
20854
|
+
setUenAsTaxId(registrationNumber);
|
|
20855
|
+
}
|
|
20856
|
+
}, [registrationNumber]);
|
|
20794
20857
|
const handleTaxInformationInput = (value) => {
|
|
20795
20858
|
if (!data.taxInformation) {
|
|
20796
20859
|
const taxInfo = canSaveAbsentState ? {
|
|
20797
20860
|
country,
|
|
20798
20861
|
number: value,
|
|
20799
|
-
type:
|
|
20862
|
+
type: taxIdNumberType,
|
|
20800
20863
|
numberAbsent: false
|
|
20801
20864
|
} : {
|
|
20802
20865
|
country,
|
|
20803
20866
|
number: value,
|
|
20804
|
-
type:
|
|
20867
|
+
type: taxIdNumberType
|
|
20805
20868
|
};
|
|
20806
20869
|
return handleChangeFor("taxInformation", "input")([taxInfo]);
|
|
20807
20870
|
}
|
|
20808
20871
|
const newTaxId = canSaveAbsentState ? {
|
|
20809
20872
|
country,
|
|
20810
20873
|
number: value,
|
|
20811
|
-
type:
|
|
20874
|
+
type: taxIdNumberType,
|
|
20812
20875
|
numberAbsent: false
|
|
20813
20876
|
} : {
|
|
20814
20877
|
country,
|
|
20815
20878
|
number: value,
|
|
20816
|
-
type:
|
|
20879
|
+
type: taxIdNumberType
|
|
20817
20880
|
};
|
|
20818
20881
|
const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
|
|
20819
20882
|
const updatedTaxInformation = taxInformation.map((taxInfo) => {
|
|
@@ -20821,12 +20884,12 @@ function TaxInformationField({
|
|
|
20821
20884
|
return canSaveAbsentState ? {
|
|
20822
20885
|
country,
|
|
20823
20886
|
number: value,
|
|
20824
|
-
type:
|
|
20887
|
+
type: taxIdNumberType,
|
|
20825
20888
|
numberAbsent: false
|
|
20826
20889
|
} : {
|
|
20827
20890
|
country,
|
|
20828
20891
|
number: value,
|
|
20829
|
-
type:
|
|
20892
|
+
type: taxIdNumberType
|
|
20830
20893
|
};
|
|
20831
20894
|
});
|
|
20832
20895
|
return handleChangeFor("taxInformation", "input")(updatedTaxInformation);
|
|
@@ -20837,24 +20900,24 @@ function TaxInformationField({
|
|
|
20837
20900
|
const taxInfo = canSaveAbsentState ? {
|
|
20838
20901
|
country,
|
|
20839
20902
|
number: value,
|
|
20840
|
-
type:
|
|
20903
|
+
type: taxIdNumberType,
|
|
20841
20904
|
numberAbsent: false
|
|
20842
20905
|
} : {
|
|
20843
20906
|
country,
|
|
20844
20907
|
number: value,
|
|
20845
|
-
type:
|
|
20908
|
+
type: taxIdNumberType
|
|
20846
20909
|
};
|
|
20847
20910
|
return handleChangeFor("taxInformation", "blur")([taxInfo]);
|
|
20848
20911
|
}
|
|
20849
20912
|
const newTaxId = canSaveAbsentState ? {
|
|
20850
20913
|
country,
|
|
20851
20914
|
number: value,
|
|
20852
|
-
type:
|
|
20915
|
+
type: taxIdNumberType,
|
|
20853
20916
|
numberAbsent: false
|
|
20854
20917
|
} : {
|
|
20855
20918
|
country,
|
|
20856
20919
|
number: value,
|
|
20857
|
-
type:
|
|
20920
|
+
type: taxIdNumberType
|
|
20858
20921
|
};
|
|
20859
20922
|
const taxInformation = currentCountryTaxInformation ? data.taxInformation : [...data.taxInformation, newTaxId];
|
|
20860
20923
|
const updatedTaxInformation = taxInformation.map((taxInfo) => {
|
|
@@ -20862,12 +20925,12 @@ function TaxInformationField({
|
|
|
20862
20925
|
return canSaveAbsentState ? {
|
|
20863
20926
|
country,
|
|
20864
20927
|
number: value,
|
|
20865
|
-
type:
|
|
20928
|
+
type: taxIdNumberType,
|
|
20866
20929
|
numberAbsent: false
|
|
20867
20930
|
} : {
|
|
20868
20931
|
country,
|
|
20869
20932
|
number: value,
|
|
20870
|
-
type:
|
|
20933
|
+
type: taxIdNumberType
|
|
20871
20934
|
};
|
|
20872
20935
|
});
|
|
20873
20936
|
return handleChangeFor("taxInformation", "blur")(updatedTaxInformation);
|
|
@@ -20915,7 +20978,7 @@ function TaxInformationField({
|
|
|
20915
20978
|
return;
|
|
20916
20979
|
}
|
|
20917
20980
|
}
|
|
20918
|
-
if (
|
|
20981
|
+
if (country === "SG") {
|
|
20919
20982
|
if (taxIdType === "UEN") {
|
|
20920
20983
|
handleChangeFor("isUen")(true);
|
|
20921
20984
|
setUenAsTaxId(registrationNumber);
|
|
@@ -21070,6 +21133,55 @@ function TradingNameField({
|
|
|
21070
21133
|
)
|
|
21071
21134
|
] });
|
|
21072
21135
|
}
|
|
21136
|
+
function VatNumberTypeSelector({
|
|
21137
|
+
country,
|
|
21138
|
+
companyType,
|
|
21139
|
+
selected,
|
|
21140
|
+
setSelected,
|
|
21141
|
+
exemptedOption
|
|
21142
|
+
}) {
|
|
21143
|
+
const { i18n } = useI18nContext();
|
|
21144
|
+
const handleSelect = useCallback(
|
|
21145
|
+
(selectedStr) => {
|
|
21146
|
+
const newSelected = selectedStr;
|
|
21147
|
+
if (newSelected === "exempted") {
|
|
21148
|
+
if (exemptedOption) {
|
|
21149
|
+
setSelected(newSelected);
|
|
21150
|
+
}
|
|
21151
|
+
return;
|
|
21152
|
+
}
|
|
21153
|
+
setSelected(newSelected);
|
|
21154
|
+
},
|
|
21155
|
+
[exemptedOption, setSelected]
|
|
21156
|
+
);
|
|
21157
|
+
const options = useMemo(() => {
|
|
21158
|
+
const availableOptions = getVatNumberOptions(country, companyType) ?? [];
|
|
21159
|
+
if (availableOptions.length === 0 || !exemptedOption) return availableOptions;
|
|
21160
|
+
return [
|
|
21161
|
+
...availableOptions,
|
|
21162
|
+
{
|
|
21163
|
+
id: "exempted",
|
|
21164
|
+
name: exemptedOption
|
|
21165
|
+
}
|
|
21166
|
+
];
|
|
21167
|
+
}, [country, companyType, exemptedOption]);
|
|
21168
|
+
useEffect(() => {
|
|
21169
|
+
if (!selected && options.length > 0) {
|
|
21170
|
+
handleSelect(options[0].id);
|
|
21171
|
+
}
|
|
21172
|
+
}, [options, selected, handleSelect]);
|
|
21173
|
+
if (options.length <= 1) return null;
|
|
21174
|
+
return /* @__PURE__ */ jsx(Field, { name: "vatNumberType", label: i18n.get("whichTypeOfTaxIdNumberDoYouHave"), children: (childProps) => /* @__PURE__ */ jsx(
|
|
21175
|
+
RadioGroup,
|
|
21176
|
+
{
|
|
21177
|
+
...childProps,
|
|
21178
|
+
name: "vatNumberType",
|
|
21179
|
+
items: options,
|
|
21180
|
+
value: selected,
|
|
21181
|
+
onChange: handleSelect
|
|
21182
|
+
}
|
|
21183
|
+
) });
|
|
21184
|
+
}
|
|
21073
21185
|
const VAT_NUMBER_FIELD = [
|
|
21074
21186
|
"vatNumber",
|
|
21075
21187
|
"exemptedFromVat",
|
|
@@ -21098,7 +21210,7 @@ function VatNumberField({
|
|
|
21098
21210
|
ExperimentNames.ShowExtraTaxExemptionReasons
|
|
21099
21211
|
);
|
|
21100
21212
|
const vatAbsenceReasons2 = showExtraTaxExemptionReasons ? ["belowTaxThreshold", "industryExemption", "countryWithoutVatOrGstSystem"] : ["belowTaxThreshold", "industryExemption"];
|
|
21101
|
-
const showVatExemptedOptions = canExempt && ((_a2 =
|
|
21213
|
+
const showVatExemptedOptions = canExempt && ((_a2 = vatNumberOptions[country]) == null ? void 0 : _a2.length) > 1;
|
|
21102
21214
|
const handleVatNumberTypeChange = (vatType) => {
|
|
21103
21215
|
if (vatType === "exempted") {
|
|
21104
21216
|
if (!canExempt) {
|
|
@@ -21115,7 +21227,7 @@ function VatNumberField({
|
|
|
21115
21227
|
};
|
|
21116
21228
|
return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-field__vat-number", children: [
|
|
21117
21229
|
/* @__PURE__ */ jsx(
|
|
21118
|
-
|
|
21230
|
+
VatNumberTypeSelector,
|
|
21119
21231
|
{
|
|
21120
21232
|
country,
|
|
21121
21233
|
setSelected: handleVatNumberTypeChange,
|
|
@@ -21219,7 +21331,7 @@ function CompanyRegistrationDetails(props) {
|
|
|
21219
21331
|
);
|
|
21220
21332
|
const requiredFields = isEmpty(mergedProps.requiredFields) ? companyRegistrationDetailsFields : mergedProps.requiredFields;
|
|
21221
21333
|
const legalCompanyName = companyNameAndCountry == null ? void 0 : companyNameAndCountry.legalCompanyName;
|
|
21222
|
-
const defaultVatNumberType = ((_a2 = mergedProps.data) == null ? void 0 : _a2.vatNumber) ?
|
|
21334
|
+
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
21335
|
const [vatNumberType, setVatNumberType] = useState(
|
|
21224
21336
|
defaultVatNumberType
|
|
21225
21337
|
);
|
|
@@ -21532,12 +21644,12 @@ function CompanyRegistrationDetails(props) {
|
|
|
21532
21644
|
shouldValidate: mergedProps.shouldValidate,
|
|
21533
21645
|
handleChangeFor,
|
|
21534
21646
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
21535
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
21536
21647
|
country,
|
|
21537
21648
|
companyType: mergedProps.companyType,
|
|
21538
21649
|
taxIdNumberType,
|
|
21539
21650
|
setTaxIdNumberType,
|
|
21540
|
-
defaultData: (_j2 = mergedProps.data) == null ? void 0 : _j2.taxInformation
|
|
21651
|
+
defaultData: (_j2 = mergedProps.data) == null ? void 0 : _j2.taxInformation,
|
|
21652
|
+
registrationNumber: data.registrationNumber
|
|
21541
21653
|
}
|
|
21542
21654
|
) }),
|
|
21543
21655
|
formUtils.isRequiredField("dateOfIncorporation") && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
@@ -28286,12 +28398,12 @@ function TrustRegistrationDetails(props) {
|
|
|
28286
28398
|
shouldValidate: mergedProps.shouldValidate,
|
|
28287
28399
|
handleChangeFor,
|
|
28288
28400
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
28289
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
28290
28401
|
country,
|
|
28291
28402
|
companyType: LegalEntityType.TRUST,
|
|
28292
28403
|
taxIdNumberType,
|
|
28293
28404
|
setTaxIdNumberType,
|
|
28294
|
-
defaultData: (_g2 = mergedProps.data) == null ? void 0 : _g2.taxInformation
|
|
28405
|
+
defaultData: (_g2 = mergedProps.data) == null ? void 0 : _g2.taxInformation,
|
|
28406
|
+
registrationNumber: data.registrationNumber
|
|
28295
28407
|
}
|
|
28296
28408
|
),
|
|
28297
28409
|
formUtils.isRequiredField("registrationNumber") && /* @__PURE__ */ jsx(
|
|
@@ -31625,7 +31737,7 @@ function AdditionalInformation({
|
|
|
31625
31737
|
handleAddressSearch,
|
|
31626
31738
|
handleFindAddress
|
|
31627
31739
|
}) {
|
|
31628
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
31740
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
31629
31741
|
const { basicInformation } = useGlobalData();
|
|
31630
31742
|
const { updateStateSlice } = useGlobalDataSlice(ADDITIONAL_INFORMATION_FORM_ID);
|
|
31631
31743
|
const { i18n } = useI18nContext();
|
|
@@ -31672,12 +31784,12 @@ function AdditionalInformation({
|
|
|
31672
31784
|
);
|
|
31673
31785
|
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
31786
|
const [registrationNumberType, setRegistrationNumberType] = useState(defaultRegistrationNumberType);
|
|
31675
|
-
const
|
|
31676
|
-
const defaultTaxIdNumberType =
|
|
31787
|
+
const existingTaxInformation = (_a2 = data == null ? void 0 : data.taxInformation) == null ? void 0 : _a2.find((taxId) => taxId.country === country);
|
|
31788
|
+
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
31789
|
const [taxIdNumberType, setTaxIdNumberType] = useState(
|
|
31678
31790
|
defaultTaxIdNumberType
|
|
31679
31791
|
);
|
|
31680
|
-
const defaultVatNumberType = (data == null ? void 0 : data.vatNumber) ?
|
|
31792
|
+
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
31793
|
const [vatNumberType, setVatNumberType] = useState(
|
|
31682
31794
|
defaultVatNumberType
|
|
31683
31795
|
);
|
|
@@ -31690,9 +31802,6 @@ function AdditionalInformation({
|
|
|
31690
31802
|
} else {
|
|
31691
31803
|
fieldsToRemove.push("vatAbsenceReason");
|
|
31692
31804
|
}
|
|
31693
|
-
if (currentData.isUen) {
|
|
31694
|
-
fieldsToRemove.push("taxInformation", "exemptedFromTax");
|
|
31695
|
-
}
|
|
31696
31805
|
if (currentData.exemptedFromTax && !isExperimentEnabled("EnableRegistrationAndTaxAbsentStatesV4")) {
|
|
31697
31806
|
fieldsToRemove.push("taxInformation");
|
|
31698
31807
|
}
|
|
@@ -31847,7 +31956,7 @@ function AdditionalInformation({
|
|
|
31847
31956
|
valid: formValid,
|
|
31848
31957
|
fieldProblems: formFieldProblems
|
|
31849
31958
|
});
|
|
31850
|
-
}, [formSchema, formData, formErrors, formValid, formFieldProblems]);
|
|
31959
|
+
}, [formSchema, formData, formErrors, formValid, formFieldProblems, updateStateSlice]);
|
|
31851
31960
|
const verifiedAddress = useMemo(() => {
|
|
31852
31961
|
if (!verifiedBusiness) return void 0;
|
|
31853
31962
|
return verifiedBusiness.isPrincipalAddress || verifiedBusiness.state && (basicInformation == null ? void 0 : basicInformation.stateOrProvince) !== verifiedBusiness.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness), country } } : {
|
|
@@ -31872,7 +31981,7 @@ function AdditionalInformation({
|
|
|
31872
31981
|
var _a3;
|
|
31873
31982
|
handleChangeFor("registrationAddress")(state.data);
|
|
31874
31983
|
setValid("registrationAddress", Boolean(state.isValid));
|
|
31875
|
-
if (((_a3 = state == null ? void 0 : state.data) == null ? void 0 : _a3.poBox) && isPreventPoBoxEnabled) {
|
|
31984
|
+
if (((_a3 = state == null ? void 0 : state.data) == null ? void 0 : _a3.poBox) === true && isPreventPoBoxEnabled) {
|
|
31876
31985
|
handleOperationalAddressIsSameChange(false);
|
|
31877
31986
|
}
|
|
31878
31987
|
};
|
|
@@ -31906,7 +32015,7 @@ function AdditionalInformation({
|
|
|
31906
32015
|
});
|
|
31907
32016
|
}
|
|
31908
32017
|
return i18n.get("registeredBusinessAddressDescription");
|
|
31909
|
-
}, [datasetUtils, (
|
|
32018
|
+
}, [datasetUtils, (_f2 = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _f2.country, i18n]);
|
|
31910
32019
|
const requiredFieldsForDBANameField = useMemo(() => {
|
|
31911
32020
|
return requiredFields == null ? void 0 : requiredFields.filter(
|
|
31912
32021
|
(field) => ["doingBusinessAs", "doingBusinessAsAbsent"].includes(field)
|
|
@@ -32000,12 +32109,12 @@ function AdditionalInformation({
|
|
|
32000
32109
|
shouldValidate,
|
|
32001
32110
|
handleChangeFor,
|
|
32002
32111
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
32003
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
32004
32112
|
country,
|
|
32005
32113
|
companyType,
|
|
32006
32114
|
taxIdNumberType,
|
|
32007
32115
|
setTaxIdNumberType,
|
|
32008
|
-
defaultData: data == null ? void 0 : data.taxInformation
|
|
32116
|
+
defaultData: data == null ? void 0 : data.taxInformation,
|
|
32117
|
+
registrationNumber: formData == null ? void 0 : formData.registrationNumber
|
|
32009
32118
|
}
|
|
32010
32119
|
) }),
|
|
32011
32120
|
showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
@@ -32139,7 +32248,7 @@ function AdditionalInformation({
|
|
|
32139
32248
|
...mergedDefaultData == null ? void 0 : mergedDefaultData.registrationAddress,
|
|
32140
32249
|
country
|
|
32141
32250
|
},
|
|
32142
|
-
labels: getAddressSchemaLabelsByCountry(((
|
|
32251
|
+
labels: getAddressSchemaLabelsByCountry(((_g2 = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _g2.country) ?? country),
|
|
32143
32252
|
requiredFields: addressSchema,
|
|
32144
32253
|
shouldValidate,
|
|
32145
32254
|
hideCountry: true,
|
|
@@ -32160,7 +32269,7 @@ function AdditionalInformation({
|
|
|
32160
32269
|
/* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("principalPlaceOfBusiness") }),
|
|
32161
32270
|
/* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("principalPlaceOfBusinessDescription") })
|
|
32162
32271
|
] }),
|
|
32163
|
-
(
|
|
32272
|
+
(((_h2 = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _h2.poBox) !== true || !isPreventPoBoxEnabled) && /* @__PURE__ */ jsx(
|
|
32164
32273
|
Field,
|
|
32165
32274
|
{
|
|
32166
32275
|
name: "operationalAddressIsSame",
|
|
@@ -32191,7 +32300,7 @@ function AdditionalInformation({
|
|
|
32191
32300
|
...mergedDefaultData == null ? void 0 : mergedDefaultData.operationalAddress,
|
|
32192
32301
|
country
|
|
32193
32302
|
},
|
|
32194
|
-
labels: getAddressSchemaLabelsByCountry(((
|
|
32303
|
+
labels: getAddressSchemaLabelsByCountry(((_i2 = data == null ? void 0 : data.operationalAddress) == null ? void 0 : _i2.country) ?? country),
|
|
32195
32304
|
requiredFields: addressSchema,
|
|
32196
32305
|
shouldValidate,
|
|
32197
32306
|
hideCountry: true,
|
|
@@ -32900,7 +33009,6 @@ function BasicInformation({
|
|
|
32900
33009
|
handleChangeFor,
|
|
32901
33010
|
canExempt: formUtils.isRequiredField("exemptedFromTax"),
|
|
32902
33011
|
registrationNumber: formData.registrationNumber,
|
|
32903
|
-
isUen: formUtils.isRequiredField("isUen"),
|
|
32904
33012
|
country: formData.country ?? country,
|
|
32905
33013
|
companyType,
|
|
32906
33014
|
taxIdNumberType,
|
|
@@ -33218,11 +33326,24 @@ const mapDbaName = (legalEntity) => {
|
|
|
33218
33326
|
}
|
|
33219
33327
|
return dbaName;
|
|
33220
33328
|
};
|
|
33329
|
+
const mapIsUen = (taxInformation, registrationNumber, country) => {
|
|
33330
|
+
const currentCountryTaxInfo = taxInformation == null ? void 0 : taxInformation.find((taxInfo) => taxInfo.country === country);
|
|
33331
|
+
if (!currentCountryTaxInfo || country !== "SG") return {};
|
|
33332
|
+
return {
|
|
33333
|
+
registrationNumber: currentCountryTaxInfo.type === "UEN" ? currentCountryTaxInfo.number : registrationNumber,
|
|
33334
|
+
isUen: currentCountryTaxInfo.type === "UEN"
|
|
33335
|
+
};
|
|
33336
|
+
};
|
|
33221
33337
|
const mapAdditionalInformation = (data, legalEntity) => {
|
|
33222
33338
|
if (!data) return;
|
|
33223
33339
|
const entity = legalEntity.type === "organization" ? legalEntity.organization : legalEntity.soleProprietorship;
|
|
33224
|
-
const dbaNameFields = mapDbaName(legalEntity);
|
|
33225
33340
|
const currentCountry = entity == null ? void 0 : entity.registeredAddress.country;
|
|
33341
|
+
const dbaNameFields = mapDbaName(legalEntity);
|
|
33342
|
+
const isUen = mapIsUen(
|
|
33343
|
+
data.taxInformation,
|
|
33344
|
+
data.registrationNumber,
|
|
33345
|
+
currentCountry
|
|
33346
|
+
);
|
|
33226
33347
|
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
33348
|
const result = entriesOf(data).reduce(
|
|
33228
33349
|
(acc, [field]) => {
|
|
@@ -33242,7 +33363,7 @@ const mapAdditionalInformation = (data, legalEntity) => {
|
|
|
33242
33363
|
},
|
|
33243
33364
|
{ operationalAddressIsSame }
|
|
33244
33365
|
);
|
|
33245
|
-
return { ...result, ...dbaNameFields };
|
|
33366
|
+
return { ...result, ...dbaNameFields, ...isUen };
|
|
33246
33367
|
};
|
|
33247
33368
|
const mapLegalEntityToBusinessDetailsSchema = (legalEntity, parentEntity) => {
|
|
33248
33369
|
if (!legalEntity) return {};
|
|
@@ -33368,6 +33489,7 @@ function BusinessDetails(props) {
|
|
|
33368
33489
|
const classNames = cx("adyen-kyc-business-details", {
|
|
33369
33490
|
"adyen-kyc-business-details--hide": (activeForm == null ? void 0 : activeForm.formId) === "summary"
|
|
33370
33491
|
});
|
|
33492
|
+
const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValue.SOLE_PROPRIETORSHIP : companyStructure == null ? void 0 : companyStructure.entityType;
|
|
33371
33493
|
return /* @__PURE__ */ jsxs("div", { className: classNames, children: [
|
|
33372
33494
|
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.basicInformation.formId), children: /* @__PURE__ */ jsx(
|
|
33373
33495
|
BasicInformation,
|
|
@@ -33377,7 +33499,7 @@ function BusinessDetails(props) {
|
|
|
33377
33499
|
heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) || forms.basicInformation.formHeading),
|
|
33378
33500
|
description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
|
|
33379
33501
|
country,
|
|
33380
|
-
companyType
|
|
33502
|
+
companyType,
|
|
33381
33503
|
isTopLevelEntity,
|
|
33382
33504
|
showBusinessSelection,
|
|
33383
33505
|
showCompanyStructure,
|
|
@@ -33420,7 +33542,7 @@ function BusinessDetails(props) {
|
|
|
33420
33542
|
id: forms.additionalInformation.formId,
|
|
33421
33543
|
heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms.additionalInformation.formHeading),
|
|
33422
33544
|
country,
|
|
33423
|
-
companyType
|
|
33545
|
+
companyType,
|
|
33424
33546
|
verifiedBusiness,
|
|
33425
33547
|
showCompanyStructure,
|
|
33426
33548
|
handleAddressSearch,
|
|
@@ -33435,7 +33557,7 @@ function BusinessDetails(props) {
|
|
|
33435
33557
|
heading: forms.companyRegistrationDocument.formHeading,
|
|
33436
33558
|
description: forms.companyRegistrationDocument.formDescription,
|
|
33437
33559
|
country,
|
|
33438
|
-
companyType
|
|
33560
|
+
companyType
|
|
33439
33561
|
}
|
|
33440
33562
|
) }),
|
|
33441
33563
|
/* @__PURE__ */ jsx("div", { className: formWrapperClasses(forms.companyTaxDocument.formId), children: country === "US" ? /* @__PURE__ */ jsx(
|
|
@@ -33446,7 +33568,7 @@ function BusinessDetails(props) {
|
|
|
33446
33568
|
heading: forms.companyTaxDocument.formHeading,
|
|
33447
33569
|
description: forms.companyTaxDocument.formDescription,
|
|
33448
33570
|
country,
|
|
33449
|
-
companyType
|
|
33571
|
+
companyType
|
|
33450
33572
|
}
|
|
33451
33573
|
) : /* @__PURE__ */ jsx(
|
|
33452
33574
|
MemoizedDocumentUpload,
|
|
@@ -33980,7 +34102,7 @@ const formatAdditionalInformation = (data, labels2, country, companyType, i18n)
|
|
|
33980
34102
|
return {
|
|
33981
34103
|
[((_b2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _b2.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
33982
34104
|
[registrationNumberLabel]: data.registrationNumber,
|
|
33983
|
-
[taxIdLabel]: (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => country === taxId.country)) == null ? void 0 : _d2.number,
|
|
34105
|
+
[taxIdLabel]: data.isUen ? void 0 : (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => country === taxId.country)) == null ? void 0 : _d2.number,
|
|
33984
34106
|
[((_e2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _e2.vatNumber) ?? "vatNumber"]: data.vatNumber,
|
|
33985
34107
|
[((_f2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _f2.vatAbsenceReason) ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
|
|
33986
34108
|
[((_g2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _g2.dateOfIncorporation) ?? "dateOfIncorporation"]: data.dateOfIncorporation,
|
|
@@ -34324,8 +34446,13 @@ function BusinessDetailsDropin({
|
|
|
34324
34446
|
onChange == null ? void 0 : onChange(currentState);
|
|
34325
34447
|
}, [currentState, onChange]);
|
|
34326
34448
|
const isSoleProp = accountHolder === "mySoleProprietorName";
|
|
34327
|
-
const isAssociationTaskType = taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
34328
34449
|
const formWith2Views = "basicInformation";
|
|
34450
|
+
const isAssociationTaskType = useMemo(() => {
|
|
34451
|
+
if (!taskType) {
|
|
34452
|
+
return accountHolder !== "theCompanyIWorkFor";
|
|
34453
|
+
}
|
|
34454
|
+
return taskType !== TaskTypes.BUSINESS_DETAILS;
|
|
34455
|
+
}, [accountHolder, taskType]);
|
|
34329
34456
|
const legalEntityType = !isSoleProp ? LegalEntityType.ORGANIZATION : LegalEntityType.SOLE_PROPRIETORSHIP;
|
|
34330
34457
|
const isManualTinVerificationEnabledAndUS = isExperimentEnabled(ExperimentNames.EnableManualCompanyTinVerification) && country === CountryCodes.UnitedStates;
|
|
34331
34458
|
const currentCountry = useMemo(
|
|
@@ -34360,7 +34487,7 @@ function BusinessDetailsDropin({
|
|
|
34360
34487
|
const [tinMatched, setTinMatched] = useState(void 0);
|
|
34361
34488
|
const [initialData, setInitialData] = useState(() => {
|
|
34362
34489
|
return mapLegalEntityToBusinessDetailsSchema(
|
|
34363
|
-
|
|
34490
|
+
!isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
|
|
34364
34491
|
isSoleProp ? legalEntityResponse : void 0
|
|
34365
34492
|
);
|
|
34366
34493
|
});
|
|
@@ -51071,7 +51198,7 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
|
|
|
51071
51198
|
return hasOwnEntityAssocation || !!hasOrganizationType;
|
|
51072
51199
|
};
|
|
51073
51200
|
const Introduction = lazy$1(
|
|
51074
|
-
async () => (await import("./Introduction-
|
|
51201
|
+
async () => (await import("./Introduction-DhHhXrxa.js")).Introduction
|
|
51075
51202
|
);
|
|
51076
51203
|
const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
|
|
51077
51204
|
const logger$d = createLogger("DropinComposer");
|
|
@@ -56068,7 +56195,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
56068
56195
|
if (__privateGet(this, _Component)) {
|
|
56069
56196
|
Devtools = __privateGet(this, _Component);
|
|
56070
56197
|
} else {
|
|
56071
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
56198
|
+
Devtools = lazy(() => import("./HO4MOOFI-wzF0N7iv.js"));
|
|
56072
56199
|
__privateSet(this, _Component, Devtools);
|
|
56073
56200
|
}
|
|
56074
56201
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -56190,7 +56317,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
56190
56317
|
if (__privateGet(this, _Component2)) {
|
|
56191
56318
|
Devtools = __privateGet(this, _Component2);
|
|
56192
56319
|
} else {
|
|
56193
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
56320
|
+
Devtools = lazy(() => import("./HUY7CZI3-BK_rqYHa.js"));
|
|
56194
56321
|
__privateSet(this, _Component2, Devtools);
|
|
56195
56322
|
}
|
|
56196
56323
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|
|
@@ -56411,7 +56538,7 @@ const useAnalytics = ({
|
|
|
56411
56538
|
componentName,
|
|
56412
56539
|
onboardingVersion
|
|
56413
56540
|
}) => {
|
|
56414
|
-
const sdkVersion = "3.57.
|
|
56541
|
+
const sdkVersion = "3.57.2";
|
|
56415
56542
|
const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
|
|
56416
56543
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
56417
56544
|
const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
|
|
@@ -56902,7 +57029,7 @@ const ConfigurationApiProvider = ({
|
|
|
56902
57029
|
[authContext, rootLegalEntityId]
|
|
56903
57030
|
);
|
|
56904
57031
|
return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
|
|
56905
|
-
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.57.
|
|
57032
|
+
/* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "3.57.2" }),
|
|
56906
57033
|
children2
|
|
56907
57034
|
] });
|
|
56908
57035
|
};
|
|
@@ -57477,10 +57604,10 @@ const transformModule = (highlights, codeNode, scope) => {
|
|
|
57477
57604
|
};
|
|
57478
57605
|
const supportedModules = ["plaintext", "json", "yaml", "css"];
|
|
57479
57606
|
const moduleMap = {
|
|
57480
|
-
plaintext: () => import("./plaintext-
|
|
57481
|
-
json: () => import("./json-
|
|
57482
|
-
yaml: () => import("./yaml-
|
|
57483
|
-
css: () => import("./css-
|
|
57607
|
+
plaintext: () => import("./plaintext-BFkPKRSv.js"),
|
|
57608
|
+
json: () => import("./json-BOvlLUxr.js"),
|
|
57609
|
+
yaml: () => import("./yaml-BvMTQEly.js"),
|
|
57610
|
+
css: () => import("./css-Bnf6yr_R.js")
|
|
57484
57611
|
};
|
|
57485
57612
|
const getModule = async (name) => {
|
|
57486
57613
|
if (!supportedModules.includes(name)) {
|
|
@@ -57771,7 +57898,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
57771
57898
|
const [tab, setTab] = useState("metadata");
|
|
57772
57899
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
57773
57900
|
const metadata = {
|
|
57774
|
-
sdkVersion: "3.57.
|
|
57901
|
+
sdkVersion: "3.57.2",
|
|
57775
57902
|
locale: i18n.locale,
|
|
57776
57903
|
rootLegalEntityId: rootLegalEntity.id
|
|
57777
57904
|
};
|