@carto/ps-react-ui 4.9.1 → 4.11.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/category-Dnd2_j0x.js +719 -0
- package/dist/category-Dnd2_j0x.js.map +1 -0
- package/dist/change-column-BiuuHCDN.js +1156 -0
- package/dist/change-column-BiuuHCDN.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--YiY6ko_.js} +4 -3
- package/dist/{data-zoom-layout-0QSptXG_.js.map → data-zoom-layout--YiY6ko_.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/{spread-Y9R1f5dm.js → spread-CPis22AE.js} +4 -3
- package/dist/{spread-Y9R1f5dm.js.map → spread-CPis22AE.js.map} +1 -1
- 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 +8 -7
- package/dist/widgets-v2/bar.js.map +1 -1
- package/dist/widgets-v2/category.js +22 -21
- package/dist/widgets-v2/category.js.map +1 -1
- package/dist/widgets-v2/formula.js +23 -22
- package/dist/widgets-v2/formula.js.map +1 -1
- package/dist/widgets-v2/histogram.js +10 -9
- package/dist/widgets-v2/histogram.js.map +1 -1
- package/dist/widgets-v2/markdown.js +9 -8
- package/dist/widgets-v2/markdown.js.map +1 -1
- package/dist/widgets-v2/pie.js +7 -6
- package/dist/widgets-v2/pie.js.map +1 -1
- package/dist/widgets-v2/scatterplot.js +9 -8
- package/dist/widgets-v2/scatterplot.js.map +1 -1
- package/dist/widgets-v2/spread.js +9 -8
- package/dist/widgets-v2/spread.js.map +1 -1
- package/dist/widgets-v2/table.js +16 -15
- package/dist/widgets-v2/table.js.map +1 -1
- package/dist/widgets-v2/timeseries.js +8 -7
- package/dist/widgets-v2/timeseries.js.map +1 -1
- package/dist/widgets-v2/utils.js +1 -1
- package/dist/widgets-v2.js +276 -271
- package/dist/widgets-v2.js.map +1 -1
- package/package.json +7 -3
- 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/index.ts +8 -0
- 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/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/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
|
@@ -1,656 +0,0 @@
|
|
|
1
|
-
import { jsx as w, jsxs as H } from "react/jsx-runtime";
|
|
2
|
-
import { c as E } from "react/compiler-runtime";
|
|
3
|
-
import { useRef as he, useState as be } from "react";
|
|
4
|
-
import { u as xe } from "./widget-context-DTGO0Yta.js";
|
|
5
|
-
import { u as ye } from "./widget-store-registry-_W4Z4xp-.js";
|
|
6
|
-
import "zustand";
|
|
7
|
-
import { Box as I, Typography as V, useTheme as ve } from "@mui/material";
|
|
8
|
-
const we = {
|
|
9
|
-
small: {
|
|
10
|
-
position: "relative",
|
|
11
|
-
height: 4,
|
|
12
|
-
bgcolor: "action.hover",
|
|
13
|
-
borderRadius: 1,
|
|
14
|
-
overflow: "hidden",
|
|
15
|
-
transition: "background-color 150ms ease"
|
|
16
|
-
},
|
|
17
|
-
medium: {
|
|
18
|
-
position: "relative",
|
|
19
|
-
height: 12,
|
|
20
|
-
bgcolor: "action.hover",
|
|
21
|
-
borderRadius: 0.25,
|
|
22
|
-
overflow: "hidden",
|
|
23
|
-
transition: "background-color 150ms ease"
|
|
24
|
-
}
|
|
25
|
-
}, ke = {
|
|
26
|
-
small: {
|
|
27
|
-
position: "absolute",
|
|
28
|
-
inset: "0 auto 0 0",
|
|
29
|
-
borderRadius: 1,
|
|
30
|
-
transition: "width 300ms ease-in-out, background-color 150ms ease, filter 150ms ease"
|
|
31
|
-
},
|
|
32
|
-
medium: {
|
|
33
|
-
position: "absolute",
|
|
34
|
-
inset: "0 auto 0 0",
|
|
35
|
-
borderRadius: 0.25,
|
|
36
|
-
transition: "width 300ms ease-in-out, background-color 150ms ease, filter 150ms ease"
|
|
37
|
-
}
|
|
38
|
-
}, Ce = {
|
|
39
|
-
small: {
|
|
40
|
-
position: "absolute",
|
|
41
|
-
top: 0,
|
|
42
|
-
bottom: 0,
|
|
43
|
-
transition: "left 300ms ease-in-out, width 300ms ease-in-out, background-color 150ms ease, filter 150ms ease"
|
|
44
|
-
},
|
|
45
|
-
medium: {
|
|
46
|
-
position: "absolute",
|
|
47
|
-
top: 0,
|
|
48
|
-
bottom: 0,
|
|
49
|
-
transition: "left 300ms ease-in-out, width 300ms ease-in-out, background-color 150ms ease, filter 150ms ease"
|
|
50
|
-
}
|
|
51
|
-
}, x = {
|
|
52
|
-
// ── Top-level container ────────────────────────────────────────────
|
|
53
|
-
root: {
|
|
54
|
-
display: "flex",
|
|
55
|
-
flexDirection: "column",
|
|
56
|
-
position: "relative",
|
|
57
|
-
width: "100%"
|
|
58
|
-
},
|
|
59
|
-
// Flat list of category rows. Holds both single + multi rows.
|
|
60
|
-
list: {
|
|
61
|
-
display: "flex",
|
|
62
|
-
flexDirection: "column",
|
|
63
|
-
gap: 1,
|
|
64
|
-
py: 0.5
|
|
65
|
-
},
|
|
66
|
-
// ── Single-series row ─────────────────────────────────────────────
|
|
67
|
-
// v1 layout: label + value share a top flex row (justify-between); the
|
|
68
|
-
// bar fills the row width below. Mirrors `rowMulti` for visual
|
|
69
|
-
// consistency.
|
|
70
|
-
rowSingle: {
|
|
71
|
-
display: "flex",
|
|
72
|
-
flexDirection: "column",
|
|
73
|
-
gap: 0.5,
|
|
74
|
-
// py: 0.5,
|
|
75
|
-
// px: 0.5,
|
|
76
|
-
cursor: "pointer",
|
|
77
|
-
userSelect: "none",
|
|
78
|
-
transition: "background-color 80ms ease",
|
|
79
|
-
// Hovering anywhere in the row also brightens the bar fill, matching
|
|
80
|
-
// what the bar got from `bar:hover` before. `data-bar-fill` is set
|
|
81
|
-
// on `barFill` by <CategoryBar>; descendant selector reaches it
|
|
82
|
-
// through `bar` in single rows and through `multiBarRow > bar` in
|
|
83
|
-
// multi rows.
|
|
84
|
-
'&:hover [data-bar-fill="true"]': {
|
|
85
|
-
filter: "brightness(1.2)"
|
|
86
|
-
},
|
|
87
|
-
"&:focus-visible": {
|
|
88
|
-
outline: "2px solid",
|
|
89
|
-
outlineColor: "primary.main",
|
|
90
|
-
outlineOffset: -2
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
// Top row of `rowSingle`: label on the left, value on the right.
|
|
94
|
-
rowHeader: {
|
|
95
|
-
display: "flex",
|
|
96
|
-
justifyContent: "space-between",
|
|
97
|
-
alignItems: "center",
|
|
98
|
-
gap: 1
|
|
99
|
-
},
|
|
100
|
-
// ── Multi-series row ──────────────────────────────────────────────
|
|
101
|
-
// Flex column: label fills the top row; bar+value pairs stack below.
|
|
102
|
-
// Bars get full track width — better legibility for N>=2 series than a
|
|
103
|
-
// shared grid would give.
|
|
104
|
-
rowMulti: {
|
|
105
|
-
display: "flex",
|
|
106
|
-
flexDirection: "column",
|
|
107
|
-
gap: 0.5,
|
|
108
|
-
// py: 0.5,
|
|
109
|
-
// px: 0.5,
|
|
110
|
-
cursor: "pointer",
|
|
111
|
-
userSelect: "none",
|
|
112
|
-
transition: "background-color 80ms ease",
|
|
113
|
-
// Row-hover brightens every bar fill inside the multi-row.
|
|
114
|
-
'&:hover [data-bar-fill="true"]': {
|
|
115
|
-
filter: "brightness(1.2)"
|
|
116
|
-
},
|
|
117
|
-
"&:focus-visible": {
|
|
118
|
-
outline: "2px solid",
|
|
119
|
-
outlineColor: "primary.main",
|
|
120
|
-
outlineOffset: -2
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
// ── Row labels / values ───────────────────────────────────────────
|
|
124
|
-
// Matches v1: name uses medium-weight body2 in primary text color,
|
|
125
|
-
// value uses regular body2 in secondary text color. Same font size,
|
|
126
|
-
// visual hierarchy via weight + color.
|
|
127
|
-
name: {
|
|
128
|
-
overflow: "hidden",
|
|
129
|
-
whiteSpace: "nowrap",
|
|
130
|
-
textOverflow: "ellipsis",
|
|
131
|
-
color: "text.primary",
|
|
132
|
-
fontWeight: "medium"
|
|
133
|
-
},
|
|
134
|
-
multiName: {
|
|
135
|
-
overflow: "hidden",
|
|
136
|
-
whiteSpace: "nowrap",
|
|
137
|
-
textOverflow: "ellipsis",
|
|
138
|
-
color: "text.primary",
|
|
139
|
-
fontWeight: "medium"
|
|
140
|
-
},
|
|
141
|
-
value: {
|
|
142
|
-
color: "text.secondary",
|
|
143
|
-
fontVariantNumeric: "tabular-nums",
|
|
144
|
-
// Right-align + minWidth keeps `rowMulti`'s per-bar value column
|
|
145
|
-
// tidy (where the bar grows on the left and the number sits at a
|
|
146
|
-
// fixed right edge). `rowSingle` uses `rowHeader`'s flex
|
|
147
|
-
// justify-between to push the value to the trailing edge, so the
|
|
148
|
-
// minWidth here is also harmless in that context.
|
|
149
|
-
minWidth: 48,
|
|
150
|
-
textAlign: "right"
|
|
151
|
-
},
|
|
152
|
-
// ── Bar (track + fill) ────────────────────────────────────────────
|
|
153
|
-
// Size-keyed maps live above the `styles` object; `<CategoryBar>` picks
|
|
154
|
-
// the variant via its `size` prop. Hover brightening still fires from
|
|
155
|
-
// the parent row (`&:hover [data-bar-fill]`), so it works regardless
|
|
156
|
-
// of which size variant the bar uses.
|
|
157
|
-
bar: we,
|
|
158
|
-
barFill: ke,
|
|
159
|
-
stackedSegment: Ce,
|
|
160
|
-
// ── Multi-series internals ────────────────────────────────────────
|
|
161
|
-
// One [bar | value] flex row per series, inside `rowMulti`'s column.
|
|
162
|
-
multiBarRow: {
|
|
163
|
-
display: "flex",
|
|
164
|
-
alignItems: "center",
|
|
165
|
-
gap: 1
|
|
166
|
-
},
|
|
167
|
-
multiBarContainer: {
|
|
168
|
-
flex: 1
|
|
169
|
-
},
|
|
170
|
-
// ── Stacked-mode row ──────────────────────────────────────────────
|
|
171
|
-
// Mirror `rowMulti`'s outer shape (click target + hover brightening +
|
|
172
|
-
// focus ring) but stack three children vertically: header line, bar,
|
|
173
|
-
// breakdown line.
|
|
174
|
-
rowStacked: {
|
|
175
|
-
display: "flex",
|
|
176
|
-
flexDirection: "column",
|
|
177
|
-
gap: 0.5,
|
|
178
|
-
cursor: "pointer",
|
|
179
|
-
userSelect: "none",
|
|
180
|
-
transition: "background-color 80ms ease",
|
|
181
|
-
'&:hover [data-bar-fill="true"]': {
|
|
182
|
-
filter: "brightness(1.2)"
|
|
183
|
-
},
|
|
184
|
-
"&:focus-visible": {
|
|
185
|
-
outline: "2px solid",
|
|
186
|
-
outlineColor: "primary.main",
|
|
187
|
-
outlineOffset: -2
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
stackedHeader: {
|
|
191
|
-
display: "flex",
|
|
192
|
-
justifyContent: "space-between",
|
|
193
|
-
alignItems: "center",
|
|
194
|
-
gap: 1
|
|
195
|
-
},
|
|
196
|
-
// Right-aligned total in the header. Tabular-nums keeps totals lined
|
|
197
|
-
// up vertically across rows; minWidth reuses the per-series-value
|
|
198
|
-
// column width so the right edge sits at the same spot as `rowMulti`'s
|
|
199
|
-
// value column when both modes co-exist in the same widget card.
|
|
200
|
-
stackedTotal: {
|
|
201
|
-
color: "text.primary",
|
|
202
|
-
fontWeight: "medium",
|
|
203
|
-
fontVariantNumeric: "tabular-nums",
|
|
204
|
-
minWidth: 48,
|
|
205
|
-
textAlign: "right"
|
|
206
|
-
},
|
|
207
|
-
// Flex row of "{seriesName}: {value}" pairs. Wraps gracefully when
|
|
208
|
-
// series names are long or there are many series.
|
|
209
|
-
stackedBreakdown: {
|
|
210
|
-
display: "flex",
|
|
211
|
-
flexWrap: "wrap",
|
|
212
|
-
columnGap: 2,
|
|
213
|
-
rowGap: 0.25
|
|
214
|
-
},
|
|
215
|
-
stackedBreakdownItem: {
|
|
216
|
-
color: "text.secondary",
|
|
217
|
-
fontVariantNumeric: "tabular-nums"
|
|
218
|
-
},
|
|
219
|
-
// ── Legend (sticky bottom) ────────────────────────────────────────
|
|
220
|
-
legend: {
|
|
221
|
-
display: "flex",
|
|
222
|
-
alignItems: "center",
|
|
223
|
-
gap: 2,
|
|
224
|
-
flexWrap: "wrap",
|
|
225
|
-
pt: 2,
|
|
226
|
-
mt: 2,
|
|
227
|
-
position: "sticky",
|
|
228
|
-
bottom: 0,
|
|
229
|
-
bgcolor: "background.paper",
|
|
230
|
-
borderTop: (c) => `1px solid ${c.palette.divider}`
|
|
231
|
-
},
|
|
232
|
-
legendItem: {
|
|
233
|
-
display: "flex",
|
|
234
|
-
alignItems: "center",
|
|
235
|
-
gap: 1
|
|
236
|
-
},
|
|
237
|
-
legendDot: {
|
|
238
|
-
width: 8,
|
|
239
|
-
height: 8,
|
|
240
|
-
borderRadius: "50%"
|
|
241
|
-
},
|
|
242
|
-
legendLabel: {
|
|
243
|
-
color: "text.secondary",
|
|
244
|
-
textTransform: "uppercase",
|
|
245
|
-
fontWeight: "medium"
|
|
246
|
-
},
|
|
247
|
-
// ── "Other" overflow row ──────────────────────────────────────────
|
|
248
|
-
otherRow: {
|
|
249
|
-
display: "flex",
|
|
250
|
-
justifyContent: "space-between",
|
|
251
|
-
alignItems: "center",
|
|
252
|
-
py: 0.5,
|
|
253
|
-
px: 0.5
|
|
254
|
-
},
|
|
255
|
-
otherLabel: {
|
|
256
|
-
fontStyle: "italic",
|
|
257
|
-
color: "text.secondary",
|
|
258
|
-
fontWeight: "medium"
|
|
259
|
-
},
|
|
260
|
-
otherCount: {
|
|
261
|
-
color: "text.disabled"
|
|
262
|
-
}
|
|
263
|
-
// `bar` / `barFill` are size-keyed (`Record<CategorySize, SxProps>`);
|
|
264
|
-
// every other entry is a single `SxProps<Theme>`. The mixed shape means
|
|
265
|
-
// we can't apply the file-wide `satisfies Record<string, SxProps<Theme>>`
|
|
266
|
-
// constraint that the other widget style files use — consumers of
|
|
267
|
-
// individual tokens still get full type-checking at the call site via
|
|
268
|
-
// the typed `Box`/`Typography` `sx` prop.
|
|
269
|
-
};
|
|
270
|
-
function me(c) {
|
|
271
|
-
const e = E(10), {
|
|
272
|
-
value: t,
|
|
273
|
-
maxValue: s,
|
|
274
|
-
color: l,
|
|
275
|
-
size: u
|
|
276
|
-
} = c, n = u === void 0 ? "small" : u, o = s > 0 ? t / s * 100 : 0, m = x.bar[n], r = x.barFill[n], d = `${o}%`;
|
|
277
|
-
let a;
|
|
278
|
-
e[0] !== l || e[1] !== d ? (a = {
|
|
279
|
-
width: d,
|
|
280
|
-
backgroundColor: l
|
|
281
|
-
}, e[0] = l, e[1] = d, e[2] = a) : a = e[2];
|
|
282
|
-
let g;
|
|
283
|
-
e[3] !== r || e[4] !== a ? (g = /* @__PURE__ */ w(I, { sx: r, style: a, "data-bar-fill": "true" }), e[3] = r, e[4] = a, e[5] = g) : g = e[5];
|
|
284
|
-
let i;
|
|
285
|
-
return e[6] !== n || e[7] !== m || e[8] !== g ? (i = /* @__PURE__ */ w(I, { sx: m, "data-size": n, children: g }), e[6] = n, e[7] = m, e[8] = g, e[9] = i) : i = e[9], i;
|
|
286
|
-
}
|
|
287
|
-
function Se(c) {
|
|
288
|
-
const e = E(27), {
|
|
289
|
-
name: t,
|
|
290
|
-
displayName: s,
|
|
291
|
-
value: l,
|
|
292
|
-
maxValue: u,
|
|
293
|
-
color: n,
|
|
294
|
-
formatter: o,
|
|
295
|
-
selected: m,
|
|
296
|
-
onToggle: r,
|
|
297
|
-
size: d
|
|
298
|
-
} = c;
|
|
299
|
-
let a;
|
|
300
|
-
e[0] !== t || e[1] !== r ? (a = (R) => {
|
|
301
|
-
(R.key === "Enter" || R.key === " ") && (R.preventDefault(), r(t));
|
|
302
|
-
}, e[0] = t, e[1] = r, e[2] = a) : a = e[2];
|
|
303
|
-
const g = a;
|
|
304
|
-
let i;
|
|
305
|
-
e[3] !== t || e[4] !== r ? (i = () => r(t), e[3] = t, e[4] = r, e[5] = i) : i = e[5];
|
|
306
|
-
const p = s ?? t;
|
|
307
|
-
let h;
|
|
308
|
-
e[6] !== p ? (h = /* @__PURE__ */ w(V, { variant: "body2", sx: x.name, children: p }), e[6] = p, e[7] = h) : h = e[7];
|
|
309
|
-
let f;
|
|
310
|
-
e[8] !== o || e[9] !== l ? (f = o(l), e[8] = o, e[9] = l, e[10] = f) : f = e[10];
|
|
311
|
-
let y;
|
|
312
|
-
e[11] !== f ? (y = /* @__PURE__ */ w(V, { variant: "body2", sx: x.value, children: f }), e[11] = f, e[12] = y) : y = e[12];
|
|
313
|
-
let b;
|
|
314
|
-
e[13] !== h || e[14] !== y ? (b = /* @__PURE__ */ H(I, { sx: x.rowHeader, children: [
|
|
315
|
-
h,
|
|
316
|
-
y
|
|
317
|
-
] }), e[13] = h, e[14] = y, e[15] = b) : b = e[15];
|
|
318
|
-
let k;
|
|
319
|
-
e[16] !== n || e[17] !== u || e[18] !== d || e[19] !== l ? (k = /* @__PURE__ */ w(me, { value: l, maxValue: u, color: n, size: d }), e[16] = n, e[17] = u, e[18] = d, e[19] = l, e[20] = k) : k = e[20];
|
|
320
|
-
let S;
|
|
321
|
-
return e[21] !== g || e[22] !== m || e[23] !== i || e[24] !== b || e[25] !== k ? (S = /* @__PURE__ */ H(I, { role: "button", "aria-pressed": m, tabIndex: 0, onClick: i, onKeyDown: g, sx: x.rowSingle, children: [
|
|
322
|
-
b,
|
|
323
|
-
k
|
|
324
|
-
] }), e[21] = g, e[22] = m, e[23] = i, e[24] = b, e[25] = k, e[26] = S) : S = e[26], S;
|
|
325
|
-
}
|
|
326
|
-
function $e(c) {
|
|
327
|
-
const e = E(27), {
|
|
328
|
-
name: t,
|
|
329
|
-
displayName: s,
|
|
330
|
-
values: l,
|
|
331
|
-
colors: u,
|
|
332
|
-
maxValue: n,
|
|
333
|
-
formatter: o,
|
|
334
|
-
selected: m,
|
|
335
|
-
onToggle: r,
|
|
336
|
-
size: d
|
|
337
|
-
} = c;
|
|
338
|
-
let a;
|
|
339
|
-
e[0] !== t || e[1] !== r ? (a = (b) => {
|
|
340
|
-
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), r(t));
|
|
341
|
-
}, e[0] = t, e[1] = r, e[2] = a) : a = e[2];
|
|
342
|
-
const g = a;
|
|
343
|
-
let i;
|
|
344
|
-
e[3] !== t || e[4] !== r ? (i = () => r(t), e[3] = t, e[4] = r, e[5] = i) : i = e[5];
|
|
345
|
-
const p = s ?? t;
|
|
346
|
-
let h;
|
|
347
|
-
e[6] !== p ? (h = /* @__PURE__ */ w(V, { variant: "body2", sx: x.multiName, children: p }), e[6] = p, e[7] = h) : h = e[7];
|
|
348
|
-
let f;
|
|
349
|
-
if (e[8] !== u || e[9] !== o || e[10] !== n || e[11] !== t || e[12] !== d || e[13] !== l) {
|
|
350
|
-
let b;
|
|
351
|
-
e[15] !== u || e[16] !== o || e[17] !== n || e[18] !== t || e[19] !== d ? (b = (k, S) => /* @__PURE__ */ H(I, { sx: x.multiBarRow, children: [
|
|
352
|
-
/* @__PURE__ */ w(I, { sx: x.multiBarContainer, children: /* @__PURE__ */ w(me, { value: k, maxValue: n, color: u[S] ?? "", size: d }) }),
|
|
353
|
-
/* @__PURE__ */ w(V, { variant: "body2", sx: x.value, children: o(k) })
|
|
354
|
-
] }, `${t}-series-${S}`), e[15] = u, e[16] = o, e[17] = n, e[18] = t, e[19] = d, e[20] = b) : b = e[20], f = l.map(b), e[8] = u, e[9] = o, e[10] = n, e[11] = t, e[12] = d, e[13] = l, e[14] = f;
|
|
355
|
-
} else
|
|
356
|
-
f = e[14];
|
|
357
|
-
let y;
|
|
358
|
-
return e[21] !== g || e[22] !== m || e[23] !== i || e[24] !== h || e[25] !== f ? (y = /* @__PURE__ */ H(I, { role: "button", "aria-pressed": m, tabIndex: 0, onClick: i, onKeyDown: g, sx: x.rowMulti, children: [
|
|
359
|
-
h,
|
|
360
|
-
f
|
|
361
|
-
] }), e[21] = g, e[22] = m, e[23] = i, e[24] = h, e[25] = f, e[26] = y) : y = e[26], y;
|
|
362
|
-
}
|
|
363
|
-
function Ie(c) {
|
|
364
|
-
const e = E(17), {
|
|
365
|
-
values: t,
|
|
366
|
-
colors: s,
|
|
367
|
-
maxValue: l,
|
|
368
|
-
size: u
|
|
369
|
-
} = c, n = u === void 0 ? "small" : u;
|
|
370
|
-
let o;
|
|
371
|
-
if (e[0] !== t) {
|
|
372
|
-
o = [];
|
|
373
|
-
let a = 0;
|
|
374
|
-
for (const g of t)
|
|
375
|
-
o.push(a), a = a + g;
|
|
376
|
-
e[0] = t, e[1] = o;
|
|
377
|
-
} else
|
|
378
|
-
o = e[1];
|
|
379
|
-
const m = x.bar[n];
|
|
380
|
-
let r;
|
|
381
|
-
if (e[2] !== s || e[3] !== l || e[4] !== o || e[5] !== n || e[6] !== t) {
|
|
382
|
-
let a;
|
|
383
|
-
e[8] !== s || e[9] !== l || e[10] !== o || e[11] !== n ? (a = (g, i) => {
|
|
384
|
-
if (g <= 0)
|
|
385
|
-
return null;
|
|
386
|
-
const p = l > 0 ? o[i] / l * 100 : 0, h = l > 0 ? g / l * 100 : 0;
|
|
387
|
-
return /* @__PURE__ */ w(I, { sx: x.stackedSegment[n], style: {
|
|
388
|
-
left: `${p}%`,
|
|
389
|
-
width: `${h}%`,
|
|
390
|
-
backgroundColor: s[i] ?? ""
|
|
391
|
-
}, "data-bar-fill": "true" }, `seg-${s[i] ?? "none"}-${i}`);
|
|
392
|
-
}, e[8] = s, e[9] = l, e[10] = o, e[11] = n, e[12] = a) : a = e[12], r = t.map(a), e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = t, e[7] = r;
|
|
393
|
-
} else
|
|
394
|
-
r = e[7];
|
|
395
|
-
let d;
|
|
396
|
-
return e[13] !== n || e[14] !== m || e[15] !== r ? (d = /* @__PURE__ */ w(I, { sx: m, "data-size": n, children: r }), e[13] = n, e[14] = m, e[15] = r, e[16] = d) : d = e[16], d;
|
|
397
|
-
}
|
|
398
|
-
function Re(c) {
|
|
399
|
-
const e = E(65), {
|
|
400
|
-
name: t,
|
|
401
|
-
displayName: s,
|
|
402
|
-
values: l,
|
|
403
|
-
colors: u,
|
|
404
|
-
seriesNames: n,
|
|
405
|
-
formatter: o,
|
|
406
|
-
selected: m,
|
|
407
|
-
onToggle: r,
|
|
408
|
-
size: d
|
|
409
|
-
} = c;
|
|
410
|
-
let a;
|
|
411
|
-
e[0] !== t || e[1] !== r ? (a = ($) => {
|
|
412
|
-
($.key === "Enter" || $.key === " ") && ($.preventDefault(), r(t));
|
|
413
|
-
}, e[0] = t, e[1] = r, e[2] = a) : a = e[2];
|
|
414
|
-
const g = a;
|
|
415
|
-
let i, p, h, f, y, b, k, S, R, z, T, K, O, B, N;
|
|
416
|
-
if (e[3] !== s || e[4] !== o || e[5] !== g || e[6] !== t || e[7] !== r || e[8] !== m || e[9] !== l) {
|
|
417
|
-
N = l.reduce(Te, 0), h = I, K = "button", O = m, B = 0, e[25] !== t || e[26] !== r ? (f = () => r(t), e[25] = t, e[26] = r, e[27] = f) : f = e[27], y = g, b = x.rowStacked, p = I, z = x.stackedHeader;
|
|
418
|
-
const $ = s ?? t;
|
|
419
|
-
e[28] !== $ ? (T = /* @__PURE__ */ w(V, { variant: "body2", sx: x.multiName, children: $ }), e[28] = $, e[29] = T) : T = e[29], i = V, k = "body2", S = x.stackedTotal, R = o(N), e[3] = s, e[4] = o, e[5] = g, e[6] = t, e[7] = r, e[8] = m, e[9] = l, e[10] = i, e[11] = p, e[12] = h, e[13] = f, e[14] = y, e[15] = b, e[16] = k, e[17] = S, e[18] = R, e[19] = z, e[20] = T, e[21] = K, e[22] = O, e[23] = B, e[24] = N;
|
|
420
|
-
} else
|
|
421
|
-
i = e[10], p = e[11], h = e[12], f = e[13], y = e[14], b = e[15], k = e[16], S = e[17], R = e[18], z = e[19], T = e[20], K = e[21], O = e[22], B = e[23], N = e[24];
|
|
422
|
-
let M;
|
|
423
|
-
e[30] !== i || e[31] !== k || e[32] !== S || e[33] !== R ? (M = /* @__PURE__ */ w(i, { variant: k, sx: S, children: R }), e[30] = i, e[31] = k, e[32] = S, e[33] = R, e[34] = M) : M = e[34];
|
|
424
|
-
let D;
|
|
425
|
-
e[35] !== p || e[36] !== M || e[37] !== z || e[38] !== T ? (D = /* @__PURE__ */ H(p, { sx: z, children: [
|
|
426
|
-
T,
|
|
427
|
-
M
|
|
428
|
-
] }), e[35] = p, e[36] = M, e[37] = z, e[38] = T, e[39] = D) : D = e[39];
|
|
429
|
-
let W;
|
|
430
|
-
e[40] !== u || e[41] !== d || e[42] !== N || e[43] !== l ? (W = /* @__PURE__ */ w(Ie, { values: l, colors: u, maxValue: N, size: d }), e[40] = u, e[41] = d, e[42] = N, e[43] = l, e[44] = W) : W = e[44];
|
|
431
|
-
let A;
|
|
432
|
-
if (e[45] !== o || e[46] !== n || e[47] !== l) {
|
|
433
|
-
let $;
|
|
434
|
-
e[49] !== o || e[50] !== n ? ($ = (P, G) => /* @__PURE__ */ w(V, { variant: "body2", sx: x.stackedBreakdownItem, children: `${n[G] ?? `Series ${G + 1}`}: ${o(P)}` }, `breakdown-${n[G] ?? `series-${G}`}`), e[49] = o, e[50] = n, e[51] = $) : $ = e[51], A = l.map($), e[45] = o, e[46] = n, e[47] = l, e[48] = A;
|
|
435
|
-
} else
|
|
436
|
-
A = e[48];
|
|
437
|
-
let L;
|
|
438
|
-
e[52] !== A ? (L = /* @__PURE__ */ w(I, { sx: x.stackedBreakdown, children: A }), e[52] = A, e[53] = L) : L = e[53];
|
|
439
|
-
let j;
|
|
440
|
-
return e[54] !== h || e[55] !== f || e[56] !== y || e[57] !== b || e[58] !== D || e[59] !== W || e[60] !== L || e[61] !== K || e[62] !== O || e[63] !== B ? (j = /* @__PURE__ */ H(h, { role: K, "aria-pressed": O, tabIndex: B, onClick: f, onKeyDown: y, sx: b, children: [
|
|
441
|
-
D,
|
|
442
|
-
W,
|
|
443
|
-
L
|
|
444
|
-
] }), e[54] = h, e[55] = f, e[56] = y, e[57] = b, e[58] = D, e[59] = W, e[60] = L, e[61] = K, e[62] = O, e[63] = B, e[64] = j) : j = e[64], j;
|
|
445
|
-
}
|
|
446
|
-
function Te(c, e) {
|
|
447
|
-
return c + e;
|
|
448
|
-
}
|
|
449
|
-
function De(c) {
|
|
450
|
-
const e = E(10), {
|
|
451
|
-
hiddenCount: t,
|
|
452
|
-
otherLabel: s,
|
|
453
|
-
otherCountLabel: l
|
|
454
|
-
} = c, u = s === void 0 ? "Other" : s, n = l === void 0 ? "{count} more" : l;
|
|
455
|
-
let o;
|
|
456
|
-
e[0] !== t || e[1] !== n ? (o = n.replace("{count}", String(t)), e[0] = t, e[1] = n, e[2] = o) : o = e[2];
|
|
457
|
-
const m = o;
|
|
458
|
-
let r;
|
|
459
|
-
e[3] !== u ? (r = /* @__PURE__ */ w(V, { variant: "body2", sx: x.otherLabel, children: u }), e[3] = u, e[4] = r) : r = e[4];
|
|
460
|
-
let d;
|
|
461
|
-
e[5] !== m ? (d = /* @__PURE__ */ H(V, { variant: "body2", sx: x.otherCount, children: [
|
|
462
|
-
"(",
|
|
463
|
-
m,
|
|
464
|
-
")"
|
|
465
|
-
] }), e[5] = m, e[6] = d) : d = e[6];
|
|
466
|
-
let a;
|
|
467
|
-
return e[7] !== r || e[8] !== d ? (a = /* @__PURE__ */ H(I, { sx: x.otherRow, children: [
|
|
468
|
-
r,
|
|
469
|
-
d
|
|
470
|
-
] }), e[7] = r, e[8] = d, e[9] = a) : a = e[9], a;
|
|
471
|
-
}
|
|
472
|
-
function Le(c) {
|
|
473
|
-
const e = E(7), {
|
|
474
|
-
series: t,
|
|
475
|
-
colorAt: s
|
|
476
|
-
} = c;
|
|
477
|
-
if (t.length === 0)
|
|
478
|
-
return null;
|
|
479
|
-
let l;
|
|
480
|
-
if (e[0] !== s || e[1] !== t) {
|
|
481
|
-
let n;
|
|
482
|
-
e[3] !== s ? (n = (o, m) => /* @__PURE__ */ H(I, { sx: x.legendItem, children: [
|
|
483
|
-
/* @__PURE__ */ w(I, { sx: x.legendDot, style: {
|
|
484
|
-
backgroundColor: o.color ?? s(m)
|
|
485
|
-
} }),
|
|
486
|
-
/* @__PURE__ */ w(V, { variant: "caption", sx: x.legendLabel, children: o.name })
|
|
487
|
-
] }, o.name), e[3] = s, e[4] = n) : n = e[4], l = t.map(n), e[0] = s, e[1] = t, e[2] = l;
|
|
488
|
-
} else
|
|
489
|
-
l = e[2];
|
|
490
|
-
let u;
|
|
491
|
-
return e[5] !== l ? (u = /* @__PURE__ */ w(I, { sx: x.legend, children: l }), e[5] = l, e[6] = u) : u = e[6], u;
|
|
492
|
-
}
|
|
493
|
-
const Oe = 20, Ne = {
|
|
494
|
-
small: 36,
|
|
495
|
-
medium: 44
|
|
496
|
-
}, We = 8;
|
|
497
|
-
function Fe(c) {
|
|
498
|
-
if (!c || c.length === 0) return [];
|
|
499
|
-
const e = Math.max(c.length, 1), t = /* @__PURE__ */ new Map(), s = [];
|
|
500
|
-
for (let l = 0; l < c.length; l++) {
|
|
501
|
-
const u = c[l] ?? [];
|
|
502
|
-
for (const n of u) {
|
|
503
|
-
let o = t.get(n.name);
|
|
504
|
-
o || (o = {
|
|
505
|
-
name: n.name,
|
|
506
|
-
values: new Array(e).fill(0),
|
|
507
|
-
rowColors: new Array(e).fill(void 0)
|
|
508
|
-
}, t.set(n.name, o), s.push(n.name)), o.values[l] = n.value, o.rowColors[l] = n.color;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
return s.map((l) => t.get(l));
|
|
512
|
-
}
|
|
513
|
-
function ze(c) {
|
|
514
|
-
const e = E(71), {
|
|
515
|
-
data: t,
|
|
516
|
-
selection: s,
|
|
517
|
-
onSelectionChange: l,
|
|
518
|
-
formatter: u,
|
|
519
|
-
labelFormatter: n,
|
|
520
|
-
series: o,
|
|
521
|
-
maxItems: m,
|
|
522
|
-
labels: r,
|
|
523
|
-
maxOverride: d,
|
|
524
|
-
size: a,
|
|
525
|
-
stacked: g
|
|
526
|
-
} = c, i = m === void 0 ? Oe : m, p = a === void 0 ? "small" : a, h = g === void 0 ? !1 : g, f = ve(), y = u ?? Me, b = !!s && s.length > 0;
|
|
527
|
-
let k;
|
|
528
|
-
e[0] !== s ? (k = s ?? [], e[0] = s, e[1] = k) : k = e[1];
|
|
529
|
-
let S;
|
|
530
|
-
e[2] !== k ? (S = new Set(k), e[2] = k, e[3] = S) : S = e[3];
|
|
531
|
-
const R = S;
|
|
532
|
-
let z;
|
|
533
|
-
e[4] !== l || e[5] !== s ? (z = (C) => {
|
|
534
|
-
if (!l)
|
|
535
|
-
return;
|
|
536
|
-
const v = s ?? [], F = v.includes(C) ? v.filter((ce) => ce !== C) : [...v, C];
|
|
537
|
-
l(F);
|
|
538
|
-
}, e[4] = l, e[5] = s, e[6] = z) : z = e[6];
|
|
539
|
-
const T = z, K = f.palette.secondary.main;
|
|
540
|
-
let O;
|
|
541
|
-
e[7] !== f.palette ? (O = Object.values(f.palette.qualitative?.bold ?? {}), e[7] = f.palette, e[8] = O) : O = e[8];
|
|
542
|
-
let B;
|
|
543
|
-
e[9] !== O || e[10] !== f.palette.secondary.main ? (B = [K, ...O], e[9] = O, e[10] = f.palette.secondary.main, e[11] = B) : B = e[11];
|
|
544
|
-
const N = B;
|
|
545
|
-
let M;
|
|
546
|
-
e[12] !== N || e[13] !== o || e[14] !== f.palette.secondary.main ? (M = (C, v) => {
|
|
547
|
-
if (v)
|
|
548
|
-
return v;
|
|
549
|
-
const F = o?.[C]?.color;
|
|
550
|
-
return F || (N[C % N.length] ?? f.palette.secondary.main);
|
|
551
|
-
}, e[12] = N, e[13] = o, e[14] = f.palette.secondary.main, e[15] = M) : M = e[15];
|
|
552
|
-
const D = M, W = f.palette.action.disabled;
|
|
553
|
-
let A;
|
|
554
|
-
e[16] !== t ? (A = Fe(t), e[16] = t, e[17] = A) : A = e[17];
|
|
555
|
-
const L = A;
|
|
556
|
-
let j;
|
|
557
|
-
e: {
|
|
558
|
-
if (typeof d == "number" && d > 0) {
|
|
559
|
-
j = d;
|
|
560
|
-
break e;
|
|
561
|
-
}
|
|
562
|
-
let C = 0;
|
|
563
|
-
for (const v of L)
|
|
564
|
-
for (const F of v.values)
|
|
565
|
-
F > C && (C = F);
|
|
566
|
-
j = C;
|
|
567
|
-
}
|
|
568
|
-
const $ = j, P = i === 0, G = he(!1), [pe, ge] = be(null);
|
|
569
|
-
let Z;
|
|
570
|
-
e[18] !== P ? (Z = (C) => {
|
|
571
|
-
if (!C || G.current || P)
|
|
572
|
-
return;
|
|
573
|
-
const v = C.clientHeight;
|
|
574
|
-
v > 0 && (G.current = !0, ge(v));
|
|
575
|
-
}, e[18] = P, e[19] = Z) : Z = e[19];
|
|
576
|
-
const se = Z;
|
|
577
|
-
if (L.length === 0)
|
|
578
|
-
return null;
|
|
579
|
-
let _;
|
|
580
|
-
e[20] !== i ? (_ = typeof i == "number" && Number.isFinite(i) && i > 0, e[20] = i, e[21] = _) : _ = e[21];
|
|
581
|
-
const ee = _;
|
|
582
|
-
let te;
|
|
583
|
-
e[22] !== L || e[23] !== ee || e[24] !== i ? (te = ee ? L.slice(0, i) : L, e[22] = L, e[23] = ee, e[24] = i, e[25] = te) : te = e[25];
|
|
584
|
-
const oe = te, le = ee ? L.length - oe.length : 0, U = t.length > 1, ie = U && !!o && o.length > 0, ne = P ? pe ?? Ne[p] * We : void 0;
|
|
585
|
-
let X;
|
|
586
|
-
e[26] !== ne ? (X = ne !== void 0 ? {
|
|
587
|
-
maxHeight: ne,
|
|
588
|
-
overflowY: "auto"
|
|
589
|
-
} : void 0, e[26] = ne, e[27] = X) : X = e[27];
|
|
590
|
-
let q;
|
|
591
|
-
if (e[28] !== D || e[29] !== W || e[30] !== y || e[31] !== b || e[32] !== U || e[33] !== n || e[34] !== $ || e[35] !== R || e[36] !== o || e[37] !== p || e[38] !== h || e[39] !== T || e[40] !== oe) {
|
|
592
|
-
let C;
|
|
593
|
-
e[42] !== D || e[43] !== W || e[44] !== y || e[45] !== b || e[46] !== U || e[47] !== n || e[48] !== $ || e[49] !== R || e[50] !== o || e[51] !== p || e[52] !== h || e[53] !== T ? (C = (v) => {
|
|
594
|
-
const F = R.has(v.name), ce = b && !F, ue = n ? n(v.name) : void 0, de = (ae) => ce ? W : D(ae, v.rowColors[ae]);
|
|
595
|
-
return U ? h ? /* @__PURE__ */ w(Re, { name: v.name, displayName: ue, values: v.values, colors: v.values.map((ae, fe) => de(fe)), seriesNames: o?.map(Be) ?? [], formatter: y, selected: F, onToggle: T, size: p }, String(v.name)) : /* @__PURE__ */ w($e, { name: v.name, displayName: ue, values: v.values, colors: v.values.map((ae, fe) => de(fe)), maxValue: $, formatter: y, selected: F, onToggle: T, size: p }, String(v.name)) : /* @__PURE__ */ w(Se, { name: v.name, displayName: ue, value: v.values[0] ?? 0, maxValue: $, color: de(0), formatter: y, selected: F, onToggle: T, size: p }, String(v.name));
|
|
596
|
-
}, e[42] = D, e[43] = W, e[44] = y, e[45] = b, e[46] = U, e[47] = n, e[48] = $, e[49] = R, e[50] = o, e[51] = p, e[52] = h, e[53] = T, e[54] = C) : C = e[54], q = oe.map(C), e[28] = D, e[29] = W, e[30] = y, e[31] = b, e[32] = U, e[33] = n, e[34] = $, e[35] = R, e[36] = o, e[37] = p, e[38] = h, e[39] = T, e[40] = oe, e[41] = q;
|
|
597
|
-
} else
|
|
598
|
-
q = e[41];
|
|
599
|
-
let Y;
|
|
600
|
-
e[55] !== le || e[56] !== r?.other || e[57] !== r?.otherCount ? (Y = le > 0 && /* @__PURE__ */ w(De, { hiddenCount: le, otherLabel: r?.other, otherCountLabel: r?.otherCount }), e[55] = le, e[56] = r?.other, e[57] = r?.otherCount, e[58] = Y) : Y = e[58];
|
|
601
|
-
let J;
|
|
602
|
-
e[59] !== se || e[60] !== X || e[61] !== q || e[62] !== Y ? (J = /* @__PURE__ */ H(I, { ref: se, sx: x.list, style: X, children: [
|
|
603
|
-
q,
|
|
604
|
-
Y
|
|
605
|
-
] }), e[59] = se, e[60] = X, e[61] = q, e[62] = Y, e[63] = J) : J = e[63];
|
|
606
|
-
let Q;
|
|
607
|
-
e[64] !== D || e[65] !== ie || e[66] !== o ? (Q = ie && o && /* @__PURE__ */ w(Le, { series: o, colorAt: (C) => D(C) }), e[64] = D, e[65] = ie, e[66] = o, e[67] = Q) : Q = e[67];
|
|
608
|
-
let re;
|
|
609
|
-
return e[68] !== J || e[69] !== Q ? (re = /* @__PURE__ */ H(I, { sx: x.root, children: [
|
|
610
|
-
J,
|
|
611
|
-
Q
|
|
612
|
-
] }), e[68] = J, e[69] = Q, e[70] = re) : re = e[70], re;
|
|
613
|
-
}
|
|
614
|
-
function Be(c) {
|
|
615
|
-
return c.name;
|
|
616
|
-
}
|
|
617
|
-
function Me(c) {
|
|
618
|
-
return String(c);
|
|
619
|
-
}
|
|
620
|
-
const Ae = (c) => ({
|
|
621
|
-
data: c.data ?? [],
|
|
622
|
-
rawData: c.rawData ?? void 0,
|
|
623
|
-
formatter: c.formatter,
|
|
624
|
-
labelFormatter: c.labelFormatter
|
|
625
|
-
});
|
|
626
|
-
function He(c) {
|
|
627
|
-
if (!c) return 0;
|
|
628
|
-
let e = 0;
|
|
629
|
-
for (const t of c)
|
|
630
|
-
for (const s of t) s.value > e && (e = s.value);
|
|
631
|
-
return e;
|
|
632
|
-
}
|
|
633
|
-
function Xe(c) {
|
|
634
|
-
const e = E(12), {
|
|
635
|
-
selection: t,
|
|
636
|
-
onSelectionChange: s,
|
|
637
|
-
series: l,
|
|
638
|
-
maxItems: u,
|
|
639
|
-
labels: n,
|
|
640
|
-
maxOverride: o,
|
|
641
|
-
size: m,
|
|
642
|
-
stacked: r
|
|
643
|
-
} = c, d = xe(), a = ye(d, Ae), g = He(a.rawData), i = o ?? (g > 0 ? g : void 0);
|
|
644
|
-
let p;
|
|
645
|
-
return e[0] !== i || e[1] !== n || e[2] !== u || e[3] !== s || e[4] !== t || e[5] !== l || e[6] !== m || e[7] !== a.data || e[8] !== a.formatter || e[9] !== a.labelFormatter || e[10] !== r ? (p = /* @__PURE__ */ w(ze, { data: a.data, formatter: a.formatter, labelFormatter: a.labelFormatter, selection: t, onSelectionChange: s, series: l, maxItems: u, labels: n, maxOverride: i, size: m, stacked: r }), e[0] = i, e[1] = n, e[2] = u, e[3] = s, e[4] = t, e[5] = l, e[6] = m, e[7] = a.data, e[8] = a.formatter, e[9] = a.labelFormatter, e[10] = r, e[11] = p) : p = e[11], p;
|
|
646
|
-
}
|
|
647
|
-
export {
|
|
648
|
-
Xe as C,
|
|
649
|
-
me as a,
|
|
650
|
-
Le as b,
|
|
651
|
-
$e as c,
|
|
652
|
-
De as d,
|
|
653
|
-
Se as e,
|
|
654
|
-
ze as f
|
|
655
|
-
};
|
|
656
|
-
//# sourceMappingURL=category-DwaeYjpX.js.map
|