@adyen/kyc-components 3.67.3 → 3.68.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 (112) hide show
  1. package/dist/AcceptTermsOfServiceComponent-yutCVhdr.js +1717 -0
  2. package/dist/{AccountSetupRejected-ChiJY18-.js → AccountSetupRejected-Bp9MbaZF.js} +3 -2
  3. package/dist/{BusinessTypeSelection-D7ZvvIMS.js → BusinessTypeSelection-Bda3HjOy.js} +16 -16
  4. package/dist/{CXEL7IU7-Bk2n0dNy.js → CXEL7IU7-DIlmKme0.js} +3 -3
  5. package/dist/CreateIndividualComponent-wIMjaodd.js +3798 -0
  6. package/dist/{CustomerSupport-CJNWyhvH.js → CustomerSupport-BBpiWDZu.js} +4 -3
  7. package/dist/{DebugModal-Bv0myReE.js → DebugModal-Chl6VeCw.js} +8 -9
  8. package/dist/{DecisionMakers-ChL8AjTJ.js → DecisionMakers-91Uxeb4Z.js} +4 -2
  9. package/dist/EmbedShell-BgnrqkKO.js +60 -0
  10. package/dist/{core-B_WrZP-J.js → EventEmitter-MB52FRnR.js} +1221 -23638
  11. package/dist/{HASRA6WW-1uv7rGnF.js → HASRA6WW-CYutWFzS.js} +2 -2
  12. package/dist/{I3HPI4QX-Cu2MHefw.js → I3HPI4QX-h-J4eisw.js} +3 -3
  13. package/dist/{Introduction-S84AjEkr.js → Introduction-Cn5uh084.js} +3 -2
  14. package/dist/{Review-B416UIqb.js → Review-BITkfvbx.js} +3 -2
  15. package/dist/{SingpassSelection-CGe7MVVA.js → SingpassSelection-BPrfSrSw.js} +3 -3
  16. package/dist/{TaxReportingDropin-CUnugFcz.js → TaxReportingDropin-DZLUs3Hb.js} +47 -16
  17. package/dist/adyen-kyc-components.js +1 -1
  18. package/dist/adyenConfig.js +3 -13
  19. package/dist/core-DnQST_lN.js +18040 -0
  20. package/dist/{css-BdtMD5A5.js → css-ChtZI8YA.js} +2 -2
  21. package/dist/individual.js +35 -19
  22. package/dist/{json-DbFHJS1e.js → json-CY-QM445.js} +2 -2
  23. package/dist/listToRecord-CogvyLiD.js +160 -0
  24. package/dist/{plaintext-DuNA8yq2.js → plaintext-BzvCXlZZ.js} +2 -2
  25. package/dist/style.css +948 -377
  26. package/dist/styles-CLV89_hH.js +6142 -0
  27. package/dist/terms-of-service-preact.js +15 -0
  28. package/dist/terms-of-service-react.js +15 -0
  29. package/dist/terms-of-service.js +55 -0
  30. package/dist/types/api/configurations/useScenarios.d.ts +180 -0
  31. package/dist/types/api/configurations/useTaskTypes.d.ts +5 -0
  32. package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +5 -2
  33. package/dist/types/api/pciTemplate/usePciStatus.d.ts +4 -2
  34. package/dist/types/api/pciTemplate/usePciTemplate.d.ts +4 -2
  35. package/dist/types/api/pciTemplate/useSignPci.d.ts +4 -1
  36. package/dist/types/api/termsOfService/useAcceptTermsOfService.d.ts +4 -1
  37. package/dist/types/api/termsOfService/useAcceptedTermsOfService.d.ts +5 -2
  38. package/dist/types/api/termsOfService/useTermsOfService.d.ts +5 -2
  39. package/dist/types/api/termsOfService/useTermsOfServiceAcceptanceInfos.d.ts +4 -1
  40. package/dist/types/api/termsOfService/useTermsOfServiceStatus.d.ts +5 -2
  41. package/dist/types/api/types.d.ts +14 -0
  42. package/dist/types/api/validation/useValidateAccountIdentification.d.ts +6 -2
  43. package/dist/types/api/validation/useValidatePhoneNumber.d.ts +14 -0
  44. package/dist/types/components/BankAccount/hooks/useAsyncAccountDetailsValidationRules.d.ts +1 -1
  45. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1 -1
  46. package/dist/types/components/Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +1 -1
  47. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +4 -4
  48. package/dist/types/components/EFP/tasks/HighExposureDropin/types.d.ts +0 -2
  49. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +2 -1
  50. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  51. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +2 -8
  52. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +4 -3
  53. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/utils.d.ts +3 -0
  54. package/dist/types/components/Individual/forms/IndividualOnfido/BasicDetails/BasicDetails.types.d.ts +0 -5
  55. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -4
  56. package/dist/types/components/Individual/tasks/IndividualDropin/IndividualDropin.d.ts +1 -1
  57. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoDropin.d.ts +1 -1
  58. package/dist/types/components/Shared/fields/IdFieldTypeSelector/countryIdNumberTypes.d.ts +10 -0
  59. package/dist/types/components/Shared/fields/PhoneField/fieldConfig.d.ts +2 -2
  60. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  61. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +2 -2
  62. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +1 -1
  63. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +0 -3
  64. package/dist/types/components/Trust/forms/Trust/types.d.ts +2 -2
  65. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +30 -0
  66. package/dist/types/components/Trust/tasks/TrustDropin/TrustDropin.d.ts +1 -1
  67. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +6 -3
  68. package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +4 -4
  69. package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +2 -2
  70. package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +4 -4
  71. package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +2 -2
  72. package/dist/types/components/ui/atoms/Checkbox/Checkbox.d.ts +3 -3
  73. package/dist/types/components/ui/atoms/Field/Field.d.ts +26 -7
  74. package/dist/types/components/ui/atoms/Field/Field.types.d.ts +4 -2
  75. package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +2 -6
  76. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -1
  77. package/dist/types/components/ui/atoms/Select/Select.types.d.ts +3 -3
  78. package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
  79. package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -2
  80. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +4 -2
  81. package/dist/types/context/ExperimentContext/types.d.ts +0 -10
  82. package/dist/types/context/SettingsContext/types.d.ts +3 -1
  83. package/dist/types/core/EmbedShell/EmbedShell.d.ts +26 -0
  84. package/dist/types/core/models/errors/validation-error.d.ts +1 -9
  85. package/dist/types/core/services/http.d.ts +3 -3
  86. package/dist/types/core/services/types.d.ts +2 -2
  87. package/dist/types/embeds/individual/individual.types.d.ts +5 -1
  88. package/dist/types/embeds/individual/preact/Individual.d.ts +3 -3
  89. package/dist/types/embeds/individual/react/Individual.d.ts +3 -3
  90. package/dist/types/embeds/individual/vue/individual.types.d.ts +3 -3
  91. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.d.ts +1 -0
  92. package/dist/types/embeds/terms-of-service/preact/TermsOfService.d.ts +10 -0
  93. package/dist/types/embeds/terms-of-service/react/TermsOfService.d.ts +20 -0
  94. package/dist/types/embeds/terms-of-service/terms-of-service.types.d.ts +8 -0
  95. package/dist/types/embeds/utils.d.ts +4 -0
  96. package/dist/types/hooks/useScenarioConfiguration.d.ts +11 -4
  97. package/dist/types/utils/api/processValidationErrors.d.ts +5 -1
  98. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  99. package/dist/utils-Do7EwrWz.js +24 -0
  100. package/dist/{yaml-CZT9wc9a.js → yaml-CFgf8XoZ.js} +2 -2
  101. package/package.json +16 -1
  102. package/dist/types/context/ConfigurationApiContext/ConfigurationApiContext.d.ts +0 -7
  103. package/dist/types/context/ConfigurationApiContext/ConfigurationApiProvider.d.ts +0 -7
  104. package/dist/types/context/ConfigurationApiContext/getEmbeddedApi.d.ts +0 -5
  105. package/dist/types/context/ConfigurationApiContext/useConfigurationApi.d.ts +0 -2
  106. package/dist/types/core/models/api/get-configuration.d.ts +0 -17
  107. package/dist/types/core/models/api/get-tasks.d.ts +0 -2
  108. package/dist/types/core/services/componentApi/get-scenarios.d.ts +0 -4
  109. package/dist/types/core/services/componentApi/get-tasks.d.ts +0 -3
  110. package/dist/types/core/services/componentApi/update-legal-entity.d.ts +0 -3
  111. package/dist/types/core/services/componentApi/validate-phone-number.d.ts +0 -3
  112. package/dist/types/hooks/useComponentApi.d.ts +0 -10
@@ -5,12 +5,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  {
6
6
  try {
7
7
  let e2 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n2 = new e2.Error().stack;
8
- n2 && (e2._sentryDebugIds = e2._sentryDebugIds || {}, e2._sentryDebugIds[n2] = "2613b1f8-1e6b-4424-84da-cf7004679cf6", e2._sentryDebugIdIdentifier = "sentry-dbid-2613b1f8-1e6b-4424-84da-cf7004679cf6");
8
+ n2 && (e2._sentryDebugIds = e2._sentryDebugIds || {}, e2._sentryDebugIds[n2] = "a43ec45d-0f33-421d-a0d3-de9eb584ac0c", e2._sentryDebugIdIdentifier = "sentry-dbid-a43ec45d-0f33-421d-a0d3-de9eb584ac0c");
9
9
  } catch (e2) {
10
10
  }
11
11
  }
12
12
  ;
13
- import { aI as createContext, aJ as createSignal, aK as onMount, aL as createEffect, aG as createMemo, aH as createComponent, aM as Portal, aN as Show, aO as template, aP as insert, aQ as createRenderEffect, aR as className, aS as clearDelegatedEvents, aT as delegateEvents, aU as useContext, aV as onCleanup, aW as sortFns, aX as mutationSortFns, aY as on, aZ as setAttribute, a_ as getSidedProp, a$ as use, b0 as createUniqueId, b1 as batch, b2 as getQueryStatusLabel, b3 as getMutationStatusColor, b4 as getQueryStatusColor, b5 as getQueryStatusColorByLabel, b6 as displayValue, b7 as For, b8 as convertRemToPixels, b9 as untrack, ba as $TRACK, bb as useTransition, bc as spread, bd as mergeProps, be as createRoot, bf as serialize, bg as Index, bh as updateNestedDataByPath, bi as addEventListener, bj as stringify, bk as Match, bl as Switch, bm as deleteNestedDataByPath, bn as splitProps, bo as Dynamic, bp as createComputed } from "./core-B_WrZP-J.js";
13
+ import { e3 as createContext, e4 as createSignal, e5 as onMount, e6 as createEffect, e1 as createMemo, e2 as createComponent, e7 as Portal, e8 as Show, e9 as template, ea as insert, eb as createRenderEffect, ec as className, ed as clearDelegatedEvents, ee as delegateEvents, ef as useContext, eg as onCleanup, eh as sortFns, ei as mutationSortFns, ej as on, ek as setAttribute, el as getSidedProp, em as use, en as createUniqueId, eo as batch, ep as getQueryStatusLabel, eq as getMutationStatusColor, er as getQueryStatusColor, es as getQueryStatusColorByLabel, et as displayValue, eu as For, ev as convertRemToPixels, ew as untrack, ex as $TRACK, ey as useTransition, ez as spread, eA as mergeProps, eB as createRoot, eC as serialize, eD as Index, eE as updateNestedDataByPath, eF as addEventListener, eG as stringify, eH as Match, eI as Switch, eJ as deleteNestedDataByPath, eK as splitProps, eL as Dynamic, eM as createComputed } from "./EventEmitter-MB52FRnR.js";
14
14
  var isNonNullable = (i2) => i2 != null;
15
15
  var filterNonNullable = (arr) => arr.filter(isNonNullable);
16
16
  function chain(callbacks) {
@@ -2,13 +2,13 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "cb4809ea-53ef-44c6-985e-0a887a6c9ab4", e._sentryDebugIdIdentifier = "sentry-dbid-cb4809ea-53ef-44c6-985e-0a887a6c9ab4");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "267751bd-63ff-44dd-a168-336bee5094f7", e._sentryDebugIdIdentifier = "sentry-dbid-267751bd-63ff-44dd-a168-336bee5094f7");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
- import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./HASRA6WW-1uv7rGnF.js";
11
- import { aF as getPreferredColorScheme, aG as createMemo, aH as createComponent } from "./core-B_WrZP-J.js";
10
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./HASRA6WW-CYutWFzS.js";
11
+ import { e0 as getPreferredColorScheme, e1 as createMemo, e2 as createComponent } from "./EventEmitter-MB52FRnR.js";
12
12
  var DevtoolsComponent = (props) => {
13
13
  const [localStore, setLocalStore] = createLocalStorage({
14
14
  prefix: "TanstackQueryDevtools"
@@ -2,15 +2,16 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "baab4e5f-5630-44d5-8895-874ce1490171", e._sentryDebugIdIdentifier = "sentry-dbid-baab4e5f-5630-44d5-8895-874ce1490171");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a3115e4d-e79a-45f1-b982-9a53f7f69cf5", e._sentryDebugIdIdentifier = "sentry-dbid-a3115e4d-e79a-45f1-b982-9a53f7f69cf5");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsxs, Fragment, jsx } from "preact/jsx-runtime";
11
11
  import { useMemo as useMemo$1, useState, useEffect } from "preact/hooks";
12
- import { i as TaskTypes, L as LegalEntityType, j as useCanSeeIntroduction, k as useLegalEntityType, t as toCapitalized, m as getTranslationKeysByPrefix, u as useI18nContext, n as useAnalyticsContext, o as StepProgressIndicator, B as Button } from "./core-B_WrZP-J.js";
12
+ import { T as TaskTypes, J as LegalEntityType, dZ as getTranslationKeysByPrefix, i as useI18nContext, j as useAnalyticsContext, dD as StepProgressIndicator, G as Button } from "./EventEmitter-MB52FRnR.js";
13
13
  import { useMemo } from "preact/compat";
14
+ import { u as useCanSeeIntroduction, a as useLegalEntityType, t as toCapitalized } from "./core-DnQST_lN.js";
14
15
  var IntroductionScreens = ((IntroductionScreens2) => {
15
16
  IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
16
17
  IntroductionScreens2[IntroductionScreens2["INDIVIDUAL"] = TaskTypes.INDIVIDUAL] = "INDIVIDUAL";
@@ -2,14 +2,15 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2782ae0c-bc99-424b-8812-6248aaf2c401", e._sentryDebugIdIdentifier = "sentry-dbid-2782ae0c-bc99-424b-8812-6248aaf2c401");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1d709188-b2e1-4e66-9565-a9e49f006970", e._sentryDebugIdIdentifier = "sentry-dbid-1d709188-b2e1-4e66-9565-a9e49f006970");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs } from "preact/jsx-runtime";
11
11
  import { useState } from "preact/hooks";
12
- import { aj as useApiContext, ak as useMutation, al as httpPost, u as useI18nContext, r as useToastContext, G as LoaderWrapper, W as FormHeader, am as Checkbox, a9 as ActionBar, X as DropinLayout } from "./core-B_WrZP-J.js";
12
+ import { a as useApiContext, d as useMutation, h as httpPost, i as useI18nContext, l as useToastContext, L as LoaderWrapper, bX as FormHeader, d0 as Checkbox, cG as ActionBar } from "./EventEmitter-MB52FRnR.js";
13
+ import { D as DropinLayout } from "./core-DnQST_lN.js";
13
14
  const confirmReview = async (legalEntityId, url) => {
14
15
  return httpPost({
15
16
  loadingContext: url,
@@ -2,14 +2,14 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "f4f430b6-6c53-49c4-9556-62819830fc32", e._sentryDebugIdIdentifier = "sentry-dbid-f4f430b6-6c53-49c4-9556-62819830fc32");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "22878715-0e38-40fc-8077-94b6f207c2e6", e._sentryDebugIdIdentifier = "sentry-dbid-22878715-0e38-40fc-8077-94b6f207c2e6");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs } from "preact/jsx-runtime";
11
11
  import { useState } from "preact/hooks";
12
- import { u as useI18nContext, D as useForm, H as Typography, J as Field, R as RadioGroupCard, B as Button, U as Svg, L as LegalEntityType } from "./core-B_WrZP-J.js";
12
+ import { i as useI18nContext, bi as useForm, E as Typography, b8 as Field, cy as RadioGroupCard, G as Button, bw as Svg, J as LegalEntityType } from "./EventEmitter-MB52FRnR.js";
13
13
  const setupAccountMethods = ["singpass", "manual"];
14
14
  const setupAccountMethodFields = ["setupAccountMethod"];
15
15
  const getSingpassSelectionDisabled = (legalEntityType) => {
@@ -81,7 +81,7 @@ const SingpassSelection = (props) => {
81
81
  const methodsMetadata = getSetupAccountMethodMetadata(legalEntityType);
82
82
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-singpass-selection", children: [
83
83
  /* @__PURE__ */ jsx("header", { className: "adyen-kyc-u-margin-bottom-32", children: /* @__PURE__ */ jsx(Typography, { el: "h2", variant: "title-m", children: i18n.get("howWouldYouLikeToSetUpYourAccount") }) }),
84
- /* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsx(Field, { name: "setupAccountMethod", children: (childProps) => /* @__PURE__ */ jsx(
84
+ /* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "setupAccountMethod", children: (childProps) => /* @__PURE__ */ jsx(
85
85
  RadioGroupCard,
86
86
  {
87
87
  ...childProps,
@@ -2,15 +2,17 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c9e9f2dd-daee-494f-94d2-a8615ac78c60", e._sentryDebugIdIdentifier = "sentry-dbid-c9e9f2dd-daee-494f-94d2-a8615ac78c60");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "162a0fd3-becc-487c-8ff4-7c72c28622d9", e._sentryDebugIdIdentifier = "sentry-dbid-162a0fd3-becc-487c-8ff4-7c72c28622d9");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { aj as useApiContext, an as useQuery, ao as httpGet, H as Typography, u as useI18nContext, ap as useFormContext, a6 as Alert, J as Field, aq as RadioGroup, ar as getFormProps, h as Icon, as as isEmpty, U as Svg, at as sofStyles, B as Button, au as TaskStatusIndicator, av as normalizedTaskStatusStore, aw as Card, ax as StructuredList, ay as IconButton, az as isEmpty$1, ab as useQueryClient, n as useAnalyticsContext, p as useLegalEntity, Z as useUpdateLegalEntity, ah as useMultiForm, aA as getRequiredForms, aB as addValidityToForms, aC as useFormComposer, g as createLogger, q as Loader, aD as FormContextProvider, aE as FormWrapper } from "./core-B_WrZP-J.js";
11
+ import { a as useApiContext, b as useQuery, e as httpGet, E as Typography, i as useI18nContext, bN as useFormContext, U as Alert, b8 as Field, ba as RadioGroup, av as getFormProps, Q as Icon, aL as isEmpty, bw as Svg, G as Button, V as Card, W as StructuredList, Y as IconButton, H as isEmpty$1, f as useQueryClient, j as useAnalyticsContext, u as useLegalEntity, c as createLogger, K as Loader } from "./EventEmitter-MB52FRnR.js";
12
12
  import { useState, useRef, useEffect, useMemo, useCallback } from "preact/hooks";
13
+ import { B as useUpdateLegalEntity, O as useMultiForm, h as getRequiredForms, i as addValidityToForms, j as useFormComposer, U as FormContextProvider, F as FormWrapper } from "./CreateIndividualComponent-wIMjaodd.js";
13
14
  import { signal } from "@preact/signals";
15
+ import { s as sofStyles, T as TaskStatusIndicator, n as normalizedTaskStatusStore } from "./core-DnQST_lN.js";
14
16
  const getTaxClassification = async (legalEntityId, url) => {
15
17
  return httpGet({
16
18
  loadingContext: url,
@@ -91,10 +93,19 @@ const getTaxStatusSummary = (i18n, taxReportingClassification) => {
91
93
  ] : [];
92
94
  };
93
95
  const getTaxOptionsRadioItems = (i18n, taxRecommendationData, taxReportingClassification) => {
96
+ const businessType = taxRecommendationData == null ? void 0 : taxRecommendationData.businessType;
97
+ const allowedTypes = getSupportedTaxClassificationTypes(businessType);
98
+ const allowedTaxReportingOptions = Object.fromEntries(
99
+ Object.entries(taxReportingOptions).filter(
100
+ ([key]) => allowedTypes.includes(key)
101
+ )
102
+ );
94
103
  const taxOptionsWithoutRecommendation = Object.fromEntries(
95
- Object.entries(taxReportingOptions).filter(([key]) => key !== (taxRecommendationData == null ? void 0 : taxRecommendationData.type))
104
+ Object.entries(allowedTaxReportingOptions).filter(
105
+ ([key]) => key !== (taxRecommendationData == null ? void 0 : taxRecommendationData.type)
106
+ )
96
107
  );
97
- const taxReportingOptionsToShow = (taxRecommendationData == null ? void 0 : taxRecommendationData.type) && !(taxReportingClassification == null ? void 0 : taxReportingClassification.type) ? taxOptionsWithoutRecommendation : taxReportingOptions;
108
+ const taxReportingOptionsToShow = (taxRecommendationData == null ? void 0 : taxRecommendationData.type) && !(taxReportingClassification == null ? void 0 : taxReportingClassification.type) ? taxOptionsWithoutRecommendation : allowedTaxReportingOptions;
98
109
  return Object.entries(taxReportingOptionsToShow).map(([key, value]) => ({
99
110
  id: key,
100
111
  name: key,
@@ -111,13 +122,34 @@ const getRecommendedTaxOptionsRadioItems = (i18n, showRecommendation, taxRecomme
111
122
  }
112
123
  ] : [];
113
124
  };
125
+ const getSupportedTaxClassificationTypes = (businessType) => {
126
+ const publicCompanyTypes = [
127
+ "listedPublicCompany",
128
+ "subsidiaryOfListedPublicCompany",
129
+ "governmentalOrganization",
130
+ "internationalOrganization"
131
+ ];
132
+ if (!businessType) {
133
+ return [];
134
+ }
135
+ if (publicCompanyTypes.includes(businessType)) {
136
+ return ["nonFinancialNonReportable"];
137
+ }
138
+ if (businessType === "financialInstitution") {
139
+ return ["financialNonReportable"];
140
+ } else if (businessType === "other") {
141
+ return ["nonFinancialActive", "nonFinancialPassive"];
142
+ } else {
143
+ return [];
144
+ }
145
+ };
114
146
  function TaxReportingClassificationForm({
115
147
  data,
116
148
  taxReportingClassification,
117
149
  taxRecommendationData,
118
150
  errors
119
151
  }) {
120
- var _a, _b;
152
+ var _a;
121
153
  const { i18n } = useI18nContext();
122
154
  const { form } = useFormContext();
123
155
  const { handleChangeFor } = form;
@@ -146,7 +178,7 @@ function TaxReportingClassificationForm({
146
178
  ((_a = errors == null ? void 0 : errors.type) == null ? void 0 : _a.errorMessage) && /* @__PURE__ */ jsx(Alert, { variant: "error", title: i18n.get(errors.type.errorMessage) }),
147
179
  showRecommendation ? /* @__PURE__ */ jsxs(Fragment, { children: [
148
180
  /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get("recommendedForYourBusiness") }),
149
- /* @__PURE__ */ jsx(Field, { name: "type", errorMessage: (_b = errors == null ? void 0 : errors.type) == null ? void 0 : _b.errorMessage, children: (childProps) => /* @__PURE__ */ jsx(
181
+ /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: (childProps) => /* @__PURE__ */ jsx(
150
182
  RadioGroup,
151
183
  {
152
184
  ...childProps,
@@ -156,9 +188,9 @@ function TaxReportingClassificationForm({
156
188
  onChange: handleFieldChange("type", "input")
157
189
  }
158
190
  ) }),
159
- /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get("otherOptions") })
191
+ taxOptionsRadioItems.length ? /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", children: i18n.get(taxOptionsRadioItems.length === 1 ? "other" : "otherOptions") }) : null
160
192
  ] }) : null,
161
- /* @__PURE__ */ jsx(Field, { name: "type", children: (childProps) => /* @__PURE__ */ jsx(
193
+ /* @__PURE__ */ jsx(Field, { el: "fieldset", name: "type", children: (childProps) => /* @__PURE__ */ jsx(
162
194
  RadioGroup,
163
195
  {
164
196
  ...childProps,
@@ -376,19 +408,14 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
376
408
  );
377
409
  useEffect(() => {
378
410
  var _a2, _b2, _c2;
379
- if (!((_a2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _a2.type) && (((_b2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _b2.type) || (taxRecommendationData == null ? void 0 : taxRecommendationData.type))) {
380
- setData(
381
- "type",
382
- ((_c2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _c2.type) ?? (taxRecommendationData == null ? void 0 : taxRecommendationData.type),
383
- "taxClassification"
384
- );
411
+ if (!((_a2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _a2.type) && ((_b2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _b2.type)) {
412
+ setData("type", (_c2 = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _c2.type, "taxClassification");
385
413
  (async () => {
386
414
  await triggerValidation("taxClassification");
387
415
  })().catch(() => console.error("Error triggering validation"));
388
416
  }
389
417
  }, [
390
418
  (_d = data == null ? void 0 : data.taxClassification) == null ? void 0 : _d.type,
391
- taxRecommendationData == null ? void 0 : taxRecommendationData.type,
392
419
  (_e = taxReportingClassification == null ? void 0 : taxReportingClassification.taxClassification) == null ? void 0 : _e.type,
393
420
  setData,
394
421
  triggerValidation
@@ -403,7 +430,7 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
403
430
  return addValidityToForms(requiredFormsWithoutSummary, form.isValid, problems);
404
431
  }, [form.isValid, problems]);
405
432
  const handleSubmit = useCallback(async () => {
406
- var _a2;
433
+ var _a2, _b2;
407
434
  if (!legalEntityData) {
408
435
  return;
409
436
  }
@@ -436,6 +463,10 @@ function TaxReportingDropin({ problems, handleHomeClick }) {
436
463
  gotoFormByFormIndex(0);
437
464
  setTaxClassificationErrorMessage("");
438
465
  setLoadingStatus("success");
466
+ userEvents.addTaskEvent("Success", {
467
+ actionType: "submit",
468
+ returnValue: (_b2 = data == null ? void 0 : data.taxClassification) == null ? void 0 : _b2.type
469
+ });
439
470
  } catch (e) {
440
471
  setTaxClassificationErrorMessage((e == null ? void 0 : e.message) || i18n.get("errorUpdatingTaxClassification"));
441
472
  logger.log("Error updating source of funds", e);
@@ -7,7 +7,7 @@
7
7
  }
8
8
  }
9
9
  ;
10
- import { C as Core } from "./core-B_WrZP-J.js";
10
+ import { C as Core } from "./core-DnQST_lN.js";
11
11
  if (CSS.supports("container", "foo / inline-size") === false) {
12
12
  import("container-query-polyfill");
13
13
  }
@@ -2,23 +2,13 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "881515fe-cc48-4e77-8f42-91bfbf835fe2", e._sentryDebugIdIdentifier = "sentry-dbid-881515fe-cc48-4e77-8f42-91bfbf835fe2");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e146d49f-84b4-4a2a-b5e5-09c45667b6fb", e._sentryDebugIdIdentifier = "sentry-dbid-e146d49f-84b4-4a2a-b5e5-09c45667b6fb");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
- import { C as Core } from "./core-B_WrZP-J.js";
11
- const environmentMap = Object.freeze({
12
- live: "https://live.adyen.com",
13
- test: "https://test.adyen.com"
14
- });
15
- const propsToCoreOptions = (options, token) => ({
16
- ...options,
17
- sdkToken: token,
18
- getSdkToken: options.fetchToken,
19
- // Merchant facing 'live'|'test', fallback to raw/unmapped value for local/beta
20
- environment: environmentMap[options.environment] ?? options.environment
21
- });
10
+ import { C as Core } from "./core-DnQST_lN.js";
11
+ import { p as propsToCoreOptions } from "./utils-Do7EwrWz.js";
22
12
  const loadAdyenConfig = async (config) => {
23
13
  if (!config.environment) {
24
14
  config.environment = "live";