@carto/meridian-ds 3.1.0 → 3.1.1-alpha.01e04ce.288

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 (231) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{OpenDiagonallyRight-BUZBgnkY.cjs → Search-BsaXrSzs.cjs} +44 -16
  3. package/dist/{OpenDiagonallyRight-DQEM4RAg.js → Search-DXfTNnxj.js} +44 -16
  4. package/dist/{utils-DtB4pKaP.cjs → TablePaginationActions-WuqMxOyM.cjs} +173 -11
  5. package/dist/{utils-BnqQIMbU.js → TablePaginationActions-XEVsnuDF.js} +178 -16
  6. package/dist/chart-constants-BPSHJ52D.js +12 -0
  7. package/dist/chart-constants-C9FrXEWV.cjs +11 -0
  8. package/dist/charts/index.cjs +151 -0
  9. package/dist/charts/index.js +151 -0
  10. package/dist/components/index.cjs +560 -106
  11. package/dist/components/index.js +479 -26
  12. package/dist/custom-icons/index.cjs +5 -6
  13. package/dist/custom-icons/index.js +6 -7
  14. package/dist/hooks/index.cjs +28 -0
  15. package/dist/hooks/index.js +28 -0
  16. package/dist/metadata.json +1 -1
  17. package/dist/palette-utils-DX1R_i9N.cjs +1138 -0
  18. package/dist/palette-utils-F7dMdI2q.js +1122 -0
  19. package/dist/theme/index.cjs +28 -27
  20. package/dist/theme/index.js +9 -8
  21. package/dist/types/charts/index.d.ts +6 -0
  22. package/dist/types/charts/index.d.ts.map +1 -0
  23. package/dist/types/hooks/index.d.ts +4 -0
  24. package/dist/types/hooks/index.d.ts.map +1 -0
  25. package/dist/types/hooks/useImperativeIntl.d.ts +6 -0
  26. package/dist/types/hooks/useImperativeIntl.d.ts.map +1 -1
  27. package/dist/types/theme/index.d.ts +1 -0
  28. package/dist/types/theme/index.d.ts.map +1 -1
  29. package/dist/types/utils/formatter-utils.d.ts +12 -6
  30. package/dist/types/utils/formatter-utils.d.ts.map +1 -1
  31. package/dist/types/widgets/index.d.ts +0 -13
  32. package/dist/types/widgets/index.d.ts.map +1 -1
  33. package/dist/{palette-utils-B2CZD7oM.js → useImperativeIntl-BUw_LXAO.js} +2 -1300
  34. package/dist/{palette-utils-Ou97WiuF.cjs → useImperativeIntl-lvkv1UNL.cjs} +0 -1315
  35. package/dist/widgets/index.cjs +12 -6411
  36. package/dist/widgets/index.js +15 -6396
  37. package/package.json +12 -6
  38. package/dist/ListItem-CLIaUyDV.cjs +0 -488
  39. package/dist/ListItem-CRSS7jTs.js +0 -472
  40. package/dist/Search-Bx9LZ_VF.js +0 -33
  41. package/dist/Search-DFMUrdFt.cjs +0 -32
  42. package/dist/types/utils/detect-touch-screen.d.ts +0 -2
  43. package/dist/types/utils/detect-touch-screen.d.ts.map +0 -1
  44. package/dist/types/utils/detect-touch-screen.test.d.ts +0 -2
  45. package/dist/types/utils/detect-touch-screen.test.d.ts.map +0 -1
  46. package/dist/types/widgets/BarWidgetUI/BarSkeleton.d.ts +0 -4
  47. package/dist/types/widgets/BarWidgetUI/BarSkeleton.d.ts.map +0 -1
  48. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts +0 -33
  49. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts.map +0 -1
  50. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.stories.d.ts +0 -127
  51. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.stories.d.ts.map +0 -1
  52. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.test.d.ts +0 -2
  53. package/dist/types/widgets/BarWidgetUI/BarWidgetUI.test.d.ts.map +0 -1
  54. package/dist/types/widgets/BarWidgetUI/index.d.ts +0 -3
  55. package/dist/types/widgets/BarWidgetUI/index.d.ts.map +0 -1
  56. package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts +0 -22
  57. package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts.map +0 -1
  58. package/dist/types/widgets/CategoryWidgetUI/CategorySkeleton.d.ts +0 -3
  59. package/dist/types/widgets/CategoryWidgetUI/CategorySkeleton.d.ts.map +0 -1
  60. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +0 -36
  61. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +0 -1
  62. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.stories.d.ts +0 -140
  63. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.stories.d.ts.map +0 -1
  64. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +0 -32
  65. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +0 -1
  66. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.test.d.ts +0 -2
  67. package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.test.d.ts.map +0 -1
  68. package/dist/types/widgets/CategoryWidgetUI/index.d.ts +0 -3
  69. package/dist/types/widgets/CategoryWidgetUI/index.d.ts.map +0 -1
  70. package/dist/types/widgets/ChartLegend.d.ts +0 -13
  71. package/dist/types/widgets/ChartLegend.d.ts.map +0 -1
  72. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIDropdown.d.ts +0 -18
  73. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIDropdown.d.ts.map +0 -1
  74. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIGeometryChips.d.ts +0 -17
  75. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIGeometryChips.d.ts.map +0 -1
  76. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIToggleButton.d.ts +0 -15
  77. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIToggleButton.d.ts.map +0 -1
  78. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.d.ts +0 -27
  79. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.d.ts.map +0 -1
  80. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.stories.d.ts +0 -123
  81. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.stories.d.ts.map +0 -1
  82. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts +0 -1
  83. package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts.map +0 -1
  84. package/dist/types/widgets/FeatureSelectionWidgetUI/index.d.ts +0 -9
  85. package/dist/types/widgets/FeatureSelectionWidgetUI/index.d.ts.map +0 -1
  86. package/dist/types/widgets/FormulaWidgetUI/FormulaSkeleton.d.ts +0 -3
  87. package/dist/types/widgets/FormulaWidgetUI/FormulaSkeleton.d.ts.map +0 -1
  88. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts +0 -16
  89. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts.map +0 -1
  90. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.stories.d.ts +0 -69
  91. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.stories.d.ts.map +0 -1
  92. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.test.d.ts +0 -2
  93. package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.test.d.ts.map +0 -1
  94. package/dist/types/widgets/FormulaWidgetUI/index.d.ts +0 -3
  95. package/dist/types/widgets/FormulaWidgetUI/index.d.ts.map +0 -1
  96. package/dist/types/widgets/HistogramWidgetUI/HistogramSkeleton.d.ts +0 -6
  97. package/dist/types/widgets/HistogramWidgetUI/HistogramSkeleton.d.ts.map +0 -1
  98. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts +0 -27
  99. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts.map +0 -1
  100. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.stories.d.ts +0 -115
  101. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.stories.d.ts.map +0 -1
  102. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.test.d.ts +0 -2
  103. package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.test.d.ts.map +0 -1
  104. package/dist/types/widgets/HistogramWidgetUI/index.d.ts +0 -3
  105. package/dist/types/widgets/HistogramWidgetUI/index.d.ts.map +0 -1
  106. package/dist/types/widgets/HistogramWidgetUI/useHistogramInteractivity.d.ts +0 -20
  107. package/dist/types/widgets/HistogramWidgetUI/useHistogramInteractivity.d.ts.map +0 -1
  108. package/dist/types/widgets/NoDataAlert/NoDataAlert.d.ts +0 -6
  109. package/dist/types/widgets/NoDataAlert/NoDataAlert.d.ts.map +0 -1
  110. package/dist/types/widgets/NoDataAlert/NoDataAlert.stories.d.ts +0 -35
  111. package/dist/types/widgets/NoDataAlert/NoDataAlert.stories.d.ts.map +0 -1
  112. package/dist/types/widgets/NoDataAlert/index.d.ts +0 -3
  113. package/dist/types/widgets/NoDataAlert/index.d.ts.map +0 -1
  114. package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts +0 -11
  115. package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts.map +0 -1
  116. package/dist/types/widgets/PieWidgetUI/PieSkeleton.d.ts +0 -4
  117. package/dist/types/widgets/PieWidgetUI/PieSkeleton.d.ts.map +0 -1
  118. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +0 -36
  119. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +0 -1
  120. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.stories.d.ts +0 -108
  121. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.stories.d.ts.map +0 -1
  122. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.test.d.ts +0 -2
  123. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.test.d.ts.map +0 -1
  124. package/dist/types/widgets/PieWidgetUI/index.d.ts +0 -3
  125. package/dist/types/widgets/PieWidgetUI/index.d.ts.map +0 -1
  126. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +0 -16
  127. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +0 -1
  128. package/dist/types/widgets/RangeWidgetUI/RangeSkeleton.d.ts +0 -2
  129. package/dist/types/widgets/RangeWidgetUI/RangeSkeleton.d.ts.map +0 -1
  130. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.d.ts +0 -16
  131. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.d.ts.map +0 -1
  132. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.stories.d.ts +0 -34
  133. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.stories.d.ts.map +0 -1
  134. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.test.d.ts +0 -2
  135. package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.test.d.ts.map +0 -1
  136. package/dist/types/widgets/RangeWidgetUI/index.d.ts +0 -3
  137. package/dist/types/widgets/RangeWidgetUI/index.d.ts.map +0 -1
  138. package/dist/types/widgets/ReactEcharts.d.ts +0 -11
  139. package/dist/types/widgets/ReactEcharts.d.ts.map +0 -1
  140. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotSkeleton.d.ts +0 -4
  141. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotSkeleton.d.ts.map +0 -1
  142. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts +0 -16
  143. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts.map +0 -1
  144. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.stories.d.ts +0 -67
  145. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.stories.d.ts.map +0 -1
  146. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.test.d.ts +0 -2
  147. package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.test.d.ts.map +0 -1
  148. package/dist/types/widgets/ScatterPlotWidgetUI/index.d.ts +0 -3
  149. package/dist/types/widgets/ScatterPlotWidgetUI/index.d.ts.map +0 -1
  150. package/dist/types/widgets/TableWidgetUI/TableSkeleton.d.ts +0 -7
  151. package/dist/types/widgets/TableWidgetUI/TableSkeleton.d.ts.map +0 -1
  152. package/dist/types/widgets/TableWidgetUI/TableSkeletonRow.d.ts +0 -6
  153. package/dist/types/widgets/TableWidgetUI/TableSkeletonRow.d.ts.map +0 -1
  154. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts +0 -33
  155. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +0 -1
  156. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.stories.d.ts +0 -234
  157. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.stories.d.ts.map +0 -1
  158. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.test.d.ts +0 -2
  159. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.test.d.ts.map +0 -1
  160. package/dist/types/widgets/TableWidgetUI/index.d.ts +0 -3
  161. package/dist/types/widgets/TableWidgetUI/index.d.ts.map +0 -1
  162. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts +0 -21
  163. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts.map +0 -1
  164. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts +0 -4
  165. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts.map +0 -1
  166. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts +0 -141
  167. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts.map +0 -1
  168. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.test.d.ts +0 -2
  169. package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.test.d.ts.map +0 -1
  170. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts +0 -13
  171. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts.map +0 -1
  172. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts +0 -3
  173. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts.map +0 -1
  174. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesLayout.d.ts +0 -8
  175. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesLayout.d.ts.map +0 -1
  176. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts +0 -4
  177. package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts.map +0 -1
  178. package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts +0 -9
  179. package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts.map +0 -1
  180. package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts +0 -6
  181. package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts.map +0 -1
  182. package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.d.ts +0 -107
  183. package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.d.ts.map +0 -1
  184. package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts +0 -2
  185. package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts.map +0 -1
  186. package/dist/types/widgets/TimeSeriesWidgetUI/utils/useTimeSeriesInteractivity.d.ts +0 -43
  187. package/dist/types/widgets/TimeSeriesWidgetUI/utils/useTimeSeriesInteractivity.d.ts.map +0 -1
  188. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts +0 -42
  189. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +0 -1
  190. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.stories.d.ts +0 -196
  191. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.stories.d.ts.map +0 -1
  192. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.test.d.ts +0 -2
  193. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.test.d.ts.map +0 -1
  194. package/dist/types/widgets/WrapperWidgetUI/index.d.ts +0 -3
  195. package/dist/types/widgets/WrapperWidgetUI/index.d.ts.map +0 -1
  196. package/dist/types/widgets/comparative/AnimatedNumber/AnimatedNumber.d.ts +0 -9
  197. package/dist/types/widgets/comparative/AnimatedNumber/AnimatedNumber.d.ts.map +0 -1
  198. package/dist/types/widgets/comparative/AnimatedNumber/useAnimatedNumber.d.ts +0 -11
  199. package/dist/types/widgets/comparative/AnimatedNumber/useAnimatedNumber.d.ts.map +0 -1
  200. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryItem.d.ts +0 -17
  201. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryItem.d.ts.map +0 -1
  202. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +0 -23
  203. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +0 -1
  204. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.stories.d.ts +0 -36
  205. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.stories.d.ts.map +0 -1
  206. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts +0 -45
  207. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts.map +0 -1
  208. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.test.d.ts +0 -2
  209. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.test.d.ts.map +0 -1
  210. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +0 -20
  211. package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +0 -1
  212. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.d.ts +0 -21
  213. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.d.ts.map +0 -1
  214. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.stories.d.ts +0 -32
  215. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.stories.d.ts.map +0 -1
  216. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.test.d.ts +0 -2
  217. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.test.d.ts.map +0 -1
  218. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaLabel.d.ts +0 -5
  219. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaLabel.d.ts.map +0 -1
  220. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaValue.d.ts +0 -10
  221. package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaValue.d.ts.map +0 -1
  222. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts +0 -22
  223. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts.map +0 -1
  224. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.stories.d.ts +0 -46
  225. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.stories.d.ts.map +0 -1
  226. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.test.d.ts +0 -2
  227. package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.test.d.ts.map +0 -1
  228. package/dist/types/widgets/comparative/index.d.ts +0 -7
  229. package/dist/types/widgets/comparative/index.d.ts.map +0 -1
  230. package/dist/types/widgets/echarts-setup.d.ts +0 -3
  231. package/dist/types/widgets/echarts-setup.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - **BREAKING** feat(widgets): move all Builder chart/data widgets to their sole consumer (workspace-www) and remove echarts from Meridian. Removes `PieWidgetUI`, `TimeSeriesWidgetUI`, `CategoryWidgetUI`, `HistogramWidgetUI`, `BarWidgetUI`, `ScatterPlotWidgetUI`, `FormulaWidgetUI`, `RangeWidgetUI`, `TableWidgetUI`, `WrapperWidgetUI`, `FeatureSelectionWidgetUI`, `NoDataAlert`, `ChartLegend`, and the comparative widgets; only the `legend` widgets remain. Adds public `./charts` and `./hooks` subpaths for the shared chart infrastructure (skeleton primitives, chart constants, formatter/animation utils) and the hooks the extracted widgets depend on; `theme` now also exports `commonPalette`. Drops the `echarts`/`echarts-for-react` dependencies and the `ReactEcharts` wrapper. [#462](https://github.com/CartoDB/meridian-ds/pull/462)
6
+
5
7
  ## 3.0
6
8
 
7
9
  ### 3.1.0
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const Icon$2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
5
+ const Icon$3 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
6
6
  "path",
7
7
  {
8
8
  fill: "currentColor",
@@ -11,10 +11,10 @@ const Icon$2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.
11
11
  clipRule: "evenodd"
12
12
  }
13
13
  ) });
14
- const BaseSvgIcon$2 = material.createSvgIcon(Icon$2(), "ArrowUp");
14
+ const BaseSvgIcon$3 = material.createSvgIcon(Icon$3(), "ArrowUp");
15
15
  function ArrowUp({ width, height, sx, ...props }, ref) {
16
16
  return /* @__PURE__ */ jsxRuntime.jsx(
17
- BaseSvgIcon$2,
17
+ BaseSvgIcon$3,
18
18
  {
19
19
  ref,
20
20
  viewBox: "0 0 24 24",
@@ -27,9 +27,9 @@ function ArrowUp({ width, height, sx, ...props }, ref) {
27
27
  }
28
28
  );
29
29
  }
30
- const ForwardedComponent$2 = React.forwardRef(ArrowUp);
31
- ForwardedComponent$2.displayName = "ArrowUp";
32
- const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
30
+ const ForwardedComponent$3 = React.forwardRef(ArrowUp);
31
+ ForwardedComponent$3.displayName = "ArrowUp";
32
+ const Icon$2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
33
33
  "path",
34
34
  {
35
35
  fill: "currentColor",
@@ -38,10 +38,10 @@ const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.
38
38
  clipRule: "evenodd"
39
39
  }
40
40
  ) });
41
- const BaseSvgIcon$1 = material.createSvgIcon(Icon$1(), "CloseDiagonallyRight");
41
+ const BaseSvgIcon$2 = material.createSvgIcon(Icon$2(), "CloseDiagonallyRight");
42
42
  function CloseDiagonallyRight({ width, height, sx, ...props }, ref) {
43
43
  return /* @__PURE__ */ jsxRuntime.jsx(
44
- BaseSvgIcon$1,
44
+ BaseSvgIcon$2,
45
45
  {
46
46
  ref,
47
47
  viewBox: "0 0 24 24",
@@ -54,9 +54,9 @@ function CloseDiagonallyRight({ width, height, sx, ...props }, ref) {
54
54
  }
55
55
  );
56
56
  }
57
- const ForwardedComponent$1 = React.forwardRef(CloseDiagonallyRight);
58
- ForwardedComponent$1.displayName = "CloseDiagonallyRight";
59
- const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
57
+ const ForwardedComponent$2 = React.forwardRef(CloseDiagonallyRight);
58
+ ForwardedComponent$2.displayName = "CloseDiagonallyRight";
59
+ const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
60
60
  "path",
61
61
  {
62
62
  fill: "currentColor",
@@ -65,8 +65,35 @@ const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3
65
65
  clipRule: "evenodd"
66
66
  }
67
67
  ) });
68
- const BaseSvgIcon = material.createSvgIcon(Icon(), "OpenDiagonallyRight");
68
+ const BaseSvgIcon$1 = material.createSvgIcon(Icon$1(), "OpenDiagonallyRight");
69
69
  function OpenDiagonallyRight({ width, height, sx, ...props }, ref) {
70
+ return /* @__PURE__ */ jsxRuntime.jsx(
71
+ BaseSvgIcon$1,
72
+ {
73
+ ref,
74
+ viewBox: "0 0 24 24",
75
+ sx: {
76
+ width,
77
+ height: height || width,
78
+ ...sx
79
+ },
80
+ ...props
81
+ }
82
+ );
83
+ }
84
+ const ForwardedComponent$1 = React.forwardRef(OpenDiagonallyRight);
85
+ ForwardedComponent$1.displayName = "OpenDiagonallyRight";
86
+ const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
87
+ "path",
88
+ {
89
+ fill: "currentColor",
90
+ fillRule: "evenodd",
91
+ d: "M11 4a7 7 0 0 1 5.386 11.472l3.089 3.089-1.414 1.414-3.161-3.161A7 7 0 1 1 11 4m0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10",
92
+ clipRule: "evenodd"
93
+ }
94
+ ) });
95
+ const BaseSvgIcon = material.createSvgIcon(Icon(), "Search");
96
+ function Search({ width, height, sx, ...props }, ref) {
70
97
  return /* @__PURE__ */ jsxRuntime.jsx(
71
98
  BaseSvgIcon,
72
99
  {
@@ -81,8 +108,9 @@ function OpenDiagonallyRight({ width, height, sx, ...props }, ref) {
81
108
  }
82
109
  );
83
110
  }
84
- const ForwardedComponent = React.forwardRef(OpenDiagonallyRight);
85
- ForwardedComponent.displayName = "OpenDiagonallyRight";
86
- exports.ForwardedComponent = ForwardedComponent$2;
111
+ const ForwardedComponent = React.forwardRef(Search);
112
+ ForwardedComponent.displayName = "Search";
113
+ exports.ForwardedComponent = ForwardedComponent$3;
87
114
  exports.ForwardedComponent$1 = ForwardedComponent$1;
88
- exports.ForwardedComponent$2 = ForwardedComponent;
115
+ exports.ForwardedComponent$2 = ForwardedComponent$2;
116
+ exports.ForwardedComponent$3 = ForwardedComponent;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { createSvgIcon } from "@mui/material";
4
- const Icon$2 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
4
+ const Icon$3 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
5
5
  "path",
6
6
  {
7
7
  fill: "currentColor",
@@ -10,10 +10,10 @@ const Icon$2 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000
10
10
  clipRule: "evenodd"
11
11
  }
12
12
  ) });
13
- const BaseSvgIcon$2 = createSvgIcon(Icon$2(), "ArrowUp");
13
+ const BaseSvgIcon$3 = createSvgIcon(Icon$3(), "ArrowUp");
14
14
  function ArrowUp({ width, height, sx, ...props }, ref) {
15
15
  return /* @__PURE__ */ jsx(
16
- BaseSvgIcon$2,
16
+ BaseSvgIcon$3,
17
17
  {
18
18
  ref,
19
19
  viewBox: "0 0 24 24",
@@ -26,9 +26,9 @@ function ArrowUp({ width, height, sx, ...props }, ref) {
26
26
  }
27
27
  );
28
28
  }
29
- const ForwardedComponent$2 = forwardRef(ArrowUp);
30
- ForwardedComponent$2.displayName = "ArrowUp";
31
- const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
29
+ const ForwardedComponent$3 = forwardRef(ArrowUp);
30
+ ForwardedComponent$3.displayName = "ArrowUp";
31
+ const Icon$2 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
32
32
  "path",
33
33
  {
34
34
  fill: "currentColor",
@@ -37,10 +37,10 @@ const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000
37
37
  clipRule: "evenodd"
38
38
  }
39
39
  ) });
40
- const BaseSvgIcon$1 = createSvgIcon(Icon$1(), "CloseDiagonallyRight");
40
+ const BaseSvgIcon$2 = createSvgIcon(Icon$2(), "CloseDiagonallyRight");
41
41
  function CloseDiagonallyRight({ width, height, sx, ...props }, ref) {
42
42
  return /* @__PURE__ */ jsx(
43
- BaseSvgIcon$1,
43
+ BaseSvgIcon$2,
44
44
  {
45
45
  ref,
46
46
  viewBox: "0 0 24 24",
@@ -53,9 +53,9 @@ function CloseDiagonallyRight({ width, height, sx, ...props }, ref) {
53
53
  }
54
54
  );
55
55
  }
56
- const ForwardedComponent$1 = forwardRef(CloseDiagonallyRight);
57
- ForwardedComponent$1.displayName = "CloseDiagonallyRight";
58
- const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
56
+ const ForwardedComponent$2 = forwardRef(CloseDiagonallyRight);
57
+ ForwardedComponent$2.displayName = "CloseDiagonallyRight";
58
+ const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
59
59
  "path",
60
60
  {
61
61
  fill: "currentColor",
@@ -64,8 +64,35 @@ const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/s
64
64
  clipRule: "evenodd"
65
65
  }
66
66
  ) });
67
- const BaseSvgIcon = createSvgIcon(Icon(), "OpenDiagonallyRight");
67
+ const BaseSvgIcon$1 = createSvgIcon(Icon$1(), "OpenDiagonallyRight");
68
68
  function OpenDiagonallyRight({ width, height, sx, ...props }, ref) {
69
+ return /* @__PURE__ */ jsx(
70
+ BaseSvgIcon$1,
71
+ {
72
+ ref,
73
+ viewBox: "0 0 24 24",
74
+ sx: {
75
+ width,
76
+ height: height || width,
77
+ ...sx
78
+ },
79
+ ...props
80
+ }
81
+ );
82
+ }
83
+ const ForwardedComponent$1 = forwardRef(OpenDiagonallyRight);
84
+ ForwardedComponent$1.displayName = "OpenDiagonallyRight";
85
+ const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
86
+ "path",
87
+ {
88
+ fill: "currentColor",
89
+ fillRule: "evenodd",
90
+ d: "M11 4a7 7 0 0 1 5.386 11.472l3.089 3.089-1.414 1.414-3.161-3.161A7 7 0 1 1 11 4m0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10",
91
+ clipRule: "evenodd"
92
+ }
93
+ ) });
94
+ const BaseSvgIcon = createSvgIcon(Icon(), "Search");
95
+ function Search({ width, height, sx, ...props }, ref) {
69
96
  return /* @__PURE__ */ jsx(
70
97
  BaseSvgIcon,
71
98
  {
@@ -80,10 +107,11 @@ function OpenDiagonallyRight({ width, height, sx, ...props }, ref) {
80
107
  }
81
108
  );
82
109
  }
83
- const ForwardedComponent = forwardRef(OpenDiagonallyRight);
84
- ForwardedComponent.displayName = "OpenDiagonallyRight";
110
+ const ForwardedComponent = forwardRef(Search);
111
+ ForwardedComponent.displayName = "Search";
85
112
  export {
86
- ForwardedComponent$2 as F,
113
+ ForwardedComponent$3 as F,
87
114
  ForwardedComponent$1 as a,
88
- ForwardedComponent as b
115
+ ForwardedComponent$2 as b,
116
+ ForwardedComponent as c
89
117
  };
@@ -2,18 +2,20 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const paletteUtils = require("./palette-utils-Ou97WiuF.cjs");
6
- function getPixelToRem(px) {
7
- const fontBase = 16;
8
- const rem = 1 / fontBase * px + "rem";
9
- return rem;
10
- }
11
- function getThemeColor(colorPath, theme) {
12
- const colorValue = colorPath.split(".").reduce(
13
- (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
14
- theme.palette
5
+ const paletteUtils = require("./palette-utils-DX1R_i9N.cjs");
6
+ const iconsMaterial = require("@mui/icons-material");
7
+ const reactIntl = require("react-intl");
8
+ const useImperativeIntl = require("./useImperativeIntl-lvkv1UNL.cjs");
9
+ function useTranslationWithFallback(translationKey, customText, intlValues) {
10
+ const intl = reactIntl.useIntl();
11
+ const intlConfig = useImperativeIntl.useImperativeIntl(intl);
12
+ if (customText !== void 0 && customText !== null) {
13
+ return customText;
14
+ }
15
+ return intlConfig.formatMessage(
16
+ { id: translationKey },
17
+ intlValues
15
18
  );
16
- return typeof colorValue === "string" ? colorValue : void 0;
17
19
  }
18
20
  const StyledMenuItem = material.styled(material.MenuItem, {
19
21
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
@@ -190,14 +192,174 @@ function _MenuItem({
190
192
  );
191
193
  }
192
194
  const MenuItem = React.forwardRef(_MenuItem);
195
+ const Option = material.styled("div")(({ theme }) => ({
196
+ position: "relative",
197
+ display: "inline-flex",
198
+ // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
199
+ // https://app.shortcut.com/cartoteam/story/471284/create-iconbuttongroup-component-to-properly-group-several-icons
200
+ "& + &, & + .optionIconButton": {
201
+ marginLeft: theme.spacing(0.5)
202
+ }
203
+ }));
204
+ const StyledIconButton = material.styled(material.IconButton, {
205
+ shouldForwardProp: (prop) => !["active"].includes(prop)
206
+ })(({ active, theme }) => ({
207
+ ...active && {
208
+ color: theme.palette.primary.main,
209
+ backgroundColor: theme.palette.primary.background,
210
+ "& svg:not(.doNotFillIcon) path": {
211
+ fill: theme.palette.primary.main
212
+ }
213
+ }
214
+ }));
215
+ function _IconButton({
216
+ tooltip,
217
+ tooltipPlacement = "top",
218
+ icon,
219
+ size = "medium",
220
+ variant = "icon",
221
+ color = "default",
222
+ sx,
223
+ className,
224
+ loading,
225
+ disabled,
226
+ active,
227
+ "aria-label": _ariaLabel,
228
+ ...props
229
+ }, ref) {
230
+ const ariaLabel = _ariaLabel ?? (typeof tooltip === "string" ? tooltip : void 0);
231
+ return /* @__PURE__ */ jsxRuntime.jsx(
232
+ material.Tooltip,
233
+ {
234
+ placement: tooltipPlacement,
235
+ title: tooltip ?? "",
236
+ describeChild: Boolean(ariaLabel),
237
+ children: /* @__PURE__ */ jsxRuntime.jsx(
238
+ Option,
239
+ {
240
+ className: `optionIconButton ${className ?? ""}`,
241
+ sx,
242
+ "data-testid": "icon-button",
243
+ children: /* @__PURE__ */ jsxRuntime.jsx(
244
+ StyledIconButton,
245
+ {
246
+ ...props,
247
+ ref,
248
+ size,
249
+ variant,
250
+ color,
251
+ active,
252
+ disabled: disabled || loading,
253
+ role: "button",
254
+ "aria-label": ariaLabel,
255
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(material.CircularProgress, { size: 18, color: "inherit" }) : icon
256
+ }
257
+ )
258
+ }
259
+ )
260
+ }
261
+ );
262
+ }
263
+ const IconButton = React.forwardRef(_IconButton);
264
+ function getPixelToRem(px) {
265
+ const fontBase = 16;
266
+ const rem = 1 / fontBase * px + "rem";
267
+ return rem;
268
+ }
269
+ function getThemeColor(colorPath, theme) {
270
+ const colorValue = colorPath.split(".").reduce(
271
+ (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
272
+ theme.palette
273
+ );
274
+ return typeof colorValue === "string" ? colorValue : void 0;
275
+ }
276
+ const ellipsisStyles = {
277
+ textOverflow: "ellipsis",
278
+ overflow: "hidden",
279
+ whiteSpace: "nowrap"
280
+ };
193
281
  const SVG_SELECTOR = "&:not(:has(.MuiRadio-root)):not(:has(.MuiCheckbox-root)) svg";
194
282
  const getIconSizeMap = () => ({
195
283
  small: paletteUtils.ICON_SIZE_SMALL,
196
284
  medium: paletteUtils.ICON_SIZE_MEDIUM,
197
285
  large: paletteUtils.ICON_SIZE_LARGE
198
286
  });
287
+ const Root = material.styled(material.Box)(({ theme }) => ({
288
+ display: "flex",
289
+ gap: theme.spacing(0.5),
290
+ marginLeft: theme.spacing(1)
291
+ }));
292
+ function _TablePaginationActions({
293
+ count,
294
+ page,
295
+ rowsPerPage = 10,
296
+ onPageChange,
297
+ lastPageTooltip,
298
+ prevPageText,
299
+ nextPageText,
300
+ noMorePagesText: noMorePagesTextProp,
301
+ "aria-label": ariaLabel,
302
+ "data-testid": dataTestId
303
+ }, ref) {
304
+ const handleBackButtonClick = (event) => {
305
+ onPageChange(event, page - 1);
306
+ };
307
+ const handleNextButtonClick = (event) => {
308
+ onPageChange(event, page + 1);
309
+ };
310
+ const isLastPage = page === Math.ceil(count / rowsPerPage) - 1;
311
+ const isFirstPage = page === 0;
312
+ const prevLabel = useTranslationWithFallback(
313
+ "c4r.form.pagination.prevPage",
314
+ prevPageText
315
+ );
316
+ const nextLabel = useTranslationWithFallback(
317
+ "c4r.form.pagination.nextPage",
318
+ nextPageText
319
+ );
320
+ const noMorePagesText = useTranslationWithFallback(
321
+ "c4r.form.pagination.noMorePages",
322
+ noMorePagesTextProp
323
+ );
324
+ return /* @__PURE__ */ jsxRuntime.jsxs(
325
+ Root,
326
+ {
327
+ ref,
328
+ "data-testid": dataTestId,
329
+ "aria-label": ariaLabel,
330
+ "data-name": "table-pagination-actions",
331
+ children: [
332
+ /* @__PURE__ */ jsxRuntime.jsx(
333
+ IconButton,
334
+ {
335
+ onClick: handleBackButtonClick,
336
+ disabled: page === 0,
337
+ "aria-label": prevLabel,
338
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowLeftOutlined, {}),
339
+ tooltip: isFirstPage ? noMorePagesText : prevLabel
340
+ }
341
+ ),
342
+ /* @__PURE__ */ jsxRuntime.jsx(
343
+ IconButton,
344
+ {
345
+ onClick: handleNextButtonClick,
346
+ disabled: page >= Math.ceil(count / rowsPerPage) - 1,
347
+ "aria-label": nextLabel,
348
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.KeyboardArrowRightOutlined, {}),
349
+ tooltip: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel
350
+ }
351
+ )
352
+ ]
353
+ }
354
+ );
355
+ }
356
+ const TablePaginationActions = React.forwardRef(_TablePaginationActions);
357
+ exports.IconButton = IconButton;
199
358
  exports.MenuItem = MenuItem;
200
359
  exports.SVG_SELECTOR = SVG_SELECTOR;
360
+ exports.TablePaginationActions = TablePaginationActions;
361
+ exports.ellipsisStyles = ellipsisStyles;
201
362
  exports.getIconSizeMap = getIconSizeMap;
202
363
  exports.getPixelToRem = getPixelToRem;
203
364
  exports.getThemeColor = getThemeColor;
365
+ exports.useTranslationWithFallback = useTranslationWithFallback;
@@ -1,18 +1,20 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { styled, MenuItem as MenuItem$1 } from "@mui/material";
4
- import { f as MENU_ITEM_SIZE_DENSE, l as MENU_ITEM_SIZE_EXTENDED, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, I as ICON_SIZE_LARGE } from "./palette-utils-B2CZD7oM.js";
5
- function getPixelToRem(px) {
6
- const fontBase = 16;
7
- const rem = 1 / fontBase * px + "rem";
8
- return rem;
9
- }
10
- function getThemeColor(colorPath, theme) {
11
- const colorValue = colorPath.split(".").reduce(
12
- (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
13
- theme.palette
3
+ import { styled, MenuItem as MenuItem$1, Tooltip, CircularProgress, IconButton as IconButton$1, Box } from "@mui/material";
4
+ import { d as MENU_ITEM_SIZE_DENSE, M as MENU_ITEM_SIZE_EXTENDED, e as ICON_SIZE_LARGE, a as ICON_SIZE_MEDIUM, I as ICON_SIZE_SMALL } from "./palette-utils-F7dMdI2q.js";
5
+ import { KeyboardArrowLeftOutlined, KeyboardArrowRightOutlined } from "@mui/icons-material";
6
+ import { useIntl } from "react-intl";
7
+ import { u as useImperativeIntl } from "./useImperativeIntl-BUw_LXAO.js";
8
+ function useTranslationWithFallback(translationKey, customText, intlValues) {
9
+ const intl = useIntl();
10
+ const intlConfig = useImperativeIntl(intl);
11
+ if (customText !== void 0 && customText !== null) {
12
+ return customText;
13
+ }
14
+ return intlConfig.formatMessage(
15
+ { id: translationKey },
16
+ intlValues
14
17
  );
15
- return typeof colorValue === "string" ? colorValue : void 0;
16
18
  }
17
19
  const StyledMenuItem = styled(MenuItem$1, {
18
20
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
@@ -189,16 +191,176 @@ function _MenuItem({
189
191
  );
190
192
  }
191
193
  const MenuItem = forwardRef(_MenuItem);
194
+ const Option = styled("div")(({ theme }) => ({
195
+ position: "relative",
196
+ display: "inline-flex",
197
+ // TODO: Remove this once we have a better way to handle the spacing between icon buttons:
198
+ // https://app.shortcut.com/cartoteam/story/471284/create-iconbuttongroup-component-to-properly-group-several-icons
199
+ "& + &, & + .optionIconButton": {
200
+ marginLeft: theme.spacing(0.5)
201
+ }
202
+ }));
203
+ const StyledIconButton = styled(IconButton$1, {
204
+ shouldForwardProp: (prop) => !["active"].includes(prop)
205
+ })(({ active, theme }) => ({
206
+ ...active && {
207
+ color: theme.palette.primary.main,
208
+ backgroundColor: theme.palette.primary.background,
209
+ "& svg:not(.doNotFillIcon) path": {
210
+ fill: theme.palette.primary.main
211
+ }
212
+ }
213
+ }));
214
+ function _IconButton({
215
+ tooltip,
216
+ tooltipPlacement = "top",
217
+ icon,
218
+ size = "medium",
219
+ variant = "icon",
220
+ color = "default",
221
+ sx,
222
+ className,
223
+ loading,
224
+ disabled,
225
+ active,
226
+ "aria-label": _ariaLabel,
227
+ ...props
228
+ }, ref) {
229
+ const ariaLabel = _ariaLabel ?? (typeof tooltip === "string" ? tooltip : void 0);
230
+ return /* @__PURE__ */ jsx(
231
+ Tooltip,
232
+ {
233
+ placement: tooltipPlacement,
234
+ title: tooltip ?? "",
235
+ describeChild: Boolean(ariaLabel),
236
+ children: /* @__PURE__ */ jsx(
237
+ Option,
238
+ {
239
+ className: `optionIconButton ${className ?? ""}`,
240
+ sx,
241
+ "data-testid": "icon-button",
242
+ children: /* @__PURE__ */ jsx(
243
+ StyledIconButton,
244
+ {
245
+ ...props,
246
+ ref,
247
+ size,
248
+ variant,
249
+ color,
250
+ active,
251
+ disabled: disabled || loading,
252
+ role: "button",
253
+ "aria-label": ariaLabel,
254
+ children: loading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18, color: "inherit" }) : icon
255
+ }
256
+ )
257
+ }
258
+ )
259
+ }
260
+ );
261
+ }
262
+ const IconButton = forwardRef(_IconButton);
263
+ function getPixelToRem(px) {
264
+ const fontBase = 16;
265
+ const rem = 1 / fontBase * px + "rem";
266
+ return rem;
267
+ }
268
+ function getThemeColor(colorPath, theme) {
269
+ const colorValue = colorPath.split(".").reduce(
270
+ (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
271
+ theme.palette
272
+ );
273
+ return typeof colorValue === "string" ? colorValue : void 0;
274
+ }
275
+ const ellipsisStyles = {
276
+ textOverflow: "ellipsis",
277
+ overflow: "hidden",
278
+ whiteSpace: "nowrap"
279
+ };
192
280
  const SVG_SELECTOR = "&:not(:has(.MuiRadio-root)):not(:has(.MuiCheckbox-root)) svg";
193
281
  const getIconSizeMap = () => ({
194
282
  small: ICON_SIZE_SMALL,
195
283
  medium: ICON_SIZE_MEDIUM,
196
284
  large: ICON_SIZE_LARGE
197
285
  });
286
+ const Root = styled(Box)(({ theme }) => ({
287
+ display: "flex",
288
+ gap: theme.spacing(0.5),
289
+ marginLeft: theme.spacing(1)
290
+ }));
291
+ function _TablePaginationActions({
292
+ count,
293
+ page,
294
+ rowsPerPage = 10,
295
+ onPageChange,
296
+ lastPageTooltip,
297
+ prevPageText,
298
+ nextPageText,
299
+ noMorePagesText: noMorePagesTextProp,
300
+ "aria-label": ariaLabel,
301
+ "data-testid": dataTestId
302
+ }, ref) {
303
+ const handleBackButtonClick = (event) => {
304
+ onPageChange(event, page - 1);
305
+ };
306
+ const handleNextButtonClick = (event) => {
307
+ onPageChange(event, page + 1);
308
+ };
309
+ const isLastPage = page === Math.ceil(count / rowsPerPage) - 1;
310
+ const isFirstPage = page === 0;
311
+ const prevLabel = useTranslationWithFallback(
312
+ "c4r.form.pagination.prevPage",
313
+ prevPageText
314
+ );
315
+ const nextLabel = useTranslationWithFallback(
316
+ "c4r.form.pagination.nextPage",
317
+ nextPageText
318
+ );
319
+ const noMorePagesText = useTranslationWithFallback(
320
+ "c4r.form.pagination.noMorePages",
321
+ noMorePagesTextProp
322
+ );
323
+ return /* @__PURE__ */ jsxs(
324
+ Root,
325
+ {
326
+ ref,
327
+ "data-testid": dataTestId,
328
+ "aria-label": ariaLabel,
329
+ "data-name": "table-pagination-actions",
330
+ children: [
331
+ /* @__PURE__ */ jsx(
332
+ IconButton,
333
+ {
334
+ onClick: handleBackButtonClick,
335
+ disabled: page === 0,
336
+ "aria-label": prevLabel,
337
+ icon: /* @__PURE__ */ jsx(KeyboardArrowLeftOutlined, {}),
338
+ tooltip: isFirstPage ? noMorePagesText : prevLabel
339
+ }
340
+ ),
341
+ /* @__PURE__ */ jsx(
342
+ IconButton,
343
+ {
344
+ onClick: handleNextButtonClick,
345
+ disabled: page >= Math.ceil(count / rowsPerPage) - 1,
346
+ "aria-label": nextLabel,
347
+ icon: /* @__PURE__ */ jsx(KeyboardArrowRightOutlined, {}),
348
+ tooltip: isLastPage ? lastPageTooltip ?? noMorePagesText : nextLabel
349
+ }
350
+ )
351
+ ]
352
+ }
353
+ );
354
+ }
355
+ const TablePaginationActions = forwardRef(_TablePaginationActions);
198
356
  export {
357
+ IconButton as I,
199
358
  MenuItem as M,
200
359
  SVG_SELECTOR as S,
201
- getIconSizeMap as a,
202
- getThemeColor as b,
203
- getPixelToRem as g
360
+ TablePaginationActions as T,
361
+ getPixelToRem as a,
362
+ getIconSizeMap as b,
363
+ ellipsisStyles as e,
364
+ getThemeColor as g,
365
+ useTranslationWithFallback as u
204
366
  };
@@ -0,0 +1,12 @@
1
+ const REST_CATEGORY = "__rest__";
2
+ const OTHERS_CATEGORY_NAME = "Others";
3
+ var OrderTypes = /* @__PURE__ */ ((OrderTypes2) => {
4
+ OrderTypes2["Ranking"] = "ranking";
5
+ OrderTypes2["Fixed"] = "fixed";
6
+ return OrderTypes2;
7
+ })(OrderTypes || {});
8
+ export {
9
+ OTHERS_CATEGORY_NAME as O,
10
+ REST_CATEGORY as R,
11
+ OrderTypes as a
12
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ const REST_CATEGORY = "__rest__";
3
+ const OTHERS_CATEGORY_NAME = "Others";
4
+ var OrderTypes = /* @__PURE__ */ ((OrderTypes2) => {
5
+ OrderTypes2["Ranking"] = "ranking";
6
+ OrderTypes2["Fixed"] = "fixed";
7
+ return OrderTypes2;
8
+ })(OrderTypes || {});
9
+ exports.OTHERS_CATEGORY_NAME = OTHERS_CATEGORY_NAME;
10
+ exports.OrderTypes = OrderTypes;
11
+ exports.REST_CATEGORY = REST_CATEGORY;