@adyen/adyen-platform-experience-web 1.0.1 → 1.0.3

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 (451) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/index.js +2 -2
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/es/components/external/BaseElement.js +12 -3
  5. package/dist/es/components/external/PayoutDetails/PayoutDetails.js +18 -14
  6. package/dist/es/components/external/PayoutDetails/components/PayoutData.js +200 -85
  7. package/dist/es/components/external/PayoutDetails/components/constants.js +8 -7
  8. package/dist/es/components/external/PayoutsOverview/PayoutsOverviewElement.js +14 -20
  9. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +137 -116
  10. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverviewContainer/PayoutsOverviewContainer.js +22 -14
  11. package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +92 -56
  12. package/dist/es/components/external/TransactionDetails/TransactionDetails.js +16 -12
  13. package/dist/es/components/external/TransactionDetails/components/TransactionData.js +81 -57
  14. package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +12 -9
  15. package/dist/es/components/external/TransactionsOverview/TransactionsOverviewElement.js +17 -23
  16. package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +16 -4
  17. package/dist/es/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.js +35 -34
  18. package/dist/es/components/external/TransactionsOverview/components/Balances/Balances.js +52 -26
  19. package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +17 -4
  20. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +20 -25
  21. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.js +1 -13
  22. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +12 -7
  23. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +4 -1
  24. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +47 -20
  25. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +22 -13
  26. package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +23 -28
  27. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +30 -30
  28. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +72 -41
  29. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +215 -186
  30. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.js +22 -14
  31. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.js +21 -14
  32. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +116 -83
  33. package/dist/es/components/external/TransactionsOverview/hooks/useMaxWidths.js +4 -6
  34. package/dist/es/components/external/UIElement/UIElement.js +39 -24
  35. package/dist/es/components/hooks/useBalanceAccountSelection.js +20 -11
  36. package/dist/es/components/hooks/useBalanceAccounts.js +22 -19
  37. package/dist/es/components/hooks/useDefaultOverviewFilterParams.js +28 -16
  38. package/dist/es/components/hooks/useTimezoneAwareDateFormatting.js +31 -0
  39. package/dist/es/components/internal/Accordion/Accordion.js +58 -0
  40. package/dist/es/components/internal/Accordion/Accordion.scss.js +4 -0
  41. package/dist/es/components/internal/Accordion/constants.js +8 -0
  42. package/dist/es/components/internal/BaseButton/BaseButton.js +26 -12
  43. package/dist/es/components/internal/BaseList/BaseList.js +8 -3
  44. package/dist/es/components/internal/Button/Button.js +31 -18
  45. package/dist/es/components/internal/Button/ButtonActions/ButtonActions.js +19 -13
  46. package/dist/es/components/internal/Button/ButtonActions/types.js +4 -1
  47. package/dist/es/components/internal/Button/hooks/useButton.js +7 -10
  48. package/dist/es/components/internal/Calendar/Calendar.js +16 -15
  49. package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +301 -292
  50. package/dist/es/components/internal/Calendar/calendar/facade/index.js +40 -13
  51. package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +17 -18
  52. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +125 -100
  53. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +209 -200
  54. package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +14 -9
  55. package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +23 -19
  56. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.js +23 -14
  57. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +26 -22
  58. package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.js +11 -10
  59. package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +39 -41
  60. package/dist/es/components/internal/Calendar/calendar/timeslice/TimeSlice.js +10 -10
  61. package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +26 -17
  62. package/dist/es/components/internal/Calendar/calendar/utils.js +64 -16
  63. package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js +11 -3
  64. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGrid.js +46 -19
  65. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDate.js +57 -39
  66. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +44 -26
  67. package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +26 -12
  68. package/dist/es/components/internal/Calendar/hooks/useCalendar.js +82 -72
  69. package/dist/es/components/internal/Calendar/hooks/useCalendarControlsRendering.js +33 -38
  70. package/dist/es/components/internal/Calendar/hooks/useTimezone.js +25 -9
  71. package/dist/es/components/internal/Card/Card.js +28 -17
  72. package/dist/es/components/internal/CopyText/CopyText.js +15 -11
  73. package/dist/es/components/internal/DataGrid/DataGrid.js +104 -68
  74. package/dist/es/components/internal/DataGrid/DataGridCell.js +24 -23
  75. package/dist/es/components/internal/DataGrid/components/InteractiveBody.js +20 -12
  76. package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +24 -14
  77. package/dist/es/components/internal/DataGrid/components/TableBody.js +14 -9
  78. package/dist/es/components/internal/DataGrid/components/TableCells.js +31 -10
  79. package/dist/es/components/internal/DataGrid/components/TableHeaderCell.js +23 -16
  80. package/dist/es/components/internal/DataGrid/hooks/useInteractiveDataGrid.js +75 -68
  81. package/dist/es/components/internal/DataGrid/utils/DataGridProvider.js +23 -18
  82. package/dist/es/components/internal/DataOverviewContainer/DataOverviewContainer.js +15 -15
  83. package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +80 -39
  84. package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +19 -18
  85. package/dist/es/components/internal/DataOverviewDisplay/constants.js +20 -1
  86. package/dist/es/components/internal/DataOverviewError/DataOverviewError.js +13 -16
  87. package/dist/es/components/internal/DatePicker/DatePicker.js +52 -33
  88. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js +24 -15
  89. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +25 -29
  90. package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +48 -27
  91. package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +59 -34
  92. package/dist/es/components/internal/FilterBar/FilterBar.js +29 -28
  93. package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +26 -5
  94. package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +54 -49
  95. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +64 -55
  96. package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +83 -90
  97. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +40 -44
  98. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +123 -103
  99. package/dist/es/components/internal/FormFields/InputBase.js +63 -54
  100. package/dist/es/components/internal/FormFields/InputText.js +11 -5
  101. package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +30 -33
  102. package/dist/es/components/internal/FormFields/Select/Select.js +142 -149
  103. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +81 -61
  104. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +59 -54
  105. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +51 -31
  106. package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +27 -28
  107. package/dist/es/components/internal/Image/Image.js +21 -8
  108. package/dist/es/components/internal/Img/Img.js +25 -9
  109. package/dist/es/components/internal/Modal/Modal.js +61 -81
  110. package/dist/es/components/internal/Modal/ModalContent/ModalContent.js +23 -4
  111. package/dist/es/components/internal/Pagination/Pagination.js +58 -51
  112. package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +11 -4
  113. package/dist/es/components/internal/Pagination/hooks/useOffsetPagination.js +12 -5
  114. package/dist/es/components/internal/Pagination/hooks/usePageLimit.js +30 -27
  115. package/dist/es/components/internal/Pagination/hooks/usePaginatedRecords.js +104 -67
  116. package/dist/es/components/internal/Pagination/hooks/usePaginatedRecordsFilters.js +7 -1
  117. package/dist/es/components/internal/Pagination/hooks/usePagination.js +34 -13
  118. package/dist/es/components/internal/Popover/Popover.js +118 -128
  119. package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.js +27 -20
  120. package/dist/es/components/internal/Popover/PopoverTitle/PopoverTitle.js +13 -6
  121. package/dist/es/components/internal/Popover/utils/popoverUtil.js +15 -7
  122. package/dist/es/components/internal/Popover/utils/utils.js +9 -8
  123. package/dist/es/components/internal/SVGIcons/CheckedBox.js +18 -10
  124. package/dist/es/components/internal/SVGIcons/Checkmark.js +20 -12
  125. package/dist/es/components/internal/SVGIcons/ChevronDown.js +20 -12
  126. package/dist/es/components/internal/SVGIcons/ChevronLeft.js +18 -10
  127. package/dist/es/components/internal/SVGIcons/ChevronRight.js +18 -10
  128. package/dist/es/components/internal/SVGIcons/ChevronUp.js +20 -12
  129. package/dist/es/components/internal/SVGIcons/Close.js +11 -5
  130. package/dist/es/components/internal/SVGIcons/Copy.js +13 -1
  131. package/dist/es/components/internal/SVGIcons/Filter.js +12 -5
  132. package/dist/es/components/internal/SVGIcons/UncheckedBox.js +18 -4
  133. package/dist/es/components/internal/Spinner/Spinner.js +14 -0
  134. package/dist/es/components/internal/Spinner/Spinner.scss.js +4 -0
  135. package/dist/es/components/internal/StructuredList/StructuredList.js +24 -19
  136. package/dist/es/components/internal/StructuredList/useStructuredListItem.js +14 -15
  137. package/dist/es/components/internal/Tag/Tag.js +16 -16
  138. package/dist/es/components/internal/Tooltip/Tooltip.js +35 -18
  139. package/dist/es/components/internal/Tooltip/useTooltipListeners.js +7 -10
  140. package/dist/es/components/internal/Typography/Typography.js +38 -28
  141. package/dist/es/components/utils/getCommonErrorCode.js +4 -1
  142. package/dist/es/components/utils/getErrorMessage.js +7 -5
  143. package/dist/es/core/Auth/context.js +14 -8
  144. package/dist/es/core/Auth/session/AuthSession.js +53 -73
  145. package/dist/es/core/Auth/session/AuthSessionSpecification.js +54 -39
  146. package/dist/es/core/Auth/session/AuthSetupContext.js +67 -43
  147. package/dist/es/core/Auth/session/constants.js +8 -11
  148. package/dist/es/core/Context/CoreProvider.js +21 -11
  149. package/dist/es/core/Http/http.js +43 -33
  150. package/dist/es/core/Http/utils.js +18 -12
  151. package/dist/es/core/Localization/Localization.js +98 -82
  152. package/dist/es/core/Localization/constants/localization.js +5 -1
  153. package/dist/es/core/Localization/datetime/restamper/constants.js +12 -2
  154. package/dist/es/core/Localization/datetime/restamper/restamper.js +18 -5
  155. package/dist/es/core/Localization/datetime/restamper/utils.js +28 -25
  156. package/dist/es/core/Localization/localization-utils.js +30 -18
  157. package/dist/es/core/Localization/utils.js +6 -1
  158. package/dist/es/core/core.js +26 -17
  159. package/dist/es/hooks/element/useClickOutside.js +29 -35
  160. package/dist/es/hooks/element/useDetachedRender.js +7 -10
  161. package/dist/es/hooks/element/useFocusCursor.js +10 -18
  162. package/dist/es/hooks/element/useFocusTrap.js +3 -6
  163. package/dist/es/hooks/element/usePopoverPositioner.js +43 -65
  164. package/dist/es/hooks/element/useUniqueIdentifier.js +3 -9
  165. package/dist/es/hooks/useCommitAction/useCommitAction.js +25 -19
  166. package/dist/es/hooks/useFetch/useFetch.js +29 -7
  167. package/dist/es/hooks/useImageUrl/useImageUrl.js +12 -10
  168. package/dist/es/hooks/useModalDetails/useModalDetails.js +15 -15
  169. package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -9
  170. package/dist/es/index.js +1 -1
  171. package/dist/es/primitives/async/abortable/main.js +19 -16
  172. package/dist/es/primitives/async/promisor/main.js +13 -12
  173. package/dist/es/primitives/auxiliary/indexed/main.js +18 -22
  174. package/dist/es/primitives/context/session/SessionContext.js +41 -129
  175. package/dist/es/primitives/context/session/constants.js +9 -6
  176. package/dist/es/primitives/context/session/internal/autofresher.js +34 -0
  177. package/dist/es/primitives/context/session/internal/constants.js +7 -0
  178. package/dist/es/primitives/context/session/internal/deadline.js +62 -0
  179. package/dist/es/primitives/context/session/internal/refresher.js +66 -0
  180. package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -1
  181. package/dist/es/primitives/reactive/eventEmitter/main.js +11 -19
  182. package/dist/es/primitives/reactive/reflex/main.js +33 -19
  183. package/dist/es/primitives/reactive/reflex/register.js +9 -3
  184. package/dist/es/primitives/reactive/watchlist/helpers.js +12 -8
  185. package/dist/es/primitives/reactive/watchlist/main.js +4 -5
  186. package/dist/es/primitives/time/clock/main.js +6 -1
  187. package/dist/es/primitives/time/interval/main.js +1 -1
  188. package/dist/es/primitives/time/today/main.js +41 -39
  189. package/dist/es/translations/da-DK.json.js +48 -42
  190. package/dist/es/translations/de-DE.json.js +100 -94
  191. package/dist/es/translations/es-ES.json.js +48 -42
  192. package/dist/es/translations/fr-FR.json.js +35 -29
  193. package/dist/es/translations/index.js +21 -1
  194. package/dist/es/translations/it-IT.json.js +27 -21
  195. package/dist/es/translations/nl-NL.json.js +35 -29
  196. package/dist/es/translations/no-NO.json.js +58 -52
  197. package/dist/es/translations/pt-BR.json.js +27 -21
  198. package/dist/es/translations/sv-SE.json.js +53 -47
  199. package/dist/es/utils/abort/constants.js +5 -0
  200. package/dist/es/utils/abort/internals.js +29 -0
  201. package/dist/es/utils/abort/main.js +51 -0
  202. package/dist/es/utils/preact/memoComparator/main.js +3 -1
  203. package/dist/es/utils/struct/main.js +5 -1
  204. package/dist/style.css +1 -1
  205. package/dist/types/components/external/PayoutDetails/PayoutDetails.d.ts.map +1 -1
  206. package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts +40 -3
  207. package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts.map +1 -1
  208. package/dist/types/components/external/PayoutDetails/components/constants.d.ts +1 -0
  209. package/dist/types/components/external/PayoutDetails/components/constants.d.ts.map +1 -1
  210. package/dist/types/components/external/PayoutsOverview/PayoutsOverviewElement.d.ts.map +1 -1
  211. package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts +1 -1
  212. package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts.map +1 -1
  213. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts +1 -2
  214. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts.map +1 -1
  215. package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts +2 -2
  216. package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts.map +1 -1
  217. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +1 -1
  218. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
  219. package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts +2 -2
  220. package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
  221. package/dist/types/components/external/TransactionDetails/index.d.ts +1 -1
  222. package/dist/types/components/external/TransactionDetails/index.d.ts.map +1 -1
  223. package/dist/types/components/external/TransactionDetails/types.d.ts +2 -5
  224. package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
  225. package/dist/types/components/external/TransactionsOverview/TransactionsOverviewElement.d.ts.map +1 -1
  226. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +5 -1
  227. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +1 -1
  228. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +1 -1
  229. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -1
  230. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +1 -1
  231. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
  232. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.d.ts.map +1 -1
  233. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
  234. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +1 -1
  235. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
  236. package/dist/types/components/external/TransactionsOverview/hooks/useMaxWidths.d.ts.map +1 -1
  237. package/dist/types/components/external/UIElement/UIElement.d.ts.map +1 -1
  238. package/dist/types/components/hooks/useBalanceAccounts.d.ts +1 -1
  239. package/dist/types/components/hooks/useBalanceAccounts.d.ts.map +1 -1
  240. package/dist/types/components/hooks/useDefaultOverviewFilterParams.d.ts +2 -1
  241. package/dist/types/components/hooks/useDefaultOverviewFilterParams.d.ts.map +1 -1
  242. package/dist/types/components/hooks/useTimezoneAwareDateFormatting.d.ts +6 -0
  243. package/dist/types/components/hooks/useTimezoneAwareDateFormatting.d.ts.map +1 -0
  244. package/dist/types/components/internal/Accordion/Accordion.d.ts +6 -0
  245. package/dist/types/components/internal/Accordion/Accordion.d.ts.map +1 -0
  246. package/dist/types/components/internal/Accordion/constants.d.ts +6 -0
  247. package/dist/types/components/internal/Accordion/constants.d.ts.map +1 -0
  248. package/dist/types/components/internal/Accordion/types.d.ts +7 -0
  249. package/dist/types/components/internal/Accordion/types.d.ts.map +1 -0
  250. package/dist/types/components/internal/Calendar/calendar/facade/Calendar.d.ts.map +1 -1
  251. package/dist/types/components/internal/Calendar/calendar/timeframe/common/utils.d.ts +1 -1
  252. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.d.ts +1 -1
  253. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.d.ts.map +1 -1
  254. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts +3 -3
  255. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.d.ts.map +1 -1
  256. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/YearFrame.d.ts +1 -1
  257. package/dist/types/components/internal/Calendar/calendar/timeframe/frames/YearFrame.d.ts.map +1 -1
  258. package/dist/types/components/internal/Calendar/calendar/timerange/presets/lastNDays.d.ts.map +1 -1
  259. package/dist/types/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.d.ts.map +1 -1
  260. package/dist/types/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.d.ts.map +1 -1
  261. package/dist/types/components/internal/Calendar/calendar/timerange/presets/yearToDate.d.ts.map +1 -1
  262. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts +1 -6
  263. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts.map +1 -1
  264. package/dist/types/components/internal/Calendar/calendar/timeslice/TimeSlice.d.ts +2 -2
  265. package/dist/types/components/internal/Calendar/calendar/timeslice/TimeSlice.d.ts.map +1 -1
  266. package/dist/types/components/internal/Calendar/calendar/timeslice/index.d.ts.map +1 -1
  267. package/dist/types/components/internal/Calendar/calendar/types.d.ts +6 -1
  268. package/dist/types/components/internal/Calendar/calendar/types.d.ts.map +1 -1
  269. package/dist/types/components/internal/Calendar/calendar/utils.d.ts +13 -4
  270. package/dist/types/components/internal/Calendar/calendar/utils.d.ts.map +1 -1
  271. package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts +1 -1
  272. package/dist/types/components/internal/Calendar/hooks/useCalendar.d.ts.map +1 -1
  273. package/dist/types/components/internal/Calendar/types.d.ts +1 -0
  274. package/dist/types/components/internal/Calendar/types.d.ts.map +1 -1
  275. package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -1
  276. package/dist/types/components/internal/DataGrid/components/InteractiveBody.d.ts.map +1 -1
  277. package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts +1 -1
  278. package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts.map +1 -1
  279. package/dist/types/components/internal/DataGrid/components/TableBody.d.ts +1 -1
  280. package/dist/types/components/internal/DataGrid/components/TableBody.d.ts.map +1 -1
  281. package/dist/types/components/internal/DataGrid/components/TableCells.d.ts +1 -1
  282. package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
  283. package/dist/types/components/internal/DataGrid/components/TableHeaderCell.d.ts +1 -1
  284. package/dist/types/components/internal/DataGrid/components/TableHeaderCell.d.ts.map +1 -1
  285. package/dist/types/components/internal/DataGrid/hooks/useInteractiveDataGrid.d.ts.map +1 -1
  286. package/dist/types/components/internal/DataGrid/utils/DataGridProvider.d.ts.map +1 -1
  287. package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
  288. package/dist/types/components/internal/DataOverviewDetails/types.d.ts +3 -6
  289. package/dist/types/components/internal/DataOverviewDetails/types.d.ts.map +1 -1
  290. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts +4 -1
  291. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts.map +1 -1
  292. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts +1 -1
  293. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts.map +1 -1
  294. package/dist/types/components/internal/DatePicker/DatePicker.d.ts.map +1 -1
  295. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts +1 -1
  296. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
  297. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +2 -2
  298. package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts.map +1 -1
  299. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilter.d.ts +7 -1
  300. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilter.d.ts.map +1 -1
  301. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilterCore.d.ts.map +1 -1
  302. package/dist/types/components/internal/FormFields/Select/Select.d.ts.map +1 -1
  303. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts.map +1 -1
  304. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +12 -3
  305. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts.map +1 -1
  306. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
  307. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts.map +1 -1
  308. package/dist/types/components/internal/FormFields/index.d.ts.map +1 -1
  309. package/dist/types/components/internal/Modal/Modal.d.ts +1 -1
  310. package/dist/types/components/internal/Modal/Modal.d.ts.map +1 -1
  311. package/dist/types/components/internal/Pagination/hooks/types.d.ts +0 -1
  312. package/dist/types/components/internal/Pagination/hooks/types.d.ts.map +1 -1
  313. package/dist/types/components/internal/Pagination/hooks/useCursorPaginatedRecords.d.ts.map +1 -1
  314. package/dist/types/components/internal/Pagination/hooks/useOffsetPaginatedRecords.d.ts.map +1 -1
  315. package/dist/types/components/internal/Pagination/hooks/useOffsetPagination.d.ts.map +1 -1
  316. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts +1 -1
  317. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts.map +1 -1
  318. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecordsFilters.d.ts.map +1 -1
  319. package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts +1 -1
  320. package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts.map +1 -1
  321. package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
  322. package/dist/types/components/internal/Spinner/Spinner.d.ts +18 -0
  323. package/dist/types/components/internal/Spinner/Spinner.d.ts.map +1 -0
  324. package/dist/types/components/internal/Spinner/index.d.ts +2 -0
  325. package/dist/types/components/internal/Spinner/index.d.ts.map +1 -0
  326. package/dist/types/components/internal/StructuredList/types.d.ts +3 -2
  327. package/dist/types/components/internal/StructuredList/types.d.ts.map +1 -1
  328. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +9 -133
  329. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts.map +1 -1
  330. package/dist/types/components/internal/Tooltip/useTooltipListeners.d.ts.map +1 -1
  331. package/dist/types/components/types.d.ts +7 -15
  332. package/dist/types/components/types.d.ts.map +1 -1
  333. package/dist/types/components/utils/getLabel.d.ts +1 -1
  334. package/dist/types/core/Auth/context.d.ts +56 -42
  335. package/dist/types/core/Auth/context.d.ts.map +1 -1
  336. package/dist/types/core/Auth/session/AuthSession.d.ts +62 -53
  337. package/dist/types/core/Auth/session/AuthSession.d.ts.map +1 -1
  338. package/dist/types/core/Auth/session/AuthSessionSpecification.d.ts +7 -4
  339. package/dist/types/core/Auth/session/AuthSessionSpecification.d.ts.map +1 -1
  340. package/dist/types/core/Auth/session/AuthSetupContext.d.ts +58 -43
  341. package/dist/types/core/Auth/session/AuthSetupContext.d.ts.map +1 -1
  342. package/dist/types/core/Auth/session/constants.d.ts +0 -3
  343. package/dist/types/core/Auth/session/constants.d.ts.map +1 -1
  344. package/dist/types/core/Auth/types.d.ts +6 -6
  345. package/dist/types/core/Auth/types.d.ts.map +1 -1
  346. package/dist/types/core/Context/CoreProvider.d.ts +1 -1
  347. package/dist/types/core/Context/CoreProvider.d.ts.map +1 -1
  348. package/dist/types/core/Context/types.d.ts +2 -0
  349. package/dist/types/core/Context/types.d.ts.map +1 -1
  350. package/dist/types/core/Http/http.d.ts.map +1 -1
  351. package/dist/types/core/Http/utils.d.ts.map +1 -1
  352. package/dist/types/core/Localization/Localization.d.ts.map +1 -1
  353. package/dist/types/core/Localization/datetime/restamper/utils.d.ts.map +1 -1
  354. package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
  355. package/dist/types/core/Localization/utils.d.ts +4 -4
  356. package/dist/types/core/Localization/utils.d.ts.map +1 -1
  357. package/dist/types/core/core.d.ts +3 -2
  358. package/dist/types/core/core.d.ts.map +1 -1
  359. package/dist/types/core/types.d.ts +4 -6
  360. package/dist/types/core/types.d.ts.map +1 -1
  361. package/dist/types/hooks/element/useClickOutside.d.ts +2 -1
  362. package/dist/types/hooks/element/useClickOutside.d.ts.map +1 -1
  363. package/dist/types/hooks/element/useDetachedRender.d.ts.map +1 -1
  364. package/dist/types/hooks/element/useFocusTrap.d.ts.map +1 -1
  365. package/dist/types/hooks/useImageUrl/useImageUrl.d.ts.map +1 -1
  366. package/dist/types/hooks/useMediaQuery/useMediaQuery.d.ts.map +1 -1
  367. package/dist/types/hooks/useModalDetails/useModalDetails.d.ts.map +1 -1
  368. package/dist/types/hooks/useMounted/useMounted.d.ts +1 -1
  369. package/dist/types/hooks/useMounted/useMounted.d.ts.map +1 -1
  370. package/dist/types/hooks/useReactiveState/useReactiveState.d.ts.map +1 -1
  371. package/dist/types/hooks/useReflex/useReflex.d.ts.map +1 -1
  372. package/dist/types/primitives/async/abortable/main.d.ts +1 -1
  373. package/dist/types/primitives/async/abortable/main.d.ts.map +1 -1
  374. package/dist/types/primitives/async/promisor/main.d.ts.map +1 -1
  375. package/dist/types/primitives/auxiliary/indexed/helpers.d.ts.map +1 -1
  376. package/dist/types/primitives/auxiliary/indexed/main.d.ts.map +1 -1
  377. package/dist/types/primitives/context/session/SessionContext.d.ts +6 -27
  378. package/dist/types/primitives/context/session/SessionContext.d.ts.map +1 -1
  379. package/dist/types/primitives/context/session/constants.d.ts +6 -3
  380. package/dist/types/primitives/context/session/constants.d.ts.map +1 -1
  381. package/dist/types/primitives/context/session/internal/autofresher.d.ts +7 -0
  382. package/dist/types/primitives/context/session/internal/autofresher.d.ts.map +1 -0
  383. package/dist/types/primitives/context/session/internal/constants.d.ts +5 -0
  384. package/dist/types/primitives/context/session/internal/constants.d.ts.map +1 -0
  385. package/dist/types/primitives/context/session/internal/deadline.d.ts +6 -0
  386. package/dist/types/primitives/context/session/internal/deadline.d.ts.map +1 -0
  387. package/dist/types/primitives/context/session/internal/refresher.d.ts +6 -0
  388. package/dist/types/primitives/context/session/internal/refresher.d.ts.map +1 -0
  389. package/dist/types/primitives/context/session/internal/types.d.ts +27 -0
  390. package/dist/types/primitives/context/session/internal/types.d.ts.map +1 -0
  391. package/dist/types/primitives/context/session/types.d.ts +8 -4
  392. package/dist/types/primitives/context/session/types.d.ts.map +1 -1
  393. package/dist/types/primitives/reactive/effectStack/main.d.ts.map +1 -1
  394. package/dist/types/primitives/reactive/reflex/helpers.d.ts.map +1 -1
  395. package/dist/types/primitives/reactive/reflex/main.d.ts.map +1 -1
  396. package/dist/types/primitives/reactive/watchlist/helpers.d.ts.map +1 -1
  397. package/dist/types/primitives/reactive/watchlist/main.d.ts +1 -1
  398. package/dist/types/primitives/reactive/watchlist/main.d.ts.map +1 -1
  399. package/dist/types/primitives/time/interval/main.d.ts.map +1 -1
  400. package/dist/types/primitives/time/today/main.d.ts.map +1 -1
  401. package/dist/types/translations/index.d.ts +108 -0
  402. package/dist/types/translations/index.d.ts.map +1 -1
  403. package/dist/types/types/api/endpoints.d.ts +18 -2
  404. package/dist/types/types/api/endpoints.d.ts.map +1 -1
  405. package/dist/types/types/api/models/index.d.ts +1 -0
  406. package/dist/types/types/api/models/index.d.ts.map +1 -1
  407. package/dist/types/types/api/models/reports.d.ts +4 -0
  408. package/dist/types/types/api/models/reports.d.ts.map +1 -0
  409. package/dist/types/types/api/resources/BalanceAccountsResource.d.ts +8 -8
  410. package/dist/types/types/api/resources/BalanceAccountsResource.d.ts.map +1 -1
  411. package/dist/types/types/api/resources/PayoutsResource.d.ts +19 -19
  412. package/dist/types/types/api/resources/PayoutsResource.d.ts.map +1 -1
  413. package/dist/types/types/api/resources/ReportsResource.d.ts +92 -0
  414. package/dist/types/types/api/resources/ReportsResource.d.ts.map +1 -0
  415. package/dist/types/types/api/resources/SetupResource.d.ts +1 -1
  416. package/dist/types/types/api/resources/SetupResource.d.ts.map +1 -1
  417. package/dist/types/types/api/resources/TransactionsResource.d.ts +25 -25
  418. package/dist/types/types/api/resources/TransactionsResource.d.ts.map +1 -1
  419. package/dist/types/utils/abort/constants.d.ts +5 -0
  420. package/dist/types/utils/abort/constants.d.ts.map +1 -0
  421. package/dist/types/utils/abort/internals.d.ts +4 -0
  422. package/dist/types/utils/abort/internals.d.ts.map +1 -0
  423. package/dist/types/utils/abort/main.d.ts +9 -0
  424. package/dist/types/utils/abort/main.d.ts.map +1 -0
  425. package/dist/types/utils/async/main.d.ts.map +1 -1
  426. package/dist/types/utils/collection/main.d.ts +1 -1
  427. package/dist/types/utils/collection/main.d.ts.map +1 -1
  428. package/dist/types/utils/common.d.ts +2 -2
  429. package/dist/types/utils/common.d.ts.map +1 -1
  430. package/dist/types/utils/index.d.ts +1 -0
  431. package/dist/types/utils/index.d.ts.map +1 -1
  432. package/dist/types/utils/preact/fixedForwardRef.d.ts +3 -3
  433. package/dist/types/utils/preact/fixedForwardRef.d.ts.map +1 -1
  434. package/dist/types/utils/struct/main.d.ts +1 -1
  435. package/dist/types/utils/struct/main.d.ts.map +1 -1
  436. package/dist/types/utils/struct/property.d.ts.map +1 -1
  437. package/dist/types/utils/value/is.d.ts +2 -2
  438. package/dist/types/utils/value/is.d.ts.map +1 -1
  439. package/dist/types/utils/value/number.d.ts.map +1 -1
  440. package/package.json +159 -106
  441. package/dist/es/primitives/auxiliary/abortSink/main.js +0 -42
  442. package/dist/types/core/Analytics/types.d.ts +0 -28
  443. package/dist/types/core/Analytics/types.d.ts.map +0 -1
  444. package/dist/types/primitives/auxiliary/abortSink/index.d.ts +0 -3
  445. package/dist/types/primitives/auxiliary/abortSink/index.d.ts.map +0 -1
  446. package/dist/types/primitives/auxiliary/abortSink/main.d.ts +0 -5
  447. package/dist/types/primitives/auxiliary/abortSink/main.d.ts.map +0 -1
  448. package/dist/types/primitives/auxiliary/abortSink/types.d.ts +0 -7
  449. package/dist/types/primitives/auxiliary/abortSink/types.d.ts.map +0 -1
  450. package/dist/types/types/api/resources/PaymentInstrumentsResource.d.ts +0 -70
  451. package/dist/types/types/api/resources/PaymentInstrumentsResource.d.ts.map +0 -1
@@ -1,4 +1,3 @@
1
- import { jsx as r } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
1
  import { useResponsiveViewport as v, mediaQueries as T } from "../../external/TransactionsOverview/hooks/useResponsiveViewport.js";
3
2
  import b from "../Popover/Popover.js";
4
3
  import { PopoverContainerVariant as N } from "../Popover/types.js";
@@ -9,32 +8,50 @@ import w from "../../../hooks/element/useUniqueIdentifier.js";
9
8
  import u from "classnames";
10
9
  import { Fragment as p, cloneElement as x } from "../../../external/preact/dist/preact.module.js";
11
10
  import "./Tooltip.scss.js";
12
- const O = (t) => typeof t == "string", Q = ({ content: t, children: o, triggerRef: g, showTooltip: s, position: y, isContainerHovered: a = !1 }) => {
11
+ import { jsx as r } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
12
+ const O = (t) => typeof t == "string", Q = ({
13
+ content: t,
14
+ children: o,
15
+ triggerRef: g,
16
+ showTooltip: s,
17
+ position: y,
18
+ isContainerHovered: a = !1
19
+ }) => {
13
20
  var i, f, n;
14
- const e = w(), l = v(T.down.sm), { isVisible: m, listeners: _ } = V();
15
- return l ? /* @__PURE__ */ r(p, { children: o }) : /* @__PURE__ */ r(p, { children: [
16
- o ? x(o, {
21
+ const e = w(), l = v(T.down.sm), {
22
+ isVisible: m,
23
+ listeners: _
24
+ } = V();
25
+ return l ? r(p, {
26
+ children: o
27
+ }) : r(p, {
28
+ children: [o ? x(o, {
17
29
  ...o == null ? void 0 : o.props,
18
30
  role: "button",
19
31
  tabIndex: -1,
20
32
  ref: e,
21
33
  className: (i = o == null ? void 0 : o.props) != null && i.className ? u(`${(f = o == null ? void 0 : o.props) == null ? void 0 : f.className} adyen-pe__tooltip-target`, {
22
34
  " adyen-pe__tooltip-target--hovered": a
23
- }) : u("adyen-pe__tooltip-target", { "adyen-pe__tooltip-target--hovered": a }),
35
+ }) : u("adyen-pe__tooltip-target", {
36
+ "adyen-pe__tooltip-target--hovered": a
37
+ }),
24
38
  ..._,
25
39
  "aria-describedby": `tooltip-${(n = e.current) == null ? void 0 : n.id}`
26
- }) : null,
27
- (m || s) && /* @__PURE__ */ r(
28
- b,
29
- {
30
- variant: N.TOOLTIP,
31
- targetElement: g ?? e,
32
- position: y,
33
- open: m || s,
34
- children: /* @__PURE__ */ r(p, { children: t && O(t) ? /* @__PURE__ */ r(P, { variant: I.CAPTION, children: t }) : { content: t } })
35
- }
36
- )
37
- ] });
40
+ }) : null, (m || s) && r(b, {
41
+ variant: N.TOOLTIP,
42
+ targetElement: g ?? e,
43
+ position: y,
44
+ open: m || s,
45
+ children: r(p, {
46
+ children: t && O(t) ? r(P, {
47
+ variant: I.CAPTION,
48
+ children: t
49
+ }) : {
50
+ content: t
51
+ }
52
+ })
53
+ })]
54
+ });
38
55
  };
39
56
  export {
40
57
  Q as Tooltip
@@ -2,16 +2,13 @@ import { useCallback as s } from "../../../external/preact/hooks/dist/hooks.modu
2
2
  import { InteractionKeyCode as c } from "../../types.js";
3
3
  import a from "../../../hooks/useBooleanState/useBooleanState.js";
4
4
  const m = () => {
5
- const [n, o] = a(), t = s(() => o(!0), [o]), e = s(() => o(!1), [o]), i = s(
6
- (r) => {
7
- switch (r.code) {
8
- case c.ESCAPE:
9
- e();
10
- break;
11
- }
12
- },
13
- [e]
14
- );
5
+ const [n, o] = a(), t = s(() => o(!0), [o]), e = s(() => o(!1), [o]), i = s((r) => {
6
+ switch (r.code) {
7
+ case c.ESCAPE:
8
+ e();
9
+ break;
10
+ }
11
+ }, [e]);
15
12
  return {
16
13
  listeners: {
17
14
  onfocusoutCapture: e,
@@ -1,35 +1,45 @@
1
- import { jsx as S } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
1
  import { DEFAULT_TYPOGRAPHY_CLASSNAME as o } from "./constants.js";
3
- import Y from "classnames";
4
- import { useMemo as f } from "../../../external/preact/hooks/dist/hooks.module.js";
2
+ import S from "classnames";
3
+ import { useMemo as Y } from "../../../external/preact/hooks/dist/hooks.module.js";
5
4
  import { TypographyVariant as T, TypographyModifier as E } from "./types.js";
6
- import { memo as R } from "../../../external/preact/compat/dist/compat.module.js";
5
+ import { memo as f } from "../../../external/preact/compat/dist/compat.module.js";
7
6
  import "./Typography.scss.js";
8
- function y({ el: N, className: s, stronger: I, strongest: L, variant: $, medium: O, large: p, wide: m, children: B }) {
9
- const D = N || "p", A = f(
10
- () => ({
11
- // Caption
12
- [`${o}--${T.CAPTION}`]: $ === T.CAPTION,
13
- [`${o}--${T.CAPTION}-${E.WIDE}`]: $ === T.CAPTION && m,
14
- [`${o}--${T.CAPTION}-${E.STRONGER}`]: $ === T.CAPTION && I,
15
- // Body
16
- [`${o}--${T.BODY}`]: $ === T.BODY,
17
- [`${o}--${T.BODY}-${E.WIDE}`]: $ === T.BODY && m,
18
- [`${o}--${T.BODY}-${E.STRONGER}`]: $ === T.BODY && I,
19
- [`${o}--${T.BODY}-${E.STRONGEST}`]: $ === T.BODY && L,
20
- // Subtitle
21
- [`${o}--${T.SUBTITLE}`]: $ === T.SUBTITLE,
22
- [`${o}--${T.SUBTITLE}-${E.STRONGER}`]: $ === T.SUBTITLE && I,
23
- // Title
24
- [`${o}--${T.TITLE}`]: $ === T.TITLE && !O && !p,
25
- [`${o}--${T.TITLE}-${E.MEDIUM}`]: $ === T.TITLE && O,
26
- [`${o}--${T.TITLE}-${E.LARGE}`]: $ === T.TITLE && p
27
- }),
28
- [$, m, I, O, p, L]
29
- );
30
- return /* @__PURE__ */ S(D, { className: Y([`${o}`, A, s]), children: B });
7
+ import { jsx as R } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
8
+ function y({
9
+ el: N,
10
+ className: s,
11
+ stronger: I,
12
+ strongest: L,
13
+ variant: $,
14
+ medium: O,
15
+ large: p,
16
+ wide: m,
17
+ children: B
18
+ }) {
19
+ const D = N || "p", A = Y(() => ({
20
+ // Caption
21
+ [`${o}--${T.CAPTION}`]: $ === T.CAPTION,
22
+ [`${o}--${T.CAPTION}-${E.WIDE}`]: $ === T.CAPTION && m,
23
+ [`${o}--${T.CAPTION}-${E.STRONGER}`]: $ === T.CAPTION && I,
24
+ // Body
25
+ [`${o}--${T.BODY}`]: $ === T.BODY,
26
+ [`${o}--${T.BODY}-${E.WIDE}`]: $ === T.BODY && m,
27
+ [`${o}--${T.BODY}-${E.STRONGER}`]: $ === T.BODY && I,
28
+ [`${o}--${T.BODY}-${E.STRONGEST}`]: $ === T.BODY && L,
29
+ // Subtitle
30
+ [`${o}--${T.SUBTITLE}`]: $ === T.SUBTITLE,
31
+ [`${o}--${T.SUBTITLE}-${E.STRONGER}`]: $ === T.SUBTITLE && I,
32
+ // Title
33
+ [`${o}--${T.TITLE}`]: $ === T.TITLE && !O && !p,
34
+ [`${o}--${T.TITLE}-${E.MEDIUM}`]: $ === T.TITLE && O,
35
+ [`${o}--${T.TITLE}-${E.LARGE}`]: $ === T.TITLE && p
36
+ }), [$, m, I, O, p, L]);
37
+ return R(D, {
38
+ className: S([`${o}`, A, s]),
39
+ children: B
40
+ });
31
41
  }
32
- const l = R(y);
42
+ const l = f(y);
33
43
  export {
34
44
  l as default
35
45
  };
@@ -1,4 +1,7 @@
1
- const s = { title: "thereWasAnUnexpectedError", message: ["pleaseReachOutToSupportForAssistance"] }, r = (e, t) => {
1
+ const s = {
2
+ title: "thereWasAnUnexpectedError",
3
+ message: ["pleaseReachOutToSupportForAssistance"]
4
+ }, r = (e, t) => {
2
5
  if (!e)
3
6
  return null;
4
7
  switch (e.errorCode) {
@@ -1,10 +1,10 @@
1
- import { jsx as m } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
- import { UNDEFINED_ERROR as n, getCommonErrorMessage as a } from "./getCommonErrorCode.js";
3
- import i from "../internal/CopyText/CopyText.js";
1
+ import { UNDEFINED_ERROR as n, getCommonErrorMessage as m } from "./getCommonErrorCode.js";
2
+ import a from "../internal/CopyText/CopyText.js";
3
+ import { jsx as i } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
4
4
  const d = (e, t, r) => {
5
5
  if (!e)
6
6
  return n;
7
- const o = a(e, r);
7
+ const o = m(e, r);
8
8
  if (o)
9
9
  return o;
10
10
  switch (e.errorCode) {
@@ -20,7 +20,9 @@ const d = (e, t, r) => {
20
20
  title: "somethingWentWrong",
21
21
  message: [t, s],
22
22
  translationValues: {
23
- [s]: e.requestId ? /* @__PURE__ */ m(i, { text: e.requestId }) : null
23
+ [s]: e.requestId ? i(a, {
24
+ text: e.requestId
25
+ }) : null
24
26
  },
25
27
  onContactSupport: r
26
28
  };
@@ -1,22 +1,28 @@
1
- import { jsx as c } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
- import { createContext as p, toChildArray as f } from "../../external/preact/dist/preact.module.js";
3
- import { useContext as m, useState as e, useEffect as d } from "../../external/preact/hooks/dist/hooks.module.js";
1
+ import { createContext as c, toChildArray as p } from "../../external/preact/dist/preact.module.js";
2
+ import { useContext as f, useState as e, useEffect as m } from "../../external/preact/hooks/dist/hooks.module.js";
3
+ import { jsx as d } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
4
4
  import { asyncNoop as h, noop as C } from "../../utils/common.js";
5
5
  import { isWatchlistUnsubscribeToken as x } from "../../primitives/reactive/watchlist/main.js";
6
6
  import { EMPTY_OBJECT as b } from "../../utils/value/constants.js";
7
- const r = p({
7
+ const r = c({
8
8
  endpoints: b,
9
9
  hasError: !1,
10
10
  http: h,
11
11
  isExpired: void 0,
12
12
  refresh: C,
13
13
  refreshing: !1
14
- }), y = ({ children: o, session: t }) => {
14
+ }), y = ({
15
+ children: o,
16
+ session: t
17
+ }) => {
15
18
  const [, s] = e(0), [n, a] = e(0);
16
- return d(() => t.subscribe((u) => {
19
+ return m(() => t.subscribe((u) => {
17
20
  (x(u) ? a : s)((i) => i + 1);
18
- }), [n, t]), /* @__PURE__ */ c(r.Provider, { value: t.context, children: f(o) });
19
- }, J = () => m(r);
21
+ }), [n, t]), d(r.Provider, {
22
+ value: t.context,
23
+ children: p(o)
24
+ });
25
+ }, J = () => f(r);
20
26
  export {
21
27
  y as AuthProvider,
22
28
  J as default,
@@ -1,96 +1,76 @@
1
- var c = Object.defineProperty;
2
- var p = (i, e, t) => e in i ? c(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var s = (i, e, t) => (p(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import l from "./AuthSetupContext.js";
5
- import m from "./AuthSessionSpecification.js";
6
- import { EVT_AUTH_STATE_CHANGE as n, ERR_AUTH_REFRESH_FAILED as h, ERR_AUTH_REFRESH_ABORTED as a } from "./constants.js";
1
+ var _ = Object.defineProperty;
2
+ var f = (i, t, s) => t in i ? _(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s;
3
+ var e = (i, t, s) => (f(i, typeof t != "symbol" ? t + "" : t, s), s);
4
+ import c from "./AuthSetupContext.js";
5
+ import l from "./AuthSessionSpecification.js";
7
6
  import { createErrorContainer as S } from "../../../primitives/auxiliary/errorContainer/main.js";
8
- import { createEventEmitter as C } from "../../../primitives/reactive/eventEmitter/main.js";
9
- import { createAbortable as d } from "../../../primitives/async/abortable/main.js";
10
- import { SessionContext as b } from "../../../primitives/context/session/SessionContext.js";
11
- import { createWatchlist as E } from "../../../primitives/reactive/watchlist/main.js";
12
- import { constant as _, noop as u } from "../../../utils/common.js";
13
- import { EVT_SESSION_REFRESHING_STATE_CHANGE as A, EVT_SESSION_EXPIRED_STATE_CHANGE as x } from "../../../primitives/context/session/constants.js";
14
- import { isFunction as f } from "../../../utils/value/is.js";
15
- import { boolOrFalse as R } from "../../../utils/value/bool.js";
7
+ import { SessionContext as p } from "../../../primitives/context/session/SessionContext.js";
8
+ import { createPromisor as m } from "../../../primitives/async/promisor/main.js";
9
+ import { createWatchlist as u } from "../../../primitives/reactive/watchlist/main.js";
10
+ import { constant as a } from "../../../utils/common.js";
11
+ import { EVT_SESSION_EXPIRED as C, EVT_SESSION_READY as d, ERR_SESSION_REFRESH_ABORTED as x } from "../../../primitives/context/session/constants.js";
12
+ import { isFunction as E } from "../../../utils/value/is.js";
13
+ import { boolOrFalse as g } from "../../../utils/value/bool.js";
16
14
  class D {
17
15
  constructor() {
18
- s(this, "_canSkipSessionRefresh", !1);
19
- s(this, "_lastSessionContextRefreshTimestamp");
20
- s(this, "_overrideRefreshInProgress", !1);
21
- s(this, "_refreshInProgress", !1);
22
- s(this, "_errorContainer", S());
23
- s(this, "_eventEmitter", C());
24
- s(this, "_refreshAbortable", d(a));
25
- s(this, "_specification", new m());
26
- s(this, "_sessionContext", new b(this._specification));
27
- s(this, "_setupContext", new l(this._sessionContext));
28
- s(this, "_watchlist", E({
16
+ e(this, "_canSkipSessionRefresh", !1);
17
+ e(this, "_refreshPromisorSignal");
18
+ e(this, "_errorContainer", S());
19
+ e(this, "_specification", new l());
20
+ e(this, "_sessionContext", new p(this._specification));
21
+ e(this, "_setupContext", new c(this._sessionContext));
22
+ e(this, "_refreshPromisor", m(async (t, s = !1) => {
23
+ let r = !this._refreshPromisorSignal, n = this._refreshPromisorSignal === (this._refreshPromisorSignal = t);
24
+ const o = g(s) && this._canSkipSessionRefresh;
25
+ r && (r = !1, this._errorContainer.reset(), this._onAuthStateChanged());
26
+ try {
27
+ await (o ? this._setupContext : this._sessionContext).refresh(t).finally(() => n = this._refreshPromisorSignal === t);
28
+ } catch (h) {
29
+ if (!n)
30
+ return;
31
+ !t.aborted && (o || h !== x) && this._errorContainer.set(h), r = !o;
32
+ } finally {
33
+ (r || o && n) && (this._refreshPromisorSignal = void 0, this._onAuthStateChanged());
34
+ }
35
+ }));
36
+ e(this, "_watchlist", u({
29
37
  endpoints: () => this._setupContext.endpoints,
30
38
  hasError: () => this._errorContainer.hasError,
31
- http: _(this._sessionContext.http.bind(this._sessionContext)),
39
+ http: a(this._sessionContext.http.bind(this._sessionContext, null)),
32
40
  isExpired: () => this._sessionContext.isExpired,
33
- refresh: _(this._overrideRefresh.bind(this)),
34
- refreshing: () => this._sessionContext.refreshing
41
+ refresh: a(this._refresh.bind(this)),
42
+ refreshing: () => !!this._refreshPromisorSignal
35
43
  }));
36
44
  this.destroy = () => {
37
45
  this._watchlist.on.resume = void 0, this._watchlist.cancelSubscriptions();
38
- };
39
- const e = this._onAuthStateChanged.bind(this), t = this._onSessionExpiredStateChange.bind(this);
40
- this._refreshAbortablePromise = this._refreshAbortablePromise.bind(this), this.subscribe = this._watchlist.subscribe, this._watchlist.on.resume = () => {
41
- let r = [
42
- this._eventEmitter.on(n, this._watchlist.requestNotification),
43
- this._sessionContext.on(A, e),
44
- this._sessionContext.on(x, t)
45
- ];
46
+ }, this.subscribe = this._watchlist.subscribe, this._watchlist.on.resume = () => {
47
+ const t = [this._sessionContext.on(C, () => {
48
+ this._canSkipSessionRefresh = !1, this._onAuthStateChanged();
49
+ }), this._sessionContext.on(d, () => {
50
+ this._refresh(this._canSkipSessionRefresh = !0);
51
+ })];
46
52
  this._watchlist.on.idle = () => {
47
- this._watchlist.on.idle = void 0, r.forEach((o) => o()), r.length = 0, r = void 0;
53
+ this._watchlist.on.idle = void 0, t.forEach((s) => s()), t.length = 0;
48
54
  }, this._refresh();
49
55
  };
50
56
  }
51
57
  get context() {
52
58
  return this._watchlist.snapshot;
53
59
  }
54
- set loadingContext(e) {
55
- this._setupContext.loadingContext = e;
60
+ set loadingContext(t) {
61
+ this._setupContext.loadingContext = t;
56
62
  }
57
- set onSessionCreate(e) {
58
- this._specification.onSessionCreate !== e && (this._specification.onSessionCreate = e, this._refreshInProgress && f(this._specification.onSessionCreate) && (this._canSkipSessionRefresh = !1, this._overrideRefresh()));
59
- }
60
- _onAuthStateChanged() {
61
- this._eventEmitter.emit(n);
63
+ set errorHandler(t) {
64
+ this._specification.errorHandler = t;
62
65
  }
63
- _onSessionExpiredStateChange() {
64
- const { timestamp: e } = this._sessionContext;
65
- (this._canSkipSessionRefresh = this._lastSessionContextRefreshTimestamp !== e) && (this._lastSessionContextRefreshTimestamp = e, this._errorContainer.reset(), this._overrideRefresh()), this._onAuthStateChanged();
66
+ set onSessionCreate(t) {
67
+ this._specification.onSessionCreate !== t && (this._specification.onSessionCreate = t, this._refreshPromisorSignal && E(this._specification.onSessionCreate) && (this._canSkipSessionRefresh = !1, this._refresh()));
66
68
  }
67
- _overrideRefresh(e = this._canSkipSessionRefresh) {
68
- this._overrideRefreshInProgress = !0, this._refresh(e);
69
- }
70
- _refresh(e = !1) {
71
- if (this._refreshInProgress && !this._overrideRefreshInProgress)
72
- return;
73
- this._overrideRefreshInProgress && (this._overrideRefreshInProgress = !1, this._refreshAbortable.abort(), this._refreshAbortable.refresh()), this._refreshInProgress = !0, (R(e) && this._canSkipSessionRefresh ? this._refreshSetupContext() : this._refreshAbortablePromise(this._sessionContext.refresh)).catch(u);
74
- }
75
- async _refreshSetupContext() {
76
- let e = !1;
77
- await this._setupContext.refresh(this._refreshAbortablePromise).then(
78
- () => this._errorContainer.reset(),
79
- (t) => e = t !== h
80
- ).then(() => {
81
- this._refreshInProgress = e, this._onAuthStateChanged();
82
- });
69
+ _onAuthStateChanged() {
70
+ this._watchlist.requestNotification();
83
71
  }
84
- async _refreshAbortablePromise(e) {
85
- const t = this._refreshAbortable.signal;
86
- return (async () => {
87
- const r = f(e) ? e(t) : e, o = await Promise.race([r, this._refreshAbortable.promise]);
88
- if (t.aborted)
89
- throw void 0;
90
- return o;
91
- })().catch((r) => {
92
- throw t.aborted ? a : (this._errorContainer.set(r), h);
93
- });
72
+ _refresh(t = !1) {
73
+ this._refreshPromisor(t);
94
74
  }
95
75
  }
96
76
  export {
@@ -1,63 +1,78 @@
1
- var d = Object.defineProperty;
2
- var l = (i, t, r) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[t] = r;
3
- var s = (i, t, r) => (l(i, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { http as h } from "../../Http/http.js";
5
- import { ErrorTypes as m } from "../../Http/utils.js";
6
- import { AUTO_REFRESH as u, MAX_AGE_MS as a } from "./constants.js";
7
- import { isPlainObject as A, isString as c, isUndefined as E } from "../../../utils/value/is.js";
8
- import { isAbortSignal as S, createAbortSink as R } from "../../../primitives/auxiliary/abortSink/main.js";
9
- import { ERR_SESSION_EXPIRED as g } from "../../../primitives/context/session/constants.js";
10
- import { enumerable as k, getter as O } from "../../../utils/struct/property.js";
11
- import { noop as w } from "../../../utils/common.js";
12
- class _ {
1
+ var f = Object.defineProperty;
2
+ var u = (i, t, r) => t in i ? f(i, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[t] = r;
3
+ var a = (i, t, r) => (u(i, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { http as m } from "../../Http/http.js";
5
+ import { ErrorTypes as A } from "../../Http/utils.js";
6
+ import { AUTO_REFRESH as E, MAX_AGE_MS as h } from "./constants.js";
7
+ import { isPlainObject as _, isString as c, isUndefined as S } from "../../../utils/value/is.js";
8
+ import { ERR_SESSION_EXPIRED as H } from "../../../primitives/context/session/constants.js";
9
+ import { enumerable as p } from "../../../utils/struct/property.js";
10
+ import { isAbortSignal as O, abortSignalForAny as R } from "../../../utils/abort/main.js";
11
+ class w {
13
12
  constructor(t) {
14
- s(this, "assert", (t) => {
15
- if (A(t)) {
13
+ a(this, "assert", (t) => {
14
+ if (_(t)) {
16
15
  const r = c(t.id) ? t.id.trim() : void 0, e = c(t.token) ? t.token.trim() : void 0;
17
16
  if (r && e)
18
17
  return;
19
18
  }
20
19
  throw void 0;
21
20
  });
22
- s(this, "deadline", (t) => {
23
- let r, e;
21
+ a(this, "deadline", (t) => {
22
+ const r = [];
23
+ let e, n;
24
24
  try {
25
- ({ iat: r, exp: e } = JSON.parse(atob(t.token.split(".")[1])));
25
+ ({
26
+ iat: e,
27
+ exp: n
28
+ } = JSON.parse(atob(t == null ? void 0 : t.token.split(".")[1]))), r.push(n);
26
29
  } catch {
27
- r = Date.now();
30
+ e = Date.now();
28
31
  }
29
- if (!E(a)) {
30
- const n = new Date(r);
31
- return Math.min(e ?? 1 / 0, n.setMilliseconds(n.getMilliseconds() + a));
32
+ if (!S(h)) {
33
+ const s = new Date(e);
34
+ r.push(s.setMilliseconds(s.getMilliseconds() + h));
32
35
  }
33
- return e;
36
+ return r;
34
37
  });
35
- s(this, "http", async (t, r, e, n) => {
36
- let { abort: f = w, signal: p } = S(e.signal) ? R(r, e.signal) : { signal: r };
38
+ a(this, "http", async (t, r, e, n) => {
39
+ const {
40
+ headers: s,
41
+ signal: d,
42
+ ...l
43
+ } = e;
37
44
  try {
38
45
  const o = {
39
- ...e,
40
- signal: p,
46
+ ...l,
41
47
  headers: {
42
- ...e.headers,
43
- ...t && { Authorization: `Bearer ${t.token}` }
44
- }
48
+ ...s,
49
+ ...t && {
50
+ Authorization: `Bearer ${t.token}`
51
+ }
52
+ },
53
+ errorHandler: this._errorHandler,
54
+ signal: O(d) ? R([r, d]) : r
45
55
  };
46
- return await h(o, n);
56
+ return await m(o, n);
47
57
  } catch (o) {
48
- throw (o == null ? void 0 : o.type) === m.EXPIRED_TOKEN ? g : o;
49
- } finally {
50
- f();
58
+ throw (o == null ? void 0 : o.type) === A.EXPIRED_TOKEN ? H : o;
51
59
  }
52
60
  });
53
- this.onSessionCreate = t, Object.defineProperties(this, {
54
- autoRefresh: k(u),
55
- onRefresh: O(() => this.onSessionCreate, !0)
61
+ this.onSessionCreate = t, this._errorHandler = this._errorHandler.bind(this), Object.defineProperties(this, {
62
+ autoRefresh: p(E),
63
+ onRefresh: p((r, e) => this.onSessionCreate(e))
56
64
  });
57
65
  }
66
+ _errorHandler(t) {
67
+ try {
68
+ this.errorHandler && this.errorHandler(t);
69
+ } catch {
70
+ }
71
+ throw t;
72
+ }
58
73
  }
59
- const X = _;
74
+ const I = w;
60
75
  export {
61
- _ as AuthSessionSpecification,
62
- X as default
76
+ w as AuthSessionSpecification,
77
+ I as default
63
78
  };