@adyen/adyen-platform-experience-web 1.4.1 → 1.5.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 (314) hide show
  1. package/README.md +12 -13
  2. package/dist/adyen-platform-experience-web.css +1 -1
  3. package/dist/{angle-right-DpuNqT0j.cjs → angle-right-B2I_t62j.cjs} +2 -2
  4. package/dist/{angle-right-DpuNqT0j.cjs.map → angle-right-B2I_t62j.cjs.map} +1 -1
  5. package/dist/{checkmark-CC7Mmd_x.cjs → checkmark-CIwP_FdK.cjs} +2 -2
  6. package/dist/{checkmark-CC7Mmd_x.cjs.map → checkmark-CIwP_FdK.cjs.map} +1 -1
  7. package/dist/{checkmark-circle-fill-1IL4ERtO.cjs → checkmark-circle-fill-Cw5UXqzN.cjs} +2 -2
  8. package/dist/{checkmark-circle-fill-1IL4ERtO.cjs.map → checkmark-circle-fill-Cw5UXqzN.cjs.map} +1 -1
  9. package/dist/{checkmark-square-fill-Bu2jdGU3.cjs → checkmark-square-fill-BwkQfKCG.cjs} +2 -2
  10. package/dist/{checkmark-square-fill-Bu2jdGU3.cjs.map → checkmark-square-fill-BwkQfKCG.cjs.map} +1 -1
  11. package/dist/{chevron-down-BVCFqkLo.cjs → chevron-down-BuYiZOY7.cjs} +2 -2
  12. package/dist/{chevron-down-BVCFqkLo.cjs.map → chevron-down-BuYiZOY7.cjs.map} +1 -1
  13. package/dist/{chevron-left-DfGEXTbq.cjs → chevron-left-DhRCcHqQ.cjs} +2 -2
  14. package/dist/{chevron-left-DfGEXTbq.cjs.map → chevron-left-DhRCcHqQ.cjs.map} +1 -1
  15. package/dist/{chevron-right-DzkYlomK.cjs → chevron-right-DvPR8FD2.cjs} +2 -2
  16. package/dist/{chevron-right-DzkYlomK.cjs.map → chevron-right-DvPR8FD2.cjs.map} +1 -1
  17. package/dist/{chevron-up-CpmBSOon.cjs → chevron-up-DFrrO8PJ.cjs} +2 -2
  18. package/dist/{chevron-up-CpmBSOon.cjs.map → chevron-up-DFrrO8PJ.cjs.map} +1 -1
  19. package/dist/cjs/index.js +1 -1
  20. package/dist/{copy-DuV1z0-c.cjs → copy-Bl3l133y.cjs} +2 -2
  21. package/dist/{copy-DuV1z0-c.cjs.map → copy-Bl3l133y.cjs.map} +1 -1
  22. package/dist/{cross-C5L4gQrS.cjs → cross-BtdvCTEP.cjs} +2 -2
  23. package/dist/{cross-C5L4gQrS.cjs.map → cross-BtdvCTEP.cjs.map} +1 -1
  24. package/dist/{cross-circle-fill-D6Ir0xDO.cjs → cross-circle-fill-BBjJLOad.cjs} +2 -2
  25. package/dist/{cross-circle-fill-D6Ir0xDO.cjs.map → cross-circle-fill-BBjJLOad.cjs.map} +1 -1
  26. package/dist/da-DK-qSZWEjaU.cjs +2 -0
  27. package/dist/da-DK-qSZWEjaU.cjs.map +1 -0
  28. package/dist/de-DE-Dngq7NwF.cjs +2 -0
  29. package/dist/de-DE-Dngq7NwF.cjs.map +1 -0
  30. package/dist/{download-IwqY_7gX.cjs → download-Cqu4yqTE.cjs} +2 -2
  31. package/dist/{download-IwqY_7gX.cjs.map → download-Cqu4yqTE.cjs.map} +1 -1
  32. package/dist/es/components/external/CapitalOffer/components/CapitalOffer/CapitalOffer.js +14 -14
  33. package/dist/es/components/external/CapitalOffer/components/CapitalOfferSelection/CapitalOfferSelection.js +20 -20
  34. package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +73 -62
  35. package/dist/es/components/external/CapitalOffer/components/utils/utils.js +16 -16
  36. package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js +3 -3
  37. package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js +3 -3
  38. package/dist/es/components/external/CapitalOverview/components/AccountDetails/utils.js +3 -3
  39. package/dist/es/components/external/CapitalOverview/components/GrantAction/GrantAction.js +6 -6
  40. package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.js +0 -1
  41. package/dist/es/components/external/CapitalOverview/components/GrantDetails/GrantDetails.js +2 -2
  42. package/dist/es/components/external/CapitalOverview/components/GrantItem/utils.js +14 -14
  43. package/dist/es/components/external/CapitalOverview/components/GrantList/GrantList.js +2 -2
  44. package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +29 -29
  45. package/dist/es/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.js +1 -1
  46. package/dist/es/components/external/CapitalOverview/components/PreQualified/PreQualified.js +13 -13
  47. package/dist/es/components/external/CapitalOverview/components/Unqualified.js +2 -2
  48. package/dist/es/components/external/CapitalOverview/constants.js +0 -1
  49. package/dist/es/components/external/PayoutDetails/components/PayoutData.js +21 -21
  50. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +17 -17
  51. package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +4 -4
  52. package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +16 -16
  53. package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +1 -1
  54. package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +20 -20
  55. package/dist/es/components/external/TransactionDetails/components/details/TransactionDataProperties.js +4 -4
  56. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js +8 -8
  57. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundNotice.js +1 -1
  58. package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundReason.js +2 -2
  59. package/dist/es/components/external/TransactionDetails/context/details/context.js +10 -10
  60. package/dist/es/components/external/TransactionDetails/context/refund/context.js +1 -1
  61. package/dist/es/components/external/TransactionDetails/context/refund/hooks/useRefundContextLineItems.js +2 -2
  62. package/dist/es/components/external/TransactionDetails/hooks/useTransaction/transactionNavigator/createDuplexTransactionNavigator.js +20 -20
  63. package/dist/es/components/external/TransactionDetails/hooks/useTransaction/useTransaction.js +3 -3
  64. package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +2 -2
  65. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +4 -4
  66. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +3 -3
  67. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +8 -8
  68. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +66 -66
  69. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +19 -19
  70. package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +3 -3
  71. package/dist/es/components/internal/Accordion/Accordion.js +10 -10
  72. package/dist/es/components/internal/Alert/Alert.js +1 -1
  73. package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +5 -5
  74. package/dist/es/components/internal/Button/hooks/useButton.js +7 -7
  75. package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +104 -104
  76. package/dist/es/components/internal/Calendar/calendar/facade/index.js +12 -12
  77. package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +14 -14
  78. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +4 -4
  79. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +58 -58
  80. package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +4 -4
  81. package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +3 -3
  82. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +2 -2
  83. package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +7 -7
  84. package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +6 -6
  85. package/dist/es/components/internal/Calendar/calendar/utils.js +22 -22
  86. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +11 -11
  87. package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +22 -22
  88. package/dist/es/components/internal/Calendar/hooks/useCalendar.js +7 -7
  89. package/dist/es/components/internal/Calendar/hooks/useTimezone.js +12 -12
  90. package/dist/es/components/internal/CapitalHeader/constants.js +4 -4
  91. package/dist/es/components/internal/CapitalHeader/helpers.js +14 -12
  92. package/dist/es/components/internal/Card/Card.js +9 -9
  93. package/dist/es/components/internal/DataGrid/DataGridCell.js +8 -8
  94. package/dist/es/components/internal/DataGrid/components/TableCells.js +16 -16
  95. package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +13 -13
  96. package/dist/es/components/internal/DataOverviewDetails/useDataOverviewDetailsTitle.js +8 -8
  97. package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +5 -5
  98. package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +3 -3
  99. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +29 -29
  100. package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +1 -2
  101. package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +53 -42
  102. package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +2 -2
  103. package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +31 -31
  104. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +33 -33
  105. package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +15 -15
  106. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +2 -2
  107. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +9 -9
  108. package/dist/es/components/internal/FormFields/InputBase.js +5 -5
  109. package/dist/es/components/internal/FormFields/Select/Select.js +15 -15
  110. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +43 -43
  111. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +14 -14
  112. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +5 -5
  113. package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +2 -2
  114. package/dist/es/components/internal/Header/Header.js +4 -4
  115. package/dist/es/components/internal/Icon/Icon.js +5 -3
  116. package/dist/es/components/internal/Img/Img.js +2 -2
  117. package/dist/es/components/internal/Link/Link.js +2 -2
  118. package/dist/es/components/internal/Modal/Modal.js +4 -4
  119. package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +12 -12
  120. package/dist/es/components/internal/Pagination/hooks/usePagination.js +22 -22
  121. package/dist/es/components/internal/Popover/Popover.js +4 -4
  122. package/dist/es/components/internal/ProgressBar/ProgressBar.js +3 -3
  123. package/dist/es/components/internal/SVGIcons/Checkmark.js +3 -3
  124. package/dist/es/components/internal/SVGIcons/ChevronLeft.js +12 -10
  125. package/dist/es/components/internal/SVGIcons/ChevronRight.js +12 -10
  126. package/dist/es/components/internal/SVGIcons/CloseCircle.js +1 -1
  127. package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +55 -0
  128. package/dist/es/components/internal/StructuredList/StructuredList.js +4 -4
  129. package/dist/es/components/internal/Translation/Translation.js +15 -15
  130. package/dist/es/components/utils/getErrorMessage.js +2 -2
  131. package/dist/es/constants/dateFormats.js +3 -3
  132. package/dist/es/core/ConfigContext/context.js +18 -18
  133. package/dist/es/core/ConfigContext/session/AuthSession.js +36 -36
  134. package/dist/es/core/ConfigContext/session/AuthSessionSpecification.js +7 -7
  135. package/dist/es/core/ConfigContext/session/SetupContext.js +5 -5
  136. package/dist/es/core/ConfigContext/session/constants.js +8 -8
  137. package/dist/es/core/ConfigContext/session/utils/sessionReady.js +5 -5
  138. package/dist/es/core/Http/utils.js +1 -1
  139. package/dist/es/core/Localization/Localization.js +32 -32
  140. package/dist/es/core/Localization/datetime/restamper/constants.js +3 -3
  141. package/dist/es/core/Localization/datetime/restamper/restamper.js +1 -1
  142. package/dist/es/core/Localization/utils.js +1 -1
  143. package/dist/es/core/core.js +1 -1
  144. package/dist/es/external/preact/compat/dist/compat.module.js +40 -40
  145. package/dist/es/external/preact/dist/preact.module.js +197 -195
  146. package/dist/es/external/preact/hooks/dist/hooks.module.js +71 -67
  147. package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +9 -9
  148. package/dist/es/hooks/element/useDetachedRender.js +11 -11
  149. package/dist/es/hooks/element/useFocusTrap.js +5 -5
  150. package/dist/es/hooks/useBalanceAccountSelection.js +10 -10
  151. package/dist/es/hooks/useCommitAction/useCommitAction.js +7 -7
  152. package/dist/es/hooks/useContainerQuery.js +4 -4
  153. package/dist/es/hooks/useCustomColumnsData.js +2 -2
  154. package/dist/es/hooks/useDefaultOverviewFilterParams.js +18 -18
  155. package/dist/es/hooks/useFetch.js +22 -22
  156. package/dist/es/hooks/useModalDetails/useModalDetails.js +7 -7
  157. package/dist/es/hooks/useMutation/useMutation.js +3 -3
  158. package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -21
  159. package/dist/es/hooks/useResponsiveContainer.js +7 -10
  160. package/dist/es/hooks/useTabbedControl.js +66 -0
  161. package/dist/es/images/icons/trash-can.svg.js +9 -0
  162. package/dist/es/images/icons/upload.svg.js +9 -0
  163. package/dist/es/primitives/async/abortable/main.js +9 -9
  164. package/dist/es/primitives/async/deferred/main.js +1 -1
  165. package/dist/es/primitives/auxiliary/errorContainer/main.js +9 -9
  166. package/dist/es/primitives/auxiliary/indexed/helpers.js +4 -4
  167. package/dist/es/primitives/auxiliary/indexed/main.js +7 -7
  168. package/dist/es/primitives/context/session/internal/autofresher.js +15 -15
  169. package/dist/es/primitives/context/session/internal/deadline.js +22 -22
  170. package/dist/es/primitives/context/session/internal/refresher.js +19 -19
  171. package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -3
  172. package/dist/es/primitives/reactive/eventEmitter/main.js +3 -3
  173. package/dist/es/primitives/reactive/reflex/main.js +22 -22
  174. package/dist/es/primitives/reactive/reflex/register.js +25 -25
  175. package/dist/es/primitives/reactive/watchlist/main.js +24 -24
  176. package/dist/es/primitives/time/clock/main.js +6 -6
  177. package/dist/es/primitives/time/interval/main.js +9 -9
  178. package/dist/es/translations/da-DK.json.js +55 -46
  179. package/dist/es/translations/de-DE.json.js +67 -58
  180. package/dist/es/translations/en-US.json.js +79 -70
  181. package/dist/es/translations/es-ES.json.js +91 -82
  182. package/dist/es/translations/fi-FI.json.js +93 -84
  183. package/dist/es/translations/fr-FR.json.js +75 -66
  184. package/dist/es/translations/it-IT.json.js +95 -86
  185. package/dist/es/translations/nl-NL.json.js +92 -83
  186. package/dist/es/translations/no-NO.json.js +71 -62
  187. package/dist/es/translations/pt-BR.json.js +67 -58
  188. package/dist/es/translations/sv-SE.json.js +95 -86
  189. package/dist/es/utils/abort/internals.js +3 -3
  190. package/dist/es/utils/abort/main.js +19 -19
  191. package/dist/es/utils/collection/main.js +14 -14
  192. package/dist/es/utils/datetime/main.js +3 -3
  193. package/dist/es/utils/preact/className.js +2 -2
  194. package/dist/es/utils/struct/main.js +8 -8
  195. package/dist/es/utils/value/is.js +9 -9
  196. package/dist/es/utils/value/number.js +2 -2
  197. package/dist/es-ES-Bjddx94n.cjs +2 -0
  198. package/dist/es-ES-Bjddx94n.cjs.map +1 -0
  199. package/dist/{external-link-r39cGU4L.cjs → external-link-CqDz5BtK.cjs} +2 -2
  200. package/dist/{external-link-r39cGU4L.cjs.map → external-link-CqDz5BtK.cjs.map} +1 -1
  201. package/dist/fi-FI-CNpmToDG.cjs +2 -0
  202. package/dist/fi-FI-CNpmToDG.cjs.map +1 -0
  203. package/dist/{filter-BGBP3TAU.cjs → filter-DLAt7sYb.cjs} +2 -2
  204. package/dist/{filter-BGBP3TAU.cjs.map → filter-DLAt7sYb.cjs.map} +1 -1
  205. package/dist/fr-FR-CUUHB8JU.cjs +2 -0
  206. package/dist/fr-FR-CUUHB8JU.cjs.map +1 -0
  207. package/dist/index-DbNUA_xB.cjs +12 -0
  208. package/dist/index-DbNUA_xB.cjs.map +1 -0
  209. package/dist/{info-filled-C_zUEZ2b.cjs → info-filled-B9fmmNGT.cjs} +2 -2
  210. package/dist/{info-filled-C_zUEZ2b.cjs.map → info-filled-B9fmmNGT.cjs.map} +1 -1
  211. package/dist/it-IT-B-E80zCo.cjs +2 -0
  212. package/dist/it-IT-B-E80zCo.cjs.map +1 -0
  213. package/dist/{minus-circle-outline-1CJ3DOVB.cjs → minus-circle-outline-JkeH7g3f.cjs} +2 -2
  214. package/dist/{minus-circle-outline-1CJ3DOVB.cjs.map → minus-circle-outline-JkeH7g3f.cjs.map} +1 -1
  215. package/dist/nl-NL--CGhOJhH.cjs +2 -0
  216. package/dist/nl-NL--CGhOJhH.cjs.map +1 -0
  217. package/dist/no-NO-D0UNXgzr.cjs +2 -0
  218. package/dist/no-NO-D0UNXgzr.cjs.map +1 -0
  219. package/dist/{plus-circle-outline-CPQ_oOtQ.cjs → plus-circle-outline-Cmz1Lb00.cjs} +2 -2
  220. package/dist/{plus-circle-outline-CPQ_oOtQ.cjs.map → plus-circle-outline-Cmz1Lb00.cjs.map} +1 -1
  221. package/dist/pt-BR-Du4cDUgf.cjs +2 -0
  222. package/dist/pt-BR-Du4cDUgf.cjs.map +1 -0
  223. package/dist/{square-BmHyYgat.cjs → square-Bow_5TP1.cjs} +2 -2
  224. package/dist/{square-BmHyYgat.cjs.map → square-Bow_5TP1.cjs.map} +1 -1
  225. package/dist/sv-SE-C92aO-iv.cjs +2 -0
  226. package/dist/sv-SE-C92aO-iv.cjs.map +1 -0
  227. package/dist/trash-can-DLEmgXUG.cjs +2 -0
  228. package/dist/trash-can-DLEmgXUG.cjs.map +1 -0
  229. package/dist/types/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.d.ts.map +1 -1
  230. package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts +1 -1
  231. package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts.map +1 -1
  232. package/dist/types/components/external/TransactionDetails/components/utils.d.ts +1 -1
  233. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +71 -0
  234. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
  235. package/dist/types/components/internal/CapitalHeader/constants.d.ts +2 -1
  236. package/dist/types/components/internal/CapitalHeader/constants.d.ts.map +1 -1
  237. package/dist/types/components/internal/CapitalHeader/helpers.d.ts.map +1 -1
  238. package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts.map +1 -1
  239. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +3 -3
  240. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
  241. package/dist/types/components/internal/Icon/Icon.d.ts +2 -0
  242. package/dist/types/components/internal/Icon/Icon.d.ts.map +1 -1
  243. package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts +1 -1
  244. package/dist/types/components/internal/SVGIcons/Checkmark.d.ts +1 -1
  245. package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts +1 -1
  246. package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts +1 -1
  247. package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts.map +1 -1
  248. package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts +1 -1
  249. package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts.map +1 -1
  250. package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts +1 -1
  251. package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts +1 -1
  252. package/dist/types/components/internal/SVGIcons/Download.d.ts +1 -1
  253. package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -1
  254. package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts +1 -1
  255. package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts +5 -0
  256. package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts.map +1 -0
  257. package/dist/types/components/internal/SegmentedControl/types.d.ts +14 -0
  258. package/dist/types/components/internal/SegmentedControl/types.d.ts.map +1 -0
  259. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
  260. package/dist/types/components/utils/getLabel.d.ts +1 -1
  261. package/dist/types/core/ConfigContext/context.d.ts +2 -0
  262. package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
  263. package/dist/types/core/ConfigContext/session/AuthSession.d.ts +4 -0
  264. package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
  265. package/dist/types/core/ConfigContext/session/SetupContext.d.ts +2 -0
  266. package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
  267. package/dist/types/hooks/useTabbedControl.d.ts +19 -0
  268. package/dist/types/hooks/useTabbedControl.d.ts.map +1 -0
  269. package/dist/types/translations/index.d.ts +9 -0
  270. package/dist/types/translations/index.d.ts.map +1 -1
  271. package/dist/types/types/api/resources/CapitalResource.d.ts +1 -0
  272. package/dist/types/types/api/resources/CapitalResource.d.ts.map +1 -1
  273. package/dist/types/utils/file/read.d.ts +5 -0
  274. package/dist/types/utils/file/read.d.ts.map +1 -0
  275. package/dist/types/utils/file/size.d.ts +45 -0
  276. package/dist/types/utils/file/size.d.ts.map +1 -0
  277. package/dist/types/utils/file/upload.d.ts +17 -0
  278. package/dist/types/utils/file/upload.d.ts.map +1 -0
  279. package/dist/types/utils/index.d.ts +3 -0
  280. package/dist/types/utils/index.d.ts.map +1 -1
  281. package/dist/upload-DWOtVcWc.cjs +2 -0
  282. package/dist/upload-DWOtVcWc.cjs.map +1 -0
  283. package/dist/{warning-eizPFTg-.cjs → warning-DNUR39rT.cjs} +2 -2
  284. package/dist/{warning-eizPFTg-.cjs.map → warning-DNUR39rT.cjs.map} +1 -1
  285. package/dist/{warning-filled-CiVuOE_O.cjs → warning-filled-qxDqTfWV.cjs} +2 -2
  286. package/dist/{warning-filled-CiVuOE_O.cjs.map → warning-filled-qxDqTfWV.cjs.map} +1 -1
  287. package/package.json +16 -15
  288. package/dist/da-DK-DHGqGo8Q.cjs +0 -2
  289. package/dist/da-DK-DHGqGo8Q.cjs.map +0 -1
  290. package/dist/de-DE-k_BRPv7a.cjs +0 -2
  291. package/dist/de-DE-k_BRPv7a.cjs.map +0 -1
  292. package/dist/es/components/internal/Tabs/Tabs.js +0 -69
  293. package/dist/es-ES-Cy-9bm8z.cjs +0 -2
  294. package/dist/es-ES-Cy-9bm8z.cjs.map +0 -1
  295. package/dist/fi-FI-C7ICLuS8.cjs +0 -2
  296. package/dist/fi-FI-C7ICLuS8.cjs.map +0 -1
  297. package/dist/fr-FR-DH8euUOp.cjs +0 -2
  298. package/dist/fr-FR-DH8euUOp.cjs.map +0 -1
  299. package/dist/index-BeWwE_B0.cjs +0 -12
  300. package/dist/index-BeWwE_B0.cjs.map +0 -1
  301. package/dist/it-IT-DsfPVAun.cjs +0 -2
  302. package/dist/it-IT-DsfPVAun.cjs.map +0 -1
  303. package/dist/nl-NL-DP_t6EpF.cjs +0 -2
  304. package/dist/nl-NL-DP_t6EpF.cjs.map +0 -1
  305. package/dist/no-NO-ARsXLWv0.cjs +0 -2
  306. package/dist/no-NO-ARsXLWv0.cjs.map +0 -1
  307. package/dist/pt-BR-CuTqntp7.cjs +0 -2
  308. package/dist/pt-BR-CuTqntp7.cjs.map +0 -1
  309. package/dist/sv-SE-DDAIHLKD.cjs +0 -2
  310. package/dist/sv-SE-DDAIHLKD.cjs.map +0 -1
  311. package/dist/types/components/internal/Tabs/Tabs.d.ts +0 -5
  312. package/dist/types/components/internal/Tabs/Tabs.d.ts.map +0 -1
  313. package/dist/types/components/internal/Tabs/types.d.ts +0 -15
  314. package/dist/types/components/internal/Tabs/types.d.ts.map +0 -1
@@ -1,52 +1,52 @@
1
- import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
- import _ from "../../../../../core/Context/useCoreContext.js";
3
- import { useMemo as c, useCallback as v } from "../../../../../external/preact/hooks/dist/hooks.module.js";
4
- import { getExpectedRepaymentDate as x, calculateMaximumRepaymentPeriodInMonths as I, getPaymentRatePercentage as M } from "../utils/utils.js";
1
+ import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
+ import I from "../../../../../core/Context/useCoreContext.js";
3
+ import { useMemo as u, useCallback as P } from "../../../../../external/preact/hooks/dist/hooks.module.js";
4
+ import { getExpectedRepaymentDate as M, calculateMaximumRepaymentPeriodInMonths as k, getPercentage as v } from "../utils/utils.js";
5
5
  import n from "../../../../internal/Typography/Typography.js";
6
- import { TypographyElement as m, TypographyVariant as l } from "../../../../internal/Typography/types.js";
6
+ import { TypographyVariant as l, TypographyElement as m } from "../../../../internal/Typography/types.js";
7
7
  /* empty css */
8
8
  import y from "../../../../internal/Button/Button.js";
9
9
  import { ButtonVariant as C } from "../../../../internal/Button/types.js";
10
- import k from "../../../../../hooks/useMutation/useMutation.js";
11
- import { Tooltip as D } from "../../../../internal/Tooltip/Tooltip.js";
10
+ import D from "../../../../../hooks/useMutation/useMutation.js";
11
+ import { Tooltip as N } from "../../../../internal/Tooltip/Tooltip.js";
12
12
  import { AlertTypeOption as E } from "../../../../internal/Alert/types.js";
13
13
  import { Alert as b } from "../../../../internal/Alert/Alert.js";
14
14
  import { CapitalErrorMessageDisplay as F } from "../utils/CapitalErrorMessageDisplay.js";
15
15
  import L from "classnames";
16
- import { CAPITAL_REPAYMENT_FREQUENCY as P } from "../../../../constants.js";
16
+ import { CAPITAL_REPAYMENT_FREQUENCY as R } from "../../../../constants.js";
17
17
  import { CapitalOfferLegalNotice as S } from "../CapitalOfferLegalNotice/CapitalOfferLegalNotice.js";
18
- import W from "../../../../internal/InfoBox/InfoBox.js";
19
- import q from "../../../../internal/StructuredList/StructuredList.js";
20
- import { Icon as w } from "../../../../internal/Icon/Icon.js";
21
- import { useConfigContext as Y } from "../../../../../core/ConfigContext/context.js";
18
+ import w from "../../../../internal/InfoBox/InfoBox.js";
19
+ import B from "../../../../internal/StructuredList/StructuredList.js";
20
+ import { Icon as W } from "../../../../internal/Icon/Icon.js";
21
+ import { useConfigContext as q } from "../../../../../core/ConfigContext/context.js";
22
22
  import { EMPTY_OBJECT as H } from "../../../../../utils/value/constants.js";
23
- const B = ["30_013"], ce = ({
24
- grantOffer: t,
23
+ const Y = ["30_013"], ce = ({
24
+ grantOffer: a,
25
25
  onBack: h,
26
- onFundsRequest: u,
27
- onContactSupport: p
26
+ onFundsRequest: p,
27
+ onContactSupport: d
28
28
  }) => {
29
- const { i18n: e } = _(), f = c(() => {
30
- const r = x(t.expectedRepaymentPeriodDays);
29
+ const { i18n: e } = I(), f = u(() => {
30
+ const r = M(a.expectedRepaymentPeriodDays);
31
31
  return r ? e.date(r, { month: "long" }) : null;
32
- }, [t, e]), { requestFunds: N } = Y().endpoints, o = k({
33
- queryFn: N,
32
+ }, [a, e]), { requestFunds: T } = q().endpoints, o = D({
33
+ queryFn: T,
34
34
  options: {
35
- onSuccess: (r) => u == null ? void 0 : u(r)
35
+ onSuccess: (r) => p == null ? void 0 : p(r)
36
36
  }
37
- }), A = v(
37
+ }), A = P(
38
38
  (r) => {
39
39
  o.mutate(H, { path: { grantOfferId: r } });
40
40
  },
41
41
  [o]
42
- ), R = v(() => {
43
- t.id && A(t.id);
44
- }, [t.id, A]), s = c(
45
- () => I(t.maximumRepaymentPeriodDays),
46
- [t.maximumRepaymentPeriodDays]
47
- ), i = c(() => {
42
+ ), _ = P(() => {
43
+ a.id && A(a.id);
44
+ }, [a.id, A]), s = u(
45
+ () => k(a.maximumRepaymentPeriodDays),
46
+ [a.maximumRepaymentPeriodDays]
47
+ ), i = u(() => {
48
48
  const r = o.error ? o.error : null;
49
- if (r && B.includes(r.errorCode))
49
+ if (r && Y.includes(r.errorCode))
50
50
  switch (r.errorCode) {
51
51
  case "30_013":
52
52
  return {
@@ -61,62 +61,65 @@ const B = ["30_013"], ce = ({
61
61
  };
62
62
  }
63
63
  return null;
64
- }, [e, o.error]), T = c(() => {
64
+ }, [e, o.error]), x = u(() => {
65
65
  const r = [
66
66
  {
67
67
  key: "capital.fees",
68
- value: e.amount(t.feesAmount.value, t.feesAmount.currency)
68
+ value: e.amount(a.feesAmount.value, a.feesAmount.currency)
69
69
  },
70
70
  {
71
71
  key: "capital.totalRepaymentAmount",
72
- value: e.amount(t.totalAmount.value, t.totalAmount.currency)
72
+ value: e.amount(a.totalAmount.value, a.totalAmount.currency)
73
73
  },
74
74
  {
75
75
  key: "capital.repaymentThreshold",
76
- value: e.amount(t.thresholdAmount.value, t.thresholdAmount.currency)
76
+ value: e.amount(a.thresholdAmount.value, a.thresholdAmount.currency)
77
77
  },
78
78
  {
79
79
  key: "capital.dailyRepaymentRate",
80
- value: e.get("capital.xPercent", { values: { percentage: M(t.repaymentRate) } })
80
+ value: e.get("capital.xPercent", { values: { percentage: v(a.repaymentRate) } })
81
81
  },
82
82
  {
83
83
  key: "capital.expectedRepaymentPeriod",
84
- value: e.get("capital.xDays", { values: { days: t.expectedRepaymentPeriodDays } })
84
+ value: e.get("capital.xDays", { values: { days: a.expectedRepaymentPeriodDays } })
85
85
  },
86
86
  { key: "account", value: e.get("capital.primaryAccount") }
87
87
  ];
88
88
  return s && r.splice(4, 0, {
89
89
  key: "capital.maximumRepaymentPeriod",
90
90
  value: s === 1 ? e.get("capital.oneMonth") : e.get("capital.xMonths", { values: { months: s } })
91
+ }), a.aprBasisPoints && r.splice(1, 0, {
92
+ key: "capital.annualPercentageRate",
93
+ value: e.get("capital.xPercent", { values: { percentage: v(a.aprBasisPoints) } })
91
94
  }), r;
92
- }, [t, e, s]);
93
- return !i && o.error ? /* @__PURE__ */ a(F, { error: o.error, onBack: h, onContactSupport: p }) : /* @__PURE__ */ a("div", { className: "adyen-pe-capital-offer-summary", children: [
94
- /* @__PURE__ */ a(W, { className: "adyen-pe-capital-offer-summary__grant-summary", children: [
95
- /* @__PURE__ */ a(n, { el: m.PARAGRAPH, variant: l.BODY, children: [
95
+ }, [a, e, s]);
96
+ return !i && o.error ? /* @__PURE__ */ t(F, { error: o.error, onBack: h, onContactSupport: d }) : /* @__PURE__ */ t("div", { className: "adyen-pe-capital-offer-summary", children: [
97
+ /* @__PURE__ */ t(w, { className: "adyen-pe-capital-offer-summary__grant-summary", children: [
98
+ /* @__PURE__ */ t(n, { el: m.PARAGRAPH, variant: l.BODY, children: [
96
99
  e.get("capital.youAreRequestingFundingOf"),
97
100
  " ",
98
- /* @__PURE__ */ a("strong", { children: `${e.amount(t.grantAmount.value, t.grantAmount.currency, { minimumFractionDigits: 0 })}.` })
101
+ /* @__PURE__ */ t("strong", { children: `${e.amount(a.grantAmount.value, a.grantAmount.currency, { minimumFractionDigits: 0 })}.` })
99
102
  ] }),
100
- /* @__PURE__ */ a(n, { el: m.PARAGRAPH, variant: l.CAPTION, children: e.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds", {
103
+ /* @__PURE__ */ t(n, { el: m.PARAGRAPH, variant: l.CAPTION, children: e.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds", {
101
104
  values: {
102
- amount: e.amount(t.thresholdAmount.value, t.thresholdAmount.currency),
103
- days: P,
105
+ amount: e.amount(a.thresholdAmount.value, a.thresholdAmount.currency),
106
+ days: R,
104
107
  date: f ?? ""
105
108
  }
106
109
  }) })
107
110
  ] }),
108
- /* @__PURE__ */ a(
109
- q,
111
+ /* @__PURE__ */ t(
112
+ B,
110
113
  {
111
114
  classNames: "adyen-pe-capital-offer-summary__details",
112
- renderLabel: (r, d) => d === "capital.repaymentThreshold" ? /* @__PURE__ */ a(
113
- D,
115
+ renderLabel: (r, c) => c === "capital.repaymentThreshold" ? /* @__PURE__ */ t(
116
+ N,
114
117
  {
115
118
  isContainerHovered: !0,
116
119
  content: e.get("capital.minimumRepaymentToRepayTheFinancingOnTime", {
117
- values: { days: P }
120
+ values: { days: R }
118
121
  }),
119
- children: /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(
122
+ children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
120
123
  n,
121
124
  {
122
125
  className: "adyen-pe-capital-offer-summary__list-label",
@@ -126,7 +129,15 @@ const B = ["30_013"], ce = ({
126
129
  }
127
130
  ) })
128
131
  }
129
- ) : /* @__PURE__ */ a(
132
+ ) : c === "capital.annualPercentageRate" ? /* @__PURE__ */ t(N, { isContainerHovered: !0, content: e.get("capital.annualPercentageRateIsTheCostOfBorrowingForALoan"), children: /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(
133
+ n,
134
+ {
135
+ className: "adyen-pe-capital-offer-summary__list-label",
136
+ el: m.SPAN,
137
+ variant: l.CAPTION,
138
+ children: r
139
+ }
140
+ ) }) }) : /* @__PURE__ */ t(
130
141
  n,
131
142
  {
132
143
  className: "adyen-pe-capital-offer-summary__list-label",
@@ -135,9 +146,9 @@ const B = ["30_013"], ce = ({
135
146
  children: r
136
147
  }
137
148
  ),
138
- renderValue: (r, d) => {
139
- const g = d === "account" && o.error && i && i.errorCode === "30_013";
140
- return /* @__PURE__ */ a(
149
+ renderValue: (r, c) => {
150
+ const g = c === "account" && o.error && i && i.errorCode === "30_013";
151
+ return /* @__PURE__ */ t(
141
152
  n,
142
153
  {
143
154
  className: L({
@@ -147,34 +158,34 @@ const B = ["30_013"], ce = ({
147
158
  variant: l.CAPTION,
148
159
  stronger: !0,
149
160
  children: [
150
- g ? /* @__PURE__ */ a(w, { name: "warning-filled", "data-testid": "primary-account-warning-icon" }) : null,
161
+ g ? /* @__PURE__ */ t(W, { name: "warning-filled", "data-testid": "primary-account-warning-icon" }) : null,
151
162
  r
152
163
  ]
153
164
  }
154
165
  );
155
166
  },
156
- items: T
167
+ items: x
157
168
  }
158
169
  ),
159
- i && /* @__PURE__ */ a(
170
+ i && /* @__PURE__ */ t(
160
171
  b,
161
172
  {
162
173
  className: "adyen-pe-capital-offer-summary__error-alert",
163
174
  type: E.WARNING,
164
175
  title: i.title,
165
176
  description: i.message,
166
- children: p ? /* @__PURE__ */ a(y, { className: "adyen-pe-capital-offer-summary__error-alert-button", onClick: p, children: e.get("contactSupport") }) : null
177
+ children: d ? /* @__PURE__ */ t(y, { className: "adyen-pe-capital-offer-summary__error-alert-button", onClick: d, children: e.get("contactSupport") }) : null
167
178
  }
168
179
  ),
169
- /* @__PURE__ */ a(S, {}),
170
- /* @__PURE__ */ a("div", { className: "adyen-pe-capital-offer-summary__buttons", children: [
171
- o.error && !i ? null : /* @__PURE__ */ a(y, { variant: C.SECONDARY, onClick: h, children: e.get("back") }),
172
- /* @__PURE__ */ a(
180
+ /* @__PURE__ */ t(S, {}),
181
+ /* @__PURE__ */ t("div", { className: "adyen-pe-capital-offer-summary__buttons", children: [
182
+ o.error && !i ? null : /* @__PURE__ */ t(y, { variant: C.SECONDARY, onClick: h, children: e.get("back") }),
183
+ /* @__PURE__ */ t(
173
184
  y,
174
185
  {
175
186
  variant: C.PRIMARY,
176
187
  state: o.isLoading ? "loading" : void 0,
177
- onClick: R,
188
+ onClick: _,
178
189
  disabled: o.isLoading || !!o.error || !!o.data,
179
190
  children: e.get(o.isLoading ? "capital.requesting" : "capital.requestFunds")
180
191
  }
@@ -1,19 +1,19 @@
1
- import { DAY_MS as u } from "../../../../internal/Calendar/calendar/constants.js";
2
- import { parseDate as c } from "../../../../../utils/datetime/main.js";
3
- const i = (e, a = 0) => new Date(new Date(e).setUTCHours(0, 0, 0, 0) + Math.floor(a) * u), d = (e) => c(i(/* @__PURE__ */ new Date(), e)), l = (e) => e ? Math.ceil(e / 30) : null, f = (e, a) => {
4
- let t, n;
5
- function o(...r) {
6
- clearTimeout(t), n = r, t = setTimeout(() => {
7
- e(n), n = void 0;
8
- }, a);
1
+ import { DAY_MS as c } from "../../../../internal/Calendar/calendar/constants.js";
2
+ import { parseDate as i } from "../../../../../utils/datetime/main.js";
3
+ const u = (e, n = 0) => new Date(new Date(e).setUTCHours(0, 0, 0, 0) + Math.floor(n) * c), l = (e) => i(u(/* @__PURE__ */ new Date(), e)), d = (e) => e ? Math.ceil(e / 30) : null, p = (e, n) => {
4
+ let t, o;
5
+ function r(...a) {
6
+ clearTimeout(t), o = a, t = setTimeout(() => {
7
+ e(o), o = void 0;
8
+ }, n);
9
9
  }
10
- return o.cancel = () => {
11
- t && (clearTimeout(t), t = void 0, n = void 0);
12
- }, o;
13
- }, p = (e) => e / 100;
10
+ return r.cancel = () => {
11
+ t && (clearTimeout(t), t = void 0, o = void 0);
12
+ }, r;
13
+ }, f = (e) => e / 100;
14
14
  export {
15
- l as calculateMaximumRepaymentPeriodInMonths,
16
- f as debounce,
17
- d as getExpectedRepaymentDate,
18
- p as getPaymentRatePercentage
15
+ d as calculateMaximumRepaymentPeriodInMonths,
16
+ p as debounce,
17
+ l as getExpectedRepaymentDate,
18
+ f as getPercentage
19
19
  };
@@ -2,7 +2,7 @@ import { jsx as r } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
2
2
  import c from "../../../../internal/CopyText/CopyText.js";
3
3
  import d from "../../../../../core/Context/useCoreContext.js";
4
4
  import t from "../../../../internal/Typography/Typography.js";
5
- import { TypographyElement as a, TypographyVariant as i } from "../../../../internal/Typography/types.js";
5
+ import { TypographyVariant as a, TypographyElement as i } from "../../../../internal/Typography/types.js";
6
6
  const x = ({
7
7
  className: p,
8
8
  content: e,
@@ -13,8 +13,8 @@ const x = ({
13
13
  }) => {
14
14
  const { i18n: s } = d();
15
15
  return /* @__PURE__ */ r("div", { className: p, children: [
16
- /* @__PURE__ */ r("dt", { className: m, children: /* @__PURE__ */ r(t, { el: a.SPAN, variant: i.CAPTION, children: s.get(n) }) }),
17
- /* @__PURE__ */ r("dd", { className: l, children: o ? /* @__PURE__ */ r(c, { buttonLabel: e, textToCopy: o, showCopyTextTooltip: !1, type: "Text" }) : /* @__PURE__ */ r(t, { el: a.SPAN, variant: i.BODY, children: e }) })
16
+ /* @__PURE__ */ r("dt", { className: m, children: /* @__PURE__ */ r(t, { el: i.SPAN, variant: a.CAPTION, children: s.get(n) }) }),
17
+ /* @__PURE__ */ r("dd", { className: l, children: o ? /* @__PURE__ */ r(c, { buttonLabel: e, textToCopy: o, showCopyTextTooltip: !1, type: "Text" }) : /* @__PURE__ */ r(t, { el: i.SPAN, variant: a.BODY, children: e }) })
18
18
  ] });
19
19
  };
20
20
  export {
@@ -3,7 +3,7 @@ import A from "classnames";
3
3
  import { useMemo as C } from "../../../../../external/preact/hooks/dist/hooks.module.js";
4
4
  import { AccountDetail as F } from "./AccountDetail.js";
5
5
  import { Fragment as _ } from "../../../../../external/preact/dist/preact.module.js";
6
- import { getAccountFieldTranslationKey as y, getAccountFieldFormattedValue as S, getAccountFieldTextToCopy as b } from "./utils.js";
6
+ import { getAccountFieldTextToCopy as y, getAccountFieldFormattedValue as S, getAccountFieldTranslationKey as b } from "./utils.js";
7
7
  /* empty css */
8
8
  const o = "adyen-pe-capital-account-details", n = {
9
9
  detail: `${o}__detail`,
@@ -22,9 +22,9 @@ const o = "adyen-pe-capital-account-details", n = {
22
22
  className: n.detail,
23
23
  contentClassName: n.detailContent,
24
24
  labelClassName: n.detailLabel,
25
- label: y(t),
25
+ label: b(t),
26
26
  content: S(t, e),
27
- textToCopy: b(t, e)
27
+ textToCopy: y(t, e)
28
28
  }
29
29
  ) }, t) : null;
30
30
  }) });
@@ -16,7 +16,7 @@ const n = (e, t = !0) => {
16
16
  default:
17
17
  return !1;
18
18
  }
19
- }, u = (e, t) => r(e) ? t : void 0, o = (e, t) => {
19
+ }, o = (e, t) => r(e) ? t : void 0, u = (e, t) => {
20
20
  switch (e) {
21
21
  case "iban":
22
22
  return t && n(t);
@@ -40,7 +40,7 @@ const n = (e, t = !0) => {
40
40
  }
41
41
  };
42
42
  export {
43
- o as getAccountFieldFormattedValue,
44
- u as getAccountFieldTextToCopy,
43
+ u as getAccountFieldFormattedValue,
44
+ o as getAccountFieldTextToCopy,
45
45
  s as getAccountFieldTranslationKey
46
46
  };
@@ -5,11 +5,11 @@ import F from "../../../../../hooks/useTimezoneAwareDateFormatting.js";
5
5
  import { GRANT_ACTION_CLASS_NAMES as l } from "./constants.js";
6
6
  /* empty css */
7
7
  import { Alert as p } from "../../../../internal/Alert/Alert.js";
8
- import { AlertTypeOption as f } from "../../../../internal/Alert/types.js";
8
+ import { AlertTypeOption as d } from "../../../../internal/Alert/types.js";
9
9
  import { useFetch as S } from "../../../../../hooks/useFetch.js";
10
10
  import "../../../../../external/preact/compat/dist/compat.module.js";
11
11
  import { getTopWindowHref as _, setTopWindowHref as b } from "./utils.js";
12
- import d from "../../../../internal/Button/Button.js";
12
+ import f from "../../../../internal/Button/Button.js";
13
13
  import { DATE_FORMAT_CAPITAL_OVERVIEW as I } from "../../../../../constants/dateFormats.js";
14
14
  import { useConfigContext as N } from "../../../../../core/ConfigContext/context.js";
15
15
  import { EMPTY_OBJECT as W } from "../../../../../utils/value/constants.js";
@@ -33,22 +33,22 @@ const D = ({ action: n, className: s, offerExpiresAt: m }) => {
33
33
  p,
34
34
  {
35
35
  className: s,
36
- type: f.CRITICAL,
36
+ type: d.CRITICAL,
37
37
  title: e.get("somethingWentWrongTryRefreshingOrComeBackLater"),
38
- description: /* @__PURE__ */ r(d, { className: l.button, onClick: u, children: e.get("refresh") })
38
+ description: /* @__PURE__ */ r(f, { className: l.button, onClick: u, children: e.get("refresh") })
39
39
  }
40
40
  ) : /* @__PURE__ */ r(
41
41
  p,
42
42
  {
43
43
  className: s,
44
- type: f.WARNING,
44
+ type: d.WARNING,
45
45
  title: `${e.get("capital.signTermsAndConditionsToReceiveFunds")}${m ? ` ${e.get("capital.thisOfferExpiresOn", {
46
46
  values: {
47
47
  date: T(m, I)
48
48
  }
49
49
  })}` : ""}`,
50
50
  description: /* @__PURE__ */ r(
51
- d,
51
+ f,
52
52
  {
53
53
  className: l.button,
54
54
  onClick: () => C(!0),
@@ -1,5 +1,4 @@
1
1
  const e = {
2
- revocation: "revocation",
3
2
  unscheduledRepayment: "unscheduledRepayment"
4
3
  };
5
4
  export {
@@ -2,10 +2,10 @@ import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
2
2
  import { useCallback as s, useMemo as p } from "../../../../../external/preact/hooks/dist/hooks.module.js";
3
3
  import y from "../../../../../core/Context/useCoreContext.js";
4
4
  import r from "../../../../internal/Typography/Typography.js";
5
- import { TypographyElement as m, TypographyVariant as o } from "../../../../internal/Typography/types.js";
5
+ import { TypographyVariant as o, TypographyElement as m } from "../../../../internal/Typography/types.js";
6
6
  import { GRANT_DETAILS_CLASS_NAMES as l } from "./constants.js";
7
7
  /* empty css */
8
- import { getPaymentRatePercentage as d } from "../../../CapitalOffer/components/utils/utils.js";
8
+ import { getPercentage as d } from "../../../CapitalOffer/components/utils/utils.js";
9
9
  import { Tooltip as A } from "../../../../internal/Tooltip/Tooltip.js";
10
10
  import { CAPITAL_REPAYMENT_FREQUENCY as v } from "../../../../constants.js";
11
11
  import h from "../../../../internal/StructuredList/StructuredList.js";
@@ -1,5 +1,5 @@
1
- import { TagVariant as n } from "../../../../internal/Tag/types.js";
2
- const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Active" ? "capital.remaining" : "capital.requestedFunds", d = (e) => e.status === "Active" ? e.remainingTotalAmount : e.grantAmount, o = ({ status: e, missingActions: t }) => {
1
+ import { TagVariant as s } from "../../../../internal/Tag/types.js";
2
+ const u = (e) => e === "Active", c = (e) => e === "Repaid", o = (e) => e === "Active" ? "capital.remaining" : "capital.requestedFunds", r = (e) => e.status === "Active" ? e.remainingTotalAmount : e.grantAmount, d = ({ status: e, missingActions: t }) => {
3
3
  switch (e) {
4
4
  case "Active":
5
5
  return;
@@ -17,26 +17,26 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
17
17
  }, l = ({ status: e, missingActions: t }) => {
18
18
  switch (e) {
19
19
  case "Failed":
20
- return n.ERROR;
20
+ return s.ERROR;
21
21
  case "Pending":
22
- return t != null && t.length ? n.WARNING : n.DEFAULT;
22
+ return t != null && t.length ? s.WARNING : s.DEFAULT;
23
23
  case "Repaid":
24
- return n.LIGHT;
24
+ return s.LIGHT;
25
25
  case "Revoked":
26
26
  case "WrittenOff":
27
- return n.WARNING;
27
+ return s.WARNING;
28
28
  default:
29
- return n.DEFAULT;
29
+ return s.DEFAULT;
30
30
  }
31
31
  }, p = (e) => {
32
32
  const t = /* @__PURE__ */ new Date(), a = /* @__PURE__ */ new Date();
33
33
  return a.setDate(t.getDate() + e), a;
34
34
  }, y = (e) => {
35
- var a, s;
35
+ var a, n;
36
36
  const t = ((a = e.missingActions) == null ? void 0 : a.some((i) => i.type === "signToS")) || !1;
37
37
  switch (e.status) {
38
38
  case "Pending":
39
- return (s = e.missingActions) != null && s.length ? t ? "capital.signTheTermsToReceiveYourFunds" : void 0 : "capital.youShouldGetTheFundsWithinOneBusinessDay";
39
+ return (n = e.missingActions) != null && n.length ? t ? "capital.signTheTermsToReceiveYourFunds" : void 0 : "capital.youShouldGetTheFundsWithinOneBusinessDay";
40
40
  case "Failed":
41
41
  return "capital.weCouldNotProcessThisRequestTryAgain";
42
42
  case "WrittenOff":
@@ -47,14 +47,14 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
47
47
  return;
48
48
  }
49
49
  }, T = (e) => {
50
- var s;
50
+ var n;
51
51
  const t = e.status === "Active", a = e.status === "Pending";
52
52
  return {
53
- amount: d(e),
54
- amountLabelKey: r(e.status),
53
+ amount: r(e),
54
+ amountLabelKey: o(e.status),
55
55
  hasAlerts: a,
56
56
  hasDetails: u(e.status),
57
- hasUnscheduledRepaymentDetails: t && !!((s = e.unscheduledRepaymentAccounts) != null && s.length),
57
+ hasUnscheduledRepaymentDetails: t && !!((n = e.unscheduledRepaymentAccounts) != null && n.length),
58
58
  // The grant revocation account details is currently not ready to be rendered.
59
59
  // A future iteration of this component might include revocation account details.
60
60
  // Only then should the following line be uncommented.
@@ -66,7 +66,7 @@ const u = (e) => e === "Active", c = (e) => e === "Repaid", r = (e) => e === "Ac
66
66
  isLabelColorSecondary: t,
67
67
  isProgressBarVisible: t,
68
68
  repaymentPeriodEndDate: p(e.repaymentPeriodLeft),
69
- statusKey: o(e),
69
+ statusKey: d(e),
70
70
  statusTagVariant: l(e),
71
71
  statusTooltipKey: y(e)
72
72
  };
@@ -3,7 +3,7 @@ import { jsx as a } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
3
3
  import { useState as k, useCallback as t } from "../../../../../external/preact/hooks/dist/hooks.module.js";
4
4
  import { CapitalOffer as C } from "../../../CapitalOffer/components/CapitalOffer/CapitalOffer.js";
5
5
  import { GrantsDisplay as b } from "./GrantsDisplay.js";
6
- import { Fragment as h } from "../../../../../external/preact/dist/preact.module.js";
6
+ import { Fragment as x } from "../../../../../external/preact/dist/preact.module.js";
7
7
  const V = ({
8
8
  externalDynamicOffersConfig: l,
9
9
  grantList: p,
@@ -20,7 +20,7 @@ const V = ({
20
20
  },
21
21
  [e, i]
22
22
  );
23
- return /* @__PURE__ */ a(h, { children: c ? /* @__PURE__ */ a(
23
+ return /* @__PURE__ */ a(x, { children: c ? /* @__PURE__ */ a(
24
24
  C,
25
25
  {
26
26
  externalDynamicOffersConfig: l,
@@ -1,42 +1,42 @@
1
1
  import { jsx as e } from "../../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
- import { BaseList as w } from "../../../../internal/BaseList/BaseList.js";
3
- import { GrantItem as S } from "../GrantItem/GrantItem.js";
4
- import { getGrantConfig as _ } from "../GrantItem/utils.js";
5
- import { GRANT_ADJUSTMENT_DETAILS as C } from "../GrantAdjustmentDetails/constants.js";
6
- import { GrantRepaymentDetails as A } from "../GrantRepaymentDetails/GrantRepaymentDetails.js";
7
- import R from "../../../../../core/Context/useCoreContext.js";
8
- import { useState as D, useMemo as l, useCallback as G } from "../../../../../external/preact/hooks/dist/hooks.module.js";
9
- import B from "../../../../internal/Button/Button.js";
10
- import { ButtonVariant as E } from "../../../../internal/Button/types.js";
11
- import k from "../../../../internal/Tabs/Tabs.js";
12
- import { CapitalHeader as x } from "../../../../internal/CapitalHeader/CapitalHeader.js";
13
- const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(w, { classNames: "adyen-pe-grant-list__items", children: t.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(S, { grant: s, showDetails: c.bind(null, s) }) }, s.id)) }), Y = ({ grantList: t, hideTitle: c, newOfferAvailable: s, onNewOfferRequest: b }) => {
14
- const [v, h] = D(), [n, y] = D(), { i18n: g } = R(), [i, m] = l(() => {
15
- const a = [], r = [];
2
+ import { BaseList as C } from "../../../../internal/BaseList/BaseList.js";
3
+ import { GrantItem as _ } from "../GrantItem/GrantItem.js";
4
+ import { getGrantConfig as b } from "../GrantItem/utils.js";
5
+ import { GRANT_ADJUSTMENT_DETAILS as R } from "../GrantAdjustmentDetails/constants.js";
6
+ import { GrantRepaymentDetails as T } from "../GrantRepaymentDetails/GrantRepaymentDetails.js";
7
+ import A from "../../../../internal/SegmentedControl/SegmentedControl.js";
8
+ import B from "../../../../../core/Context/useCoreContext.js";
9
+ import { useState as G, useMemo as l, useCallback as D } from "../../../../../external/preact/hooks/dist/hooks.module.js";
10
+ import E from "../../../../internal/Button/Button.js";
11
+ import { ButtonVariant as U } from "../../../../internal/Button/types.js";
12
+ import { CapitalHeader as k } from "../../../../internal/CapitalHeader/CapitalHeader.js";
13
+ const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(C, { classNames: "adyen-pe-grant-list__items", children: t.map((n) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(_, { grant: n, showDetails: c.bind(null, n) }) }, n.id)) }), Y = ({ grantList: t, hideTitle: c, newOfferAvailable: n, onNewOfferRequest: v }) => {
14
+ const [g, h] = G(), [a, y] = G(), { i18n: N } = B(), [i, m] = l(() => {
15
+ const s = [], r = [];
16
16
  return t == null || t.forEach((o) => {
17
- o.status === "Active" || o.status === "Pending" ? a.push(o) : r.push(o);
18
- }), [a, r];
19
- }, [t]), f = l(() => t.length > 1 && i.length && m.length ? "Tabs" : "SingleGrant", [i.length, t.length, m.length]), N = l(() => s && !i.some((a) => a.status === "Pending"), [i, s]), d = l(() => n && _(n), [n]), T = G(() => h(void 0), []), p = G((a, r) => {
20
- h(r), y(a);
17
+ o.status === "Active" || o.status === "Pending" ? s.push(o) : r.push(o);
18
+ }), [s, r];
19
+ }, [t]), f = l(() => t.length > 1 && i.length && m.length ? "SegmentedGrants" : "UnifiedGrants", [i.length, t.length, m.length]), S = l(() => n && !i.some((s) => s.status === "Pending"), [i, n]), d = l(() => a && b(a), [a]), w = D(() => h(void 0), []), p = D((s, r) => {
20
+ h(r), y(s);
21
21
  }, []);
22
- if (n)
23
- switch (v) {
24
- case C.unscheduledRepayment: {
22
+ if (a)
23
+ switch (g) {
24
+ case R.unscheduledRepayment: {
25
25
  if (d != null && d.hasUnscheduledRepaymentDetails)
26
- return /* @__PURE__ */ e(A, { grant: n, onDetailsClose: T });
26
+ return /* @__PURE__ */ e(T, { grant: a, onDetailsClose: w });
27
27
  break;
28
28
  }
29
29
  }
30
30
  return /* @__PURE__ */ e("div", { className: "adyen-pe-grant-list", children: [
31
31
  /* @__PURE__ */ e("div", { className: "adyen-pe-grant-list__header-container", children: [
32
- /* @__PURE__ */ e(x, { hideTitle: c, titleKey: "capital.businessFinancing" }),
33
- N ? /* @__PURE__ */ e(B, { onClick: b, className: "adyen-pe-grant-list__offer-button", variant: E.SECONDARY, children: g.get("capital.seeNewOffer") }) : null
32
+ /* @__PURE__ */ e(k, { hideTitle: c, titleKey: "capital.businessFinancing" }),
33
+ S ? /* @__PURE__ */ e(E, { onClick: v, className: "adyen-pe-grant-list__offer-button", variant: U.SECONDARY, children: N.get("capital.seeNewOffer") }) : null
34
34
  ] }),
35
- f === "SingleGrant" && /* @__PURE__ */ e(u, { grants: t, showDetails: p }),
36
- f === "Tabs" && /* @__PURE__ */ e(
37
- k,
35
+ f === "UnifiedGrants" && /* @__PURE__ */ e(u, { grants: t, showDetails: p }),
36
+ f === "SegmentedGrants" && /* @__PURE__ */ e(
37
+ A,
38
38
  {
39
- tabs: [
39
+ items: [
40
40
  {
41
41
  label: "capital.inProgress",
42
42
  content: /* @__PURE__ */ e(u, { grants: i, showDetails: p }),
@@ -48,7 +48,7 @@ const u = ({ grants: t, showDetails: c }) => /* @__PURE__ */ e(w, { classNames:
48
48
  id: "inactive"
49
49
  }
50
50
  ],
51
- defaultActiveTab: "active"
51
+ defaultItem: "active"
52
52
  }
53
53
  )
54
54
  ] });
@@ -2,7 +2,7 @@ import { jsx as e } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
2
2
  import { useMemo as s } from "../../../../../external/preact/hooks/dist/hooks.module.js";
3
3
  import d from "../../../../../core/Context/useCoreContext.js";
4
4
  import o from "../../../../internal/Typography/Typography.js";
5
- import { TypographyElement as m, TypographyVariant as c } from "../../../../internal/Typography/types.js";
5
+ import { TypographyVariant as c, TypographyElement as m } from "../../../../internal/Typography/types.js";
6
6
  import { AccountDetails as A } from "../AccountDetails/AccountDetails.js";
7
7
  import { GrantAdjustmentDetails as f } from "../GrantAdjustmentDetails/GrantAdjustmentDetails.js";
8
8
  /* empty css */