@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.
- package/CHANGELOG.md +2 -0
- package/dist/{OpenDiagonallyRight-BUZBgnkY.cjs → Search-BsaXrSzs.cjs} +44 -16
- package/dist/{OpenDiagonallyRight-DQEM4RAg.js → Search-DXfTNnxj.js} +44 -16
- package/dist/{utils-DtB4pKaP.cjs → TablePaginationActions-WuqMxOyM.cjs} +173 -11
- package/dist/{utils-BnqQIMbU.js → TablePaginationActions-XEVsnuDF.js} +178 -16
- package/dist/chart-constants-BPSHJ52D.js +12 -0
- package/dist/chart-constants-C9FrXEWV.cjs +11 -0
- package/dist/charts/index.cjs +151 -0
- package/dist/charts/index.js +151 -0
- package/dist/components/index.cjs +560 -106
- package/dist/components/index.js +479 -26
- package/dist/custom-icons/index.cjs +5 -6
- package/dist/custom-icons/index.js +6 -7
- package/dist/hooks/index.cjs +28 -0
- package/dist/hooks/index.js +28 -0
- package/dist/metadata.json +1 -1
- package/dist/palette-utils-DX1R_i9N.cjs +1138 -0
- package/dist/palette-utils-F7dMdI2q.js +1122 -0
- package/dist/theme/index.cjs +28 -27
- package/dist/theme/index.js +9 -8
- package/dist/types/charts/index.d.ts +6 -0
- package/dist/types/charts/index.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +4 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useImperativeIntl.d.ts +6 -0
- package/dist/types/hooks/useImperativeIntl.d.ts.map +1 -1
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/theme/index.d.ts.map +1 -1
- package/dist/types/utils/formatter-utils.d.ts +12 -6
- package/dist/types/utils/formatter-utils.d.ts.map +1 -1
- package/dist/types/widgets/index.d.ts +0 -13
- package/dist/types/widgets/index.d.ts.map +1 -1
- package/dist/{palette-utils-B2CZD7oM.js → useImperativeIntl-BUw_LXAO.js} +2 -1300
- package/dist/{palette-utils-Ou97WiuF.cjs → useImperativeIntl-lvkv1UNL.cjs} +0 -1315
- package/dist/widgets/index.cjs +12 -6411
- package/dist/widgets/index.js +15 -6396
- package/package.json +12 -6
- package/dist/ListItem-CLIaUyDV.cjs +0 -488
- package/dist/ListItem-CRSS7jTs.js +0 -472
- package/dist/Search-Bx9LZ_VF.js +0 -33
- package/dist/Search-DFMUrdFt.cjs +0 -32
- package/dist/types/utils/detect-touch-screen.d.ts +0 -2
- package/dist/types/utils/detect-touch-screen.d.ts.map +0 -1
- package/dist/types/utils/detect-touch-screen.test.d.ts +0 -2
- package/dist/types/utils/detect-touch-screen.test.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/BarSkeleton.d.ts +0 -4
- package/dist/types/widgets/BarWidgetUI/BarSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts +0 -33
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.stories.d.ts +0 -127
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/BarWidgetUI/BarWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/BarWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts +0 -22
- package/dist/types/widgets/BarWidgetUI/useProcessedProps.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/CategorySkeleton.d.ts +0 -3
- package/dist/types/widgets/CategoryWidgetUI/CategorySkeleton.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts +0 -36
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.stories.d.ts +0 -140
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +0 -32
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/CategoryWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/CategoryWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/ChartLegend.d.ts +0 -13
- package/dist/types/widgets/ChartLegend.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIDropdown.d.ts +0 -18
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIDropdown.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIGeometryChips.d.ts +0 -17
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIGeometryChips.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIToggleButton.d.ts +0 -15
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionUIToggleButton.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.d.ts +0 -27
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.stories.d.ts +0 -123
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/FeatureSelectionWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/FeatureSelectionWidgetUI/index.d.ts +0 -9
- package/dist/types/widgets/FeatureSelectionWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaSkeleton.d.ts +0 -3
- package/dist/types/widgets/FormulaWidgetUI/FormulaSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts +0 -16
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.stories.d.ts +0 -69
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/FormulaWidgetUI/FormulaWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/FormulaWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/FormulaWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramSkeleton.d.ts +0 -6
- package/dist/types/widgets/HistogramWidgetUI/HistogramSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts +0 -27
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.stories.d.ts +0 -115
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/HistogramWidgetUI/HistogramWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/HistogramWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/HistogramWidgetUI/useHistogramInteractivity.d.ts +0 -20
- package/dist/types/widgets/HistogramWidgetUI/useHistogramInteractivity.d.ts.map +0 -1
- package/dist/types/widgets/NoDataAlert/NoDataAlert.d.ts +0 -6
- package/dist/types/widgets/NoDataAlert/NoDataAlert.d.ts.map +0 -1
- package/dist/types/widgets/NoDataAlert/NoDataAlert.stories.d.ts +0 -35
- package/dist/types/widgets/NoDataAlert/NoDataAlert.stories.d.ts.map +0 -1
- package/dist/types/widgets/NoDataAlert/index.d.ts +0 -3
- package/dist/types/widgets/NoDataAlert/index.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts +0 -11
- package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/PieSkeleton.d.ts +0 -4
- package/dist/types/widgets/PieWidgetUI/PieSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +0 -36
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.stories.d.ts +0 -108
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/PieWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +0 -16
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts.map +0 -1
- package/dist/types/widgets/RangeWidgetUI/RangeSkeleton.d.ts +0 -2
- package/dist/types/widgets/RangeWidgetUI/RangeSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.d.ts +0 -16
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.stories.d.ts +0 -34
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/RangeWidgetUI/RangeWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/RangeWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/RangeWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/ReactEcharts.d.ts +0 -11
- package/dist/types/widgets/ReactEcharts.d.ts.map +0 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotSkeleton.d.ts +0 -4
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts +0 -16
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.stories.d.ts +0 -67
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/ScatterPlotWidgetUI/ScatterPlotWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/ScatterPlotWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/ScatterPlotWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/TableSkeleton.d.ts +0 -7
- package/dist/types/widgets/TableWidgetUI/TableSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/TableSkeletonRow.d.ts +0 -6
- package/dist/types/widgets/TableWidgetUI/TableSkeletonRow.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts +0 -33
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.stories.d.ts +0 -234
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/TableWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/TableWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts +0 -21
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesContext.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts +0 -4
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts +0 -141
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/TimeSeriesWidgetUI/TimeSeriesWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts +0 -13
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesChart.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts +0 -3
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesControls.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesLayout.d.ts +0 -8
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesLayout.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts +0 -4
- package/dist/types/widgets/TimeSeriesWidgetUI/components/TimeSeriesSkeleton.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts +0 -9
- package/dist/types/widgets/TimeSeriesWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts +0 -6
- package/dist/types/widgets/TimeSeriesWidgetUI/types.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.d.ts +0 -107
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts +0 -2
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/time-series-utils.test.d.ts.map +0 -1
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/useTimeSeriesInteractivity.d.ts +0 -43
- package/dist/types/widgets/TimeSeriesWidgetUI/utils/useTimeSeriesInteractivity.d.ts.map +0 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts +0 -42
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.stories.d.ts +0 -196
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/WrapperWidgetUI/index.d.ts +0 -3
- package/dist/types/widgets/WrapperWidgetUI/index.d.ts.map +0 -1
- package/dist/types/widgets/comparative/AnimatedNumber/AnimatedNumber.d.ts +0 -9
- package/dist/types/widgets/comparative/AnimatedNumber/AnimatedNumber.d.ts.map +0 -1
- package/dist/types/widgets/comparative/AnimatedNumber/useAnimatedNumber.d.ts +0 -11
- package/dist/types/widgets/comparative/AnimatedNumber/useAnimatedNumber.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryItem.d.ts +0 -17
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryItem.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts +0 -23
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.stories.d.ts +0 -36
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts +0 -45
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.styled.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts +0 -20
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/transposeCategoryData.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.d.ts +0 -21
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.stories.d.ts +0 -32
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/ComparativeFormulaWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaLabel.d.ts +0 -5
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaLabel.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaValue.d.ts +0 -10
- package/dist/types/widgets/comparative/ComparativeFormulaWidgetUI/FormulaValue.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts +0 -22
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.stories.d.ts +0 -46
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.stories.d.ts.map +0 -1
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.test.d.ts +0 -2
- package/dist/types/widgets/comparative/ComparativePieWidgetUI/ComparativePieWidgetUI.test.d.ts.map +0 -1
- package/dist/types/widgets/comparative/index.d.ts +0 -7
- package/dist/types/widgets/comparative/index.d.ts.map +0 -1
- package/dist/types/widgets/echarts-setup.d.ts +0 -3
- 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$
|
|
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$
|
|
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$
|
|
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$
|
|
31
|
-
ForwardedComponent$
|
|
32
|
-
const Icon$
|
|
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$
|
|
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$
|
|
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$
|
|
58
|
-
ForwardedComponent$
|
|
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(
|
|
85
|
-
ForwardedComponent.displayName = "
|
|
86
|
-
exports.ForwardedComponent = ForwardedComponent$
|
|
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$
|
|
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$
|
|
13
|
+
const BaseSvgIcon$3 = createSvgIcon(Icon$3(), "ArrowUp");
|
|
14
14
|
function ArrowUp({ width, height, sx, ...props }, ref) {
|
|
15
15
|
return /* @__PURE__ */ jsx(
|
|
16
|
-
BaseSvgIcon$
|
|
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$
|
|
30
|
-
ForwardedComponent$
|
|
31
|
-
const Icon$
|
|
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$
|
|
40
|
+
const BaseSvgIcon$2 = createSvgIcon(Icon$2(), "CloseDiagonallyRight");
|
|
41
41
|
function CloseDiagonallyRight({ width, height, sx, ...props }, ref) {
|
|
42
42
|
return /* @__PURE__ */ jsx(
|
|
43
|
-
BaseSvgIcon$
|
|
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$
|
|
57
|
-
ForwardedComponent$
|
|
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(
|
|
84
|
-
ForwardedComponent.displayName = "
|
|
110
|
+
const ForwardedComponent = forwardRef(Search);
|
|
111
|
+
ForwardedComponent.displayName = "Search";
|
|
85
112
|
export {
|
|
86
|
-
ForwardedComponent$
|
|
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-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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;
|