@carto/meridian-ds 2.5.5-alpha-translations.1 → 2.6.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.
- package/CHANGELOG.md +5 -2
- package/dist/{Alert-CRVceJ9N.js → Alert-DHd9hCGz.js} +1 -1
- package/dist/{Alert-Dyw7Z9wJ.cjs → Alert-DOeOwxOe.cjs} +7 -7
- package/dist/{MenuItem-o51jnNjL.cjs → MenuItem-CYJN2OVU.cjs} +6 -6
- package/dist/{MenuItem-h41wtQTz.js → MenuItem-MUmADf3e.js} +1 -1
- package/dist/components/index.cjs +222 -76
- package/dist/components/index.js +161 -15
- package/dist/{TablePaginationActions-CMC_ZxDN.cjs → css-utils-CCi3p7os.cjs} +6 -0
- package/dist/{TablePaginationActions-DIFPc_wQ.js → css-utils-WejOmkiI.js} +10 -4
- package/dist/theme/index.cjs +108 -114
- package/dist/theme/index.js +7 -13
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
- package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
- package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
- package/dist/types/components/Link/Link.stories.d.ts +0 -7
- package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/components/Tag/Tag.d.ts +176 -4
- package/dist/types/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/theme/components/forms.d.ts.map +1 -1
- package/dist/types/utils/css-utils.d.ts +14 -0
- package/dist/types/utils/css-utils.d.ts.map +1 -0
- package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +114 -119
- package/dist/widgets/index.js +4 -9
- package/package.json +1 -1
package/dist/widgets/index.cjs
CHANGED
|
@@ -4,11 +4,11 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const material = require("@mui/material");
|
|
6
6
|
const reactIntl = require("react-intl");
|
|
7
|
-
const
|
|
7
|
+
const cssUtils = require("../css-utils-CCi3p7os.cjs");
|
|
8
8
|
const _ReactEcharts = require("echarts-for-react");
|
|
9
9
|
const reactWindow = require("react-window");
|
|
10
10
|
const SwatchSquare = require("../SwatchSquare-B8PIY3Rd.cjs");
|
|
11
|
-
const Alert = require("../Alert-
|
|
11
|
+
const Alert = require("../Alert-DOeOwxOe.cjs");
|
|
12
12
|
const iconsMaterial = require("@mui/icons-material");
|
|
13
13
|
const paletteUtils = require("../palette-utils-B9ybmwiI.cjs");
|
|
14
14
|
function detectTouchscreen() {
|
|
@@ -157,7 +157,7 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
157
157
|
}
|
|
158
158
|
return a !== a && b !== b;
|
|
159
159
|
};
|
|
160
|
-
const isEqual = /* @__PURE__ */
|
|
160
|
+
const isEqual = /* @__PURE__ */ cssUtils.getDefaultExportFromCjs(fastDeepEqual);
|
|
161
161
|
class ReactEcharts extends _ReactEcharts {
|
|
162
162
|
componentDidUpdate(prevProps) {
|
|
163
163
|
const { shouldSetOption } = this.props;
|
|
@@ -328,7 +328,7 @@ function BarWidgetUI(props) {
|
|
|
328
328
|
const isMultiSeries = series.length > 1;
|
|
329
329
|
const theme = material.useTheme();
|
|
330
330
|
const intl = reactIntl.useIntl();
|
|
331
|
-
const intlConfig =
|
|
331
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
332
332
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
333
333
|
const tooltipOptions = React.useMemo(
|
|
334
334
|
() => ({
|
|
@@ -550,7 +550,7 @@ function BarWidgetUI(props) {
|
|
|
550
550
|
}
|
|
551
551
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
552
552
|
onSelectedBarsChange && /* @__PURE__ */ jsxRuntime.jsxs(OptionsSelectedBar$2, { container: true, children: [
|
|
553
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
553
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", children: selectedBars.length > 0 ? intlConfig.formatMessage(
|
|
554
554
|
{ id: "c4r.widgets.bar.selectedItems" },
|
|
555
555
|
{ items: selectedBars.length }
|
|
556
556
|
) : intlConfig.formatMessage({ id: "c4r.widgets.bar.all" }) }),
|
|
@@ -666,7 +666,7 @@ const CategoryLabelWrapper = material.styled(material.Grid, {
|
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
668
|
});
|
|
669
|
-
const CategoryLabel = material.styled(
|
|
669
|
+
const CategoryLabel = material.styled(cssUtils.Typography)(({ theme }) => ({
|
|
670
670
|
fontWeight: theme.typography.fontWeightBold,
|
|
671
671
|
marginRight: theme.spacing(2)
|
|
672
672
|
}));
|
|
@@ -819,7 +819,7 @@ function CategoryWidgetUI({
|
|
|
819
819
|
const referencedPrevAnimValues = React.useRef([]);
|
|
820
820
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
821
821
|
const intl = reactIntl.useIntl();
|
|
822
|
-
const intlConfig =
|
|
822
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
823
823
|
function sortBlockedSameAsData(blockedCategories2) {
|
|
824
824
|
const blockedCategoriesSet = new Set(blockedCategories2);
|
|
825
825
|
let sortedByOrderData = data;
|
|
@@ -1167,7 +1167,7 @@ function CategoryWidgetUI({
|
|
|
1167
1167
|
};
|
|
1168
1168
|
return /* @__PURE__ */ jsxRuntime.jsxs(CategoriesRoot, { children: [
|
|
1169
1169
|
filterable && sortedData.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(OptionsSelectedBar$1, { container: true, children: [
|
|
1170
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", children: selectedCategories.length > 0 ? intlConfig.formatMessage(
|
|
1171
1171
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
1172
1172
|
{ items: selectedCategories.length }
|
|
1173
1173
|
) : intlConfig.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
@@ -1249,10 +1249,10 @@ function CategoryWidgetUI({
|
|
|
1249
1249
|
children: CategoryRow
|
|
1250
1250
|
}
|
|
1251
1251
|
) : /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { children: [
|
|
1252
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1252
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "body2", children: intlConfig.formatMessage({
|
|
1253
1253
|
id: "c4r.widgets.category.noResults"
|
|
1254
1254
|
}) }),
|
|
1255
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1255
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { component: "p", variant: "caption", mb: 2, children: intlConfig.formatMessage(
|
|
1256
1256
|
{ id: "c4r.widgets.category.noResultsMessage" },
|
|
1257
1257
|
{ searchValue }
|
|
1258
1258
|
) })
|
|
@@ -1339,12 +1339,12 @@ function FormulaWidgetUI({
|
|
|
1339
1339
|
if (showSkeleton) {
|
|
1340
1340
|
return /* @__PURE__ */ jsxRuntime.jsx(FormulaSkeleton, {});
|
|
1341
1341
|
}
|
|
1342
|
-
return isComplexFormat ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1342
|
+
return isComplexFormat ? /* @__PURE__ */ jsxRuntime.jsxs(cssUtils.Typography, { variant: "h5", component: "div", weight: "medium", children: [
|
|
1343
1343
|
/* @__PURE__ */ jsxRuntime.jsx(Prefix, { children: formattedValue.prefix }),
|
|
1344
1344
|
formattedValue.value,
|
|
1345
1345
|
/* @__PURE__ */ jsxRuntime.jsx(Suffix, { children: formattedValue.suffix })
|
|
1346
1346
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
-
|
|
1347
|
+
cssUtils.Typography,
|
|
1348
1348
|
{
|
|
1349
1349
|
variant: "h5",
|
|
1350
1350
|
component: "div",
|
|
@@ -1543,7 +1543,7 @@ function HistogramWidgetUI({
|
|
|
1543
1543
|
}) {
|
|
1544
1544
|
const intl = reactIntl.useIntl();
|
|
1545
1545
|
const theme = material.useTheme();
|
|
1546
|
-
const intlConfig =
|
|
1546
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
1547
1547
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
1548
1548
|
const filterable = !!_filterable && !!onSelectedBarsChange;
|
|
1549
1549
|
const [echartsInstance, setEchartInstance] = React.useState();
|
|
@@ -1563,7 +1563,7 @@ function HistogramWidgetUI({
|
|
|
1563
1563
|
() => ({
|
|
1564
1564
|
show: tooltip,
|
|
1565
1565
|
trigger: "item",
|
|
1566
|
-
padding: [
|
|
1566
|
+
padding: [cssUtils.SPACING * 0.5, cssUtils.SPACING],
|
|
1567
1567
|
borderWidth: 0,
|
|
1568
1568
|
textStyle: {
|
|
1569
1569
|
...theme.typography.caption,
|
|
@@ -1601,7 +1601,7 @@ function HistogramWidgetUI({
|
|
|
1601
1601
|
showMaxLabel: true,
|
|
1602
1602
|
...theme.typography.overlineDelicate,
|
|
1603
1603
|
hideOverlap: true,
|
|
1604
|
-
padding: [
|
|
1604
|
+
padding: [cssUtils.SPACING * 0.5, cssUtils.SPACING * 0.5, 0, cssUtils.SPACING * 0.5],
|
|
1605
1605
|
formatter: (value) => {
|
|
1606
1606
|
const formattedValue = processFormatterResult(xAxisFormatter(value));
|
|
1607
1607
|
if (value === min) {
|
|
@@ -1621,7 +1621,7 @@ function HistogramWidgetUI({
|
|
|
1621
1621
|
const denseAxisConfig = {
|
|
1622
1622
|
margin: 0,
|
|
1623
1623
|
verticalAlign: "bottom",
|
|
1624
|
-
padding: [0, 0,
|
|
1624
|
+
padding: [0, 0, cssUtils.SPACING * 1.25, 0],
|
|
1625
1625
|
inside: true,
|
|
1626
1626
|
color: (value) => {
|
|
1627
1627
|
const maxValue = Math.max(...data.map((d) => d ?? Number.MIN_SAFE_INTEGER)) || 1;
|
|
@@ -1636,7 +1636,7 @@ function HistogramWidgetUI({
|
|
|
1636
1636
|
};
|
|
1637
1637
|
const fullAxisConfig = {
|
|
1638
1638
|
verticalAlign: "middle",
|
|
1639
|
-
padding: [0, 0, 0,
|
|
1639
|
+
padding: [0, 0, 0, cssUtils.SPACING * 0.5],
|
|
1640
1640
|
color: theme.palette.black[60]
|
|
1641
1641
|
};
|
|
1642
1642
|
const axisLabelConfig = yAxisType === "dense" ? denseAxisConfig : fullAxisConfig;
|
|
@@ -1731,10 +1731,10 @@ function HistogramWidgetUI({
|
|
|
1731
1731
|
const options = React.useMemo(
|
|
1732
1732
|
() => ({
|
|
1733
1733
|
grid: {
|
|
1734
|
-
left:
|
|
1735
|
-
right:
|
|
1736
|
-
top:
|
|
1737
|
-
bottom:
|
|
1734
|
+
left: cssUtils.SPACING * 0.1,
|
|
1735
|
+
right: cssUtils.SPACING * 0.1,
|
|
1736
|
+
top: cssUtils.SPACING * 2,
|
|
1737
|
+
bottom: cssUtils.SPACING * 0.5,
|
|
1738
1738
|
containLabel: true
|
|
1739
1739
|
},
|
|
1740
1740
|
tooltip: tooltipOptions,
|
|
@@ -1758,7 +1758,7 @@ function HistogramWidgetUI({
|
|
|
1758
1758
|
}
|
|
1759
1759
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1760
1760
|
filterable && /* @__PURE__ */ jsxRuntime.jsxs(OptionsSelectedBar, { container: true, children: [
|
|
1761
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1761
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", weight: "strong", children: selectedBars.length > 0 ? intlConfig.formatMessage(
|
|
1762
1762
|
{ id: "c4r.widgets.histogram.selectedItems" },
|
|
1763
1763
|
{
|
|
1764
1764
|
items: processFormatterResult(
|
|
@@ -1811,7 +1811,7 @@ function AlertBody({
|
|
|
1811
1811
|
children
|
|
1812
1812
|
}) {
|
|
1813
1813
|
return children ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { mt: 0.5, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1814
|
-
|
|
1814
|
+
cssUtils.Typography,
|
|
1815
1815
|
{
|
|
1816
1816
|
component: "div",
|
|
1817
1817
|
variant: "caption",
|
|
@@ -1828,7 +1828,7 @@ function NoDataAlert({
|
|
|
1828
1828
|
...otherProps
|
|
1829
1829
|
}) {
|
|
1830
1830
|
return severity ? /* @__PURE__ */ jsxRuntime.jsx(Alert.Alert, { title, severity, ...otherProps, children: /* @__PURE__ */ jsxRuntime.jsx(AlertBody, { children: body }) }) : /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { ...otherProps, children: [
|
|
1831
|
-
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1831
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "body2", children: title }),
|
|
1832
1832
|
/* @__PURE__ */ jsxRuntime.jsx(AlertBody, { color: "textSecondary", children: body })
|
|
1833
1833
|
] });
|
|
1834
1834
|
}
|
|
@@ -1949,10 +1949,10 @@ function PieCentralText({
|
|
|
1949
1949
|
return null;
|
|
1950
1950
|
}
|
|
1951
1951
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$4, { children: [
|
|
1952
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1952
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "h5", children: percentage }),
|
|
1953
1953
|
/* @__PURE__ */ jsxRuntime.jsxs(Category, { children: [
|
|
1954
1954
|
/* @__PURE__ */ jsxRuntime.jsx(MarkerColor, { bgcolor: color, component: "span" }),
|
|
1955
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1955
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { component: "span", variant: "body2", noWrap: true, children: name })
|
|
1956
1956
|
] })
|
|
1957
1957
|
] });
|
|
1958
1958
|
}
|
|
@@ -2110,7 +2110,7 @@ function ChartLegend({
|
|
|
2110
2110
|
series = [{ name: "", color: theme.palette.text.disabled }];
|
|
2111
2111
|
}
|
|
2112
2112
|
const intl = reactIntl.useIntl();
|
|
2113
|
-
const intlConfig =
|
|
2113
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
2114
2114
|
function handleClickRight() {
|
|
2115
2115
|
setOffset(offset + 1);
|
|
2116
2116
|
}
|
|
@@ -2183,7 +2183,7 @@ function ChartLegend({
|
|
|
2183
2183
|
}
|
|
2184
2184
|
),
|
|
2185
2185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2186
|
-
|
|
2186
|
+
cssUtils.Typography,
|
|
2187
2187
|
{
|
|
2188
2188
|
variant: "overline",
|
|
2189
2189
|
color: selected ? void 0 : "text.disabled",
|
|
@@ -2200,7 +2200,7 @@ function ChartLegend({
|
|
|
2200
2200
|
(overflowing || offset > 0) && /* @__PURE__ */ jsxRuntime.jsxs(ShowMoreButtons, { ref: showMoreButtonsRef, children: [
|
|
2201
2201
|
/* @__PURE__ */ jsxRuntime.jsx(OverflowVeil, {}),
|
|
2202
2202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2203
|
-
|
|
2203
|
+
cssUtils.IconButton,
|
|
2204
2204
|
{
|
|
2205
2205
|
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ChevronLeft, {}),
|
|
2206
2206
|
component: "span",
|
|
@@ -2213,7 +2213,7 @@ function ChartLegend({
|
|
|
2213
2213
|
}
|
|
2214
2214
|
),
|
|
2215
2215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2216
|
-
|
|
2216
|
+
cssUtils.IconButton,
|
|
2217
2217
|
{
|
|
2218
2218
|
icon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ChevronRight, {}),
|
|
2219
2219
|
component: "span",
|
|
@@ -2288,7 +2288,7 @@ function PieWidgetUI({
|
|
|
2288
2288
|
);
|
|
2289
2289
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
2290
2290
|
const intl = reactIntl.useIntl();
|
|
2291
|
-
const intlConfig =
|
|
2291
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
2292
2292
|
const _percentFormatter = React.useMemo(() => {
|
|
2293
2293
|
if (percentFormatter) {
|
|
2294
2294
|
return percentFormatter;
|
|
@@ -2304,7 +2304,7 @@ function PieWidgetUI({
|
|
|
2304
2304
|
_formatter = (params) => tooltipFormatter(params, formatter, _percentFormatter);
|
|
2305
2305
|
}
|
|
2306
2306
|
return {
|
|
2307
|
-
padding: [
|
|
2307
|
+
padding: [cssUtils.SPACING * 0.5, cssUtils.SPACING],
|
|
2308
2308
|
backgroundColor: theme.palette.black[90],
|
|
2309
2309
|
borderColor: "transparent",
|
|
2310
2310
|
textStyle: { color: theme.palette.common.white },
|
|
@@ -2344,7 +2344,7 @@ function PieWidgetUI({
|
|
|
2344
2344
|
}),
|
|
2345
2345
|
radius: ["74%", "90%"],
|
|
2346
2346
|
selectedOffset: 0,
|
|
2347
|
-
bottom:
|
|
2347
|
+
bottom: cssUtils.SPACING * 1.5,
|
|
2348
2348
|
label: { show: false },
|
|
2349
2349
|
emphasis: {
|
|
2350
2350
|
focus: "series",
|
|
@@ -2424,7 +2424,7 @@ function PieWidgetUI({
|
|
|
2424
2424
|
}
|
|
2425
2425
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2426
2426
|
filterable && /* @__PURE__ */ jsxRuntime.jsxs(OptionsBar, { container: true, children: [
|
|
2427
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2427
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "textSecondary", children: selectedCategories.length ? intlConfig.formatMessage(
|
|
2428
2428
|
{ id: "c4r.widgets.pie.selectedItems" },
|
|
2429
2429
|
{ items: selectedCategories.length }
|
|
2430
2430
|
) : intlConfig.formatMessage({ id: "c4r.widgets.pie.allSelected" }) }),
|
|
@@ -2585,7 +2585,7 @@ function RangeWidgetUI({
|
|
|
2585
2585
|
max
|
|
2586
2586
|
]);
|
|
2587
2587
|
const intl = reactIntl.useIntl();
|
|
2588
|
-
const intlConfig =
|
|
2588
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
2589
2589
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
2590
2590
|
const limitsMarks = React.useMemo(() => {
|
|
2591
2591
|
if (!limits || limits.length !== 2) {
|
|
@@ -2657,7 +2657,7 @@ function RangeWidgetUI({
|
|
|
2657
2657
|
return /* @__PURE__ */ jsxRuntime.jsx(RangeSkeleton, {});
|
|
2658
2658
|
}
|
|
2659
2659
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$2, { children: [
|
|
2660
|
-
/* @__PURE__ */ jsxRuntime.jsx(ClearWrapper, { children: hasBeenModified && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2660
|
+
/* @__PURE__ */ jsxRuntime.jsx(ClearWrapper, { children: hasBeenModified && /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "primary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2661
2661
|
ClearButton,
|
|
2662
2662
|
{
|
|
2663
2663
|
onClick: resetSlider,
|
|
@@ -2734,7 +2734,7 @@ const GraphGrid = material.styled(SkeletonGraphGrid)(({ theme }) => ({
|
|
|
2734
2734
|
justifyContent: "center",
|
|
2735
2735
|
marginLeft: theme.spacing(4),
|
|
2736
2736
|
containerType: "inline-size",
|
|
2737
|
-
[`@container (max-width: ${
|
|
2737
|
+
[`@container (max-width: ${cssUtils.BREAKPOINTS.XS}px)`]: {
|
|
2738
2738
|
" > div": {
|
|
2739
2739
|
maxWidth: "75%"
|
|
2740
2740
|
}
|
|
@@ -2795,7 +2795,7 @@ function __generateDefaultConfig({
|
|
|
2795
2795
|
containLabel: true
|
|
2796
2796
|
},
|
|
2797
2797
|
tooltip: {
|
|
2798
|
-
padding: [
|
|
2798
|
+
padding: [cssUtils.SPACING * 0.5, cssUtils.SPACING],
|
|
2799
2799
|
textStyle: {
|
|
2800
2800
|
...theme.typography.caption,
|
|
2801
2801
|
fontSize: 11,
|
|
@@ -2808,7 +2808,7 @@ function __generateDefaultConfig({
|
|
|
2808
2808
|
xAxis: {
|
|
2809
2809
|
axisLabel: {
|
|
2810
2810
|
...theme.typography.overlineDelicate,
|
|
2811
|
-
padding: [
|
|
2811
|
+
padding: [cssUtils.SPACING * 0.5, 0, 0, 0],
|
|
2812
2812
|
formatter: (v) => processFormatterResult(xAxisFormatter(v))
|
|
2813
2813
|
}
|
|
2814
2814
|
},
|
|
@@ -2969,9 +2969,7 @@ const TableCellStyled = material.styled(material.TableCell)(() => ({
|
|
|
2969
2969
|
overflow: "hidden",
|
|
2970
2970
|
"& p": {
|
|
2971
2971
|
maxWidth: "100%",
|
|
2972
|
-
|
|
2973
|
-
overflow: "hidden",
|
|
2974
|
-
textOverflow: "ellipsis"
|
|
2972
|
+
...cssUtils.ellipsisStyles
|
|
2975
2973
|
}
|
|
2976
2974
|
}));
|
|
2977
2975
|
const StyledTablePagination = material.styled(material.TablePagination)(({ theme }) => ({
|
|
@@ -3009,7 +3007,7 @@ function TableWidgetUI({
|
|
|
3009
3007
|
var _a;
|
|
3010
3008
|
const paginationRef = React.useRef(null);
|
|
3011
3009
|
const intl = reactIntl.useIntl();
|
|
3012
|
-
const intlConfig =
|
|
3010
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
3013
3011
|
const { showSkeleton } = useSkeleton(!!isLoading);
|
|
3014
3012
|
function defaultLabelDisplayedRows({
|
|
3015
3013
|
from,
|
|
@@ -3037,7 +3035,7 @@ function TableWidgetUI({
|
|
|
3037
3035
|
if (height) {
|
|
3038
3036
|
const paginationHeight = Math.max(
|
|
3039
3037
|
((_a = paginationRef == null ? void 0 : paginationRef.current) == null ? void 0 : _a.clientHeight) ?? 0,
|
|
3040
|
-
pagination ?
|
|
3038
|
+
pagination ? cssUtils.SPACING * 6 : 0
|
|
3041
3039
|
);
|
|
3042
3040
|
fixedHeightStyle.height = `calc(${height} - ${paginationHeight}px)`;
|
|
3043
3041
|
}
|
|
@@ -3091,7 +3089,7 @@ function TableWidgetUI({
|
|
|
3091
3089
|
onPageChange: handleChangePage,
|
|
3092
3090
|
onRowsPerPageChange: handleChangeRowsPerPage,
|
|
3093
3091
|
ActionsComponent: () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3094
|
-
|
|
3092
|
+
cssUtils.TablePaginationActions,
|
|
3095
3093
|
{
|
|
3096
3094
|
count: totalCount,
|
|
3097
3095
|
rowsPerPage,
|
|
@@ -3573,7 +3571,7 @@ function TimeSeriesProvider({
|
|
|
3573
3571
|
const [_isPlaying, setIsPlaying] = React.useState(isPlaying);
|
|
3574
3572
|
const [_isPaused, setIsPaused] = React.useState(isPaused);
|
|
3575
3573
|
const [_timeWindow, setTimeWindow] = React.useState([]);
|
|
3576
|
-
const intlConfig =
|
|
3574
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
3577
3575
|
React.useEffect(() => {
|
|
3578
3576
|
const sorted = _timeWindow.sort((timeA, timeB) => timeA < timeB ? -1 : 1).map(getDate);
|
|
3579
3577
|
onTimeWindowUpdate == null ? void 0 : onTimeWindowUpdate(sorted);
|
|
@@ -3874,11 +3872,11 @@ function addEventWithCleanUp(zr, eventKey, event) {
|
|
|
3874
3872
|
};
|
|
3875
3873
|
}
|
|
3876
3874
|
}
|
|
3877
|
-
const CHART_HEIGHT_DEFAULT =
|
|
3875
|
+
const CHART_HEIGHT_DEFAULT = cssUtils.SPACING * 22;
|
|
3878
3876
|
const CHART_HEIGHT_FITHEIGHT = "100%";
|
|
3879
3877
|
const DEFAULT_SPLIT_NUMBER = 5;
|
|
3880
3878
|
const MIN_ADAPTIVE_SPLIT_NUMBER = 3;
|
|
3881
|
-
const ADAPTIVE_SPLIT_NUMBER_SPACING =
|
|
3879
|
+
const ADAPTIVE_SPLIT_NUMBER_SPACING = cssUtils.SPACING * 20;
|
|
3882
3880
|
function TimeSeriesChart({
|
|
3883
3881
|
chartType,
|
|
3884
3882
|
formatter,
|
|
@@ -3915,7 +3913,7 @@ function TimeSeriesChart({
|
|
|
3915
3913
|
show: tooltip,
|
|
3916
3914
|
trigger: "axis",
|
|
3917
3915
|
appendToBody: true,
|
|
3918
|
-
padding: [
|
|
3916
|
+
padding: [cssUtils.SPACING * 0.5, cssUtils.SPACING],
|
|
3919
3917
|
textStyle: {
|
|
3920
3918
|
...theme.typography.caption,
|
|
3921
3919
|
fontSize: 11,
|
|
@@ -3926,9 +3924,9 @@ function TimeSeriesChart({
|
|
|
3926
3924
|
position: (point, params, dom, rect, size) => {
|
|
3927
3925
|
const position = { top: 0 };
|
|
3928
3926
|
if (size.contentSize[0] < size.viewSize[0] - point[0]) {
|
|
3929
|
-
position.left = point[0] +
|
|
3927
|
+
position.left = point[0] + cssUtils.SPACING * 1.5;
|
|
3930
3928
|
} else {
|
|
3931
|
-
position.right = size.viewSize[0] - point[0] +
|
|
3929
|
+
position.right = size.viewSize[0] - point[0] + cssUtils.SPACING * 1.5;
|
|
3932
3930
|
}
|
|
3933
3931
|
return position;
|
|
3934
3932
|
},
|
|
@@ -3940,7 +3938,7 @@ function TimeSeriesChart({
|
|
|
3940
3938
|
const denseAxisConfig = {
|
|
3941
3939
|
margin: 0,
|
|
3942
3940
|
verticalAlign: "bottom",
|
|
3943
|
-
padding: [0, 0,
|
|
3941
|
+
padding: [0, 0, cssUtils.SPACING * 1.25, 0],
|
|
3944
3942
|
inside: true,
|
|
3945
3943
|
color: (value) => {
|
|
3946
3944
|
let col = "transparent";
|
|
@@ -3953,7 +3951,7 @@ function TimeSeriesChart({
|
|
|
3953
3951
|
const fullAxisConfig = {
|
|
3954
3952
|
margin: 0,
|
|
3955
3953
|
verticalAlign: "middle",
|
|
3956
|
-
padding: [0,
|
|
3954
|
+
padding: [0, cssUtils.SPACING * 0.75, 0, 0],
|
|
3957
3955
|
color: theme.palette.black[60]
|
|
3958
3956
|
};
|
|
3959
3957
|
const yAxisLabelConfig = yAxisType === "dense" ? denseAxisConfig : fullAxisConfig;
|
|
@@ -4081,10 +4079,10 @@ function TimeSeriesChart({
|
|
|
4081
4079
|
const options = React.useMemo(
|
|
4082
4080
|
() => ({
|
|
4083
4081
|
grid: {
|
|
4084
|
-
left:
|
|
4085
|
-
top:
|
|
4086
|
-
right:
|
|
4087
|
-
bottom:
|
|
4082
|
+
left: cssUtils.SPACING * (yAxisType === "dense" ? 2 : 3.5),
|
|
4083
|
+
top: cssUtils.SPACING * 4,
|
|
4084
|
+
right: cssUtils.SPACING * 2,
|
|
4085
|
+
bottom: cssUtils.SPACING * 3
|
|
4088
4086
|
},
|
|
4089
4087
|
color: [theme.palette.secondary.main],
|
|
4090
4088
|
tooltip: tooltipOptions,
|
|
@@ -4270,7 +4268,7 @@ function TimeSeriesControls({
|
|
|
4270
4268
|
open: Boolean(anchorSpeedEl),
|
|
4271
4269
|
onClose: handleCloseSpeedMenu,
|
|
4272
4270
|
children: [
|
|
4273
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.MenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4271
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.MenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "textSecondary", children: intl.formatMessage({ id: "c4r.widgets.timeSeries.speed" }) }) }),
|
|
4274
4272
|
SPEED_FACTORS.map((speedItem) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4275
4273
|
material.MenuItem,
|
|
4276
4274
|
{
|
|
@@ -4443,7 +4441,7 @@ const ControlsBox = material.styled(material.Box)(({ theme }) => ({
|
|
|
4443
4441
|
flexShrink: 0,
|
|
4444
4442
|
marginLeft: 0,
|
|
4445
4443
|
paddingLeft: theme.spacing(1),
|
|
4446
|
-
[`@container (max-width: ${
|
|
4444
|
+
[`@container (max-width: ${cssUtils.BREAKPOINTS.XS}px)`]: {
|
|
4447
4445
|
paddingLeft: 0
|
|
4448
4446
|
},
|
|
4449
4447
|
paddingBottom: theme.spacing(1.5),
|
|
@@ -4454,7 +4452,7 @@ const ChartBox = material.styled(material.Box)(({ theme }) => ({
|
|
|
4454
4452
|
minWidth: 0,
|
|
4455
4453
|
paddingLeft: theme.spacing(5),
|
|
4456
4454
|
paddingBottom: theme.spacing(1.5),
|
|
4457
|
-
[`@container (max-width: ${
|
|
4455
|
+
[`@container (max-width: ${cssUtils.BREAKPOINTS.XS}px)`]: {
|
|
4458
4456
|
paddingLeft: theme.spacing(1)
|
|
4459
4457
|
}
|
|
4460
4458
|
}));
|
|
@@ -4792,7 +4790,7 @@ function TimeSeriesWidgetUIContent({
|
|
|
4792
4790
|
);
|
|
4793
4791
|
const isLegendVisible = Boolean(showLegend ?? series.length > 1);
|
|
4794
4792
|
const header = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4795
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4793
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { color: "textSecondary", variant: "caption", children: currentDate || "-" }) }),
|
|
4796
4794
|
filterable && showClearButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4797
4795
|
material.Link,
|
|
4798
4796
|
{
|
|
@@ -4919,10 +4917,7 @@ const Text = material.styled(material.Typography, {
|
|
|
4919
4917
|
WebkitLineClamp: 2,
|
|
4920
4918
|
WebkitBoxOrient: "vertical"
|
|
4921
4919
|
},
|
|
4922
|
-
...!expanded &&
|
|
4923
|
-
whiteSpace: "nowrap",
|
|
4924
|
-
textOverflow: "ellipsis"
|
|
4925
|
-
}
|
|
4920
|
+
...!expanded && cssUtils.ellipsisStyles
|
|
4926
4921
|
}));
|
|
4927
4922
|
const HeaderItems = material.styled(material.Grid)(({ theme }) => ({
|
|
4928
4923
|
display: "flex",
|
|
@@ -5393,7 +5388,7 @@ function ComparativeCategoryWidgetUI({
|
|
|
5393
5388
|
const [tempSelection, setTempSelection] = React.useState(selectedCategories);
|
|
5394
5389
|
const [searchValue, setSearchValue] = React.useState("");
|
|
5395
5390
|
const intl = reactIntl.useIntl();
|
|
5396
|
-
const intlConfig =
|
|
5391
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
5397
5392
|
const processedData = React.useMemo(() => {
|
|
5398
5393
|
const _colors = colors.length ? colors : [
|
|
5399
5394
|
theme.palette.secondary.main,
|
|
@@ -5510,11 +5505,11 @@ function ComparativeCategoryWidgetUI({
|
|
|
5510
5505
|
const clickHandler = filterable ? searchActive ? selectTempCategory : selectCategory : void 0;
|
|
5511
5506
|
return /* @__PURE__ */ jsxRuntime.jsxs(Wrapper, { children: [
|
|
5512
5507
|
filterable ? /* @__PURE__ */ jsxRuntime.jsxs(Toolbar, { center: true, children: [
|
|
5513
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5508
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", children: selectedCategories.length > 0 ? intlConfig.formatMessage(
|
|
5514
5509
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
5515
5510
|
{ items: selectedCategories.length }
|
|
5516
5511
|
) : intlConfig.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
5517
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5512
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", component: "div", children: searchActive ? /* @__PURE__ */ jsxRuntime.jsx(Alert.Link, { onClick: applyTempSelection, children: intlConfig.formatMessage({ id: "c4r.widgets.category.apply" }) }) : blockingActive ? /* @__PURE__ */ jsxRuntime.jsx(Alert.Link, { onClick: disableBlocking, children: intlConfig.formatMessage({
|
|
5518
5513
|
id: "c4r.widgets.category.unlock"
|
|
5519
5514
|
}) }) : selectedCategories.length ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5520
5515
|
material.Box,
|
|
@@ -5552,10 +5547,10 @@ function ComparativeCategoryWidgetUI({
|
|
|
5552
5547
|
) }) : null,
|
|
5553
5548
|
/* @__PURE__ */ jsxRuntime.jsxs(CategoriesList, { children: [
|
|
5554
5549
|
list.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5555
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5550
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "body2", children: intlConfig.formatMessage({
|
|
5556
5551
|
id: "c4r.widgets.category.noResults"
|
|
5557
5552
|
}) }),
|
|
5558
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5553
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", children: intlConfig.formatMessage(
|
|
5559
5554
|
{ id: "c4r.widgets.category.noResultsMessage" },
|
|
5560
5555
|
{ searchValue }
|
|
5561
5556
|
) })
|
|
@@ -5593,11 +5588,11 @@ function ComparativeCategoryWidgetUI({
|
|
|
5593
5588
|
searchActive ? /* @__PURE__ */ jsxRuntime.jsx(material.Button, { size: "small", color: "primary", onClick: disableSearchMode, children: intlConfig.formatMessage({ id: "c4r.widgets.category.cancel" }) }) : null,
|
|
5594
5589
|
/* @__PURE__ */ jsxRuntime.jsx(BulletListWrapper, { children: names.map((name, i) => /* @__PURE__ */ jsxRuntime.jsxs(BulletWrapper, { children: [
|
|
5595
5590
|
/* @__PURE__ */ jsxRuntime.jsx(Bullet, { color: (colors == null ? void 0 : colors[i]) ?? theme.palette.background.default }),
|
|
5596
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5591
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overline", children: name })
|
|
5597
5592
|
] }, names[i])) })
|
|
5598
5593
|
] });
|
|
5599
5594
|
}
|
|
5600
|
-
const Note = material.styled(
|
|
5595
|
+
const Note = material.styled(cssUtils.Typography)(({ theme }) => ({
|
|
5601
5596
|
display: "inline-block",
|
|
5602
5597
|
marginTop: theme.spacing(0.5)
|
|
5603
5598
|
}));
|
|
@@ -5614,10 +5609,10 @@ const MainLine = material.styled("div")(({ theme }) => ({
|
|
|
5614
5609
|
color: theme.palette.text.primary,
|
|
5615
5610
|
display: "flex"
|
|
5616
5611
|
}));
|
|
5617
|
-
const Preffix = material.styled(
|
|
5612
|
+
const Preffix = material.styled(cssUtils.Typography)(({ theme }) => ({
|
|
5618
5613
|
marginRight: theme.spacing(0.5)
|
|
5619
5614
|
}));
|
|
5620
|
-
const Unit = material.styled(
|
|
5615
|
+
const Unit = material.styled(cssUtils.Typography)(({ theme }) => ({
|
|
5621
5616
|
marginLeft: theme.spacing(0.5)
|
|
5622
5617
|
}));
|
|
5623
5618
|
function FormulaValue({
|
|
@@ -5765,19 +5760,19 @@ function ComparativePieWidgetUI({
|
|
|
5765
5760
|
data: legendData,
|
|
5766
5761
|
selectedMode: false,
|
|
5767
5762
|
type: "scroll",
|
|
5768
|
-
left:
|
|
5769
|
-
bottom:
|
|
5770
|
-
itemGap:
|
|
5763
|
+
left: cssUtils.SPACING,
|
|
5764
|
+
bottom: cssUtils.SPACING * -0.5,
|
|
5765
|
+
itemGap: cssUtils.SPACING * 3,
|
|
5771
5766
|
icon: "circle",
|
|
5772
|
-
itemWidth:
|
|
5773
|
-
itemHeight:
|
|
5767
|
+
itemWidth: cssUtils.SPACING,
|
|
5768
|
+
itemHeight: cssUtils.SPACING,
|
|
5774
5769
|
textStyle: {
|
|
5775
5770
|
...theme.typography.overline,
|
|
5776
5771
|
color: theme.palette.text.primary,
|
|
5777
5772
|
fontWeight: 400,
|
|
5778
5773
|
lineHeight: 1,
|
|
5779
5774
|
verticalAlign: "bottom",
|
|
5780
|
-
padding: [0, 0, 0,
|
|
5775
|
+
padding: [0, 0, 0, cssUtils.SPACING * 0.5]
|
|
5781
5776
|
},
|
|
5782
5777
|
inactiveColor: theme.palette.text.disabled,
|
|
5783
5778
|
pageIcons: {
|
|
@@ -5786,13 +5781,13 @@ function ComparativePieWidgetUI({
|
|
|
5786
5781
|
"path://M9 16.59 13.3265857 12 9 7.41 10.3319838 6 16 12 10.3319838 18z"
|
|
5787
5782
|
]
|
|
5788
5783
|
},
|
|
5789
|
-
pageIconSize:
|
|
5784
|
+
pageIconSize: cssUtils.SPACING * 1.5,
|
|
5790
5785
|
pageIconColor: theme.palette.text.secondary,
|
|
5791
5786
|
pageIconInactiveColor: theme.palette.text.disabled,
|
|
5792
5787
|
pageTextStyle: {
|
|
5793
5788
|
fontFamily: theme.typography.overline.fontFamily,
|
|
5794
|
-
fontSize:
|
|
5795
|
-
lineHeight:
|
|
5789
|
+
fontSize: cssUtils.SPACING * 1.5,
|
|
5790
|
+
lineHeight: cssUtils.SPACING * 1.75,
|
|
5796
5791
|
fontWeight: 400,
|
|
5797
5792
|
color: theme.palette.text.primary
|
|
5798
5793
|
}
|
|
@@ -5804,15 +5799,15 @@ function ComparativePieWidgetUI({
|
|
|
5804
5799
|
rich: {
|
|
5805
5800
|
b: {
|
|
5806
5801
|
fontFamily: theme.typography.overline.fontFamily,
|
|
5807
|
-
fontSize:
|
|
5808
|
-
lineHeight:
|
|
5802
|
+
fontSize: cssUtils.SPACING * 1.75,
|
|
5803
|
+
lineHeight: cssUtils.SPACING * 1.75,
|
|
5809
5804
|
fontWeight: 400,
|
|
5810
5805
|
color: theme.palette.text.primary
|
|
5811
5806
|
},
|
|
5812
5807
|
per: {
|
|
5813
5808
|
...theme.typography.overline,
|
|
5814
|
-
fontSize:
|
|
5815
|
-
lineHeight:
|
|
5809
|
+
fontSize: cssUtils.SPACING * 3,
|
|
5810
|
+
lineHeight: cssUtils.SPACING * 4.5,
|
|
5816
5811
|
fontWeight: 600,
|
|
5817
5812
|
color: theme.palette.text.primary
|
|
5818
5813
|
}
|
|
@@ -5831,7 +5826,7 @@ function ComparativePieWidgetUI({
|
|
|
5831
5826
|
radius: i === 0 ? ["75%", "90%"] : ["56%", "72%"],
|
|
5832
5827
|
selectedOffset: 0,
|
|
5833
5828
|
hoverOffset: 5,
|
|
5834
|
-
bottom:
|
|
5829
|
+
bottom: cssUtils.SPACING * 2.5,
|
|
5835
5830
|
avoidLabelOverlap: true,
|
|
5836
5831
|
label: { show: false, ...labelOptions },
|
|
5837
5832
|
emphasis: {
|
|
@@ -6026,7 +6021,7 @@ function FeatureSelectionUIDropdown({
|
|
|
6026
6021
|
disabled: editDisabled && isEditItem(mode),
|
|
6027
6022
|
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [
|
|
6028
6023
|
mode.icon,
|
|
6029
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { ml: 2, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6024
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { ml: 2, children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "body2", color: "inherit", children: material.capitalize(mode.label) }) })
|
|
6030
6025
|
] })
|
|
6031
6026
|
},
|
|
6032
6027
|
mode.id
|
|
@@ -6055,7 +6050,7 @@ function FeatureSelectionUIDropdown({
|
|
|
6055
6050
|
onClose: closeDropdown,
|
|
6056
6051
|
MenuListProps: { "aria-labelledby": "feature-selection-menu-button" },
|
|
6057
6052
|
children: [
|
|
6058
|
-
menuHeaderText && /* @__PURE__ */ jsxRuntime.jsx(DisabledMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6053
|
+
menuHeaderText && /* @__PURE__ */ jsxRuntime.jsx(DisabledMenuItem, { disabled: true, children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "textSecondary", children: menuHeaderText }) }),
|
|
6059
6054
|
!!selectionModes.length && selectionModes.map(createMenuItemWrapper),
|
|
6060
6055
|
showDivider && /* @__PURE__ */ jsxRuntime.jsx(material.Divider, { sx: { margin: ({ spacing }) => spacing(1, 0) } }),
|
|
6061
6056
|
!!editModes.length && editModes.map(createMenuItemWrapper)
|
|
@@ -6089,7 +6084,7 @@ function FeatureSelectionUIGeometryChips({
|
|
|
6089
6084
|
chipLabel
|
|
6090
6085
|
}) {
|
|
6091
6086
|
const intl = reactIntl.useIntl();
|
|
6092
|
-
const intlConfig =
|
|
6087
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6093
6088
|
function translateType(type) {
|
|
6094
6089
|
if (type === "MultiPoint") {
|
|
6095
6090
|
return intlConfig.formatMessage({
|
|
@@ -6190,7 +6185,7 @@ function FeatureSelectionWidgetUI({
|
|
|
6190
6185
|
chipLabel
|
|
6191
6186
|
}) {
|
|
6192
6187
|
const intl = reactIntl.useIntl();
|
|
6193
|
-
const intlConfig =
|
|
6188
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6194
6189
|
const selectionModeWithLocales = React.useMemo(() => {
|
|
6195
6190
|
return selectionModes.map((mode) => ({
|
|
6196
6191
|
...mode,
|
|
@@ -6358,8 +6353,8 @@ const LegendIconWrapper = material.styled("li")(() => ({
|
|
|
6358
6353
|
}));
|
|
6359
6354
|
const LegendIconImageWrapper = material.styled("div")(({ theme }) => ({
|
|
6360
6355
|
marginRight: theme.spacing(1.5),
|
|
6361
|
-
width:
|
|
6362
|
-
height:
|
|
6356
|
+
width: cssUtils.ICON_SIZE_MEDIUM,
|
|
6357
|
+
height: cssUtils.ICON_SIZE_MEDIUM,
|
|
6363
6358
|
"& img": {
|
|
6364
6359
|
margin: "auto",
|
|
6365
6360
|
display: "block"
|
|
@@ -6390,7 +6385,7 @@ function LegendOpacityControl({
|
|
|
6390
6385
|
onChange
|
|
6391
6386
|
}) {
|
|
6392
6387
|
const intl = reactIntl.useIntl();
|
|
6393
|
-
const intlConfig =
|
|
6388
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6394
6389
|
function handleTextFieldChange(e) {
|
|
6395
6390
|
const newOpacity = parseInt(e.target.value || "0");
|
|
6396
6391
|
const clamped = Math.min(Math.max(newOpacity, 0), 100);
|
|
@@ -6482,7 +6477,7 @@ function LegendLayerTitle({
|
|
|
6482
6477
|
}
|
|
6483
6478
|
}, [title, visible]);
|
|
6484
6479
|
const element = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6485
|
-
|
|
6480
|
+
cssUtils.Typography,
|
|
6486
6481
|
{
|
|
6487
6482
|
ref,
|
|
6488
6483
|
color: visible ? "textPrimary" : "textSecondary",
|
|
@@ -6522,7 +6517,7 @@ function LegendCategories({
|
|
|
6522
6517
|
const palette = paletteUtils.getPalette(colors, labels.length);
|
|
6523
6518
|
const showHelperText = labels.length > MAX_CATEGORIES;
|
|
6524
6519
|
const intl = reactIntl.useIntl();
|
|
6525
|
-
const intlConfig =
|
|
6520
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6526
6521
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6527
6522
|
/* @__PURE__ */ jsxRuntime.jsx(LegendVariableList, { "data-testid": "categories-legend", children: labels.slice(0, MAX_CATEGORIES).map((label, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6528
6523
|
LegendCategoriesRow,
|
|
@@ -6536,7 +6531,7 @@ function LegendCategories({
|
|
|
6536
6531
|
`${label}${idx}`
|
|
6537
6532
|
)) }),
|
|
6538
6533
|
showHelperText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6539
|
-
|
|
6534
|
+
cssUtils.Typography,
|
|
6540
6535
|
{
|
|
6541
6536
|
variant: "caption",
|
|
6542
6537
|
color: "textSecondary",
|
|
@@ -6680,7 +6675,7 @@ function LegendProportion({
|
|
|
6680
6675
|
legend
|
|
6681
6676
|
}) {
|
|
6682
6677
|
const intl = reactIntl.useIntl();
|
|
6683
|
-
const intlConfig =
|
|
6678
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6684
6679
|
const showMinMax = legend.showMinMax ?? true;
|
|
6685
6680
|
const { min, max, error } = calculateRange(legend);
|
|
6686
6681
|
const [step1, step2] = !error ? calculateSteps(min, max) : [0, 0];
|
|
@@ -6693,20 +6688,20 @@ function LegendProportion({
|
|
|
6693
6688
|
},
|
|
6694
6689
|
index
|
|
6695
6690
|
)) }),
|
|
6696
|
-
/* @__PURE__ */ jsxRuntime.jsx(LabelList, { children: error ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { maxWidth: 240, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6697
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6691
|
+
/* @__PURE__ */ jsxRuntime.jsx(LabelList, { children: error ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { maxWidth: 240, children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6692
|
+
/* @__PURE__ */ jsxRuntime.jsxs(cssUtils.Typography, { variant: "overline", color: "textSecondary", children: [
|
|
6698
6693
|
showMinMax && intlConfig.formatMessage({ id: "c4r.widgets.legend.max" }) + ": ",
|
|
6699
6694
|
intl.formatNumber(max, {
|
|
6700
6695
|
maximumSignificantDigits: MAX_SIG_DIGITS
|
|
6701
6696
|
})
|
|
6702
6697
|
] }),
|
|
6703
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6698
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overline", color: "textSecondary", children: intl.formatNumber(step2, {
|
|
6704
6699
|
maximumSignificantDigits: MAX_SIG_DIGITS
|
|
6705
6700
|
}) }),
|
|
6706
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6701
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overline", color: "textSecondary", children: intl.formatNumber(step1, {
|
|
6707
6702
|
maximumSignificantDigits: MAX_SIG_DIGITS
|
|
6708
6703
|
}) }),
|
|
6709
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6704
|
+
/* @__PURE__ */ jsxRuntime.jsxs(cssUtils.Typography, { variant: "overline", color: "textSecondary", children: [
|
|
6710
6705
|
showMinMax && intlConfig.formatMessage({ id: "c4r.widgets.legend.min" }) + ": ",
|
|
6711
6706
|
intl.formatNumber(min, {
|
|
6712
6707
|
maximumSignificantDigits: MAX_SIG_DIGITS
|
|
@@ -6749,7 +6744,7 @@ function LegendIcon({
|
|
|
6749
6744
|
src: icons[idx],
|
|
6750
6745
|
alt: label,
|
|
6751
6746
|
width: "auto",
|
|
6752
|
-
height:
|
|
6747
|
+
height: cssUtils.ICON_SIZE_MEDIUM
|
|
6753
6748
|
}
|
|
6754
6749
|
) }),
|
|
6755
6750
|
/* @__PURE__ */ jsxRuntime.jsx(LegendLayerTitle, { visible: true, title: label })
|
|
@@ -6778,7 +6773,7 @@ function LegendRamp({
|
|
|
6778
6773
|
minLabel = "< " + minLabel;
|
|
6779
6774
|
maxLabel = "≥ " + maxLabel;
|
|
6780
6775
|
}
|
|
6781
|
-
return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { py: 2, "data-testid": "ramp-legend", children: error ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { maxWidth: 240, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Box, { py: 2, "data-testid": "ramp-legend", children: error ? /* @__PURE__ */ jsxRuntime.jsx(material.Box, { maxWidth: 240, children: /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overline", children: "You need to specify valid numbers for the labels property" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6782
6777
|
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { display: "flex", pb: 1, children: isContinuous ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6783
6778
|
StepsContinuous,
|
|
6784
6779
|
{
|
|
@@ -6795,8 +6790,8 @@ function LegendRamp({
|
|
|
6795
6790
|
}
|
|
6796
6791
|
) }),
|
|
6797
6792
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { display: "flex", justifyContent: "space-between", children: [
|
|
6798
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6799
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6793
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overlineDelicate", color: "textSecondary", children: minLabel }),
|
|
6794
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "overlineDelicate", color: "textSecondary", children: maxLabel })
|
|
6800
6795
|
] })
|
|
6801
6796
|
] }) });
|
|
6802
6797
|
}
|
|
@@ -6844,11 +6839,11 @@ const legendTypeMap = {
|
|
|
6844
6839
|
};
|
|
6845
6840
|
function LegendUnknown({ legend }) {
|
|
6846
6841
|
const intl = reactIntl.useIntl();
|
|
6847
|
-
const intlConfig =
|
|
6842
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6848
6843
|
if (legend.select || !legend.type) {
|
|
6849
6844
|
return null;
|
|
6850
6845
|
}
|
|
6851
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6846
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(cssUtils.Typography, { variant: "body2", color: "textSecondary", component: "p", children: [
|
|
6852
6847
|
legend.type,
|
|
6853
6848
|
" ",
|
|
6854
6849
|
intlConfig.formatMessage({ id: "c4r.widgets.legend.notSupported" }),
|
|
@@ -6875,7 +6870,7 @@ function LegendLayerVariable({
|
|
|
6875
6870
|
}) {
|
|
6876
6871
|
var _a;
|
|
6877
6872
|
const intl = reactIntl.useIntl();
|
|
6878
|
-
const intlConfig =
|
|
6873
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6879
6874
|
const type = legend.type;
|
|
6880
6875
|
const TypeComponent = legendTypeMap[type] ?? customLegendTypes[type] ?? LegendUnknown;
|
|
6881
6876
|
const TypedComponent = TypeComponent;
|
|
@@ -6883,7 +6878,7 @@ function LegendLayerVariable({
|
|
|
6883
6878
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { component: "li", "data-testid": "legend-layer-variable", px: 2, children: [
|
|
6884
6879
|
legend.attr ? /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { pb: 1, children: [
|
|
6885
6880
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6886
|
-
|
|
6881
|
+
cssUtils.Typography,
|
|
6887
6882
|
{
|
|
6888
6883
|
gutterBottom: true,
|
|
6889
6884
|
variant: "overlineDelicate",
|
|
@@ -6892,10 +6887,10 @@ function LegendLayerVariable({
|
|
|
6892
6887
|
children: intlConfig.formatMessage({ id: getLegendSubtitle(legend) })
|
|
6893
6888
|
}
|
|
6894
6889
|
),
|
|
6895
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6890
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", component: "p", children: legend.attr })
|
|
6896
6891
|
] }) : null,
|
|
6897
6892
|
legend.select ? /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { pb: 1, children: [
|
|
6898
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6893
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", weight: "medium", component: "p", children: legend.select.label }),
|
|
6899
6894
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6900
6895
|
material.Select,
|
|
6901
6896
|
{
|
|
@@ -6945,7 +6940,7 @@ function LegendLayer({
|
|
|
6945
6940
|
currentZoom = 0
|
|
6946
6941
|
}) {
|
|
6947
6942
|
const intl = reactIntl.useIntl();
|
|
6948
|
-
const intlConfig =
|
|
6943
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
6949
6944
|
const menuAnchorRef = React.useRef(null);
|
|
6950
6945
|
const [opacityOpen, setOpacityOpen] = React.useState(false);
|
|
6951
6946
|
const id = layer.id;
|
|
@@ -7003,7 +6998,7 @@ function LegendLayer({
|
|
|
7003
6998
|
id: "c4r.widgets.legend.zoomLevelTooltip"
|
|
7004
6999
|
}),
|
|
7005
7000
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7006
|
-
|
|
7001
|
+
cssUtils.Typography,
|
|
7007
7002
|
{
|
|
7008
7003
|
color: visible ? "textPrimary" : "textSecondary",
|
|
7009
7004
|
variant: "caption",
|
|
@@ -7072,7 +7067,7 @@ function LegendLayer({
|
|
|
7072
7067
|
}
|
|
7073
7068
|
),
|
|
7074
7069
|
helperText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7075
|
-
|
|
7070
|
+
cssUtils.Typography,
|
|
7076
7071
|
{
|
|
7077
7072
|
variant: "caption",
|
|
7078
7073
|
color: "textSecondary",
|
|
@@ -7122,9 +7117,9 @@ function LegendWidgetUI({
|
|
|
7122
7117
|
sx
|
|
7123
7118
|
}) {
|
|
7124
7119
|
const intl = reactIntl.useIntl();
|
|
7125
|
-
const intlConfig =
|
|
7120
|
+
const intlConfig = cssUtils.useImperativeIntl(intl);
|
|
7126
7121
|
const legendToggleHeader = /* @__PURE__ */ jsxRuntime.jsxs(LegendToggleHeader, { collapsed, children: [
|
|
7127
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7122
|
+
/* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", flexGrow: 1, children: title }),
|
|
7128
7123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7129
7124
|
material.Tooltip,
|
|
7130
7125
|
{
|