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