@adyen/kyc-components 2.46.1 → 2.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/adyen-kyc-components.es.js +1051 -738
- package/dist/style.css +836 -1264
- package/dist/types/components/Company/trustedFields.d.ts +7 -0
- package/dist/types/components/CompanyRegistrationDetails/types.d.ts +2 -2
- 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/Modal/Modal.d.ts +1 -2
- 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/components/internal/{VatNumber → VatNumberField}/fieldConfig.d.ts +4 -3
- 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/mapping/componentApiMapping.d.ts +1 -2
- 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
- package/dist/types/components/internal/VatNumber/VatNumber.d.ts +0 -3
- package/dist/types/components/internal/VatNumber/index.d.ts +0 -1
- package/dist/types/components/internal/VatNumber/types.d.ts +0 -12
|
@@ -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,
|
|
@@ -8693,159 +8749,6 @@ function InputDate(props) {
|
|
|
8693
8749
|
maxLength: 10
|
|
8694
8750
|
});
|
|
8695
8751
|
}
|
|
8696
|
-
const STOCK_EXCHANGE_MIC_FIELD = ["stockExchangeMIC"];
|
|
8697
|
-
function StockExchangeMICField({
|
|
8698
|
-
data,
|
|
8699
|
-
valid,
|
|
8700
|
-
errors,
|
|
8701
|
-
labels: labels2,
|
|
8702
|
-
placeholders,
|
|
8703
|
-
readonly,
|
|
8704
|
-
mask,
|
|
8705
|
-
guidanceText,
|
|
8706
|
-
shouldValidate,
|
|
8707
|
-
handleChangeFor
|
|
8708
|
-
}) {
|
|
8709
|
-
return jsx(MaskedInputText, {
|
|
8710
|
-
name: "stockExchangeMIC",
|
|
8711
|
-
label: labels2.stockExchangeMIC ?? "",
|
|
8712
|
-
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockExchangeMIC,
|
|
8713
|
-
placeholder: placeholders == null ? void 0 : placeholders.stockExchangeMIC,
|
|
8714
|
-
...mask,
|
|
8715
|
-
classNameModifiers: {
|
|
8716
|
-
field: ["stockExchangeMIC"],
|
|
8717
|
-
input: ["stockExchangeMIC"]
|
|
8718
|
-
},
|
|
8719
|
-
errorMessage: errors.stockExchangeMIC,
|
|
8720
|
-
isValid: valid.stockExchangeMIC ?? false,
|
|
8721
|
-
value: data.stockExchangeMIC ?? "",
|
|
8722
|
-
readonly,
|
|
8723
|
-
shouldValidate,
|
|
8724
|
-
onInput: handleChangeFor("stockExchangeMIC", "input"),
|
|
8725
|
-
onBlur: handleChangeFor("stockExchangeMIC", "blur"),
|
|
8726
|
-
"aria-required": true,
|
|
8727
|
-
"aria-label": labels2.stockExchangeMIC,
|
|
8728
|
-
"aria-invalid": !valid.stockExchangeMIC
|
|
8729
|
-
});
|
|
8730
|
-
}
|
|
8731
|
-
const stockExchangeMICFieldMetadata = {
|
|
8732
|
-
label: "stockExchangeMIC",
|
|
8733
|
-
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[a-zA-Z0-9]{4}$/)],
|
|
8734
|
-
mask: {
|
|
8735
|
-
mask: makeMask(...alphanumericInputs(4)),
|
|
8736
|
-
transformOnType: uppercase
|
|
8737
|
-
},
|
|
8738
|
-
guidanceText: {
|
|
8739
|
-
key: "enterNCharactersForExample",
|
|
8740
|
-
values: {
|
|
8741
|
-
numChars: "4",
|
|
8742
|
-
example: "XNAS"
|
|
8743
|
-
}
|
|
8744
|
-
}
|
|
8745
|
-
};
|
|
8746
|
-
const STOCK_ISIN_FIELD = ["stockISIN"];
|
|
8747
|
-
function StockISINField({
|
|
8748
|
-
data,
|
|
8749
|
-
valid,
|
|
8750
|
-
errors,
|
|
8751
|
-
labels: labels2,
|
|
8752
|
-
placeholders,
|
|
8753
|
-
readonly,
|
|
8754
|
-
mask,
|
|
8755
|
-
guidanceText,
|
|
8756
|
-
shouldValidate,
|
|
8757
|
-
handleChangeFor
|
|
8758
|
-
}) {
|
|
8759
|
-
return jsx(MaskedInputText, {
|
|
8760
|
-
name: "stockISIN",
|
|
8761
|
-
label: labels2.stockISIN ?? "",
|
|
8762
|
-
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockISIN,
|
|
8763
|
-
placeholder: placeholders == null ? void 0 : placeholders.stockISIN,
|
|
8764
|
-
...mask,
|
|
8765
|
-
classNameModifiers: {
|
|
8766
|
-
field: ["stockISIN"],
|
|
8767
|
-
input: ["stockISIN"]
|
|
8768
|
-
},
|
|
8769
|
-
errorMessage: errors.stockISIN,
|
|
8770
|
-
isValid: valid.stockISIN ?? false,
|
|
8771
|
-
value: data.stockISIN ?? "",
|
|
8772
|
-
readonly,
|
|
8773
|
-
shouldValidate,
|
|
8774
|
-
onInput: handleChangeFor("stockISIN", "input"),
|
|
8775
|
-
onBlur: handleChangeFor("stockISIN", "blur"),
|
|
8776
|
-
"aria-required": true,
|
|
8777
|
-
"aria-label": labels2.stockISIN,
|
|
8778
|
-
"aria-invalid": !valid.stockISIN
|
|
8779
|
-
});
|
|
8780
|
-
}
|
|
8781
|
-
const stockISINFieldMetadata = {
|
|
8782
|
-
label: "stockISIN",
|
|
8783
|
-
validators: [validateNotEmptyOnBlur, {
|
|
8784
|
-
modes: ["blur"],
|
|
8785
|
-
validate: (value) => !!value && isISIN(value)
|
|
8786
|
-
}],
|
|
8787
|
-
mask: {
|
|
8788
|
-
mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
|
|
8789
|
-
transformOnType: uppercase
|
|
8790
|
-
},
|
|
8791
|
-
helperText: "stockISINHelper",
|
|
8792
|
-
guidanceText: {
|
|
8793
|
-
key: "validationPleaseEnterAValidStockISIN",
|
|
8794
|
-
values: {
|
|
8795
|
-
example: "NL0012969182"
|
|
8796
|
-
}
|
|
8797
|
-
}
|
|
8798
|
-
};
|
|
8799
|
-
const STOCK_TICKER_SYMBOL_FIELD = ["stockTickerSymbol"];
|
|
8800
|
-
function StockTickerSymbolField({
|
|
8801
|
-
data,
|
|
8802
|
-
valid,
|
|
8803
|
-
errors,
|
|
8804
|
-
labels: labels2,
|
|
8805
|
-
placeholders,
|
|
8806
|
-
readonly,
|
|
8807
|
-
mask,
|
|
8808
|
-
guidanceText,
|
|
8809
|
-
shouldValidate,
|
|
8810
|
-
handleChangeFor
|
|
8811
|
-
}) {
|
|
8812
|
-
return jsx(MaskedInputText, {
|
|
8813
|
-
name: "stockTickerSymbol",
|
|
8814
|
-
label: labels2.stockTickerSymbol ?? "",
|
|
8815
|
-
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockTickerSymbol,
|
|
8816
|
-
placeholder: placeholders == null ? void 0 : placeholders.stockTickerSymbol,
|
|
8817
|
-
...mask,
|
|
8818
|
-
classNameModifiers: {
|
|
8819
|
-
field: ["stockTickerSymbol"],
|
|
8820
|
-
input: ["stockTickerSymbol"]
|
|
8821
|
-
},
|
|
8822
|
-
errorMessage: errors.stockTickerSymbol,
|
|
8823
|
-
isValid: valid.stockTickerSymbol ?? false,
|
|
8824
|
-
value: data.stockTickerSymbol ?? "",
|
|
8825
|
-
readonly,
|
|
8826
|
-
shouldValidate,
|
|
8827
|
-
onInput: handleChangeFor("stockTickerSymbol", "input"),
|
|
8828
|
-
onBlur: handleChangeFor("stockTickerSymbol", "blur"),
|
|
8829
|
-
"aria-required": true,
|
|
8830
|
-
"aria-label": labels2.stockTickerSymbol,
|
|
8831
|
-
"aria-invalid": !valid.stockTickerSymbol
|
|
8832
|
-
});
|
|
8833
|
-
}
|
|
8834
|
-
const stockTickerSymbolFieldMetadata = {
|
|
8835
|
-
label: "stockTickerSymbol",
|
|
8836
|
-
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[A-Z\d]{1,5}$/)],
|
|
8837
|
-
mask: {
|
|
8838
|
-
mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
|
|
8839
|
-
transformOnType: uppercase
|
|
8840
|
-
},
|
|
8841
|
-
guidanceText: {
|
|
8842
|
-
key: "enterAMaximumOfNCharactersForExample",
|
|
8843
|
-
values: {
|
|
8844
|
-
maxChars: "5",
|
|
8845
|
-
example: "ADYEN"
|
|
8846
|
-
}
|
|
8847
|
-
}
|
|
8848
|
-
};
|
|
8849
8752
|
const defaultFieldMetadata$8 = {
|
|
8850
8753
|
label: "taxId"
|
|
8851
8754
|
};
|
|
@@ -9145,6 +9048,9 @@ const defaultFieldConfig$8 = {
|
|
|
9145
9048
|
validators: validatePatternOnBlur(/^\d{12}$/)
|
|
9146
9049
|
}
|
|
9147
9050
|
};
|
|
9051
|
+
const vatAbsenceReasonMetadata = {
|
|
9052
|
+
validators: [validateNotEmptyOnBlur]
|
|
9053
|
+
};
|
|
9148
9054
|
const defaultFieldMetadata$7 = {
|
|
9149
9055
|
label: "vatNumber"
|
|
9150
9056
|
};
|
|
@@ -9792,6 +9698,159 @@ const inferTaxIdNumberType = (taxId2, country2, companyType2) => {
|
|
|
9792
9698
|
}
|
|
9793
9699
|
}
|
|
9794
9700
|
};
|
|
9701
|
+
const STOCK_EXCHANGE_MIC_FIELD = ["stockExchangeMIC"];
|
|
9702
|
+
function StockExchangeMICField({
|
|
9703
|
+
data,
|
|
9704
|
+
valid,
|
|
9705
|
+
errors,
|
|
9706
|
+
labels: labels2,
|
|
9707
|
+
placeholders,
|
|
9708
|
+
readonly,
|
|
9709
|
+
mask,
|
|
9710
|
+
guidanceText,
|
|
9711
|
+
shouldValidate,
|
|
9712
|
+
handleChangeFor
|
|
9713
|
+
}) {
|
|
9714
|
+
return jsx(MaskedInputText, {
|
|
9715
|
+
name: "stockExchangeMIC",
|
|
9716
|
+
label: labels2.stockExchangeMIC ?? "",
|
|
9717
|
+
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockExchangeMIC,
|
|
9718
|
+
placeholder: placeholders == null ? void 0 : placeholders.stockExchangeMIC,
|
|
9719
|
+
...mask,
|
|
9720
|
+
classNameModifiers: {
|
|
9721
|
+
field: ["stockExchangeMIC"],
|
|
9722
|
+
input: ["stockExchangeMIC"]
|
|
9723
|
+
},
|
|
9724
|
+
errorMessage: errors.stockExchangeMIC,
|
|
9725
|
+
isValid: valid.stockExchangeMIC ?? false,
|
|
9726
|
+
value: data.stockExchangeMIC ?? "",
|
|
9727
|
+
readonly,
|
|
9728
|
+
shouldValidate,
|
|
9729
|
+
onInput: handleChangeFor("stockExchangeMIC", "input"),
|
|
9730
|
+
onBlur: handleChangeFor("stockExchangeMIC", "blur"),
|
|
9731
|
+
"aria-required": true,
|
|
9732
|
+
"aria-label": labels2.stockExchangeMIC,
|
|
9733
|
+
"aria-invalid": !valid.stockExchangeMIC
|
|
9734
|
+
});
|
|
9735
|
+
}
|
|
9736
|
+
const stockExchangeMICFieldMetadata = {
|
|
9737
|
+
label: "stockExchangeMIC",
|
|
9738
|
+
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[a-zA-Z0-9]{4}$/)],
|
|
9739
|
+
mask: {
|
|
9740
|
+
mask: makeMask(...alphanumericInputs(4)),
|
|
9741
|
+
transformOnType: uppercase
|
|
9742
|
+
},
|
|
9743
|
+
guidanceText: {
|
|
9744
|
+
key: "enterNCharactersForExample",
|
|
9745
|
+
values: {
|
|
9746
|
+
numChars: "4",
|
|
9747
|
+
example: "XNAS"
|
|
9748
|
+
}
|
|
9749
|
+
}
|
|
9750
|
+
};
|
|
9751
|
+
const STOCK_ISIN_FIELD = ["stockISIN"];
|
|
9752
|
+
function StockISINField({
|
|
9753
|
+
data,
|
|
9754
|
+
valid,
|
|
9755
|
+
errors,
|
|
9756
|
+
labels: labels2,
|
|
9757
|
+
placeholders,
|
|
9758
|
+
readonly,
|
|
9759
|
+
mask,
|
|
9760
|
+
guidanceText,
|
|
9761
|
+
shouldValidate,
|
|
9762
|
+
handleChangeFor
|
|
9763
|
+
}) {
|
|
9764
|
+
return jsx(MaskedInputText, {
|
|
9765
|
+
name: "stockISIN",
|
|
9766
|
+
label: labels2.stockISIN ?? "",
|
|
9767
|
+
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockISIN,
|
|
9768
|
+
placeholder: placeholders == null ? void 0 : placeholders.stockISIN,
|
|
9769
|
+
...mask,
|
|
9770
|
+
classNameModifiers: {
|
|
9771
|
+
field: ["stockISIN"],
|
|
9772
|
+
input: ["stockISIN"]
|
|
9773
|
+
},
|
|
9774
|
+
errorMessage: errors.stockISIN,
|
|
9775
|
+
isValid: valid.stockISIN ?? false,
|
|
9776
|
+
value: data.stockISIN ?? "",
|
|
9777
|
+
readonly,
|
|
9778
|
+
shouldValidate,
|
|
9779
|
+
onInput: handleChangeFor("stockISIN", "input"),
|
|
9780
|
+
onBlur: handleChangeFor("stockISIN", "blur"),
|
|
9781
|
+
"aria-required": true,
|
|
9782
|
+
"aria-label": labels2.stockISIN,
|
|
9783
|
+
"aria-invalid": !valid.stockISIN
|
|
9784
|
+
});
|
|
9785
|
+
}
|
|
9786
|
+
const stockISINFieldMetadata = {
|
|
9787
|
+
label: "stockISIN",
|
|
9788
|
+
validators: [validateNotEmptyOnBlur, {
|
|
9789
|
+
modes: ["blur"],
|
|
9790
|
+
validate: (value) => !!value && isISIN(value)
|
|
9791
|
+
}],
|
|
9792
|
+
mask: {
|
|
9793
|
+
mask: makeMask(...alphaInputs(2), ...alphanumericInputs(9), ...numericInputs(1)),
|
|
9794
|
+
transformOnType: uppercase
|
|
9795
|
+
},
|
|
9796
|
+
helperText: "stockISINHelper",
|
|
9797
|
+
guidanceText: {
|
|
9798
|
+
key: "validationPleaseEnterAValidStockISIN",
|
|
9799
|
+
values: {
|
|
9800
|
+
example: "NL0012969182"
|
|
9801
|
+
}
|
|
9802
|
+
}
|
|
9803
|
+
};
|
|
9804
|
+
const STOCK_TICKER_SYMBOL_FIELD = ["stockTickerSymbol"];
|
|
9805
|
+
function StockTickerSymbolField({
|
|
9806
|
+
data,
|
|
9807
|
+
valid,
|
|
9808
|
+
errors,
|
|
9809
|
+
labels: labels2,
|
|
9810
|
+
placeholders,
|
|
9811
|
+
readonly,
|
|
9812
|
+
mask,
|
|
9813
|
+
guidanceText,
|
|
9814
|
+
shouldValidate,
|
|
9815
|
+
handleChangeFor
|
|
9816
|
+
}) {
|
|
9817
|
+
return jsx(MaskedInputText, {
|
|
9818
|
+
name: "stockTickerSymbol",
|
|
9819
|
+
label: labels2.stockTickerSymbol ?? "",
|
|
9820
|
+
formatGuidance: guidanceText == null ? void 0 : guidanceText.stockTickerSymbol,
|
|
9821
|
+
placeholder: placeholders == null ? void 0 : placeholders.stockTickerSymbol,
|
|
9822
|
+
...mask,
|
|
9823
|
+
classNameModifiers: {
|
|
9824
|
+
field: ["stockTickerSymbol"],
|
|
9825
|
+
input: ["stockTickerSymbol"]
|
|
9826
|
+
},
|
|
9827
|
+
errorMessage: errors.stockTickerSymbol,
|
|
9828
|
+
isValid: valid.stockTickerSymbol ?? false,
|
|
9829
|
+
value: data.stockTickerSymbol ?? "",
|
|
9830
|
+
readonly,
|
|
9831
|
+
shouldValidate,
|
|
9832
|
+
onInput: handleChangeFor("stockTickerSymbol", "input"),
|
|
9833
|
+
onBlur: handleChangeFor("stockTickerSymbol", "blur"),
|
|
9834
|
+
"aria-required": true,
|
|
9835
|
+
"aria-label": labels2.stockTickerSymbol,
|
|
9836
|
+
"aria-invalid": !valid.stockTickerSymbol
|
|
9837
|
+
});
|
|
9838
|
+
}
|
|
9839
|
+
const stockTickerSymbolFieldMetadata = {
|
|
9840
|
+
label: "stockTickerSymbol",
|
|
9841
|
+
validators: [validateNotEmptyOnBlur, validatePatternOnBlur(/^[A-Z\d]{1,5}$/)],
|
|
9842
|
+
mask: {
|
|
9843
|
+
mask: makeMask(...alphanumericInputs(1), ...alphanumericInputs(4)),
|
|
9844
|
+
transformOnType: uppercase
|
|
9845
|
+
},
|
|
9846
|
+
guidanceText: {
|
|
9847
|
+
key: "enterAMaximumOfNCharactersForExample",
|
|
9848
|
+
values: {
|
|
9849
|
+
maxChars: "5",
|
|
9850
|
+
example: "ADYEN"
|
|
9851
|
+
}
|
|
9852
|
+
}
|
|
9853
|
+
};
|
|
9795
9854
|
function TaxIdNumberTypeSelector({
|
|
9796
9855
|
country: country2,
|
|
9797
9856
|
companyType: companyType2,
|
|
@@ -10015,16 +10074,24 @@ const vatAbsenceReasons = [
|
|
|
10015
10074
|
"belowTaxThreshold"
|
|
10016
10075
|
/* BelowTaxThreshold */
|
|
10017
10076
|
];
|
|
10018
|
-
const
|
|
10019
|
-
function
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10077
|
+
const VAT_NUMBER_FIELD = ["vatNumber", "exemptedFromVat", "vatAbsenceReason"];
|
|
10078
|
+
function VatNumberField({
|
|
10079
|
+
data,
|
|
10080
|
+
valid,
|
|
10081
|
+
errors,
|
|
10082
|
+
labels: labels2,
|
|
10083
|
+
mask,
|
|
10084
|
+
guidanceText,
|
|
10085
|
+
placeholders,
|
|
10086
|
+
readonly,
|
|
10087
|
+
shouldValidate,
|
|
10088
|
+
handleChangeFor,
|
|
10089
|
+
canExempt,
|
|
10090
|
+
country: country2,
|
|
10091
|
+
vatNumberType,
|
|
10092
|
+
setVatNumberType
|
|
10093
|
+
}) {
|
|
10094
|
+
var _a;
|
|
10028
10095
|
const {
|
|
10029
10096
|
isExperimentEnabled
|
|
10030
10097
|
} = useExperimentsContext();
|
|
@@ -10036,115 +10103,64 @@ function VatNumber(props) {
|
|
|
10036
10103
|
id: VatAbsenceReason.CountryWithoutVatOrGstSystem,
|
|
10037
10104
|
name: VatAbsenceReason.CountryWithoutVatOrGstSystem
|
|
10038
10105
|
}]);
|
|
10039
|
-
const
|
|
10040
|
-
const
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
vatNumberType: taxIdNumberType
|
|
10044
|
-
}, defaultFieldMetadata$7);
|
|
10045
|
-
const mergedProps = mergeFieldMetadataIntoProps("vatNumber", metadata, props);
|
|
10046
|
-
const {
|
|
10047
|
-
i18n
|
|
10048
|
-
} = useI18nContext();
|
|
10049
|
-
const formUtils = formUtilities(mergedProps, i18n);
|
|
10050
|
-
const stateRef = useRef({
|
|
10051
|
-
setState: null
|
|
10052
|
-
});
|
|
10053
|
-
const {
|
|
10054
|
-
handleChangeFor,
|
|
10055
|
-
data,
|
|
10056
|
-
valid,
|
|
10057
|
-
errors,
|
|
10058
|
-
isValid,
|
|
10059
|
-
fieldProblems
|
|
10060
|
-
} = useForm({
|
|
10061
|
-
...mergedProps,
|
|
10062
|
-
schema: (data2) => data2.exemptedFromVat ? ["vatAbsenceReason", "exemptedFromVat"] : ["vatNumber", "exemptedFromVat"],
|
|
10063
|
-
rules: mergedProps.validators,
|
|
10064
|
-
defaultData: {
|
|
10065
|
-
...propData,
|
|
10066
|
-
exemptedFromVat: !!(propData == null ? void 0 : propData.exemptedFromVat)
|
|
10067
|
-
},
|
|
10068
|
-
// exemptedFromVat should be a boolean
|
|
10069
|
-
fieldProblems: fieldValidationErrors
|
|
10070
|
-
});
|
|
10071
|
-
useEffect(() => {
|
|
10072
|
-
if (data.vatNumber || taxIdNumberType) {
|
|
10073
|
-
handleChangeFor("vatNumber", "blur")(data.vatNumber);
|
|
10074
|
-
}
|
|
10075
|
-
}, [taxIdNumberType, country2]);
|
|
10076
|
-
useEffect(() => {
|
|
10077
|
-
var _a2, _b2;
|
|
10078
|
-
(_b2 = (_a2 = stateRef.current) == null ? void 0 : _a2.setState) == null ? void 0 : _b2.call(_a2, {
|
|
10079
|
-
type: "addToState",
|
|
10080
|
-
value: {
|
|
10081
|
-
data,
|
|
10082
|
-
valid,
|
|
10083
|
-
errors,
|
|
10084
|
-
caller: "vatNumber",
|
|
10085
|
-
dataStoreId
|
|
10086
|
-
}
|
|
10087
|
-
});
|
|
10088
|
-
}, [data, valid, errors, isValid]);
|
|
10089
|
-
if (!formUtils.isRequiredField("vatNumber")) return null;
|
|
10090
|
-
const exemptionIsPossible = ((_b = mergedProps.requiredFields) == null ? void 0 : _b.includes("exemptedFromVat")) ?? false;
|
|
10091
|
-
const showTaxIdExemptedOption = exemptionIsPossible && ((_c = taxIdNumberOptions[country2]) == null ? void 0 : _c.length) > 1;
|
|
10092
|
-
const handleTaxIdNumberTypeChange = (taxIdType) => {
|
|
10093
|
-
if (taxIdType === "exempted") {
|
|
10094
|
-
if (!exemptionIsPossible) {
|
|
10106
|
+
const showVatExemptedOption = canExempt && ((_a = taxIdNumberOptions[country2]) == null ? void 0 : _a.length) > 1;
|
|
10107
|
+
const handleVatNumberTypeChange = (vatType) => {
|
|
10108
|
+
if (vatType === "exempted") {
|
|
10109
|
+
if (!canExempt) {
|
|
10095
10110
|
throw Error(`${country2} does not allow VAT exemptions`);
|
|
10096
10111
|
}
|
|
10097
10112
|
handleChangeFor("exemptedFromVat")(true);
|
|
10098
|
-
|
|
10113
|
+
setVatNumberType(void 0);
|
|
10099
10114
|
return;
|
|
10100
10115
|
}
|
|
10101
|
-
if (
|
|
10116
|
+
if (canExempt && data.exemptedFromVat === true) {
|
|
10102
10117
|
handleChangeFor("exemptedFromVat")(false);
|
|
10103
10118
|
}
|
|
10104
|
-
|
|
10119
|
+
setVatNumberType(vatType);
|
|
10105
10120
|
};
|
|
10106
10121
|
return jsxs("div", {
|
|
10107
|
-
className: "adyen-kyc-
|
|
10108
|
-
children: [jsx(
|
|
10109
|
-
stateRef
|
|
10110
|
-
}), jsx(TaxIdNumberTypeSelector, {
|
|
10122
|
+
className: "adyen-kyc-field__vat-number",
|
|
10123
|
+
children: [jsx(TaxIdNumberTypeSelector, {
|
|
10111
10124
|
country: country2,
|
|
10112
|
-
setSelected:
|
|
10113
|
-
selected: data.exemptedFromVat ? "exempted" :
|
|
10114
|
-
exemptedOption:
|
|
10125
|
+
setSelected: handleVatNumberTypeChange,
|
|
10126
|
+
selected: data.exemptedFromVat ? "exempted" : vatNumberType,
|
|
10127
|
+
exemptedOption: showVatExemptedOption ? labels2.exemptedFromVat : false
|
|
10115
10128
|
}), jsx(MaskedInputText, {
|
|
10116
|
-
|
|
10117
|
-
label:
|
|
10118
|
-
|
|
10119
|
-
...formUtils.getMask("vatNumber"),
|
|
10129
|
+
"aria-required": true,
|
|
10130
|
+
"aria-label": labels2.vatNumber,
|
|
10131
|
+
"aria-invalid": !valid.vatNumber,
|
|
10120
10132
|
classNameModifiers: {
|
|
10121
10133
|
field: ["tax-id"],
|
|
10122
10134
|
input: ["vatNumber"]
|
|
10123
10135
|
},
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10136
|
+
name: "vatNumber",
|
|
10137
|
+
value: (data == null ? void 0 : data.vatNumber) ?? "",
|
|
10138
|
+
label: labels2.vatNumber ?? "",
|
|
10139
|
+
formatGuidance: (guidanceText == null ? void 0 : guidanceText.vatNumber) ?? "",
|
|
10140
|
+
placeholder: placeholders == null ? void 0 : placeholders.vatNumber,
|
|
10141
|
+
errorMessage: errors.vatNumber,
|
|
10142
|
+
isValid: Boolean(valid.vatNumber),
|
|
10129
10143
|
onInput: handleChangeFor("vatNumber", "input"),
|
|
10130
10144
|
onBlur: handleChangeFor("vatNumber", "blur"),
|
|
10131
|
-
disabled: data.exemptedFromVat
|
|
10132
|
-
|
|
10145
|
+
disabled: data.exemptedFromVat,
|
|
10146
|
+
readonly,
|
|
10147
|
+
shouldValidate,
|
|
10148
|
+
...mask
|
|
10149
|
+
}), canExempt && !showVatExemptedOption && jsx(Checkbox, {
|
|
10150
|
+
"aria-required": false,
|
|
10151
|
+
"aria-label": labels2 == null ? void 0 : labels2.exemptedFromVat,
|
|
10152
|
+
"aria-invalid": false,
|
|
10133
10153
|
name: "exemptedFromVat",
|
|
10134
|
-
label:
|
|
10154
|
+
label: labels2 == null ? void 0 : labels2.exemptedFromVat,
|
|
10135
10155
|
value: "exemptedFromVat",
|
|
10136
|
-
readonly: formUtils.isReadOnly("exemptedFromVat"),
|
|
10137
10156
|
classNameModifiers: ["exempted-from-tax"],
|
|
10138
10157
|
checked: data.exemptedFromVat ?? false,
|
|
10139
|
-
onChange: handleChangeFor("exemptedFromVat")
|
|
10140
|
-
|
|
10141
|
-
"aria-label": formUtils.getLabel("exemptedFromVat"),
|
|
10142
|
-
"aria-invalid": false
|
|
10143
|
-
}), data.exemptedFromVat ? jsx(Field, {
|
|
10158
|
+
onChange: handleChangeFor("exemptedFromVat")
|
|
10159
|
+
}), data.exemptedFromVat && jsx(Field, {
|
|
10144
10160
|
name: "vatAbsenceReason",
|
|
10145
10161
|
classNameModifiers: ["tax-id-absence-reason"],
|
|
10146
|
-
label:
|
|
10147
|
-
errorMessage:
|
|
10162
|
+
label: labels2 == null ? void 0 : labels2.vatAbsenceReason,
|
|
10163
|
+
errorMessage: errors.vatAbsenceReason,
|
|
10148
10164
|
isValid: valid.vatAbsenceReason,
|
|
10149
10165
|
children: (childProps) => jsx(RadioGroup, {
|
|
10150
10166
|
...childProps,
|
|
@@ -10156,7 +10172,7 @@ function VatNumber(props) {
|
|
|
10156
10172
|
name: reason
|
|
10157
10173
|
}))
|
|
10158
10174
|
})
|
|
10159
|
-
})
|
|
10175
|
+
})]
|
|
10160
10176
|
});
|
|
10161
10177
|
}
|
|
10162
10178
|
const companyRegistrationDetailsValidationRules = {
|
|
@@ -10194,27 +10210,33 @@ const FLOWS_THAT_HIDE_REGISTRATION_NUMBER = [{
|
|
|
10194
10210
|
companyType: [CompanyTypesValue.SOLE_PROPRIETORSHIP],
|
|
10195
10211
|
country: CountryCodes.PuertoRico
|
|
10196
10212
|
}];
|
|
10197
|
-
const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", "stockTickerSymbol", ...
|
|
10213
|
+
const companyRegistrationDetailsFields = ["tradingName", "sameNameAsLegalName", ...businessRegistrationNumberFields, "stockExchangeMIC", "stockISIN", "stockTickerSymbol", ...VAT_NUMBER_FIELD, ...taxIdFields, "dateOfIncorporation"];
|
|
10198
10214
|
function CompanyRegistrationDetailsComponent(props) {
|
|
10199
|
-
var _a, _b;
|
|
10215
|
+
var _a, _b, _c;
|
|
10200
10216
|
const {
|
|
10201
10217
|
i18n
|
|
10202
10218
|
} = useI18nContext();
|
|
10219
|
+
const {
|
|
10220
|
+
companyNameAndCountry
|
|
10221
|
+
} = useGlobalData();
|
|
10203
10222
|
let mergedProps = props;
|
|
10223
|
+
const defaultVatNumberType = ((_a = mergedProps.data) == null ? void 0 : _a.vatNumber) ? inferTaxIdNumberType((_b = mergedProps.data) == null ? void 0 : _b.vatNumber, mergedProps.country) : (_c = taxIdNumberOptions[mergedProps.country]) == null ? void 0 : _c[0].id;
|
|
10224
|
+
const [vatNumberType, setVatNumberType] = useState(defaultVatNumberType);
|
|
10204
10225
|
mergedProps = mergeFieldMetadataIntoProps("stockExchangeMIC", stockExchangeMICFieldMetadata, mergedProps);
|
|
10205
10226
|
mergedProps = mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, mergedProps);
|
|
10206
10227
|
mergedProps = mergeFieldMetadataIntoProps("stockTickerSymbol", stockTickerSymbolFieldMetadata, mergedProps);
|
|
10228
|
+
mergedProps = mergeFieldMetadataIntoProps("vatNumber", resolveFieldMetadata(defaultFieldConfig$7[mergedProps.country], {
|
|
10229
|
+
vatNumberType
|
|
10230
|
+
}, defaultFieldMetadata$7), mergedProps);
|
|
10231
|
+
mergedProps = mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, mergedProps);
|
|
10207
10232
|
const hideOptionalRegistrationNumberField = FLOWS_THAT_HIDE_REGISTRATION_NUMBER.some((f) => f.country === mergedProps.country && f.companyType.includes(mergedProps.companyType));
|
|
10208
10233
|
const stateRef = useRef({
|
|
10209
10234
|
setState: null
|
|
10210
10235
|
});
|
|
10211
|
-
const COMPANY_REGISTRATION_DETAILS = mergedProps.id;
|
|
10236
|
+
const COMPANY_REGISTRATION_DETAILS = mergedProps.id ?? "companyRegistrationDetails";
|
|
10212
10237
|
const requiredFields = mergedProps.requiredFields || companyRegistrationDetailsFields;
|
|
10213
|
-
const directChildFields = requiredFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "stockTickerSymbol", "dateOfIncorporation"].includes(field));
|
|
10214
|
-
const
|
|
10215
|
-
getData
|
|
10216
|
-
} = useStateContext();
|
|
10217
|
-
const legalCompanyName2 = (_b = (_a = getData()) == null ? void 0 : _a.companyNameAndCountry) == null ? void 0 : _b.legalCompanyName;
|
|
10238
|
+
const directChildFields = requiredFields.filter((field) => ["tradingName", "sameNameAsLegalName", "stockExchangeMIC", "stockISIN", "stockTickerSymbol", "dateOfIncorporation", "vatNumber"].includes(field));
|
|
10239
|
+
const legalCompanyName2 = companyNameAndCountry == null ? void 0 : companyNameAndCountry.legalCompanyName;
|
|
10218
10240
|
const isSameNameAsLegalName = !mergedProps.data.tradingName ? true : mergedProps.data.tradingName === legalCompanyName2;
|
|
10219
10241
|
const {
|
|
10220
10242
|
handleChangeFor,
|
|
@@ -10227,7 +10249,7 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
10227
10249
|
setData
|
|
10228
10250
|
} = useForm({
|
|
10229
10251
|
...mergedProps,
|
|
10230
|
-
schema: directChildFields,
|
|
10252
|
+
schema: (currentData) => !currentData.exemptedFromVat ? (requiredFields == null ? void 0 : requiredFields.filter((field) => field !== "vatAbsenceReason")) ?? directChildFields : (requiredFields == null ? void 0 : requiredFields.filter((field) => field !== "vatNumber")) ?? directChildFields,
|
|
10231
10253
|
defaultData: {
|
|
10232
10254
|
...mergedProps.data,
|
|
10233
10255
|
sameNameAsLegalName: isSameNameAsLegalName,
|
|
@@ -10270,7 +10292,6 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
10270
10292
|
setData("tradingName", tradingNameIsSameAsLegalName ? legalCompanyName2 : "");
|
|
10271
10293
|
};
|
|
10272
10294
|
const registrationNumberProps = getFieldProps(mergedProps, businessRegistrationNumberFields);
|
|
10273
|
-
const vatNumberProps = getFieldProps(mergedProps, vatNumberFields);
|
|
10274
10295
|
const taxIdProps = getFieldProps(mergedProps, taxIdFields);
|
|
10275
10296
|
const handleChange = ({
|
|
10276
10297
|
currentState,
|
|
@@ -10281,7 +10302,7 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
10281
10302
|
let schema = requiredFields;
|
|
10282
10303
|
let hasSchemaChanged = false;
|
|
10283
10304
|
if (formUtils.isRequiredField("vatNumber")) {
|
|
10284
|
-
schema = currentData.exemptedFromVat ? schema.filter((child) => child !== "vatNumber") : schema.filter((child) => child !== "vatAbsenceReason");
|
|
10305
|
+
schema = currentData.exemptedFromVat ? schema.filter((child) => child !== "vatNumber") : schema.filter((child) => child !== "vatAbsenceReason" && child !== "exemptedFromVat");
|
|
10285
10306
|
hasSchemaChanged = true;
|
|
10286
10307
|
}
|
|
10287
10308
|
if (formUtils.isRequiredField("taxId") && currentData.exemptedFromTax) {
|
|
@@ -10395,10 +10416,22 @@ function CompanyRegistrationDetailsComponent(props) {
|
|
|
10395
10416
|
companyType: mergedProps.companyType,
|
|
10396
10417
|
country: mergedProps.country,
|
|
10397
10418
|
dataStoreId: COMPANY_REGISTRATION_DETAILS
|
|
10398
|
-
}), formUtils.isRequiredField("vatNumber") && jsx(
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10419
|
+
}), formUtils.isRequiredField("vatNumber") && jsx(VatNumberField, {
|
|
10420
|
+
data: formUtils.getFieldData(data, VAT_NUMBER_FIELD),
|
|
10421
|
+
valid: formUtils.getFieldValid(valid, VAT_NUMBER_FIELD),
|
|
10422
|
+
errors: formUtils.getFieldErrors(errors, fieldProblems, VAT_NUMBER_FIELD),
|
|
10423
|
+
labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
|
|
10424
|
+
exemptedFromVat: "iDontHaveAVatNumber"
|
|
10425
|
+
}),
|
|
10426
|
+
mask: formUtils.getMask("vatNumber"),
|
|
10427
|
+
guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
|
|
10428
|
+
placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
|
|
10429
|
+
readonly: formUtils.isReadOnly("vatNumber"),
|
|
10430
|
+
handleChangeFor,
|
|
10431
|
+
country: mergedProps.country,
|
|
10432
|
+
canExempt: formUtils.isRequiredField("exemptedFromVat"),
|
|
10433
|
+
vatNumberType,
|
|
10434
|
+
setVatNumberType
|
|
10402
10435
|
}), formUtils.isRequiredField("taxId") && jsx(TaxId, {
|
|
10403
10436
|
...taxIdProps,
|
|
10404
10437
|
dataStoreId: COMPANY_REGISTRATION_DETAILS,
|
|
@@ -11390,7 +11423,7 @@ function isEmptyEntity(legalEntity) {
|
|
|
11390
11423
|
const sortedFieldsOnEntity = fieldsOnEntity.toSorted();
|
|
11391
11424
|
return sortedFieldsOnEntity.every((value, index) => value === sortedMinimumFields[index]);
|
|
11392
11425
|
}
|
|
11393
|
-
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "
|
|
11426
|
+
const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
|
|
11394
11427
|
const entityTypeToCorrespondingAccountHolderOption = {
|
|
11395
11428
|
[LegalEntityType.INDIVIDUAL]: "myName",
|
|
11396
11429
|
[LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
|
|
@@ -12473,7 +12506,8 @@ function FieldContainer(props) {
|
|
|
12473
12506
|
trimOnBlur,
|
|
12474
12507
|
hideField,
|
|
12475
12508
|
maxlength,
|
|
12476
|
-
handleChangeFor
|
|
12509
|
+
handleChangeFor,
|
|
12510
|
+
readOnly
|
|
12477
12511
|
} = props;
|
|
12478
12512
|
const formUtils = formUtilities(props, i18n);
|
|
12479
12513
|
const errorMessage = formUtils.getErrorMessage(fieldName, errors, fieldProblems);
|
|
@@ -12495,7 +12529,7 @@ function FieldContainer(props) {
|
|
|
12495
12529
|
labels: {
|
|
12496
12530
|
country: formUtils.getLabel(field)
|
|
12497
12531
|
},
|
|
12498
|
-
readonly:
|
|
12532
|
+
readonly: readOnly,
|
|
12499
12533
|
classNameModifiers,
|
|
12500
12534
|
className: hideField ? "adyen-kyc-u-display-none" : "",
|
|
12501
12535
|
handleChangeFor
|
|
@@ -12514,7 +12548,7 @@ function FieldContainer(props) {
|
|
|
12514
12548
|
labels: {
|
|
12515
12549
|
stateOrProvince: formUtils.getLabel(field)
|
|
12516
12550
|
},
|
|
12517
|
-
readonly:
|
|
12551
|
+
readonly: readOnly,
|
|
12518
12552
|
classNameModifiers,
|
|
12519
12553
|
selectedCountry: data.country,
|
|
12520
12554
|
handleChangeFor
|
|
@@ -12537,7 +12571,8 @@ function FieldContainer(props) {
|
|
|
12537
12571
|
"aria-required": true,
|
|
12538
12572
|
"aria-label": props == null ? void 0 : props["aria-label"],
|
|
12539
12573
|
"aria-invalid": !valid[field],
|
|
12540
|
-
trimOnBlur
|
|
12574
|
+
trimOnBlur,
|
|
12575
|
+
readonly: readOnly
|
|
12541
12576
|
})
|
|
12542
12577
|
});
|
|
12543
12578
|
}
|
|
@@ -13386,7 +13421,7 @@ function RegistrationAddressComponent(props) {
|
|
|
13386
13421
|
readOnlyFields: registrationAddressReadOnlyFields,
|
|
13387
13422
|
obscuredFields: registrationAddressObscuredFields,
|
|
13388
13423
|
verifyFields: registrationAddressVerifyFields
|
|
13389
|
-
} = getFormProps(props,
|
|
13424
|
+
} = getFormProps(props, registrationAddressFormID);
|
|
13390
13425
|
const {
|
|
13391
13426
|
data: formData,
|
|
13392
13427
|
valid: formValid,
|
|
@@ -13584,29 +13619,15 @@ const GuidanceContent$1 = ({
|
|
|
13584
13619
|
})
|
|
13585
13620
|
})]
|
|
13586
13621
|
})]
|
|
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")
|
|
13622
|
+
}) : jsxs("div", {
|
|
13623
|
+
className: "adyen-kyc-u-margin-bottom-24",
|
|
13624
|
+
children: [jsxs("strong", {
|
|
13625
|
+
children: [" ", i18n.get("documentRequirements")]
|
|
13626
|
+
}), jsx(List, {
|
|
13627
|
+
className: "adyen-kyc-upload-field__requirements",
|
|
13628
|
+
children: jsx(ListItem, {
|
|
13629
|
+
children: i18n.get("documentIssuedByGovernmentAuthority")
|
|
13630
|
+
})
|
|
13610
13631
|
})]
|
|
13611
13632
|
})
|
|
13612
13633
|
});
|
|
@@ -13721,9 +13742,9 @@ const GuidanceContent = ({
|
|
|
13721
13742
|
})]
|
|
13722
13743
|
}) : jsxs("div", {
|
|
13723
13744
|
className: "adyen-kyc-u-margin-bottom-24",
|
|
13724
|
-
children: [
|
|
13745
|
+
children: [jsx("div", {
|
|
13725
13746
|
className: "adyen-kyc-upload-field__subtitle",
|
|
13726
|
-
children:
|
|
13747
|
+
children: i18n.get("documentRequirements")
|
|
13727
13748
|
}), jsxs(List, {
|
|
13728
13749
|
className: "adyen-kyc-upload-field__requirements",
|
|
13729
13750
|
children: [jsx(ListItem, {
|
|
@@ -14308,7 +14329,7 @@ const mandatoryApiFields = {
|
|
|
14308
14329
|
ORGANIZATION: ["companyNameAndCountry.legalCompanyName", "companyNameAndCountry.country"],
|
|
14309
14330
|
SOLE_PROPRIETORSHIP: ["solePropNameAndCountry.legalCompanyName", "solePropNameAndCountry.country"],
|
|
14310
14331
|
TRUST: ["trustRegistrationDetails.legalName", "trustRegistrationDetails.country"],
|
|
14311
|
-
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.
|
|
14332
|
+
HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.parentNumberOfEmployees", "ultimateParentCompany.ultimateParentNumberOfEmployees"]
|
|
14312
14333
|
};
|
|
14313
14334
|
const individualObscuredFields = ["personalDetails.idNumber", "personalDetails.idNumberExempt"];
|
|
14314
14335
|
const individualBaseMapping = {
|
|
@@ -14324,7 +14345,6 @@ const individualBaseMapping = {
|
|
|
14324
14345
|
"personalDetails.licenseCardNumber": "individual.identificationData.cardNumber",
|
|
14325
14346
|
"personalDetails.expiryDate": "individual.identificationData.expiryDate",
|
|
14326
14347
|
"personalDetails.nationality": "individual.nationality",
|
|
14327
|
-
"personalDetails.jobTitle": "individual.jobTitle",
|
|
14328
14348
|
"address.city": "individual.residentialAddress.city",
|
|
14329
14349
|
"address.country": "individual.residentialAddress.country",
|
|
14330
14350
|
"address.postalCode": "individual.residentialAddress.postalCode",
|
|
@@ -16825,60 +16845,60 @@ const roleMetadata = {
|
|
|
16825
16845
|
[DecisionMakerType.CONTROLLING_PERSON]: {
|
|
16826
16846
|
name: "controllingPerson",
|
|
16827
16847
|
description: "controllingPersonDescription",
|
|
16828
|
-
|
|
16848
|
+
variant: "teal"
|
|
16829
16849
|
},
|
|
16830
16850
|
[DecisionMakerType.OWNER]: {
|
|
16831
16851
|
name: "owner",
|
|
16832
16852
|
description: "ownerDescription",
|
|
16833
|
-
|
|
16853
|
+
variant: "red"
|
|
16834
16854
|
},
|
|
16835
16855
|
[DecisionMakerType.SIGNATORY]: {
|
|
16836
16856
|
name: "signatory",
|
|
16837
16857
|
description: "signatoryDescription",
|
|
16838
|
-
|
|
16858
|
+
variant: "green"
|
|
16839
16859
|
},
|
|
16840
16860
|
[DecisionMakerType.DIRECTOR]: {
|
|
16841
16861
|
name: "director",
|
|
16842
16862
|
description: "directorDescription",
|
|
16843
|
-
|
|
16863
|
+
variant: "orange"
|
|
16844
16864
|
},
|
|
16845
16865
|
[TrustMemberTypes.DEFINED_BENEFICIARY]: {
|
|
16846
16866
|
name: "definedBeneficiary",
|
|
16847
16867
|
description: "definedBeneficiaryDescription",
|
|
16848
|
-
|
|
16868
|
+
variant: "orange"
|
|
16849
16869
|
},
|
|
16850
16870
|
[TrustMemberTypes.UNDEFINED_BENEFICIARY]: {
|
|
16851
16871
|
name: "undefinedBeneficiary",
|
|
16852
16872
|
description: "undefinedBeneficiaryDescription",
|
|
16853
|
-
|
|
16873
|
+
variant: "orange"
|
|
16854
16874
|
},
|
|
16855
16875
|
[TrustMemberTypes.PROTECTOR]: {
|
|
16856
16876
|
name: "protector",
|
|
16857
16877
|
description: "personAppointmentUnderTrustInstrument",
|
|
16858
|
-
|
|
16878
|
+
variant: "orange"
|
|
16859
16879
|
},
|
|
16860
16880
|
[TrustMemberTypes.TRUSTEE]: {
|
|
16861
16881
|
name: "trustee",
|
|
16862
16882
|
description: "legalOwnerOfProperty",
|
|
16863
|
-
|
|
16883
|
+
variant: "green"
|
|
16864
16884
|
},
|
|
16865
16885
|
[TrustMemberTypes.SETTLOR]: {
|
|
16866
16886
|
name: "settlor",
|
|
16867
16887
|
description: "entityEstablishingTrust",
|
|
16868
|
-
|
|
16888
|
+
variant: "orange"
|
|
16869
16889
|
},
|
|
16870
16890
|
[TrustMemberGuidanceLabel.BENEFICIARY]: {
|
|
16871
16891
|
name: TrustMemberGuidanceLabel.BENEFICIARY,
|
|
16872
|
-
|
|
16892
|
+
variant: "orange"
|
|
16873
16893
|
},
|
|
16874
16894
|
[TrustMemberGuidanceLabel.TRUSTEE]: {
|
|
16875
16895
|
name: TrustMemberGuidanceLabel.TRUSTEE,
|
|
16876
|
-
|
|
16896
|
+
variant: "green"
|
|
16877
16897
|
}
|
|
16878
16898
|
};
|
|
16879
|
-
const
|
|
16899
|
+
const getRoleTagVariant = (role2) => {
|
|
16880
16900
|
var _a;
|
|
16881
|
-
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.
|
|
16901
|
+
return ((_a = roleMetadata[role2]) == null ? void 0 : _a.variant) ?? "blue";
|
|
16882
16902
|
};
|
|
16883
16903
|
const getRoleName = (role2) => {
|
|
16884
16904
|
var _a;
|
|
@@ -16890,13 +16910,13 @@ const makeSelectItemForRole = (role2, i18n) => {
|
|
|
16890
16910
|
const {
|
|
16891
16911
|
name,
|
|
16892
16912
|
description: description2,
|
|
16893
|
-
|
|
16913
|
+
variant
|
|
16894
16914
|
} = metadata;
|
|
16895
16915
|
return {
|
|
16896
16916
|
id: role2,
|
|
16897
16917
|
name: i18n.get(name),
|
|
16898
16918
|
description: description2 ? i18n.get(description2) : void 0,
|
|
16899
|
-
className
|
|
16919
|
+
className: `adyen-kyc-tag--${variant}`
|
|
16900
16920
|
};
|
|
16901
16921
|
};
|
|
16902
16922
|
const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event) => {
|
|
@@ -21898,7 +21918,7 @@ const trustRegistrationDetailsValidations = {
|
|
|
21898
21918
|
},
|
|
21899
21919
|
legalName: {
|
|
21900
21920
|
modes: ["blur"],
|
|
21901
|
-
validate: (
|
|
21921
|
+
validate: (legalName2) => !!legalName2,
|
|
21902
21922
|
errorMessage: "fieldIsRequired"
|
|
21903
21923
|
},
|
|
21904
21924
|
objectOfTrust: {
|
|
@@ -22765,55 +22785,6 @@ function ErrorPanel({
|
|
|
22765
22785
|
})]
|
|
22766
22786
|
});
|
|
22767
22787
|
}
|
|
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
22788
|
const summaryStep = {
|
|
22818
22789
|
formId: "summary",
|
|
22819
22790
|
formName: "summary"
|
|
@@ -22853,8 +22824,9 @@ function Summary({
|
|
|
22853
22824
|
}, i18n);
|
|
22854
22825
|
const summarySectionHeader = (formName, formId) => jsxs("header", {
|
|
22855
22826
|
className: "adyen-kyc-summary-section__header",
|
|
22856
|
-
children: [jsx(
|
|
22857
|
-
|
|
22827
|
+
children: [jsx(Typography, {
|
|
22828
|
+
el: "h4",
|
|
22829
|
+
variant: "title",
|
|
22858
22830
|
className: "adyen-kyc-summary-section__heading",
|
|
22859
22831
|
children: formName
|
|
22860
22832
|
}), jsx(Button, {
|
|
@@ -22936,9 +22908,9 @@ function Summary({
|
|
|
22936
22908
|
return jsxs("div", {
|
|
22937
22909
|
role: "region",
|
|
22938
22910
|
className: "adyen-kyc-summary",
|
|
22939
|
-
children: [jsx(
|
|
22940
|
-
|
|
22941
|
-
|
|
22911
|
+
children: [jsx(FormHeader, {
|
|
22912
|
+
heading: i18n.get("summary"),
|
|
22913
|
+
classNames: "adyen-kyc-summary__heading"
|
|
22942
22914
|
}), jsx(ErrorPanel, {
|
|
22943
22915
|
validationErrors: allValidationErrors,
|
|
22944
22916
|
verificationErrors: allVerificationErrors,
|
|
@@ -24236,107 +24208,6 @@ const defaultFieldConfig$1 = entriesOf(defaultFieldConfig$8).reduce((fieldConfig
|
|
|
24236
24208
|
};
|
|
24237
24209
|
}
|
|
24238
24210
|
}), {});
|
|
24239
|
-
const VAT_NUMBER_FIELD = ["vatNumber", "exemptedFromVat", "vatAbsenceReason"];
|
|
24240
|
-
function VatNumberField({
|
|
24241
|
-
data,
|
|
24242
|
-
valid,
|
|
24243
|
-
errors,
|
|
24244
|
-
labels: labels2,
|
|
24245
|
-
mask,
|
|
24246
|
-
guidanceText,
|
|
24247
|
-
placeholders,
|
|
24248
|
-
readonly,
|
|
24249
|
-
shouldValidate,
|
|
24250
|
-
handleChangeFor,
|
|
24251
|
-
canExempt,
|
|
24252
|
-
country: country2,
|
|
24253
|
-
vatNumberType,
|
|
24254
|
-
setVatNumberType
|
|
24255
|
-
}) {
|
|
24256
|
-
var _a;
|
|
24257
|
-
const {
|
|
24258
|
-
isExperimentEnabled
|
|
24259
|
-
} = useExperimentsContext();
|
|
24260
|
-
const showExtraTaxExemptionReasons = isExperimentEnabled(ExperimentNames.ShowExtraTaxExemptionReasons);
|
|
24261
|
-
const extraVatAbsenceReasons = vatAbsenceReasons.map((reason) => ({
|
|
24262
|
-
id: reason,
|
|
24263
|
-
name: reason
|
|
24264
|
-
})).concat([{
|
|
24265
|
-
id: VatAbsenceReason.CountryWithoutVatOrGstSystem,
|
|
24266
|
-
name: VatAbsenceReason.CountryWithoutVatOrGstSystem
|
|
24267
|
-
}]);
|
|
24268
|
-
const showVatExemptedOption = canExempt && ((_a = taxIdNumberOptions[country2]) == null ? void 0 : _a.length) > 1;
|
|
24269
|
-
const handleVatNumberTypeChange = (vatType) => {
|
|
24270
|
-
if (vatType === "exempted") {
|
|
24271
|
-
if (!canExempt) {
|
|
24272
|
-
throw Error(`${country2} does not allow VAT exemptions`);
|
|
24273
|
-
}
|
|
24274
|
-
handleChangeFor("exemptedFromVat")(true);
|
|
24275
|
-
setVatNumberType(void 0);
|
|
24276
|
-
return;
|
|
24277
|
-
}
|
|
24278
|
-
if (canExempt && data.exemptedFromVat === true) {
|
|
24279
|
-
handleChangeFor("exemptedFromVat")(false);
|
|
24280
|
-
}
|
|
24281
|
-
setVatNumberType(vatType);
|
|
24282
|
-
};
|
|
24283
|
-
return jsxs("div", {
|
|
24284
|
-
className: "adyen-kyc-field__vat-number",
|
|
24285
|
-
children: [jsx(TaxIdNumberTypeSelector, {
|
|
24286
|
-
country: country2,
|
|
24287
|
-
setSelected: handleVatNumberTypeChange,
|
|
24288
|
-
selected: data.exemptedFromVat ? "exempted" : vatNumberType,
|
|
24289
|
-
exemptedOption: showVatExemptedOption ? labels2.exemptedFromVat : false
|
|
24290
|
-
}), jsx(MaskedInputText, {
|
|
24291
|
-
"aria-required": true,
|
|
24292
|
-
"aria-label": labels2.vatNumber,
|
|
24293
|
-
"aria-invalid": !valid.vatNumber,
|
|
24294
|
-
classNameModifiers: {
|
|
24295
|
-
field: ["tax-id"],
|
|
24296
|
-
input: ["vatNumber"]
|
|
24297
|
-
},
|
|
24298
|
-
name: "vatNumber",
|
|
24299
|
-
value: (data == null ? void 0 : data.vatNumber) ?? "",
|
|
24300
|
-
label: labels2.vatNumber ?? "",
|
|
24301
|
-
formatGuidance: (guidanceText == null ? void 0 : guidanceText.vatNumber) ?? "",
|
|
24302
|
-
placeholder: placeholders == null ? void 0 : placeholders.vatNumber,
|
|
24303
|
-
errorMessage: errors.vatNumber,
|
|
24304
|
-
isValid: Boolean(valid.vatNumber),
|
|
24305
|
-
onInput: handleChangeFor("vatNumber", "input"),
|
|
24306
|
-
onBlur: handleChangeFor("vatNumber", "blur"),
|
|
24307
|
-
disabled: data.exemptedFromVat,
|
|
24308
|
-
readonly,
|
|
24309
|
-
shouldValidate,
|
|
24310
|
-
...mask
|
|
24311
|
-
}), canExempt && !showVatExemptedOption && jsx(Checkbox, {
|
|
24312
|
-
"aria-required": false,
|
|
24313
|
-
"aria-label": labels2 == null ? void 0 : labels2.exemptedFromVat,
|
|
24314
|
-
"aria-invalid": false,
|
|
24315
|
-
name: "exemptedFromVat",
|
|
24316
|
-
label: labels2 == null ? void 0 : labels2.exemptedFromVat,
|
|
24317
|
-
value: "exemptedFromVat",
|
|
24318
|
-
classNameModifiers: ["exempted-from-tax"],
|
|
24319
|
-
checked: data.exemptedFromVat ?? false,
|
|
24320
|
-
onChange: handleChangeFor("exemptedFromVat")
|
|
24321
|
-
}), data.exemptedFromVat && jsx(Field, {
|
|
24322
|
-
name: "vatAbsenceReason",
|
|
24323
|
-
classNameModifiers: ["tax-id-absence-reason"],
|
|
24324
|
-
label: labels2 == null ? void 0 : labels2.vatAbsenceReason,
|
|
24325
|
-
errorMessage: errors.vatAbsenceReason,
|
|
24326
|
-
isValid: valid.vatAbsenceReason,
|
|
24327
|
-
children: (childProps) => jsx(RadioGroup, {
|
|
24328
|
-
...childProps,
|
|
24329
|
-
name: "vatAbsenceReason",
|
|
24330
|
-
onChange: handleChangeFor("vatAbsenceReason", "input"),
|
|
24331
|
-
value: data.vatAbsenceReason,
|
|
24332
|
-
items: showExtraTaxExemptionReasons ? extraVatAbsenceReasons : vatAbsenceReasons.map((reason) => ({
|
|
24333
|
-
id: reason,
|
|
24334
|
-
name: reason
|
|
24335
|
-
}))
|
|
24336
|
-
})
|
|
24337
|
-
})]
|
|
24338
|
-
});
|
|
24339
|
-
}
|
|
24340
24211
|
const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
|
|
24341
24212
|
const additionalInformationFields = [...LEGAL_COMPANY_NAME_FIELD, ...DBA_NAME_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...STOCK_TICKER_SYMBOL_FIELD];
|
|
24342
24213
|
function AdditionalInformationComponent({
|
|
@@ -24409,6 +24280,8 @@ function AdditionalInformationComponent({
|
|
|
24409
24280
|
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$7[country2], {
|
|
24410
24281
|
vatNumberType
|
|
24411
24282
|
}, defaultFieldMetadata$7), acc);
|
|
24283
|
+
case "vatAbsenceReason":
|
|
24284
|
+
return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
|
|
24412
24285
|
case "dateOfIncorporation":
|
|
24413
24286
|
return {
|
|
24414
24287
|
...acc,
|
|
@@ -25523,7 +25396,6 @@ const Modal = ({
|
|
|
25523
25396
|
size = "medium",
|
|
25524
25397
|
title,
|
|
25525
25398
|
isDismissible = true,
|
|
25526
|
-
isOpen = true,
|
|
25527
25399
|
onClose = noop,
|
|
25528
25400
|
role: role2 = "dialog"
|
|
25529
25401
|
}) => {
|
|
@@ -25531,10 +25403,10 @@ const Modal = ({
|
|
|
25531
25403
|
i18n
|
|
25532
25404
|
} = useI18nContext();
|
|
25533
25405
|
const closeModal = useCallback(() => {
|
|
25534
|
-
if (
|
|
25406
|
+
if (isDismissible) {
|
|
25535
25407
|
onClose();
|
|
25536
25408
|
}
|
|
25537
|
-
}, [isDismissible,
|
|
25409
|
+
}, [isDismissible, onClose]);
|
|
25538
25410
|
useEffect(() => {
|
|
25539
25411
|
const handleEscapeKey = ({
|
|
25540
25412
|
code: code2
|
|
@@ -25543,21 +25415,17 @@ const Modal = ({
|
|
|
25543
25415
|
closeModal();
|
|
25544
25416
|
}
|
|
25545
25417
|
};
|
|
25546
|
-
|
|
25547
|
-
|
|
25548
|
-
|
|
25549
|
-
} else {
|
|
25418
|
+
document.documentElement.classList.add("u-overflow-hidden");
|
|
25419
|
+
document.addEventListener("keydown", handleEscapeKey);
|
|
25420
|
+
return () => {
|
|
25550
25421
|
document.documentElement.classList.remove("u-overflow-hidden");
|
|
25551
25422
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
25552
|
-
}
|
|
25553
|
-
|
|
25554
|
-
}, [closeModal, isDismissible, isOpen]);
|
|
25423
|
+
};
|
|
25424
|
+
}, [closeModal, isDismissible]);
|
|
25555
25425
|
return jsx("div", {
|
|
25556
|
-
className: cx("adyen-kyc-overlay",
|
|
25557
|
-
"adyen-kyc-overlay--visible": isOpen
|
|
25558
|
-
}),
|
|
25426
|
+
className: cx("adyen-kyc-overlay", "adyen-kyc-overlay--visible"),
|
|
25559
25427
|
role: "none",
|
|
25560
|
-
children:
|
|
25428
|
+
children: jsxs("div", {
|
|
25561
25429
|
className: cx(classNames == null ? void 0 : classNames.modal, "adyen-kyc-modal", {
|
|
25562
25430
|
"adyen-kyc-modal--small": size === "small",
|
|
25563
25431
|
"adyen-kyc-modal--large": size === "large"
|
|
@@ -26570,6 +26438,42 @@ function BusinessDetailsDropinComponent({
|
|
|
26570
26438
|
})
|
|
26571
26439
|
});
|
|
26572
26440
|
}
|
|
26441
|
+
const getTrustedFieldsByProvider = (provider, trustedFields2) => trustedFields2.find((tf) => tf.provider === provider);
|
|
26442
|
+
const parseTrustedFieldsIntoReadOnlyFields = (trustedFields2, mapping) => {
|
|
26443
|
+
const formFieldsMapped = [];
|
|
26444
|
+
trustedFields2.fields.forEach((field) => {
|
|
26445
|
+
for (const [key, value] of Object.entries(mapping)) {
|
|
26446
|
+
if (value === field) {
|
|
26447
|
+
formFieldsMapped.push(key);
|
|
26448
|
+
}
|
|
26449
|
+
}
|
|
26450
|
+
});
|
|
26451
|
+
const readOnlyFields = {};
|
|
26452
|
+
formFieldsMapped.forEach((field) => {
|
|
26453
|
+
const tokenizedField = field.split(".");
|
|
26454
|
+
const formField = tokenizedField.pop();
|
|
26455
|
+
const formId = tokenizedField.pop();
|
|
26456
|
+
if (formField && formId) {
|
|
26457
|
+
if (formId in readOnlyFields) {
|
|
26458
|
+
readOnlyFields[formId].push(formField);
|
|
26459
|
+
} else {
|
|
26460
|
+
readOnlyFields[formId] = [formField];
|
|
26461
|
+
}
|
|
26462
|
+
}
|
|
26463
|
+
});
|
|
26464
|
+
return readOnlyFields;
|
|
26465
|
+
};
|
|
26466
|
+
const trustedFields = ({
|
|
26467
|
+
fields,
|
|
26468
|
+
trustedFieldsProvider,
|
|
26469
|
+
apiMapping
|
|
26470
|
+
}) => {
|
|
26471
|
+
if (!fields || !trustedFieldsProvider || !apiMapping) {
|
|
26472
|
+
return {};
|
|
26473
|
+
}
|
|
26474
|
+
const trustedFieldsOfProvider = getTrustedFieldsByProvider(trustedFieldsProvider, fields);
|
|
26475
|
+
return trustedFieldsOfProvider ? parseTrustedFieldsIntoReadOnlyFields(trustedFieldsOfProvider, apiMapping) : {};
|
|
26476
|
+
};
|
|
26573
26477
|
const parseConfiguration$6 = ({
|
|
26574
26478
|
country: country2,
|
|
26575
26479
|
matchingScenario
|
|
@@ -26619,7 +26523,8 @@ function CompanyDropinComponent({
|
|
|
26619
26523
|
handleUpdateLegalEntity,
|
|
26620
26524
|
handleHomeClick,
|
|
26621
26525
|
onTypeSwitch,
|
|
26622
|
-
onChange
|
|
26526
|
+
onChange,
|
|
26527
|
+
trustedFieldsProvider
|
|
26623
26528
|
}) {
|
|
26624
26529
|
var _a, _b;
|
|
26625
26530
|
const {
|
|
@@ -26683,7 +26588,15 @@ function CompanyDropinComponent({
|
|
|
26683
26588
|
isSettingEnabled,
|
|
26684
26589
|
isExperimentEnabled
|
|
26685
26590
|
}), [country2, data, taskType, requiredFields, isSettingEnabled]);
|
|
26686
|
-
const
|
|
26591
|
+
const legalEntityTrustedFields = legalEntityResponse == null ? void 0 : legalEntityResponse.trustedFields;
|
|
26592
|
+
const trustedFieldsOfProvider = useMemo(() => trustedFields({
|
|
26593
|
+
fields: legalEntityTrustedFields,
|
|
26594
|
+
trustedFieldsProvider,
|
|
26595
|
+
apiMapping: companyComponentsKeyMapping
|
|
26596
|
+
}), [legalEntityTrustedFields, trustedFieldsProvider]);
|
|
26597
|
+
const derivedProps = useMemo(() => ({
|
|
26598
|
+
...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)
|
|
26599
|
+
}), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
|
|
26687
26600
|
const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
|
|
26688
26601
|
const {
|
|
26689
26602
|
state: {
|
|
@@ -26946,7 +26859,8 @@ function CompanyDropinComponent({
|
|
|
26946
26859
|
onCountryChange: setCountry,
|
|
26947
26860
|
ref: formRef,
|
|
26948
26861
|
shouldValidate,
|
|
26949
|
-
isTopLevelEntity: taskType === TaskTypes.COMPANY
|
|
26862
|
+
isTopLevelEntity: taskType === TaskTypes.COMPANY,
|
|
26863
|
+
readOnlyFields: trustedFieldsOfProvider
|
|
26950
26864
|
})
|
|
26951
26865
|
});
|
|
26952
26866
|
}
|
|
@@ -27913,6 +27827,8 @@ function CompanyOtherDetails({
|
|
|
27913
27827
|
return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$7[country2], {
|
|
27914
27828
|
vatNumberType
|
|
27915
27829
|
}, defaultFieldMetadata$7), acc);
|
|
27830
|
+
case "vatAbsenceReason":
|
|
27831
|
+
return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
|
|
27916
27832
|
default:
|
|
27917
27833
|
return acc;
|
|
27918
27834
|
}
|
|
@@ -29019,6 +28935,11 @@ function useSalesChannelsSettings() {
|
|
|
29019
28935
|
return settings;
|
|
29020
28936
|
}, [isSettingEnabled]);
|
|
29021
28937
|
}
|
|
28938
|
+
var TrustedFieldsProvider = /* @__PURE__ */ ((TrustedFieldsProvider2) => {
|
|
28939
|
+
TrustedFieldsProvider2["SINGPASS"] = "singpass";
|
|
28940
|
+
TrustedFieldsProvider2["KOMPANY"] = "kompany";
|
|
28941
|
+
return TrustedFieldsProvider2;
|
|
28942
|
+
})(TrustedFieldsProvider || {});
|
|
29022
28943
|
const downloadFile = async (base64, filename) => {
|
|
29023
28944
|
saveBlobAsFile(base64ToBlob(base64), filename);
|
|
29024
28945
|
};
|
|
@@ -29593,11 +29514,13 @@ const BusinessTypeSelection = ({
|
|
|
29593
29514
|
className: "adyen-kyc-business-type-selection",
|
|
29594
29515
|
children: [jsxs("header", {
|
|
29595
29516
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
29596
|
-
children: [jsx(
|
|
29597
|
-
|
|
29517
|
+
children: [jsx(Typography, {
|
|
29518
|
+
el: "h2",
|
|
29519
|
+
variant: "title-m",
|
|
29598
29520
|
children: i18n.get(businessTypeSelectionStepTitles[currentStep])
|
|
29599
|
-
}), currentStep === 3 && jsx(
|
|
29600
|
-
|
|
29521
|
+
}), currentStep === 3 && jsx(Typography, {
|
|
29522
|
+
el: "p",
|
|
29523
|
+
variant: "title",
|
|
29601
29524
|
children: i18n.get("someInformationWillNotBeSaved")
|
|
29602
29525
|
})]
|
|
29603
29526
|
}), currentStep === 0 && jsx(Field, {
|
|
@@ -29937,11 +29860,13 @@ function Card({
|
|
|
29937
29860
|
onKeyDown,
|
|
29938
29861
|
children: [title && jsxs("header", {
|
|
29939
29862
|
className: "adyen-kyc-card__header",
|
|
29940
|
-
children: [jsx(
|
|
29941
|
-
|
|
29863
|
+
children: [jsx(Typography, {
|
|
29864
|
+
el: "h4",
|
|
29865
|
+
variant: "title",
|
|
29942
29866
|
children: title
|
|
29943
|
-
}), subTitle && jsx(
|
|
29944
|
-
|
|
29867
|
+
}), subTitle && jsx(Typography, {
|
|
29868
|
+
el: "p",
|
|
29869
|
+
variant: "body",
|
|
29945
29870
|
children: subTitle
|
|
29946
29871
|
})]
|
|
29947
29872
|
}), jsx("div", {
|
|
@@ -30154,8 +30079,8 @@ const EntityAssociation = ({
|
|
|
30154
30079
|
})]
|
|
30155
30080
|
}), jsx("div", {
|
|
30156
30081
|
children: types.map((type) => jsx(Tag, {
|
|
30157
|
-
className:
|
|
30158
|
-
|
|
30082
|
+
className: "adyen-kyc-entity-association__tag",
|
|
30083
|
+
variant: getRoleTagVariant(type),
|
|
30159
30084
|
children: i18n.get(getRoleName(type))
|
|
30160
30085
|
}, type))
|
|
30161
30086
|
}), status === TaskStatus.ERROR && jsx(VerificationErrorAlert, {
|
|
@@ -30243,8 +30168,8 @@ const EntityGuidanceStatus = ({
|
|
|
30243
30168
|
children: [jsx(EntityStatusIcon, {
|
|
30244
30169
|
status
|
|
30245
30170
|
}), jsx(Tag, {
|
|
30246
|
-
className:
|
|
30247
|
-
|
|
30171
|
+
className: "adyen-kyc-entity-status__tag",
|
|
30172
|
+
variant: getRoleTagVariant(entityLabel),
|
|
30248
30173
|
children: i18n.get(getRoleName(entityLabel))
|
|
30249
30174
|
}, entityLabel), jsx("span", {
|
|
30250
30175
|
className: "adyen-kyc-entity-status--text",
|
|
@@ -30991,8 +30916,9 @@ const SingpassSelection = (props) => {
|
|
|
30991
30916
|
className: "adyen-kyc-singpass-selection",
|
|
30992
30917
|
children: [jsx("header", {
|
|
30993
30918
|
className: "adyen-kyc-u-margin-bottom-32",
|
|
30994
|
-
children: jsx(
|
|
30995
|
-
|
|
30919
|
+
children: jsx(Typography, {
|
|
30920
|
+
el: "h2",
|
|
30921
|
+
variant: "title-m",
|
|
30996
30922
|
children: i18n.get("howWouldYouLikeToSetUpYourAccount")
|
|
30997
30923
|
})
|
|
30998
30924
|
}), jsx("form", {
|
|
@@ -31244,8 +31170,9 @@ const TaskListGroup = ({
|
|
|
31244
31170
|
className: "adyen-task-list-group",
|
|
31245
31171
|
children: [title && jsx("header", {
|
|
31246
31172
|
className: "adyen-task-list-group__header",
|
|
31247
|
-
children: jsx(
|
|
31248
|
-
|
|
31173
|
+
children: jsx(Typography, {
|
|
31174
|
+
el: "h4",
|
|
31175
|
+
variant: "title",
|
|
31249
31176
|
children: title
|
|
31250
31177
|
})
|
|
31251
31178
|
}), jsx("div", {
|
|
@@ -31367,13 +31294,17 @@ function TaskListComponent({
|
|
|
31367
31294
|
})
|
|
31368
31295
|
}), isEnableNewEntryFlowEnabled && jsxs("header", {
|
|
31369
31296
|
className: "adyen-task-list__heading",
|
|
31370
|
-
children: [jsx(
|
|
31371
|
-
|
|
31297
|
+
children: [jsx(Typography, {
|
|
31298
|
+
el: "h1",
|
|
31299
|
+
variant: "title-l",
|
|
31372
31300
|
children: i18n.get("setUpYourAccount")
|
|
31373
|
-
}), jsxs(
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31301
|
+
}), jsxs(Typography, {
|
|
31302
|
+
el: "p",
|
|
31303
|
+
variant: "title",
|
|
31304
|
+
className: "adyen-task-list__description",
|
|
31305
|
+
children: [jsx(Typography, {
|
|
31306
|
+
el: "span",
|
|
31307
|
+
variant: "body-strongest",
|
|
31377
31308
|
children: i18n.get("yourBusinessSetup", {
|
|
31378
31309
|
values: {
|
|
31379
31310
|
businessSetup: i18n.get(businessSetup)
|
|
@@ -31384,7 +31315,6 @@ function TaskListComponent({
|
|
|
31384
31315
|
icon: "edit",
|
|
31385
31316
|
tertiary: true,
|
|
31386
31317
|
onClick: onEditBusinessSetupClick,
|
|
31387
|
-
className: "adyen-kyc-u-margin-left-4",
|
|
31388
31318
|
type: "button"
|
|
31389
31319
|
})]
|
|
31390
31320
|
})]
|
|
@@ -35716,7 +35646,8 @@ function DropinComposerComponent({
|
|
|
35716
35646
|
handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
|
|
35717
35647
|
handleFindAddress: args == null ? void 0 : args.handleFindAddress,
|
|
35718
35648
|
onTypeSwitch: navigateToTypeSwitcher,
|
|
35719
|
-
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
|
|
35649
|
+
isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
|
|
35650
|
+
trustedFieldsProvider: eligibleForSingpass && TrustedFieldsProvider.SINGPASS
|
|
35720
35651
|
});
|
|
35721
35652
|
case TaskTypes.COMPANY_SEARCH:
|
|
35722
35653
|
return jsx(CompanySearchDropinComponent, {
|
|
@@ -36481,6 +36412,30 @@ function CreateTransferInstrumentComponent({
|
|
|
36481
36412
|
taskType: TaskTypes.PAYOUT
|
|
36482
36413
|
}) : null;
|
|
36483
36414
|
}
|
|
36415
|
+
var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
|
|
36416
|
+
HighExposurePagesEnums2["COMPANY_PAGE"] = "COMPANY_PAGE";
|
|
36417
|
+
HighExposurePagesEnums2["PARENT_COMPANY_PAGE"] = "PARENT_COMPANY_PAGE";
|
|
36418
|
+
HighExposurePagesEnums2["ULTIMATE_PARENT_COMPANY_PAGE"] = "ULTIMATE_PARENT_COMPANY_PAGE";
|
|
36419
|
+
return HighExposurePagesEnums2;
|
|
36420
|
+
})(HighExposurePagesEnums || {});
|
|
36421
|
+
const highExposureRadioItems = [{
|
|
36422
|
+
id: "Yes",
|
|
36423
|
+
name: "yes"
|
|
36424
|
+
}, {
|
|
36425
|
+
id: "No",
|
|
36426
|
+
name: "no"
|
|
36427
|
+
}];
|
|
36428
|
+
const highExposureParentRadioItems = [...highExposureRadioItems, {
|
|
36429
|
+
id: "I don't know",
|
|
36430
|
+
name: "iDontKnow"
|
|
36431
|
+
}];
|
|
36432
|
+
const validateLegalEntityIdentifier = (legalEntityIdentifier2, doesYourCompanyHaveLEI2, isDisabled) => {
|
|
36433
|
+
if (isDisabled) return true;
|
|
36434
|
+
const isRequired = doesYourCompanyHaveLEI2 === "Yes";
|
|
36435
|
+
const isValidLength = legalEntityIdentifier2 ? legalEntityIdentifier2.length === 20 : false;
|
|
36436
|
+
const hasLettersAndNumbers = legalEntityIdentifier2 ? /[a-zA-Z]/.test(legalEntityIdentifier2) && /[0-9]/.test(legalEntityIdentifier2) : false;
|
|
36437
|
+
return !isRequired || !isEmpty(legalEntityIdentifier2) && isValidLength && hasLettersAndNumbers;
|
|
36438
|
+
};
|
|
36484
36439
|
const highExposureCompanyDetailsValidations = {
|
|
36485
36440
|
country: {
|
|
36486
36441
|
modes: ["blur"],
|
|
@@ -36501,16 +36456,126 @@ const highExposureCompanyDetailsValidations = {
|
|
|
36501
36456
|
modes: ["blur"],
|
|
36502
36457
|
validate: (naceCode) => !isEmpty(naceCode),
|
|
36503
36458
|
errorMessage: "fieldIsRequired"
|
|
36459
|
+
},
|
|
36460
|
+
doesTheCompanyEarnMoreThanHalf: {
|
|
36461
|
+
modes: ["blur"],
|
|
36462
|
+
validate: (doesTheCompanyEarnMoreThanHalf2) => !isEmpty(doesTheCompanyEarnMoreThanHalf2),
|
|
36463
|
+
errorMessage: "fieldIsRequired"
|
|
36464
|
+
},
|
|
36465
|
+
doesYourCompanyHaveLEI: {
|
|
36466
|
+
modes: ["blur"],
|
|
36467
|
+
validate: (doesYourCompanyHaveLEI2) => !isEmpty(doesYourCompanyHaveLEI2),
|
|
36468
|
+
errorMessage: "fieldIsRequired"
|
|
36469
|
+
},
|
|
36470
|
+
legalEntityIdentifier: {
|
|
36471
|
+
modes: ["blur"],
|
|
36472
|
+
validate: (legalEntityIdentifier2, context) => {
|
|
36473
|
+
var _a, _b;
|
|
36474
|
+
return validateLegalEntityIdentifier(legalEntityIdentifier2, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesTheCompanyEarnMoreThanHalf);
|
|
36475
|
+
},
|
|
36476
|
+
errorMessage: "fieldIsRequired"
|
|
36477
|
+
},
|
|
36478
|
+
isCompanyOwnedByAnotherCompany: {
|
|
36479
|
+
modes: ["blur"],
|
|
36480
|
+
validate: (isCompanyOwnedByAnotherCompany2) => !isEmpty(isCompanyOwnedByAnotherCompany2),
|
|
36481
|
+
errorMessage: "fieldIsRequired"
|
|
36482
|
+
},
|
|
36483
|
+
isParentOwnedByAnotherCompany: {
|
|
36484
|
+
modes: ["blur"],
|
|
36485
|
+
validate: (isParentOwnedByAnotherCompany2, context) => {
|
|
36486
|
+
var _a, _b;
|
|
36487
|
+
return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) ? !isEmpty(isParentOwnedByAnotherCompany2) : true;
|
|
36488
|
+
},
|
|
36489
|
+
errorMessage: "fieldIsRequired"
|
|
36490
|
+
}
|
|
36491
|
+
};
|
|
36492
|
+
const highExposureParentCompanyDetailsValidations = {
|
|
36493
|
+
parentLegalName: {
|
|
36494
|
+
modes: ["blur"],
|
|
36495
|
+
validate: (parentLegalName) => !isEmpty(parentLegalName),
|
|
36496
|
+
errorMessage: "fieldIsRequired"
|
|
36497
|
+
},
|
|
36498
|
+
parentNumberOfEmployees: {
|
|
36499
|
+
modes: ["blur"],
|
|
36500
|
+
validate: (parentNumberOfEmployees) => !isEmpty(parentNumberOfEmployees),
|
|
36501
|
+
errorMessage: "fieldIsRequired"
|
|
36502
|
+
},
|
|
36503
|
+
parentLegalForm: {
|
|
36504
|
+
modes: ["blur"],
|
|
36505
|
+
validate: (parentLegalForm) => !isEmpty(parentLegalForm),
|
|
36506
|
+
errorMessage: "fieldIsRequired"
|
|
36507
|
+
},
|
|
36508
|
+
parentNaceCode: {
|
|
36509
|
+
modes: ["blur"],
|
|
36510
|
+
validate: (parentNaceCode) => !isEmpty(parentNaceCode),
|
|
36511
|
+
errorMessage: "fieldIsRequired"
|
|
36512
|
+
},
|
|
36513
|
+
doesTheParentCompanyEarnMoreThanHalf: {
|
|
36514
|
+
modes: ["blur"],
|
|
36515
|
+
validate: (doesTheParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheParentCompanyEarnMoreThanHalf),
|
|
36516
|
+
errorMessage: "fieldIsRequired"
|
|
36517
|
+
},
|
|
36518
|
+
doesYourParentCompanyHaveLEI: {
|
|
36519
|
+
modes: ["blur"],
|
|
36520
|
+
validate: (doesYourParentCompanyHaveLEI) => !isEmpty(doesYourParentCompanyHaveLEI),
|
|
36521
|
+
errorMessage: "fieldIsRequired"
|
|
36522
|
+
},
|
|
36523
|
+
parentLegalEntityIdentifier: {
|
|
36524
|
+
modes: ["blur"],
|
|
36525
|
+
validate: (parentLegalEntityIdentifier, context) => {
|
|
36526
|
+
var _a, _b, _c, _d;
|
|
36527
|
+
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));
|
|
36528
|
+
},
|
|
36529
|
+
errorMessage: "fieldIsRequired"
|
|
36530
|
+
}
|
|
36531
|
+
};
|
|
36532
|
+
const highExposureUltimateParentCompanyDetailsValidations = {
|
|
36533
|
+
ultimateParentLegalName: {
|
|
36534
|
+
modes: ["blur"],
|
|
36535
|
+
validate: (ultimateParentLegalName) => !isEmpty(ultimateParentLegalName),
|
|
36536
|
+
errorMessage: "fieldIsRequired"
|
|
36537
|
+
},
|
|
36538
|
+
ultimateParentNumberOfEmployees: {
|
|
36539
|
+
modes: ["blur"],
|
|
36540
|
+
validate: (ultimateParentNumberOfEmployees) => !isEmpty(ultimateParentNumberOfEmployees),
|
|
36541
|
+
errorMessage: "fieldIsRequired"
|
|
36542
|
+
},
|
|
36543
|
+
ultimateParentLegalForm: {
|
|
36544
|
+
modes: ["blur"],
|
|
36545
|
+
validate: (ultimateParentLegalForm) => !isEmpty(ultimateParentLegalForm),
|
|
36546
|
+
errorMessage: "fieldIsRequired"
|
|
36547
|
+
},
|
|
36548
|
+
ultimateParentNaceCode: {
|
|
36549
|
+
modes: ["blur"],
|
|
36550
|
+
validate: (ultimateParentNaceCode) => !isEmpty(ultimateParentNaceCode),
|
|
36551
|
+
errorMessage: "fieldIsRequired"
|
|
36552
|
+
},
|
|
36553
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: {
|
|
36554
|
+
modes: ["blur"],
|
|
36555
|
+
validate: (doesTheUltimateParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheUltimateParentCompanyEarnMoreThanHalf),
|
|
36556
|
+
errorMessage: "fieldIsRequired"
|
|
36557
|
+
},
|
|
36558
|
+
doesYourUltimateParentCompanyHaveLEI: {
|
|
36559
|
+
modes: ["blur"],
|
|
36560
|
+
validate: (doesYourUltimateParentCompanyHaveLEI) => !isEmpty(doesYourUltimateParentCompanyHaveLEI),
|
|
36561
|
+
errorMessage: "fieldIsRequired"
|
|
36562
|
+
},
|
|
36563
|
+
ultimateParentLegalEntityIdentifier: {
|
|
36564
|
+
modes: ["blur"],
|
|
36565
|
+
validate: (ultimateParentLegalEntityIdentifier, context) => {
|
|
36566
|
+
var _a, _b, _c, _d;
|
|
36567
|
+
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));
|
|
36568
|
+
},
|
|
36569
|
+
errorMessage: "fieldIsRequired"
|
|
36504
36570
|
}
|
|
36505
36571
|
};
|
|
36506
|
-
const LEGAL_FORM_FIELD = ["legalForm"];
|
|
36507
36572
|
const logger$8 = createLogger("LegalFormField");
|
|
36508
36573
|
function LegalFormField({
|
|
36509
36574
|
name = "legalForm",
|
|
36510
36575
|
data,
|
|
36511
36576
|
valid,
|
|
36512
|
-
|
|
36513
|
-
|
|
36577
|
+
errorMessage,
|
|
36578
|
+
label,
|
|
36514
36579
|
readonly,
|
|
36515
36580
|
handleChangeFor,
|
|
36516
36581
|
helperText,
|
|
@@ -36537,8 +36602,8 @@ function LegalFormField({
|
|
|
36537
36602
|
}, [countryCode]);
|
|
36538
36603
|
return jsx(Field, {
|
|
36539
36604
|
name,
|
|
36540
|
-
label:
|
|
36541
|
-
errorMessage
|
|
36605
|
+
label: label || i18n.get("businessStructure"),
|
|
36606
|
+
errorMessage,
|
|
36542
36607
|
classNameModifiers,
|
|
36543
36608
|
isValid: valid.legalForm,
|
|
36544
36609
|
helper: helperText == null ? void 0 : helperText.legalForm,
|
|
@@ -36553,14 +36618,13 @@ function LegalFormField({
|
|
|
36553
36618
|
})
|
|
36554
36619
|
});
|
|
36555
36620
|
}
|
|
36556
|
-
const NACE_CODE_FIELD = ["naceCode"];
|
|
36557
36621
|
const logger$7 = createLogger("NaceCodeField");
|
|
36558
36622
|
function NaceCodeField({
|
|
36559
36623
|
name = "naceCode",
|
|
36560
36624
|
data,
|
|
36561
36625
|
valid,
|
|
36562
|
-
|
|
36563
|
-
|
|
36626
|
+
errorMessage,
|
|
36627
|
+
label,
|
|
36564
36628
|
readonly,
|
|
36565
36629
|
handleChangeFor,
|
|
36566
36630
|
helperText,
|
|
@@ -36582,8 +36646,8 @@ function NaceCodeField({
|
|
|
36582
36646
|
}, []);
|
|
36583
36647
|
return jsx(Field, {
|
|
36584
36648
|
name,
|
|
36585
|
-
label:
|
|
36586
|
-
errorMessage
|
|
36649
|
+
label: label || i18n.get("industryAndNaceCode"),
|
|
36650
|
+
errorMessage,
|
|
36587
36651
|
classNameModifiers,
|
|
36588
36652
|
isValid: valid.naceCode,
|
|
36589
36653
|
helper: helperText == null ? void 0 : helperText.naceCode,
|
|
@@ -36605,58 +36669,238 @@ function HighExposureBusinessInformation({
|
|
|
36605
36669
|
errors,
|
|
36606
36670
|
fieldProblems,
|
|
36607
36671
|
handleChangeFor,
|
|
36608
|
-
country: country2
|
|
36672
|
+
country: country2,
|
|
36673
|
+
fieldMapping,
|
|
36674
|
+
targetPage,
|
|
36675
|
+
sectionHeading
|
|
36609
36676
|
}) {
|
|
36677
|
+
const {
|
|
36678
|
+
i18n
|
|
36679
|
+
} = useI18nContext();
|
|
36680
|
+
const getFieldName = (fieldKey) => fieldMapping[fieldKey] ?? fieldKey;
|
|
36681
|
+
const getFieldData = (fieldKey) => {
|
|
36682
|
+
const fieldData = data[getFieldName(fieldKey)];
|
|
36683
|
+
return fieldData ? fieldData.toString() : void 0;
|
|
36684
|
+
};
|
|
36685
|
+
const isMainCompany = targetPage === HighExposurePagesEnums.COMPANY_PAGE;
|
|
36610
36686
|
return jsxs(Fragment, {
|
|
36611
|
-
children: [jsx(
|
|
36687
|
+
children: [jsx(Typography, {
|
|
36688
|
+
el: "h3",
|
|
36689
|
+
variant: "title",
|
|
36690
|
+
children: i18n.get(sectionHeading || "yourBusinessDetails")
|
|
36691
|
+
}), !isMainCompany && jsx(Field, {
|
|
36692
|
+
name: getFieldName("legalName"),
|
|
36693
|
+
label: formUtils.getLabel(getFieldName("legalName"), "legalName"),
|
|
36694
|
+
classNameModifiers: ["legalName"],
|
|
36695
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalName"), errors, fieldProblems),
|
|
36696
|
+
isValid: valid[getFieldName("legalName")],
|
|
36697
|
+
children: (childProps) => jsx(InputText, {
|
|
36698
|
+
...childProps,
|
|
36699
|
+
name: getFieldName("legalName"),
|
|
36700
|
+
value: getFieldData("legalName"),
|
|
36701
|
+
readonly: false,
|
|
36702
|
+
classNameModifiers: ["legalName"],
|
|
36703
|
+
onInput: handleChangeFor(getFieldName("legalName"), "input"),
|
|
36704
|
+
onBlur: handleChangeFor(getFieldName("legalName"), "blur"),
|
|
36705
|
+
"aria-required": true,
|
|
36706
|
+
"aria-label": formUtils.getLabel(getFieldName("legalName")),
|
|
36707
|
+
"aria-invalid": !valid[getFieldName("legalName")]
|
|
36708
|
+
})
|
|
36709
|
+
}), jsx(LegalFormField, {
|
|
36710
|
+
name: getFieldName("legalForm"),
|
|
36612
36711
|
countryCode: country2,
|
|
36613
36712
|
data: {
|
|
36614
|
-
legalForm:
|
|
36713
|
+
legalForm: getFieldData("legalForm")
|
|
36615
36714
|
},
|
|
36616
36715
|
valid: {
|
|
36617
|
-
legalForm: valid
|
|
36716
|
+
legalForm: valid[getFieldName("legalForm")]
|
|
36618
36717
|
},
|
|
36619
|
-
|
|
36620
|
-
handleChangeFor: () => handleChangeFor("legalForm", "blur"),
|
|
36718
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalForm"), errors, fieldProblems),
|
|
36719
|
+
handleChangeFor: () => handleChangeFor(getFieldName("legalForm"), "blur"),
|
|
36621
36720
|
readonly: false,
|
|
36622
|
-
|
|
36623
|
-
legalForm: "businessStructure"
|
|
36624
|
-
})
|
|
36721
|
+
label: formUtils.getLabel(getFieldName("legalForm"), "businessStructure")
|
|
36625
36722
|
}), jsx(NaceCodeField, {
|
|
36723
|
+
name: getFieldName("naceCode"),
|
|
36626
36724
|
data: {
|
|
36627
|
-
naceCode:
|
|
36725
|
+
naceCode: getFieldData("naceCode")
|
|
36628
36726
|
},
|
|
36629
36727
|
valid: {
|
|
36630
|
-
naceCode: valid
|
|
36728
|
+
naceCode: valid[getFieldName("naceCode")]
|
|
36631
36729
|
},
|
|
36632
|
-
|
|
36633
|
-
handleChangeFor: () => handleChangeFor("naceCode", "blur"),
|
|
36730
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("naceCode"), errors, fieldProblems),
|
|
36731
|
+
handleChangeFor: () => handleChangeFor(getFieldName("naceCode"), "blur"),
|
|
36634
36732
|
readonly: false,
|
|
36635
|
-
|
|
36636
|
-
naceCode: "industryAndNaceCode"
|
|
36637
|
-
})
|
|
36733
|
+
label: formUtils.getLabel(getFieldName("naceCode"), "industryAndNaceCode")
|
|
36638
36734
|
}), jsx(Field, {
|
|
36639
|
-
name: "numberOfEmployees",
|
|
36640
|
-
label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
|
|
36735
|
+
name: getFieldName("numberOfEmployees"),
|
|
36736
|
+
label: formUtils.getLabel(getFieldName("numberOfEmployees"), "numberOfEmployees"),
|
|
36641
36737
|
classNameModifiers: ["legalName"],
|
|
36642
|
-
errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
|
|
36643
|
-
isValid: valid
|
|
36738
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("numberOfEmployees"), errors, fieldProblems),
|
|
36739
|
+
isValid: valid[getFieldName("numberOfEmployees")],
|
|
36644
36740
|
children: (childProps) => jsx(InputText, {
|
|
36645
36741
|
...childProps,
|
|
36646
|
-
name: "numberOfEmployees",
|
|
36647
|
-
value:
|
|
36648
|
-
readonly:
|
|
36742
|
+
name: getFieldName("numberOfEmployees"),
|
|
36743
|
+
value: getFieldData("numberOfEmployees"),
|
|
36744
|
+
readonly: false,
|
|
36649
36745
|
classNameModifiers: ["legalName"],
|
|
36650
|
-
onInput: handleChangeFor("numberOfEmployees", "input"),
|
|
36651
|
-
onBlur: handleChangeFor("numberOfEmployees", "blur"),
|
|
36746
|
+
onInput: handleChangeFor(getFieldName("numberOfEmployees"), "input"),
|
|
36747
|
+
onBlur: handleChangeFor(getFieldName("numberOfEmployees"), "blur"),
|
|
36748
|
+
"aria-required": true,
|
|
36749
|
+
"aria-label": formUtils.getLabel(getFieldName("numberOfEmployees")),
|
|
36750
|
+
"aria-invalid": !valid[getFieldName("numberOfEmployees")]
|
|
36751
|
+
})
|
|
36752
|
+
}), jsx(Field, {
|
|
36753
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
36754
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36755
|
+
label: i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
36756
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesTheCompanyEarnMoreThanHalf"), errors, fieldProblems),
|
|
36757
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36758
|
+
...childProps,
|
|
36759
|
+
name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
|
|
36760
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
36761
|
+
value: getFieldData("doesTheCompanyEarnMoreThanHalf"),
|
|
36762
|
+
disabled: false,
|
|
36763
|
+
onChange: handleChangeFor(getFieldName("doesTheCompanyEarnMoreThanHalf")),
|
|
36764
|
+
"aria-required": true,
|
|
36765
|
+
"aria-label": i18n.get("doesTheCompanyEarnMoreThanHalf"),
|
|
36766
|
+
"aria-invalid": !valid[getFieldName("doesTheCompanyEarnMoreThanHalf")]
|
|
36767
|
+
})
|
|
36768
|
+
}), jsx(Field, {
|
|
36769
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
36770
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36771
|
+
label: i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
36772
|
+
helper: jsxs("div", {
|
|
36773
|
+
children: [jsx("span", {
|
|
36774
|
+
children: i18n.get("anLEIIsAUniqueCode")
|
|
36775
|
+
}), " ", jsx(Link, {
|
|
36776
|
+
href: "https://search.gleif.org/#/search/",
|
|
36777
|
+
external: true,
|
|
36778
|
+
className: ["adyen-kyc__high-exposure-link"],
|
|
36779
|
+
children: i18n.get("lookUpYourLEI")
|
|
36780
|
+
})]
|
|
36781
|
+
}),
|
|
36782
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("doesYourCompanyHaveLEI"), errors, fieldProblems),
|
|
36783
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36784
|
+
...childProps,
|
|
36785
|
+
name: getFieldName("doesYourCompanyHaveLEI"),
|
|
36786
|
+
items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
|
|
36787
|
+
value: getFieldData("doesYourCompanyHaveLEI"),
|
|
36788
|
+
disabled: false,
|
|
36789
|
+
onChange: handleChangeFor(getFieldName("doesYourCompanyHaveLEI")),
|
|
36652
36790
|
"aria-required": true,
|
|
36653
|
-
"aria-label":
|
|
36654
|
-
"aria-invalid": !valid
|
|
36791
|
+
"aria-label": i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
|
|
36792
|
+
"aria-invalid": !valid[getFieldName("doesYourCompanyHaveLEI")]
|
|
36655
36793
|
})
|
|
36794
|
+
}), getFieldData("doesYourCompanyHaveLEI") === "Yes" && jsxs(Fragment, {
|
|
36795
|
+
children: [jsx(Field, {
|
|
36796
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
36797
|
+
label: formUtils.getLabel(getFieldName("legalEntityIdentifier"), "legalEntityIdentifier"),
|
|
36798
|
+
errorMessage: formUtils.getErrorMessage(getFieldName("legalEntityIdentifier"), errors, fieldProblems),
|
|
36799
|
+
isValid: valid.legalEntityIdentifier,
|
|
36800
|
+
helper: i18n.get("enterNCharactersWithAMixForExample", {
|
|
36801
|
+
values: {
|
|
36802
|
+
numChars: 20,
|
|
36803
|
+
example: "529900T8BM49AURSDO55"
|
|
36804
|
+
}
|
|
36805
|
+
}),
|
|
36806
|
+
helperPosition: "below",
|
|
36807
|
+
children: (childProps) => jsx(InputText, {
|
|
36808
|
+
...childProps,
|
|
36809
|
+
name: getFieldName("legalEntityIdentifier"),
|
|
36810
|
+
value: getFieldData("legalEntityIdentifier"),
|
|
36811
|
+
readonly: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
36812
|
+
classNameModifiers: ["legalName"],
|
|
36813
|
+
onInput: handleChangeFor(getFieldName("legalEntityIdentifier"), "input"),
|
|
36814
|
+
onBlur: handleChangeFor(getFieldName("legalEntityIdentifier"), "blur"),
|
|
36815
|
+
"aria-required": true,
|
|
36816
|
+
"aria-label": formUtils.getLabel(getFieldName("legalEntityIdentifier")),
|
|
36817
|
+
"aria-invalid": !valid[getFieldName("legalEntityIdentifier")],
|
|
36818
|
+
isValid: valid[getFieldName("legalEntityIdentifier")]
|
|
36819
|
+
})
|
|
36820
|
+
}), !isMainCompany && jsx(Checkbox, {
|
|
36821
|
+
name: getFieldName("doesNotKnowNumberOfEmployees"),
|
|
36822
|
+
label: i18n.get("iDontKnow"),
|
|
36823
|
+
value: getFieldData("doesNotKnowNumberOfEmployees"),
|
|
36824
|
+
readonly: false,
|
|
36825
|
+
classNameModifiers: ["exempted-from-tax"],
|
|
36826
|
+
checked: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
|
|
36827
|
+
onChange: handleChangeFor(getFieldName("doesNotKnowNumberOfEmployees")),
|
|
36828
|
+
"aria-required": false,
|
|
36829
|
+
"aria-label": i18n.get("iDontKnow"),
|
|
36830
|
+
"aria-invalid": false
|
|
36831
|
+
})]
|
|
36656
36832
|
})]
|
|
36657
36833
|
});
|
|
36658
36834
|
}
|
|
36659
|
-
|
|
36835
|
+
function HighExposureOwnershipStructure({
|
|
36836
|
+
formUtils,
|
|
36837
|
+
data,
|
|
36838
|
+
valid,
|
|
36839
|
+
errors,
|
|
36840
|
+
fieldProblems,
|
|
36841
|
+
handleChangeFor,
|
|
36842
|
+
legalEntity
|
|
36843
|
+
}) {
|
|
36844
|
+
const {
|
|
36845
|
+
i18n
|
|
36846
|
+
} = useI18nContext();
|
|
36847
|
+
return jsxs(Fragment, {
|
|
36848
|
+
children: [jsx(Typography, {
|
|
36849
|
+
el: "h3",
|
|
36850
|
+
variant: "title",
|
|
36851
|
+
children: i18n.get("ownershipStructure")
|
|
36852
|
+
}), jsx(Field, {
|
|
36853
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
36854
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36855
|
+
label: i18n.get("isCompanyOwnedByAnotherCompany", {
|
|
36856
|
+
values: {
|
|
36857
|
+
company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : ""
|
|
36858
|
+
}
|
|
36859
|
+
}),
|
|
36860
|
+
errorMessage: formUtils.getErrorMessage("isCompanyOwnedByAnotherCompany", errors, fieldProblems),
|
|
36861
|
+
helper: i18n.get("thisMeansYouHaveAParentCompany"),
|
|
36862
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36863
|
+
...childProps,
|
|
36864
|
+
name: "isCompanyOwnedByAnotherCompany",
|
|
36865
|
+
items: highExposureRadioItems,
|
|
36866
|
+
value: data.isCompanyOwnedByAnotherCompany,
|
|
36867
|
+
disabled: false,
|
|
36868
|
+
onChange: handleChangeFor("isCompanyOwnedByAnotherCompany"),
|
|
36869
|
+
"aria-required": true,
|
|
36870
|
+
"aria-label": formUtils.getLabel("isCompanyOwnedByAnotherCompany"),
|
|
36871
|
+
"aria-invalid": !valid.isCompanyOwnedByAnotherCompany
|
|
36872
|
+
})
|
|
36873
|
+
}), (data == null ? void 0 : data.isCompanyOwnedByAnotherCompany) === "Yes" && jsx(Field, {
|
|
36874
|
+
name: "isParentOwnedByAnotherCompany",
|
|
36875
|
+
classNameModifiers: ["highExposureBusinessInformation"],
|
|
36876
|
+
label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
36877
|
+
helper: i18n.get("thisMeansYouHaveAnUltimateParentCompany"),
|
|
36878
|
+
errorMessage: formUtils.getErrorMessage("isParentOwnedByAnotherCompany", errors, fieldProblems),
|
|
36879
|
+
children: (childProps) => jsx(RadioGroup, {
|
|
36880
|
+
...childProps,
|
|
36881
|
+
name: "isParentOwnedByAnotherCompany",
|
|
36882
|
+
items: highExposureRadioItems,
|
|
36883
|
+
value: data.isParentOwnedByAnotherCompany,
|
|
36884
|
+
disabled: false,
|
|
36885
|
+
onChange: handleChangeFor("isParentOwnedByAnotherCompany"),
|
|
36886
|
+
"aria-required": true,
|
|
36887
|
+
"aria-label": formUtils.getLabel("isParentOwnedByAnotherCompany"),
|
|
36888
|
+
"aria-invalid": !valid.doesYourCompanyHaveLEI
|
|
36889
|
+
})
|
|
36890
|
+
})]
|
|
36891
|
+
});
|
|
36892
|
+
}
|
|
36893
|
+
const companyFieldMapping = {
|
|
36894
|
+
legalForm: "legalForm",
|
|
36895
|
+
naceCode: "naceCode",
|
|
36896
|
+
numberOfEmployees: "numberOfEmployees",
|
|
36897
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
36898
|
+
doesYourCompanyHaveLEI: "doesYourCompanyHaveLEI",
|
|
36899
|
+
legalEntityIdentifier: "legalEntityIdentifier",
|
|
36900
|
+
isCompanyOwnedByAnotherCompany: "isCompanyOwnedByAnotherCompany",
|
|
36901
|
+
isParentOwnedByAnotherCompany: "isParentOwnedByAnotherCompany"
|
|
36902
|
+
};
|
|
36903
|
+
const highExposureCompanyDetailsFields = Object.values(companyFieldMapping);
|
|
36660
36904
|
function AdditionalFieldsForHighExposureCompany(props) {
|
|
36661
36905
|
const {
|
|
36662
36906
|
i18n
|
|
@@ -36677,6 +36921,7 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36677
36921
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36678
36922
|
});
|
|
36679
36923
|
const formUtils = formUtilities(props, i18n);
|
|
36924
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36680
36925
|
const {
|
|
36681
36926
|
updateStateSlice
|
|
36682
36927
|
} = useGlobalDataSlice("company");
|
|
@@ -36689,9 +36934,19 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36689
36934
|
});
|
|
36690
36935
|
}, [data, valid, errors, fieldProblems]);
|
|
36691
36936
|
return jsxs("form", {
|
|
36692
|
-
className: "adyen-
|
|
36693
|
-
children: [jsx(
|
|
36694
|
-
|
|
36937
|
+
className: "adyen-kyc__high-exposure-company",
|
|
36938
|
+
children: [jsx(Typography, {
|
|
36939
|
+
el: "h1",
|
|
36940
|
+
variant: "title-l",
|
|
36941
|
+
children: i18n.get("additionalInformationIsRequiredForLoan")
|
|
36942
|
+
}), jsx(Typography, {
|
|
36943
|
+
el: "p",
|
|
36944
|
+
variant: "body",
|
|
36945
|
+
children: i18n.get("beforeYourCapitalLoanApplicationCanBeSubmitted")
|
|
36946
|
+
}), jsx(Typography, {
|
|
36947
|
+
el: "p",
|
|
36948
|
+
variant: "body",
|
|
36949
|
+
children: i18n.get("euFinancialRegulationsRequireUs")
|
|
36695
36950
|
}), jsx(ErrorPanel, {
|
|
36696
36951
|
verificationErrors: props.formVerificationErrors,
|
|
36697
36952
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
@@ -36699,21 +36954,39 @@ function AdditionalFieldsForHighExposureCompany(props) {
|
|
|
36699
36954
|
id: "ariaErrorField"
|
|
36700
36955
|
}), jsx(HighExposureBusinessInformation, {
|
|
36701
36956
|
...props,
|
|
36702
|
-
handleChangeFor,
|
|
36957
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
36703
36958
|
errors,
|
|
36704
36959
|
data,
|
|
36705
36960
|
valid,
|
|
36706
36961
|
country: props.country,
|
|
36707
36962
|
formUtils,
|
|
36963
|
+
fieldProblems,
|
|
36964
|
+
targetPage: HighExposurePagesEnums.COMPANY_PAGE,
|
|
36965
|
+
fieldMapping: companyFieldMapping
|
|
36966
|
+
}), jsx(HighExposureOwnershipStructure, {
|
|
36967
|
+
...props,
|
|
36968
|
+
handleChangeFor,
|
|
36969
|
+
errors,
|
|
36970
|
+
data,
|
|
36971
|
+
valid,
|
|
36972
|
+
legalEntity: props.legalEntity,
|
|
36973
|
+
formUtils,
|
|
36708
36974
|
fieldProblems
|
|
36709
36975
|
})]
|
|
36710
36976
|
});
|
|
36711
36977
|
}
|
|
36712
|
-
const
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
|
|
36716
|
-
|
|
36978
|
+
const parentCompanyFieldMapping$1 = {
|
|
36979
|
+
legalName: "parentLegalName",
|
|
36980
|
+
legalForm: "parentLegalForm",
|
|
36981
|
+
naceCode: "parentNaceCode",
|
|
36982
|
+
numberOfEmployees: "parentNumberOfEmployees",
|
|
36983
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheParentCompanyEarnMoreThanHalf",
|
|
36984
|
+
doesYourCompanyHaveLEI: "doesYourParentCompanyHaveLEI",
|
|
36985
|
+
legalEntityIdentifier: "parentLegalEntityIdentifier",
|
|
36986
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowParentNumberOfEmployees"
|
|
36987
|
+
};
|
|
36988
|
+
const highExposureParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping$1);
|
|
36989
|
+
function AdditionalFieldsForHighExposureParentCompany(props) {
|
|
36717
36990
|
const {
|
|
36718
36991
|
i18n
|
|
36719
36992
|
} = useI18nContext();
|
|
@@ -36725,14 +36998,15 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
36725
36998
|
fieldProblems
|
|
36726
36999
|
} = useForm({
|
|
36727
37000
|
...props,
|
|
36728
|
-
schema:
|
|
37001
|
+
schema: highExposureParentCompanyDetailsFields,
|
|
36729
37002
|
defaultData: {
|
|
36730
37003
|
...props.data
|
|
36731
37004
|
},
|
|
36732
|
-
rules: props.validators ||
|
|
37005
|
+
rules: props.validators || highExposureParentCompanyDetailsValidations,
|
|
36733
37006
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36734
37007
|
});
|
|
36735
37008
|
const formUtils = formUtilities(props, i18n);
|
|
37009
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36736
37010
|
const {
|
|
36737
37011
|
updateStateSlice
|
|
36738
37012
|
} = useGlobalDataSlice("parentCompany");
|
|
@@ -36745,39 +37019,47 @@ function AdditionalFieldsForHighExposureParentCompany({
|
|
|
36745
37019
|
});
|
|
36746
37020
|
}, [data, valid, errors, fieldProblems]);
|
|
36747
37021
|
return jsxs("form", {
|
|
36748
|
-
className: "adyen-
|
|
36749
|
-
children: [jsx(
|
|
36750
|
-
|
|
37022
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37023
|
+
children: [jsx(Typography, {
|
|
37024
|
+
el: "h1",
|
|
37025
|
+
variant: "title-l",
|
|
37026
|
+
children: i18n.get("parentCompanyInformation")
|
|
37027
|
+
}), jsx(Typography, {
|
|
37028
|
+
el: "p",
|
|
37029
|
+
variant: "body",
|
|
37030
|
+
children: i18n.get("inTheLastStepOwnedByAParentCompany")
|
|
36751
37031
|
}), jsx(ErrorPanel, {
|
|
36752
37032
|
verificationErrors: props.formVerificationErrors,
|
|
36753
37033
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
36754
37034
|
formUtils,
|
|
36755
37035
|
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
|
-
})
|
|
37036
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
37037
|
+
...props,
|
|
37038
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
37039
|
+
sectionHeading: "businessInformation",
|
|
37040
|
+
errors,
|
|
37041
|
+
data,
|
|
37042
|
+
valid,
|
|
37043
|
+
country: props.country,
|
|
37044
|
+
formUtils,
|
|
37045
|
+
fieldProblems,
|
|
37046
|
+
targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE,
|
|
37047
|
+
fieldMapping: parentCompanyFieldMapping$1
|
|
36774
37048
|
})]
|
|
36775
37049
|
});
|
|
36776
37050
|
}
|
|
36777
|
-
|
|
36778
|
-
|
|
36779
|
-
|
|
36780
|
-
|
|
37051
|
+
const parentCompanyFieldMapping = {
|
|
37052
|
+
legalName: "ultimateParentLegalName",
|
|
37053
|
+
legalForm: "ultimateParentLegalForm",
|
|
37054
|
+
naceCode: "ultimateParentNaceCode",
|
|
37055
|
+
numberOfEmployees: "ultimateParentNumberOfEmployees",
|
|
37056
|
+
doesTheCompanyEarnMoreThanHalf: "doesTheUltimateParentCompanyEarnMoreThanHalf",
|
|
37057
|
+
doesYourCompanyHaveLEI: "doesYourUltimateParentCompanyHaveLEI",
|
|
37058
|
+
legalEntityIdentifier: "ultimateParentLegalEntityIdentifier",
|
|
37059
|
+
doesNotKnowNumberOfEmployees: "doesNotKnowUltimateParentNumberOfEmployees"
|
|
37060
|
+
};
|
|
37061
|
+
const highExposureUltimateParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping);
|
|
37062
|
+
function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
|
|
36781
37063
|
const {
|
|
36782
37064
|
i18n
|
|
36783
37065
|
} = useI18nContext();
|
|
@@ -36789,14 +37071,15 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
36789
37071
|
fieldProblems
|
|
36790
37072
|
} = useForm({
|
|
36791
37073
|
...props,
|
|
36792
|
-
schema:
|
|
37074
|
+
schema: highExposureUltimateParentCompanyDetailsFields,
|
|
36793
37075
|
defaultData: {
|
|
36794
37076
|
...props.data
|
|
36795
37077
|
},
|
|
36796
|
-
rules: props.validators ||
|
|
37078
|
+
rules: props.validators || highExposureUltimateParentCompanyDetailsValidations,
|
|
36797
37079
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
36798
37080
|
});
|
|
36799
37081
|
const formUtils = formUtilities(props, i18n);
|
|
37082
|
+
const highExposureHandleChangeFor = handleChangeFor;
|
|
36800
37083
|
const {
|
|
36801
37084
|
updateStateSlice
|
|
36802
37085
|
} = useGlobalDataSlice("ultimateParentCompany");
|
|
@@ -36809,32 +37092,32 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
|
|
|
36809
37092
|
});
|
|
36810
37093
|
}, [data, valid, errors, fieldProblems]);
|
|
36811
37094
|
return jsxs("form", {
|
|
36812
|
-
className: "adyen-
|
|
36813
|
-
children: [jsx(
|
|
36814
|
-
|
|
37095
|
+
className: "adyen-kyc__high-exposure-company",
|
|
37096
|
+
children: [jsx(Typography, {
|
|
37097
|
+
el: "h1",
|
|
37098
|
+
variant: "title-l",
|
|
37099
|
+
children: i18n.get("ultimateParentCompanyInformation")
|
|
37100
|
+
}), jsx(Typography, {
|
|
37101
|
+
el: "p",
|
|
37102
|
+
variant: "body",
|
|
37103
|
+
children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany")
|
|
36815
37104
|
}), jsx(ErrorPanel, {
|
|
36816
37105
|
verificationErrors: props.formVerificationErrors,
|
|
36817
37106
|
validationErrors: props == null ? void 0 : props.fieldValidationErrors,
|
|
36818
37107
|
formUtils,
|
|
36819
37108
|
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
|
-
})
|
|
37109
|
+
}), jsx(HighExposureBusinessInformation, {
|
|
37110
|
+
...props,
|
|
37111
|
+
handleChangeFor: highExposureHandleChangeFor,
|
|
37112
|
+
sectionHeading: "businessInformation",
|
|
37113
|
+
errors,
|
|
37114
|
+
data,
|
|
37115
|
+
valid,
|
|
37116
|
+
country: props.country,
|
|
37117
|
+
formUtils,
|
|
37118
|
+
fieldProblems,
|
|
37119
|
+
targetPage: HighExposurePagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
|
|
37120
|
+
fieldMapping: parentCompanyFieldMapping
|
|
36838
37121
|
})]
|
|
36839
37122
|
});
|
|
36840
37123
|
}
|
|
@@ -36865,20 +37148,15 @@ function HighExposureDropinComponent(props) {
|
|
|
36865
37148
|
const highExposureCompanyDetailsFormProps = getFormProps(props, companyFormId);
|
|
36866
37149
|
const highExposureParentCompanyDetailsFormProps = getFormProps(props, parentCompanyFormId);
|
|
36867
37150
|
const highExposureUltimateParentCompanyDetailsFormProps = getFormProps(props, ultimateParentCompanyFormId);
|
|
36868
|
-
const renderActiveForm = (activeForm) =>
|
|
37151
|
+
const renderActiveForm = (activeForm) => jsx("div", {
|
|
36869
37152
|
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", {
|
|
37153
|
+
children: jsxs("div", {
|
|
36877
37154
|
className: "adyen-kyc-form-wrapper",
|
|
36878
37155
|
children: [activeForm.formId === companyFormId && jsx(AdditionalFieldsForHighExposureCompany, {
|
|
36879
37156
|
...highExposureCompanyDetailsFormProps,
|
|
36880
37157
|
legalEntityId: props.legalEntityId,
|
|
36881
|
-
|
|
37158
|
+
legalEntity: props.legalEntity,
|
|
37159
|
+
heading: i18n.get("yourBusinessDetails"),
|
|
36882
37160
|
id: companyFormId,
|
|
36883
37161
|
country: props.country
|
|
36884
37162
|
}), activeForm.formId === parentCompanyFormId && jsx(AdditionalFieldsForHighExposureParentCompany, {
|
|
@@ -36894,7 +37172,7 @@ function HighExposureDropinComponent(props) {
|
|
|
36894
37172
|
id: companyFormId,
|
|
36895
37173
|
country: props.country
|
|
36896
37174
|
})]
|
|
36897
|
-
})
|
|
37175
|
+
})
|
|
36898
37176
|
});
|
|
36899
37177
|
return jsx("div", {
|
|
36900
37178
|
className: "adyen-kyc",
|
|
@@ -36909,6 +37187,24 @@ const customLabels = {
|
|
|
36909
37187
|
company: {
|
|
36910
37188
|
legalForm: "businessStructure",
|
|
36911
37189
|
naceCode: "industryAndNaceCode"
|
|
37190
|
+
},
|
|
37191
|
+
parentCompany: {
|
|
37192
|
+
parentLegalName: "legalName",
|
|
37193
|
+
parentLegalForm: "businessStructure",
|
|
37194
|
+
parentNaceCode: "industryAndNaceCode",
|
|
37195
|
+
parentNumberOfEmployees: "numberOfEmployees",
|
|
37196
|
+
doesTheParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37197
|
+
doesYourParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
37198
|
+
parentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
37199
|
+
},
|
|
37200
|
+
ultimateParentCompany: {
|
|
37201
|
+
ultimateParentLegalName: "legalName",
|
|
37202
|
+
ultimateParentLegalForm: "businessStructure",
|
|
37203
|
+
ultimateParentNaceCode: "industryAndNaceCode",
|
|
37204
|
+
ultimateParentNumberOfEmployees: "numberOfEmployees",
|
|
37205
|
+
doesTheUltimateParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
|
|
37206
|
+
doesYourUltimateParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
|
|
37207
|
+
ultimateParentLegalEntityIdentifier: "legalEntityIdentifier"
|
|
36912
37208
|
}
|
|
36913
37209
|
};
|
|
36914
37210
|
function UpdateLegalEntityForHighExposure({
|
|
@@ -36922,16 +37218,17 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36922
37218
|
hideDropinLayout,
|
|
36923
37219
|
handleHomeClick,
|
|
36924
37220
|
homeButtonLabel,
|
|
36925
|
-
legalEntityId
|
|
37221
|
+
legalEntityId,
|
|
37222
|
+
legalEntity: legalEntityProps
|
|
36926
37223
|
}) {
|
|
36927
|
-
var _a;
|
|
37224
|
+
var _a, _b, _c;
|
|
36928
37225
|
const {
|
|
36929
37226
|
getLegalEntity: getLegalEntity2
|
|
36930
37227
|
} = useComponentApi(legalEntityId);
|
|
36931
37228
|
const {
|
|
36932
37229
|
i18n
|
|
36933
37230
|
} = useI18nContext();
|
|
36934
|
-
const [legalEntity, setLegalEntity] = useState();
|
|
37231
|
+
const [legalEntity, setLegalEntity] = useState(legalEntityProps);
|
|
36935
37232
|
const fetchLegalEntity = useCallback(async () => {
|
|
36936
37233
|
const legalEntityResponse = await getLegalEntity2(legalEntityId);
|
|
36937
37234
|
setLegalEntity(legalEntityResponse);
|
|
@@ -36956,6 +37253,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36956
37253
|
} = useToastContext();
|
|
36957
37254
|
const [loadingStatus, setLoadingStatus] = useState("success");
|
|
36958
37255
|
const formRef = useRef(null);
|
|
37256
|
+
const [highExposureRequiredForms, setHighExposureRequiredForms] = useState(highExposureForms);
|
|
36959
37257
|
const getConfigurationData = useCallback(() => getConfiguration2({
|
|
36960
37258
|
legalEntityType: LegalEntityType.ORGANIZATION,
|
|
36961
37259
|
capabilities,
|
|
@@ -36982,10 +37280,33 @@ function UpdateLegalEntityForHighExposure({
|
|
|
36982
37280
|
});
|
|
36983
37281
|
onChange == null ? void 0 : onChange(currentState);
|
|
36984
37282
|
}, [currentState]);
|
|
37283
|
+
useEffect(() => {
|
|
37284
|
+
var _a2, _b2;
|
|
37285
|
+
const showParentCompany = ((_a2 = data == null ? void 0 : data.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
|
|
37286
|
+
const showUltimateParentCompany = ((_b2 = data == null ? void 0 : data.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
|
|
37287
|
+
let updateForms = {
|
|
37288
|
+
company: {
|
|
37289
|
+
...highExposureForms.company
|
|
37290
|
+
}
|
|
37291
|
+
};
|
|
37292
|
+
if (showParentCompany) {
|
|
37293
|
+
updateForms = {
|
|
37294
|
+
...updateForms,
|
|
37295
|
+
parentCompany: highExposureForms.parentCompany
|
|
37296
|
+
};
|
|
37297
|
+
}
|
|
37298
|
+
if (showParentCompany && showUltimateParentCompany) {
|
|
37299
|
+
updateForms = {
|
|
37300
|
+
...updateForms,
|
|
37301
|
+
ultimateParentCompany: highExposureForms.ultimateParentCompany
|
|
37302
|
+
};
|
|
37303
|
+
}
|
|
37304
|
+
setHighExposureRequiredForms(updateForms);
|
|
37305
|
+
}, [(_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
37306
|
const forms2 = useMemo(() => {
|
|
36986
|
-
const requiredForms = getRequiredForms(
|
|
37307
|
+
const requiredForms = getRequiredForms(highExposureRequiredForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
|
|
36987
37308
|
return addValidityToForms(requiredForms, formValidity, problems);
|
|
36988
|
-
}, [derivedProps, formValidity, problems]);
|
|
37309
|
+
}, [derivedProps == null ? void 0 : derivedProps.optionalFields, derivedProps == null ? void 0 : derivedProps.requiredFields, formValidity, highExposureRequiredForms, problems]);
|
|
36989
37310
|
const onSubmit = async () => {
|
|
36990
37311
|
setLoadingStatus("loading");
|
|
36991
37312
|
const exposureDetails = mapHighExposureToLegalEntity(data);
|
|
@@ -37050,7 +37371,7 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37050
37371
|
onSubmit
|
|
37051
37372
|
});
|
|
37052
37373
|
return jsx(FormWrapper, {
|
|
37053
|
-
taskName: "
|
|
37374
|
+
taskName: "progress",
|
|
37054
37375
|
handleNextClick,
|
|
37055
37376
|
handleBackClick,
|
|
37056
37377
|
gotoFormByFormIndex,
|
|
@@ -37076,10 +37397,11 @@ function UpdateLegalEntityForHighExposure({
|
|
|
37076
37397
|
activeForm,
|
|
37077
37398
|
capabilities,
|
|
37078
37399
|
data,
|
|
37079
|
-
country: ((
|
|
37400
|
+
country: ((_c = data == null ? void 0 : data.company) == null ? void 0 : _c.country) ?? country2,
|
|
37080
37401
|
problems,
|
|
37081
37402
|
shouldValidate,
|
|
37082
|
-
ref: formRef
|
|
37403
|
+
ref: formRef,
|
|
37404
|
+
legalEntity
|
|
37083
37405
|
})
|
|
37084
37406
|
});
|
|
37085
37407
|
}
|
|
@@ -37667,39 +37989,40 @@ const verifyIdNumber = async (context, request) => {
|
|
|
37667
37989
|
const getKycExternalApi = ({
|
|
37668
37990
|
loadingContext,
|
|
37669
37991
|
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
|
-
}
|
|
37992
|
+
}) => ({
|
|
37993
|
+
getConfiguration: async (request) => getConfiguration({
|
|
37994
|
+
loadingContext,
|
|
37995
|
+
clientKey
|
|
37996
|
+
}, request),
|
|
37997
|
+
getAllowedCountries: async () => getAllowedCountries({
|
|
37998
|
+
loadingContext,
|
|
37999
|
+
clientKey
|
|
38000
|
+
}),
|
|
38001
|
+
getAllowedLocales: async () => getAllowedLocales({
|
|
38002
|
+
loadingContext,
|
|
38003
|
+
clientKey
|
|
38004
|
+
}),
|
|
38005
|
+
getDataset: async (name, locale) => getDataset({
|
|
38006
|
+
loadingContext,
|
|
38007
|
+
clientKey
|
|
38008
|
+
}, name, locale),
|
|
38009
|
+
loadDocumentGuidance: async () => loadDocumentGuidance(loadingContext),
|
|
38010
|
+
verifyIdNumber: async (request) => verifyIdNumber({
|
|
38011
|
+
loadingContext,
|
|
38012
|
+
clientKey
|
|
38013
|
+
}, request),
|
|
38014
|
+
validatePhoneNumber: async (phoneNumber2) => validatePhoneNumber({
|
|
38015
|
+
loadingContext,
|
|
38016
|
+
clientKey
|
|
38017
|
+
}, phoneNumber2),
|
|
38018
|
+
getImageUrl: () => `${loadingContext}static/images/`,
|
|
38019
|
+
getLegalForms: async () => {
|
|
38020
|
+
throw new Error("getLegalForms not implemented in kycexternalapi");
|
|
38021
|
+
},
|
|
38022
|
+
getNaceCodes: async () => {
|
|
38023
|
+
throw new Error("getNaceCodes not implemented in kycexternalapi");
|
|
38024
|
+
}
|
|
38025
|
+
});
|
|
37703
38026
|
const ConfigurationApiProvider = ({
|
|
37704
38027
|
children,
|
|
37705
38028
|
onUserEvent,
|
|
@@ -37711,7 +38034,7 @@ const ConfigurationApiProvider = ({
|
|
|
37711
38034
|
isEmbeddedDropin,
|
|
37712
38035
|
loadingContext
|
|
37713
38036
|
} = authContext;
|
|
37714
|
-
const sdkVersion = "2.
|
|
38037
|
+
const sdkVersion = "2.47.1";
|
|
37715
38038
|
useAnalytics({
|
|
37716
38039
|
onUserEvent,
|
|
37717
38040
|
legalEntityId: rootLegalEntityId,
|
|
@@ -38095,8 +38418,7 @@ const Toast = ({
|
|
|
38095
38418
|
onToastAction
|
|
38096
38419
|
}) => {
|
|
38097
38420
|
const toastRef = useRef(null);
|
|
38098
|
-
const
|
|
38099
|
-
const successToast = type === "loading";
|
|
38421
|
+
const isLoading = type === "loading";
|
|
38100
38422
|
const labelId = getUniqueId("toast");
|
|
38101
38423
|
const handleShow = useCallback(() => {
|
|
38102
38424
|
var _a;
|
|
@@ -38113,52 +38435,49 @@ const Toast = ({
|
|
|
38113
38435
|
setTimeout(() => handleHide(), duration);
|
|
38114
38436
|
}
|
|
38115
38437
|
}, [label, duration, handleHide, handleShow]);
|
|
38438
|
+
const statusClassMap = Object.freeze({
|
|
38439
|
+
info: "",
|
|
38440
|
+
loading: "adyen-kyc-toast__loading",
|
|
38441
|
+
success: "adyen-kyc-toast__success",
|
|
38442
|
+
error: "adyen-kyc-toast__error"
|
|
38443
|
+
});
|
|
38116
38444
|
return jsxs("div", {
|
|
38117
38445
|
ref: toastRef,
|
|
38118
38446
|
role: actionLabel ? "alertdialog" : "alert",
|
|
38119
|
-
className:
|
|
38447
|
+
className: `adyen-kyc-toast ${statusClassMap[type]}`,
|
|
38120
38448
|
"aria-labelledby": labelId,
|
|
38121
|
-
children: [
|
|
38449
|
+
children: [isLoading && jsx("div", {
|
|
38122
38450
|
className: "adyen-kyc-toast__loader",
|
|
38123
|
-
children: jsx(
|
|
38124
|
-
|
|
38451
|
+
children: jsx(Spinner, {
|
|
38452
|
+
size: "small"
|
|
38125
38453
|
})
|
|
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
38454
|
}), jsxs("div", {
|
|
38139
38455
|
className: "adyen-kyc-toast__message",
|
|
38140
38456
|
children: [jsx("span", {
|
|
38141
38457
|
id: labelId,
|
|
38142
38458
|
className: "adyen-kyc-toast__title",
|
|
38143
38459
|
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", {
|
|
38460
|
+
}), !isLoading && subLabel && jsx("span", {
|
|
38151
38461
|
className: "adyen-kyc-toast__subtitle",
|
|
38152
38462
|
children: subLabel
|
|
38153
38463
|
})]
|
|
38154
|
-
}),
|
|
38155
|
-
className: "adyen-kyc-
|
|
38156
|
-
|
|
38157
|
-
|
|
38158
|
-
|
|
38159
|
-
|
|
38160
|
-
|
|
38161
|
-
|
|
38464
|
+
}), jsxs("div", {
|
|
38465
|
+
className: "adyen-kyc-toast__actions",
|
|
38466
|
+
children: [!isLoading && jsx("button", {
|
|
38467
|
+
className: "adyen-kyc-toast__close",
|
|
38468
|
+
title: "close",
|
|
38469
|
+
type: "button",
|
|
38470
|
+
onClick: handleHide,
|
|
38471
|
+
children: jsx(Icon, {
|
|
38472
|
+
name: "cross"
|
|
38473
|
+
})
|
|
38474
|
+
}), actionLabel && jsx(Button, {
|
|
38475
|
+
onClick: onToastAction ?? noop,
|
|
38476
|
+
className: "adyen-kyc-link adyen-kyc-toast__action adyen-kyc-u-margin-right-8",
|
|
38477
|
+
title: "performAction",
|
|
38478
|
+
label: actionLabel,
|
|
38479
|
+
tertiary: true
|
|
38480
|
+
})]
|
|
38162
38481
|
})]
|
|
38163
38482
|
});
|
|
38164
38483
|
};
|
|
@@ -39152,18 +39471,12 @@ const validateCoreOptions = (coreOptions) => {
|
|
|
39152
39471
|
if (!(coreOptions.sdkToken && coreOptions.getSdkToken) && !coreOptions.clientKey) {
|
|
39153
39472
|
throw new Error(`
|
|
39154
39473
|
|
|
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`);
|
|
39474
|
+
Missing or invalid parameters. Specify either the sdkToken and getSdkToken handler or a clientKey in your request to initialize the component.`);
|
|
39159
39475
|
}
|
|
39160
39476
|
if (missing.length > 0) {
|
|
39161
39477
|
throw new Error(`
|
|
39162
39478
|
|
|
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
|
-
`);
|
|
39479
|
+
Missing or invalid parameters. Specify ${listify(missing)} in your request to initialize the component.`);
|
|
39167
39480
|
}
|
|
39168
39481
|
};
|
|
39169
39482
|
const validateComponentOptions = (componentName, options) => {
|