@carto/ps-react-ui 4.9.1 → 4.11.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/dist/category-Dnd2_j0x.js +719 -0
- package/dist/category-Dnd2_j0x.js.map +1 -0
- package/dist/change-column-DjjwoPt1.js +1143 -0
- package/dist/change-column-DjjwoPt1.js.map +1 -0
- package/dist/chat.js +1507 -0
- package/dist/chat.js.map +1 -0
- package/dist/components.js +122 -120
- package/dist/components.js.map +1 -1
- package/dist/copy-button-DGL1tyli.js +26 -0
- package/dist/copy-button-DGL1tyli.js.map +1 -0
- package/dist/{data-zoom-layout-0QSptXG_.js → data-zoom-layout-CkVnm6ej.js} +3 -3
- package/dist/{data-zoom-layout-0QSptXG_.js.map → data-zoom-layout-CkVnm6ej.js.map} +1 -1
- package/dist/{download-config-CzmjOT2T.js → download-config-oJIFZ2WC.js} +9 -8
- package/dist/{download-config-CzmjOT2T.js.map → download-config-oJIFZ2WC.js.map} +1 -1
- package/dist/{png-item-CS4z1iSH.js → png-item-BE9uEqlD.js} +2 -2
- package/dist/png-item-BE9uEqlD.js.map +1 -0
- package/dist/{spread-Y9R1f5dm.js → spread-DYNpzgh_.js} +10 -11
- package/dist/{spread-Y9R1f5dm.js.map → spread-DYNpzgh_.js.map} +1 -1
- package/dist/{table-CQCAnDLb.js → table-C9IMbTr0.js} +50 -53
- package/dist/table-C9IMbTr0.js.map +1 -0
- package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
- package/dist/types/chat/bubbles/index.d.ts +4 -0
- package/dist/types/chat/const.d.ts +4 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -0
- package/dist/types/chat/containers/chat-footer.d.ts +2 -0
- package/dist/types/chat/containers/chat-header.d.ts +2 -0
- package/dist/types/chat/containers/chat-starter.d.ts +2 -0
- package/dist/types/chat/containers/index.d.ts +4 -0
- package/dist/types/chat/containers/styles.d.ts +93 -0
- package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
- package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
- package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
- package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
- package/dist/types/chat/feedback/index.d.ts +8 -0
- package/dist/types/chat/feedback/styles.d.ts +211 -0
- package/dist/types/chat/index.d.ts +20 -0
- package/dist/types/chat/types.d.ts +184 -0
- package/dist/types/chat/use-typewriter.d.ts +30 -0
- package/dist/types/components/copy-button/copy-button.d.ts +2 -0
- package/dist/types/components/copy-button/types.d.ts +6 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +1 -1
- package/dist/types/widgets/actions/shared/styles.d.ts +1 -1
- package/dist/types/widgets/actions/zoom-toggle/style.d.ts +1 -1
- package/dist/types/widgets/echart/types.d.ts +1 -1
- package/dist/types/widgets/toolbar-actions/styles.d.ts +1 -1
- package/dist/types/widgets-v2/actions/brush-toggle/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/change-column/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/fullscreen/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/index.d.ts +1 -0
- package/dist/types/widgets-v2/actions/lock-selection/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/relative-data/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/searcher/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/show-all/index.d.ts +2 -0
- package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
- package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -0
- package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +1 -1
- package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +1 -1
- package/dist/types/widgets-v2/category/category-ui.d.ts +9 -2
- package/dist/types/widgets-v2/category/category.d.ts +9 -2
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +19 -6
- package/dist/types/widgets-v2/category/style.d.ts +21 -2
- package/dist/types/widgets-v2/category/types.d.ts +2 -0
- package/dist/types/widgets-v2/index.d.ts +3 -2
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +7 -2
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +13 -6
- package/dist/types/widgets-v2/selection-summary/style.d.ts +15 -0
- package/dist/widgets/actions.js +115 -114
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +1 -1
- package/dist/widgets/category.js +9 -8
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/formula.js +11 -10
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +7 -6
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +9 -8
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +1 -1
- package/dist/widgets/scatterplot.js +1 -1
- package/dist/widgets/spread.js +9 -8
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +17 -16
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +1 -1
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets/wrapper.js +3 -2
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +41 -37
- package/dist/widgets-v2/bar.js +9 -10
- package/dist/widgets-v2/bar.js.map +1 -1
- package/dist/widgets-v2/category.js +25 -26
- package/dist/widgets-v2/category.js.map +1 -1
- package/dist/widgets-v2/formula.js +3 -3
- package/dist/widgets-v2/histogram.js +11 -13
- package/dist/widgets-v2/histogram.js.map +1 -1
- package/dist/widgets-v2/markdown.js +26 -27
- package/dist/widgets-v2/markdown.js.map +1 -1
- package/dist/widgets-v2/pie.js +8 -10
- package/dist/widgets-v2/pie.js.map +1 -1
- package/dist/widgets-v2/scatterplot.js +10 -12
- package/dist/widgets-v2/scatterplot.js.map +1 -1
- package/dist/widgets-v2/spread.js +15 -16
- package/dist/widgets-v2/spread.js.map +1 -1
- package/dist/widgets-v2/table.js +39 -40
- package/dist/widgets-v2/table.js.map +1 -1
- package/dist/widgets-v2/timeseries.js +9 -11
- package/dist/widgets-v2/timeseries.js.map +1 -1
- package/dist/widgets-v2/utils.js +1 -1
- package/dist/widgets-v2.js +284 -282
- package/dist/widgets-v2.js.map +1 -1
- package/package.json +5 -1
- package/src/chat/bubbles/chat-agent-message.test.tsx +30 -0
- package/src/chat/bubbles/chat-agent-message.tsx +11 -0
- package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
- package/src/chat/bubbles/chat-error-message.tsx +47 -0
- package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
- package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.tsx +27 -0
- package/src/chat/bubbles/index.ts +4 -0
- package/src/chat/bubbles/styles.ts +148 -0
- package/src/chat/const.ts +4 -0
- package/src/chat/containers/chat-content.test.tsx +269 -0
- package/src/chat/containers/chat-content.tsx +142 -0
- package/src/chat/containers/chat-footer.test.tsx +34 -0
- package/src/chat/containers/chat-footer.tsx +78 -0
- package/src/chat/containers/chat-header.test.tsx +28 -0
- package/src/chat/containers/chat-header.tsx +29 -0
- package/src/chat/containers/chat-starter.test.tsx +32 -0
- package/src/chat/containers/chat-starter.tsx +75 -0
- package/src/chat/containers/index.ts +4 -0
- package/src/chat/containers/styles.ts +96 -0
- package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
- package/src/chat/feedback/chat-actions-container.tsx +7 -0
- package/src/chat/feedback/chat-loader.test.tsx +10 -0
- package/src/chat/feedback/chat-loader.tsx +31 -0
- package/src/chat/feedback/chat-rating-action.tsx +43 -0
- package/src/chat/feedback/chat-thinking.test.tsx +15 -0
- package/src/chat/feedback/chat-thinking.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
- package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
- package/src/chat/feedback/chat-tool-group.tsx +156 -0
- package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
- package/src/chat/feedback/chat-tool-trace.tsx +192 -0
- package/src/chat/feedback/get-tool-label.test.tsx +91 -0
- package/src/chat/feedback/get-tool-label.ts +13 -0
- package/src/chat/feedback/index.ts +8 -0
- package/src/chat/feedback/styles.ts +229 -0
- package/src/chat/index.ts +59 -0
- package/src/chat/types.ts +215 -0
- package/src/chat/use-typewriter.test.tsx +38 -0
- package/src/chat/use-typewriter.ts +82 -0
- package/src/components/copy-button/copy-button.test.tsx +41 -0
- package/src/components/copy-button/copy-button.tsx +31 -0
- package/src/components/copy-button/types.ts +10 -0
- package/src/components/index.ts +3 -0
- package/src/widgets/echart/types.ts +1 -1
- package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +1 -1
- package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +1 -1
- package/src/widgets-v2/actions/download/download.tsx +1 -1
- package/src/widgets-v2/actions/download/icons.tsx +1 -1
- package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +3 -3
- package/src/widgets-v2/actions/index.ts +8 -0
- package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +2 -2
- package/src/widgets-v2/actions/relative-data/relative-data.tsx +1 -1
- package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +1 -1
- package/src/widgets-v2/actions/searcher/searcher.tsx +2 -2
- package/src/widgets-v2/actions/show-all/index.ts +7 -0
- package/src/widgets-v2/actions/show-all/labels.ts +8 -0
- package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
- package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
- package/src/widgets-v2/actions/show-all/style.ts +8 -0
- package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +1 -1
- package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +1 -1
- package/src/widgets-v2/category/category-ui.test.tsx +26 -10
- package/src/widgets-v2/category/category-ui.tsx +13 -3
- package/src/widgets-v2/category/category.test.tsx +4 -4
- package/src/widgets-v2/category/category.tsx +10 -1
- package/src/widgets-v2/category/components/category-row-other.test.tsx +36 -7
- package/src/widgets-v2/category/components/category-row-other.tsx +64 -13
- package/src/widgets-v2/category/style.ts +35 -4
- package/src/widgets-v2/category/types.ts +2 -0
- package/src/widgets-v2/index.ts +3 -0
- package/src/widgets-v2/selection-summary/labels.ts +8 -4
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +15 -9
- package/src/widgets-v2/selection-summary/selection-summary.tsx +42 -22
- package/src/widgets-v2/selection-summary/style.ts +15 -0
- package/src/widgets-v2/table/table-ui.tsx +4 -4
- package/src/widgets-v2/toolbox/toolbox.tsx +1 -1
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +1 -1
- package/dist/category-DwaeYjpX.js +0 -656
- package/dist/category-DwaeYjpX.js.map +0 -1
- package/dist/change-column-B4IT0rh6.js +0 -1110
- package/dist/change-column-B4IT0rh6.js.map +0 -1
- package/dist/png-item-CS4z1iSH.js.map +0 -1
- package/dist/table-CQCAnDLb.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Searcher, SearcherToggle, setSearcherText, filterBySearchText, DEFAULT_SEARCHER_LABELS, type SearcherProps, type SearcherToggleProps, type SearcherLabels, } from './searcher';
|
|
2
2
|
export { StackToggle, addStack, DEFAULT_STACK_TOGGLE_LABELS, type StackToggleProps, type StackToggleLabels, } from './stack-toggle';
|
|
3
|
+
export { ShowAllToggle, setShowAll, SHOW_ALL_ID, DEFAULT_SHOW_ALL_LABELS, type ShowAllToggleProps, type ShowAllLabels, } from './show-all';
|
|
3
4
|
export { ZoomToggle, addZoom, createAddZoom, ZOOM_LAYOUT, DEFAULT_ZOOM_TOGGLE_LABELS, type ZoomToggleProps, type ZoomToggleLabels, } from './zoom-toggle';
|
|
4
5
|
export { BrushToggle, addBrush, DEFAULT_BRUSH_TOGGLE_LABELS, type BrushToggleProps, type BrushToggleLabels, } from './brush-toggle';
|
|
5
6
|
export { RelativeData, toRelativeData, createPercentFormatter, DEFAULT_RELATIVE_DATA_LABELS, type RelativeDataProps, type RelativeDataLabels, } from './relative-data';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { ShowAllLabels } from './labels';
|
|
4
|
+
/**
|
|
5
|
+
* The `show-all` flag is a pure UI signal (no data/config transform): the
|
|
6
|
+
* Category overflow row writes it `true` via {@link setShowAll}, the
|
|
7
|
+
* composer reads it with `useTransformEnabled(id, SHOW_ALL_ID)` to drop the
|
|
8
|
+
* row cap, and this button writes it back `false` to collapse. Stored under
|
|
9
|
+
* `transformStates` so `useTransformEnabled` can observe it like any other
|
|
10
|
+
* action flag — but it never registers a pipeline transform, so toggling it
|
|
11
|
+
* never re-runs the data pipeline.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SHOW_ALL_ID = "show-all";
|
|
14
|
+
export interface ShowAllToggleProps {
|
|
15
|
+
labels?: Partial<ShowAllLabels>;
|
|
16
|
+
icon?: ComponentType<SvgIconProps>;
|
|
17
|
+
iconProps?: SvgIconProps;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Collapse (✕) affordance shown while a widget is expanded into its
|
|
21
|
+
* "show all" state. Clicking it clears the `show-all` flag, returning the
|
|
22
|
+
* widget to its capped view. Mount it conditionally (only while the flag is
|
|
23
|
+
* set) so it doesn't occupy a `Widget.Toolbox` visibility-budget slot when
|
|
24
|
+
* the widget is collapsed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ShowAllToggle({ labels, icon: Icon, iconProps, }: ShowAllToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Imperatively writes the `show-all` flag into the widget store. Mirrors
|
|
29
|
+
* {@link setSearcherText} — used by the Category overflow row (to expand)
|
|
30
|
+
* and the {@link ShowAllToggle} button (to collapse) without routing through
|
|
31
|
+
* a re-rendered subscription.
|
|
32
|
+
*/
|
|
33
|
+
export declare function setShowAll(widgetId: string, value: boolean): void;
|
|
@@ -23,7 +23,7 @@ export interface CategoryUIProps {
|
|
|
23
23
|
* Caps the number of visible category rows.
|
|
24
24
|
*
|
|
25
25
|
* - `undefined` (omitted) — caps at {@link DEFAULT_MAX_ITEMS} (20).
|
|
26
|
-
* Surplus rows fold into a single
|
|
26
|
+
* Surplus rows fold into a single "Others <count>" footer row.
|
|
27
27
|
* `undefined` cannot mean "no cap" because it's consumed by the
|
|
28
28
|
* default-parameter syntax — pass `null` instead.
|
|
29
29
|
* - positive finite N — same as the default but with a custom cap.
|
|
@@ -44,6 +44,13 @@ export interface CategoryUIProps {
|
|
|
44
44
|
maxItems?: number | null;
|
|
45
45
|
/** Labels for the "Other" overflow row. `{count}` placeholder is replaced. */
|
|
46
46
|
labels?: CategoryLabels;
|
|
47
|
+
/**
|
|
48
|
+
* When provided, the "Other" overflow row becomes a button — clicking it
|
|
49
|
+
* fires `onShowAll`, which a composer typically wires to expand the widget
|
|
50
|
+
* (drop the row cap) so every category becomes reachable. When omitted the
|
|
51
|
+
* overflow row stays a static summary.
|
|
52
|
+
*/
|
|
53
|
+
onShowAll?: () => void;
|
|
47
54
|
/** Manual override for the bar-width denominator. */
|
|
48
55
|
maxOverride?: number;
|
|
49
56
|
/**
|
|
@@ -78,4 +85,4 @@ export interface CategoryUIProps {
|
|
|
78
85
|
* Returns `null` when there's nothing to render — `Widget.State` is the
|
|
79
86
|
* empty-state authority in the canonical compositor.
|
|
80
87
|
*/
|
|
81
|
-
export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
88
|
+
export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,7 +7,7 @@ export interface CategoryProps {
|
|
|
7
7
|
/** Per-series metadata. Enables the legend + overrides palette per index. */
|
|
8
8
|
series?: readonly CategorySeriesConfig[];
|
|
9
9
|
/**
|
|
10
|
-
* Cap visible rows; overflow folds into "
|
|
10
|
+
* Cap visible rows; overflow folds into an "Others <count>" row. Default 20
|
|
11
11
|
* (when omitted). Pass `0` to swap the cap for a scrollable viewport
|
|
12
12
|
* (composers use this when the user opens the SearcherToggle —
|
|
13
13
|
* `maxItems = searcherOpen ? 0 : userMaxItems`). Pass `null` to disable
|
|
@@ -16,6 +16,13 @@ export interface CategoryProps {
|
|
|
16
16
|
maxItems?: number | null;
|
|
17
17
|
/** Labels for the "Other" overflow row. */
|
|
18
18
|
labels?: CategoryLabels;
|
|
19
|
+
/**
|
|
20
|
+
* When provided, the "Other" overflow row becomes a button that fires this
|
|
21
|
+
* callback. Composers wire it to expand the widget (e.g. flip the
|
|
22
|
+
* `show-all` flag) so every category is shown. Forwarded to
|
|
23
|
+
* {@link CategoryUI}.
|
|
24
|
+
*/
|
|
25
|
+
onShowAll?: () => void;
|
|
19
26
|
/**
|
|
20
27
|
* Manual override for the bar-width denominator. When omitted, the
|
|
21
28
|
* bridge auto-fills from the widget store's `rawData` so bar widths
|
|
@@ -45,4 +52,4 @@ export interface CategoryProps {
|
|
|
45
52
|
* `onSelectionChange` follow the destination-owned principle: the
|
|
46
53
|
* consumer keeps the list in their own store and passes it through.
|
|
47
54
|
*/
|
|
48
|
-
export declare function Category({ selection, onSelectionChange, series, maxItems, labels, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function Category({ selection, onSelectionChange, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
export interface CategoryRowOtherProps {
|
|
2
2
|
hiddenCount: number;
|
|
3
|
-
/** Label for the overflow row. Defaults to `'
|
|
3
|
+
/** Label for the overflow row. Defaults to `'Others'`. */
|
|
4
4
|
otherLabel?: string;
|
|
5
|
-
/** Count text with `{count}` placeholder. Defaults to `'{count}
|
|
5
|
+
/** Count text with `{count}` placeholder. Defaults to `'{count}'`. */
|
|
6
6
|
otherCountLabel?: string;
|
|
7
|
+
/**
|
|
8
|
+
* When provided, the row becomes a button: clicking it (or Enter/Space)
|
|
9
|
+
* fires `onShowAll`, expanding the widget to reveal every category. When
|
|
10
|
+
* omitted the row renders as a static, non-interactive summary.
|
|
11
|
+
*/
|
|
12
|
+
onShowAll?: () => void;
|
|
13
|
+
/** Tooltip shown over the button form. Defaults to `'Show all'`. */
|
|
14
|
+
showAllLabel?: string;
|
|
7
15
|
}
|
|
8
16
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
17
|
+
* Overflow summary row rendered after the last visible category row when
|
|
18
|
+
* `data.length > maxItems`. Shows `Others <count>` (count muted, no
|
|
19
|
+
* parentheses).
|
|
20
|
+
*
|
|
21
|
+
* When `onShowAll` is supplied the row is an interactive button — clicking
|
|
22
|
+
* it (or Enter/Space) expands the widget to show all categories, mirroring
|
|
23
|
+
* the Searcher's full-list view. Without `onShowAll` it stays a static,
|
|
24
|
+
* non-interactive summary (backward-compatible default).
|
|
12
25
|
*/
|
|
13
|
-
export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, onShowAll, showAllLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,9 @@ export declare const styles: {
|
|
|
13
13
|
gap: number;
|
|
14
14
|
py: number;
|
|
15
15
|
};
|
|
16
|
+
listScroll: {
|
|
17
|
+
pr: number;
|
|
18
|
+
};
|
|
16
19
|
rowSingle: {
|
|
17
20
|
display: string;
|
|
18
21
|
flexDirection: string;
|
|
@@ -150,17 +153,33 @@ export declare const styles: {
|
|
|
150
153
|
};
|
|
151
154
|
otherRow: {
|
|
152
155
|
display: string;
|
|
153
|
-
justifyContent: string;
|
|
154
156
|
alignItems: string;
|
|
157
|
+
gap: number;
|
|
155
158
|
py: number;
|
|
156
159
|
px: number;
|
|
157
160
|
};
|
|
161
|
+
otherLabelButton: {
|
|
162
|
+
cursor: string;
|
|
163
|
+
userSelect: string;
|
|
164
|
+
borderRadius: number;
|
|
165
|
+
px: number;
|
|
166
|
+
ml: number;
|
|
167
|
+
transition: string;
|
|
168
|
+
'&:hover': {
|
|
169
|
+
bgcolor: string;
|
|
170
|
+
};
|
|
171
|
+
'&:focus-visible': {
|
|
172
|
+
outline: string;
|
|
173
|
+
outlineColor: string;
|
|
174
|
+
outlineOffset: number;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
158
177
|
otherLabel: {
|
|
159
|
-
fontStyle: string;
|
|
160
178
|
color: string;
|
|
161
179
|
fontWeight: string;
|
|
162
180
|
};
|
|
163
181
|
otherCount: {
|
|
164
182
|
color: string;
|
|
183
|
+
fontVariantNumeric: string;
|
|
165
184
|
};
|
|
166
185
|
};
|
|
@@ -42,6 +42,8 @@ export type CategorySeriesConfig = WidgetSeries;
|
|
|
42
42
|
export interface CategoryLabels {
|
|
43
43
|
other?: string;
|
|
44
44
|
otherCount?: string;
|
|
45
|
+
/** Tooltip shown over the clickable "Others" row. Defaults to `'Show all'`. */
|
|
46
|
+
showAll?: string;
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Visual density of the bar primitive. `'small'` (default) keeps the
|
|
@@ -9,7 +9,7 @@ import { Toolbox } from './toolbox/toolbox';
|
|
|
9
9
|
import { DEFAULT_TOOLBOX_LABELS } from './toolbox/labels';
|
|
10
10
|
import { Echart, EchartUI, DEFAULT_INIT_OPTS } from './echart';
|
|
11
11
|
import { DEFAULT_NOTE_LABELS } from './note/labels';
|
|
12
|
-
import { Searcher, SearcherToggle, StackToggle, ZoomToggle, BrushToggle, RelativeData, Download, LockSelection, ChangeColumn } from './actions';
|
|
12
|
+
import { Searcher, SearcherToggle, StackToggle, ShowAllToggle, ZoomToggle, BrushToggle, RelativeData, Download, LockSelection, ChangeColumn } from './actions';
|
|
13
13
|
import { Formula, FormulaUI } from './formula';
|
|
14
14
|
import { Markdown, MarkdownUI } from './markdown';
|
|
15
15
|
import { Spread, SpreadUI } from './spread';
|
|
@@ -59,6 +59,7 @@ export declare const Widget: {
|
|
|
59
59
|
readonly Searcher: typeof Searcher;
|
|
60
60
|
readonly SearcherToggle: typeof SearcherToggle;
|
|
61
61
|
readonly StackToggle: typeof StackToggle;
|
|
62
|
+
readonly ShowAllToggle: typeof ShowAllToggle;
|
|
62
63
|
readonly ZoomToggle: typeof ZoomToggle;
|
|
63
64
|
readonly BrushToggle: typeof BrushToggle;
|
|
64
65
|
readonly RelativeData: typeof RelativeData;
|
|
@@ -95,7 +96,7 @@ export type { ToolboxLabels } from './toolbox/labels';
|
|
|
95
96
|
export type { EchartProps, EchartUIProps, EchartsEventHandler } from './echart';
|
|
96
97
|
export type { NoteProps, NoteMarkdownProps } from './note/widget-note';
|
|
97
98
|
export type { NoteLabels } from './note/labels';
|
|
98
|
-
export type { SearcherProps, SearcherToggleProps, StackToggleProps, ZoomToggleProps, BrushToggleProps, RelativeDataProps, DownloadProps, DownloadItem, FullScreenTriggerProps, FullScreenSlotProps, LockSelectionProps, LockSelectionKey, ChangeColumnProps, ChangeColumnItem, } from './actions';
|
|
99
|
+
export type { SearcherProps, SearcherToggleProps, StackToggleProps, ShowAllToggleProps, ZoomToggleProps, BrushToggleProps, RelativeDataProps, DownloadProps, DownloadItem, FullScreenTriggerProps, FullScreenSlotProps, LockSelectionProps, LockSelectionKey, ChangeColumnProps, ChangeColumnItem, } from './actions';
|
|
99
100
|
export type { FormulaUIProps, FormulaDataItem, FormulaWidgetData, } from './formula';
|
|
100
101
|
export type { MarkdownUIProps, MarkdownWidgetData } from './markdown';
|
|
101
102
|
export type { PieDatum, PieWidgetData } from './pie';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface SelectionSummaryLabels {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Optional custom renderer for the count. Defaults to the built-in two-tone
|
|
5
|
+
* `selected / total` rendering. Receives the already-resolved displayed
|
|
6
|
+
* number (which equals `total` when nothing is selected).
|
|
7
|
+
*/
|
|
8
|
+
summary?: (selected: number, total: number) => ReactNode;
|
|
4
9
|
clear: string;
|
|
5
10
|
}
|
|
6
11
|
export declare const DEFAULT_SELECTION_SUMMARY_LABELS: SelectionSummaryLabels;
|
|
@@ -4,19 +4,26 @@ import { SelectionSummaryLabels } from './labels';
|
|
|
4
4
|
export interface SelectionSummaryProps {
|
|
5
5
|
/** Number of currently selected items. */
|
|
6
6
|
count: number;
|
|
7
|
-
/** Optional total — when 0 the component renders nothing (no data
|
|
7
|
+
/** Optional total — when `undefined` or `0` the component renders nothing (no data). */
|
|
8
8
|
total?: number;
|
|
9
|
-
/** Clear callback.
|
|
9
|
+
/** Clear callback. The Clear control is shown only when `count > 0` and `onClear` is provided. */
|
|
10
10
|
onClear?: () => void;
|
|
11
11
|
labels?: Partial<SelectionSummaryLabels>;
|
|
12
12
|
icon?: ComponentType<SvgIconProps>;
|
|
13
13
|
iconProps?: SvgIconProps;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
+
* Renders a `selected / total` count.
|
|
17
|
+
*
|
|
16
18
|
* Render rules:
|
|
17
|
-
* - `
|
|
18
|
-
* - `count === 0` →
|
|
19
|
-
*
|
|
20
|
-
* - `count > 0`
|
|
19
|
+
* - `!total` (undefined or 0) → render nothing (no data to summarize).
|
|
20
|
+
* - `count === 0` → display `total / total` (everything is implicitly in
|
|
21
|
+
* scope); no Clear button.
|
|
22
|
+
* - `count > 0` → display `count / total` + Clear (when `onClear` is given).
|
|
23
|
+
*
|
|
24
|
+
* The count is two-tone by default (selected number bold/`text.primary`,
|
|
25
|
+
* ` / total` in `text.secondary`). Pass `labels.summary` to render a custom
|
|
26
|
+
* node instead — it receives the already-resolved displayed number (which
|
|
27
|
+
* equals `total` when nothing is selected).
|
|
21
28
|
*/
|
|
22
29
|
export declare function SelectionSummary({ count, total, onClear, labels, icon: Icon, iconProps, }: SelectionSummaryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -8,6 +8,21 @@ export declare const styles: {
|
|
|
8
8
|
label: {
|
|
9
9
|
color: "text.secondary";
|
|
10
10
|
};
|
|
11
|
+
count: {
|
|
12
|
+
display: "inline-flex";
|
|
13
|
+
alignItems: "baseline";
|
|
14
|
+
gap: number;
|
|
15
|
+
};
|
|
16
|
+
selected: {
|
|
17
|
+
color: "text.primary";
|
|
18
|
+
fontWeight: number;
|
|
19
|
+
};
|
|
20
|
+
separator: {
|
|
21
|
+
color: "text.secondary";
|
|
22
|
+
};
|
|
23
|
+
total: {
|
|
24
|
+
color: "text.secondary";
|
|
25
|
+
};
|
|
11
26
|
clear: {
|
|
12
27
|
color: "primary.main";
|
|
13
28
|
cursor: "pointer";
|