@adyen/kyc-components 2.46.1 → 2.47.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 +796 -357
- package/dist/style.css +836 -1264
- 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/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +1 -1
- package/dist/types/components/Individual/types.d.ts +1 -1
- 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/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/Spinner/index.d.ts +0 -1
- 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";
|
|
@@ -451,7 +452,6 @@ const issuedInTheLastXMonths = "Issued in the last %{number} months";
|
|
|
451
452
|
const bankAccountVerification = "Bank account verification";
|
|
452
453
|
const bankStatementDocument = "Bank statement";
|
|
453
454
|
const requirements = "Requirements:";
|
|
454
|
-
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.";
|
|
455
455
|
const whyDoINeedToFillInThisInformation = "Why do I need to fill in this information?";
|
|
456
456
|
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.";
|
|
457
457
|
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.";
|
|
@@ -465,7 +465,6 @@ const controllingPersonGuideDescription = "A <strong>controlling person</strong>
|
|
|
465
465
|
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.";
|
|
466
466
|
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.";
|
|
467
467
|
const someoneAppointedToManageACompanysBusinessAndAffairs = "Someone appointed to manage a company's business and affairs.";
|
|
468
|
-
const whatIfDocumentIsMoreThan12MonthsOld = "What if my document is more than 12 months old?";
|
|
469
468
|
const depositSlip = "Deposit slip";
|
|
470
469
|
const screenshotOfOnlineBankingEnviroment = "Screenshot of online banking environment";
|
|
471
470
|
const officialEmailOrALetterFromYourBank = "Official email or a letter from your bank";
|
|
@@ -1354,7 +1353,6 @@ const startANewSessionFromTheSamePlaceYouOriginallyAccessed = "Start a new sessi
|
|
|
1354
1353
|
const differentCountryOfGoverningLaw = "This company has a different country/region of governing law";
|
|
1355
1354
|
const countryOfGoverningLaw = "Country/region of governing law";
|
|
1356
1355
|
const nationalInsuranceNumber = "National Insurance Number (NINO)";
|
|
1357
|
-
const detailsForCapital = "Details for capital";
|
|
1358
1356
|
const parentCompany = "Parent company";
|
|
1359
1357
|
const ultimateParentCompany = "Ultimate parent company";
|
|
1360
1358
|
const numberOfEmployees = "Number of employees";
|
|
@@ -1365,6 +1363,28 @@ const businessStructure = "Business structure";
|
|
|
1365
1363
|
const selectOne = "Select one";
|
|
1366
1364
|
const industryAndNaceCode = "Industry and NACE code";
|
|
1367
1365
|
const youMustXYearsOldToContinue = "You must be at least %{minimumAge} years old to continue";
|
|
1366
|
+
const doesTheCompanyEarnMoreThanHalf = "Does the company earn more than 50% of its income from selling goods or non-financial services?";
|
|
1367
|
+
const doesYourCompanyHaveLEI = "Does your company have a Legal Entity Identifier (LEI)?";
|
|
1368
|
+
const anLEIIsAUniqueCode = "An LEI is a unique code that identifies legal entities, including companies, who engage in financial transactions.";
|
|
1369
|
+
const lookUpYourLEI = "Look up your LEI.";
|
|
1370
|
+
const legalEntityIdentifier = "Legal Entity Identifier (LEI)";
|
|
1371
|
+
const yourBusinessDetails = "Your business details";
|
|
1372
|
+
const progress = "Progress";
|
|
1373
|
+
const ownershipStructure = "Ownership structure";
|
|
1374
|
+
const isCompanyOwnedByAnotherCompany = "Is %{company} owned by another company?";
|
|
1375
|
+
const isParentOwnedByAnotherCompany = "Is your parent company owned by another company?";
|
|
1376
|
+
const thisMeansYouHaveAParentCompany = "If yes, this means you have a parent company, such as a global headquarters or a holding company.";
|
|
1377
|
+
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.";
|
|
1378
|
+
const additionalInformationIsRequiredForLoan = "Additional information is required to complete your capital loan application.";
|
|
1379
|
+
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.";
|
|
1380
|
+
const legalName = "Legal name";
|
|
1381
|
+
const businessInformation = "Business information";
|
|
1382
|
+
const parentCompanyInformation = "Parent company information";
|
|
1383
|
+
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.";
|
|
1384
|
+
const ultimateParentCompanyInformation = "Ultimate parent company information";
|
|
1385
|
+
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.";
|
|
1386
|
+
const doesThisCompanyHaveLEI = "Does this company have a Legal Entity Identifier (LEI)?";
|
|
1387
|
+
const iDontKnow = "I don't know";
|
|
1368
1388
|
const defaultTrans = {
|
|
1369
1389
|
smartling,
|
|
1370
1390
|
close,
|
|
@@ -1584,6 +1604,7 @@ const defaultTrans = {
|
|
|
1584
1604
|
shareholderDocument,
|
|
1585
1605
|
role,
|
|
1586
1606
|
selectAllTheRolesThatThisDecisionMakerHolds,
|
|
1607
|
+
selectedSomeRolesBasedOnMyinfo,
|
|
1587
1608
|
selectTheApplicableRoles,
|
|
1588
1609
|
back,
|
|
1589
1610
|
next,
|
|
@@ -1778,7 +1799,6 @@ const defaultTrans = {
|
|
|
1778
1799
|
bankAccountVerification,
|
|
1779
1800
|
bankStatementDocument,
|
|
1780
1801
|
requirements,
|
|
1781
|
-
ifDocumentMoreThan12months,
|
|
1782
1802
|
whyDoINeedToFillInThisInformation,
|
|
1783
1803
|
reasonForFillingCompanyRegistrationDetails,
|
|
1784
1804
|
reasonForFillingCompanyAddressDetails,
|
|
@@ -1792,7 +1812,6 @@ const defaultTrans = {
|
|
|
1792
1812
|
signatoryGuideDescription,
|
|
1793
1813
|
directorGuideDescription,
|
|
1794
1814
|
someoneAppointedToManageACompanysBusinessAndAffairs,
|
|
1795
|
-
whatIfDocumentIsMoreThan12MonthsOld,
|
|
1796
1815
|
depositSlip,
|
|
1797
1816
|
screenshotOfOnlineBankingEnviroment,
|
|
1798
1817
|
officialEmailOrALetterFromYourBank,
|
|
@@ -2691,7 +2710,6 @@ const defaultTrans = {
|
|
|
2691
2710
|
differentCountryOfGoverningLaw,
|
|
2692
2711
|
countryOfGoverningLaw,
|
|
2693
2712
|
nationalInsuranceNumber,
|
|
2694
|
-
detailsForCapital,
|
|
2695
2713
|
parentCompany,
|
|
2696
2714
|
ultimateParentCompany,
|
|
2697
2715
|
numberOfEmployees,
|
|
@@ -2701,7 +2719,29 @@ const defaultTrans = {
|
|
|
2701
2719
|
businessStructure,
|
|
2702
2720
|
selectOne,
|
|
2703
2721
|
industryAndNaceCode,
|
|
2704
|
-
youMustXYearsOldToContinue
|
|
2722
|
+
youMustXYearsOldToContinue,
|
|
2723
|
+
doesTheCompanyEarnMoreThanHalf,
|
|
2724
|
+
doesYourCompanyHaveLEI,
|
|
2725
|
+
anLEIIsAUniqueCode,
|
|
2726
|
+
lookUpYourLEI,
|
|
2727
|
+
legalEntityIdentifier,
|
|
2728
|
+
yourBusinessDetails,
|
|
2729
|
+
progress,
|
|
2730
|
+
ownershipStructure,
|
|
2731
|
+
isCompanyOwnedByAnotherCompany,
|
|
2732
|
+
isParentOwnedByAnotherCompany,
|
|
2733
|
+
thisMeansYouHaveAParentCompany,
|
|
2734
|
+
thisMeansYouHaveAnUltimateParentCompany,
|
|
2735
|
+
additionalInformationIsRequiredForLoan,
|
|
2736
|
+
beforeYourCapitalLoanApplicationCanBeSubmitted,
|
|
2737
|
+
legalName,
|
|
2738
|
+
businessInformation,
|
|
2739
|
+
parentCompanyInformation,
|
|
2740
|
+
inTheLastStepOwnedByAParentCompany,
|
|
2741
|
+
ultimateParentCompanyInformation,
|
|
2742
|
+
inThePreviousStepOwnedByAnUltimateParentCompany,
|
|
2743
|
+
doesThisCompanyHaveLEI,
|
|
2744
|
+
iDontKnow
|
|
2705
2745
|
};
|
|
2706
2746
|
const FALLBACK_LOCALE = "en-US";
|
|
2707
2747
|
const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
|
|
@@ -3566,19 +3606,6 @@ function getFormProps(props, innerFormId) {
|
|
|
3566
3606
|
shouldValidate: (activeFormId ? activeFormId === innerFormId : true) && props.shouldValidate
|
|
3567
3607
|
};
|
|
3568
3608
|
}
|
|
3569
|
-
function removeFormLayer(obj, formId) {
|
|
3570
|
-
if (!obj) {
|
|
3571
|
-
return obj;
|
|
3572
|
-
}
|
|
3573
|
-
const formIdWithDelimiter = `${formId}.`;
|
|
3574
|
-
return Object.entries(obj).reduce((acc, [key, value]) => {
|
|
3575
|
-
const newKey = key.startsWith(formIdWithDelimiter) ? key.substring(formIdWithDelimiter.length, key.length) : key;
|
|
3576
|
-
return {
|
|
3577
|
-
...acc,
|
|
3578
|
-
[newKey]: value
|
|
3579
|
-
};
|
|
3580
|
-
}, {});
|
|
3581
|
-
}
|
|
3582
3609
|
function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
3583
3610
|
const newProps = getFormProps(props, innerFormId);
|
|
3584
3611
|
if (newProps === null) {
|
|
@@ -3591,6 +3618,16 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
|
3591
3618
|
helperText,
|
|
3592
3619
|
masks
|
|
3593
3620
|
} = newProps;
|
|
3621
|
+
const {
|
|
3622
|
+
readOnlyFields,
|
|
3623
|
+
requiredFields,
|
|
3624
|
+
optionalFields,
|
|
3625
|
+
obscuredFields,
|
|
3626
|
+
verifyFields,
|
|
3627
|
+
problems,
|
|
3628
|
+
validators: validators2,
|
|
3629
|
+
shouldValidate
|
|
3630
|
+
} = props;
|
|
3594
3631
|
return {
|
|
3595
3632
|
placeholders,
|
|
3596
3633
|
labels: labels2,
|
|
@@ -3598,15 +3635,15 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
|
|
|
3598
3635
|
helperText,
|
|
3599
3636
|
masks,
|
|
3600
3637
|
// maintain the structure of the special fields
|
|
3601
|
-
readOnlyFields
|
|
3602
|
-
requiredFields
|
|
3603
|
-
optionalFields
|
|
3604
|
-
obscuredFields
|
|
3605
|
-
verifyFields
|
|
3638
|
+
readOnlyFields,
|
|
3639
|
+
requiredFields,
|
|
3640
|
+
optionalFields,
|
|
3641
|
+
obscuredFields,
|
|
3642
|
+
verifyFields,
|
|
3606
3643
|
// the rest we just pass along for now, as they will be eventually be processed by getFormProps
|
|
3607
|
-
problems
|
|
3608
|
-
validators:
|
|
3609
|
-
shouldValidate
|
|
3644
|
+
problems,
|
|
3645
|
+
validators: validators2,
|
|
3646
|
+
shouldValidate
|
|
3610
3647
|
};
|
|
3611
3648
|
}
|
|
3612
3649
|
function getFieldProps(props, innerFormFields) {
|
|
@@ -4546,12 +4583,10 @@ const Loader = ({
|
|
|
4546
4583
|
});
|
|
4547
4584
|
const Tag = ({
|
|
4548
4585
|
className,
|
|
4549
|
-
|
|
4586
|
+
variant = "blue",
|
|
4550
4587
|
children
|
|
4551
4588
|
}) => {
|
|
4552
|
-
const classNames = cx("adyen-kyc-tag", className, {
|
|
4553
|
-
"adyen-kyc-tag--basic": isBasic
|
|
4554
|
-
});
|
|
4589
|
+
const classNames = cx("adyen-kyc-tag", className, `adyen-kyc-tag--${variant}`);
|
|
4555
4590
|
return jsx("span", {
|
|
4556
4591
|
className: classNames,
|
|
4557
4592
|
children
|
|
@@ -4706,13 +4741,29 @@ const SelectButtonContentMulti = ({
|
|
|
4706
4741
|
className: "adyen-kyc-dropdown-selected-items",
|
|
4707
4742
|
children: active.map((item) => jsx(Tag, {
|
|
4708
4743
|
className: item.className,
|
|
4709
|
-
|
|
4744
|
+
variant: "grey",
|
|
4710
4745
|
children: (item == null ? void 0 : item.selectedOptionName) || (item == null ? void 0 : item.name) || placeholder
|
|
4711
4746
|
}, item.id))
|
|
4712
4747
|
}) : jsx("span", {
|
|
4713
4748
|
className: "adyen-kyc-dropdown-button__text adyen-kyc-dropdown-button__text--placeholder",
|
|
4714
4749
|
children: placeholder
|
|
4715
4750
|
});
|
|
4751
|
+
const Typography = ({
|
|
4752
|
+
el = "p",
|
|
4753
|
+
variant = "body",
|
|
4754
|
+
color = "primary",
|
|
4755
|
+
className,
|
|
4756
|
+
children,
|
|
4757
|
+
...props
|
|
4758
|
+
}) => {
|
|
4759
|
+
const TypographyElement = el;
|
|
4760
|
+
const classNames = cx(className, "adyen-kyc-typography", `adyen-kyc-typography--${color}`, `adyen-kyc-typography--${variant}`);
|
|
4761
|
+
return jsx(TypographyElement, {
|
|
4762
|
+
...props,
|
|
4763
|
+
className: classNames,
|
|
4764
|
+
children
|
|
4765
|
+
});
|
|
4766
|
+
};
|
|
4716
4767
|
function Checkbox({
|
|
4717
4768
|
classNameModifiers = [],
|
|
4718
4769
|
label,
|
|
@@ -4789,10 +4840,14 @@ const SelectListItem = ({
|
|
|
4789
4840
|
className: "adyen-kyc-dropdown-element__icon",
|
|
4790
4841
|
children: item.icon
|
|
4791
4842
|
}), item.description ? jsxs(Fragment, {
|
|
4792
|
-
children: [jsx(
|
|
4793
|
-
|
|
4843
|
+
children: [jsx(Typography, {
|
|
4844
|
+
el: "span",
|
|
4845
|
+
variant: "body-strongest",
|
|
4846
|
+
className: "adyen-kyc-dropdown-element__label",
|
|
4794
4847
|
children: item.name
|
|
4795
|
-
}), jsx(
|
|
4848
|
+
}), jsx(Typography, {
|
|
4849
|
+
el: "span",
|
|
4850
|
+
color: "secondary",
|
|
4796
4851
|
className: "adyen-kyc-dropdown-element-description__text",
|
|
4797
4852
|
children: item.description
|
|
4798
4853
|
})]
|
|
@@ -5772,7 +5827,7 @@ function CompanyNameAndCountry(props) {
|
|
|
5772
5827
|
labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
|
|
5773
5828
|
country: "countryRegionOfEstablishment"
|
|
5774
5829
|
}),
|
|
5775
|
-
readonly: !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
|
|
5830
|
+
readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
|
|
5776
5831
|
classNameModifiers: ["country"],
|
|
5777
5832
|
allowedCountries: mergedProps.isTopLevelEntity ? allowedCountries : void 0,
|
|
5778
5833
|
handleChangeFor: handleChangeForCountries
|
|
@@ -8424,7 +8479,8 @@ function BusinessRegistrationNumber(props) {
|
|
|
8424
8479
|
registrationNumberType
|
|
8425
8480
|
}, defaultFieldMetadata$9);
|
|
8426
8481
|
const mergedProps = mergeFieldMetadataIntoProps("registrationNumber", metadata, {
|
|
8427
|
-
requiredFields: schema
|
|
8482
|
+
requiredFields: schema,
|
|
8483
|
+
readOnlyFields: props.readOnlyFields
|
|
8428
8484
|
});
|
|
8429
8485
|
const {
|
|
8430
8486
|
handleChangeFor,
|
|
@@ -11390,7 +11446,7 @@ function isEmptyEntity(legalEntity) {
|
|
|
11390
11446
|
const sortedFieldsOnEntity = fieldsOnEntity.toSorted();
|
|
11391
11447
|
return sortedFieldsOnEntity.every((value, index) => value === sortedMinimumFields[index]);
|
|
11392
11448
|
}
|
|
11393
|
-
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "
|
|
11449
|
+
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
|
|
11394
11450
|
const entityTypeToCorrespondingAccountHolderOption = {
|
|
11395
11451
|
[LegalEntityType.INDIVIDUAL]: "myName",
|
|
11396
11452
|
[LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
|
|
@@ -12473,7 +12529,8 @@ function FieldContainer(props) {
|
|
|
12473
12529
|
trimOnBlur,
|
|
12474
12530
|
hideField,
|
|
12475
12531
|
maxlength,
|
|
12476
|
-
handleChangeFor
|
|
12532
|
+
handleChangeFor,
|
|
12533
|
+
readOnly
|
|
12477
12534
|
} = props;
|
|
12478
12535
|
const formUtils = formUtilities(props, i18n);
|
|
12479
12536
|
const errorMessage = formUtils.getErrorMessage(fieldName, errors, fieldProblems);
|
|
@@ -12495,7 +12552,7 @@ function FieldContainer(props) {
|
|
|
12495
12552
|
labels: {
|
|
12496
12553
|
country: formUtils.getLabel(field)
|
|
12497
12554
|
},
|
|
12498
|
-
readonly:
|
|
12555
|
+
readonly: readOnly,
|
|
12499
12556
|
classNameModifiers,
|
|
12500
12557
|
className: hideField ? "adyen-kyc-u-display-none" : "",
|
|
12501
12558
|
handleChangeFor
|
|
@@ -12514,7 +12571,7 @@ function FieldContainer(props) {
|
|
|
12514
12571
|
labels: {
|
|
12515
12572
|
stateOrProvince: formUtils.getLabel(field)
|
|
12516
12573
|
},
|
|
12517
|
-
readonly:
|
|
12574
|
+
readonly: readOnly,
|
|
12518
12575
|
classNameModifiers,
|
|
12519
12576
|
selectedCountry: data.country,
|
|
12520
12577
|
handleChangeFor
|
|
@@ -12537,7 +12594,8 @@ function FieldContainer(props) {
|
|
|
12537
12594
|
"aria-required": true,
|
|
12538
12595
|
"aria-label": props == null ? void 0 : props["aria-label"],
|
|
12539
12596
|
"aria-invalid": !valid[field],
|
|
12540
|
-
trimOnBlur
|
|
12597
|
+
trimOnBlur,
|
|
12598
|
+
readonly: readOnly
|
|
12541
12599
|
})
|
|
12542
12600
|
});
|
|
12543
12601
|
}
|
|
@@ -13386,7 +13444,7 @@ function RegistrationAddressComponent(props) {
|
|
|
13386
13444
|
readOnlyFields: registrationAddressReadOnlyFields,
|
|
13387
13445
|
obscuredFields: registrationAddressObscuredFields,
|
|
13388
13446
|
verifyFields: registrationAddressVerifyFields
|
|
13389
|
-
} = getFormProps(props,
|
|
13447
|
+
} = getFormProps(props, registrationAddressFormID);
|
|
13390
13448
|
const {
|
|
13391
13449
|
data: formData,
|
|
13392
13450
|
valid: formValid,
|
|
@@ -13584,29 +13642,15 @@ const GuidanceContent$1 = ({
|
|
|
13584
13642
|
})
|
|
13585
13643
|
})]
|
|
13586
13644
|
})]
|
|
13587
|
-
}) : jsxs(
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
children: [
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
children:
|
|
13595
|
-
|
|
13596
|
-
}), jsx(ListItem, {
|
|
13597
|
-
children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
|
|
13598
|
-
values: {
|
|
13599
|
-
numberOfMonths: 12
|
|
13600
|
-
}
|
|
13601
|
-
})
|
|
13602
|
-
})]
|
|
13603
|
-
})]
|
|
13604
|
-
}), jsx(ContextGuidance, {
|
|
13605
|
-
page: "Company registration document",
|
|
13606
|
-
titleId: "whatIfDocumentIsMoreThan12MonthsOld",
|
|
13607
|
-
contentId: "ifDocumentMoreThan12months",
|
|
13608
|
-
title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
|
|
13609
|
-
content: i18n.get("ifDocumentMoreThan12months")
|
|
13645
|
+
}) : jsxs("div", {
|
|
13646
|
+
className: "adyen-kyc-u-margin-bottom-24",
|
|
13647
|
+
children: [jsxs("strong", {
|
|
13648
|
+
children: [" ", i18n.get("documentRequirements")]
|
|
13649
|
+
}), jsx(List, {
|
|
13650
|
+
className: "adyen-kyc-upload-field__requirements",
|
|
13651
|
+
children: jsx(ListItem, {
|
|
13652
|
+
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
13653
|
+
})
|
|
13610
13654
|
})]
|
|
13611
13655
|
})
|
|
13612
13656
|
});
|
|
@@ -13721,9 +13765,9 @@ const GuidanceContent = ({
|
|
|
13721
13765
|
})]
|
|
13722
13766
|
}) : jsxs("div", {
|
|
13723
13767
|
className: "adyen-kyc-u-margin-bottom-24",
|
|
13724
|
-
children: [
|
|
13768
|
+
children: [jsx("div", {
|
|
13725
13769
|
className: "adyen-kyc-upload-field__subtitle",
|
|
13726
|
-
children:
|
|
13770
|
+
children: i18n.get("documentRequirements")
|
|
13727
13771
|
}), jsxs(List, {
|
|
13728
13772
|
className: "adyen-kyc-upload-field__requirements",
|
|
13729
13773
|
children: [jsx(ListItem, {
|
|
@@ -14308,7 +14352,7 @@ const mandatoryApiFields = {
|
|
|
14308
14352
|
ORGANIZATION: ["companyNameAndCountry.legalCompanyName", "companyNameAndCountry.country"],
|
|
14309
14353
|
SOLE_PROPRIETORSHIP: ["solePropNameAndCountry.legalCompanyName", "solePropNameAndCountry.country"],
|
|
14310
14354
|
TRUST: ["trustRegistrationDetails.legalName", "trustRegistrationDetails.country"],
|
|
14311
|
-
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.
|
|
14355
|
+
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.parentNumberOfEmployees", "ultimateParentCompany.ultimateParentNumberOfEmployees"]
|
|
14312
14356
|
};
|
|
14313
14357
|
const individualObscuredFields = ["personalDetails.idNumber", "personalDetails.idNumberExempt"];
|
|
14314
14358
|
const individualBaseMapping = {
|
|
@@ -16825,60 +16869,60 @@ const roleMetadata = {
|
|
|
16825
16869
|
[DecisionMakerType.CONTROLLING_PERSON]: {
|
|
16826
16870
|
name: "controllingPerson",
|
|
16827
16871
|
description: "controllingPersonDescription",
|
|
16828
|
-
|
|
16872
|
+
variant: "teal"
|
|
16829
16873
|
},
|
|
16830
16874
|
[DecisionMakerType.OWNER]: {
|
|
16831
16875
|
name: "owner",
|
|
16832
16876
|
description: "ownerDescription",
|
|
16833
|
-
|
|
16877
|
+
variant: "red"
|
|
16834
16878
|
},
|
|
16835
16879
|
[DecisionMakerType.SIGNATORY]: {
|
|
16836
16880
|
name: "signatory",
|
|
16837
16881
|
description: "signatoryDescription",
|
|
16838
|
-
|
|
16882
|
+
variant: "green"
|
|
16839
16883
|
},
|
|
16840
16884
|
[DecisionMakerType.DIRECTOR]: {
|
|
16841
16885
|
name: "director",
|
|
16842
16886
|
description: "directorDescription",
|
|
16843
|
-
|
|
16887
|
+
variant: "orange"
|
|
16844
16888
|
},
|
|
16845
16889
|
[TrustMemberTypes.DEFINED_BENEFICIARY]: {
|
|
16846
16890
|
name: "definedBeneficiary",
|
|
16847
16891
|
description: "definedBeneficiaryDescription",
|
|
16848
|
-
|
|
16892
|
+
variant: "orange"
|
|
16849
16893
|
},
|
|
16850
16894
|
[TrustMemberTypes.UNDEFINED_BENEFICIARY]: {
|
|
16851
16895
|
name: "undefinedBeneficiary",
|
|
16852
16896
|
description: "undefinedBeneficiaryDescription",
|
|
16853
|
-
|
|
16897
|
+
variant: "orange"
|
|
16854
16898
|
},
|
|
16855
16899
|
[TrustMemberTypes.PROTECTOR]: {
|
|
16856
16900
|
name: "protector",
|
|
16857
16901
|
description: "personAppointmentUnderTrustInstrument",
|
|
16858
|
-
|
|
16902
|
+
variant: "orange"
|
|
16859
16903
|
},
|
|
16860
16904
|
[TrustMemberTypes.TRUSTEE]: {
|
|
16861
16905
|
name: "trustee",
|
|
16862
16906
|
description: "legalOwnerOfProperty",
|
|
16863
|
-
|
|
16907
|
+
variant: "green"
|
|
16864
16908
|
},
|
|
16865
16909
|
[TrustMemberTypes.SETTLOR]: {
|
|
16866
16910
|
name: "settlor",
|
|
16867
16911
|
description: "entityEstablishingTrust",
|
|
16868
|
-
|
|
16912
|
+
variant: "orange"
|
|
16869
16913
|
},
|
|
16870
16914
|
[TrustMemberGuidanceLabel.BENEFICIARY]: {
|
|
16871
16915
|
name: TrustMemberGuidanceLabel.BENEFICIARY,
|
|
16872
|
-
|
|
16916
|
+
variant: "orange"
|
|
16873
16917
|
},
|
|
16874
16918
|
[TrustMemberGuidanceLabel.TRUSTEE]: {
|
|
16875
16919
|
name: TrustMemberGuidanceLabel.TRUSTEE,
|
|
16876
|
-
|
|
16920
|
+
variant: "green"
|
|
16877
16921
|
}
|
|
16878
16922
|
};
|
|
16879
|
-
const
|
|
16923
|
+
const getRoleTagVariant = (role2) => {
|
|
16880
16924
|
var _a;
|
|
16881
|
-
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.
|
|
16925
|
+
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.variant) ?? "blue";
|
|
16882
16926
|
};
|
|
16883
16927
|
const getRoleName = (role2) => {
|
|
16884
16928
|
var _a;
|
|
@@ -16890,13 +16934,13 @@ const makeSelectItemForRole = (role2, i18n) => {
|
|
|
16890
16934
|
const {
|
|
16891
16935
|
name,
|
|
16892
16936
|
description: description2,
|
|
16893
|
-
|
|
16937
|
+
variant
|
|
16894
16938
|
} = metadata;
|
|
16895
16939
|
return {
|
|
16896
16940
|
id: role2,
|
|
16897
16941
|
name: i18n.get(name),
|
|
16898
16942
|
description: description2 ? i18n.get(description2) : void 0,
|
|
16899
|
-
className
|
|
16943
|
+
className: `adyen-kyc-tag--${variant}`
|
|
16900
16944
|
};
|
|
16901
16945
|
};
|
|
16902
16946
|
const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event) => {
|
|
@@ -21898,7 +21942,7 @@ const trustRegistrationDetailsValidations = {
|
|
|
21898
21942
|
},
|
|
21899
21943
|
legalName: {
|
|
21900
21944
|
modes: ["blur"],
|
|
21901
|
-
validate: (
|
|
21945
|
+
validate: (legalName2) => !!legalName2,
|
|
21902
21946
|
errorMessage: "fieldIsRequired"
|
|
21903
21947
|
},
|
|
21904
21948
|
objectOfTrust: {
|
|
@@ -22765,55 +22809,6 @@ function ErrorPanel({
|
|
|
22765
22809
|
})]
|
|
22766
22810
|
});
|
|
22767
22811
|
}
|
|
22768
|
-
const headingTypes = {
|
|
22769
|
-
1: ({
|
|
22770
|
-
children,
|
|
22771
|
-
className
|
|
22772
|
-
}) => jsx("h1", {
|
|
22773
|
-
className,
|
|
22774
|
-
children
|
|
22775
|
-
}),
|
|
22776
|
-
2: ({
|
|
22777
|
-
children,
|
|
22778
|
-
className
|
|
22779
|
-
}) => jsx("h2", {
|
|
22780
|
-
className,
|
|
22781
|
-
children
|
|
22782
|
-
}),
|
|
22783
|
-
3: ({
|
|
22784
|
-
children,
|
|
22785
|
-
className
|
|
22786
|
-
}) => jsx("h3", {
|
|
22787
|
-
className,
|
|
22788
|
-
children
|
|
22789
|
-
}),
|
|
22790
|
-
4: ({
|
|
22791
|
-
children,
|
|
22792
|
-
className
|
|
22793
|
-
}) => jsx("h4", {
|
|
22794
|
-
className,
|
|
22795
|
-
children
|
|
22796
|
-
}),
|
|
22797
|
-
sub: ({
|
|
22798
|
-
children,
|
|
22799
|
-
className
|
|
22800
|
-
}) => jsx("div", {
|
|
22801
|
-
className,
|
|
22802
|
-
children
|
|
22803
|
-
})
|
|
22804
|
-
};
|
|
22805
|
-
function Heading({
|
|
22806
|
-
className,
|
|
22807
|
-
level,
|
|
22808
|
-
children
|
|
22809
|
-
}) {
|
|
22810
|
-
const HeadingElement = headingTypes[level] || headingTypes[1];
|
|
22811
|
-
const classNames = cx("adyen-kyc-heading", `adyen-kyc-heading--${level}`, className);
|
|
22812
|
-
return jsx(HeadingElement, {
|
|
22813
|
-
className: classNames,
|
|
22814
|
-
children
|
|
22815
|
-
});
|
|
22816
|
-
}
|
|
22817
22812
|
const summaryStep = {
|
|
22818
22813
|
formId: "summary",
|
|
22819
22814
|
formName: "summary"
|
|
@@ -22853,8 +22848,9 @@ function Summary({
|
|
|
22853
22848
|
}, i18n);
|
|
22854
22849
|
const summarySectionHeader = (formName, formId) => jsxs("header", {
|
|
22855
22850
|
className: "adyen-kyc-summary-section__header",
|
|
22856
|
-
children: [jsx(
|
|
22857
|
-
|
|
22851
|
+
children: [jsx(Typography, {
|
|
22852
|
+
el: "h4",
|
|
22853
|
+
variant: "title",
|
|
22858
22854
|
className: "adyen-kyc-summary-section__heading",
|
|
22859
22855
|
children: formName
|
|
22860
22856
|
}), jsx(Button, {
|
|
@@ -22936,9 +22932,9 @@ function Summary({
|
|
|
22936
22932
|
return jsxs("div", {
|
|
22937
22933
|
role: "region",
|
|
22938
22934
|
className: "adyen-kyc-summary",
|
|
22939
|
-
children: [jsx(
|
|
22940
|
-
|
|
22941
|
-
|
|
22935
|
+
children: [jsx(FormHeader, {
|
|
22936
|
+
heading: i18n.get("summary"),
|
|
22937
|
+
classNames: "adyen-kyc-summary__heading"
|
|
22942
22938
|
}), jsx(ErrorPanel, {
|
|
22943
22939
|
validationErrors: allValidationErrors,
|
|
22944
22940
|
verificationErrors: allVerificationErrors,
|
|
@@ -26570,6 +26566,42 @@ function BusinessDetailsDropinComponent({
|
|
|
26570
26566
|
})
|
|
26571
26567
|
});
|
|
26572
26568
|
}
|
|
26569
|
+
const getTrustedFieldsByProvider = (provider, trustedFields2) => trustedFields2.find((tf) => tf.provider === provider);
|
|
26570
|
+
const parseTrustedFieldsIntoReadOnlyFields = (trustedFields2, mapping) => {
|
|
26571
|
+
const formFieldsMapped = [];
|
|
26572
|
+
trustedFields2.fields.forEach((field) => {
|
|
26573
|
+
for (const [key, value] of Object.entries(mapping)) {
|
|
26574
|
+
if (value === field) {
|
|
26575
|
+
formFieldsMapped.push(key);
|
|
26576
|
+
}
|
|
26577
|
+
}
|
|
26578
|
+
});
|
|
26579
|
+
const readOnlyFields = {};
|
|
26580
|
+
formFieldsMapped.forEach((field) => {
|
|
26581
|
+
const tokenizedField = field.split(".");
|
|
26582
|
+
const formField = tokenizedField.pop();
|
|
26583
|
+
const formId = tokenizedField.pop();
|
|
26584
|
+
if (formField && formId) {
|
|
26585
|
+
if (formId in readOnlyFields) {
|
|
26586
|
+
readOnlyFields[formId].push(formField);
|
|
26587
|
+
} else {
|
|
26588
|
+
readOnlyFields[formId] = [formField];
|
|
26589
|
+
}
|
|
26590
|
+
}
|
|
26591
|
+
});
|
|
26592
|
+
return readOnlyFields;
|
|
26593
|
+
};
|
|
26594
|
+
const trustedFields = ({
|
|
26595
|
+
fields,
|
|
26596
|
+
trustedFieldsProvider,
|
|
26597
|
+
apiMapping
|
|
26598
|
+
}) => {
|
|
26599
|
+
if (!fields || !trustedFieldsProvider || !apiMapping) {
|
|
26600
|
+
return {};
|
|
26601
|
+
}
|
|
26602
|
+
const trustedFieldsOfProvider = getTrustedFieldsByProvider(trustedFieldsProvider, fields);
|
|
26603
|
+
return trustedFieldsOfProvider ? parseTrustedFieldsIntoReadOnlyFields(trustedFieldsOfProvider, apiMapping) : {};
|
|
26604
|
+
};
|
|
26573
26605
|
const parseConfiguration$6 = ({
|
|
26574
26606
|
country: country2,
|
|
26575
26607
|
matchingScenario
|
|
@@ -26619,7 +26651,8 @@ function CompanyDropinComponent({
|
|
|
26619
26651
|
handleUpdateLegalEntity,
|
|
26620
26652
|
handleHomeClick,
|
|
26621
26653
|
onTypeSwitch,
|
|
26622
|
-
onChange
|
|
26654
|
+
onChange,
|
|
26655
|
+
trustedFieldsProvider
|
|
26623
26656
|
}) {
|
|
26624
26657
|
var _a, _b;
|
|
26625
26658
|
const {
|
|
@@ -26683,7 +26716,15 @@ function CompanyDropinComponent({
|
|
|
26683
26716
|
isSettingEnabled,
|
|
26684
26717
|
isExperimentEnabled
|
|
26685
26718
|
}), [country2, data, taskType, requiredFields, isSettingEnabled]);
|
|
26686
|
-
const
|
|
26719
|
+
const legalEntityTrustedFields = legalEntityResponse == null ? void 0 : legalEntityResponse.trustedFields;
|
|
26720
|
+
const trustedFieldsOfProvider = useMemo(() => trustedFields({
|
|
26721
|
+
fields: legalEntityTrustedFields,
|
|
26722
|
+
trustedFieldsProvider,
|
|
26723
|
+
apiMapping: companyComponentsKeyMapping
|
|
26724
|
+
}), [legalEntityTrustedFields, trustedFieldsProvider]);
|
|
26725
|
+
const derivedProps = useMemo(() => ({
|
|
26726
|
+
...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)
|
|
26727
|
+
}), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
26687
26728
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
26688
26729
|
const {
|
|
26689
26730
|
state: {
|
|
@@ -26946,7 +26987,8 @@ function CompanyDropinComponent({
|
|
|
26946
26987
|
onCountryChange: setCountry,
|
|
26947
26988
|
ref: formRef,
|
|
26948
26989
|
shouldValidate,
|
|
26949
|
-
isTopLevelEntity: taskType === TaskTypes.COMPANY
|
|
26990
|
+
isTopLevelEntity: taskType === TaskTypes.COMPANY,
|
|
26991
|
+
readOnlyFields: trustedFieldsOfProvider
|
|
26950
26992
|
})
|
|
26951
26993
|
});
|
|
26952
26994
|
}
|
|
@@ -29019,6 +29061,11 @@ function useSalesChannelsSettings() {
|
|
|
29019
29061
|
return settings;
|
|
29020
29062
|
}, [isSettingEnabled]);
|
|
29021
29063
|
}
|
|
29064
|
+
var TrustedFieldsProvider = /* @__PURE__ */ ((TrustedFieldsProvider2) => {
|
|
29065
|
+
TrustedFieldsProvider2["SINGPASS"] = "singpass";
|
|
29066
|
+
TrustedFieldsProvider2["KOMPANY"] = "kompany";
|
|
29067
|
+
return TrustedFieldsProvider2;
|
|
29068
|
+
})(TrustedFieldsProvider || {});
|
|
29022
29069
|
const downloadFile = async (base64, filename) => {
|
|
29023
29070
|
saveBlobAsFile(base64ToBlob(base64), filename);
|
|
29024
29071
|
};
|
|
@@ -29593,11 +29640,13 @@ const BusinessTypeSelection = ({
|
|
|
29593
29640
|
className: "adyen-kyc-business-type-selection",
|
|
29594
29641
|
children: [jsxs("header", {
|
|
29595
29642
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
29596
|
-
children: [jsx(
|
|
29597
|
-
|
|
29643
|
+
children: [jsx(Typography, {
|
|
29644
|
+
el: "h2",
|
|
29645
|
+
variant: "title-m",
|
|
29598
29646
|
children: i18n.get(businessTypeSelectionStepTitles[currentStep])
|
|
29599
|
-
}), currentStep === 3 && jsx(
|
|
29600
|
-
|
|
29647
|
+
}), currentStep === 3 && jsx(Typography, {
|
|
29648
|
+
el: "p",
|
|
29649
|
+
variant: "title",
|
|
29601
29650
|
children: i18n.get("someInformationWillNotBeSaved")
|
|
29602
29651
|
})]
|
|
29603
29652
|
}), currentStep === 0 && jsx(Field, {
|
|
@@ -29937,11 +29986,13 @@ function Card({
|
|
|
29937
29986
|
onKeyDown,
|
|
29938
29987
|
children: [title && jsxs("header", {
|
|
29939
29988
|
className: "adyen-kyc-card__header",
|
|
29940
|
-
children: [jsx(
|
|
29941
|
-
|
|
29989
|
+
children: [jsx(Typography, {
|
|
29990
|
+
el: "h4",
|
|
29991
|
+
variant: "title",
|
|
29942
29992
|
children: title
|
|
29943
|
-
}), subTitle && jsx(
|
|
29944
|
-
|
|
29993
|
+
}), subTitle && jsx(Typography, {
|
|
29994
|
+
el: "p",
|
|
29995
|
+
variant: "body",
|
|
29945
29996
|
children: subTitle
|
|
29946
29997
|
})]
|
|
29947
29998
|
}), jsx("div", {
|
|
@@ -30154,8 +30205,8 @@ const EntityAssociation = ({
|
|
|
30154
30205
|
})]
|
|
30155
30206
|
}), jsx("div", {
|
|
30156
30207
|
children: types.map((type) => jsx(Tag, {
|
|
30157
|
-
className:
|
|
30158
|
-
|
|
30208
|
+
className: "adyen-kyc-entity-association__tag",
|
|
30209
|
+
variant: getRoleTagVariant(type),
|
|
30159
30210
|
children: i18n.get(getRoleName(type))
|
|
30160
30211
|
}, type))
|
|
30161
30212
|
}), status === TaskStatus.ERROR && jsx(VerificationErrorAlert, {
|
|
@@ -30243,8 +30294,8 @@ const EntityGuidanceStatus = ({
|
|
|
30243
30294
|
children: [jsx(EntityStatusIcon, {
|
|
30244
30295
|
status
|
|
30245
30296
|
}), jsx(Tag, {
|
|
30246
|
-
className:
|
|
30247
|
-
|
|
30297
|
+
className: "adyen-kyc-entity-status__tag",
|
|
30298
|
+
variant: getRoleTagVariant(entityLabel),
|
|
30248
30299
|
children: i18n.get(getRoleName(entityLabel))
|
|
30249
30300
|
}, entityLabel), jsx("span", {
|
|
30250
30301
|
className: "adyen-kyc-entity-status--text",
|
|
@@ -30991,8 +31042,9 @@ const SingpassSelection = (props) => {
|
|
|
30991
31042
|
className: "adyen-kyc-singpass-selection",
|
|
30992
31043
|
children: [jsx("header", {
|
|
30993
31044
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
30994
|
-
children: jsx(
|
|
30995
|
-
|
|
31045
|
+
children: jsx(Typography, {
|
|
31046
|
+
el: "h2",
|
|
31047
|
+
variant: "title-m",
|
|
30996
31048
|
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
30997
31049
|
})
|
|
30998
31050
|
}), jsx("form", {
|
|
@@ -31244,8 +31296,9 @@ const TaskListGroup = ({
|
|
|
31244
31296
|
className: "adyen-task-list-group",
|
|
31245
31297
|
children: [title && jsx("header", {
|
|
31246
31298
|
className: "adyen-task-list-group__header",
|
|
31247
|
-
children: jsx(
|
|
31248
|
-
|
|
31299
|
+
children: jsx(Typography, {
|
|
31300
|
+
el: "h4",
|
|
31301
|
+
variant: "title",
|
|
31249
31302
|
children: title
|
|
31250
31303
|
})
|
|
31251
31304
|
}), jsx("div", {
|
|
@@ -31367,13 +31420,17 @@ function TaskListComponent({
|
|
|
31367
31420
|
})
|
|
31368
31421
|
}), isEnableNewEntryFlowEnabled && jsxs("header", {
|
|
31369
31422
|
className: "adyen-task-list__heading",
|
|
31370
|
-
children: [jsx(
|
|
31371
|
-
|
|
31423
|
+
children: [jsx(Typography, {
|
|
31424
|
+
el: "h1",
|
|
31425
|
+
variant: "title-l",
|
|
31372
31426
|
children: i18n.get("setUpYourAccount")
|
|
31373
|
-
}), jsxs(
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31427
|
+
}), jsxs(Typography, {
|
|
31428
|
+
el: "p",
|
|
31429
|
+
variant: "title",
|
|
31430
|
+
className: "adyen-task-list__description",
|
|
31431
|
+
children: [jsx(Typography, {
|
|
31432
|
+
el: "span",
|
|
31433
|
+
variant: "body-strongest",
|
|
31377
31434
|
children: i18n.get("yourBusinessSetup", {
|
|
31378
31435
|
values: {
|
|
31379
31436
|
businessSetup: i18n.get(businessSetup)
|
|
@@ -31384,7 +31441,6 @@ function TaskListComponent({
|
|
|
31384
31441
|
icon: "edit",
|
|
31385
31442
|
tertiary: true,
|
|
31386
31443
|
onClick: onEditBusinessSetupClick,
|
|
31387
|
-
className: "adyen-kyc-u-margin-left-4",
|
|
31388
31444
|
type: "button"
|
|
31389
31445
|
})]
|
|
31390
31446
|
})]
|
|
@@ -35716,7 +35772,8 @@ function DropinComposerComponent({
|
|
|
35716
35772
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
35717
35773
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
35718
35774
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
35719
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
35775
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
35776
|
+
trustedFieldsProvider: eligibleForSingpass && TrustedFieldsProvider.SINGPASS
|
|
35720
35777
|
});
|
|
35721
35778
|
case TaskTypes.COMPANY_SEARCH:
|
|
35722
35779
|
return jsx(CompanySearchDropinComponent, {
|
|
@@ -36481,6 +36538,30 @@ function CreateTransferInstrumentComponent({
|
|
|
36481
36538
|
taskType: TaskTypes.PAYOUT
|
|
36482
36539
|
}) : null;
|
|
36483
36540
|
}
|
|
36541
|
+
var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
|
|
36542
|
+
HighExposurePagesEnums2["COMPANY_PAGE"] = "COMPANY_PAGE";
|
|
36543
|
+
HighExposurePagesEnums2["PARENT_COMPANY_PAGE"] = "PARENT_COMPANY_PAGE";
|
|
36544
|
+
HighExposurePagesEnums2["ULTIMATE_PARENT_COMPANY_PAGE"] = "ULTIMATE_PARENT_COMPANY_PAGE";
|
|
36545
|
+
return HighExposurePagesEnums2;
|
|
36546
|
+
})(HighExposurePagesEnums || {});
|
|
36547
|
+
const highExposureRadioItems = [{
|
|
36548
|
+
id: "Yes",
|
|
36549
|
+
name: "yes"
|
|
36550
|
+
}, {
|
|
36551
|
+
id: "No",
|
|
36552
|
+
name: "no"
|
|
36553
|
+
}];
|
|
36554
|
+
const highExposureParentRadioItems = [...highExposureRadioItems, {
|
|
36555
|
+
id: "I don't know",
|
|
36556
|
+
name: "iDontKnow"
|
|
36557
|
+
}];
|
|
36558
|
+
const validateLegalEntityIdentifier = (legalEntityIdentifier2, doesYourCompanyHaveLEI2, isDisabled) => {
|
|
36559
|
+
if (isDisabled) return true;
|
|
36560
|
+
const isRequired = doesYourCompanyHaveLEI2 === "Yes";
|
|
36561
|
+
const isValidLength = legalEntityIdentifier2 ? legalEntityIdentifier2.length === 20 : false;
|
|
36562
|
+
const hasLettersAndNumbers = legalEntityIdentifier2 ? /[a-zA-Z]/.test(legalEntityIdentifier2) && /[0-9]/.test(legalEntityIdentifier2) : false;
|
|
36563
|
+
return !isRequired || !isEmpty(legalEntityIdentifier2) && isValidLength && hasLettersAndNumbers;
|
|
36564
|
+
};
|
|
36484
36565
|
const highExposureCompanyDetailsValidations = {
|
|
36485
36566
|
country: {
|
|
36486
36567
|
modes: ["blur"],
|
|
@@ -36501,16 +36582,126 @@ const highExposureCompanyDetailsValidations = {
|
|
|
36501
36582
|
modes: ["blur"],
|
|
36502
36583
|
validate: (naceCode) => !isEmpty(naceCode),
|
|
36503
36584
|
errorMessage: "fieldIsRequired"
|
|
36585
|
+
},
|
|
36586
|
+
doesTheCompanyEarnMoreThanHalf: {
|
|
36587
|
+
modes: ["blur"],
|
|
36588
|
+
validate: (doesTheCompanyEarnMoreThanHalf2) => !isEmpty(doesTheCompanyEarnMoreThanHalf2),
|
|
36589
|
+
errorMessage: "fieldIsRequired"
|
|
36590
|
+
},
|
|
36591
|
+
doesYourCompanyHaveLEI: {
|
|
36592
|
+
modes: ["blur"],
|
|
36593
|
+
validate: (doesYourCompanyHaveLEI2) => !isEmpty(doesYourCompanyHaveLEI2),
|
|
36594
|
+
errorMessage: "fieldIsRequired"
|
|
36595
|
+
},
|
|
36596
|
+
legalEntityIdentifier: {
|
|
36597
|
+
modes: ["blur"],
|
|
36598
|
+
validate: (legalEntityIdentifier2, context) => {
|
|
36599
|
+
var _a, _b;
|
|
36600
|
+
return validateLegalEntityIdentifier(legalEntityIdentifier2, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesTheCompanyEarnMoreThanHalf);
|
|
36601
|
+
},
|
|
36602
|
+
errorMessage: "fieldIsRequired"
|
|
36603
|
+
},
|
|
36604
|
+
isCompanyOwnedByAnotherCompany: {
|
|
36605
|
+
modes: ["blur"],
|
|
36606
|
+
validate: (isCompanyOwnedByAnotherCompany2) => !isEmpty(isCompanyOwnedByAnotherCompany2),
|
|
36607
|
+
errorMessage: "fieldIsRequired"
|
|
36608
|
+
},
|
|
36609
|
+
isParentOwnedByAnotherCompany: {
|
|
36610
|
+
modes: ["blur"],
|
|
36611
|
+
validate: (isParentOwnedByAnotherCompany2, context) => {
|
|
36612
|
+
var _a, _b;
|
|
36613
|
+
return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) ? !isEmpty(isParentOwnedByAnotherCompany2) : true;
|
|
36614
|
+
},
|
|
36615
|
+
errorMessage: "fieldIsRequired"
|
|
36616
|
+
}
|
|
36617
|
+
};
|
|
36618
|
+
const highExposureParentCompanyDetailsValidations = {
|
|
36619
|
+
parentLegalName: {
|
|
36620
|
+
modes: ["blur"],
|
|
36621
|
+
validate: (parentLegalName) => !isEmpty(parentLegalName),
|
|
36622
|
+
errorMessage: "fieldIsRequired"
|
|
36623
|
+
},
|
|
36624
|
+
parentNumberOfEmployees: {
|
|
36625
|
+
modes: ["blur"],
|
|
36626
|
+
validate: (parentNumberOfEmployees) => !isEmpty(parentNumberOfEmployees),
|
|
36627
|
+
errorMessage: "fieldIsRequired"
|
|
36628
|
+
},
|
|
36629
|
+
parentLegalForm: {
|
|
36630
|
+
modes: ["blur"],
|
|
36631
|
+
validate: (parentLegalForm) => !isEmpty(parentLegalForm),
|
|
36632
|
+
errorMessage: "fieldIsRequired"
|
|
36633
|
+
},
|
|
36634
|
+
parentNaceCode: {
|
|
36635
|
+
modes: ["blur"],
|
|
36636
|
+
validate: (parentNaceCode) => !isEmpty(parentNaceCode),
|
|
36637
|
+
errorMessage: "fieldIsRequired"
|
|
36638
|
+
},
|
|
36639
|
+
doesTheParentCompanyEarnMoreThanHalf: {
|
|
36640
|
+
modes: ["blur"],
|
|
36641
|
+
validate: (doesTheParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheParentCompanyEarnMoreThanHalf),
|
|
36642
|
+
errorMessage: "fieldIsRequired"
|
|
36643
|
+
},
|
|
36644
|
+
doesYourParentCompanyHaveLEI: {
|
|
36645
|
+
modes: ["blur"],
|
|
36646
|
+
validate: (doesYourParentCompanyHaveLEI) => !isEmpty(doesYourParentCompanyHaveLEI),
|
|
36647
|
+
errorMessage: "fieldIsRequired"
|
|
36648
|
+
},
|
|
36649
|
+
parentLegalEntityIdentifier: {
|
|
36650
|
+
modes: ["blur"],
|
|
36651
|
+
validate: (parentLegalEntityIdentifier, context) => {
|
|
36652
|
+
var _a, _b, _c, _d;
|
|
36653
|
+
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));
|
|
36654
|
+
},
|
|
36655
|
+
errorMessage: "fieldIsRequired"
|
|
36656
|
+
}
|
|
36657
|
+
};
|
|
36658
|
+
const highExposureUltimateParentCompanyDetailsValidations = {
|
|
36659
|
+
ultimateParentLegalName: {
|
|
36660
|
+
modes: ["blur"],
|
|
36661
|
+
validate: (ultimateParentLegalName) => !isEmpty(ultimateParentLegalName),
|
|
36662
|
+
errorMessage: "fieldIsRequired"
|
|
36663
|
+
},
|
|
36664
|
+
ultimateParentNumberOfEmployees: {
|
|
36665
|
+
modes: ["blur"],
|
|
36666
|
+
validate: (ultimateParentNumberOfEmployees) => !isEmpty(ultimateParentNumberOfEmployees),
|
|
36667
|
+
errorMessage: "fieldIsRequired"
|
|
36668
|
+
},
|
|
36669
|
+
ultimateParentLegalForm: {
|
|
36670
|
+
modes: ["blur"],
|
|
36671
|
+
validate: (ultimateParentLegalForm) => !isEmpty(ultimateParentLegalForm),
|
|
36672
|
+
errorMessage: "fieldIsRequired"
|
|
36673
|
+
},
|
|
36674
|
+
ultimateParentNaceCode: {
|
|
36675
|
+
modes: ["blur"],
|
|
36676
|
+
validate: (ultimateParentNaceCode) => !isEmpty(ultimateParentNaceCode),
|
|
36677
|
+
errorMessage: "fieldIsRequired"
|
|
36678
|
+
},
|
|
36679
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: {
|
|
36680
|
+
modes: ["blur"],
|
|
36681
|
+
validate: (doesTheUltimateParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheUltimateParentCompanyEarnMoreThanHalf),
|
|
36682
|
+
errorMessage: "fieldIsRequired"
|
|
36683
|
+
},
|
|
36684
|
+
doesYourUltimateParentCompanyHaveLEI: {
|
|
36685
|
+
modes: ["blur"],
|
|
36686
|
+
validate: (doesYourUltimateParentCompanyHaveLEI) => !isEmpty(doesYourUltimateParentCompanyHaveLEI),
|
|
36687
|
+
errorMessage: "fieldIsRequired"
|
|
36688
|
+
},
|
|
36689
|
+
ultimateParentLegalEntityIdentifier: {
|
|
36690
|
+
modes: ["blur"],
|
|
36691
|
+
validate: (ultimateParentLegalEntityIdentifier, context) => {
|
|
36692
|
+
var _a, _b, _c, _d;
|
|
36693
|
+
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));
|
|
36694
|
+
},
|
|
36695
|
+
errorMessage: "fieldIsRequired"
|
|
36504
36696
|
}
|
|
36505
36697
|
};
|
|
36506
|
-
const LEGAL_FORM_FIELD = ["legalForm"];
|
|
36507
36698
|
const logger$8 = createLogger("LegalFormField");
|
|
36508
36699
|
function LegalFormField({
|
|
36509
36700
|
name = "legalForm",
|
|
36510
36701
|
data,
|
|
36511
36702
|
valid,
|
|
36512
|
-
|
|
36513
|
-
|
|
36703
|
+
errorMessage,
|
|
36704
|
+
label,
|
|
36514
36705
|
readonly,
|
|
36515
36706
|
handleChangeFor,
|
|
36516
36707
|
helperText,
|
|
@@ -36537,8 +36728,8 @@ function LegalFormField({
|
|
|
36537
36728
|
}, [countryCode]);
|
|
36538
36729
|
return jsx(Field, {
|
|
36539
36730
|
name,
|
|
36540
|
-
label:
|
|
36541
|
-
errorMessage
|
|
36731
|
+
label: label || i18n.get("businessStructure"),
|
|
36732
|
+
errorMessage,
|
|
36542
36733
|
classNameModifiers,
|
|
36543
36734
|
isValid: valid.legalForm,
|
|
36544
36735
|
helper: helperText == null ? void 0 : helperText.legalForm,
|
|
@@ -36553,14 +36744,13 @@ function LegalFormField({
|
|
|
36553
36744
|
})
|
|
36554
36745
|
});
|
|
36555
36746
|
}
|
|
36556
|
-
const NACE_CODE_FIELD = ["naceCode"];
|
|
36557
36747
|
const logger$7 = createLogger("NaceCodeField");
|
|
36558
36748
|
function NaceCodeField({
|
|
36559
36749
|
name = "naceCode",
|
|
36560
36750
|
data,
|
|
36561
36751
|
valid,
|
|
36562
|
-
|
|
36563
|
-
|
|
36752
|
+
errorMessage,
|
|
36753
|
+
label,
|
|
36564
36754
|
readonly,
|
|
36565
36755
|
handleChangeFor,
|
|
36566
36756
|
helperText,
|
|
@@ -36582,8 +36772,8 @@ function NaceCodeField({
|
|
|
36582
36772
|
}, []);
|
|
36583
36773
|
return jsx(Field, {
|
|
36584
36774
|
name,
|
|
36585
|
-
label:
|
|
36586
|
-
errorMessage
|
|
36775
|
+
label: label || i18n.get("industryAndNaceCode"),
|
|
36776
|
+
errorMessage,
|
|
36587
36777
|
classNameModifiers,
|
|
36588
36778
|
isValid: valid.naceCode,
|
|
36589
36779
|
helper: helperText == null ? void 0 : helperText.naceCode,
|
|
@@ -36605,58 +36795,238 @@ function HighExposureBusinessInformation({
|
|
|
36605
36795
|
errors,
|
|
36606
36796
|
fieldProblems,
|
|
36607
36797
|
handleChangeFor,
|
|
36608
|
-
country: country2
|
|
36798
|
+
country: country2,
|
|
36799
|
+
fieldMapping,
|
|
36800
|
+
targetPage,
|
|
36801
|
+
sectionHeading
|
|
36609
36802
|
}) {
|
|
36803
|
+
const {
|
|
36804
|
+
i18n
|
|
36805
|
+
} = useI18nContext();
|
|
36806
|
+
const getFieldName = (fieldKey) => fieldMapping[fieldKey] ?? fieldKey;
|
|
36807
|
+
const getFieldData = (fieldKey) => {
|
|
36808
|
+
const fieldData = data[getFieldName(fieldKey)];
|
|
36809
|
+
return fieldData ? fieldData.toString() : void 0;
|
|
36810
|
+
};
|
|
36811
|
+
const isMainCompany = targetPage === HighExposurePagesEnums.COMPANY_PAGE;
|
|
36610
36812
|
return jsxs(Fragment, {
|
|
36611
|
-
children: [jsx(
|
|
36813
|
+
children: [jsx(Typography, {
|
|
36814
|
+
el: "h3",
|
|
36815
|
+
variant: "title",
|
|
36816
|
+
children: i18n.get(sectionHeading || "yourBusinessDetails")
|
|
36817
|
+
}), !isMainCompany && jsx(Field, {
|
|
36818
|
+
name: getFieldName("legalName"),
|
|
36819
|
+
label: formUtils.getLabel(getFieldName("legalName"), "legalName"),
|
|
36820
|
+
classNameModifiers: ["legalName"],
|
|
36821
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalName"), errors, fieldProblems),
|
|
36822
|
+
isValid: valid[getFieldName("legalName")],
|
|
36823
|
+
children: (childProps) => jsx(InputText, {
|
|
36824
|
+
...childProps,
|
|
36825
|
+
name: getFieldName("legalName"),
|
|
36826
|
+
value: getFieldData("legalName"),
|
|
36827
|
+
readonly: false,
|
|
36828
|
+
classNameModifiers: ["legalName"],
|
|
36829
|
+
onInput: handleChangeFor(getFieldName("legalName"), "input"),
|
|
36830
|
+
onBlur: handleChangeFor(getFieldName("legalName"), "blur"),
|
|
36831
|
+
"aria-required": true,
|
|
36832
|
+
"aria-label": formUtils.getLabel(getFieldName("legalName")),
|
|
36833
|
+
"aria-invalid": !valid[getFieldName("legalName")]
|
|
36834
|
+
})
|
|
36835
|
+
}), jsx(LegalFormField, {
|
|
36836
|
+
name: getFieldName("legalForm"),
|
|
36612
36837
|
countryCode: country2,
|
|
36613
36838
|
data: {
|
|
36614
|
-
legalForm:
|
|
36839
|
+
legalForm: getFieldData("legalForm")
|
|
36615
36840
|
},
|
|
36616
36841
|
valid: {
|
|
36617
|
-
legalForm: valid
|
|
36842
|
+
legalForm: valid[getFieldName("legalForm")]
|
|
36618
36843
|
},
|
|
36619
|
-
|
|
36620
|
-
handleChangeFor: () => handleChangeFor("legalForm", "blur"),
|
|
36844
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalForm"), errors, fieldProblems),
|
|
36845
|
+
handleChangeFor: () => handleChangeFor(getFieldName("legalForm"), "blur"),
|
|
36621
36846
|
readonly: false,
|
|
36622
|
-
|
|
36623
|
-
legalForm: "businessStructure"
|
|
36624
|
-
})
|
|
36847
|
+
label: formUtils.getLabel(getFieldName("legalForm"), "businessStructure")
|
|
36625
36848
|
}), jsx(NaceCodeField, {
|
|
36849
|
+
name: getFieldName("naceCode"),
|
|
36626
36850
|
data: {
|
|
36627
|
-
naceCode:
|
|
36851
|
+
naceCode: getFieldData("naceCode")
|
|
36628
36852
|
},
|
|
36629
36853
|
valid: {
|
|
36630
|
-
naceCode: valid
|
|
36854
|
+
naceCode: valid[getFieldName("naceCode")]
|
|
36631
36855
|
},
|
|
36632
|
-
|
|
36633
|
-
handleChangeFor: () => handleChangeFor("naceCode", "blur"),
|
|
36856
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("naceCode"), errors, fieldProblems),
|
|
36857
|
+
handleChangeFor: () => handleChangeFor(getFieldName("naceCode"), "blur"),
|
|
36634
36858
|
readonly: false,
|
|
36635
|
-
|
|
36636
|
-
naceCode: "industryAndNaceCode"
|
|
36637
|
-
})
|
|
36859
|
+
label: formUtils.getLabel(getFieldName("naceCode"), "industryAndNaceCode")
|
|
36638
36860
|
}), jsx(Field, {
|
|
36639
|
-
name: "numberOfEmployees",
|
|
36640
|
-
label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
|
|
36861
|
+
name: getFieldName("numberOfEmployees"),
|
|
36862
|
+
label: formUtils.getLabel(getFieldName("numberOfEmployees"), "numberOfEmployees"),
|
|
36641
36863
|
classNameModifiers: ["legalName"],
|
|
36642
|
-
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
|
|
36643
|
-
isValid: valid
|
|
36864
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("numberOfEmployees"), errors, fieldProblems),
|
|
36865
|
+
isValid: valid[getFieldName("numberOfEmployees")],
|
|
36644
36866
|
children: (childProps) => jsx(InputText, {
|
|
36645
36867
|
...childProps,
|
|
36646
|
-
name: "numberOfEmployees",
|
|
36647
|
-
value:
|
|
36648
|
-
readonly:
|
|
36868
|
+
name: getFieldName("numberOfEmployees"),
|
|
36869
|
+
value: getFieldData("numberOfEmployees"),
|
|
36870
|
+
readonly: false,
|
|
36649
36871
|
classNameModifiers: ["legalName"],
|
|
36650
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
36651
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
36872
|
+
onInput: handleChangeFor(getFieldName("numberOfEmployees"), "input"),
|
|
36873
|
+
onBlur: handleChangeFor(getFieldName("numberOfEmployees"), "blur"),
|
|
36874
|
+
"aria-required": true,
|
|
36875
|
+
"aria-label": formUtils.getLabel(getFieldName("numberOfEmployees")),
|
|
36876
|
+
"aria-invalid": !valid[getFieldName("numberOfEmployees")]
|
|
36877
|
+
})
|
|
36878
|
+
}), jsx(Field, {
|
|
36879
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
36880
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36881
|
+
label: i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
36882
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesTheCompanyEarnMoreThanHalf"), errors, fieldProblems),
|
|
36883
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36884
|
+
...childProps,
|
|
36885
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
36886
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
36887
|
+
value: getFieldData("doesTheCompanyEarnMoreThanHalf"),
|
|
36888
|
+
disabled: false,
|
|
36889
|
+
onChange: handleChangeFor(getFieldName("doesTheCompanyEarnMoreThanHalf")),
|
|
36890
|
+
"aria-required": true,
|
|
36891
|
+
"aria-label": i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
36892
|
+
"aria-invalid": !valid[getFieldName("doesTheCompanyEarnMoreThanHalf")]
|
|
36893
|
+
})
|
|
36894
|
+
}), jsx(Field, {
|
|
36895
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
36896
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36897
|
+
label: i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
36898
|
+
helper: jsxs("div", {
|
|
36899
|
+
children: [jsx("span", {
|
|
36900
|
+
children: i18n.get("anLEIIsAUniqueCode")
|
|
36901
|
+
}), " ", jsx(Link, {
|
|
36902
|
+
href: "https://search.gleif.org/#/search/",
|
|
36903
|
+
external: true,
|
|
36904
|
+
className: ["adyen-kyc__high-exposure-link"],
|
|
36905
|
+
children: i18n.get("lookUpYourLEI")
|
|
36906
|
+
})]
|
|
36907
|
+
}),
|
|
36908
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesYourCompanyHaveLEI"), errors, fieldProblems),
|
|
36909
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36910
|
+
...childProps,
|
|
36911
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
36912
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
36913
|
+
value: getFieldData("doesYourCompanyHaveLEI"),
|
|
36914
|
+
disabled: false,
|
|
36915
|
+
onChange: handleChangeFor(getFieldName("doesYourCompanyHaveLEI")),
|
|
36652
36916
|
"aria-required": true,
|
|
36653
|
-
"aria-label":
|
|
36654
|
-
"aria-invalid": !valid
|
|
36917
|
+
"aria-label": i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
36918
|
+
"aria-invalid": !valid[getFieldName("doesYourCompanyHaveLEI")]
|
|
36655
36919
|
})
|
|
36920
|
+
}), getFieldData("doesYourCompanyHaveLEI") === "Yes" && jsxs(Fragment, {
|
|
36921
|
+
children: [jsx(Field, {
|
|
36922
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
36923
|
+
label: formUtils.getLabel(getFieldName("legalEntityIdentifier"), "legalEntityIdentifier"),
|
|
36924
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalEntityIdentifier"), errors, fieldProblems),
|
|
36925
|
+
isValid: valid.legalEntityIdentifier,
|
|
36926
|
+
helper: i18n.get("enterNCharactersWithAMixForExample", {
|
|
36927
|
+
values: {
|
|
36928
|
+
numChars: 20,
|
|
36929
|
+
example: "529900T8BM49AURSDO55"
|
|
36930
|
+
}
|
|
36931
|
+
}),
|
|
36932
|
+
helperPosition: "below",
|
|
36933
|
+
children: (childProps) => jsx(InputText, {
|
|
36934
|
+
...childProps,
|
|
36935
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
36936
|
+
value: getFieldData("legalEntityIdentifier"),
|
|
36937
|
+
readonly: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
36938
|
+
classNameModifiers: ["legalName"],
|
|
36939
|
+
onInput: handleChangeFor(getFieldName("legalEntityIdentifier"), "input"),
|
|
36940
|
+
onBlur: handleChangeFor(getFieldName("legalEntityIdentifier"), "blur"),
|
|
36941
|
+
"aria-required": true,
|
|
36942
|
+
"aria-label": formUtils.getLabel(getFieldName("legalEntityIdentifier")),
|
|
36943
|
+
"aria-invalid": !valid[getFieldName("legalEntityIdentifier")],
|
|
36944
|
+
isValid: valid[getFieldName("legalEntityIdentifier")]
|
|
36945
|
+
})
|
|
36946
|
+
}), !isMainCompany && jsx(Checkbox, {
|
|
36947
|
+
name: getFieldName("doesNotKnowNumberOfEmployees"),
|
|
36948
|
+
label: i18n.get("iDontKnow"),
|
|
36949
|
+
value: getFieldData("doesNotKnowNumberOfEmployees"),
|
|
36950
|
+
readonly: false,
|
|
36951
|
+
classNameModifiers: ["exempted-from-tax"],
|
|
36952
|
+
checked: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
36953
|
+
onChange: handleChangeFor(getFieldName("doesNotKnowNumberOfEmployees")),
|
|
36954
|
+
"aria-required": false,
|
|
36955
|
+
"aria-label": i18n.get("iDontKnow"),
|
|
36956
|
+
"aria-invalid": false
|
|
36957
|
+
})]
|
|
36656
36958
|
})]
|
|
36657
36959
|
});
|
|
36658
36960
|
}
|
|
36659
|
-
|
|
36961
|
+
function HighExposureOwnershipStructure({
|
|
36962
|
+
formUtils,
|
|
36963
|
+
data,
|
|
36964
|
+
valid,
|
|
36965
|
+
errors,
|
|
36966
|
+
fieldProblems,
|
|
36967
|
+
handleChangeFor,
|
|
36968
|
+
legalEntity
|
|
36969
|
+
}) {
|
|
36970
|
+
const {
|
|
36971
|
+
i18n
|
|
36972
|
+
} = useI18nContext();
|
|
36973
|
+
return jsxs(Fragment, {
|
|
36974
|
+
children: [jsx(Typography, {
|
|
36975
|
+
el: "h3",
|
|
36976
|
+
variant: "title",
|
|
36977
|
+
children: i18n.get("ownershipStructure")
|
|
36978
|
+
}), jsx(Field, {
|
|
36979
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
36980
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36981
|
+
label: i18n.get("isCompanyOwnedByAnotherCompany", {
|
|
36982
|
+
values: {
|
|
36983
|
+
company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : ""
|
|
36984
|
+
}
|
|
36985
|
+
}),
|
|
36986
|
+
errorMessage: formUtils.getErrorMessage("isCompanyOwnedByAnotherCompany", errors, fieldProblems),
|
|
36987
|
+
helper: i18n.get("thisMeansYouHaveAParentCompany"),
|
|
36988
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36989
|
+
...childProps,
|
|
36990
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
36991
|
+
items: highExposureRadioItems,
|
|
36992
|
+
value: data.isCompanyOwnedByAnotherCompany,
|
|
36993
|
+
disabled: false,
|
|
36994
|
+
onChange: handleChangeFor("isCompanyOwnedByAnotherCompany"),
|
|
36995
|
+
"aria-required": true,
|
|
36996
|
+
"aria-label": formUtils.getLabel("isCompanyOwnedByAnotherCompany"),
|
|
36997
|
+
"aria-invalid": !valid.isCompanyOwnedByAnotherCompany
|
|
36998
|
+
})
|
|
36999
|
+
}), (data == null ? void 0 : data.isCompanyOwnedByAnotherCompany) === "Yes" && jsx(Field, {
|
|
37000
|
+
name: "isParentOwnedByAnotherCompany",
|
|
37001
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
37002
|
+
label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
37003
|
+
helper: i18n.get("thisMeansYouHaveAnUltimateParentCompany"),
|
|
37004
|
+
errorMessage: formUtils.getErrorMessage("isParentOwnedByAnotherCompany", errors, fieldProblems),
|
|
37005
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
37006
|
+
...childProps,
|
|
37007
|
+
name: "isParentOwnedByAnotherCompany",
|
|
37008
|
+
items: highExposureRadioItems,
|
|
37009
|
+
value: data.isParentOwnedByAnotherCompany,
|
|
37010
|
+
disabled: false,
|
|
37011
|
+
onChange: handleChangeFor("isParentOwnedByAnotherCompany"),
|
|
37012
|
+
"aria-required": true,
|
|
37013
|
+
"aria-label": formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
37014
|
+
"aria-invalid": !valid.doesYourCompanyHaveLEI
|
|
37015
|
+
})
|
|
37016
|
+
})]
|
|
37017
|
+
});
|
|
37018
|
+
}
|
|
37019
|
+
const companyFieldMapping = {
|
|
37020
|
+
legalForm: "legalForm",
|
|
37021
|
+
naceCode: "naceCode",
|
|
37022
|
+
numberOfEmployees: "numberOfEmployees",
|
|
37023
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37024
|
+
doesYourCompanyHaveLEI: "doesYourCompanyHaveLEI",
|
|
37025
|
+
legalEntityIdentifier: "legalEntityIdentifier",
|
|
37026
|
+
isCompanyOwnedByAnotherCompany: "isCompanyOwnedByAnotherCompany",
|
|
37027
|
+
isParentOwnedByAnotherCompany: "isParentOwnedByAnotherCompany"
|
|
37028
|
+
};
|
|
37029
|
+
const highExposureCompanyDetailsFields = Object.values(companyFieldMapping);
|
|
36660
37030
|
function AdditionalFieldsForHighExposureCompany(props) {
|
|
36661
37031
|
const {
|
|
36662
37032
|
i18n
|
|
@@ -36677,6 +37047,7 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36677
37047
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36678
37048
|
});
|
|
36679
37049
|
const formUtils = formUtilities(props, i18n);
|
|
37050
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36680
37051
|
const {
|
|
36681
37052
|
updateStateSlice
|
|
36682
37053
|
} = useGlobalDataSlice("company");
|
|
@@ -36689,9 +37060,19 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36689
37060
|
});
|
|
36690
37061
|
}, [data, valid, errors, fieldProblems]);
|
|
36691
37062
|
return jsxs("form", {
|
|
36692
|
-
className: "adyen-
|
|
36693
|
-
children: [jsx(
|
|
36694
|
-
|
|
37063
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37064
|
+
children: [jsx(Typography, {
|
|
37065
|
+
el: "h1",
|
|
37066
|
+
variant: "title-l",
|
|
37067
|
+
children: i18n.get("additionalInformationIsRequiredForLoan")
|
|
37068
|
+
}), jsx(Typography, {
|
|
37069
|
+
el: "p",
|
|
37070
|
+
variant: "body",
|
|
37071
|
+
children: i18n.get("beforeYourCapitalLoanApplicationCanBeSubmitted")
|
|
37072
|
+
}), jsx(Typography, {
|
|
37073
|
+
el: "p",
|
|
37074
|
+
variant: "body",
|
|
37075
|
+
children: i18n.get("euFinancialRegulationsRequireUs")
|
|
36695
37076
|
}), jsx(ErrorPanel, {
|
|
36696
37077
|
verificationErrors: props.formVerificationErrors,
|
|
36697
37078
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
@@ -36699,21 +37080,39 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36699
37080
|
id: "ariaErrorField"
|
|
36700
37081
|
}), jsx(HighExposureBusinessInformation, {
|
|
36701
37082
|
...props,
|
|
36702
|
-
handleChangeFor,
|
|
37083
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
36703
37084
|
errors,
|
|
36704
37085
|
data,
|
|
36705
37086
|
valid,
|
|
36706
37087
|
country: props.country,
|
|
36707
37088
|
formUtils,
|
|
37089
|
+
fieldProblems,
|
|
37090
|
+
targetPage: HighExposurePagesEnums.COMPANY_PAGE,
|
|
37091
|
+
fieldMapping: companyFieldMapping
|
|
37092
|
+
}), jsx(HighExposureOwnershipStructure, {
|
|
37093
|
+
...props,
|
|
37094
|
+
handleChangeFor,
|
|
37095
|
+
errors,
|
|
37096
|
+
data,
|
|
37097
|
+
valid,
|
|
37098
|
+
legalEntity: props.legalEntity,
|
|
37099
|
+
formUtils,
|
|
36708
37100
|
fieldProblems
|
|
36709
37101
|
})]
|
|
36710
37102
|
});
|
|
36711
37103
|
}
|
|
36712
|
-
const
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
|
|
36716
|
-
|
|
37104
|
+
const parentCompanyFieldMapping$1 = {
|
|
37105
|
+
legalName: "parentLegalName",
|
|
37106
|
+
legalForm: "parentLegalForm",
|
|
37107
|
+
naceCode: "parentNaceCode",
|
|
37108
|
+
numberOfEmployees: "parentNumberOfEmployees",
|
|
37109
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheParentCompanyEarnMoreThanHalf",
|
|
37110
|
+
doesYourCompanyHaveLEI: "doesYourParentCompanyHaveLEI",
|
|
37111
|
+
legalEntityIdentifier: "parentLegalEntityIdentifier",
|
|
37112
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowParentNumberOfEmployees"
|
|
37113
|
+
};
|
|
37114
|
+
const highExposureParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping$1);
|
|
37115
|
+
function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
36717
37116
|
const {
|
|
36718
37117
|
i18n
|
|
36719
37118
|
} = useI18nContext();
|
|
@@ -36725,14 +37124,15 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
36725
37124
|
fieldProblems
|
|
36726
37125
|
} = useForm({
|
|
36727
37126
|
...props,
|
|
36728
|
-
schema:
|
|
37127
|
+
schema: highExposureParentCompanyDetailsFields,
|
|
36729
37128
|
defaultData: {
|
|
36730
37129
|
...props.data
|
|
36731
37130
|
},
|
|
36732
|
-
rules: props.validators ||
|
|
37131
|
+
rules: props.validators || highExposureParentCompanyDetailsValidations,
|
|
36733
37132
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36734
37133
|
});
|
|
36735
37134
|
const formUtils = formUtilities(props, i18n);
|
|
37135
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36736
37136
|
const {
|
|
36737
37137
|
updateStateSlice
|
|
36738
37138
|
} = useGlobalDataSlice("parentCompany");
|
|
@@ -36745,39 +37145,47 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
36745
37145
|
});
|
|
36746
37146
|
}, [data, valid, errors, fieldProblems]);
|
|
36747
37147
|
return jsxs("form", {
|
|
36748
|
-
className: "adyen-
|
|
36749
|
-
children: [jsx(
|
|
36750
|
-
|
|
37148
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37149
|
+
children: [jsx(Typography, {
|
|
37150
|
+
el: "h1",
|
|
37151
|
+
variant: "title-l",
|
|
37152
|
+
children: i18n.get("parentCompanyInformation")
|
|
37153
|
+
}), jsx(Typography, {
|
|
37154
|
+
el: "p",
|
|
37155
|
+
variant: "body",
|
|
37156
|
+
children: i18n.get("inTheLastStepOwnedByAParentCompany")
|
|
36751
37157
|
}), jsx(ErrorPanel, {
|
|
36752
37158
|
verificationErrors: props.formVerificationErrors,
|
|
36753
37159
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
36754
37160
|
formUtils,
|
|
36755
37161
|
id: "ariaErrorField"
|
|
36756
|
-
}),
|
|
36757
|
-
|
|
36758
|
-
|
|
36759
|
-
|
|
36760
|
-
|
|
36761
|
-
|
|
36762
|
-
|
|
36763
|
-
|
|
36764
|
-
|
|
36765
|
-
|
|
36766
|
-
|
|
36767
|
-
|
|
36768
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
36769
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
36770
|
-
"aria-required": true,
|
|
36771
|
-
"aria-label": formUtils.getLabel("numberOfEmployees"),
|
|
36772
|
-
"aria-invalid": !valid.numberOfEmployees
|
|
36773
|
-
})
|
|
37162
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
37163
|
+
...props,
|
|
37164
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
37165
|
+
sectionHeading: "businessInformation",
|
|
37166
|
+
errors,
|
|
37167
|
+
data,
|
|
37168
|
+
valid,
|
|
37169
|
+
country: props.country,
|
|
37170
|
+
formUtils,
|
|
37171
|
+
fieldProblems,
|
|
37172
|
+
targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE,
|
|
37173
|
+
fieldMapping: parentCompanyFieldMapping$1
|
|
36774
37174
|
})]
|
|
36775
37175
|
});
|
|
36776
37176
|
}
|
|
36777
|
-
|
|
36778
|
-
|
|
36779
|
-
|
|
36780
|
-
|
|
37177
|
+
const parentCompanyFieldMapping = {
|
|
37178
|
+
legalName: "ultimateParentLegalName",
|
|
37179
|
+
legalForm: "ultimateParentLegalForm",
|
|
37180
|
+
naceCode: "ultimateParentNaceCode",
|
|
37181
|
+
numberOfEmployees: "ultimateParentNumberOfEmployees",
|
|
37182
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheUltimateParentCompanyEarnMoreThanHalf",
|
|
37183
|
+
doesYourCompanyHaveLEI: "doesYourUltimateParentCompanyHaveLEI",
|
|
37184
|
+
legalEntityIdentifier: "ultimateParentLegalEntityIdentifier",
|
|
37185
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowUltimateParentNumberOfEmployees"
|
|
37186
|
+
};
|
|
37187
|
+
const highExposureUltimateParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping);
|
|
37188
|
+
function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
|
|
36781
37189
|
const {
|
|
36782
37190
|
i18n
|
|
36783
37191
|
} = useI18nContext();
|
|
@@ -36789,14 +37197,15 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
36789
37197
|
fieldProblems
|
|
36790
37198
|
} = useForm({
|
|
36791
37199
|
...props,
|
|
36792
|
-
schema:
|
|
37200
|
+
schema: highExposureUltimateParentCompanyDetailsFields,
|
|
36793
37201
|
defaultData: {
|
|
36794
37202
|
...props.data
|
|
36795
37203
|
},
|
|
36796
|
-
rules: props.validators ||
|
|
37204
|
+
rules: props.validators || highExposureUltimateParentCompanyDetailsValidations,
|
|
36797
37205
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36798
37206
|
});
|
|
36799
37207
|
const formUtils = formUtilities(props, i18n);
|
|
37208
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36800
37209
|
const {
|
|
36801
37210
|
updateStateSlice
|
|
36802
37211
|
} = useGlobalDataSlice("ultimateParentCompany");
|
|
@@ -36809,32 +37218,32 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
36809
37218
|
});
|
|
36810
37219
|
}, [data, valid, errors, fieldProblems]);
|
|
36811
37220
|
return jsxs("form", {
|
|
36812
|
-
className: "adyen-
|
|
36813
|
-
children: [jsx(
|
|
36814
|
-
|
|
37221
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37222
|
+
children: [jsx(Typography, {
|
|
37223
|
+
el: "h1",
|
|
37224
|
+
variant: "title-l",
|
|
37225
|
+
children: i18n.get("ultimateParentCompanyInformation")
|
|
37226
|
+
}), jsx(Typography, {
|
|
37227
|
+
el: "p",
|
|
37228
|
+
variant: "body",
|
|
37229
|
+
children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany")
|
|
36815
37230
|
}), jsx(ErrorPanel, {
|
|
36816
37231
|
verificationErrors: props.formVerificationErrors,
|
|
36817
37232
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
36818
37233
|
formUtils,
|
|
36819
37234
|
id: "ariaErrorField"
|
|
36820
|
-
}),
|
|
36821
|
-
|
|
36822
|
-
|
|
36823
|
-
|
|
36824
|
-
|
|
36825
|
-
|
|
36826
|
-
|
|
36827
|
-
|
|
36828
|
-
|
|
36829
|
-
|
|
36830
|
-
|
|
36831
|
-
|
|
36832
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
36833
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
36834
|
-
"aria-required": true,
|
|
36835
|
-
"aria-label": formUtils.getLabel("numberOfEmployees"),
|
|
36836
|
-
"aria-invalid": !valid.numberOfEmployees
|
|
36837
|
-
})
|
|
37235
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
37236
|
+
...props,
|
|
37237
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
37238
|
+
sectionHeading: "businessInformation",
|
|
37239
|
+
errors,
|
|
37240
|
+
data,
|
|
37241
|
+
valid,
|
|
37242
|
+
country: props.country,
|
|
37243
|
+
formUtils,
|
|
37244
|
+
fieldProblems,
|
|
37245
|
+
targetPage: HighExposurePagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
37246
|
+
fieldMapping: parentCompanyFieldMapping
|
|
36838
37247
|
})]
|
|
36839
37248
|
});
|
|
36840
37249
|
}
|
|
@@ -36865,20 +37274,15 @@ function HighExposureDropinComponent(props) {
|
|
|
36865
37274
|
const highExposureCompanyDetailsFormProps = getFormProps(props, companyFormId);
|
|
36866
37275
|
const highExposureParentCompanyDetailsFormProps = getFormProps(props, parentCompanyFormId);
|
|
36867
37276
|
const highExposureUltimateParentCompanyDetailsFormProps = getFormProps(props, ultimateParentCompanyFormId);
|
|
36868
|
-
const renderActiveForm = (activeForm) =>
|
|
37277
|
+
const renderActiveForm = (activeForm) => jsx("div", {
|
|
36869
37278
|
className: "adyen-kyc",
|
|
36870
|
-
children:
|
|
36871
|
-
page: "High exposure company details page",
|
|
36872
|
-
titleId: "whyDoINeedToFillInThisInformation",
|
|
36873
|
-
contentId: "euFinancialRegulationsRequireUs",
|
|
36874
|
-
title: i18n.get("whyDoINeedToFillInThisInformation"),
|
|
36875
|
-
content: i18n.get("euFinancialRegulationsRequireUs")
|
|
36876
|
-
}), jsxs("div", {
|
|
37279
|
+
children: jsxs("div", {
|
|
36877
37280
|
className: "adyen-kyc-form-wrapper",
|
|
36878
37281
|
children: [activeForm.formId === companyFormId && jsx(AdditionalFieldsForHighExposureCompany, {
|
|
36879
37282
|
...highExposureCompanyDetailsFormProps,
|
|
36880
37283
|
legalEntityId: props.legalEntityId,
|
|
36881
|
-
|
|
37284
|
+
legalEntity: props.legalEntity,
|
|
37285
|
+
heading: i18n.get("yourBusinessDetails"),
|
|
36882
37286
|
id: companyFormId,
|
|
36883
37287
|
country: props.country
|
|
36884
37288
|
}), activeForm.formId === parentCompanyFormId && jsx(AdditionalFieldsForHighExposureParentCompany, {
|
|
@@ -36894,7 +37298,7 @@ function HighExposureDropinComponent(props) {
|
|
|
36894
37298
|
id: companyFormId,
|
|
36895
37299
|
country: props.country
|
|
36896
37300
|
})]
|
|
36897
|
-
})
|
|
37301
|
+
})
|
|
36898
37302
|
});
|
|
36899
37303
|
return jsx("div", {
|
|
36900
37304
|
className: "adyen-kyc",
|
|
@@ -36909,6 +37313,24 @@ const customLabels = {
|
|
|
36909
37313
|
company: {
|
|
36910
37314
|
legalForm: "businessStructure",
|
|
36911
37315
|
naceCode: "industryAndNaceCode"
|
|
37316
|
+
},
|
|
37317
|
+
parentCompany: {
|
|
37318
|
+
parentLegalName: "legalName",
|
|
37319
|
+
parentLegalForm: "businessStructure",
|
|
37320
|
+
parentNaceCode: "industryAndNaceCode",
|
|
37321
|
+
parentNumberOfEmployees: "numberOfEmployees",
|
|
37322
|
+
doesTheParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37323
|
+
doesYourParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
37324
|
+
parentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
37325
|
+
},
|
|
37326
|
+
ultimateParentCompany: {
|
|
37327
|
+
ultimateParentLegalName: "legalName",
|
|
37328
|
+
ultimateParentLegalForm: "businessStructure",
|
|
37329
|
+
ultimateParentNaceCode: "industryAndNaceCode",
|
|
37330
|
+
ultimateParentNumberOfEmployees: "numberOfEmployees",
|
|
37331
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37332
|
+
doesYourUltimateParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
37333
|
+
ultimateParentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
36912
37334
|
}
|
|
36913
37335
|
};
|
|
36914
37336
|
function UpdateLegalEntityForHighExposure({
|
|
@@ -36922,16 +37344,17 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36922
37344
|
hideDropinLayout,
|
|
36923
37345
|
handleHomeClick,
|
|
36924
37346
|
homeButtonLabel,
|
|
36925
|
-
legalEntityId
|
|
37347
|
+
legalEntityId,
|
|
37348
|
+
legalEntity: legalEntityProps
|
|
36926
37349
|
}) {
|
|
36927
|
-
var _a;
|
|
37350
|
+
var _a, _b, _c;
|
|
36928
37351
|
const {
|
|
36929
37352
|
getLegalEntity: getLegalEntity2
|
|
36930
37353
|
} = useComponentApi(legalEntityId);
|
|
36931
37354
|
const {
|
|
36932
37355
|
i18n
|
|
36933
37356
|
} = useI18nContext();
|
|
36934
|
-
const [legalEntity, setLegalEntity] = useState();
|
|
37357
|
+
const [legalEntity, setLegalEntity] = useState(legalEntityProps);
|
|
36935
37358
|
const fetchLegalEntity = useCallback(async () => {
|
|
36936
37359
|
const legalEntityResponse = await getLegalEntity2(legalEntityId);
|
|
36937
37360
|
setLegalEntity(legalEntityResponse);
|
|
@@ -36956,6 +37379,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36956
37379
|
} = useToastContext();
|
|
36957
37380
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
36958
37381
|
const formRef = useRef(null);
|
|
37382
|
+
const [highExposureRequiredForms, setHighExposureRequiredForms] = useState(highExposureForms);
|
|
36959
37383
|
const getConfigurationData = useCallback(() => getConfiguration2({
|
|
36960
37384
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
36961
37385
|
capabilities,
|
|
@@ -36982,10 +37406,33 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36982
37406
|
});
|
|
36983
37407
|
onChange == null ? void 0 : onChange(currentState);
|
|
36984
37408
|
}, [currentState]);
|
|
37409
|
+
useEffect(() => {
|
|
37410
|
+
var _a2, _b2;
|
|
37411
|
+
const showParentCompany = ((_a2 = data == null ? void 0 : data.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
|
|
37412
|
+
const showUltimateParentCompany = ((_b2 = data == null ? void 0 : data.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
|
|
37413
|
+
let updateForms = {
|
|
37414
|
+
company: {
|
|
37415
|
+
...highExposureForms.company
|
|
37416
|
+
}
|
|
37417
|
+
};
|
|
37418
|
+
if (showParentCompany) {
|
|
37419
|
+
updateForms = {
|
|
37420
|
+
...updateForms,
|
|
37421
|
+
parentCompany: highExposureForms.parentCompany
|
|
37422
|
+
};
|
|
37423
|
+
}
|
|
37424
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
37425
|
+
updateForms = {
|
|
37426
|
+
...updateForms,
|
|
37427
|
+
ultimateParentCompany: highExposureForms.ultimateParentCompany
|
|
37428
|
+
};
|
|
37429
|
+
}
|
|
37430
|
+
setHighExposureRequiredForms(updateForms);
|
|
37431
|
+
}, [(_a = data == null ? void 0 : data.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany, (_b = data == null ? void 0 : data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany]);
|
|
36985
37432
|
const forms2 = useMemo(() => {
|
|
36986
|
-
const requiredForms = getRequiredForms(
|
|
37433
|
+
const requiredForms = getRequiredForms(highExposureRequiredForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
36987
37434
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
36988
|
-
}, [derivedProps, formValidity, problems]);
|
|
37435
|
+
}, [derivedProps == null ? void 0 : derivedProps.optionalFields, derivedProps == null ? void 0 : derivedProps.requiredFields, formValidity, highExposureRequiredForms, problems]);
|
|
36989
37436
|
const onSubmit = async () => {
|
|
36990
37437
|
setLoadingStatus("loading");
|
|
36991
37438
|
const exposureDetails = mapHighExposureToLegalEntity(data);
|
|
@@ -37050,7 +37497,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37050
37497
|
onSubmit
|
|
37051
37498
|
});
|
|
37052
37499
|
return jsx(FormWrapper, {
|
|
37053
|
-
taskName: "
|
|
37500
|
+
taskName: "progress",
|
|
37054
37501
|
handleNextClick,
|
|
37055
37502
|
handleBackClick,
|
|
37056
37503
|
gotoFormByFormIndex,
|
|
@@ -37076,10 +37523,11 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37076
37523
|
activeForm,
|
|
37077
37524
|
capabilities,
|
|
37078
37525
|
data,
|
|
37079
|
-
country: ((
|
|
37526
|
+
country: ((_c = data == null ? void 0 : data.company) == null ? void 0 : _c.country) ?? country2,
|
|
37080
37527
|
problems,
|
|
37081
37528
|
shouldValidate,
|
|
37082
|
-
ref: formRef
|
|
37529
|
+
ref: formRef,
|
|
37530
|
+
legalEntity
|
|
37083
37531
|
})
|
|
37084
37532
|
});
|
|
37085
37533
|
}
|
|
@@ -37667,39 +38115,40 @@ const verifyIdNumber = async (context, request) => {
|
|
|
37667
38115
|
const getKycExternalApi = ({
|
|
37668
38116
|
loadingContext,
|
|
37669
38117
|
clientKey
|
|
37670
|
-
}) => {
|
|
37671
|
-
|
|
37672
|
-
|
|
37673
|
-
|
|
37674
|
-
|
|
37675
|
-
|
|
37676
|
-
|
|
37677
|
-
|
|
37678
|
-
|
|
37679
|
-
|
|
37680
|
-
|
|
37681
|
-
|
|
37682
|
-
|
|
37683
|
-
|
|
37684
|
-
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
|
|
37689
|
-
|
|
37690
|
-
|
|
37691
|
-
|
|
37692
|
-
|
|
37693
|
-
|
|
37694
|
-
|
|
37695
|
-
|
|
37696
|
-
|
|
37697
|
-
|
|
37698
|
-
|
|
37699
|
-
|
|
37700
|
-
|
|
37701
|
-
|
|
37702
|
-
}
|
|
38118
|
+
}) => ({
|
|
38119
|
+
getConfiguration: async (request) => getConfiguration({
|
|
38120
|
+
loadingContext,
|
|
38121
|
+
clientKey
|
|
38122
|
+
}, request),
|
|
38123
|
+
getAllowedCountries: async () => getAllowedCountries({
|
|
38124
|
+
loadingContext,
|
|
38125
|
+
clientKey
|
|
38126
|
+
}),
|
|
38127
|
+
getAllowedLocales: async () => getAllowedLocales({
|
|
38128
|
+
loadingContext,
|
|
38129
|
+
clientKey
|
|
38130
|
+
}),
|
|
38131
|
+
getDataset: async (name, locale) => getDataset({
|
|
38132
|
+
loadingContext,
|
|
38133
|
+
clientKey
|
|
38134
|
+
}, name, locale),
|
|
38135
|
+
loadDocumentGuidance: async () => loadDocumentGuidance(loadingContext),
|
|
38136
|
+
verifyIdNumber: async (request) => verifyIdNumber({
|
|
38137
|
+
loadingContext,
|
|
38138
|
+
clientKey
|
|
38139
|
+
}, request),
|
|
38140
|
+
validatePhoneNumber: async (phoneNumber2) => validatePhoneNumber({
|
|
38141
|
+
loadingContext,
|
|
38142
|
+
clientKey
|
|
38143
|
+
}, phoneNumber2),
|
|
38144
|
+
getImageUrl: () => `${loadingContext}static/images/`,
|
|
38145
|
+
getLegalForms: async () => {
|
|
38146
|
+
throw new Error("getLegalForms not implemented in kycexternalapi");
|
|
38147
|
+
},
|
|
38148
|
+
getNaceCodes: async () => {
|
|
38149
|
+
throw new Error("getNaceCodes not implemented in kycexternalapi");
|
|
38150
|
+
}
|
|
38151
|
+
});
|
|
37703
38152
|
const ConfigurationApiProvider = ({
|
|
37704
38153
|
children,
|
|
37705
38154
|
onUserEvent,
|
|
@@ -37711,7 +38160,7 @@ const ConfigurationApiProvider = ({
|
|
|
37711
38160
|
isEmbeddedDropin,
|
|
37712
38161
|
loadingContext
|
|
37713
38162
|
} = authContext;
|
|
37714
|
-
const sdkVersion = "2.
|
|
38163
|
+
const sdkVersion = "2.47.0";
|
|
37715
38164
|
useAnalytics({
|
|
37716
38165
|
onUserEvent,
|
|
37717
38166
|
legalEntityId: rootLegalEntityId,
|
|
@@ -38095,8 +38544,7 @@ const Toast = ({
|
|
|
38095
38544
|
onToastAction
|
|
38096
38545
|
}) => {
|
|
38097
38546
|
const toastRef = useRef(null);
|
|
38098
|
-
const
|
|
38099
|
-
const successToast = type === "loading";
|
|
38547
|
+
const isLoading = type === "loading";
|
|
38100
38548
|
const labelId = getUniqueId("toast");
|
|
38101
38549
|
const handleShow = useCallback(() => {
|
|
38102
38550
|
var _a;
|
|
@@ -38113,52 +38561,49 @@ const Toast = ({
|
|
|
38113
38561
|
setTimeout(() => handleHide(), duration);
|
|
38114
38562
|
}
|
|
38115
38563
|
}, [label, duration, handleHide, handleShow]);
|
|
38564
|
+
const statusClassMap = Object.freeze({
|
|
38565
|
+
info: "",
|
|
38566
|
+
loading: "adyen-kyc-toast__loading",
|
|
38567
|
+
success: "adyen-kyc-toast__success",
|
|
38568
|
+
error: "adyen-kyc-toast__error"
|
|
38569
|
+
});
|
|
38116
38570
|
return jsxs("div", {
|
|
38117
38571
|
ref: toastRef,
|
|
38118
38572
|
role: actionLabel ? "alertdialog" : "alert",
|
|
38119
|
-
className:
|
|
38573
|
+
className: `adyen-kyc-toast ${statusClassMap[type]}`,
|
|
38120
38574
|
"aria-labelledby": labelId,
|
|
38121
|
-
children: [
|
|
38575
|
+
children: [isLoading && jsx("div", {
|
|
38122
38576
|
className: "adyen-kyc-toast__loader",
|
|
38123
|
-
children: jsx(
|
|
38124
|
-
|
|
38577
|
+
children: jsx(Spinner, {
|
|
38578
|
+
size: "small"
|
|
38125
38579
|
})
|
|
38126
|
-
}), !loading2 && jsxs("div", {
|
|
38127
|
-
className: cx("adyen-kyc-toast__status", {
|
|
38128
|
-
"adyen-kyc-toast__status--success": successToast,
|
|
38129
|
-
"adyen-kyc-toast__status--error": !successToast
|
|
38130
|
-
}),
|
|
38131
|
-
children: [successToast && jsx(Icon, {
|
|
38132
|
-
className: "adyen-kyc-toast__status-icon",
|
|
38133
|
-
name: "checkmark"
|
|
38134
|
-
}), !successToast && jsx(Icon, {
|
|
38135
|
-
className: "adyen-kyc-toast__status-icon",
|
|
38136
|
-
name: "cross"
|
|
38137
|
-
})]
|
|
38138
38580
|
}), jsxs("div", {
|
|
38139
38581
|
className: "adyen-kyc-toast__message",
|
|
38140
38582
|
children: [jsx("span", {
|
|
38141
38583
|
id: labelId,
|
|
38142
38584
|
className: "adyen-kyc-toast__title",
|
|
38143
38585
|
children: label
|
|
38144
|
-
}),
|
|
38145
|
-
className: "adyen-kyc-link adyen-kyc-toast__action",
|
|
38146
|
-
title: "performAction",
|
|
38147
|
-
type: "button",
|
|
38148
|
-
onClick: onToastAction,
|
|
38149
|
-
children: actionLabel
|
|
38150
|
-
}), !loading2 && subLabel && jsx("span", {
|
|
38586
|
+
}), !isLoading && subLabel && jsx("span", {
|
|
38151
38587
|
className: "adyen-kyc-toast__subtitle",
|
|
38152
38588
|
children: subLabel
|
|
38153
38589
|
})]
|
|
38154
|
-
}),
|
|
38155
|
-
className: "adyen-kyc-
|
|
38156
|
-
|
|
38157
|
-
|
|
38158
|
-
|
|
38159
|
-
|
|
38160
|
-
|
|
38161
|
-
|
|
38590
|
+
}), jsxs("div", {
|
|
38591
|
+
className: "adyen-kyc-toast__actions",
|
|
38592
|
+
children: [!isLoading && jsx("button", {
|
|
38593
|
+
className: "adyen-kyc-toast__close",
|
|
38594
|
+
title: "close",
|
|
38595
|
+
type: "button",
|
|
38596
|
+
onClick: handleHide,
|
|
38597
|
+
children: jsx(Icon, {
|
|
38598
|
+
name: "cross"
|
|
38599
|
+
})
|
|
38600
|
+
}), actionLabel && jsx(Button, {
|
|
38601
|
+
onClick: onToastAction ?? noop,
|
|
38602
|
+
className: "adyen-kyc-link adyen-kyc-toast__action adyen-kyc-u-margin-right-8",
|
|
38603
|
+
title: "performAction",
|
|
38604
|
+
label: actionLabel,
|
|
38605
|
+
tertiary: true
|
|
38606
|
+
})]
|
|
38162
38607
|
})]
|
|
38163
38608
|
});
|
|
38164
38609
|
};
|
|
@@ -39152,18 +39597,12 @@ const validateCoreOptions = (coreOptions) => {
|
|
|
39152
39597
|
if (!(coreOptions.sdkToken && coreOptions.getSdkToken) && !coreOptions.clientKey) {
|
|
39153
39598
|
throw new Error(`
|
|
39154
39599
|
|
|
39155
|
-
|
|
39156
|
-
|
|
39157
|
-
|
|
39158
|
-
- For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component`);
|
|
39600
|
+
Missing or invalid parameters. Specify either the sdkToken and getSdkToken handler or a clientKey in your request to initialize the component.`);
|
|
39159
39601
|
}
|
|
39160
39602
|
if (missing.length > 0) {
|
|
39161
39603
|
throw new Error(`
|
|
39162
39604
|
|
|
39163
|
-
|
|
39164
|
-
|
|
39165
|
-
- For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component
|
|
39166
|
-
`);
|
|
39605
|
+
Missing or invalid parameters. Specify ${listify(missing)} in your request to initialize the component.`);
|
|
39167
39606
|
}
|
|
39168
39607
|
};
|
|
39169
39608
|
const validateComponentOptions = (componentName, options) => {
|