@carto/meridian-ds 1.4.7-alpha-stack-error.1 → 1.4.8-alpha-external-link.5
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 +15 -3
- package/dist/{Alert-CywtIMOj.js → Alert-2L0Hy8lT.js} +74 -3
- package/dist/{Alert-BiOR9aar.cjs → Alert-CmDToT57.cjs} +72 -1
- package/dist/{OpenDiagonallyRight-BrRyCV4Q.cjs → OpenDiagonallyRight-CM1tojUq.cjs} +27 -0
- package/dist/{OpenDiagonallyRight-5HZXh46V.js → OpenDiagonallyRight-CSm5GYYJ.js} +27 -0
- package/dist/{TablePaginationActions-CFGXm44W.cjs → TablePaginationActions-CAmwcyTy.cjs} +6 -3
- package/dist/{TablePaginationActions-KpTvhN4Y.js → TablePaginationActions-b5wP_uRE.js} +6 -3
- package/dist/components/index.cjs +239 -21
- package/dist/components/index.js +246 -27
- package/dist/custom-icons/index.cjs +29 -55
- package/dist/custom-icons/index.js +29 -55
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/types/components/atoms/Button.d.ts +11 -0
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/types/components/atoms/Link.d.ts +14 -0
- package/dist/types/components/atoms/Link.d.ts.map +1 -0
- package/dist/types/components/atoms/SplitButton.d.ts +17 -0
- package/dist/types/components/atoms/SplitButton.d.ts.map +1 -0
- package/dist/types/components/atoms/index.d.ts +4 -0
- package/dist/types/components/atoms/index.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/CodeAreaInput.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/CodeAreaTheme.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/index.d.ts +1 -0
- package/dist/types/components/organisms/CodeArea/index.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/types.d.ts +4 -0
- package/dist/types/components/organisms/CodeArea/types.d.ts.map +1 -1
- package/dist/types/components/organisms/CodeArea/utils.d.ts +34 -0
- package/dist/types/components/organisms/CodeArea/utils.d.ts.map +1 -1
- package/dist/types/localization/en.d.ts +1 -0
- package/dist/types/localization/en.d.ts.map +1 -1
- package/dist/types/localization/es.d.ts +1 -0
- package/dist/types/localization/es.d.ts.map +1 -1
- package/dist/types/localization/id.d.ts +1 -0
- package/dist/types/localization/id.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +3 -0
- package/dist/types/localization/index.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +6 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts +1 -1
- package/dist/types/widgets/CategoryWidgetUI/CategoryWidgetUI.styled.d.ts.map +1 -1
- package/dist/types/widgets/ChartLegend.d.ts +2 -1
- package/dist/types/widgets/ChartLegend.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.d.ts.map +1 -1
- package/dist/widgets/index.cjs +14 -13
- package/dist/widgets/index.js +15 -14
- package/package.json +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/widgets/ChartLegend.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../src/widgets/ChartLegend.tsx"],"names":[],"mappings":"AAoEA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAM,EACN,kBAAkB,EAClB,MAAkB,EAClB,eAAe,GAChB,EAAE;IACD,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACzD,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD,2CAkJA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PieWidgetUI.d.ts","sourceRoot":"","sources":["../../../../src/widgets/PieWidgetUI/PieWidgetUI.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAwB,MAAM,wBAAwB,CAAA;AAIzE,OAAO,EAA0B,aAAa,EAAE,MAAM,wBAAwB,CAAA;AA2C9E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,IAAI,EACJ,IAAI,EACJ,SAAiD,EACjD,gBAA0C,EAC1C,gBAAgB,EAChB,MAAmB,EACnB,KAAkB,EAClB,MAAkB,EAClB,MAA8B,EAC9B,SAAgB,EAChB,UAAiB,EACjB,kBAA0C,EAC1C,0BAA0B,EAC1B,SAAS,EACT,QAAa,EACb,WAAW,EACX,KAA0B,GAC3B,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"PieWidgetUI.d.ts","sourceRoot":"","sources":["../../../../src/widgets/PieWidgetUI/PieWidgetUI.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAwB,MAAM,wBAAwB,CAAA;AAIzE,OAAO,EAA0B,aAAa,EAAE,MAAM,wBAAwB,CAAA;AA2C9E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,IAAI,EACJ,IAAI,EACJ,SAAiD,EACjD,gBAA0C,EAC1C,gBAAgB,EAChB,MAAmB,EACnB,KAAkB,EAClB,MAAkB,EAClB,MAA8B,EAC9B,SAAgB,EAChB,UAAiB,EACjB,kBAA0C,EAC1C,0BAA0B,EAC1B,SAAS,EACT,QAAa,EACb,WAAW,EACX,KAA0B,GAC3B,EAAE,gBAAgB,2CA+NlB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG;IACjD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACrC,gBAAgB,CAAC,EAAE,OAAO,uBAAuB,CAAA;IACjD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,iBAAS,uBAAuB,CAC9B,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EACpC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,iBAiB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparativeCategoryWidgetUI.d.ts","sourceRoot":"","sources":["../../../../../src/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComparativeCategoryWidgetUI.d.ts","sourceRoot":"","sources":["../../../../../src/widgets/comparative/ComparativeCategoryWidgetUI/ComparativeCategoryWidgetUI.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAwB,MAAM,wBAAwB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAGtE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAW1E,MAAM,MAAM,gCAAgC,GAAG;IAC7C,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,IAAI,EAAE,YAAY,EAAE,EAAE,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;IAC9C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;IACrD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,EAClD,KAA+B,EAC/B,IAAsC,EACtC,MAAgC,EAChC,MAAgC,EAChC,QAAY,EACZ,KAAwB,EACxB,SAAgB,EAChB,gBAAgB,EAChB,UAAiB,EACjB,UAAiB,EACjB,kBAA4C,EAC5C,0BAAqC,EACrC,SAAyD,EACzD,gBAAgE,EAChE,OAAc,EACd,SAAiB,GAClB,EAAE,gCAAgC,2CAwSlC"}
|
package/dist/widgets/index.cjs
CHANGED
|
@@ -4,12 +4,12 @@ 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 TablePaginationActions = require("../TablePaginationActions-
|
|
7
|
+
const TablePaginationActions = require("../TablePaginationActions-CAmwcyTy.cjs");
|
|
8
8
|
const _ReactEcharts = require("echarts-for-react");
|
|
9
9
|
const reactWindow = require("react-window");
|
|
10
10
|
const SwatchSquare = require("../SwatchSquare-benaO55C.cjs");
|
|
11
11
|
const iconsMaterial = require("@mui/icons-material");
|
|
12
|
-
const Alert = require("../Alert-
|
|
12
|
+
const Alert = require("../Alert-CmDToT57.cjs");
|
|
13
13
|
const paletteUtils = require("../paletteUtils-B9ybmwiI.cjs");
|
|
14
14
|
function detectTouchscreen() {
|
|
15
15
|
let result = false;
|
|
@@ -33,7 +33,7 @@ function processFormatterResult(formatterResult) {
|
|
|
33
33
|
return `${formatterResult.prefix ?? ""}${formatterResult.value}${formatterResult.suffix ?? ""}`;
|
|
34
34
|
}
|
|
35
35
|
const EMPTY_ARR$8 = [];
|
|
36
|
-
const EMPTY_OBJ$
|
|
36
|
+
const EMPTY_OBJ$6 = {};
|
|
37
37
|
const IDENTITY$5 = (n) => n;
|
|
38
38
|
function defaultTooltipFormatter$5(params, yAxisFormatter) {
|
|
39
39
|
if (!params) {
|
|
@@ -62,7 +62,7 @@ function defaultTooltipFormatter$5(params, yAxisFormatter) {
|
|
|
62
62
|
}
|
|
63
63
|
function useProcessedProps({
|
|
64
64
|
height,
|
|
65
|
-
labels = EMPTY_OBJ$
|
|
65
|
+
labels = EMPTY_OBJ$6,
|
|
66
66
|
yAxisData: _yAxisData,
|
|
67
67
|
selectedBars: _selectedBars = EMPTY_ARR$8,
|
|
68
68
|
series: _series,
|
|
@@ -786,13 +786,13 @@ function animateValues({
|
|
|
786
786
|
requestRef.current = requestAnimationFrame(animate);
|
|
787
787
|
}
|
|
788
788
|
const EMPTY_ARR$7 = [];
|
|
789
|
-
const EMPTY_OBJ$
|
|
789
|
+
const EMPTY_OBJ$5 = {};
|
|
790
790
|
const IDENTITY$4 = (v) => v;
|
|
791
791
|
const EMPTY_FN$a = () => void 0;
|
|
792
792
|
function CategoryWidgetUI({
|
|
793
793
|
data,
|
|
794
794
|
formatter = IDENTITY$4,
|
|
795
|
-
labels = EMPTY_OBJ$
|
|
795
|
+
labels = EMPTY_OBJ$5,
|
|
796
796
|
maxItems = 5,
|
|
797
797
|
othersValue,
|
|
798
798
|
order = OrderTypes.Ranking,
|
|
@@ -1242,9 +1242,6 @@ function CategoryWidgetUI({
|
|
|
1242
1242
|
/* @__PURE__ */ jsxRuntime.jsx(CategoriesWrapper, { container: true, item: true, children: animValues.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
1243
|
reactWindow.FixedSizeList,
|
|
1244
1244
|
{
|
|
1245
|
-
outerElementType: React.forwardRef(
|
|
1246
|
-
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-testid": "category-widget-list", ...props })
|
|
1247
|
-
),
|
|
1248
1245
|
height: getFixedSizeListHeight(),
|
|
1249
1246
|
width: "100%",
|
|
1250
1247
|
itemCount: animValues.length,
|
|
@@ -2069,9 +2066,11 @@ const Circle$1 = material.styled(material.Box, {
|
|
|
2069
2066
|
height: size
|
|
2070
2067
|
};
|
|
2071
2068
|
});
|
|
2069
|
+
const EMPTY_OBJ$4 = {};
|
|
2072
2070
|
function ChartLegend({
|
|
2073
2071
|
series,
|
|
2074
2072
|
selectedCategories,
|
|
2073
|
+
labels = EMPTY_OBJ$4,
|
|
2075
2074
|
onCategoryClick
|
|
2076
2075
|
}) {
|
|
2077
2076
|
var _a, _b;
|
|
@@ -2138,6 +2137,7 @@ function ChartLegend({
|
|
|
2138
2137
|
children: series.map((category, i) => {
|
|
2139
2138
|
if (i < offset) return null;
|
|
2140
2139
|
const selected = selectedCategories.length === 0 || selectedCategories.includes(category.name);
|
|
2140
|
+
const label = category.name in labels ? labels[category.name] : category.name;
|
|
2141
2141
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2142
2142
|
Item,
|
|
2143
2143
|
{
|
|
@@ -2159,7 +2159,7 @@ function ChartLegend({
|
|
|
2159
2159
|
{
|
|
2160
2160
|
variant: "overline",
|
|
2161
2161
|
color: selected ? void 0 : "text.disabled",
|
|
2162
|
-
children:
|
|
2162
|
+
children: label
|
|
2163
2163
|
}
|
|
2164
2164
|
)
|
|
2165
2165
|
]
|
|
@@ -2434,6 +2434,7 @@ function PieWidgetUI({
|
|
|
2434
2434
|
ChartLegend,
|
|
2435
2435
|
{
|
|
2436
2436
|
series: processedData,
|
|
2437
|
+
labels,
|
|
2437
2438
|
selectedCategories,
|
|
2438
2439
|
onCategoryClick: onSelectedCategoriesChange && handleLegendClick
|
|
2439
2440
|
}
|
|
@@ -5268,7 +5269,7 @@ function ComparativeCategoryWidgetUI({
|
|
|
5268
5269
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
5269
5270
|
{ items: selectedCategories.length }
|
|
5270
5271
|
) : intlConfig.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
5271
|
-
/* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "caption", component: "div", children: searchActive ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5272
|
+
/* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.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({
|
|
5272
5273
|
id: "c4r.widgets.category.unlock"
|
|
5273
5274
|
}) }) : selectedCategories.length ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5274
5275
|
material.Box,
|
|
@@ -5279,11 +5280,11 @@ function ComparativeCategoryWidgetUI({
|
|
|
5279
5280
|
gap: theme.spacing(1)
|
|
5280
5281
|
},
|
|
5281
5282
|
children: [
|
|
5282
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5283
|
+
/* @__PURE__ */ jsxRuntime.jsx(Alert.Link, { onClick: enableBlocking, children: intlConfig.formatMessage({
|
|
5283
5284
|
id: "c4r.widgets.category.lock"
|
|
5284
5285
|
}) }),
|
|
5285
5286
|
/* @__PURE__ */ jsxRuntime.jsx(material.Divider, { orientation: "vertical", flexItem: true }),
|
|
5286
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5287
|
+
/* @__PURE__ */ jsxRuntime.jsx(Alert.Link, { onClick: clearSelection, children: intlConfig.formatMessage({
|
|
5287
5288
|
id: "c4r.widgets.category.clear"
|
|
5288
5289
|
}) })
|
|
5289
5290
|
]
|
package/dist/widgets/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import React, { useMemo, useState, useEffect, useCallback, useRef,
|
|
2
|
+
import React, { useMemo, useState, useEffect, useCallback, useRef, createContext, useContext, useLayoutEffect, createRef } from "react";
|
|
3
3
|
import { useTheme, styled, Box, Skeleton, Grid, Link, darken, Button, Divider, TextField, InputAdornment, Checkbox, Tooltip, debounce, Slider, TableCell, Table, TableHead, TableRow, TableBody, TableContainer, TableSortLabel, TablePagination, IconButton as IconButton$1, Menu, MenuItem, SvgIcon, lighten, Typography as Typography$1, ClickAwayListener, ToggleButton, capitalize, ListItem, Chip, List, Paper, Popover, Select, ListItemText, Collapse, Drawer, Icon, LinearProgress } from "@mui/material";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
-
import { d as getDefaultExportFromCjs, u as useImperativeIntl, T as Typography, S as SPACING, B as BREAKPOINTS, a as TablePaginationActions, b as ICON_SIZE_MEDIUM } from "../TablePaginationActions-
|
|
5
|
+
import { d as getDefaultExportFromCjs, u as useImperativeIntl, T as Typography, S as SPACING, B as BREAKPOINTS, a as TablePaginationActions, b as ICON_SIZE_MEDIUM } from "../TablePaginationActions-b5wP_uRE.js";
|
|
6
6
|
import _ReactEcharts from "echarts-for-react";
|
|
7
7
|
import { FixedSizeList } from "react-window";
|
|
8
8
|
import { S as Search, a as SwatchSquare } from "../SwatchSquare-DhaaXt53.js";
|
|
9
9
|
import { ChevronLeft, ChevronRight, KeyboardArrowDown, ErrorOutline, Cancel, VisibilityOutlined, VisibilityOffOutlined, ExpandLess, ExpandMore, Close, LayersOutlined, MoreVert } from "@mui/icons-material";
|
|
10
|
-
import { I as IconButton, A as Alert } from "../Alert-
|
|
10
|
+
import { I as IconButton, L as Link$1, A as Alert } from "../Alert-2L0Hy8lT.js";
|
|
11
11
|
import { a as getColorByCategory, c as commonPalette, b as getPalette } from "../paletteUtils-BHqJlHm9.js";
|
|
12
12
|
function detectTouchscreen() {
|
|
13
13
|
let result = false;
|
|
@@ -31,7 +31,7 @@ function processFormatterResult(formatterResult) {
|
|
|
31
31
|
return `${formatterResult.prefix ?? ""}${formatterResult.value}${formatterResult.suffix ?? ""}`;
|
|
32
32
|
}
|
|
33
33
|
const EMPTY_ARR$8 = [];
|
|
34
|
-
const EMPTY_OBJ$
|
|
34
|
+
const EMPTY_OBJ$6 = {};
|
|
35
35
|
const IDENTITY$5 = (n) => n;
|
|
36
36
|
function defaultTooltipFormatter$5(params, yAxisFormatter) {
|
|
37
37
|
if (!params) {
|
|
@@ -60,7 +60,7 @@ function defaultTooltipFormatter$5(params, yAxisFormatter) {
|
|
|
60
60
|
}
|
|
61
61
|
function useProcessedProps({
|
|
62
62
|
height,
|
|
63
|
-
labels = EMPTY_OBJ$
|
|
63
|
+
labels = EMPTY_OBJ$6,
|
|
64
64
|
yAxisData: _yAxisData,
|
|
65
65
|
selectedBars: _selectedBars = EMPTY_ARR$8,
|
|
66
66
|
series: _series,
|
|
@@ -784,13 +784,13 @@ function animateValues({
|
|
|
784
784
|
requestRef.current = requestAnimationFrame(animate);
|
|
785
785
|
}
|
|
786
786
|
const EMPTY_ARR$7 = [];
|
|
787
|
-
const EMPTY_OBJ$
|
|
787
|
+
const EMPTY_OBJ$5 = {};
|
|
788
788
|
const IDENTITY$4 = (v) => v;
|
|
789
789
|
const EMPTY_FN$a = () => void 0;
|
|
790
790
|
function CategoryWidgetUI({
|
|
791
791
|
data,
|
|
792
792
|
formatter = IDENTITY$4,
|
|
793
|
-
labels = EMPTY_OBJ$
|
|
793
|
+
labels = EMPTY_OBJ$5,
|
|
794
794
|
maxItems = 5,
|
|
795
795
|
othersValue,
|
|
796
796
|
order = OrderTypes.Ranking,
|
|
@@ -1240,9 +1240,6 @@ function CategoryWidgetUI({
|
|
|
1240
1240
|
/* @__PURE__ */ jsx(CategoriesWrapper, { container: true, item: true, children: animValues.length ? /* @__PURE__ */ jsx(
|
|
1241
1241
|
FixedSizeList,
|
|
1242
1242
|
{
|
|
1243
|
-
outerElementType: forwardRef(
|
|
1244
|
-
(props, ref) => /* @__PURE__ */ jsx("div", { ref, "data-testid": "category-widget-list", ...props })
|
|
1245
|
-
),
|
|
1246
1243
|
height: getFixedSizeListHeight(),
|
|
1247
1244
|
width: "100%",
|
|
1248
1245
|
itemCount: animValues.length,
|
|
@@ -2067,9 +2064,11 @@ const Circle$1 = styled(Box, {
|
|
|
2067
2064
|
height: size
|
|
2068
2065
|
};
|
|
2069
2066
|
});
|
|
2067
|
+
const EMPTY_OBJ$4 = {};
|
|
2070
2068
|
function ChartLegend({
|
|
2071
2069
|
series,
|
|
2072
2070
|
selectedCategories,
|
|
2071
|
+
labels = EMPTY_OBJ$4,
|
|
2073
2072
|
onCategoryClick
|
|
2074
2073
|
}) {
|
|
2075
2074
|
var _a, _b;
|
|
@@ -2136,6 +2135,7 @@ function ChartLegend({
|
|
|
2136
2135
|
children: series.map((category, i) => {
|
|
2137
2136
|
if (i < offset) return null;
|
|
2138
2137
|
const selected = selectedCategories.length === 0 || selectedCategories.includes(category.name);
|
|
2138
|
+
const label = category.name in labels ? labels[category.name] : category.name;
|
|
2139
2139
|
return /* @__PURE__ */ jsxs(
|
|
2140
2140
|
Item,
|
|
2141
2141
|
{
|
|
@@ -2157,7 +2157,7 @@ function ChartLegend({
|
|
|
2157
2157
|
{
|
|
2158
2158
|
variant: "overline",
|
|
2159
2159
|
color: selected ? void 0 : "text.disabled",
|
|
2160
|
-
children:
|
|
2160
|
+
children: label
|
|
2161
2161
|
}
|
|
2162
2162
|
)
|
|
2163
2163
|
]
|
|
@@ -2432,6 +2432,7 @@ function PieWidgetUI({
|
|
|
2432
2432
|
ChartLegend,
|
|
2433
2433
|
{
|
|
2434
2434
|
series: processedData,
|
|
2435
|
+
labels,
|
|
2435
2436
|
selectedCategories,
|
|
2436
2437
|
onCategoryClick: onSelectedCategoriesChange && handleLegendClick
|
|
2437
2438
|
}
|
|
@@ -5266,7 +5267,7 @@ function ComparativeCategoryWidgetUI({
|
|
|
5266
5267
|
{ id: "c4r.widgets.category.selectedItems" },
|
|
5267
5268
|
{ items: selectedCategories.length }
|
|
5268
5269
|
) : intlConfig.formatMessage({ id: "c4r.widgets.category.all" }) }),
|
|
5269
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", component: "div", children: searchActive ? /* @__PURE__ */ jsx(Link, { onClick: applyTempSelection, children: intlConfig.formatMessage({ id: "c4r.widgets.category.apply" }) }) : blockingActive ? /* @__PURE__ */ jsx(Link, { onClick: disableBlocking, children: intlConfig.formatMessage({
|
|
5270
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", component: "div", children: searchActive ? /* @__PURE__ */ jsx(Link$1, { onClick: applyTempSelection, children: intlConfig.formatMessage({ id: "c4r.widgets.category.apply" }) }) : blockingActive ? /* @__PURE__ */ jsx(Link$1, { onClick: disableBlocking, children: intlConfig.formatMessage({
|
|
5270
5271
|
id: "c4r.widgets.category.unlock"
|
|
5271
5272
|
}) }) : selectedCategories.length ? /* @__PURE__ */ jsxs(
|
|
5272
5273
|
Box,
|
|
@@ -5277,11 +5278,11 @@ function ComparativeCategoryWidgetUI({
|
|
|
5277
5278
|
gap: theme.spacing(1)
|
|
5278
5279
|
},
|
|
5279
5280
|
children: [
|
|
5280
|
-
/* @__PURE__ */ jsx(Link, { onClick: enableBlocking, children: intlConfig.formatMessage({
|
|
5281
|
+
/* @__PURE__ */ jsx(Link$1, { onClick: enableBlocking, children: intlConfig.formatMessage({
|
|
5281
5282
|
id: "c4r.widgets.category.lock"
|
|
5282
5283
|
}) }),
|
|
5283
5284
|
/* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true }),
|
|
5284
|
-
/* @__PURE__ */ jsx(Link, { onClick: clearSelection, children: intlConfig.formatMessage({
|
|
5285
|
+
/* @__PURE__ */ jsx(Link$1, { onClick: clearSelection, children: intlConfig.formatMessage({
|
|
5285
5286
|
id: "c4r.widgets.category.clear"
|
|
5286
5287
|
}) })
|
|
5287
5288
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carto/meridian-ds",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8-alpha-external-link.5",
|
|
4
4
|
"description": "CARTO Meridian Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -165,6 +165,5 @@
|
|
|
165
165
|
"bugs": {
|
|
166
166
|
"url": "https://github.com/CartoDB/meridian-ds/issues"
|
|
167
167
|
},
|
|
168
|
-
"homepage": "https://github.com/CartoDB/meridian-ds#readme"
|
|
169
|
-
"stableVersion": "1.4.6"
|
|
168
|
+
"homepage": "https://github.com/CartoDB/meridian-ds#readme"
|
|
170
169
|
}
|