@adyen/kyc-components 3.20.2 → 3.21.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.
Files changed (31) hide show
  1. package/dist/es/adyen-kyc-components.es.js +780 -335
  2. package/dist/style.css +841 -1300
  3. package/dist/types/components/Company/trustedFields.d.ts +7 -0
  4. package/dist/types/components/Dropins/CompanyDropin/components/CompanyDropinComponent.d.ts +1 -1
  5. package/dist/types/components/Dropins/CompanyDropin/types.d.ts +2 -0
  6. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureParentCompany.d.ts +1 -1
  7. package/dist/types/components/Dropins/HighExposureDropin/components/AdditionalFieldsForHighExposureUltimateParentCompany.d.ts +1 -1
  8. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureBusinessInformation.d.ts +2 -1
  9. package/dist/types/components/Dropins/HighExposureDropin/components/HighExposureOwnershipStructure.d.ts +4 -0
  10. package/dist/types/components/Dropins/HighExposureDropin/types.d.ts +80 -7
  11. package/dist/types/components/Dropins/HighExposureDropin/validate.d.ts +4 -1
  12. package/dist/types/components/EmbeddedDropins/UpdateLegalEntityForHighExposure/UpdateLegalEntityForHighExposure.d.ts +1 -1
  13. package/dist/types/components/Individual/types.d.ts +1 -1
  14. package/dist/types/components/internal/LegalFormField/LegalFormField.d.ts +1 -1
  15. package/dist/types/components/internal/LegalFormField/types.d.ts +4 -1
  16. package/dist/types/components/internal/NaceCodeField/NaceCodeField.d.ts +1 -1
  17. package/dist/types/components/internal/NaceCodeField/types.d.ts +5 -1
  18. package/dist/types/components/internal/Spinner/Spinner.d.ts +3 -4
  19. package/dist/types/components/internal/Tag/Tag.d.ts +6 -5
  20. package/dist/types/components/internal/Toast/types.d.ts +1 -1
  21. package/dist/types/components/internal/Typography/Typography.d.ts +3 -0
  22. package/dist/types/components/internal/Typography/types.d.ts +12 -0
  23. package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
  24. package/dist/types/core/models/api/legal-entity.d.ts +6 -0
  25. package/dist/types/core/models/api/trusted-fields-provider.d.ts +4 -0
  26. package/dist/types/utils/get-props.d.ts +0 -9
  27. package/dist/types/utils/roleMetadata.d.ts +3 -2
  28. package/package.json +1 -1
  29. package/dist/types/components/internal/Heading/Heading.d.ts +0 -10
  30. package/dist/types/components/internal/Spinner/index.d.ts +0 -1
  31. package/dist/types/components/internal/Tag/index.d.ts +0 -1
@@ -257,6 +257,7 @@ const validationPleaseEnterAValidStockISIN = "Please enter a valid ISIN. For exa
257
257
  const shareholderDocument = "Shareholder document";
258
258
  const role = "Role";
259
259
  const selectAllTheRolesThatThisDecisionMakerHolds = "Select all the roles that this decision-maker holds.";
260
+ const selectedSomeRolesBasedOnMyinfo = "We selected some roles based on Myinfo business data about your company's appointment holders and shareholders.";
260
261
  const selectTheApplicableRoles = "Select the applicable role(s)";
261
262
  const back = "Back";
262
263
  const next = "Next";
@@ -455,7 +456,6 @@ const issuedInTheLastXMonths = "Issued in the last %{number} months";
455
456
  const bankAccountVerification = "Bank account verification";
456
457
  const bankStatementDocument = "Bank statement";
457
458
  const requirements = "Requirements:";
458
- const ifDocumentMoreThan12months = "If your document is older than 12 months, then it should contain a statement with the company’s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.";
459
459
  const whyDoINeedToFillInThisInformation = "Why do I need to fill in this information?";
460
460
  const reasonForFillingCompanyRegistrationDetails = "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we’ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.";
461
461
  const reasonForFillingCompanyAddressDetails = "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we’ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.";
@@ -469,7 +469,6 @@ const controllingPersonGuideDescription = "A <strong>controlling person</strong>
469
469
  const signatoryGuideDescription = "A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.";
470
470
  const directorGuideDescription = "A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.";
471
471
  const someoneAppointedToManageACompanysBusinessAndAffairs = "Someone appointed to manage a company's business and affairs.";
472
- const whatIfDocumentIsMoreThan12MonthsOld = "What if my document is more than 12 months old?";
473
472
  const depositSlip = "Deposit slip";
474
473
  const screenshotOfOnlineBankingEnviroment = "Screenshot of online banking environment";
475
474
  const officialEmailOrALetterFromYourBank = "Official email or a letter from your bank";
@@ -1373,7 +1372,6 @@ const startANewSessionFromTheSamePlaceYouOriginallyAccessed = "Start a new sessi
1373
1372
  const differentCountryOfGoverningLaw = "This company has a different country/region of governing law";
1374
1373
  const countryOfGoverningLaw = "Country/region of governing law";
1375
1374
  const nationalInsuranceNumber = "National Insurance Number (NINO)";
1376
- const detailsForCapital = "Details for capital";
1377
1375
  const parentCompany = "Parent company";
1378
1376
  const ultimateParentCompany = "Ultimate parent company";
1379
1377
  const numberOfEmployees = "Number of employees";
@@ -1384,6 +1382,28 @@ const businessStructure = "Business structure";
1384
1382
  const selectOne = "Select one";
1385
1383
  const industryAndNaceCode = "Industry and NACE code";
1386
1384
  const youMustXYearsOldToContinue = "You must be at least %{minimumAge} years old to continue";
1385
+ const doesTheCompanyEarnMoreThanHalf = "Does the company earn more than 50% of its income from selling goods or non-financial services?";
1386
+ const doesYourCompanyHaveLEI = "Does your company have a Legal Entity Identifier (LEI)?";
1387
+ const anLEIIsAUniqueCode = "An LEI is a unique code that identifies legal entities, including companies, who engage in financial transactions.";
1388
+ const lookUpYourLEI = "Look up your LEI.";
1389
+ const legalEntityIdentifier = "Legal Entity Identifier (LEI)";
1390
+ const yourBusinessDetails = "Your business details";
1391
+ const progress = "Progress";
1392
+ const ownershipStructure = "Ownership structure";
1393
+ const isCompanyOwnedByAnotherCompany = "Is %{company} owned by another company?";
1394
+ const isParentOwnedByAnotherCompany = "Is your parent company owned by another company?";
1395
+ const thisMeansYouHaveAParentCompany = "If yes, this means you have a parent company, such as a global headquarters or a holding company.";
1396
+ const thisMeansYouHaveAnUltimateParentCompany = "If yes, this means you have an ultimate parent company. An ultimate parent company is the company that’s highest in the corporate structure. Learn more.";
1397
+ const additionalInformationIsRequiredForLoan = "Additional information is required to complete your capital loan application.";
1398
+ const beforeYourCapitalLoanApplicationCanBeSubmitted = "Before your capital loan application can be submitted, we need to collect a bit more information about you. All information collected here is required.";
1399
+ const legalName = "Legal name";
1400
+ const businessInformation = "Business information";
1401
+ const parentCompanyInformation = "Parent company information";
1402
+ const inTheLastStepOwnedByAParentCompany = "In the last step, you indicated that your business is owned by a parent company. We need to know some information about this company before submitting your application.";
1403
+ const ultimateParentCompanyInformation = "Ultimate parent company information";
1404
+ const inThePreviousStepOwnedByAnUltimateParentCompany = "In a previous step, you indicated that your business’ parent company was owned by an ultimate parent company. We need to know some information about this company before submitting your application.";
1405
+ const doesThisCompanyHaveLEI = "Does this company have a Legal Entity Identifier (LEI)?";
1406
+ const iDontKnow = "I don't know";
1387
1407
  const defaultTrans = {
1388
1408
  smartling,
1389
1409
  close,
@@ -1603,6 +1623,7 @@ const defaultTrans = {
1603
1623
  shareholderDocument,
1604
1624
  role,
1605
1625
  selectAllTheRolesThatThisDecisionMakerHolds,
1626
+ selectedSomeRolesBasedOnMyinfo,
1606
1627
  selectTheApplicableRoles,
1607
1628
  back,
1608
1629
  next,
@@ -1801,7 +1822,6 @@ const defaultTrans = {
1801
1822
  bankAccountVerification,
1802
1823
  bankStatementDocument,
1803
1824
  requirements,
1804
- ifDocumentMoreThan12months,
1805
1825
  whyDoINeedToFillInThisInformation,
1806
1826
  reasonForFillingCompanyRegistrationDetails,
1807
1827
  reasonForFillingCompanyAddressDetails,
@@ -1815,7 +1835,6 @@ const defaultTrans = {
1815
1835
  signatoryGuideDescription,
1816
1836
  directorGuideDescription,
1817
1837
  someoneAppointedToManageACompanysBusinessAndAffairs,
1818
- whatIfDocumentIsMoreThan12MonthsOld,
1819
1838
  depositSlip,
1820
1839
  screenshotOfOnlineBankingEnviroment,
1821
1840
  officialEmailOrALetterFromYourBank,
@@ -2729,7 +2748,6 @@ const defaultTrans = {
2729
2748
  differentCountryOfGoverningLaw,
2730
2749
  countryOfGoverningLaw,
2731
2750
  nationalInsuranceNumber,
2732
- detailsForCapital,
2733
2751
  parentCompany,
2734
2752
  ultimateParentCompany,
2735
2753
  numberOfEmployees,
@@ -2739,7 +2757,29 @@ const defaultTrans = {
2739
2757
  businessStructure,
2740
2758
  selectOne,
2741
2759
  industryAndNaceCode,
2742
- youMustXYearsOldToContinue
2760
+ youMustXYearsOldToContinue,
2761
+ doesTheCompanyEarnMoreThanHalf,
2762
+ doesYourCompanyHaveLEI,
2763
+ anLEIIsAUniqueCode,
2764
+ lookUpYourLEI,
2765
+ legalEntityIdentifier,
2766
+ yourBusinessDetails,
2767
+ progress,
2768
+ ownershipStructure,
2769
+ isCompanyOwnedByAnotherCompany,
2770
+ isParentOwnedByAnotherCompany,
2771
+ thisMeansYouHaveAParentCompany,
2772
+ thisMeansYouHaveAnUltimateParentCompany,
2773
+ additionalInformationIsRequiredForLoan,
2774
+ beforeYourCapitalLoanApplicationCanBeSubmitted,
2775
+ legalName,
2776
+ businessInformation,
2777
+ parentCompanyInformation,
2778
+ inTheLastStepOwnedByAParentCompany,
2779
+ ultimateParentCompanyInformation,
2780
+ inThePreviousStepOwnedByAnUltimateParentCompany,
2781
+ doesThisCompanyHaveLEI,
2782
+ iDontKnow
2743
2783
  };
2744
2784
  const FALLBACK_LOCALE = "en-US";
2745
2785
  const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
@@ -2948,6 +2988,7 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2948
2988
  SettingNames2["HideOnboardingIntroductionSoleProprietor"] = "hideOnboardingIntroductionSoleProprietor";
2949
2989
  SettingNames2["TransferInstrumentLimit"] = "transferInstrumentLimit";
2950
2990
  SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
2991
+ SettingNames2["InstantBankVerification"] = "instantBankVerification";
2951
2992
  return SettingNames2;
2952
2993
  })(SettingNames || {});
2953
2994
  const SettingsContext = createContext(void 0);
@@ -3615,19 +3656,6 @@ function getFormProps(props, innerFormId) {
3615
3656
  shouldValidate: (activeFormId ? activeFormId === innerFormId : true) && props.shouldValidate
3616
3657
  };
3617
3658
  }
3618
- function removeFormLayer(obj, formId) {
3619
- if (!obj) {
3620
- return obj;
3621
- }
3622
- const formIdWithDelimiter = `${formId}.`;
3623
- return Object.entries(obj).reduce((acc, [key, value]) => {
3624
- const newKey = key.startsWith(formIdWithDelimiter) ? key.substring(formIdWithDelimiter.length, key.length) : key;
3625
- return {
3626
- ...acc,
3627
- [newKey]: value
3628
- };
3629
- }, {});
3630
- }
3631
3659
  function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
3632
3660
  const newProps = getFormProps(props, innerFormId);
3633
3661
  if (newProps === null) {
@@ -3640,6 +3668,16 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
3640
3668
  helperText,
3641
3669
  masks
3642
3670
  } = newProps;
3671
+ const {
3672
+ readOnlyFields,
3673
+ requiredFields,
3674
+ optionalFields,
3675
+ obscuredFields,
3676
+ verifyFields,
3677
+ problems,
3678
+ validators: validators2,
3679
+ shouldValidate
3680
+ } = props;
3643
3681
  return {
3644
3682
  placeholders,
3645
3683
  labels: labels2,
@@ -3647,15 +3685,15 @@ function getNestedOuterFormPropsFromOuterFormProps(props, innerFormId) {
3647
3685
  helperText,
3648
3686
  masks,
3649
3687
  // maintain the structure of the special fields
3650
- readOnlyFields: removeFormLayer(props.readOnlyFields, innerFormId),
3651
- requiredFields: removeFormLayer(props.requiredFields, innerFormId),
3652
- optionalFields: removeFormLayer(props.optionalFields, innerFormId),
3653
- obscuredFields: removeFormLayer(props.obscuredFields, innerFormId),
3654
- verifyFields: removeFormLayer(props.verifyFields, innerFormId),
3688
+ readOnlyFields,
3689
+ requiredFields,
3690
+ optionalFields,
3691
+ obscuredFields,
3692
+ verifyFields,
3655
3693
  // the rest we just pass along for now, as they will be eventually be processed by getFormProps
3656
- problems: props.problems,
3657
- validators: props.validators,
3658
- shouldValidate: props.shouldValidate
3694
+ problems,
3695
+ validators: validators2,
3696
+ shouldValidate
3659
3697
  };
3660
3698
  }
3661
3699
  function getFieldProps(props, innerFormFields) {
@@ -4595,12 +4633,10 @@ const Loader = ({
4595
4633
  });
4596
4634
  const Tag = ({
4597
4635
  className,
4598
- isBasic = false,
4636
+ variant = "blue",
4599
4637
  children
4600
4638
  }) => {
4601
- const classNames = cx("adyen-kyc-tag", className, {
4602
- "adyen-kyc-tag--basic": isBasic
4603
- });
4639
+ const classNames = cx("adyen-kyc-tag", className, `adyen-kyc-tag--${variant}`);
4604
4640
  return jsx("span", {
4605
4641
  className: classNames,
4606
4642
  children
@@ -4755,13 +4791,29 @@ const SelectButtonContentMulti = ({
4755
4791
  className: "adyen-kyc-dropdown-selected-items",
4756
4792
  children: active.map((item) => jsx(Tag, {
4757
4793
  className: item.className,
4758
- isBasic: true,
4794
+ variant: "grey",
4759
4795
  children: (item == null ? void 0 : item.selectedOptionName) || (item == null ? void 0 : item.name) || placeholder
4760
4796
  }, item.id))
4761
4797
  }) : jsx("span", {
4762
4798
  className: "adyen-kyc-dropdown-button__text adyen-kyc-dropdown-button__text--placeholder",
4763
4799
  children: placeholder
4764
4800
  });
4801
+ const Typography = ({
4802
+ el = "p",
4803
+ variant = "body",
4804
+ color = "primary",
4805
+ className,
4806
+ children,
4807
+ ...props
4808
+ }) => {
4809
+ const TypographyElement = el;
4810
+ const classNames = cx(className, "adyen-kyc-typography", `adyen-kyc-typography--${color}`, `adyen-kyc-typography--${variant}`);
4811
+ return jsx(TypographyElement, {
4812
+ ...props,
4813
+ className: classNames,
4814
+ children
4815
+ });
4816
+ };
4765
4817
  function Checkbox({
4766
4818
  classNameModifiers = [],
4767
4819
  label,
@@ -4838,10 +4890,14 @@ const SelectListItem = ({
4838
4890
  className: "adyen-kyc-dropdown-element__icon",
4839
4891
  children: item.icon
4840
4892
  }), item.description ? jsxs(Fragment, {
4841
- children: [jsx("span", {
4842
- className: "adyen-kyc-dropdown-element__label adyen-kyc-u-font-weight-semi-bold",
4893
+ children: [jsx(Typography, {
4894
+ el: "span",
4895
+ variant: "body-strongest",
4896
+ className: "adyen-kyc-dropdown-element__label",
4843
4897
  children: item.name
4844
- }), jsx("span", {
4898
+ }), jsx(Typography, {
4899
+ el: "span",
4900
+ color: "secondary",
4845
4901
  className: "adyen-kyc-dropdown-element-description__text",
4846
4902
  children: item.description
4847
4903
  })]
@@ -5821,7 +5877,7 @@ function CompanyNameAndCountry(props) {
5821
5877
  labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
5822
5878
  country: "countryRegionOfEstablishment"
5823
5879
  }),
5824
- readonly: !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
5880
+ readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(props == null ? void 0 : props.disableCountry),
5825
5881
  classNameModifiers: ["country"],
5826
5882
  allowedCountries: mergedProps.isTopLevelEntity ? allowedCountries : void 0,
5827
5883
  handleChangeFor: handleChangeForCountries
@@ -8473,7 +8529,8 @@ function BusinessRegistrationNumber(props) {
8473
8529
  registrationNumberType
8474
8530
  }, defaultFieldMetadata$9);
8475
8531
  const mergedProps = mergeFieldMetadataIntoProps("registrationNumber", metadata, {
8476
- requiredFields: schema
8532
+ requiredFields: schema,
8533
+ readOnlyFields: props.readOnlyFields
8477
8534
  });
8478
8535
  const {
8479
8536
  handleChangeFor,
@@ -11439,7 +11496,7 @@ function isEmptyEntity(legalEntity) {
11439
11496
  const sortedFieldsOnEntity = fieldsOnEntity.toSorted();
11440
11497
  return sortedFieldsOnEntity.every((value, index) => value === sortedMinimumFields[index]);
11441
11498
  }
11442
- const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
11499
+ const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
11443
11500
  const entityTypeToCorrespondingAccountHolderOption = {
11444
11501
  [LegalEntityType.INDIVIDUAL]: "myName",
11445
11502
  [LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
@@ -12521,7 +12578,8 @@ function FieldContainer(props) {
12521
12578
  trimOnBlur,
12522
12579
  hideField,
12523
12580
  maxlength,
12524
- handleChangeFor
12581
+ handleChangeFor,
12582
+ readOnly
12525
12583
  } = props;
12526
12584
  const formUtils = formUtilities(props, i18n);
12527
12585
  const errorMessage = formUtils.getErrorMessage(fieldName, errors, fieldProblems);
@@ -12543,7 +12601,7 @@ function FieldContainer(props) {
12543
12601
  labels: {
12544
12602
  country: formUtils.getLabel(field)
12545
12603
  },
12546
- readonly: formUtils.isReadOnly(field),
12604
+ readonly: readOnly,
12547
12605
  classNameModifiers,
12548
12606
  className: hideField ? "adyen-kyc-u-display-none" : "",
12549
12607
  handleChangeFor
@@ -12562,7 +12620,7 @@ function FieldContainer(props) {
12562
12620
  labels: {
12563
12621
  stateOrProvince: formUtils.getLabel(field)
12564
12622
  },
12565
- readonly: formUtils.isReadOnly(field),
12623
+ readonly: readOnly,
12566
12624
  classNameModifiers,
12567
12625
  selectedCountry: data.country,
12568
12626
  handleChangeFor
@@ -12585,7 +12643,8 @@ function FieldContainer(props) {
12585
12643
  "aria-required": true,
12586
12644
  "aria-label": props == null ? void 0 : props["aria-label"],
12587
12645
  "aria-invalid": !valid[field],
12588
- trimOnBlur
12646
+ trimOnBlur,
12647
+ readonly: readOnly
12589
12648
  })
12590
12649
  });
12591
12650
  }
@@ -13434,7 +13493,7 @@ function RegistrationAddressComponent(props) {
13434
13493
  readOnlyFields: registrationAddressReadOnlyFields,
13435
13494
  obscuredFields: registrationAddressObscuredFields,
13436
13495
  verifyFields: registrationAddressVerifyFields
13437
- } = getFormProps(props, props.id);
13496
+ } = getFormProps(props, registrationAddressFormID);
13438
13497
  const {
13439
13498
  data: formData,
13440
13499
  valid: formValid,
@@ -13632,29 +13691,15 @@ const GuidanceContent$1 = ({
13632
13691
  })
13633
13692
  })]
13634
13693
  })]
13635
- }) : jsxs(Fragment, {
13636
- children: [jsxs("div", {
13637
- className: "adyen-kyc-u-margin-bottom-24",
13638
- children: [jsxs("strong", {
13639
- children: [" ", i18n.get("requirements")]
13640
- }), jsxs(List, {
13641
- className: "adyen-kyc-upload-field__requirements",
13642
- children: [jsx(ListItem, {
13643
- children: i18n.get("documentIssuedByGovernmentAuthority")
13644
- }), jsx(ListItem, {
13645
- children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
13646
- values: {
13647
- numberOfMonths: 12
13648
- }
13649
- })
13650
- })]
13651
- })]
13652
- }), jsx(ContextGuidance, {
13653
- page: "Company registration document",
13654
- titleId: "whatIfDocumentIsMoreThan12MonthsOld",
13655
- contentId: "ifDocumentMoreThan12months",
13656
- title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
13657
- content: i18n.get("ifDocumentMoreThan12months")
13694
+ }) : jsxs("div", {
13695
+ className: "adyen-kyc-u-margin-bottom-24",
13696
+ children: [jsxs("strong", {
13697
+ children: [" ", i18n.get("documentRequirements")]
13698
+ }), jsx(List, {
13699
+ className: "adyen-kyc-upload-field__requirements",
13700
+ children: jsx(ListItem, {
13701
+ children: i18n.get("documentIssuedByGovernmentAuthority")
13702
+ })
13658
13703
  })]
13659
13704
  })
13660
13705
  });
@@ -13769,9 +13814,9 @@ const GuidanceContent = ({
13769
13814
  })]
13770
13815
  }) : jsxs("div", {
13771
13816
  className: "adyen-kyc-u-margin-bottom-24",
13772
- children: [jsxs("div", {
13817
+ children: [jsx("div", {
13773
13818
  className: "adyen-kyc-upload-field__subtitle",
13774
- children: [" ", i18n.get("requirements")]
13819
+ children: i18n.get("documentRequirements")
13775
13820
  }), jsxs(List, {
13776
13821
  className: "adyen-kyc-upload-field__requirements",
13777
13822
  children: [jsx(ListItem, {
@@ -14430,7 +14475,7 @@ const mandatoryApiFields = {
14430
14475
  ORGANIZATION: ["companyNameAndCountry.legalCompanyName", "companyNameAndCountry.country"],
14431
14476
  SOLE_PROPRIETORSHIP: ["solePropNameAndCountry.legalCompanyName", "solePropNameAndCountry.country"],
14432
14477
  TRUST: ["trustRegistrationDetails.legalName", "trustRegistrationDetails.country"],
14433
- HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.numberOfEmployees", "ultimateParentCompany.numberOfEmployees"]
14478
+ HIGH_EXPOSURE: ["company.numberOfEmployees", "parentCompany.parentNumberOfEmployees", "ultimateParentCompany.ultimateParentNumberOfEmployees"]
14434
14479
  };
14435
14480
  const individualObscuredFields = ["personalDetails.idNumber", "personalDetails.idNumberExempt"];
14436
14481
  const individualBaseMapping = {
@@ -16958,60 +17003,60 @@ const roleMetadata = {
16958
17003
  [DecisionMakerType.CONTROLLING_PERSON]: {
16959
17004
  name: "controllingPerson",
16960
17005
  description: "controllingPersonDescription",
16961
- className: "adyen-kyc-tag--teal"
17006
+ variant: "teal"
16962
17007
  },
16963
17008
  [DecisionMakerType.OWNER]: {
16964
17009
  name: "owner",
16965
17010
  description: "ownerDescription",
16966
- className: "adyen-kyc-tag--purple"
17011
+ variant: "red"
16967
17012
  },
16968
17013
  [DecisionMakerType.SIGNATORY]: {
16969
17014
  name: "signatory",
16970
17015
  description: "signatoryDescription",
16971
- className: "adyen-kyc-tag--light-blue"
17016
+ variant: "green"
16972
17017
  },
16973
17018
  [DecisionMakerType.DIRECTOR]: {
16974
17019
  name: "director",
16975
17020
  description: "directorDescription",
16976
- className: "adyen-kyc-tag--orange"
17021
+ variant: "orange"
16977
17022
  },
16978
17023
  [TrustMemberTypes.DEFINED_BENEFICIARY]: {
16979
17024
  name: "definedBeneficiary",
16980
17025
  description: "definedBeneficiaryDescription",
16981
- className: "adyen-kyc-tag--orange"
17026
+ variant: "orange"
16982
17027
  },
16983
17028
  [TrustMemberTypes.UNDEFINED_BENEFICIARY]: {
16984
17029
  name: "undefinedBeneficiary",
16985
17030
  description: "undefinedBeneficiaryDescription",
16986
- className: "adyen-kyc-tag--orange"
17031
+ variant: "orange"
16987
17032
  },
16988
17033
  [TrustMemberTypes.PROTECTOR]: {
16989
17034
  name: "protector",
16990
17035
  description: "personAppointmentUnderTrustInstrument",
16991
- className: "adyen-kyc-tag--orange"
17036
+ variant: "orange"
16992
17037
  },
16993
17038
  [TrustMemberTypes.TRUSTEE]: {
16994
17039
  name: "trustee",
16995
17040
  description: "legalOwnerOfProperty",
16996
- className: "adyen-kyc-tag--light-blue"
17041
+ variant: "green"
16997
17042
  },
16998
17043
  [TrustMemberTypes.SETTLOR]: {
16999
17044
  name: "settlor",
17000
17045
  description: "entityEstablishingTrust",
17001
- className: "adyen-kyc-tag--orange"
17046
+ variant: "orange"
17002
17047
  },
17003
17048
  [TrustMemberGuidanceLabel.BENEFICIARY]: {
17004
17049
  name: TrustMemberGuidanceLabel.BENEFICIARY,
17005
- className: "adyen-kyc-tag--orange"
17050
+ variant: "orange"
17006
17051
  },
17007
17052
  [TrustMemberGuidanceLabel.TRUSTEE]: {
17008
17053
  name: TrustMemberGuidanceLabel.TRUSTEE,
17009
- className: "adyen-kyc-tag--light-blue"
17054
+ variant: "green"
17010
17055
  }
17011
17056
  };
17012
- const getRoleTagColor = (role2) => {
17057
+ const getRoleTagVariant = (role2) => {
17013
17058
  var _a;
17014
- return ((_a = roleMetadata[role2]) == null ? void 0 : _a.className) ?? "adyen-kyc-tag--blue";
17059
+ return ((_a = roleMetadata[role2]) == null ? void 0 : _a.variant) ?? "blue";
17015
17060
  };
17016
17061
  const getRoleName = (role2) => {
17017
17062
  var _a;
@@ -17023,13 +17068,13 @@ const makeSelectItemForRole = (role2, i18n) => {
17023
17068
  const {
17024
17069
  name,
17025
17070
  description: description2,
17026
- className
17071
+ variant
17027
17072
  } = metadata;
17028
17073
  return {
17029
17074
  id: role2,
17030
17075
  name: i18n.get(name),
17031
17076
  description: description2 ? i18n.get(description2) : void 0,
17032
- className
17077
+ className: `adyen-kyc-tag--${variant}`
17033
17078
  };
17034
17079
  };
17035
17080
  const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event) => {
@@ -22087,7 +22132,7 @@ const trustRegistrationDetailsValidations = {
22087
22132
  },
22088
22133
  legalName: {
22089
22134
  modes: ["blur"],
22090
- validate: (legalName) => !!legalName,
22135
+ validate: (legalName2) => !!legalName2,
22091
22136
  errorMessage: "fieldIsRequired"
22092
22137
  },
22093
22138
  objectOfTrust: {
@@ -23008,55 +23053,6 @@ function ErrorPanel({
23008
23053
  })]
23009
23054
  });
23010
23055
  }
23011
- const headingTypes = {
23012
- 1: ({
23013
- children,
23014
- className
23015
- }) => jsx("h1", {
23016
- className,
23017
- children
23018
- }),
23019
- 2: ({
23020
- children,
23021
- className
23022
- }) => jsx("h2", {
23023
- className,
23024
- children
23025
- }),
23026
- 3: ({
23027
- children,
23028
- className
23029
- }) => jsx("h3", {
23030
- className,
23031
- children
23032
- }),
23033
- 4: ({
23034
- children,
23035
- className
23036
- }) => jsx("h4", {
23037
- className,
23038
- children
23039
- }),
23040
- sub: ({
23041
- children,
23042
- className
23043
- }) => jsx("div", {
23044
- className,
23045
- children
23046
- })
23047
- };
23048
- function Heading({
23049
- className,
23050
- level,
23051
- children
23052
- }) {
23053
- const HeadingElement = headingTypes[level] || headingTypes[1];
23054
- const classNames = cx("adyen-kyc-heading", `adyen-kyc-heading--${level}`, className);
23055
- return jsx(HeadingElement, {
23056
- className: classNames,
23057
- children
23058
- });
23059
- }
23060
23056
  const summaryStep = {
23061
23057
  formId: "summary",
23062
23058
  formName: "summary"
@@ -23098,8 +23094,9 @@ function Summary({
23098
23094
  }, i18n);
23099
23095
  const summarySectionHeader = (formName, formId) => jsxs("header", {
23100
23096
  className: "adyen-kyc-summary-section__header",
23101
- children: [jsx(Heading, {
23102
- level: 4,
23097
+ children: [jsx(Typography, {
23098
+ el: "h4",
23099
+ variant: "title",
23103
23100
  className: "adyen-kyc-summary-section__heading",
23104
23101
  children: formName
23105
23102
  }), jsx(Button, {
@@ -23183,9 +23180,9 @@ function Summary({
23183
23180
  return jsxs("div", {
23184
23181
  role: "region",
23185
23182
  className: "adyen-kyc-summary",
23186
- children: [showFormHeader && jsx("h2", {
23187
- className: "adyen-kyc-summary__heading",
23188
- children: i18n.get("summary")
23183
+ children: [showFormHeader && jsx(FormHeader, {
23184
+ heading: i18n.get("summary"),
23185
+ classNames: "adyen-kyc-summary__heading"
23189
23186
  }), jsx(ErrorPanel, {
23190
23187
  validationErrors: allValidationErrors,
23191
23188
  verificationErrors: allVerificationErrors,
@@ -26811,6 +26808,42 @@ function BusinessDetailsDropinComponent({
26811
26808
  })
26812
26809
  });
26813
26810
  }
26811
+ const getTrustedFieldsByProvider = (provider, trustedFields2) => trustedFields2.find((tf) => tf.provider === provider);
26812
+ const parseTrustedFieldsIntoReadOnlyFields = (trustedFields2, mapping) => {
26813
+ const formFieldsMapped = [];
26814
+ trustedFields2.fields.forEach((field) => {
26815
+ for (const [key, value] of Object.entries(mapping)) {
26816
+ if (value === field) {
26817
+ formFieldsMapped.push(key);
26818
+ }
26819
+ }
26820
+ });
26821
+ const readOnlyFields = {};
26822
+ formFieldsMapped.forEach((field) => {
26823
+ const tokenizedField = field.split(".");
26824
+ const formField = tokenizedField.pop();
26825
+ const formId = tokenizedField.pop();
26826
+ if (formField && formId) {
26827
+ if (formId in readOnlyFields) {
26828
+ readOnlyFields[formId].push(formField);
26829
+ } else {
26830
+ readOnlyFields[formId] = [formField];
26831
+ }
26832
+ }
26833
+ });
26834
+ return readOnlyFields;
26835
+ };
26836
+ const trustedFields = ({
26837
+ fields,
26838
+ trustedFieldsProvider,
26839
+ apiMapping
26840
+ }) => {
26841
+ if (!fields || !trustedFieldsProvider || !apiMapping) {
26842
+ return {};
26843
+ }
26844
+ const trustedFieldsOfProvider = getTrustedFieldsByProvider(trustedFieldsProvider, fields);
26845
+ return trustedFieldsOfProvider ? parseTrustedFieldsIntoReadOnlyFields(trustedFieldsOfProvider, apiMapping) : {};
26846
+ };
26814
26847
  const parseConfiguration$6 = ({
26815
26848
  country: country2,
26816
26849
  matchingScenario
@@ -26860,7 +26893,8 @@ function CompanyDropinComponent({
26860
26893
  handleUpdateLegalEntity,
26861
26894
  handleHomeClick,
26862
26895
  onTypeSwitch,
26863
- onChange
26896
+ onChange,
26897
+ trustedFieldsProvider
26864
26898
  }) {
26865
26899
  var _a, _b;
26866
26900
  const {
@@ -26924,7 +26958,15 @@ function CompanyDropinComponent({
26924
26958
  isSettingEnabled,
26925
26959
  isExperimentEnabled
26926
26960
  }), [country2, data, taskType, requiredFields, isSettingEnabled]);
26927
- const derivedProps = useMemo(() => 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), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
26961
+ const legalEntityTrustedFields = legalEntityResponse == null ? void 0 : legalEntityResponse.trustedFields;
26962
+ const trustedFieldsOfProvider = useMemo(() => trustedFields({
26963
+ fields: legalEntityTrustedFields,
26964
+ trustedFieldsProvider,
26965
+ apiMapping: companyComponentsKeyMapping
26966
+ }), [legalEntityTrustedFields, trustedFieldsProvider]);
26967
+ const derivedProps = useMemo(() => ({
26968
+ ...getPropsFromConfigurations(fieldConfigurations, companyForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules)
26969
+ }), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
26928
26970
  const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
26929
26971
  const {
26930
26972
  state: {
@@ -27187,7 +27229,8 @@ function CompanyDropinComponent({
27187
27229
  onCountryChange: setCountry,
27188
27230
  ref: formRef,
27189
27231
  shouldValidate,
27190
- isTopLevelEntity: taskType === TaskTypes.COMPANY
27232
+ isTopLevelEntity: taskType === TaskTypes.COMPANY,
27233
+ readOnlyFields: trustedFieldsOfProvider
27191
27234
  })
27192
27235
  });
27193
27236
  }
@@ -29260,6 +29303,11 @@ function useSalesChannelsSettings() {
29260
29303
  return settings;
29261
29304
  }, [isSettingEnabled]);
29262
29305
  }
29306
+ var TrustedFieldsProvider = /* @__PURE__ */ ((TrustedFieldsProvider2) => {
29307
+ TrustedFieldsProvider2["SINGPASS"] = "singpass";
29308
+ TrustedFieldsProvider2["KOMPANY"] = "kompany";
29309
+ return TrustedFieldsProvider2;
29310
+ })(TrustedFieldsProvider || {});
29263
29311
  const downloadFile = async (base64, filename) => {
29264
29312
  saveBlobAsFile(base64ToBlob(base64), filename);
29265
29313
  };
@@ -29834,11 +29882,13 @@ const BusinessTypeSelection = ({
29834
29882
  className: "adyen-kyc-business-type-selection",
29835
29883
  children: [jsxs("header", {
29836
29884
  className: "adyen-kyc-u-margin-bottom-32",
29837
- children: [jsx(Heading, {
29838
- level: 2,
29885
+ children: [jsx(Typography, {
29886
+ el: "h2",
29887
+ variant: "title-m",
29839
29888
  children: i18n.get(businessTypeSelectionStepTitles[currentStep])
29840
- }), currentStep === 3 && jsx(Heading, {
29841
- level: "sub",
29889
+ }), currentStep === 3 && jsx(Typography, {
29890
+ el: "p",
29891
+ variant: "title",
29842
29892
  children: i18n.get("someInformationWillNotBeSaved")
29843
29893
  })]
29844
29894
  }), currentStep === 0 && jsx(Field, {
@@ -30199,11 +30249,13 @@ function Card({
30199
30249
  onKeyDown,
30200
30250
  children: [title && jsxs("header", {
30201
30251
  className: "adyen-kyc-card__header",
30202
- children: [jsx(Heading, {
30203
- level: 4,
30252
+ children: [jsx(Typography, {
30253
+ el: "h4",
30254
+ variant: "title",
30204
30255
  children: title
30205
- }), subTitle && jsx(Heading, {
30206
- level: "sub",
30256
+ }), subTitle && jsx(Typography, {
30257
+ el: "p",
30258
+ variant: "body",
30207
30259
  children: subTitle
30208
30260
  })]
30209
30261
  }), jsx("div", {
@@ -30416,8 +30468,8 @@ const EntityAssociation = ({
30416
30468
  })]
30417
30469
  }), jsx("div", {
30418
30470
  children: types.map((type) => jsx(Tag, {
30419
- className: `adyen-kyc-entity-association__tag ${getRoleTagColor(type)}`,
30420
- isBasic: true,
30471
+ className: "adyen-kyc-entity-association__tag",
30472
+ variant: getRoleTagVariant(type),
30421
30473
  children: i18n.get(getRoleName(type))
30422
30474
  }, type))
30423
30475
  }), status === TaskStatus.ERROR && jsx(VerificationErrorAlert, {
@@ -30505,8 +30557,8 @@ const EntityGuidanceStatus = ({
30505
30557
  children: [jsx(EntityStatusIcon, {
30506
30558
  status
30507
30559
  }), jsx(Tag, {
30508
- className: `adyen-kyc-entity-status__tag ${getRoleTagColor(entityLabel)}`,
30509
- isBasic: true,
30560
+ className: "adyen-kyc-entity-status__tag",
30561
+ variant: getRoleTagVariant(entityLabel),
30510
30562
  children: i18n.get(getRoleName(entityLabel))
30511
30563
  }, entityLabel), jsx("span", {
30512
30564
  className: "adyen-kyc-entity-status--text",
@@ -31253,8 +31305,9 @@ const SingpassSelection = (props) => {
31253
31305
  className: "adyen-kyc-singpass-selection",
31254
31306
  children: [jsx("header", {
31255
31307
  className: "adyen-kyc-u-margin-bottom-32",
31256
- children: jsx(Heading, {
31257
- level: 2,
31308
+ children: jsx(Typography, {
31309
+ el: "h2",
31310
+ variant: "title-m",
31258
31311
  children: i18n.get("howWouldYouLikeToSetUpYourAccount")
31259
31312
  })
31260
31313
  }), jsx("form", {
@@ -31506,8 +31559,9 @@ const TaskListGroup = ({
31506
31559
  className: "adyen-task-list-group",
31507
31560
  children: [title && jsx("header", {
31508
31561
  className: "adyen-task-list-group__header",
31509
- children: jsx(Heading, {
31510
- level: 4,
31562
+ children: jsx(Typography, {
31563
+ el: "h4",
31564
+ variant: "title",
31511
31565
  children: title
31512
31566
  })
31513
31567
  }), jsx("div", {
@@ -31629,13 +31683,17 @@ function TaskListComponent({
31629
31683
  })
31630
31684
  }), isEnableNewEntryFlowEnabled && jsxs("header", {
31631
31685
  className: "adyen-task-list__heading",
31632
- children: [jsx(Heading, {
31633
- level: 1,
31686
+ children: [jsx(Typography, {
31687
+ el: "h1",
31688
+ variant: "title-l",
31634
31689
  children: i18n.get("setUpYourAccount")
31635
- }), jsxs(Heading, {
31636
- level: "sub",
31637
- children: [jsx("span", {
31638
- className: "adyen-kyc-u-font-weight-semi-bold",
31690
+ }), jsxs(Typography, {
31691
+ el: "p",
31692
+ variant: "title",
31693
+ className: "adyen-task-list__description",
31694
+ children: [jsx(Typography, {
31695
+ el: "span",
31696
+ variant: "body-strongest",
31639
31697
  children: i18n.get("yourBusinessSetup", {
31640
31698
  values: {
31641
31699
  businessSetup: i18n.get(businessSetup)
@@ -31646,7 +31704,6 @@ function TaskListComponent({
31646
31704
  icon: "edit",
31647
31705
  tertiary: true,
31648
31706
  onClick: onEditBusinessSetupClick,
31649
- className: "adyen-kyc-u-margin-left-4",
31650
31707
  type: "button"
31651
31708
  })]
31652
31709
  })]
@@ -32824,7 +32881,7 @@ function PayoutDetailsDropinComponent({
32824
32881
  const [documents2, setDocuments] = useState();
32825
32882
  const fallbackCurrency = (_a = currencyByCountry[defaultPayoutCountry]) == null ? void 0 : _a[0];
32826
32883
  const accountHolderName = accountHolder2 || getLegalEntityNameBasedOnType(legalEntityResponse);
32827
- const instantVerificationEnabled = Boolean(!transferInstrument && handleGetBankVerificationVendors);
32884
+ const instantVerificationEnabled = Boolean(!transferInstrument && handleGetBankVerificationVendors && isSettingEnabled("instantBankVerification"));
32828
32885
  const taskType = propTaskType ?? TaskTypes.PAYOUT;
32829
32886
  const [trustedTransferInstrumentId, setTrustedTransferInstrumentId] = useState();
32830
32887
  const prefilledData = {
@@ -35967,7 +36024,8 @@ function DropinComposerComponent({
35967
36024
  handleAddressSearch: args == null ? void 0 : args.handleAddressSearch,
35968
36025
  handleFindAddress: args == null ? void 0 : args.handleFindAddress,
35969
36026
  onTypeSwitch: navigateToTypeSwitcher,
35970
- isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
36027
+ isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION,
36028
+ trustedFieldsProvider: eligibleForSingpass && TrustedFieldsProvider.SINGPASS
35971
36029
  });
35972
36030
  case TaskTypes.COMPANY_SEARCH:
35973
36031
  return jsx(CompanySearchDropinComponent, {
@@ -36317,7 +36375,7 @@ const getLegalEntity = async (context, legalEntityId) => {
36317
36375
  loadingContext,
36318
36376
  legalEntityId: rootLegalEntityId
36319
36377
  } = context;
36320
- const path = legalEntityId !== rootLegalEntityId ? `${rootLegalEntityId}/${legalEntityId}` : `${rootLegalEntityId}`;
36378
+ const path = legalEntityId !== rootLegalEntityId ? `${rootLegalEntityId}/child/${legalEntityId}` : `${rootLegalEntityId}`;
36321
36379
  return httpGet({
36322
36380
  loadingContext,
36323
36381
  errorLevel: "warn",
@@ -36426,17 +36484,20 @@ const updateLegalEntity = async (context, legalEntity, legalEntityId) => {
36426
36484
  loadingContext,
36427
36485
  legalEntityId: rootLegalEntityId
36428
36486
  } = context;
36429
- const path = legalEntityId !== rootLegalEntityId ? `${rootLegalEntityId}/${legalEntityId}` : `${rootLegalEntityId}`;
36487
+ const patchLegalEntity = {
36488
+ ...legalEntity,
36489
+ id: legalEntityId
36490
+ };
36430
36491
  return httpPost({
36431
36492
  loadingContext,
36432
36493
  errorLevel: "warn",
36433
36494
  errorMessage: `LegalEntity update failed`,
36434
- path,
36495
+ path: `${rootLegalEntityId}`,
36435
36496
  authentication: "jwt",
36436
36497
  headers: {
36437
36498
  "Content-Type": "application/json"
36438
36499
  }
36439
- }, legalEntity);
36500
+ }, patchLegalEntity);
36440
36501
  };
36441
36502
  const updateTransferInstrument = async (context, transferInstrument, transferInstrumentId) => {
36442
36503
  const {
@@ -37011,10 +37072,11 @@ function AddTransferInstrument({
37011
37072
  i18n
37012
37073
  } = useI18nContext();
37013
37074
  return jsxs(Fragment, {
37014
- children: [jsx(Heading, {
37015
- level: 1,
37075
+ children: [jsx(Typography, {
37076
+ el: "h1",
37077
+ variant: "title-l",
37016
37078
  children: i18n.get("bankDetails")
37017
- }), jsx("p", {
37079
+ }), jsx(Typography, {
37018
37080
  children: i18n.get("addMissingBankDetails")
37019
37081
  }), jsx(Button, {
37020
37082
  label: i18n.get("addBankDetails"),
@@ -37112,8 +37174,9 @@ function ManageTransferInstrumentOverviewItem({
37112
37174
  className: "adyen-kyc-manage-ti-overview-item__header",
37113
37175
  children: [jsxs("div", {
37114
37176
  className: "adyen-kyc-manage-ti-overview-item__title",
37115
- children: [status, jsx(Heading, {
37116
- level: 2,
37177
+ children: [status, jsx(Typography, {
37178
+ el: "h2",
37179
+ variant: "title-m",
37117
37180
  children: transferInstrumentReference.transferInstrument.accountIdentifier
37118
37181
  })]
37119
37182
  }), jsx("p", {
@@ -37352,6 +37415,30 @@ function OnboardingDropinComponent({
37352
37415
  handleGetBankVerificationVendors: (country2) => getBankVerificationVendor2(country2, openBankingPartnerConfigId)
37353
37416
  });
37354
37417
  }
37418
+ var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
37419
+ HighExposurePagesEnums2["COMPANY_PAGE"] = "COMPANY_PAGE";
37420
+ HighExposurePagesEnums2["PARENT_COMPANY_PAGE"] = "PARENT_COMPANY_PAGE";
37421
+ HighExposurePagesEnums2["ULTIMATE_PARENT_COMPANY_PAGE"] = "ULTIMATE_PARENT_COMPANY_PAGE";
37422
+ return HighExposurePagesEnums2;
37423
+ })(HighExposurePagesEnums || {});
37424
+ const highExposureRadioItems = [{
37425
+ id: "Yes",
37426
+ name: "yes"
37427
+ }, {
37428
+ id: "No",
37429
+ name: "no"
37430
+ }];
37431
+ const highExposureParentRadioItems = [...highExposureRadioItems, {
37432
+ id: "I don't know",
37433
+ name: "iDontKnow"
37434
+ }];
37435
+ const validateLegalEntityIdentifier = (legalEntityIdentifier2, doesYourCompanyHaveLEI2, isDisabled) => {
37436
+ if (isDisabled) return true;
37437
+ const isRequired = doesYourCompanyHaveLEI2 === "Yes";
37438
+ const isValidLength = legalEntityIdentifier2 ? legalEntityIdentifier2.length === 20 : false;
37439
+ const hasLettersAndNumbers = legalEntityIdentifier2 ? /[a-zA-Z]/.test(legalEntityIdentifier2) && /[0-9]/.test(legalEntityIdentifier2) : false;
37440
+ return !isRequired || !isEmpty(legalEntityIdentifier2) && isValidLength && hasLettersAndNumbers;
37441
+ };
37355
37442
  const highExposureCompanyDetailsValidations = {
37356
37443
  country: {
37357
37444
  modes: ["blur"],
@@ -37372,16 +37459,126 @@ const highExposureCompanyDetailsValidations = {
37372
37459
  modes: ["blur"],
37373
37460
  validate: (naceCode) => !isEmpty(naceCode),
37374
37461
  errorMessage: "fieldIsRequired"
37462
+ },
37463
+ doesTheCompanyEarnMoreThanHalf: {
37464
+ modes: ["blur"],
37465
+ validate: (doesTheCompanyEarnMoreThanHalf2) => !isEmpty(doesTheCompanyEarnMoreThanHalf2),
37466
+ errorMessage: "fieldIsRequired"
37467
+ },
37468
+ doesYourCompanyHaveLEI: {
37469
+ modes: ["blur"],
37470
+ validate: (doesYourCompanyHaveLEI2) => !isEmpty(doesYourCompanyHaveLEI2),
37471
+ errorMessage: "fieldIsRequired"
37472
+ },
37473
+ legalEntityIdentifier: {
37474
+ modes: ["blur"],
37475
+ validate: (legalEntityIdentifier2, context) => {
37476
+ var _a, _b;
37477
+ return validateLegalEntityIdentifier(legalEntityIdentifier2, (_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.doesTheCompanyEarnMoreThanHalf);
37478
+ },
37479
+ errorMessage: "fieldIsRequired"
37480
+ },
37481
+ isCompanyOwnedByAnotherCompany: {
37482
+ modes: ["blur"],
37483
+ validate: (isCompanyOwnedByAnotherCompany2) => !isEmpty(isCompanyOwnedByAnotherCompany2),
37484
+ errorMessage: "fieldIsRequired"
37485
+ },
37486
+ isParentOwnedByAnotherCompany: {
37487
+ modes: ["blur"],
37488
+ validate: (isParentOwnedByAnotherCompany2, context) => {
37489
+ var _a, _b;
37490
+ return ((_b = (_a = context == null ? void 0 : context.state) == null ? void 0 : _a.data) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) ? !isEmpty(isParentOwnedByAnotherCompany2) : true;
37491
+ },
37492
+ errorMessage: "fieldIsRequired"
37493
+ }
37494
+ };
37495
+ const highExposureParentCompanyDetailsValidations = {
37496
+ parentLegalName: {
37497
+ modes: ["blur"],
37498
+ validate: (parentLegalName) => !isEmpty(parentLegalName),
37499
+ errorMessage: "fieldIsRequired"
37500
+ },
37501
+ parentNumberOfEmployees: {
37502
+ modes: ["blur"],
37503
+ validate: (parentNumberOfEmployees) => !isEmpty(parentNumberOfEmployees),
37504
+ errorMessage: "fieldIsRequired"
37505
+ },
37506
+ parentLegalForm: {
37507
+ modes: ["blur"],
37508
+ validate: (parentLegalForm) => !isEmpty(parentLegalForm),
37509
+ errorMessage: "fieldIsRequired"
37510
+ },
37511
+ parentNaceCode: {
37512
+ modes: ["blur"],
37513
+ validate: (parentNaceCode) => !isEmpty(parentNaceCode),
37514
+ errorMessage: "fieldIsRequired"
37515
+ },
37516
+ doesTheParentCompanyEarnMoreThanHalf: {
37517
+ modes: ["blur"],
37518
+ validate: (doesTheParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheParentCompanyEarnMoreThanHalf),
37519
+ errorMessage: "fieldIsRequired"
37520
+ },
37521
+ doesYourParentCompanyHaveLEI: {
37522
+ modes: ["blur"],
37523
+ validate: (doesYourParentCompanyHaveLEI) => !isEmpty(doesYourParentCompanyHaveLEI),
37524
+ errorMessage: "fieldIsRequired"
37525
+ },
37526
+ parentLegalEntityIdentifier: {
37527
+ modes: ["blur"],
37528
+ validate: (parentLegalEntityIdentifier, context) => {
37529
+ var _a, _b, _c, _d;
37530
+ 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));
37531
+ },
37532
+ errorMessage: "fieldIsRequired"
37533
+ }
37534
+ };
37535
+ const highExposureUltimateParentCompanyDetailsValidations = {
37536
+ ultimateParentLegalName: {
37537
+ modes: ["blur"],
37538
+ validate: (ultimateParentLegalName) => !isEmpty(ultimateParentLegalName),
37539
+ errorMessage: "fieldIsRequired"
37540
+ },
37541
+ ultimateParentNumberOfEmployees: {
37542
+ modes: ["blur"],
37543
+ validate: (ultimateParentNumberOfEmployees) => !isEmpty(ultimateParentNumberOfEmployees),
37544
+ errorMessage: "fieldIsRequired"
37545
+ },
37546
+ ultimateParentLegalForm: {
37547
+ modes: ["blur"],
37548
+ validate: (ultimateParentLegalForm) => !isEmpty(ultimateParentLegalForm),
37549
+ errorMessage: "fieldIsRequired"
37550
+ },
37551
+ ultimateParentNaceCode: {
37552
+ modes: ["blur"],
37553
+ validate: (ultimateParentNaceCode) => !isEmpty(ultimateParentNaceCode),
37554
+ errorMessage: "fieldIsRequired"
37555
+ },
37556
+ doesTheUltimateParentCompanyEarnMoreThanHalf: {
37557
+ modes: ["blur"],
37558
+ validate: (doesTheUltimateParentCompanyEarnMoreThanHalf) => !isEmpty(doesTheUltimateParentCompanyEarnMoreThanHalf),
37559
+ errorMessage: "fieldIsRequired"
37560
+ },
37561
+ doesYourUltimateParentCompanyHaveLEI: {
37562
+ modes: ["blur"],
37563
+ validate: (doesYourUltimateParentCompanyHaveLEI) => !isEmpty(doesYourUltimateParentCompanyHaveLEI),
37564
+ errorMessage: "fieldIsRequired"
37565
+ },
37566
+ ultimateParentLegalEntityIdentifier: {
37567
+ modes: ["blur"],
37568
+ validate: (ultimateParentLegalEntityIdentifier, context) => {
37569
+ var _a, _b, _c, _d;
37570
+ 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));
37571
+ },
37572
+ errorMessage: "fieldIsRequired"
37375
37573
  }
37376
37574
  };
37377
- const LEGAL_FORM_FIELD = ["legalForm"];
37378
37575
  const logger$8 = createLogger("LegalFormField");
37379
37576
  function LegalFormField({
37380
37577
  name = "legalForm",
37381
37578
  data,
37382
37579
  valid,
37383
- errors,
37384
- labels: labels2,
37580
+ errorMessage,
37581
+ label,
37385
37582
  readonly,
37386
37583
  handleChangeFor,
37387
37584
  helperText,
@@ -37408,8 +37605,8 @@ function LegalFormField({
37408
37605
  }, [countryCode]);
37409
37606
  return jsx(Field, {
37410
37607
  name,
37411
- label: (labels2 == null ? void 0 : labels2.legalForm) || i18n.get("businessStructure"),
37412
- errorMessage: errors.legalForm,
37608
+ label: label || i18n.get("businessStructure"),
37609
+ errorMessage,
37413
37610
  classNameModifiers,
37414
37611
  isValid: valid.legalForm,
37415
37612
  helper: helperText == null ? void 0 : helperText.legalForm,
@@ -37424,14 +37621,13 @@ function LegalFormField({
37424
37621
  })
37425
37622
  });
37426
37623
  }
37427
- const NACE_CODE_FIELD = ["naceCode"];
37428
37624
  const logger$7 = createLogger("NaceCodeField");
37429
37625
  function NaceCodeField({
37430
37626
  name = "naceCode",
37431
37627
  data,
37432
37628
  valid,
37433
- errors,
37434
- labels: labels2,
37629
+ errorMessage,
37630
+ label,
37435
37631
  readonly,
37436
37632
  handleChangeFor,
37437
37633
  helperText,
@@ -37453,8 +37649,8 @@ function NaceCodeField({
37453
37649
  }, []);
37454
37650
  return jsx(Field, {
37455
37651
  name,
37456
- label: (labels2 == null ? void 0 : labels2.naceCode) || i18n.get("industryAndNaceCode"),
37457
- errorMessage: errors.naceCode,
37652
+ label: label || i18n.get("industryAndNaceCode"),
37653
+ errorMessage,
37458
37654
  classNameModifiers,
37459
37655
  isValid: valid.naceCode,
37460
37656
  helper: helperText == null ? void 0 : helperText.naceCode,
@@ -37476,58 +37672,238 @@ function HighExposureBusinessInformation({
37476
37672
  errors,
37477
37673
  fieldProblems,
37478
37674
  handleChangeFor,
37479
- country: country2
37675
+ country: country2,
37676
+ fieldMapping,
37677
+ targetPage,
37678
+ sectionHeading
37480
37679
  }) {
37680
+ const {
37681
+ i18n
37682
+ } = useI18nContext();
37683
+ const getFieldName = (fieldKey) => fieldMapping[fieldKey] ?? fieldKey;
37684
+ const getFieldData = (fieldKey) => {
37685
+ const fieldData = data[getFieldName(fieldKey)];
37686
+ return fieldData ? fieldData.toString() : void 0;
37687
+ };
37688
+ const isMainCompany = targetPage === HighExposurePagesEnums.COMPANY_PAGE;
37481
37689
  return jsxs(Fragment, {
37482
- children: [jsx(LegalFormField, {
37690
+ children: [jsx(Typography, {
37691
+ el: "h3",
37692
+ variant: "title",
37693
+ children: i18n.get(sectionHeading || "yourBusinessDetails")
37694
+ }), !isMainCompany && jsx(Field, {
37695
+ name: getFieldName("legalName"),
37696
+ label: formUtils.getLabel(getFieldName("legalName"), "legalName"),
37697
+ classNameModifiers: ["legalName"],
37698
+ errorMessage: formUtils.getErrorMessage(getFieldName("legalName"), errors, fieldProblems),
37699
+ isValid: valid[getFieldName("legalName")],
37700
+ children: (childProps) => jsx(InputText, {
37701
+ ...childProps,
37702
+ name: getFieldName("legalName"),
37703
+ value: getFieldData("legalName"),
37704
+ readonly: false,
37705
+ classNameModifiers: ["legalName"],
37706
+ onInput: handleChangeFor(getFieldName("legalName"), "input"),
37707
+ onBlur: handleChangeFor(getFieldName("legalName"), "blur"),
37708
+ "aria-required": true,
37709
+ "aria-label": formUtils.getLabel(getFieldName("legalName")),
37710
+ "aria-invalid": !valid[getFieldName("legalName")]
37711
+ })
37712
+ }), jsx(LegalFormField, {
37713
+ name: getFieldName("legalForm"),
37483
37714
  countryCode: country2,
37484
37715
  data: {
37485
- legalForm: data.legalForm
37716
+ legalForm: getFieldData("legalForm")
37486
37717
  },
37487
37718
  valid: {
37488
- legalForm: valid.legalForm
37719
+ legalForm: valid[getFieldName("legalForm")]
37489
37720
  },
37490
- errors: formUtils.getFieldErrors(errors, fieldProblems, LEGAL_FORM_FIELD),
37491
- handleChangeFor: () => handleChangeFor("legalForm", "blur"),
37721
+ errorMessage: formUtils.getErrorMessage(getFieldName("legalForm"), errors, fieldProblems),
37722
+ handleChangeFor: () => handleChangeFor(getFieldName("legalForm"), "blur"),
37492
37723
  readonly: false,
37493
- labels: formUtils.getFieldLabels(LEGAL_FORM_FIELD, {
37494
- legalForm: "businessStructure"
37495
- })
37724
+ label: formUtils.getLabel(getFieldName("legalForm"), "businessStructure")
37496
37725
  }), jsx(NaceCodeField, {
37726
+ name: getFieldName("naceCode"),
37497
37727
  data: {
37498
- naceCode: data.naceCode
37728
+ naceCode: getFieldData("naceCode")
37499
37729
  },
37500
37730
  valid: {
37501
- naceCode: valid.naceCode
37731
+ naceCode: valid[getFieldName("naceCode")]
37502
37732
  },
37503
- errors: formUtils.getFieldErrors(errors, fieldProblems, NACE_CODE_FIELD),
37504
- handleChangeFor: () => handleChangeFor("naceCode", "blur"),
37733
+ errorMessage: formUtils.getErrorMessage(getFieldName("naceCode"), errors, fieldProblems),
37734
+ handleChangeFor: () => handleChangeFor(getFieldName("naceCode"), "blur"),
37505
37735
  readonly: false,
37506
- labels: formUtils.getFieldLabels(NACE_CODE_FIELD, {
37507
- naceCode: "industryAndNaceCode"
37508
- })
37736
+ label: formUtils.getLabel(getFieldName("naceCode"), "industryAndNaceCode")
37509
37737
  }), jsx(Field, {
37510
- name: "numberOfEmployees",
37511
- label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
37738
+ name: getFieldName("numberOfEmployees"),
37739
+ label: formUtils.getLabel(getFieldName("numberOfEmployees"), "numberOfEmployees"),
37512
37740
  classNameModifiers: ["legalName"],
37513
- errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
37514
- isValid: valid.numberOfEmployees,
37741
+ errorMessage: formUtils.getErrorMessage(getFieldName("numberOfEmployees"), errors, fieldProblems),
37742
+ isValid: valid[getFieldName("numberOfEmployees")],
37515
37743
  children: (childProps) => jsx(InputText, {
37516
37744
  ...childProps,
37517
- name: "numberOfEmployees",
37518
- value: data.numberOfEmployees,
37519
- readonly: formUtils.isReadOnly("numberOfEmployees"),
37745
+ name: getFieldName("numberOfEmployees"),
37746
+ value: getFieldData("numberOfEmployees"),
37747
+ readonly: false,
37520
37748
  classNameModifiers: ["legalName"],
37521
- onInput: handleChangeFor("numberOfEmployees", "input"),
37522
- onBlur: handleChangeFor("numberOfEmployees", "blur"),
37749
+ onInput: handleChangeFor(getFieldName("numberOfEmployees"), "input"),
37750
+ onBlur: handleChangeFor(getFieldName("numberOfEmployees"), "blur"),
37523
37751
  "aria-required": true,
37524
- "aria-label": formUtils.getLabel("numberOfEmployees"),
37525
- "aria-invalid": !valid.numberOfEmployees
37752
+ "aria-label": formUtils.getLabel(getFieldName("numberOfEmployees")),
37753
+ "aria-invalid": !valid[getFieldName("numberOfEmployees")]
37754
+ })
37755
+ }), jsx(Field, {
37756
+ name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
37757
+ classNameModifiers: ["highExposureBusinessInformation"],
37758
+ label: i18n.get("doesTheCompanyEarnMoreThanHalf"),
37759
+ errorMessage: formUtils.getErrorMessage(getFieldName("doesTheCompanyEarnMoreThanHalf"), errors, fieldProblems),
37760
+ children: (childProps) => jsx(RadioGroup, {
37761
+ ...childProps,
37762
+ name: getFieldName("doesTheCompanyEarnMoreThanHalf"),
37763
+ items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
37764
+ value: getFieldData("doesTheCompanyEarnMoreThanHalf"),
37765
+ disabled: false,
37766
+ onChange: handleChangeFor(getFieldName("doesTheCompanyEarnMoreThanHalf")),
37767
+ "aria-required": true,
37768
+ "aria-label": i18n.get("doesTheCompanyEarnMoreThanHalf"),
37769
+ "aria-invalid": !valid[getFieldName("doesTheCompanyEarnMoreThanHalf")]
37770
+ })
37771
+ }), jsx(Field, {
37772
+ name: getFieldName("doesYourCompanyHaveLEI"),
37773
+ classNameModifiers: ["highExposureBusinessInformation"],
37774
+ label: i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
37775
+ helper: jsxs("div", {
37776
+ children: [jsx("span", {
37777
+ children: i18n.get("anLEIIsAUniqueCode")
37778
+ }), " ", jsx(Link, {
37779
+ href: "https://search.gleif.org/#/search/",
37780
+ external: true,
37781
+ className: ["adyen-kyc__high-exposure-link"],
37782
+ children: i18n.get("lookUpYourLEI")
37783
+ })]
37784
+ }),
37785
+ errorMessage: formUtils.getErrorMessage(getFieldName("doesYourCompanyHaveLEI"), errors, fieldProblems),
37786
+ children: (childProps) => jsx(RadioGroup, {
37787
+ ...childProps,
37788
+ name: getFieldName("doesYourCompanyHaveLEI"),
37789
+ items: isMainCompany ? highExposureRadioItems : highExposureParentRadioItems,
37790
+ value: getFieldData("doesYourCompanyHaveLEI"),
37791
+ disabled: false,
37792
+ onChange: handleChangeFor(getFieldName("doesYourCompanyHaveLEI")),
37793
+ "aria-required": true,
37794
+ "aria-label": i18n.get(isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"),
37795
+ "aria-invalid": !valid[getFieldName("doesYourCompanyHaveLEI")]
37796
+ })
37797
+ }), getFieldData("doesYourCompanyHaveLEI") === "Yes" && jsxs(Fragment, {
37798
+ children: [jsx(Field, {
37799
+ name: getFieldName("legalEntityIdentifier"),
37800
+ label: formUtils.getLabel(getFieldName("legalEntityIdentifier"), "legalEntityIdentifier"),
37801
+ errorMessage: formUtils.getErrorMessage(getFieldName("legalEntityIdentifier"), errors, fieldProblems),
37802
+ isValid: valid.legalEntityIdentifier,
37803
+ helper: i18n.get("enterNCharactersWithAMixForExample", {
37804
+ values: {
37805
+ numChars: 20,
37806
+ example: "529900T8BM49AURSDO55"
37807
+ }
37808
+ }),
37809
+ helperPosition: "below",
37810
+ children: (childProps) => jsx(InputText, {
37811
+ ...childProps,
37812
+ name: getFieldName("legalEntityIdentifier"),
37813
+ value: getFieldData("legalEntityIdentifier"),
37814
+ readonly: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
37815
+ classNameModifiers: ["legalName"],
37816
+ onInput: handleChangeFor(getFieldName("legalEntityIdentifier"), "input"),
37817
+ onBlur: handleChangeFor(getFieldName("legalEntityIdentifier"), "blur"),
37818
+ "aria-required": true,
37819
+ "aria-label": formUtils.getLabel(getFieldName("legalEntityIdentifier")),
37820
+ "aria-invalid": !valid[getFieldName("legalEntityIdentifier")],
37821
+ isValid: valid[getFieldName("legalEntityIdentifier")]
37822
+ })
37823
+ }), !isMainCompany && jsx(Checkbox, {
37824
+ name: getFieldName("doesNotKnowNumberOfEmployees"),
37825
+ label: i18n.get("iDontKnow"),
37826
+ value: getFieldData("doesNotKnowNumberOfEmployees"),
37827
+ readonly: false,
37828
+ classNameModifiers: ["exempted-from-tax"],
37829
+ checked: Boolean(getFieldData("doesNotKnowNumberOfEmployees")),
37830
+ onChange: handleChangeFor(getFieldName("doesNotKnowNumberOfEmployees")),
37831
+ "aria-required": false,
37832
+ "aria-label": i18n.get("iDontKnow"),
37833
+ "aria-invalid": false
37834
+ })]
37835
+ })]
37836
+ });
37837
+ }
37838
+ function HighExposureOwnershipStructure({
37839
+ formUtils,
37840
+ data,
37841
+ valid,
37842
+ errors,
37843
+ fieldProblems,
37844
+ handleChangeFor,
37845
+ legalEntity
37846
+ }) {
37847
+ const {
37848
+ i18n
37849
+ } = useI18nContext();
37850
+ return jsxs(Fragment, {
37851
+ children: [jsx(Typography, {
37852
+ el: "h3",
37853
+ variant: "title",
37854
+ children: i18n.get("ownershipStructure")
37855
+ }), jsx(Field, {
37856
+ name: "isCompanyOwnedByAnotherCompany",
37857
+ classNameModifiers: ["highExposureBusinessInformation"],
37858
+ label: i18n.get("isCompanyOwnedByAnotherCompany", {
37859
+ values: {
37860
+ company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : ""
37861
+ }
37862
+ }),
37863
+ errorMessage: formUtils.getErrorMessage("isCompanyOwnedByAnotherCompany", errors, fieldProblems),
37864
+ helper: i18n.get("thisMeansYouHaveAParentCompany"),
37865
+ children: (childProps) => jsx(RadioGroup, {
37866
+ ...childProps,
37867
+ name: "isCompanyOwnedByAnotherCompany",
37868
+ items: highExposureRadioItems,
37869
+ value: data.isCompanyOwnedByAnotherCompany,
37870
+ disabled: false,
37871
+ onChange: handleChangeFor("isCompanyOwnedByAnotherCompany"),
37872
+ "aria-required": true,
37873
+ "aria-label": formUtils.getLabel("isCompanyOwnedByAnotherCompany"),
37874
+ "aria-invalid": !valid.isCompanyOwnedByAnotherCompany
37875
+ })
37876
+ }), (data == null ? void 0 : data.isCompanyOwnedByAnotherCompany) === "Yes" && jsx(Field, {
37877
+ name: "isParentOwnedByAnotherCompany",
37878
+ classNameModifiers: ["highExposureBusinessInformation"],
37879
+ label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
37880
+ helper: i18n.get("thisMeansYouHaveAnUltimateParentCompany"),
37881
+ errorMessage: formUtils.getErrorMessage("isParentOwnedByAnotherCompany", errors, fieldProblems),
37882
+ children: (childProps) => jsx(RadioGroup, {
37883
+ ...childProps,
37884
+ name: "isParentOwnedByAnotherCompany",
37885
+ items: highExposureRadioItems,
37886
+ value: data.isParentOwnedByAnotherCompany,
37887
+ disabled: false,
37888
+ onChange: handleChangeFor("isParentOwnedByAnotherCompany"),
37889
+ "aria-required": true,
37890
+ "aria-label": formUtils.getLabel("isParentOwnedByAnotherCompany"),
37891
+ "aria-invalid": !valid.doesYourCompanyHaveLEI
37526
37892
  })
37527
37893
  })]
37528
37894
  });
37529
37895
  }
37530
- const highExposureCompanyDetailsFields = ["numberOfEmployees", "legalForm", "naceCode"];
37896
+ const companyFieldMapping = {
37897
+ legalForm: "legalForm",
37898
+ naceCode: "naceCode",
37899
+ numberOfEmployees: "numberOfEmployees",
37900
+ doesTheCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
37901
+ doesYourCompanyHaveLEI: "doesYourCompanyHaveLEI",
37902
+ legalEntityIdentifier: "legalEntityIdentifier",
37903
+ isCompanyOwnedByAnotherCompany: "isCompanyOwnedByAnotherCompany",
37904
+ isParentOwnedByAnotherCompany: "isParentOwnedByAnotherCompany"
37905
+ };
37906
+ const highExposureCompanyDetailsFields = Object.values(companyFieldMapping);
37531
37907
  function AdditionalFieldsForHighExposureCompany(props) {
37532
37908
  const {
37533
37909
  i18n
@@ -37548,6 +37924,7 @@ function AdditionalFieldsForHighExposureCompany(props) {
37548
37924
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
37549
37925
  });
37550
37926
  const formUtils = formUtilities(props, i18n);
37927
+ const highExposureHandleChangeFor = handleChangeFor;
37551
37928
  const {
37552
37929
  updateStateSlice
37553
37930
  } = useGlobalDataSlice("company");
@@ -37560,9 +37937,19 @@ function AdditionalFieldsForHighExposureCompany(props) {
37560
37937
  });
37561
37938
  }, [data, valid, errors, fieldProblems]);
37562
37939
  return jsxs("form", {
37563
- className: "adyen-kyc__registration-details",
37564
- children: [jsx(FormHeader, {
37565
- heading: props.heading
37940
+ className: "adyen-kyc__high-exposure-company",
37941
+ children: [jsx(Typography, {
37942
+ el: "h1",
37943
+ variant: "title-l",
37944
+ children: i18n.get("additionalInformationIsRequiredForLoan")
37945
+ }), jsx(Typography, {
37946
+ el: "p",
37947
+ variant: "body",
37948
+ children: i18n.get("beforeYourCapitalLoanApplicationCanBeSubmitted")
37949
+ }), jsx(Typography, {
37950
+ el: "p",
37951
+ variant: "body",
37952
+ children: i18n.get("euFinancialRegulationsRequireUs")
37566
37953
  }), jsx(ErrorPanel, {
37567
37954
  verificationErrors: props.formVerificationErrors,
37568
37955
  validationErrors: props == null ? void 0 : props.fieldValidationErrors,
@@ -37570,21 +37957,39 @@ function AdditionalFieldsForHighExposureCompany(props) {
37570
37957
  id: "ariaErrorField"
37571
37958
  }), jsx(HighExposureBusinessInformation, {
37572
37959
  ...props,
37573
- handleChangeFor,
37960
+ handleChangeFor: highExposureHandleChangeFor,
37574
37961
  errors,
37575
37962
  data,
37576
37963
  valid,
37577
37964
  country: props.country,
37578
37965
  formUtils,
37966
+ fieldProblems,
37967
+ targetPage: HighExposurePagesEnums.COMPANY_PAGE,
37968
+ fieldMapping: companyFieldMapping
37969
+ }), jsx(HighExposureOwnershipStructure, {
37970
+ ...props,
37971
+ handleChangeFor,
37972
+ errors,
37973
+ data,
37974
+ valid,
37975
+ legalEntity: props.legalEntity,
37976
+ formUtils,
37579
37977
  fieldProblems
37580
37978
  })]
37581
37979
  });
37582
37980
  }
37583
- const highExposureParentCompanyDetailsFields = ["numberOfEmployees"];
37584
- function AdditionalFieldsForHighExposureParentCompany({
37585
- requiredFields,
37586
- ...props
37587
- }) {
37981
+ const parentCompanyFieldMapping$1 = {
37982
+ legalName: "parentLegalName",
37983
+ legalForm: "parentLegalForm",
37984
+ naceCode: "parentNaceCode",
37985
+ numberOfEmployees: "parentNumberOfEmployees",
37986
+ doesTheCompanyEarnMoreThanHalf: "doesTheParentCompanyEarnMoreThanHalf",
37987
+ doesYourCompanyHaveLEI: "doesYourParentCompanyHaveLEI",
37988
+ legalEntityIdentifier: "parentLegalEntityIdentifier",
37989
+ doesNotKnowNumberOfEmployees: "doesNotKnowParentNumberOfEmployees"
37990
+ };
37991
+ const highExposureParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping$1);
37992
+ function AdditionalFieldsForHighExposureParentCompany(props) {
37588
37993
  const {
37589
37994
  i18n
37590
37995
  } = useI18nContext();
@@ -37596,14 +38001,15 @@ function AdditionalFieldsForHighExposureParentCompany({
37596
38001
  fieldProblems
37597
38002
  } = useForm({
37598
38003
  ...props,
37599
- schema: ["numberOfEmployees"],
38004
+ schema: highExposureParentCompanyDetailsFields,
37600
38005
  defaultData: {
37601
38006
  ...props.data
37602
38007
  },
37603
- rules: props.validators || highExposureCompanyDetailsValidations,
38008
+ rules: props.validators || highExposureParentCompanyDetailsValidations,
37604
38009
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
37605
38010
  });
37606
38011
  const formUtils = formUtilities(props, i18n);
38012
+ const highExposureHandleChangeFor = handleChangeFor;
37607
38013
  const {
37608
38014
  updateStateSlice
37609
38015
  } = useGlobalDataSlice("parentCompany");
@@ -37616,39 +38022,47 @@ function AdditionalFieldsForHighExposureParentCompany({
37616
38022
  });
37617
38023
  }, [data, valid, errors, fieldProblems]);
37618
38024
  return jsxs("form", {
37619
- className: "adyen-kyc__registration-details",
37620
- children: [jsx(FormHeader, {
37621
- heading: props.heading
38025
+ className: "adyen-kyc__high-exposure-company",
38026
+ children: [jsx(Typography, {
38027
+ el: "h1",
38028
+ variant: "title-l",
38029
+ children: i18n.get("parentCompanyInformation")
38030
+ }), jsx(Typography, {
38031
+ el: "p",
38032
+ variant: "body",
38033
+ children: i18n.get("inTheLastStepOwnedByAParentCompany")
37622
38034
  }), jsx(ErrorPanel, {
37623
38035
  verificationErrors: props.formVerificationErrors,
37624
38036
  validationErrors: props == null ? void 0 : props.fieldValidationErrors,
37625
38037
  formUtils,
37626
38038
  id: "ariaErrorField"
37627
- }), formUtils.isRequiredField("numberOfEmployees") && jsx(Field, {
37628
- name: "numberOfEmployees",
37629
- label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
37630
- classNameModifiers: ["legalName"],
37631
- errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
37632
- isValid: valid.numberOfEmployees,
37633
- children: (childProps) => jsx(InputText, {
37634
- ...childProps,
37635
- name: "numberOfEmployees",
37636
- value: data.numberOfEmployees,
37637
- readonly: formUtils.isReadOnly("numberOfEmployees"),
37638
- classNameModifiers: ["legalName"],
37639
- onInput: handleChangeFor("numberOfEmployees", "input"),
37640
- onBlur: handleChangeFor("numberOfEmployees", "blur"),
37641
- "aria-required": true,
37642
- "aria-label": formUtils.getLabel("numberOfEmployees"),
37643
- "aria-invalid": !valid.numberOfEmployees
37644
- })
38039
+ }), jsx(HighExposureBusinessInformation, {
38040
+ ...props,
38041
+ handleChangeFor: highExposureHandleChangeFor,
38042
+ sectionHeading: "businessInformation",
38043
+ errors,
38044
+ data,
38045
+ valid,
38046
+ country: props.country,
38047
+ formUtils,
38048
+ fieldProblems,
38049
+ targetPage: HighExposurePagesEnums.PARENT_COMPANY_PAGE,
38050
+ fieldMapping: parentCompanyFieldMapping$1
37645
38051
  })]
37646
38052
  });
37647
38053
  }
37648
- function AdditionalFieldsForHighExposureUltimateParentCompany({
37649
- requiredFields,
37650
- ...props
37651
- }) {
38054
+ const parentCompanyFieldMapping = {
38055
+ legalName: "ultimateParentLegalName",
38056
+ legalForm: "ultimateParentLegalForm",
38057
+ naceCode: "ultimateParentNaceCode",
38058
+ numberOfEmployees: "ultimateParentNumberOfEmployees",
38059
+ doesTheCompanyEarnMoreThanHalf: "doesTheUltimateParentCompanyEarnMoreThanHalf",
38060
+ doesYourCompanyHaveLEI: "doesYourUltimateParentCompanyHaveLEI",
38061
+ legalEntityIdentifier: "ultimateParentLegalEntityIdentifier",
38062
+ doesNotKnowNumberOfEmployees: "doesNotKnowUltimateParentNumberOfEmployees"
38063
+ };
38064
+ const highExposureUltimateParentCompanyDetailsFields = Object.values(parentCompanyFieldMapping);
38065
+ function AdditionalFieldsForHighExposureUltimateParentCompany(props) {
37652
38066
  const {
37653
38067
  i18n
37654
38068
  } = useI18nContext();
@@ -37660,14 +38074,15 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
37660
38074
  fieldProblems
37661
38075
  } = useForm({
37662
38076
  ...props,
37663
- schema: ["numberOfEmployees"],
38077
+ schema: highExposureUltimateParentCompanyDetailsFields,
37664
38078
  defaultData: {
37665
38079
  ...props.data
37666
38080
  },
37667
- rules: props.validators || highExposureCompanyDetailsValidations,
38081
+ rules: props.validators || highExposureUltimateParentCompanyDetailsValidations,
37668
38082
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
37669
38083
  });
37670
38084
  const formUtils = formUtilities(props, i18n);
38085
+ const highExposureHandleChangeFor = handleChangeFor;
37671
38086
  const {
37672
38087
  updateStateSlice
37673
38088
  } = useGlobalDataSlice("ultimateParentCompany");
@@ -37680,32 +38095,32 @@ function AdditionalFieldsForHighExposureUltimateParentCompany({
37680
38095
  });
37681
38096
  }, [data, valid, errors, fieldProblems]);
37682
38097
  return jsxs("form", {
37683
- className: "adyen-kyc__registration-details",
37684
- children: [jsx(FormHeader, {
37685
- heading: props.heading
38098
+ className: "adyen-kyc__high-exposure-company",
38099
+ children: [jsx(Typography, {
38100
+ el: "h1",
38101
+ variant: "title-l",
38102
+ children: i18n.get("ultimateParentCompanyInformation")
38103
+ }), jsx(Typography, {
38104
+ el: "p",
38105
+ variant: "body",
38106
+ children: i18n.get("inThePreviousStepOwnedByAnUltimateParentCompany")
37686
38107
  }), jsx(ErrorPanel, {
37687
38108
  verificationErrors: props.formVerificationErrors,
37688
38109
  validationErrors: props == null ? void 0 : props.fieldValidationErrors,
37689
38110
  formUtils,
37690
38111
  id: "ariaErrorField"
37691
- }), formUtils.isRequiredField("numberOfEmployees") && jsx(Field, {
37692
- name: "numberOfEmployees",
37693
- label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
37694
- classNameModifiers: ["legalName"],
37695
- errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldProblems),
37696
- isValid: valid.numberOfEmployees,
37697
- children: (childProps) => jsx(InputText, {
37698
- ...childProps,
37699
- name: "numberOfEmployees",
37700
- value: data.numberOfEmployees,
37701
- readonly: formUtils.isReadOnly("numberOfEmployees"),
37702
- classNameModifiers: ["legalName"],
37703
- onInput: handleChangeFor("numberOfEmployees", "input"),
37704
- onBlur: handleChangeFor("numberOfEmployees", "blur"),
37705
- "aria-required": true,
37706
- "aria-label": formUtils.getLabel("numberOfEmployees"),
37707
- "aria-invalid": !valid.numberOfEmployees
37708
- })
38112
+ }), jsx(HighExposureBusinessInformation, {
38113
+ ...props,
38114
+ handleChangeFor: highExposureHandleChangeFor,
38115
+ sectionHeading: "businessInformation",
38116
+ errors,
38117
+ data,
38118
+ valid,
38119
+ country: props.country,
38120
+ formUtils,
38121
+ fieldProblems,
38122
+ targetPage: HighExposurePagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
38123
+ fieldMapping: parentCompanyFieldMapping
37709
38124
  })]
37710
38125
  });
37711
38126
  }
@@ -37736,20 +38151,15 @@ function HighExposureDropinComponent(props) {
37736
38151
  const highExposureCompanyDetailsFormProps = getFormProps(props, companyFormId);
37737
38152
  const highExposureParentCompanyDetailsFormProps = getFormProps(props, parentCompanyFormId);
37738
38153
  const highExposureUltimateParentCompanyDetailsFormProps = getFormProps(props, ultimateParentCompanyFormId);
37739
- const renderActiveForm = (activeForm) => jsxs("div", {
38154
+ const renderActiveForm = (activeForm) => jsx("div", {
37740
38155
  className: "adyen-kyc",
37741
- children: [jsx(ContextGuidance, {
37742
- page: "High exposure company details page",
37743
- titleId: "whyDoINeedToFillInThisInformation",
37744
- contentId: "euFinancialRegulationsRequireUs",
37745
- title: i18n.get("whyDoINeedToFillInThisInformation"),
37746
- content: i18n.get("euFinancialRegulationsRequireUs")
37747
- }), jsxs("div", {
38156
+ children: jsxs("div", {
37748
38157
  className: "adyen-kyc-form-wrapper",
37749
38158
  children: [activeForm.formId === companyFormId && jsx(AdditionalFieldsForHighExposureCompany, {
37750
38159
  ...highExposureCompanyDetailsFormProps,
37751
38160
  legalEntityId: props.legalEntityId,
37752
- heading: i18n.get("detailsForCapital"),
38161
+ legalEntity: props.legalEntity,
38162
+ heading: i18n.get("yourBusinessDetails"),
37753
38163
  id: companyFormId,
37754
38164
  country: props.country
37755
38165
  }), activeForm.formId === parentCompanyFormId && jsx(AdditionalFieldsForHighExposureParentCompany, {
@@ -37765,7 +38175,7 @@ function HighExposureDropinComponent(props) {
37765
38175
  id: companyFormId,
37766
38176
  country: props.country
37767
38177
  })]
37768
- })]
38178
+ })
37769
38179
  });
37770
38180
  return jsx("div", {
37771
38181
  className: "adyen-kyc",
@@ -37780,6 +38190,24 @@ const customLabels = {
37780
38190
  company: {
37781
38191
  legalForm: "businessStructure",
37782
38192
  naceCode: "industryAndNaceCode"
38193
+ },
38194
+ parentCompany: {
38195
+ parentLegalName: "legalName",
38196
+ parentLegalForm: "businessStructure",
38197
+ parentNaceCode: "industryAndNaceCode",
38198
+ parentNumberOfEmployees: "numberOfEmployees",
38199
+ doesTheParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
38200
+ doesYourParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
38201
+ parentLegalEntityIdentifier: "legalEntityIdentifier"
38202
+ },
38203
+ ultimateParentCompany: {
38204
+ ultimateParentLegalName: "legalName",
38205
+ ultimateParentLegalForm: "businessStructure",
38206
+ ultimateParentNaceCode: "industryAndNaceCode",
38207
+ ultimateParentNumberOfEmployees: "numberOfEmployees",
38208
+ doesTheUltimateParentCompanyEarnMoreThanHalf: "doesTheCompanyEarnMoreThanHalf",
38209
+ doesYourUltimateParentCompanyHaveLEI: "doesThisCompanyHaveLEI",
38210
+ ultimateParentLegalEntityIdentifier: "legalEntityIdentifier"
37783
38211
  }
37784
38212
  };
37785
38213
  function UpdateLegalEntityForHighExposure({
@@ -37793,16 +38221,17 @@ function UpdateLegalEntityForHighExposure({
37793
38221
  hideDropinLayout,
37794
38222
  handleHomeClick,
37795
38223
  homeButtonLabel,
37796
- legalEntityId
38224
+ legalEntityId,
38225
+ legalEntity: legalEntityProps
37797
38226
  }) {
37798
- var _a;
38227
+ var _a, _b, _c;
37799
38228
  const {
37800
38229
  getLegalEntity: getLegalEntity2
37801
38230
  } = useComponentApi(legalEntityId);
37802
38231
  const {
37803
38232
  i18n
37804
38233
  } = useI18nContext();
37805
- const [legalEntity, setLegalEntity] = useState();
38234
+ const [legalEntity, setLegalEntity] = useState(legalEntityProps);
37806
38235
  const fetchLegalEntity = useCallback(async () => {
37807
38236
  const legalEntityResponse = await getLegalEntity2(legalEntityId);
37808
38237
  setLegalEntity(legalEntityResponse);
@@ -37827,6 +38256,7 @@ function UpdateLegalEntityForHighExposure({
37827
38256
  } = useToastContext();
37828
38257
  const [loadingStatus, setLoadingStatus] = useState("success");
37829
38258
  const formRef = useRef(null);
38259
+ const [highExposureRequiredForms, setHighExposureRequiredForms] = useState(highExposureForms);
37830
38260
  const getConfigurationData = useCallback(() => getConfiguration2({
37831
38261
  legalEntityType: LegalEntityType.ORGANIZATION,
37832
38262
  capabilities,
@@ -37853,10 +38283,33 @@ function UpdateLegalEntityForHighExposure({
37853
38283
  });
37854
38284
  onChange == null ? void 0 : onChange(currentState);
37855
38285
  }, [currentState]);
38286
+ useEffect(() => {
38287
+ var _a2, _b2;
38288
+ const showParentCompany = ((_a2 = data == null ? void 0 : data.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
38289
+ const showUltimateParentCompany = ((_b2 = data == null ? void 0 : data.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
38290
+ let updateForms = {
38291
+ company: {
38292
+ ...highExposureForms.company
38293
+ }
38294
+ };
38295
+ if (showParentCompany) {
38296
+ updateForms = {
38297
+ ...updateForms,
38298
+ parentCompany: highExposureForms.parentCompany
38299
+ };
38300
+ }
38301
+ if (showParentCompany && showUltimateParentCompany) {
38302
+ updateForms = {
38303
+ ...updateForms,
38304
+ ultimateParentCompany: highExposureForms.ultimateParentCompany
38305
+ };
38306
+ }
38307
+ setHighExposureRequiredForms(updateForms);
38308
+ }, [(_a = data == null ? void 0 : data.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany, (_b = data == null ? void 0 : data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany]);
37856
38309
  const forms2 = useMemo(() => {
37857
- const requiredForms = getRequiredForms(highExposureForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
38310
+ const requiredForms = getRequiredForms(highExposureRequiredForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
37858
38311
  return addValidityToForms(requiredForms, formValidity, problems);
37859
- }, [derivedProps, formValidity, problems]);
38312
+ }, [derivedProps == null ? void 0 : derivedProps.optionalFields, derivedProps == null ? void 0 : derivedProps.requiredFields, formValidity, highExposureRequiredForms, problems]);
37860
38313
  const onSubmit = async () => {
37861
38314
  setLoadingStatus("loading");
37862
38315
  const exposureDetails = mapHighExposureToLegalEntity(data);
@@ -37921,7 +38374,7 @@ function UpdateLegalEntityForHighExposure({
37921
38374
  onSubmit
37922
38375
  });
37923
38376
  return jsx(FormWrapper, {
37924
- taskName: "detailsForCapital",
38377
+ taskName: "progress",
37925
38378
  handleNextClick,
37926
38379
  handleBackClick,
37927
38380
  gotoFormByFormIndex,
@@ -37947,10 +38400,11 @@ function UpdateLegalEntityForHighExposure({
37947
38400
  activeForm,
37948
38401
  capabilities,
37949
38402
  data,
37950
- country: ((_a = data == null ? void 0 : data.company) == null ? void 0 : _a.country) ?? country2,
38403
+ country: ((_c = data == null ? void 0 : data.company) == null ? void 0 : _c.country) ?? country2,
37951
38404
  problems,
37952
38405
  shouldValidate,
37953
- ref: formRef
38406
+ ref: formRef,
38407
+ legalEntity
37954
38408
  })
37955
38409
  });
37956
38410
  }
@@ -38625,7 +39079,7 @@ const ConfigurationApiProvider = ({
38625
39079
  isEmbeddedDropin,
38626
39080
  loadingContext
38627
39081
  } = authContext;
38628
- const sdkVersion = "3.20.2";
39082
+ const sdkVersion = "3.21.1";
38629
39083
  useAnalytics({
38630
39084
  onUserEvent,
38631
39085
  legalEntityId: rootLegalEntityId,
@@ -38804,7 +39258,8 @@ const settingsDefaults = {
38804
39258
  hideOnboardingIntroductionTrust: true,
38805
39259
  hideOnboardingIntroductionSoleProprietor: true,
38806
39260
  viewOnboardingGuidance: false,
38807
- transferInstrumentLimit: 0
39261
+ transferInstrumentLimit: 0,
39262
+ instantBankVerification: true
38808
39263
  };
38809
39264
  function SettingsProvider({
38810
39265
  children,
@@ -39009,8 +39464,7 @@ const Toast = ({
39009
39464
  onToastAction
39010
39465
  }) => {
39011
39466
  const toastRef = useRef(null);
39012
- const loading2 = type === "loading";
39013
- const successToast = type === "loading";
39467
+ const isLoading = type === "loading";
39014
39468
  const labelId = getUniqueId("toast");
39015
39469
  const handleShow = useCallback(() => {
39016
39470
  var _a;
@@ -39027,52 +39481,49 @@ const Toast = ({
39027
39481
  setTimeout(() => handleHide(), duration);
39028
39482
  }
39029
39483
  }, [label, duration, handleHide, handleShow]);
39484
+ const statusClassMap = Object.freeze({
39485
+ info: "",
39486
+ loading: "adyen-kyc-toast__loading",
39487
+ success: "adyen-kyc-toast__success",
39488
+ error: "adyen-kyc-toast__error"
39489
+ });
39030
39490
  return jsxs("div", {
39031
39491
  ref: toastRef,
39032
39492
  role: actionLabel ? "alertdialog" : "alert",
39033
- className: "adyen-kyc-toast",
39493
+ className: `adyen-kyc-toast ${statusClassMap[type]}`,
39034
39494
  "aria-labelledby": labelId,
39035
- children: [loading2 && jsx("div", {
39495
+ children: [isLoading && jsx("div", {
39036
39496
  className: "adyen-kyc-toast__loader",
39037
- children: jsx("div", {
39038
- className: "adyen-kyc-loading-indicator adyen-kyc-loading-indicator--small adyen-kyc-loading-indicator--dark"
39497
+ children: jsx(Spinner, {
39498
+ size: "small"
39039
39499
  })
39040
- }), !loading2 && jsxs("div", {
39041
- className: cx("adyen-kyc-toast__status", {
39042
- "adyen-kyc-toast__status--success": successToast,
39043
- "adyen-kyc-toast__status--error": !successToast
39044
- }),
39045
- children: [successToast && jsx(Icon, {
39046
- className: "adyen-kyc-toast__status-icon",
39047
- name: "checkmark"
39048
- }), !successToast && jsx(Icon, {
39049
- className: "adyen-kyc-toast__status-icon",
39050
- name: "cross"
39051
- })]
39052
39500
  }), jsxs("div", {
39053
39501
  className: "adyen-kyc-toast__message",
39054
39502
  children: [jsx("span", {
39055
39503
  id: labelId,
39056
39504
  className: "adyen-kyc-toast__title",
39057
39505
  children: label
39058
- }), actionLabel && jsx("button", {
39059
- className: "adyen-kyc-link adyen-kyc-toast__action",
39060
- title: "performAction",
39061
- type: "button",
39062
- onClick: onToastAction,
39063
- children: actionLabel
39064
- }), !loading2 && subLabel && jsx("span", {
39506
+ }), !isLoading && subLabel && jsx("span", {
39065
39507
  className: "adyen-kyc-toast__subtitle",
39066
39508
  children: subLabel
39067
39509
  })]
39068
- }), !loading2 && jsx("button", {
39069
- className: "adyen-kyc-toast__close",
39070
- title: "close",
39071
- type: "button",
39072
- onClick: handleHide,
39073
- children: jsx(Icon, {
39074
- name: "cross"
39075
- })
39510
+ }), jsxs("div", {
39511
+ className: "adyen-kyc-toast__actions",
39512
+ children: [!isLoading && jsx("button", {
39513
+ className: "adyen-kyc-toast__close",
39514
+ title: "close",
39515
+ type: "button",
39516
+ onClick: handleHide,
39517
+ children: jsx(Icon, {
39518
+ name: "cross"
39519
+ })
39520
+ }), actionLabel && jsx(Button, {
39521
+ onClick: onToastAction ?? noop,
39522
+ className: "adyen-kyc-link adyen-kyc-toast__action adyen-kyc-u-margin-right-8",
39523
+ title: "performAction",
39524
+ label: actionLabel,
39525
+ tertiary: true
39526
+ })]
39076
39527
  })]
39077
39528
  });
39078
39529
  };
@@ -40083,18 +40534,12 @@ const validateCoreOptions = (coreOptions) => {
40083
40534
  if (!(coreOptions.sdkToken && coreOptions.getSdkToken) && !coreOptions.clientKey) {
40084
40535
  throw new Error(`
40085
40536
 
40086
- Please specify either sdkToken and getSdkToken handler or a clientKey for the SDK to initialize!
40087
-
40088
-
40089
- - For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component`);
40537
+ Missing or invalid parameters. Specify either the sdkToken and getSdkToken handler or a clientKey in your request to initialize the component.`);
40090
40538
  }
40091
40539
  if (missing.length > 0) {
40092
40540
  throw new Error(`
40093
40541
 
40094
- Please specify a ${listify(missing)} for the SDK to initialize!
40095
-
40096
- - For more information please check: https://docs.adyen.com/platforms/onboard-users/components/?tab=npm_recommended__1#step-7-initiate-the-onboarding-component
40097
- `);
40542
+ Missing or invalid parameters. Specify ${listify(missing)} in your request to initialize the component.`);
40098
40543
  }
40099
40544
  };
40100
40545
  const validateComponentOptions = (componentName, options) => {