@adyen/kyc-components 3.71.3 → 3.73.0-beta.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 (189) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-Dsv4mY-k.js → AcceptTermsOfServiceComponent-Ib77t0y9.js} +11 -198
  2. package/dist/{AccountSetupRejected-Cz2iWdPE.js → AccountSetupRejected-Dcrt_Wjb.js} +3 -3
  3. package/dist/{BusinessDetailsDropin-CxJ7Ga0q.js → BusinessDetailsDropin-D10LCgSY.js} +199 -98
  4. package/dist/BusinessFinancingPage-CVRFAPxm.js +35 -0
  5. package/dist/{BusinessTypeSelection-wbCak0Us.js → BusinessTypeSelectionPage-DK4PY3_p.js} +47 -40
  6. package/dist/{CXEL7IU7-B9HOZi-H.js → CXEL7IU7-DyO75Uac.js} +3 -3
  7. package/dist/{CreateIndividualComponent-C3uFsTUT.js → CreateIndividualComponent-BiMYdvQq.js} +265 -1227
  8. package/dist/CreateTransferInstrumentComponent-CaBD_3yr.js +1082 -0
  9. package/dist/{CustomerSupport-BuxhbwRm.js → CustomerSupport-BqyayBTP.js} +4 -3
  10. package/dist/{DebugModal-B_DAGmya.js → DebugModal-CO_clhiW.js} +12 -11
  11. package/dist/DecisionMakerDetailsPage-C0wmo475.js +80 -0
  12. package/dist/{DecisionMakers-L6oYW0-J.js → DecisionMakers-B2rmqsfW.js} +6 -5
  13. package/dist/{EventEmitter-DTdpTyY7.js → EventEmitter-BmWcyurq.js} +1015 -1407
  14. package/dist/FormNavigation-W4SYacAX.js +205 -0
  15. package/dist/{HASRA6WW-CBmvzSwj.js → HASRA6WW-Cj_9-H1H.js} +2 -2
  16. package/dist/{I3HPI4QX-9ko0FQd6.js → I3HPI4QX-CCkDLYPH.js} +3 -3
  17. package/dist/{Introduction-C16zT64A.js → Introduction-DlsETOX7.js} +14 -6
  18. package/dist/LegalRepresentativeDetailsPage-Dbp83K05.js +55 -0
  19. package/dist/ManageIndividualComponent-D-47IZH6.js +190 -0
  20. package/dist/Modal-6j0jkYFX.js +135 -0
  21. package/dist/PayoutDetailsPage-CWAOATOb.js +57 -0
  22. package/dist/{Review-BbsJ9Iv_.js → Review-B0v_A189.js} +4 -3
  23. package/dist/RootBusinessDetailsPage-D_3xc6YN.js +43 -0
  24. package/dist/RootIndividualDetailsPage-CT-rsvpD.js +71 -0
  25. package/dist/{EmbedShell-DpZpuM-4.js → ShadowStylesRoot-DMxqA0py.js} +28 -10
  26. package/dist/{SingpassSelection-Biuh42TV.js → SingpassSelection-DB5BHBy1.js} +2 -2
  27. package/dist/SoleProprietorshipPage-CFZ3F57F.js +45 -0
  28. package/dist/{SourceOfFunds.module-CwVf62zO.js → SourceOfFunds.module-sL22I1gI.js} +2 -2
  29. package/dist/{SourceOfFundsDropin-Bz8cTP4R.js → SourceOfFundsPage-Tde0WbSG.js} +44 -20
  30. package/dist/Tag-DdkVScyr.js +41 -0
  31. package/dist/{TaskItemStatus-DzTphBn7.js → TaskItemStatus-DqNACVFe.js} +4 -32
  32. package/dist/{TaxReportingDropin-xDar-7mC.js → TaxReportingDropin-CPQZXr1j.js} +6 -5
  33. package/dist/{TrustOuter-2GEllVo3.js → TrustDetailsPage-BGkbFLaG.js} +20 -29
  34. package/dist/TrustMemberCompanyPage-CQi1xGDz.js +55 -0
  35. package/dist/TrustMemberIndividualPage-BI_XyXhS.js +60 -0
  36. package/dist/UnincorporatedPartnershipIndividualPage-B6gLv55I.js +60 -0
  37. package/dist/UnincorporatedPartnershipMemberCompanyPage-jHwnxg3n.js +58 -0
  38. package/dist/adyen-individual.js +41 -0
  39. package/dist/adyen-kyc-components.js +3 -6
  40. package/dist/adyen-manage-individual.js +41 -0
  41. package/dist/adyen-terms-of-service.js +47 -0
  42. package/dist/adyen-terms-of-service.vue_vue_type_script_lang-CLUMW5mI.js +34 -0
  43. package/dist/adyen-transfer-instrument.js +59 -0
  44. package/dist/adyen-transfer-instrument.vue_vue_type_script_lang-uEpG3KG3.js +45 -0
  45. package/dist/{bg-BG-CzEF3tzV.js → bg-BG-CZRQZyXO.js} +12 -5
  46. package/dist/{cs-CZ-TMjslGp_.js → cs-CZ-BbUFgifZ.js} +12 -5
  47. package/dist/{css-CypmaTn8.js → css-CFY1scQ9.js} +2 -2
  48. package/dist/{da-DK-DWzvDWZJ.js → da-DK-CP71BFS7.js} +12 -5
  49. package/dist/{de-DE-BtIL-7gp.js → de-DE-DY56JGZt.js} +12 -5
  50. package/dist/{el-GR-DHSSlqbw.js → el-GR-CnENEp5c.js} +12 -5
  51. package/dist/{es-ES-OwkE9-Cu.js → es-ES-dV62vQcV.js} +28 -21
  52. package/dist/{et-EE-DvixWnLd.js → et-EE-BBgAN3Wc.js} +12 -5
  53. package/dist/{fi-FI-DZiXWe_g.js → fi-FI-DVmGWIxn.js} +12 -5
  54. package/dist/{fr-FR-BBwiWhiT.js → fr-FR-VwG8Rg7R.js} +12 -5
  55. package/dist/{hr-HR-DJYofWKU.js → hr-HR-Bs_lxjxQ.js} +12 -5
  56. package/dist/{hu-HU-k9c6wZld.js → hu-HU-8dVSiOZM.js} +12 -5
  57. package/dist/{core-BsRrVyKB.js → index-D6YGuPb5.js} +810 -1908
  58. package/dist/{it-IT-oOwbWW3K.js → it-IT-DvwWMDl1.js} +12 -5
  59. package/dist/{ja-JP-CT3g8Hhn.js → ja-JP-BB6zzyEg.js} +12 -5
  60. package/dist/{json-DDReVYSW.js → json-RoVXbcQq.js} +2 -2
  61. package/dist/localizeDateString-DtxuKMqB.js +27 -0
  62. package/dist/{lt-LT-CVHIsEF8.js → lt-LT-BQtNojlb.js} +12 -5
  63. package/dist/{lv-LV-BFx0cvZ2.js → lv-LV-BpEw5uN5.js} +12 -5
  64. package/dist/mapExistingFile-CwT8TZ5D.js +870 -0
  65. package/dist/{nl-NL-rmSZu4Rf.js → nl-NL-vBEBXTP-.js} +12 -5
  66. package/dist/{no-NO-BOnQvimN.js → no-NO-BFhTqUoD.js} +12 -5
  67. package/dist/{pl-PL-5j22An4E.js → pl-PL-dsGZvzVf.js} +12 -5
  68. package/dist/{plaintext-Cjcgjaqv.js → plaintext-DpBLPLCO.js} +2 -2
  69. package/dist/{terms-of-service-preact.js → preact/adyen-individual.js} +4 -4
  70. package/dist/{individual-react.js → preact/adyen-manage-individual.js} +4 -4
  71. package/dist/{terms-of-service-react.js → preact/adyen-terms-of-service.js} +5 -4
  72. package/dist/preact/adyen-transfer-instrument.js +16 -0
  73. package/dist/{pt-PT-DP8U1qyu.js → pt-PT-BB38pZbh.js} +12 -5
  74. package/dist/{ro-RO-BTdtoC6P.js → ro-RO-BgxNxoxJ.js} +12 -5
  75. package/dist/{sk-SK-DYTx4mOB.js → sk-SK-rtDeCztl.js} +12 -5
  76. package/dist/{sl-SI-D8CiUN69.js → sl-SI-qoGCwUdU.js} +12 -5
  77. package/dist/style.css +1942 -1990
  78. package/dist/styles-CLV89_hH.js +1942 -1990
  79. package/dist/{sv-SE-Daslxeqr.js → sv-SE-f1T7PBSW.js} +12 -5
  80. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -1
  81. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -0
  82. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -5
  83. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -11
  84. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +14 -0
  85. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  86. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +12 -1
  87. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +14 -0
  88. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -0
  89. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +2 -0
  90. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +8 -0
  91. package/dist/types/components/Business/forms/rules.d.ts +0 -1
  92. package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +1 -1
  93. package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +1 -1
  94. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +8 -0
  95. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -3
  96. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +7 -0
  97. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +7 -0
  98. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  99. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +1 -0
  100. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -1
  101. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -2
  102. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -1
  103. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +20 -0
  104. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +12 -0
  105. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +16 -0
  106. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
  107. package/dist/types/components/Shared/Introduction/Introduction.d.ts +4 -2
  108. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  109. package/dist/types/components/Shared/forms/BusinessTypeSelection/BusinessTypeSelection.d.ts +1 -1
  110. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +3 -5
  111. package/dist/types/components/Shared/forms/DocumentUpload/DocumentUpload.d.ts +1 -1
  112. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +5 -0
  113. package/dist/types/components/Shared/pages/BusinessTypeSelectionPage.d.ts +2 -0
  114. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +7 -1
  115. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +0 -6
  116. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -0
  117. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +8 -0
  118. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +10 -0
  119. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +11 -0
  120. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +16 -0
  121. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +9 -0
  122. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +4 -7
  123. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +0 -2
  124. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +16 -0
  125. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +11 -0
  126. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +8 -0
  127. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/UnincorporatedPartnershipMembersOverview.d.ts +1 -5
  128. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -1
  129. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
  130. package/dist/types/context/AnalyticsContext/AnalyticsProvider.d.ts +2 -2
  131. package/dist/types/context/ExperimentContext/ExperimentsContextProvider.d.ts +1 -1
  132. package/dist/types/context/ExperimentContext/types.d.ts +6 -6
  133. package/dist/types/core/EmbedShell/EmbedShell.d.ts +3 -4
  134. package/dist/types/core/environment/resolveEnvironment.d.ts +1 -0
  135. package/dist/types/core/models/api/document.d.ts +1 -1
  136. package/dist/types/embeds/ShadowStylesRoot.d.ts +3 -0
  137. package/dist/types/embeds/baseEmbedProps.d.ts +30 -0
  138. package/dist/types/embeds/individual/AdyenIndividualPreact.d.ts +3 -0
  139. package/dist/types/embeds/individual/adyen-individual.types.d.ts +30 -0
  140. package/dist/types/embeds/manage-individual/AdyenManageIndividualPreact.d.ts +3 -0
  141. package/dist/types/embeds/manage-individual/adyen-manage-individual.d.ts +1 -0
  142. package/dist/types/embeds/manage-individual/adyen-manage-individual.types.d.ts +29 -0
  143. package/dist/types/embeds/terms-of-service/AdyenTermsOfServicePreact.d.ts +3 -0
  144. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +30 -0
  145. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrumentPreact.d.ts +3 -0
  146. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +36 -0
  147. package/dist/types/hooks/useDataConflicts.d.ts +1 -5
  148. package/dist/types/stores/globalStore/taskTypes.d.ts +0 -1
  149. package/dist/types/utils/country.d.ts +3 -2
  150. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  151. package/dist/types/utils/getDisplayErrorMessage.d.ts +3 -0
  152. package/dist/useToastContext-DiQ_PGrE.js +33 -0
  153. package/dist/{utils-Fkk087z-.js → utils-Bl8l2XY4.js} +4 -4
  154. package/dist/vue/adyen-individual.js +43 -0
  155. package/dist/vue/adyen-manage-individual.js +46 -0
  156. package/dist/vue/adyen-terms-of-service.js +26 -0
  157. package/dist/vue/adyen-transfer-instrument.js +28 -0
  158. package/dist/{yaml-GnQQmt7i.js → yaml-DEzkYiMR.js} +2 -2
  159. package/package.json +28 -61
  160. package/dist/adyenConfig.js +0 -34
  161. package/dist/individual-preact.js +0 -15
  162. package/dist/individual-vue.js +0 -35
  163. package/dist/individual.js +0 -58
  164. package/dist/listToRecord-CO3M1Q74.js +0 -19
  165. package/dist/terms-of-service.js +0 -58
  166. package/dist/transfer-instrument-preact.js +0 -32
  167. package/dist/transfer-instrument-react.js +0 -32
  168. package/dist/transfer-instrument-vue.js +0 -41
  169. package/dist/transfer-instrument.js +0 -38
  170. package/dist/types/components/BankAccount/forms/PayoutDetails/utils.d.ts +0 -2
  171. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PreferInstantVerificationMethod/PreferInstantVerificationMethod.d.ts +0 -22
  172. package/dist/types/components/Individual/forms/Individual/IndividualOuter.d.ts +0 -26
  173. package/dist/types/components/Trust/tasks/TrustDropin/TrustOuter.d.ts +0 -10
  174. package/dist/types/components/ui/atoms/List/List.d.ts +0 -9
  175. package/dist/types/embeds/adyenConfig.d.ts +0 -22
  176. package/dist/types/embeds/individual/individual.types.d.ts +0 -12
  177. package/dist/types/embeds/individual/preact/Individual.d.ts +0 -15
  178. package/dist/types/embeds/individual/react/Individual.d.ts +0 -20
  179. package/dist/types/embeds/individual/vue/individual.types.d.ts +0 -9
  180. package/dist/types/embeds/terms-of-service/preact/TermsOfService.d.ts +0 -10
  181. package/dist/types/embeds/terms-of-service/react/TermsOfService.d.ts +0 -20
  182. package/dist/types/embeds/terms-of-service/terms-of-service.types.d.ts +0 -8
  183. package/dist/types/embeds/transfer-instrument/preact/TransferInstrument.d.ts +0 -15
  184. package/dist/types/embeds/transfer-instrument/react/TransferInstrument.d.ts +0 -20
  185. package/dist/types/embeds/transfer-instrument/transfer-instrument.types.d.ts +0 -17
  186. package/dist/types/embeds/transfer-instrument/vue/transfer-instrument.types.d.ts +0 -9
  187. package/dist/types/embeds/types.d.ts +0 -19
  188. package/dist/types/embeds/utils.d.ts +0 -7
  189. package/dist/utils-Du6OO4ZK.js +0 -27
@@ -0,0 +1,205 @@
1
+ ;
2
+ {
3
+ try {
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] = "c70babdd-f1e8-4115-b319-e741a7749815", e._sentryDebugIdIdentifier = "sentry-dbid-c70babdd-f1e8-4115-b319-e741a7749815");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import cx from "classnames";
12
+ import { b as useI18nContext, T as Typography, de as globalStyles, N as Icon, cQ as KEYBOARD_KEYS, x as useAnalyticsContext, ak as noop } from "./EventEmitter-BmWcyurq.js";
13
+ const range = (stop, start = 0, step = 1) => Array.from({ length: (stop - start) / step + 1 }, (_, i) => start + i * step);
14
+ const progressBar = "adyen-kyc-progress-bar";
15
+ const progressBarThick = "adyen-kyc-progress-bar-thick";
16
+ const progressStep = "adyen-kyc-progress-step";
17
+ const progressStepActive = "adyen-kyc-progress-step-active";
18
+ const progressBarCircles = "adyen-kyc-progress-bar-circles";
19
+ const styles = {
20
+ progressBar,
21
+ progressBarThick,
22
+ progressStep,
23
+ progressStepActive,
24
+ progressBarCircles
25
+ };
26
+ const shouldHighlight = (active, current, fillBefore) => !fillBefore ? active === current : active >= current;
27
+ const StepProgressIndicator = ({
28
+ activeStepIndex,
29
+ stepsCount,
30
+ fillBefore,
31
+ thick,
32
+ circles
33
+ }) => {
34
+ const { i18n } = useI18nContext();
35
+ if (stepsCount === 0 || stepsCount > 10) {
36
+ return /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i18n.get("XOfYSteps", {
37
+ values: { currentStep: activeStepIndex, totalSteps: stepsCount }
38
+ }) });
39
+ }
40
+ return /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ "aria-label": `Step ${activeStepIndex} of ${stepsCount}`,
44
+ className: styles.progress,
45
+ role: "group",
46
+ children: /* @__PURE__ */ jsx(
47
+ "ol",
48
+ {
49
+ className: cx(styles.progressBar, {
50
+ [styles.progressBarThick]: thick,
51
+ [styles.progressBarCircles]: circles
52
+ }),
53
+ children: range(stepsCount).map((stepNumber) => {
54
+ const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
55
+ return /* @__PURE__ */ jsx(
56
+ "li",
57
+ {
58
+ "aria-current": isHighlighted ? "step" : void 0,
59
+ className: cx(styles.progressStep, {
60
+ [styles.progressStepActive]: isHighlighted
61
+ }),
62
+ children: /* @__PURE__ */ jsx("span", { className: globalStyles.screenReaderOnly, children: `Step ${stepNumber}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}` })
63
+ },
64
+ stepNumber
65
+ );
66
+ })
67
+ }
68
+ )
69
+ }
70
+ );
71
+ };
72
+ const FormNavigationItem = ({
73
+ form,
74
+ isActive,
75
+ onClick,
76
+ hasVerificationErrors
77
+ }) => {
78
+ const { i18n } = useI18nContext();
79
+ const hasError = form.hasServerValidationErrors || hasVerificationErrors;
80
+ const handleKeyDown = (e) => {
81
+ if (onClick && (e.key === KEYBOARD_KEYS.enter || e.key === KEYBOARD_KEYS.space)) {
82
+ e.preventDefault();
83
+ onClick();
84
+ }
85
+ };
86
+ return /* @__PURE__ */ jsx(
87
+ "li",
88
+ {
89
+ "aria-label": i18n.get(form.formName),
90
+ "aria-current": isActive,
91
+ className: cx("adyen-kyc-form-navigation__item", {
92
+ "adyen-kyc-form-navigation__item--active": isActive,
93
+ "adyen-kyc-form-navigation__item--valid": form.isValid,
94
+ "adyen-kyc-form-navigation__item--isnav": Boolean(onClick)
95
+ }),
96
+ children: /* @__PURE__ */ jsxs(
97
+ "button",
98
+ {
99
+ type: "button",
100
+ onClick,
101
+ onKeyDown: onClick ? handleKeyDown : void 0,
102
+ tabIndex: onClick ? 0 : void 0,
103
+ children: [
104
+ i18n.get(form.formName),
105
+ form.hasServerValidationErrors && /* @__PURE__ */ jsxs("span", { className: "adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--error", children: [
106
+ /* @__PURE__ */ jsx(Icon, { name: "warning" }),
107
+ /* @__PURE__ */ jsx("span", { className: globalStyles.screenReaderOnly, children: i18n.get("formStepInvalid") })
108
+ ] }),
109
+ form.isValid && !hasError && /* @__PURE__ */ jsxs("span", { className: "adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--success", children: [
110
+ /* @__PURE__ */ jsx(Icon, { name: "checkmark-small" }),
111
+ /* @__PURE__ */ jsx("span", { className: globalStyles.screenReaderOnly, children: i18n.get("formStepCompleted") })
112
+ ] })
113
+ ]
114
+ }
115
+ )
116
+ },
117
+ form.formId
118
+ );
119
+ };
120
+ function FormNavigation({
121
+ forms,
122
+ activeForm,
123
+ gotoForm,
124
+ validateForm,
125
+ className,
126
+ taskName,
127
+ verificationErrors,
128
+ trackNavigation = noop
129
+ }) {
130
+ const { i18n } = useI18nContext();
131
+ const userEvents = useAnalyticsContext();
132
+ const taskNameTranslated = i18n.get(taskName);
133
+ const getFormIndex = (form) => forms.findIndex((f) => f.formId === form.formId);
134
+ const goToForm = (form) => () => {
135
+ if (form.formId === activeForm.formId) return;
136
+ gotoForm(getFormIndex(form));
137
+ trackNavigation({
138
+ userEvents,
139
+ actionType: "navigate",
140
+ toForm: form.formName,
141
+ label: form.formName,
142
+ returnValue: "success"
143
+ });
144
+ };
145
+ const getNavigateHandler = (form, activeForm2) => {
146
+ const priorForms = forms.slice(0, getFormIndex(form));
147
+ const allPriorFormsValid = priorForms.every((subForm) => subForm.isValid);
148
+ if (allPriorFormsValid || !validateForm) {
149
+ return goToForm(form);
150
+ }
151
+ return activeForm2.isValid ? void 0 : () => {
152
+ trackNavigation({
153
+ userEvents,
154
+ actionType: "navigate",
155
+ toForm: form.formName,
156
+ label: form.formName,
157
+ returnValue: "validation error"
158
+ });
159
+ validateForm();
160
+ };
161
+ };
162
+ return /* @__PURE__ */ jsxs("div", { className: cx("adyen-kyc-form-navigation", className), children: [
163
+ /* @__PURE__ */ jsx(
164
+ Typography,
165
+ {
166
+ el: "h3",
167
+ variant: "body",
168
+ color: "secondary",
169
+ className: "adyen-kyc-form-navigation__header",
170
+ children: taskNameTranslated
171
+ }
172
+ ),
173
+ forms && /* @__PURE__ */ jsxs(Fragment, { children: [
174
+ /* @__PURE__ */ jsx(
175
+ Typography,
176
+ {
177
+ color: "tertiary",
178
+ variant: "caption-stronger",
179
+ className: "adyen-kyc-form-navigation__step-count",
180
+ children: i18n.get("stepsX/YofForm", {
181
+ values: {
182
+ activeFormIndex: getFormIndex(activeForm) + 1,
183
+ totalForms: forms.length,
184
+ taskNameTranslated
185
+ }
186
+ })
187
+ }
188
+ ),
189
+ /* @__PURE__ */ jsx("ul", { className: "adyen-kyc-form-navigation__items", children: forms.map((form) => /* @__PURE__ */ jsx(
190
+ FormNavigationItem,
191
+ {
192
+ form,
193
+ isActive: form.formId === activeForm.formId,
194
+ onClick: getNavigateHandler(form, activeForm),
195
+ hasVerificationErrors: Boolean((verificationErrors == null ? void 0 : verificationErrors[form.formId]) ?? false)
196
+ },
197
+ form.formId
198
+ )) })
199
+ ] })
200
+ ] });
201
+ }
202
+ export {
203
+ FormNavigation as F,
204
+ StepProgressIndicator as S
205
+ };
@@ -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] = "1844a2e0-88a2-4f4b-86b5-a2a762cd8934", e2._sentryDebugIdIdentifier = "sentry-dbid-1844a2e0-88a2-4f4b-86b5-a2a762cd8934");
8
+ n2 && (e2._sentryDebugIds = e2._sentryDebugIds || {}, e2._sentryDebugIds[n2] = "47ca2965-8b4a-4eaf-a629-019d5aaf2fec", e2._sentryDebugIdIdentifier = "sentry-dbid-47ca2965-8b4a-4eaf-a629-019d5aaf2fec");
9
9
  } catch (e2) {
10
10
  }
11
11
  }
12
12
  ;
13
- import { ed as createContext, ee as createSignal, ef as onMount, eg as createEffect, eb as createMemo, ec as createComponent, eh as Portal, ei as Show, ej as template, ek as insert, el as createRenderEffect, em as className, en as clearDelegatedEvents, eo as delegateEvents, ep as useContext, eq as onCleanup, er as sortFns, es as mutationSortFns, et as on, eu as setAttribute, ev as getSidedProp, ew as use, ex as createUniqueId, ey as batch, ez as getQueryStatusLabel, eA as getMutationStatusColor, eB as getQueryStatusColor, eC as getQueryStatusColorByLabel, eD as displayValue, eE as For, eF as convertRemToPixels, eG as untrack, eH as $TRACK, eI as useTransition, eJ as spread, eK as mergeProps, eL as createRoot, eM as serialize, eN as Index, eO as updateNestedDataByPath, eP as addEventListener, eQ as stringify, eR as Match, eS as Switch, eT as deleteNestedDataByPath, eU as splitProps, eV as Dynamic, eW as createComputed } from "./EventEmitter-DTdpTyY7.js";
13
+ import { e4 as createContext, e5 as createSignal, e6 as onMount, e7 as createEffect, e2 as createMemo, e3 as createComponent, e8 as Portal, e9 as Show, ea as template, eb as insert, ec as createRenderEffect, ed as className, ee as clearDelegatedEvents, ef as delegateEvents, eg as useContext, eh as onCleanup, ei as sortFns, ej as mutationSortFns, ek as on, el as setAttribute, em as getSidedProp, en as use, eo as createUniqueId, ep as batch, eq as getQueryStatusLabel, er as getMutationStatusColor, es as getQueryStatusColor, et as getQueryStatusColorByLabel, eu as displayValue, ev as For, ew as convertRemToPixels, ex as untrack, ey as $TRACK, ez as useTransition, eA as spread, eB as mergeProps, eC as createRoot, eD as serialize, eE as Index, eF as updateNestedDataByPath, eG as addEventListener, eH as stringify, eI as Match, eJ as Switch, eK as deleteNestedDataByPath, eL as splitProps, eM as Dynamic, eN as createComputed } from "./EventEmitter-BmWcyurq.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] = "fc442f62-1135-4a4d-9537-41106d865c5e", e._sentryDebugIdIdentifier = "sentry-dbid-fc442f62-1135-4a4d-9537-41106d865c5e");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "eea8879c-c6bf-4042-b54a-a9f9c77ea004", e._sentryDebugIdIdentifier = "sentry-dbid-eea8879c-c6bf-4042-b54a-a9f9c77ea004");
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-CBmvzSwj.js";
11
- import { ea as getPreferredColorScheme, eb as createMemo, ec as createComponent } from "./EventEmitter-DTdpTyY7.js";
10
+ import { c as createLocalStorage, T as THEME_PREFERENCE, P as PiPProvider, a as ThemeContext, D as Devtools, Q as QueryDevtoolsContext } from "./HASRA6WW-Cj_9-H1H.js";
11
+ import { e1 as getPreferredColorScheme, e2 as createMemo, e3 as createComponent } from "./EventEmitter-BmWcyurq.js";
12
12
  var DevtoolsComponent = (props) => {
13
13
  const [localStore, setLocalStore] = createLocalStorage({
14
14
  prefix: "TanstackQueryDevtools"
@@ -2,17 +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] = "bc1340d7-bce5-4945-8296-834ef78ee9c5", e._sentryDebugIdIdentifier = "sentry-dbid-bc1340d7-bce5-4945-8296-834ef78ee9c5");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1f3c1d54-bc07-42e5-a838-383d3aa0376a", e._sentryDebugIdIdentifier = "sentry-dbid-1f3c1d54-bc07-42e5-a838-383d3aa0376a");
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 { ae as TaskTypes, i as LegalEntityType, ds as getTranslationKeysByPrefix, u as useI18nContext, a as useAnalyticsContext, B as Button } from "./EventEmitter-DTdpTyY7.js";
13
- import { S as StepProgressIndicator } from "./AcceptTermsOfServiceComponent-Dsv4mY-k.js";
12
+ import { ah as TaskTypes, L as LegalEntityType, dj as getTranslationKeysByPrefix, b as useI18nContext, P as useLegalEntity, aq as ROOT_LE, M as Loader, x as useAnalyticsContext, O as Button } from "./EventEmitter-BmWcyurq.js";
13
+ import { S as StepProgressIndicator } from "./FormNavigation-W4SYacAX.js";
14
14
  import { useMemo } from "preact/compat";
15
- import { u as useCanSeeIntroduction, a as useLegalEntityType } from "./core-BsRrVyKB.js";
15
+ import { u as useCanSeeIntroduction, a as useLegalEntityType } from "./index-D6YGuPb5.js";
16
16
  import { t as toCapitalized } from "./toCapitalized-Bq7laD0b.js";
17
17
  var IntroductionScreens = ((IntroductionScreens2) => {
18
18
  IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
@@ -135,7 +135,14 @@ const IntroductionScreen = ({
135
135
  ] })
136
136
  ] });
137
137
  };
138
- const Introduction = ({
138
+ function Introduction({ onExitIntroduction, tasks }) {
139
+ const { data: rootLe, isLoading } = useLegalEntity(ROOT_LE);
140
+ if (isLoading || !rootLe) {
141
+ return /* @__PURE__ */ jsx(Loader, { size: "large" });
142
+ }
143
+ return /* @__PURE__ */ jsx(IntroductionInner, { legalEntity: rootLe, onExitIntroduction, tasks });
144
+ }
145
+ const IntroductionInner = ({
139
146
  legalEntity,
140
147
  onExitIntroduction,
141
148
  tasks
@@ -243,5 +250,6 @@ const Introduction = ({
243
250
  ] }) : null;
244
251
  };
245
252
  export {
246
- Introduction
253
+ Introduction,
254
+ IntroductionInner
247
255
  };
@@ -0,0 +1,55 @@
1
+ ;
2
+ {
3
+ try {
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] = "61076609-0091-44dc-94c4-890c3239d2cc", e._sentryDebugIdIdentifier = "sentry-dbid-61076609-0091-44dc-94c4-890c3239d2cc");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx } from "preact/jsx-runtime";
11
+ import { P as useLegalEntity, a6 as skipToken, aq as ROOT_LE, al as useExperimentsContext, M as Loader, Q as getLegalEntityCountry, af as EntityType, ah as TaskTypes, ak as noop } from "./EventEmitter-BmWcyurq.js";
12
+ import { b as useCapabilityProblems, k as getProblemsForEntity, m as isOnfidoAutofillFlowEnabled, I as IndividualOnfidoDropin, n as IndividualDropin } from "./CreateIndividualComponent-BiMYdvQq.js";
13
+ function LegalRepresentativeDetailsPage({
14
+ legalRepresentativeId,
15
+ asModal = false,
16
+ hideSidebar = false,
17
+ onSubmit,
18
+ /** below from {@link DropinProps} */
19
+ handleBackClick,
20
+ handleCloseClick,
21
+ handleHomeClick = noop
22
+ }) {
23
+ const { data: legalRepresentativeLe } = useLegalEntity(legalRepresentativeId ?? skipToken);
24
+ const { data: rootLe } = useLegalEntity(ROOT_LE);
25
+ const capabilityProblems = useCapabilityProblems();
26
+ const { isExperimentEnabled } = useExperimentsContext();
27
+ if (!rootLe || legalRepresentativeId && !legalRepresentativeLe) {
28
+ return /* @__PURE__ */ jsx(Loader, {});
29
+ }
30
+ const country = getLegalEntityCountry(legalRepresentativeLe ?? rootLe);
31
+ const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, rootLe.id) : void 0;
32
+ const isOnfidoAutofillFlow = isOnfidoAutofillFlowEnabled(
33
+ country,
34
+ TaskTypes.LEGAL_REPRESENTATIVE_DETAILS,
35
+ isExperimentEnabled
36
+ );
37
+ const props = {
38
+ taskType: TaskTypes.LEGAL_REPRESENTATIVE_DETAILS,
39
+ taskName: "legalRepresentativeDetails",
40
+ legalEntityResponse: legalRepresentativeLe,
41
+ parentLegalEntity: rootLe,
42
+ problems,
43
+ country,
44
+ asModal,
45
+ hideSidebar,
46
+ onSubmit,
47
+ handleBackClick,
48
+ handleCloseClick,
49
+ handleHomeClick
50
+ };
51
+ return isOnfidoAutofillFlow ? /* @__PURE__ */ jsx(IndividualOnfidoDropin, { ...props }) : /* @__PURE__ */ jsx(IndividualDropin, { ...props });
52
+ }
53
+ export {
54
+ LegalRepresentativeDetailsPage
55
+ };
@@ -0,0 +1,190 @@
1
+ ;
2
+ {
3
+ try {
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] = "231699ce-42da-41f5-b3ac-ca042f63f50f", e._sentryDebugIdIdentifier = "sentry-dbid-231699ce-42da-41f5-b3ac-ca042f63f50f");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import { u as useApiContext, a as useQuery, h as httpGet, N as Icon, a0 as TaskStatus, b as useI18nContext, a8 as Skeleton, T as Typography, P as useLegalEntity, aq as ROOT_LE } from "./EventEmitter-BmWcyurq.js";
12
+ import cx from "classnames";
13
+ import { T as Tag } from "./Tag-DdkVScyr.js";
14
+ const getOnboardingStatus = async (legalEntityId, baseUrl) => {
15
+ return httpGet({
16
+ baseUrl,
17
+ path: `legalEntities/${legalEntityId}/onboardingStatus`
18
+ });
19
+ };
20
+ const useOnboardingStatus = (options) => {
21
+ const { rootLegalEntityId, baseUrl } = useApiContext();
22
+ return useQuery({
23
+ queryKey: ["onboardingStatus"],
24
+ queryFn: () => getOnboardingStatus(rootLegalEntityId.value, baseUrl.value),
25
+ ...options
26
+ });
27
+ };
28
+ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
29
+ OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
30
+ OnboardingStatus2["IN_REVIEW"] = "IN_REVIEW";
31
+ OnboardingStatus2["UNSUCCESSFUL"] = "UNSUCCESSFUL";
32
+ OnboardingStatus2["REJECTED"] = "REJECTED";
33
+ OnboardingStatus2["VERIFIED"] = "VERIFIED";
34
+ return OnboardingStatus2;
35
+ })(OnboardingStatus || {});
36
+ const avatar = "adyen-kyc-avatar";
37
+ const avatarLabel = "adyen-kyc-avatar-label";
38
+ const avatarPrimary = "adyen-kyc-avatar-primary";
39
+ const avatarSecondary = "adyen-kyc-avatar-secondary";
40
+ const avatarTertiary = "adyen-kyc-avatar-tertiary";
41
+ const avatarImage = "adyen-kyc-avatar-image";
42
+ const avatarDisabled = "adyen-kyc-avatar-disabled";
43
+ const avatarShapeSquare = "adyen-kyc-avatar-shape-square";
44
+ const avatarShapeCircle = "adyen-kyc-avatar-shape-circle";
45
+ const styles$1 = {
46
+ avatar,
47
+ avatarLabel,
48
+ avatarPrimary,
49
+ avatarSecondary,
50
+ avatarTertiary,
51
+ avatarImage,
52
+ avatarDisabled,
53
+ avatarShapeSquare,
54
+ avatarShapeCircle
55
+ };
56
+ const Avatar = ({
57
+ circle = false,
58
+ iconName,
59
+ imageUrl,
60
+ label,
61
+ variant = "secondary"
62
+ }) => {
63
+ const isImage = imageUrl !== void 0;
64
+ const isIcon = iconName !== void 0;
65
+ const variantStyles = {
66
+ disabled: styles$1.avatarDisabled,
67
+ primary: styles$1.avatarPrimary,
68
+ secondary: styles$1.avatarSecondary,
69
+ tertiary: styles$1.avatarTertiary
70
+ };
71
+ const className = cx(styles$1.avatar, variantStyles[variant], {
72
+ [styles$1.avatarShapeCircle]: circle,
73
+ [styles$1.avatarShapeSquare]: !circle,
74
+ [styles$1.avatarImage]: isImage
75
+ });
76
+ const backgroundImageStyle = {
77
+ backgroundImage: isImage ? `url(${imageUrl})` : "unset"
78
+ };
79
+ return /* @__PURE__ */ jsx("div", { "aria-label": label, className, style: backgroundImageStyle, role: "img", children: isIcon ? /* @__PURE__ */ jsx(Icon, { name: iconName }) : /* @__PURE__ */ jsx("span", { className: styles$1.avatarLabel, children: label }) });
80
+ };
81
+ const embeddedStatus = "adyen-kyc-embedded-status";
82
+ const embeddedStatusLoading = "adyen-kyc-embedded-status-loading";
83
+ const embeddedStatusActionIndicator = "adyen-kyc-embedded-status-action-indicator";
84
+ const embeddedStatusInfo = "adyen-kyc-embedded-status-info";
85
+ const styles = {
86
+ embeddedStatus,
87
+ embeddedStatusLoading,
88
+ embeddedStatusActionIndicator,
89
+ embeddedStatusInfo
90
+ };
91
+ const statusToTag = (status) => {
92
+ switch (status) {
93
+ case OnboardingStatus.IN_REVIEW:
94
+ return { translationKey: "inReview", variant: "grey" };
95
+ case TaskStatus.FINISHED:
96
+ case OnboardingStatus.VERIFIED:
97
+ return { translationKey: "verified", variant: "green" };
98
+ case TaskStatus.SIGNED:
99
+ return { translationKey: "signed", variant: "green" };
100
+ case OnboardingStatus.REJECTED:
101
+ return { translationKey: "rejected", variant: "red" };
102
+ case TaskStatus.ERROR:
103
+ return { translationKey: "actionNeeded", variant: "red" };
104
+ case TaskStatus.PROCESSING:
105
+ case OnboardingStatus.AWAITING_DATA:
106
+ return { translationKey: "inReview", variant: "grey" };
107
+ case OnboardingStatus.UNSUCCESSFUL:
108
+ return { translationKey: "unsuccessful", variant: "red" };
109
+ default:
110
+ return void 0;
111
+ }
112
+ };
113
+ const EmbeddedStatus = ({
114
+ title,
115
+ subtitle,
116
+ status,
117
+ iconName = "user",
118
+ loading = false,
119
+ tagLabel,
120
+ tagVariant = "green",
121
+ onClick,
122
+ light = false,
123
+ className,
124
+ actionIndicator,
125
+ ...props
126
+ }) => {
127
+ const { i18n } = useI18nContext();
128
+ const statusTag = status ? statusToTag(status) : { translationKey: tagLabel, variant: tagVariant };
129
+ const avatarVariant = light ? "tertiary" : "secondary";
130
+ return /* @__PURE__ */ jsxs(
131
+ "button",
132
+ {
133
+ type: "button",
134
+ className: cx(className, styles.embeddedStatus, "adyen-kyc-externalComponent", {
135
+ [styles.embeddedStatusLoading]: loading,
136
+ [styles.embeddedStatusLight]: light
137
+ }),
138
+ onClick,
139
+ ...props,
140
+ children: [
141
+ loading ? /* @__PURE__ */ jsx(Skeleton, { height: "44px", width: "44px", circle: true }) : /* @__PURE__ */ jsx(Avatar, { iconName, variant: avatarVariant, circle: true }),
142
+ /* @__PURE__ */ jsx("section", { className: styles.embeddedStatusInfo, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
143
+ /* @__PURE__ */ jsx(Skeleton, { text: true, width: "20ch", height: "1em" }),
144
+ /* @__PURE__ */ jsx(Skeleton, { text: true, width: "90%", height: "1em" })
145
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
146
+ /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", el: "h3", children: title }),
147
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", el: "div", children: subtitle })
148
+ ] }) }),
149
+ actionIndicator ? /* @__PURE__ */ jsx("section", { className: styles.embeddedStatusButton, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "5em", height: "2em" }) : /* @__PURE__ */ jsx(Typography, { variant: "body-stronger", className: styles.embeddedStatusActionIndicator, children: i18n.get(actionIndicator.labelKey) }) }) : (statusTag == null ? void 0 : statusTag.translationKey) && /* @__PURE__ */ jsx("section", { className: styles.embeddedStatusTag, children: loading ? /* @__PURE__ */ jsx(Skeleton, { width: "8ch", height: "1em" }) : /* @__PURE__ */ jsx(Tag, { variant: statusTag.variant, children: i18n.get(statusTag.translationKey) }) })
150
+ ]
151
+ }
152
+ );
153
+ };
154
+ function ManageIndividualComponent({
155
+ legalEntityId,
156
+ onClick
157
+ }) {
158
+ var _a, _b;
159
+ const { rootLegalEntityId: currentLegalEntityId } = useApiContext();
160
+ currentLegalEntityId.value = legalEntityId;
161
+ const { data: legalEntityData } = useLegalEntity(ROOT_LE);
162
+ const { isPending, data: onboardingStatusData } = useOnboardingStatus({
163
+ refetchInterval: (res) => {
164
+ var _a2;
165
+ return ((_a2 = res.state.data) == null ? void 0 : _a2.status) === OnboardingStatus.AWAITING_DATA ? 3e3 : false;
166
+ }
167
+ });
168
+ const name = (_a = legalEntityData == null ? void 0 : legalEntityData.individual) == null ? void 0 : _a.name;
169
+ const fullName = name ? `${name.firstName} ${name.lastName}` : "";
170
+ const subtitle = ((_b = legalEntityData == null ? void 0 : legalEntityData.individual) == null ? void 0 : _b.email) ?? "";
171
+ const status = onboardingStatusData == null ? void 0 : onboardingStatusData.status;
172
+ return /* @__PURE__ */ jsx(
173
+ EmbeddedStatus,
174
+ {
175
+ onClick,
176
+ title: fullName,
177
+ subtitle,
178
+ status,
179
+ loading: isPending
180
+ }
181
+ );
182
+ }
183
+ export {
184
+ Avatar as A,
185
+ EmbeddedStatus as E,
186
+ ManageIndividualComponent as M,
187
+ OnboardingStatus as O,
188
+ statusToTag as s,
189
+ useOnboardingStatus as u
190
+ };
@@ -0,0 +1,135 @@
1
+ ;
2
+ {
3
+ try {
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] = "dfd837da-878b-4221-b8f7-9f6472baa4c3", e._sentryDebugIdIdentifier = "sentry-dbid-dfd837da-878b-4221-b8f7-9f6472baa4c3");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import cx from "classnames";
12
+ import { useRef, useLayoutEffect } from "preact/hooks";
13
+ import { $ as IconButton, cQ as KEYBOARD_KEYS } from "./EventEmitter-BmWcyurq.js";
14
+ const modal = "adyen-kyc-modal";
15
+ const modalBody = "adyen-kyc-modal-body";
16
+ const modalBodyHeight = "adyen-kyc-modal-body-height";
17
+ const modalTransitionSlideIn = "adyen-kyc-modal-transition-slide-in";
18
+ const modalTransitionDropIn = "adyen-kyc-modal-transition-drop-in";
19
+ const modalInset = "adyen-kyc-modal-inset";
20
+ const modalSmall = "adyen-kyc-modal-small";
21
+ const modalMedium = "adyen-kyc-modal-medium";
22
+ const modalLarge = "adyen-kyc-modal-large";
23
+ const modalFullscreen = "adyen-kyc-modal-fullscreen";
24
+ const modalButton = "adyen-kyc-modal-button";
25
+ const modalHeader = "adyen-kyc-modal-header";
26
+ const modalContent = "adyen-kyc-modal-content";
27
+ const modalFooter = "adyen-kyc-modal-footer";
28
+ const styles = {
29
+ modal,
30
+ modalBody,
31
+ modalBodyHeight,
32
+ modalTransitionSlideIn,
33
+ modalTransitionDropIn,
34
+ modalInset,
35
+ modalSmall,
36
+ modalMedium,
37
+ modalLarge,
38
+ modalFullscreen,
39
+ modalButton,
40
+ modalHeader,
41
+ modalContent,
42
+ modalFooter
43
+ };
44
+ const Modal = ({
45
+ ariaLabel,
46
+ children,
47
+ inset = false,
48
+ onClose,
49
+ showCloseButton = true,
50
+ size = "medium",
51
+ transition = "slideIn"
52
+ }) => {
53
+ const dialogRef = useRef(null);
54
+ const shouldShowCloseButton = onClose !== void 0 && showCloseButton;
55
+ useLayoutEffect(() => {
56
+ const dialogElement = dialogRef.current;
57
+ if (!dialogElement) return;
58
+ const handleCancel = (event) => {
59
+ event.preventDefault();
60
+ onClose == null ? void 0 : onClose();
61
+ };
62
+ const handleKeydown = (event) => {
63
+ if (event.key !== KEYBOARD_KEYS.escape) return;
64
+ event.preventDefault();
65
+ onClose == null ? void 0 : onClose();
66
+ };
67
+ try {
68
+ document.addEventListener("keydown", handleKeydown);
69
+ dialogElement.addEventListener("cancel", handleCancel);
70
+ dialogElement.showModal();
71
+ } catch {
72
+ console.warn(
73
+ "Could not call `showModal()` on the <dialog>; likely it was already removed from the document."
74
+ );
75
+ return;
76
+ }
77
+ dialogElement.focus();
78
+ dialogElement.blur();
79
+ return () => {
80
+ dialogElement.removeEventListener("cancel", handleCancel);
81
+ document.removeEventListener("keydown", handleKeydown);
82
+ dialogElement.close();
83
+ };
84
+ }, []);
85
+ const transitionStyle = {
86
+ slideIn: styles.modalTransitionSlideIn,
87
+ dropIn: styles.modalTransitionDropIn
88
+ };
89
+ const sizeStyle = {
90
+ small: styles.modalSmall,
91
+ medium: styles.modalMedium,
92
+ large: styles.modalLarge,
93
+ fullscreen: styles.modalFullscreen
94
+ };
95
+ const rootClassname = cx(styles.modal, transitionStyle[transition], sizeStyle[size]);
96
+ const bodyClassname = cx(styles.modalBody, {
97
+ [styles.modalInset]: inset === true,
98
+ [styles.modalBodyHeight]: size !== "small"
99
+ });
100
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
101
+ /* @__PURE__ */ jsx("style", { children: `html,body { overflow: hidden !important; }` }),
102
+ /* @__PURE__ */ jsxs(
103
+ "dialog",
104
+ {
105
+ "aria-label": ariaLabel,
106
+ "aria-modal": "true",
107
+ className: rootClassname,
108
+ onClose,
109
+ ref: dialogRef,
110
+ children: [
111
+ shouldShowCloseButton && /* @__PURE__ */ jsx("div", { className: styles.modalButton, children: /* @__PURE__ */ jsx(
112
+ IconButton,
113
+ {
114
+ ariaLabel: "Close",
115
+ circle: true,
116
+ icon: "cross",
117
+ onClick: onClose,
118
+ variant: "surface"
119
+ }
120
+ ) }),
121
+ /* @__PURE__ */ jsx("div", { className: bodyClassname, "data-testid": "modal-body", children })
122
+ ]
123
+ }
124
+ )
125
+ ] });
126
+ };
127
+ const ModalHeader = ({ children }) => /* @__PURE__ */ jsx("header", { className: styles.modalHeader, children });
128
+ const ModalContent = ({ children }) => /* @__PURE__ */ jsx("section", { className: styles.modalContent, children });
129
+ const ModalFooter = ({ children }) => /* @__PURE__ */ jsx("footer", { className: styles.modalFooter, children });
130
+ export {
131
+ Modal as M,
132
+ ModalHeader as a,
133
+ ModalContent as b,
134
+ ModalFooter as c
135
+ };