@carto/ps-react-ui 4.4.3 → 4.5.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/{download-config-Dqu78h2a.js → download-config-DemuQ3Jm.js} +9 -10
- package/dist/{download-config-Dqu78h2a.js.map → download-config-DemuQ3Jm.js.map} +1 -1
- package/dist/error-Cj8eUMrl.js +40 -0
- package/dist/error-Cj8eUMrl.js.map +1 -0
- package/dist/no-data-DkIt7Qt1.js +61 -0
- package/dist/no-data-DkIt7Qt1.js.map +1 -0
- package/dist/row-D4VOhcNI.js +34 -0
- package/dist/row-D4VOhcNI.js.map +1 -0
- package/dist/series-Bola3CmD.js +90 -0
- package/dist/series-Bola3CmD.js.map +1 -0
- package/dist/types/widgets/category/style.d.ts +1 -0
- package/dist/types/widgets/echart/shared-resize-observer.d.ts +12 -0
- package/dist/types/widgets/stores/index.d.ts +2 -1
- package/dist/types/widgets/stores/use-widget-selector.d.ts +35 -0
- package/dist/types/widgets/stores/widget-store-performance.test.d.ts +1 -0
- package/dist/types/widgets/stores/widget-store.d.ts +49 -27
- package/dist/types/widgets/table/types.d.ts +1 -1
- package/dist/use-widget-ref-BFazQvJK.js +22 -0
- package/dist/use-widget-ref-BFazQvJK.js.map +1 -0
- package/dist/use-widget-selector-DqRmWQ1K.js +12 -0
- package/dist/use-widget-selector-DqRmWQ1K.js.map +1 -0
- package/dist/widget-store-CIrb9RKP.js +263 -0
- package/dist/widget-store-CIrb9RKP.js.map +1 -0
- package/dist/widgets/actions.js +783 -817
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +2 -2
- package/dist/widgets/category.js +259 -258
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +109 -99
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/error.js +1 -1
- package/dist/widgets/formula.js +71 -63
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +7 -8
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +53 -60
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/markdown.js +51 -50
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/no-data.js +1 -1
- package/dist/widgets/pie.js +2 -2
- package/dist/widgets/range.js +146 -144
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +2 -2
- package/dist/widgets/skeleton-loader.js +18 -17
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +110 -94
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +5 -2
- package/dist/widgets/stores.js.map +1 -1
- package/dist/widgets/subheader.js +29 -29
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +422 -436
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +2 -2
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets/wrapper.js +156 -158
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets.js +4 -4
- package/package.json +1 -1
- package/src/hooks/use-widget-ref.ts +3 -4
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +18 -32
- package/src/widgets/actions/change-column/change-column.tsx +15 -15
- package/src/widgets/actions/change-column/sortable-column-item.tsx +3 -1
- package/src/widgets/actions/download/download.tsx +4 -3
- package/src/widgets/actions/fullscreen/fullscreen.tsx +7 -11
- package/src/widgets/actions/lock-selection/lock-selection.tsx +12 -15
- package/src/widgets/actions/relative-data/relative-data.tsx +22 -26
- package/src/widgets/actions/searcher/searcher-toggle.tsx +11 -12
- package/src/widgets/actions/searcher/searcher.tsx +20 -21
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +15 -21
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +27 -43
- package/src/widgets/category/category-ui.tsx +30 -31
- package/src/widgets/category/style.ts +1 -0
- package/src/widgets/echart/echart-ui.test.tsx +20 -16
- package/src/widgets/echart/echart-ui.tsx +6 -12
- package/src/widgets/echart/echart.tsx +13 -27
- package/src/widgets/echart/shared-resize-observer.ts +45 -0
- package/src/widgets/error/error.tsx +7 -9
- package/src/widgets/formula/components/prefix.tsx +4 -6
- package/src/widgets/formula/components/row.tsx +4 -4
- package/src/widgets/formula/components/series.tsx +4 -6
- package/src/widgets/formula/components/suffix.tsx +4 -6
- package/src/widgets/formula/components/value.tsx +9 -16
- package/src/widgets/loader/loader.tsx +31 -44
- package/src/widgets/markdown/markdown.tsx +4 -7
- package/src/widgets/no-data/no-data.tsx +7 -10
- package/src/widgets/range/components/range-item.tsx +20 -18
- package/src/widgets/skeleton-loader/skeleton-loader.tsx +2 -5
- package/src/widgets/spread/components/max-value.tsx +14 -16
- package/src/widgets/spread/components/min-value.tsx +14 -16
- package/src/widgets/stores/index.ts +2 -1
- package/src/widgets/stores/use-widget-selector.ts +47 -0
- package/src/widgets/stores/widget-store-performance.test.ts +750 -0
- package/src/widgets/stores/widget-store.test.ts +81 -0
- package/src/widgets/stores/widget-store.ts +225 -44
- package/src/widgets/subheader/subheader.tsx +11 -3
- package/src/widgets/table/config.ts +0 -1
- package/src/widgets/table/hooks/use-pagination.ts +28 -52
- package/src/widgets/table/hooks/use-selection.ts +20 -24
- package/src/widgets/table/hooks/use-sort.ts +22 -39
- package/src/widgets/table/types.ts +1 -1
- package/src/widgets/wrapper/wrapper-ui.tsx +12 -13
- package/src/widgets/wrapper/wrapper.tsx +4 -6
- package/dist/error-CEkRPccv.js +0 -39
- package/dist/error-CEkRPccv.js.map +0 -1
- package/dist/no-data-hR3KcJ-_.js +0 -60
- package/dist/no-data-hR3KcJ-_.js.map +0 -1
- package/dist/row-DTCV0Ocm.js +0 -35
- package/dist/row-DTCV0Ocm.js.map +0 -1
- package/dist/series-CYNOu2Ju.js +0 -91
- package/dist/series-CYNOu2Ju.js.map +0 -1
- package/dist/use-widget-ref-wtFLDFCD.js +0 -25
- package/dist/use-widget-ref-wtFLDFCD.js.map +0 -1
- package/dist/widget-store-CzDt8oSK.js +0 -163
- package/dist/widget-store-CzDt8oSK.js.map +0 -1
package/dist/widgets/category.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Box as C, Typography as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsx as h, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { c as M } from "react/compiler-runtime";
|
|
3
|
+
import { Box as C, Typography as D, useTheme as K, Skeleton as P } from "@mui/material";
|
|
4
|
+
import { u as Q } from "../use-widget-selector-DqRmWQ1K.js";
|
|
5
|
+
import { useState as X } from "react";
|
|
6
|
+
import { a as Y, d as Z } from "../formatter-B9Bxn1k7.js";
|
|
7
|
+
import { u as ee } from "../use-widget-ref-BFazQvJK.js";
|
|
8
|
+
import "../widget-store-CIrb9RKP.js";
|
|
9
|
+
import "zustand/shallow";
|
|
8
10
|
import "@mui/icons-material";
|
|
9
|
-
import "
|
|
10
|
-
import { d as te, a as Z } from "../exports-Cr43OCul.js";
|
|
11
|
+
import { d as U, a as N } from "../exports-Cr43OCul.js";
|
|
11
12
|
import "../lasso-tool-BYbxrJ-7.js";
|
|
12
13
|
import "../cjs-D4KH3azB.js";
|
|
13
14
|
import "@dnd-kit/core";
|
|
@@ -17,17 +18,18 @@ const u = {
|
|
|
17
18
|
root: {
|
|
18
19
|
display: "flex",
|
|
19
20
|
flexDirection: "column",
|
|
20
|
-
position: "relative"
|
|
21
|
+
position: "relative",
|
|
22
|
+
width: "100%"
|
|
21
23
|
},
|
|
22
24
|
list: {
|
|
23
25
|
display: "flex",
|
|
24
26
|
flexDirection: "column",
|
|
25
|
-
gap: (
|
|
27
|
+
gap: (t) => t.spacing(1)
|
|
26
28
|
},
|
|
27
29
|
row: {
|
|
28
30
|
display: "flex",
|
|
29
31
|
flexDirection: "column",
|
|
30
|
-
gap: (
|
|
32
|
+
gap: (t) => t.spacing(0.5),
|
|
31
33
|
pointerEvents: "none"
|
|
32
34
|
},
|
|
33
35
|
rowClickable: {
|
|
@@ -65,13 +67,13 @@ const u = {
|
|
|
65
67
|
bar: {
|
|
66
68
|
height: 4,
|
|
67
69
|
borderRadius: 2,
|
|
68
|
-
backgroundColor: (
|
|
70
|
+
backgroundColor: (t) => t.palette.action.disabledBackground,
|
|
69
71
|
overflow: "hidden",
|
|
70
72
|
position: "relative",
|
|
71
73
|
transition: "background-color 0.15s ease-in-out",
|
|
72
74
|
cursor: "pointer",
|
|
73
75
|
"&:hover": {
|
|
74
|
-
backgroundColor: (
|
|
76
|
+
backgroundColor: (t) => t.palette.action.hover,
|
|
75
77
|
"& > div": {
|
|
76
78
|
filter: "brightness(1.2)"
|
|
77
79
|
}
|
|
@@ -83,24 +85,24 @@ const u = {
|
|
|
83
85
|
transition: "width 0.3s ease-in-out, background-color 0.15s ease-in-out"
|
|
84
86
|
},
|
|
85
87
|
barFillMuted: {
|
|
86
|
-
backgroundColor: (
|
|
88
|
+
backgroundColor: (t) => t.palette.action.disabled
|
|
87
89
|
},
|
|
88
90
|
legend: {
|
|
89
91
|
display: "flex",
|
|
90
92
|
alignItems: "center",
|
|
91
|
-
gap: (
|
|
93
|
+
gap: (t) => t.spacing(2),
|
|
92
94
|
flexWrap: "wrap",
|
|
93
|
-
paddingTop: (
|
|
95
|
+
paddingTop: (t) => t.spacing(2),
|
|
94
96
|
position: "sticky",
|
|
95
97
|
bottom: 0,
|
|
96
98
|
backgroundColor: "background.paper",
|
|
97
|
-
borderTop: (
|
|
98
|
-
marginTop: (
|
|
99
|
+
borderTop: (t) => `1px solid ${t.palette.divider}`,
|
|
100
|
+
marginTop: (t) => t.spacing(2)
|
|
99
101
|
},
|
|
100
102
|
legendItem: {
|
|
101
103
|
display: "flex",
|
|
102
104
|
alignItems: "center",
|
|
103
|
-
gap: (
|
|
105
|
+
gap: (t) => t.spacing(1)
|
|
104
106
|
},
|
|
105
107
|
legendDot: {
|
|
106
108
|
width: 8,
|
|
@@ -116,7 +118,7 @@ const u = {
|
|
|
116
118
|
multiBarRow: {
|
|
117
119
|
display: "flex",
|
|
118
120
|
alignItems: "center",
|
|
119
|
-
gap: (
|
|
121
|
+
gap: (t) => t.spacing(1)
|
|
120
122
|
},
|
|
121
123
|
multiBarValue: {
|
|
122
124
|
typography: "body2",
|
|
@@ -143,288 +145,287 @@ const u = {
|
|
|
143
145
|
color: "text.disabled"
|
|
144
146
|
}
|
|
145
147
|
};
|
|
146
|
-
function
|
|
147
|
-
const e =
|
|
148
|
-
value:
|
|
149
|
-
maxValue:
|
|
150
|
-
color:
|
|
151
|
-
selected:
|
|
152
|
-
} =
|
|
153
|
-
let
|
|
154
|
-
e[0] !==
|
|
148
|
+
function z(t) {
|
|
149
|
+
const e = M(6), {
|
|
150
|
+
value: o,
|
|
151
|
+
maxValue: l,
|
|
152
|
+
color: r,
|
|
153
|
+
selected: c
|
|
154
|
+
} = t, i = c === void 0 ? !0 : c, s = l > 0 ? o / l * 100 : 0;
|
|
155
|
+
let d;
|
|
156
|
+
e[0] !== r || e[1] !== s || e[2] !== i ? (d = i ? {
|
|
155
157
|
...u.barFill,
|
|
156
|
-
width: `${
|
|
157
|
-
backgroundColor:
|
|
158
|
+
width: `${s}%`,
|
|
159
|
+
backgroundColor: r
|
|
158
160
|
} : {
|
|
159
161
|
...u.barFill,
|
|
160
162
|
...u.barFillMuted,
|
|
161
|
-
width: `${
|
|
162
|
-
}, e[0] =
|
|
163
|
-
const
|
|
163
|
+
width: `${s}%`
|
|
164
|
+
}, e[0] = r, e[1] = s, e[2] = i, e[3] = d) : d = e[3];
|
|
165
|
+
const n = d;
|
|
164
166
|
let a;
|
|
165
|
-
return e[4] !==
|
|
167
|
+
return e[4] !== n ? (a = /* @__PURE__ */ h(C, { sx: u.bar, children: /* @__PURE__ */ h(C, { sx: n }) }), e[4] = n, e[5] = a) : a = e[5], a;
|
|
166
168
|
}
|
|
167
|
-
function
|
|
168
|
-
const e =
|
|
169
|
-
name:
|
|
170
|
-
value:
|
|
171
|
-
maxValue:
|
|
172
|
-
color:
|
|
173
|
-
formatter:
|
|
174
|
-
labelFormatter:
|
|
175
|
-
onClick:
|
|
176
|
-
selected:
|
|
177
|
-
} =
|
|
178
|
-
let
|
|
179
|
-
e[0] !==
|
|
180
|
-
name:
|
|
181
|
-
}) : void 0, e[0] =
|
|
182
|
-
const y =
|
|
183
|
-
let p;
|
|
184
|
-
e[3] !== i || e[4] !== t ? (p = i ? i(t) : t, e[3] = i, e[4] = t, e[5] = p) : p = e[5];
|
|
185
|
-
let h;
|
|
186
|
-
e[6] !== p ? (h = /* @__PURE__ */ g(V, { sx: u.rowLabel, children: p }), e[6] = p, e[7] = h) : h = e[7];
|
|
169
|
+
function te(t) {
|
|
170
|
+
const e = M(26), {
|
|
171
|
+
name: o,
|
|
172
|
+
value: l,
|
|
173
|
+
maxValue: r,
|
|
174
|
+
color: c,
|
|
175
|
+
formatter: i,
|
|
176
|
+
labelFormatter: s,
|
|
177
|
+
onClick: d,
|
|
178
|
+
selected: n
|
|
179
|
+
} = t, a = n === void 0 ? !0 : n;
|
|
180
|
+
let m;
|
|
181
|
+
e[0] !== o || e[1] !== d ? (m = d ? () => d({
|
|
182
|
+
name: o
|
|
183
|
+
}) : void 0, e[0] = o, e[1] = d, e[2] = m) : m = e[2];
|
|
184
|
+
const y = m, k = d ? u.rowClickable : u.row;
|
|
187
185
|
let b;
|
|
188
|
-
e[
|
|
186
|
+
e[3] !== s || e[4] !== o ? (b = s ? s(o) : o, e[3] = s, e[4] = o, e[5] = b) : b = e[5];
|
|
189
187
|
let x;
|
|
190
|
-
e[
|
|
191
|
-
let w;
|
|
192
|
-
e[13] !== h || e[14] !== x ? (w = /* @__PURE__ */ $(C, { sx: u.rowHeader, children: [
|
|
193
|
-
h,
|
|
194
|
-
x
|
|
195
|
-
] }), e[13] = h, e[14] = x, e[15] = w) : w = e[15];
|
|
196
|
-
let v;
|
|
197
|
-
e[16] !== s || e[17] !== l || e[18] !== a || e[19] !== r ? (v = /* @__PURE__ */ g(oe, { value: r, maxValue: l, color: s, selected: a }), e[16] = s, e[17] = l, e[18] = a, e[19] = r, e[20] = v) : v = e[20];
|
|
198
|
-
let S;
|
|
199
|
-
return e[21] !== y || e[22] !== k || e[23] !== w || e[24] !== v ? (S = /* @__PURE__ */ $(C, { sx: k, onClick: y, children: [
|
|
200
|
-
w,
|
|
201
|
-
v
|
|
202
|
-
] }), e[21] = y, e[22] = k, e[23] = w, e[24] = v, e[25] = S) : S = e[25], S;
|
|
203
|
-
}
|
|
204
|
-
function ce(o) {
|
|
205
|
-
const e = B(28), {
|
|
206
|
-
name: t,
|
|
207
|
-
values: r,
|
|
208
|
-
maxValue: l,
|
|
209
|
-
colors: s,
|
|
210
|
-
formatter: n,
|
|
211
|
-
labelFormatter: i,
|
|
212
|
-
onClick: c,
|
|
213
|
-
selected: d
|
|
214
|
-
} = o, a = d === void 0 ? !0 : d;
|
|
188
|
+
e[6] !== b ? (x = /* @__PURE__ */ h(D, { sx: u.rowLabel, children: b }), e[6] = b, e[7] = x) : x = e[7];
|
|
215
189
|
let f;
|
|
216
|
-
e[
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
190
|
+
e[8] !== i || e[9] !== l ? (f = i(l), e[8] = i, e[9] = l, e[10] = f) : f = e[10];
|
|
191
|
+
let g;
|
|
192
|
+
e[11] !== f ? (g = /* @__PURE__ */ h(D, { sx: u.rowValue, children: f }), e[11] = f, e[12] = g) : g = e[12];
|
|
193
|
+
let v;
|
|
194
|
+
e[13] !== x || e[14] !== g ? (v = /* @__PURE__ */ S(C, { sx: u.rowHeader, children: [
|
|
195
|
+
x,
|
|
196
|
+
g
|
|
197
|
+
] }), e[13] = x, e[14] = g, e[15] = v) : v = e[15];
|
|
220
198
|
let p;
|
|
221
|
-
e[
|
|
222
|
-
let
|
|
223
|
-
e[
|
|
199
|
+
e[16] !== c || e[17] !== r || e[18] !== a || e[19] !== l ? (p = /* @__PURE__ */ h(z, { value: l, maxValue: r, color: c, selected: a }), e[16] = c, e[17] = r, e[18] = a, e[19] = l, e[20] = p) : p = e[20];
|
|
200
|
+
let w;
|
|
201
|
+
return e[21] !== y || e[22] !== k || e[23] !== v || e[24] !== p ? (w = /* @__PURE__ */ S(C, { sx: k, onClick: y, children: [
|
|
202
|
+
v,
|
|
203
|
+
p
|
|
204
|
+
] }), e[21] = y, e[22] = k, e[23] = v, e[24] = p, e[25] = w) : w = e[25], w;
|
|
205
|
+
}
|
|
206
|
+
function oe(t) {
|
|
207
|
+
const e = M(28), {
|
|
208
|
+
name: o,
|
|
209
|
+
values: l,
|
|
210
|
+
maxValue: r,
|
|
211
|
+
colors: c,
|
|
212
|
+
formatter: i,
|
|
213
|
+
labelFormatter: s,
|
|
214
|
+
onClick: d,
|
|
215
|
+
selected: n
|
|
216
|
+
} = t, a = n === void 0 ? !0 : n;
|
|
217
|
+
let m;
|
|
218
|
+
e[0] !== o || e[1] !== d ? (m = d ? () => d({
|
|
219
|
+
name: o
|
|
220
|
+
}) : void 0, e[0] = o, e[1] = d, e[2] = m) : m = e[2];
|
|
221
|
+
const y = m, k = d ? u.rowClickable : u.row;
|
|
224
222
|
let b;
|
|
225
|
-
|
|
226
|
-
let v;
|
|
227
|
-
e[15] !== s || e[16] !== n || e[17] !== l || e[18] !== t || e[19] !== a ? (v = (S, _) => /* @__PURE__ */ $(C, { sx: u.multiBarRow, children: [
|
|
228
|
-
/* @__PURE__ */ g(C, { sx: u.multiBarContainer, children: /* @__PURE__ */ g(oe, { value: S, maxValue: l, color: s[_ % s.length] ?? "", selected: a }) }),
|
|
229
|
-
/* @__PURE__ */ g(V, { sx: u.multiBarValue, children: n(S) })
|
|
230
|
-
] }, `${t}-${S}-${_}`), e[15] = s, e[16] = n, e[17] = l, e[18] = t, e[19] = a, e[20] = v) : v = e[20], b = r.map(v), e[8] = s, e[9] = n, e[10] = l, e[11] = t, e[12] = a, e[13] = r, e[14] = b;
|
|
231
|
-
} else
|
|
232
|
-
b = e[14];
|
|
223
|
+
e[3] !== s || e[4] !== o ? (b = s ? s(o) : o, e[3] = s, e[4] = o, e[5] = b) : b = e[5];
|
|
233
224
|
let x;
|
|
234
|
-
e[
|
|
235
|
-
let
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
225
|
+
e[6] !== b ? (x = /* @__PURE__ */ h(D, { sx: u.rowLabel, children: b }), e[6] = b, e[7] = x) : x = e[7];
|
|
226
|
+
let f;
|
|
227
|
+
if (e[8] !== c || e[9] !== i || e[10] !== r || e[11] !== o || e[12] !== a || e[13] !== l) {
|
|
228
|
+
let p;
|
|
229
|
+
e[15] !== c || e[16] !== i || e[17] !== r || e[18] !== o || e[19] !== a ? (p = (w, $) => /* @__PURE__ */ S(C, { sx: u.multiBarRow, children: [
|
|
230
|
+
/* @__PURE__ */ h(C, { sx: u.multiBarContainer, children: /* @__PURE__ */ h(z, { value: w, maxValue: r, color: c[$ % c.length] ?? "", selected: a }) }),
|
|
231
|
+
/* @__PURE__ */ h(D, { sx: u.multiBarValue, children: i(w) })
|
|
232
|
+
] }, `${o}-${w}-${$}`), e[15] = c, e[16] = i, e[17] = r, e[18] = o, e[19] = a, e[20] = p) : p = e[20], f = l.map(p), e[8] = c, e[9] = i, e[10] = r, e[11] = o, e[12] = a, e[13] = l, e[14] = f;
|
|
233
|
+
} else
|
|
234
|
+
f = e[14];
|
|
235
|
+
let g;
|
|
236
|
+
e[21] !== f ? (g = /* @__PURE__ */ h(C, { sx: u.barContainer, children: f }), e[21] = f, e[22] = g) : g = e[22];
|
|
237
|
+
let v;
|
|
238
|
+
return e[23] !== y || e[24] !== k || e[25] !== x || e[26] !== g ? (v = /* @__PURE__ */ S(C, { sx: k, onClick: y, children: [
|
|
239
|
+
x,
|
|
240
|
+
g
|
|
241
|
+
] }), e[23] = y, e[24] = k, e[25] = x, e[26] = g, e[27] = v) : v = e[27], v;
|
|
240
242
|
}
|
|
241
|
-
function
|
|
242
|
-
const e =
|
|
243
|
-
hiddenCount:
|
|
244
|
-
otherLabel:
|
|
245
|
-
otherCountLabel:
|
|
246
|
-
} =
|
|
247
|
-
let
|
|
248
|
-
e[0] !==
|
|
249
|
-
const
|
|
250
|
-
let
|
|
251
|
-
e[3] !==
|
|
243
|
+
function re(t) {
|
|
244
|
+
const e = M(10), {
|
|
245
|
+
hiddenCount: o,
|
|
246
|
+
otherLabel: l,
|
|
247
|
+
otherCountLabel: r
|
|
248
|
+
} = t, c = l === void 0 ? "Other" : l, i = r === void 0 ? "{count} more" : r;
|
|
249
|
+
let s;
|
|
250
|
+
e[0] !== o || e[1] !== i ? (s = i.replace("{count}", String(o)), e[0] = o, e[1] = i, e[2] = s) : s = e[2];
|
|
251
|
+
const d = s;
|
|
252
|
+
let n;
|
|
253
|
+
e[3] !== c ? (n = /* @__PURE__ */ h(D, { sx: u.otherLabel, children: c }), e[3] = c, e[4] = n) : n = e[4];
|
|
252
254
|
let a;
|
|
253
|
-
e[5] !==
|
|
255
|
+
e[5] !== d ? (a = /* @__PURE__ */ S(D, { sx: u.otherCount, children: [
|
|
254
256
|
"(",
|
|
255
|
-
c,
|
|
256
|
-
")"
|
|
257
|
-
] }), e[5] = c, e[6] = a) : a = e[6];
|
|
258
|
-
let f;
|
|
259
|
-
return e[7] !== d || e[8] !== a ? (f = /* @__PURE__ */ $(C, { sx: u.otherRow, children: [
|
|
260
257
|
d,
|
|
258
|
+
")"
|
|
259
|
+
] }), e[5] = d, e[6] = a) : a = e[6];
|
|
260
|
+
let m;
|
|
261
|
+
return e[7] !== n || e[8] !== a ? (m = /* @__PURE__ */ S(C, { sx: u.otherRow, children: [
|
|
262
|
+
n,
|
|
261
263
|
a
|
|
262
|
-
] }), e[7] =
|
|
264
|
+
] }), e[7] = n, e[8] = a, e[9] = m) : m = e[9], m;
|
|
263
265
|
}
|
|
264
|
-
function
|
|
265
|
-
const e =
|
|
266
|
-
series:
|
|
267
|
-
colors:
|
|
268
|
-
} =
|
|
269
|
-
if (
|
|
266
|
+
function le(t) {
|
|
267
|
+
const e = M(7), {
|
|
268
|
+
series: o,
|
|
269
|
+
colors: l
|
|
270
|
+
} = t;
|
|
271
|
+
if (o.length === 0)
|
|
270
272
|
return null;
|
|
271
|
-
let
|
|
272
|
-
if (e[0] !==
|
|
273
|
-
let
|
|
274
|
-
e[3] !==
|
|
275
|
-
/* @__PURE__ */
|
|
273
|
+
let r;
|
|
274
|
+
if (e[0] !== l || e[1] !== o) {
|
|
275
|
+
let i;
|
|
276
|
+
e[3] !== l ? (i = (s, d) => /* @__PURE__ */ S(C, { sx: u.legendItem, children: [
|
|
277
|
+
/* @__PURE__ */ h(C, { sx: {
|
|
276
278
|
...u.legendDot,
|
|
277
|
-
backgroundColor:
|
|
279
|
+
backgroundColor: s.color ?? l[d % l.length]
|
|
278
280
|
} }),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
] },
|
|
281
|
+
/* @__PURE__ */ h(D, { sx: u.legendLabel, children: s.name })
|
|
282
|
+
] }, s.name), e[3] = l, e[4] = i) : i = e[4], r = o.map(i), e[0] = l, e[1] = o, e[2] = r;
|
|
281
283
|
} else
|
|
282
|
-
|
|
283
|
-
let s;
|
|
284
|
-
return e[5] !== l ? (s = /* @__PURE__ */ g(C, { sx: u.legend, children: l }), e[5] = l, e[6] = s) : s = e[6], s;
|
|
285
|
-
}
|
|
286
|
-
function De(o) {
|
|
287
|
-
const e = B(58), {
|
|
288
|
-
id: t
|
|
289
|
-
} = o, r = re();
|
|
290
|
-
let l;
|
|
291
|
-
e[0] !== t ? (l = (m) => m.getWidget(t)?.formatter, e[0] = t, e[1] = l) : l = e[1];
|
|
292
|
-
const s = F(I(l));
|
|
293
|
-
let n;
|
|
294
|
-
e[2] !== t ? (n = (m) => m.getWidget(t)?.labelFormatter, e[2] = t, e[3] = n) : n = e[3];
|
|
295
|
-
const i = F(I(n));
|
|
284
|
+
r = e[2];
|
|
296
285
|
let c;
|
|
297
|
-
e[
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
e
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
if (e[18] !== T || e[19] !== f || e[20] !== U || e[21] !== z || e[22] !== _ || e[23] !== N || e[24] !== k || e[25] !== x || e[26] !== v || e[27] !== L) {
|
|
319
|
-
q = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
286
|
+
return e[5] !== r ? (c = /* @__PURE__ */ h(C, { sx: u.legend, children: r }), e[5] = r, e[6] = c) : c = e[6], c;
|
|
287
|
+
}
|
|
288
|
+
function Le(t) {
|
|
289
|
+
const e = M(43), {
|
|
290
|
+
id: o
|
|
291
|
+
} = t, {
|
|
292
|
+
ref: l
|
|
293
|
+
} = ee(o), r = K(), {
|
|
294
|
+
_formatter: c,
|
|
295
|
+
_labelFormatter: i,
|
|
296
|
+
_series: s,
|
|
297
|
+
data: d,
|
|
298
|
+
maxItems: n,
|
|
299
|
+
labels: a,
|
|
300
|
+
onRowClick: m,
|
|
301
|
+
selected: y,
|
|
302
|
+
max: k
|
|
303
|
+
} = Q(o, ae), b = c ?? Z, x = i ?? Y, f = s ?? [], [g] = X(n ? 40 * (f.length || 1) * n : void 0), v = Object.values(r.palette.qualitative.bold), p = f.length > 0 ? f.map((_, q) => _.color ?? v[q % v.length] ?? r.palette.secondary.main) : [r.palette.secondary.main];
|
|
304
|
+
let w, $, R, T, F, V, B, I, W;
|
|
305
|
+
if (e[0] !== p || e[1] !== d || e[2] !== b || e[3] !== x || e[4] !== k || e[5] !== g || e[6] !== n || e[7] !== m || e[8] !== l || e[9] !== y || e[10] !== f) {
|
|
306
|
+
W = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
320
307
|
e: {
|
|
321
|
-
const
|
|
322
|
-
data:
|
|
308
|
+
const _ = ie({
|
|
309
|
+
data: d
|
|
323
310
|
});
|
|
324
|
-
if (
|
|
325
|
-
|
|
311
|
+
if (_.length === 0) {
|
|
312
|
+
W = null;
|
|
326
313
|
break e;
|
|
327
314
|
}
|
|
328
|
-
const
|
|
329
|
-
R =
|
|
330
|
-
const
|
|
331
|
-
|
|
315
|
+
const q = k ?? Math.max(..._.flatMap(ne)), E = n !== void 0 && n >= 0 ? _.slice(0, n) : _;
|
|
316
|
+
R = _.length - E.length;
|
|
317
|
+
const J = f.length > 1;
|
|
318
|
+
$ = C, B = l, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
|
|
332
319
|
...u.root
|
|
333
|
-
}, e[
|
|
334
|
-
const
|
|
335
|
-
e[
|
|
336
|
-
maxHeight:
|
|
337
|
-
overflow:
|
|
338
|
-
}, e[
|
|
320
|
+
}, e[20] = I) : I = e[20], w = C, T = u.list;
|
|
321
|
+
const G = R === 0 ? "auto" : "hidden";
|
|
322
|
+
e[21] !== g || e[22] !== G ? (F = {
|
|
323
|
+
maxHeight: g,
|
|
324
|
+
overflow: G
|
|
325
|
+
}, e[21] = g, e[22] = G, e[23] = F) : F = e[23], V = J ? E.map((L) => /* @__PURE__ */ h(oe, { name: L.name, values: L.values, maxValue: q, colors: p, formatter: b, labelFormatter: x, onClick: m, selected: y?.(L.name) ?? !0 }, L.name)) : E.map((L) => /* @__PURE__ */ h(te, { name: L.name, value: L.values[0] ?? 0, selected: y?.(L.name) ?? !0, maxValue: q, color: p[0], formatter: b, labelFormatter: x, onClick: m }, L.name));
|
|
339
326
|
}
|
|
340
|
-
e[
|
|
327
|
+
e[0] = p, e[1] = d, e[2] = b, e[3] = x, e[4] = k, e[5] = g, e[6] = n, e[7] = m, e[8] = l, e[9] = y, e[10] = f, e[11] = w, e[12] = $, e[13] = R, e[14] = T, e[15] = F, e[16] = V, e[17] = B, e[18] = I, e[19] = W;
|
|
341
328
|
} else
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
return
|
|
345
|
-
let
|
|
346
|
-
e[
|
|
347
|
-
let
|
|
348
|
-
e[
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
] }), e[
|
|
352
|
-
let
|
|
353
|
-
e[
|
|
354
|
-
let
|
|
355
|
-
return e[
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
] }), e[
|
|
329
|
+
w = e[11], $ = e[12], R = e[13], T = e[14], F = e[15], V = e[16], B = e[17], I = e[18], W = e[19];
|
|
330
|
+
if (W !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
331
|
+
return W;
|
|
332
|
+
let j;
|
|
333
|
+
e[24] !== R || e[25] !== a?.other || e[26] !== a?.otherCount ? (j = R > 0 && /* @__PURE__ */ h(re, { hiddenCount: R, otherLabel: a?.other, otherCountLabel: a?.otherCount }), e[24] = R, e[25] = a?.other, e[26] = a?.otherCount, e[27] = j) : j = e[27];
|
|
334
|
+
let A;
|
|
335
|
+
e[28] !== w || e[29] !== T || e[30] !== F || e[31] !== V || e[32] !== j ? (A = /* @__PURE__ */ S(w, { sx: T, style: F, children: [
|
|
336
|
+
V,
|
|
337
|
+
j
|
|
338
|
+
] }), e[28] = w, e[29] = T, e[30] = F, e[31] = V, e[32] = j, e[33] = A) : A = e[33];
|
|
339
|
+
let O;
|
|
340
|
+
e[34] !== p || e[35] !== f ? (O = f.length > 0 && /* @__PURE__ */ h(le, { series: f, colors: p }), e[34] = p, e[35] = f, e[36] = O) : O = e[36];
|
|
341
|
+
let H;
|
|
342
|
+
return e[37] !== $ || e[38] !== B || e[39] !== I || e[40] !== A || e[41] !== O ? (H = /* @__PURE__ */ S($, { ref: B, sx: I, children: [
|
|
343
|
+
A,
|
|
344
|
+
O
|
|
345
|
+
] }), e[37] = $, e[38] = B, e[39] = I, e[40] = A, e[41] = O, e[42] = H) : H = e[42], H;
|
|
346
|
+
}
|
|
347
|
+
function ne(t) {
|
|
348
|
+
return t.values;
|
|
359
349
|
}
|
|
360
|
-
function
|
|
361
|
-
|
|
350
|
+
function ae(t) {
|
|
351
|
+
const e = t;
|
|
352
|
+
return {
|
|
353
|
+
_formatter: e?.formatter,
|
|
354
|
+
_labelFormatter: e?.labelFormatter,
|
|
355
|
+
_series: e?.series,
|
|
356
|
+
data: e?.data,
|
|
357
|
+
maxItems: e?.maxItems,
|
|
358
|
+
labels: e?.labels,
|
|
359
|
+
onRowClick: e?.onRowClick,
|
|
360
|
+
selected: e?.selected,
|
|
361
|
+
max: e?.max
|
|
362
|
+
};
|
|
362
363
|
}
|
|
363
|
-
function
|
|
364
|
-
data:
|
|
364
|
+
function ie({
|
|
365
|
+
data: t
|
|
365
366
|
}) {
|
|
366
|
-
if (!
|
|
367
|
-
const e = Math.max(
|
|
368
|
-
for (let
|
|
369
|
-
const
|
|
370
|
-
for (const
|
|
371
|
-
let
|
|
372
|
-
|
|
367
|
+
if (!t || t.length === 0) return [];
|
|
368
|
+
const e = Math.max(t.length, 1), o = /* @__PURE__ */ new Map(), l = [];
|
|
369
|
+
for (let r = 0; r < t.length; r++) {
|
|
370
|
+
const c = t[r];
|
|
371
|
+
for (const i of c) {
|
|
372
|
+
let s = o.get(i.name);
|
|
373
|
+
s || (s = new Array(e).fill(0), o.set(i.name, s), l.push(i.name)), s[r] = i.value;
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
return
|
|
376
|
-
name:
|
|
377
|
-
values:
|
|
376
|
+
return l.map((r) => ({
|
|
377
|
+
name: r,
|
|
378
|
+
values: o.get(r)
|
|
378
379
|
}));
|
|
379
380
|
}
|
|
380
|
-
const
|
|
381
|
-
function
|
|
382
|
-
const
|
|
381
|
+
const se = [85, 70, 55, 75, 60];
|
|
382
|
+
function Re() {
|
|
383
|
+
const t = M(1);
|
|
383
384
|
let e;
|
|
384
|
-
return
|
|
385
|
+
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ h(C, { sx: u.list, "aria-label": "Category skeleton", children: Array.from({
|
|
385
386
|
length: 5
|
|
386
|
-
}).map(
|
|
387
|
+
}).map(ce) }), t[0] = e) : e = t[0], e;
|
|
387
388
|
}
|
|
388
|
-
function
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
389
|
+
function ce(t, e) {
|
|
390
|
+
return /* @__PURE__ */ S(C, { sx: u.row, children: [
|
|
391
|
+
/* @__PURE__ */ S(C, { sx: u.rowHeader, children: [
|
|
392
|
+
/* @__PURE__ */ h(P, { width: 80, height: 16 }),
|
|
393
|
+
/* @__PURE__ */ h(P, { width: 40, height: 16 })
|
|
393
394
|
] }),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ h(P, { variant: "rectangular", height: 4, sx: {
|
|
395
396
|
borderRadius: 2,
|
|
396
|
-
width: `${
|
|
397
|
+
width: `${se[e]}%`
|
|
397
398
|
} })
|
|
398
399
|
] }, e);
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
-
refUI:
|
|
401
|
+
function Fe({
|
|
402
|
+
refUI: t,
|
|
402
403
|
series: e
|
|
403
404
|
}) {
|
|
404
405
|
return [{
|
|
405
|
-
...
|
|
406
|
-
modifier: () =>
|
|
406
|
+
...U,
|
|
407
|
+
modifier: () => U.modifier(t)
|
|
407
408
|
}, {
|
|
408
|
-
...
|
|
409
|
-
modifier: async (
|
|
410
|
-
if (!
|
|
411
|
-
return
|
|
412
|
-
const
|
|
413
|
-
for (let
|
|
414
|
-
const a =
|
|
415
|
-
for (const
|
|
416
|
-
let y =
|
|
417
|
-
y || (y = new Array(
|
|
409
|
+
...N,
|
|
410
|
+
modifier: async (o) => {
|
|
411
|
+
if (!o?.length || o[0]?.length === 0)
|
|
412
|
+
return N.modifier([]);
|
|
413
|
+
const l = o.length, r = /* @__PURE__ */ new Map(), c = [];
|
|
414
|
+
for (let n = 0; n < l; n++) {
|
|
415
|
+
const a = o[n];
|
|
416
|
+
for (const m of a) {
|
|
417
|
+
let y = r.get(m.name);
|
|
418
|
+
y || (y = new Array(l).fill(0), r.set(m.name, y), c.push(m.name)), y[n] = m.value;
|
|
418
419
|
}
|
|
419
420
|
}
|
|
420
|
-
const
|
|
421
|
-
length:
|
|
422
|
-
}, (
|
|
423
|
-
return
|
|
421
|
+
const i = c.map((n) => [n, ...r.get(n)]), d = l > 1 ? ["Category", ...e?.map((n) => n.name) ?? Array.from({
|
|
422
|
+
length: l
|
|
423
|
+
}, (n, a) => `Series ${a + 1}`)] : ["Category", "Value"];
|
|
424
|
+
return N.modifier([d, ...i]);
|
|
424
425
|
}
|
|
425
426
|
}];
|
|
426
427
|
}
|
|
427
|
-
function
|
|
428
|
+
function Ie() {
|
|
428
429
|
return {
|
|
429
430
|
series: [],
|
|
430
431
|
maxItems: 10,
|
|
@@ -432,14 +433,14 @@ function Ve() {
|
|
|
432
433
|
};
|
|
433
434
|
}
|
|
434
435
|
export {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
436
|
+
z as CategoryBar,
|
|
437
|
+
le as CategoryLegend,
|
|
438
|
+
oe as CategoryRowMulti,
|
|
439
|
+
re as CategoryRowOther,
|
|
440
|
+
te as CategoryRowSingle,
|
|
441
|
+
Re as CategorySkeleton,
|
|
442
|
+
Le as CategoryUI,
|
|
443
|
+
Ie as categoryConfig,
|
|
444
|
+
Fe as categoryDownloadConfig
|
|
444
445
|
};
|
|
445
446
|
//# sourceMappingURL=category.js.map
|