@adyen/kyc-components 3.29.0 → 3.30.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 (38) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1083 -512
  2. package/dist/style.css +127 -694
  3. package/dist/types/components/AdditionalInformation/VerifiedBusinessCard.d.ts +3 -1
  4. package/dist/types/components/AdditionalInformation/utils.d.ts +6 -0
  5. package/dist/types/components/BusinessSelection/types.d.ts +3 -1
  6. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +1 -1
  7. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +1 -0
  8. package/dist/types/components/Dropins/types.d.ts +2 -2
  9. package/dist/types/components/EmbeddedDropins/CreateContractingComponent/CreateContractingComponent.d.ts +2 -1
  10. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +2 -1
  11. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent.d.ts +2 -1
  12. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +2 -1
  13. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +2 -1
  14. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +2 -1
  15. package/dist/types/components/PayoutAccount/component/CheckGuidance/CheckGuidance.d.ts +1 -0
  16. package/dist/types/components/RegistrationAddress/component/RegistrationAddressComponent.d.ts +2 -1
  17. package/dist/types/components/index.d.ts +14 -2
  18. package/dist/types/components/internal/Address/AddressComponent.d.ts +3 -0
  19. package/dist/types/components/internal/Address/AddressExperimentWrapper.d.ts +2 -0
  20. package/dist/types/components/internal/Address/components/FieldContainerComponent.d.ts +9 -0
  21. package/dist/types/components/internal/Address/types.d.ts +6 -10
  22. package/dist/types/components/internal/Address/validate.d.ts +2 -2
  23. package/dist/types/components/internal/FormFields/MultiSelectList/MultiSelectList.d.ts +1 -0
  24. package/dist/types/components/internal/FormFields/Select/Select.d.ts +2 -1
  25. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts +2 -1
  26. package/dist/types/components/internal/FormFields/Select/components/SelectList.d.ts +1 -0
  27. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -0
  28. package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -1
  29. package/dist/types/core/Context/ExperimentContext/types.d.ts +4 -1
  30. package/dist/types/core/Context/SettingsContext/types.d.ts +3 -1
  31. package/dist/types/core/SDKValidation/types.d.ts +2 -2
  32. package/dist/types/core/Services/componentApi/get-address.d.ts +2 -2
  33. package/dist/types/core/hooks/useBusinessData/types.d.ts +3 -1
  34. package/dist/types/core/hooks/useDebounce.d.ts +1 -0
  35. package/dist/types/core/models/api/address-search.d.ts +1 -8
  36. package/dist/types/core/models/api/company-search.d.ts +7 -0
  37. package/dist/types/core/models/form-rules.d.ts +2 -0
  38. package/package.json +1 -1
@@ -112,6 +112,7 @@ const defaultTrans = {
112
112
  addPayinAccount: "Add a payin account",
113
113
  addPayoutAccount: "Add a payout account",
114
114
  addTrustMember: "Add trust member",
115
+ addYourselfAsSigner: "Add yourself as a signer",
115
116
  additionalInformation: "Additional information",
116
117
  additionalInformationFormHeading: "Additional business details",
117
118
  additionalInformationFormName: "Additional details",
@@ -500,6 +501,8 @@ const defaultTrans = {
500
501
  errorMessage_1_3051: "The proof of national ID number image was of too low quality.",
501
502
  errorMessage_1_3052: "An ID document is needed to verify the individual.",
502
503
  errorMessage_1_3062: "The name and 4 digit SSN couldn't be verified.",
504
+ errorMessage_1_3072: "We found the following issues:\n- The name and nationality couldn't be verified.\nReview the information below and correct any mistakes, or upload an id document then resubmit.",
505
+ errorMessage_1_3073: "We found the following issues:\n- The ID document didn't show the nationality.\nReview the information below and correct any mistakes, or upload an id document then resubmit.",
503
506
  errorMessage_1_31: "ID document is needed",
504
507
  errorMessage_1_32: "ID document couldn't be processed",
505
508
  errorMessage_1_33: "ID document didn't meet requirements",
@@ -873,6 +876,7 @@ const defaultTrans = {
873
876
  isParentOwnedByAnotherCompany: "Is your parent company owned by another company?",
874
877
  isThisAddressTheMainHeadquarters: "Is this address the main headquarters?",
875
878
  isTrustOperationAddressSame: "Is there a different address for your trust's operations?",
879
+ isYourNameMissingFromSigners: "Is your name missing from the list of signers?",
876
880
  issuedByTheTaxAuthority: "Issued by the tax authority or government of the country where the company is registered",
877
881
  issuedInTheLastXMonths: "Issued in the last %{number} months",
878
882
  issuerState: "Issuing state",
@@ -973,6 +977,7 @@ const defaultTrans = {
973
977
  nonProfitOrCharitableOrgDescription: "Your organization has official non-profit or tax-exempt status.",
974
978
  nonProfitOrCharitableOrgTitle: "Non-profit or charitable organization",
975
979
  noneOfTheAbove: "None of the above",
980
+ nothingNeedsToBeSigned: "Nothing needs to be signed right now.",
976
981
  notBlurry: "Not blurry",
977
982
  notCutOff: "Not cut off",
978
983
  notExpired: "Not expired",
@@ -1336,6 +1341,7 @@ const defaultTrans = {
1336
1341
  theIdCheckWillBeAutomaticallyValidated: "With the right capture, the ID check will be automatically validated",
1337
1342
  theSubmitWasSuccessful: "The submit was successful",
1338
1343
  thenResubmit: "then resubmit.",
1344
+ thereAreNoSigners: "There are no signers, please add yourself to make sure you can accept the terms and get the funds.",
1339
1345
  thereWasAnErrorTryAgain: "There was an error, please try again",
1340
1346
  thisIsMyBusiness: "This is my business",
1341
1347
  thisMeansYouHaveAParentCompany: "If yes, this means you have a parent company, such as a global headquarters or a holding company.",
@@ -1860,7 +1866,7 @@ class UserEvents {
1860
1866
  }
1861
1867
  }
1862
1868
  const userEvents = new UserEvents();
1863
- const logger$J = createLogger("useCompanySearch");
1869
+ const logger$K = createLogger("useCompanySearch");
1864
1870
  const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
1865
1871
  function useCompanySearch({
1866
1872
  defaultData,
@@ -1984,7 +1990,7 @@ function useCompanySearch({
1984
1990
  state: companyData.state ?? stateOrProvince
1985
1991
  });
1986
1992
  } catch (e) {
1987
- logger$J.error(e);
1993
+ logger$K.error(e);
1988
1994
  setError(e);
1989
1995
  setStatus("error");
1990
1996
  } finally {
@@ -2017,7 +2023,7 @@ function useCompanySearch({
2017
2023
  indexSearch: handleCompanyIndexSearch,
2018
2024
  deepSearch: handleCompanyDeepSearch,
2019
2025
  resultsLimit: limit
2020
- })) == null ? void 0 : _a.catch((e) => logger$J.error(e));
2026
+ })) == null ? void 0 : _a.catch((e) => logger$K.error(e));
2021
2027
  }
2022
2028
  }, [legalCompanyName, country, stateOrProvince, taxIdentificationNumber, verifiedCompany, searchCompanies, handleCompanyIndexSearch, handleCompanyDeepSearch, limit, canVerify, baseTrackingPayload]);
2023
2029
  useEffect(() => {
@@ -2040,8 +2046,8 @@ function useCompanySearch({
2040
2046
  reset
2041
2047
  };
2042
2048
  }
2043
- const logger$I = createLogger("useBusinessData");
2044
- const KNOWN_BROKEN_PRIMARY_SOURCE_CONNECTIONS = [StateCodesUS.Arkansas, StateCodesUS.Connecticut, StateCodesUS.Georgia, StateCodesUS.Hawaii, StateCodesUS.Kentucky, StateCodesUS.Maryland, StateCodesUS.Minnesota, StateCodesUS.Missouri, StateCodesUS.Montana, StateCodesUS.NewHampshire, StateCodesUS.NewMexico, StateCodesUS.SouthCarolina, StateCodesUS.Utah, StateCodesUS.Vermont, StateCodesUS.Wisconsin, StateCodesUS.Wyoming];
2049
+ const logger$J = createLogger("useBusinessData");
2050
+ 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];
2045
2051
  function useBusinessData({
2046
2052
  handleCompanyIndexSearch,
2047
2053
  handleCompanyDeepSearch,
@@ -2076,7 +2082,7 @@ function useBusinessData({
2076
2082
  };
2077
2083
  const searchForBusiness = useCallback(async (data) => {
2078
2084
  if (!handleCompanyDeepSearch || !handleCompanyIndexSearch) {
2079
- logger$I.log("Missing handlers for searchForBusiness");
2085
+ logger$J.log("Missing handlers for searchForBusiness");
2080
2086
  return;
2081
2087
  }
2082
2088
  if (searchResults && objectsDeepEqual(cachedSearch, data)) return;
@@ -2093,15 +2099,15 @@ function useBusinessData({
2093
2099
  return response == null ? void 0 : response.results;
2094
2100
  } catch (e) {
2095
2101
  setSearching("error");
2096
- logger$I.error(e);
2102
+ logger$J.error(e);
2097
2103
  } finally {
2098
2104
  setCachedSearch(data);
2099
2105
  setSearching((prevState) => prevState !== "error" ? "loaded" : prevState);
2100
2106
  }
2101
2107
  }, [handleCompanyDeepSearch, handleCompanyIndexSearch, searchResults, cachedSearch]);
2102
- const fetchBusinessData = useCallback(async (company) => {
2108
+ const fetchBusinessData = useCallback(async (company, state) => {
2103
2109
  if (!handleGetCompanyDataset || !handleRefreshCompanyDataset) {
2104
- logger$I.log("Missing handlers for fetchBusinessData");
2110
+ logger$J.log("Missing handlers for fetchBusinessData");
2105
2111
  return;
2106
2112
  }
2107
2113
  if (cachedBusiness && objectsDeepEqual({
@@ -2120,23 +2126,25 @@ function useBusinessData({
2120
2126
  const businessData = isDataCompliant ? await handleGetCompanyDataset({
2121
2127
  companyId: company.id,
2122
2128
  country: "US"
2129
+ // state: state as StateCodeUS,
2123
2130
  }) : await handleRefreshCompanyDataset({
2124
2131
  companyId: company.id,
2125
2132
  country: "US"
2133
+ // state: state as StateCodeUS,
2126
2134
  });
2127
2135
  setCachedBusiness(businessData);
2128
2136
  return businessData;
2129
2137
  } catch (e) {
2130
2138
  setFetching("error");
2131
2139
  setCachedBusiness(void 0);
2132
- logger$I.error(e);
2140
+ logger$J.error(e);
2133
2141
  } finally {
2134
2142
  setFetching((prevState) => prevState !== "error" ? "loaded" : prevState);
2135
2143
  }
2136
2144
  }, [cachedBusiness, handleGetCompanyDataset, handleRefreshCompanyDataset]);
2137
2145
  const verifyBusinessData = useCallback(async (data, tin) => {
2138
2146
  if (!handleVerifyTin) {
2139
- logger$I.log("Missing handlers for verifyBusinessData");
2147
+ logger$J.log("Missing handlers for verifyBusinessData");
2140
2148
  return;
2141
2149
  }
2142
2150
  try {
@@ -2157,7 +2165,7 @@ function useBusinessData({
2157
2165
  return matched;
2158
2166
  } catch (e) {
2159
2167
  setVerifying("error");
2160
- logger$I.error(e);
2168
+ logger$J.error(e);
2161
2169
  } finally {
2162
2170
  setVerifying((prevState) => prevState !== "error" ? "loaded" : prevState);
2163
2171
  }
@@ -2168,7 +2176,7 @@ function useBusinessData({
2168
2176
  await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
2169
2177
  } catch (e) {
2170
2178
  setResettingTrustedData("error");
2171
- logger$I.error(e);
2179
+ logger$J.error(e);
2172
2180
  } finally {
2173
2181
  setResettingTrustedData((prevState) => prevState !== "error" ? "loaded" : prevState);
2174
2182
  }
@@ -2217,6 +2225,7 @@ var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2217
2225
  SettingNames2["TransferInstrumentLimit"] = "transferInstrumentLimit";
2218
2226
  SettingNames2["ViewOnboardingGuidance"] = "viewOnboardingGuidance";
2219
2227
  SettingNames2["InstantBankVerification"] = "instantBankVerification";
2228
+ SettingNames2["ShowServiceAgreementsFirst"] = "showServiceAgreementsFirst";
2220
2229
  return SettingNames2;
2221
2230
  })(SettingNames || {});
2222
2231
  const SettingsContext = createContext(void 0);
@@ -2515,7 +2524,7 @@ const svgs = {
2515
2524
  "trustly-logo": lazy(() => import("./trustly-logo-YJslAOYF.js"))
2516
2525
  };
2517
2526
  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"];
2518
- const logger$H = createLogger("Icon");
2527
+ const logger$I = createLogger("Icon");
2519
2528
  const Svg = ({
2520
2529
  className,
2521
2530
  name,
@@ -2526,7 +2535,7 @@ const Svg = ({
2526
2535
  const LazyLoadedSvg = svgs[name];
2527
2536
  const viewBox = unscalableIconNames.includes(name) ? "0 0 16 16" : void 0;
2528
2537
  if (!LazyLoadedSvg) {
2529
- logger$H.error(`No such svg: "${name}"`);
2538
+ logger$I.error(`No such svg: "${name}"`);
2530
2539
  return null;
2531
2540
  }
2532
2541
  return jsx("span", {
@@ -2814,10 +2823,10 @@ function useFormRouterContext() {
2814
2823
  }
2815
2824
  return context;
2816
2825
  }
2817
- const logger$G = createLogger("Link");
2826
+ const logger$H = createLogger("Link");
2818
2827
  const isValidLink = (href) => {
2819
2828
  if (href === "#") {
2820
- logger$G.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2829
+ logger$H.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2821
2830
  return false;
2822
2831
  }
2823
2832
  return true;
@@ -3093,6 +3102,7 @@ function getFieldProps(props, innerFormFields) {
3093
3102
  var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
3094
3103
  ExperimentNames2["EnableCompanySearchFlow"] = "EnableCompanySearchFlow";
3095
3104
  ExperimentNames2["EnableNewBusinessDetailsFlow"] = "EnableNewBusinessDetailsFlow";
3105
+ ExperimentNames2["EnableNewAddressComponent"] = "EnableNewAddressComponent";
3096
3106
  ExperimentNames2["EnableNewEntryFlow"] = "EnableNewEntryFlow";
3097
3107
  ExperimentNames2["AllowOrganizationSettlorWithExemptionReason"] = "AllowOrganizationSettlorWithExemptionReason";
3098
3108
  ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
@@ -3106,6 +3116,8 @@ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
3106
3116
  ExperimentNames2["EnableAgeVerification"] = "EnableAgeVerification";
3107
3117
  ExperimentNames2["PreserveMismatchedInitialValues"] = "PreserveMismatchedInitialValues";
3108
3118
  ExperimentNames2["StrictNameAndAddressValidationV4"] = "StrictNameAndAddressValidationV4";
3119
+ ExperimentNames2["EnableIdentificationNationalityCrossBorderAssociateCheck"] = "EnableIdentificationNationalityCrossBorderAssociateCheck";
3120
+ ExperimentNames2["EnableAUGovernmentalOrganizationSkipRegistrationNumber"] = "EnableAUGovernmentalOrganizationSkipRegistrationNumber";
3109
3121
  return ExperimentNames2;
3110
3122
  })(ExperimentNames || {});
3111
3123
  const ON_CHANGE_DEBOUNCE_DURATION = 200;
@@ -3166,7 +3178,7 @@ const useSetting = (settingName) => {
3166
3178
  } = context;
3167
3179
  return getSetting(settingName);
3168
3180
  };
3169
- const logger$F = createLogger("useAllowedCountries");
3181
+ const logger$G = createLogger("useAllowedCountries");
3170
3182
  const useAllowedCountries = () => {
3171
3183
  const acceptedCountries = useSetting("acceptedCountries");
3172
3184
  const {
@@ -3175,7 +3187,7 @@ const useAllowedCountries = () => {
3175
3187
  const [allowedCountries, setAllowedCountries] = useState(acceptedCountries);
3176
3188
  useEffect(() => {
3177
3189
  if (acceptedCountries !== void 0) return;
3178
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$F.error);
3190
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$G.error);
3179
3191
  }, [acceptedCountries]);
3180
3192
  return allowedCountries;
3181
3193
  };
@@ -3534,7 +3546,7 @@ function reducer({
3534
3546
  }
3535
3547
  };
3536
3548
  }
3537
- const logger$E = createLogger("useAsyncValidator");
3549
+ const logger$F = createLogger("useAsyncValidator");
3538
3550
  const useAsyncValidator = (asyncRules) => {
3539
3551
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
3540
3552
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -3555,7 +3567,7 @@ const useAsyncValidator = (asyncRules) => {
3555
3567
  hasError: !isValid
3556
3568
  }])
3557
3569
  });
3558
- }).catch(logger$E.error);
3570
+ }).catch(logger$F.error);
3559
3571
  }, [asyncRules, clearAsyncValidationResults]);
3560
3572
  return {
3561
3573
  asyncValidationResults,
@@ -3976,6 +3988,14 @@ const Field = ({
3976
3988
  })
3977
3989
  });
3978
3990
  };
3991
+ const useDebounce = (value, delay) => {
3992
+ const [debouncedValue, setDebouncedValue] = useState(value);
3993
+ useEffect(() => {
3994
+ const handler = setTimeout(() => setDebouncedValue(value), delay);
3995
+ return () => clearTimeout(handler);
3996
+ }, [value, delay]);
3997
+ return debouncedValue;
3998
+ };
3979
3999
  const getScrollParent = (node) => {
3980
4000
  if (!node) return null;
3981
4001
  const isElement = node instanceof HTMLElement;
@@ -4001,32 +4021,6 @@ const Tag = ({
4001
4021
  children
4002
4022
  });
4003
4023
  };
4004
- const adyenKycDropdown = "adyen-kyc-dropdown";
4005
- const adyenKycDropdownButton = "adyen-kyc-dropdown-button";
4006
- const adyenKycDropdownButtonActive = "adyen-kyc-dropdown-button--active";
4007
- const adyenKycFilterInput = "adyen-kyc-filter-input";
4008
- const adyenKycDropdownList = "adyen-kyc-dropdown-list";
4009
- const adyenKycDropdownListTransformer = "adyen-kyc-dropdown-list__transformer";
4010
- const adyenKycDropdownListActive = "adyen-kyc-dropdown-list--active";
4011
- const adyenKycDropdownElement = "adyen-kyc-dropdown-element";
4012
- const styles$7 = {
4013
- "adyen-kyc-dropdown": "adyen-kyc-dropdown",
4014
- adyenKycDropdown,
4015
- "adyen-kyc-dropdown-button": "adyen-kyc-dropdown-button",
4016
- adyenKycDropdownButton,
4017
- "adyen-kyc-dropdown-button--active": "adyen-kyc-dropdown-button--active",
4018
- adyenKycDropdownButtonActive,
4019
- "adyen-kyc-filter-input": "adyen-kyc-filter-input",
4020
- adyenKycFilterInput,
4021
- "adyen-kyc-dropdown-list": "adyen-kyc-dropdown-list",
4022
- adyenKycDropdownList,
4023
- "adyen-kyc-dropdown-list__transformer": "adyen-kyc-dropdown-list__transformer",
4024
- adyenKycDropdownListTransformer,
4025
- "adyen-kyc-dropdown-list--active": "adyen-kyc-dropdown-list--active",
4026
- adyenKycDropdownListActive,
4027
- "adyen-kyc-dropdown-element": "adyen-kyc-dropdown-element",
4028
- adyenKycDropdownElement
4029
- };
4030
4024
  function SelectButtonElement({
4031
4025
  filterable,
4032
4026
  isMulti,
@@ -4062,6 +4056,7 @@ function SelectButton({
4062
4056
  isMulti,
4063
4057
  id,
4064
4058
  isSearch,
4059
+ hideSearchIcon = false,
4065
4060
  loading,
4066
4061
  textFilter
4067
4062
  }) {
@@ -4074,10 +4069,8 @@ function SelectButton({
4074
4069
  "aria-haspopup": "listbox",
4075
4070
  className: cx({
4076
4071
  "adyen-kyc-dropdown-button": true,
4077
- [styles$7["adyen-kyc-dropdown-button"]]: true,
4078
4072
  "adyen-kyc-dropdown-button--readonly": readonly,
4079
4073
  "adyen-kyc-dropdown-button--active": showList,
4080
- [styles$7["adyen-kyc-dropdown-button--active"]]: showList,
4081
4074
  "adyen-kyc-dropdown-button--invalid": isInvalid,
4082
4075
  "adyen-kyc-dropdown-field--valid": isValid,
4083
4076
  "adyen-kyc-dropdown-button-search": isSearch
@@ -4106,6 +4099,7 @@ function SelectButton({
4106
4099
  filterable,
4107
4100
  onInput,
4108
4101
  isSearch,
4102
+ hideSearchIcon,
4109
4103
  loading,
4110
4104
  textFilter
4111
4105
  })
@@ -4120,6 +4114,7 @@ const SelectButtonContentSingle = ({
4120
4114
  filterable,
4121
4115
  onInput,
4122
4116
  isSearch,
4117
+ hideSearchIcon = false,
4123
4118
  loading,
4124
4119
  textFilter
4125
4120
  }) => {
@@ -4128,17 +4123,17 @@ const SelectButtonContentSingle = ({
4128
4123
  children: [(activeSingle == null ? void 0 : activeSingle.icon) && jsx("span", {
4129
4124
  className: "adyen-kyc-dropdown-button__icon",
4130
4125
  children: activeSingle.icon
4131
- }), isSearch && jsx(Icon, {
4126
+ }), isSearch && !hideSearchIcon && jsx(Icon, {
4132
4127
  name: "search",
4133
4128
  className: "adyen-kyc-dropdown-button-search__icon"
4134
4129
  }), jsx("span", {
4135
4130
  className: cx("adyen-kyc-dropdown-button__text", {
4136
- "adyen-kyc-dropdown-button__text--placeholder": !activeSingle
4131
+ "adyen-kyc-dropdown-button__text--placeholder": !activeSingle && placeholder
4137
4132
  }),
4138
4133
  children: (activeSingle == null ? void 0 : activeSingle.selectedOptionName) || (activeSingle == null ? void 0 : activeSingle.name) || textFilter || placeholder
4139
4134
  })]
4140
4135
  }) : jsxs(Fragment, {
4141
- children: [isSearch && jsx(Icon, {
4136
+ children: [isSearch && !hideSearchIcon && jsx(Icon, {
4142
4137
  name: "search",
4143
4138
  className: "adyen-kyc-dropdown-button-search__icon"
4144
4139
  }), jsx("input", {
@@ -4147,7 +4142,7 @@ const SelectButtonContentSingle = ({
4147
4142
  "aria-expanded": showList,
4148
4143
  "aria-owns": selectListId,
4149
4144
  autoComplete: "off",
4150
- className: cx("adyen-kyc-filter-input", [styles$7["adyen-kyc-filter-input"]]),
4145
+ className: cx("adyen-kyc-filter-input"),
4151
4146
  onInput,
4152
4147
  placeholder,
4153
4148
  ref: filterInputRef,
@@ -4235,7 +4230,7 @@ const SelectListItem = ({
4235
4230
  }) => jsx("li", {
4236
4231
  "aria-disabled": !!item.disabled,
4237
4232
  "aria-selected": selected,
4238
- className: cx(["adyen-kyc-dropdown-element", styles$7["adyen-kyc-dropdown-element"], {
4233
+ className: cx(["adyen-kyc-dropdown-element", {
4239
4234
  "adyen-kyc-dropdown-element--active": selected,
4240
4235
  "adyen-kyc-dropdown-element--disabled": !!item.disabled,
4241
4236
  "adyen-kyc-dropdown-multi-element": isMulti,
@@ -4366,9 +4361,7 @@ function SelectList({
4366
4361
  test: true,
4367
4362
  "adyen-kyc-dropdown-list--above": showAbove,
4368
4363
  "adyen-kyc-dropdown-list": true,
4369
- [styles$7["adyen-kyc-dropdown-list"]]: true,
4370
- "adyen-kyc-dropdown-list--active": showList,
4371
- [styles$7["adyen-kyc-dropdown-list--active"]]: showList
4364
+ "adyen-kyc-dropdown-list--active": showList
4372
4365
  }),
4373
4366
  id: props.selectListId,
4374
4367
  role: "listbox",
@@ -4400,7 +4393,7 @@ const Select = ({
4400
4393
  name,
4401
4394
  isInvalid = false,
4402
4395
  isValid,
4403
- placeholder,
4396
+ placeholder = "",
4404
4397
  isMulti,
4405
4398
  uniqueId,
4406
4399
  showSelectedItemsAsTags = false,
@@ -4410,21 +4403,21 @@ const Select = ({
4410
4403
  loading = false,
4411
4404
  getSearchItem,
4412
4405
  searchText,
4406
+ onSearchTextChange,
4413
4407
  showSearchList
4414
4408
  }) => {
4415
4409
  const filterInputRef = useRef(null);
4416
4410
  const selectContainerRef = useRef(null);
4417
4411
  const toggleButtonRef = useRef(null);
4418
4412
  const selectListRef = useRef(null);
4419
- const [textFilter, setTextFilter] = useState(null);
4413
+ const [textFilter, setTextFilter] = useState(searchText);
4420
4414
  const [isShowList, setIsShowList] = useState(false);
4421
4415
  const selectListId = useMemo(() => `select-${uuidv4()}`, []);
4422
4416
  const active = items.filter((i) => !isMulti ? i.id === selected : selected == null ? void 0 : selected.includes(i.id)) || [];
4423
4417
  const [isShowListAbove, setIsShowListAbove] = useState(false);
4424
4418
  const [scrollParent, setScrollParent] = useState(null);
4425
- const debouncedOnSearch = useCallback(debounce(onSearch, 500), [onSearch]);
4426
4419
  const closeList = () => {
4427
- setTextFilter(null);
4420
+ if (!onSearchTextChange) setTextFilter(null);
4428
4421
  setIsShowList(false);
4429
4422
  if (toggleButtonRef.current) toggleButtonRef.current.focus();
4430
4423
  };
@@ -4535,11 +4528,19 @@ const Select = ({
4535
4528
  const {
4536
4529
  value
4537
4530
  } = e.target;
4538
- if (isSearch && value.length > 2) {
4539
- debouncedOnSearch(value);
4531
+ if (onSearchTextChange) {
4532
+ onSearchTextChange == null ? void 0 : onSearchTextChange(value);
4533
+ setTextFilter(value);
4534
+ } else {
4535
+ setTextFilter(value.toLowerCase());
4540
4536
  }
4541
- setTextFilter(value.toLowerCase());
4542
4537
  };
4538
+ const debouncedTextFilter = useDebounce(textFilter, 500);
4539
+ useEffect(() => {
4540
+ if (isSearch && (debouncedTextFilter == null ? void 0 : debouncedTextFilter.length) > 2) {
4541
+ onSearch(debouncedTextFilter);
4542
+ }
4543
+ }, [debouncedTextFilter]);
4543
4544
  const toggleList = (e) => {
4544
4545
  e.preventDefault();
4545
4546
  if (isShowList) {
@@ -4549,9 +4550,9 @@ const Select = ({
4549
4550
  }
4550
4551
  };
4551
4552
  useEffect(() => {
4552
- if (resetSearch) {
4553
- setTextFilter("");
4554
- }
4553
+ if (!onSearchTextChange) {
4554
+ if (resetSearch) setTextFilter("");
4555
+ } else if (resetSearch && !searchText) setTextFilter("");
4555
4556
  }, [resetSearch]);
4556
4557
  useEffect(() => {
4557
4558
  setTextFilter(searchText);
@@ -4571,7 +4572,7 @@ const Select = ({
4571
4572
  };
4572
4573
  }, []);
4573
4574
  return jsxs("div", {
4574
- className: cx(["adyen-kyc-dropdown", styles$7["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
4575
+ className: cx(["adyen-kyc-dropdown", className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
4575
4576
  ref: selectContainerRef,
4576
4577
  onClick: (e) => {
4577
4578
  e.stopPropagation();
@@ -4599,6 +4600,7 @@ const Select = ({
4599
4600
  isMulti,
4600
4601
  showSelectedItemsAsTags,
4601
4602
  isSearch,
4603
+ hideSearchIcon: !!onSearchTextChange,
4602
4604
  loading,
4603
4605
  textFilter
4604
4606
  }), jsx(SelectList, {
@@ -7492,7 +7494,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
7492
7494
  };
7493
7495
  };
7494
7496
  const MISMATCH_ANIMATION_NAME = "mismatchShake";
7495
- const logger$D = createLogger("MaskedInputText");
7497
+ const logger$E = createLogger("MaskedInputText");
7496
7498
  const MaskedInputText = ({
7497
7499
  value,
7498
7500
  onInput,
@@ -7539,7 +7541,7 @@ const MaskedInputText = ({
7539
7541
  };
7540
7542
  useEffect(() => {
7541
7543
  if (!mask) {
7542
- logger$D.warn("`mask` is undefined. No masking of input will take place.");
7544
+ logger$E.warn("`mask` is undefined. No masking of input will take place.");
7543
7545
  }
7544
7546
  }, [mask]);
7545
7547
  const getMaskResult = useCallback((pureValue) => {
@@ -7564,13 +7566,13 @@ const MaskedInputText = ({
7564
7566
  return;
7565
7567
  }
7566
7568
  if (preserveMismatchingInitialValue) {
7567
- logger$D.warn(`Value received "${value}" does not match mask`, maskResult, `
7569
+ logger$E.warn(`Value received "${value}" does not match mask`, maskResult, `
7568
7570
  Preserving mismatched initial value until user input.`);
7569
7571
  setPreservingMismatchedValue(true);
7570
7572
  return;
7571
7573
  }
7572
7574
  const fallback = displayValueToPure(maskResult.partialDisplayValue);
7573
- logger$D.warn(`Value received "${value}" does not match mask`, maskResult, `
7575
+ logger$E.warn(`Value received "${value}" does not match mask`, maskResult, `
7574
7576
  Falling back to partially valid value "${fallback}"`);
7575
7577
  onInput(fallback);
7576
7578
  }
@@ -11011,7 +11013,7 @@ const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico
11011
11013
  const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
11012
11014
  const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
11013
11015
  const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
11014
- const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
11016
+ const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore, CountryCodes.HongKong];
11015
11017
  const CONTACTS_REQUIRED_FOR_COUNTRIES = [CountryCodes.NewZealand];
11016
11018
  const JOB_TITLE_REQUIRED_FOR_COUNTRIES = [CountryCodes.NewZealand];
11017
11019
  const ISSUER_REQUIRED_FOR_COUNTRIES = [CountryCodes.Australia];
@@ -11021,7 +11023,8 @@ const rules$3 = ({
11021
11023
  data,
11022
11024
  country,
11023
11025
  taskType,
11024
- isExperimentEnabled = () => false
11026
+ isExperimentEnabled = () => false,
11027
+ rootLegalEntity
11025
11028
  }) => ({
11026
11029
  isDirectorIdNumberRequiredForCountry: () => {
11027
11030
  var _a, _b, _c, _d, _e;
@@ -11086,8 +11089,13 @@ const rules$3 = ({
11086
11089
  }
11087
11090
  },
11088
11091
  nationalityIfRequiredForRole: () => {
11089
- var _a;
11090
- if (NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(country) && ((_a = data.personalDetails) == null ? void 0 : _a.nationality)) {
11092
+ var _a, _b;
11093
+ const enableIdentificationNationalityCrossBorderAssociateCheck = isExperimentEnabled("EnableIdentificationNationalityCrossBorderAssociateCheck");
11094
+ const rootLegalEntityCountry = (_a = rootLegalEntity == null ? void 0 : rootLegalEntity.organization) == null ? void 0 : _a.registeredAddress.country;
11095
+ if (enableIdentificationNationalityCrossBorderAssociateCheck && rootLegalEntityCountry && NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(rootLegalEntityCountry)) {
11096
+ return REQUIRED;
11097
+ }
11098
+ if (NATIONALITY_REQUIRED_FOR_COUNTRIES.includes(country) || ((_b = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b.nationality)) {
11091
11099
  return REQUIRED;
11092
11100
  }
11093
11101
  },
@@ -11127,7 +11135,7 @@ const accountHolderValidationRules = {
11127
11135
  }
11128
11136
  };
11129
11137
  const accountHolderFields = ["accountHolder"];
11130
- const logger$C = createLogger("AccountHolder");
11138
+ const logger$D = createLogger("AccountHolder");
11131
11139
  function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
11132
11140
  switch (legalEntityType) {
11133
11141
  case LegalEntityType.ORGANIZATION: {
@@ -11137,7 +11145,7 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
11137
11145
  return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleProprietorName"] : []];
11138
11146
  }
11139
11147
  default:
11140
- logger$C.error(`No available account holder options for legal entity type '${legalEntityType}'`);
11148
+ logger$D.error(`No available account holder options for legal entity type '${legalEntityType}'`);
11141
11149
  return [];
11142
11150
  }
11143
11151
  }
@@ -11705,7 +11713,7 @@ function Dropzone(props) {
11705
11713
  })]
11706
11714
  });
11707
11715
  }
11708
- const logger$B = createLogger("TextArea");
11716
+ const logger$C = createLogger("TextArea");
11709
11717
  function TextArea(props) {
11710
11718
  const {
11711
11719
  classNameModifiers,
@@ -11726,7 +11734,7 @@ function TextArea(props) {
11726
11734
  } = useI18nContext();
11727
11735
  const [value, setValue] = useState("");
11728
11736
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
11729
- logger$B.error("Error: Form fields that rely on InputBase may not have an onChange property");
11737
+ logger$C.error("Error: Form fields that rely on InputBase may not have an onChange property");
11730
11738
  }
11731
11739
  const handleInput = (e) => {
11732
11740
  var _a;
@@ -12177,7 +12185,7 @@ function useIsElementVisible(ref, fallback = true) {
12177
12185
  }, [ref]);
12178
12186
  return isOnScreen;
12179
12187
  }
12180
- const logger$A = createLogger("SearchAddress");
12188
+ const logger$B = createLogger("SearchAddress");
12181
12189
  const SearchAddress = ({
12182
12190
  data,
12183
12191
  legalEntityId,
@@ -12221,7 +12229,7 @@ const SearchAddress = ({
12221
12229
  const response = await handleFindAddress(selectedAddressId);
12222
12230
  autocompleteAddressForm(response);
12223
12231
  } catch (e) {
12224
- logger$A.error(e);
12232
+ logger$B.error(e);
12225
12233
  }
12226
12234
  };
12227
12235
  const onDrilldown = async (selectedAddress) => {
@@ -12233,7 +12241,7 @@ const SearchAddress = ({
12233
12241
  }, legalEntityId);
12234
12242
  setItems((response == null ? void 0 : response.results) || []);
12235
12243
  } catch (e) {
12236
- logger$A.error(e);
12244
+ logger$B.error(e);
12237
12245
  }
12238
12246
  };
12239
12247
  const onChange = (e) => {
@@ -12253,7 +12261,7 @@ const SearchAddress = ({
12253
12261
  }
12254
12262
  setLoading(false);
12255
12263
  };
12256
- const formatAddressItem = (item) => {
12264
+ const formatAddressItem2 = (item) => {
12257
12265
  if (item.description.includes("Addresses")) {
12258
12266
  const splittedDescription = item.description.split(" - ");
12259
12267
  if (splittedDescription.length === 1) {
@@ -12282,18 +12290,18 @@ const SearchAddress = ({
12282
12290
  country: data.country
12283
12291
  }, legalEntityId);
12284
12292
  if (response == null ? void 0 : response.results) {
12285
- const modifiedItems = response.results.map(formatAddressItem);
12293
+ const modifiedItems = response.results.map(formatAddressItem2);
12286
12294
  setItems(modifiedItems);
12287
12295
  } else {
12288
12296
  setItems([]);
12289
12297
  }
12290
12298
  } catch (e) {
12291
- logger$A.error(e);
12299
+ logger$B.error(e);
12292
12300
  }
12293
12301
  setLoading(false);
12294
12302
  }
12295
12303
  };
12296
- const getFormattedText = (highlightItems, text) => {
12304
+ const getFormattedText2 = (highlightItems, text) => {
12297
12305
  const formattedText = [];
12298
12306
  let lastHighlightIndex = 0;
12299
12307
  if (highlightItems[0] === "") {
@@ -12319,7 +12327,7 @@ const SearchAddress = ({
12319
12327
  }
12320
12328
  return formattedText;
12321
12329
  };
12322
- const getHighlightedText = ({
12330
+ const getHighlightedText2 = ({
12323
12331
  text,
12324
12332
  highlight,
12325
12333
  description
@@ -12333,11 +12341,11 @@ const SearchAddress = ({
12333
12341
  }
12334
12342
  } else {
12335
12343
  const highlightItems = highlight.split(";");
12336
- formattedText = getFormattedText(highlightItems[0].split(","), text);
12344
+ formattedText = getFormattedText2(highlightItems[0].split(","), text);
12337
12345
  if (highlightItems.length > 1) {
12338
12346
  formattedText.push(`, `);
12339
12347
  formattedText.push(jsx(Fragment, {
12340
- children: getFormattedText(highlightItems[1].split(","), description)
12348
+ children: getFormattedText2(highlightItems[1].split(","), description)
12341
12349
  }));
12342
12350
  } else if (description) {
12343
12351
  formattedText.push(`, ${description}`);
@@ -12345,10 +12353,10 @@ const SearchAddress = ({
12345
12353
  }
12346
12354
  return formattedText;
12347
12355
  };
12348
- const generateSearchListItem = (item) => jsxs(Fragment, {
12356
+ const generateSearchListItem2 = (item) => jsxs(Fragment, {
12349
12357
  children: [jsx("span", {
12350
12358
  className: "adyen-kyc-dropdown-search-element__description",
12351
- children: getHighlightedText(item)
12359
+ children: getHighlightedText2(item)
12352
12360
  }), item.addressAmount && jsxs("div", {
12353
12361
  className: "adyen-kyc-dropdown-search-element__addresses",
12354
12362
  children: [item.addressAmount, " ", jsxs("span", {
@@ -12379,7 +12387,7 @@ const SearchAddress = ({
12379
12387
  resetSearch,
12380
12388
  onSearch: getSearchItems,
12381
12389
  loading,
12382
- getSearchItem: generateSearchListItem,
12390
+ getSearchItem: generateSearchListItem2,
12383
12391
  isInvalid: false,
12384
12392
  searchText,
12385
12393
  showSearchList
@@ -12666,7 +12674,7 @@ const countrySpecificFormatters = {
12666
12674
  };
12667
12675
  const addressValidationRules = (country) => {
12668
12676
  var _a, _b;
12669
- const postalCodeFormat = (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format;
12677
+ const postalCodeFormat = country ? (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format : void 0;
12670
12678
  return {
12671
12679
  address: {
12672
12680
  modes: ["blur"],
@@ -12676,7 +12684,7 @@ const addressValidationRules = (country) => {
12676
12684
  postalCode: {
12677
12685
  modes: ["blur"],
12678
12686
  validate: (val) => {
12679
- const pattern = postalCodePatterns[country];
12687
+ const pattern = country ? postalCodePatterns[country] : void 0;
12680
12688
  return pattern ? !!val && pattern.test(val) : !!val;
12681
12689
  },
12682
12690
  errorMessage: postalCodeFormat ? {
@@ -12705,7 +12713,7 @@ const addressValidationRules = (country) => {
12705
12713
  };
12706
12714
  const addressValidationRulesV4 = (country, i18n) => {
12707
12715
  var _a, _b;
12708
- const postalCodeFormat = (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format;
12716
+ const postalCodeFormat = country ? (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format : void 0;
12709
12717
  const MIN_LENGTH_3 = 3;
12710
12718
  return {
12711
12719
  address: [{
@@ -12734,7 +12742,7 @@ const addressValidationRulesV4 = (country, i18n) => {
12734
12742
  postalCode: {
12735
12743
  modes: ["blur"],
12736
12744
  validate: (val) => {
12737
- const pattern = postalCodePatterns[country];
12745
+ const pattern = country ? postalCodePatterns[country] : void 0;
12738
12746
  return pattern ? !!val && pattern.test(val) : !!val;
12739
12747
  },
12740
12748
  errorMessage: postalCodeFormat ? {
@@ -12829,8 +12837,8 @@ function Address(props) {
12829
12837
  });
12830
12838
  const datasetUtils = datasetUtilities(i18n.locale);
12831
12839
  const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || (dataProp == null ? void 0 : dataProp.country) && COUNTRIES_WITH_STATES_DATASET.includes(dataProp == null ? void 0 : dataProp.country) ? getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country) : getAddressSchemaForCountry(dataProp == null ? void 0 : dataProp.country).filter((ad) => ad !== "stateOrProvince");
12832
- const rules2 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRules(dataProp == null ? void 0 : dataProp.country) : {}, [dataProp == null ? void 0 : dataProp.country]);
12833
- const rulesV4 = useMemo(() => (dataProp == null ? void 0 : dataProp.country) ? addressValidationRulesV4(dataProp == null ? void 0 : dataProp.country, i18n) : {}, [dataProp == null ? void 0 : dataProp.country, i18n]);
12840
+ const rules2 = useMemo(() => addressValidationRules(dataProp == null ? void 0 : dataProp.country), [dataProp == null ? void 0 : dataProp.country]);
12841
+ const rulesV4 = useMemo(() => addressValidationRulesV4(dataProp == null ? void 0 : dataProp.country, i18n), [dataProp == null ? void 0 : dataProp.country, i18n]);
12834
12842
  const {
12835
12843
  data,
12836
12844
  errors,
@@ -13059,6 +13067,460 @@ Address.defaultProps = {
13059
13067
  requiredFields: ADDRESS_SCHEMA,
13060
13068
  countryCode: null
13061
13069
  };
13070
+ const logger$A = createLogger("AddressFieldContainer");
13071
+ const formatAddressItem = (item) => {
13072
+ if (item.description.includes("Addresses")) {
13073
+ const splittedDescription = item.description.split(" - ");
13074
+ if (splittedDescription.length === 1) {
13075
+ return {
13076
+ ...item,
13077
+ description: "",
13078
+ addressAmount: splittedDescription[0].replace("Addresses", "")
13079
+ };
13080
+ }
13081
+ return {
13082
+ ...item,
13083
+ description: splittedDescription[0],
13084
+ addressAmount: splittedDescription[1].replace("Addresses", "")
13085
+ };
13086
+ }
13087
+ return item;
13088
+ };
13089
+ const getFormattedText = (highlightItems, text) => {
13090
+ const formattedText = [];
13091
+ let lastHighlightIndex = 0;
13092
+ if (highlightItems[0] === "") {
13093
+ return [text];
13094
+ }
13095
+ highlightItems.forEach((highlightValue) => {
13096
+ const highlightRange = highlightValue.split("-");
13097
+ const highlightInit = parseInt(highlightRange[0]);
13098
+ const highlightEnd = parseInt(highlightRange[1]);
13099
+ if (lastHighlightIndex < highlightInit) {
13100
+ const remain = text.substring(lastHighlightIndex, highlightInit);
13101
+ formattedText.push(`${remain}`);
13102
+ }
13103
+ const boldText = text.substring(highlightInit, highlightEnd);
13104
+ formattedText.push(jsx("span", {
13105
+ className: "adyen-kyc-dropdown-search-element__description--highlight",
13106
+ children: boldText
13107
+ }));
13108
+ lastHighlightIndex = highlightEnd;
13109
+ });
13110
+ if (lastHighlightIndex < text.length) {
13111
+ formattedText.push(`${text.substring(lastHighlightIndex)}`);
13112
+ }
13113
+ return formattedText;
13114
+ };
13115
+ const getHighlightedText = ({
13116
+ text = "",
13117
+ highlight = "",
13118
+ description = ""
13119
+ }) => {
13120
+ let formattedText = [];
13121
+ if (highlight === "") {
13122
+ if (description) {
13123
+ formattedText.push(`${text}, ${description}`);
13124
+ } else {
13125
+ formattedText.push(text);
13126
+ }
13127
+ } else {
13128
+ const highlightItems = highlight.split(";");
13129
+ formattedText = getFormattedText(highlightItems[0].split(","), text);
13130
+ if (highlightItems.length > 1) {
13131
+ formattedText.push(`, `);
13132
+ formattedText.push(jsx(Fragment, {
13133
+ children: getFormattedText(highlightItems[1].split(","), description)
13134
+ }));
13135
+ } else if (description) {
13136
+ formattedText.push(`, ${description}`);
13137
+ }
13138
+ }
13139
+ return formattedText;
13140
+ };
13141
+ const generateSearchListItem = (item, i18n) => jsxs(Fragment, {
13142
+ children: [jsx("span", {
13143
+ className: "adyen-kyc-dropdown-search-element__description",
13144
+ children: getHighlightedText(item)
13145
+ }), item.addressAmount && jsxs("div", {
13146
+ className: "adyen-kyc-dropdown-search-element__addresses",
13147
+ children: [item.addressAmount, " ", jsxs("span", {
13148
+ className: "adyen-kyc-dropdown-search-element__addresses--text",
13149
+ children: [" ", i18n.get("addresses")]
13150
+ }), jsx(Icon, {
13151
+ name: "arrow-right",
13152
+ className: "adyen-kyc-dropdown-search-element__addresses--icon"
13153
+ })]
13154
+ })]
13155
+ });
13156
+ function FieldContainerComponent({
13157
+ legalEntityId = "",
13158
+ classNameModifiers = [],
13159
+ schema,
13160
+ data,
13161
+ valid,
13162
+ errors,
13163
+ fieldProblems,
13164
+ fieldName,
13165
+ trimOnBlur,
13166
+ hideField,
13167
+ maxlength,
13168
+ readOnly,
13169
+ optional,
13170
+ handleChangeFor,
13171
+ handleAddressSearch,
13172
+ handleFindAddress
13173
+ }) {
13174
+ const {
13175
+ i18n
13176
+ } = useI18nContext();
13177
+ useEffect(() => {
13178
+ setItems([]);
13179
+ setSearchText("");
13180
+ setResetSearch(true);
13181
+ }, [data.country]);
13182
+ const formUtils = formUtilities({
13183
+ data
13184
+ }, i18n);
13185
+ const errorMessage = formUtils.getErrorMessage(fieldName, errors ?? {}, fieldProblems);
13186
+ const value = data[fieldName];
13187
+ const labelKey = getKeyForField(fieldName, data.country);
13188
+ const [items, setItems] = useState([]);
13189
+ const [loading, setLoading] = useState(false);
13190
+ const [resetSearch, setResetSearch] = useState(false);
13191
+ const [showSearchList, setShowSearchList] = useState(false);
13192
+ const [selectedAddressId, setSelectedAddressId] = useState();
13193
+ const [searchText, setSearchText] = useState(data.address);
13194
+ useEffect(() => {
13195
+ setSearchText(data.address);
13196
+ }, [data.address]);
13197
+ const setAddressField = ({
13198
+ houseNumberOrName,
13199
+ street
13200
+ }) => {
13201
+ const hasHouseNumber = !!houseNumberOrName;
13202
+ if (hasHouseNumber) {
13203
+ const isHouseNumberFirst = data.country ? COUNTRIES_WITH_HOUSE_NUMBER_FIRST.includes(data.country) : false;
13204
+ const needsComma = data.country ? COUNTRIES_WITH_COMMA_SEPARATED.includes(data.country) : false;
13205
+ const formattedAddress = isHouseNumberFirst ? `${houseNumberOrName}${needsComma ? ", " : " "}${street}` : `${street}${needsComma ? ", " : " "}${houseNumberOrName}`;
13206
+ return handleChangeFor("address", "input")(formattedAddress);
13207
+ }
13208
+ return handleChangeFor("address", "input")(street);
13209
+ };
13210
+ const getSearchItems = async (text) => {
13211
+ if (!text || !data.country) return setItems([]);
13212
+ try {
13213
+ setLoading(true);
13214
+ const response = await (handleAddressSearch == null ? void 0 : handleAddressSearch({
13215
+ text,
13216
+ country: data.country
13217
+ }, legalEntityId));
13218
+ if (response == null ? void 0 : response.results) {
13219
+ setItems(response.results.map(formatAddressItem));
13220
+ } else {
13221
+ setItems([]);
13222
+ }
13223
+ } catch (e) {
13224
+ logger$A.error(e);
13225
+ }
13226
+ setLoading(false);
13227
+ };
13228
+ const onFindAddress = async (addressId) => {
13229
+ try {
13230
+ const response = await (handleFindAddress == null ? void 0 : handleFindAddress(addressId));
13231
+ if (response) {
13232
+ schema == null ? void 0 : schema.forEach((field) => {
13233
+ switch (field) {
13234
+ case "country":
13235
+ handleChangeFor("country", "input")(response.country ?? " ");
13236
+ break;
13237
+ case "address":
13238
+ setAddressField(response);
13239
+ break;
13240
+ case "otherAddressInformation":
13241
+ handleChangeFor("otherAddressInformation", "blur")(response.street2 ?? " ");
13242
+ break;
13243
+ case "city":
13244
+ handleChangeFor("city", "input")(response.city ?? " ");
13245
+ break;
13246
+ case "postalCode":
13247
+ handleChangeFor("postalCode", "input")(response.postalCode ?? " ");
13248
+ break;
13249
+ case "stateOrProvince":
13250
+ handleChangeFor("stateOrProvince", "input")(response.stateOrProvince ?? " ");
13251
+ break;
13252
+ default:
13253
+ break;
13254
+ }
13255
+ });
13256
+ }
13257
+ } catch (e) {
13258
+ logger$A.error(e);
13259
+ }
13260
+ };
13261
+ const onDrilldown = async (address) => {
13262
+ if (!data.country) return;
13263
+ try {
13264
+ const response = await (handleAddressSearch == null ? void 0 : handleAddressSearch({
13265
+ text: address.text,
13266
+ country: data.country,
13267
+ container: address.id
13268
+ }, legalEntityId));
13269
+ setItems((response == null ? void 0 : response.results) || []);
13270
+ } catch (e) {
13271
+ logger$A.error(e);
13272
+ }
13273
+ };
13274
+ const handleOnChange = (e) => {
13275
+ const addressId = e.target.value;
13276
+ setSelectedAddressId(addressId);
13277
+ setLoading(true);
13278
+ const selectedAddress = items.filter((i) => i.id === addressId)[0];
13279
+ if (selectedAddress.type === "Address") {
13280
+ onFindAddress(selectedAddress.id);
13281
+ setShowSearchList(false);
13282
+ } else {
13283
+ onDrilldown(selectedAddress);
13284
+ setShowSearchList(true);
13285
+ }
13286
+ setLoading(false);
13287
+ };
13288
+ const renderField = (field) => {
13289
+ switch (field) {
13290
+ case "address":
13291
+ return handleAddressSearch && handleFindAddress ? jsx(Field, {
13292
+ name: field,
13293
+ label: i18n.get(labelKey),
13294
+ classNameModifiers,
13295
+ errorMessage,
13296
+ isValid: valid == null ? void 0 : valid[field],
13297
+ optional,
13298
+ children: (childProps) => jsx(Select, {
13299
+ ...childProps,
13300
+ isSearch: true,
13301
+ name: field,
13302
+ items: items.map((item) => ({
13303
+ ...item,
13304
+ name: ""
13305
+ })),
13306
+ selected: selectedAddressId,
13307
+ loading,
13308
+ onChange: handleOnChange,
13309
+ onSearch: getSearchItems,
13310
+ onSearchTextChange: (text) => handleChangeFor("address", "input")(text),
13311
+ getSearchItem: (item) => generateSearchListItem(item, i18n),
13312
+ showSearchList,
13313
+ resetSearch,
13314
+ searchText
13315
+ })
13316
+ }) : jsx(Field, {
13317
+ name: field,
13318
+ label: i18n.get(labelKey),
13319
+ classNameModifiers,
13320
+ errorMessage,
13321
+ isValid: valid == null ? void 0 : valid[field],
13322
+ optional,
13323
+ children: (childProps) => jsx(InputText, {
13324
+ ...childProps,
13325
+ classNameModifiers,
13326
+ name: field,
13327
+ value,
13328
+ onInput: handleChangeFor(fieldName, "input"),
13329
+ onBlur: handleChangeFor(fieldName, "blur"),
13330
+ maxLength: maxlength,
13331
+ "aria-required": true,
13332
+ "aria-label": i18n.get(labelKey),
13333
+ "aria-invalid": !(valid == null ? void 0 : valid[field]),
13334
+ trimOnBlur,
13335
+ readonly: readOnly
13336
+ })
13337
+ });
13338
+ case "country":
13339
+ return jsx(CountryField, {
13340
+ data: {
13341
+ country: value
13342
+ },
13343
+ valid: {
13344
+ country: valid == null ? void 0 : valid.country
13345
+ },
13346
+ errors: {
13347
+ country: errorMessage
13348
+ },
13349
+ labels: {
13350
+ country: formUtils.getLabel(field, labelKey)
13351
+ },
13352
+ readonly: Boolean(readOnly),
13353
+ classNameModifiers,
13354
+ className: hideField ? "adyen-kyc-search-fieldcontainer-hide" : "",
13355
+ handleChangeFor
13356
+ });
13357
+ case "stateOrProvince":
13358
+ return jsx(StateField, {
13359
+ data: {
13360
+ stateOrProvince: value
13361
+ },
13362
+ valid: {
13363
+ stateOrProvince: valid == null ? void 0 : valid.stateOrProvince
13364
+ },
13365
+ errors: {
13366
+ stateOrProvince: errorMessage
13367
+ },
13368
+ labels: {
13369
+ stateOrProvince: formUtils.getLabel(field, labelKey)
13370
+ },
13371
+ readonly: Boolean(readOnly),
13372
+ classNameModifiers,
13373
+ selectedCountry: data.country,
13374
+ handleChangeFor
13375
+ });
13376
+ default:
13377
+ return jsx(Field, {
13378
+ name: field,
13379
+ label: i18n.get(labelKey),
13380
+ classNameModifiers,
13381
+ errorMessage,
13382
+ isValid: valid == null ? void 0 : valid[field],
13383
+ optional,
13384
+ children: (childProps) => jsx(InputText, {
13385
+ ...childProps,
13386
+ classNameModifiers,
13387
+ name: field,
13388
+ value: field === "postalCode" ? value == null ? void 0 : value.toUpperCase() : value,
13389
+ onInput: handleChangeFor(fieldName, "input"),
13390
+ onBlur: handleChangeFor(fieldName, "blur"),
13391
+ maxLength: maxlength,
13392
+ "aria-required": true,
13393
+ "aria-label": i18n.get(labelKey),
13394
+ "aria-invalid": !(valid == null ? void 0 : valid[field]),
13395
+ trimOnBlur,
13396
+ readonly: readOnly
13397
+ })
13398
+ });
13399
+ }
13400
+ };
13401
+ return hideField ? null : renderField(fieldName);
13402
+ }
13403
+ function AddressComponent({
13404
+ data,
13405
+ labels: labels2,
13406
+ placeholders,
13407
+ helperText,
13408
+ readOnly,
13409
+ hideCountry,
13410
+ fieldValidationErrors,
13411
+ allFields,
13412
+ requiredFields,
13413
+ optionalFields = ["otherAddressInformation"],
13414
+ readOnlyFields,
13415
+ trustedFields,
13416
+ shouldValidate,
13417
+ handleAddressSearch,
13418
+ handleFindAddress,
13419
+ onChange,
13420
+ legalEntityId,
13421
+ verifiedAddress
13422
+ }) {
13423
+ const {
13424
+ i18n
13425
+ } = useI18nContext();
13426
+ const {
13427
+ isExperimentEnabled
13428
+ } = useExperimentsContext();
13429
+ const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.StrictNameAndAddressValidationV4);
13430
+ const schema = useMemo(() => {
13431
+ if (requiredFields == null ? void 0 : requiredFields.length) {
13432
+ return (requiredFields == null ? void 0 : requiredFields.includes("stateOrProvince")) || (data == null ? void 0 : data.country) && COUNTRIES_WITH_STATES_DATASET.includes(data == null ? void 0 : data.country) ? requiredFields : requiredFields == null ? void 0 : requiredFields.filter((field) => field !== "stateOrProvince");
13433
+ }
13434
+ return (data == null ? void 0 : data.country) && COUNTRIES_WITH_STATES_DATASET.includes(data == null ? void 0 : data.country) ? getAddressSchemaForCountry(data == null ? void 0 : data.country) : getAddressSchemaForCountry(data == null ? void 0 : data.country).filter((ad) => ad !== "stateOrProvince");
13435
+ }, [data == null ? void 0 : data.country, requiredFields]);
13436
+ const rules2 = useMemo(() => addressValidationRules(data == null ? void 0 : data.country), [data == null ? void 0 : data.country]);
13437
+ const rulesV4 = useMemo(() => addressValidationRulesV4(data == null ? void 0 : data.country, i18n), [data == null ? void 0 : data.country, i18n]);
13438
+ const {
13439
+ schema: formSchema,
13440
+ data: formData,
13441
+ errors: formErrors,
13442
+ valid: formValid,
13443
+ fieldProblems: formFieldProblems,
13444
+ handleChangeFor,
13445
+ isValid
13446
+ } = useForm({
13447
+ schema,
13448
+ defaultData: data,
13449
+ formatters: addressFormatters,
13450
+ rules: isStrictNameAndAddressValidationEnabled ? rulesV4 : rules2,
13451
+ fieldProblems: fieldValidationErrors,
13452
+ optionalFields,
13453
+ obscuredFields: [],
13454
+ trustedFields: [],
13455
+ shouldValidate
13456
+ });
13457
+ useEffect(
13458
+ () => verifiedAddress ? entriesOf(verifiedAddress).forEach(([key, value]) => {
13459
+ if (formData[key] !== value) handleChangeFor(key, "input")(value);
13460
+ }) : formSchema.forEach((field) => handleChangeFor(field, "input")((data == null ? void 0 : data[field]) ?? " ")),
13461
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13462
+ [verifiedAddress]
13463
+ );
13464
+ const formUtils = formUtilities({
13465
+ data,
13466
+ labels: labels2,
13467
+ placeholders,
13468
+ helperText,
13469
+ readOnly,
13470
+ allFields,
13471
+ requiredFields: schema,
13472
+ optionalFields,
13473
+ readOnlyFields,
13474
+ trustedFields
13475
+ }, i18n);
13476
+ useEffect(() => {
13477
+ onChange == null ? void 0 : onChange({
13478
+ schema: formSchema,
13479
+ data: formData,
13480
+ valid: formValid,
13481
+ errors: formErrors,
13482
+ fieldProblems: formFieldProblems,
13483
+ isValid
13484
+ });
13485
+ }, [formData, formErrors, formFieldProblems, formSchema, formValid, isValid]);
13486
+ const createFieldComponent = (fieldName) => {
13487
+ if (!formUtils.isRequiredField(fieldName) && !formUtils.isOptionalField(fieldName)) return null;
13488
+ const hideField = fieldName === "country" && hideCountry;
13489
+ return jsx(FieldContainerComponent, {
13490
+ classNameModifiers: [fieldName],
13491
+ schema: formSchema,
13492
+ data: formData,
13493
+ valid: formValid,
13494
+ errors: formErrors,
13495
+ fieldProblems: formFieldProblems,
13496
+ fieldName,
13497
+ maxlength: getMaxLengthByFieldAndCountry(countrySpecificFormatters, fieldName, formData.country),
13498
+ hideField,
13499
+ "aria-label": formUtils.getLabel(fieldName, fieldName),
13500
+ readOnly: formUtils.isReadOnly(fieldName),
13501
+ optional: formUtils.isOptionalField(fieldName),
13502
+ trimOnBlur: true,
13503
+ legalEntityId,
13504
+ handleChangeFor,
13505
+ handleAddressSearch,
13506
+ handleFindAddress
13507
+ }, fieldName);
13508
+ };
13509
+ return jsx("fieldset", {
13510
+ className: "adyen-kyc__address",
13511
+ children: formSchema.map((field) => createFieldComponent(field))
13512
+ });
13513
+ }
13514
+ function AddressExperimentWrapper(props) {
13515
+ const {
13516
+ isExperimentEnabled
13517
+ } = useExperimentsContext();
13518
+ return isExperimentEnabled("EnableNewAddressComponent") ? jsx(AddressComponent, {
13519
+ ...props
13520
+ }) : jsx(Address, {
13521
+ ...props
13522
+ });
13523
+ }
13062
13524
  var operationalAddressIsSameIds = /* @__PURE__ */ ((operationalAddressIsSameIds2) => {
13063
13525
  operationalAddressIsSameIds2["OPERATIONAL_ADDRESS_IS_SAME"] = "OperationAddressAnswerYes";
13064
13526
  operationalAddressIsSameIds2["OPERATIONAL_ADDRESS_IS_NOT_SAME"] = "OperationAddressAnswerNo";
@@ -13123,7 +13585,8 @@ function RegistrationAddressComponent(props) {
13123
13585
  valid: formValid,
13124
13586
  errors: formErrors,
13125
13587
  fieldProblems: formFieldProblems,
13126
- handleChangeFor
13588
+ handleChangeFor,
13589
+ setValid
13127
13590
  } = useForm({
13128
13591
  ...props,
13129
13592
  schema: ["operationalAddressIsSame"],
@@ -13160,10 +13623,25 @@ function RegistrationAddressComponent(props) {
13160
13623
  schema: ["registrationAddress", "operationalAddressIsSame", ...isOperationAddressNotSame() ? ["operationalAddress"] : []]
13161
13624
  }
13162
13625
  });
13163
- }, [formData.operationalAddressIsSame]);
13626
+ }, [formData, formValid, formErrors, formFieldProblems]);
13164
13627
  const isOperationAddressNotSame = () => formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME;
13165
13628
  const registrationAddressFormProps = getFormProps(props, registrationAddressFormID);
13166
13629
  const operationalAddressFormProps = getFormProps(props, operationalAddressFormID);
13630
+ const handleRegistrationAddressChange = (state) => {
13631
+ handleChangeFor("registrationAddress")(state.data);
13632
+ setValid("registrationAddress", Boolean(state.isValid));
13633
+ };
13634
+ const handleOperationalAddressChange = (state) => {
13635
+ handleChangeFor("operationalAddress")(state.data);
13636
+ setValid("operationalAddress", Boolean(state.isValid));
13637
+ };
13638
+ const handleOperationalAddressIsSameChange = (e) => {
13639
+ const {
13640
+ value
13641
+ } = e.target;
13642
+ handleChangeFor("operationalAddressIsSame")(value);
13643
+ if (value === "OperationAddressAnswerYes") setValid("operationalAddress", true);
13644
+ };
13167
13645
  return jsxs(Fragment, {
13168
13646
  children: [jsx(StateContextSetter, {
13169
13647
  owner: id,
@@ -13182,7 +13660,7 @@ function RegistrationAddressComponent(props) {
13182
13660
  contentId: "reasonForFillingCompanyAddressDetails",
13183
13661
  title: i18n.get("whyDoINeedToFillInThisInformation"),
13184
13662
  content: i18n.get("reasonForFillingCompanyAddressDetails")
13185
- }), jsx(Address, {
13663
+ }), jsx(AddressExperimentWrapper, {
13186
13664
  ...registrationAddressFormProps,
13187
13665
  data: {
13188
13666
  ...registrationAddressFormProps == null ? void 0 : registrationAddressFormProps.data,
@@ -13191,10 +13669,12 @@ function RegistrationAddressComponent(props) {
13191
13669
  hideCountry: true,
13192
13670
  id,
13193
13671
  addressType: "registrationAddress",
13672
+ optionalFields: ["otherAddressInformation"],
13194
13673
  handleAddressSearch,
13195
13674
  handleFindAddress,
13196
13675
  verifiedBusiness,
13197
- kompanyAddress
13676
+ kompanyAddress,
13677
+ onChange: handleRegistrationAddressChange
13198
13678
  }), jsx(FormHeader, {
13199
13679
  classNames: "adyen-kyc-u-margin-top-32",
13200
13680
  heading: i18n.get("operationalAddressHeader")
@@ -13210,12 +13690,12 @@ function RegistrationAddressComponent(props) {
13210
13690
  items: operationalAddressIsSameItems,
13211
13691
  value: formData.operationalAddressIsSame,
13212
13692
  disabled: formUtils.isReadOnly("operationalAddressIsSame"),
13213
- onChange: handleChangeFor("operationalAddressIsSame"),
13693
+ onChange: handleOperationalAddressIsSameChange,
13214
13694
  "aria-required": true,
13215
13695
  "aria-label": formUtils.getLabel("operationalAddressIsSame"),
13216
13696
  "aria-invalid": !formValid.operationalAddressIsSame
13217
13697
  })
13218
- }), isOperationAddressNotSame() && createElement(Address, {
13698
+ }), isOperationAddressNotSame() && createElement(AddressExperimentWrapper, {
13219
13699
  ...operationalAddressFormProps,
13220
13700
  key: "operationalAddress",
13221
13701
  data: {
@@ -13224,9 +13704,11 @@ function RegistrationAddressComponent(props) {
13224
13704
  },
13225
13705
  hideCountry: true,
13226
13706
  id,
13707
+ optionalFields: ["otherAddressInformation"],
13227
13708
  addressType: "operationalAddress",
13228
13709
  handleAddressSearch,
13229
- handleFindAddress
13710
+ handleFindAddress,
13711
+ onChange: handleOperationalAddressChange
13230
13712
  })]
13231
13713
  });
13232
13714
  }
@@ -13906,9 +14388,18 @@ const rules$2 = ({
13906
14388
  }
13907
14389
  },
13908
14390
  countryRequiresRegistrationNumberForCompanies: () => {
14391
+ var _a, _b;
13909
14392
  if (COUNTRIES_WITH_OPTIONAL_REGISTRATION_NUMBER.includes(country)) {
13910
14393
  return "OPTIONAL";
13911
14394
  }
14395
+ if (isExperimentEnabled("EnableAUGovernmentalOrganizationSkipRegistrationNumber") && country === CountryCodes.Australia) {
14396
+ if ("companyType" in data && ((_a = data.companyType) == null ? void 0 : _a.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION) {
14397
+ return;
14398
+ }
14399
+ if ("companyStructure" in data && ((_b = data.companyStructure) == null ? void 0 : _b.entityType) === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION) {
14400
+ return;
14401
+ }
14402
+ }
13912
14403
  if (!COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION.includes(country)) {
13913
14404
  return "REQUIRED";
13914
14405
  }
@@ -15131,49 +15622,13 @@ const useIdVerificationToken = ({
15131
15622
  loadingStatus
15132
15623
  };
15133
15624
  };
15134
- const adyenKycLoadingInputForm = "adyen-kyc-loading-input__form";
15135
- const adyenKycLoadingInputFormLoadingOpacity0 = "adyen-kyc-loading-input__form--loading-opacity0";
15136
- const adyenKycLoadingInputFormLoadingOpacity01 = "adyen-kyc-loading-input__form--loading-opacity0-1";
15137
- const adyenKycLoadingInputFormLoadingOpacity02 = "adyen-kyc-loading-input__form--loading-opacity0-2";
15138
- const adyenKycLoadingInputFormLoadingOpacity03 = "adyen-kyc-loading-input__form--loading-opacity0-3";
15139
- const adyenKycLoadingInputFormLoadingOpacity04 = "adyen-kyc-loading-input__form--loading-opacity0-4";
15140
- const adyenKycLoadingInputFormLoadingOpacity05 = "adyen-kyc-loading-input__form--loading-opacity0-5";
15141
- const adyenKycLoadingInputFormLoadingOpacity06 = "adyen-kyc-loading-input__form--loading-opacity0-6";
15142
- const adyenKycLoadingInputFormLoadingOpacity07 = "adyen-kyc-loading-input__form--loading-opacity0-7";
15143
- const adyenKycLoadingInputFormLoadingOpacity08 = "adyen-kyc-loading-input__form--loading-opacity0-8";
15144
- const adyenKycLoadingInputFormLoadingOpacity09 = "adyen-kyc-loading-input__form--loading-opacity0-9";
15145
- const adyenKycLoadingInputFormLoadingOpacity1 = "adyen-kyc-loading-input__form--loading-opacity1";
15146
- const adyenKycLoadingInputLoader = "adyen-kyc-loading-input__loader";
15147
- const adyenKycLoadingInputLoaderActive = "adyen-kyc-loading-input__loader--active";
15148
- const styles$6 = {
15149
- "adyen-kyc-loading-input__form": "adyen-kyc-loading-input__form",
15150
- adyenKycLoadingInputForm,
15151
- "adyen-kyc-loading-input__form--loading-opacity0": "adyen-kyc-loading-input__form--loading-opacity0",
15152
- adyenKycLoadingInputFormLoadingOpacity0,
15153
- "adyen-kyc-loading-input__form--loading-opacity0-1": "adyen-kyc-loading-input__form--loading-opacity0-1",
15154
- adyenKycLoadingInputFormLoadingOpacity01,
15155
- "adyen-kyc-loading-input__form--loading-opacity0-2": "adyen-kyc-loading-input__form--loading-opacity0-2",
15156
- adyenKycLoadingInputFormLoadingOpacity02,
15157
- "adyen-kyc-loading-input__form--loading-opacity0-3": "adyen-kyc-loading-input__form--loading-opacity0-3",
15158
- adyenKycLoadingInputFormLoadingOpacity03,
15159
- "adyen-kyc-loading-input__form--loading-opacity0-4": "adyen-kyc-loading-input__form--loading-opacity0-4",
15160
- adyenKycLoadingInputFormLoadingOpacity04,
15161
- "adyen-kyc-loading-input__form--loading-opacity0-5": "adyen-kyc-loading-input__form--loading-opacity0-5",
15162
- adyenKycLoadingInputFormLoadingOpacity05,
15163
- "adyen-kyc-loading-input__form--loading-opacity0-6": "adyen-kyc-loading-input__form--loading-opacity0-6",
15164
- adyenKycLoadingInputFormLoadingOpacity06,
15165
- "adyen-kyc-loading-input__form--loading-opacity0-7": "adyen-kyc-loading-input__form--loading-opacity0-7",
15166
- adyenKycLoadingInputFormLoadingOpacity07,
15167
- "adyen-kyc-loading-input__form--loading-opacity0-8": "adyen-kyc-loading-input__form--loading-opacity0-8",
15168
- adyenKycLoadingInputFormLoadingOpacity08,
15169
- "adyen-kyc-loading-input__form--loading-opacity0-9": "adyen-kyc-loading-input__form--loading-opacity0-9",
15170
- adyenKycLoadingInputFormLoadingOpacity09,
15171
- "adyen-kyc-loading-input__form--loading-opacity1": "adyen-kyc-loading-input__form--loading-opacity1",
15172
- adyenKycLoadingInputFormLoadingOpacity1,
15173
- "adyen-kyc-loading-input__loader": "adyen-kyc-loading-input__loader",
15174
- adyenKycLoadingInputLoader,
15175
- "adyen-kyc-loading-input__loader--active": "adyen-kyc-loading-input__loader--active",
15176
- adyenKycLoadingInputLoaderActive
15625
+ const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
15626
+ const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
15627
+ const styles$4 = {
15628
+ "loader-wrapper-loader": "adyen-kyc-loader-wrapper-loader",
15629
+ loaderWrapperLoader,
15630
+ "loader-wrapper-loader-active": "adyen-kyc-loader-wrapper-loader-active",
15631
+ loaderWrapperLoaderActive
15177
15632
  };
15178
15633
  const LoaderWrapper = ({
15179
15634
  children,
@@ -15183,18 +15638,15 @@ const LoaderWrapper = ({
15183
15638
  showSpinner = true,
15184
15639
  className
15185
15640
  }) => {
15186
- const formOpacityStrArr = `${formOpacityWhenLoading}`.split(".");
15187
- const digit = formOpacityStrArr[0];
15188
- const decimal = formOpacityStrArr[1];
15189
- const opacity = decimal ? `${digit}-${decimal}` : `${digit}`;
15190
- const wrapperClass = cx("adyen-kyc-loading-input__form", styles$6["adyen-kyc-loading-input__form"], {
15191
- [styles$6[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
15192
- });
15193
- const loaderWrapperClass = cx({
15194
- [styles$6["adyen-kyc-loading-input__loader"]]: true,
15195
- [styles$6["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
15196
- });
15197
- const overlayClass = cx("adyen-kyc-loading-input", className);
15641
+ const opacitySyle = status === "loading" ? {
15642
+ opacity: formOpacityWhenLoading
15643
+ } : {
15644
+ opacity: 1
15645
+ };
15646
+ const loaderWrapperClass = cx(styles$4.loaderWrapperLoader, {
15647
+ [styles$4.loaderWrapperLoaderActive]: status === "loading" && showSpinner
15648
+ });
15649
+ const overlayClass = cx(styles$4.loaderWrapper, className);
15198
15650
  return jsxs("div", {
15199
15651
  className: overlayClass,
15200
15652
  style: {
@@ -15206,7 +15658,8 @@ const LoaderWrapper = ({
15206
15658
  size: loaderSize
15207
15659
  })
15208
15660
  }), jsx("div", {
15209
- className: wrapperClass,
15661
+ className: styles$4.loaderWrapperForm,
15662
+ style: opacitySyle,
15210
15663
  children
15211
15664
  })]
15212
15665
  });
@@ -16707,27 +17160,13 @@ const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event
16707
17160
  callback();
16708
17161
  }
16709
17162
  };
16710
- const adyenKycMultiSelectList = "adyen-kyc-multi-select-list";
16711
- const adyenKycMultiSelectListItem = "adyen-kyc-multi-select-list-item";
16712
- const adyenKycMultiSelectListItemWithDescription = "adyen-kyc-multi-select-list-item--with-description";
16713
- const adyenKycCheckboxLabel = "adyen-kyc-checkbox__label";
16714
- const styles$5 = {
16715
- "adyen-kyc-multi-select-list": "adyen-kyc-multi-select-list",
16716
- adyenKycMultiSelectList,
16717
- "adyen-kyc-multi-select-list-item": "adyen-kyc-multi-select-list-item",
16718
- adyenKycMultiSelectListItem,
16719
- "adyen-kyc-multi-select-list-item--with-description": "adyen-kyc-multi-select-list-item--with-description",
16720
- adyenKycMultiSelectListItemWithDescription,
16721
- "adyen-kyc-checkbox__label": "adyen-kyc-checkbox__label",
16722
- adyenKycCheckboxLabel
16723
- };
16724
17163
  const MultiSelectList = ({
16725
17164
  options,
16726
17165
  selected,
16727
17166
  onSelect,
16728
17167
  mapToSelectItem
16729
17168
  }) => jsx("ul", {
16730
- className: styles$5["adyen-kyc-multi-select-list"],
17169
+ className: "adyen-kyc-multi-select-list",
16731
17170
  children: options.map((option) => {
16732
17171
  const item = mapToSelectItem(option);
16733
17172
  const isSelected = selected.includes(option);
@@ -16741,8 +17180,8 @@ const MultiSelectList = ({
16741
17180
  onKeyDown: handleKeys(["Enter", " "], handleSelect),
16742
17181
  onSelect: handleSelect,
16743
17182
  isMulti: true,
16744
- className: cx([styles$5["adyen-kyc-multi-select-list-item"], {
16745
- [styles$5["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
17183
+ className: cx(["adyen-kyc-multi-select-list-item", {
17184
+ "adyen-kyc-multi-select-list-item--with-description": !!item.description
16746
17185
  }])
16747
17186
  }, item.id);
16748
17187
  })
@@ -17703,8 +18142,9 @@ const relationshipOptions = [{
17703
18142
  id: "guardian",
17704
18143
  name: "guardian"
17705
18144
  }];
18145
+ const countriesRequiringNationality = [CountryCodes.HongKong, CountryCodes.Singapore];
17706
18146
  function PersonalDetailsComponent(props) {
17707
- var _a;
18147
+ var _a, _b, _c, _d;
17708
18148
  const {
17709
18149
  i18n
17710
18150
  } = useI18nContext();
@@ -17735,6 +18175,7 @@ function PersonalDetailsComponent(props) {
17735
18175
  const isDecisionMakerTask = props.taskType === TaskTypes.DECISION_MAKER || props.taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER;
17736
18176
  const isTopLevelEntity = props.taskType === TaskTypes.INDIVIDUAL;
17737
18177
  const isLegalRepresentativeDetailsTask = props.taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
18178
+ const countryRequiringNationality = ((_c = (_b = props.parentLegalEntity) == null ? void 0 : _b.organization) == null ? void 0 : _c.registeredAddress.country) || ((_d = props.data) == null ? void 0 : _d.residencyCountry);
17738
18179
  const requiredFieldsByTask = (props.requiredFields || personalDetailsFields).filter((field) => !isNewEntryFlowEnabled && (field !== "role" || field === "role" && isDecisionMakerTask) || isNewEntryFlowEnabled && (field !== "role" && field !== "accountHolder" || field === "role" && isDecisionMakerTask) || field === "relationship" && isLegalRepresentativeDetailsTask);
17739
18180
  const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
17740
18181
  const getDirectChildFields = () => requiredFieldsByTask.filter((field) => ["birthDate", "residencyCountry", "jobTitle", "nationality", "relationship"].includes(field));
@@ -17826,9 +18267,9 @@ function PersonalDetailsComponent(props) {
17826
18267
  currentState,
17827
18268
  changeInitiatedBy
17828
18269
  }) => {
17829
- var _a2, _b;
18270
+ var _a2, _b2;
17830
18271
  if (changeInitiatedBy === PERSONAL_DETAILS) {
17831
- if (!((_b = (_a2 = currentState.errors) == null ? void 0 : _a2[PERSONAL_DETAILS]) == null ? void 0 : _b.idNumber) && (externalErrors == null ? void 0 : externalErrors.idNumber)) {
18272
+ if (!((_b2 = (_a2 = currentState.errors) == null ? void 0 : _a2[PERSONAL_DETAILS]) == null ? void 0 : _b2.idNumber) && (externalErrors == null ? void 0 : externalErrors.idNumber)) {
17832
18273
  delete externalErrors.idNumber;
17833
18274
  }
17834
18275
  this.isValid = currentState.validityByForm[PERSONAL_DETAILS];
@@ -18004,7 +18445,7 @@ function PersonalDetailsComponent(props) {
18004
18445
  country: data.residencyCountry,
18005
18446
  errors: externalErrors,
18006
18447
  idNumberType
18007
- }), (data.residencyCountry === "SG" || data.residencyCountry === "HK") && formUtils.isRequiredField("nationality") && jsx(CountryField, {
18448
+ }), countriesRequiringNationality.includes(countryRequiringNationality) && formUtils.isRequiredField("nationality") && jsx(CountryField, {
18008
18449
  data: {
18009
18450
  country: data.nationality
18010
18451
  },
@@ -18262,7 +18703,7 @@ const proofOfNationalIdFormID = individualForms.proofOfNationalId.formId;
18262
18703
  const proofOfRelationshipFormID = individualForms.proofOfRelationship.formId;
18263
18704
  const individualDocumentForms = [idVerificationMethodFormID, idDocumentFormID, proofOfResidencyFormID, proofOfNationalIdFormID, proofOfRelationshipFormID];
18264
18705
  function IndividualComponent(props) {
18265
- var _a, _b, _c, _d, _e, _f, _g, _h;
18706
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
18266
18707
  const {
18267
18708
  i18n
18268
18709
  } = useI18nContext();
@@ -18305,7 +18746,7 @@ function IndividualComponent(props) {
18305
18746
  currentState,
18306
18747
  prevState
18307
18748
  }) => {
18308
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j;
18749
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j;
18309
18750
  const residencyCountryPrev = (_b2 = (_a2 = prevState.data) == null ? void 0 : _a2.personalDetails) == null ? void 0 : _b2.residencyCountry;
18310
18751
  const residencyCountry = (_d2 = (_c2 = currentState.data) == null ? void 0 : _c2.personalDetails) == null ? void 0 : _d2.residencyCountry;
18311
18752
  if (residencyCountry != null && residencyCountry !== residencyCountryPrev) {
@@ -18316,13 +18757,18 @@ function IndividualComponent(props) {
18316
18757
  if (idVerificationMethod != null && idVerificationMethod !== idVerificationMethodPrev) {
18317
18758
  setIdVerificationMethodSelected(idVerificationMethod);
18318
18759
  }
18319
- const accountHolder = (_j = (_i = currentState.data) == null ? void 0 : _i.personalDetails) == null ? void 0 : _j.accountHolder;
18760
+ const accountHolder = (_j = (_i2 = currentState.data) == null ? void 0 : _i2.personalDetails) == null ? void 0 : _j.accountHolder;
18320
18761
  this.customNavigationHandler = accountHolder === "theCompanyIWorkFor" ? () => {
18321
18762
  var _a3;
18322
18763
  return (_a3 = props.onTypeSwitch) == null ? void 0 : _a3.call(props, LegalEntityType.ORGANIZATION);
18323
18764
  } : null;
18324
18765
  setData(currentState.data);
18325
18766
  };
18767
+ const handleAddressChange = (addressData) => {
18768
+ updateStateSlice({
18769
+ ...addressData
18770
+ });
18771
+ };
18326
18772
  useEffect(() => {
18327
18773
  var _a2, _b2, _c2;
18328
18774
  const isIdDocumentFormActive = props.activeForm.formId === idDocumentFormID;
@@ -18330,8 +18776,18 @@ function IndividualComponent(props) {
18330
18776
  const isIdAlreadyUploaded = ((_a2 = data == null ? void 0 : data.idDocument) == null ? void 0 : _a2.instantIdVerificationData) || ((_c2 = (_b2 = props.data) == null ? void 0 : _b2.idDocument) == null ? void 0 : _c2.idDocumentType);
18331
18777
  props.setHideFooter(isIdDocumentFormActive && !isIdAlreadyUploaded && isInstantIdVerificationEnabled);
18332
18778
  }, [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]);
18333
- const renderActiveForm = (activeForm) => {
18779
+ const addressSchema = getAddressSchemaForCountry((_i = data == null ? void 0 : data.personalDetails) == null ? void 0 : _i.residencyCountry).filter((field) => {
18334
18780
  var _a2;
18781
+ if (!COUNTRIES_WITH_STATES_DATASET.includes((_a2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a2.residencyCountry)) {
18782
+ return field !== "otherAddressInformation" && field !== "stateOrProvince";
18783
+ }
18784
+ return field !== "otherAddressInformation";
18785
+ });
18786
+ const {
18787
+ updateStateSlice
18788
+ } = useGlobalDataSlice("address");
18789
+ const renderActiveForm = (activeForm) => {
18790
+ var _a2, _b2;
18335
18791
  return jsxs(Fragment, {
18336
18792
  children: [jsx(StateContextWatcher, {
18337
18793
  owner: "IndividualComponent",
@@ -18368,17 +18824,20 @@ function IndividualComponent(props) {
18368
18824
  content: i18n.get("reasonForFillingIndividualAddressDetails"),
18369
18825
  titleId: "whyDoINeedToFillInThisInformation",
18370
18826
  contentId: "reasonForFillingIndividualAddressDetails"
18371
- }), jsx(Address, {
18827
+ }), jsx(AddressExperimentWrapper, {
18372
18828
  ...addressFormProps,
18829
+ id: addressFormID,
18373
18830
  data: {
18374
- ...addressFormProps.data,
18375
- country: props.country
18831
+ ...data.address,
18832
+ country: (_a2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a2.residencyCountry
18376
18833
  },
18377
- hideCountry: true,
18378
- id: addressFormID,
18834
+ requiredFields: addressSchema,
18835
+ optionalFields: ["otherAddressInformation"],
18379
18836
  legalEntityId: props.legalEntityId,
18380
18837
  handleAddressSearch: props.handleAddressSearch,
18381
- handleFindAddress: props.handleFindAddress
18838
+ handleFindAddress: props.handleFindAddress,
18839
+ onChange: handleAddressChange,
18840
+ hideCountry: true
18382
18841
  })]
18383
18842
  })
18384
18843
  }), !!props.handleGetIdVerificationToken && jsx("div", {
@@ -18387,7 +18846,7 @@ function IndividualComponent(props) {
18387
18846
  ...idVerificationMethodFormProps,
18388
18847
  name: fullName,
18389
18848
  id: idVerificationMethodFormID,
18390
- countryOfResidence: (_a2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _a2.residencyCountry
18849
+ countryOfResidence: (_b2 = data == null ? void 0 : data.personalDetails) == null ? void 0 : _b2.residencyCountry
18391
18850
  })
18392
18851
  }), jsx("div", {
18393
18852
  className: activeForm.formId !== idDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
@@ -20782,46 +21241,26 @@ function SwiftCode(props) {
20782
21241
  "aria-invalid": !valid.swiftCode
20783
21242
  });
20784
21243
  }
20785
- const adyenKycCheckGuidance = "adyen-kyc-check-guidance";
20786
- const adyenKycCheckGuidanceImage = "adyen-kyc-check-guidance__image";
20787
- const adyenKycCheckGuidanceImageAnnotated = "adyen-kyc-check-guidance__image--annotated";
20788
- const adyenKycCheckGuidanceImageInactive = "adyen-kyc-check-guidance__image--inactive";
20789
- const adyenKycUsCheckAccountNumber = "adyen-kyc-us-check-account-number";
20790
- const adyenKycUsCheckRoutingNumber = "adyen-kyc-us-check-routing-number";
20791
- const styles$4 = {
20792
- "adyen-kyc-check-guidance": "adyen-kyc-check-guidance",
20793
- adyenKycCheckGuidance,
20794
- "adyen-kyc-check-guidance__image": "adyen-kyc-check-guidance__image",
20795
- adyenKycCheckGuidanceImage,
20796
- "adyen-kyc-check-guidance__image--annotated": "adyen-kyc-check-guidance__image--annotated",
20797
- adyenKycCheckGuidanceImageAnnotated,
20798
- "adyen-kyc-check-guidance__image--inactive": "adyen-kyc-check-guidance__image--inactive",
20799
- adyenKycCheckGuidanceImageInactive,
20800
- "adyen-kyc-us-check-account-number": "adyen-kyc-us-check-account-number",
20801
- adyenKycUsCheckAccountNumber,
20802
- "adyen-kyc-us-check-routing-number": "adyen-kyc-us-check-routing-number",
20803
- adyenKycUsCheckRoutingNumber
20804
- };
20805
21244
  const CheckGuidance = ({
20806
21245
  annotated
20807
21246
  }) => jsxs("div", {
20808
- className: styles$4["adyen-kyc-check-guidance"],
21247
+ className: "adyen-kyc-check-guidance",
20809
21248
  children: [jsx(Svg, {
20810
21249
  type: "image",
20811
21250
  name: "us-check-account-number",
20812
- className: cx(styles$4["adyen-kyc-check-guidance__image"], styles$4["adyen-kyc-check-guidance__image--annotated"], {
20813
- [styles$4["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "account"
21251
+ className: cx("adyen-kyc-check-guidance__image", "adyen-kyc-check-guidance__image--annotated", {
21252
+ "adyen-kyc-check-guidance__image--inactive": annotated !== "account"
20814
21253
  })
20815
21254
  }), jsx(Svg, {
20816
21255
  type: "image",
20817
21256
  name: "us-check-routing-number",
20818
- className: cx(styles$4["adyen-kyc-check-guidance__image"], styles$4["adyen-kyc-check-guidance__image--annotated"], {
20819
- [styles$4["adyen-kyc-check-guidance__image--inactive"]]: annotated !== "routing"
21257
+ className: cx("adyen-kyc-check-guidance__image", "adyen-kyc-check-guidance__image--annotated", {
21258
+ "adyen-kyc-check-guidance__image--inactive": annotated !== "routing"
20820
21259
  })
20821
21260
  }), jsx(Svg, {
20822
21261
  name: "us-check",
20823
21262
  type: "image",
20824
- className: styles$4["adyen-kyc-check-guidance__image"]
21263
+ className: "adyen-kyc-check-guidance__image"
20825
21264
  })]
20826
21265
  });
20827
21266
  const payoutAccountFields = ["accountHolder", ...ibanFields, ...branchCodeFields, ...swiftCodeFields, ...currencyFields, ...bankAccountNumberFields, ...bankNameFields, ...bankCodeFields];
@@ -24396,22 +24835,42 @@ const dbaNameFieldMetadata = {
24396
24835
  label: "dbaName",
24397
24836
  validators: [validateNotEmptyOnBlur]
24398
24837
  };
24399
- const adyenKycStructuredList = "adyen-kyc-structured-list";
24400
- const adyenKycStructuredListListItem = "adyen-kyc-structured-list__list-item";
24838
+ const mapAddressData = (verifiedBusiness) => ({
24839
+ address: verifiedBusiness.street ?? "",
24840
+ otherAddressInformation: verifiedBusiness.street2 ?? "",
24841
+ city: verifiedBusiness.city ?? "",
24842
+ postalCode: verifiedBusiness.zipcode ?? "",
24843
+ stateOrProvince: verifiedBusiness.state ?? ""
24844
+ });
24845
+ const applyVerifiedBusinessData = (verifiedBusiness, handleChangeFor) => {
24846
+ if (!verifiedBusiness) return;
24847
+ entriesOf(verifiedBusiness).forEach(([key, value]) => {
24848
+ switch (key) {
24849
+ case "name":
24850
+ if (value) handleChangeFor("legalCompanyName", "input")(value);
24851
+ break;
24852
+ case "isPrincipalAddress":
24853
+ if (value) handleChangeFor("operationalAddressIsSame", "input")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
24854
+ break;
24855
+ }
24856
+ });
24857
+ };
24858
+ const structuredList = "adyen-kyc-structured-list";
24859
+ const structuredListListItem = "adyen-kyc-structured-list-list-item";
24401
24860
  const adyenLayoutMd = "adyen-layout-md";
24402
- const adyenKycStructuredListLabel = "adyen-kyc-structured-list__label";
24403
- const adyenKycStructuredListValue = "adyen-kyc-structured-list__value";
24861
+ const structuredListLabel = "adyen-kyc-structured-list-label";
24862
+ const structuredListValue = "adyen-kyc-structured-list-value";
24404
24863
  const styles$3 = {
24405
- "adyen-kyc-structured-list": "adyen-kyc-structured-list",
24406
- adyenKycStructuredList,
24407
- "adyen-kyc-structured-list__list-item": "adyen-kyc-structured-list__list-item",
24408
- adyenKycStructuredListListItem,
24864
+ "structured-list": "adyen-kyc-structured-list",
24865
+ structuredList,
24866
+ "structured-list-list-item": "adyen-kyc-structured-list-list-item",
24867
+ structuredListListItem,
24409
24868
  "adyen-layout-md": "adyen-layout-md",
24410
24869
  adyenLayoutMd,
24411
- "adyen-kyc-structured-list__label": "adyen-kyc-structured-list__label",
24412
- adyenKycStructuredListLabel,
24413
- "adyen-kyc-structured-list__value": "adyen-kyc-structured-list__value",
24414
- adyenKycStructuredListValue
24870
+ "structured-list-label": "adyen-kyc-structured-list-label",
24871
+ structuredListLabel,
24872
+ "structured-list-value": "adyen-kyc-structured-list-value",
24873
+ structuredListValue
24415
24874
  };
24416
24875
  const StructuredList = ({
24417
24876
  items
@@ -24420,28 +24879,29 @@ const StructuredList = ({
24420
24879
  i18n
24421
24880
  } = useI18nContext();
24422
24881
  return jsx("dl", {
24423
- className: styles$3["adyen-kyc-structured-list"],
24882
+ className: styles$3.structuredList,
24424
24883
  children: items.map((item) => jsxs("div", {
24425
- className: styles$3["adyen-kyc-structured-list__list-item"],
24884
+ className: styles$3.structuredListListItem,
24426
24885
  children: [jsx("dt", {
24427
- className: styles$3["adyen-kyc-structured-list__label"],
24886
+ className: styles$3.structuredListLabel,
24428
24887
  children: i18n.get(item.labelKey)
24429
24888
  }), jsx("dd", {
24430
- className: styles$3["adyen-kyc-structured-list__value"],
24889
+ className: styles$3.structuredListValue,
24431
24890
  children: item.value
24432
24891
  })]
24433
24892
  }, item.labelKey))
24434
24893
  });
24435
24894
  };
24436
24895
  function VerifiedBusinessCard({
24437
- verifiedBusiness
24896
+ verifiedBusiness,
24897
+ verifiedAddress
24438
24898
  }) {
24439
24899
  const {
24440
24900
  i18n
24441
24901
  } = useI18nContext();
24442
24902
  const [expanded, setExpanded] = useState(false);
24443
- const address = (verifiedBusiness == null ? void 0 : verifiedBusiness.street) && (verifiedBusiness == null ? void 0 : verifiedBusiness.city) && (verifiedBusiness == null ? void 0 : verifiedBusiness.state) && (verifiedBusiness == null ? void 0 : verifiedBusiness.zipcode) ? `${verifiedBusiness == null ? void 0 : verifiedBusiness.street} ${verifiedBusiness.city} ${verifiedBusiness.state} ${verifiedBusiness.zipcode}` : verifiedBusiness == null ? void 0 : verifiedBusiness.address;
24444
- const addressLink = (verifiedBusiness == null ? void 0 : verifiedBusiness.address) ? `https://www.google.com/maps/place/${verifiedBusiness == null ? void 0 : verifiedBusiness.address.replaceAll(" ", "+")}` : void 0;
24903
+ const address = (verifiedAddress == null ? void 0 : verifiedAddress.address) && (verifiedAddress == null ? void 0 : verifiedAddress.city) && (verifiedAddress == null ? void 0 : verifiedAddress.stateOrProvince) && (verifiedAddress == null ? void 0 : verifiedAddress.postalCode) ? `${verifiedAddress == null ? void 0 : verifiedAddress.address} ${verifiedAddress.city} ${verifiedAddress.stateOrProvince} ${verifiedAddress.postalCode}` : verifiedBusiness == null ? void 0 : verifiedBusiness.address;
24904
+ const addressLink = address ? `https://www.google.com/maps/place/${address.replaceAll(" ", "+")}` : void 0;
24445
24905
  const baseItems = useMemo(() => [{
24446
24906
  labelKey: "legalCompanyName__US",
24447
24907
  value: verifiedBusiness == null ? void 0 : verifiedBusiness.name
@@ -24454,7 +24914,7 @@ function VerifiedBusinessCard({
24454
24914
  value: verifiedBusiness == null ? void 0 : verifiedBusiness.legalForm
24455
24915
  }, {
24456
24916
  labelKey: "address",
24457
- value: jsxs("div", {
24917
+ value: jsxs("span", {
24458
24918
  className: "adyen-kyc-verified-business-card__address",
24459
24919
  children: [address, addressLink && jsx(Link, {
24460
24920
  external: true,
@@ -24463,24 +24923,30 @@ function VerifiedBusinessCard({
24463
24923
  })]
24464
24924
  })
24465
24925
  }].filter((item) => !!item.value), [address, addressLink, i18n, verifiedBusiness == null ? void 0 : verifiedBusiness.legalForm]);
24466
- return jsx("section", {
24467
- children: jsxs("div", {
24468
- className: "adyen-kyc-verified-business-card",
24926
+ const expandedContentClasses = cx("adyen-kyc-verified-business-card__content", {
24927
+ "adyen-kyc-verified-business-card__content--collapsed": !expanded,
24928
+ "adyen-kyc-verified-business-card__content--expanded": expanded
24929
+ });
24930
+ return jsxs("section", {
24931
+ className: "adyen-kyc-verified-business-card",
24932
+ children: [jsxs("div", {
24933
+ className: "adyen-kyc-verified-business-card__content",
24469
24934
  children: [jsx(StructuredList, {
24470
24935
  items: baseItems
24471
- }), jsx(Divider, {}), expanded && jsxs(Fragment, {
24472
- children: [jsx(StructuredList, {
24473
- items: expandedItems
24474
- }), jsx(Divider, {})]
24475
- }), jsx("div", {
24476
- className: "adyen-kyc-verified-business-card__button",
24477
- children: jsx(Button, {
24478
- label: expanded ? i18n.get("hideDetails") : i18n.get("showDetails"),
24479
- showAsLink: true,
24480
- onClick: () => setExpanded(!expanded)
24481
- })
24482
- })]
24483
- })
24936
+ }), jsx(Divider, {})]
24937
+ }), jsxs("div", {
24938
+ className: expandedContentClasses,
24939
+ children: [jsx(StructuredList, {
24940
+ items: expandedItems
24941
+ }), jsx(Divider, {})]
24942
+ }), jsx("div", {
24943
+ className: "adyen-kyc-verified-business-card__expand-button",
24944
+ children: jsx(Button, {
24945
+ label: expanded ? i18n.get("hideDetails") : i18n.get("showDetails"),
24946
+ showAsLink: true,
24947
+ onClick: () => setExpanded(!expanded)
24948
+ })
24949
+ })]
24484
24950
  });
24485
24951
  }
24486
24952
  const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
@@ -24510,20 +24976,21 @@ function AdditionalInformationComponent({
24510
24976
  handleFindAddress
24511
24977
  }) {
24512
24978
  var _a, _b, _c, _d;
24979
+ const {
24980
+ basicInformation
24981
+ } = useGlobalData();
24513
24982
  const {
24514
24983
  updateStateSlice
24515
24984
  } = useGlobalDataSlice(ADDITIONAL_INFORMATION_FORM_ID);
24516
24985
  const {
24517
24986
  i18n
24518
24987
  } = useI18nContext();
24988
+ const {
24989
+ isExperimentEnabled
24990
+ } = useExperimentsContext();
24519
24991
  const showVerified = !!verifiedBusiness;
24520
24992
  const showStockData = companyType === CompanyTypesValue.PUBLIC_COMPANY;
24521
- const ADDRESS_SCHEMA2 = getAddressSchemaForCountry(country).filter((field) => {
24522
- if (!COUNTRIES_WITH_STATES_DATASET.includes(country)) {
24523
- return field !== "otherAddressInformation" && field !== "stateOrProvince";
24524
- }
24525
- return field !== "otherAddressInformation";
24526
- });
24993
+ const addressSchema = getAddressSchemaForCountry(country).filter((field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true);
24527
24994
  const initialFormUtilsProps = useMemo(() => ({
24528
24995
  data,
24529
24996
  labels: labels2,
@@ -24655,10 +25122,30 @@ function AdditionalInformationComponent({
24655
25122
  valid: formValid,
24656
25123
  fieldProblems: formFieldProblems
24657
25124
  });
24658
- }, [formSchema, formData, formErrors, formFieldProblems, formValid, updateStateSlice]);
24659
- useEffect(() => {
24660
- if (verifiedBusiness && verifiedBusiness.name !== formData.legalCompanyName) return handleChangeFor("legalCompanyName")(verifiedBusiness.name);
24661
- }, [formData.legalCompanyName, verifiedBusiness, showCompanyStructure]);
25125
+ }, [formSchema, formData, formErrors, formValid, formFieldProblems]);
25126
+ const verifiedAddress = useMemo(() => {
25127
+ if (!verifiedBusiness) return void 0;
25128
+ return verifiedBusiness.isPrincipalAddress || verifiedBusiness.state && (basicInformation == null ? void 0 : basicInformation.stateOrProvince) !== verifiedBusiness.state ? {
25129
+ operationalAddress: {
25130
+ ...mapAddressData(verifiedBusiness),
25131
+ country
25132
+ }
25133
+ } : {
25134
+ registrationAddress: {
25135
+ ...mapAddressData(verifiedBusiness),
25136
+ country
25137
+ }
25138
+ };
25139
+ }, [verifiedBusiness, basicInformation == null ? void 0 : basicInformation.stateOrProvince, country]);
25140
+ const hideRegistrationAddress = useMemo(() => addressSchema.filter((field) => field !== "otherAddressInformation").every((field) => {
25141
+ var _a2;
25142
+ return !!((_a2 = verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress) == null ? void 0 : _a2[field]);
25143
+ }) && Boolean(verifiedBusiness == null ? void 0 : verifiedBusiness.isTrustedAddress) && isExperimentEnabled("EnableNewAddressComponent"), [addressSchema, verifiedBusiness == null ? void 0 : verifiedBusiness.isTrustedAddress, isExperimentEnabled, verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress]);
25144
+ useEffect(
25145
+ () => applyVerifiedBusinessData(verifiedBusiness, handleChangeFor),
25146
+ // eslint-disable-next-line react-hooks/exhaustive-deps
25147
+ [verifiedBusiness]
25148
+ );
24662
25149
  useEffect(() => {
24663
25150
  if (!verifiedBusiness && !showCompanyStructure) resetToDefaultData();
24664
25151
  }, [verifiedBusiness]);
@@ -24679,7 +25166,14 @@ function AdditionalInformationComponent({
24679
25166
  handleChangeFor("operationalAddress")(state.data);
24680
25167
  setValid("operationalAddress", Boolean(state.isValid));
24681
25168
  };
24682
- const handleOperationalAddressIsSameChange = (isChecked) => isChecked ? handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME) : handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
25169
+ const handleOperationalAddressIsSameChange = (isChecked) => {
25170
+ if (isChecked) {
25171
+ handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME);
25172
+ setValid("operationalAddress", true);
25173
+ } else {
25174
+ handleChangeFor("operationalAddressIsSame")(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
25175
+ }
25176
+ };
24683
25177
  return jsxs("form", {
24684
25178
  id: ADDITIONAL_INFORMATION_FORM_ID,
24685
25179
  className: "adyen-kyc-additional-information",
@@ -24691,7 +25185,7 @@ function AdditionalInformationComponent({
24691
25185
  verificationErrors: formVerificationErrors,
24692
25186
  validationErrors: fieldValidationErrors,
24693
25187
  formUtils
24694
- }), showVerified && jsxs("div", {
25188
+ }), showVerified && jsxs("section", {
24695
25189
  children: [jsx("div", {
24696
25190
  className: "adyen-kyc-additional-information__section-heading",
24697
25191
  children: jsx(Typography, {
@@ -24700,9 +25194,10 @@ function AdditionalInformationComponent({
24700
25194
  children: i18n.get("verifiedInformation")
24701
25195
  })
24702
25196
  }), jsx(VerifiedBusinessCard, {
24703
- verifiedBusiness
25197
+ verifiedBusiness,
25198
+ verifiedAddress: (verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress) ?? (verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress)
24704
25199
  })]
24705
- }), jsxs("fieldset", {
25200
+ }), jsxs("section", {
24706
25201
  children: [showVerified && jsx("div", {
24707
25202
  className: "adyen-kyc-additional-information__section-heading",
24708
25203
  children: jsx(Typography, {
@@ -24710,114 +25205,116 @@ function AdditionalInformationComponent({
24710
25205
  variant: "title",
24711
25206
  children: i18n.get("otherBusinessInformation")
24712
25207
  })
24713
- }), showField(LEGAL_COMPANY_NAME_FIELD) && jsx("div", {
24714
- className: "adyen-kyc-field-wrapper",
24715
- children: jsx(LegalCompanyNameField, {
24716
- data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
24717
- valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
24718
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
24719
- labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
24720
- helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
24721
- legalCompanyName: "legalCompanyName__helperText"
24722
- }),
24723
- readonly: formUtils.isReadOnly("legalCompanyName"),
24724
- handleChangeFor
24725
- })
24726
- }), showField(DBA_NAME_FIELD) && jsx("div", {
24727
- className: "adyen-kyc-field-wrapper",
24728
- children: jsx(DBANameField, {
24729
- data: formUtils.getFieldData(formData, DBA_NAME_FIELD),
24730
- valid: formUtils.getFieldValid(formValid, DBA_NAME_FIELD),
24731
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DBA_NAME_FIELD),
24732
- labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
24733
- hasDba: "hasDba"
24734
- }),
24735
- readonly: formUtils.isReadOnly("dbaName"),
24736
- handleChangeFor,
24737
- setErrors
24738
- })
24739
- }), showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && jsx("div", {
24740
- className: "adyen-kyc-field-wrapper",
24741
- children: jsx(BusinessRegistrationNumberField, {
24742
- data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
24743
- valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
24744
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
24745
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
24746
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
24747
- }),
24748
- mask: formUtils.getMask("registrationNumber"),
24749
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24750
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
24751
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24752
- readonly: formUtils.isReadOnly("registrationNumber"),
24753
- optional: formUtils.isOptionalField("registrationNumber"),
24754
- shouldValidate,
24755
- handleChangeFor,
24756
- country,
24757
- canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
24758
- companyType,
24759
- registrationNumberOptions,
24760
- registrationNumberType,
24761
- setRegistrationNumberType
24762
- })
24763
- }), showField(TAX_INFORMATION_FIELD) && jsx("div", {
24764
- className: "adyen-kyc-field-wrapper",
24765
- children: jsx(TaxInformationField, {
24766
- data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
24767
- valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
24768
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
24769
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
24770
- exemptedFromTax: "iDontHaveATaxId"
24771
- }),
24772
- mask: formUtils.getMask("taxInformation"),
24773
- helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
24774
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
24775
- readonly: formUtils.isReadOnly("taxInformation"),
24776
- shouldValidate,
24777
- handleChangeFor,
24778
- canExempt: formUtils.isRequiredField("exemptedFromTax"),
24779
- isUen: formUtils.isRequiredField("isUen"),
24780
- country,
24781
- companyType,
24782
- taxIdNumberType,
24783
- setTaxIdNumberType,
24784
- defaultData: data == null ? void 0 : data.taxInformation
24785
- })
24786
- }), showField(VAT_NUMBER_FIELD) && jsx("div", {
24787
- className: "adyen-kyc-field-wrapper",
24788
- children: jsx(VatNumberField, {
24789
- data: formUtils.getFieldData(formData, VAT_NUMBER_FIELD),
24790
- valid: formUtils.getFieldValid(formValid, VAT_NUMBER_FIELD),
24791
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, VAT_NUMBER_FIELD),
24792
- labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
24793
- exemptedFromVat: "iDontHaveAVatNumber"
24794
- }),
24795
- mask: formUtils.getMask("vatNumber"),
24796
- guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
24797
- placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
24798
- readonly: formUtils.isReadOnly("vatNumber"),
24799
- handleChangeFor,
24800
- country,
24801
- canExempt: formUtils.isRequiredField("exemptedFromVat"),
24802
- vatNumberType,
24803
- setVatNumberType,
24804
- shouldValidate
24805
- })
24806
- }), showField(DATE_OF_INCORPORATION_FIELD) && jsx("div", {
24807
- className: "adyen-kyc-field-wrapper",
24808
- children: jsx(DateOfIncorporationField, {
24809
- data: formUtils.getFieldData(formData, DATE_OF_INCORPORATION_FIELD),
24810
- valid: formUtils.getFieldValid(formValid, DATE_OF_INCORPORATION_FIELD),
24811
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DATE_OF_INCORPORATION_FIELD),
24812
- labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
24813
- placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
24814
- dateOfIncorporation: "datePlaceholder"
24815
- }),
24816
- readonly: formUtils.isReadOnly("dateOfIncorporation"),
24817
- handleChangeFor
24818
- })
25208
+ }), jsxs("fieldset", {
25209
+ children: [showField(LEGAL_COMPANY_NAME_FIELD) && jsx("div", {
25210
+ className: "adyen-kyc-field-wrapper",
25211
+ children: jsx(LegalCompanyNameField, {
25212
+ data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
25213
+ valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
25214
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
25215
+ labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
25216
+ helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
25217
+ legalCompanyName: "legalCompanyName__helperText"
25218
+ }),
25219
+ readonly: formUtils.isReadOnly("legalCompanyName"),
25220
+ handleChangeFor
25221
+ })
25222
+ }), showField(DBA_NAME_FIELD) && jsx("div", {
25223
+ className: "adyen-kyc-field-wrapper",
25224
+ children: jsx(DBANameField, {
25225
+ data: formUtils.getFieldData(formData, DBA_NAME_FIELD),
25226
+ valid: formUtils.getFieldValid(formValid, DBA_NAME_FIELD),
25227
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DBA_NAME_FIELD),
25228
+ labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
25229
+ hasDba: "hasDba"
25230
+ }),
25231
+ readonly: formUtils.isReadOnly("dbaName"),
25232
+ handleChangeFor,
25233
+ setErrors
25234
+ })
25235
+ }), showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && jsx("div", {
25236
+ className: "adyen-kyc-field-wrapper",
25237
+ children: jsx(BusinessRegistrationNumberField, {
25238
+ data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
25239
+ valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
25240
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
25241
+ labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
25242
+ exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
25243
+ }),
25244
+ mask: formUtils.getMask("registrationNumber"),
25245
+ guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
25246
+ placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
25247
+ helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
25248
+ readonly: formUtils.isReadOnly("registrationNumber"),
25249
+ optional: formUtils.isOptionalField("registrationNumber"),
25250
+ shouldValidate,
25251
+ handleChangeFor,
25252
+ country,
25253
+ canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
25254
+ companyType,
25255
+ registrationNumberOptions,
25256
+ registrationNumberType,
25257
+ setRegistrationNumberType
25258
+ })
25259
+ }), showField(TAX_INFORMATION_FIELD) && jsx("div", {
25260
+ className: "adyen-kyc-field-wrapper",
25261
+ children: jsx(TaxInformationField, {
25262
+ data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
25263
+ valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
25264
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
25265
+ labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
25266
+ exemptedFromTax: "iDontHaveATaxId"
25267
+ }),
25268
+ mask: formUtils.getMask("taxInformation"),
25269
+ helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
25270
+ guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
25271
+ readonly: formUtils.isReadOnly("taxInformation"),
25272
+ shouldValidate,
25273
+ handleChangeFor,
25274
+ canExempt: formUtils.isRequiredField("exemptedFromTax"),
25275
+ isUen: formUtils.isRequiredField("isUen"),
25276
+ country,
25277
+ companyType,
25278
+ taxIdNumberType,
25279
+ setTaxIdNumberType,
25280
+ defaultData: data == null ? void 0 : data.taxInformation
25281
+ })
25282
+ }), showField(VAT_NUMBER_FIELD) && jsx("div", {
25283
+ className: "adyen-kyc-field-wrapper",
25284
+ children: jsx(VatNumberField, {
25285
+ data: formUtils.getFieldData(formData, VAT_NUMBER_FIELD),
25286
+ valid: formUtils.getFieldValid(formValid, VAT_NUMBER_FIELD),
25287
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, VAT_NUMBER_FIELD),
25288
+ labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
25289
+ exemptedFromVat: "iDontHaveAVatNumber"
25290
+ }),
25291
+ mask: formUtils.getMask("vatNumber"),
25292
+ guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
25293
+ placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
25294
+ readonly: formUtils.isReadOnly("vatNumber"),
25295
+ handleChangeFor,
25296
+ country,
25297
+ canExempt: formUtils.isRequiredField("exemptedFromVat"),
25298
+ vatNumberType,
25299
+ setVatNumberType,
25300
+ shouldValidate
25301
+ })
25302
+ }), showField(DATE_OF_INCORPORATION_FIELD) && jsx("div", {
25303
+ className: "adyen-kyc-field-wrapper",
25304
+ children: jsx(DateOfIncorporationField, {
25305
+ data: formUtils.getFieldData(formData, DATE_OF_INCORPORATION_FIELD),
25306
+ valid: formUtils.getFieldValid(formValid, DATE_OF_INCORPORATION_FIELD),
25307
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DATE_OF_INCORPORATION_FIELD),
25308
+ labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
25309
+ placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
25310
+ dateOfIncorporation: "datePlaceholder"
25311
+ }),
25312
+ readonly: formUtils.isReadOnly("dateOfIncorporation"),
25313
+ handleChangeFor
25314
+ })
25315
+ })]
24819
25316
  })]
24820
- }), showStockData && jsxs("fieldset", {
25317
+ }), showStockData && jsxs("section", {
24821
25318
  children: [jsx("div", {
24822
25319
  className: "adyen-kyc-additional-information__section-heading",
24823
25320
  children: jsx(Typography, {
@@ -24825,50 +25322,55 @@ function AdditionalInformationComponent({
24825
25322
  variant: "title",
24826
25323
  children: i18n.get("stockExchangeInformation")
24827
25324
  })
24828
- }), showField(STOCK_EXCHANGE_MIC_FIELD) && jsx("div", {
24829
- className: "adyen-kyc-field-wrapper",
24830
- children: jsx(StockExchangeMICField, {
24831
- data: formUtils.getFieldData(formData, STOCK_EXCHANGE_MIC_FIELD),
24832
- valid: formUtils.getFieldValid(formValid, STOCK_EXCHANGE_MIC_FIELD),
24833
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_EXCHANGE_MIC_FIELD),
24834
- labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
24835
- placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
24836
- mask: formUtils.getMask("stockExchangeMIC"),
24837
- guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
24838
- readonly: formUtils.isReadOnly("stockExchangeMIC"),
24839
- shouldValidate,
24840
- handleChangeFor
24841
- })
24842
- }), showField(STOCK_ISIN_FIELD) && jsx("div", {
24843
- className: "adyen-kyc-field-wrapper",
24844
- children: jsx(StockISINField, {
24845
- data: formUtils.getFieldData(formData, STOCK_ISIN_FIELD),
24846
- valid: formUtils.getFieldValid(formValid, STOCK_ISIN_FIELD),
24847
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_ISIN_FIELD),
24848
- labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
24849
- placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
24850
- mask: formUtils.getMask("stockISIN"),
24851
- guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
24852
- readonly: formUtils.isReadOnly("stockISIN"),
24853
- shouldValidate,
24854
- handleChangeFor
24855
- })
24856
- }), showField(STOCK_TICKER_SYMBOL_FIELD) && jsx("div", {
24857
- className: "adyen-kyc-field-wrapper",
24858
- children: jsx(StockTickerSymbolField, {
24859
- data: formUtils.getFieldData(formData, STOCK_TICKER_SYMBOL_FIELD),
24860
- valid: formUtils.getFieldValid(formValid, STOCK_TICKER_SYMBOL_FIELD),
24861
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_TICKER_SYMBOL_FIELD),
24862
- labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
24863
- placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
24864
- mask: formUtils.getMask("stockTickerSymbol"),
24865
- guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
24866
- readonly: formUtils.isReadOnly("stockTickerSymbol"),
24867
- shouldValidate,
24868
- handleChangeFor
24869
- })
25325
+ }), jsxs("fieldset", {
25326
+ children: [showField(STOCK_EXCHANGE_MIC_FIELD) && jsx("div", {
25327
+ className: "adyen-kyc-field-wrapper",
25328
+ children: jsx(StockExchangeMICField, {
25329
+ data: formUtils.getFieldData(formData, STOCK_EXCHANGE_MIC_FIELD),
25330
+ valid: formUtils.getFieldValid(formValid, STOCK_EXCHANGE_MIC_FIELD),
25331
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_EXCHANGE_MIC_FIELD),
25332
+ labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
25333
+ placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
25334
+ mask: formUtils.getMask("stockExchangeMIC"),
25335
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
25336
+ readonly: formUtils.isReadOnly("stockExchangeMIC"),
25337
+ shouldValidate,
25338
+ handleChangeFor
25339
+ })
25340
+ }), showField(STOCK_ISIN_FIELD) && jsx("div", {
25341
+ className: "adyen-kyc-field-wrapper",
25342
+ children: jsx(StockISINField, {
25343
+ data: formUtils.getFieldData(formData, STOCK_ISIN_FIELD),
25344
+ valid: formUtils.getFieldValid(formValid, STOCK_ISIN_FIELD),
25345
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_ISIN_FIELD),
25346
+ labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
25347
+ placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
25348
+ mask: formUtils.getMask("stockISIN"),
25349
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
25350
+ readonly: formUtils.isReadOnly("stockISIN"),
25351
+ shouldValidate,
25352
+ handleChangeFor
25353
+ })
25354
+ }), showField(STOCK_TICKER_SYMBOL_FIELD) && jsx("div", {
25355
+ className: "adyen-kyc-field-wrapper",
25356
+ children: jsx(StockTickerSymbolField, {
25357
+ data: formUtils.getFieldData(formData, STOCK_TICKER_SYMBOL_FIELD),
25358
+ valid: formUtils.getFieldValid(formValid, STOCK_TICKER_SYMBOL_FIELD),
25359
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_TICKER_SYMBOL_FIELD),
25360
+ labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
25361
+ placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
25362
+ mask: formUtils.getMask("stockTickerSymbol"),
25363
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
25364
+ readonly: formUtils.isReadOnly("stockTickerSymbol"),
25365
+ shouldValidate,
25366
+ handleChangeFor
25367
+ })
25368
+ })]
24870
25369
  })]
24871
- }), jsxs("fieldset", {
25370
+ }), jsxs("section", {
25371
+ style: {
25372
+ display: hideRegistrationAddress ? "none" : "unset"
25373
+ },
24872
25374
  children: [jsxs("div", {
24873
25375
  className: "adyen-kyc-additional-information__section-heading",
24874
25376
  children: [jsx(Typography, {
@@ -24880,7 +25382,7 @@ function AdditionalInformationComponent({
24880
25382
  variant: "body",
24881
25383
  children: i18n.get("registeredBusinessAddressDescription")
24882
25384
  })]
24883
- }), jsx(Address, {
25385
+ }), jsx(AddressExperimentWrapper, {
24884
25386
  id: ADDITIONAL_INFORMATION_FORM_ID,
24885
25387
  addressType: "registrationAddress",
24886
25388
  data: {
@@ -24889,16 +25391,18 @@ function AdditionalInformationComponent({
24889
25391
  },
24890
25392
  labels: getAddressSchemaLabelsByCountry(country),
24891
25393
  countryCode: country,
24892
- requiredFields: ADDRESS_SCHEMA2,
25394
+ requiredFields: addressSchema,
24893
25395
  shouldValidate,
24894
25396
  hideCountry: true,
24895
25397
  optionalFields: ["otherAddressInformation"],
25398
+ readOnlyFields: verifiedBusiness ? ["stateOrProvince"] : [],
24896
25399
  onChange: handleRegistrationAddressChange,
24897
25400
  handleAddressSearch,
24898
25401
  handleFindAddress,
24899
- verifiedBusiness
25402
+ verifiedBusiness,
25403
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.registrationAddress
24900
25404
  })]
24901
- }), jsxs("fieldset", {
25405
+ }), jsxs("section", {
24902
25406
  children: [jsxs("div", {
24903
25407
  className: "adyen-kyc-additional-information__section-heading",
24904
25408
  children: [jsx(Typography, {
@@ -24925,7 +25429,7 @@ function AdditionalInformationComponent({
24925
25429
  checked: formData.operationalAddressIsSame ? formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
24926
25430
  onChange: handleOperationalAddressIsSameChange
24927
25431
  })
24928
- }), formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && jsx(Address, {
25432
+ }), formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && jsx(AddressExperimentWrapper, {
24929
25433
  id: ADDITIONAL_INFORMATION_FORM_ID,
24930
25434
  addressType: "operationalAddress",
24931
25435
  data: {
@@ -24934,12 +25438,15 @@ function AdditionalInformationComponent({
24934
25438
  },
24935
25439
  labels: getAddressSchemaLabelsByCountry(country),
24936
25440
  countryCode: country,
24937
- requiredFields: ADDRESS_SCHEMA2,
25441
+ requiredFields: addressSchema,
24938
25442
  shouldValidate,
25443
+ hideCountry: true,
24939
25444
  optionalFields: ["otherAddressInformation"],
24940
25445
  onChange: handleOperationalAddressChange,
24941
25446
  handleAddressSearch,
24942
- handleFindAddress
25447
+ handleFindAddress,
25448
+ verifiedBusiness,
25449
+ verifiedAddress: verifiedAddress == null ? void 0 : verifiedAddress.operationalAddress
24943
25450
  })]
24944
25451
  })]
24945
25452
  });
@@ -25194,10 +25701,10 @@ function BusinessSelectionComponent({
25194
25701
  if (fetching === "loading") return;
25195
25702
  if (!selectedBusinessId || selectedBusinessId !== result.id) {
25196
25703
  setSelectedBusinessId(result.id);
25197
- const businessData = await fetchBusinessData(result);
25704
+ const businessData = await fetchBusinessData(result, basicInformation == null ? void 0 : basicInformation.stateOrProvince);
25198
25705
  setCurrentBusinessSelection(businessData);
25199
25706
  } else if (fetching === "error") {
25200
- const businessData = await fetchBusinessData(result);
25707
+ const businessData = await fetchBusinessData(result, basicInformation == null ? void 0 : basicInformation.stateOrProvince);
25201
25708
  setCurrentBusinessSelection(businessData);
25202
25709
  }
25203
25710
  } catch (e) {
@@ -27404,7 +27911,7 @@ function BusinessDetailsDropinComponent({
27404
27911
  handleClearCompanyData,
27405
27912
  onTypeSwitch
27406
27913
  }) {
27407
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
27914
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
27408
27915
  const {
27409
27916
  state: {
27410
27917
  currentState
@@ -27571,17 +28078,17 @@ function BusinessDetailsDropinComponent({
27571
28078
  return tinMatch;
27572
28079
  }, [verifyBusinessData]);
27573
28080
  const findBusiness = useCallback(async (data) => {
27574
- var _a2, _b2, _c2;
28081
+ var _a2, _b2, _c2, _d2;
27575
28082
  const tin = (_c2 = (_b2 = (_a2 = currentState.data.basicInformation) == null ? void 0 : _a2.taxInformation) == null ? void 0 : _b2.find((taxId) => currentCountry === taxId.country)) == null ? void 0 : _c2.number;
27576
28083
  const results = await searchForBusiness(data);
27577
28084
  if (results && results.length === 1) {
27578
- const businessData = await fetchBusinessData(results[0]);
28085
+ const businessData = await fetchBusinessData(results[0], (_d2 = currentState.data.basicInformation) == null ? void 0 : _d2.stateOrProvince);
27579
28086
  if (businessData && tin) {
27580
28087
  const tinMatch = await handleVerifyBusinessData(businessData, tin);
27581
28088
  return tinMatch ? handleNextClick() : void 0;
27582
28089
  }
27583
28090
  }
27584
- }, [currentCountry, (_e = currentState.data.basicInformation) == null ? void 0 : _e.taxInformation, fetchBusinessData, handleNextClick, searchForBusiness, handleVerifyBusinessData]);
28091
+ }, [currentCountry, (_e = currentState.data.basicInformation) == null ? void 0 : _e.taxInformation, (_f = currentState.data.basicInformation) == null ? void 0 : _f.stateOrProvince, fetchBusinessData, handleNextClick, searchForBusiness, handleVerifyBusinessData]);
27585
28092
  useEffect(() => {
27586
28093
  if (searchResults && !searchResults.length || searching === "error") {
27587
28094
  setShowCompanyStructure(true);
@@ -27593,7 +28100,7 @@ function BusinessDetailsDropinComponent({
27593
28100
  setShowCompanyStructure(false);
27594
28101
  resetBusinessData();
27595
28102
  }
27596
- }, [currentSearchName, (_f = currentState.data.basicInformation) == null ? void 0 : _f.businessName]);
28103
+ }, [currentSearchName, (_g = currentState.data.basicInformation) == null ? void 0 : _g.businessName]);
27597
28104
  const [showBusinessSelection, setShowBusinessSelection] = useState(false);
27598
28105
  const isBusinessSelection = useMemo(() => showBusinessSelection && activeForm.formId === "basicInformation", [activeForm.formId, showBusinessSelection]);
27599
28106
  const hideBack = useMemo(() => {
@@ -27640,7 +28147,7 @@ function BusinessDetailsDropinComponent({
27640
28147
  default:
27641
28148
  return gotoFormByFormIndex(index);
27642
28149
  }
27643
- }, [canSubmitForm, currentCountry, (_g = currentState.data.basicInformation) == null ? void 0 : _g.businessName, (_h = currentState.data.basicInformation) == null ? void 0 : _h.country, (_i = currentState.data.basicInformation) == null ? void 0 : _i.stateOrProvince, findBusiness, forms2, gotoFormByFormIndex, isBusinessSelection, searchResults, verifiedBusiness, activeForm.formId]);
28150
+ }, [canSubmitForm, currentCountry, (_h = currentState.data.basicInformation) == null ? void 0 : _h.businessName, (_i = currentState.data.basicInformation) == null ? void 0 : _i.country, (_j = currentState.data.basicInformation) == null ? void 0 : _j.stateOrProvince, findBusiness, forms2, gotoFormByFormIndex, isBusinessSelection, searchResults, verifiedBusiness, activeForm.formId]);
27644
28151
  const nextClick = useCallback(() => {
27645
28152
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
27646
28153
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return handleNextClick();
@@ -27663,7 +28170,7 @@ function BusinessDetailsDropinComponent({
27663
28170
  default:
27664
28171
  return handleNextClick();
27665
28172
  }
27666
- }, [currentCountry, handleNextClick, activeForm.formId, verifiedBusiness, (_j = currentState.validityByForm) == null ? void 0 : _j.basicInformation, (_k = currentState.data.basicInformation) == null ? void 0 : _k.businessName, (_l = currentState.data.basicInformation) == null ? void 0 : _l.country, (_m = currentState.data.basicInformation) == null ? void 0 : _m.stateOrProvince, isBusinessSelection, findBusiness]);
28173
+ }, [currentCountry, handleNextClick, activeForm.formId, verifiedBusiness, (_k = currentState.validityByForm) == null ? void 0 : _k.basicInformation, (_l = currentState.data.basicInformation) == null ? void 0 : _l.businessName, (_m = currentState.data.basicInformation) == null ? void 0 : _m.country, (_n = currentState.data.basicInformation) == null ? void 0 : _n.stateOrProvince, isBusinessSelection, findBusiness]);
27667
28174
  const backClick = useCallback(() => {
27668
28175
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country)) return handleNextClick();
27669
28176
  switch (activeForm.formId) {
@@ -32980,7 +33487,8 @@ function IndividualDropinComponent({
32980
33487
  data,
32981
33488
  country,
32982
33489
  taskType,
32983
- isExperimentEnabled
33490
+ isExperimentEnabled,
33491
+ rootLegalEntity: parentLegalEntity
32984
33492
  }), [country, data, taskType]);
32985
33493
  const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") ? validators({
32986
33494
  country,
@@ -34823,15 +35331,15 @@ function RoleAndTypeDropinComponent({
34823
35331
  content
34824
35332
  });
34825
35333
  }
34826
- const adyenKycOutlinedIcon = "adyen-kyc-outlined-icon";
35334
+ const outlinedIcon = "adyen-kyc-outlined-icon";
34827
35335
  const styles$2 = {
34828
- "adyen-kyc-outlined-icon": "adyen-kyc-outlined-icon",
34829
- adyenKycOutlinedIcon
35336
+ "outlined-icon": "adyen-kyc-outlined-icon",
35337
+ outlinedIcon
34830
35338
  };
34831
35339
  const OutlinedIcon = ({
34832
35340
  name
34833
35341
  }) => jsx("div", {
34834
- className: styles$2["adyen-kyc-outlined-icon"],
35342
+ className: styles$2.outlinedIcon,
34835
35343
  children: jsx(Icon, {
34836
35344
  name
34837
35345
  })
@@ -34969,6 +35477,7 @@ function ServiceAgreementDropinComponent({
34969
35477
  handleDownloadAcceptedTermsOfServiceDocument,
34970
35478
  handleDownloadUnacceptedTermsOfServiceDocument,
34971
35479
  handleHomeClick,
35480
+ handleAddSigner,
34972
35481
  handleSign,
34973
35482
  taskType,
34974
35483
  serviceAgreementTypes,
@@ -35013,9 +35522,9 @@ function ServiceAgreementDropinComponent({
35013
35522
  const [activeFormIndex, setActiveFormIndex] = useState(0);
35014
35523
  const [activeForm, setActiveForm] = useState(forms2[activeFormIndex]);
35015
35524
  const [hasFinished, setHasFinished] = useState(false);
35016
- const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm.serviceAgreementType)) && !activeForm.acceptanceId;
35525
+ const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm == null ? void 0 : activeForm.serviceAgreementType)) && !(activeForm == null ? void 0 : activeForm.acceptanceId);
35017
35526
  const isLastStep = activeFormIndex === forms2.length - 1;
35018
- const showSignerCard = !!activeForm.acceptanceId;
35527
+ const showSignerCard = !!(activeForm == null ? void 0 : activeForm.acceptanceId);
35019
35528
  const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
35020
35529
  showToast({
35021
35530
  label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
@@ -35028,10 +35537,10 @@ function ServiceAgreementDropinComponent({
35028
35537
  } = useServiceAgreement({
35029
35538
  handleGetServiceAgreement,
35030
35539
  handleServiceAgreementIsNotAvailableInThatLanguage,
35031
- acceptanceId: activeForm.acceptanceId,
35540
+ acceptanceId: activeForm == null ? void 0 : activeForm.acceptanceId,
35032
35541
  handleViewAcceptedTermsOfServiceDocument,
35033
35542
  legalEntityId: legalEntityResponse.id,
35034
- serviceAgreementType: activeForm.serviceAgreementType,
35543
+ serviceAgreementType: activeForm == null ? void 0 : activeForm.serviceAgreementType,
35035
35544
  language: i18n.languageCode
35036
35545
  });
35037
35546
  const {
@@ -35186,12 +35695,24 @@ function ServiceAgreementDropinComponent({
35186
35695
  });
35187
35696
  }
35188
35697
  };
35698
+ const addSignerAlert = jsx(Alert, {
35699
+ variant: signers.length ? "info" : "warning",
35700
+ className: "adyen-kyc-u-margin-top-16",
35701
+ title: i18n.get(signers.length ? "isYourNameMissingFromSigners" : "thereAreNoSigners"),
35702
+ children: jsx(Button, {
35703
+ label: i18n.get("addYourselfAsSigner"),
35704
+ onClick: handleAddSigner,
35705
+ showAsLink: true,
35706
+ underline: true,
35707
+ type: "button"
35708
+ })
35709
+ });
35189
35710
  const sidebar = jsx(LoaderWrapper, {
35190
35711
  status: loadingStatus,
35191
35712
  formOpacityWhenLoading: 0.3,
35192
35713
  showSpinner: false,
35193
35714
  className: "adyen-kyc-dropin__sidebar-wrapper",
35194
- children: !!forms2.length && jsx(FormNavigation, {
35715
+ children: jsx(FormNavigation, {
35195
35716
  forms: forms2,
35196
35717
  activeForm,
35197
35718
  gotoForm,
@@ -35204,11 +35725,11 @@ function ServiceAgreementDropinComponent({
35204
35725
  formOpacityWhenLoading: 0.3,
35205
35726
  showSpinner: false,
35206
35727
  className: "adyen-kyc-form-container",
35207
- children: [jsx(LoaderWrapper, {
35728
+ children: [jsxs(LoaderWrapper, {
35208
35729
  status: contractLoadingStatus,
35209
35730
  formOpacityWhenLoading: 0.3,
35210
35731
  showSpinner: false,
35211
- children: serviceAgreement && jsxs(Fragment, {
35732
+ children: [serviceAgreement && jsxs(Fragment, {
35212
35733
  children: [jsx(ContractViewer, {
35213
35734
  contract: serviceAgreement.contract,
35214
35735
  onExpandSection: handleExpandSection
@@ -35219,13 +35740,16 @@ function ServiceAgreementDropinComponent({
35219
35740
  label: i18n.get("downloadAsPdf"),
35220
35741
  icon: "download"
35221
35742
  })]
35222
- })
35743
+ }), !forms2.length && jsx(Alert, {
35744
+ variant: "info",
35745
+ title: i18n.get("nothingNeedsToBeSigned")
35746
+ })]
35223
35747
  }), canSign && jsxs(Fragment, {
35224
- children: [jsx(Field, {
35748
+ children: [!!signers.length && jsx(Field, {
35225
35749
  name: "signer",
35226
35750
  label: i18n.get("signer"),
35227
35751
  classNameModifiers: ["col-50"],
35228
- className: "adyen-kyc-u-margin-y-32",
35752
+ className: "adyen-kyc-u-margin-top-32",
35229
35753
  errorMessage: i18n.get((_a = errors.signer) == null ? void 0 : _a.errorMessage),
35230
35754
  isValid: valid.signer,
35231
35755
  children: (childProps) => jsx(Select, {
@@ -35236,8 +35760,9 @@ function ServiceAgreementDropinComponent({
35236
35760
  selected: data.signer,
35237
35761
  items: signers
35238
35762
  })
35239
- }), jsx(Field, {
35763
+ }), addSignerAlert, jsx(Field, {
35240
35764
  name: "acceptServiceAgreement",
35765
+ className: "adyen-kyc-u-margin-top-16",
35241
35766
  errorMessage: i18n.get((_b = errors.acceptServiceAgreement) == null ? void 0 : _b.errorMessage),
35242
35767
  isValid: valid.acceptServiceAgreement,
35243
35768
  children: (childProps) => jsx(Checkbox, {
@@ -35267,7 +35792,7 @@ function ServiceAgreementDropinComponent({
35267
35792
  homeButtonLabel: i18n.get("goToOverview"),
35268
35793
  onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
35269
35794
  nextButtonLabel: i18n.get(canSign ? "sign" : "next"),
35270
- nextButtonDisabled: !canSign && isLastStep,
35795
+ nextButtonDisabled: forms2.length === 0 || !canSign && isLastStep,
35271
35796
  onBack: () => gotoForm(activeFormIndex - 1),
35272
35797
  hideBackButton: activeFormIndex === 0,
35273
35798
  backButtonLabel: i18n.get("previous")
@@ -35960,6 +36485,10 @@ const useNavigation = ({
35960
36485
  onNavigate,
35961
36486
  handleOpenSingpassAuthorizationLink
35962
36487
  }) => {
36488
+ const {
36489
+ isSettingEnabled
36490
+ } = useSettingsContext();
36491
+ const showServiceAgreementsFirst = isSettingEnabled(SettingNames.ShowServiceAgreementsFirst);
35963
36492
  const isNewEntryFlowEnabled = useEnableNewEntryFlow();
35964
36493
  const showIntroduction = useShouldShowIntroduction({
35965
36494
  legalEntity
@@ -36027,11 +36556,12 @@ const useNavigation = ({
36027
36556
  canSeeEntitySelection,
36028
36557
  showIntroduction,
36029
36558
  isNewEntryFlowEnabled,
36030
- shouldShowSingpassSelection
36559
+ shouldShowSingpassSelection,
36560
+ showServiceAgreementsFirst
36031
36561
  });
36032
36562
  setTaskHistory([...taskHistory.slice(0, taskHistory.length - 1), defaultTask]);
36033
36563
  }
36034
- }, [legalEntity, accountHolder, showIntroduction, isNewEntryFlowEnabled, shouldShowSingpassSelection, taskHistory]);
36564
+ }, [legalEntity, accountHolder, showIntroduction, isNewEntryFlowEnabled, shouldShowSingpassSelection, showServiceAgreementsFirst, taskHistory]);
36035
36565
  return {
36036
36566
  currentTask: actualTasks.at(-1),
36037
36567
  previousTask: actualTasks.at(-2),
@@ -36044,9 +36574,13 @@ const getDefaultTask = ({
36044
36574
  canSeeEntitySelection,
36045
36575
  isNewEntryFlowEnabled,
36046
36576
  showIntroduction,
36047
- shouldShowSingpassSelection
36577
+ shouldShowSingpassSelection,
36578
+ showServiceAgreementsFirst
36048
36579
  }) => {
36049
36580
  const hasLegalEntityProgressedBeyondEntitySelection = hasProgressedBeyondEntitySelection(legalEntity);
36581
+ if (showServiceAgreementsFirst) {
36582
+ return TaskTypes.SERVICE_AGREEMENT;
36583
+ }
36050
36584
  if (isNewEntryFlowEnabled && canSeeEntitySelection && !hasLegalEntityProgressedBeyondEntitySelection) return TaskTypes.BUSINESS_TYPE_SELECTION;
36051
36585
  if (showIntroduction) return TaskTypes.INTRODUCTION;
36052
36586
  if (shouldShowSingpassSelection) return TaskTypes.SINGPASS_SELECTION;
@@ -37126,7 +37660,8 @@ function DropinComposerComponent({
37126
37660
  handleViewAcceptedTermsOfServiceDocument: args.handleViewAcceptedTermsOfServiceDocument,
37127
37661
  handleDownloadAcceptedTermsOfServiceDocument: args.handleDownloadAcceptedTermsOfServiceDocument,
37128
37662
  handleDownloadUnacceptedTermsOfServiceDocument: args.handleDownloadUnacceptedTermsOfServiceDocument,
37129
- handleHomeClick: navigateBack,
37663
+ handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW),
37664
+ handleAddSigner: () => navigateTo(TaskTypes.DECISION_MAKER),
37130
37665
  handleSign: async (...params) => {
37131
37666
  await args.handleSignServiceAgreement(...params);
37132
37667
  await getServiceAgreementStatus2();
@@ -37853,7 +38388,8 @@ const logger$g = createLogger("CreateContractingComponent");
37853
38388
  function CreateContractingComponent({
37854
38389
  legalEntityId,
37855
38390
  modalView,
37856
- onClose
38391
+ onClose,
38392
+ onUnmount
37857
38393
  }) {
37858
38394
  const {
37859
38395
  isModalView,
@@ -37879,6 +38415,12 @@ function CreateContractingComponent({
37879
38415
  if (modalView) {
37880
38416
  setIsModalView(true);
37881
38417
  }
38418
+ const handleOnClose = () => {
38419
+ if (modalView) {
38420
+ onUnmount == null ? void 0 : onUnmount();
38421
+ }
38422
+ onClose == null ? void 0 : onClose();
38423
+ };
37882
38424
  const fetchLegalEntity = useCallback(async () => {
37883
38425
  await getLegalEntity2(legalEntityId).then((res) => setLegalEntity(res)).catch(logger$g.error);
37884
38426
  }, [getLegalEntity2, legalEntityId]);
@@ -37925,7 +38467,10 @@ function CreateContractingComponent({
37925
38467
  handleSign,
37926
38468
  asEmbedded: true,
37927
38469
  asModal: isModalView,
37928
- handleCloseClick: onClose
38470
+ handleCloseClick: handleOnClose,
38471
+ handleAddSigner: () => {
38472
+ }
38473
+ // TODO: figure out what this should be, in the dropin it's () => navigateTo(TaskTypes.DECISION_MAKER)
37929
38474
  });
37930
38475
  }
37931
38476
  const logger$f = createLogger("CreateIndividualComponent");
@@ -37936,7 +38481,8 @@ function CreateIndividualComponent({
37936
38481
  onSubmitSuccess,
37937
38482
  handleBackClick,
37938
38483
  modalView,
37939
- onClose
38484
+ onClose,
38485
+ onUnmount
37940
38486
  }) {
37941
38487
  var _a;
37942
38488
  const {
@@ -37967,6 +38513,12 @@ function CreateIndividualComponent({
37967
38513
  if (modalView) {
37968
38514
  setIsModalView(true);
37969
38515
  }
38516
+ const handleOnClose = () => {
38517
+ if (modalView) {
38518
+ onUnmount == null ? void 0 : onUnmount();
38519
+ }
38520
+ onClose == null ? void 0 : onClose();
38521
+ };
37970
38522
  const fetchLegalEntity = useCallback(async () => {
37971
38523
  try {
37972
38524
  const [parentEntity, entity] = await Promise.all([parentLegalEntityId ? getLegalEntity2(parentLegalEntityId) : Promise.resolve(void 0), legalEntityId ? getLegalEntity2(legalEntityId) : Promise.resolve(void 0)]);
@@ -37981,9 +38533,10 @@ function CreateIndividualComponent({
37981
38533
  }, [fetchLegalEntity]);
37982
38534
  const country = ((_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.residentialAddress.country) ?? contextCountry;
37983
38535
  const onSubmit = (d) => {
37984
- if (onSubmitSuccess) {
37985
- onSubmitSuccess(d);
38536
+ if (modalView) {
38537
+ onUnmount == null ? void 0 : onUnmount();
37986
38538
  }
38539
+ onSubmitSuccess == null ? void 0 : onSubmitSuccess(d);
37987
38540
  };
37988
38541
  const fetchProviderStatus = useCallback(async () => {
37989
38542
  const res = await getProviderStatus2({
@@ -38013,7 +38566,7 @@ function CreateIndividualComponent({
38013
38566
  hideNavigation: true,
38014
38567
  asModal: isModalView,
38015
38568
  onSubmit,
38016
- handleCloseClick: onClose,
38569
+ handleCloseClick: handleOnClose,
38017
38570
  taskType
38018
38571
  });
38019
38572
  }
@@ -38085,18 +38638,15 @@ function CreateTransferInstrumentComponent({
38085
38638
  taskType: TaskTypes.PAYOUT
38086
38639
  });
38087
38640
  }
38088
- const adyenKycSkeleton = "adyen-kyc-skeleton";
38089
- const skeleton = "skeleton";
38090
- const adyenKycSkeletonCircle = "adyen-kyc-skeleton__circle";
38091
- const adyenKycSkeletonText = "adyen-kyc-skeleton__text";
38641
+ const skeleton = "adyen-kyc-skeleton";
38642
+ const skeletonCircle = "adyen-kyc-skeleton-circle";
38643
+ const skeletonText = "adyen-kyc-skeleton-text";
38092
38644
  const styles$1 = {
38093
- "adyen-kyc-skeleton": "adyen-kyc-skeleton",
38094
- adyenKycSkeleton,
38095
38645
  skeleton,
38096
- "adyen-kyc-skeleton__circle": "adyen-kyc-skeleton__circle",
38097
- adyenKycSkeletonCircle,
38098
- "adyen-kyc-skeleton__text": "adyen-kyc-skeleton__text",
38099
- adyenKycSkeletonText
38646
+ "skeleton-circle": "adyen-kyc-skeleton-circle",
38647
+ skeletonCircle,
38648
+ "skeleton-text": "adyen-kyc-skeleton-text",
38649
+ skeletonText
38100
38650
  };
38101
38651
  const Skeleton = ({
38102
38652
  circle = false,
@@ -38104,9 +38654,9 @@ const Skeleton = ({
38104
38654
  height = "1em",
38105
38655
  width
38106
38656
  }) => {
38107
- const classNames = cx("adyen-kyc-skeleton", {
38108
- [styles$1["adyen-kyc-skeleton__circle"]]: circle,
38109
- [styles$1["adyen-kyc-skeleton__text"]]: text
38657
+ const classNames = cx(styles$1.skeleton, {
38658
+ [styles$1.skeletonCircle]: circle,
38659
+ [styles$1.skeletonText]: text
38110
38660
  });
38111
38661
  return jsx("div", {
38112
38662
  className: classNames,
@@ -38116,25 +38666,25 @@ const Skeleton = ({
38116
38666
  }
38117
38667
  });
38118
38668
  };
38119
- const adyenKycEmbeddedStatus = "adyen-kyc-embedded-status";
38120
- const adyenKycEmbeddedStatusLoading = "adyen-kyc-embedded-status--loading";
38121
- const adyenKycEmbeddedStatusAvatar = "adyen-kyc-embedded-status__avatar";
38122
- const adyenKycEmbeddedStatusLight = "adyen-kyc-embedded-status--light";
38123
- const adyenKycEmbeddedStatusIcon = "adyen-kyc-embedded-status__icon";
38124
- const adyenKycEmbeddedStatusInfo = "adyen-kyc-embedded-status__info";
38669
+ const embeddedStatus = "adyen-kyc-embedded-status";
38670
+ const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
38671
+ const embeddedStatusAvatar = "adyen-kyc-embedded-status-avatar";
38672
+ const embeddedStatusLight = "adyen-kyc-embedded-status-light";
38673
+ const embeddedStatusIcon = "adyen-kyc-embedded-status-icon";
38674
+ const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
38125
38675
  const styles = {
38126
- "adyen-kyc-embedded-status": "adyen-kyc-embedded-status",
38127
- adyenKycEmbeddedStatus,
38128
- "adyen-kyc-embedded-status--loading": "adyen-kyc-embedded-status--loading",
38129
- adyenKycEmbeddedStatusLoading,
38130
- "adyen-kyc-embedded-status__avatar": "adyen-kyc-embedded-status__avatar",
38131
- adyenKycEmbeddedStatusAvatar,
38132
- "adyen-kyc-embedded-status--light": "adyen-kyc-embedded-status--light",
38133
- adyenKycEmbeddedStatusLight,
38134
- "adyen-kyc-embedded-status__icon": "adyen-kyc-embedded-status__icon",
38135
- adyenKycEmbeddedStatusIcon,
38136
- "adyen-kyc-embedded-status__info": "adyen-kyc-embedded-status__info",
38137
- adyenKycEmbeddedStatusInfo
38676
+ "embedded-status": "adyen-kyc-embedded-status",
38677
+ embeddedStatus,
38678
+ "embedded-status-loading": "adyen-kyc-embedded-status-loading",
38679
+ embeddedStatusLoading,
38680
+ "embedded-status-avatar": "adyen-kyc-embedded-status-avatar",
38681
+ embeddedStatusAvatar,
38682
+ "embedded-status-light": "adyen-kyc-embedded-status-light",
38683
+ embeddedStatusLight,
38684
+ "embedded-status-icon": "adyen-kyc-embedded-status-icon",
38685
+ embeddedStatusIcon,
38686
+ "embedded-status-info": "adyen-kyc-embedded-status-info",
38687
+ embeddedStatusInfo
38138
38688
  };
38139
38689
  var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
38140
38690
  OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
@@ -38210,24 +38760,24 @@ const EmbeddedStatus = ({
38210
38760
  };
38211
38761
  return jsxs("button", {
38212
38762
  type: "button",
38213
- className: cx(className, styles["adyen-kyc-embedded-status"], {
38214
- [styles["adyen-kyc-embedded-status--loading"]]: loading,
38215
- [styles["adyen-kyc-embedded-status--light"]]: light
38763
+ className: cx(className, styles.embeddedStatus, {
38764
+ [styles.embeddedStatusLoading]: loading,
38765
+ [styles.embeddedStatusLight]: light
38216
38766
  }),
38217
38767
  onClick,
38218
38768
  ...props,
38219
38769
  children: [jsx("section", {
38220
- className: styles["adyen-kyc-embedded-status__avatar"],
38770
+ className: styles.embeddedStatusAvatar,
38221
38771
  children: loading ? jsx(Skeleton, {
38222
38772
  height: "100%",
38223
38773
  width: "100%",
38224
38774
  circle: true
38225
38775
  }) : jsx(Icon, {
38226
- className: styles["adyen-kyc-embedded-status__icon"],
38776
+ className: styles.embeddedStatusIcon,
38227
38777
  name: iconName
38228
38778
  })
38229
38779
  }), jsx("section", {
38230
- className: styles["adyen-kyc-embedded-status__info"],
38780
+ className: styles.embeddedStatusInfo,
38231
38781
  children: loading ? jsxs(Fragment, {
38232
38782
  children: [jsx(Skeleton, {
38233
38783
  text: true,
@@ -38249,7 +38799,7 @@ const EmbeddedStatus = ({
38249
38799
  })]
38250
38800
  })
38251
38801
  }), actionButton ? jsx("section", {
38252
- className: styles["adyen-kyc-embedded-status__button"],
38802
+ className: styles.embeddedStatusButton,
38253
38803
  children: loading ? jsx(Skeleton, {
38254
38804
  width: "5em",
38255
38805
  height: "2em"
@@ -38263,7 +38813,7 @@ const EmbeddedStatus = ({
38263
38813
  small: true
38264
38814
  })
38265
38815
  }) : (statusTag == null ? void 0 : statusTag.translationKey) && jsx("section", {
38266
- className: styles["adyen-kyc-embedded-status__tag"],
38816
+ className: styles.embeddedStatusTag,
38267
38817
  children: loading ? jsx(Skeleton, {
38268
38818
  width: "8ch",
38269
38819
  height: "1em"
@@ -38472,7 +39022,8 @@ function ManageTransferInstrumentOverviewItemModal({
38472
39022
  transferInstrument,
38473
39023
  onEdit,
38474
39024
  onClose,
38475
- onRemove
39025
+ onRemove,
39026
+ onInitiateRemove
38476
39027
  }) {
38477
39028
  var _a, _b, _c;
38478
39029
  const {
@@ -38543,6 +39094,14 @@ function ManageTransferInstrumentOverviewItemModal({
38543
39094
  await onRemove(transferInstrument.id);
38544
39095
  onClose();
38545
39096
  };
39097
+ const handleDeleteClick = async () => {
39098
+ if (onInitiateRemove) {
39099
+ const confirmDeletion = onInitiateRemove();
39100
+ if (confirmDeletion) await handleRemove();
39101
+ } else {
39102
+ setConfirmOpen(true);
39103
+ }
39104
+ };
38546
39105
  const modalFooter = () => {
38547
39106
  if (!transferInstrument) return;
38548
39107
  const actions = jsxs(Fragment, {
@@ -38551,7 +39110,7 @@ function ManageTransferInstrumentOverviewItemModal({
38551
39110
  icon: "bin",
38552
39111
  secondary: true,
38553
39112
  disabled: isReviewInProgress,
38554
- onClick: () => setConfirmOpen(true)
39113
+ onClick: handleDeleteClick
38555
39114
  }), showEditButton && jsx(Button, {
38556
39115
  label: i18n.get("edit"),
38557
39116
  onClick: () => onEdit(transferInstrument.id),
@@ -38598,7 +39157,8 @@ function ManageTransferInstrumentOverviewItem({
38598
39157
  transferInstrument,
38599
39158
  onEdit,
38600
39159
  onOpen,
38601
- onRemove
39160
+ onRemove,
39161
+ onInitiateRemove
38602
39162
  }) {
38603
39163
  const {
38604
39164
  i18n
@@ -38628,6 +39188,7 @@ function ManageTransferInstrumentOverviewItem({
38628
39188
  transferInstrument,
38629
39189
  onEdit,
38630
39190
  onRemove,
39191
+ onInitiateRemove,
38631
39192
  onClose: () => setModalOpen(false),
38632
39193
  status: transferInstrumentReference.status
38633
39194
  })]
@@ -38636,10 +39197,11 @@ function ManageTransferInstrumentOverviewItem({
38636
39197
  const logger$d = createLogger("ManageTransferInstrumentOverview");
38637
39198
  function ManageTransferInstrumentOverview({
38638
39199
  transferInstrumentReferences,
39200
+ legalEntityId,
38639
39201
  onEdit,
38640
39202
  onAdd,
38641
39203
  onRemove,
38642
- legalEntityId
39204
+ onInitiateRemove
38643
39205
  }) {
38644
39206
  const {
38645
39207
  i18n
@@ -38681,6 +39243,7 @@ function ManageTransferInstrumentOverview({
38681
39243
  transferInstrumentReference: transferInstrumentRef,
38682
39244
  onEdit,
38683
39245
  onRemove: onRemoveTransferInstrument,
39246
+ onInitiateRemove,
38684
39247
  onOpen: onShowBankDetails
38685
39248
  }, transferInstrumentRef.transferInstrument.id));
38686
39249
  return jsxs("section", {
@@ -38699,6 +39262,7 @@ function ManageTransferInstrumentComponent({
38699
39262
  legalEntityId,
38700
39263
  onAdd,
38701
39264
  onEdit,
39265
+ onInitiateRemove,
38702
39266
  onRemoveSuccess,
38703
39267
  eventEmitter
38704
39268
  }) {
@@ -38759,6 +39323,7 @@ function ManageTransferInstrumentComponent({
38759
39323
  transferInstrumentReferences: transferInstruments,
38760
39324
  onEdit: (transferInstrumentId) => onEdit(transferInstrumentId, legalEntityId),
38761
39325
  onRemove,
39326
+ onInitiateRemove,
38762
39327
  onAdd,
38763
39328
  legalEntityId
38764
39329
  })]
@@ -41232,7 +41797,7 @@ const ConfigurationApiProvider = ({
41232
41797
  isEmbeddedDropin,
41233
41798
  loadingContext
41234
41799
  } = authContext;
41235
- const sdkVersion = "3.29.0";
41800
+ const sdkVersion = "3.30.0";
41236
41801
  useAnalytics({
41237
41802
  onUserEvent,
41238
41803
  legalEntityId: rootLegalEntityId,
@@ -41424,7 +41989,8 @@ const settingsDefaults = {
41424
41989
  hideOnboardingIntroductionSoleProprietor: true,
41425
41990
  viewOnboardingGuidance: false,
41426
41991
  transferInstrumentLimit: 0,
41427
- instantBankVerification: true
41992
+ instantBankVerification: true,
41993
+ showServiceAgreementsFirst: false
41428
41994
  };
41429
41995
  function SettingsProvider({
41430
41996
  children,
@@ -41799,6 +42365,7 @@ class BaseElement {
41799
42365
  ...props
41800
42366
  };
41801
42367
  this._parentInstance = this.props._parentInstance;
42368
+ this.remove = this.remove.bind(this);
41802
42369
  }
41803
42370
  /**
41804
42371
  * Mounts an element into the dom
@@ -41858,6 +42425,7 @@ class BaseElement {
41858
42425
  if (this._node) {
41859
42426
  render(null, this._node);
41860
42427
  }
42428
+ this._node = void 0;
41861
42429
  return this;
41862
42430
  }
41863
42431
  /**
@@ -41914,7 +42482,7 @@ const DebugModal = ({
41914
42482
  };
41915
42483
  const copyToClipboard = async () => {
41916
42484
  const toCopy = {
41917
- sdkVersion: "3.29.0",
42485
+ sdkVersion: "3.30.0",
41918
42486
  experiments: Object.fromEntries(allExperimentsWithValues),
41919
42487
  settings: Object.fromEntries(allSettingsWithValues)
41920
42488
  };
@@ -41953,7 +42521,7 @@ const DebugModal = ({
41953
42521
  children: [jsxs("div", {
41954
42522
  className: "adyen-kyc-debug-modal__meta",
41955
42523
  children: [jsxs("span", {
41956
- children: ["SDK version: ", "3.29.0"]
42524
+ children: ["SDK version: ", "3.30.0"]
41957
42525
  }), jsxs("span", {
41958
42526
  children: ["rootLegalEntityId: ", rootLegalEntityId]
41959
42527
  })]
@@ -42101,14 +42669,14 @@ class UIElement extends BaseElement {
42101
42669
  rootLegalEntityId,
42102
42670
  handleGetLegalEntity: "handleGetLegalEntity" in this.props.componentProps ? this.props.componentProps.handleGetLegalEntity : void 0,
42103
42671
  children: jsx("div", {
42104
- className: "adyen-kyc-ui-element-container-wrapper",
42105
42672
  children: jsx(AutoResizer, {
42106
42673
  children: jsx("div", {
42107
42674
  className: "adyen-kyc-ui-element-container",
42108
42675
  children: jsx(ToastContextProvider, {
42109
42676
  children: jsx(StateProvider, {
42110
42677
  children: jsx(Component, {
42111
- ...this.props.componentProps
42678
+ ...this.props.componentProps,
42679
+ onUnmount: this.remove
42112
42680
  })
42113
42681
  })
42114
42682
  })
@@ -42837,6 +43405,9 @@ const manageTransferInstrumentComponentSchema = {
42837
43405
  onRemoveSuccess: {
42838
43406
  type: "function"
42839
43407
  },
43408
+ onInitiateRemove: {
43409
+ type: "function"
43410
+ },
42840
43411
  legalEntityId: {
42841
43412
  type: "string",
42842
43413
  required: true