@carto/meridian-ds 2.15.0 → 2.15.1
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 +6 -0
- package/dist/{ListItem-D5EgekMd.cjs → ListItem-BOr1gyyO.cjs} +1 -1
- package/dist/{ListItem-Dy0LoUtr.js → ListItem-CW7C1948.js} +1 -1
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.js +5 -5
- package/dist/{palette-utils-67undqFl.cjs → palette-utils-CfP0zi6X.cjs} +6 -3
- package/dist/{palette-utils-e70Lg7JL.js → palette-utils-gZwK5wCD.js} +6 -3
- package/dist/theme/index.cjs +2 -2
- package/dist/theme/index.js +3 -3
- package/dist/types/hooks/useImperativeIntl.d.ts.map +1 -1
- package/dist/types/utils/locale-utils.d.ts +4 -2
- package/dist/types/utils/locale-utils.d.ts.map +1 -1
- package/dist/{utils-DZm0WeTM.cjs → utils-BfSr53C0.cjs} +1 -1
- package/dist/{utils-O0y2uQXv.js → utils-CD2XnHzC.js} +1 -1
- package/dist/widgets/index.cjs +2 -2
- package/dist/widgets/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Fix: preserve compiled messages in flattenMessages — fixes `buttonFooterLabelId` and similar intl-key props showing raw keys [#402](https://github.com/CartoDB/meridian-ds/pull/402)
|
|
6
|
+
|
|
5
7
|
## 2.0
|
|
6
8
|
|
|
9
|
+
### 2.15.1
|
|
10
|
+
|
|
11
|
+
- Fix: preserve compiled messages in flattenMessages — fixes `buttonFooterLabelId` and similar intl-key props showing raw keys [#402](https://github.com/CartoDB/meridian-ds/pull/402)
|
|
12
|
+
|
|
7
13
|
### 2.15.0
|
|
8
14
|
|
|
9
15
|
- Fix: WCAG accessibility improvements — IconButton aria-label, text contrast, widget labels [#398](https://github.com/CartoDB/meridian-ds/pull/398)
|
|
@@ -4,7 +4,7 @@ const React = require("react");
|
|
|
4
4
|
const material = require("@mui/material");
|
|
5
5
|
const iconsMaterial = require("@mui/icons-material");
|
|
6
6
|
require("cartocolor");
|
|
7
|
-
const paletteUtils = require("./palette-utils-
|
|
7
|
+
const paletteUtils = require("./palette-utils-CfP0zi6X.cjs");
|
|
8
8
|
const ReactWindow = require("react-window");
|
|
9
9
|
function _interopNamespaceDefault(e) {
|
|
10
10
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useState, createContext, useMemo, useContext } from
|
|
|
3
3
|
import { styled, Link as Link$1, Alert as Alert$1, Fade, AlertTitle, List as List$1, ListItemButton as ListItemButton$1, ListItem as ListItem$1 } from "@mui/material";
|
|
4
4
|
import { OpenInNewOutlined } from "@mui/icons-material";
|
|
5
5
|
import "cartocolor";
|
|
6
|
-
import { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, u as useTranslationWithFallback, T as Typography, m as LIST_MAX_SIZE, n as LIST_OVERSCAN_ITEMS_COUNT, h as LIST_ITEM_SIZE_DENSE, i as LIST_ITEM_SIZE_DEFAULT } from "./palette-utils-
|
|
6
|
+
import { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, u as useTranslationWithFallback, T as Typography, m as LIST_MAX_SIZE, n as LIST_OVERSCAN_ITEMS_COUNT, h as LIST_ITEM_SIZE_DENSE, i as LIST_ITEM_SIZE_DEFAULT } from "./palette-utils-gZwK5wCD.js";
|
|
7
7
|
import * as ReactWindow from "react-window";
|
|
8
8
|
const ScreenReaderOnly = styled("span")(() => ({
|
|
9
9
|
position: "absolute",
|
|
@@ -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 iconsMaterial = require("@mui/icons-material");
|
|
7
|
-
const paletteUtils = require("../palette-utils-
|
|
8
|
-
const ListItem = require("../ListItem-
|
|
7
|
+
const paletteUtils = require("../palette-utils-CfP0zi6X.cjs");
|
|
8
|
+
const ListItem = require("../ListItem-BOr1gyyO.cjs");
|
|
9
9
|
const ArrowDown = require("../ArrowDown-84Oc8r9k.cjs");
|
|
10
10
|
const OpenDiagonallyRight = require("../OpenDiagonallyRight-BUZBgnkY.cjs");
|
|
11
|
-
const utils = require("../utils-
|
|
11
|
+
const utils = require("../utils-BfSr53C0.cjs");
|
|
12
12
|
require("cartocolor");
|
|
13
13
|
const ReactWindow = require("react-window");
|
|
14
14
|
const reactCodemirror2 = require("react-codemirror2");
|
package/dist/components/index.js
CHANGED
|
@@ -3,13 +3,13 @@ import React, { forwardRef, useState, useRef, useEffect, useMemo, createElement,
|
|
|
3
3
|
import { styled, Box, Button as Button$1, CircularProgress as CircularProgress$1, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, Select, FormControl, InputLabel, FormHelperText, Link, Checkbox, IconButton as IconButton$1, ListItemText as ListItemText$1, Tooltip, ToggleButtonGroup as ToggleButtonGroup$1, Stack, Autocomplete as Autocomplete$1, Divider, ListItemIcon as ListItemIcon$1, createFilterOptions, alpha, useTheme, AppBar as AppBar$1, Toolbar as Toolbar$1, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip as Chip$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Slide, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Menu as Menu$2, useMediaQuery, Snackbar as Snackbar$1, Portal, Fade, ListSubheader as ListSubheader$1, Typography as Typography$1, Popover } from "@mui/material";
|
|
4
4
|
import { ListItemAvatar, ListItemSecondaryAction } from "@mui/material";
|
|
5
5
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, ArrowBackOutlined, Check, TodayOutlined, StopCircleOutlined, ArrowUpwardOutlined } from "@mui/icons-material";
|
|
6
|
-
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL, o as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, l as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, p as useImperativeIntl, b as ICON_SIZE_MEDIUM, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles, r as resolvePalettePath } from "../palette-utils-
|
|
7
|
-
import { a } from "../palette-utils-
|
|
8
|
-
import { S as ScreenReaderOnly, A as Alert$1, u as useListContextProps } from "../ListItem-
|
|
9
|
-
import { L, a as a2, b, c, d } from "../ListItem-
|
|
6
|
+
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL, o as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, l as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, p as useImperativeIntl, b as ICON_SIZE_MEDIUM, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles, r as resolvePalettePath } from "../palette-utils-gZwK5wCD.js";
|
|
7
|
+
import { a } from "../palette-utils-gZwK5wCD.js";
|
|
8
|
+
import { S as ScreenReaderOnly, A as Alert$1, u as useListContextProps } from "../ListItem-CW7C1948.js";
|
|
9
|
+
import { L, a as a2, b, c, d } from "../ListItem-CW7C1948.js";
|
|
10
10
|
import { F as ForwardedComponent$1 } from "../ArrowDown-Bho9Ssnw.js";
|
|
11
11
|
import { F as ForwardedComponent, b as ForwardedComponent$2, a as ForwardedComponent$3 } from "../OpenDiagonallyRight-DQEM4RAg.js";
|
|
12
|
-
import { M as MenuItem$1, b as getThemeColor, S as SVG_SELECTOR } from "../utils-
|
|
12
|
+
import { M as MenuItem$1, b as getThemeColor, S as SVG_SELECTOR } from "../utils-CD2XnHzC.js";
|
|
13
13
|
import "cartocolor";
|
|
14
14
|
import * as ReactWindow from "react-window";
|
|
15
15
|
import { Controlled, UnControlled } from "react-codemirror2";
|
|
@@ -5809,15 +5809,18 @@ function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
|
5809
5809
|
}).locale;
|
|
5810
5810
|
}
|
|
5811
5811
|
const DEFAULT_LOCALE = "en";
|
|
5812
|
+
function isNestedMessages(value) {
|
|
5813
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5814
|
+
}
|
|
5812
5815
|
function flattenMessages(nestedMessages, prefix = "") {
|
|
5813
5816
|
return Object.keys(nestedMessages).reduce(
|
|
5814
5817
|
(messages2, key) => {
|
|
5815
5818
|
const value = nestedMessages[key];
|
|
5816
5819
|
const prefixedKey = prefix ? `${prefix}.${key}` : key;
|
|
5817
|
-
if (
|
|
5818
|
-
messages2[prefixedKey] = value;
|
|
5819
|
-
} else {
|
|
5820
|
+
if (isNestedMessages(value)) {
|
|
5820
5821
|
Object.assign(messages2, flattenMessages(value, prefixedKey));
|
|
5822
|
+
} else {
|
|
5823
|
+
messages2[prefixedKey] = value;
|
|
5821
5824
|
}
|
|
5822
5825
|
return messages2;
|
|
5823
5826
|
},
|
|
@@ -5791,15 +5791,18 @@ function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
|
5791
5791
|
}).locale;
|
|
5792
5792
|
}
|
|
5793
5793
|
const DEFAULT_LOCALE = "en";
|
|
5794
|
+
function isNestedMessages(value) {
|
|
5795
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5796
|
+
}
|
|
5794
5797
|
function flattenMessages(nestedMessages, prefix = "") {
|
|
5795
5798
|
return Object.keys(nestedMessages).reduce(
|
|
5796
5799
|
(messages2, key) => {
|
|
5797
5800
|
const value = nestedMessages[key];
|
|
5798
5801
|
const prefixedKey = prefix ? `${prefix}.${key}` : key;
|
|
5799
|
-
if (
|
|
5800
|
-
messages2[prefixedKey] = value;
|
|
5801
|
-
} else {
|
|
5802
|
+
if (isNestedMessages(value)) {
|
|
5802
5803
|
Object.assign(messages2, flattenMessages(value, prefixedKey));
|
|
5804
|
+
} else {
|
|
5805
|
+
messages2[prefixedKey] = value;
|
|
5803
5806
|
}
|
|
5804
5807
|
return messages2;
|
|
5805
5808
|
},
|
package/dist/theme/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const material = require("@mui/material");
|
|
5
|
-
const paletteUtils = require("../palette-utils-
|
|
6
|
-
const utils = require("../utils-
|
|
5
|
+
const paletteUtils = require("../palette-utils-CfP0zi6X.cjs");
|
|
6
|
+
const utils = require("../utils-BfSr53C0.cjs");
|
|
7
7
|
const jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
const iconsMaterial = require("@mui/icons-material");
|
|
9
9
|
const ArrowDown = require("../ArrowDown-84Oc8r9k.cjs");
|
package/dist/theme/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2
2
|
import { alpha, Tooltip, responsiveFontSizes, createTheme } from "@mui/material";
|
|
3
|
-
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, L as LIST_ITEM_MIN_SIZE, h as LIST_ITEM_SIZE_DENSE, i as LIST_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, j as commonPalette, B as BREAKPOINTS, S as SPACING } from "../palette-utils-
|
|
4
|
-
import { m, n, l, N, k } from "../palette-utils-
|
|
5
|
-
import { g as getPixelToRem, S as SVG_SELECTOR, a as getIconSizeMap, M as MenuItem } from "../utils-
|
|
3
|
+
import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, L as LIST_ITEM_MIN_SIZE, h as LIST_ITEM_SIZE_DENSE, i as LIST_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, j as commonPalette, B as BREAKPOINTS, S as SPACING } from "../palette-utils-gZwK5wCD.js";
|
|
4
|
+
import { m, n, l, N, k } from "../palette-utils-gZwK5wCD.js";
|
|
5
|
+
import { g as getPixelToRem, S as SVG_SELECTOR, a as getIconSizeMap, M as MenuItem } from "../utils-CD2XnHzC.js";
|
|
6
6
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
7
7
|
import { Cancel, EventOutlined, ChevronRightOutlined, ChevronLeftOutlined, ExpandMoreOutlined, CheckCircleOutlined, InfoOutlined } from "@mui/icons-material";
|
|
8
8
|
import { F as ForwardedComponent } from "../ArrowDown-Bho9Ssnw.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImperativeIntl.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImperativeIntl.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useImperativeIntl.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImperativeIntl.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,SAAS,EAEV,MAAM,YAAY,CAAA;AA2CnB,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,UAAU,EAAE,UAAU,aAE/D"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { MessageFormatElement } from 'react-intl';
|
|
1
2
|
export declare const DEFAULT_LOCALE = "en";
|
|
3
|
+
export type MessageValue = string | MessageFormatElement[];
|
|
2
4
|
export type NestedMessages = {
|
|
3
|
-
[key: string]:
|
|
5
|
+
[key: string]: MessageValue | NestedMessages;
|
|
4
6
|
};
|
|
5
|
-
export declare function flattenMessages(nestedMessages: NestedMessages, prefix?: string): Record<string,
|
|
7
|
+
export declare function flattenMessages(nestedMessages: NestedMessages, prefix?: string): Record<string, MessageValue>;
|
|
6
8
|
export declare function findMatchingMessagesLocale<T extends object>(locale: string, messages: T): "en" | keyof T;
|
|
7
9
|
//# sourceMappingURL=locale-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/locale-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"locale-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/locale-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,eAAO,MAAM,cAAc,OAAO,CAAA;AAClC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,oBAAoB,EAAE,CAAA;AAC1D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,cAAc,CAAA;CAC7C,CAAA;AAQD,wBAAgB,eAAe,CAAC,cAAc,EAAE,cAAc,EAAE,MAAM,SAAK,gCAc1E;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,MAAM,EACzD,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,kBASZ"}
|
|
@@ -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 paletteUtils = require("./palette-utils-
|
|
5
|
+
const paletteUtils = require("./palette-utils-CfP0zi6X.cjs");
|
|
6
6
|
function getPixelToRem(px) {
|
|
7
7
|
const fontBase = 16;
|
|
8
8
|
const rem = 1 / fontBase * px + "rem";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { styled, MenuItem as MenuItem$1 } from "@mui/material";
|
|
4
|
-
import { f as MENU_ITEM_SIZE_DENSE, l as MENU_ITEM_SIZE_EXTENDED, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, I as ICON_SIZE_LARGE } from "./palette-utils-
|
|
4
|
+
import { f as MENU_ITEM_SIZE_DENSE, l as MENU_ITEM_SIZE_EXTENDED, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, I as ICON_SIZE_LARGE } from "./palette-utils-gZwK5wCD.js";
|
|
5
5
|
function getPixelToRem(px) {
|
|
6
6
|
const fontBase = 16;
|
|
7
7
|
const rem = 1 / fontBase * px + "rem";
|
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 paletteUtils = require("../palette-utils-
|
|
7
|
+
const paletteUtils = require("../palette-utils-CfP0zi6X.cjs");
|
|
8
8
|
const _ReactEcharts = require("echarts-for-react");
|
|
9
9
|
const ReactWindow = require("react-window");
|
|
10
10
|
const Search = require("../Search-DFMUrdFt.cjs");
|
|
11
|
-
const ListItem = require("../ListItem-
|
|
11
|
+
const ListItem = require("../ListItem-BOr1gyyO.cjs");
|
|
12
12
|
const iconsMaterial = require("@mui/icons-material");
|
|
13
13
|
const SwatchSquare = require("../SwatchSquare-BydXPPhd.cjs");
|
|
14
14
|
function _interopNamespaceDefault(e) {
|
package/dist/widgets/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
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, Menu, MenuItem, SvgIcon, Icon, Collapse, LinearProgress, Typography as Typography$1, IconButton as IconButton$1, lighten, ClickAwayListener, ToggleButton, capitalize, Chip, Paper, Popover, Select, ListItemText, Drawer } from "@mui/material";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
-
import { q as getDefaultExportFromCjs, p as useImperativeIntl, T as Typography, S as SPACING, o as IconButton, B as BREAKPOINTS, a as TablePaginationActions, e as ellipsisStyles, s as getColorByCategory, j as commonPalette, b as ICON_SIZE_MEDIUM, t as getPalette } from "../palette-utils-
|
|
5
|
+
import { q as getDefaultExportFromCjs, p as useImperativeIntl, T as Typography, S as SPACING, o as IconButton, B as BREAKPOINTS, a as TablePaginationActions, e as ellipsisStyles, s as getColorByCategory, j as commonPalette, b as ICON_SIZE_MEDIUM, t as getPalette } from "../palette-utils-gZwK5wCD.js";
|
|
6
6
|
import _ReactEcharts from "echarts-for-react";
|
|
7
7
|
import * as ReactWindow from "react-window";
|
|
8
8
|
import { F as ForwardedComponent } from "../Search-Bx9LZ_VF.js";
|
|
9
|
-
import { A as Alert, L as Link$1, c as ListItem, a as List } from "../ListItem-
|
|
9
|
+
import { A as Alert, L as Link$1, c as ListItem, a as List } from "../ListItem-CW7C1948.js";
|
|
10
10
|
import { ChevronLeft, ChevronRight, ExpandLess, ExpandMore, MoreVert, KeyboardArrowDown, ErrorOutline, Cancel, VisibilityOutlined, VisibilityOffOutlined, Close, LayersOutlined } from "@mui/icons-material";
|
|
11
11
|
import { F as ForwardedComponent$1 } from "../SwatchSquare-BDOWVMHN.js";
|
|
12
12
|
function detectTouchscreen() {
|