@adyen/kyc-components 4.24.0-beta.1 → 4.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  try {
2
2
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b8b99acc-8a92-4c34-aaa5-a844e591b6d8", e._sentryDebugIdIdentifier = "sentry-dbid-b8b99acc-8a92-4c34-aaa5-a844e591b6d8");
3
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f1162762-85be-48e8-b132-0d90fe4aeacd", e._sentryDebugIdIdentifier = "sentry-dbid-f1162762-85be-48e8-b132-0d90fe4aeacd");
4
4
  } catch (e) {}
5
5
  import { r as useTranslation } from "./translation-DbATp_35.js";
6
6
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
@@ -351,7 +351,7 @@ var DebugModal = ({ onExit }) => {
351
351
  const rootLegalEntity = useGlobalStore().rootLegalEntity.value;
352
352
  const formDebugAvailable = Object.keys(formDebugInfo.value).length > 0;
353
353
  const metadata = {
354
- sdkVersion: "4.24.0-beta.1",
354
+ sdkVersion: "4.24.1",
355
355
  locale: i18n.language,
356
356
  rootLegalEntityId: rootLegalEntity.id
357
357
  };
@@ -1,6 +1,6 @@
1
1
  try {
2
2
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "77fc7582-e15c-42ad-be80-1b6a44ffe390", e._sentryDebugIdIdentifier = "sentry-dbid-77fc7582-e15c-42ad-be80-1b6a44ffe390");
3
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "53e20645-6017-4cbe-a5ac-bfeb4d2d8739", e._sentryDebugIdIdentifier = "sentry-dbid-53e20645-6017-4cbe-a5ac-bfeb4d2d8739");
4
4
  } catch (e) {}
5
5
  import { r as useTranslation, t as Trans } from "./translation-DbATp_35.js";
6
6
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
@@ -685,6 +685,14 @@ var ibanMask = (country, inputLength, allowLettersInBban) => {
685
685
  transformOnType: allowLettersInBban ? uppercase : void 0
686
686
  };
687
687
  };
688
+ var getIbanValuePrefix = (mask) => {
689
+ const prefixChars = [];
690
+ for (const token of mask?.tokens ?? []) {
691
+ if (token.type !== "nonInput" || !token.includeInValue) break;
692
+ prefixChars.push(token.char);
693
+ }
694
+ return prefixChars.join("");
695
+ };
688
696
  var ibanGuidance = (type, numDigitsOrChars, example) => type === "digits" ? {
689
697
  key: "enterTheRemainingNDigitsForExample",
690
698
  values: {
@@ -1249,6 +1257,86 @@ var PreferredCurrency = (props) => {
1249
1257
  });
1250
1258
  };
1251
1259
  //#endregion
1260
+ //#region src/components/BankAccount/utils/clearCountrySpecificAccountFields.ts
1261
+ /**
1262
+ * Account identifiers whose format and validation are dictated by the bank account country, so they
1263
+ * can never remain valid for a different country.
1264
+ */
1265
+ var countrySpecificAccountFields = [
1266
+ "iban",
1267
+ "bankAccountNumber",
1268
+ "bankCode",
1269
+ "branchCode",
1270
+ "swiftCode"
1271
+ ];
1272
+ /**
1273
+ * Clears the entered account identifiers so a new bank account country starts from an empty form.
1274
+ */
1275
+ var clearCountrySpecificAccountFields = (form) => {
1276
+ const { handleChange } = getFormSlice(form, "payoutAccountDetails");
1277
+ countrySpecificAccountFields.forEach((field) => {
1278
+ handleChange(field, "input")(void 0);
1279
+ });
1280
+ };
1281
+ //#endregion
1282
+ //#region src/components/BankAccount/utils/payoutAccountUtil.ts
1283
+ var countriesWithMultiplePayoutCurrencies = /* @__PURE__ */ new Set([
1284
+ CountryCodes.Bulgaria,
1285
+ CountryCodes.Canada,
1286
+ CountryCodes.Croatia,
1287
+ CountryCodes.CzechRepublic,
1288
+ CountryCodes.Hungary,
1289
+ CountryCodes.Romania,
1290
+ CountryCodes.Switzerland
1291
+ ]);
1292
+ var countriesWithLocalFormat = /* @__PURE__ */ new Set([
1293
+ CountryCodes.CzechRepublic,
1294
+ CountryCodes.Denmark,
1295
+ CountryCodes.Hungary,
1296
+ CountryCodes.Norway,
1297
+ CountryCodes.Poland,
1298
+ CountryCodes.Sweden,
1299
+ CountryCodes.UnitedKingdom
1300
+ ]);
1301
+ var payoutCurrencySupport = {
1302
+ [CountryCodes.Sweden]: {
1303
+ local: [Currencies.SEK],
1304
+ iban: [Currencies.EUR, Currencies.SEK]
1305
+ },
1306
+ [CountryCodes.Canada]: {
1307
+ local: [Currencies.CAD, Currencies.USD],
1308
+ iban: [Currencies.CAD, Currencies.USD]
1309
+ }
1310
+ };
1311
+ var shouldShowCheckGuidance = (country) => country === "US";
1312
+ var shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
1313
+ var shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultiplePayoutCurrencies.has(country);
1314
+ var getSupportedCurrencyGuidance = (t, country, requiredFields) => {
1315
+ const format = requiredFields.includes("iban") ? "iban" : "local";
1316
+ if (!shouldShowPayoutAlert(country)) return;
1317
+ const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
1318
+ if (!supportedCurrencies) return;
1319
+ return supportedCurrencies.length > 1 ? t(($) => $["payoutIn_Or_"], {
1320
+ currencyOne: supportedCurrencies[0],
1321
+ currencyTwo: supportedCurrencies[1]
1322
+ }) : t(($) => $["payoutInOnly_"], { currency: supportedCurrencies[0] });
1323
+ };
1324
+ var getSupportedCurrenciesPerFormat = (country, format) => {
1325
+ const supportedCurrencies = payoutCurrencySupport[country];
1326
+ if (!supportedCurrencies) {
1327
+ const defaultCurrency = currencyByCountry[country]?.[0];
1328
+ if (!defaultCurrency) return;
1329
+ if (format === "iban" && defaultCurrency !== Currencies.EUR) return [Currencies.EUR, defaultCurrency];
1330
+ else return [defaultCurrency];
1331
+ }
1332
+ return supportedCurrencies[format];
1333
+ };
1334
+ var isLocalCurrency = (country, currency) => {
1335
+ if (!country || !currency) return false;
1336
+ return currencyByCountry[country]?.includes(currency) ?? false;
1337
+ };
1338
+ var getCountryCodeFromEvent = (event) => event?.target?.value;
1339
+ //#endregion
1252
1340
  //#region src/components/BankAccount/forms/PayoutVerificationMethod/AccountHolderDescriptionFragment.tsx
1253
1341
  var AccountHolderDescriptionFragment = ({ legalEntityResponse }) => {
1254
1342
  const { t } = useTranslation("banking");
@@ -1442,7 +1530,6 @@ function PayoutRequirementsModal({ isOpen, onClose, provider }) {
1442
1530
  var payoutCountryDetailsFields = ["bankCountry", "preferredCurrency"];
1443
1531
  var DEFAULT_CURRENCY_FALLBACK = "USD";
1444
1532
  var getDefaultCurrencyForCountry = (country) => currencyByCountry[country]?.[0] ?? DEFAULT_CURRENCY_FALLBACK;
1445
- var getCountryCodeFromEvent = (event) => event?.target?.value;
1446
1533
  function PayoutCountryDetails(props) {
1447
1534
  const { legalEntityResponse, provider, fieldValidationErrors: fieldProblems } = props;
1448
1535
  const { t: commonT } = useTranslation("common");
@@ -1499,8 +1586,10 @@ function PayoutCountryDetails(props) {
1499
1586
  });
1500
1587
  const updateCountryField = (event) => {
1501
1588
  const updatedCountry = getCountryCodeFromEvent(event);
1589
+ if (updatedCountry === data?.bankCountry) return;
1502
1590
  handleChange("bankCountry", "input")(updatedCountry);
1503
1591
  handleChange("preferredCurrency", "input")(getDefaultCurrencyForCountry(updatedCountry));
1592
+ clearCountrySpecificAccountFields(form);
1504
1593
  };
1505
1594
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("form", {
1506
1595
  style: { minHeight: "480px" },
@@ -2134,6 +2223,15 @@ function Iban(props) {
2134
2223
  ...props,
2135
2224
  obscuredFields
2136
2225
  }), t);
2226
+ const valuePrefix = getIbanValuePrefix(metadata.mask?.mask);
2227
+ /**
2228
+ * The masked input reports the country prefix even when nothing has been filled in. Storing it
2229
+ * would leave the previous country's prefix behind once the bank account country changes, and
2230
+ * that value no longer matches the new country's mask, which locks the field.
2231
+ */
2232
+ const handleIbanChange = (mode) => (value) => {
2233
+ handleChange("iban", mode)(value === valuePrefix ? "" : value);
2234
+ };
2137
2235
  return /* @__PURE__ */ jsx(MaskedInput, {
2138
2236
  name: "iban",
2139
2237
  type: "text",
@@ -2144,8 +2242,8 @@ function Iban(props) {
2144
2242
  isValid: valid?.iban ?? true,
2145
2243
  value: data?.iban ?? "",
2146
2244
  readonly: formUtils.isReadOnly("iban"),
2147
- onInput: handleChange("iban", "input"),
2148
- onBlur: handleChange("iban", "blur"),
2245
+ onInput: handleIbanChange("input"),
2246
+ onBlur: (event) => handleIbanChange("blur")(event.currentTarget.value),
2149
2247
  "aria-required": true,
2150
2248
  "aria-invalid": valid?.iban === false,
2151
2249
  acceptObscuredValue: formUtils.isObscured("iban")
@@ -2180,63 +2278,6 @@ function SwiftCode(props) {
2180
2278
  "aria-invalid": valid?.swiftCode === false
2181
2279
  });
2182
2280
  }
2183
- //#endregion
2184
- //#region src/components/BankAccount/utils/payoutAccountUtil.ts
2185
- var countriesWithMultiplePayoutCurrencies = /* @__PURE__ */ new Set([
2186
- CountryCodes.Bulgaria,
2187
- CountryCodes.Canada,
2188
- CountryCodes.Croatia,
2189
- CountryCodes.CzechRepublic,
2190
- CountryCodes.Hungary,
2191
- CountryCodes.Romania,
2192
- CountryCodes.Switzerland
2193
- ]);
2194
- var countriesWithLocalFormat = /* @__PURE__ */ new Set([
2195
- CountryCodes.CzechRepublic,
2196
- CountryCodes.Denmark,
2197
- CountryCodes.Hungary,
2198
- CountryCodes.Norway,
2199
- CountryCodes.Poland,
2200
- CountryCodes.Sweden,
2201
- CountryCodes.UnitedKingdom
2202
- ]);
2203
- var payoutCurrencySupport = {
2204
- [CountryCodes.Sweden]: {
2205
- local: [Currencies.SEK],
2206
- iban: [Currencies.EUR, Currencies.SEK]
2207
- },
2208
- [CountryCodes.Canada]: {
2209
- local: [Currencies.CAD, Currencies.USD],
2210
- iban: [Currencies.CAD, Currencies.USD]
2211
- }
2212
- };
2213
- var shouldShowCheckGuidance = (country) => country === "US";
2214
- var shouldShowPayoutAccountFormatSelector = (country) => countriesWithLocalFormat.has(country);
2215
- var shouldShowPayoutAlert = (country) => shouldShowPayoutAccountFormatSelector(country) || countriesWithMultiplePayoutCurrencies.has(country);
2216
- var getSupportedCurrencyGuidance = (t, country, requiredFields) => {
2217
- const format = requiredFields.includes("iban") ? "iban" : "local";
2218
- if (!shouldShowPayoutAlert(country)) return;
2219
- const supportedCurrencies = getSupportedCurrenciesPerFormat(country, format);
2220
- if (!supportedCurrencies) return;
2221
- return supportedCurrencies.length > 1 ? t(($) => $["payoutIn_Or_"], {
2222
- currencyOne: supportedCurrencies[0],
2223
- currencyTwo: supportedCurrencies[1]
2224
- }) : t(($) => $["payoutInOnly_"], { currency: supportedCurrencies[0] });
2225
- };
2226
- var getSupportedCurrenciesPerFormat = (country, format) => {
2227
- const supportedCurrencies = payoutCurrencySupport[country];
2228
- if (!supportedCurrencies) {
2229
- const defaultCurrency = currencyByCountry[country]?.[0];
2230
- if (!defaultCurrency) return;
2231
- if (format === "iban" && defaultCurrency !== Currencies.EUR) return [Currencies.EUR, defaultCurrency];
2232
- else return [defaultCurrency];
2233
- }
2234
- return supportedCurrencies[format];
2235
- };
2236
- var isLocalCurrency = (country, currency) => {
2237
- if (!country || !currency) return false;
2238
- return currencyByCountry[country]?.includes(currency) ?? false;
2239
- };
2240
2281
  var CheckGuidance_module_default = {
2241
2282
  "check-guidance": "_check-guidance_1tmla_1",
2242
2283
  checkGuidance: "_check-guidance_1tmla_1",
@@ -2641,6 +2682,12 @@ function PayoutVerificationMethod(props) {
2641
2682
  const { dataset: countries } = useDataset(datasetIdentifier.country);
2642
2683
  const bankCountryName = countries.find((country) => country.id === data?.bankCountry)?.name ?? data?.bankCountry;
2643
2684
  const allowedBankCountries = getAllowedBankCountries(country);
2685
+ const updateBankCountry = (event) => {
2686
+ const updatedCountry = getCountryCodeFromEvent(event);
2687
+ if (updatedCountry === data?.bankCountry) return;
2688
+ handleChange("bankCountry", "input")(updatedCountry);
2689
+ clearCountrySpecificAccountFields(form);
2690
+ };
2644
2691
  const countryField = /* @__PURE__ */ jsx(CountryField, {
2645
2692
  data: { country: data?.bankCountry },
2646
2693
  valid: { country: valid?.bankCountry ?? true },
@@ -2648,7 +2695,7 @@ function PayoutVerificationMethod(props) {
2648
2695
  labels: { country: t(($) => $["bankAccountCountryRegion"]) },
2649
2696
  readonly: !intraRegionCrossBorderPayoutsAllowed || allowedBankCountries.length === 1 || bankInfoValidated,
2650
2697
  allowedCountries: allowedBankCountries,
2651
- handleChangeFor: () => handleChange("bankCountry", "input"),
2698
+ handleChangeFor: () => updateBankCountry,
2652
2699
  helperText: intraRegionCrossBorderPayoutsAllowed ? void 0 : t(($) => $[legalEntityType === "individual" ? "youCanOnlyUseABankAccountInTheCountryRegionWhereYouLive" : "youCanOnlyUseABankAccountInTheCountryRegionWhereYourCompanyIsRegistered"])
2653
2700
  });
2654
2701
  const description = canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
@@ -7,8 +7,8 @@ import { t as Loader } from "./Loader-BVtlpTeo.js";
7
7
  import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-QQXN6YOm.js";
8
8
  import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
9
9
  import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-BY_voJ99.js";
10
- import { t as useNavigate } from "./useNavigate-DkfNV3JZ.js";
11
- import { t as PayoutDetailsDropin } from "./PayoutDetailsDropin-BH1Sj6GM.js";
10
+ import { t as useNavigate } from "./useNavigate-n4tia10x.js";
11
+ import { t as PayoutDetailsDropin } from "./PayoutDetailsDropin-CPK9u_TO.js";
12
12
  import { jsx } from "preact/jsx-runtime";
13
13
  import { useParams } from "wouter-preact";
14
14
  //#region src/components/BankAccount/pages/PayoutDetailsPage.tsx
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a337cb1d-6680-4096-bfdf-6b4333b15c24", e._sentryDebugIdIdentifier = "sentry-dbid-a337cb1d-6680-4096-bfdf-6b4333b15c24");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as Loader } from "./Loader-BVtlpTeo.js";
8
8
  import { r as useLegalEntity } from "./useLegalEntity-QQXN6YOm.js";
9
9
  import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BK-HHa65.js";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ec55c480-2d3a-4787-9e6f-cf2754319cf7", e._sentryDebugIdIdentifier = "sentry-dbid-ec55c480-2d3a-4787-9e6f-cf2754319cf7");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as Loader } from "./Loader-BVtlpTeo.js";
8
8
  import { r as useLegalEntity } from "./useLegalEntity-QQXN6YOm.js";
9
9
  import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BK-HHa65.js";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2cf7a924-bdaa-4f8f-9edb-33b68170107c", e._sentryDebugIdIdentifier = "sentry-dbid-2cf7a924-bdaa-4f8f-9edb-33b68170107c");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { s as useApiContext } from "./http-DsJtugN1.js";
8
8
  import { r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-QQXN6YOm.js";
9
9
  import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
@@ -2,7 +2,7 @@ try {
2
2
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "43057ca7-c279-4cfc-b3db-4d872f35cdfa", e._sentryDebugIdIdentifier = "sentry-dbid-43057ca7-c279-4cfc-b3db-4d872f35cdfa");
4
4
  } catch (e) {}
5
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
5
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
6
6
  import { t as InvitedDecisionMakerComponent } from "./InvitedDecisionMakerComponent-DZZe5Ruk.js";
7
7
  import register from "preact-custom-element";
8
8
  import { jsx } from "preact/jsx-runtime";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "412af7ba-76a5-4e3c-9661-4ff98bc22bee", e._sentryDebugIdIdentifier = "sentry-dbid-412af7ba-76a5-4e3c-9661-4ff98bc22bee");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, r as useToggles, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, r as useToggles, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
8
8
  import { t as Icon } from "./Icon-4XR6gZzk.js";
9
9
  import { t as Typography } from "./Typography-CAc_f5Iq.js";
@@ -58,7 +58,7 @@ import { r as translateTranslatable } from "./utils-CYUYe54m.js";
58
58
  import { t as UnincorporatedPartnershipMemberTypes } from "./unincorporated-partnership-DNTK5Y_5.js";
59
59
  import { t as isNewEntity } from "./isNewEntity-vML86iIM.js";
60
60
  import { a as idNowPostSubmit, n as isBafinSignatoryFlow, s as showIdNowModal } from "./bafinUtils-DDrD6bfK.js";
61
- import { A as UnincorporatedPartnershipMemberRoleAndTypePage, C as TrustDetailsPage, D as TrustMembersOverview, E as TrustMemberRoleAndTypePage, M as getDefaultTask, O as UnincorporatedPartnershipIndividualPage, S as TaxReportingDropin, T as TrustMemberIndividualPage, _ as RootIndividualDetailsPage, a as BusinessTypeSelectionPage, b as SoleProprietorshipPage, c as DecisionMakers, d as LegalRepresentativeDetailsPage, f as PayoutDetailsPage, g as RootBusinessLinesPage, h as RootBusinessDetailsPage, i as BusinessFinancingPage, j as UnincorporatedPartnershipMembersOverview, k as UnincorporatedPartnershipMemberCompanyPage, l as GlobalEntryPage, m as Review, n as AcceptTermsOfService, o as CustomerSupport, p as ROUTE_PATHS, r as AccountSetupRejected, s as DecisionMakerDetailsPage, t as useNavigate, u as Introduction, v as SignPCIComponent, w as TrustMemberCompanyPage, x as SourceOfFundsPage, y as SingpassSelection } from "./useNavigate-DkfNV3JZ.js";
61
+ import { A as UnincorporatedPartnershipMemberRoleAndTypePage, C as TrustDetailsPage, D as TrustMembersOverview, E as TrustMemberRoleAndTypePage, M as getDefaultTask, O as UnincorporatedPartnershipIndividualPage, S as TaxReportingDropin, T as TrustMemberIndividualPage, _ as RootIndividualDetailsPage, a as BusinessTypeSelectionPage, b as SoleProprietorshipPage, c as DecisionMakers, d as LegalRepresentativeDetailsPage, f as PayoutDetailsPage, g as RootBusinessLinesPage, h as RootBusinessDetailsPage, i as BusinessFinancingPage, j as UnincorporatedPartnershipMembersOverview, k as UnincorporatedPartnershipMemberCompanyPage, l as GlobalEntryPage, m as Review, n as AcceptTermsOfService, o as CustomerSupport, p as ROUTE_PATHS, r as AccountSetupRejected, s as DecisionMakerDetailsPage, t as useNavigate, u as Introduction, v as SignPCIComponent, w as TrustMemberCompanyPage, x as SourceOfFundsPage, y as SingpassSelection } from "./useNavigate-n4tia10x.js";
62
62
  import { t as useTrustMembers } from "./useTrustMembers-DtOJPaaV.js";
63
63
  import register from "preact-custom-element";
64
64
  import { Suspense, lazy } from "preact/compat";
@@ -2,7 +2,7 @@ try {
2
2
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "dca19d0d-a925-4b9a-9c72-bb442ea54f82", e._sentryDebugIdIdentifier = "sentry-dbid-dca19d0d-a925-4b9a-9c72-bb442ea54f82");
4
4
  } catch (e) {}
5
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
5
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
6
6
  import { t as emitAdyenSdkEvent } from "./emitEvent-CcGIaOut.js";
7
7
  import { t as TermsOfServiceManagement } from "./TermsOfServiceManagement-BGrBal0j.js";
8
8
  import register from "preact-custom-element";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "bccfc920-da4b-4f39-8fe2-40930198119a", e._sentryDebugIdIdentifier = "sentry-dbid-bccfc920-da4b-4f39-8fe2-40930198119a");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { s as useApiContext } from "./http-DsJtugN1.js";
8
8
  import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
9
9
  import { n as useTermsOfServiceAcceptanceInfos, t as useTermsOfServiceStatus } from "./useTermsOfServiceStatus-DbJDklA2.js";
@@ -3,13 +3,13 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1c933fe6-2b63-4c04-a475-bb6168d3d5e4", e._sentryDebugIdIdentifier = "sentry-dbid-1c933fe6-2b63-4c04-a475-bb6168d3d5e4");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as Loader } from "./Loader-BVtlpTeo.js";
8
8
  import { r as useLegalEntity } from "./useLegalEntity-QQXN6YOm.js";
9
9
  import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
10
10
  import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
11
11
  import { t as emitAdyenSdkEvent } from "./emitEvent-CcGIaOut.js";
12
- import { t as PayoutDetailsDropin } from "./PayoutDetailsDropin-BH1Sj6GM.js";
12
+ import { t as PayoutDetailsDropin } from "./PayoutDetailsDropin-CPK9u_TO.js";
13
13
  import register from "preact-custom-element";
14
14
  import { useRef, useState } from "preact/hooks";
15
15
  import { jsx } from "preact/jsx-runtime";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e0c659d7-7d8d-41d2-9d13-2d640f85f5d6", e._sentryDebugIdIdentifier = "sentry-dbid-e0c659d7-7d8d-41d2-9d13-2d640f85f5d6");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
8
8
  import { t as Typography } from "./Typography-CAc_f5Iq.js";
9
9
  import { t as Loader } from "./Loader-BVtlpTeo.js";
@@ -3,7 +3,7 @@ try {
3
3
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d9773611-96d0-4332-80a6-d45854a254cc", e._sentryDebugIdIdentifier = "sentry-dbid-d9773611-96d0-4332-80a6-d45854a254cc");
4
4
  } catch (e) {}
5
5
  import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
- import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-mrb68kgW.js";
6
+ import { i as stylesheets, n as EmbedShell, t as resolveEnvironment } from "./resolveEnvironment-CAymXEQ9.js";
7
7
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
8
8
  import { t as Loader } from "./Loader-BVtlpTeo.js";
9
9
  import { t as Button } from "./Button-DPJ1k02w.js";
@@ -1,6 +1,6 @@
1
1
  try {
2
2
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6006ce53-3fd3-4e0d-810a-b0aec14defe0", e._sentryDebugIdIdentifier = "sentry-dbid-6006ce53-3fd3-4e0d-810a-b0aec14defe0");
3
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "633d4f70-c80e-4d5e-a05e-8b7d7913d94f", e._sentryDebugIdIdentifier = "sentry-dbid-633d4f70-c80e-4d5e-a05e-8b7d7913d94f");
4
4
  } catch (e) {}
5
5
  import { a as setDefaults, i as setI18n, n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
6
  import { t as createLogger } from "./logger-Z8AeTE4x.js";
@@ -312,7 +312,7 @@ var getAnalyticsAssociatedEntityDetails = (rootLegalEntity, accountHolderType) =
312
312
  //#endregion
313
313
  //#region src/hooks/useAnalytics/useAnalytics.ts
314
314
  var useAnalytics = ({ userEvents, sessionId, sessionData }) => {
315
- const sdkVersion = "4.24.0-beta.1";
315
+ const sdkVersion = "4.24.1";
316
316
  const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
317
317
  const { mutateAsync } = usePushAnalyticEvent(sessionId ?? "");
318
318
  const { accountHolder } = useAccountHolder();
@@ -408,7 +408,7 @@ var AnalyticsProvider = ({ componentName, children, rootLegalEntityId, locale })
408
408
  const capabilities = rootLegalEntity?.capabilities && Object.keys(rootLegalEntity.capabilities);
409
409
  const shouldTrackPrefilledDetails = capabilities?.includes("receivePayments") && onboardingVersion && onboardingVersion > 1;
410
410
  const sessionData = {
411
- sdkVersion: "4.24.0-beta.1",
411
+ sdkVersion: "4.24.1",
412
412
  componentName,
413
413
  userAgent: navigator.userAgent,
414
414
  legalEntityId: rootLegalEntityId,
@@ -865,7 +865,7 @@ var AllowedCountryGate = ({ children }) => {
865
865
  };
866
866
  //#endregion
867
867
  //#region src/components/Shared/devex/DebugListener/DebugListener.tsx
868
- var DebugModal = lazy(async () => (await import("./DebugModal-CDfvQRk6.js")).DebugModal);
868
+ var DebugModal = lazy(async () => (await import("./DebugModal-QeIdCXu5.js")).DebugModal);
869
869
  /**
870
870
  * Adds a listener on the page to open the debug modal when the
871
871
  * debug modal key combination is pressed to open it
@@ -966,7 +966,7 @@ var EmbedShell = ({ children, rootLegalEntityId, settings, features, refreshExpe
966
966
  children: [/* @__PURE__ */ jsx(LanguageSwitcher, { locale }), /* @__PURE__ */ jsxs(StoreProvider, { children: [/* @__PURE__ */ jsx("span", {
967
967
  id: "sdk-version",
968
968
  hidden: true,
969
- children: "4.24.0-beta.1"
969
+ children: "4.24.1"
970
970
  }), /* @__PURE__ */ jsx(AnalyticsProvider, {
971
971
  componentName,
972
972
  locale,
@@ -1,4 +1,6 @@
1
1
  import type { FieldMetadata, NoParams, PerCountryFieldConfig } from '../../../../utils/fieldConfigurations';
2
+ import type { Mask } from '../../../../utils/masking/maskTypes';
2
3
  import type { IbanSchema } from './types';
4
+ export declare const getIbanValuePrefix: (mask: Mask | undefined) => string;
3
5
  export declare const defaultFieldMetadata: FieldMetadata<IbanSchema, 'iban'>;
4
6
  export declare const defaultFieldConfig: PerCountryFieldConfig<IbanSchema, 'iban', NoParams>;
@@ -0,0 +1,6 @@
1
+ import type { Form } from '../../../hooks/useMultiForm/types';
2
+ import type { PayoutDetailsSchema } from '../forms/PayoutDetails/types';
3
+ /**
4
+ * Clears the entered account identifiers so a new bank account country starts from an empty form.
5
+ */
6
+ export declare const clearCountrySpecificAccountFields: (form: Form<PayoutDetailsSchema>) => void;
@@ -1,3 +1,4 @@
1
+ import type { SingleSelectOnChangeProps } from '../../ui/atoms/Select/Select.types';
1
2
  import type { TFunction } from '../../../../types';
2
3
  import type { CountryCode } from '../../../types/datasets/country-code';
3
4
  import type { Currency } from '../../../types/datasets/currency';
@@ -9,3 +10,5 @@ export declare const shouldShowPayoutAlert: (country: CountryCode) => boolean;
9
10
  export declare const getSupportedCurrencyGuidance: (t: TFunction<"banking">, country: CountryCode, requiredFields: Array<keyof PayoutAccountSchema>) => string | undefined;
10
11
  export declare const getSupportedCurrenciesPerFormat: (country: CountryCode, format: BaseBankAccountFormatType) => Currency[] | undefined;
11
12
  export declare const isLocalCurrency: (country?: CountryCode, currency?: Currency) => boolean;
13
+ export type CountryChangeEvent = Pick<SingleSelectOnChangeProps, 'target'>;
14
+ export declare const getCountryCodeFromEvent: (event: CountryChangeEvent) => CountryCode;
@@ -38,7 +38,7 @@ var Review = lazy(async () => (await import("./Review-9sjGKoQu.js")).Review);
38
38
  var SignPCIComponent = lazy(async () => (await import("./SignPCIComponent-BNlTxxJz.js").then((n) => n.n)).SignPCIComponent);
39
39
  var AcceptTermsOfService = lazy(async () => (await import("./TermsOfServiceManagement-BGrBal0j.js").then((n) => n.n)).TermsOfServiceManagement);
40
40
  var TaxReportingDropin = lazy(async () => (await import("./TaxReportingDropin-LNgisxBc.js")).TaxReportingDropin);
41
- var PayoutDetailsPage = lazy(async () => (await import("./PayoutDetailsPage-B7mZmc51.js")).PayoutDetailsPage);
41
+ var PayoutDetailsPage = lazy(async () => (await import("./PayoutDetailsPage-LH-4BMk7.js")).PayoutDetailsPage);
42
42
  var RootBusinessDetailsPage = lazy(async () => (await import("./RootBusinessDetailsPage-DRN6p6wB.js")).RootBusinessDetailsPage);
43
43
  var RootBusinessLinesPage = lazy(async () => (await import("./RootBusinessLinesPage-uxn9f5K8.js")).RootBusinessLinesPage);
44
44
  var SoleProprietorshipPage = lazy(async () => (await import("./SoleProprietorshipPage-Dx-pfSwo.js")).SoleProprietorshipPage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "4.24.0-beta.1",
3
+ "version": "4.24.1",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-for-platforms",