@adyen/kyc-components 3.31.0 → 3.32.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 (46) hide show
  1. package/dist/es/adyen-kyc-components.es.js +688 -399
  2. package/dist/es/instant-verification-method-NGPLGC6g.js +50 -0
  3. package/dist/es/tink-logo-WImtH5CL.js +8 -0
  4. package/dist/style.css +247 -191
  5. package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +1 -1
  6. package/dist/types/components/AdditionalInformation/utils.d.ts +9 -0
  7. package/dist/types/components/BusinessSelection/types.d.ts +1 -2
  8. package/dist/types/components/Company/rules.d.ts +1 -0
  9. package/dist/types/components/Dropins/PciDropin/components/PciDropinComponent.d.ts +2 -1
  10. package/dist/types/components/Dropins/PciDropin/types.d.ts +1 -0
  11. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +1 -2
  12. package/dist/types/components/Individual/types.d.ts +1 -1
  13. package/dist/types/components/Individual/validators.d.ts +2 -1
  14. package/dist/types/components/PayoutAccount/helpers/mapPayoutAccountSchemaToApiBankAccount.d.ts +1 -1
  15. package/dist/types/components/PayoutDetails/types.d.ts +4 -1
  16. package/dist/types/components/PayoutVerificationMethod/component/PreferInstantVerificationMethod/PreferInstantVerificationMethod.d.ts +9 -0
  17. package/dist/types/components/PayoutVerificationMethod/types.d.ts +5 -0
  18. package/dist/types/components/RegistrationAddress/types.d.ts +1 -1
  19. package/dist/types/components/internal/Address/AddressComponent.d.ts +1 -1
  20. package/dist/types/components/internal/Address/constants.d.ts +2 -1
  21. package/dist/types/components/internal/Address/types.d.ts +2 -2
  22. package/dist/types/components/internal/Address/utils.d.ts +2 -3
  23. package/dist/types/components/internal/Button/Button.d.ts +1 -1
  24. package/dist/types/components/internal/Button/types.d.ts +1 -0
  25. package/dist/types/components/internal/Card/Card.d.ts +1 -1
  26. package/dist/types/components/internal/Card/types.d.ts +3 -0
  27. package/dist/types/components/internal/Link/Link.d.ts +1 -1
  28. package/dist/types/components/internal/Link/types.d.ts +1 -0
  29. package/dist/types/components/internal/Svg/svgs.d.ts +1 -0
  30. package/dist/types/core/Context/ExperimentContext/types.d.ts +3 -2
  31. package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
  32. package/dist/types/core/hooks/useBusinessData/types.d.ts +1 -2
  33. package/dist/types/core/hooks/useForm/reducer.d.ts +2 -2
  34. package/dist/types/core/hooks/useForm/types.d.ts +2 -2
  35. package/dist/types/core/hooks/useForm/useForm.d.ts +1 -1
  36. package/dist/types/core/models/api/company-search.d.ts +0 -1
  37. package/dist/types/core/models/company.d.ts +0 -3
  38. package/dist/types/core/models/form-rules.d.ts +2 -0
  39. package/dist/types/core/process-field-configurations.d.ts +2 -1
  40. package/dist/types/utils/datasetUtil.d.ts +3 -1
  41. package/dist/types/utils/formUtils.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/dist/es/tink-logo-CXMbO28D.js +0 -5
  44. package/dist/types/components/internal/Card/index.d.ts +0 -2
  45. package/dist/types/components/internal/FormFields/RadioGroupCard/index.d.ts +0 -3
  46. package/dist/types/types/index.d.ts +0 -9
@@ -98,7 +98,8 @@ const defaultTrans = {
98
98
  acknowledgePciRequirements: "We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",
99
99
  actionNeeded: "Action needed",
100
100
  add: "Add",
101
- addAndVerifyYourBankDetails: "Add and verify your bank account details",
101
+ addABankAccountForPayouts: "Add a bank account for payouts",
102
+ addAccountManually: "Add account manually",
102
103
  addBankAccount: "Add bank account",
103
104
  addBankDetails: "Add bank details",
104
105
  addDecisionMaker: "Add decision-maker",
@@ -117,6 +118,7 @@ const defaultTrans = {
117
118
  additionalInformationFormHeading: "Additional business details",
118
119
  additionalInformationFormName: "Additional details",
119
120
  address: "Address",
121
+ address__placeHolder: "Start typing an address for suggestions...",
120
122
  addressRegisteredWithSecretaryOfState: "Address registered with the Secretary of State for this company.",
121
123
  addresses: "Addresses",
122
124
  adoptionCertificate: "Adoption certificate",
@@ -283,6 +285,7 @@ const defaultTrans = {
283
285
  completeReview: "Complete review",
284
286
  confirm: "Confirm",
285
287
  confirmPayoutManually: "Confirm the payout account manually",
288
+ connectWith: "Connect with %{providerName}",
286
289
  constitutionalDocument: "Constitutional document",
287
290
  constitutionalDocument__header: "Upload a constitutional document",
288
291
  constitutionalDocument__headerDescription: "This helps to verify your sole proprietorship details.",
@@ -350,6 +353,7 @@ const defaultTrans = {
350
353
  doNotHaveRegonKrsNumber: "I do not have a REGON",
351
354
  doNotHaveTaxIdNumber: "I do not have a Tax Identification Number",
352
355
  doNotHaveYTunnus: "I do not have a Y-TUNNUS",
356
+ doNotHaveAbn: "I do not have an ABN",
353
357
  documentAddressedToName: "The document has to be addressed to %{name}",
354
358
  documentCannotBeDamaged: "The document cannot be damaged",
355
359
  documentIssuedByGovernmentAuthority: "The document has to be issued by a government authority. It's usually given when a business is created at the local commercial register",
@@ -751,6 +755,7 @@ const defaultTrans = {
751
755
  howWouldYouLikeToSetUpYourAccount: "How would you like to set up your account",
752
756
  huRegistrationNumber: "Cégjegyzékszám",
753
757
  huTaxId: "Közösségi adószám",
758
+ iDoNotHaveCompanyRegistrationNumber: "I do not have a company registration number (CRN)",
754
759
  hybridTrust: "Hybrid trust",
755
760
  iDoNotHaveGst: "I do not have a Goods and Services Tax (GST) number",
756
761
  iDontHaveARegistrationNumber: "I don't have a registration number",
@@ -791,6 +796,7 @@ const defaultTrans = {
791
796
  infoInUploadedDocumentIsTrue: "All information in the uploaded document must be true and up-to-date.",
792
797
  informationCouldNotBeSubmitted: "Information couldn't be submitted",
793
798
  instant: "Instant",
799
+ instantlyConnectAndVerifyYourBankAccount: "Instantly connect and verify your bank account",
794
800
  instantIDVerificationDescription: "Take a photo of a passport, identity card, or driver's license.",
795
801
  instantVerification: "Instant verification",
796
802
  instantVerificationDescription: "Log in to your bank account and get instantly verified.",
@@ -1056,6 +1062,7 @@ const defaultTrans = {
1056
1062
  payoutIn_Or_: "Payouts to this account can be done in %{currencyOne} or %{currencyTwo}.",
1057
1063
  pccr: "PCCR",
1058
1064
  pciDssQuestionnaire: "PCI DSS questionnaire",
1065
+ pciDoesNotNeedSigningOrHasBeenSigned: "PCI DSS questionnaire does not need signing or has already been signed",
1059
1066
  pciSignFailed: "PCI signing failed",
1060
1067
  pciSignedSuccessfully: "PCI signed successfully",
1061
1068
  pciDssSelfAssesmentSignedSuccessfully: "PCI-DSS Self assesment questionnaire signed and dated",
@@ -1124,6 +1131,8 @@ const defaultTrans = {
1124
1131
  registeredAddressTrustHeaderDescription: "The address registered to your trust",
1125
1132
  registeredBusinessAddress: "Registered business address",
1126
1133
  registeredBusinessAddressDescription: "Your business's official address used for government and other legal purposes.",
1134
+ registeredBusinessAddressDescription__withCountry: "Your business's official address used for government and other legal purposes in %{country}.",
1135
+ registeredBusinessAddressDescription__withCountry__commonNoun: "Your business's official address used for government and other legal purposes in the %{country}.",
1127
1136
  registrationAddress: "Registration address",
1128
1137
  registrationDetails: "Registration details",
1129
1138
  registrationDocument: "Registration document",
@@ -1695,6 +1704,7 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
1695
1704
  SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
1696
1705
  SettingNames2["InstantBankVerification"] = "instantBankVerification";
1697
1706
  SettingNames2["ShowServiceAgreementsFirst"] = "showServiceAgreementsFirst";
1707
+ SettingNames2["EnforceLegalAge"] = "enforceLegalAge";
1698
1708
  return SettingNames2;
1699
1709
  })(SettingNames || {});
1700
1710
  const SettingsContext = createContext(void 0);
@@ -1806,9 +1816,10 @@ var StateCodesUS = /* @__PURE__ */ ((StateCodesUS2) => {
1806
1816
  StateCodesUS2["Wyoming"] = "WY";
1807
1817
  return StateCodesUS2;
1808
1818
  })(StateCodesUS || {});
1809
- const logger$I = createLogger("useBusinessData");
1819
+ const logger$J = createLogger("useBusinessData");
1810
1820
  const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
1811
1821
  const KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS = [StateCodesUS.Arkansas, StateCodesUS.Connecticut, StateCodesUS.Georgia, StateCodesUS.Hawaii, StateCodesUS.Indiana, StateCodesUS.Kentucky, StateCodesUS.Maryland, StateCodesUS.Minnesota, StateCodesUS.Missouri, StateCodesUS.Montana, StateCodesUS.NewHampshire, StateCodesUS.NewMexico, StateCodesUS.SouthCarolina, StateCodesUS.Utah, StateCodesUS.Vermont, StateCodesUS.Wisconsin, StateCodesUS.Wyoming];
1822
+ const KNOWN_DISALLOWED_INDEX_DATASET_STATES = [StateCodesUS.California, StateCodesUS.Texas];
1812
1823
  function useBusinessData({
1813
1824
  handleCompanyIndexSearch,
1814
1825
  handleCompanyDeepSearch,
@@ -1843,7 +1854,7 @@ function useBusinessData({
1843
1854
  };
1844
1855
  const searchForBusiness = useCallback(async (data) => {
1845
1856
  if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
1846
- logger$I.log("Missing handlers for searchForBusiness");
1857
+ logger$J.log("Missing handlers for searchForBusiness");
1847
1858
  return;
1848
1859
  }
1849
1860
  if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
@@ -1860,7 +1871,7 @@ function useBusinessData({
1860
1871
  return response == null ? void 0 : response.results;
1861
1872
  } catch (e) {
1862
1873
  setSearching("error");
1863
- logger$I.error(e);
1874
+ logger$J.error(e);
1864
1875
  } finally {
1865
1876
  setCachedSearch(data);
1866
1877
  setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
@@ -1868,7 +1879,7 @@ function useBusinessData({
1868
1879
  }, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
1869
1880
  const fetchBusinessData = useCallback(async (company, state) => {
1870
1881
  if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
1871
- logger$I.log("Missing handlers for fetchBusinessData");
1882
+ logger$J.log("Missing handlers for fetchBusinessData");
1872
1883
  return;
1873
1884
  }
1874
1885
  if (cachedBusiness && objectsDeepEqual({
@@ -1884,28 +1895,39 @@ function useBusinessData({
1884
1895
  setFetching("loading");
1885
1896
  setVerifying("idle");
1886
1897
  setInvalidTin(false);
1898
+ if (state) {
1899
+ const businessData2 = isDataCompliant && !KNOWN_DISALLOWED_INDEX_DATASET_STATES.includes(state) ? await handleGetCompanyDataset({
1900
+ companyId: company.id,
1901
+ country: "US",
1902
+ state
1903
+ }) : await handleRefreshCompanyDataset({
1904
+ companyId: company.id,
1905
+ country: "US",
1906
+ state
1907
+ });
1908
+ setCachedBusiness(businessData2);
1909
+ return businessData2;
1910
+ }
1887
1911
  const businessData = isDataCompliant ? await handleGetCompanyDataset({
1888
1912
  companyId: company.id,
1889
1913
  country: "US"
1890
- // state: state as StateCodeUS,
1891
1914
  }) : await handleRefreshCompanyDataset({
1892
1915
  companyId: company.id,
1893
1916
  country: "US"
1894
- // state: state as StateCodeUS,
1895
1917
  });
1896
1918
  setCachedBusiness(businessData);
1897
1919
  return businessData;
1898
1920
  } catch (e) {
1899
1921
  setFetching("error");
1900
1922
  setCachedBusiness(void 0);
1901
- logger$I.error(e);
1923
+ logger$J.error(e);
1902
1924
  } finally {
1903
1925
  setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
1904
1926
  }
1905
1927
  }, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
1906
1928
  const verifyBusinessData = useCallback(async (data, tin) => {
1907
1929
  if (!handleVerifyTin) {
1908
- logger$I.log("Missing handlers for verifyBusinessData");
1930
+ logger$J.log("Missing handlers for verifyBusinessData");
1909
1931
  return;
1910
1932
  }
1911
1933
  try {
@@ -1926,7 +1948,7 @@ function useBusinessData({
1926
1948
  return matched;
1927
1949
  } catch (e) {
1928
1950
  setVerifying("error");
1929
- logger$I.error(e);
1951
+ logger$J.error(e);
1930
1952
  } finally {
1931
1953
  setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
1932
1954
  }
@@ -1937,7 +1959,7 @@ function useBusinessData({
1937
1959
  await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
1938
1960
  } catch (e) {
1939
1961
  setResettingTrustedData("error");
1940
- logger$I.error(e);
1962
+ logger$J.error(e);
1941
1963
  } finally {
1942
1964
  setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
1943
1965
  }
@@ -2032,6 +2054,7 @@ const formUtilities = (props, i18n) => ({
2032
2054
  },
2033
2055
  isReadOnly: (field) => props.readOnly || (props.readOnlyFields ? props.readOnlyFields.includes(field) : false),
2034
2056
  isObscured: (field) => props.obscuredFields ? props.obscuredFields.includes(field) : false,
2057
+ isTrusted: (field) => props.trustedFields ? props.trustedFields.includes(field) : false,
2035
2058
  getVal: (val) => i18n.get(val),
2036
2059
  getErrorMessage: (field, errors, fieldProblems) => {
2037
2060
  var _a;
@@ -2230,6 +2253,7 @@ const svgs = {
2230
2253
  "passport-cutoff": lazy(() => import("./passport-cut-off-B0WAEH9S.js")),
2231
2254
  "passport-front": lazy(() => import("./passport-front-DOkc7OdE.js")),
2232
2255
  "passport-glare": lazy(() => import("./passport-glare-DZiLpHLG.js")),
2256
+ "instant-verification-method": lazy(() => import("./instant-verification-method-NGPLGC6g.js")),
2233
2257
  "id-verification-instant": lazy(() => import("./id-verification-instant-JpZYE7gU.js")),
2234
2258
  "id-verification-manual": lazy(() => import("./id-verification-manual-CnkUMBXD.js")),
2235
2259
  "payout-verification-instant": lazy(() => import("./payout-verification-instant-D9r3JgYA.js")),
@@ -2240,14 +2264,14 @@ const svgs = {
2240
2264
  review: lazy(() => import("./review-C4CnZ2XP.js")),
2241
2265
  // id verification
2242
2266
  "onfido-logo": lazy(() => import("./onfido-logo-i_oduqdE.js")),
2243
- "tink-logo": lazy(() => import("./tink-logo-CXMbO28D.js")),
2267
+ "tink-logo": lazy(() => import("./tink-logo-WImtH5CL.js")),
2244
2268
  "singpass-logo": lazy(() => Promise.resolve().then(() => singpassLogo)),
2245
2269
  // payout verification
2246
2270
  "plaid-logo": lazy(() => import("./plaid-logo-4nYeR9iX.js")),
2247
2271
  "trustly-logo": lazy(() => import("./trustly-logo-YJslAOYF.js"))
2248
2272
  };
2249
2273
  const unscalableIconNames = ["bin", "check", "checkmark", "checkmark-small", "chevron-right", "chevron-left", "company", "contract", "cross", "decision-maker", "document", "download", "edit", "info-circle", "image", "location", "payout", "pci", "plus", "remove", "save", "search", "trust", "user", "upload", "warning"];
2250
- const logger$H = createLogger("Icon");
2274
+ const logger$I = createLogger("Icon");
2251
2275
  const Svg = ({
2252
2276
  className,
2253
2277
  name,
@@ -2258,7 +2282,7 @@ const Svg = ({
2258
2282
  const LazyLoadedSvg = svgs[name];
2259
2283
  const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
2260
2284
  if (!LazyLoadedSvg) {
2261
- logger$H.error(`No such svg: "${name}"`);
2285
+ logger$I.error(`No such svg: "${name}"`);
2262
2286
  return null;
2263
2287
  }
2264
2288
  return jsx("span", {
@@ -2312,6 +2336,7 @@ const Button = ({
2312
2336
  shaded,
2313
2337
  label = "",
2314
2338
  icon,
2339
+ iconPosition = "left",
2315
2340
  title,
2316
2341
  disabled = false,
2317
2342
  type = "button",
@@ -2347,11 +2372,12 @@ const Button = ({
2347
2372
  className: "adyen-kyc-link__icon"
2348
2373
  })]
2349
2374
  });
2350
- const buttonClasses = showAsLink ? cx("adyen-kyc-link", "adyen-kyc-link--icon-right", className, {
2375
+ const buttonClasses = showAsLink ? cx("adyen-kyc-link", className, {
2376
+ "adyen-kyc-link--icon-left": icon && iconPosition === "left",
2351
2377
  "adyen-kyc-link--with-icon": !!icon,
2352
2378
  "adyen-kyc-link__text-with-underline": underline
2353
2379
  }) : cx("adyen-kyc-button", className, {
2354
- "adyen-kyc-button--icon-left": !!icon,
2380
+ "adyen-kyc-button--icon-left": !!icon && iconPosition === "left",
2355
2381
  "adyen-kyc-button--secondary": secondary,
2356
2382
  "adyen-kyc-button--tertiary": tertiary && !secondary,
2357
2383
  "adyen-kyc-button--block": block,
@@ -2546,10 +2572,10 @@ function useFormRouterContext() {
2546
2572
  }
2547
2573
  return context;
2548
2574
  }
2549
- const logger$G = createLogger("Link");
2575
+ const logger$H = createLogger("Link");
2550
2576
  const isValidLink = (href) => {
2551
2577
  if (href === "#") {
2552
- logger$G.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2578
+ logger$H.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2553
2579
  return false;
2554
2580
  }
2555
2581
  return true;
@@ -2561,16 +2587,18 @@ const Link = ({
2561
2587
  external,
2562
2588
  icon,
2563
2589
  showAsButton,
2564
- onClick
2590
+ onClick,
2591
+ iconPosition = "left"
2565
2592
  }) => {
2566
2593
  if (!isValidLink(href)) return null;
2567
2594
  const target = external ? "_blank" : "_self";
2568
2595
  const rel = external ? "external noopener noreferrer" : void 0;
2569
2596
  const showIcon = icon || external;
2570
2597
  const classNames = showAsButton ? cx("adyen-kyc-button", className, {
2571
- "adyen-kyc-button--icon": showIcon
2598
+ "adyen-kyc-button--icon-left": iconPosition === "left"
2572
2599
  }) : cx("adyen-kyc-link", className, {
2573
- "adyen-kyc-link--with-icon": showIcon
2600
+ "adyen-kyc-link--with-icon": showIcon,
2601
+ "adyen-kyc-link--icon-left": iconPosition === "left"
2574
2602
  });
2575
2603
  return jsxs("a", {
2576
2604
  href,
@@ -2831,9 +2859,10 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
2831
2859
  ExperimentNames2["EnableAgeVerification"] = "EnableAgeVerification";
2832
2860
  ExperimentNames2["PreserveMismatchedInitialValues"] = "PreserveMismatchedInitialValues";
2833
2861
  ExperimentNames2["StrictNameAndAddressValidationV4"] = "StrictNameAndAddressValidationV4";
2834
- ExperimentNames2["EnableIdentificationNationalityCrossBorderAssociateCheck"] = "EnableIdentificationNationalityCrossBorderAssociateCheck";
2862
+ ExperimentNames2["EnableNationalitySGHK"] = "EnableNationalitySGHK";
2835
2863
  ExperimentNames2["EnableAUGovernmentalOrganizationSkipRegistrationNumber"] = "EnableAUGovernmentalOrganizationSkipRegistrationNumber";
2836
2864
  ExperimentNames2["EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation"] = "EnableMinimalRegistrationNumberValidationForAuIncorporatedAssociation";
2865
+ ExperimentNames2["EnablePreferInstantVerificationFlow"] = "EnablePreferInstantVerificationFlow";
2837
2866
  return ExperimentNames2;
2838
2867
  })(ExperimentNames || {});
2839
2868
  const ON_CHANGE_DEBOUNCE_DURATION = 200;
@@ -2894,7 +2923,7 @@ const useSetting = (settingName) => {
2894
2923
  } = context;
2895
2924
  return getSetting(settingName);
2896
2925
  };
2897
- const logger$F = createLogger("useAllowedCountries");
2926
+ const logger$G = createLogger("useAllowedCountries");
2898
2927
  const useAllowedCountries = () => {
2899
2928
  const acceptedCountries = useSetting("acceptedCountries");
2900
2929
  const {
@@ -2903,7 +2932,7 @@ const useAllowedCountries = () => {
2903
2932
  const [allowedCountries, setAllowedCountries] = useState(acceptedCountries);
2904
2933
  useEffect(() => {
2905
2934
  if (acceptedCountries !== void 0) return;
2906
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$F.error);
2935
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$G.error);
2907
2936
  }, [acceptedCountries]);
2908
2937
  return allowedCountries;
2909
2938
  };
@@ -3262,7 +3291,7 @@ function reducer({
3262
3291
  }
3263
3292
  };
3264
3293
  }
3265
- const logger$E = createLogger("useAsyncValidator");
3294
+ const logger$F = createLogger("useAsyncValidator");
3266
3295
  const useAsyncValidator = (asyncRules) => {
3267
3296
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
3268
3297
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -3283,7 +3312,7 @@ const useAsyncValidator = (asyncRules) => {
3283
3312
  hasError: !isValid
3284
3313
  }])
3285
3314
  });
3286
- }).catch(logger$E.error);
3315
+ }).catch(logger$F.error);
3287
3316
  }, [asyncRules, clearAsyncValidationResults]);
3288
3317
  return {
3289
3318
  asyncValidationResults,
@@ -3844,7 +3873,7 @@ const SelectButtonContentSingle = ({
3844
3873
  className: "adyen-kyc-dropdown-button-search__icon"
3845
3874
  }), jsx("span", {
3846
3875
  className: cx("adyen-kyc-dropdown-button__text", {
3847
- "adyen-kyc-dropdown-button__text--placeholder": !activeSingle && placeholder
3876
+ "adyen-kyc-dropdown-button__text--placeholder": !hideSearchIcon ? !activeSingle && placeholder : !activeSingle && placeholder && !textFilter
3848
3877
  }),
3849
3878
  children: (activeSingle == null ? void 0 : activeSingle.selectedOptionName) || (activeSingle == null ? void 0 : activeSingle.name) || textFilter || placeholder
3850
3879
  })]
@@ -7236,7 +7265,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
7236
7265
  };
7237
7266
  };
7238
7267
  const MISMATCH_ANIMATION_NAME = "mismatchShake";
7239
- const logger$D = createLogger("MaskedInputText");
7268
+ const logger$E = createLogger("MaskedInputText");
7240
7269
  const MaskedInputText = ({
7241
7270
  value,
7242
7271
  onInput,
@@ -7285,7 +7314,7 @@ const MaskedInputText = ({
7285
7314
  };
7286
7315
  useEffect(() => {
7287
7316
  if (!mask) {
7288
- logger$D.warn("`mask` is undefined. No masking of input will take place.");
7317
+ logger$E.warn("`mask` is undefined. No masking of input will take place.");
7289
7318
  }
7290
7319
  }, [mask]);
7291
7320
  const getMaskResult = useCallback((pureValue) => {
@@ -7310,13 +7339,13 @@ const MaskedInputText = ({
7310
7339
  return;
7311
7340
  }
7312
7341
  if (preserveMismatchingInitialValue) {
7313
- logger$D.warn(`Value received "${value}" does not match mask`, maskResult, `
7342
+ logger$E.warn(`Value received "${value}" does not match mask`, maskResult, `
7314
7343
  Preserving mismatched initial value until user input.`);
7315
7344
  setPreservingMismatchedValue(true);
7316
7345
  return;
7317
7346
  }
7318
7347
  const fallback = displayValueToPure(maskResult.partialDisplayValue);
7319
- logger$D.warn(`Value received "${value}" does not match mask`, maskResult, `
7348
+ logger$E.warn(`Value received "${value}" does not match mask`, maskResult, `
7320
7349
  Falling back to partially valid value "${fallback}"`);
7321
7350
  onInput(fallback);
7322
7351
  }
@@ -9973,6 +10002,9 @@ const businessDetailsBase = {
9973
10002
  },
9974
10003
  registrationNumber: {
9975
10004
  rule: "countryRequiresRegistrationNumberForCompanies"
10005
+ },
10006
+ exemptedFromRegistrationNumber: {
10007
+ rule: "companyRegistrationNumberExemptionAllowed"
9976
10008
  }
9977
10009
  };
9978
10010
  const taxInformationBase$1 = {
@@ -10094,6 +10126,9 @@ const countryConfig$3 = {
10094
10126
  [CountryCodes.Australia]: {
10095
10127
  legalEntityType: {
10096
10128
  label: "companyType"
10129
+ },
10130
+ exemptedFromTax: {
10131
+ label: "doNotHaveAbn"
10097
10132
  }
10098
10133
  },
10099
10134
  [CountryCodes.Austria]: {
@@ -10152,6 +10187,9 @@ const countryConfig$3 = {
10152
10187
  },
10153
10188
  tradingName: {
10154
10189
  label: "businessName"
10190
+ },
10191
+ exemptedFromRegistrationNumber: {
10192
+ label: "iDoNotHaveCompanyRegistrationNumber"
10155
10193
  }
10156
10194
  },
10157
10195
  [CountryCodes.Hungary]: {},
@@ -10372,45 +10410,6 @@ const RadioCard = ({
10372
10410
  })]
10373
10411
  }, optionId);
10374
10412
  };
10375
- function RadioCardSelect({
10376
- options,
10377
- name,
10378
- onSelect,
10379
- selected,
10380
- isInvalid,
10381
- uniqueId,
10382
- className,
10383
- optionId,
10384
- optionName,
10385
- optionDescription,
10386
- optionSubtitle,
10387
- optionClassNames,
10388
- renderOptionIcon,
10389
- renderOptionBody,
10390
- renderOptionFooter,
10391
- isOptionDisabled
10392
- }) {
10393
- const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
10394
- return jsx("div", {
10395
- className: className ?? "adyen-kyc-radio-group-card",
10396
- children: options.map((option) => jsx(RadioCard, {
10397
- optionId: optionId(option),
10398
- optionName: optionName(option),
10399
- optionDescription: optionDescription == null ? void 0 : optionDescription(option),
10400
- optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
10401
- uniqueId: getUniqueId(uniqueIdBase),
10402
- isInvalid,
10403
- isSelected: selected === option,
10404
- onSelect: () => onSelect(option),
10405
- name,
10406
- classNames: optionClassNames == null ? void 0 : optionClassNames(option),
10407
- icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
10408
- body: renderOptionBody == null ? void 0 : renderOptionBody(option),
10409
- footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
10410
- disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
10411
- }, optionId(option)))
10412
- });
10413
- }
10414
10413
  function RadioGroupCard({
10415
10414
  items,
10416
10415
  name,
@@ -10971,7 +10970,7 @@ function Dropzone(props) {
10971
10970
  })]
10972
10971
  });
10973
10972
  }
10974
- const logger$C = createLogger("TextArea");
10973
+ const logger$D = createLogger("TextArea");
10975
10974
  function TextArea(props) {
10976
10975
  const {
10977
10976
  classNameModifiers,
@@ -10992,7 +10991,7 @@ function TextArea(props) {
10992
10991
  } = useI18nContext();
10993
10992
  const [value, setValue] = useState("");
10994
10993
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
10995
- logger$C.error("Error: Form fields that rely on InputBase may not have an onChange property");
10994
+ logger$D.error("Error: Form fields that rely on InputBase may not have an onChange property");
10996
10995
  }
10997
10996
  const handleInput = (e) => {
10998
10997
  var _a;
@@ -11216,6 +11215,9 @@ const ADDRESS_SCHEMAS = {
11216
11215
  [CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
11217
11216
  default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
11218
11217
  };
11218
+ const CONDENSED_ADDRESS_FIELDS = {
11219
+ [CountryCodes.UnitedStates]: [CITY, STATE, POSTAL_CODE]
11220
+ };
11219
11221
  const LABELS = {
11220
11222
  city: {
11221
11223
  default: CITY,
@@ -11250,7 +11252,7 @@ const LABELS = {
11250
11252
  [CountryCodes.Australia]: "selectState",
11251
11253
  [CountryCodes.Brazil]: "selectState",
11252
11254
  [CountryCodes.Canada]: "selectProvinceOrTerritory",
11253
- [CountryCodes.UnitedStates]: "selectState"
11255
+ [CountryCodes.UnitedStates]: "stateOrProvince__placeHolder__US"
11254
11256
  },
11255
11257
  address: {
11256
11258
  default: ADDRESS
@@ -11443,7 +11445,7 @@ function useIsElementVisible(ref, fallback = true) {
11443
11445
  }, [ref]);
11444
11446
  return isOnScreen;
11445
11447
  }
11446
- const logger$B = createLogger("SearchAddress");
11448
+ const logger$C = createLogger("SearchAddress");
11447
11449
  const SearchAddress = ({
11448
11450
  data,
11449
11451
  legalEntityId,
@@ -11487,7 +11489,7 @@ const SearchAddress = ({
11487
11489
  const response = await handleFindAddress(selectedAddressId);
11488
11490
  autocompleteAddressForm(response);
11489
11491
  } catch (e) {
11490
- logger$B.error(e);
11492
+ logger$C.error(e);
11491
11493
  }
11492
11494
  };
11493
11495
  const onDrilldown = async (selectedAddress) => {
@@ -11499,7 +11501,7 @@ const SearchAddress = ({
11499
11501
  }, legalEntityId);
11500
11502
  setItems((response == null ? void 0 : response.results) || []);
11501
11503
  } catch (e) {
11502
- logger$B.error(e);
11504
+ logger$C.error(e);
11503
11505
  }
11504
11506
  };
11505
11507
  const onChange = (e) => {
@@ -11554,7 +11556,7 @@ const SearchAddress = ({
11554
11556
  setItems([]);
11555
11557
  }
11556
11558
  } catch (e) {
11557
- logger$B.error(e);
11559
+ logger$C.error(e);
11558
11560
  }
11559
11561
  setLoading(false);
11560
11562
  }
@@ -12324,7 +12326,7 @@ Address.defaultProps = {
12324
12326
  requiredFields: ADDRESS_SCHEMA,
12325
12327
  countryCode: null
12326
12328
  };
12327
- const logger$A = createLogger("AddressFieldContainer");
12329
+ const logger$B = createLogger("AddressFieldContainer");
12328
12330
  const formatAddressItem = (item) => {
12329
12331
  if (item.description.includes("Addresses")) {
12330
12332
  const splittedDescription = item.description.split(" - ");
@@ -12478,7 +12480,7 @@ function FieldContainerComponent({
12478
12480
  setItems([]);
12479
12481
  }
12480
12482
  } catch (e) {
12481
- logger$A.error(e);
12483
+ logger$B.error(e);
12482
12484
  }
12483
12485
  setLoading(false);
12484
12486
  };
@@ -12512,7 +12514,7 @@ function FieldContainerComponent({
12512
12514
  });
12513
12515
  }
12514
12516
  } catch (e) {
12515
- logger$A.error(e);
12517
+ logger$B.error(e);
12516
12518
  }
12517
12519
  };
12518
12520
  const onDrilldown = async (address) => {
@@ -12525,7 +12527,7 @@ function FieldContainerComponent({
12525
12527
  }, legalEntityId));
12526
12528
  setItems((response == null ? void 0 : response.results) || []);
12527
12529
  } catch (e) {
12528
- logger$A.error(e);
12530
+ logger$B.error(e);
12529
12531
  }
12530
12532
  };
12531
12533
  const handleOnChange = (e) => {
@@ -12568,7 +12570,9 @@ function FieldContainerComponent({
12568
12570
  getSearchItem: (item) => generateSearchListItem(item, i18n),
12569
12571
  showSearchList,
12570
12572
  resetSearch,
12571
- searchText
12573
+ searchText,
12574
+ readonly: Boolean(readOnly),
12575
+ placeholder: i18n.get("address__placeHolder")
12572
12576
  })
12573
12577
  }) : jsx(Field, {
12574
12578
  name: field,
@@ -12589,7 +12593,7 @@ function FieldContainerComponent({
12589
12593
  "aria-label": i18n.get(labelKey),
12590
12594
  "aria-invalid": !(valid == null ? void 0 : valid[field]),
12591
12595
  trimOnBlur,
12592
- readonly: readOnly
12596
+ readonly: Boolean(readOnly)
12593
12597
  })
12594
12598
  });
12595
12599
  case "country":
@@ -12650,7 +12654,7 @@ function FieldContainerComponent({
12650
12654
  "aria-label": i18n.get(labelKey),
12651
12655
  "aria-invalid": !(valid == null ? void 0 : valid[field]),
12652
12656
  trimOnBlur,
12653
- readonly: readOnly
12657
+ readonly: Boolean(readOnly)
12654
12658
  })
12655
12659
  });
12656
12660
  }
@@ -12669,13 +12673,15 @@ function AddressComponent({
12669
12673
  requiredFields,
12670
12674
  optionalFields = ["otherAddressInformation"],
12671
12675
  readOnlyFields,
12676
+ obscuredFields,
12672
12677
  trustedFields,
12673
12678
  shouldValidate,
12674
12679
  handleAddressSearch,
12675
12680
  handleFindAddress,
12676
12681
  onChange,
12677
12682
  legalEntityId,
12678
- verifiedAddress
12683
+ verifiedAddress,
12684
+ condensed
12679
12685
  }) {
12680
12686
  const {
12681
12687
  i18n
@@ -12707,8 +12713,8 @@ function AddressComponent({
12707
12713
  rules: isStrictNameAndAddressValidationEnabled ? rulesV4 : rules2,
12708
12714
  fieldProblems: fieldValidationErrors,
12709
12715
  optionalFields,
12710
- obscuredFields: [],
12711
- trustedFields: [],
12716
+ obscuredFields,
12717
+ trustedFields,
12712
12718
  shouldValidate
12713
12719
  });
12714
12720
  useEffect(
@@ -12754,7 +12760,7 @@ function AddressComponent({
12754
12760
  maxlength: getMaxLengthByFieldAndCountry(countrySpecificFormatters, fieldName, formData.country),
12755
12761
  hideField,
12756
12762
  "aria-label": formUtils.getLabel(fieldName, fieldName),
12757
- readOnly: formUtils.isReadOnly(fieldName),
12763
+ readOnly: formUtils.isReadOnly(fieldName) || formUtils.isTrusted(fieldName),
12758
12764
  optional: formUtils.isOptionalField(fieldName),
12759
12765
  trimOnBlur: true,
12760
12766
  legalEntityId,
@@ -12763,8 +12769,26 @@ function AddressComponent({
12763
12769
  handleFindAddress
12764
12770
  }, fieldName);
12765
12771
  };
12772
+ if (condensed && (data == null ? void 0 : data.country)) {
12773
+ const condensedFields = CONDENSED_ADDRESS_FIELDS[data.country] ?? [];
12774
+ switch (data == null ? void 0 : data.country) {
12775
+ case "US":
12776
+ return jsxs("fieldset", {
12777
+ className: "adyen-kyc-address",
12778
+ children: [formSchema.filter((field) => !condensedFields.includes(field)).map((filteredField) => createFieldComponent(filteredField)), condensedFields.length && jsx("div", {
12779
+ className: "adyen-kyc-address__condensed-fields",
12780
+ children: condensedFields.map((field) => createFieldComponent(field))
12781
+ })]
12782
+ });
12783
+ default:
12784
+ return jsx("fieldset", {
12785
+ className: "adyen-kyc-address",
12786
+ children: formSchema.map((field) => createFieldComponent(field))
12787
+ });
12788
+ }
12789
+ }
12766
12790
  return jsx("fieldset", {
12767
- className: "adyen-kyc__address",
12791
+ className: "adyen-kyc-address",
12768
12792
  children: formSchema.map((field) => createFieldComponent(field))
12769
12793
  });
12770
12794
  }
@@ -13589,6 +13613,7 @@ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
13589
13613
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
13590
13614
  const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
13591
13615
  const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
13616
+ const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS = [CountryCodes.HongKong];
13592
13617
  const COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER = [
13593
13618
  CountryCodes.Canada
13594
13619
  // CountryCodes.UnitedStates,
@@ -13612,7 +13637,8 @@ const rules$3 = ({
13612
13637
  data,
13613
13638
  country,
13614
13639
  taskType,
13615
- isExperimentEnabled = () => false
13640
+ isExperimentEnabled = () => false,
13641
+ accountHolder
13616
13642
  }) => ({
13617
13643
  countryRequiresStateOrProvince: () => {
13618
13644
  if (COUNTRIES_WITH_STATES_DATASET.includes(country)) {
@@ -13661,6 +13687,9 @@ const rules$3 = ({
13661
13687
  return "REQUIRED";
13662
13688
  }
13663
13689
  }
13690
+ if (COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_ORGANIZATIONS.includes(country)) {
13691
+ return "REQUIRED";
13692
+ }
13664
13693
  },
13665
13694
  countryOfGoverningLawRequired: () => {
13666
13695
  var _a, _b;
@@ -13703,6 +13732,9 @@ const rules$3 = ({
13703
13732
  }
13704
13733
  },
13705
13734
  countryHasTaxExemptionsForSomeCompanies: () => {
13735
+ if (taskType === TaskTypes.COMPANY && country === CountryCodes.Australia && accountHolder === "aTrust") {
13736
+ return "REQUIRED";
13737
+ }
13706
13738
  if (COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES.includes(country)) {
13707
13739
  return "REQUIRED";
13708
13740
  }
@@ -13718,73 +13750,90 @@ const rules$3 = ({
13718
13750
  }
13719
13751
  }
13720
13752
  });
13753
+ const logger$A = createLogger("mapPayoutAccountSchemaToApiBankAccount");
13721
13754
  const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCountry) => {
13722
13755
  var _a;
13723
13756
  if ("iban" in payoutAccount && payoutAccount.iban) return {
13724
13757
  type: "iban",
13725
13758
  iban: payoutAccount.iban
13726
13759
  };
13727
- const countryPrefix = bankCountry === "GB" ? "uk" : bankCountry.toLowerCase();
13728
- const localAccount = {
13729
- type: `${countryPrefix}Local`,
13730
- accountNumber: payoutAccount.bankAccountNumber
13731
- };
13732
- switch (localAccount.type) {
13733
- case "auLocal":
13760
+ switch (bankCountry) {
13761
+ case CountryCodes.Australia:
13734
13762
  return {
13735
- ...localAccount,
13763
+ type: "auLocal",
13764
+ accountNumber: payoutAccount.bankAccountNumber,
13736
13765
  bsbCode: payoutAccount.branchCode
13737
13766
  };
13738
- case "caLocal":
13767
+ case CountryCodes.Canada:
13739
13768
  return {
13740
- ...localAccount,
13769
+ type: "caLocal",
13770
+ accountNumber: payoutAccount.bankAccountNumber,
13741
13771
  institutionNumber: payoutAccount.bankCode,
13742
13772
  transitNumber: payoutAccount.branchCode
13743
13773
  };
13744
- case "czLocal":
13774
+ case CountryCodes.CzechRepublic:
13745
13775
  return {
13746
- ...localAccount,
13776
+ type: "czLocal",
13777
+ accountNumber: payoutAccount.bankAccountNumber,
13747
13778
  bankCode: payoutAccount.bankCode
13748
13779
  };
13749
- case "dkLocal":
13780
+ case CountryCodes.Denmark:
13750
13781
  return {
13751
- ...localAccount,
13782
+ type: "dkLocal",
13783
+ accountNumber: payoutAccount.bankAccountNumber,
13752
13784
  bankCode: payoutAccount.bankCode
13753
13785
  };
13754
- case "hkLocal":
13786
+ case CountryCodes.HongKong:
13755
13787
  return {
13756
- ...localAccount,
13788
+ type: "hkLocal",
13789
+ accountNumber: payoutAccount.bankAccountNumber,
13757
13790
  clearingCode: payoutAccount.bankCode
13758
13791
  };
13759
- case "nzLocal":
13792
+ case CountryCodes.NewZealand:
13760
13793
  return {
13761
- ...localAccount,
13794
+ type: "nzLocal",
13762
13795
  accountNumber: (_a = payoutAccount.bankAccountNumber) == null ? void 0 : _a.replaceAll("-", "")
13763
13796
  };
13764
- case "seLocal":
13797
+ case CountryCodes.Sweden:
13765
13798
  return {
13766
- ...localAccount,
13799
+ type: "seLocal",
13800
+ accountNumber: payoutAccount.bankAccountNumber,
13767
13801
  clearingNumber: payoutAccount.branchCode
13768
13802
  };
13769
- case "sgLocal":
13803
+ case CountryCodes.Singapore:
13770
13804
  return {
13771
- ...localAccount,
13805
+ type: "sgLocal",
13806
+ accountNumber: payoutAccount.bankAccountNumber,
13772
13807
  bic: payoutAccount.swiftCode
13773
13808
  };
13774
- case "ukLocal":
13809
+ case CountryCodes.IsleOfMan:
13810
+ case CountryCodes.Guernsey:
13811
+ case CountryCodes.Gibraltar:
13812
+ case CountryCodes.Jersey:
13813
+ case CountryCodes.UnitedKingdom:
13775
13814
  return {
13776
- ...localAccount,
13815
+ type: "ukLocal",
13816
+ // for some reason GB's account identification is called `ukLocalAccountIdentification`
13817
+ accountNumber: payoutAccount.bankAccountNumber,
13777
13818
  sortCode: payoutAccount.branchCode
13778
13819
  };
13779
- case "usLocal":
13820
+ case CountryCodes.NorthernMarianaIslands:
13821
+ case CountryCodes.Guam:
13822
+ case CountryCodes.VirginIslandsUS:
13823
+ case CountryCodes.AmericanSamoa:
13824
+ case CountryCodes.PuertoRico:
13825
+ case CountryCodes.UnitedStates:
13780
13826
  return {
13781
- ...localAccount,
13827
+ type: "usLocal",
13828
+ accountNumber: payoutAccount.bankAccountNumber,
13782
13829
  routingNumber: payoutAccount.branchCode
13783
13830
  };
13784
- case "huLocal":
13785
- case "plLocal":
13786
13831
  default:
13787
- return localAccount;
13832
+ logger$A.log(`${bankCountry.toLowerCase()}Local is not a configured region`);
13833
+ return {
13834
+ type: `${bankCountry.toLowerCase()}Local`,
13835
+ accountNumber: payoutAccount.bankAccountNumber
13836
+ };
13788
13837
  }
13789
13838
  };
13790
13839
  const mapPayoutAccountSchemaToApiBankAccount = (payoutAccount, bankCountry) => ({
@@ -14870,7 +14919,7 @@ const useIdVerificationToken = ({
14870
14919
  };
14871
14920
  const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
14872
14921
  const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
14873
- const styles$4 = {
14922
+ const styles$5 = {
14874
14923
  "loader-wrapper-loader": "adyen-kyc-loader-wrapper-loader",
14875
14924
  loaderWrapperLoader,
14876
14925
  "loader-wrapper-loader-active": "adyen-kyc-loader-wrapper-loader-active",
@@ -14889,10 +14938,10 @@ const LoaderWrapper = ({
14889
14938
  } : {
14890
14939
  opacity: 1
14891
14940
  };
14892
- const loaderWrapperClass = cx(styles$4.loaderWrapperLoader, {
14893
- [styles$4.loaderWrapperLoaderActive]: status === "loading" && showSpinner
14941
+ const loaderWrapperClass = cx(styles$5.loaderWrapperLoader, {
14942
+ [styles$5.loaderWrapperLoaderActive]: status === "loading" && showSpinner
14894
14943
  });
14895
- const overlayClass = cx(styles$4.loaderWrapper, className);
14944
+ const overlayClass = cx(styles$5.loaderWrapper, className);
14896
14945
  return jsxs("div", {
14897
14946
  className: overlayClass,
14898
14947
  style: {
@@ -14904,7 +14953,7 @@ const LoaderWrapper = ({
14904
14953
  size: loaderSize
14905
14954
  })
14906
14955
  }), jsx("div", {
14907
- className: styles$4.loaderWrapperForm,
14956
+ className: styles$5.loaderWrapperForm,
14908
14957
  style: opacitySyle,
14909
14958
  children
14910
14959
  })]
@@ -15157,6 +15206,45 @@ function IdDocumentUploadComponent(props) {
15157
15206
  ...props
15158
15207
  });
15159
15208
  }
15209
+ function RadioCardSelect({
15210
+ options,
15211
+ name,
15212
+ onSelect,
15213
+ selected,
15214
+ isInvalid,
15215
+ uniqueId,
15216
+ className,
15217
+ optionId,
15218
+ optionName,
15219
+ optionDescription,
15220
+ optionSubtitle,
15221
+ optionClassNames,
15222
+ renderOptionIcon,
15223
+ renderOptionBody,
15224
+ renderOptionFooter,
15225
+ isOptionDisabled
15226
+ }) {
15227
+ const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
15228
+ return jsx("div", {
15229
+ className: className ?? "adyen-kyc-radio-group-card",
15230
+ children: options.map((option) => jsx(RadioCard, {
15231
+ optionId: optionId(option),
15232
+ optionName: optionName(option),
15233
+ optionDescription: optionDescription == null ? void 0 : optionDescription(option),
15234
+ optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
15235
+ uniqueId: getUniqueId(uniqueIdBase),
15236
+ isInvalid,
15237
+ isSelected: selected === option,
15238
+ onSelect: () => onSelect(option),
15239
+ name,
15240
+ classNames: optionClassNames == null ? void 0 : optionClassNames(option),
15241
+ icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
15242
+ body: renderOptionBody == null ? void 0 : renderOptionBody(option),
15243
+ footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
15244
+ disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
15245
+ }, optionId(option)))
15246
+ });
15247
+ }
15160
15248
  const idVerificationMethodsMetadata = {
15161
15249
  instantVerification: {
15162
15250
  name: "instantVerification",
@@ -18130,16 +18218,13 @@ function IndividualComponent(props) {
18130
18218
  }, [props.activeForm, idVerificationMethodSelected, props.handleGetIdVerificationToken, (_f = data == null ? void 0 : data.idDocument) == null ? void 0 : _f.instantIdVerificationData, (_h = (_g = props.data) == null ? void 0 : _g.idDocument) == null ? void 0 : _h.idDocumentType]);
18131
18219
  const addressSchema = getAddressSchemaForCountry((_i = data == null ? void 0 : data.personalDetails) == null ? void 0 : _i.residencyCountry).filter((field) => {
18132
18220
  var _a2;
18133
- if (!COUNTRIES_WITH_STATES_DATASET.includes((_a2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a2.residencyCountry)) {
18134
- return field !== "otherAddressInformation" && field !== "stateOrProvince";
18135
- }
18136
- return field !== "otherAddressInformation";
18221
+ return !COUNTRIES_WITH_STATES_DATASET.includes((_a2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a2.residencyCountry) ? field !== "stateOrProvince" : true;
18137
18222
  });
18138
18223
  const {
18139
18224
  updateStateSlice
18140
18225
  } = useGlobalDataSlice("address");
18141
18226
  const renderActiveForm = (activeForm) => {
18142
- var _a2, _b2;
18227
+ var _a2, _b2, _c2;
18143
18228
  return jsxs(Fragment, {
18144
18229
  children: [jsx(StateContextWatcher, {
18145
18230
  owner: "IndividualComponent",
@@ -18185,6 +18270,7 @@ function IndividualComponent(props) {
18185
18270
  },
18186
18271
  requiredFields: addressSchema,
18187
18272
  optionalFields: ["otherAddressInformation"],
18273
+ trustedFields: (_b2 = props.trustedFields) == null ? void 0 : _b2.address,
18188
18274
  legalEntityId: props.legalEntityId,
18189
18275
  handleAddressSearch: props.handleAddressSearch,
18190
18276
  handleFindAddress: props.handleFindAddress,
@@ -18198,7 +18284,7 @@ function IndividualComponent(props) {
18198
18284
  ...idVerificationMethodFormProps,
18199
18285
  name: fullName,
18200
18286
  id: idVerificationMethodFormID,
18201
- countryOfResidence: (_b2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b2.residencyCountry
18287
+ countryOfResidence: (_c2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _c2.residencyCountry
18202
18288
  })
18203
18289
  }), jsx("div", {
18204
18290
  className: activeForm.formId !== idDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
@@ -20779,7 +20865,8 @@ function PayoutAccountComponent(props) {
20779
20865
  ...bankCityProps,
20780
20866
  dataStoreId: id
20781
20867
  }), shouldShowPayoutAlert(country) && jsx(Alert, {
20782
- title: getSupportedCurrencyGuidance(i18n, country, requiredFields)
20868
+ title: getSupportedCurrencyGuidance(i18n, country, requiredFields),
20869
+ className: "adyen-kyc-u-margin-bottom-8"
20783
20870
  }), jsx(Typography, {
20784
20871
  variant: "caption",
20785
20872
  color: "tertiary",
@@ -20897,6 +20984,188 @@ const AccountHolderDescriptionFragment = ({
20897
20984
  })]
20898
20985
  });
20899
20986
  };
20987
+ function Card({
20988
+ className,
20989
+ children,
20990
+ stateful,
20991
+ active,
20992
+ disabled,
20993
+ fetching,
20994
+ warning,
20995
+ warningMessage,
20996
+ title,
20997
+ subTitle,
20998
+ headerButton,
20999
+ background = "primary",
21000
+ onClick,
21001
+ onKeyDown
21002
+ }) {
21003
+ const classNames = cx("adyen-kyc-card", className, {
21004
+ "adyen-kyc-card--stateful": stateful,
21005
+ "adyen-kyc-card--active": stateful && active,
21006
+ "adyen-kyc-card--disabled": disabled,
21007
+ "adyen-kyc-card--fetching": fetching,
21008
+ "adyen-kyc-card--secondary": background === "secondary"
21009
+ });
21010
+ const headerClassNames = cx("adyen-kyc-card__header", {
21011
+ "adyen-kyc-card__header--button": headerButton
21012
+ });
21013
+ const tabIndex = stateful ? 0 : void 0;
21014
+ const role = stateful ? "button" : void 0;
21015
+ const onClickHandler = (e) => {
21016
+ if (disabled) {
21017
+ return;
21018
+ }
21019
+ onClick == null ? void 0 : onClick(e);
21020
+ };
21021
+ const onKeyDownHandler = (e) => {
21022
+ if (onKeyDown) {
21023
+ onKeyDown(e);
21024
+ }
21025
+ };
21026
+ return jsxs("article", {
21027
+ className: classNames,
21028
+ tabIndex,
21029
+ role,
21030
+ onClick: onClickHandler,
21031
+ onKeyDown: onKeyDownHandler,
21032
+ children: [title && jsxs("header", {
21033
+ className: headerClassNames,
21034
+ children: [jsxs("div", {
21035
+ className: "adyen-kyc-card-title",
21036
+ children: [jsx(Typography, {
21037
+ el: "h4",
21038
+ variant: "title",
21039
+ children: title
21040
+ }), subTitle && jsx(Typography, {
21041
+ el: "p",
21042
+ variant: "body",
21043
+ children: subTitle
21044
+ })]
21045
+ }), headerButton && headerButton]
21046
+ }), children && jsx("div", {
21047
+ role: "region",
21048
+ className: "adyen-kyc-card__body",
21049
+ children
21050
+ }), warning && jsx(Alert, {
21051
+ className: "adyen-kyc-card__warning",
21052
+ title: warningMessage,
21053
+ variant: "warning"
21054
+ })]
21055
+ });
21056
+ }
21057
+ const skeleton = "adyen-kyc-skeleton";
21058
+ const skeletonCircle = "adyen-kyc-skeleton-circle";
21059
+ const skeletonText = "adyen-kyc-skeleton-text";
21060
+ const styles$4 = {
21061
+ skeleton,
21062
+ "skeleton-circle": "adyen-kyc-skeleton-circle",
21063
+ skeletonCircle,
21064
+ "skeleton-text": "adyen-kyc-skeleton-text",
21065
+ skeletonText
21066
+ };
21067
+ const Skeleton = ({
21068
+ circle = false,
21069
+ text = false,
21070
+ height = "1em",
21071
+ width
21072
+ }) => {
21073
+ const classNames = cx(styles$4.skeleton, {
21074
+ [styles$4.skeletonCircle]: circle,
21075
+ [styles$4.skeletonText]: text
21076
+ });
21077
+ return jsx("div", {
21078
+ className: classNames,
21079
+ style: {
21080
+ height,
21081
+ width
21082
+ }
21083
+ });
21084
+ };
21085
+ const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-method";
21086
+ const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
21087
+ const preferInstantVerificationMethodImage = "adyen-kyc-prefer-instant-verification-method-image";
21088
+ const preferInstantVerificationMethodInstantButton = "adyen-kyc-prefer-instant-verification-method-instant-button";
21089
+ const preferInstantVerificationMethodManualButton = "adyen-kyc-prefer-instant-verification-method-manual-button";
21090
+ const preferInstantVerificationMethodManualButtonDark = "adyen-kyc-prefer-instant-verification-method-manual-button-dark";
21091
+ const styles$3 = {
21092
+ "prefer-instant-verification-method": "adyen-kyc-prefer-instant-verification-method",
21093
+ preferInstantVerificationMethod,
21094
+ "prefer-instant-verification-method-card": "adyen-kyc-prefer-instant-verification-method-card",
21095
+ preferInstantVerificationMethodCard,
21096
+ "prefer-instant-verification-method-image": "adyen-kyc-prefer-instant-verification-method-image",
21097
+ preferInstantVerificationMethodImage,
21098
+ "prefer-instant-verification-method-instant-button": "adyen-kyc-prefer-instant-verification-method-instant-button",
21099
+ preferInstantVerificationMethodInstantButton,
21100
+ "prefer-instant-verification-method-manual-button": "adyen-kyc-prefer-instant-verification-method-manual-button",
21101
+ preferInstantVerificationMethodManualButton,
21102
+ "prefer-instant-verification-method-manual-button-dark": "adyen-kyc-prefer-instant-verification-method-manual-button-dark",
21103
+ preferInstantVerificationMethodManualButtonDark
21104
+ };
21105
+ const getProviderIconName = (providerName) => {
21106
+ switch (providerName) {
21107
+ case "tink":
21108
+ return "tink-logo";
21109
+ case "trustly":
21110
+ return "trustly-logo";
21111
+ case "plaid":
21112
+ return "plaid-logo";
21113
+ default:
21114
+ return void 0;
21115
+ }
21116
+ };
21117
+ const PreferInstantVerificationMethod = ({
21118
+ providerName,
21119
+ bankInfoValidated,
21120
+ instantVerificationAvailable,
21121
+ selectVerificationMethod
21122
+ }) => {
21123
+ const {
21124
+ i18n
21125
+ } = useI18nContext();
21126
+ const iconName = getProviderIconName(providerName);
21127
+ return jsxs("div", {
21128
+ className: styles$3.preferInstantVerificationMethod,
21129
+ children: [providerName === "loading" ? jsx(Skeleton, {
21130
+ height: "21rem"
21131
+ }) : instantVerificationAvailable && jsx(Card, {
21132
+ background: "secondary",
21133
+ children: jsxs("div", {
21134
+ className: styles$3.preferInstantVerificationMethodCard,
21135
+ children: [jsx(Svg, {
21136
+ type: "image",
21137
+ name: "instant-verification-method",
21138
+ className: styles$3.preferInstantVerificationMethodImage
21139
+ }), jsx(Typography, {
21140
+ el: "p",
21141
+ variant: "body-stronger",
21142
+ children: i18n.get("instantlyConnectAndVerifyYourBankAccount")
21143
+ }), jsx(Button, {
21144
+ type: "button",
21145
+ label: i18n.get("connectWith", {
21146
+ values: {
21147
+ providerName: iconName ? "" : providerName
21148
+ }
21149
+ }),
21150
+ className: styles$3.preferInstantVerificationMethodInstantButton,
21151
+ onClick: () => selectVerificationMethod("instantVerification"),
21152
+ disabled: bankInfoValidated,
21153
+ icon: iconName,
21154
+ iconPosition: "right"
21155
+ })]
21156
+ })
21157
+ }), jsx(Button, {
21158
+ type: "button",
21159
+ label: i18n.get("addAccountManually"),
21160
+ tertiary: instantVerificationAvailable,
21161
+ className: cx(styles$3.preferInstantVerificationMethodManualButton, {
21162
+ [styles$3.preferInstantVerificationMethodManualButtonDark]: instantVerificationAvailable
21163
+ }),
21164
+ onClick: () => selectVerificationMethod("manualVerification"),
21165
+ disabled: bankInfoValidated
21166
+ })]
21167
+ });
21168
+ };
20900
21169
  const PayoutVerificationMethodOptionIcon = ({
20901
21170
  method,
20902
21171
  methodsMetadata
@@ -20956,16 +21225,26 @@ const getMustHaveSameAccountHolderNameText = (legalEntityType, accountHolderName
20956
21225
  });
20957
21226
  }
20958
21227
  };
20959
- const getInstantVerificationProvider = (bankVerificationProviders, bankCountry) => {
20960
- if (!bankVerificationProviders) return "loading";
20961
- const providerForCountry = bankVerificationProviders[bankCountry];
21228
+ const getInstantVerificationProvider = (bankVerificationProviders, bankCountry, loadingStatus) => {
21229
+ if (loadingStatus === "loading") return "loading";
21230
+ const providerForCountry = bankVerificationProviders == null ? void 0 : bankVerificationProviders[bankCountry];
20962
21231
  if (!providerForCountry) return void 0;
20963
21232
  return providerForCountry.toLowerCase();
20964
21233
  };
20965
21234
  function PayoutVerificationMethod(props) {
20966
21235
  var _a;
20967
21236
  const {
20968
- legalEntityResponse
21237
+ accountHolder,
21238
+ legalEntityResponse,
21239
+ bankVerificationVendors,
21240
+ heading,
21241
+ forms,
21242
+ country,
21243
+ validators: validators2,
21244
+ bankInfoValidated,
21245
+ instantVerificationAllowed,
21246
+ bankVendorsLoadingStatus,
21247
+ handleNextClick
20969
21248
  } = props;
20970
21249
  const {
20971
21250
  type: legalEntityType
@@ -20977,7 +21256,11 @@ function PayoutVerificationMethod(props) {
20977
21256
  const {
20978
21257
  isSettingEnabled
20979
21258
  } = useSettingsContext();
21259
+ const {
21260
+ isExperimentEnabled
21261
+ } = useExperimentsContext();
20980
21262
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
21263
+ const enablePreferInstantVerificationMethodFlow = isExperimentEnabled(ExperimentNames.EnablePreferInstantVerificationFlow);
20981
21264
  const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout);
20982
21265
  const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
20983
21266
  const {
@@ -20990,10 +21273,10 @@ function PayoutVerificationMethod(props) {
20990
21273
  ...props,
20991
21274
  schema: payoutVerificationMethodFields,
20992
21275
  defaultData: {
20993
- bankCountry: props.country,
21276
+ bankCountry: country,
20994
21277
  ...props.data
20995
21278
  },
20996
- rules: props.validators,
21279
+ rules: validators2,
20997
21280
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
20998
21281
  });
20999
21282
  const formUtils = formUtilities(props, i18n);
@@ -21010,31 +21293,79 @@ function PayoutVerificationMethod(props) {
21010
21293
  valid,
21011
21294
  fieldProblems
21012
21295
  }), [data, errors, fieldProblems, valid]);
21013
- const providerName = getInstantVerificationProvider(props.bankVerificationVendors, data.bankCountry);
21014
- const instantVerificationAvailable = Boolean(props.instantVerificationAllowed && providerName && providerName !== "loading");
21296
+ const providerName = useMemo(() => getInstantVerificationProvider(bankVerificationVendors, data.bankCountry, bankVendorsLoadingStatus), [bankVerificationVendors, data.bankCountry, bankVendorsLoadingStatus]);
21297
+ const instantVerificationAvailable = useMemo(() => Boolean(instantVerificationAllowed && providerName && providerName !== "loading"), [instantVerificationAllowed, providerName]);
21015
21298
  const methodsMetadata = makePayoutVerificationMethodsMetadata(providerName === "loading" ? void 0 : providerName);
21299
+ const selectVerificationMethod = (method) => {
21300
+ setHasSelectedMethod(true);
21301
+ handleChangeFor("payoutVerificationMethod")(method);
21302
+ };
21016
21303
  useEffect(() => {
21304
+ if (enablePreferInstantVerificationMethodFlow || bankInfoValidated) return;
21017
21305
  if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
21018
21306
  handleChangeFor("payoutVerificationMethod")("instantVerification");
21019
21307
  }
21020
21308
  if (!instantVerificationAvailable && data.payoutVerificationMethod !== "manualVerification") {
21021
21309
  handleChangeFor("payoutVerificationMethod")("manualVerification");
21022
21310
  }
21023
- }, [data.payoutVerificationMethod, handleChangeFor, instantVerificationAvailable, hasSelectedMethod]);
21024
- const selectVerificationMethod = (method) => {
21025
- setHasSelectedMethod(true);
21026
- handleChangeFor("payoutVerificationMethod")(method);
21027
- };
21311
+ }, [data.payoutVerificationMethod, handleChangeFor, instantVerificationAvailable, hasSelectedMethod, enablePreferInstantVerificationMethodFlow]);
21312
+ useEffect(() => {
21313
+ if (!enablePreferInstantVerificationMethodFlow) return;
21314
+ if (hasSelectedMethod && (forms == null ? void 0 : forms.find((val) => val.formId === (data.payoutVerificationMethod === "instantVerification" ? "payoutAccountVerification" : "payoutAccountDetails")))) {
21315
+ setTimeout(() => handleNextClick(), 50);
21316
+ setHasSelectedMethod(false);
21317
+ }
21318
+ }, [forms, hasSelectedMethod, data.payoutVerificationMethod, handleNextClick, enablePreferInstantVerificationMethodFlow]);
21319
+ useEffect(() => {
21320
+ if (!enablePreferInstantVerificationMethodFlow) return;
21321
+ if (!(bankVerificationVendors == null ? void 0 : bankVerificationVendors[data.bankCountry])) {
21322
+ selectVerificationMethod("manualVerification");
21323
+ }
21324
+ }, [bankVerificationVendors, enablePreferInstantVerificationMethodFlow]);
21028
21325
  const getProviderDisplayName = (providerName2) => providerName2.charAt(0).toUpperCase() + providerName2.slice(1);
21029
21326
  const {
21030
21327
  dataset: countries
21031
21328
  } = useDataset(datasetIdentifier.country);
21032
- const bankCountryName = ((_a = countries.find((country) => country.id === data.bankCountry)) == null ? void 0 : _a.name) ?? data.bankCountry;
21033
- const allowedBankCountries = getAllowedBankCountries(props.country);
21329
+ const bankCountryName = ((_a = countries.find((country2) => country2.id === data.bankCountry)) == null ? void 0 : _a.name) ?? data.bankCountry;
21330
+ const allowedBankCountries = getAllowedBankCountries(country);
21331
+ const countryField = jsx(CountryField, {
21332
+ data: {
21333
+ country: data.bankCountry
21334
+ },
21335
+ valid: {
21336
+ country: valid == null ? void 0 : valid.bankCountry
21337
+ },
21338
+ errors: {
21339
+ country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems)
21340
+ },
21341
+ labels: {
21342
+ country: formUtils.getLabel("bankCountry", "bankAccountCountryRegion")
21343
+ },
21344
+ readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
21345
+ allowedCountries: allowedBankCountries,
21346
+ classNameModifiers: ["country"],
21347
+ handleChangeFor: () => handleChangeFor("bankCountry", "input"),
21348
+ helperText: {
21349
+ country: intraRegionCrossBorderPayoutsAllowed ? void 0 : i18n.get(legalEntityType === LegalEntityType.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered")
21350
+ }
21351
+ });
21352
+ const description = jsx(Typography, {
21353
+ className: "adyen-kyc-u-margin-bottom-12",
21354
+ children: canChangeEntityType ? jsx(AccountHolderDescriptionFragment, {
21355
+ legalEntityResponse
21356
+ }) : jsxs(Fragment, {
21357
+ children: [i18n.get("textToVerifyAccount"), " ", jsx("span", {
21358
+ dangerouslySetInnerHTML: {
21359
+ __html: getMustHaveSameAccountHolderNameText(legalEntityType, accountHolder, i18n)
21360
+ }
21361
+ })]
21362
+ })
21363
+ });
21034
21364
  return jsxs("form", {
21035
21365
  className: "adyen-kyc-verification-method",
21036
21366
  children: [jsx(FormHeader, {
21037
- heading: props.heading
21367
+ heading,
21368
+ descriptionComponent: description
21038
21369
  }), instantVerificationError && jsx(Alert, {
21039
21370
  variant: "error",
21040
21371
  className: "adyen-kyc-instant-verification-error",
@@ -21042,37 +21373,12 @@ function PayoutVerificationMethod(props) {
21042
21373
  children: instantVerificationError.content && jsx("p", {
21043
21374
  children: instantVerificationError.content
21044
21375
  })
21045
- }), jsx("p", {
21046
- children: canChangeEntityType ? jsx(AccountHolderDescriptionFragment, {
21047
- legalEntityResponse
21048
- }) : jsxs(Fragment, {
21049
- children: [i18n.get("textToVerifyAccount"), " ", jsx("span", {
21050
- dangerouslySetInnerHTML: {
21051
- __html: getMustHaveSameAccountHolderNameText(legalEntityType, props.accountHolder, i18n)
21052
- }
21053
- })]
21054
- })
21055
- }), jsx(CountryField, {
21056
- data: {
21057
- country: data.bankCountry
21058
- },
21059
- valid: {
21060
- country: valid == null ? void 0 : valid.bankCountry
21061
- },
21062
- errors: {
21063
- country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems)
21064
- },
21065
- labels: {
21066
- country: formUtils.getLabel("bankCountry", "bankAccountCountryRegion")
21067
- },
21068
- readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1,
21069
- allowedCountries: allowedBankCountries,
21070
- classNameModifiers: ["country"],
21071
- handleChangeFor: () => handleChangeFor("bankCountry", "input"),
21072
- helperText: {
21073
- country: intraRegionCrossBorderPayoutsAllowed ? void 0 : i18n.get(legalEntityType === LegalEntityType.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered")
21074
- }
21075
- }), jsx(Field, {
21376
+ }), !enablePreferInstantVerificationMethodFlow || intraRegionCrossBorderPayoutsAllowed && allowedBankCountries.length > 1 ? countryField : void 0, enablePreferInstantVerificationMethodFlow ? jsx(PreferInstantVerificationMethod, {
21377
+ providerName,
21378
+ instantVerificationAvailable,
21379
+ bankInfoValidated,
21380
+ selectVerificationMethod
21381
+ }) : jsx(Field, {
21076
21382
  name: "verificationMethods",
21077
21383
  label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
21078
21384
  errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
@@ -21098,7 +21404,7 @@ function PayoutVerificationMethod(props) {
21098
21404
  optionClassNames: () => ({
21099
21405
  label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
21100
21406
  }),
21101
- isOptionDisabled: (option) => props.bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
21407
+ isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
21102
21408
  renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
21103
21409
  method,
21104
21410
  methodsMetadata
@@ -21114,7 +21420,7 @@ function PayoutVerificationMethod(props) {
21114
21420
  validationErrors: props == null ? void 0 : props.fieldValidationErrors,
21115
21421
  formUtils,
21116
21422
  id: "ariaErrorField"
21117
- }), providerName && hasLoaded(providerName) ? jsx(ContextGuidance, {
21423
+ }), !enablePreferInstantVerificationMethodFlow && providerName && hasLoaded(providerName) ? jsx(ContextGuidance, {
21118
21424
  page: "Instant verification with partner",
21119
21425
  titleId: "howDoesVerificationWithOurPartnerWorks",
21120
21426
  contentId: "bankVerificationWithPartnerSteps",
@@ -21199,6 +21505,8 @@ function PayoutDetailsComponent(props) {
21199
21505
  activeForm,
21200
21506
  legalEntityResponse,
21201
21507
  associatedLegalArrangement,
21508
+ bankVerificationVendors,
21509
+ bankVendorsLoadingStatus,
21202
21510
  handleGetBankVerificationVendors,
21203
21511
  setHideDropinLayout,
21204
21512
  setHideOnHomeButton,
@@ -21207,8 +21515,10 @@ function PayoutDetailsComponent(props) {
21207
21515
  createTrustedTransferInstrument: createTrustedTransferInstrument2,
21208
21516
  handleBankVerificationError: handleBankVerificationError2,
21209
21517
  accountDetailsFromInput,
21518
+ handleNextClick,
21210
21519
  country,
21211
21520
  accountHolder,
21521
+ forms,
21212
21522
  data: propData
21213
21523
  } = props;
21214
21524
  const [instantVerificationError, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
@@ -21216,7 +21526,7 @@ function PayoutDetailsComponent(props) {
21216
21526
  const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
21217
21527
  const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails.formId);
21218
21528
  const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
21219
- const taskHeading = i18n.get("addAndVerifyYourBankDetails");
21529
+ const taskHeading = i18n.get("addABankAccountForPayouts");
21220
21530
  const isBankStatementDocumentOptional = formUtilities(bankDocumentFormProps ?? {}, i18n).isOptionalField("bankStatementDocument");
21221
21531
  const globalData = useGlobalData();
21222
21532
  const data = isEmpty(globalData) ? propData : globalData;
@@ -21261,10 +21571,13 @@ function PayoutDetailsComponent(props) {
21261
21571
  heading: taskHeading,
21262
21572
  id: PayoutVerificationMethodFormID,
21263
21573
  country,
21574
+ forms,
21264
21575
  accountHolder,
21265
21576
  legalEntityResponse,
21266
- bankVerificationVendors: props.bankVerificationVendors,
21577
+ bankVerificationVendors,
21578
+ bankVendorsLoadingStatus,
21267
21579
  bankInfoValidated,
21580
+ handleNextClick,
21268
21581
  instantVerificationAllowed: Boolean(props.instantVerificationEnabled && props.handleGetBankVerificationVendors)
21269
21582
  })
21270
21583
  })
@@ -23885,7 +24198,7 @@ const isFieldRequired = (fieldConfigurations, customRules) => {
23885
24198
  }
23886
24199
  return fieldConfigurations && ((fieldConfigurations == null ? void 0 : fieldConfigurations.rule) === "REQUIRED" || (customRules == null ? void 0 : customRules[fieldConfigurations.rule]) && customRules[fieldConfigurations.rule]() === "REQUIRED");
23887
24200
  };
23888
- function getPropsFromConfigurations(scenarioConfiguration, forms, remediationActions, dataMissingErrors, fieldsWithExistingData, customRules = {}, customLabels2 = {}, customValidators = {}, legalEntityTrustedFields) {
24201
+ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationActions, dataMissingErrors, fieldsWithExistingData, customRules = {}, customLabels2 = {}, customValidators = {}, legalEntityType, legalEntityTrustedFields) {
23889
24202
  var _a;
23890
24203
  const requiredFields = {};
23891
24204
  const optionalFields = {};
@@ -23902,10 +24215,23 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23902
24215
  return;
23903
24216
  }
23904
24217
  const readonly = ["legalFormDescription"];
23905
- const trustedMappings = legalEntityTrustedFields == null ? void 0 : legalEntityTrustedFields.reduce((acc, trusted) => {
24218
+ const trustedFieldMappings = legalEntityTrustedFields == null ? void 0 : legalEntityTrustedFields.reduce((acc, trusted) => {
23906
24219
  switch (trusted.provider) {
23907
- case TrustedFieldsProvider.KOMPANY:
23908
- return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24220
+ case TrustedFieldsProvider.KOMPANY: {
24221
+ if (legalEntityType === "organization") {
24222
+ return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24223
+ }
24224
+ return acc;
24225
+ }
24226
+ case TrustedFieldsProvider.SINGPASS: {
24227
+ if (legalEntityType === "organization") {
24228
+ return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24229
+ }
24230
+ if (legalEntityType === "individual") {
24231
+ return [...acc, ...trusted.fields.map((tf) => individualApiKeyMapping[tf])];
24232
+ }
24233
+ return acc;
24234
+ }
23909
24235
  default:
23910
24236
  return acc;
23911
24237
  }
@@ -23913,6 +24239,9 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23913
24239
  (_a = Object.entries(forms)) == null ? void 0 : _a.forEach(([formId, formDetails]) => {
23914
24240
  var _a2;
23915
24241
  const formFieldsWithExistingData = addLinkedFields(fieldsWithExistingData).filter((field) => field.startsWith(formId)).map((field) => field.slice(field.lastIndexOf(".") + 1));
24242
+ if (trustedFieldMappings) {
24243
+ trustedFields[formId] = getFormTrustedFields(formId, trustedFieldMappings);
24244
+ }
23916
24245
  (_a2 = formDetails == null ? void 0 : formDetails.fields) == null ? void 0 : _a2.forEach((field) => {
23917
24246
  var _a3, _b;
23918
24247
  const fieldConfigurations = scenarioConfiguration[field];
@@ -23931,10 +24260,6 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23931
24260
  optionalFields[formId] = optionalFields[formId] ? [...optionalFields[formId], field] : [field];
23932
24261
  allFields[formId] = allFields[formId] ? [...allFields[formId], field] : [field];
23933
24262
  }
23934
- const isFieldTrusted = isTrustedField(trustedMappings, formId, field);
23935
- if (isFieldTrusted) {
23936
- trustedFields[formId] = trustedFields[formId] ? [...trustedFields[formId], field] : [field];
23937
- }
23938
24263
  if (fieldConfigurations) {
23939
24264
  const customLabel = (_a3 = customLabels2 == null ? void 0 : customLabels2[field]) == null ? void 0 : _a3.call(customLabels2);
23940
24265
  const label = customLabel || fieldConfigurations.label;
@@ -24025,10 +24350,7 @@ const isFieldRequiredToRemediateDataMissingError = (formId, field, dataMissingEr
24025
24350
  const missingAndLinkedFields = addLinkedFields(missingFields);
24026
24351
  return missingAndLinkedFields.includes(makeTLDSFieldName(formId, field));
24027
24352
  };
24028
- const isTrustedField = (trustedFields, formId, field) => trustedFields == null ? void 0 : trustedFields.some((trustedField) => {
24029
- const split = trustedField.split(".");
24030
- return split[0] === formId && split[split.length - 1] === field;
24031
- });
24353
+ const getFormTrustedFields = (formId, trustedFields) => trustedFields.filter((field) => field.split(".")[0] === formId).map((field) => field.split(".").filter((item) => formId !== item).join("."));
24032
24354
  function getBaseTrackingPayload({
24033
24355
  trackingConfig = {
24034
24356
  topLevelLegalEntity: {}
@@ -24216,6 +24538,18 @@ const dbaNameFieldMetadata = {
24216
24538
  label: "dbaName",
24217
24539
  validators: [validateNotEmptyOnBlur]
24218
24540
  };
24541
+ const getNestedTrustedFields = (field, data, trustedFields) => {
24542
+ if (trustedFields && (data == null ? void 0 : data[field]) && typeof data[field] === "object") {
24543
+ return trustedFields.reduce((fields, trustedField) => {
24544
+ const splitField = trustedField.split(".");
24545
+ if (splitField[0] === field) {
24546
+ return [...fields, splitField[1]];
24547
+ }
24548
+ return fields;
24549
+ }, []);
24550
+ }
24551
+ return [];
24552
+ };
24219
24553
  const mapAddressData = (verifiedBusiness) => ({
24220
24554
  address: verifiedBusiness.street ?? "",
24221
24555
  otherAddressInformation: verifiedBusiness.street2 ?? "",
@@ -24241,7 +24575,7 @@ const structuredListListItem = "adyen-kyc-structured-list-list-item";
24241
24575
  const adyenLayoutMd = "adyen-layout-md";
24242
24576
  const structuredListLabel = "adyen-kyc-structured-list-label";
24243
24577
  const structuredListValue = "adyen-kyc-structured-list-value";
24244
- const styles$3 = {
24578
+ const styles$2 = {
24245
24579
  "structured-list": "adyen-kyc-structured-list",
24246
24580
  structuredList,
24247
24581
  "structured-list-list-item": "adyen-kyc-structured-list-list-item",
@@ -24260,14 +24594,14 @@ const StructuredList = ({
24260
24594
  i18n
24261
24595
  } = useI18nContext();
24262
24596
  return jsx("dl", {
24263
- className: styles$3.structuredList,
24597
+ className: styles$2.structuredList,
24264
24598
  children: items.map((item) => jsxs("div", {
24265
- className: styles$3.structuredListListItem,
24599
+ className: styles$2.structuredListListItem,
24266
24600
  children: [jsx("dt", {
24267
- className: styles$3.structuredListLabel,
24601
+ className: styles$2.structuredListLabel,
24268
24602
  children: i18n.get(item.labelKey)
24269
24603
  }), jsx("dd", {
24270
- className: styles$3.structuredListValue,
24604
+ className: styles$2.structuredListValue,
24271
24605
  children: item.value
24272
24606
  })]
24273
24607
  }, item.labelKey))
@@ -24300,6 +24634,7 @@ function VerifiedBusinessCard({
24300
24634
  children: [address, addressLink && jsx(Link, {
24301
24635
  external: true,
24302
24636
  href: addressLink,
24637
+ iconPosition: "right",
24303
24638
  children: i18n.get("showOnMap")
24304
24639
  })]
24305
24640
  })
@@ -24356,7 +24691,7 @@ function AdditionalInformationComponent({
24356
24691
  handleAddressSearch,
24357
24692
  handleFindAddress
24358
24693
  }) {
24359
- var _a, _b, _c, _d;
24694
+ var _a, _b, _c, _d, _e;
24360
24695
  const {
24361
24696
  basicInformation
24362
24697
  } = useGlobalData();
@@ -24366,9 +24701,6 @@ function AdditionalInformationComponent({
24366
24701
  const {
24367
24702
  i18n
24368
24703
  } = useI18nContext();
24369
- const {
24370
- isExperimentEnabled
24371
- } = useExperimentsContext();
24372
24704
  const showVerified = !!verifiedBusiness;
24373
24705
  const showStockData = companyType === CompanyTypesValue.PUBLIC_COMPANY;
24374
24706
  const addressSchema = getAddressSchemaForCountry(country).filter((field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true);
@@ -24482,6 +24814,7 @@ function AdditionalInformationComponent({
24482
24814
  fieldProblems: formFieldProblems,
24483
24815
  handleChangeFor,
24484
24816
  resetToDefaultData,
24817
+ setData,
24485
24818
  setErrors,
24486
24819
  setValid
24487
24820
  } = useForm({
@@ -24494,6 +24827,7 @@ function AdditionalInformationComponent({
24494
24827
  fieldProblems: fieldValidationErrors,
24495
24828
  shouldValidate
24496
24829
  });
24830
+ const datasetUtils = datasetUtilities(i18n.locale);
24497
24831
  const formUtils = formUtilities(mergedFieldProps ?? initialFormUtilsProps, i18n);
24498
24832
  useEffect(() => {
24499
24833
  updateStateSlice({
@@ -24518,10 +24852,6 @@ function AdditionalInformationComponent({
24518
24852
  }
24519
24853
  };
24520
24854
  }, [verifiedBusiness, basicInformation == null ? void 0 : basicInformation.stateOrProvince, country]);
24521
- const hideRegistrationAddress = useMemo(() => addressSchema.filter((field) => field !== "otherAddressInformation").every((field) => {
24522
- var _a2;
24523
- return !!((_a2 = verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress) == null ? void 0 : _a2[field]);
24524
- }) && Boolean(verifiedBusiness == null ? void 0 : verifiedBusiness.isTrustedAddress) && isExperimentEnabled("EnableNewAddressComponent"), [addressSchema, verifiedBusiness == null ? void 0 : verifiedBusiness.isTrustedAddress, isExperimentEnabled, verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress]);
24525
24855
  useEffect(
24526
24856
  () => applyVerifiedBusinessData(verifiedBusiness, handleChangeFor),
24527
24857
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -24551,10 +24881,26 @@ function AdditionalInformationComponent({
24551
24881
  if (isChecked) {
24552
24882
  handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME);
24553
24883
  setValid("operationalAddress", true);
24884
+ setData("operationalAddress", mergedDefaultData == null ? void 0 : mergedDefaultData.operationalAddress);
24554
24885
  } else {
24555
24886
  handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
24556
24887
  }
24557
24888
  };
24889
+ const registrationAddressDescription = useMemo(() => {
24890
+ var _a2;
24891
+ if ((_a2 = formData.registrationAddress) == null ? void 0 : _a2.country) {
24892
+ return ["US", "NL", "CZ"].includes(formData.registrationAddress.country) ? i18n.get("registeredBusinessAddressDescription__withCountry__commonNoun", {
24893
+ values: {
24894
+ country: datasetUtils.getCountryName(formData.registrationAddress.country)
24895
+ }
24896
+ }) : i18n.get("registeredBusinessAddressDescription__withCountry", {
24897
+ values: {
24898
+ country: datasetUtils.getCountryName(formData.registrationAddress.country)
24899
+ }
24900
+ });
24901
+ }
24902
+ return i18n.get("registeredBusinessAddressDescription");
24903
+ }, [datasetUtils, (_e = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _e.country, i18n]);
24558
24904
  return jsxs("form", {
24559
24905
  id: ADDITIONAL_INFORMATION_FORM_ID,
24560
24906
  className: "adyen-kyc-additional-information",
@@ -24749,9 +25095,6 @@ function AdditionalInformationComponent({
24749
25095
  })]
24750
25096
  })]
24751
25097
  }), jsxs("section", {
24752
- style: {
24753
- display: hideRegistrationAddress ? "none" : "unset"
24754
- },
24755
25098
  children: [jsxs("div", {
24756
25099
  className: "adyen-kyc-additional-information__section-heading",
24757
25100
  children: [jsx(Typography, {
@@ -24761,7 +25104,7 @@ function AdditionalInformationComponent({
24761
25104
  }), jsx(Typography, {
24762
25105
  el: "p",
24763
25106
  variant: "body",
24764
- children: i18n.get("registeredBusinessAddressDescription")
25107
+ children: registrationAddressDescription
24765
25108
  })]
24766
25109
  }), jsx(AddressExperimentWrapper, {
24767
25110
  id: ADDITIONAL_INFORMATION_FORM_ID,
@@ -24777,11 +25120,13 @@ function AdditionalInformationComponent({
24777
25120
  hideCountry: true,
24778
25121
  optionalFields: ["otherAddressInformation"],
24779
25122
  readOnlyFields: verifiedBusiness ? ["stateOrProvince"] : [],
25123
+ trustedFields: getNestedTrustedFields("registrationAddress", data, trustedFields),
24780
25124
  onChange: handleRegistrationAddressChange,
24781
25125
  handleAddressSearch,
24782
25126
  handleFindAddress,
24783
25127
  verifiedBusiness,
24784
- verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress
25128
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress,
25129
+ condensed: true
24785
25130
  })]
24786
25131
  }), jsxs("section", {
24787
25132
  children: [jsxs("div", {
@@ -24823,83 +25168,17 @@ function AdditionalInformationComponent({
24823
25168
  shouldValidate,
24824
25169
  hideCountry: true,
24825
25170
  optionalFields: ["otherAddressInformation"],
25171
+ trustedFields: getNestedTrustedFields("operationalAddress", data, trustedFields),
24826
25172
  onChange: handleOperationalAddressChange,
24827
25173
  handleAddressSearch,
24828
25174
  handleFindAddress,
24829
25175
  verifiedBusiness,
24830
- verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress
25176
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress,
25177
+ condensed: true
24831
25178
  })]
24832
25179
  })]
24833
25180
  });
24834
25181
  }
24835
- function Card({
24836
- className,
24837
- children,
24838
- stateful,
24839
- active,
24840
- disabled,
24841
- fetching,
24842
- warning,
24843
- warningMessage,
24844
- title,
24845
- subTitle,
24846
- headerButton,
24847
- onClick,
24848
- onKeyDown
24849
- }) {
24850
- const classNames = cx("adyen-kyc-card", className, {
24851
- "adyen-kyc-card--stateful": stateful,
24852
- "adyen-kyc-card--active": stateful && active,
24853
- "adyen-kyc-card--disabled": disabled,
24854
- "adyen-kyc-card--fetching": fetching
24855
- });
24856
- const headerClassNames = cx("adyen-kyc-card__header", {
24857
- "adyen-kyc-card__header--button": headerButton
24858
- });
24859
- const tabIndex = stateful ? 0 : void 0;
24860
- const role = stateful ? "button" : void 0;
24861
- const onClickHandler = (e) => {
24862
- if (disabled) {
24863
- return;
24864
- }
24865
- onClick == null ? void 0 : onClick(e);
24866
- };
24867
- const onKeyDownHandler = (e) => {
24868
- if (onKeyDown) {
24869
- onKeyDown(e);
24870
- }
24871
- };
24872
- return jsxs("article", {
24873
- className: classNames,
24874
- tabIndex,
24875
- role,
24876
- onClick: onClickHandler,
24877
- onKeyDown: onKeyDownHandler,
24878
- children: [title && jsxs("header", {
24879
- className: headerClassNames,
24880
- children: [jsxs("div", {
24881
- className: "adyen-kyc-card-title",
24882
- children: [jsx(Typography, {
24883
- el: "h4",
24884
- variant: "title",
24885
- children: title
24886
- }), subTitle && jsx(Typography, {
24887
- el: "p",
24888
- variant: "body",
24889
- children: subTitle
24890
- })]
24891
- }), headerButton && headerButton]
24892
- }), children && jsx("div", {
24893
- role: "region",
24894
- className: "adyen-kyc-card__body",
24895
- children
24896
- }), warning && jsx(Alert, {
24897
- className: "adyen-kyc-card__warning",
24898
- title: warningMessage,
24899
- variant: "warning"
24900
- })]
24901
- });
24902
- }
24903
25182
  function CardGroup({
24904
25183
  className,
24905
25184
  children,
@@ -25091,7 +25370,7 @@ function BusinessSelectionComponent({
25091
25370
  } catch (e) {
25092
25371
  logger$r.error(e);
25093
25372
  }
25094
- }, [fetchBusinessData, fetching, selectedBusinessId]);
25373
+ }, [basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]);
25095
25374
  const handleConfirmSelection = useCallback(async (data) => {
25096
25375
  if (!currentTin) return;
25097
25376
  try {
@@ -26067,9 +26346,9 @@ const rules$2 = ({
26067
26346
  },
26068
26347
  nationalityIfRequiredForRole: () => {
26069
26348
  var _a, _b;
26070
- const enableIdentificationNationalityCrossBorderAssociateCheck = isExperimentEnabled("EnableIdentificationNationalityCrossBorderAssociateCheck");
26349
+ const enableNationalitySGHK = isExperimentEnabled("EnableNationalitySGHK");
26071
26350
  const rootLegalEntityCountry = (_a = rootLegalEntity == null ? void 0 : rootLegalEntity.organization) == null ? void 0 : _a.registeredAddress.country;
26072
- if (enableIdentificationNationalityCrossBorderAssociateCheck && rootLegalEntityCountry && NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(rootLegalEntityCountry)) {
26351
+ if (enableNationalitySGHK && rootLegalEntityCountry && NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(rootLegalEntityCountry)) {
26073
26352
  return REQUIRED;
26074
26353
  }
26075
26354
  if (NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(country) || ((_b = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b.nationality)) {
@@ -26651,7 +26930,7 @@ const DropinLayout = ({
26651
26930
  onClose: !onBack ? handleClose : void 0,
26652
26931
  onBack,
26653
26932
  children: jsx("div", {
26654
- className: "adyen-kyc-modal-content",
26933
+ className: "adyen-kyc-modal-content adyen-kyc-externalComponent",
26655
26934
  children: content
26656
26935
  })
26657
26936
  });
@@ -26853,7 +27132,7 @@ const FormWrapper = ({
26853
27132
  hideBackButton,
26854
27133
  hideNextButton
26855
27134
  });
26856
- const embeddedFooter = jsx(EmbeddedActionBar, {
27135
+ const embeddedFooter = !hideFooter && jsx(EmbeddedActionBar, {
26857
27136
  left: jsx(StepProgressIndicator, {
26858
27137
  activeStepIndex: currentStep ?? 0,
26859
27138
  stepsCount: totalSteps ?? 3,
@@ -26867,7 +27146,7 @@ const FormWrapper = ({
26867
27146
  icon: "save",
26868
27147
  onClick: handleFinishLater,
26869
27148
  loading: finishLaterLoading
26870
- }), jsx(Button, {
27149
+ }), !hideNextButton && jsx(Button, {
26871
27150
  label: nextButtonLabel,
26872
27151
  onClick: handleNextClick
26873
27152
  })]
@@ -27382,7 +27661,7 @@ function BusinessDetailsDropinComponent({
27382
27661
  isExperimentEnabled
27383
27662
  }), [currentCountry, currentState.data, isExperimentEnabled, taskType]);
27384
27663
  const initialForms = useMemo(() => getForms(currentCountry), [currentCountry]);
27385
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, initialForms, (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [], (currentProblems == null ? void 0 : currentProblems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, isExperimentEnabled) : [], customRules, {}, {}, trustedFields), [fieldConfigurations, initialForms, currentProblems == null ? void 0 : currentProblems.remediationActions, currentProblems == null ? void 0 : currentProblems.missingData, legalEntityResponse, isExperimentEnabled, customRules, trustedFields]);
27664
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, initialForms, (currentProblems == null ? void 0 : currentProblems.remediationActions) ? Object.values(currentProblems == null ? void 0 : currentProblems.remediationActions) : [], (currentProblems == null ? void 0 : currentProblems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse, isExperimentEnabled) : [], customRules, {}, {}, legalEntityResponse.type, trustedFields), [fieldConfigurations, initialForms, currentProblems == null ? void 0 : currentProblems.remediationActions, currentProblems == null ? void 0 : currentProblems.missingData, legalEntityResponse, isExperimentEnabled, customRules, trustedFields]);
27386
27665
  const isSkippingCompanyStructure = canChangeEntityType && organizationTypesToSkipCompanyStructureForm.includes((_d = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _d.type) && accountHolder !== "aTrust";
27387
27666
  const forms = useMemo(() => {
27388
27667
  const requiredForms = getRequiredForms(initialForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
@@ -27412,7 +27691,7 @@ function BusinessDetailsDropinComponent({
27412
27691
  handleUpdateLegalEntity,
27413
27692
  onExternalSubmit
27414
27693
  });
27415
- }, [baseTrackingPayload, clearToasts, currentState.data, documentUtils, forms, handleUpdateLegalEntity, i18n, isTargetLegalEntityType, legalEntityResponse, onExternalSubmit, currentProblems, showToast]);
27694
+ }, [setAccountHolder, accountHolder, currentState.data, legalEntityResponse, isTargetLegalEntityType, baseTrackingPayload, currentProblems, forms, documentUtils, i18n, showToast, clearToasts, handleUpdateLegalEntity, onExternalSubmit]);
27416
27695
  const {
27417
27696
  handleNextClick,
27418
27697
  handleBackClick,
@@ -27473,6 +27752,7 @@ function BusinessDetailsDropinComponent({
27473
27752
  useEffect(() => {
27474
27753
  if (searchResults && !searchResults.length || searching === "error") {
27475
27754
  setShowCompanyStructure(true);
27755
+ setTrustedFields([]);
27476
27756
  }
27477
27757
  }, [searchResults, searching]);
27478
27758
  useEffect(() => {
@@ -27753,11 +28033,12 @@ function CompanyDropinComponent({
27753
28033
  taskType,
27754
28034
  requiredFields,
27755
28035
  isSettingEnabled,
27756
- isExperimentEnabled
27757
- }), [country, data, taskType, requiredFields, isSettingEnabled]);
28036
+ isExperimentEnabled,
28037
+ accountHolder
28038
+ }), [country, data, taskType, requiredFields, isSettingEnabled, accountHolder]);
27758
28039
  const derivedProps = useMemo(() => ({
27759
- ...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)
27760
- }), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
28040
+ ...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, {}, {}, legalEntityResponse == null ? void 0 : legalEntityResponse.type)
28041
+ }), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
27761
28042
  const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
27762
28043
  const {
27763
28044
  state: {
@@ -31219,10 +31500,14 @@ const getCountrySpecificMinimumAgeValidationRule = (country) => {
31219
31500
  const validators = ({
31220
31501
  country,
31221
31502
  isExperimentEnabled = () => false,
31222
- taskType
31503
+ taskType,
31504
+ isLegalAgeEnforced = false
31223
31505
  }) => ({
31224
31506
  birthDate: () => {
31225
31507
  const baseValidators = [isNotEmptyBirthDateValidatorRule, isNotOutOfRangeBirthDateValidatorRule];
31508
+ if (isLegalAgeEnforced) {
31509
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
31510
+ }
31226
31511
  if (isExperimentEnabled("EnableAgeVerification")) {
31227
31512
  if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
31228
31513
  return [...baseValidators, buildMinimumAgeValidationRule(18)];
@@ -31306,6 +31591,10 @@ function IndividualDropinComponent({
31306
31591
  const {
31307
31592
  isExperimentEnabled
31308
31593
  } = useExperimentsContext();
31594
+ const {
31595
+ isSettingEnabled
31596
+ } = useSettingsContext();
31597
+ const isLegalAgeEnforced = isSettingEnabled(SettingNames.EnforceLegalAge);
31309
31598
  let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
31310
31599
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
31311
31600
  let roleTypes = [];
@@ -31358,12 +31647,13 @@ function IndividualDropinComponent({
31358
31647
  isExperimentEnabled,
31359
31648
  rootLegalEntity: parentLegalEntity
31360
31649
  }), [country, data, taskType]);
31361
- const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") ? validators({
31650
+ const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") || isLegalAgeEnforced ? validators({
31362
31651
  country,
31363
31652
  isExperimentEnabled,
31364
- taskType
31653
+ taskType,
31654
+ isLegalAgeEnforced
31365
31655
  }) : {}, [country]);
31366
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, customValidators), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
31656
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, customValidators, legalEntityResponse == null ? void 0 : legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
31367
31657
  const {
31368
31658
  state: {
31369
31659
  currentState
@@ -31811,6 +32101,9 @@ const useBankConfigurationHandlers = ({
31811
32101
  setLoadingStatus("success");
31812
32102
  });
31813
32103
  }, [bankAccountCountry, useFreshProviderRedirectUrl]);
32104
+ useEffect(() => {
32105
+ setUseFreshProviderRedirectUrl(true);
32106
+ }, [bankAccountCountry, setUseFreshProviderRedirectUrl]);
31814
32107
  const getConfigurationData = useCallback(async () => {
31815
32108
  var _a;
31816
32109
  const configuration = await getConfiguration2({
@@ -31942,6 +32235,9 @@ function PayoutDetailsDropinComponent({
31942
32235
  showToast,
31943
32236
  clearToasts
31944
32237
  } = useToastContext();
32238
+ const {
32239
+ isExperimentEnabled
32240
+ } = useExperimentsContext();
31945
32241
  const {
31946
32242
  isSettingEnabled
31947
32243
  } = useSettingsContext();
@@ -32059,7 +32355,7 @@ function PayoutDetailsDropinComponent({
32059
32355
  verificationVendorsCallback: handleGetBankVerificationVendors
32060
32356
  }), isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout));
32061
32357
  }, [bankVerificationVendors]);
32062
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, payoutDetailsSteps, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], [], fieldsFromCustomRules, fieldsFormCustomLabels), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
32358
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, payoutDetailsSteps, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], [], fieldsFromCustomRules, fieldsFormCustomLabels, {}, legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
32063
32359
  useUnifyLoadingStatus(setLoadingStatus, configurationLoadingStatus, bankVendorsLoadingStatus);
32064
32360
  const forms = useMemo(() => {
32065
32361
  const requiredForms = getRequiredForms(payoutDetailsSteps, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
@@ -32274,6 +32570,9 @@ function PayoutDetailsDropinComponent({
32274
32570
  navigateBackToTaskList == null ? void 0 : navigateBackToTaskList();
32275
32571
  } : onSubmit
32276
32572
  });
32573
+ const hideFooter = isExperimentEnabled("EnablePreferInstantVerificationFlow") && activeForm.formId === payoutSteps.payoutVerificationMethod.formId;
32574
+ const currentStep = useMemo(() => Object.values(forms).findIndex((step) => step.formId === activeForm.formId), [forms, activeForm.formId]);
32575
+ const totalSteps = useMemo(() => Object.keys(forms).length, [forms]);
32277
32576
  return jsx(FormWrapper, {
32278
32577
  taskName: taskName ?? "bankAccountDetails",
32279
32578
  activeForm,
@@ -32289,6 +32588,7 @@ function PayoutDetailsDropinComponent({
32289
32588
  hideDropinLayout,
32290
32589
  hideHomeButton: hideHomeButton || hideOnHomeButton,
32291
32590
  hideBackButton,
32591
+ hideFooter,
32292
32592
  hideNavigation,
32293
32593
  loadingStatus,
32294
32594
  forms,
@@ -32300,6 +32600,8 @@ function PayoutDetailsDropinComponent({
32300
32600
  validateForm: () => setShouldValidate(true),
32301
32601
  canSubmit: canSubmit2(),
32302
32602
  problems,
32603
+ currentStep,
32604
+ totalSteps,
32303
32605
  children: jsx(PayoutDetailsComponent, {
32304
32606
  ...derivedProps,
32305
32607
  capabilities,
@@ -32320,17 +32622,60 @@ function PayoutDetailsDropinComponent({
32320
32622
  onChange,
32321
32623
  legalEntityResponse,
32322
32624
  associatedLegalArrangement,
32625
+ bankVerificationVendors,
32626
+ bankVendorsLoadingStatus,
32323
32627
  handleGetBankVerificationVendors: getBankVerificationVendorsHandler,
32324
32628
  instantVerificationEnabled,
32325
32629
  refreshLegalEntity,
32326
32630
  shouldValidate,
32327
- bankVerificationVendors,
32328
32631
  createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
32329
32632
  handleBankVerificationError: handleBankVerificationError2,
32330
- accountDetailsFromInput
32633
+ accountDetailsFromInput,
32634
+ handleNextClick
32331
32635
  })
32332
32636
  });
32333
32637
  }
32638
+ const outlinedIcon = "adyen-kyc-outlined-icon";
32639
+ const styles$1 = {
32640
+ "outlined-icon": "adyen-kyc-outlined-icon",
32641
+ outlinedIcon
32642
+ };
32643
+ const OutlinedIcon = ({
32644
+ name
32645
+ }) => jsx("div", {
32646
+ className: styles$1.outlinedIcon,
32647
+ children: jsx(Icon, {
32648
+ name
32649
+ })
32650
+ });
32651
+ const Splashscreen = ({
32652
+ title,
32653
+ subtitle,
32654
+ icon,
32655
+ buttonText,
32656
+ onClick
32657
+ }) => {
32658
+ const {
32659
+ i18n
32660
+ } = useI18nContext();
32661
+ return jsxs("div", {
32662
+ className: "adyen-kyc-splashscreen",
32663
+ children: [icon && jsx(OutlinedIcon, {
32664
+ name: icon
32665
+ }), jsx(Typography, {
32666
+ el: "h2",
32667
+ variant: "title-l",
32668
+ children: title
32669
+ }), jsx(Typography, {
32670
+ el: "p",
32671
+ variant: "body",
32672
+ children: subtitle
32673
+ }), onClick && jsx(Button, {
32674
+ onClick,
32675
+ label: buttonText ?? i18n.get("finish")
32676
+ })]
32677
+ });
32678
+ };
32334
32679
  function ContractViewer({
32335
32680
  contract,
32336
32681
  className,
@@ -32376,6 +32721,8 @@ function PciDropinComponent({
32376
32721
  trackingConfig,
32377
32722
  asEmbedded = false,
32378
32723
  asModal = false,
32724
+ needsSigning = true,
32725
+ // TODO: move up to upcoming layout
32379
32726
  handleCloseClick
32380
32727
  }) {
32381
32728
  var _a, _b, _c, _d;
@@ -32547,10 +32894,15 @@ function PciDropinComponent({
32547
32894
  onClick: handleSignClick
32548
32895
  })
32549
32896
  });
32897
+ const endScreen = !needsSigning && jsx(Splashscreen, {
32898
+ icon: "check",
32899
+ title: i18n.get("serviceAgreementSignedAndDated"),
32900
+ onClick: handleCloseClick
32901
+ });
32550
32902
  return jsx(DropinLayout, {
32551
32903
  showAsModal: asModal,
32552
32904
  onClose: handleCloseClick,
32553
- content,
32905
+ content: endScreen || content,
32554
32906
  footer
32555
32907
  });
32556
32908
  }
@@ -33208,47 +33560,6 @@ function RoleAndTypeDropinComponent({
33208
33560
  content
33209
33561
  });
33210
33562
  }
33211
- const outlinedIcon = "adyen-kyc-outlined-icon";
33212
- const styles$2 = {
33213
- "outlined-icon": "adyen-kyc-outlined-icon",
33214
- outlinedIcon
33215
- };
33216
- const OutlinedIcon = ({
33217
- name
33218
- }) => jsx("div", {
33219
- className: styles$2.outlinedIcon,
33220
- children: jsx(Icon, {
33221
- name
33222
- })
33223
- });
33224
- const Splashscreen = ({
33225
- title,
33226
- subtitle,
33227
- icon,
33228
- buttonText,
33229
- onClick
33230
- }) => {
33231
- const {
33232
- i18n
33233
- } = useI18nContext();
33234
- return jsxs("div", {
33235
- className: "adyen-kyc-splashscreen",
33236
- children: [icon && jsx(OutlinedIcon, {
33237
- name: icon
33238
- }), jsx(Typography, {
33239
- el: "h2",
33240
- variant: "title-l",
33241
- children: title
33242
- }), jsx(Typography, {
33243
- el: "p",
33244
- variant: "body",
33245
- children: subtitle
33246
- }), onClick && jsx(Button, {
33247
- onClick,
33248
- label: buttonText ?? i18n.get("finish")
33249
- })]
33250
- });
33251
- };
33252
33563
  const serviceAgreementValidationRules = {
33253
33564
  signer: {
33254
33565
  modes: ["blur"],
@@ -33841,7 +34152,7 @@ function SolePropDropinComponent({
33841
34152
  requiredFields,
33842
34153
  isSettingEnabled
33843
34154
  }), [country, data, taskType, requiredFields, isSettingEnabled]);
33844
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, solePropForms, (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]);
34155
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, solePropForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, {}, legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
33845
34156
  const forms = useMemo(() => {
33846
34157
  const requiredForms = getRequiredForms(solePropForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
33847
34158
  return addValidityToForms(requiredForms, formValidity, problems);
@@ -34124,7 +34435,7 @@ function TrustDropinComponent({
34124
34435
  requiredFields,
34125
34436
  isSettingEnabled
34126
34437
  }), [country, data, taskType, requiredFields, isSettingEnabled]);
34127
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, trustForms, (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]);
34438
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, trustForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules, {}, {}, legalEntityResponse == null ? void 0 : legalEntityResponse.type), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
34128
34439
  const {
34129
34440
  state: {
34130
34441
  currentState
@@ -36421,7 +36732,6 @@ function CreateIndividualComponent({
36421
36732
  legalEntityId,
36422
36733
  taskType,
36423
36734
  onSubmitSuccess,
36424
- handleBackClick,
36425
36735
  modalView,
36426
36736
  onClose,
36427
36737
  onUnmount
@@ -36504,7 +36814,6 @@ function CreateIndividualComponent({
36504
36814
  handleAddressSearch: isAddressEnabled ? searchAddress2 : void 0,
36505
36815
  handleGetIdVerificationToken: isIdDocumentEnabled ? getIdVerificationToken : void 0,
36506
36816
  handleGetIdVerificationStartCheck: isIdDocumentEnabled ? idVerificationStartCheck : void 0,
36507
- handleBackClick,
36508
36817
  hideNavigation: true,
36509
36818
  asModal: isModalView,
36510
36819
  onSubmit,
@@ -36588,39 +36897,10 @@ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
36588
36897
  OnboardingStatus2["VERIFIED"] = "VERIFIED";
36589
36898
  return OnboardingStatus2;
36590
36899
  })(OnboardingStatus || {});
36591
- const skeleton = "adyen-kyc-skeleton";
36592
- const skeletonCircle = "adyen-kyc-skeleton-circle";
36593
- const skeletonText = "adyen-kyc-skeleton-text";
36594
- const styles$1 = {
36595
- skeleton,
36596
- "skeleton-circle": "adyen-kyc-skeleton-circle",
36597
- skeletonCircle,
36598
- "skeleton-text": "adyen-kyc-skeleton-text",
36599
- skeletonText
36600
- };
36601
- const Skeleton = ({
36602
- circle = false,
36603
- text = false,
36604
- height = "1em",
36605
- width
36606
- }) => {
36607
- const classNames = cx(styles$1.skeleton, {
36608
- [styles$1.skeletonCircle]: circle,
36609
- [styles$1.skeletonText]: text
36610
- });
36611
- return jsx("div", {
36612
- className: classNames,
36613
- style: {
36614
- height,
36615
- width
36616
- }
36617
- });
36618
- };
36619
36900
  const embeddedStatus = "adyen-kyc-embedded-status";
36620
36901
  const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
36621
36902
  const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
36622
36903
  const embeddedStatusLight = "adyen-kyc-embedded-status-light";
36623
- const embeddedStatusIcon = "adyen-kyc-embedded-status-icon";
36624
36904
  const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
36625
36905
  const styles = {
36626
36906
  "embedded-status": "adyen-kyc-embedded-status",
@@ -36631,8 +36911,6 @@ const styles = {
36631
36911
  embeddedStatusAvatar,
36632
36912
  "embedded-status-light": "adyen-kyc-embedded-status-light",
36633
36913
  embeddedStatusLight,
36634
- "embedded-status-icon": "adyen-kyc-embedded-status-icon",
36635
- embeddedStatusIcon,
36636
36914
  "embedded-status-info": "adyen-kyc-embedded-status-info",
36637
36915
  embeddedStatusInfo
36638
36916
  };
@@ -36702,7 +36980,7 @@ const EmbeddedStatus = ({
36702
36980
  };
36703
36981
  return jsxs("button", {
36704
36982
  type: "button",
36705
- className: cx(className, styles.embeddedStatus, {
36983
+ className: cx(className, styles.embeddedStatus, "adyen-kyc-externalComponent", {
36706
36984
  [styles.embeddedStatusLoading]: loading,
36707
36985
  [styles.embeddedStatusLight]: light
36708
36986
  }),
@@ -36874,7 +37152,7 @@ function ManagePCIComponent({
36874
37152
  } = useI18nContext();
36875
37153
  return jsx(PCIStatus, {
36876
37154
  legalEntityId,
36877
- title: i18n.get("serviceAgreements"),
37155
+ title: i18n.get("pciDssQuestionnaire"),
36878
37156
  onClick
36879
37157
  });
36880
37158
  }
@@ -37254,7 +37532,7 @@ function ManageTransferInstrumentOverview({
37254
37532
  className: "adyen-kyc-manage-ti-overview",
37255
37533
  children: [transferInstrumentListEle, jsx(EmbeddedStatus, {
37256
37534
  title: i18n.get("addBankAccount"),
37257
- iconName: "plus-small",
37535
+ iconName: "plus",
37258
37536
  light: true,
37259
37537
  onClick: () => onAdd(legalEntityId),
37260
37538
  "aria-label": i18n.get("addBankAccount")
@@ -37474,7 +37752,8 @@ function SignPCIComponent({
37474
37752
  } = useI18nContext();
37475
37753
  const [isLoading, setIsLoading] = useState(true);
37476
37754
  const [legalEntity, setLegalEntity] = useState();
37477
- const [needsSigning, setNeedsSigning] = useState(false);
37755
+ const [needsSigning, setNeedsSigning] = useState(true);
37756
+ const [hasGenericError, setHasGenericError] = useState(true);
37478
37757
  const [pciTemplate, setPciTemplate] = useState();
37479
37758
  if (modalView) {
37480
37759
  setIsModalView(true);
@@ -37495,7 +37774,7 @@ function SignPCIComponent({
37495
37774
  signingRequired
37496
37775
  }) => {
37497
37776
  setNeedsSigning(Boolean(signingRequired));
37498
- }).catch(logger$b.error);
37777
+ });
37499
37778
  }, [additionalSalesChannels, getPciStatus2, legalEntityId]);
37500
37779
  const fetchPciTemplate = useCallback(async () => {
37501
37780
  await getPciTemplate2(legalEntityId, {
@@ -37508,13 +37787,13 @@ function SignPCIComponent({
37508
37787
  setIsLoading(true);
37509
37788
  await fetchLegalEntity();
37510
37789
  await fetchStatus();
37511
- if (needsSigning) {
37512
- await fetchPciTemplate();
37513
- }
37514
- })().catch(logger$b.error).finally(() => {
37790
+ await fetchPciTemplate();
37791
+ })().catch(() => {
37792
+ setHasGenericError(true);
37793
+ }).finally(() => {
37515
37794
  setIsLoading(false);
37516
37795
  });
37517
- }, [fetchLegalEntity, fetchPciTemplate, fetchStatus, needsSigning]);
37796
+ }, [fetchLegalEntity, fetchPciTemplate, fetchStatus]);
37518
37797
  const handleSign = useCallback(
37519
37798
  // @ts-ignore-error:next-line ts does not infer type correctly
37520
37799
  async (...params) => {
@@ -37527,12 +37806,23 @@ function SignPCIComponent({
37527
37806
  );
37528
37807
  const handleHomeClick = () => {
37529
37808
  };
37530
- if (isLoading || !legalEntity || !pciTemplate) {
37809
+ if (isLoading || !legalEntity) {
37531
37810
  return jsx(Loader, {
37532
37811
  size: "medium"
37533
37812
  });
37534
37813
  }
37535
- return jsx(PciDropinComponent, {
37814
+ if (!hasGenericError) {
37815
+ return jsx(DropinLayout, {
37816
+ showAsModal: modalView,
37817
+ onClose: handleOnClose,
37818
+ content: jsx(Splashscreen, {
37819
+ icon: "check",
37820
+ title: i18n.get("pciDoesNotNeedSigningOrHasBeenSigned"),
37821
+ onClick: handleOnClose
37822
+ })
37823
+ });
37824
+ }
37825
+ return pciTemplate ? jsx(PciDropinComponent, {
37536
37826
  taskType: TaskTypes.PCI_DSS,
37537
37827
  legalEntityResponse: legalEntity,
37538
37828
  pciTemplateResponse: pciTemplate,
@@ -37543,8 +37833,9 @@ function SignPCIComponent({
37543
37833
  handleSign,
37544
37834
  handleCloseClick: handleOnClose,
37545
37835
  asModal: isModalView,
37836
+ needsSigning,
37546
37837
  asEmbedded: true
37547
- });
37838
+ }) : null;
37548
37839
  }
37549
37840
  var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
37550
37841
  HighExposurePagesEnums2["COMPANY_PAGE"] = "company";
@@ -38468,7 +38759,7 @@ function HighExposureRegisteredAddress({
38468
38759
  "aria-label": i18n.get("isThisAddressTheMainHeadquarters"),
38469
38760
  "aria-invalid": !valid.isThisAddressTheMainHeadquarters
38470
38761
  })
38471
- }), jsx(Address, {
38762
+ }), jsx(AddressExperimentWrapper, {
38472
38763
  data: addressData,
38473
38764
  countryCode: country,
38474
38765
  id: targetPage,
@@ -39009,7 +39300,7 @@ function UpdateLegalEntityForHighExposure({
39009
39300
  setLoadingStatus,
39010
39301
  country
39011
39302
  });
39012
- const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, highExposureForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], rootLegalEntity ? getFieldsWithExistingData(rootLegalEntity) : []), [fieldConfigurations, problems == null ? void 0 : problems.remediationActions]);
39303
+ const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, highExposureForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], rootLegalEntity ? getFieldsWithExistingData(rootLegalEntity) : [], {}, {}, {}, rootLegalEntity == null ? void 0 : rootLegalEntity.type, rootLegalEntity == null ? void 0 : rootLegalEntity.trustedFields), [fieldConfigurations, problems == null ? void 0 : problems.remediationActions, rootLegalEntity]);
39013
39304
  const {
39014
39305
  state: {
39015
39306
  currentState
@@ -39913,7 +40204,7 @@ const ConfigurationApiProvider = ({
39913
40204
  isEmbeddedDropin,
39914
40205
  loadingContext
39915
40206
  } = authContext;
39916
- const sdkVersion = "3.31.0";
40207
+ const sdkVersion = "3.32.1";
39917
40208
  useAnalytics({
39918
40209
  onUserEvent,
39919
40210
  legalEntityId: rootLegalEntityId,
@@ -40106,7 +40397,8 @@ const settingsDefaults = {
40106
40397
  viewOnboardingGuidance: false,
40107
40398
  transferInstrumentLimit: 0,
40108
40399
  instantBankVerification: true,
40109
- showServiceAgreementsFirst: false
40400
+ showServiceAgreementsFirst: false,
40401
+ enforceLegalAge: false
40110
40402
  };
40111
40403
  function SettingsProvider({
40112
40404
  children,
@@ -40599,7 +40891,7 @@ const DebugModal = ({
40599
40891
  };
40600
40892
  const copyToClipboard = async () => {
40601
40893
  const toCopy = {
40602
- sdkVersion: "3.31.0",
40894
+ sdkVersion: "3.32.1",
40603
40895
  experiments: Object.fromEntries(allExperimentsWithValues),
40604
40896
  settings: Object.fromEntries(allSettingsWithValues)
40605
40897
  };
@@ -40638,7 +40930,7 @@ const DebugModal = ({
40638
40930
  children: [jsxs("div", {
40639
40931
  className: "adyen-kyc-debug-modal__meta",
40640
40932
  children: [jsxs("span", {
40641
- children: ["SDK version: ", "3.31.0"]
40933
+ children: ["SDK version: ", "3.32.1"]
40642
40934
  }), jsxs("span", {
40643
40935
  children: ["rootLegalEntityId: ", rootLegalEntityId]
40644
40936
  })]
@@ -41462,9 +41754,6 @@ const createIndividualComponentSchema = {
41462
41754
  },
41463
41755
  taskType: {
41464
41756
  type: "string"
41465
- },
41466
- handleBackClick: {
41467
- type: "function"
41468
41757
  }
41469
41758
  };
41470
41759
  const manageIndividualComponentSchema = {