@adyen/adyen-platform-experience-web 1.0.0 → 1.0.2

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 (426) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/es/components/external/BaseElement.js +12 -3
  6. package/dist/es/components/external/PayoutDetails/PayoutDetails.js +18 -14
  7. package/dist/es/components/external/PayoutDetails/components/PayoutData.js +200 -85
  8. package/dist/es/components/external/PayoutDetails/components/constants.js +8 -7
  9. package/dist/es/components/external/PayoutsOverview/PayoutsOverviewElement.js +14 -20
  10. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +137 -116
  11. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverviewContainer/PayoutsOverviewContainer.js +22 -14
  12. package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +92 -56
  13. package/dist/es/components/external/TransactionDetails/TransactionDetails.js +16 -12
  14. package/dist/es/components/external/TransactionDetails/components/TransactionData.js +81 -57
  15. package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +12 -9
  16. package/dist/es/components/external/TransactionsOverview/TransactionsOverviewElement.js +17 -23
  17. package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +16 -4
  18. package/dist/es/components/external/TransactionsOverview/components/BalanceItem/BalanceItem.js +35 -34
  19. package/dist/es/components/external/TransactionsOverview/components/Balances/Balances.js +52 -26
  20. package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +17 -4
  21. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +20 -25
  22. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/constants.js +1 -13
  23. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.js +12 -7
  24. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.js +4 -1
  25. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +47 -20
  26. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +22 -13
  27. package/dist/es/components/external/TransactionsOverview/components/TransactionTotalItem/TransactionTotalItem.js +23 -28
  28. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +30 -30
  29. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +72 -41
  30. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +215 -186
  31. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverviewContainer/TransactionsOverviewContainer.js +22 -14
  32. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.js +21 -14
  33. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +116 -83
  34. package/dist/es/components/external/TransactionsOverview/hooks/useMaxWidths.js +4 -6
  35. package/dist/es/components/external/UIElement/UIElement.js +39 -24
  36. package/dist/es/components/hooks/useBalanceAccountSelection.js +20 -11
  37. package/dist/es/components/hooks/useBalanceAccounts.js +22 -19
  38. package/dist/es/components/hooks/useDefaultOverviewFilterParams.js +28 -16
  39. package/dist/es/components/hooks/useTimezoneAwareDateFormatting.js +31 -0
  40. package/dist/es/components/internal/Accordion/Accordion.js +58 -0
  41. package/dist/es/components/internal/Accordion/Accordion.scss.js +4 -0
  42. package/dist/es/components/internal/Accordion/constants.js +8 -0
  43. package/dist/es/components/internal/BaseButton/BaseButton.js +26 -12
  44. package/dist/es/components/internal/BaseList/BaseList.js +8 -3
  45. package/dist/es/components/internal/Button/Button.js +31 -18
  46. package/dist/es/components/internal/Button/ButtonActions/ButtonActions.js +19 -13
  47. package/dist/es/components/internal/Button/ButtonActions/types.js +4 -1
  48. package/dist/es/components/internal/Button/hooks/useButton.js +7 -10
  49. package/dist/es/components/internal/Calendar/Calendar.js +16 -15
  50. package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +161 -162
  51. package/dist/es/components/internal/Calendar/calendar/facade/index.js +40 -13
  52. package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +17 -18
  53. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +42 -26
  54. package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +32 -24
  55. package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +14 -9
  56. package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +13 -10
  57. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetMonth.js +10 -2
  58. package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +22 -15
  59. package/dist/es/components/internal/Calendar/calendar/timerange/presets/yearToDate.js +5 -1
  60. package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +3 -1
  61. package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +15 -5
  62. package/dist/es/components/internal/Calendar/components/CalendarControls/CalendarControls.js +11 -3
  63. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGrid.js +46 -19
  64. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDate.js +57 -39
  65. package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +44 -26
  66. package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +26 -12
  67. package/dist/es/components/internal/Calendar/hooks/useCalendar.js +53 -45
  68. package/dist/es/components/internal/Calendar/hooks/useCalendarControlsRendering.js +33 -38
  69. package/dist/es/components/internal/Calendar/hooks/useTimezone.js +24 -8
  70. package/dist/es/components/internal/Card/Card.js +28 -17
  71. package/dist/es/components/internal/CopyText/CopyText.js +15 -11
  72. package/dist/es/components/internal/DataGrid/DataGrid.js +104 -68
  73. package/dist/es/components/internal/DataGrid/DataGridCell.js +24 -23
  74. package/dist/es/components/internal/DataGrid/components/InteractiveBody.js +20 -12
  75. package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +24 -14
  76. package/dist/es/components/internal/DataGrid/components/TableBody.js +14 -9
  77. package/dist/es/components/internal/DataGrid/components/TableCells.js +31 -10
  78. package/dist/es/components/internal/DataGrid/components/TableHeaderCell.js +23 -16
  79. package/dist/es/components/internal/DataGrid/hooks/useInteractiveDataGrid.js +75 -68
  80. package/dist/es/components/internal/DataGrid/utils/DataGridProvider.js +23 -18
  81. package/dist/es/components/internal/DataOverviewContainer/DataOverviewContainer.js +15 -15
  82. package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +80 -39
  83. package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +19 -18
  84. package/dist/es/components/internal/DataOverviewDisplay/constants.js +20 -1
  85. package/dist/es/components/internal/DataOverviewError/DataOverviewError.js +13 -16
  86. package/dist/es/components/internal/DatePicker/DatePicker.js +43 -25
  87. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.js +24 -15
  88. package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +25 -29
  89. package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +48 -27
  90. package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +59 -34
  91. package/dist/es/components/internal/FilterBar/FilterBar.js +29 -28
  92. package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +26 -5
  93. package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +52 -47
  94. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +54 -47
  95. package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +83 -90
  96. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +40 -44
  97. package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +117 -102
  98. package/dist/es/components/internal/FormFields/InputBase.js +63 -54
  99. package/dist/es/components/internal/FormFields/InputText.js +11 -5
  100. package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +30 -33
  101. package/dist/es/components/internal/FormFields/Select/Select.js +142 -149
  102. package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +81 -61
  103. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +59 -54
  104. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +51 -31
  105. package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +27 -28
  106. package/dist/es/components/internal/Image/Image.js +21 -8
  107. package/dist/es/components/internal/Img/Img.js +25 -9
  108. package/dist/es/components/internal/Modal/Modal.js +61 -81
  109. package/dist/es/components/internal/Modal/ModalContent/ModalContent.js +23 -4
  110. package/dist/es/components/internal/Pagination/Pagination.js +58 -51
  111. package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +11 -4
  112. package/dist/es/components/internal/Pagination/hooks/useOffsetPagination.js +12 -5
  113. package/dist/es/components/internal/Pagination/hooks/usePageLimit.js +30 -27
  114. package/dist/es/components/internal/Pagination/hooks/usePaginatedRecords.js +104 -67
  115. package/dist/es/components/internal/Pagination/hooks/usePaginatedRecordsFilters.js +7 -1
  116. package/dist/es/components/internal/Pagination/hooks/usePagination.js +34 -13
  117. package/dist/es/components/internal/Popover/Popover.js +118 -128
  118. package/dist/es/components/internal/Popover/PopoverDismissButton/PopoverDismissButton.js +27 -20
  119. package/dist/es/components/internal/Popover/PopoverTitle/PopoverTitle.js +13 -6
  120. package/dist/es/components/internal/Popover/utils/popoverUtil.js +15 -7
  121. package/dist/es/components/internal/Popover/utils/utils.js +9 -8
  122. package/dist/es/components/internal/SVGIcons/CheckedBox.js +18 -10
  123. package/dist/es/components/internal/SVGIcons/Checkmark.js +20 -12
  124. package/dist/es/components/internal/SVGIcons/ChevronDown.js +20 -12
  125. package/dist/es/components/internal/SVGIcons/ChevronLeft.js +18 -10
  126. package/dist/es/components/internal/SVGIcons/ChevronRight.js +18 -10
  127. package/dist/es/components/internal/SVGIcons/ChevronUp.js +20 -12
  128. package/dist/es/components/internal/SVGIcons/Close.js +11 -5
  129. package/dist/es/components/internal/SVGIcons/Copy.js +13 -1
  130. package/dist/es/components/internal/SVGIcons/Filter.js +12 -5
  131. package/dist/es/components/internal/SVGIcons/UncheckedBox.js +18 -4
  132. package/dist/es/components/internal/Spinner/Spinner.js +14 -0
  133. package/dist/es/components/internal/Spinner/Spinner.scss.js +4 -0
  134. package/dist/es/components/internal/StructuredList/StructuredList.js +24 -19
  135. package/dist/es/components/internal/StructuredList/useStructuredListItem.js +14 -15
  136. package/dist/es/components/internal/Tag/Tag.js +16 -16
  137. package/dist/es/components/internal/Tooltip/Tooltip.js +35 -18
  138. package/dist/es/components/internal/Tooltip/useTooltipListeners.js +7 -10
  139. package/dist/es/components/internal/Typography/Typography.js +38 -28
  140. package/dist/es/components/utils/getCommonErrorCode.js +4 -1
  141. package/dist/es/components/utils/getErrorMessage.js +7 -5
  142. package/dist/es/core/Auth/context.js +14 -8
  143. package/dist/es/core/Auth/session/AuthSession.js +53 -73
  144. package/dist/es/core/Auth/session/AuthSessionSpecification.js +54 -39
  145. package/dist/es/core/Auth/session/AuthSetupContext.js +67 -43
  146. package/dist/es/core/Auth/session/constants.js +8 -11
  147. package/dist/es/core/Context/CoreProvider.js +21 -11
  148. package/dist/es/core/Http/http.js +43 -33
  149. package/dist/es/core/Http/utils.js +18 -12
  150. package/dist/es/core/Localization/Localization.js +98 -82
  151. package/dist/es/core/Localization/constants/localization.js +5 -1
  152. package/dist/es/core/Localization/datetime/restamper/constants.js +12 -2
  153. package/dist/es/core/Localization/datetime/restamper/restamper.js +18 -5
  154. package/dist/es/core/Localization/datetime/restamper/utils.js +4 -1
  155. package/dist/es/core/Localization/localization-utils.js +30 -18
  156. package/dist/es/core/Localization/utils.js +6 -1
  157. package/dist/es/core/core.js +26 -17
  158. package/dist/es/hooks/element/useClickOutside.js +29 -35
  159. package/dist/es/hooks/element/useDetachedRender.js +7 -10
  160. package/dist/es/hooks/element/useFocusCursor.js +10 -18
  161. package/dist/es/hooks/element/useFocusTrap.js +3 -6
  162. package/dist/es/hooks/element/usePopoverPositioner.js +43 -65
  163. package/dist/es/hooks/element/useUniqueIdentifier.js +3 -9
  164. package/dist/es/hooks/useCommitAction/useCommitAction.js +25 -19
  165. package/dist/es/hooks/useFetch/useFetch.js +29 -7
  166. package/dist/es/hooks/useImageUrl/useImageUrl.js +12 -10
  167. package/dist/es/hooks/useModalDetails/useModalDetails.js +15 -15
  168. package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -9
  169. package/dist/es/index.js +1 -1
  170. package/dist/es/primitives/async/abortable/main.js +19 -16
  171. package/dist/es/primitives/async/promisor/main.js +13 -12
  172. package/dist/es/primitives/auxiliary/indexed/main.js +18 -22
  173. package/dist/es/primitives/context/session/SessionContext.js +41 -129
  174. package/dist/es/primitives/context/session/constants.js +9 -6
  175. package/dist/es/primitives/context/session/internal/autofresher.js +34 -0
  176. package/dist/es/primitives/context/session/internal/constants.js +7 -0
  177. package/dist/es/primitives/context/session/internal/deadline.js +62 -0
  178. package/dist/es/primitives/context/session/internal/refresher.js +66 -0
  179. package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -1
  180. package/dist/es/primitives/reactive/eventEmitter/main.js +11 -19
  181. package/dist/es/primitives/reactive/reflex/main.js +33 -19
  182. package/dist/es/primitives/reactive/reflex/register.js +9 -3
  183. package/dist/es/primitives/reactive/watchlist/helpers.js +12 -8
  184. package/dist/es/primitives/reactive/watchlist/main.js +4 -5
  185. package/dist/es/primitives/time/clock/main.js +6 -1
  186. package/dist/es/primitives/time/interval/main.js +1 -1
  187. package/dist/es/primitives/time/today/main.js +9 -2
  188. package/dist/es/translations/da-DK.json.js +48 -42
  189. package/dist/es/translations/de-DE.json.js +100 -94
  190. package/dist/es/translations/es-ES.json.js +48 -42
  191. package/dist/es/translations/fr-FR.json.js +35 -29
  192. package/dist/es/translations/index.js +21 -1
  193. package/dist/es/translations/it-IT.json.js +27 -21
  194. package/dist/es/translations/nl-NL.json.js +35 -29
  195. package/dist/es/translations/no-NO.json.js +58 -52
  196. package/dist/es/translations/pt-BR.json.js +27 -21
  197. package/dist/es/translations/sv-SE.json.js +53 -47
  198. package/dist/es/utils/abort/constants.js +5 -0
  199. package/dist/es/utils/abort/internals.js +29 -0
  200. package/dist/es/utils/abort/main.js +51 -0
  201. package/dist/es/utils/preact/memoComparator/main.js +3 -1
  202. package/dist/es/utils/struct/main.js +5 -1
  203. package/dist/style.css +1 -1
  204. package/dist/types/components/external/PayoutDetails/PayoutDetails.d.ts.map +1 -1
  205. package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts +40 -3
  206. package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts.map +1 -1
  207. package/dist/types/components/external/PayoutDetails/components/constants.d.ts +1 -0
  208. package/dist/types/components/external/PayoutDetails/components/constants.d.ts.map +1 -1
  209. package/dist/types/components/external/PayoutsOverview/PayoutsOverviewElement.d.ts.map +1 -1
  210. package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts +1 -1
  211. package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts.map +1 -1
  212. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts +1 -2
  213. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts.map +1 -1
  214. package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts +2 -2
  215. package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts.map +1 -1
  216. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +1 -1
  217. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
  218. package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts +2 -2
  219. package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
  220. package/dist/types/components/external/TransactionDetails/index.d.ts +1 -1
  221. package/dist/types/components/external/TransactionDetails/index.d.ts.map +1 -1
  222. package/dist/types/components/external/TransactionDetails/types.d.ts +2 -5
  223. package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
  224. package/dist/types/components/external/TransactionsOverview/TransactionsOverviewElement.d.ts.map +1 -1
  225. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts +5 -1
  226. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.d.ts.map +1 -1
  227. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/useMultiSelectionFilter.d.ts.map +1 -1
  228. package/dist/types/components/external/TransactionsOverview/components/MultiSelectionFilter/useMultiSelectionFilter/utils.d.ts.map +1 -1
  229. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +1 -1
  230. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
  231. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.d.ts.map +1 -1
  232. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
  233. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +1 -1
  234. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
  235. package/dist/types/components/external/TransactionsOverview/hooks/useMaxWidths.d.ts.map +1 -1
  236. package/dist/types/components/external/UIElement/UIElement.d.ts.map +1 -1
  237. package/dist/types/components/hooks/useBalanceAccounts.d.ts +1 -1
  238. package/dist/types/components/hooks/useBalanceAccounts.d.ts.map +1 -1
  239. package/dist/types/components/hooks/useDefaultOverviewFilterParams.d.ts +2 -1
  240. package/dist/types/components/hooks/useDefaultOverviewFilterParams.d.ts.map +1 -1
  241. package/dist/types/components/hooks/useTimezoneAwareDateFormatting.d.ts +6 -0
  242. package/dist/types/components/hooks/useTimezoneAwareDateFormatting.d.ts.map +1 -0
  243. package/dist/types/components/internal/Accordion/Accordion.d.ts +6 -0
  244. package/dist/types/components/internal/Accordion/Accordion.d.ts.map +1 -0
  245. package/dist/types/components/internal/Accordion/constants.d.ts +6 -0
  246. package/dist/types/components/internal/Accordion/constants.d.ts.map +1 -0
  247. package/dist/types/components/internal/Accordion/types.d.ts +7 -0
  248. package/dist/types/components/internal/Accordion/types.d.ts.map +1 -0
  249. package/dist/types/components/internal/Calendar/calendar/facade/Calendar.d.ts.map +1 -1
  250. package/dist/types/components/internal/Calendar/calendar/timeframe/common/utils.d.ts +1 -1
  251. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts +1 -1
  252. package/dist/types/components/internal/Calendar/calendar/timerange/utils.d.ts.map +1 -1
  253. package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -1
  254. package/dist/types/components/internal/DataGrid/components/InteractiveBody.d.ts.map +1 -1
  255. package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts +1 -1
  256. package/dist/types/components/internal/DataGrid/components/SkeletonBody.d.ts.map +1 -1
  257. package/dist/types/components/internal/DataGrid/components/TableBody.d.ts +1 -1
  258. package/dist/types/components/internal/DataGrid/components/TableBody.d.ts.map +1 -1
  259. package/dist/types/components/internal/DataGrid/components/TableCells.d.ts +1 -1
  260. package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
  261. package/dist/types/components/internal/DataGrid/components/TableHeaderCell.d.ts +1 -1
  262. package/dist/types/components/internal/DataGrid/components/TableHeaderCell.d.ts.map +1 -1
  263. package/dist/types/components/internal/DataGrid/hooks/useInteractiveDataGrid.d.ts.map +1 -1
  264. package/dist/types/components/internal/DataGrid/utils/DataGridProvider.d.ts.map +1 -1
  265. package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
  266. package/dist/types/components/internal/DataOverviewDetails/types.d.ts +3 -6
  267. package/dist/types/components/internal/DataOverviewDetails/types.d.ts.map +1 -1
  268. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts +4 -1
  269. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts.map +1 -1
  270. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts +1 -1
  271. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts.map +1 -1
  272. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts +1 -1
  273. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
  274. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +2 -2
  275. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilter.d.ts +7 -1
  276. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilter.d.ts.map +1 -1
  277. package/dist/types/components/internal/FilterBar/filters/DateFilter/DateFilterCore.d.ts.map +1 -1
  278. package/dist/types/components/internal/FormFields/Select/Select.d.ts.map +1 -1
  279. package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts.map +1 -1
  280. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +12 -3
  281. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts.map +1 -1
  282. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
  283. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts.map +1 -1
  284. package/dist/types/components/internal/FormFields/index.d.ts.map +1 -1
  285. package/dist/types/components/internal/Modal/Modal.d.ts +1 -1
  286. package/dist/types/components/internal/Modal/Modal.d.ts.map +1 -1
  287. package/dist/types/components/internal/Pagination/hooks/types.d.ts +0 -1
  288. package/dist/types/components/internal/Pagination/hooks/types.d.ts.map +1 -1
  289. package/dist/types/components/internal/Pagination/hooks/useCursorPaginatedRecords.d.ts.map +1 -1
  290. package/dist/types/components/internal/Pagination/hooks/useOffsetPaginatedRecords.d.ts.map +1 -1
  291. package/dist/types/components/internal/Pagination/hooks/useOffsetPagination.d.ts.map +1 -1
  292. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts +1 -1
  293. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecords.d.ts.map +1 -1
  294. package/dist/types/components/internal/Pagination/hooks/usePaginatedRecordsFilters.d.ts.map +1 -1
  295. package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts +1 -1
  296. package/dist/types/components/internal/Pagination/hooks/usePagination.d.ts.map +1 -1
  297. package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
  298. package/dist/types/components/internal/Spinner/Spinner.d.ts +18 -0
  299. package/dist/types/components/internal/Spinner/Spinner.d.ts.map +1 -0
  300. package/dist/types/components/internal/Spinner/index.d.ts +2 -0
  301. package/dist/types/components/internal/Spinner/index.d.ts.map +1 -0
  302. package/dist/types/components/internal/StructuredList/types.d.ts +3 -2
  303. package/dist/types/components/internal/StructuredList/types.d.ts.map +1 -1
  304. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +9 -133
  305. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts.map +1 -1
  306. package/dist/types/components/internal/Tooltip/useTooltipListeners.d.ts.map +1 -1
  307. package/dist/types/components/types.d.ts +7 -15
  308. package/dist/types/components/types.d.ts.map +1 -1
  309. package/dist/types/components/utils/getLabel.d.ts +1 -1
  310. package/dist/types/core/Auth/context.d.ts +56 -42
  311. package/dist/types/core/Auth/context.d.ts.map +1 -1
  312. package/dist/types/core/Auth/session/AuthSession.d.ts +62 -53
  313. package/dist/types/core/Auth/session/AuthSession.d.ts.map +1 -1
  314. package/dist/types/core/Auth/session/AuthSessionSpecification.d.ts +7 -4
  315. package/dist/types/core/Auth/session/AuthSessionSpecification.d.ts.map +1 -1
  316. package/dist/types/core/Auth/session/AuthSetupContext.d.ts +58 -43
  317. package/dist/types/core/Auth/session/AuthSetupContext.d.ts.map +1 -1
  318. package/dist/types/core/Auth/session/constants.d.ts +0 -3
  319. package/dist/types/core/Auth/session/constants.d.ts.map +1 -1
  320. package/dist/types/core/Auth/types.d.ts +6 -6
  321. package/dist/types/core/Auth/types.d.ts.map +1 -1
  322. package/dist/types/core/Context/CoreProvider.d.ts +1 -1
  323. package/dist/types/core/Context/CoreProvider.d.ts.map +1 -1
  324. package/dist/types/core/Context/types.d.ts +2 -0
  325. package/dist/types/core/Context/types.d.ts.map +1 -1
  326. package/dist/types/core/Http/http.d.ts.map +1 -1
  327. package/dist/types/core/Http/utils.d.ts.map +1 -1
  328. package/dist/types/core/Localization/Localization.d.ts.map +1 -1
  329. package/dist/types/core/Localization/datetime/restamper/utils.d.ts.map +1 -1
  330. package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
  331. package/dist/types/core/Localization/utils.d.ts +4 -4
  332. package/dist/types/core/Localization/utils.d.ts.map +1 -1
  333. package/dist/types/core/core.d.ts +3 -2
  334. package/dist/types/core/core.d.ts.map +1 -1
  335. package/dist/types/core/types.d.ts +4 -6
  336. package/dist/types/core/types.d.ts.map +1 -1
  337. package/dist/types/hooks/element/useClickOutside.d.ts +2 -1
  338. package/dist/types/hooks/element/useClickOutside.d.ts.map +1 -1
  339. package/dist/types/hooks/element/useDetachedRender.d.ts.map +1 -1
  340. package/dist/types/hooks/element/useFocusTrap.d.ts.map +1 -1
  341. package/dist/types/hooks/useImageUrl/useImageUrl.d.ts.map +1 -1
  342. package/dist/types/hooks/useMediaQuery/useMediaQuery.d.ts.map +1 -1
  343. package/dist/types/hooks/useModalDetails/useModalDetails.d.ts.map +1 -1
  344. package/dist/types/hooks/useMounted/useMounted.d.ts +1 -1
  345. package/dist/types/hooks/useMounted/useMounted.d.ts.map +1 -1
  346. package/dist/types/hooks/useReactiveState/useReactiveState.d.ts.map +1 -1
  347. package/dist/types/hooks/useReflex/useReflex.d.ts.map +1 -1
  348. package/dist/types/primitives/async/abortable/main.d.ts +1 -1
  349. package/dist/types/primitives/async/abortable/main.d.ts.map +1 -1
  350. package/dist/types/primitives/async/promisor/main.d.ts.map +1 -1
  351. package/dist/types/primitives/auxiliary/indexed/helpers.d.ts.map +1 -1
  352. package/dist/types/primitives/auxiliary/indexed/main.d.ts.map +1 -1
  353. package/dist/types/primitives/context/session/SessionContext.d.ts +6 -27
  354. package/dist/types/primitives/context/session/SessionContext.d.ts.map +1 -1
  355. package/dist/types/primitives/context/session/constants.d.ts +6 -3
  356. package/dist/types/primitives/context/session/constants.d.ts.map +1 -1
  357. package/dist/types/primitives/context/session/internal/autofresher.d.ts +7 -0
  358. package/dist/types/primitives/context/session/internal/autofresher.d.ts.map +1 -0
  359. package/dist/types/primitives/context/session/internal/constants.d.ts +5 -0
  360. package/dist/types/primitives/context/session/internal/constants.d.ts.map +1 -0
  361. package/dist/types/primitives/context/session/internal/deadline.d.ts +6 -0
  362. package/dist/types/primitives/context/session/internal/deadline.d.ts.map +1 -0
  363. package/dist/types/primitives/context/session/internal/refresher.d.ts +6 -0
  364. package/dist/types/primitives/context/session/internal/refresher.d.ts.map +1 -0
  365. package/dist/types/primitives/context/session/internal/types.d.ts +27 -0
  366. package/dist/types/primitives/context/session/internal/types.d.ts.map +1 -0
  367. package/dist/types/primitives/context/session/types.d.ts +8 -4
  368. package/dist/types/primitives/context/session/types.d.ts.map +1 -1
  369. package/dist/types/primitives/reactive/effectStack/main.d.ts.map +1 -1
  370. package/dist/types/primitives/reactive/reflex/helpers.d.ts.map +1 -1
  371. package/dist/types/primitives/reactive/reflex/main.d.ts.map +1 -1
  372. package/dist/types/primitives/reactive/watchlist/helpers.d.ts.map +1 -1
  373. package/dist/types/primitives/reactive/watchlist/main.d.ts +1 -1
  374. package/dist/types/primitives/reactive/watchlist/main.d.ts.map +1 -1
  375. package/dist/types/primitives/time/interval/main.d.ts.map +1 -1
  376. package/dist/types/translations/index.d.ts +108 -0
  377. package/dist/types/translations/index.d.ts.map +1 -1
  378. package/dist/types/types/api/endpoints.d.ts +18 -2
  379. package/dist/types/types/api/endpoints.d.ts.map +1 -1
  380. package/dist/types/types/api/models/index.d.ts +1 -0
  381. package/dist/types/types/api/models/index.d.ts.map +1 -1
  382. package/dist/types/types/api/models/reports.d.ts +4 -0
  383. package/dist/types/types/api/models/reports.d.ts.map +1 -0
  384. package/dist/types/types/api/resources/BalanceAccountsResource.d.ts +8 -8
  385. package/dist/types/types/api/resources/BalanceAccountsResource.d.ts.map +1 -1
  386. package/dist/types/types/api/resources/PayoutsResource.d.ts +19 -19
  387. package/dist/types/types/api/resources/PayoutsResource.d.ts.map +1 -1
  388. package/dist/types/types/api/resources/ReportsResource.d.ts +92 -0
  389. package/dist/types/types/api/resources/ReportsResource.d.ts.map +1 -0
  390. package/dist/types/types/api/resources/SetupResource.d.ts +1 -1
  391. package/dist/types/types/api/resources/SetupResource.d.ts.map +1 -1
  392. package/dist/types/types/api/resources/TransactionsResource.d.ts +25 -25
  393. package/dist/types/types/api/resources/TransactionsResource.d.ts.map +1 -1
  394. package/dist/types/utils/abort/constants.d.ts +5 -0
  395. package/dist/types/utils/abort/constants.d.ts.map +1 -0
  396. package/dist/types/utils/abort/internals.d.ts +4 -0
  397. package/dist/types/utils/abort/internals.d.ts.map +1 -0
  398. package/dist/types/utils/abort/main.d.ts +9 -0
  399. package/dist/types/utils/abort/main.d.ts.map +1 -0
  400. package/dist/types/utils/async/main.d.ts.map +1 -1
  401. package/dist/types/utils/collection/main.d.ts +1 -1
  402. package/dist/types/utils/collection/main.d.ts.map +1 -1
  403. package/dist/types/utils/common.d.ts +2 -2
  404. package/dist/types/utils/common.d.ts.map +1 -1
  405. package/dist/types/utils/index.d.ts +1 -0
  406. package/dist/types/utils/index.d.ts.map +1 -1
  407. package/dist/types/utils/preact/fixedForwardRef.d.ts +3 -3
  408. package/dist/types/utils/preact/fixedForwardRef.d.ts.map +1 -1
  409. package/dist/types/utils/struct/main.d.ts +1 -1
  410. package/dist/types/utils/struct/main.d.ts.map +1 -1
  411. package/dist/types/utils/struct/property.d.ts.map +1 -1
  412. package/dist/types/utils/value/is.d.ts +2 -2
  413. package/dist/types/utils/value/is.d.ts.map +1 -1
  414. package/dist/types/utils/value/number.d.ts.map +1 -1
  415. package/package.json +158 -106
  416. package/dist/es/primitives/auxiliary/abortSink/main.js +0 -42
  417. package/dist/types/core/Analytics/types.d.ts +0 -28
  418. package/dist/types/core/Analytics/types.d.ts.map +0 -1
  419. package/dist/types/primitives/auxiliary/abortSink/index.d.ts +0 -3
  420. package/dist/types/primitives/auxiliary/abortSink/index.d.ts.map +0 -1
  421. package/dist/types/primitives/auxiliary/abortSink/main.d.ts +0 -5
  422. package/dist/types/primitives/auxiliary/abortSink/main.d.ts.map +0 -1
  423. package/dist/types/primitives/auxiliary/abortSink/types.d.ts +0 -7
  424. package/dist/types/primitives/auxiliary/abortSink/types.d.ts.map +0 -1
  425. package/dist/types/types/api/resources/PaymentInstrumentsResource.d.ts +0 -70
  426. package/dist/types/types/api/resources/PaymentInstrumentsResource.d.ts.map +0 -1
@@ -1,64 +1,88 @@
1
- var d = Object.defineProperty;
2
- var m = (r, t, e) => t in r ? d(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var u = (r, t, e) => (m(r, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { SETUP_ENDPOINT_PATH as P } from "./constants.js";
5
- import { parseSearchParams as E } from "../../Http/utils.js";
6
- import { EMPTY_OBJECT as _ } from "../../../utils/value/constants.js";
7
- import { noop as f } from "../../../utils/common.js";
8
- import { struct as l, withFreezeProxyHandlers as x, asPlainObject as y } from "../../../utils/struct/main.js";
9
- import { isPlainObject as g, isUndefined as O } from "../../../utils/value/is.js";
10
- class S {
1
+ var P = Object.defineProperty;
2
+ var u = (s, t, r) => t in s ? P(s, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[t] = r;
3
+ var h = (s, t, r) => (u(s, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { SETUP_ENDPOINT_PATH as l } from "./constants.js";
5
+ import { parseSearchParams as d } from "../../Http/utils.js";
6
+ import { EMPTY_OBJECT as f } from "../../../utils/value/constants.js";
7
+ import { createPromisor as y } from "../../../primitives/async/promisor/main.js";
8
+ import { struct as x, withFreezeProxyHandlers as E, asPlainObject as b } from "../../../utils/struct/main.js";
9
+ import { isPlainObject as g, isUndefined as v } from "../../../utils/value/is.js";
10
+ import { isAbortSignal as O, abortSignalForAny as S } from "../../../utils/abort/main.js";
11
+ import { noop as c } from "../../../utils/common.js";
12
+ class k {
11
13
  constructor(t) {
12
- u(this, "_endpoints", _);
13
- u(this, "_revokeEndpointsProxy", f);
14
- this._session = t, this._fetchSetupEndpoint = this._fetchSetupEndpoint.bind(this), this.refresh = this.refresh.bind(this);
14
+ h(this, "_endpoints", f);
15
+ h(this, "_revokeEndpointsProxy", c);
16
+ h(this, "_beforeHttp", async () => {
17
+ await this._refreshPromisor.promise.catch(c);
18
+ });
19
+ h(this, "_refreshPromisor", y((t, r) => {
20
+ const e = O(r) ? S([r, t]) : t;
21
+ return this._fetchSetupEndpoint(e);
22
+ }));
23
+ this._session = t;
24
+ let r;
25
+ this.refresh = (e) => (this._refreshPromisor(e).catch(c), r ?? (r = this._refreshPromisor.promise.finally(() => r = void 0).then(({
26
+ endpoints: i
27
+ }) => {
28
+ this._resetEndpoints(), {
29
+ proxy: this._endpoints,
30
+ revoke: this._revokeEndpointsProxy
31
+ } = this._getEndpointsProxy(i);
32
+ })));
15
33
  }
16
34
  get endpoints() {
17
35
  return this._endpoints;
18
36
  }
19
- async refresh(t) {
20
- this._resetEndpoints();
21
- const { endpoints: e } = await t(this._fetchSetupEndpoint);
22
- ({ proxy: this._endpoints, revoke: this._revokeEndpointsProxy } = this._getEndpointsProxy(e));
23
- }
24
37
  _fetchSetupEndpoint(t) {
25
- return this._session.http({
38
+ return this._session.http(null, {
26
39
  method: "POST",
27
- path: P,
40
+ path: l,
28
41
  errorLevel: "fatal",
29
42
  loadingContext: this.loadingContext,
30
43
  signal: t
31
44
  });
32
45
  }
33
46
  _getEndpointsProxy(t) {
34
- const e = new Set(Object.keys(t)), o = l();
35
- return Proxy.revocable(
36
- _,
37
- x({
38
- get: (a, s, p) => e.has(s) ? (o[s] ?? (o[s] = (() => {
39
- const { method: n = "GET", url: i } = t[s];
40
- if (!O(i || void 0))
41
- return (...c) => {
42
- const h = this._getHttpOptions(n, i, ...c);
43
- return this._session.http(h);
44
- };
45
- })()), o[s]) : Reflect.get(a, s, p)
46
- })
47
- );
47
+ const r = new Set(Object.keys(t)), e = x();
48
+ return Proxy.revocable(f, E({
49
+ get: (i, o, m) => r.has(o) ? (e[o] ?? (e[o] = (() => {
50
+ const {
51
+ method: n = "GET",
52
+ url: a
53
+ } = t[o];
54
+ if (!v(a || void 0))
55
+ return (..._) => {
56
+ const p = this._getHttpOptions(n, a, ..._);
57
+ return this._session.http(this._beforeHttp, p);
58
+ };
59
+ })()), e[o]) : Reflect.get(i, o, m)
60
+ }));
48
61
  }
49
- _getHttpOptions(t, e, ...o) {
50
- const { loadingContext: a } = this, [s, p] = o, { path: n, query: i } = y(p), c = i && E(i);
62
+ _getHttpOptions(t, r, ...e) {
63
+ const {
64
+ loadingContext: i
65
+ } = this, [o, m] = e, {
66
+ path: n,
67
+ query: a
68
+ } = b(m), _ = a && d(a);
51
69
  if (g(n))
52
- for (const h of Object.keys(n))
53
- e = e.replace(`{${h}}`, n[h]);
54
- return { loadingContext: a, ...s, method: t, params: c, path: e };
70
+ for (const p of Object.keys(n))
71
+ r = r.replace(`{${p}}`, n[p]);
72
+ return {
73
+ loadingContext: i,
74
+ ...o,
75
+ method: t,
76
+ params: _,
77
+ path: r
78
+ };
55
79
  }
56
80
  _resetEndpoints() {
57
- this._revokeEndpointsProxy(), this._revokeEndpointsProxy = f, this._endpoints = _;
81
+ this._revokeEndpointsProxy(), this._revokeEndpointsProxy = c, this._endpoints = f;
58
82
  }
59
83
  }
60
- const q = S;
84
+ const U = k;
61
85
  export {
62
- S as AuthSetupContext,
63
- q as default
86
+ k as AuthSetupContext,
87
+ U as default
64
88
  };
@@ -1,14 +1,11 @@
1
- import { boolOrFalse as _ } from "../../../utils/value/bool.js";
2
- const A = Symbol("Error<AUTH_REFRESH_ABORTED>"), R = Symbol("Error<AUTH_REFRESH_FAILED>"), o = "_authStateChange", e = "/setup", T = _(void 0), n = (() => {
3
- let E = 0;
4
- if (Number.isFinite(E) && (E = Math.max(0, ~~E)))
5
- return E;
1
+ import { boolOrFalse as t } from "../../../utils/value/bool.js";
2
+ const o = "/setup", i = t(void 0), r = (() => {
3
+ let e = 0;
4
+ if (Number.isFinite(e) && (e = Math.max(0, ~~e)))
5
+ return e;
6
6
  })();
7
7
  export {
8
- T as AUTO_REFRESH,
9
- A as ERR_AUTH_REFRESH_ABORTED,
10
- R as ERR_AUTH_REFRESH_FAILED,
11
- o as EVT_AUTH_STATE_CHANGE,
12
- n as MAX_AGE_MS,
13
- e as SETUP_ENDPOINT_PATH
8
+ i as AUTO_REFRESH,
9
+ r as MAX_AGE_MS,
10
+ o as SETUP_ENDPOINT_PATH
14
11
  };
@@ -1,23 +1,33 @@
1
- import { jsx as f } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
2
1
  import { toChildArray as d } from "../../external/preact/dist/preact.module.js";
3
2
  import { useMemo as t, useEffect as l } from "../../external/preact/hooks/dist/hooks.module.js";
4
3
  import { CoreContext as u } from "./CoreContext.js";
5
- import p from "../../hooks/useBooleanState/useBooleanState.js";
6
- import C from "../Localization/Localization.js";
7
- const y = ({
8
- i18n: o = new C().i18n,
4
+ import { jsx as p } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
5
+ import C from "../../hooks/useBooleanState/useBooleanState.js";
6
+ import y from "../Localization/Localization.js";
7
+ const v = ({
8
+ i18n: o = new y().i18n,
9
9
  children: a,
10
10
  commonProps: r,
11
11
  loadingContext: e,
12
- updateCore: s
12
+ updateCore: s,
13
+ externalErrorHandler: m
13
14
  }) => {
14
- const [m, n] = p(!1), c = t(() => r || {}, [r]), i = t(() => e ?? "", [e]);
15
+ const [n, c] = C(!1), i = t(() => r || {}, [r]), f = t(() => e ?? "", [e]);
15
16
  return l(() => {
16
17
  (async () => {
17
- await (o == null ? void 0 : o.ready), n(!0);
18
+ await (o == null ? void 0 : o.ready), c(!0);
18
19
  })().catch();
19
- }, []), m ? /* @__PURE__ */ f(u.Provider, { value: { i18n: o, commonProps: c, loadingContext: i, updateCore: s }, children: d(a) }) : null;
20
- }, j = y;
20
+ }, []), n ? p(u.Provider, {
21
+ value: {
22
+ i18n: o,
23
+ commonProps: i,
24
+ loadingContext: f,
25
+ updateCore: s,
26
+ externalErrorHandler: m
27
+ },
28
+ children: d(a)
29
+ }) : null;
30
+ }, q = v;
21
31
  export {
22
- j as default
32
+ q as default
23
33
  };
@@ -1,42 +1,52 @@
1
- import { API_VERSION as m } from "./constants.js";
2
- import { normalizeLoadingContext as u, normalizeUrl as f } from "../utils.js";
3
- import { getRequestObject as g, getErrorType as y, isAdyenErrorResponse as w, handleFetchError as C } from "./utils.js";
4
- async function $(t, c) {
5
- const { errorLevel: l, loadingContext: d = "", path: i } = t, h = g(t, c), s = new URL(`${u(d)}${m}${f(i)}`);
6
- return t.params && t.params.forEach((o, r) => {
7
- const e = decodeURIComponent(o);
8
- e && s.searchParams.append(r, e);
1
+ import { API_VERSION as f } from "./constants.js";
2
+ import { normalizeLoadingContext as g, normalizeUrl as p } from "../utils.js";
3
+ import { getRequestObject as y, getErrorType as w, isAdyenErrorResponse as C, handleFetchError as E } from "./utils.js";
4
+ const l = (e, s) => {
5
+ try {
6
+ e == null || e(s);
7
+ } catch {
8
+ throw s;
9
+ }
10
+ };
11
+ async function R(e, s) {
12
+ const {
13
+ errorLevel: i,
14
+ loadingContext: h = "",
15
+ path: m
16
+ } = e, u = y(e, s), n = new URL(`${g(h)}${f}${p(m)}`);
17
+ return e.params && e.params.forEach((c, r) => {
18
+ const o = decodeURIComponent(c);
19
+ o && n.searchParams.append(r, o);
9
20
  }), (async () => {
10
- let o = !1;
11
- const r = { level: l };
21
+ var o;
22
+ let c = !1;
23
+ const r = {
24
+ level: i
25
+ };
12
26
  try {
13
- const e = await fetch(s, h);
14
- if (e.ok)
27
+ const t = await fetch(n, u);
28
+ if (t.ok)
15
29
  try {
16
- return await e.json();
17
- } catch (n) {
18
- throw o = !0, n;
19
- }
20
- r.type = y(e.status);
21
- const a = await e.json();
22
- if (r.message = t.errorMessage || `Service at ${s} not available`, r.errorCode = String(a.status), r.requestId = a == null ? void 0 : a.requestId, w(a)) {
23
- if (t.errorHandler)
24
- try {
25
- t.errorHandler(a);
26
- return;
27
- } catch (n) {
28
- throw o = !0, n;
30
+ switch ((o = t.headers.get("Content-Type")) == null ? void 0 : o.split(";", 1)[0]) {
31
+ case "application/json":
32
+ return await t.json();
33
+ default:
34
+ return await t.blob();
29
35
  }
30
- r.message = a.detail, r.errorCode = a.errorCode;
31
- }
32
- } catch (e) {
33
- if (o)
34
- throw e;
35
- r.message = t.errorMessage || `Call to ${s} failed. Error: ${e}`;
36
+ } catch (d) {
37
+ throw c = !0, d;
38
+ }
39
+ r.type = w(t.status);
40
+ const a = await t.json();
41
+ r.message = e.errorMessage || `Service at ${n} not available`, r.errorCode = String(a.status), r.requestId = a == null ? void 0 : a.requestId, C(a) && (r.message = a.detail, r.errorCode = a.errorCode), l(e.errorHandler, r);
42
+ } catch (t) {
43
+ if (c)
44
+ throw l(e.errorHandler, t), t;
45
+ l(e.errorHandler, t), r.message = e.errorMessage || `Call to ${n} failed. Error: ${t}`;
36
46
  }
37
- C(r);
47
+ E(r);
38
48
  })();
39
49
  }
40
50
  export {
41
- $ as http
51
+ R as http
42
52
  };
@@ -1,6 +1,6 @@
1
- import c from "../Errors/AdyenPlatformExperienceError.js";
1
+ import s from "../Errors/AdyenPlatformExperienceError.js";
2
2
  import { isNullish as i } from "../../utils/value/is.js";
3
- var s = /* @__PURE__ */ ((e) => (e.NETWORK_ERROR = "NETWORK_ERROR", e.CANCEL = "CANCEL", e.IMPLEMENTATION_ERROR = "IMPLEMENTATION_ERROR", e.ERROR = "ERROR", e.EXPIRED_TOKEN = "EXPIRED_TOKEN", e))(s || {});
3
+ var c = /* @__PURE__ */ ((e) => (e.NETWORK_ERROR = "NETWORK_ERROR", e.CANCEL = "CANCEL", e.IMPLEMENTATION_ERROR = "IMPLEMENTATION_ERROR", e.ERROR = "ERROR", e.EXPIRED_TOKEN = "EXPIRED_TOKEN", e))(c || {});
4
4
  const E = (e) => {
5
5
  switch (e) {
6
6
  case 401:
@@ -9,7 +9,10 @@ const E = (e) => {
9
9
  return "NETWORK_ERROR";
10
10
  }
11
11
  }, l = (e, r) => {
12
- const { headers: t = [], method: n = "GET" } = e;
12
+ const {
13
+ headers: o = [],
14
+ method: n = "GET"
15
+ } = e;
13
16
  return {
14
17
  method: n,
15
18
  mode: "cors",
@@ -18,20 +21,23 @@ const E = (e) => {
18
21
  headers: {
19
22
  Accept: "application/json, text/plain, */*",
20
23
  "Content-Type": "application/json",
21
- ...t
24
+ ...o,
25
+ "SDK-Version": "1.0.2"
22
26
  },
23
27
  redirect: "follow",
24
28
  signal: e.signal,
25
29
  referrerPolicy: "no-referrer-when-downgrade",
26
- ...n === "POST" && r && { body: JSON.stringify(r) }
30
+ ...n === "POST" && r && {
31
+ body: JSON.stringify(r)
32
+ }
27
33
  };
28
34
  };
29
35
  function O({
30
36
  message: e,
31
37
  level: r,
32
- errorCode: t,
38
+ errorCode: o,
33
39
  type: n = "NETWORK_ERROR",
34
- requestId: o
40
+ requestId: t
35
41
  }) {
36
42
  switch (r) {
37
43
  case "silent":
@@ -42,7 +48,7 @@ function O({
42
48
  break;
43
49
  case "error":
44
50
  default:
45
- throw new c(n, o, e, t);
51
+ throw new s(n, t, e, o);
46
52
  }
47
53
  }
48
54
  function f(e) {
@@ -50,14 +56,14 @@ function f(e) {
50
56
  }
51
57
  function u(e) {
52
58
  const r = new URLSearchParams();
53
- for (const t of Object.keys(e)) {
54
- const n = e[t];
55
- i(n) || (Array.isArray(n) ? n.forEach((o) => r.append(t, o)) : r.set(t, String(n)));
59
+ for (const o of Object.keys(e)) {
60
+ const n = e[o];
61
+ i(n) || (Array.isArray(n) ? n.forEach((t) => r.append(o, t)) : r.set(o, String(n)));
56
62
  }
57
63
  return r;
58
64
  }
59
65
  export {
60
- s as ErrorTypes,
66
+ c as ErrorTypes,
61
67
  E as getErrorType,
62
68
  l as getRequestObject,
63
69
  O as handleFetchError,
@@ -1,93 +1,95 @@
1
- var U = Object.defineProperty;
2
- var v = (r, t, s) => t in r ? U(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
3
- var E = (r, t, s) => (v(r, typeof t != "symbol" ? t + "" : t, s), s), R = (r, t, s) => {
1
+ var v = Object.defineProperty;
2
+ var F = (r, t, e) => t in r ? v(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var y = (r, t, e) => (F(r, typeof t != "symbol" ? t + "" : t, e), e), R = (r, t, e) => {
4
4
  if (!t.has(r))
5
- throw TypeError("Cannot " + s);
5
+ throw TypeError("Cannot " + e);
6
6
  };
7
- var e = (r, t, s) => (R(r, t, "read from private field"), s ? s.call(r) : t.get(r)), a = (r, t, s) => {
7
+ var s = (r, t, e) => (R(r, t, "read from private field"), e ? e.call(r) : t.get(r)), o = (r, t, e) => {
8
8
  if (t.has(r))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
- t instanceof WeakSet ? t.add(r) : t.set(r, s);
11
- }, n = (r, t, s, i) => (R(r, t, "write to private field"), i ? i.call(r, s) : t.set(r, s), s);
12
- var w = (r, t, s) => (R(r, t, "access private method"), s);
13
- import { getLocalisedAmount as F } from "./amount/amount-util.js";
14
- import { FALLBACK_LOCALE as O, defaultTranslation as x } from "./constants/locale.js";
15
- import { DEFAULT_LOCALES as C, DEFAULT_DATETIME_FORMAT as M } from "./constants/localization.js";
16
- import { createTranslationsLoader as N, getLocalizationProxyDescriptors as P } from "./localization-utils.js";
17
- import { toTwoLetterCode as _, formatCustomTranslations as I, getTranslation as S } from "./utils.js";
18
- import { en_US as W } from "../../translations/index.js";
10
+ t instanceof WeakSet ? t.add(r) : t.set(r, e);
11
+ }, n = (r, t, e, i) => (R(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
12
+ var _ = (r, t, e) => (R(r, t, "access private method"), e);
13
+ import { getLocalisedAmount as x } from "./amount/amount-util.js";
14
+ import { FALLBACK_LOCALE as E, defaultTranslation as M } from "./constants/locale.js";
15
+ import { DEFAULT_LOCALES as O, DEFAULT_DATETIME_FORMAT as N } from "./constants/localization.js";
16
+ import { createTranslationsLoader as P, getLocalizationProxyDescriptors as I } from "./localization-utils.js";
17
+ import { toTwoLetterCode as z, formatCustomTranslations as W, getTranslation as S } from "./utils.js";
18
+ import { en_US as $ } from "../../translations/index.js";
19
19
  import { createWatchlist as j } from "../../primitives/reactive/watchlist/main.js";
20
20
  import k from "./datetime/restamper/restamper.js";
21
- import { isNullish as $, isUndefined as q, isNull as B } from "../../utils/value/is.js";
22
- import { systemToTimezone as K } from "./datetime/restamper/utils.js";
23
- import { ALREADY_RESOLVED_PROMISE as V } from "../../utils/async/constants.js";
24
- import { struct as Y } from "../../utils/struct/main.js";
25
- import { noop as Z } from "../../utils/common.js";
26
- var l, T, D, f, d, h, A, c, m, L, u, y, z;
27
- class ht {
28
- constructor(t = O, s) {
29
- a(this, y);
30
- a(this, l, O);
31
- a(this, T, _(e(this, l)));
32
- a(this, D, C);
33
- a(this, f, void 0);
34
- a(this, d, x);
35
- a(this, h, N.call(this));
36
- a(this, A, V);
37
- a(this, c, void 0);
38
- a(this, m, void 0);
39
- a(this, L, j({ timestamp: () => performance.now() }));
40
- a(this, u, k());
41
- E(this, "watch", e(this, L).subscribe.bind(void 0));
42
- E(this, "i18n", Y(P.call(this)));
43
- E(this, "preferredTranslations");
44
- this.watch(Z), this.preferredTranslations = s && s.reduce((i, o) => ({ ...i, ...o }), {
45
- [O]: W.en_US
21
+ import { isNullish as b, isUndefined as q, isNull as B } from "../../utils/value/is.js";
22
+ import { ALREADY_RESOLVED_PROMISE as K } from "../../utils/async/constants.js";
23
+ import { struct as V } from "../../utils/struct/main.js";
24
+ import { noop as Y } from "../../utils/common.js";
25
+ var h, L, g, u, p, l, T, c, m, d, f, A, w;
26
+ class nt {
27
+ constructor(t = E, e) {
28
+ o(this, A);
29
+ o(this, h, E);
30
+ o(this, L, z(s(this, h)));
31
+ o(this, g, O);
32
+ o(this, u, void 0);
33
+ o(this, p, M);
34
+ o(this, l, P.call(this));
35
+ o(this, T, K);
36
+ o(this, c, void 0);
37
+ o(this, m, void 0);
38
+ o(this, d, j({
39
+ timestamp: () => performance.now()
40
+ }));
41
+ o(this, f, k());
42
+ y(this, "watch", s(this, d).subscribe.bind(void 0));
43
+ y(this, "i18n", V(I.call(this)));
44
+ y(this, "preferredTranslations");
45
+ this.watch(Y), this.preferredTranslations = e && e.reduce((i, a) => ({
46
+ ...i,
47
+ ...a
48
+ }), {
49
+ [E]: $.en_US
46
50
  }), this.locale = t;
47
51
  }
48
52
  get customTranslations() {
49
- return e(this, f) ?? {};
53
+ return s(this, u) ?? {};
50
54
  }
51
55
  set customTranslations(t) {
52
- let s, i = [...C];
53
- if (!$(t)) {
54
- s = I(t, C);
55
- const o = Object.keys(s);
56
- i = [...C, ...o].filter(
57
- (g, p, b) => b.indexOf(g) === p
58
- );
56
+ let e, i = [...O];
57
+ if (!b(t)) {
58
+ e = W(t, O);
59
+ const a = Object.keys(e);
60
+ i = [...O, ...a].filter((C, D, U) => U.indexOf(C) === D);
59
61
  }
60
- e(this, h).supportedLocales = i, w(this, y, z).call(this, s);
62
+ s(this, l).supportedLocales = i, _(this, A, w).call(this, e);
61
63
  }
62
64
  get languageCode() {
63
- return e(this, T);
65
+ return s(this, L);
64
66
  }
65
67
  get lastRefreshTimestamp() {
66
- return e(this, L).snapshot.timestamp;
68
+ return s(this, d).snapshot.timestamp;
67
69
  }
68
70
  get locale() {
69
- return e(this, l);
71
+ return s(this, h);
70
72
  }
71
73
  set locale(t) {
72
- if ($(t))
73
- this.locale = O;
74
+ if (b(t))
75
+ this.locale = E;
74
76
  else {
75
- if (e(this, h).locale = t, e(this, l) === e(this, h).locale)
77
+ if (s(this, l).locale = t, s(this, h) === s(this, l).locale)
76
78
  return;
77
- w(this, y, z).call(this, e(this, f));
79
+ _(this, A, w).call(this, s(this, u));
78
80
  }
79
81
  }
80
82
  get ready() {
81
- return e(this, A);
83
+ return s(this, T);
82
84
  }
83
85
  get supportedLocales() {
84
- return e(this, D);
86
+ return s(this, g);
85
87
  }
86
88
  get timezone() {
87
- return e(this, u).tz.current;
89
+ return s(this, f).tz.current;
88
90
  }
89
91
  set timezone(t) {
90
- e(this, u).tz = t;
92
+ s(this, f).tz = t;
91
93
  }
92
94
  /**
93
95
  * Returns a translated string from a key in the current {@link Localization.locale}
@@ -95,8 +97,8 @@ class ht {
95
97
  * @param options - Translation options
96
98
  * @returns Translated string
97
99
  */
98
- get(t, s) {
99
- const i = S(e(this, d), t, s);
100
+ get(t, e) {
101
+ const i = S(s(this, p), t, e);
100
102
  return B(i) ? t : i;
101
103
  }
102
104
  /**
@@ -105,8 +107,8 @@ class ht {
105
107
  * @param options - Translation options
106
108
  * @returns boolean
107
109
  */
108
- has(t, s) {
109
- return !!S(e(this, d), t, s);
110
+ has(t, e) {
111
+ return !!S(s(this, p), t, e);
110
112
  }
111
113
  /**
112
114
  * Returns a localized string for an amount
@@ -114,48 +116,62 @@ class ht {
114
116
  * @param currencyCode - Currency code of the amount
115
117
  * @param options - Options for String.prototype.toLocaleString
116
118
  */
117
- amount(t, s, i) {
118
- const { hideCurrency: o, ...g } = i || {}, p = F(t, e(this, l), s, o, {
119
- ...g,
119
+ amount(t, e, i) {
120
+ const {
121
+ hideCurrency: a,
122
+ ...C
123
+ } = i || {}, D = x(t, s(this, h), e, a, {
124
+ ...C,
120
125
  currencyDisplay: "symbol",
121
126
  signDisplay: "never"
122
127
  });
123
- return t < 0 ? `- ${p}` : p;
128
+ return t < 0 ? `- ${D}` : D;
124
129
  }
125
130
  /**
126
131
  * Returns a localized string for a date
127
132
  * @param date - Date to be localized
128
133
  * @param options - Options for {@link Date.toLocaleDateString}
129
134
  */
130
- date(t, s = {}) {
131
- const i = { ...M, timeZone: e(this, u).tz.current, ...s };
132
- return new Date(t).toLocaleDateString(e(this, l), i);
135
+ date(t, e = {}) {
136
+ const i = {
137
+ ...N,
138
+ timeZone: s(this, f).tz.current,
139
+ ...e
140
+ };
141
+ return new Date(t).toLocaleDateString(s(this, h), i);
133
142
  }
134
143
  /**
135
144
  * Returns a localized string for a full date
136
145
  * @param date - Date to be localized
137
146
  */
138
147
  fullDate(t) {
139
- const s = K(e(this, u), t), [, i, o, g, p] = new Date(s).toString().split(/\s+/g);
140
- return `${i} ${o}, ${g}, ${p}`;
148
+ return this.date(t, {
149
+ day: "2-digit",
150
+ month: "short",
151
+ year: "numeric",
152
+ hour: "2-digit",
153
+ minute: "2-digit",
154
+ second: "2-digit",
155
+ hour12: !1
156
+ });
141
157
  }
142
158
  }
143
- l = new WeakMap(), T = new WeakMap(), D = new WeakMap(), f = new WeakMap(), d = new WeakMap(), h = new WeakMap(), A = new WeakMap(), c = new WeakMap(), m = new WeakMap(), L = new WeakMap(), u = new WeakMap(), y = new WeakSet(), z = function(t) {
144
- q(e(this, m)) && n(this, A, new Promise((o) => {
159
+ h = new WeakMap(), L = new WeakMap(), g = new WeakMap(), u = new WeakMap(), p = new WeakMap(), l = new WeakMap(), T = new WeakMap(), c = new WeakMap(), m = new WeakMap(), d = new WeakMap(), f = new WeakMap(), A = new WeakSet(), w = function(t) {
160
+ q(s(this, m)) && n(this, T, new Promise((a) => {
145
161
  n(this, m, () => {
146
- o(e(this, c)), n(this, c, n(this, m, void 0));
162
+ a(s(this, c)), n(this, c, n(this, m, void 0));
147
163
  });
148
164
  }));
149
- const s = () => {
150
- var o;
151
- e(this, c) === i && ((o = e(this, m)) == null || o.call(this));
165
+ const e = () => {
166
+ var a;
167
+ s(this, c) === i && ((a = s(this, m)) == null || a.call(this));
152
168
  }, i = n(this, c, (async () => {
153
- n(this, d, await e(this, h).load(t)), n(this, l, e(this, h).locale), n(this, D, e(this, h).supportedLocales), n(this, f, t), n(this, T, _(e(this, l))), e(this, L).requestNotification();
169
+ n(this, p, await s(this, l).load(t)), n(this, h, s(this, l).locale), n(this, g, s(this, l).supportedLocales), n(this, u, t), n(this, L, z(s(this, h))), s(this, d).requestNotification();
154
170
  })());
155
- i.then(s).catch((o) => {
156
- s(), console.error(o);
171
+ i.then(e).catch((a) => {
172
+ e(), console.error(a);
157
173
  });
158
174
  };
159
175
  export {
160
- ht as default
176
+ nt as default
161
177
  };
@@ -1,4 +1,8 @@
1
- const t = ["da-DK", "de-DE", "en-US", "es-ES", "fr-FR", "it-IT", "nl-NL", "no-NO", "pt-BR", "sv-SE"], n = { year: "numeric", month: "2-digit", day: "2-digit" }, E = t, o = ["constructor", "i18n", "watch", "preferredTranslations"];
1
+ const t = ["da-DK", "de-DE", "en-US", "es-ES", "fr-FR", "it-IT", "nl-NL", "no-NO", "pt-BR", "sv-SE"], n = {
2
+ year: "numeric",
3
+ month: "2-digit",
4
+ day: "2-digit"
5
+ }, E = t, o = ["constructor", "i18n", "watch", "preferredTranslations"];
2
6
  export {
3
7
  n as DEFAULT_DATETIME_FORMAT,
4
8
  E as DEFAULT_LOCALES,