@adyen/kyc-components 3.20.1 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/adyen-kyc-components.es.js +1050 -615
- package/dist/style.css +841 -1300
- package/dist/types/components/Company/trustedFields.d.ts +7 -0
- package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/CompanyDropin/types.d.ts +2 -0
- package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureParentCompany.d.ts +1 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureUltimateParentCompany.d.ts +1 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureBusinessInformation.d.ts +2 -1
- package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureOwnershipStructure.d.ts +4 -0
- package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +80 -7
- package/dist/types/components/Dropins/HighExposureDropin/validate.d.ts +4 -1
- package/dist/types/components/Dropins/RoleAndTypeDropin/components/RoleAndTypeDropinComponent.d.ts +1 -1
- package/dist/types/components/Dropins/RoleAndTypeDropin/types.d.ts +2 -0
- package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +1 -1
- package/dist/types/components/Individual/types.d.ts +1 -1
- package/dist/types/components/TrustRoleAndEntityType/types.d.ts +1 -0
- package/dist/types/components/internal/LegalCompanyNameField/fieldConfig.d.ts +9 -0
- package/dist/types/components/internal/LegalFormField/LegalFormField.d.ts +1 -1
- package/dist/types/components/internal/LegalFormField/types.d.ts +4 -1
- package/dist/types/components/internal/NaceCodeField/NaceCodeField.d.ts +1 -1
- package/dist/types/components/internal/NaceCodeField/types.d.ts +5 -1
- package/dist/types/components/internal/Spinner/Spinner.d.ts +3 -4
- package/dist/types/components/internal/Tag/Tag.d.ts +6 -5
- package/dist/types/components/internal/Toast/types.d.ts +1 -1
- package/dist/types/components/internal/Typography/Typography.d.ts +3 -0
- package/dist/types/components/internal/Typography/types.d.ts +12 -0
- package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
- package/dist/types/core/hooks/useForm/types.d.ts +1 -0
- package/dist/types/core/models/api/legal-entity.d.ts +6 -0
- package/dist/types/core/models/api/trusted-fields-provider.d.ts +4 -0
- package/dist/types/utils/get-props.d.ts +0 -9
- package/dist/types/utils/roleMetadata.d.ts +3 -2
- package/package.json +1 -1
- package/dist/types/components/internal/Heading/Heading.d.ts +0 -10
- package/dist/types/components/internal/LegalCompanyNameField/validate.d.ts +0 -3
- package/dist/types/components/internal/Spinner/index.d.ts +0 -1
- package/dist/types/components/internal/StateField/validate.d.ts +0 -3
- package/dist/types/components/internal/Tag/index.d.ts +0 -1
|
@@ -257,6 +257,7 @@ const validationPleaseEnterAValidStockISIN = "Please enter a valid ISIN. For exa
|
|
|
257
257
|
const shareholderDocument = "Shareholder document";
|
|
258
258
|
const role = "Role";
|
|
259
259
|
const selectAllTheRolesThatThisDecisionMakerHolds = "Select all the roles that this decision-maker holds.";
|
|
260
|
+
const selectedSomeRolesBasedOnMyinfo = "We selected some roles based on Myinfo business data about your company's appointment holders and shareholders.";
|
|
260
261
|
const selectTheApplicableRoles = "Select the applicable role(s)";
|
|
261
262
|
const back = "Back";
|
|
262
263
|
const next = "Next";
|
|
@@ -455,7 +456,6 @@ const issuedInTheLastXMonths = "Issued in the last %{number} months";
|
|
|
455
456
|
const bankAccountVerification = "Bank account verification";
|
|
456
457
|
const bankStatementDocument = "Bank statement";
|
|
457
458
|
const requirements = "Requirements:";
|
|
458
|
-
const ifDocumentMoreThan12months = "If your document is older than 12 months, then it should contain a statement with the company’s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.";
|
|
459
459
|
const whyDoINeedToFillInThisInformation = "Why do I need to fill in this information?";
|
|
460
460
|
const reasonForFillingCompanyRegistrationDetails = "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we’ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.";
|
|
461
461
|
const reasonForFillingCompanyAddressDetails = "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we’ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.";
|
|
@@ -469,7 +469,6 @@ const controllingPersonGuideDescription = "A <strong>controlling person</strong>
|
|
|
469
469
|
const signatoryGuideDescription = "A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.";
|
|
470
470
|
const directorGuideDescription = "A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.";
|
|
471
471
|
const someoneAppointedToManageACompanysBusinessAndAffairs = "Someone appointed to manage a company's business and affairs.";
|
|
472
|
-
const whatIfDocumentIsMoreThan12MonthsOld = "What if my document is more than 12 months old?";
|
|
473
472
|
const depositSlip = "Deposit slip";
|
|
474
473
|
const screenshotOfOnlineBankingEnviroment = "Screenshot of online banking environment";
|
|
475
474
|
const officialEmailOrALetterFromYourBank = "Official email or a letter from your bank";
|
|
@@ -931,7 +930,8 @@ const legalCompanyName__US = "Legal name";
|
|
|
931
930
|
const legalCompanyName__helperText = "Enter the name exactly as it is on your company's official registration documents.";
|
|
932
931
|
const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
|
|
933
932
|
const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
|
|
934
|
-
const legalCompanyName__helperText__US = "
|
|
933
|
+
const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
|
|
934
|
+
const legalCompanyName__helperText__US__business = "The legal name is used to identify a business with the government. This information came from a trusted data source and can not be edited.";
|
|
935
935
|
const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
|
|
936
936
|
const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
|
|
937
937
|
const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
|
|
@@ -1372,7 +1372,6 @@ const startANewSessionFromTheSamePlaceYouOriginallyAccessed = "Start a new sessi
|
|
|
1372
1372
|
const differentCountryOfGoverningLaw = "This company has a different country/region of governing law";
|
|
1373
1373
|
const countryOfGoverningLaw = "Country/region of governing law";
|
|
1374
1374
|
const nationalInsuranceNumber = "National Insurance Number (NINO)";
|
|
1375
|
-
const detailsForCapital = "Details for capital";
|
|
1376
1375
|
const parentCompany = "Parent company";
|
|
1377
1376
|
const ultimateParentCompany = "Ultimate parent company";
|
|
1378
1377
|
const numberOfEmployees = "Number of employees";
|
|
@@ -1383,6 +1382,28 @@ const businessStructure = "Business structure";
|
|
|
1383
1382
|
const selectOne = "Select one";
|
|
1384
1383
|
const industryAndNaceCode = "Industry and NACE code";
|
|
1385
1384
|
const youMustXYearsOldToContinue = "You must be at least %{minimumAge} years old to continue";
|
|
1385
|
+
const doesTheCompanyEarnMoreThanHalf = "Does the company earn more than 50% of its income from selling goods or non-financial services?";
|
|
1386
|
+
const doesYourCompanyHaveLEI = "Does your company have a Legal Entity Identifier (LEI)?";
|
|
1387
|
+
const anLEIIsAUniqueCode = "An LEI is a unique code that identifies legal entities, including companies, who engage in financial transactions.";
|
|
1388
|
+
const lookUpYourLEI = "Look up your LEI.";
|
|
1389
|
+
const legalEntityIdentifier = "Legal Entity Identifier (LEI)";
|
|
1390
|
+
const yourBusinessDetails = "Your business details";
|
|
1391
|
+
const progress = "Progress";
|
|
1392
|
+
const ownershipStructure = "Ownership structure";
|
|
1393
|
+
const isCompanyOwnedByAnotherCompany = "Is %{company} owned by another company?";
|
|
1394
|
+
const isParentOwnedByAnotherCompany = "Is your parent company owned by another company?";
|
|
1395
|
+
const thisMeansYouHaveAParentCompany = "If yes, this means you have a parent company, such as a global headquarters or a holding company.";
|
|
1396
|
+
const thisMeansYouHaveAnUltimateParentCompany = "If yes, this means you have an ultimate parent company. An ultimate parent company is the company that’s highest in the corporate structure. Learn more.";
|
|
1397
|
+
const additionalInformationIsRequiredForLoan = "Additional information is required to complete your capital loan application.";
|
|
1398
|
+
const beforeYourCapitalLoanApplicationCanBeSubmitted = "Before your capital loan application can be submitted, we need to collect a bit more information about you. All information collected here is required.";
|
|
1399
|
+
const legalName = "Legal name";
|
|
1400
|
+
const businessInformation = "Business information";
|
|
1401
|
+
const parentCompanyInformation = "Parent company information";
|
|
1402
|
+
const inTheLastStepOwnedByAParentCompany = "In the last step, you indicated that your business is owned by a parent company. We need to know some information about this company before submitting your application.";
|
|
1403
|
+
const ultimateParentCompanyInformation = "Ultimate parent company information";
|
|
1404
|
+
const inThePreviousStepOwnedByAnUltimateParentCompany = "In a previous step, you indicated that your business’ parent company was owned by an ultimate parent company. We need to know some information about this company before submitting your application.";
|
|
1405
|
+
const doesThisCompanyHaveLEI = "Does this company have a Legal Entity Identifier (LEI)?";
|
|
1406
|
+
const iDontKnow = "I don't know";
|
|
1386
1407
|
const defaultTrans = {
|
|
1387
1408
|
smartling,
|
|
1388
1409
|
close,
|
|
@@ -1602,6 +1623,7 @@ const defaultTrans = {
|
|
|
1602
1623
|
shareholderDocument,
|
|
1603
1624
|
role,
|
|
1604
1625
|
selectAllTheRolesThatThisDecisionMakerHolds,
|
|
1626
|
+
selectedSomeRolesBasedOnMyinfo,
|
|
1605
1627
|
selectTheApplicableRoles,
|
|
1606
1628
|
back,
|
|
1607
1629
|
next,
|
|
@@ -1800,7 +1822,6 @@ const defaultTrans = {
|
|
|
1800
1822
|
bankAccountVerification,
|
|
1801
1823
|
bankStatementDocument,
|
|
1802
1824
|
requirements,
|
|
1803
|
-
ifDocumentMoreThan12months,
|
|
1804
1825
|
whyDoINeedToFillInThisInformation,
|
|
1805
1826
|
reasonForFillingCompanyRegistrationDetails,
|
|
1806
1827
|
reasonForFillingCompanyAddressDetails,
|
|
@@ -1814,7 +1835,6 @@ const defaultTrans = {
|
|
|
1814
1835
|
signatoryGuideDescription,
|
|
1815
1836
|
directorGuideDescription,
|
|
1816
1837
|
someoneAppointedToManageACompanysBusinessAndAffairs,
|
|
1817
|
-
whatIfDocumentIsMoreThan12MonthsOld,
|
|
1818
1838
|
depositSlip,
|
|
1819
1839
|
screenshotOfOnlineBankingEnviroment,
|
|
1820
1840
|
officialEmailOrALetterFromYourBank,
|
|
@@ -2285,6 +2305,7 @@ const defaultTrans = {
|
|
|
2285
2305
|
legalCompanyName__helperText__AU,
|
|
2286
2306
|
legalCompanyName__helperText__NL,
|
|
2287
2307
|
legalCompanyName__helperText__US,
|
|
2308
|
+
legalCompanyName__helperText__US__business,
|
|
2288
2309
|
legalCompanyName__helperText__PR,
|
|
2289
2310
|
legalCompanyName__helperText__SG,
|
|
2290
2311
|
legalCompanyName__helperText__HK,
|
|
@@ -2727,7 +2748,6 @@ const defaultTrans = {
|
|
|
2727
2748
|
differentCountryOfGoverningLaw,
|
|
2728
2749
|
countryOfGoverningLaw,
|
|
2729
2750
|
nationalInsuranceNumber,
|
|
2730
|
-
detailsForCapital,
|
|
2731
2751
|
parentCompany,
|
|
2732
2752
|
ultimateParentCompany,
|
|
2733
2753
|
numberOfEmployees,
|
|
@@ -2737,7 +2757,29 @@ const defaultTrans = {
|
|
|
2737
2757
|
businessStructure,
|
|
2738
2758
|
selectOne,
|
|
2739
2759
|
industryAndNaceCode,
|
|
2740
|
-
youMustXYearsOldToContinue
|
|
2760
|
+
youMustXYearsOldToContinue,
|
|
2761
|
+
doesTheCompanyEarnMoreThanHalf,
|
|
2762
|
+
doesYourCompanyHaveLEI,
|
|
2763
|
+
anLEIIsAUniqueCode,
|
|
2764
|
+
lookUpYourLEI,
|
|
2765
|
+
legalEntityIdentifier,
|
|
2766
|
+
yourBusinessDetails,
|
|
2767
|
+
progress,
|
|
2768
|
+
ownershipStructure,
|
|
2769
|
+
isCompanyOwnedByAnotherCompany,
|
|
2770
|
+
isParentOwnedByAnotherCompany,
|
|
2771
|
+
thisMeansYouHaveAParentCompany,
|
|
2772
|
+
thisMeansYouHaveAnUltimateParentCompany,
|
|
2773
|
+
additionalInformationIsRequiredForLoan,
|
|
2774
|
+
beforeYourCapitalLoanApplicationCanBeSubmitted,
|
|
2775
|
+
legalName,
|
|
2776
|
+
businessInformation,
|
|
2777
|
+
parentCompanyInformation,
|
|
2778
|
+
inTheLastStepOwnedByAParentCompany,
|
|
2779
|
+
ultimateParentCompanyInformation,
|
|
2780
|
+
inThePreviousStepOwnedByAnUltimateParentCompany,
|
|
2781
|
+
doesThisCompanyHaveLEI,
|
|
2782
|
+
iDontKnow
|
|
2741
2783
|
};
|
|
2742
2784
|
const FALLBACK_LOCALE = "en-US";
|
|
2743
2785
|
const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
|
|
@@ -2946,6 +2988,7 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
|
|
|
2946
2988
|
SettingNames2["HideOnboardingIntroductionSoleProprietor"] = "hideOnboardingIntroductionSoleProprietor";
|
|
2947
2989
|
SettingNames2["TransferInstrumentLimit"] = "transferInstrumentLimit";
|
|
2948
2990
|
SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
|
|
2991
|
+
SettingNames2["InstantBankVerification"] = "instantBankVerification";
|
|
2949
2992
|
return SettingNames2;
|
|
2950
2993
|
})(SettingNames || {});
|
|
2951
2994
|
const SettingsContext = createContext(void 0);
|
|
@@ -3613,19 +3656,6 @@ function getFormProps(props, innerFormId) {
|
|
|
3613
3656
|
shouldValidate: (activeFormId ? activeFormId === innerFormId : true) && props.shouldValidate
|
|
3614
3657
|
};
|
|
3615
3658
|
}
|
|
3616
|
-
function removeFormLayer(obj, formId) {
|
|
3617
|
-
if (!obj) {
|
|
3618
|
-
return obj;
|
|
3619
|
-
}
|
|
3620
|
-
const formIdWithDelimiter = `${formId}.`;
|
|
3621
|
-
return Object.entries(obj).reduce((acc, [key, value]) => {
|
|
3622
|
-
const newKey = key.startsWith(formIdWithDelimiter) ? key.substring(formIdWithDelimiter.length, key.length) : key;
|
|
3623
|
-
return {
|
|
3624
|
-
...acc,
|
|
3625
|
-
[newKey]: value
|
|
3626
|
-
};
|
|
3627
|
-
}, {});
|
|
3628
|
-
}
|
|
3629
3659
|
function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
3630
3660
|
const newProps = getFormProps(props, innerFormId);
|
|
3631
3661
|
if (newProps === null) {
|
|
@@ -3638,6 +3668,16 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
|
3638
3668
|
helperText,
|
|
3639
3669
|
masks
|
|
3640
3670
|
} = newProps;
|
|
3671
|
+
const {
|
|
3672
|
+
readOnlyFields,
|
|
3673
|
+
requiredFields,
|
|
3674
|
+
optionalFields,
|
|
3675
|
+
obscuredFields,
|
|
3676
|
+
verifyFields,
|
|
3677
|
+
problems,
|
|
3678
|
+
validators: validators2,
|
|
3679
|
+
shouldValidate
|
|
3680
|
+
} = props;
|
|
3641
3681
|
return {
|
|
3642
3682
|
placeholders,
|
|
3643
3683
|
labels: labels2,
|
|
@@ -3645,15 +3685,15 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
|
3645
3685
|
helperText,
|
|
3646
3686
|
masks,
|
|
3647
3687
|
// maintain the structure of the special fields
|
|
3648
|
-
readOnlyFields
|
|
3649
|
-
requiredFields
|
|
3650
|
-
optionalFields
|
|
3651
|
-
obscuredFields
|
|
3652
|
-
verifyFields
|
|
3688
|
+
readOnlyFields,
|
|
3689
|
+
requiredFields,
|
|
3690
|
+
optionalFields,
|
|
3691
|
+
obscuredFields,
|
|
3692
|
+
verifyFields,
|
|
3653
3693
|
// the rest we just pass along for now, as they will be eventually be processed by getFormProps
|
|
3654
|
-
problems
|
|
3655
|
-
validators:
|
|
3656
|
-
shouldValidate
|
|
3694
|
+
problems,
|
|
3695
|
+
validators: validators2,
|
|
3696
|
+
shouldValidate
|
|
3657
3697
|
};
|
|
3658
3698
|
}
|
|
3659
3699
|
function getFieldProps(props, innerFormFields) {
|
|
@@ -4332,6 +4372,15 @@ function useForm({
|
|
|
4332
4372
|
fieldProblems: state2.fieldProblems
|
|
4333
4373
|
};
|
|
4334
4374
|
}
|
|
4375
|
+
const resolveFieldMetadata = (countryEntry, params, defaultMetadata) => {
|
|
4376
|
+
if (typeof countryEntry === "object") {
|
|
4377
|
+
return countryEntry;
|
|
4378
|
+
}
|
|
4379
|
+
if (typeof countryEntry === "function") {
|
|
4380
|
+
return countryEntry(params);
|
|
4381
|
+
}
|
|
4382
|
+
return defaultMetadata;
|
|
4383
|
+
};
|
|
4335
4384
|
function useDataset(datasetIdentifier2, skip) {
|
|
4336
4385
|
const {
|
|
4337
4386
|
i18n
|
|
@@ -4584,12 +4633,10 @@ const Loader = ({
|
|
|
4584
4633
|
});
|
|
4585
4634
|
const Tag = ({
|
|
4586
4635
|
className,
|
|
4587
|
-
|
|
4636
|
+
variant = "blue",
|
|
4588
4637
|
children
|
|
4589
4638
|
}) => {
|
|
4590
|
-
const classNames = cx("adyen-kyc-tag", className, {
|
|
4591
|
-
"adyen-kyc-tag--basic": isBasic
|
|
4592
|
-
});
|
|
4639
|
+
const classNames = cx("adyen-kyc-tag", className, `adyen-kyc-tag--${variant}`);
|
|
4593
4640
|
return jsx("span", {
|
|
4594
4641
|
className: classNames,
|
|
4595
4642
|
children
|
|
@@ -4744,13 +4791,29 @@ const SelectButtonContentMulti = ({
|
|
|
4744
4791
|
className: "adyen-kyc-dropdown-selected-items",
|
|
4745
4792
|
children: active.map((item) => jsx(Tag, {
|
|
4746
4793
|
className: item.className,
|
|
4747
|
-
|
|
4794
|
+
variant: "grey",
|
|
4748
4795
|
children: (item == null ? void 0 : item.selectedOptionName) || (item == null ? void 0 : item.name) || placeholder
|
|
4749
4796
|
}, item.id))
|
|
4750
4797
|
}) : jsx("span", {
|
|
4751
4798
|
className: "adyen-kyc-dropdown-button__text adyen-kyc-dropdown-button__text--placeholder",
|
|
4752
4799
|
children: placeholder
|
|
4753
4800
|
});
|
|
4801
|
+
const Typography = ({
|
|
4802
|
+
el = "p",
|
|
4803
|
+
variant = "body",
|
|
4804
|
+
color = "primary",
|
|
4805
|
+
className,
|
|
4806
|
+
children,
|
|
4807
|
+
...props
|
|
4808
|
+
}) => {
|
|
4809
|
+
const TypographyElement = el;
|
|
4810
|
+
const classNames = cx(className, "adyen-kyc-typography", `adyen-kyc-typography--${color}`, `adyen-kyc-typography--${variant}`);
|
|
4811
|
+
return jsx(TypographyElement, {
|
|
4812
|
+
...props,
|
|
4813
|
+
className: classNames,
|
|
4814
|
+
children
|
|
4815
|
+
});
|
|
4816
|
+
};
|
|
4754
4817
|
function Checkbox({
|
|
4755
4818
|
classNameModifiers = [],
|
|
4756
4819
|
label,
|
|
@@ -4827,10 +4890,14 @@ const SelectListItem = ({
|
|
|
4827
4890
|
className: "adyen-kyc-dropdown-element__icon",
|
|
4828
4891
|
children: item.icon
|
|
4829
4892
|
}), item.description ? jsxs(Fragment, {
|
|
4830
|
-
children: [jsx(
|
|
4831
|
-
|
|
4893
|
+
children: [jsx(Typography, {
|
|
4894
|
+
el: "span",
|
|
4895
|
+
variant: "body-strongest",
|
|
4896
|
+
className: "adyen-kyc-dropdown-element__label",
|
|
4832
4897
|
children: item.name
|
|
4833
|
-
}), jsx(
|
|
4898
|
+
}), jsx(Typography, {
|
|
4899
|
+
el: "span",
|
|
4900
|
+
color: "secondary",
|
|
4834
4901
|
className: "adyen-kyc-dropdown-element-description__text",
|
|
4835
4902
|
children: item.description
|
|
4836
4903
|
})]
|
|
@@ -5387,189 +5454,6 @@ function LegalCompanyNameField({
|
|
|
5387
5454
|
})
|
|
5388
5455
|
});
|
|
5389
5456
|
}
|
|
5390
|
-
const Disclaimer = ({
|
|
5391
|
-
title,
|
|
5392
|
-
children
|
|
5393
|
-
}) => jsxs("div", {
|
|
5394
|
-
className: "adyen-kyc-disclaimer-container",
|
|
5395
|
-
children: [jsx("div", {
|
|
5396
|
-
className: "adyen-kyc-disclaimer__title",
|
|
5397
|
-
children: title
|
|
5398
|
-
}), jsx("div", {
|
|
5399
|
-
className: "adyen-kyc-disclaimer__content",
|
|
5400
|
-
children
|
|
5401
|
-
})]
|
|
5402
|
-
});
|
|
5403
|
-
const PatriotActDisclosure = () => {
|
|
5404
|
-
const {
|
|
5405
|
-
i18n
|
|
5406
|
-
} = useI18nContext();
|
|
5407
|
-
return jsxs(Disclaimer, {
|
|
5408
|
-
title: i18n.get("patriotActDisclosureTitle"),
|
|
5409
|
-
children: [jsx("p", {
|
|
5410
|
-
children: i18n.get("patriotActDisclosureTextParagraph1")
|
|
5411
|
-
}), jsx("p", {
|
|
5412
|
-
children: i18n.get("patriotActDisclosureTextParagraph2")
|
|
5413
|
-
})]
|
|
5414
|
-
});
|
|
5415
|
-
};
|
|
5416
|
-
const companyCountryValidationRules = {
|
|
5417
|
-
country: {
|
|
5418
|
-
modes: ["blur"],
|
|
5419
|
-
validate: (companyCountry) => !isEmpty(companyCountry),
|
|
5420
|
-
errorMessage: "fieldIsRequired"
|
|
5421
|
-
},
|
|
5422
|
-
legalCompanyName: {
|
|
5423
|
-
modes: ["blur"],
|
|
5424
|
-
validate: (legalCompanyName2) => !isEmpty(legalCompanyName2),
|
|
5425
|
-
errorMessage: "fieldIsRequired"
|
|
5426
|
-
},
|
|
5427
|
-
countryOfGoverningLaw: {
|
|
5428
|
-
modes: ["blur"],
|
|
5429
|
-
validate: (countryOfGoverningLaw2) => !isEmpty(countryOfGoverningLaw2),
|
|
5430
|
-
errorMessage: "fieldIsRequired"
|
|
5431
|
-
}
|
|
5432
|
-
};
|
|
5433
|
-
const countryWithGoverningLawFields = [...LEGAL_COMPANY_NAME_FIELD, ...COUNTRY_FIELD, ...COUNTRY_OF_GOVERNING_LAW_FIELD];
|
|
5434
|
-
const companyNameAndCountryFields = [...LEGAL_COMPANY_NAME_FIELD, ...COUNTRY_FIELD];
|
|
5435
|
-
function CompanyNameAndCountry(props) {
|
|
5436
|
-
const {
|
|
5437
|
-
i18n
|
|
5438
|
-
} = useI18nContext();
|
|
5439
|
-
const {
|
|
5440
|
-
isSettingEnabled
|
|
5441
|
-
} = useSettingsContext();
|
|
5442
|
-
const {
|
|
5443
|
-
id: id2,
|
|
5444
|
-
isTopLevelEntity
|
|
5445
|
-
} = props;
|
|
5446
|
-
const allowedCountries = useAllowedCountries();
|
|
5447
|
-
const {
|
|
5448
|
-
isExperimentEnabled
|
|
5449
|
-
} = useExperimentsContext();
|
|
5450
|
-
const {
|
|
5451
|
-
sliceData,
|
|
5452
|
-
updateStateSlice
|
|
5453
|
-
} = useGlobalDataSlice(id2);
|
|
5454
|
-
const schemaWithGoverningLaw = (sliceData == null ? void 0 : sliceData.country) === "GB" && (sliceData == null ? void 0 : sliceData.differentCountryOfGoverningLaw) ? countryWithGoverningLawFields : companyNameAndCountryFields;
|
|
5455
|
-
const {
|
|
5456
|
-
data: formData,
|
|
5457
|
-
valid: formValid,
|
|
5458
|
-
errors: formErrors,
|
|
5459
|
-
fieldProblems: formFieldProblems,
|
|
5460
|
-
handleChangeFor
|
|
5461
|
-
} = useForm({
|
|
5462
|
-
...props,
|
|
5463
|
-
schema: schemaWithGoverningLaw,
|
|
5464
|
-
defaultData: props == null ? void 0 : props.data,
|
|
5465
|
-
rules: (props == null ? void 0 : props.validators) || companyCountryValidationRules,
|
|
5466
|
-
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
5467
|
-
});
|
|
5468
|
-
const formUtils = formUtilities(props, i18n);
|
|
5469
|
-
const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
|
|
5470
|
-
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
5471
|
-
const isCountryOfGoverningLawAllowed = formData.country === "GB";
|
|
5472
|
-
const showCountryOfGoverningLaw = isCountryOfGoverningLawEnabled && isCountryOfGoverningLawAllowed;
|
|
5473
|
-
useEffect(() => {
|
|
5474
|
-
updateStateSlice == null ? void 0 : updateStateSlice({
|
|
5475
|
-
data: {
|
|
5476
|
-
...sliceData,
|
|
5477
|
-
...formData
|
|
5478
|
-
},
|
|
5479
|
-
errors: formErrors,
|
|
5480
|
-
valid: formValid,
|
|
5481
|
-
fieldProblems: formFieldProblems
|
|
5482
|
-
});
|
|
5483
|
-
}, [formData, formErrors, formFieldProblems, formValid, updateStateSlice]);
|
|
5484
|
-
const handleChangeForCountries = (key) => (e) => {
|
|
5485
|
-
handleChangeFor(key)(e);
|
|
5486
|
-
if (!formData.differentCountryOfGoverningLaw && e.target.value === "GB") {
|
|
5487
|
-
const countryOfGoverningLawEvent = {
|
|
5488
|
-
target: {
|
|
5489
|
-
name: "countryOfGoverningLaw",
|
|
5490
|
-
value: e.target.value
|
|
5491
|
-
}
|
|
5492
|
-
};
|
|
5493
|
-
handleChangeFor("countryOfGoverningLaw")(countryOfGoverningLawEvent);
|
|
5494
|
-
}
|
|
5495
|
-
};
|
|
5496
|
-
return jsxs("form", {
|
|
5497
|
-
children: [jsx(FormHeader, {
|
|
5498
|
-
heading: props == null ? void 0 : props.heading
|
|
5499
|
-
}), jsx(ErrorPanel, {
|
|
5500
|
-
verificationErrors: props == null ? void 0 : props.formVerificationErrors,
|
|
5501
|
-
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
5502
|
-
formUtils,
|
|
5503
|
-
id: "ariaErrorField"
|
|
5504
|
-
}), formData.country === "US" ? jsx(PatriotActDisclosure, {}) : void 0, formUtils.isRequiredField("legalCompanyName") && jsx(LegalCompanyNameField, {
|
|
5505
|
-
data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
|
|
5506
|
-
valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
|
|
5507
|
-
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
|
|
5508
|
-
labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
|
|
5509
|
-
helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
|
|
5510
|
-
legalCompanyName: "legalCompanyName__helperText"
|
|
5511
|
-
}),
|
|
5512
|
-
readonly: formUtils.isReadOnly("legalCompanyName"),
|
|
5513
|
-
handleChangeFor
|
|
5514
|
-
}), formUtils.isRequiredField("country") && jsx(CountryField, {
|
|
5515
|
-
data: formUtils.getFieldData(formData, COUNTRY_FIELD),
|
|
5516
|
-
valid: formUtils.getFieldValid(formValid, COUNTRY_FIELD),
|
|
5517
|
-
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_FIELD),
|
|
5518
|
-
labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
|
|
5519
|
-
country: "countryRegionOfEstablishment"
|
|
5520
|
-
}),
|
|
5521
|
-
readonly: !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
|
|
5522
|
-
classNameModifiers: ["country"],
|
|
5523
|
-
allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
|
|
5524
|
-
handleChangeFor: handleChangeForCountries
|
|
5525
|
-
}), showCountryOfGoverningLaw && jsx(CountryOfGoverningLawField, {
|
|
5526
|
-
data: formUtils.getFieldData(formData, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5527
|
-
valid: formUtils.getFieldValid(formValid, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5528
|
-
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5529
|
-
labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5530
|
-
readonly: false,
|
|
5531
|
-
classNameModifiers: ["country"],
|
|
5532
|
-
allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
|
|
5533
|
-
handleChangeFor
|
|
5534
|
-
})]
|
|
5535
|
-
});
|
|
5536
|
-
}
|
|
5537
|
-
const CompanyNameAndCountryComponent = memo(CompanyNameAndCountry, (prevProps, nextProps) => {
|
|
5538
|
-
var _a, _b;
|
|
5539
|
-
return objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && ((_a = prevProps.data) == null ? void 0 : _a.country) === ((_b = nextProps.data) == null ? void 0 : _b.country) && prevProps.shouldValidate === nextProps.shouldValidate;
|
|
5540
|
-
});
|
|
5541
|
-
function StateContextSetter({
|
|
5542
|
-
stateRef
|
|
5543
|
-
}) {
|
|
5544
|
-
if (stateRef.current.setState) {
|
|
5545
|
-
return null;
|
|
5546
|
-
}
|
|
5547
|
-
return jsx(StateContext.Consumer, {
|
|
5548
|
-
children: (stateContextValue) => {
|
|
5549
|
-
if (!stateContextValue) {
|
|
5550
|
-
throw new Error("<StateContextSetter> needs to be mounted inside a <StateProvider>");
|
|
5551
|
-
}
|
|
5552
|
-
const {
|
|
5553
|
-
dispatch,
|
|
5554
|
-
setActiveForms
|
|
5555
|
-
} = stateContextValue;
|
|
5556
|
-
stateRef.current.setState = dispatch;
|
|
5557
|
-
stateRef.current.setActiveForms = setActiveForms;
|
|
5558
|
-
return null;
|
|
5559
|
-
}
|
|
5560
|
-
});
|
|
5561
|
-
}
|
|
5562
|
-
var CompanyTypesValue = /* @__PURE__ */ ((CompanyTypesValue2) => {
|
|
5563
|
-
CompanyTypesValue2["PRIVATE_COMPANY"] = "privateCompany";
|
|
5564
|
-
CompanyTypesValue2["PUBLIC_COMPANY"] = "listedPublicCompany";
|
|
5565
|
-
CompanyTypesValue2["UNLISTED_PUBLIC_COMPANY"] = "unlistedPublicCompany";
|
|
5566
|
-
CompanyTypesValue2["INCORPORATED_PARTNERSHIP"] = "partnershipIncorporated";
|
|
5567
|
-
CompanyTypesValue2["INCORPORATED_ASSOCIATION"] = "associationIncorporated";
|
|
5568
|
-
CompanyTypesValue2["GOVERNMENTAL_ORGANIZATION"] = "governmentalOrganization";
|
|
5569
|
-
CompanyTypesValue2["NON_PROFIT_OR_CHARITABLE"] = "nonProfit";
|
|
5570
|
-
CompanyTypesValue2["SOLE_PROPRIETORSHIP"] = "soleProprietorship";
|
|
5571
|
-
return CompanyTypesValue2;
|
|
5572
|
-
})(CompanyTypesValue || {});
|
|
5573
5457
|
var CountryCodes = /* @__PURE__ */ ((CountryCodes2) => {
|
|
5574
5458
|
CountryCodes2["Afghanistan"] = "AF";
|
|
5575
5459
|
CountryCodes2["AlandIslands"] = "AX";
|
|
@@ -5819,15 +5703,232 @@ var CountryCodes = /* @__PURE__ */ ((CountryCodes2) => {
|
|
|
5819
5703
|
CountryCodes2["Zimbabwe"] = "ZW";
|
|
5820
5704
|
return CountryCodes2;
|
|
5821
5705
|
})(CountryCodes || {});
|
|
5822
|
-
const
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5706
|
+
const validateNotEmptyOnBlur = {
|
|
5707
|
+
modes: ["blur"],
|
|
5708
|
+
validate: (val) => !isEmpty(val),
|
|
5709
|
+
errorMessage: "fieldIsRequired"
|
|
5710
|
+
};
|
|
5711
|
+
const validatePatternOnBlur = (pattern) => ({
|
|
5712
|
+
modes: ["blur"],
|
|
5713
|
+
validate: (val) => !!val && pattern.test(val)
|
|
5714
|
+
});
|
|
5715
|
+
const defaultFieldMetadata$a = {
|
|
5716
|
+
label: "legalCompanyName",
|
|
5717
|
+
helperText: "legalCompanyName__helperText",
|
|
5718
|
+
validators: validateNotEmptyOnBlur
|
|
5719
|
+
};
|
|
5720
|
+
const defaultFieldConfig$a = {
|
|
5721
|
+
[CountryCodes.Australia]: {
|
|
5722
|
+
label: "legalCompanyName",
|
|
5723
|
+
helperText: "legalCompanyName__helperText__AU",
|
|
5724
|
+
validators: validateNotEmptyOnBlur
|
|
5725
|
+
},
|
|
5726
|
+
[CountryCodes.HongKong]: {
|
|
5727
|
+
label: "legalCompanyName",
|
|
5728
|
+
helperText: "legalCompanyName__helperText__HK",
|
|
5729
|
+
validators: validateNotEmptyOnBlur
|
|
5730
|
+
},
|
|
5731
|
+
[CountryCodes.Netherlands]: {
|
|
5732
|
+
label: "legalCompanyName",
|
|
5733
|
+
helperText: "legalCompanyName__helperText__NL",
|
|
5734
|
+
validators: validateNotEmptyOnBlur
|
|
5735
|
+
},
|
|
5736
|
+
[CountryCodes.Singapore]: {
|
|
5737
|
+
label: "legalCompanyName",
|
|
5738
|
+
helperText: "legalCompanyName__helperText__SG",
|
|
5739
|
+
validators: validateNotEmptyOnBlur
|
|
5740
|
+
},
|
|
5741
|
+
[CountryCodes.UnitedStates]: ({
|
|
5742
|
+
isBusiness
|
|
5743
|
+
}) => ({
|
|
5744
|
+
label: "legalCompanyName__US",
|
|
5745
|
+
helperText: isBusiness ? "legalCompanyName__helperText__US__business" : "legalCompanyName__helperText__US",
|
|
5746
|
+
validators: validateNotEmptyOnBlur
|
|
5747
|
+
})
|
|
5748
|
+
};
|
|
5749
|
+
const Disclaimer = ({
|
|
5750
|
+
title,
|
|
5751
|
+
children
|
|
5752
|
+
}) => jsxs("div", {
|
|
5753
|
+
className: "adyen-kyc-disclaimer-container",
|
|
5754
|
+
children: [jsx("div", {
|
|
5755
|
+
className: "adyen-kyc-disclaimer__title",
|
|
5756
|
+
children: title
|
|
5757
|
+
}), jsx("div", {
|
|
5758
|
+
className: "adyen-kyc-disclaimer__content",
|
|
5759
|
+
children
|
|
5760
|
+
})]
|
|
5761
|
+
});
|
|
5762
|
+
const PatriotActDisclosure = () => {
|
|
5763
|
+
const {
|
|
5764
|
+
i18n
|
|
5765
|
+
} = useI18nContext();
|
|
5766
|
+
return jsxs(Disclaimer, {
|
|
5767
|
+
title: i18n.get("patriotActDisclosureTitle"),
|
|
5768
|
+
children: [jsx("p", {
|
|
5769
|
+
children: i18n.get("patriotActDisclosureTextParagraph1")
|
|
5770
|
+
}), jsx("p", {
|
|
5771
|
+
children: i18n.get("patriotActDisclosureTextParagraph2")
|
|
5772
|
+
})]
|
|
5773
|
+
});
|
|
5774
|
+
};
|
|
5775
|
+
const companyCountryValidationRules = {
|
|
5776
|
+
country: {
|
|
5777
|
+
modes: ["blur"],
|
|
5778
|
+
validate: (companyCountry) => !isEmpty(companyCountry),
|
|
5779
|
+
errorMessage: "fieldIsRequired"
|
|
5780
|
+
},
|
|
5781
|
+
legalCompanyName: {
|
|
5782
|
+
modes: ["blur"],
|
|
5783
|
+
validate: (legalCompanyName2) => !isEmpty(legalCompanyName2),
|
|
5784
|
+
errorMessage: "fieldIsRequired"
|
|
5785
|
+
},
|
|
5786
|
+
countryOfGoverningLaw: {
|
|
5787
|
+
modes: ["blur"],
|
|
5788
|
+
validate: (countryOfGoverningLaw2) => !isEmpty(countryOfGoverningLaw2),
|
|
5789
|
+
errorMessage: "fieldIsRequired"
|
|
5828
5790
|
}
|
|
5829
|
-
return defaultMetadata;
|
|
5830
5791
|
};
|
|
5792
|
+
const countryWithGoverningLawFields = [...LEGAL_COMPANY_NAME_FIELD, ...COUNTRY_FIELD, ...COUNTRY_OF_GOVERNING_LAW_FIELD];
|
|
5793
|
+
const companyNameAndCountryFields = [...LEGAL_COMPANY_NAME_FIELD, ...COUNTRY_FIELD];
|
|
5794
|
+
function CompanyNameAndCountry(props) {
|
|
5795
|
+
const {
|
|
5796
|
+
i18n
|
|
5797
|
+
} = useI18nContext();
|
|
5798
|
+
const {
|
|
5799
|
+
isSettingEnabled
|
|
5800
|
+
} = useSettingsContext();
|
|
5801
|
+
const allowedCountries = useAllowedCountries();
|
|
5802
|
+
const {
|
|
5803
|
+
isExperimentEnabled
|
|
5804
|
+
} = useExperimentsContext();
|
|
5805
|
+
const {
|
|
5806
|
+
sliceData,
|
|
5807
|
+
updateStateSlice
|
|
5808
|
+
} = useGlobalDataSlice(props.id);
|
|
5809
|
+
let mergedProps = props;
|
|
5810
|
+
mergedProps = mergeFieldMetadataIntoProps("legalCompanyName", resolveFieldMetadata(defaultFieldConfig$a[sliceData == null ? void 0 : sliceData.country], {
|
|
5811
|
+
isBusiness: false
|
|
5812
|
+
}, defaultFieldMetadata$a), mergedProps);
|
|
5813
|
+
const schemaWithGoverningLaw = (sliceData == null ? void 0 : sliceData.country) === "GB" && (sliceData == null ? void 0 : sliceData.differentCountryOfGoverningLaw) ? countryWithGoverningLawFields : companyNameAndCountryFields;
|
|
5814
|
+
const {
|
|
5815
|
+
data: formData,
|
|
5816
|
+
valid: formValid,
|
|
5817
|
+
errors: formErrors,
|
|
5818
|
+
fieldProblems: formFieldProblems,
|
|
5819
|
+
handleChangeFor
|
|
5820
|
+
} = useForm({
|
|
5821
|
+
...mergedProps,
|
|
5822
|
+
schema: schemaWithGoverningLaw,
|
|
5823
|
+
defaultData: mergedProps == null ? void 0 : mergedProps.data,
|
|
5824
|
+
rules: (mergedProps == null ? void 0 : mergedProps.validators) || companyCountryValidationRules,
|
|
5825
|
+
fieldProblems: mergedProps == null ? void 0 : mergedProps.fieldValidationErrors
|
|
5826
|
+
});
|
|
5827
|
+
const formUtils = formUtilities(mergedProps, i18n);
|
|
5828
|
+
const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
|
|
5829
|
+
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
5830
|
+
const isCountryOfGoverningLawAllowed = formData.country === "GB";
|
|
5831
|
+
const showCountryOfGoverningLaw = isCountryOfGoverningLawEnabled && isCountryOfGoverningLawAllowed;
|
|
5832
|
+
useEffect(() => {
|
|
5833
|
+
updateStateSlice == null ? void 0 : updateStateSlice({
|
|
5834
|
+
data: {
|
|
5835
|
+
...sliceData,
|
|
5836
|
+
...formData
|
|
5837
|
+
},
|
|
5838
|
+
errors: formErrors,
|
|
5839
|
+
valid: formValid,
|
|
5840
|
+
fieldProblems: formFieldProblems
|
|
5841
|
+
});
|
|
5842
|
+
}, [formData, formErrors, formFieldProblems, formValid, updateStateSlice]);
|
|
5843
|
+
const handleChangeForCountries = (key) => (e) => {
|
|
5844
|
+
handleChangeFor(key)(e);
|
|
5845
|
+
if (!formData.differentCountryOfGoverningLaw && e.target.value === "GB") {
|
|
5846
|
+
const countryOfGoverningLawEvent = {
|
|
5847
|
+
target: {
|
|
5848
|
+
name: "countryOfGoverningLaw",
|
|
5849
|
+
value: e.target.value
|
|
5850
|
+
}
|
|
5851
|
+
};
|
|
5852
|
+
handleChangeFor("countryOfGoverningLaw")(countryOfGoverningLawEvent);
|
|
5853
|
+
}
|
|
5854
|
+
};
|
|
5855
|
+
return jsxs("form", {
|
|
5856
|
+
children: [jsx(FormHeader, {
|
|
5857
|
+
heading: props == null ? void 0 : props.heading
|
|
5858
|
+
}), jsx(ErrorPanel, {
|
|
5859
|
+
verificationErrors: props == null ? void 0 : props.formVerificationErrors,
|
|
5860
|
+
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
5861
|
+
formUtils,
|
|
5862
|
+
id: "ariaErrorField"
|
|
5863
|
+
}), formData.country === "US" ? jsx(PatriotActDisclosure, {}) : void 0, formUtils.isRequiredField("legalCompanyName") && jsx(LegalCompanyNameField, {
|
|
5864
|
+
data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
|
|
5865
|
+
valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
|
|
5866
|
+
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
|
|
5867
|
+
labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
|
|
5868
|
+
helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
|
|
5869
|
+
legalCompanyName: "legalCompanyName__helperText"
|
|
5870
|
+
}),
|
|
5871
|
+
readonly: formUtils.isReadOnly("legalCompanyName"),
|
|
5872
|
+
handleChangeFor
|
|
5873
|
+
}), formUtils.isRequiredField("country") && jsx(CountryField, {
|
|
5874
|
+
data: formUtils.getFieldData(formData, COUNTRY_FIELD),
|
|
5875
|
+
valid: formUtils.getFieldValid(formValid, COUNTRY_FIELD),
|
|
5876
|
+
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_FIELD),
|
|
5877
|
+
labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
|
|
5878
|
+
country: "countryRegionOfEstablishment"
|
|
5879
|
+
}),
|
|
5880
|
+
readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
|
|
5881
|
+
classNameModifiers: ["country"],
|
|
5882
|
+
allowedCountries: mergedProps.isTopLevelEntity ? allowedCountries : void 0,
|
|
5883
|
+
handleChangeFor: handleChangeForCountries
|
|
5884
|
+
}), showCountryOfGoverningLaw && jsx(CountryOfGoverningLawField, {
|
|
5885
|
+
data: formUtils.getFieldData(formData, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5886
|
+
valid: formUtils.getFieldValid(formValid, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5887
|
+
errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5888
|
+
labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
|
|
5889
|
+
readonly: false,
|
|
5890
|
+
classNameModifiers: ["country"],
|
|
5891
|
+
allowedCountries: mergedProps.isTopLevelEntity ? allowedCountries : void 0,
|
|
5892
|
+
handleChangeFor
|
|
5893
|
+
})]
|
|
5894
|
+
});
|
|
5895
|
+
}
|
|
5896
|
+
const CompanyNameAndCountryComponent = memo(CompanyNameAndCountry, (prevProps, nextProps) => {
|
|
5897
|
+
var _a, _b;
|
|
5898
|
+
return objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && ((_a = prevProps.data) == null ? void 0 : _a.country) === ((_b = nextProps.data) == null ? void 0 : _b.country) && prevProps.shouldValidate === nextProps.shouldValidate;
|
|
5899
|
+
});
|
|
5900
|
+
function StateContextSetter({
|
|
5901
|
+
stateRef
|
|
5902
|
+
}) {
|
|
5903
|
+
if (stateRef.current.setState) {
|
|
5904
|
+
return null;
|
|
5905
|
+
}
|
|
5906
|
+
return jsx(StateContext.Consumer, {
|
|
5907
|
+
children: (stateContextValue) => {
|
|
5908
|
+
if (!stateContextValue) {
|
|
5909
|
+
throw new Error("<StateContextSetter> needs to be mounted inside a <StateProvider>");
|
|
5910
|
+
}
|
|
5911
|
+
const {
|
|
5912
|
+
dispatch,
|
|
5913
|
+
setActiveForms
|
|
5914
|
+
} = stateContextValue;
|
|
5915
|
+
stateRef.current.setState = dispatch;
|
|
5916
|
+
stateRef.current.setActiveForms = setActiveForms;
|
|
5917
|
+
return null;
|
|
5918
|
+
}
|
|
5919
|
+
});
|
|
5920
|
+
}
|
|
5921
|
+
var CompanyTypesValue = /* @__PURE__ */ ((CompanyTypesValue2) => {
|
|
5922
|
+
CompanyTypesValue2["PRIVATE_COMPANY"] = "privateCompany";
|
|
5923
|
+
CompanyTypesValue2["PUBLIC_COMPANY"] = "listedPublicCompany";
|
|
5924
|
+
CompanyTypesValue2["UNLISTED_PUBLIC_COMPANY"] = "unlistedPublicCompany";
|
|
5925
|
+
CompanyTypesValue2["INCORPORATED_PARTNERSHIP"] = "partnershipIncorporated";
|
|
5926
|
+
CompanyTypesValue2["INCORPORATED_ASSOCIATION"] = "associationIncorporated";
|
|
5927
|
+
CompanyTypesValue2["GOVERNMENTAL_ORGANIZATION"] = "governmentalOrganization";
|
|
5928
|
+
CompanyTypesValue2["NON_PROFIT_OR_CHARITABLE"] = "nonProfit";
|
|
5929
|
+
CompanyTypesValue2["SOLE_PROPRIETORSHIP"] = "soleProprietorship";
|
|
5930
|
+
return CompanyTypesValue2;
|
|
5931
|
+
})(CompanyTypesValue || {});
|
|
5831
5932
|
const cachedStripPatterns = /* @__PURE__ */ new Map();
|
|
5832
5933
|
const makeStripPattern = (mask) => {
|
|
5833
5934
|
const inputPatterns = mask.tokens.filter((token) => token.type === "input" && !!token.allow).map((token) => token.allow);
|
|
@@ -7717,15 +7818,6 @@ const PassportNumberPatterns = {
|
|
|
7717
7818
|
const ProofOfIdentityCardPatterns = {
|
|
7718
7819
|
[CountryCodes.HongKong]: /^[A-Z]{1,2}[0-9]{6}[0-9A]$/
|
|
7719
7820
|
};
|
|
7720
|
-
const validateNotEmptyOnBlur = {
|
|
7721
|
-
modes: ["blur"],
|
|
7722
|
-
validate: (val) => !isEmpty(val),
|
|
7723
|
-
errorMessage: "fieldIsRequired"
|
|
7724
|
-
};
|
|
7725
|
-
const validatePatternOnBlur = (pattern) => ({
|
|
7726
|
-
modes: ["blur"],
|
|
7727
|
-
validate: (val) => !!val && pattern.test(val)
|
|
7728
|
-
});
|
|
7729
7821
|
const defaultFieldMetadata$9 = {
|
|
7730
7822
|
label: "registrationNumber"
|
|
7731
7823
|
};
|
|
@@ -8437,7 +8529,8 @@ function BusinessRegistrationNumber(props) {
|
|
|
8437
8529
|
registrationNumberType
|
|
8438
8530
|
}, defaultFieldMetadata$9);
|
|
8439
8531
|
const mergedProps = mergeFieldMetadataIntoProps("registrationNumber", metadata, {
|
|
8440
|
-
requiredFields: schema
|
|
8532
|
+
requiredFields: schema,
|
|
8533
|
+
readOnlyFields: props.readOnlyFields
|
|
8441
8534
|
});
|
|
8442
8535
|
const {
|
|
8443
8536
|
handleChangeFor,
|
|
@@ -10756,9 +10849,6 @@ const businessDetailsFieldsPerScenario = {
|
|
|
10756
10849
|
};
|
|
10757
10850
|
const countryConfig$3 = {
|
|
10758
10851
|
[CountryCodes.Australia]: {
|
|
10759
|
-
legalCompanyName: {
|
|
10760
|
-
helperText: "legalCompanyName__helperText__AU"
|
|
10761
|
-
},
|
|
10762
10852
|
legalEntityType: {
|
|
10763
10853
|
label: "companyType"
|
|
10764
10854
|
}
|
|
@@ -10811,9 +10901,6 @@ const countryConfig$3 = {
|
|
|
10811
10901
|
[CountryCodes.Gibraltar]: {},
|
|
10812
10902
|
[CountryCodes.Guernsey]: {},
|
|
10813
10903
|
[CountryCodes.HongKong]: {
|
|
10814
|
-
legalCompanyName: {
|
|
10815
|
-
helperText: "legalCompanyName__helperText__HK"
|
|
10816
|
-
},
|
|
10817
10904
|
legalEntityType: {
|
|
10818
10905
|
label: "typeOfCompany"
|
|
10819
10906
|
},
|
|
@@ -10867,9 +10954,6 @@ const countryConfig$3 = {
|
|
|
10867
10954
|
},
|
|
10868
10955
|
[CountryCodes.Monaco]: {},
|
|
10869
10956
|
[CountryCodes.Netherlands]: {
|
|
10870
|
-
legalCompanyName: {
|
|
10871
|
-
helperText: "legalCompanyName__helperText__NL"
|
|
10872
|
-
},
|
|
10873
10957
|
vatAbsenceReason: {
|
|
10874
10958
|
label: "vatAbsenceReason"
|
|
10875
10959
|
}
|
|
@@ -10905,9 +10989,6 @@ const countryConfig$3 = {
|
|
|
10905
10989
|
country: {
|
|
10906
10990
|
label: "country__US__business"
|
|
10907
10991
|
},
|
|
10908
|
-
legalCompanyName: {
|
|
10909
|
-
helperText: "legalCompanyName__helperText__US"
|
|
10910
|
-
},
|
|
10911
10992
|
tradingName: {
|
|
10912
10993
|
label: "doingBusinessAs"
|
|
10913
10994
|
},
|
|
@@ -10927,9 +11008,6 @@ const countryConfig$3 = {
|
|
|
10927
11008
|
registrationNumber: {
|
|
10928
11009
|
label: "uen"
|
|
10929
11010
|
},
|
|
10930
|
-
legalCompanyName: {
|
|
10931
|
-
helperText: "legalCompanyName__helperText__SG"
|
|
10932
|
-
},
|
|
10933
11011
|
legalEntityType: {
|
|
10934
11012
|
label: "companyType"
|
|
10935
11013
|
},
|
|
@@ -10958,10 +11036,6 @@ const countryConfig$3 = {
|
|
|
10958
11036
|
stateOrProvince: {
|
|
10959
11037
|
label: "stateOrProvince__US__business"
|
|
10960
11038
|
},
|
|
10961
|
-
legalCompanyName: {
|
|
10962
|
-
label: "legalCompanyName__US",
|
|
10963
|
-
helperText: "legalCompanyName__helperText__US"
|
|
10964
|
-
},
|
|
10965
11039
|
tradingName: {
|
|
10966
11040
|
label: "doingBusinessAs"
|
|
10967
11041
|
},
|
|
@@ -11422,7 +11496,7 @@ function isEmptyEntity(legalEntity) {
|
|
|
11422
11496
|
const sortedFieldsOnEntity = fieldsOnEntity.toSorted();
|
|
11423
11497
|
return sortedFieldsOnEntity.every((value, index) => value === sortedMinimumFields[index]);
|
|
11424
11498
|
}
|
|
11425
|
-
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "
|
|
11499
|
+
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
|
|
11426
11500
|
const entityTypeToCorrespondingAccountHolderOption = {
|
|
11427
11501
|
[LegalEntityType.INDIVIDUAL]: "myName",
|
|
11428
11502
|
[LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
|
|
@@ -12504,7 +12578,8 @@ function FieldContainer(props) {
|
|
|
12504
12578
|
trimOnBlur,
|
|
12505
12579
|
hideField,
|
|
12506
12580
|
maxlength,
|
|
12507
|
-
handleChangeFor
|
|
12581
|
+
handleChangeFor,
|
|
12582
|
+
readOnly
|
|
12508
12583
|
} = props;
|
|
12509
12584
|
const formUtils = formUtilities(props, i18n);
|
|
12510
12585
|
const errorMessage = formUtils.getErrorMessage(fieldName, errors, fieldProblems);
|
|
@@ -12526,7 +12601,7 @@ function FieldContainer(props) {
|
|
|
12526
12601
|
labels: {
|
|
12527
12602
|
country: formUtils.getLabel(field)
|
|
12528
12603
|
},
|
|
12529
|
-
readonly:
|
|
12604
|
+
readonly: readOnly,
|
|
12530
12605
|
classNameModifiers,
|
|
12531
12606
|
className: hideField ? "adyen-kyc-u-display-none" : "",
|
|
12532
12607
|
handleChangeFor
|
|
@@ -12545,7 +12620,7 @@ function FieldContainer(props) {
|
|
|
12545
12620
|
labels: {
|
|
12546
12621
|
stateOrProvince: formUtils.getLabel(field)
|
|
12547
12622
|
},
|
|
12548
|
-
readonly:
|
|
12623
|
+
readonly: readOnly,
|
|
12549
12624
|
classNameModifiers,
|
|
12550
12625
|
selectedCountry: data.country,
|
|
12551
12626
|
handleChangeFor
|
|
@@ -12568,7 +12643,8 @@ function FieldContainer(props) {
|
|
|
12568
12643
|
"aria-required": true,
|
|
12569
12644
|
"aria-label": props == null ? void 0 : props["aria-label"],
|
|
12570
12645
|
"aria-invalid": !valid[field],
|
|
12571
|
-
trimOnBlur
|
|
12646
|
+
trimOnBlur,
|
|
12647
|
+
readonly: readOnly
|
|
12572
12648
|
})
|
|
12573
12649
|
});
|
|
12574
12650
|
}
|
|
@@ -13417,7 +13493,7 @@ function RegistrationAddressComponent(props) {
|
|
|
13417
13493
|
readOnlyFields: registrationAddressReadOnlyFields,
|
|
13418
13494
|
obscuredFields: registrationAddressObscuredFields,
|
|
13419
13495
|
verifyFields: registrationAddressVerifyFields
|
|
13420
|
-
} = getFormProps(props,
|
|
13496
|
+
} = getFormProps(props, registrationAddressFormID);
|
|
13421
13497
|
const {
|
|
13422
13498
|
data: formData,
|
|
13423
13499
|
valid: formValid,
|
|
@@ -13615,29 +13691,15 @@ const GuidanceContent$1 = ({
|
|
|
13615
13691
|
})
|
|
13616
13692
|
})]
|
|
13617
13693
|
})]
|
|
13618
|
-
}) : jsxs(
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
children: [
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
children:
|
|
13626
|
-
|
|
13627
|
-
}), jsx(ListItem, {
|
|
13628
|
-
children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
|
|
13629
|
-
values: {
|
|
13630
|
-
numberOfMonths: 12
|
|
13631
|
-
}
|
|
13632
|
-
})
|
|
13633
|
-
})]
|
|
13634
|
-
})]
|
|
13635
|
-
}), jsx(ContextGuidance, {
|
|
13636
|
-
page: "Company registration document",
|
|
13637
|
-
titleId: "whatIfDocumentIsMoreThan12MonthsOld",
|
|
13638
|
-
contentId: "ifDocumentMoreThan12months",
|
|
13639
|
-
title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
|
|
13640
|
-
content: i18n.get("ifDocumentMoreThan12months")
|
|
13694
|
+
}) : jsxs("div", {
|
|
13695
|
+
className: "adyen-kyc-u-margin-bottom-24",
|
|
13696
|
+
children: [jsxs("strong", {
|
|
13697
|
+
children: [" ", i18n.get("documentRequirements")]
|
|
13698
|
+
}), jsx(List, {
|
|
13699
|
+
className: "adyen-kyc-upload-field__requirements",
|
|
13700
|
+
children: jsx(ListItem, {
|
|
13701
|
+
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
13702
|
+
})
|
|
13641
13703
|
})]
|
|
13642
13704
|
})
|
|
13643
13705
|
});
|
|
@@ -13752,9 +13814,9 @@ const GuidanceContent = ({
|
|
|
13752
13814
|
})]
|
|
13753
13815
|
}) : jsxs("div", {
|
|
13754
13816
|
className: "adyen-kyc-u-margin-bottom-24",
|
|
13755
|
-
children: [
|
|
13817
|
+
children: [jsx("div", {
|
|
13756
13818
|
className: "adyen-kyc-upload-field__subtitle",
|
|
13757
|
-
children:
|
|
13819
|
+
children: i18n.get("documentRequirements")
|
|
13758
13820
|
}), jsxs(List, {
|
|
13759
13821
|
className: "adyen-kyc-upload-field__requirements",
|
|
13760
13822
|
children: [jsx(ListItem, {
|
|
@@ -14413,7 +14475,7 @@ const mandatoryApiFields = {
|
|
|
14413
14475
|
ORGANIZATION: ["companyNameAndCountry.legalCompanyName", "companyNameAndCountry.country"],
|
|
14414
14476
|
SOLE_PROPRIETORSHIP: ["solePropNameAndCountry.legalCompanyName", "solePropNameAndCountry.country"],
|
|
14415
14477
|
TRUST: ["trustRegistrationDetails.legalName", "trustRegistrationDetails.country"],
|
|
14416
|
-
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.
|
|
14478
|
+
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.parentNumberOfEmployees", "ultimateParentCompany.ultimateParentNumberOfEmployees"]
|
|
14417
14479
|
};
|
|
14418
14480
|
const individualObscuredFields = ["personalDetails.idNumber", "personalDetails.idNumberExempt"];
|
|
14419
14481
|
const individualBaseMapping = {
|
|
@@ -16941,60 +17003,60 @@ const roleMetadata = {
|
|
|
16941
17003
|
[DecisionMakerType.CONTROLLING_PERSON]: {
|
|
16942
17004
|
name: "controllingPerson",
|
|
16943
17005
|
description: "controllingPersonDescription",
|
|
16944
|
-
|
|
17006
|
+
variant: "teal"
|
|
16945
17007
|
},
|
|
16946
17008
|
[DecisionMakerType.OWNER]: {
|
|
16947
17009
|
name: "owner",
|
|
16948
17010
|
description: "ownerDescription",
|
|
16949
|
-
|
|
17011
|
+
variant: "red"
|
|
16950
17012
|
},
|
|
16951
17013
|
[DecisionMakerType.SIGNATORY]: {
|
|
16952
17014
|
name: "signatory",
|
|
16953
17015
|
description: "signatoryDescription",
|
|
16954
|
-
|
|
17016
|
+
variant: "green"
|
|
16955
17017
|
},
|
|
16956
17018
|
[DecisionMakerType.DIRECTOR]: {
|
|
16957
17019
|
name: "director",
|
|
16958
17020
|
description: "directorDescription",
|
|
16959
|
-
|
|
17021
|
+
variant: "orange"
|
|
16960
17022
|
},
|
|
16961
17023
|
[TrustMemberTypes.DEFINED_BENEFICIARY]: {
|
|
16962
17024
|
name: "definedBeneficiary",
|
|
16963
17025
|
description: "definedBeneficiaryDescription",
|
|
16964
|
-
|
|
17026
|
+
variant: "orange"
|
|
16965
17027
|
},
|
|
16966
17028
|
[TrustMemberTypes.UNDEFINED_BENEFICIARY]: {
|
|
16967
17029
|
name: "undefinedBeneficiary",
|
|
16968
17030
|
description: "undefinedBeneficiaryDescription",
|
|
16969
|
-
|
|
17031
|
+
variant: "orange"
|
|
16970
17032
|
},
|
|
16971
17033
|
[TrustMemberTypes.PROTECTOR]: {
|
|
16972
17034
|
name: "protector",
|
|
16973
17035
|
description: "personAppointmentUnderTrustInstrument",
|
|
16974
|
-
|
|
17036
|
+
variant: "orange"
|
|
16975
17037
|
},
|
|
16976
17038
|
[TrustMemberTypes.TRUSTEE]: {
|
|
16977
17039
|
name: "trustee",
|
|
16978
17040
|
description: "legalOwnerOfProperty",
|
|
16979
|
-
|
|
17041
|
+
variant: "green"
|
|
16980
17042
|
},
|
|
16981
17043
|
[TrustMemberTypes.SETTLOR]: {
|
|
16982
17044
|
name: "settlor",
|
|
16983
17045
|
description: "entityEstablishingTrust",
|
|
16984
|
-
|
|
17046
|
+
variant: "orange"
|
|
16985
17047
|
},
|
|
16986
17048
|
[TrustMemberGuidanceLabel.BENEFICIARY]: {
|
|
16987
17049
|
name: TrustMemberGuidanceLabel.BENEFICIARY,
|
|
16988
|
-
|
|
17050
|
+
variant: "orange"
|
|
16989
17051
|
},
|
|
16990
17052
|
[TrustMemberGuidanceLabel.TRUSTEE]: {
|
|
16991
17053
|
name: TrustMemberGuidanceLabel.TRUSTEE,
|
|
16992
|
-
|
|
17054
|
+
variant: "green"
|
|
16993
17055
|
}
|
|
16994
17056
|
};
|
|
16995
|
-
const
|
|
17057
|
+
const getRoleTagVariant = (role2) => {
|
|
16996
17058
|
var _a;
|
|
16997
|
-
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.
|
|
17059
|
+
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.variant) ?? "blue";
|
|
16998
17060
|
};
|
|
16999
17061
|
const getRoleName = (role2) => {
|
|
17000
17062
|
var _a;
|
|
@@ -17006,13 +17068,13 @@ const makeSelectItemForRole = (role2, i18n) => {
|
|
|
17006
17068
|
const {
|
|
17007
17069
|
name,
|
|
17008
17070
|
description: description2,
|
|
17009
|
-
|
|
17071
|
+
variant
|
|
17010
17072
|
} = metadata;
|
|
17011
17073
|
return {
|
|
17012
17074
|
id: role2,
|
|
17013
17075
|
name: i18n.get(name),
|
|
17014
17076
|
description: description2 ? i18n.get(description2) : void 0,
|
|
17015
|
-
className
|
|
17077
|
+
className: `adyen-kyc-tag--${variant}`
|
|
17016
17078
|
};
|
|
17017
17079
|
};
|
|
17018
17080
|
const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event) => {
|
|
@@ -22070,7 +22132,7 @@ const trustRegistrationDetailsValidations = {
|
|
|
22070
22132
|
},
|
|
22071
22133
|
legalName: {
|
|
22072
22134
|
modes: ["blur"],
|
|
22073
|
-
validate: (
|
|
22135
|
+
validate: (legalName2) => !!legalName2,
|
|
22074
22136
|
errorMessage: "fieldIsRequired"
|
|
22075
22137
|
},
|
|
22076
22138
|
objectOfTrust: {
|
|
@@ -22991,55 +23053,6 @@ function ErrorPanel({
|
|
|
22991
23053
|
})]
|
|
22992
23054
|
});
|
|
22993
23055
|
}
|
|
22994
|
-
const headingTypes = {
|
|
22995
|
-
1: ({
|
|
22996
|
-
children,
|
|
22997
|
-
className
|
|
22998
|
-
}) => jsx("h1", {
|
|
22999
|
-
className,
|
|
23000
|
-
children
|
|
23001
|
-
}),
|
|
23002
|
-
2: ({
|
|
23003
|
-
children,
|
|
23004
|
-
className
|
|
23005
|
-
}) => jsx("h2", {
|
|
23006
|
-
className,
|
|
23007
|
-
children
|
|
23008
|
-
}),
|
|
23009
|
-
3: ({
|
|
23010
|
-
children,
|
|
23011
|
-
className
|
|
23012
|
-
}) => jsx("h3", {
|
|
23013
|
-
className,
|
|
23014
|
-
children
|
|
23015
|
-
}),
|
|
23016
|
-
4: ({
|
|
23017
|
-
children,
|
|
23018
|
-
className
|
|
23019
|
-
}) => jsx("h4", {
|
|
23020
|
-
className,
|
|
23021
|
-
children
|
|
23022
|
-
}),
|
|
23023
|
-
sub: ({
|
|
23024
|
-
children,
|
|
23025
|
-
className
|
|
23026
|
-
}) => jsx("div", {
|
|
23027
|
-
className,
|
|
23028
|
-
children
|
|
23029
|
-
})
|
|
23030
|
-
};
|
|
23031
|
-
function Heading({
|
|
23032
|
-
className,
|
|
23033
|
-
level,
|
|
23034
|
-
children
|
|
23035
|
-
}) {
|
|
23036
|
-
const HeadingElement = headingTypes[level] || headingTypes[1];
|
|
23037
|
-
const classNames = cx("adyen-kyc-heading", `adyen-kyc-heading--${level}`, className);
|
|
23038
|
-
return jsx(HeadingElement, {
|
|
23039
|
-
className: classNames,
|
|
23040
|
-
children
|
|
23041
|
-
});
|
|
23042
|
-
}
|
|
23043
23056
|
const summaryStep = {
|
|
23044
23057
|
formId: "summary",
|
|
23045
23058
|
formName: "summary"
|
|
@@ -23081,8 +23094,9 @@ function Summary({
|
|
|
23081
23094
|
}, i18n);
|
|
23082
23095
|
const summarySectionHeader = (formName, formId) => jsxs("header", {
|
|
23083
23096
|
className: "adyen-kyc-summary-section__header",
|
|
23084
|
-
children: [jsx(
|
|
23085
|
-
|
|
23097
|
+
children: [jsx(Typography, {
|
|
23098
|
+
el: "h4",
|
|
23099
|
+
variant: "title",
|
|
23086
23100
|
className: "adyen-kyc-summary-section__heading",
|
|
23087
23101
|
children: formName
|
|
23088
23102
|
}), jsx(Button, {
|
|
@@ -23166,9 +23180,9 @@ function Summary({
|
|
|
23166
23180
|
return jsxs("div", {
|
|
23167
23181
|
role: "region",
|
|
23168
23182
|
className: "adyen-kyc-summary",
|
|
23169
|
-
children: [showFormHeader && jsx(
|
|
23170
|
-
|
|
23171
|
-
|
|
23183
|
+
children: [showFormHeader && jsx(FormHeader, {
|
|
23184
|
+
heading: i18n.get("summary"),
|
|
23185
|
+
classNames: "adyen-kyc-summary__heading"
|
|
23172
23186
|
}), jsx(ErrorPanel, {
|
|
23173
23187
|
validationErrors: allValidationErrors,
|
|
23174
23188
|
verificationErrors: allVerificationErrors,
|
|
@@ -24259,13 +24273,6 @@ const dbaNameFieldMetadata = {
|
|
|
24259
24273
|
label: "dbaName",
|
|
24260
24274
|
validators: validateNotEmptyOnBlur
|
|
24261
24275
|
};
|
|
24262
|
-
const LegalCompanyNameFieldValidation = () => ({
|
|
24263
|
-
legalCompanyName: {
|
|
24264
|
-
modes: ["blur"],
|
|
24265
|
-
validate: (legalCompanyName2) => !isEmpty(legalCompanyName2),
|
|
24266
|
-
errorMessage: "fieldIsRequired"
|
|
24267
|
-
}
|
|
24268
|
-
});
|
|
24269
24276
|
const TAX_INFORMATION_FIELD = ["taxInformation", "exemptedFromTax", "isUen"];
|
|
24270
24277
|
function TaxInformationField({
|
|
24271
24278
|
data,
|
|
@@ -24622,13 +24629,9 @@ function AdditionalInformationComponent({
|
|
|
24622
24629
|
return (_a2 = initialFormUtilsProps.allFields) == null ? void 0 : _a2.reduce((acc, field) => {
|
|
24623
24630
|
switch (field) {
|
|
24624
24631
|
case "legalCompanyName":
|
|
24625
|
-
return {
|
|
24626
|
-
|
|
24627
|
-
|
|
24628
|
-
...acc.validators,
|
|
24629
|
-
...LegalCompanyNameFieldValidation()
|
|
24630
|
-
}
|
|
24631
|
-
};
|
|
24632
|
+
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$a[country2], {
|
|
24633
|
+
isBusiness: true
|
|
24634
|
+
}, defaultFieldMetadata$a), acc);
|
|
24632
24635
|
case "dbaName":
|
|
24633
24636
|
return mergeFieldMetadataIntoProps("dbaName", dbaNameFieldMetadata, acc);
|
|
24634
24637
|
case "registrationNumber":
|
|
@@ -26805,6 +26808,42 @@ function BusinessDetailsDropinComponent({
|
|
|
26805
26808
|
})
|
|
26806
26809
|
});
|
|
26807
26810
|
}
|
|
26811
|
+
const getTrustedFieldsByProvider = (provider, trustedFields2) => trustedFields2.find((tf) => tf.provider === provider);
|
|
26812
|
+
const parseTrustedFieldsIntoReadOnlyFields = (trustedFields2, mapping) => {
|
|
26813
|
+
const formFieldsMapped = [];
|
|
26814
|
+
trustedFields2.fields.forEach((field) => {
|
|
26815
|
+
for (const [key, value] of Object.entries(mapping)) {
|
|
26816
|
+
if (value === field) {
|
|
26817
|
+
formFieldsMapped.push(key);
|
|
26818
|
+
}
|
|
26819
|
+
}
|
|
26820
|
+
});
|
|
26821
|
+
const readOnlyFields = {};
|
|
26822
|
+
formFieldsMapped.forEach((field) => {
|
|
26823
|
+
const tokenizedField = field.split(".");
|
|
26824
|
+
const formField = tokenizedField.pop();
|
|
26825
|
+
const formId = tokenizedField.pop();
|
|
26826
|
+
if (formField && formId) {
|
|
26827
|
+
if (formId in readOnlyFields) {
|
|
26828
|
+
readOnlyFields[formId].push(formField);
|
|
26829
|
+
} else {
|
|
26830
|
+
readOnlyFields[formId] = [formField];
|
|
26831
|
+
}
|
|
26832
|
+
}
|
|
26833
|
+
});
|
|
26834
|
+
return readOnlyFields;
|
|
26835
|
+
};
|
|
26836
|
+
const trustedFields = ({
|
|
26837
|
+
fields,
|
|
26838
|
+
trustedFieldsProvider,
|
|
26839
|
+
apiMapping
|
|
26840
|
+
}) => {
|
|
26841
|
+
if (!fields || !trustedFieldsProvider || !apiMapping) {
|
|
26842
|
+
return {};
|
|
26843
|
+
}
|
|
26844
|
+
const trustedFieldsOfProvider = getTrustedFieldsByProvider(trustedFieldsProvider, fields);
|
|
26845
|
+
return trustedFieldsOfProvider ? parseTrustedFieldsIntoReadOnlyFields(trustedFieldsOfProvider, apiMapping) : {};
|
|
26846
|
+
};
|
|
26808
26847
|
const parseConfiguration$6 = ({
|
|
26809
26848
|
country: country2,
|
|
26810
26849
|
matchingScenario
|
|
@@ -26854,7 +26893,8 @@ function CompanyDropinComponent({
|
|
|
26854
26893
|
handleUpdateLegalEntity,
|
|
26855
26894
|
handleHomeClick,
|
|
26856
26895
|
onTypeSwitch,
|
|
26857
|
-
onChange
|
|
26896
|
+
onChange,
|
|
26897
|
+
trustedFieldsProvider
|
|
26858
26898
|
}) {
|
|
26859
26899
|
var _a, _b;
|
|
26860
26900
|
const {
|
|
@@ -26918,7 +26958,15 @@ function CompanyDropinComponent({
|
|
|
26918
26958
|
isSettingEnabled,
|
|
26919
26959
|
isExperimentEnabled
|
|
26920
26960
|
}), [country2, data, taskType, requiredFields, isSettingEnabled]);
|
|
26921
|
-
const
|
|
26961
|
+
const legalEntityTrustedFields = legalEntityResponse == null ? void 0 : legalEntityResponse.trustedFields;
|
|
26962
|
+
const trustedFieldsOfProvider = useMemo(() => trustedFields({
|
|
26963
|
+
fields: legalEntityTrustedFields,
|
|
26964
|
+
trustedFieldsProvider,
|
|
26965
|
+
apiMapping: companyComponentsKeyMapping
|
|
26966
|
+
}), [legalEntityTrustedFields, trustedFieldsProvider]);
|
|
26967
|
+
const derivedProps = useMemo(() => ({
|
|
26968
|
+
...getPropsFromConfigurations(fieldConfigurations, companyForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules)
|
|
26969
|
+
}), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
26922
26970
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
26923
26971
|
const {
|
|
26924
26972
|
state: {
|
|
@@ -27181,7 +27229,8 @@ function CompanyDropinComponent({
|
|
|
27181
27229
|
onCountryChange: setCountry,
|
|
27182
27230
|
ref: formRef,
|
|
27183
27231
|
shouldValidate,
|
|
27184
|
-
isTopLevelEntity: taskType === TaskTypes.COMPANY
|
|
27232
|
+
isTopLevelEntity: taskType === TaskTypes.COMPANY,
|
|
27233
|
+
readOnlyFields: trustedFieldsOfProvider
|
|
27185
27234
|
})
|
|
27186
27235
|
});
|
|
27187
27236
|
}
|
|
@@ -27790,13 +27839,6 @@ function CompanyLookup({
|
|
|
27790
27839
|
});
|
|
27791
27840
|
}
|
|
27792
27841
|
const CompanyLookupComponent = memo(CompanyLookup, (prevProps, nextProps) => objectsDeepEqual(prevProps.defaultData, nextProps.defaultData) && prevProps.canVerify === nextProps.canVerify && prevProps.legalCompanyName === nextProps.legalCompanyName && prevProps.country === nextProps.country && prevProps.stateOrProvince === nextProps.stateOrProvince && prevProps.taxInformationNumber === nextProps.taxInformationNumber && prevProps.setLoading === nextProps.setLoading && prevProps.setKompanyAddress === nextProps.setKompanyAddress && prevProps.handleCompanyIndexSearch === nextProps.handleCompanyIndexSearch && prevProps.handleCompanyDeepSearch === nextProps.handleCompanyDeepSearch && prevProps.handleGetCompanyDataset === nextProps.handleGetCompanyDataset && prevProps.handleRefreshCompanyDataset === nextProps.handleRefreshCompanyDataset && prevProps.handleVerifyTin === nextProps.handleVerifyTin);
|
|
27793
|
-
const StateFieldValidation = () => ({
|
|
27794
|
-
stateOrProvince: {
|
|
27795
|
-
modes: ["blur"],
|
|
27796
|
-
validate: (stateOrProvince2) => !isEmpty(stateOrProvince2),
|
|
27797
|
-
errorMessage: "fieldIsRequired"
|
|
27798
|
-
}
|
|
27799
|
-
});
|
|
27800
27842
|
const COMPANY_BASICS_FORM_ID = "companyBasics";
|
|
27801
27843
|
const companyBasicsFields = [...LEGAL_COMPANY_NAME_FIELD, ...COUNTRY_FIELD, ...STATE_FIELD, ...TAX_INFORMATION_FIELD];
|
|
27802
27844
|
function CompanyBasics({
|
|
@@ -27860,13 +27902,9 @@ function CompanyBasics({
|
|
|
27860
27902
|
return (_a2 = initialFormUtilsProps.allFields) == null ? void 0 : _a2.reduce((acc, field) => {
|
|
27861
27903
|
switch (field) {
|
|
27862
27904
|
case "legalCompanyName":
|
|
27863
|
-
return {
|
|
27864
|
-
|
|
27865
|
-
|
|
27866
|
-
...acc.validators,
|
|
27867
|
-
...LegalCompanyNameFieldValidation()
|
|
27868
|
-
}
|
|
27869
|
-
};
|
|
27905
|
+
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$a[country2], {
|
|
27906
|
+
isBusiness: false
|
|
27907
|
+
}, defaultFieldMetadata$a), acc);
|
|
27870
27908
|
case "country":
|
|
27871
27909
|
return {
|
|
27872
27910
|
...acc,
|
|
@@ -27876,13 +27914,9 @@ function CompanyBasics({
|
|
|
27876
27914
|
}
|
|
27877
27915
|
};
|
|
27878
27916
|
case "stateOrProvince":
|
|
27879
|
-
return {
|
|
27880
|
-
|
|
27881
|
-
|
|
27882
|
-
...acc.validators,
|
|
27883
|
-
...StateFieldValidation()
|
|
27884
|
-
}
|
|
27885
|
-
};
|
|
27917
|
+
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig[country2], {
|
|
27918
|
+
isBusiness: false
|
|
27919
|
+
}, defaultFieldMetadata), acc);
|
|
27886
27920
|
case "taxInformation":
|
|
27887
27921
|
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$1[country2], {
|
|
27888
27922
|
taxIdNumberType,
|
|
@@ -27892,7 +27926,7 @@ function CompanyBasics({
|
|
|
27892
27926
|
return acc;
|
|
27893
27927
|
}
|
|
27894
27928
|
}, initialFormUtilsProps);
|
|
27895
|
-
}, [country2, initialFormUtilsProps, taxIdNumberType]);
|
|
27929
|
+
}, [companyType2, country2, initialFormUtilsProps, taxIdNumberType]);
|
|
27896
27930
|
const schema = (requiredFields == null ? void 0 : requiredFields.length) ? requiredFields : ["legalCompanyName", "country"];
|
|
27897
27931
|
const {
|
|
27898
27932
|
schema: formSchema,
|
|
@@ -29269,6 +29303,11 @@ function useSalesChannelsSettings() {
|
|
|
29269
29303
|
return settings;
|
|
29270
29304
|
}, [isSettingEnabled]);
|
|
29271
29305
|
}
|
|
29306
|
+
var TrustedFieldsProvider = /* @__PURE__ */ ((TrustedFieldsProvider2) => {
|
|
29307
|
+
TrustedFieldsProvider2["SINGPASS"] = "singpass";
|
|
29308
|
+
TrustedFieldsProvider2["KOMPANY"] = "kompany";
|
|
29309
|
+
return TrustedFieldsProvider2;
|
|
29310
|
+
})(TrustedFieldsProvider || {});
|
|
29272
29311
|
const downloadFile = async (base64, filename) => {
|
|
29273
29312
|
saveBlobAsFile(base64ToBlob(base64), filename);
|
|
29274
29313
|
};
|
|
@@ -29843,11 +29882,13 @@ const BusinessTypeSelection = ({
|
|
|
29843
29882
|
className: "adyen-kyc-business-type-selection",
|
|
29844
29883
|
children: [jsxs("header", {
|
|
29845
29884
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
29846
|
-
children: [jsx(
|
|
29847
|
-
|
|
29885
|
+
children: [jsx(Typography, {
|
|
29886
|
+
el: "h2",
|
|
29887
|
+
variant: "title-m",
|
|
29848
29888
|
children: i18n.get(businessTypeSelectionStepTitles[currentStep])
|
|
29849
|
-
}), currentStep === 3 && jsx(
|
|
29850
|
-
|
|
29889
|
+
}), currentStep === 3 && jsx(Typography, {
|
|
29890
|
+
el: "p",
|
|
29891
|
+
variant: "title",
|
|
29851
29892
|
children: i18n.get("someInformationWillNotBeSaved")
|
|
29852
29893
|
})]
|
|
29853
29894
|
}), currentStep === 0 && jsx(Field, {
|
|
@@ -30208,11 +30249,13 @@ function Card({
|
|
|
30208
30249
|
onKeyDown,
|
|
30209
30250
|
children: [title && jsxs("header", {
|
|
30210
30251
|
className: "adyen-kyc-card__header",
|
|
30211
|
-
children: [jsx(
|
|
30212
|
-
|
|
30252
|
+
children: [jsx(Typography, {
|
|
30253
|
+
el: "h4",
|
|
30254
|
+
variant: "title",
|
|
30213
30255
|
children: title
|
|
30214
|
-
}), subTitle && jsx(
|
|
30215
|
-
|
|
30256
|
+
}), subTitle && jsx(Typography, {
|
|
30257
|
+
el: "p",
|
|
30258
|
+
variant: "body",
|
|
30216
30259
|
children: subTitle
|
|
30217
30260
|
})]
|
|
30218
30261
|
}), jsx("div", {
|
|
@@ -30425,8 +30468,8 @@ const EntityAssociation = ({
|
|
|
30425
30468
|
})]
|
|
30426
30469
|
}), jsx("div", {
|
|
30427
30470
|
children: types.map((type) => jsx(Tag, {
|
|
30428
|
-
className:
|
|
30429
|
-
|
|
30471
|
+
className: "adyen-kyc-entity-association__tag",
|
|
30472
|
+
variant: getRoleTagVariant(type),
|
|
30430
30473
|
children: i18n.get(getRoleName(type))
|
|
30431
30474
|
}, type))
|
|
30432
30475
|
}), status === TaskStatus.ERROR && jsx(VerificationErrorAlert, {
|
|
@@ -30514,8 +30557,8 @@ const EntityGuidanceStatus = ({
|
|
|
30514
30557
|
children: [jsx(EntityStatusIcon, {
|
|
30515
30558
|
status
|
|
30516
30559
|
}), jsx(Tag, {
|
|
30517
|
-
className:
|
|
30518
|
-
|
|
30560
|
+
className: "adyen-kyc-entity-status__tag",
|
|
30561
|
+
variant: getRoleTagVariant(entityLabel),
|
|
30519
30562
|
children: i18n.get(getRoleName(entityLabel))
|
|
30520
30563
|
}, entityLabel), jsx("span", {
|
|
30521
30564
|
className: "adyen-kyc-entity-status--text",
|
|
@@ -31262,8 +31305,9 @@ const SingpassSelection = (props) => {
|
|
|
31262
31305
|
className: "adyen-kyc-singpass-selection",
|
|
31263
31306
|
children: [jsx("header", {
|
|
31264
31307
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
31265
|
-
children: jsx(
|
|
31266
|
-
|
|
31308
|
+
children: jsx(Typography, {
|
|
31309
|
+
el: "h2",
|
|
31310
|
+
variant: "title-m",
|
|
31267
31311
|
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
31268
31312
|
})
|
|
31269
31313
|
}), jsx("form", {
|
|
@@ -31515,8 +31559,9 @@ const TaskListGroup = ({
|
|
|
31515
31559
|
className: "adyen-task-list-group",
|
|
31516
31560
|
children: [title && jsx("header", {
|
|
31517
31561
|
className: "adyen-task-list-group__header",
|
|
31518
|
-
children: jsx(
|
|
31519
|
-
|
|
31562
|
+
children: jsx(Typography, {
|
|
31563
|
+
el: "h4",
|
|
31564
|
+
variant: "title",
|
|
31520
31565
|
children: title
|
|
31521
31566
|
})
|
|
31522
31567
|
}), jsx("div", {
|
|
@@ -31638,13 +31683,17 @@ function TaskListComponent({
|
|
|
31638
31683
|
})
|
|
31639
31684
|
}), isEnableNewEntryFlowEnabled && jsxs("header", {
|
|
31640
31685
|
className: "adyen-task-list__heading",
|
|
31641
|
-
children: [jsx(
|
|
31642
|
-
|
|
31686
|
+
children: [jsx(Typography, {
|
|
31687
|
+
el: "h1",
|
|
31688
|
+
variant: "title-l",
|
|
31643
31689
|
children: i18n.get("setUpYourAccount")
|
|
31644
|
-
}), jsxs(
|
|
31645
|
-
|
|
31646
|
-
|
|
31647
|
-
|
|
31690
|
+
}), jsxs(Typography, {
|
|
31691
|
+
el: "p",
|
|
31692
|
+
variant: "title",
|
|
31693
|
+
className: "adyen-task-list__description",
|
|
31694
|
+
children: [jsx(Typography, {
|
|
31695
|
+
el: "span",
|
|
31696
|
+
variant: "body-strongest",
|
|
31648
31697
|
children: i18n.get("yourBusinessSetup", {
|
|
31649
31698
|
values: {
|
|
31650
31699
|
businessSetup: i18n.get(businessSetup)
|
|
@@ -31655,7 +31704,6 @@ function TaskListComponent({
|
|
|
31655
31704
|
icon: "edit",
|
|
31656
31705
|
tertiary: true,
|
|
31657
31706
|
onClick: onEditBusinessSetupClick,
|
|
31658
|
-
className: "adyen-kyc-u-margin-left-4",
|
|
31659
31707
|
type: "button"
|
|
31660
31708
|
})]
|
|
31661
31709
|
})]
|
|
@@ -32833,7 +32881,7 @@ function PayoutDetailsDropinComponent({
|
|
|
32833
32881
|
const [documents2, setDocuments] = useState();
|
|
32834
32882
|
const fallbackCurrency = (_a = currencyByCountry[defaultPayoutCountry]) == null ? void 0 : _a[0];
|
|
32835
32883
|
const accountHolderName = accountHolder2 || getLegalEntityNameBasedOnType(legalEntityResponse);
|
|
32836
|
-
const instantVerificationEnabled = Boolean(!transferInstrument && handleGetBankVerificationVendors);
|
|
32884
|
+
const instantVerificationEnabled = Boolean(!transferInstrument && handleGetBankVerificationVendors && isSettingEnabled("instantBankVerification"));
|
|
32837
32885
|
const taskType = propTaskType ?? TaskTypes.PAYOUT;
|
|
32838
32886
|
const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState();
|
|
32839
32887
|
const prefilledData = {
|
|
@@ -33597,28 +33645,28 @@ const convertExistingTrustMemberToDefaultData = (trustMember, allowMoreRolesForM
|
|
|
33597
33645
|
return convertExistingTrustMember(trustMember);
|
|
33598
33646
|
};
|
|
33599
33647
|
const TrustRoleAndEntityType = (props) => {
|
|
33600
|
-
|
|
33601
|
-
existingTrustMember,
|
|
33602
|
-
id: id2,
|
|
33603
|
-
getLegalEntityHandler,
|
|
33604
|
-
isOrganizationSettlorWithExemptionEnabled
|
|
33605
|
-
} = props;
|
|
33648
|
+
var _a;
|
|
33606
33649
|
const {
|
|
33607
33650
|
i18n
|
|
33608
33651
|
} = useI18nContext();
|
|
33652
|
+
const country2 = props.country;
|
|
33653
|
+
let mergedProps = props;
|
|
33654
|
+
mergedProps = mergeFieldMetadataIntoProps("legalCompanyName", resolveFieldMetadata(defaultFieldConfig$a[country2], {
|
|
33655
|
+
isBusiness: false
|
|
33656
|
+
}, defaultFieldMetadata$a), mergedProps);
|
|
33609
33657
|
const {
|
|
33610
33658
|
isExperimentEnabled
|
|
33611
33659
|
} = useExperimentsContext();
|
|
33612
33660
|
const allowMoreRolesForMainRootTrusteeEnabled = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
|
|
33613
|
-
const defaultData = convertExistingTrustMemberToDefaultData(existingTrustMember, allowMoreRolesForMainRootTrusteeEnabled);
|
|
33614
|
-
const formUtils = formUtilities(
|
|
33661
|
+
const defaultData = convertExistingTrustMemberToDefaultData(props.existingTrustMember, allowMoreRolesForMainRootTrusteeEnabled);
|
|
33662
|
+
const formUtils = formUtilities(mergedProps, i18n);
|
|
33615
33663
|
const decideFields = (data2) => {
|
|
33616
|
-
var
|
|
33617
|
-
if ((
|
|
33664
|
+
var _a2, _b;
|
|
33665
|
+
if ((_a2 = data2.role) == null ? void 0 : _a2.includes("undefinedBeneficiary")) {
|
|
33618
33666
|
return ["role", "descriptionUndefinedBeneficiary"];
|
|
33619
33667
|
}
|
|
33620
33668
|
if ((_b = data2.role) == null ? void 0 : _b.length) {
|
|
33621
|
-
if (isOrganizationSettlorWithExemptionEnabled && isOrganizationAndSettlor(data2)) {
|
|
33669
|
+
if (props.isOrganizationSettlorWithExemptionEnabled && isOrganizationAndSettlor(data2)) {
|
|
33622
33670
|
return ["role", "entityType", "settlorExemptionReason", "country", "legalCompanyName"];
|
|
33623
33671
|
}
|
|
33624
33672
|
if (couldBeExemptSettlor(data2)) {
|
|
@@ -33646,31 +33694,31 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
33646
33694
|
defaultData,
|
|
33647
33695
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
33648
33696
|
});
|
|
33649
|
-
const availableRoles = allowMoreRolesForMainRootTrusteeEnabled && (existingTrustMember == null ? void 0 :
|
|
33697
|
+
const availableRoles = allowMoreRolesForMainRootTrusteeEnabled && ((_a = props.existingTrustMember) == null ? void 0 : _a.trustMemberType) === "rootTrustee" ? getAvailableRolesByTrustMemberTypeAndLegalEntityType(data.role, props.existingTrustMember) : getAvailableRoles(data.role);
|
|
33650
33698
|
useEffect(() => {
|
|
33651
33699
|
(async () => {
|
|
33652
|
-
var
|
|
33653
|
-
if (isOrganizationSettlorWithExemptionEnabled && existingTrustMember && existingTrustMember.trustMemberType === "exemptSettlor" && existingTrustMember.legalEntityId !== "isNewEntry" && existingTrustMember.roles !== void 0 && existingTrustMember.roles.length === 1 && existingTrustMember.roles[0] === "settlor" && getLegalEntityHandler) {
|
|
33654
|
-
const response = await getLegalEntityHandler(existingTrustMember.legalEntityId);
|
|
33655
|
-
const
|
|
33700
|
+
var _a2;
|
|
33701
|
+
if (props.isOrganizationSettlorWithExemptionEnabled && props.existingTrustMember && props.existingTrustMember.trustMemberType === "exemptSettlor" && props.existingTrustMember.legalEntityId !== "isNewEntry" && props.existingTrustMember.roles !== void 0 && props.existingTrustMember.roles.length === 1 && props.existingTrustMember.roles[0] === "settlor" && props.getLegalEntityHandler) {
|
|
33702
|
+
const response = await props.getLegalEntityHandler(props.existingTrustMember.legalEntityId);
|
|
33703
|
+
const country22 = (_a2 = response == null ? void 0 : response.organization) == null ? void 0 : _a2.registeredAddress.country;
|
|
33656
33704
|
if (response && response.organization) {
|
|
33657
|
-
handleChangeFor("country")(
|
|
33705
|
+
handleChangeFor("country")(country22);
|
|
33658
33706
|
}
|
|
33659
33707
|
}
|
|
33660
33708
|
})();
|
|
33661
33709
|
}, []);
|
|
33662
33710
|
useEffect(() => {
|
|
33663
|
-
var
|
|
33664
|
-
(
|
|
33711
|
+
var _a2;
|
|
33712
|
+
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, {
|
|
33665
33713
|
schema,
|
|
33666
33714
|
data,
|
|
33667
33715
|
errors,
|
|
33668
33716
|
valid,
|
|
33669
33717
|
isValid,
|
|
33670
|
-
dataStoreId:
|
|
33718
|
+
dataStoreId: props.id,
|
|
33671
33719
|
fieldProblems
|
|
33672
33720
|
});
|
|
33673
|
-
}, [schema, data, isValid, i18n, errors, valid,
|
|
33721
|
+
}, [schema, data, isValid, i18n, errors, valid, props.id, fieldProblems]);
|
|
33674
33722
|
const onInputDescription = (e) => {
|
|
33675
33723
|
const {
|
|
33676
33724
|
value
|
|
@@ -33686,9 +33734,9 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
33686
33734
|
}
|
|
33687
33735
|
};
|
|
33688
33736
|
const changeSettlorExemptionReasons = (exemptionReasons) => {
|
|
33689
|
-
var
|
|
33737
|
+
var _a2;
|
|
33690
33738
|
if (exemptionReasons.includes("noneOfTheAbove")) {
|
|
33691
|
-
handleChangeFor("settlorExemptionReason")(((
|
|
33739
|
+
handleChangeFor("settlorExemptionReason")(((_a2 = data.settlorExemptionReason) == null ? void 0 : _a2.includes("noneOfTheAbove")) ? exemptionReasons.filter((reason) => reason !== "noneOfTheAbove") : ["noneOfTheAbove"]);
|
|
33692
33740
|
return;
|
|
33693
33741
|
}
|
|
33694
33742
|
handleChangeFor("settlorExemptionReason")(exemptionReasons);
|
|
@@ -33707,8 +33755,8 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
33707
33755
|
setErrors("lastName", errors2.lastName);
|
|
33708
33756
|
};
|
|
33709
33757
|
const onEntityTypeChange = (value) => {
|
|
33710
|
-
var
|
|
33711
|
-
if (isOrganizationSettlorWithExemptionEnabled && value === LegalEntityType.ORGANIZATION && ((
|
|
33758
|
+
var _a2;
|
|
33759
|
+
if (props.isOrganizationSettlorWithExemptionEnabled && value === LegalEntityType.ORGANIZATION && ((_a2 = data.role) == null ? void 0 : _a2.length) === 1 && data.role[0] === "settlor") {
|
|
33712
33760
|
changeSettlorExemptionReasons(["professionalServiceProvider"]);
|
|
33713
33761
|
}
|
|
33714
33762
|
handleChangeFor("entityType")(value);
|
|
@@ -33746,7 +33794,7 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
33746
33794
|
errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
|
|
33747
33795
|
label: formUtils.getLabel("entityType", "whatTypeOfYourMembersEntity"),
|
|
33748
33796
|
classNameModifiers: ["entityType"],
|
|
33749
|
-
disabled: Boolean(existingTrustMember),
|
|
33797
|
+
disabled: Boolean(props.existingTrustMember),
|
|
33750
33798
|
children: (childProps) => jsx(RadioCardSelect, {
|
|
33751
33799
|
...childProps,
|
|
33752
33800
|
options: trustMemberLegalEntityTypes,
|
|
@@ -33806,8 +33854,8 @@ const TrustRoleAndEntityType = (props) => {
|
|
|
33806
33854
|
enterLastNameExactlyAsAppearInID: "enterSettlorsLastNameExactlyAsItAppearsInID"
|
|
33807
33855
|
},
|
|
33808
33856
|
onChange: onNameChange,
|
|
33809
|
-
dataStoreId:
|
|
33810
|
-
}) : void 0, isOrganizationSettlorWithExemptionEnabled && (schema == null ? void 0 : schema.includes("country")) && (schema == null ? void 0 : schema.includes("legalCompanyName")) ? jsxs(Fragment, {
|
|
33857
|
+
dataStoreId: props.id
|
|
33858
|
+
}) : void 0, props.isOrganizationSettlorWithExemptionEnabled && (schema == null ? void 0 : schema.includes("country")) && (schema == null ? void 0 : schema.includes("legalCompanyName")) ? jsxs(Fragment, {
|
|
33811
33859
|
children: [jsx(CountryField, {
|
|
33812
33860
|
data: formUtils.getFieldData(data, COUNTRY_FIELD),
|
|
33813
33861
|
valid: formUtils.getFieldValid(valid, COUNTRY_FIELD),
|
|
@@ -33946,7 +33994,8 @@ function RoleAndTypeDropinComponent({
|
|
|
33946
33994
|
navigateBack,
|
|
33947
33995
|
addOrUpdateTrustMember,
|
|
33948
33996
|
getLegalEntityHandler,
|
|
33949
|
-
isOrganizationSettlorWithExemptionEnabled
|
|
33997
|
+
isOrganizationSettlorWithExemptionEnabled,
|
|
33998
|
+
country: country2
|
|
33950
33999
|
}) {
|
|
33951
34000
|
var _a, _b;
|
|
33952
34001
|
const {
|
|
@@ -34039,7 +34088,8 @@ function RoleAndTypeDropinComponent({
|
|
|
34039
34088
|
onChange: onTrustMemberChange,
|
|
34040
34089
|
shouldValidate,
|
|
34041
34090
|
getLegalEntityHandler,
|
|
34042
|
-
isOrganizationSettlorWithExemptionEnabled
|
|
34091
|
+
isOrganizationSettlorWithExemptionEnabled,
|
|
34092
|
+
country: country2
|
|
34043
34093
|
})
|
|
34044
34094
|
}), isSummaryStep && jsx("div", {
|
|
34045
34095
|
className: "adyen-kyc-form-wrapper",
|
|
@@ -35974,7 +36024,8 @@ function DropinComposerComponent({
|
|
|
35974
36024
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
35975
36025
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
35976
36026
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
35977
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
36027
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
36028
|
+
trustedFieldsProvider: eligibleForSingpass && TrustedFieldsProvider.SINGPASS
|
|
35978
36029
|
});
|
|
35979
36030
|
case TaskTypes.COMPANY_SEARCH:
|
|
35980
36031
|
return jsx(CompanySearchDropinComponent, {
|
|
@@ -37018,10 +37069,11 @@ function AddTransferInstrument({
|
|
|
37018
37069
|
i18n
|
|
37019
37070
|
} = useI18nContext();
|
|
37020
37071
|
return jsxs(Fragment, {
|
|
37021
|
-
children: [jsx(
|
|
37022
|
-
|
|
37072
|
+
children: [jsx(Typography, {
|
|
37073
|
+
el: "h1",
|
|
37074
|
+
variant: "title-l",
|
|
37023
37075
|
children: i18n.get("bankDetails")
|
|
37024
|
-
}), jsx(
|
|
37076
|
+
}), jsx(Typography, {
|
|
37025
37077
|
children: i18n.get("addMissingBankDetails")
|
|
37026
37078
|
}), jsx(Button, {
|
|
37027
37079
|
label: i18n.get("addBankDetails"),
|
|
@@ -37119,8 +37171,9 @@ function ManageTransferInstrumentOverviewItem({
|
|
|
37119
37171
|
className: "adyen-kyc-manage-ti-overview-item__header",
|
|
37120
37172
|
children: [jsxs("div", {
|
|
37121
37173
|
className: "adyen-kyc-manage-ti-overview-item__title",
|
|
37122
|
-
children: [status, jsx(
|
|
37123
|
-
|
|
37174
|
+
children: [status, jsx(Typography, {
|
|
37175
|
+
el: "h2",
|
|
37176
|
+
variant: "title-m",
|
|
37124
37177
|
children: transferInstrumentReference.transferInstrument.accountIdentifier
|
|
37125
37178
|
})]
|
|
37126
37179
|
}), jsx("p", {
|
|
@@ -37359,6 +37412,30 @@ function OnboardingDropinComponent({
|
|
|
37359
37412
|
handleGetBankVerificationVendors: (country2) => getBankVerificationVendor2(country2, openBankingPartnerConfigId)
|
|
37360
37413
|
});
|
|
37361
37414
|
}
|
|
37415
|
+
var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
|
|
37416
|
+
HighExposurePagesEnums2["COMPANY_PAGE"] = "COMPANY_PAGE";
|
|
37417
|
+
HighExposurePagesEnums2["PARENT_COMPANY_PAGE"] = "PARENT_COMPANY_PAGE";
|
|
37418
|
+
HighExposurePagesEnums2["ULTIMATE_PARENT_COMPANY_PAGE"] = "ULTIMATE_PARENT_COMPANY_PAGE";
|
|
37419
|
+
return HighExposurePagesEnums2;
|
|
37420
|
+
})(HighExposurePagesEnums || {});
|
|
37421
|
+
const highExposureRadioItems = [{
|
|
37422
|
+
id: "Yes",
|
|
37423
|
+
name: "yes"
|
|
37424
|
+
}, {
|
|
37425
|
+
id: "No",
|
|
37426
|
+
name: "no"
|
|
37427
|
+
}];
|
|
37428
|
+
const highExposureParentRadioItems = [...highExposureRadioItems, {
|
|
37429
|
+
id: "I don't know",
|
|
37430
|
+
name: "iDontKnow"
|
|
37431
|
+
}];
|
|
37432
|
+
const validateLegalEntityIdentifier = (legalEntityIdentifier2, doesYourCompanyHaveLEI2, isDisabled) => {
|
|
37433
|
+
if (isDisabled) return true;
|
|
37434
|
+
const isRequired = doesYourCompanyHaveLEI2 === "Yes";
|
|
37435
|
+
const isValidLength = legalEntityIdentifier2 ? legalEntityIdentifier2.length === 20 : false;
|
|
37436
|
+
const hasLettersAndNumbers = legalEntityIdentifier2 ? /[a-zA-Z]/.test(legalEntityIdentifier2) && /[0-9]/.test(legalEntityIdentifier2) : false;
|
|
37437
|
+
return !isRequired || !isEmpty(legalEntityIdentifier2) && isValidLength && hasLettersAndNumbers;
|
|
37438
|
+
};
|
|
37362
37439
|
const highExposureCompanyDetailsValidations = {
|
|
37363
37440
|
country: {
|
|
37364
37441
|
modes: ["blur"],
|
|
@@ -37379,16 +37456,126 @@ const highExposureCompanyDetailsValidations = {
|
|
|
37379
37456
|
modes: ["blur"],
|
|
37380
37457
|
validate: (naceCode) => !isEmpty(naceCode),
|
|
37381
37458
|
errorMessage: "fieldIsRequired"
|
|
37459
|
+
},
|
|
37460
|
+
doesTheCompanyEarnMoreThanHalf: {
|
|
37461
|
+
modes: ["blur"],
|
|
37462
|
+
validate: (doesTheCompanyEarnMoreThanHalf2) => !isEmpty(doesTheCompanyEarnMoreThanHalf2),
|
|
37463
|
+
errorMessage: "fieldIsRequired"
|
|
37464
|
+
},
|
|
37465
|
+
doesYourCompanyHaveLEI: {
|
|
37466
|
+
modes: ["blur"],
|
|
37467
|
+
validate: (doesYourCompanyHaveLEI2) => !isEmpty(doesYourCompanyHaveLEI2),
|
|
37468
|
+
errorMessage: "fieldIsRequired"
|
|
37469
|
+
},
|
|
37470
|
+
legalEntityIdentifier: {
|
|
37471
|
+
modes: ["blur"],
|
|
37472
|
+
validate: (legalEntityIdentifier2, context) => {
|
|
37473
|
+
var _a, _b;
|
|
37474
|
+
return validateLegalEntityIdentifier(legalEntityIdentifier2, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesTheCompanyEarnMoreThanHalf);
|
|
37475
|
+
},
|
|
37476
|
+
errorMessage: "fieldIsRequired"
|
|
37477
|
+
},
|
|
37478
|
+
isCompanyOwnedByAnotherCompany: {
|
|
37479
|
+
modes: ["blur"],
|
|
37480
|
+
validate: (isCompanyOwnedByAnotherCompany2) => !isEmpty(isCompanyOwnedByAnotherCompany2),
|
|
37481
|
+
errorMessage: "fieldIsRequired"
|
|
37482
|
+
},
|
|
37483
|
+
isParentOwnedByAnotherCompany: {
|
|
37484
|
+
modes: ["blur"],
|
|
37485
|
+
validate: (isParentOwnedByAnotherCompany2, context) => {
|
|
37486
|
+
var _a, _b;
|
|
37487
|
+
return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) ? !isEmpty(isParentOwnedByAnotherCompany2) : true;
|
|
37488
|
+
},
|
|
37489
|
+
errorMessage: "fieldIsRequired"
|
|
37490
|
+
}
|
|
37491
|
+
};
|
|
37492
|
+
const highExposureParentCompanyDetailsValidations = {
|
|
37493
|
+
parentLegalName: {
|
|
37494
|
+
modes: ["blur"],
|
|
37495
|
+
validate: (parentLegalName) => !isEmpty(parentLegalName),
|
|
37496
|
+
errorMessage: "fieldIsRequired"
|
|
37497
|
+
},
|
|
37498
|
+
parentNumberOfEmployees: {
|
|
37499
|
+
modes: ["blur"],
|
|
37500
|
+
validate: (parentNumberOfEmployees) => !isEmpty(parentNumberOfEmployees),
|
|
37501
|
+
errorMessage: "fieldIsRequired"
|
|
37502
|
+
},
|
|
37503
|
+
parentLegalForm: {
|
|
37504
|
+
modes: ["blur"],
|
|
37505
|
+
validate: (parentLegalForm) => !isEmpty(parentLegalForm),
|
|
37506
|
+
errorMessage: "fieldIsRequired"
|
|
37507
|
+
},
|
|
37508
|
+
parentNaceCode: {
|
|
37509
|
+
modes: ["blur"],
|
|
37510
|
+
validate: (parentNaceCode) => !isEmpty(parentNaceCode),
|
|
37511
|
+
errorMessage: "fieldIsRequired"
|
|
37512
|
+
},
|
|
37513
|
+
doesTheParentCompanyEarnMoreThanHalf: {
|
|
37514
|
+
modes: ["blur"],
|
|
37515
|
+
validate: (doesTheParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheParentCompanyEarnMoreThanHalf),
|
|
37516
|
+
errorMessage: "fieldIsRequired"
|
|
37517
|
+
},
|
|
37518
|
+
doesYourParentCompanyHaveLEI: {
|
|
37519
|
+
modes: ["blur"],
|
|
37520
|
+
validate: (doesYourParentCompanyHaveLEI) => !isEmpty(doesYourParentCompanyHaveLEI),
|
|
37521
|
+
errorMessage: "fieldIsRequired"
|
|
37522
|
+
},
|
|
37523
|
+
parentLegalEntityIdentifier: {
|
|
37524
|
+
modes: ["blur"],
|
|
37525
|
+
validate: (parentLegalEntityIdentifier, context) => {
|
|
37526
|
+
var _a, _b, _c, _d;
|
|
37527
|
+
return validateLegalEntityIdentifier(parentLegalEntityIdentifier, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesYourParentCompanyHaveLEI, Boolean((_d = (_c = context == null ? void 0 : context.state) == null ? void 0 : _c.data) == null ? void 0 : _d.doesNotKnowParentNumberOfEmployees));
|
|
37528
|
+
},
|
|
37529
|
+
errorMessage: "fieldIsRequired"
|
|
37530
|
+
}
|
|
37531
|
+
};
|
|
37532
|
+
const highExposureUltimateParentCompanyDetailsValidations = {
|
|
37533
|
+
ultimateParentLegalName: {
|
|
37534
|
+
modes: ["blur"],
|
|
37535
|
+
validate: (ultimateParentLegalName) => !isEmpty(ultimateParentLegalName),
|
|
37536
|
+
errorMessage: "fieldIsRequired"
|
|
37537
|
+
},
|
|
37538
|
+
ultimateParentNumberOfEmployees: {
|
|
37539
|
+
modes: ["blur"],
|
|
37540
|
+
validate: (ultimateParentNumberOfEmployees) => !isEmpty(ultimateParentNumberOfEmployees),
|
|
37541
|
+
errorMessage: "fieldIsRequired"
|
|
37542
|
+
},
|
|
37543
|
+
ultimateParentLegalForm: {
|
|
37544
|
+
modes: ["blur"],
|
|
37545
|
+
validate: (ultimateParentLegalForm) => !isEmpty(ultimateParentLegalForm),
|
|
37546
|
+
errorMessage: "fieldIsRequired"
|
|
37547
|
+
},
|
|
37548
|
+
ultimateParentNaceCode: {
|
|
37549
|
+
modes: ["blur"],
|
|
37550
|
+
validate: (ultimateParentNaceCode) => !isEmpty(ultimateParentNaceCode),
|
|
37551
|
+
errorMessage: "fieldIsRequired"
|
|
37552
|
+
},
|
|
37553
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: {
|
|
37554
|
+
modes: ["blur"],
|
|
37555
|
+
validate: (doesTheUltimateParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheUltimateParentCompanyEarnMoreThanHalf),
|
|
37556
|
+
errorMessage: "fieldIsRequired"
|
|
37557
|
+
},
|
|
37558
|
+
doesYourUltimateParentCompanyHaveLEI: {
|
|
37559
|
+
modes: ["blur"],
|
|
37560
|
+
validate: (doesYourUltimateParentCompanyHaveLEI) => !isEmpty(doesYourUltimateParentCompanyHaveLEI),
|
|
37561
|
+
errorMessage: "fieldIsRequired"
|
|
37562
|
+
},
|
|
37563
|
+
ultimateParentLegalEntityIdentifier: {
|
|
37564
|
+
modes: ["blur"],
|
|
37565
|
+
validate: (ultimateParentLegalEntityIdentifier, context) => {
|
|
37566
|
+
var _a, _b, _c, _d;
|
|
37567
|
+
return validateLegalEntityIdentifier(ultimateParentLegalEntityIdentifier, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesYourUltimateParentCompanyHaveLEI, Boolean((_d = (_c = context == null ? void 0 : context.state) == null ? void 0 : _c.data) == null ? void 0 : _d.doesNotKnowUltimateParentNumberOfEmployees));
|
|
37568
|
+
},
|
|
37569
|
+
errorMessage: "fieldIsRequired"
|
|
37382
37570
|
}
|
|
37383
37571
|
};
|
|
37384
|
-
const LEGAL_FORM_FIELD = ["legalForm"];
|
|
37385
37572
|
const logger$8 = createLogger("LegalFormField");
|
|
37386
37573
|
function LegalFormField({
|
|
37387
37574
|
name = "legalForm",
|
|
37388
37575
|
data,
|
|
37389
37576
|
valid,
|
|
37390
|
-
|
|
37391
|
-
|
|
37577
|
+
errorMessage,
|
|
37578
|
+
label,
|
|
37392
37579
|
readonly,
|
|
37393
37580
|
handleChangeFor,
|
|
37394
37581
|
helperText,
|
|
@@ -37415,8 +37602,8 @@ function LegalFormField({
|
|
|
37415
37602
|
}, [countryCode]);
|
|
37416
37603
|
return jsx(Field, {
|
|
37417
37604
|
name,
|
|
37418
|
-
label:
|
|
37419
|
-
errorMessage
|
|
37605
|
+
label: label || i18n.get("businessStructure"),
|
|
37606
|
+
errorMessage,
|
|
37420
37607
|
classNameModifiers,
|
|
37421
37608
|
isValid: valid.legalForm,
|
|
37422
37609
|
helper: helperText == null ? void 0 : helperText.legalForm,
|
|
@@ -37431,14 +37618,13 @@ function LegalFormField({
|
|
|
37431
37618
|
})
|
|
37432
37619
|
});
|
|
37433
37620
|
}
|
|
37434
|
-
const NACE_CODE_FIELD = ["naceCode"];
|
|
37435
37621
|
const logger$7 = createLogger("NaceCodeField");
|
|
37436
37622
|
function NaceCodeField({
|
|
37437
37623
|
name = "naceCode",
|
|
37438
37624
|
data,
|
|
37439
37625
|
valid,
|
|
37440
|
-
|
|
37441
|
-
|
|
37626
|
+
errorMessage,
|
|
37627
|
+
label,
|
|
37442
37628
|
readonly,
|
|
37443
37629
|
handleChangeFor,
|
|
37444
37630
|
helperText,
|
|
@@ -37460,8 +37646,8 @@ function NaceCodeField({
|
|
|
37460
37646
|
}, []);
|
|
37461
37647
|
return jsx(Field, {
|
|
37462
37648
|
name,
|
|
37463
|
-
label:
|
|
37464
|
-
errorMessage
|
|
37649
|
+
label: label || i18n.get("industryAndNaceCode"),
|
|
37650
|
+
errorMessage,
|
|
37465
37651
|
classNameModifiers,
|
|
37466
37652
|
isValid: valid.naceCode,
|
|
37467
37653
|
helper: helperText == null ? void 0 : helperText.naceCode,
|
|
@@ -37483,58 +37669,238 @@ function HighExposureBusinessInformation({
|
|
|
37483
37669
|
errors,
|
|
37484
37670
|
fieldProblems,
|
|
37485
37671
|
handleChangeFor,
|
|
37486
|
-
country: country2
|
|
37672
|
+
country: country2,
|
|
37673
|
+
fieldMapping,
|
|
37674
|
+
targetPage,
|
|
37675
|
+
sectionHeading
|
|
37487
37676
|
}) {
|
|
37677
|
+
const {
|
|
37678
|
+
i18n
|
|
37679
|
+
} = useI18nContext();
|
|
37680
|
+
const getFieldName = (fieldKey) => fieldMapping[fieldKey] ?? fieldKey;
|
|
37681
|
+
const getFieldData = (fieldKey) => {
|
|
37682
|
+
const fieldData = data[getFieldName(fieldKey)];
|
|
37683
|
+
return fieldData ? fieldData.toString() : void 0;
|
|
37684
|
+
};
|
|
37685
|
+
const isMainCompany = targetPage === HighExposurePagesEnums.COMPANY_PAGE;
|
|
37488
37686
|
return jsxs(Fragment, {
|
|
37489
|
-
children: [jsx(
|
|
37687
|
+
children: [jsx(Typography, {
|
|
37688
|
+
el: "h3",
|
|
37689
|
+
variant: "title",
|
|
37690
|
+
children: i18n.get(sectionHeading || "yourBusinessDetails")
|
|
37691
|
+
}), !isMainCompany && jsx(Field, {
|
|
37692
|
+
name: getFieldName("legalName"),
|
|
37693
|
+
label: formUtils.getLabel(getFieldName("legalName"), "legalName"),
|
|
37694
|
+
classNameModifiers: ["legalName"],
|
|
37695
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalName"), errors, fieldProblems),
|
|
37696
|
+
isValid: valid[getFieldName("legalName")],
|
|
37697
|
+
children: (childProps) => jsx(InputText, {
|
|
37698
|
+
...childProps,
|
|
37699
|
+
name: getFieldName("legalName"),
|
|
37700
|
+
value: getFieldData("legalName"),
|
|
37701
|
+
readonly: false,
|
|
37702
|
+
classNameModifiers: ["legalName"],
|
|
37703
|
+
onInput: handleChangeFor(getFieldName("legalName"), "input"),
|
|
37704
|
+
onBlur: handleChangeFor(getFieldName("legalName"), "blur"),
|
|
37705
|
+
"aria-required": true,
|
|
37706
|
+
"aria-label": formUtils.getLabel(getFieldName("legalName")),
|
|
37707
|
+
"aria-invalid": !valid[getFieldName("legalName")]
|
|
37708
|
+
})
|
|
37709
|
+
}), jsx(LegalFormField, {
|
|
37710
|
+
name: getFieldName("legalForm"),
|
|
37490
37711
|
countryCode: country2,
|
|
37491
37712
|
data: {
|
|
37492
|
-
legalForm:
|
|
37713
|
+
legalForm: getFieldData("legalForm")
|
|
37493
37714
|
},
|
|
37494
37715
|
valid: {
|
|
37495
|
-
legalForm: valid
|
|
37716
|
+
legalForm: valid[getFieldName("legalForm")]
|
|
37496
37717
|
},
|
|
37497
|
-
|
|
37498
|
-
handleChangeFor: () => handleChangeFor("legalForm", "blur"),
|
|
37718
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalForm"), errors, fieldProblems),
|
|
37719
|
+
handleChangeFor: () => handleChangeFor(getFieldName("legalForm"), "blur"),
|
|
37499
37720
|
readonly: false,
|
|
37500
|
-
|
|
37501
|
-
legalForm: "businessStructure"
|
|
37502
|
-
})
|
|
37721
|
+
label: formUtils.getLabel(getFieldName("legalForm"), "businessStructure")
|
|
37503
37722
|
}), jsx(NaceCodeField, {
|
|
37723
|
+
name: getFieldName("naceCode"),
|
|
37504
37724
|
data: {
|
|
37505
|
-
naceCode:
|
|
37725
|
+
naceCode: getFieldData("naceCode")
|
|
37506
37726
|
},
|
|
37507
37727
|
valid: {
|
|
37508
|
-
naceCode: valid
|
|
37728
|
+
naceCode: valid[getFieldName("naceCode")]
|
|
37509
37729
|
},
|
|
37510
|
-
|
|
37511
|
-
handleChangeFor: () => handleChangeFor("naceCode", "blur"),
|
|
37730
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("naceCode"), errors, fieldProblems),
|
|
37731
|
+
handleChangeFor: () => handleChangeFor(getFieldName("naceCode"), "blur"),
|
|
37512
37732
|
readonly: false,
|
|
37513
|
-
|
|
37514
|
-
naceCode: "industryAndNaceCode"
|
|
37515
|
-
})
|
|
37733
|
+
label: formUtils.getLabel(getFieldName("naceCode"), "industryAndNaceCode")
|
|
37516
37734
|
}), jsx(Field, {
|
|
37517
|
-
name: "numberOfEmployees",
|
|
37518
|
-
label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
|
|
37735
|
+
name: getFieldName("numberOfEmployees"),
|
|
37736
|
+
label: formUtils.getLabel(getFieldName("numberOfEmployees"), "numberOfEmployees"),
|
|
37519
37737
|
classNameModifiers: ["legalName"],
|
|
37520
|
-
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
|
|
37521
|
-
isValid: valid
|
|
37738
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("numberOfEmployees"), errors, fieldProblems),
|
|
37739
|
+
isValid: valid[getFieldName("numberOfEmployees")],
|
|
37522
37740
|
children: (childProps) => jsx(InputText, {
|
|
37523
37741
|
...childProps,
|
|
37524
|
-
name: "numberOfEmployees",
|
|
37525
|
-
value:
|
|
37526
|
-
readonly:
|
|
37742
|
+
name: getFieldName("numberOfEmployees"),
|
|
37743
|
+
value: getFieldData("numberOfEmployees"),
|
|
37744
|
+
readonly: false,
|
|
37527
37745
|
classNameModifiers: ["legalName"],
|
|
37528
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
37529
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
37746
|
+
onInput: handleChangeFor(getFieldName("numberOfEmployees"), "input"),
|
|
37747
|
+
onBlur: handleChangeFor(getFieldName("numberOfEmployees"), "blur"),
|
|
37748
|
+
"aria-required": true,
|
|
37749
|
+
"aria-label": formUtils.getLabel(getFieldName("numberOfEmployees")),
|
|
37750
|
+
"aria-invalid": !valid[getFieldName("numberOfEmployees")]
|
|
37751
|
+
})
|
|
37752
|
+
}), jsx(Field, {
|
|
37753
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
37754
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
37755
|
+
label: i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
37756
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesTheCompanyEarnMoreThanHalf"), errors, fieldProblems),
|
|
37757
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
37758
|
+
...childProps,
|
|
37759
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
37760
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
37761
|
+
value: getFieldData("doesTheCompanyEarnMoreThanHalf"),
|
|
37762
|
+
disabled: false,
|
|
37763
|
+
onChange: handleChangeFor(getFieldName("doesTheCompanyEarnMoreThanHalf")),
|
|
37764
|
+
"aria-required": true,
|
|
37765
|
+
"aria-label": i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
37766
|
+
"aria-invalid": !valid[getFieldName("doesTheCompanyEarnMoreThanHalf")]
|
|
37767
|
+
})
|
|
37768
|
+
}), jsx(Field, {
|
|
37769
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
37770
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
37771
|
+
label: i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
37772
|
+
helper: jsxs("div", {
|
|
37773
|
+
children: [jsx("span", {
|
|
37774
|
+
children: i18n.get("anLEIIsAUniqueCode")
|
|
37775
|
+
}), " ", jsx(Link, {
|
|
37776
|
+
href: "https://search.gleif.org/#/search/",
|
|
37777
|
+
external: true,
|
|
37778
|
+
className: ["adyen-kyc__high-exposure-link"],
|
|
37779
|
+
children: i18n.get("lookUpYourLEI")
|
|
37780
|
+
})]
|
|
37781
|
+
}),
|
|
37782
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesYourCompanyHaveLEI"), errors, fieldProblems),
|
|
37783
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
37784
|
+
...childProps,
|
|
37785
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
37786
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
37787
|
+
value: getFieldData("doesYourCompanyHaveLEI"),
|
|
37788
|
+
disabled: false,
|
|
37789
|
+
onChange: handleChangeFor(getFieldName("doesYourCompanyHaveLEI")),
|
|
37530
37790
|
"aria-required": true,
|
|
37531
|
-
"aria-label":
|
|
37532
|
-
"aria-invalid": !valid
|
|
37791
|
+
"aria-label": i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
37792
|
+
"aria-invalid": !valid[getFieldName("doesYourCompanyHaveLEI")]
|
|
37793
|
+
})
|
|
37794
|
+
}), getFieldData("doesYourCompanyHaveLEI") === "Yes" && jsxs(Fragment, {
|
|
37795
|
+
children: [jsx(Field, {
|
|
37796
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
37797
|
+
label: formUtils.getLabel(getFieldName("legalEntityIdentifier"), "legalEntityIdentifier"),
|
|
37798
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalEntityIdentifier"), errors, fieldProblems),
|
|
37799
|
+
isValid: valid.legalEntityIdentifier,
|
|
37800
|
+
helper: i18n.get("enterNCharactersWithAMixForExample", {
|
|
37801
|
+
values: {
|
|
37802
|
+
numChars: 20,
|
|
37803
|
+
example: "529900T8BM49AURSDO55"
|
|
37804
|
+
}
|
|
37805
|
+
}),
|
|
37806
|
+
helperPosition: "below",
|
|
37807
|
+
children: (childProps) => jsx(InputText, {
|
|
37808
|
+
...childProps,
|
|
37809
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
37810
|
+
value: getFieldData("legalEntityIdentifier"),
|
|
37811
|
+
readonly: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
37812
|
+
classNameModifiers: ["legalName"],
|
|
37813
|
+
onInput: handleChangeFor(getFieldName("legalEntityIdentifier"), "input"),
|
|
37814
|
+
onBlur: handleChangeFor(getFieldName("legalEntityIdentifier"), "blur"),
|
|
37815
|
+
"aria-required": true,
|
|
37816
|
+
"aria-label": formUtils.getLabel(getFieldName("legalEntityIdentifier")),
|
|
37817
|
+
"aria-invalid": !valid[getFieldName("legalEntityIdentifier")],
|
|
37818
|
+
isValid: valid[getFieldName("legalEntityIdentifier")]
|
|
37819
|
+
})
|
|
37820
|
+
}), !isMainCompany && jsx(Checkbox, {
|
|
37821
|
+
name: getFieldName("doesNotKnowNumberOfEmployees"),
|
|
37822
|
+
label: i18n.get("iDontKnow"),
|
|
37823
|
+
value: getFieldData("doesNotKnowNumberOfEmployees"),
|
|
37824
|
+
readonly: false,
|
|
37825
|
+
classNameModifiers: ["exempted-from-tax"],
|
|
37826
|
+
checked: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
37827
|
+
onChange: handleChangeFor(getFieldName("doesNotKnowNumberOfEmployees")),
|
|
37828
|
+
"aria-required": false,
|
|
37829
|
+
"aria-label": i18n.get("iDontKnow"),
|
|
37830
|
+
"aria-invalid": false
|
|
37831
|
+
})]
|
|
37832
|
+
})]
|
|
37833
|
+
});
|
|
37834
|
+
}
|
|
37835
|
+
function HighExposureOwnershipStructure({
|
|
37836
|
+
formUtils,
|
|
37837
|
+
data,
|
|
37838
|
+
valid,
|
|
37839
|
+
errors,
|
|
37840
|
+
fieldProblems,
|
|
37841
|
+
handleChangeFor,
|
|
37842
|
+
legalEntity
|
|
37843
|
+
}) {
|
|
37844
|
+
const {
|
|
37845
|
+
i18n
|
|
37846
|
+
} = useI18nContext();
|
|
37847
|
+
return jsxs(Fragment, {
|
|
37848
|
+
children: [jsx(Typography, {
|
|
37849
|
+
el: "h3",
|
|
37850
|
+
variant: "title",
|
|
37851
|
+
children: i18n.get("ownershipStructure")
|
|
37852
|
+
}), jsx(Field, {
|
|
37853
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
37854
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
37855
|
+
label: i18n.get("isCompanyOwnedByAnotherCompany", {
|
|
37856
|
+
values: {
|
|
37857
|
+
company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : ""
|
|
37858
|
+
}
|
|
37859
|
+
}),
|
|
37860
|
+
errorMessage: formUtils.getErrorMessage("isCompanyOwnedByAnotherCompany", errors, fieldProblems),
|
|
37861
|
+
helper: i18n.get("thisMeansYouHaveAParentCompany"),
|
|
37862
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
37863
|
+
...childProps,
|
|
37864
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
37865
|
+
items: highExposureRadioItems,
|
|
37866
|
+
value: data.isCompanyOwnedByAnotherCompany,
|
|
37867
|
+
disabled: false,
|
|
37868
|
+
onChange: handleChangeFor("isCompanyOwnedByAnotherCompany"),
|
|
37869
|
+
"aria-required": true,
|
|
37870
|
+
"aria-label": formUtils.getLabel("isCompanyOwnedByAnotherCompany"),
|
|
37871
|
+
"aria-invalid": !valid.isCompanyOwnedByAnotherCompany
|
|
37872
|
+
})
|
|
37873
|
+
}), (data == null ? void 0 : data.isCompanyOwnedByAnotherCompany) === "Yes" && jsx(Field, {
|
|
37874
|
+
name: "isParentOwnedByAnotherCompany",
|
|
37875
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
37876
|
+
label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
37877
|
+
helper: i18n.get("thisMeansYouHaveAnUltimateParentCompany"),
|
|
37878
|
+
errorMessage: formUtils.getErrorMessage("isParentOwnedByAnotherCompany", errors, fieldProblems),
|
|
37879
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
37880
|
+
...childProps,
|
|
37881
|
+
name: "isParentOwnedByAnotherCompany",
|
|
37882
|
+
items: highExposureRadioItems,
|
|
37883
|
+
value: data.isParentOwnedByAnotherCompany,
|
|
37884
|
+
disabled: false,
|
|
37885
|
+
onChange: handleChangeFor("isParentOwnedByAnotherCompany"),
|
|
37886
|
+
"aria-required": true,
|
|
37887
|
+
"aria-label": formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
37888
|
+
"aria-invalid": !valid.doesYourCompanyHaveLEI
|
|
37533
37889
|
})
|
|
37534
37890
|
})]
|
|
37535
37891
|
});
|
|
37536
37892
|
}
|
|
37537
|
-
const
|
|
37893
|
+
const companyFieldMapping = {
|
|
37894
|
+
legalForm: "legalForm",
|
|
37895
|
+
naceCode: "naceCode",
|
|
37896
|
+
numberOfEmployees: "numberOfEmployees",
|
|
37897
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37898
|
+
doesYourCompanyHaveLEI: "doesYourCompanyHaveLEI",
|
|
37899
|
+
legalEntityIdentifier: "legalEntityIdentifier",
|
|
37900
|
+
isCompanyOwnedByAnotherCompany: "isCompanyOwnedByAnotherCompany",
|
|
37901
|
+
isParentOwnedByAnotherCompany: "isParentOwnedByAnotherCompany"
|
|
37902
|
+
};
|
|
37903
|
+
const highExposureCompanyDetailsFields = Object.values(companyFieldMapping);
|
|
37538
37904
|
function AdditionalFieldsForHighExposureCompany(props) {
|
|
37539
37905
|
const {
|
|
37540
37906
|
i18n
|
|
@@ -37555,6 +37921,7 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
37555
37921
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
37556
37922
|
});
|
|
37557
37923
|
const formUtils = formUtilities(props, i18n);
|
|
37924
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
37558
37925
|
const {
|
|
37559
37926
|
updateStateSlice
|
|
37560
37927
|
} = useGlobalDataSlice("company");
|
|
@@ -37567,9 +37934,19 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
37567
37934
|
});
|
|
37568
37935
|
}, [data, valid, errors, fieldProblems]);
|
|
37569
37936
|
return jsxs("form", {
|
|
37570
|
-
className: "adyen-
|
|
37571
|
-
children: [jsx(
|
|
37572
|
-
|
|
37937
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37938
|
+
children: [jsx(Typography, {
|
|
37939
|
+
el: "h1",
|
|
37940
|
+
variant: "title-l",
|
|
37941
|
+
children: i18n.get("additionalInformationIsRequiredForLoan")
|
|
37942
|
+
}), jsx(Typography, {
|
|
37943
|
+
el: "p",
|
|
37944
|
+
variant: "body",
|
|
37945
|
+
children: i18n.get("beforeYourCapitalLoanApplicationCanBeSubmitted")
|
|
37946
|
+
}), jsx(Typography, {
|
|
37947
|
+
el: "p",
|
|
37948
|
+
variant: "body",
|
|
37949
|
+
children: i18n.get("euFinancialRegulationsRequireUs")
|
|
37573
37950
|
}), jsx(ErrorPanel, {
|
|
37574
37951
|
verificationErrors: props.formVerificationErrors,
|
|
37575
37952
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
@@ -37577,21 +37954,39 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
37577
37954
|
id: "ariaErrorField"
|
|
37578
37955
|
}), jsx(HighExposureBusinessInformation, {
|
|
37579
37956
|
...props,
|
|
37580
|
-
handleChangeFor,
|
|
37957
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
37581
37958
|
errors,
|
|
37582
37959
|
data,
|
|
37583
37960
|
valid,
|
|
37584
37961
|
country: props.country,
|
|
37585
37962
|
formUtils,
|
|
37963
|
+
fieldProblems,
|
|
37964
|
+
targetPage: HighExposurePagesEnums.COMPANY_PAGE,
|
|
37965
|
+
fieldMapping: companyFieldMapping
|
|
37966
|
+
}), jsx(HighExposureOwnershipStructure, {
|
|
37967
|
+
...props,
|
|
37968
|
+
handleChangeFor,
|
|
37969
|
+
errors,
|
|
37970
|
+
data,
|
|
37971
|
+
valid,
|
|
37972
|
+
legalEntity: props.legalEntity,
|
|
37973
|
+
formUtils,
|
|
37586
37974
|
fieldProblems
|
|
37587
37975
|
})]
|
|
37588
37976
|
});
|
|
37589
37977
|
}
|
|
37590
|
-
const
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
|
|
37978
|
+
const parentCompanyFieldMapping$1 = {
|
|
37979
|
+
legalName: "parentLegalName",
|
|
37980
|
+
legalForm: "parentLegalForm",
|
|
37981
|
+
naceCode: "parentNaceCode",
|
|
37982
|
+
numberOfEmployees: "parentNumberOfEmployees",
|
|
37983
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheParentCompanyEarnMoreThanHalf",
|
|
37984
|
+
doesYourCompanyHaveLEI: "doesYourParentCompanyHaveLEI",
|
|
37985
|
+
legalEntityIdentifier: "parentLegalEntityIdentifier",
|
|
37986
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowParentNumberOfEmployees"
|
|
37987
|
+
};
|
|
37988
|
+
const highExposureParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping$1);
|
|
37989
|
+
function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
37595
37990
|
const {
|
|
37596
37991
|
i18n
|
|
37597
37992
|
} = useI18nContext();
|
|
@@ -37603,14 +37998,15 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
37603
37998
|
fieldProblems
|
|
37604
37999
|
} = useForm({
|
|
37605
38000
|
...props,
|
|
37606
|
-
schema:
|
|
38001
|
+
schema: highExposureParentCompanyDetailsFields,
|
|
37607
38002
|
defaultData: {
|
|
37608
38003
|
...props.data
|
|
37609
38004
|
},
|
|
37610
|
-
rules: props.validators ||
|
|
38005
|
+
rules: props.validators || highExposureParentCompanyDetailsValidations,
|
|
37611
38006
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
37612
38007
|
});
|
|
37613
38008
|
const formUtils = formUtilities(props, i18n);
|
|
38009
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
37614
38010
|
const {
|
|
37615
38011
|
updateStateSlice
|
|
37616
38012
|
} = useGlobalDataSlice("parentCompany");
|
|
@@ -37623,39 +38019,47 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
37623
38019
|
});
|
|
37624
38020
|
}, [data, valid, errors, fieldProblems]);
|
|
37625
38021
|
return jsxs("form", {
|
|
37626
|
-
className: "adyen-
|
|
37627
|
-
children: [jsx(
|
|
37628
|
-
|
|
38022
|
+
className: "adyen-kyc__high-exposure-company",
|
|
38023
|
+
children: [jsx(Typography, {
|
|
38024
|
+
el: "h1",
|
|
38025
|
+
variant: "title-l",
|
|
38026
|
+
children: i18n.get("parentCompanyInformation")
|
|
38027
|
+
}), jsx(Typography, {
|
|
38028
|
+
el: "p",
|
|
38029
|
+
variant: "body",
|
|
38030
|
+
children: i18n.get("inTheLastStepOwnedByAParentCompany")
|
|
37629
38031
|
}), jsx(ErrorPanel, {
|
|
37630
38032
|
verificationErrors: props.formVerificationErrors,
|
|
37631
38033
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
37632
38034
|
formUtils,
|
|
37633
38035
|
id: "ariaErrorField"
|
|
37634
|
-
}),
|
|
37635
|
-
|
|
37636
|
-
|
|
37637
|
-
|
|
37638
|
-
|
|
37639
|
-
|
|
37640
|
-
|
|
37641
|
-
|
|
37642
|
-
|
|
37643
|
-
|
|
37644
|
-
|
|
37645
|
-
|
|
37646
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
37647
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
37648
|
-
"aria-required": true,
|
|
37649
|
-
"aria-label": formUtils.getLabel("numberOfEmployees"),
|
|
37650
|
-
"aria-invalid": !valid.numberOfEmployees
|
|
37651
|
-
})
|
|
38036
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
38037
|
+
...props,
|
|
38038
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
38039
|
+
sectionHeading: "businessInformation",
|
|
38040
|
+
errors,
|
|
38041
|
+
data,
|
|
38042
|
+
valid,
|
|
38043
|
+
country: props.country,
|
|
38044
|
+
formUtils,
|
|
38045
|
+
fieldProblems,
|
|
38046
|
+
targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE,
|
|
38047
|
+
fieldMapping: parentCompanyFieldMapping$1
|
|
37652
38048
|
})]
|
|
37653
38049
|
});
|
|
37654
38050
|
}
|
|
37655
|
-
|
|
37656
|
-
|
|
37657
|
-
|
|
37658
|
-
|
|
38051
|
+
const parentCompanyFieldMapping = {
|
|
38052
|
+
legalName: "ultimateParentLegalName",
|
|
38053
|
+
legalForm: "ultimateParentLegalForm",
|
|
38054
|
+
naceCode: "ultimateParentNaceCode",
|
|
38055
|
+
numberOfEmployees: "ultimateParentNumberOfEmployees",
|
|
38056
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheUltimateParentCompanyEarnMoreThanHalf",
|
|
38057
|
+
doesYourCompanyHaveLEI: "doesYourUltimateParentCompanyHaveLEI",
|
|
38058
|
+
legalEntityIdentifier: "ultimateParentLegalEntityIdentifier",
|
|
38059
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowUltimateParentNumberOfEmployees"
|
|
38060
|
+
};
|
|
38061
|
+
const highExposureUltimateParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping);
|
|
38062
|
+
function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
|
|
37659
38063
|
const {
|
|
37660
38064
|
i18n
|
|
37661
38065
|
} = useI18nContext();
|
|
@@ -37667,14 +38071,15 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
37667
38071
|
fieldProblems
|
|
37668
38072
|
} = useForm({
|
|
37669
38073
|
...props,
|
|
37670
|
-
schema:
|
|
38074
|
+
schema: highExposureUltimateParentCompanyDetailsFields,
|
|
37671
38075
|
defaultData: {
|
|
37672
38076
|
...props.data
|
|
37673
38077
|
},
|
|
37674
|
-
rules: props.validators ||
|
|
38078
|
+
rules: props.validators || highExposureUltimateParentCompanyDetailsValidations,
|
|
37675
38079
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
37676
38080
|
});
|
|
37677
38081
|
const formUtils = formUtilities(props, i18n);
|
|
38082
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
37678
38083
|
const {
|
|
37679
38084
|
updateStateSlice
|
|
37680
38085
|
} = useGlobalDataSlice("ultimateParentCompany");
|
|
@@ -37687,32 +38092,32 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
37687
38092
|
});
|
|
37688
38093
|
}, [data, valid, errors, fieldProblems]);
|
|
37689
38094
|
return jsxs("form", {
|
|
37690
|
-
className: "adyen-
|
|
37691
|
-
children: [jsx(
|
|
37692
|
-
|
|
38095
|
+
className: "adyen-kyc__high-exposure-company",
|
|
38096
|
+
children: [jsx(Typography, {
|
|
38097
|
+
el: "h1",
|
|
38098
|
+
variant: "title-l",
|
|
38099
|
+
children: i18n.get("ultimateParentCompanyInformation")
|
|
38100
|
+
}), jsx(Typography, {
|
|
38101
|
+
el: "p",
|
|
38102
|
+
variant: "body",
|
|
38103
|
+
children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany")
|
|
37693
38104
|
}), jsx(ErrorPanel, {
|
|
37694
38105
|
verificationErrors: props.formVerificationErrors,
|
|
37695
38106
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
37696
38107
|
formUtils,
|
|
37697
38108
|
id: "ariaErrorField"
|
|
37698
|
-
}),
|
|
37699
|
-
|
|
37700
|
-
|
|
37701
|
-
|
|
37702
|
-
|
|
37703
|
-
|
|
37704
|
-
|
|
37705
|
-
|
|
37706
|
-
|
|
37707
|
-
|
|
37708
|
-
|
|
37709
|
-
|
|
37710
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
37711
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
37712
|
-
"aria-required": true,
|
|
37713
|
-
"aria-label": formUtils.getLabel("numberOfEmployees"),
|
|
37714
|
-
"aria-invalid": !valid.numberOfEmployees
|
|
37715
|
-
})
|
|
38109
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
38110
|
+
...props,
|
|
38111
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
38112
|
+
sectionHeading: "businessInformation",
|
|
38113
|
+
errors,
|
|
38114
|
+
data,
|
|
38115
|
+
valid,
|
|
38116
|
+
country: props.country,
|
|
38117
|
+
formUtils,
|
|
38118
|
+
fieldProblems,
|
|
38119
|
+
targetPage: HighExposurePagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
38120
|
+
fieldMapping: parentCompanyFieldMapping
|
|
37716
38121
|
})]
|
|
37717
38122
|
});
|
|
37718
38123
|
}
|
|
@@ -37743,20 +38148,15 @@ function HighExposureDropinComponent(props) {
|
|
|
37743
38148
|
const highExposureCompanyDetailsFormProps = getFormProps(props, companyFormId);
|
|
37744
38149
|
const highExposureParentCompanyDetailsFormProps = getFormProps(props, parentCompanyFormId);
|
|
37745
38150
|
const highExposureUltimateParentCompanyDetailsFormProps = getFormProps(props, ultimateParentCompanyFormId);
|
|
37746
|
-
const renderActiveForm = (activeForm) =>
|
|
38151
|
+
const renderActiveForm = (activeForm) => jsx("div", {
|
|
37747
38152
|
className: "adyen-kyc",
|
|
37748
|
-
children:
|
|
37749
|
-
page: "High exposure company details page",
|
|
37750
|
-
titleId: "whyDoINeedToFillInThisInformation",
|
|
37751
|
-
contentId: "euFinancialRegulationsRequireUs",
|
|
37752
|
-
title: i18n.get("whyDoINeedToFillInThisInformation"),
|
|
37753
|
-
content: i18n.get("euFinancialRegulationsRequireUs")
|
|
37754
|
-
}), jsxs("div", {
|
|
38153
|
+
children: jsxs("div", {
|
|
37755
38154
|
className: "adyen-kyc-form-wrapper",
|
|
37756
38155
|
children: [activeForm.formId === companyFormId && jsx(AdditionalFieldsForHighExposureCompany, {
|
|
37757
38156
|
...highExposureCompanyDetailsFormProps,
|
|
37758
38157
|
legalEntityId: props.legalEntityId,
|
|
37759
|
-
|
|
38158
|
+
legalEntity: props.legalEntity,
|
|
38159
|
+
heading: i18n.get("yourBusinessDetails"),
|
|
37760
38160
|
id: companyFormId,
|
|
37761
38161
|
country: props.country
|
|
37762
38162
|
}), activeForm.formId === parentCompanyFormId && jsx(AdditionalFieldsForHighExposureParentCompany, {
|
|
@@ -37772,7 +38172,7 @@ function HighExposureDropinComponent(props) {
|
|
|
37772
38172
|
id: companyFormId,
|
|
37773
38173
|
country: props.country
|
|
37774
38174
|
})]
|
|
37775
|
-
})
|
|
38175
|
+
})
|
|
37776
38176
|
});
|
|
37777
38177
|
return jsx("div", {
|
|
37778
38178
|
className: "adyen-kyc",
|
|
@@ -37787,6 +38187,24 @@ const customLabels = {
|
|
|
37787
38187
|
company: {
|
|
37788
38188
|
legalForm: "businessStructure",
|
|
37789
38189
|
naceCode: "industryAndNaceCode"
|
|
38190
|
+
},
|
|
38191
|
+
parentCompany: {
|
|
38192
|
+
parentLegalName: "legalName",
|
|
38193
|
+
parentLegalForm: "businessStructure",
|
|
38194
|
+
parentNaceCode: "industryAndNaceCode",
|
|
38195
|
+
parentNumberOfEmployees: "numberOfEmployees",
|
|
38196
|
+
doesTheParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
38197
|
+
doesYourParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
38198
|
+
parentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
38199
|
+
},
|
|
38200
|
+
ultimateParentCompany: {
|
|
38201
|
+
ultimateParentLegalName: "legalName",
|
|
38202
|
+
ultimateParentLegalForm: "businessStructure",
|
|
38203
|
+
ultimateParentNaceCode: "industryAndNaceCode",
|
|
38204
|
+
ultimateParentNumberOfEmployees: "numberOfEmployees",
|
|
38205
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
38206
|
+
doesYourUltimateParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
38207
|
+
ultimateParentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
37790
38208
|
}
|
|
37791
38209
|
};
|
|
37792
38210
|
function UpdateLegalEntityForHighExposure({
|
|
@@ -37800,16 +38218,17 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37800
38218
|
hideDropinLayout,
|
|
37801
38219
|
handleHomeClick,
|
|
37802
38220
|
homeButtonLabel,
|
|
37803
|
-
legalEntityId
|
|
38221
|
+
legalEntityId,
|
|
38222
|
+
legalEntity: legalEntityProps
|
|
37804
38223
|
}) {
|
|
37805
|
-
var _a;
|
|
38224
|
+
var _a, _b, _c;
|
|
37806
38225
|
const {
|
|
37807
38226
|
getLegalEntity: getLegalEntity2
|
|
37808
38227
|
} = useComponentApi(legalEntityId);
|
|
37809
38228
|
const {
|
|
37810
38229
|
i18n
|
|
37811
38230
|
} = useI18nContext();
|
|
37812
|
-
const [legalEntity, setLegalEntity] = useState();
|
|
38231
|
+
const [legalEntity, setLegalEntity] = useState(legalEntityProps);
|
|
37813
38232
|
const fetchLegalEntity = useCallback(async () => {
|
|
37814
38233
|
const legalEntityResponse = await getLegalEntity2(legalEntityId);
|
|
37815
38234
|
setLegalEntity(legalEntityResponse);
|
|
@@ -37834,6 +38253,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37834
38253
|
} = useToastContext();
|
|
37835
38254
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
37836
38255
|
const formRef = useRef(null);
|
|
38256
|
+
const [highExposureRequiredForms, setHighExposureRequiredForms] = useState(highExposureForms);
|
|
37837
38257
|
const getConfigurationData = useCallback(() => getConfiguration2({
|
|
37838
38258
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
37839
38259
|
capabilities,
|
|
@@ -37860,10 +38280,33 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37860
38280
|
});
|
|
37861
38281
|
onChange == null ? void 0 : onChange(currentState);
|
|
37862
38282
|
}, [currentState]);
|
|
38283
|
+
useEffect(() => {
|
|
38284
|
+
var _a2, _b2;
|
|
38285
|
+
const showParentCompany = ((_a2 = data == null ? void 0 : data.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
|
|
38286
|
+
const showUltimateParentCompany = ((_b2 = data == null ? void 0 : data.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
|
|
38287
|
+
let updateForms = {
|
|
38288
|
+
company: {
|
|
38289
|
+
...highExposureForms.company
|
|
38290
|
+
}
|
|
38291
|
+
};
|
|
38292
|
+
if (showParentCompany) {
|
|
38293
|
+
updateForms = {
|
|
38294
|
+
...updateForms,
|
|
38295
|
+
parentCompany: highExposureForms.parentCompany
|
|
38296
|
+
};
|
|
38297
|
+
}
|
|
38298
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
38299
|
+
updateForms = {
|
|
38300
|
+
...updateForms,
|
|
38301
|
+
ultimateParentCompany: highExposureForms.ultimateParentCompany
|
|
38302
|
+
};
|
|
38303
|
+
}
|
|
38304
|
+
setHighExposureRequiredForms(updateForms);
|
|
38305
|
+
}, [(_a = data == null ? void 0 : data.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany, (_b = data == null ? void 0 : data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany]);
|
|
37863
38306
|
const forms2 = useMemo(() => {
|
|
37864
|
-
const requiredForms = getRequiredForms(
|
|
38307
|
+
const requiredForms = getRequiredForms(highExposureRequiredForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
37865
38308
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
37866
|
-
}, [derivedProps, formValidity, problems]);
|
|
38309
|
+
}, [derivedProps == null ? void 0 : derivedProps.optionalFields, derivedProps == null ? void 0 : derivedProps.requiredFields, formValidity, highExposureRequiredForms, problems]);
|
|
37867
38310
|
const onSubmit = async () => {
|
|
37868
38311
|
setLoadingStatus("loading");
|
|
37869
38312
|
const exposureDetails = mapHighExposureToLegalEntity(data);
|
|
@@ -37928,7 +38371,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37928
38371
|
onSubmit
|
|
37929
38372
|
});
|
|
37930
38373
|
return jsx(FormWrapper, {
|
|
37931
|
-
taskName: "
|
|
38374
|
+
taskName: "progress",
|
|
37932
38375
|
handleNextClick,
|
|
37933
38376
|
handleBackClick,
|
|
37934
38377
|
gotoFormByFormIndex,
|
|
@@ -37954,10 +38397,11 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37954
38397
|
activeForm,
|
|
37955
38398
|
capabilities,
|
|
37956
38399
|
data,
|
|
37957
|
-
country: ((
|
|
38400
|
+
country: ((_c = data == null ? void 0 : data.company) == null ? void 0 : _c.country) ?? country2,
|
|
37958
38401
|
problems,
|
|
37959
38402
|
shouldValidate,
|
|
37960
|
-
ref: formRef
|
|
38403
|
+
ref: formRef,
|
|
38404
|
+
legalEntity
|
|
37961
38405
|
})
|
|
37962
38406
|
});
|
|
37963
38407
|
}
|
|
@@ -38632,7 +39076,7 @@ const ConfigurationApiProvider = ({
|
|
|
38632
39076
|
isEmbeddedDropin,
|
|
38633
39077
|
loadingContext
|
|
38634
39078
|
} = authContext;
|
|
38635
|
-
const sdkVersion = "3.
|
|
39079
|
+
const sdkVersion = "3.21.0";
|
|
38636
39080
|
useAnalytics({
|
|
38637
39081
|
onUserEvent,
|
|
38638
39082
|
legalEntityId: rootLegalEntityId,
|
|
@@ -38811,7 +39255,8 @@ const settingsDefaults = {
|
|
|
38811
39255
|
hideOnboardingIntroductionTrust: true,
|
|
38812
39256
|
hideOnboardingIntroductionSoleProprietor: true,
|
|
38813
39257
|
viewOnboardingGuidance: false,
|
|
38814
|
-
transferInstrumentLimit: 0
|
|
39258
|
+
transferInstrumentLimit: 0,
|
|
39259
|
+
instantBankVerification: true
|
|
38815
39260
|
};
|
|
38816
39261
|
function SettingsProvider({
|
|
38817
39262
|
children,
|
|
@@ -39016,8 +39461,7 @@ const Toast = ({
|
|
|
39016
39461
|
onToastAction
|
|
39017
39462
|
}) => {
|
|
39018
39463
|
const toastRef = useRef(null);
|
|
39019
|
-
const
|
|
39020
|
-
const successToast = type === "loading";
|
|
39464
|
+
const isLoading = type === "loading";
|
|
39021
39465
|
const labelId = getUniqueId("toast");
|
|
39022
39466
|
const handleShow = useCallback(() => {
|
|
39023
39467
|
var _a;
|
|
@@ -39034,52 +39478,49 @@ const Toast = ({
|
|
|
39034
39478
|
setTimeout(() => handleHide(), duration);
|
|
39035
39479
|
}
|
|
39036
39480
|
}, [label, duration, handleHide, handleShow]);
|
|
39481
|
+
const statusClassMap = Object.freeze({
|
|
39482
|
+
info: "",
|
|
39483
|
+
loading: "adyen-kyc-toast__loading",
|
|
39484
|
+
success: "adyen-kyc-toast__success",
|
|
39485
|
+
error: "adyen-kyc-toast__error"
|
|
39486
|
+
});
|
|
39037
39487
|
return jsxs("div", {
|
|
39038
39488
|
ref: toastRef,
|
|
39039
39489
|
role: actionLabel ? "alertdialog" : "alert",
|
|
39040
|
-
className:
|
|
39490
|
+
className: `adyen-kyc-toast ${statusClassMap[type]}`,
|
|
39041
39491
|
"aria-labelledby": labelId,
|
|
39042
|
-
children: [
|
|
39492
|
+
children: [isLoading && jsx("div", {
|
|
39043
39493
|
className: "adyen-kyc-toast__loader",
|
|
39044
|
-
children: jsx(
|
|
39045
|
-
|
|
39494
|
+
children: jsx(Spinner, {
|
|
39495
|
+
size: "small"
|
|
39046
39496
|
})
|
|
39047
|
-
}), !loading2 && jsxs("div", {
|
|
39048
|
-
className: cx("adyen-kyc-toast__status", {
|
|
39049
|
-
"adyen-kyc-toast__status--success": successToast,
|
|
39050
|
-
"adyen-kyc-toast__status--error": !successToast
|
|
39051
|
-
}),
|
|
39052
|
-
children: [successToast && jsx(Icon, {
|
|
39053
|
-
className: "adyen-kyc-toast__status-icon",
|
|
39054
|
-
name: "checkmark"
|
|
39055
|
-
}), !successToast && jsx(Icon, {
|
|
39056
|
-
className: "adyen-kyc-toast__status-icon",
|
|
39057
|
-
name: "cross"
|
|
39058
|
-
})]
|
|
39059
39497
|
}), jsxs("div", {
|
|
39060
39498
|
className: "adyen-kyc-toast__message",
|
|
39061
39499
|
children: [jsx("span", {
|
|
39062
39500
|
id: labelId,
|
|
39063
39501
|
className: "adyen-kyc-toast__title",
|
|
39064
39502
|
children: label
|
|
39065
|
-
}),
|
|
39066
|
-
className: "adyen-kyc-link adyen-kyc-toast__action",
|
|
39067
|
-
title: "performAction",
|
|
39068
|
-
type: "button",
|
|
39069
|
-
onClick: onToastAction,
|
|
39070
|
-
children: actionLabel
|
|
39071
|
-
}), !loading2 && subLabel && jsx("span", {
|
|
39503
|
+
}), !isLoading && subLabel && jsx("span", {
|
|
39072
39504
|
className: "adyen-kyc-toast__subtitle",
|
|
39073
39505
|
children: subLabel
|
|
39074
39506
|
})]
|
|
39075
|
-
}),
|
|
39076
|
-
className: "adyen-kyc-
|
|
39077
|
-
|
|
39078
|
-
|
|
39079
|
-
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39507
|
+
}), jsxs("div", {
|
|
39508
|
+
className: "adyen-kyc-toast__actions",
|
|
39509
|
+
children: [!isLoading && jsx("button", {
|
|
39510
|
+
className: "adyen-kyc-toast__close",
|
|
39511
|
+
title: "close",
|
|
39512
|
+
type: "button",
|
|
39513
|
+
onClick: handleHide,
|
|
39514
|
+
children: jsx(Icon, {
|
|
39515
|
+
name: "cross"
|
|
39516
|
+
})
|
|
39517
|
+
}), actionLabel && jsx(Button, {
|
|
39518
|
+
onClick: onToastAction ?? noop,
|
|
39519
|
+
className: "adyen-kyc-link adyen-kyc-toast__action adyen-kyc-u-margin-right-8",
|
|
39520
|
+
title: "performAction",
|
|
39521
|
+
label: actionLabel,
|
|
39522
|
+
tertiary: true
|
|
39523
|
+
})]
|
|
39083
39524
|
})]
|
|
39084
39525
|
});
|
|
39085
39526
|
};
|
|
@@ -40090,18 +40531,12 @@ const validateCoreOptions = (coreOptions) => {
|
|
|
40090
40531
|
if (!(coreOptions.sdkToken && coreOptions.getSdkToken) && !coreOptions.clientKey) {
|
|
40091
40532
|
throw new Error(`
|
|
40092
40533
|
|
|
40093
|
-
|
|
40094
|
-
|
|
40095
|
-
|
|
40096
|
-
- For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component`);
|
|
40534
|
+
Missing or invalid parameters. Specify either the sdkToken and getSdkToken handler or a clientKey in your request to initialize the component.`);
|
|
40097
40535
|
}
|
|
40098
40536
|
if (missing.length > 0) {
|
|
40099
40537
|
throw new Error(`
|
|
40100
40538
|
|
|
40101
|
-
|
|
40102
|
-
|
|
40103
|
-
- For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component
|
|
40104
|
-
`);
|
|
40539
|
+
Missing or invalid parameters. Specify ${listify(missing)} in your request to initialize the component.`);
|
|
40105
40540
|
}
|
|
40106
40541
|
};
|
|
40107
40542
|
const validateComponentOptions = (componentName, options) => {
|