@adyen/kyc-components 3.48.1 → 3.48.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-Fd17DCoR.js → B4MFY5CR-CXDP9hDt.js} +1 -1
- package/dist/es/{HO4MOOFI-lWUM6L_G.js → HO4MOOFI-qsfQDXhN.js} +2 -2
- package/dist/es/{HUY7CZI3-DbgH_0BN.js → HUY7CZI3-BKVtu-p6.js} +2 -2
- package/dist/es/adyen-kyc-components.es.js +1 -1
- package/dist/es/{index-C0Dn2sJJ.js → index-D9q8Kptr.js} +74 -145
- package/dist/types/components/AdditionalInformation/types.d.ts +1 -2
- package/dist/types/components/BasicInformation/types.d.ts +2 -2
- package/dist/types/components/BusinessDetails/forms.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/components/BusinessNameField/BusinessNameField.d.ts +0 -3
- package/dist/types/components/BusinessNameField/fieldConfig.d.ts +0 -3
- package/dist/types/components/BusinessNameField/types.d.ts +0 -5
|
@@ -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 { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-
|
|
4
|
+
import { b as createContext, d as createSignal, o as onMount, e as createEffect, c as createMemo, a as createComponent, P as Portal, S as Show, t as template, i as insert, f as createRenderEffect, h as className, j as clearDelegatedEvents, k as delegateEvents, u as useContext, l as onCleanup, s as sortFns, m as mutationSortFns, n as on, p as setAttribute, q as getSidedProp, r as use, v as createUniqueId, w as batch, x as getQueryStatusLabel, y as getMutationStatusColor, z as getQueryStatusColor, A as getQueryStatusColorByLabel, B as displayValue, F as For, C as convertRemToPixels, D as untrack, $ as $TRACK, E as useTransition, G as spread, H as mergeProps, I as createRoot, J as serialize, K as Index, L as updateNestedDataByPath, M as addEventListener, N as stringify, O as Match, Q as Switch, R as deleteNestedDataByPath, T as splitProps, U as Dynamic, V as createComputed } from "./index-D9q8Kptr.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 { g as getPreferredColorScheme, c as createMemo, a 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-CXDP9hDt.js";
|
|
2
|
+
import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-D9q8Kptr.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 { g as getPreferredColorScheme, c as createMemo, a 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-CXDP9hDt.js";
|
|
2
|
+
import { g as getPreferredColorScheme, c as createMemo, a as createComponent } from "./index-D9q8Kptr.js";
|
|
3
3
|
var DevtoolsPanelComponent = (props) => {
|
|
4
4
|
const [localStore, setLocalStore] = createLocalStorage({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -949,8 +949,8 @@ const defaultLocaleTranslations = {
|
|
|
949
949
|
lastNameOfSettlor: "Last name of settlor",
|
|
950
950
|
learnMore: "Learn more",
|
|
951
951
|
leave: "Leave",
|
|
952
|
-
legalCompanyName: "
|
|
953
|
-
legalCompanyName__helperText: "
|
|
952
|
+
legalCompanyName: "Business legal name",
|
|
953
|
+
legalCompanyName__helperText: "The legal name is used to identify a business with the government; enter it exactly as it appears on your government or legal forms.",
|
|
954
954
|
legalCompanyName__helperText__AU: "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).",
|
|
955
955
|
legalCompanyName__helperText__HK: "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.",
|
|
956
956
|
legalCompanyName__helperText__NL: "Enter the name exactly as it is on your Chamber of Commerce registration.",
|
|
@@ -11391,7 +11391,6 @@ const businessDetailsBase = {
|
|
|
11391
11391
|
stockISIN: { rule: "ifPubliclyTradedCompany" },
|
|
11392
11392
|
stockTickerSymbol: { rule: "ifPubliclyTradedCompany" },
|
|
11393
11393
|
dateOfIncorporation: { rule: "countryRequiresDateOfIncorporationForCompanies" },
|
|
11394
|
-
businessName: { rule: "countryUsingCompanySearch" },
|
|
11395
11394
|
stateOrProvince: { rule: "countryUsingCompanySearch" },
|
|
11396
11395
|
registrationNumber: { rule: "countryRequiresRegistrationNumberForCompanies" },
|
|
11397
11396
|
exemptedFromRegistrationNumber: { rule: "companyRegistrationNumberExemptionAllowed" },
|
|
@@ -15783,13 +15782,12 @@ const payoutBaseMapping = {
|
|
|
15783
15782
|
};
|
|
15784
15783
|
const businessDetailsBaseMapping = {
|
|
15785
15784
|
"basicInformation.country": "organization.registeredAddress.country",
|
|
15786
|
-
"basicInformation.
|
|
15785
|
+
"basicInformation.legalCompanyName": "organization.legalName",
|
|
15787
15786
|
"basicInformation.stateOrProvince": "organization.registeredAddress.stateOrProvince",
|
|
15788
15787
|
"basicInformation.registrationNumber": "organization.registrationNumber",
|
|
15789
15788
|
"basicInformation.taxInformation": "organization.taxInformation",
|
|
15790
15789
|
"basicInformation.countryOfGoverningLaw": "organization.countryOfGoverningLaw",
|
|
15791
15790
|
"companyStructure.entityType": "organization.type",
|
|
15792
|
-
"additionalInformation.legalCompanyName": "organization.legalName",
|
|
15793
15791
|
"additionalInformation.legalFormDescription": "organization.legalFormDescription",
|
|
15794
15792
|
"additionalInformation.doingBusinessAs": "organization.doingBusinessAs",
|
|
15795
15793
|
"additionalInformation.doingBusinessAsAbsent": "organization.doingBusinessAsAbsent",
|
|
@@ -30468,9 +30466,6 @@ const applyVerifiedBusinessData = (verifiedBusiness, handleChangeFor) => {
|
|
|
30468
30466
|
if (!verifiedBusiness) return;
|
|
30469
30467
|
entriesOf(verifiedBusiness).forEach(([key, value]) => {
|
|
30470
30468
|
switch (key) {
|
|
30471
|
-
case "name":
|
|
30472
|
-
if (value) handleChangeFor("legalCompanyName", "input")(value);
|
|
30473
|
-
break;
|
|
30474
30469
|
case "isPrincipalAddress":
|
|
30475
30470
|
if (value)
|
|
30476
30471
|
handleChangeFor(
|
|
@@ -30560,7 +30555,6 @@ function VerifiedBusinessCard({
|
|
|
30560
30555
|
}
|
|
30561
30556
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
30562
30557
|
const ADDITIONAL_INFORMATION_FIELDS = [
|
|
30563
|
-
...LEGAL_COMPANY_NAME_FIELD,
|
|
30564
30558
|
...DBA_NAME_FIELD,
|
|
30565
30559
|
...BUSINESS_REGISTRATION_NUMBER_FIELD,
|
|
30566
30560
|
...TAX_INFORMATION_FIELD,
|
|
@@ -30679,7 +30673,7 @@ function AdditionalInformation({
|
|
|
30679
30673
|
}
|
|
30680
30674
|
return ((_a3 = initialFormUtilsProps.requiredFields) == null ? void 0 : _a3.filter(
|
|
30681
30675
|
(field) => !fieldsToRemove.includes(field)
|
|
30682
|
-
)) ?? [...
|
|
30676
|
+
)) ?? [...DBA_NAME_FIELD];
|
|
30683
30677
|
},
|
|
30684
30678
|
[initialFormUtilsProps.requiredFields]
|
|
30685
30679
|
);
|
|
@@ -30688,16 +30682,6 @@ function AdditionalInformation({
|
|
|
30688
30682
|
var _a3;
|
|
30689
30683
|
return (_a3 = initialFormUtilsProps.allFields) == null ? void 0 : _a3.reduce((acc, field) => {
|
|
30690
30684
|
switch (field) {
|
|
30691
|
-
case "legalCompanyName":
|
|
30692
|
-
return mergeFieldMetadataIntoProps(
|
|
30693
|
-
field,
|
|
30694
|
-
resolveFieldMetadata(
|
|
30695
|
-
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$a[country],
|
|
30696
|
-
{ isBusiness: true },
|
|
30697
|
-
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$b
|
|
30698
|
-
),
|
|
30699
|
-
acc
|
|
30700
|
-
);
|
|
30701
30685
|
case "doingBusinessAsAbsent":
|
|
30702
30686
|
return mergeFieldMetadataIntoProps(
|
|
30703
30687
|
"doingBusinessAsAbsent",
|
|
@@ -30789,7 +30773,6 @@ function AdditionalInformation({
|
|
|
30789
30773
|
if (!verifiedBusiness) return data;
|
|
30790
30774
|
return {
|
|
30791
30775
|
...data,
|
|
30792
|
-
legalCompanyName: verifiedBusiness.name,
|
|
30793
30776
|
registrationAddress: {
|
|
30794
30777
|
address: verifiedBusiness.street,
|
|
30795
30778
|
city: verifiedBusiness.city,
|
|
@@ -30844,22 +30827,19 @@ function AdditionalInformation({
|
|
|
30844
30827
|
};
|
|
30845
30828
|
}, [verifiedBusiness, basicInformation == null ? void 0 : basicInformation.stateOrProvince, country]);
|
|
30846
30829
|
useEffect(
|
|
30847
|
-
() =>
|
|
30830
|
+
() => {
|
|
30831
|
+
applyVerifiedBusinessData(verifiedBusiness, handleChangeFor);
|
|
30832
|
+
if (basicInformation && (verifiedBusiness == null ? void 0 : verifiedBusiness.name)) {
|
|
30833
|
+
basicInformation.legalCompanyName = verifiedBusiness.name;
|
|
30834
|
+
}
|
|
30835
|
+
},
|
|
30848
30836
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30849
30837
|
[verifiedBusiness]
|
|
30850
30838
|
);
|
|
30851
30839
|
useEffect(() => {
|
|
30852
30840
|
if (!verifiedBusiness && !showCompanyStructure) resetToDefaultData();
|
|
30853
30841
|
}, [verifiedBusiness]);
|
|
30854
|
-
const showField = (fieldKeys) => fieldKeys.some((field) =>
|
|
30855
|
-
switch (field) {
|
|
30856
|
-
case "legalCompanyName": {
|
|
30857
|
-
return (formUtils.isRequiredField(field) || formUtils.isOptionalField(field)) && !(verifiedBusiness == null ? void 0 : verifiedBusiness.name);
|
|
30858
|
-
}
|
|
30859
|
-
default:
|
|
30860
|
-
return formUtils.isRequiredField(field) || formUtils.isOptionalField(field);
|
|
30861
|
-
}
|
|
30862
|
-
});
|
|
30842
|
+
const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
|
|
30863
30843
|
const handleRegistrationAddressChange = (state) => {
|
|
30864
30844
|
handleChangeFor("registrationAddress")(state.data);
|
|
30865
30845
|
setValid("registrationAddress", Boolean(state.isValid));
|
|
@@ -30924,24 +30904,6 @@ function AdditionalInformation({
|
|
|
30924
30904
|
/* @__PURE__ */ jsxs("section", { children: [
|
|
30925
30905
|
showVerified && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("otherBusinessInformation") }) }),
|
|
30926
30906
|
/* @__PURE__ */ jsxs("fieldset", { children: [
|
|
30927
|
-
showField(LEGAL_COMPANY_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
30928
|
-
LegalCompanyNameField,
|
|
30929
|
-
{
|
|
30930
|
-
data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
|
|
30931
|
-
valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
|
|
30932
|
-
errors: formUtils.getFieldErrors(
|
|
30933
|
-
formErrors,
|
|
30934
|
-
formFieldProblems,
|
|
30935
|
-
LEGAL_COMPANY_NAME_FIELD
|
|
30936
|
-
),
|
|
30937
|
-
labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
|
|
30938
|
-
helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
|
|
30939
|
-
legalCompanyName: "legalCompanyName__helperText"
|
|
30940
|
-
}),
|
|
30941
|
-
readonly: formUtils.isReadOnly("legalCompanyName"),
|
|
30942
|
-
handleChangeFor
|
|
30943
|
-
}
|
|
30944
|
-
) }),
|
|
30945
30907
|
/* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
30946
30908
|
DBANameField,
|
|
30947
30909
|
{
|
|
@@ -30954,8 +30916,7 @@ function AdditionalInformation({
|
|
|
30954
30916
|
readonly: formUtils.isReadOnly("doingBusinessAs"),
|
|
30955
30917
|
requiredFields: requiredFieldsForDBANameField,
|
|
30956
30918
|
handleChangeFor,
|
|
30957
|
-
setErrors
|
|
30958
|
-
legalCompanyName: formData.legalCompanyName
|
|
30919
|
+
setErrors
|
|
30959
30920
|
}
|
|
30960
30921
|
) }),
|
|
30961
30922
|
showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
@@ -31492,45 +31453,6 @@ function BusinessSelection({
|
|
|
31492
31453
|
}
|
|
31493
31454
|
return null;
|
|
31494
31455
|
}
|
|
31495
|
-
const BUSINESS_NAME_FIELD = ["businessName"];
|
|
31496
|
-
function BusinessNameField({
|
|
31497
|
-
data,
|
|
31498
|
-
valid,
|
|
31499
|
-
errors,
|
|
31500
|
-
labels: labels2,
|
|
31501
|
-
readonly,
|
|
31502
|
-
handleChangeFor
|
|
31503
|
-
}) {
|
|
31504
|
-
return /* @__PURE__ */ jsx(
|
|
31505
|
-
Field,
|
|
31506
|
-
{
|
|
31507
|
-
name: "businessName",
|
|
31508
|
-
label: labels2.businessName,
|
|
31509
|
-
errorMessage: errors.businessName,
|
|
31510
|
-
isValid: valid.businessName,
|
|
31511
|
-
classNameModifiers: ["businessName"],
|
|
31512
|
-
children: (childProps) => /* @__PURE__ */ jsx(
|
|
31513
|
-
InputText,
|
|
31514
|
-
{
|
|
31515
|
-
...childProps,
|
|
31516
|
-
"aria-required": true,
|
|
31517
|
-
"aria-label": labels2.businessName,
|
|
31518
|
-
"aria-invalid": !valid.businessName,
|
|
31519
|
-
name: "businessName",
|
|
31520
|
-
value: data.businessName,
|
|
31521
|
-
readonly,
|
|
31522
|
-
classNameModifiers: ["businessName"],
|
|
31523
|
-
onInput: handleChangeFor("businessName", "input"),
|
|
31524
|
-
onBlur: handleChangeFor("businessName", "blur")
|
|
31525
|
-
}
|
|
31526
|
-
)
|
|
31527
|
-
}
|
|
31528
|
-
);
|
|
31529
|
-
}
|
|
31530
|
-
const businessNameFieldMetadata = {
|
|
31531
|
-
label: "businessName",
|
|
31532
|
-
validators: validateNotEmptyOnBlur
|
|
31533
|
-
};
|
|
31534
31456
|
const CountryFieldValidation = () => ({
|
|
31535
31457
|
country: {
|
|
31536
31458
|
modes: ["blur"],
|
|
@@ -31579,7 +31501,7 @@ const CountryOfGoverningLawFieldValidation = () => ({
|
|
|
31579
31501
|
const BASIC_INFORMATION_FORM_ID = "basicInformation";
|
|
31580
31502
|
const BASIC_INFORMATION_FIELDS = [
|
|
31581
31503
|
...COUNTRY_FIELD,
|
|
31582
|
-
...
|
|
31504
|
+
...LEGAL_COMPANY_NAME_FIELD,
|
|
31583
31505
|
...TAX_INFORMATION_FIELD,
|
|
31584
31506
|
...STATE_FIELD,
|
|
31585
31507
|
...BUSINESS_REGISTRATION_NUMBER_FIELD,
|
|
@@ -31645,7 +31567,10 @@ function BasicInformation({
|
|
|
31645
31567
|
if (currentData.country !== CountryCodes.UnitedKingdom) {
|
|
31646
31568
|
fieldsToRemove.push("countryOfGoverningLaw");
|
|
31647
31569
|
}
|
|
31648
|
-
return (requiredFields == null ? void 0 : requiredFields.filter((field) => !fieldsToRemove.includes(field))) ?? [
|
|
31570
|
+
return (requiredFields == null ? void 0 : requiredFields.filter((field) => !fieldsToRemove.includes(field))) ?? [
|
|
31571
|
+
...COUNTRY_FIELD,
|
|
31572
|
+
...LEGAL_COMPANY_NAME_FIELD
|
|
31573
|
+
];
|
|
31649
31574
|
},
|
|
31650
31575
|
[isCountryOfGoverningLawEnabled, requiredFields]
|
|
31651
31576
|
);
|
|
@@ -31698,8 +31623,16 @@ function BasicInformation({
|
|
|
31698
31623
|
...acc,
|
|
31699
31624
|
validators: { ...acc.validators, ...CountryFieldValidation() }
|
|
31700
31625
|
};
|
|
31701
|
-
case "
|
|
31702
|
-
return mergeFieldMetadataIntoProps(
|
|
31626
|
+
case "legalCompanyName":
|
|
31627
|
+
return mergeFieldMetadataIntoProps(
|
|
31628
|
+
field,
|
|
31629
|
+
resolveFieldMetadata(
|
|
31630
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$a[country],
|
|
31631
|
+
{ isBusiness: true },
|
|
31632
|
+
isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$b
|
|
31633
|
+
),
|
|
31634
|
+
acc
|
|
31635
|
+
);
|
|
31703
31636
|
case "countryOfGoverningLaw":
|
|
31704
31637
|
return {
|
|
31705
31638
|
...acc,
|
|
@@ -31877,22 +31810,25 @@ function BasicInformation({
|
|
|
31877
31810
|
handleChangeFor
|
|
31878
31811
|
}
|
|
31879
31812
|
),
|
|
31813
|
+
showField(LEGAL_COMPANY_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
31814
|
+
LegalCompanyNameField,
|
|
31815
|
+
{
|
|
31816
|
+
data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
|
|
31817
|
+
valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
|
|
31818
|
+
errors: formUtils.getFieldErrors(
|
|
31819
|
+
formErrors,
|
|
31820
|
+
formFieldProblems,
|
|
31821
|
+
LEGAL_COMPANY_NAME_FIELD
|
|
31822
|
+
),
|
|
31823
|
+
labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
|
|
31824
|
+
helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
|
|
31825
|
+
legalCompanyName: "legalCompanyName__helperText"
|
|
31826
|
+
}),
|
|
31827
|
+
readonly: formUtils.isReadOnly("legalCompanyName"),
|
|
31828
|
+
handleChangeFor
|
|
31829
|
+
}
|
|
31830
|
+
) }),
|
|
31880
31831
|
COUNTRIES_USING_COMPANY_SEARCH.includes(formData.country ?? country) && /* @__PURE__ */ jsxs("fieldset", { children: [
|
|
31881
|
-
showField(BUSINESS_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
31882
|
-
BusinessNameField,
|
|
31883
|
-
{
|
|
31884
|
-
data: formUtils.getFieldData(formData, BUSINESS_NAME_FIELD),
|
|
31885
|
-
valid: formUtils.getFieldValid(formValid, BUSINESS_NAME_FIELD),
|
|
31886
|
-
errors: formUtils.getFieldErrors(
|
|
31887
|
-
formErrors,
|
|
31888
|
-
formFieldProblems,
|
|
31889
|
-
BUSINESS_NAME_FIELD
|
|
31890
|
-
),
|
|
31891
|
-
labels: formUtils.getFieldLabels(BUSINESS_NAME_FIELD),
|
|
31892
|
-
readonly: formUtils.isReadOnly("businessName"),
|
|
31893
|
-
handleChangeFor
|
|
31894
|
-
}
|
|
31895
|
-
) }),
|
|
31896
31832
|
showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
|
|
31897
31833
|
TaxInformationField,
|
|
31898
31834
|
{
|
|
@@ -32113,12 +32049,7 @@ function CompanyStructure({
|
|
|
32113
32049
|
)
|
|
32114
32050
|
] });
|
|
32115
32051
|
}
|
|
32116
|
-
const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [
|
|
32117
|
-
...BUSINESS_NAME_FIELD,
|
|
32118
|
-
...STATE_FIELD,
|
|
32119
|
-
...TAX_INFORMATION_FIELD,
|
|
32120
|
-
...BUSINESS_REGISTRATION_NUMBER_FIELD
|
|
32121
|
-
];
|
|
32052
|
+
const FIELDS_NEEDED_FOR_COMPANY_SEARCH = [...STATE_FIELD, ...TAX_INFORMATION_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
|
|
32122
32053
|
const getBasicInformationFields = (country) => {
|
|
32123
32054
|
let fields = [...BASIC_INFORMATION_FIELDS];
|
|
32124
32055
|
if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country)) {
|
|
@@ -33432,7 +33363,7 @@ const mapBusinessDetailsDocumentToApiDocument = async (data, entityId) => {
|
|
|
33432
33363
|
return documents.filter(Boolean);
|
|
33433
33364
|
};
|
|
33434
33365
|
const mapBusinessDetailsSchemaToLegalEntity = (data, isExperimentEnabled) => {
|
|
33435
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m, _n, _o, _p, _q;
|
|
33366
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m, _n, _o, _p, _q, _r;
|
|
33436
33367
|
const requestObj = {
|
|
33437
33368
|
...formatObject(data, businessDetailsApiKeyMapping)
|
|
33438
33369
|
};
|
|
@@ -33454,9 +33385,6 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, isExperimentEnabled) => {
|
|
|
33454
33385
|
if ((_m = data.additionalInformation) == null ? void 0 : _m.vatAbsenceReason) {
|
|
33455
33386
|
requestObj.organization.vatNumber = "";
|
|
33456
33387
|
}
|
|
33457
|
-
if (doingBusinessAs) {
|
|
33458
|
-
requestObj.organization.doingBusinessAs = doingBusinessAs;
|
|
33459
|
-
}
|
|
33460
33388
|
if (isExperimentEnabled("EnableDoingBusinessAsNameV4")) {
|
|
33461
33389
|
if (((_n = data.additionalInformation) == null ? void 0 : _n.doingBusinessAsAbsent) === "no") {
|
|
33462
33390
|
requestObj.organization.doingBusinessAsAbsent = true;
|
|
@@ -33465,9 +33393,10 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, isExperimentEnabled) => {
|
|
|
33465
33393
|
requestObj.organization.doingBusinessAsAbsent = false;
|
|
33466
33394
|
}
|
|
33467
33395
|
} else {
|
|
33396
|
+
requestObj.organization.doingBusinessAs = doingBusinessAs || ((_p = data.basicInformation) == null ? void 0 : _p.legalCompanyName);
|
|
33468
33397
|
delete requestObj.organization.doingBusinessAsAbsent;
|
|
33469
33398
|
}
|
|
33470
|
-
if (((
|
|
33399
|
+
if (((_q = data.additionalInformation) == null ? void 0 : _q.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME && requestObj.organization.principalPlaceOfBusiness) {
|
|
33471
33400
|
requestObj.organization.principalPlaceOfBusiness = requestObj.organization.registeredAddress;
|
|
33472
33401
|
}
|
|
33473
33402
|
if (!isEmpty(data.companyFinancialInformation)) {
|
|
@@ -33477,7 +33406,7 @@ const mapBusinessDetailsSchemaToLegalEntity = (data, isExperimentEnabled) => {
|
|
|
33477
33406
|
}
|
|
33478
33407
|
}
|
|
33479
33408
|
requestObj.type = LegalEntityType.ORGANIZATION;
|
|
33480
|
-
if (((
|
|
33409
|
+
if (((_r = requestObj.organization) == null ? void 0 : _r.registeredAddress.country) === "US") {
|
|
33481
33410
|
delete requestObj.organization.registrationNumber;
|
|
33482
33411
|
}
|
|
33483
33412
|
return requestObj;
|
|
@@ -33516,7 +33445,7 @@ const formatFinancialInformationSummary = (data, i18n) => {
|
|
|
33516
33445
|
}
|
|
33517
33446
|
return summary2;
|
|
33518
33447
|
};
|
|
33519
|
-
const MANDATORY_API_FIELDS = ["
|
|
33448
|
+
const MANDATORY_API_FIELDS = ["basicInformation.legalCompanyName", "basicInformation.country"];
|
|
33520
33449
|
const parseConfiguration$6 = ({ country, matchingScenario }) => parseBusinessDetailsScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.ORGANIZATION], country);
|
|
33521
33450
|
const canSubmit$3 = (data) => MANDATORY_API_FIELDS.every((detail) => {
|
|
33522
33451
|
const value = getProp(data, detail);
|
|
@@ -33525,7 +33454,7 @@ const canSubmit$3 = (data) => MANDATORY_API_FIELDS.every((detail) => {
|
|
|
33525
33454
|
const isDocumentsRequired$2 = (forms) => forms.some((form) => documentFormsIds.includes(form.formId));
|
|
33526
33455
|
const removeConditionalForms = (forms, isSkippingCompanyStructure) => isSkippingCompanyStructure ? forms.filter((f) => f.formId !== "companyStructure" && f.formId !== "companyType") : forms;
|
|
33527
33456
|
const formatBasicInformation = (data, labels2, datasetUtils, companyType, isCountryOfGoverningLawEnabled) => {
|
|
33528
|
-
var _a2, _b2, _c2;
|
|
33457
|
+
var _a2, _b2, _c2, _d2;
|
|
33529
33458
|
const country = data == null ? void 0 : data.country;
|
|
33530
33459
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
33531
33460
|
defaultFieldConfig$9[country],
|
|
@@ -33546,18 +33475,19 @@ const formatBasicInformation = (data, labels2, datasetUtils, companyType, isCoun
|
|
|
33546
33475
|
).label;
|
|
33547
33476
|
const countryOfGoverningLaw = getCountryOfGoverningLaw(isCountryOfGoverningLawEnabled, data);
|
|
33548
33477
|
return {
|
|
33478
|
+
[((_b2 = labels2 == null ? void 0 : labels2.basicInformation) == null ? void 0 : _b2.legalCompanyName) ?? "legalCompanyName"]: data.legalCompanyName,
|
|
33549
33479
|
country: datasetUtils.getCountryName(data.country),
|
|
33550
33480
|
[getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(
|
|
33551
33481
|
data.stateOrProvince,
|
|
33552
33482
|
data.country
|
|
33553
33483
|
),
|
|
33554
|
-
[taxIdLabel]: (
|
|
33484
|
+
[taxIdLabel]: (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => data.country === taxId.country)) == null ? void 0 : _d2.number,
|
|
33555
33485
|
[registrationNumberLabel]: data.registrationNumber,
|
|
33556
33486
|
countryOfGoverningLaw: datasetUtils.getCountryName(countryOfGoverningLaw)
|
|
33557
33487
|
};
|
|
33558
33488
|
};
|
|
33559
33489
|
const formatAdditionalInformation = (data, labels2, country, companyType, i18n) => {
|
|
33560
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2
|
|
33490
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
33561
33491
|
const registrationNumberLabel = resolveFieldMetadata(
|
|
33562
33492
|
defaultFieldConfig$9[country],
|
|
33563
33493
|
{
|
|
@@ -33576,17 +33506,16 @@ const formatAdditionalInformation = (data, labels2, country, companyType, i18n)
|
|
|
33576
33506
|
defaultFieldMetadata$7
|
|
33577
33507
|
).label;
|
|
33578
33508
|
return {
|
|
33579
|
-
[((_b2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _b2.
|
|
33580
|
-
[((_c2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _c2.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
33509
|
+
[((_b2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _b2.doingBusinessAs) ?? "doingBusinessAs"]: data.doingBusinessAs,
|
|
33581
33510
|
[registrationNumberLabel]: data.registrationNumber,
|
|
33582
|
-
[taxIdLabel]: (
|
|
33583
|
-
[((
|
|
33584
|
-
[((
|
|
33585
|
-
[((
|
|
33586
|
-
[((
|
|
33587
|
-
[((
|
|
33588
|
-
[((
|
|
33589
|
-
[((
|
|
33511
|
+
[taxIdLabel]: (_d2 = (_c2 = data.taxInformation) == null ? void 0 : _c2.find((taxId) => country === taxId.country)) == null ? void 0 : _d2.number,
|
|
33512
|
+
[((_e2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _e2.vatNumber) ?? "vatNumber"]: data.vatNumber,
|
|
33513
|
+
[((_f2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _f2.vatAbsenceReason) ?? "vatAbsenceReason"]: data.vatAbsenceReason ? i18n.get(data.vatAbsenceReason) : void 0,
|
|
33514
|
+
[((_g2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _g2.dateOfIncorporation) ?? "dateOfIncorporation"]: data.dateOfIncorporation,
|
|
33515
|
+
[((_h2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _h2.stockExchangeMIC) ?? "stockExchangeMIC"]: data.stockExchangeMIC,
|
|
33516
|
+
[((_i2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _i2.stockISIN) ?? "stockISIN"]: data.stockISIN,
|
|
33517
|
+
[((_j2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _j2.stockTickerSymbol) ?? "stockTickerSymbol"]: data.stockTickerSymbol,
|
|
33518
|
+
[((_k2 = labels2 == null ? void 0 : labels2.additionalInformation) == null ? void 0 : _k2.eInvoicingCode) ?? "eInvoicingCode"]: data.eInvoicingCode
|
|
33590
33519
|
};
|
|
33591
33520
|
};
|
|
33592
33521
|
const formatDataForSummary$1 = (data, forms, labels2, i18n, isExperimentEnabled) => {
|
|
@@ -33735,7 +33664,7 @@ async function submit({
|
|
|
33735
33664
|
actionType: "submit",
|
|
33736
33665
|
companyStructure: ((_a2 = data.companyStructure) == null ? void 0 : _a2.entityType) ?? null,
|
|
33737
33666
|
countryOfRegistration: ((_b2 = data.basicInformation) == null ? void 0 : _b2.country) ?? null,
|
|
33738
|
-
legalEntityName: ((_c2 = data.
|
|
33667
|
+
legalEntityName: ((_c2 = data.basicInformation) == null ? void 0 : _c2.legalCompanyName) ?? null,
|
|
33739
33668
|
usedAdditionalAddress: ((_d2 = data.additionalInformation) == null ? void 0 : _d2.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
|
|
33740
33669
|
};
|
|
33741
33670
|
const savedLegalEntityData = legalEntityResponse ? mapLegalEntityToBusinessDetailsSchema(legalEntityResponse, isExperimentEnabled) : null;
|
|
@@ -34093,14 +34022,14 @@ function BusinessDetailsDropin({
|
|
|
34093
34022
|
const findBusiness = useCallback(
|
|
34094
34023
|
async (currentData) => {
|
|
34095
34024
|
var _a3, _b3;
|
|
34096
|
-
if (!(currentData == null ? void 0 : currentData.
|
|
34025
|
+
if (!(currentData == null ? void 0 : currentData.legalCompanyName) || !(currentData == null ? void 0 : currentData.country) || !(currentData == null ? void 0 : currentData.stateOrProvince)) {
|
|
34097
34026
|
return;
|
|
34098
34027
|
}
|
|
34099
34028
|
const tin = (_b3 = (_a3 = currentData == null ? void 0 : currentData.taxInformation) == null ? void 0 : _a3.find(
|
|
34100
34029
|
(taxId) => currentCountry === taxId.country
|
|
34101
34030
|
)) == null ? void 0 : _b3.number;
|
|
34102
34031
|
const results = await searchForBusiness({
|
|
34103
|
-
name: currentData.
|
|
34032
|
+
name: currentData.legalCompanyName,
|
|
34104
34033
|
country: currentData.country,
|
|
34105
34034
|
state: currentData.stateOrProvince,
|
|
34106
34035
|
registrationNumber: currentData.registrationNumber
|
|
@@ -34250,12 +34179,12 @@ function BusinessDetailsDropin({
|
|
|
34250
34179
|
}
|
|
34251
34180
|
}, [searchResults, searching]);
|
|
34252
34181
|
useEffect(() => {
|
|
34253
|
-
var _a3;
|
|
34254
|
-
if (((_a3 = currentState.data.basicInformation) == null ? void 0 : _a3.
|
|
34182
|
+
var _a3, _b3;
|
|
34183
|
+
if (((_a3 = currentState.data.basicInformation) == null ? void 0 : _a3.legalCompanyName) !== currentSearchName && ((_b3 = currentState.data.basicInformation) == null ? void 0 : _b3.legalCompanyName) !== (verifiedBusiness == null ? void 0 : verifiedBusiness.name)) {
|
|
34255
34184
|
setShowCompanyStructure(false);
|
|
34256
34185
|
resetBusinessData();
|
|
34257
34186
|
}
|
|
34258
|
-
}, [currentSearchName, (_f2 = currentState.data.basicInformation) == null ? void 0 : _f2.
|
|
34187
|
+
}, [currentSearchName, (_f2 = currentState.data.basicInformation) == null ? void 0 : _f2.legalCompanyName, verifiedBusiness]);
|
|
34259
34188
|
useEffect(() => {
|
|
34260
34189
|
var _a3;
|
|
34261
34190
|
if ((trustedFields == null ? void 0 : trustedFields.length) && ((_a3 = legalEntityResponse.organization) == null ? void 0 : _a3.registeredAddress.country) !== currentCountry) {
|
|
@@ -49732,7 +49661,7 @@ const ConfigurationApiProvider = ({
|
|
|
49732
49661
|
}) => {
|
|
49733
49662
|
const authContext = useAuthContext();
|
|
49734
49663
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
49735
|
-
const sdkVersion = "3.48.
|
|
49664
|
+
const sdkVersion = "3.48.2";
|
|
49736
49665
|
const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
|
|
49737
49666
|
useAnalytics({
|
|
49738
49667
|
onUserEvent,
|
|
@@ -50617,7 +50546,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
50617
50546
|
const [tab, setTab] = useState("metadata");
|
|
50618
50547
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
50619
50548
|
const metadata = {
|
|
50620
|
-
sdkVersion: "3.48.
|
|
50549
|
+
sdkVersion: "3.48.2",
|
|
50621
50550
|
locale: i18n.locale,
|
|
50622
50551
|
rootLegalEntityId: rootLegalEntity.id
|
|
50623
50552
|
};
|
|
@@ -53608,7 +53537,7 @@ var TanstackQueryDevtools = (_k = class {
|
|
|
53608
53537
|
if (__privateGet(this, _Component)) {
|
|
53609
53538
|
Devtools = __privateGet(this, _Component);
|
|
53610
53539
|
} else {
|
|
53611
|
-
Devtools = lazy(() => import("./HO4MOOFI-
|
|
53540
|
+
Devtools = lazy(() => import("./HO4MOOFI-qsfQDXhN.js"));
|
|
53612
53541
|
__privateSet(this, _Component, Devtools);
|
|
53613
53542
|
}
|
|
53614
53543
|
setupStyleSheet(__privateGet(this, _styleNonce), __privateGet(this, _shadowDOMTarget));
|
|
@@ -53730,7 +53659,7 @@ var TanstackQueryDevtoolsPanel = (_l = class {
|
|
|
53730
53659
|
if (__privateGet(this, _Component2)) {
|
|
53731
53660
|
Devtools = __privateGet(this, _Component2);
|
|
53732
53661
|
} else {
|
|
53733
|
-
Devtools = lazy(() => import("./HUY7CZI3-
|
|
53662
|
+
Devtools = lazy(() => import("./HUY7CZI3-BKVtu-p6.js"));
|
|
53734
53663
|
__privateSet(this, _Component2, Devtools);
|
|
53735
53664
|
}
|
|
53736
53665
|
setupStyleSheet(__privateGet(this, _styleNonce2), __privateGet(this, _shadowDOMTarget2));
|
|
@@ -7,14 +7,13 @@ import type { BusinessRegistrationNumberFieldSchema } from '../BusinessRegistrat
|
|
|
7
7
|
import type { DateOfIncorporationFieldSchema } from '../DateOfIncorporationField/types';
|
|
8
8
|
import type { DBANameFieldSchema } from '../DBANameField/types';
|
|
9
9
|
import type { EInvoicingCodeFieldSchema } from '../EInvoicingCodeField/types';
|
|
10
|
-
import type { LegalCompanyNameFieldSchema } from '../LegalCompanyNameField/types';
|
|
11
10
|
import type { StockExchangeMICFieldSchema } from '../StockExchangeMICField/types';
|
|
12
11
|
import type { StockISINFieldSchema } from '../StockISINField/types';
|
|
13
12
|
import type { StockTickerSymbolFieldSchema } from '../StockTickerSymbol/types';
|
|
14
13
|
import type { TaxInformationFieldSchema } from '../TaxInformationField/types';
|
|
15
14
|
import type { VatNumberFieldSchema } from '../VatNumberField/types';
|
|
16
15
|
import type { RegistrationAddressSchema } from '../RegistrationAddress/types';
|
|
17
|
-
export interface AdditionalInformationSchema extends
|
|
16
|
+
export interface AdditionalInformationSchema extends DBANameFieldSchema, VatNumberFieldSchema, TaxInformationFieldSchema, BusinessRegistrationNumberFieldSchema, DateOfIncorporationFieldSchema, StockISINFieldSchema, StockExchangeMICFieldSchema, StockTickerSymbolFieldSchema, RegistrationAddressSchema, EInvoicingCodeFieldSchema {
|
|
18
17
|
legalFormDescription?: string;
|
|
19
18
|
}
|
|
20
19
|
export interface AdditionalInformationProps extends BaseInnerFormProps<AdditionalInformationSchema> {
|
|
@@ -5,13 +5,13 @@ import type { CompanyDatasetResponse, CompanySearchResult } from '../../core/mod
|
|
|
5
5
|
import type { CompanyTypesValue } from '../../core/models/api/company-types-value';
|
|
6
6
|
import type { CountryCode } from '../../core/models/country-code';
|
|
7
7
|
import type { BaseTrackingPayload } from '../../core/analytics';
|
|
8
|
-
import type { BusinessNameFieldSchema } from '../BusinessNameField/types';
|
|
9
8
|
import type { BusinessRegistrationNumberFieldSchema } from '../BusinessRegistrationNumberField/types';
|
|
10
9
|
import type { CountryFieldSchema } from '../CountryField/types';
|
|
11
10
|
import type { StateFieldSchema } from '../StateField/types';
|
|
12
11
|
import type { TaxInformationFieldSchema } from '../TaxInformationField/types';
|
|
13
12
|
import type { CountryOfGoverningLawFieldSchema } from '../CountryOfGoverningLawField/types';
|
|
14
|
-
|
|
13
|
+
import type { LegalCompanyNameFieldSchema } from '../LegalCompanyNameField/types';
|
|
14
|
+
export type BasicInformationSchema = CountryFieldSchema & LegalCompanyNameFieldSchema & StateFieldSchema & BusinessRegistrationNumberFieldSchema & TaxInformationFieldSchema & CountryOfGoverningLawFieldSchema;
|
|
15
15
|
export interface BasicInformationProps extends BaseInnerFormProps<BasicInformationSchema> {
|
|
16
16
|
country: CountryCode;
|
|
17
17
|
companyType: CompanyTypesValue | undefined;
|
|
@@ -8,7 +8,7 @@ export declare const getForms: (country: CountryCode) => {
|
|
|
8
8
|
readonly formName: "basicInformationFormName";
|
|
9
9
|
readonly formHeading: "basicInformationFormHeading";
|
|
10
10
|
readonly formDescription: "basicInformationFormDescription";
|
|
11
|
-
readonly fields: ("
|
|
11
|
+
readonly fields: ("country" | "countryOfGoverningLaw" | "legalCompanyName" | "stateOrProvince" | keyof import("../BusinessRegistrationNumberField/types").BusinessRegistrationNumberFieldSchema | keyof import("../TaxInformationField/types").TaxInformationFieldSchema)[];
|
|
12
12
|
};
|
|
13
13
|
readonly companyStructure: {
|
|
14
14
|
readonly formId: "companyStructure";
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { BusinessNameFieldProps, BusinessNameFieldSchema } from './types';
|
|
2
|
-
export declare const BUSINESS_NAME_FIELD: Array<keyof BusinessNameFieldSchema>;
|
|
3
|
-
export declare function BusinessNameField({ data, valid, errors, labels, readonly, handleChangeFor, }: BusinessNameFieldProps): import("preact").JSX.Element;
|