@carto/ps-react-ui 4.23.0 → 4.24.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/dist/{actions-D7LB9DvT.js → actions-B1ss030_.js} +187 -181
- package/dist/actions-B1ss030_.js.map +1 -0
- package/dist/legend.js +34 -21
- package/dist/legend.js.map +1 -1
- package/dist/types/legend/stores/types.d.ts +4 -2
- package/dist/types/widgets-v2/actions/searcher/filter.d.ts +3 -2
- package/dist/types/widgets-v2/wrapper/style.d.ts +31 -2
- package/dist/types/widgets-v2/wrapper/widget-actions.d.ts +2 -2
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +2 -2
- package/dist/widgets-v2/actions.js +1 -1
- package/dist/widgets-v2.js +342 -295
- package/dist/widgets-v2.js.map +1 -1
- package/package.json +1 -1
- package/src/legend/components/legend-item/legend-item-ui.test.tsx +22 -1
- package/src/legend/components/legend-ramp/legend-ramp-ui.tsx +22 -6
- package/src/legend/stores/types.ts +6 -11
- package/src/widgets-v2/actions/searcher/filter.test.ts +28 -0
- package/src/widgets-v2/actions/searcher/filter.ts +22 -4
- package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +9 -4
- package/src/widgets-v2/actions/searcher/searcher.test.tsx +22 -0
- package/src/widgets-v2/wrapper/style.ts +38 -2
- package/src/widgets-v2/wrapper/widget-actions.tsx +2 -2
- package/src/widgets-v2/wrapper/widget-wrapper.test.tsx +32 -2
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +58 -32
- package/dist/actions-D7LB9DvT.js.map +0 -1
|
@@ -72,7 +72,8 @@ export interface LegendRampVariable {
|
|
|
72
72
|
* Ordered low→high stops. Discrete ramps **require `colors.length + 1`**
|
|
73
73
|
* stops — the boundaries between color steps, including both outer edges —
|
|
74
74
|
* and each label is centered on its boundary line (keep labels short, e.g.
|
|
75
|
-
* `20K`; there is no collision handling
|
|
75
|
+
* `20K`; there is no collision handling; pass `''` to hide one — each step's
|
|
76
|
+
* tooltip still shows its full range). A discrete ramp with any other
|
|
76
77
|
* stop count is incoherent and renders an inline error instead of the bar.
|
|
77
78
|
* Continuous ramps show only the first/last endpoints.
|
|
78
79
|
*/
|
|
@@ -86,7 +87,8 @@ export interface LegendRampVariable {
|
|
|
86
87
|
*/
|
|
87
88
|
avg?: number;
|
|
88
89
|
/**
|
|
89
|
-
* Formats `avg`
|
|
90
|
+
* Formats `avg` and, on discrete ramps, the stop values shown in each
|
|
91
|
+
* step's range tooltip. Default `String(value)` — pass e.g.
|
|
90
92
|
* `(v) => formatNumber(v, 'es-ES')` or `(v) => `${v}%``. Use a stable
|
|
91
93
|
* reference (same contract as the other variable fields).
|
|
92
94
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Filters a 2D series of `{name, ...}` records by case-insensitive substring on
|
|
3
|
-
* the
|
|
3
|
+
* the label the user sees: `labelFormatter(name)` when a formatter is given,
|
|
4
|
+
* `name` otherwise. Keeps the dataset shape (one inner array per series).
|
|
4
5
|
* Used by the Searcher action's data transform.
|
|
5
6
|
*/
|
|
6
|
-
export declare function filterBySearchText(input: unknown, search: string): unknown;
|
|
7
|
+
export declare function filterBySearchText(input: unknown, search: string, labelFormatter?: (value: string | number) => string | number): unknown;
|
|
@@ -40,14 +40,43 @@ export declare const styles: {
|
|
|
40
40
|
height: ({ spacing }: Theme) => string;
|
|
41
41
|
zIndex: number;
|
|
42
42
|
};
|
|
43
|
+
header: {
|
|
44
|
+
display: "flex";
|
|
45
|
+
alignItems: "center";
|
|
46
|
+
gap: ({ spacing }: Theme) => string;
|
|
47
|
+
minHeight: ({ spacing }: Theme) => string;
|
|
48
|
+
paddingInlineEnd: ({ spacing }: Theme) => string;
|
|
49
|
+
};
|
|
43
50
|
summary: {
|
|
51
|
+
flex: number;
|
|
52
|
+
minWidth: number;
|
|
44
53
|
minHeight: ({ spacing }: Theme) => string;
|
|
54
|
+
paddingInlineEnd: number;
|
|
45
55
|
'& .MuiAccordionSummary-content': {
|
|
46
|
-
gap: ({ spacing }: Theme) => string;
|
|
47
|
-
paddingInlineEnd: ({ spacing }: Theme) => string;
|
|
48
56
|
alignItems: "center";
|
|
57
|
+
minWidth: number;
|
|
58
|
+
marginInlineEnd: number;
|
|
59
|
+
paddingInlineEnd: number;
|
|
49
60
|
};
|
|
50
61
|
};
|
|
62
|
+
headerNoIcon: {
|
|
63
|
+
paddingInlineEnd: ({ spacing }: Theme) => string;
|
|
64
|
+
};
|
|
65
|
+
expandIcon: {
|
|
66
|
+
display: "flex";
|
|
67
|
+
marginInlineStart: ({ spacing }: Theme) => string;
|
|
68
|
+
color: "text.secondary";
|
|
69
|
+
cursor: "pointer";
|
|
70
|
+
'& svg': {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
color: "inherit";
|
|
74
|
+
};
|
|
75
|
+
transition: ({ transitions }: Theme) => string;
|
|
76
|
+
};
|
|
77
|
+
expanded: {
|
|
78
|
+
transform: "rotate(180deg)";
|
|
79
|
+
};
|
|
51
80
|
summaryDisabled: {
|
|
52
81
|
'&, &:hover:not(.Mui-disabled)': {
|
|
53
82
|
cursor: "default";
|
|
@@ -11,8 +11,8 @@ export interface ActionsProps {
|
|
|
11
11
|
* pointer devices), and stay full-opacity when a descendant is marked with
|
|
12
12
|
* `.active` — typically applied by toggled actions.
|
|
13
13
|
*
|
|
14
|
-
* The container also stops click propagation so
|
|
15
|
-
*
|
|
14
|
+
* The container also stops click propagation, so a click on an action never
|
|
15
|
+
* reaches handlers further up the widget.
|
|
16
16
|
*/
|
|
17
17
|
export declare function Actions({ sx, children }: ActionsProps): import("react").JSX.Element;
|
|
18
18
|
export interface OptionsProps {
|
|
@@ -30,8 +30,8 @@ export interface WrapperProps {
|
|
|
30
30
|
variant?: 'outlined' | 'elevation';
|
|
31
31
|
labels?: Partial<WrapperLabels>;
|
|
32
32
|
/**
|
|
33
|
-
* Icon shown at the right edge of the
|
|
34
|
-
*
|
|
33
|
+
* Icon shown at the right edge of the header row, rotated 180° while the
|
|
34
|
+
* wrapper is expanded. Default: `ExpandMoreIcon`.
|
|
35
35
|
*/
|
|
36
36
|
expandIcon?: ComponentType<SvgIconProps>;
|
|
37
37
|
iconProps?: SvgIconProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "../actions-
|
|
1
|
+
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "../actions-B1ss030_.js";
|
|
2
2
|
import { a as E, i as D, n as O, r as k, t as A } from "../zoom-toggle-KA63b6-J.js";
|
|
3
3
|
import { a as j, c as M, d as N, f as P, i as F, l as I, n as L, o as R, r as z, s as B, t as V, u as H } from "../download--wRRnf19.js";
|
|
4
4
|
export { l as BrushToggle, F as CSVIcon, b as ChangeColumn, _ as DEFAULT_BRUSH_TOGGLE_LABELS, h as DEFAULT_CHANGE_COLUMN_LABELS, M as DEFAULT_DOWNLOAD_LABELS, y as DEFAULT_FULLSCREEN_LABELS, f as DEFAULT_LOCK_SELECTION_LABELS, p as DEFAULT_RELATIVE_DATA_LABELS, r as DEFAULT_SEARCHER_LABELS, S as DEFAULT_SHOW_ALL_LABELS, o as DEFAULT_STACK_TOGGLE_LABELS, O as DEFAULT_ZOOM_TOGGLE_LABELS, z as DOWNLOAD_ITEM_IDS, B as Download, g as FullScreen, v as LockSelection, j as MarkdownIcon, R as PNGIcon, s as RelativeData, d as SHOW_ALL_ID, n as Searcher, e as SearcherToggle, u as ShowAllToggle, T as StackToggle, k as ZOOM_LAYOUT, A as ZoomToggle, m as addBrush, w as addStack, D as addZoom, V as buildCsvDownloadItem, L as buildPngDownloadItem, E as createAddZoom, x as createPercentFormatter, I as downloadDOMToPNG, H as downloadToCSV, a as filterByLockedItems, t as filterBySearchText, C as setSearcherText, i as setShowAll, N as toCsvString, c as toRelativeData, P as triggerLinkDownload };
|