@adyen/kyc-components 3.31.0 → 3.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/es/adyen-kyc-components.es.js +691 -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
@@ -20973,11 +21252,18 @@ function PayoutVerificationMethod(props) {
20973
21252
  const {
20974
21253
  i18n
20975
21254
  } = useI18nContext();
21255
+ const {
21256
+ isEmbeddedDropin
21257
+ } = useAuthContext();
20976
21258
  const instantVerificationError = useContext(InstantVerificationErrorContext);
20977
21259
  const {
20978
21260
  isSettingEnabled
20979
21261
  } = useSettingsContext();
21262
+ const {
21263
+ isExperimentEnabled
21264
+ } = useExperimentsContext();
20980
21265
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
21266
+ const enablePreferInstantVerificationMethodFlow = isEmbeddedDropin || isExperimentEnabled(ExperimentNames.EnablePreferInstantVerificationFlow);
20981
21267
  const intraRegionCrossBorderPayoutsAllowed = isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout);
20982
21268
  const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
20983
21269
  const {
@@ -20990,10 +21276,10 @@ function PayoutVerificationMethod(props) {
20990
21276
  ...props,
20991
21277
  schema: payoutVerificationMethodFields,
20992
21278
  defaultData: {
20993
- bankCountry: props.country,
21279
+ bankCountry: country,
20994
21280
  ...props.data
20995
21281
  },
20996
- rules: props.validators,
21282
+ rules: validators2,
20997
21283
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
20998
21284
  });
20999
21285
  const formUtils = formUtilities(props, i18n);
@@ -21010,31 +21296,79 @@ function PayoutVerificationMethod(props) {
21010
21296
  valid,
21011
21297
  fieldProblems
21012
21298
  }), [data, errors, fieldProblems, valid]);
21013
- const providerName = getInstantVerificationProvider(props.bankVerificationVendors, data.bankCountry);
21014
- const instantVerificationAvailable = Boolean(props.instantVerificationAllowed && providerName && providerName !== "loading");
21299
+ const providerName = useMemo(() => getInstantVerificationProvider(bankVerificationVendors, data.bankCountry, bankVendorsLoadingStatus), [bankVerificationVendors, data.bankCountry, bankVendorsLoadingStatus]);
21300
+ const instantVerificationAvailable = useMemo(() => Boolean(instantVerificationAllowed && providerName && providerName !== "loading"), [instantVerificationAllowed, providerName]);
21015
21301
  const methodsMetadata = makePayoutVerificationMethodsMetadata(providerName === "loading" ? void 0 : providerName);
21302
+ const selectVerificationMethod = (method) => {
21303
+ setHasSelectedMethod(true);
21304
+ handleChangeFor("payoutVerificationMethod")(method);
21305
+ };
21016
21306
  useEffect(() => {
21307
+ if (enablePreferInstantVerificationMethodFlow || bankInfoValidated) return;
21017
21308
  if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
21018
21309
  handleChangeFor("payoutVerificationMethod")("instantVerification");
21019
21310
  }
21020
21311
  if (!instantVerificationAvailable && data.payoutVerificationMethod !== "manualVerification") {
21021
21312
  handleChangeFor("payoutVerificationMethod")("manualVerification");
21022
21313
  }
21023
- }, [data.payoutVerificationMethod, handleChangeFor, instantVerificationAvailable, hasSelectedMethod]);
21024
- const selectVerificationMethod = (method) => {
21025
- setHasSelectedMethod(true);
21026
- handleChangeFor("payoutVerificationMethod")(method);
21027
- };
21314
+ }, [data.payoutVerificationMethod, handleChangeFor, instantVerificationAvailable, hasSelectedMethod, enablePreferInstantVerificationMethodFlow]);
21315
+ useEffect(() => {
21316
+ if (!enablePreferInstantVerificationMethodFlow) return;
21317
+ if (hasSelectedMethod && (forms == null ? void 0 : forms.find((val) => val.formId === (data.payoutVerificationMethod === "instantVerification" ? "payoutAccountVerification" : "payoutAccountDetails")))) {
21318
+ setTimeout(() => handleNextClick(), 50);
21319
+ setHasSelectedMethod(false);
21320
+ }
21321
+ }, [forms, hasSelectedMethod, data.payoutVerificationMethod, handleNextClick, enablePreferInstantVerificationMethodFlow]);
21322
+ useEffect(() => {
21323
+ if (!enablePreferInstantVerificationMethodFlow) return;
21324
+ if (!(bankVerificationVendors == null ? void 0 : bankVerificationVendors[data.bankCountry])) {
21325
+ selectVerificationMethod("manualVerification");
21326
+ }
21327
+ }, [bankVerificationVendors, enablePreferInstantVerificationMethodFlow]);
21028
21328
  const getProviderDisplayName = (providerName2) => providerName2.charAt(0).toUpperCase() + providerName2.slice(1);
21029
21329
  const {
21030
21330
  dataset: countries
21031
21331
  } = 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);
21332
+ const bankCountryName = ((_a = countries.find((country2) => country2.id === data.bankCountry)) == null ? void 0 : _a.name) ?? data.bankCountry;
21333
+ const allowedBankCountries = getAllowedBankCountries(country);
21334
+ const countryField = jsx(CountryField, {
21335
+ data: {
21336
+ country: data.bankCountry
21337
+ },
21338
+ valid: {
21339
+ country: valid == null ? void 0 : valid.bankCountry
21340
+ },
21341
+ errors: {
21342
+ country: formUtils.getErrorMessage("bankCountry", errors, fieldProblems)
21343
+ },
21344
+ labels: {
21345
+ country: formUtils.getLabel("bankCountry", "bankAccountCountryRegion")
21346
+ },
21347
+ readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
21348
+ allowedCountries: allowedBankCountries,
21349
+ classNameModifiers: ["country"],
21350
+ handleChangeFor: () => handleChangeFor("bankCountry", "input"),
21351
+ helperText: {
21352
+ country: intraRegionCrossBorderPayoutsAllowed ? void 0 : i18n.get(legalEntityType === LegalEntityType.INDIVIDUAL ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered")
21353
+ }
21354
+ });
21355
+ const description = jsx(Typography, {
21356
+ className: "adyen-kyc-u-margin-bottom-12",
21357
+ children: canChangeEntityType ? jsx(AccountHolderDescriptionFragment, {
21358
+ legalEntityResponse
21359
+ }) : jsxs(Fragment, {
21360
+ children: [i18n.get("textToVerifyAccount"), " ", jsx("span", {
21361
+ dangerouslySetInnerHTML: {
21362
+ __html: getMustHaveSameAccountHolderNameText(legalEntityType, accountHolder, i18n)
21363
+ }
21364
+ })]
21365
+ })
21366
+ });
21034
21367
  return jsxs("form", {
21035
21368
  className: "adyen-kyc-verification-method",
21036
21369
  children: [jsx(FormHeader, {
21037
- heading: props.heading
21370
+ heading,
21371
+ descriptionComponent: description
21038
21372
  }), instantVerificationError && jsx(Alert, {
21039
21373
  variant: "error",
21040
21374
  className: "adyen-kyc-instant-verification-error",
@@ -21042,37 +21376,12 @@ function PayoutVerificationMethod(props) {
21042
21376
  children: instantVerificationError.content && jsx("p", {
21043
21377
  children: instantVerificationError.content
21044
21378
  })
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, {
21379
+ }), !enablePreferInstantVerificationMethodFlow || intraRegionCrossBorderPayoutsAllowed && allowedBankCountries.length > 1 ? countryField : void 0, enablePreferInstantVerificationMethodFlow ? jsx(PreferInstantVerificationMethod, {
21380
+ providerName,
21381
+ instantVerificationAvailable,
21382
+ bankInfoValidated,
21383
+ selectVerificationMethod
21384
+ }) : jsx(Field, {
21076
21385
  name: "verificationMethods",
21077
21386
  label: formUtils.getLabel("payoutVerificationMethod", "verificationMethod"),
21078
21387
  errorMessage: formUtils.getErrorMessage("payoutVerificationMethod", errors, fieldProblems),
@@ -21098,7 +21407,7 @@ function PayoutVerificationMethod(props) {
21098
21407
  optionClassNames: () => ({
21099
21408
  label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
21100
21409
  }),
21101
- isOptionDisabled: (option) => props.bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
21410
+ isOptionDisabled: (option) => bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
21102
21411
  renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
21103
21412
  method,
21104
21413
  methodsMetadata
@@ -21114,7 +21423,7 @@ function PayoutVerificationMethod(props) {
21114
21423
  validationErrors: props == null ? void 0 : props.fieldValidationErrors,
21115
21424
  formUtils,
21116
21425
  id: "ariaErrorField"
21117
- }), providerName && hasLoaded(providerName) ? jsx(ContextGuidance, {
21426
+ }), !enablePreferInstantVerificationMethodFlow && providerName && hasLoaded(providerName) ? jsx(ContextGuidance, {
21118
21427
  page: "Instant verification with partner",
21119
21428
  titleId: "howDoesVerificationWithOurPartnerWorks",
21120
21429
  contentId: "bankVerificationWithPartnerSteps",
@@ -21199,6 +21508,8 @@ function PayoutDetailsComponent(props) {
21199
21508
  activeForm,
21200
21509
  legalEntityResponse,
21201
21510
  associatedLegalArrangement,
21511
+ bankVerificationVendors,
21512
+ bankVendorsLoadingStatus,
21202
21513
  handleGetBankVerificationVendors,
21203
21514
  setHideDropinLayout,
21204
21515
  setHideOnHomeButton,
@@ -21207,8 +21518,10 @@ function PayoutDetailsComponent(props) {
21207
21518
  createTrustedTransferInstrument: createTrustedTransferInstrument2,
21208
21519
  handleBankVerificationError: handleBankVerificationError2,
21209
21520
  accountDetailsFromInput,
21521
+ handleNextClick,
21210
21522
  country,
21211
21523
  accountHolder,
21524
+ forms,
21212
21525
  data: propData
21213
21526
  } = props;
21214
21527
  const [instantVerificationError, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
@@ -21216,7 +21529,7 @@ function PayoutDetailsComponent(props) {
21216
21529
  const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
21217
21530
  const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails.formId);
21218
21531
  const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
21219
- const taskHeading = i18n.get("addAndVerifyYourBankDetails");
21532
+ const taskHeading = i18n.get("addABankAccountForPayouts");
21220
21533
  const isBankStatementDocumentOptional = formUtilities(bankDocumentFormProps ?? {}, i18n).isOptionalField("bankStatementDocument");
21221
21534
  const globalData = useGlobalData();
21222
21535
  const data = isEmpty(globalData) ? propData : globalData;
@@ -21261,10 +21574,13 @@ function PayoutDetailsComponent(props) {
21261
21574
  heading: taskHeading,
21262
21575
  id: PayoutVerificationMethodFormID,
21263
21576
  country,
21577
+ forms,
21264
21578
  accountHolder,
21265
21579
  legalEntityResponse,
21266
- bankVerificationVendors: props.bankVerificationVendors,
21580
+ bankVerificationVendors,
21581
+ bankVendorsLoadingStatus,
21267
21582
  bankInfoValidated,
21583
+ handleNextClick,
21268
21584
  instantVerificationAllowed: Boolean(props.instantVerificationEnabled && props.handleGetBankVerificationVendors)
21269
21585
  })
21270
21586
  })
@@ -23885,7 +24201,7 @@ const isFieldRequired = (fieldConfigurations, customRules) => {
23885
24201
  }
23886
24202
  return fieldConfigurations && ((fieldConfigurations == null ? void 0 : fieldConfigurations.rule) === "REQUIRED" || (customRules == null ? void 0 : customRules[fieldConfigurations.rule]) && customRules[fieldConfigurations.rule]() === "REQUIRED");
23887
24203
  };
23888
- function getPropsFromConfigurations(scenarioConfiguration, forms, remediationActions, dataMissingErrors, fieldsWithExistingData, customRules = {}, customLabels2 = {}, customValidators = {}, legalEntityTrustedFields) {
24204
+ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationActions, dataMissingErrors, fieldsWithExistingData, customRules = {}, customLabels2 = {}, customValidators = {}, legalEntityType, legalEntityTrustedFields) {
23889
24205
  var _a;
23890
24206
  const requiredFields = {};
23891
24207
  const optionalFields = {};
@@ -23902,10 +24218,23 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23902
24218
  return;
23903
24219
  }
23904
24220
  const readonly = ["legalFormDescription"];
23905
- const trustedMappings = legalEntityTrustedFields == null ? void 0 : legalEntityTrustedFields.reduce((acc, trusted) => {
24221
+ const trustedFieldMappings = legalEntityTrustedFields == null ? void 0 : legalEntityTrustedFields.reduce((acc, trusted) => {
23906
24222
  switch (trusted.provider) {
23907
- case TrustedFieldsProvider.KOMPANY:
23908
- return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24223
+ case TrustedFieldsProvider.KOMPANY: {
24224
+ if (legalEntityType === "organization") {
24225
+ return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24226
+ }
24227
+ return acc;
24228
+ }
24229
+ case TrustedFieldsProvider.SINGPASS: {
24230
+ if (legalEntityType === "organization") {
24231
+ return [...acc, ...trusted.fields.map((tf) => businessDetailsApiKeyMapping[tf])];
24232
+ }
24233
+ if (legalEntityType === "individual") {
24234
+ return [...acc, ...trusted.fields.map((tf) => individualApiKeyMapping[tf])];
24235
+ }
24236
+ return acc;
24237
+ }
23909
24238
  default:
23910
24239
  return acc;
23911
24240
  }
@@ -23913,6 +24242,9 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23913
24242
  (_a = Object.entries(forms)) == null ? void 0 : _a.forEach(([formId, formDetails]) => {
23914
24243
  var _a2;
23915
24244
  const formFieldsWithExistingData = addLinkedFields(fieldsWithExistingData).filter((field) => field.startsWith(formId)).map((field) => field.slice(field.lastIndexOf(".") + 1));
24245
+ if (trustedFieldMappings) {
24246
+ trustedFields[formId] = getFormTrustedFields(formId, trustedFieldMappings);
24247
+ }
23916
24248
  (_a2 = formDetails == null ? void 0 : formDetails.fields) == null ? void 0 : _a2.forEach((field) => {
23917
24249
  var _a3, _b;
23918
24250
  const fieldConfigurations = scenarioConfiguration[field];
@@ -23931,10 +24263,6 @@ function getPropsFromConfigurations(scenarioConfiguration, forms, remediationAct
23931
24263
  optionalFields[formId] = optionalFields[formId] ? [...optionalFields[formId], field] : [field];
23932
24264
  allFields[formId] = allFields[formId] ? [...allFields[formId], field] : [field];
23933
24265
  }
23934
- const isFieldTrusted = isTrustedField(trustedMappings, formId, field);
23935
- if (isFieldTrusted) {
23936
- trustedFields[formId] = trustedFields[formId] ? [...trustedFields[formId], field] : [field];
23937
- }
23938
24266
  if (fieldConfigurations) {
23939
24267
  const customLabel = (_a3 = customLabels2 == null ? void 0 : customLabels2[field]) == null ? void 0 : _a3.call(customLabels2);
23940
24268
  const label = customLabel || fieldConfigurations.label;
@@ -24025,10 +24353,7 @@ const isFieldRequiredToRemediateDataMissingError = (formId, field, dataMissingEr
24025
24353
  const missingAndLinkedFields = addLinkedFields(missingFields);
24026
24354
  return missingAndLinkedFields.includes(makeTLDSFieldName(formId, field));
24027
24355
  };
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
- });
24356
+ const getFormTrustedFields = (formId, trustedFields) => trustedFields.filter((field) => field.split(".")[0] === formId).map((field) => field.split(".").filter((item) => formId !== item).join("."));
24032
24357
  function getBaseTrackingPayload({
24033
24358
  trackingConfig = {
24034
24359
  topLevelLegalEntity: {}
@@ -24216,6 +24541,18 @@ const dbaNameFieldMetadata = {
24216
24541
  label: "dbaName",
24217
24542
  validators: [validateNotEmptyOnBlur]
24218
24543
  };
24544
+ const getNestedTrustedFields = (field, data, trustedFields) => {
24545
+ if (trustedFields && (data == null ? void 0 : data[field]) && typeof data[field] === "object") {
24546
+ return trustedFields.reduce((fields, trustedField) => {
24547
+ const splitField = trustedField.split(".");
24548
+ if (splitField[0] === field) {
24549
+ return [...fields, splitField[1]];
24550
+ }
24551
+ return fields;
24552
+ }, []);
24553
+ }
24554
+ return [];
24555
+ };
24219
24556
  const mapAddressData = (verifiedBusiness) => ({
24220
24557
  address: verifiedBusiness.street ?? "",
24221
24558
  otherAddressInformation: verifiedBusiness.street2 ?? "",
@@ -24241,7 +24578,7 @@ const structuredListListItem = "adyen-kyc-structured-list-list-item";
24241
24578
  const adyenLayoutMd = "adyen-layout-md";
24242
24579
  const structuredListLabel = "adyen-kyc-structured-list-label";
24243
24580
  const structuredListValue = "adyen-kyc-structured-list-value";
24244
- const styles$3 = {
24581
+ const styles$2 = {
24245
24582
  "structured-list": "adyen-kyc-structured-list",
24246
24583
  structuredList,
24247
24584
  "structured-list-list-item": "adyen-kyc-structured-list-list-item",
@@ -24260,14 +24597,14 @@ const StructuredList = ({
24260
24597
  i18n
24261
24598
  } = useI18nContext();
24262
24599
  return jsx("dl", {
24263
- className: styles$3.structuredList,
24600
+ className: styles$2.structuredList,
24264
24601
  children: items.map((item) => jsxs("div", {
24265
- className: styles$3.structuredListListItem,
24602
+ className: styles$2.structuredListListItem,
24266
24603
  children: [jsx("dt", {
24267
- className: styles$3.structuredListLabel,
24604
+ className: styles$2.structuredListLabel,
24268
24605
  children: i18n.get(item.labelKey)
24269
24606
  }), jsx("dd", {
24270
- className: styles$3.structuredListValue,
24607
+ className: styles$2.structuredListValue,
24271
24608
  children: item.value
24272
24609
  })]
24273
24610
  }, item.labelKey))
@@ -24300,6 +24637,7 @@ function VerifiedBusinessCard({
24300
24637
  children: [address, addressLink && jsx(Link, {
24301
24638
  external: true,
24302
24639
  href: addressLink,
24640
+ iconPosition: "right",
24303
24641
  children: i18n.get("showOnMap")
24304
24642
  })]
24305
24643
  })
@@ -24356,7 +24694,7 @@ function AdditionalInformationComponent({
24356
24694
  handleAddressSearch,
24357
24695
  handleFindAddress
24358
24696
  }) {
24359
- var _a, _b, _c, _d;
24697
+ var _a, _b, _c, _d, _e;
24360
24698
  const {
24361
24699
  basicInformation
24362
24700
  } = useGlobalData();
@@ -24366,9 +24704,6 @@ function AdditionalInformationComponent({
24366
24704
  const {
24367
24705
  i18n
24368
24706
  } = useI18nContext();
24369
- const {
24370
- isExperimentEnabled
24371
- } = useExperimentsContext();
24372
24707
  const showVerified = !!verifiedBusiness;
24373
24708
  const showStockData = companyType === CompanyTypesValue.PUBLIC_COMPANY;
24374
24709
  const addressSchema = getAddressSchemaForCountry(country).filter((field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true);
@@ -24482,6 +24817,7 @@ function AdditionalInformationComponent({
24482
24817
  fieldProblems: formFieldProblems,
24483
24818
  handleChangeFor,
24484
24819
  resetToDefaultData,
24820
+ setData,
24485
24821
  setErrors,
24486
24822
  setValid
24487
24823
  } = useForm({
@@ -24494,6 +24830,7 @@ function AdditionalInformationComponent({
24494
24830
  fieldProblems: fieldValidationErrors,
24495
24831
  shouldValidate
24496
24832
  });
24833
+ const datasetUtils = datasetUtilities(i18n.locale);
24497
24834
  const formUtils = formUtilities(mergedFieldProps ?? initialFormUtilsProps, i18n);
24498
24835
  useEffect(() => {
24499
24836
  updateStateSlice({
@@ -24518,10 +24855,6 @@ function AdditionalInformationComponent({
24518
24855
  }
24519
24856
  };
24520
24857
  }, [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
24858
  useEffect(
24526
24859
  () => applyVerifiedBusinessData(verifiedBusiness, handleChangeFor),
24527
24860
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -24551,10 +24884,26 @@ function AdditionalInformationComponent({
24551
24884
  if (isChecked) {
24552
24885
  handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME);
24553
24886
  setValid("operationalAddress", true);
24887
+ setData("operationalAddress", mergedDefaultData == null ? void 0 : mergedDefaultData.operationalAddress);
24554
24888
  } else {
24555
24889
  handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
24556
24890
  }
24557
24891
  };
24892
+ const registrationAddressDescription = useMemo(() => {
24893
+ var _a2;
24894
+ if ((_a2 = formData.registrationAddress) == null ? void 0 : _a2.country) {
24895
+ return ["US", "NL", "CZ"].includes(formData.registrationAddress.country) ? i18n.get("registeredBusinessAddressDescription__withCountry__commonNoun", {
24896
+ values: {
24897
+ country: datasetUtils.getCountryName(formData.registrationAddress.country)
24898
+ }
24899
+ }) : i18n.get("registeredBusinessAddressDescription__withCountry", {
24900
+ values: {
24901
+ country: datasetUtils.getCountryName(formData.registrationAddress.country)
24902
+ }
24903
+ });
24904
+ }
24905
+ return i18n.get("registeredBusinessAddressDescription");
24906
+ }, [datasetUtils, (_e = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _e.country, i18n]);
24558
24907
  return jsxs("form", {
24559
24908
  id: ADDITIONAL_INFORMATION_FORM_ID,
24560
24909
  className: "adyen-kyc-additional-information",
@@ -24749,9 +25098,6 @@ function AdditionalInformationComponent({
24749
25098
  })]
24750
25099
  })]
24751
25100
  }), jsxs("section", {
24752
- style: {
24753
- display: hideRegistrationAddress ? "none" : "unset"
24754
- },
24755
25101
  children: [jsxs("div", {
24756
25102
  className: "adyen-kyc-additional-information__section-heading",
24757
25103
  children: [jsx(Typography, {
@@ -24761,7 +25107,7 @@ function AdditionalInformationComponent({
24761
25107
  }), jsx(Typography, {
24762
25108
  el: "p",
24763
25109
  variant: "body",
24764
- children: i18n.get("registeredBusinessAddressDescription")
25110
+ children: registrationAddressDescription
24765
25111
  })]
24766
25112
  }), jsx(AddressExperimentWrapper, {
24767
25113
  id: ADDITIONAL_INFORMATION_FORM_ID,
@@ -24777,11 +25123,13 @@ function AdditionalInformationComponent({
24777
25123
  hideCountry: true,
24778
25124
  optionalFields: ["otherAddressInformation"],
24779
25125
  readOnlyFields: verifiedBusiness ? ["stateOrProvince"] : [],
25126
+ trustedFields: getNestedTrustedFields("registrationAddress", data, trustedFields),
24780
25127
  onChange: handleRegistrationAddressChange,
24781
25128
  handleAddressSearch,
24782
25129
  handleFindAddress,
24783
25130
  verifiedBusiness,
24784
- verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress
25131
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress,
25132
+ condensed: true
24785
25133
  })]
24786
25134
  }), jsxs("section", {
24787
25135
  children: [jsxs("div", {
@@ -24823,83 +25171,17 @@ function AdditionalInformationComponent({
24823
25171
  shouldValidate,
24824
25172
  hideCountry: true,
24825
25173
  optionalFields: ["otherAddressInformation"],
25174
+ trustedFields: getNestedTrustedFields("operationalAddress", data, trustedFields),
24826
25175
  onChange: handleOperationalAddressChange,
24827
25176
  handleAddressSearch,
24828
25177
  handleFindAddress,
24829
25178
  verifiedBusiness,
24830
- verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress
25179
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress,
25180
+ condensed: true
24831
25181
  })]
24832
25182
  })]
24833
25183
  });
24834
25184
  }
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
25185
  function CardGroup({
24904
25186
  className,
24905
25187
  children,
@@ -25091,7 +25373,7 @@ function BusinessSelectionComponent({
25091
25373
  } catch (e) {
25092
25374
  logger$r.error(e);
25093
25375
  }
25094
- }, [fetchBusinessData, fetching, selectedBusinessId]);
25376
+ }, [basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]);
25095
25377
  const handleConfirmSelection = useCallback(async (data) => {
25096
25378
  if (!currentTin) return;
25097
25379
  try {
@@ -26067,9 +26349,9 @@ const rules$2 = ({
26067
26349
  },
26068
26350
  nationalityIfRequiredForRole: () => {
26069
26351
  var _a, _b;
26070
- const enableIdentificationNationalityCrossBorderAssociateCheck = isExperimentEnabled("EnableIdentificationNationalityCrossBorderAssociateCheck");
26352
+ const enableNationalitySGHK = isExperimentEnabled("EnableNationalitySGHK");
26071
26353
  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)) {
26354
+ if (enableNationalitySGHK && rootLegalEntityCountry && NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(rootLegalEntityCountry)) {
26073
26355
  return REQUIRED;
26074
26356
  }
26075
26357
  if (NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(country) || ((_b = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b.nationality)) {
@@ -26651,7 +26933,7 @@ const DropinLayout = ({
26651
26933
  onClose: !onBack ? handleClose : void 0,
26652
26934
  onBack,
26653
26935
  children: jsx("div", {
26654
- className: "adyen-kyc-modal-content",
26936
+ className: "adyen-kyc-modal-content adyen-kyc-externalComponent",
26655
26937
  children: content
26656
26938
  })
26657
26939
  });
@@ -26853,7 +27135,7 @@ const FormWrapper = ({
26853
27135
  hideBackButton,
26854
27136
  hideNextButton
26855
27137
  });
26856
- const embeddedFooter = jsx(EmbeddedActionBar, {
27138
+ const embeddedFooter = !hideFooter && jsx(EmbeddedActionBar, {
26857
27139
  left: jsx(StepProgressIndicator, {
26858
27140
  activeStepIndex: currentStep ?? 0,
26859
27141
  stepsCount: totalSteps ?? 3,
@@ -26867,7 +27149,7 @@ const FormWrapper = ({
26867
27149
  icon: "save",
26868
27150
  onClick: handleFinishLater,
26869
27151
  loading: finishLaterLoading
26870
- }), jsx(Button, {
27152
+ }), !hideNextButton && jsx(Button, {
26871
27153
  label: nextButtonLabel,
26872
27154
  onClick: handleNextClick
26873
27155
  })]
@@ -27382,7 +27664,7 @@ function BusinessDetailsDropinComponent({
27382
27664
  isExperimentEnabled
27383
27665
  }), [currentCountry, currentState.data, isExperimentEnabled, taskType]);
27384
27666
  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]);
27667
+ 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
27668
  const isSkippingCompanyStructure = canChangeEntityType && organizationTypesToSkipCompanyStructureForm.includes((_d = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _d.type) && accountHolder !== "aTrust";
27387
27669
  const forms = useMemo(() => {
27388
27670
  const requiredForms = getRequiredForms(initialForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
@@ -27412,7 +27694,7 @@ function BusinessDetailsDropinComponent({
27412
27694
  handleUpdateLegalEntity,
27413
27695
  onExternalSubmit
27414
27696
  });
27415
- }, [baseTrackingPayload, clearToasts, currentState.data, documentUtils, forms, handleUpdateLegalEntity, i18n, isTargetLegalEntityType, legalEntityResponse, onExternalSubmit, currentProblems, showToast]);
27697
+ }, [setAccountHolder, accountHolder, currentState.data, legalEntityResponse, isTargetLegalEntityType, baseTrackingPayload, currentProblems, forms, documentUtils, i18n, showToast, clearToasts, handleUpdateLegalEntity, onExternalSubmit]);
27416
27698
  const {
27417
27699
  handleNextClick,
27418
27700
  handleBackClick,
@@ -27473,6 +27755,7 @@ function BusinessDetailsDropinComponent({
27473
27755
  useEffect(() => {
27474
27756
  if (searchResults && !searchResults.length || searching === "error") {
27475
27757
  setShowCompanyStructure(true);
27758
+ setTrustedFields([]);
27476
27759
  }
27477
27760
  }, [searchResults, searching]);
27478
27761
  useEffect(() => {
@@ -27753,11 +28036,12 @@ function CompanyDropinComponent({
27753
28036
  taskType,
27754
28037
  requiredFields,
27755
28038
  isSettingEnabled,
27756
- isExperimentEnabled
27757
- }), [country, data, taskType, requiredFields, isSettingEnabled]);
28039
+ isExperimentEnabled,
28040
+ accountHolder
28041
+ }), [country, data, taskType, requiredFields, isSettingEnabled, accountHolder]);
27758
28042
  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]);
28043
+ ...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)
28044
+ }), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions, legalEntityResponse]);
27761
28045
  const isCountryOfGoverningLawEnabled = isExperimentEnabled("EnableCountryOfGoverningLawForUKCompanies");
27762
28046
  const {
27763
28047
  state: {
@@ -31219,10 +31503,14 @@ const getCountrySpecificMinimumAgeValidationRule = (country) => {
31219
31503
  const validators = ({
31220
31504
  country,
31221
31505
  isExperimentEnabled = () => false,
31222
- taskType
31506
+ taskType,
31507
+ isLegalAgeEnforced = false
31223
31508
  }) => ({
31224
31509
  birthDate: () => {
31225
31510
  const baseValidators = [isNotEmptyBirthDateValidatorRule, isNotOutOfRangeBirthDateValidatorRule];
31511
+ if (isLegalAgeEnforced) {
31512
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
31513
+ }
31226
31514
  if (isExperimentEnabled("EnableAgeVerification")) {
31227
31515
  if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
31228
31516
  return [...baseValidators, buildMinimumAgeValidationRule(18)];
@@ -31306,6 +31594,10 @@ function IndividualDropinComponent({
31306
31594
  const {
31307
31595
  isExperimentEnabled
31308
31596
  } = useExperimentsContext();
31597
+ const {
31598
+ isSettingEnabled
31599
+ } = useSettingsContext();
31600
+ const isLegalAgeEnforced = isSettingEnabled(SettingNames.EnforceLegalAge);
31309
31601
  let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
31310
31602
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
31311
31603
  let roleTypes = [];
@@ -31358,12 +31650,13 @@ function IndividualDropinComponent({
31358
31650
  isExperimentEnabled,
31359
31651
  rootLegalEntity: parentLegalEntity
31360
31652
  }), [country, data, taskType]);
31361
- const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") ? validators({
31653
+ const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") || isLegalAgeEnforced ? validators({
31362
31654
  country,
31363
31655
  isExperimentEnabled,
31364
- taskType
31656
+ taskType,
31657
+ isLegalAgeEnforced
31365
31658
  }) : {}, [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]);
31659
+ 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
31660
  const {
31368
31661
  state: {
31369
31662
  currentState
@@ -31811,6 +32104,9 @@ const useBankConfigurationHandlers = ({
31811
32104
  setLoadingStatus("success");
31812
32105
  });
31813
32106
  }, [bankAccountCountry, useFreshProviderRedirectUrl]);
32107
+ useEffect(() => {
32108
+ setUseFreshProviderRedirectUrl(true);
32109
+ }, [bankAccountCountry, setUseFreshProviderRedirectUrl]);
31814
32110
  const getConfigurationData = useCallback(async () => {
31815
32111
  var _a;
31816
32112
  const configuration = await getConfiguration2({
@@ -31942,6 +32238,9 @@ function PayoutDetailsDropinComponent({
31942
32238
  showToast,
31943
32239
  clearToasts
31944
32240
  } = useToastContext();
32241
+ const {
32242
+ isExperimentEnabled
32243
+ } = useExperimentsContext();
31945
32244
  const {
31946
32245
  isSettingEnabled
31947
32246
  } = useSettingsContext();
@@ -32059,7 +32358,7 @@ function PayoutDetailsDropinComponent({
32059
32358
  verificationVendorsCallback: handleGetBankVerificationVendors
32060
32359
  }), isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout));
32061
32360
  }, [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]);
32361
+ 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
32362
  useUnifyLoadingStatus(setLoadingStatus, configurationLoadingStatus, bankVendorsLoadingStatus);
32064
32363
  const forms = useMemo(() => {
32065
32364
  const requiredForms = getRequiredForms(payoutDetailsSteps, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
@@ -32274,6 +32573,9 @@ function PayoutDetailsDropinComponent({
32274
32573
  navigateBackToTaskList == null ? void 0 : navigateBackToTaskList();
32275
32574
  } : onSubmit
32276
32575
  });
32576
+ const hideFooter = (isExperimentEnabled("EnablePreferInstantVerificationFlow") || isEmbeddedDropin) && activeForm.formId === payoutSteps.payoutVerificationMethod.formId;
32577
+ const currentStep = useMemo(() => Object.values(forms).findIndex((step) => step.formId === activeForm.formId), [forms, activeForm.formId]);
32578
+ const totalSteps = useMemo(() => Object.keys(forms).length, [forms]);
32277
32579
  return jsx(FormWrapper, {
32278
32580
  taskName: taskName ?? "bankAccountDetails",
32279
32581
  activeForm,
@@ -32289,6 +32591,7 @@ function PayoutDetailsDropinComponent({
32289
32591
  hideDropinLayout,
32290
32592
  hideHomeButton: hideHomeButton || hideOnHomeButton,
32291
32593
  hideBackButton,
32594
+ hideFooter,
32292
32595
  hideNavigation,
32293
32596
  loadingStatus,
32294
32597
  forms,
@@ -32300,6 +32603,8 @@ function PayoutDetailsDropinComponent({
32300
32603
  validateForm: () => setShouldValidate(true),
32301
32604
  canSubmit: canSubmit2(),
32302
32605
  problems,
32606
+ currentStep,
32607
+ totalSteps,
32303
32608
  children: jsx(PayoutDetailsComponent, {
32304
32609
  ...derivedProps,
32305
32610
  capabilities,
@@ -32320,17 +32625,60 @@ function PayoutDetailsDropinComponent({
32320
32625
  onChange,
32321
32626
  legalEntityResponse,
32322
32627
  associatedLegalArrangement,
32628
+ bankVerificationVendors,
32629
+ bankVendorsLoadingStatus,
32323
32630
  handleGetBankVerificationVendors: getBankVerificationVendorsHandler,
32324
32631
  instantVerificationEnabled,
32325
32632
  refreshLegalEntity,
32326
32633
  shouldValidate,
32327
- bankVerificationVendors,
32328
32634
  createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
32329
32635
  handleBankVerificationError: handleBankVerificationError2,
32330
- accountDetailsFromInput
32636
+ accountDetailsFromInput,
32637
+ handleNextClick
32331
32638
  })
32332
32639
  });
32333
32640
  }
32641
+ const outlinedIcon = "adyen-kyc-outlined-icon";
32642
+ const styles$1 = {
32643
+ "outlined-icon": "adyen-kyc-outlined-icon",
32644
+ outlinedIcon
32645
+ };
32646
+ const OutlinedIcon = ({
32647
+ name
32648
+ }) => jsx("div", {
32649
+ className: styles$1.outlinedIcon,
32650
+ children: jsx(Icon, {
32651
+ name
32652
+ })
32653
+ });
32654
+ const Splashscreen = ({
32655
+ title,
32656
+ subtitle,
32657
+ icon,
32658
+ buttonText,
32659
+ onClick
32660
+ }) => {
32661
+ const {
32662
+ i18n
32663
+ } = useI18nContext();
32664
+ return jsxs("div", {
32665
+ className: "adyen-kyc-splashscreen",
32666
+ children: [icon && jsx(OutlinedIcon, {
32667
+ name: icon
32668
+ }), jsx(Typography, {
32669
+ el: "h2",
32670
+ variant: "title-l",
32671
+ children: title
32672
+ }), jsx(Typography, {
32673
+ el: "p",
32674
+ variant: "body",
32675
+ children: subtitle
32676
+ }), onClick && jsx(Button, {
32677
+ onClick,
32678
+ label: buttonText ?? i18n.get("finish")
32679
+ })]
32680
+ });
32681
+ };
32334
32682
  function ContractViewer({
32335
32683
  contract,
32336
32684
  className,
@@ -32376,6 +32724,8 @@ function PciDropinComponent({
32376
32724
  trackingConfig,
32377
32725
  asEmbedded = false,
32378
32726
  asModal = false,
32727
+ needsSigning = true,
32728
+ // TODO: move up to upcoming layout
32379
32729
  handleCloseClick
32380
32730
  }) {
32381
32731
  var _a, _b, _c, _d;
@@ -32547,10 +32897,15 @@ function PciDropinComponent({
32547
32897
  onClick: handleSignClick
32548
32898
  })
32549
32899
  });
32900
+ const endScreen = !needsSigning && jsx(Splashscreen, {
32901
+ icon: "check",
32902
+ title: i18n.get("serviceAgreementSignedAndDated"),
32903
+ onClick: handleCloseClick
32904
+ });
32550
32905
  return jsx(DropinLayout, {
32551
32906
  showAsModal: asModal,
32552
32907
  onClose: handleCloseClick,
32553
- content,
32908
+ content: endScreen || content,
32554
32909
  footer
32555
32910
  });
32556
32911
  }
@@ -33208,47 +33563,6 @@ function RoleAndTypeDropinComponent({
33208
33563
  content
33209
33564
  });
33210
33565
  }
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
33566
  const serviceAgreementValidationRules = {
33253
33567
  signer: {
33254
33568
  modes: ["blur"],
@@ -33841,7 +34155,7 @@ function SolePropDropinComponent({
33841
34155
  requiredFields,
33842
34156
  isSettingEnabled
33843
34157
  }), [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]);
34158
+ 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
34159
  const forms = useMemo(() => {
33846
34160
  const requiredForms = getRequiredForms(solePropForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
33847
34161
  return addValidityToForms(requiredForms, formValidity, problems);
@@ -34124,7 +34438,7 @@ function TrustDropinComponent({
34124
34438
  requiredFields,
34125
34439
  isSettingEnabled
34126
34440
  }), [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]);
34441
+ 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
34442
  const {
34129
34443
  state: {
34130
34444
  currentState
@@ -36421,7 +36735,6 @@ function CreateIndividualComponent({
36421
36735
  legalEntityId,
36422
36736
  taskType,
36423
36737
  onSubmitSuccess,
36424
- handleBackClick,
36425
36738
  modalView,
36426
36739
  onClose,
36427
36740
  onUnmount
@@ -36504,7 +36817,6 @@ function CreateIndividualComponent({
36504
36817
  handleAddressSearch: isAddressEnabled ? searchAddress2 : void 0,
36505
36818
  handleGetIdVerificationToken: isIdDocumentEnabled ? getIdVerificationToken : void 0,
36506
36819
  handleGetIdVerificationStartCheck: isIdDocumentEnabled ? idVerificationStartCheck : void 0,
36507
- handleBackClick,
36508
36820
  hideNavigation: true,
36509
36821
  asModal: isModalView,
36510
36822
  onSubmit,
@@ -36588,39 +36900,10 @@ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
36588
36900
  OnboardingStatus2["VERIFIED"] = "VERIFIED";
36589
36901
  return OnboardingStatus2;
36590
36902
  })(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
36903
  const embeddedStatus = "adyen-kyc-embedded-status";
36620
36904
  const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
36621
36905
  const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
36622
36906
  const embeddedStatusLight = "adyen-kyc-embedded-status-light";
36623
- const embeddedStatusIcon = "adyen-kyc-embedded-status-icon";
36624
36907
  const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
36625
36908
  const styles = {
36626
36909
  "embedded-status": "adyen-kyc-embedded-status",
@@ -36631,8 +36914,6 @@ const styles = {
36631
36914
  embeddedStatusAvatar,
36632
36915
  "embedded-status-light": "adyen-kyc-embedded-status-light",
36633
36916
  embeddedStatusLight,
36634
- "embedded-status-icon": "adyen-kyc-embedded-status-icon",
36635
- embeddedStatusIcon,
36636
36917
  "embedded-status-info": "adyen-kyc-embedded-status-info",
36637
36918
  embeddedStatusInfo
36638
36919
  };
@@ -36702,7 +36983,7 @@ const EmbeddedStatus = ({
36702
36983
  };
36703
36984
  return jsxs("button", {
36704
36985
  type: "button",
36705
- className: cx(className, styles.embeddedStatus, {
36986
+ className: cx(className, styles.embeddedStatus, "adyen-kyc-externalComponent", {
36706
36987
  [styles.embeddedStatusLoading]: loading,
36707
36988
  [styles.embeddedStatusLight]: light
36708
36989
  }),
@@ -36874,7 +37155,7 @@ function ManagePCIComponent({
36874
37155
  } = useI18nContext();
36875
37156
  return jsx(PCIStatus, {
36876
37157
  legalEntityId,
36877
- title: i18n.get("serviceAgreements"),
37158
+ title: i18n.get("pciDssQuestionnaire"),
36878
37159
  onClick
36879
37160
  });
36880
37161
  }
@@ -37254,7 +37535,7 @@ function ManageTransferInstrumentOverview({
37254
37535
  className: "adyen-kyc-manage-ti-overview",
37255
37536
  children: [transferInstrumentListEle, jsx(EmbeddedStatus, {
37256
37537
  title: i18n.get("addBankAccount"),
37257
- iconName: "plus-small",
37538
+ iconName: "plus",
37258
37539
  light: true,
37259
37540
  onClick: () => onAdd(legalEntityId),
37260
37541
  "aria-label": i18n.get("addBankAccount")
@@ -37474,7 +37755,8 @@ function SignPCIComponent({
37474
37755
  } = useI18nContext();
37475
37756
  const [isLoading, setIsLoading] = useState(true);
37476
37757
  const [legalEntity, setLegalEntity] = useState();
37477
- const [needsSigning, setNeedsSigning] = useState(false);
37758
+ const [needsSigning, setNeedsSigning] = useState(true);
37759
+ const [hasGenericError, setHasGenericError] = useState(true);
37478
37760
  const [pciTemplate, setPciTemplate] = useState();
37479
37761
  if (modalView) {
37480
37762
  setIsModalView(true);
@@ -37495,7 +37777,7 @@ function SignPCIComponent({
37495
37777
  signingRequired
37496
37778
  }) => {
37497
37779
  setNeedsSigning(Boolean(signingRequired));
37498
- }).catch(logger$b.error);
37780
+ });
37499
37781
  }, [additionalSalesChannels, getPciStatus2, legalEntityId]);
37500
37782
  const fetchPciTemplate = useCallback(async () => {
37501
37783
  await getPciTemplate2(legalEntityId, {
@@ -37508,13 +37790,13 @@ function SignPCIComponent({
37508
37790
  setIsLoading(true);
37509
37791
  await fetchLegalEntity();
37510
37792
  await fetchStatus();
37511
- if (needsSigning) {
37512
- await fetchPciTemplate();
37513
- }
37514
- })().catch(logger$b.error).finally(() => {
37793
+ await fetchPciTemplate();
37794
+ })().catch(() => {
37795
+ setHasGenericError(true);
37796
+ }).finally(() => {
37515
37797
  setIsLoading(false);
37516
37798
  });
37517
- }, [fetchLegalEntity, fetchPciTemplate, fetchStatus, needsSigning]);
37799
+ }, [fetchLegalEntity, fetchPciTemplate, fetchStatus]);
37518
37800
  const handleSign = useCallback(
37519
37801
  // @ts-ignore-error:next-line ts does not infer type correctly
37520
37802
  async (...params) => {
@@ -37527,12 +37809,23 @@ function SignPCIComponent({
37527
37809
  );
37528
37810
  const handleHomeClick = () => {
37529
37811
  };
37530
- if (isLoading || !legalEntity || !pciTemplate) {
37812
+ if (isLoading || !legalEntity) {
37531
37813
  return jsx(Loader, {
37532
37814
  size: "medium"
37533
37815
  });
37534
37816
  }
37535
- return jsx(PciDropinComponent, {
37817
+ if (!hasGenericError) {
37818
+ return jsx(DropinLayout, {
37819
+ showAsModal: modalView,
37820
+ onClose: handleOnClose,
37821
+ content: jsx(Splashscreen, {
37822
+ icon: "check",
37823
+ title: i18n.get("pciDoesNotNeedSigningOrHasBeenSigned"),
37824
+ onClick: handleOnClose
37825
+ })
37826
+ });
37827
+ }
37828
+ return pciTemplate ? jsx(PciDropinComponent, {
37536
37829
  taskType: TaskTypes.PCI_DSS,
37537
37830
  legalEntityResponse: legalEntity,
37538
37831
  pciTemplateResponse: pciTemplate,
@@ -37543,8 +37836,9 @@ function SignPCIComponent({
37543
37836
  handleSign,
37544
37837
  handleCloseClick: handleOnClose,
37545
37838
  asModal: isModalView,
37839
+ needsSigning,
37546
37840
  asEmbedded: true
37547
- });
37841
+ }) : null;
37548
37842
  }
37549
37843
  var HighExposurePagesEnums = /* @__PURE__ */ ((HighExposurePagesEnums2) => {
37550
37844
  HighExposurePagesEnums2["COMPANY_PAGE"] = "company";
@@ -38468,7 +38762,7 @@ function HighExposureRegisteredAddress({
38468
38762
  "aria-label": i18n.get("isThisAddressTheMainHeadquarters"),
38469
38763
  "aria-invalid": !valid.isThisAddressTheMainHeadquarters
38470
38764
  })
38471
- }), jsx(Address, {
38765
+ }), jsx(AddressExperimentWrapper, {
38472
38766
  data: addressData,
38473
38767
  countryCode: country,
38474
38768
  id: targetPage,
@@ -39009,7 +39303,7 @@ function UpdateLegalEntityForHighExposure({
39009
39303
  setLoadingStatus,
39010
39304
  country
39011
39305
  });
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]);
39306
+ 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
39307
  const {
39014
39308
  state: {
39015
39309
  currentState
@@ -39913,7 +40207,7 @@ const ConfigurationApiProvider = ({
39913
40207
  isEmbeddedDropin,
39914
40208
  loadingContext
39915
40209
  } = authContext;
39916
- const sdkVersion = "3.31.0";
40210
+ const sdkVersion = "3.32.0";
39917
40211
  useAnalytics({
39918
40212
  onUserEvent,
39919
40213
  legalEntityId: rootLegalEntityId,
@@ -40106,7 +40400,8 @@ const settingsDefaults = {
40106
40400
  viewOnboardingGuidance: false,
40107
40401
  transferInstrumentLimit: 0,
40108
40402
  instantBankVerification: true,
40109
- showServiceAgreementsFirst: false
40403
+ showServiceAgreementsFirst: false,
40404
+ enforceLegalAge: false
40110
40405
  };
40111
40406
  function SettingsProvider({
40112
40407
  children,
@@ -40599,7 +40894,7 @@ const DebugModal = ({
40599
40894
  };
40600
40895
  const copyToClipboard = async () => {
40601
40896
  const toCopy = {
40602
- sdkVersion: "3.31.0",
40897
+ sdkVersion: "3.32.0",
40603
40898
  experiments: Object.fromEntries(allExperimentsWithValues),
40604
40899
  settings: Object.fromEntries(allSettingsWithValues)
40605
40900
  };
@@ -40638,7 +40933,7 @@ const DebugModal = ({
40638
40933
  children: [jsxs("div", {
40639
40934
  className: "adyen-kyc-debug-modal__meta",
40640
40935
  children: [jsxs("span", {
40641
- children: ["SDK version: ", "3.31.0"]
40936
+ children: ["SDK version: ", "3.32.0"]
40642
40937
  }), jsxs("span", {
40643
40938
  children: ["rootLegalEntityId: ", rootLegalEntityId]
40644
40939
  })]
@@ -41462,9 +41757,6 @@ const createIndividualComponentSchema = {
41462
41757
  },
41463
41758
  taskType: {
41464
41759
  type: "string"
41465
- },
41466
- handleBackClick: {
41467
- type: "function"
41468
41760
  }
41469
41761
  };
41470
41762
  const manageIndividualComponentSchema = {