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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/cjs/index.js +2 -2
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/da-DK-a148e492.cjs +2 -0
  4. package/dist/da-DK-a148e492.cjs.map +1 -0
  5. package/dist/de-DE-a39a50e8.cjs +2 -0
  6. package/dist/de-DE-a39a50e8.cjs.map +1 -0
  7. package/dist/es/components/external/PayoutDetails/components/PayoutData.js +41 -41
  8. package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +93 -94
  9. package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +76 -69
  10. package/dist/es/components/external/ReportsOverview/ReportsOverviewElement.js +25 -0
  11. package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +112 -0
  12. package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.scss.js +4 -0
  13. package/dist/es/components/external/ReportsOverview/components/ReportsOverview/constants.js +5 -0
  14. package/dist/es/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.js +30 -0
  15. package/dist/es/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.js +4 -0
  16. package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +149 -0
  17. package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.scss.js +4 -0
  18. package/dist/es/components/external/ReportsOverview/components/ReportsTable/constants.js +7 -0
  19. package/dist/es/components/external/TransactionDetails/components/TransactionData.js +67 -46
  20. package/dist/es/components/external/TransactionDetails/components/TransactionDataSkeleton.js +28 -17
  21. package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +13 -13
  22. package/dist/es/components/external/TransactionsOverview/components/Category/Category.js +19 -14
  23. package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +1 -1
  24. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +10 -10
  25. package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +11 -11
  26. package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +1 -1
  27. package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +183 -164
  28. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.js +31 -24
  29. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +95 -89
  30. package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/constants.js +6 -5
  31. package/dist/es/components/hooks/useCustomColumnsData.js +29 -0
  32. package/dist/es/components/hooks/useFreezePeriod.js +18 -0
  33. package/dist/es/components/{external/TransactionsOverview/hooks → hooks}/useResponsiveViewport.js +2 -2
  34. package/dist/es/components/hooks/useTableColumns.js +46 -0
  35. package/dist/es/components/internal/Accordion/Accordion.js +15 -15
  36. package/dist/es/components/internal/Alert/Alert.js +62 -0
  37. package/dist/es/components/internal/Alert/Alert.scss.js +4 -0
  38. package/dist/es/components/internal/Alert/types.js +4 -0
  39. package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +81 -0
  40. package/dist/es/components/internal/Button/DownloadButton/DownloadButton.scss.js +4 -0
  41. package/dist/es/components/internal/Button/DownloadButton/useDownload.js +18 -0
  42. package/dist/es/components/internal/Card/Card.js +15 -15
  43. package/dist/es/components/internal/DataGrid/DataGrid.js +4 -4
  44. package/dist/es/components/internal/DataGrid/DataGridCell.js +12 -12
  45. package/dist/es/components/internal/DataGrid/components/Icon.js +17 -0
  46. package/dist/es/components/internal/DataGrid/components/SkeletonBody.js +7 -7
  47. package/dist/es/components/internal/DataGrid/components/TableCells.js +54 -37
  48. package/dist/es/components/internal/DataOverviewContainer/DataOverviewContainer.js +11 -11
  49. package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +54 -54
  50. package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +45 -0
  51. package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.scss.js +4 -0
  52. package/dist/es/components/internal/DataOverviewDisplay/constants.js +30 -24
  53. package/dist/es/components/internal/DatePicker/DatePicker.js +10 -10
  54. package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +13 -13
  55. package/dist/es/components/internal/FilterBar/FilterBar.js +50 -42
  56. package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +7 -7
  57. package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +54 -50
  58. package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +1 -1
  59. package/dist/es/components/internal/FormFields/InputBase.js +25 -25
  60. package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +1 -1
  61. package/dist/es/components/internal/FormFields/Select/Select.js +5 -5
  62. package/dist/es/components/internal/FormFields/Select/components/SelectList.js +5 -5
  63. package/dist/es/components/internal/Image/Image.js +6 -6
  64. package/dist/es/components/internal/Img/Img.js +4 -4
  65. package/dist/es/components/internal/Modal/Modal.js +6 -6
  66. package/dist/es/components/internal/Pagination/Pagination.js +17 -17
  67. package/dist/es/components/internal/Popover/Popover.js +11 -11
  68. package/dist/es/components/internal/SVGIcons/Download.js +21 -0
  69. package/dist/es/components/internal/SVGIcons/Warning.js +23 -0
  70. package/dist/es/components/internal/SVGIcons/WarningFilled.js +18 -0
  71. package/dist/es/components/internal/StructuredList/StructuredList.js +8 -8
  72. package/dist/es/components/internal/Tag/Tag.js +8 -8
  73. package/dist/es/components/internal/Tooltip/Tooltip.js +20 -20
  74. package/dist/es/components/internal/Typography/Typography.js +12 -12
  75. package/dist/es/components/utils/getLabel.js +6 -3
  76. package/dist/es/core/Http/http.js +34 -31
  77. package/dist/es/core/Http/utils.js +39 -30
  78. package/dist/es/core/Localization/Localization.js +74 -76
  79. package/dist/es/core/Localization/constants/localization.js +9 -6
  80. package/dist/es/core/Localization/localization-utils.js +11 -12
  81. package/dist/es/core/Localization/utils.js +45 -47
  82. package/dist/es/core/core.js +1 -1
  83. package/dist/es/index.js +14 -12
  84. package/dist/es/translations/da-DK.json.js +2 -218
  85. package/dist/es/translations/de-DE.json.js +2 -218
  86. package/dist/es/translations/en-US.json.js +2 -218
  87. package/dist/es/translations/es-ES.json.js +2 -218
  88. package/dist/es/translations/fr-FR.json.js +2 -218
  89. package/dist/es/translations/index.js +39 -45
  90. package/dist/es/translations/it-IT.json.js +2 -218
  91. package/dist/es/translations/nl-NL.json.js +2 -218
  92. package/dist/es/translations/no-NO.json.js +2 -218
  93. package/dist/es/translations/pt-BR.json.js +2 -218
  94. package/dist/es/translations/sv-SE.json.js +2 -218
  95. package/dist/es/utils/preact/className.js +3 -3
  96. package/dist/es-ES-153e5f15.cjs +2 -0
  97. package/dist/es-ES-153e5f15.cjs.map +1 -0
  98. package/dist/fr-FR-69b3df0d.cjs +2 -0
  99. package/dist/fr-FR-69b3df0d.cjs.map +1 -0
  100. package/dist/it-IT-efca230f.cjs +2 -0
  101. package/dist/it-IT-efca230f.cjs.map +1 -0
  102. package/dist/nl-NL-ffbb8184.cjs +2 -0
  103. package/dist/nl-NL-ffbb8184.cjs.map +1 -0
  104. package/dist/no-NO-eaf65f6f.cjs +2 -0
  105. package/dist/no-NO-eaf65f6f.cjs.map +1 -0
  106. package/dist/pt-BR-590ccc53.cjs +2 -0
  107. package/dist/pt-BR-590ccc53.cjs.map +1 -0
  108. package/dist/style.css +1 -1
  109. package/dist/sv-SE-18f4e86e.cjs +2 -0
  110. package/dist/sv-SE-18f4e86e.cjs.map +1 -0
  111. package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts.map +1 -1
  112. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts +2 -2
  113. package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts.map +1 -1
  114. package/dist/types/components/external/ReportsOverview/ReportsOverviewElement.d.ts +9 -0
  115. package/dist/types/components/external/ReportsOverview/ReportsOverviewElement.d.ts.map +1 -0
  116. package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts +8 -0
  117. package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts.map +1 -0
  118. package/dist/types/components/external/ReportsOverview/components/ReportsOverview/constants.d.ts +3 -0
  119. package/dist/types/components/external/ReportsOverview/components/ReportsOverview/constants.d.ts.map +1 -0
  120. package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.d.ts +4 -0
  121. package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/ReportsOverviewContainer.d.ts.map +1 -0
  122. package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.d.ts +2 -0
  123. package/dist/types/components/external/ReportsOverview/components/ReportsOverviewContainer/constants.d.ts.map +1 -0
  124. package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts +15 -0
  125. package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts.map +1 -0
  126. package/dist/types/components/external/ReportsOverview/components/ReportsTable/constants.d.ts +5 -0
  127. package/dist/types/components/external/ReportsOverview/components/ReportsTable/constants.d.ts.map +1 -0
  128. package/dist/types/components/external/ReportsOverview/index.d.ts +2 -0
  129. package/dist/types/components/external/ReportsOverview/index.d.ts.map +1 -0
  130. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts +20 -2
  131. package/dist/types/components/external/TransactionDetails/components/TransactionData.d.ts.map +1 -1
  132. package/dist/types/components/external/TransactionDetails/components/TransactionDataSkeleton.d.ts.map +1 -1
  133. package/dist/types/components/external/TransactionDetails/types.d.ts +5 -1
  134. package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
  135. package/dist/types/components/external/TransactionsOverview/components/Category/Category.d.ts.map +1 -1
  136. package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts +1 -1
  137. package/dist/types/components/external/TransactionsOverview/components/SummaryItem/types.d.ts.map +1 -1
  138. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +1 -1
  139. package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
  140. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.d.ts.map +1 -1
  141. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts +3 -1
  142. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
  143. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts +1 -0
  144. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/constants.d.ts.map +1 -1
  145. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +5 -0
  146. package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
  147. package/dist/types/components/external/index.d.ts +1 -0
  148. package/dist/types/components/external/index.d.ts.map +1 -1
  149. package/dist/types/components/hooks/useCustomColumnsData.d.ts +13 -0
  150. package/dist/types/components/hooks/useCustomColumnsData.d.ts.map +1 -0
  151. package/dist/types/components/hooks/useFreezePeriod.d.ts +6 -0
  152. package/dist/types/components/hooks/useFreezePeriod.d.ts.map +1 -0
  153. package/dist/types/components/{external/TransactionsOverview/hooks → hooks}/useResponsiveViewport.d.ts +1 -1
  154. package/dist/types/components/hooks/useResponsiveViewport.d.ts.map +1 -0
  155. package/dist/types/components/hooks/useTableColumns.d.ts +20 -0
  156. package/dist/types/components/hooks/useTableColumns.d.ts.map +1 -0
  157. package/dist/types/components/internal/Alert/Alert.d.ts +5 -0
  158. package/dist/types/components/internal/Alert/Alert.d.ts.map +1 -0
  159. package/dist/types/components/internal/Alert/types.d.ts +17 -0
  160. package/dist/types/components/internal/Alert/types.d.ts.map +1 -0
  161. package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts +16 -0
  162. package/dist/types/components/internal/Button/DownloadButton/DownloadButton.d.ts.map +1 -0
  163. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +143 -0
  164. package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -0
  165. package/dist/types/components/internal/DataGrid/DataGrid.d.ts +2 -5
  166. package/dist/types/components/internal/DataGrid/DataGrid.d.ts.map +1 -1
  167. package/dist/types/components/internal/DataGrid/components/Icon.d.ts +7 -0
  168. package/dist/types/components/internal/DataGrid/components/Icon.d.ts.map +1 -0
  169. package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
  170. package/dist/types/components/internal/DataGrid/types.d.ts +4 -3
  171. package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
  172. package/dist/types/components/internal/DataOverviewContainer/DataOverviewContainer.d.ts +1 -1
  173. package/dist/types/components/internal/DataOverviewContainer/DataOverviewContainer.d.ts.map +1 -1
  174. package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
  175. package/dist/types/components/internal/DataOverviewDetails/types.d.ts +3 -2
  176. package/dist/types/components/internal/DataOverviewDetails/types.d.ts.map +1 -1
  177. package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.d.ts +13 -0
  178. package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.d.ts.map +1 -0
  179. package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts +3 -0
  180. package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts.map +1 -0
  181. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts +5 -2
  182. package/dist/types/components/internal/DataOverviewDisplay/constants.d.ts.map +1 -1
  183. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts +1 -1
  184. package/dist/types/components/internal/DataOverviewError/DataOverviewError.d.ts.map +1 -1
  185. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts +1 -1
  186. package/dist/types/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.d.ts.map +1 -1
  187. package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts +1 -1
  188. package/dist/types/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.d.ts.map +1 -1
  189. package/dist/types/components/internal/FilterBar/FilterBar.d.ts +9 -2
  190. package/dist/types/components/internal/FilterBar/FilterBar.d.ts.map +1 -1
  191. package/dist/types/components/internal/FilterBar/filters/AmountFilter/RangeSelection.d.ts.map +1 -1
  192. package/dist/types/components/internal/FilterBar/index.d.ts +1 -0
  193. package/dist/types/components/internal/FilterBar/index.d.ts.map +1 -1
  194. package/dist/types/components/internal/FilterBar/types.d.ts +11 -1
  195. package/dist/types/components/internal/FilterBar/types.d.ts.map +1 -1
  196. package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
  197. package/dist/types/components/internal/Pagination/Pagination.d.ts.map +1 -1
  198. package/dist/types/components/internal/SVGIcons/Download.d.ts +4 -0
  199. package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -0
  200. package/dist/types/components/internal/SVGIcons/Warning.d.ts +4 -0
  201. package/dist/types/components/internal/SVGIcons/Warning.d.ts.map +1 -0
  202. package/dist/types/components/internal/SVGIcons/WarningFilled.d.ts +4 -0
  203. package/dist/types/components/internal/SVGIcons/WarningFilled.d.ts.map +1 -0
  204. package/dist/types/components/internal/StructuredList/types.d.ts +1 -1
  205. package/dist/types/components/internal/StructuredList/types.d.ts.map +1 -1
  206. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +2 -2
  207. package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts.map +1 -1
  208. package/dist/types/components/types.d.ts +33 -1
  209. package/dist/types/components/types.d.ts.map +1 -1
  210. package/dist/types/components/utils/getCommonErrorCode.d.ts +1 -1
  211. package/dist/types/components/utils/getCommonErrorCode.d.ts.map +1 -1
  212. package/dist/types/components/utils/getErrorMessage.d.ts +1 -1
  213. package/dist/types/components/utils/getErrorMessage.d.ts.map +1 -1
  214. package/dist/types/components/utils/getLabel.d.ts +4 -1
  215. package/dist/types/components/utils/getLabel.d.ts.map +1 -1
  216. package/dist/types/core/Auth/context.d.ts +8 -6
  217. package/dist/types/core/Auth/context.d.ts.map +1 -1
  218. package/dist/types/core/Auth/session/AuthSession.d.ts +8 -6
  219. package/dist/types/core/Auth/session/AuthSession.d.ts.map +1 -1
  220. package/dist/types/core/Auth/session/AuthSetupContext.d.ts +8 -6
  221. package/dist/types/core/Auth/session/AuthSetupContext.d.ts.map +1 -1
  222. package/dist/types/core/Http/http.d.ts.map +1 -1
  223. package/dist/types/core/Http/utils.d.ts +2 -0
  224. package/dist/types/core/Http/utils.d.ts.map +1 -1
  225. package/dist/types/core/Localization/Localization.d.ts +8 -10
  226. package/dist/types/core/Localization/Localization.d.ts.map +1 -1
  227. package/dist/types/core/Localization/constants/localization.d.ts +5 -2
  228. package/dist/types/core/Localization/constants/localization.d.ts.map +1 -1
  229. package/dist/types/core/Localization/localization-utils.d.ts +4 -4
  230. package/dist/types/core/Localization/localization-utils.d.ts.map +1 -1
  231. package/dist/types/core/Localization/types.d.ts +0 -19
  232. package/dist/types/core/Localization/types.d.ts.map +1 -1
  233. package/dist/types/core/Localization/utils.d.ts +7 -271
  234. package/dist/types/core/Localization/utils.d.ts.map +1 -1
  235. package/dist/types/core/core.d.ts +2 -3
  236. package/dist/types/core/core.d.ts.map +1 -1
  237. package/dist/types/core/types.d.ts +5 -4
  238. package/dist/types/core/types.d.ts.map +1 -1
  239. package/dist/types/hooks/useFetch/useFetch.d.ts +1 -1
  240. package/dist/types/hooks/useFetch/useFetch.d.ts.map +1 -1
  241. package/dist/types/hooks/useModalDetails/types.d.ts +1 -1
  242. package/dist/types/hooks/useModalDetails/types.d.ts.map +1 -1
  243. package/dist/types/index.d.ts +2 -3
  244. package/dist/types/index.d.ts.map +1 -1
  245. package/dist/types/translations/index.d.ts +44 -2529
  246. package/dist/types/translations/index.d.ts.map +1 -1
  247. package/dist/types/types/api/models/reports.d.ts +1 -1
  248. package/dist/types/types/api/models/reports.d.ts.map +1 -1
  249. package/dist/types/types/api/resources/ReportsResource.d.ts +18 -19
  250. package/dist/types/types/api/resources/ReportsResource.d.ts.map +1 -1
  251. package/dist/types/utils/types.d.ts +3 -0
  252. package/dist/types/utils/types.d.ts.map +1 -1
  253. package/package.json +7 -5
  254. package/dist/es/core/Localization/constants/locale.js +0 -7
  255. package/dist/types/components/external/TransactionsOverview/hooks/useResponsiveViewport.d.ts.map +0 -1
  256. package/dist/types/core/Localization/constants/locale.d.ts +0 -139
  257. package/dist/types/core/Localization/constants/locale.d.ts.map +0 -1
@@ -1,68 +1,68 @@
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) => {
1
+ var U = Object.defineProperty;
2
+ var b = (r, t, e) => t in r ? U(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var R = (r, t, e) => (b(r, typeof t != "symbol" ? t + "" : t, e), e), z = (r, t, e) => {
4
4
  if (!t.has(r))
5
5
  throw TypeError("Cannot " + e);
6
6
  };
7
- var s = (r, t, e) => (R(r, t, "read from private field"), e ? e.call(r) : t.get(r)), o = (r, t, e) => {
7
+ var s = (r, t, e) => (z(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
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
- import { createWatchlist as j } from "../../primitives/reactive/watchlist/main.js";
20
- import k from "./datetime/restamper/restamper.js";
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 {
11
+ }, a = (r, t, e, i) => (z(r, t, "write to private field"), i ? i.call(r, e) : t.set(r, e), e);
12
+ var C = (r, t, e) => (z(r, t, "access private method"), e);
13
+ import { FALLBACK_LOCALE as E, DEFAULT_TRANSLATIONS as j, getLocalesFromTranslationSourcesRecord as x, DEFAULT_DATETIME_FORMAT as I, SUPPORTED_LOCALES as M } from "./constants/localization.js";
14
+ import { en_US as _ } from "../../translations/index.js";
15
+ import { getLocalisedAmount as W } from "./amount/amount-util.js";
16
+ import { createTranslationsLoader as $, getLocalizationProxyDescriptors as k } from "./localization-utils.js";
17
+ import { toTwoLetterCode as w, formatCustomTranslations as q, getTranslation as F } from "./utils.js";
18
+ import { createWatchlist as v } from "../../primitives/reactive/watchlist/main.js";
19
+ import B from "./datetime/restamper/restamper.js";
20
+ import { isNullish as N, isUndefined as K, isNull as V } from "../../utils/value/is.js";
21
+ import { ALREADY_RESOLVED_PROMISE as Y } from "../../utils/async/constants.js";
22
+ import { struct as Z } from "../../utils/struct/main.js";
23
+ import { noop as G } from "../../utils/common.js";
24
+ var h, g, u, T, f, p, c, A, l, m, d, L, D, S;
25
+ class ht {
27
26
  constructor(t = E, e) {
28
- o(this, A);
27
+ o(this, D);
29
28
  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);
29
+ o(this, g, w(s(this, h)));
30
+ o(this, u, [E]);
31
+ o(this, T, s(this, u));
32
+ o(this, f, void 0);
33
+ o(this, p, j);
34
+ o(this, c, $.call(this));
35
+ o(this, A, Y);
36
+ o(this, l, void 0);
37
37
  o(this, m, void 0);
38
- o(this, d, j({
38
+ o(this, d, v({
39
39
  timestamp: () => performance.now()
40
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) => ({
41
+ o(this, L, B());
42
+ R(this, "watch", s(this, d).subscribe.bind(void 0));
43
+ R(this, "i18n", Z(k.call(this)));
44
+ R(this, "preferredTranslations");
45
+ this.watch(G), this.preferredTranslations = Object.freeze((e == null ? void 0 : e.reduce((i, n) => ({
46
46
  ...i,
47
- ...a
48
- }), {
49
- [E]: $.en_US
50
- }), this.locale = t;
47
+ ...n
48
+ }), _)) ?? {
49
+ ..._
50
+ }), a(this, u, x(this.preferredTranslations)), this.locale = t;
51
51
  }
52
52
  get customTranslations() {
53
- return s(this, u) ?? {};
53
+ return s(this, f) ?? {};
54
54
  }
55
55
  set customTranslations(t) {
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);
56
+ let e, i = [...s(this, u)];
57
+ if (!N(t)) {
58
+ e = q(t, M);
59
+ const n = Object.keys(e);
60
+ i = [...i, ...n].sort().filter((y, O, P) => P.indexOf(y) === O);
61
61
  }
62
- s(this, l).supportedLocales = i, _(this, A, w).call(this, e);
62
+ s(this, c).supportedLocales = i, C(this, D, S).call(this, e);
63
63
  }
64
64
  get languageCode() {
65
- return s(this, L);
65
+ return s(this, g);
66
66
  }
67
67
  get lastRefreshTimestamp() {
68
68
  return s(this, d).snapshot.timestamp;
@@ -71,25 +71,25 @@ class nt {
71
71
  return s(this, h);
72
72
  }
73
73
  set locale(t) {
74
- if (b(t))
74
+ if (N(t))
75
75
  this.locale = E;
76
76
  else {
77
- if (s(this, l).locale = t, s(this, h) === s(this, l).locale)
77
+ if (s(this, c).locale = t, s(this, h) === s(this, c).locale)
78
78
  return;
79
- _(this, A, w).call(this, s(this, u));
79
+ C(this, D, S).call(this, s(this, f));
80
80
  }
81
81
  }
82
82
  get ready() {
83
- return s(this, T);
83
+ return s(this, A);
84
84
  }
85
85
  get supportedLocales() {
86
- return s(this, g);
86
+ return s(this, T);
87
87
  }
88
88
  get timezone() {
89
- return s(this, f).tz.current;
89
+ return s(this, L).tz.current;
90
90
  }
91
91
  set timezone(t) {
92
- s(this, f).tz = t;
92
+ s(this, L).tz = t;
93
93
  }
94
94
  /**
95
95
  * Returns a translated string from a key in the current {@link Localization.locale}
@@ -98,8 +98,8 @@ class nt {
98
98
  * @returns Translated string
99
99
  */
100
100
  get(t, e) {
101
- const i = S(s(this, p), t, e);
102
- return B(i) ? t : i;
101
+ const i = F(s(this, p), t, e);
102
+ return V(i) ? t : i;
103
103
  }
104
104
  /**
105
105
  * Returns a boolean that checks if the translation key exists in the current {@link Localization.locale}
@@ -108,7 +108,7 @@ class nt {
108
108
  * @returns boolean
109
109
  */
110
110
  has(t, e) {
111
- return !!S(s(this, p), t, e);
111
+ return !!F(s(this, p), t, e);
112
112
  }
113
113
  /**
114
114
  * Returns a localized string for an amount
@@ -118,14 +118,14 @@ class nt {
118
118
  */
119
119
  amount(t, e, i) {
120
120
  const {
121
- hideCurrency: a,
122
- ...C
123
- } = i || {}, D = x(t, s(this, h), e, a, {
124
- ...C,
121
+ hideCurrency: n,
122
+ ...y
123
+ } = i || {}, O = W(t, s(this, h), e, n, {
124
+ ...y,
125
125
  currencyDisplay: "symbol",
126
126
  signDisplay: "never"
127
127
  });
128
- return t < 0 ? `- ${D}` : D;
128
+ return t < 0 ? `- ${O}` : O;
129
129
  }
130
130
  /**
131
131
  * Returns a localized string for a date
@@ -134,8 +134,8 @@ class nt {
134
134
  */
135
135
  date(t, e = {}) {
136
136
  const i = {
137
- ...N,
138
- timeZone: s(this, f).tz.current,
137
+ ...I,
138
+ timeZone: s(this, L).tz.current,
139
139
  ...e
140
140
  };
141
141
  return new Date(t).toLocaleDateString(s(this, h), i);
@@ -146,9 +146,7 @@ class nt {
146
146
  */
147
147
  fullDate(t) {
148
148
  return this.date(t, {
149
- day: "2-digit",
150
149
  month: "short",
151
- year: "numeric",
152
150
  hour: "2-digit",
153
151
  minute: "2-digit",
154
152
  second: "2-digit",
@@ -156,22 +154,22 @@ class nt {
156
154
  });
157
155
  }
158
156
  }
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) => {
161
- n(this, m, () => {
162
- a(s(this, c)), n(this, c, n(this, m, void 0));
157
+ h = new WeakMap(), g = new WeakMap(), u = new WeakMap(), T = new WeakMap(), f = new WeakMap(), p = new WeakMap(), c = new WeakMap(), A = new WeakMap(), l = new WeakMap(), m = new WeakMap(), d = new WeakMap(), L = new WeakMap(), D = new WeakSet(), S = function(t) {
158
+ K(s(this, m)) && a(this, A, new Promise((n) => {
159
+ a(this, m, () => {
160
+ n(s(this, l)), a(this, l, a(this, m, void 0));
163
161
  });
164
162
  }));
165
163
  const e = () => {
166
- var a;
167
- s(this, c) === i && ((a = s(this, m)) == null || a.call(this));
168
- }, i = n(this, c, (async () => {
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();
164
+ var n;
165
+ s(this, l) === i && ((n = s(this, m)) == null || n.call(this));
166
+ }, i = a(this, l, (async () => {
167
+ a(this, p, await s(this, c).load(t)), a(this, h, s(this, c).locale), a(this, T, Object.freeze(s(this, c).supportedLocales)), a(this, f, t), a(this, g, w(s(this, h))), s(this, d).requestNotification();
170
168
  })());
171
- i.then(e).catch((a) => {
172
- e(), console.error(a);
169
+ i.then(e).catch((n) => {
170
+ e(), console.error(n);
173
171
  });
174
172
  };
175
173
  export {
176
- nt as default
174
+ ht as default
177
175
  };
@@ -1,11 +1,14 @@
1
- const t = ["da-DK", "de-DE", "en-US", "es-ES", "fr-FR", "it-IT", "nl-NL", "no-NO", "pt-BR", "sv-SE"], n = {
1
+ import { all_locales as o } from "../../../translations/index.js";
2
+ const c = "en-US", s = o.en_US, a = {
2
3
  year: "numeric",
3
4
  month: "2-digit",
4
5
  day: "2-digit"
5
- }, E = t, o = ["constructor", "i18n", "watch", "preferredTranslations"];
6
+ }, L = ["constructor", "i18n", "watch", "preferredTranslations"], n = (t) => [...new Set(Object.keys(t).map((e) => e.replace(/_/g, "-")).sort())], A = n(o);
6
7
  export {
7
- n as DEFAULT_DATETIME_FORMAT,
8
- E as DEFAULT_LOCALES,
9
- o as EXCLUDE_PROPS,
10
- t as SUPPORTED_LOCALES
8
+ a as DEFAULT_DATETIME_FORMAT,
9
+ s as DEFAULT_TRANSLATIONS,
10
+ L as EXCLUDE_PROPS,
11
+ c as FALLBACK_LOCALE,
12
+ A as SUPPORTED_LOCALES,
13
+ n as getLocalesFromTranslationSourcesRecord
11
14
  };
@@ -1,19 +1,18 @@
1
- import { loadTranslations as i, formatLocale as a, parseLocale as l } from "./utils.js";
2
- import { FALLBACK_LOCALE as n } from "./constants/locale.js";
3
- import { EXCLUDE_PROPS as c } from "./constants/localization.js";
4
- import p from "./Localization.js";
1
+ import i from "./Localization.js";
2
+ import { loadTranslations as a, formatLocale as l, parseLocale as n } from "./utils.js";
3
+ import { FALLBACK_LOCALE as c, EXCLUDE_PROPS as p } from "./constants/localization.js";
5
4
  import { struct as f } from "../../utils/struct/main.js";
6
5
  import { isFunction as s } from "../../utils/value/is.js";
7
- function b() {
6
+ function h() {
8
7
  let o = this.locale, r = o, t = [...this.supportedLocales];
9
8
  return f({
10
9
  load: {
11
- value: (e) => i(o, this.preferredTranslations, e)
10
+ value: (e) => a(o, this.preferredTranslations, e)
12
11
  },
13
12
  locale: {
14
13
  get: () => o,
15
14
  set: (e) => {
16
- r = e, o = a(e) || l(e, t) || n;
15
+ r = e, o = l(e) || n(e, t) || c;
17
16
  }
18
17
  },
19
18
  supportedLocales: {
@@ -24,11 +23,11 @@ function b() {
24
23
  }
25
24
  });
26
25
  }
27
- function O() {
26
+ function b() {
28
27
  var r;
29
28
  const o = {};
30
- for (const [t, e] of Object.entries(Object.getOwnPropertyDescriptors(p.prototype)))
31
- c.includes(t) || (s(e.get) ? o[t] = {
29
+ for (const [t, e] of Object.entries(Object.getOwnPropertyDescriptors(i.prototype)))
30
+ p.includes(t) || (s(e.get) ? o[t] = {
32
31
  get: e.get.bind(this),
33
32
  ...t === "timezone" && {
34
33
  set: (r = e.set) == null ? void 0 : r.bind(this)
@@ -41,6 +40,6 @@ function O() {
41
40
  return o;
42
41
  }
43
42
  export {
44
- b as createTranslationsLoader,
45
- O as getLocalizationProxyDescriptors
43
+ h as createTranslationsLoader,
44
+ b as getLocalizationProxyDescriptors
46
45
  };
@@ -1,66 +1,64 @@
1
- import { LOCALE_FORMAT_REGEX as C, FALLBACK_LOCALE as l, defaultTranslation as O } from "./constants/locale.js";
2
- import { en_US as A } from "../../translations/index.js";
1
+ import { FALLBACK_LOCALE as d, DEFAULT_TRANSLATIONS as A } from "./constants/localization.js";
3
2
  import { hasOwnProperty as f } from "../../utils/struct/property.js";
4
- import { EMPTY_OBJECT as u } from "../../utils/value/constants.js";
5
- import { asPlainObject as m } from "../../utils/struct/main.js";
6
- const p = {
7
- values: u,
3
+ import { EMPTY_OBJECT as c } from "../../utils/value/constants.js";
4
+ import { isFunction as C } from "../../utils/value/is.js";
5
+ import { asPlainObject as O } from "../../utils/struct/main.js";
6
+ const m = {
7
+ values: c,
8
8
  count: 0
9
- }, g = {
10
- "en-US": A.en_US
11
- }, _ = (e) => e.substring(0, 2).toLowerCase();
12
- function S(e, n) {
9
+ }, p = /^[a-z]{2}-[A-Z]{2}$/, l = (e) => e.substring(0, 2).toLowerCase();
10
+ function g(e, r) {
13
11
  if (!e)
14
12
  return null;
15
- const r = _(e);
16
- return n.find((t) => _(t) === r) || null;
13
+ const t = l(e);
14
+ return r.find((o) => l(o) === t) || null;
17
15
  }
18
- function d(e) {
19
- const n = e.replace("_", "-");
20
- if (C.test(n))
21
- return n;
22
- const [r, t] = n.split("-");
23
- if (!r || !t)
16
+ function i(e) {
17
+ const r = e.replace("_", "-");
18
+ if (p.test(r))
19
+ return r;
20
+ const [t, o] = r.split("-");
21
+ if (!t || !o)
24
22
  return null;
25
- const o = `${r.toLowerCase()}-${t.toUpperCase()}`;
26
- return o.length === 5 ? o : null;
23
+ const n = `${t.toLowerCase()}-${o.toUpperCase()}`;
24
+ return n.length === 5 ? n : null;
27
25
  }
28
- function i(e, n) {
29
- const r = e.trim();
30
- if (!r || r.length < 1 || r.length > 5)
31
- return l;
32
- const t = d(r);
33
- return t && n.indexOf(t) > -1 ? t : S(t ?? r, [...n]);
26
+ function _(e, r) {
27
+ const t = e.trim();
28
+ if (!t || t.length < 1 || t.length > 5)
29
+ return d;
30
+ const o = i(t);
31
+ return o && r.includes(o) ? o : g(o ?? t, r);
34
32
  }
35
- function h(e = u, n) {
36
- return e === u ? e : Object.keys(e).reduce((r, t) => {
37
- const o = d(t) || i(t, n);
38
- return o && e[t] && (r[o] = e[t]), r;
33
+ function F(e = c, r) {
34
+ return e === c ? e : Object.keys(e).reduce((t, o) => {
35
+ const n = i(o) || _(o, r);
36
+ return n && e[o] && (t[n] = e[o]), t;
39
37
  }, {});
40
38
  }
41
- const L = (e, n) => e.replace(/%{(\w+)}/g, (r, t) => (n == null ? void 0 : n[t]) || ""), N = (e, n, r = p) => {
42
- const t = r.count ?? 0, o = `${n}__${t}`;
43
- if (f(e, o) && e[o])
44
- return L(e[o], r.values);
45
- const c = `${n}__plural`;
46
- return f(e, c) && t > 1 && e[c] ? L(e[c], r.values) : f(e, n) && e[n] ? L(e[n], r.values) : null;
47
- }, U = async (e, n, r = u) => {
48
- const t = n ?? g, o = i(e, Object.keys(t)) || l, c = t[o] || t[l];
39
+ const L = (e, r) => e.replace(/%{(\w+)}/g, (t, o) => (r == null ? void 0 : r[o]) || ""), N = (e, r, t = m) => {
40
+ const o = t.count ?? 0, n = `${r}__${o}`;
41
+ if (f(e, n) && e[n])
42
+ return L(e[n], t.values);
43
+ const u = `${r}__plural`;
44
+ return f(e, u) && o > 1 && e[u] ? L(e[u], t.values) : f(e, r) && e[r] ? L(e[r], t.values) : null;
45
+ }, S = async (e, r = c, t = c) => {
46
+ const o = _(e, Object.keys(r)) || d, n = r[o];
49
47
  return {
50
- ...O,
48
+ ...A,
51
49
  // Default en-US translations (in case any other translation file is missing any key)
52
- ...c,
50
+ ...await (C(n) ? n() : n) ?? c,
53
51
  // Merge with our locale file of the locale they are loading
54
- ...m(r == null ? void 0 : r[e])
52
+ ...O(t == null ? void 0 : t[e])
55
53
  // Merge with their custom locales if available
56
54
  };
57
55
  };
58
56
  export {
59
- h as formatCustomTranslations,
60
- d as formatLocale,
57
+ F as formatCustomTranslations,
58
+ i as formatLocale,
61
59
  N as getTranslation,
62
- U as loadTranslations,
63
- S as matchLocale,
64
- i as parseLocale,
65
- _ as toTwoLetterCode
60
+ S as loadTranslations,
61
+ g as matchLocale,
62
+ _ as parseLocale,
63
+ l as toTwoLetterCode
66
64
  };
@@ -68,7 +68,7 @@ class e {
68
68
  };
69
69
  }
70
70
  }
71
- i(e, "version", "1.0.3");
71
+ i(e, "version", "1.1.0");
72
72
  const g = e;
73
73
  export {
74
74
  g as default
package/dist/es/index.js CHANGED
@@ -1,25 +1,27 @@
1
1
  import "./components/shared.scss.js";
2
2
  import "./style/index.scss.js";
3
- import o from "./core/core.js";
4
- import { all_locales as l, da_DK as p, de_DE as _, en_US as m, es_ES as c, fr_FR as u, it_IT as d, nl_NL as x, no_NO as v, pt_BR as w, sv_SE as y } from "./translations/index.js";
3
+ import r from "./core/core.js";
4
+ import { all_locales as l, da_DK as p, de_DE as m, en_US as _, es_ES as c, fr_FR as u, it_IT as d, nl_NL as x, no_NO as v, pt_BR as w, sv_SE as y } from "./translations/index.js";
5
5
  import { default as E } from "./components/external/TransactionsOverview/TransactionsOverviewElement.js";
6
6
  import { default as P } from "./components/external/TransactionDetails/TransactionDetails.js";
7
- import { default as T } from "./components/external/PayoutsOverview/PayoutsOverviewElement.js";
8
- import { default as R } from "./components/external/PayoutDetails/PayoutDetails.js";
9
- async function n(e) {
10
- return await new o(e).initialize();
7
+ import { default as S } from "./components/external/PayoutsOverview/PayoutsOverviewElement.js";
8
+ import { default as N } from "./components/external/PayoutDetails/PayoutDetails.js";
9
+ import { default as A } from "./components/external/ReportsOverview/ReportsOverviewElement.js";
10
+ async function s(e) {
11
+ return await new r(e).initialize();
11
12
  }
12
13
  export {
13
- n as AdyenPlatformExperience,
14
- o as Core,
15
- R as PayoutDetails,
16
- T as PayoutsOverview,
14
+ s as AdyenPlatformExperience,
15
+ r as Core,
16
+ N as PayoutDetails,
17
+ S as PayoutsOverview,
18
+ A as ReportsOverview,
17
19
  P as TransactionDetails,
18
20
  E as TransactionsOverview,
19
21
  l as all_locales,
20
22
  p as da_DK,
21
- _ as de_DE,
22
- m as en_US,
23
+ m as de_DE,
24
+ _ as en_US,
23
25
  c as es_ES,
24
26
  u as fr_FR,
25
27
  d as it_IT,