@carto/ps-react-ui 4.4.2 → 4.4.3
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 +57 -0
- package/dist/download-config-Dqu78h2a.js.map +1 -0
- package/dist/formatter-B9Bxn1k7.js +6 -0
- package/dist/formatter-B9Bxn1k7.js.map +1 -0
- package/dist/styles-Y8q7Jff3.js +118 -0
- package/dist/styles-Y8q7Jff3.js.map +1 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +8 -2
- package/dist/types/widgets/category/components/category-row-multi.d.ts +2 -1
- package/dist/types/widgets/category/components/category-row-single.d.ts +2 -1
- package/dist/types/widgets/category/types.d.ts +1 -0
- package/dist/types/widgets/echart/types.d.ts +2 -0
- package/dist/types/widgets/histogram/config.d.ts +15 -3
- package/dist/types/widgets/histogram/index.d.ts +2 -1
- package/dist/types/widgets/histogram/types.d.ts +6 -3
- package/dist/types/widgets/stores/types.d.ts +2 -0
- package/dist/types/widgets/utils/chart-config/index.d.ts +1 -1
- package/dist/types/widgets/utils/chart-config/option-builders.d.ts +13 -8
- package/dist/types/widgets/utils/formatter.d.ts +1 -0
- package/dist/types/widgets/utils/index.d.ts +1 -1
- package/dist/widgets/actions.js +455 -439
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +52 -46
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +206 -197
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/formula.js +1 -1
- package/dist/widgets/histogram.js +119 -79
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/pie.js +110 -98
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +1 -1
- package/dist/widgets/scatterplot.js +49 -43
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/spread.js +1 -1
- package/dist/widgets/timeseries.js +51 -45
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/toolbar-actions.js +101 -6693
- package/dist/widgets/toolbar-actions.js.map +1 -1
- package/dist/widgets/utils.js +16 -14
- package/dist/widgets/utils.js.map +1 -1
- package/package.json +5 -4
- package/src/widgets/README.md +3 -3
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +42 -47
- package/src/widgets/actions/brush-toggle/types.ts +8 -2
- package/src/widgets/bar/config.ts +22 -14
- package/src/widgets/category/category-ui.tsx +9 -1
- package/src/widgets/category/components/category-row-multi.tsx +6 -2
- package/src/widgets/category/components/category-row-single.tsx +5 -1
- package/src/widgets/category/types.ts +1 -0
- package/src/widgets/echart/types.ts +2 -0
- package/src/widgets/histogram/config.ts +101 -20
- package/src/widgets/histogram/index.ts +6 -1
- package/src/widgets/histogram/types.ts +9 -3
- package/src/widgets/pie/config.ts +17 -5
- package/src/widgets/scatterplot/config.ts +8 -3
- package/src/widgets/stores/types.ts +2 -0
- package/src/widgets/timeseries/config.ts +21 -13
- package/src/widgets/utils/chart-config/index.ts +1 -1
- package/src/widgets/utils/chart-config/option-builders.ts +22 -12
- package/src/widgets/utils/formatter.ts +2 -1
- package/src/widgets/utils/index.ts +1 -1
- package/dist/formatter-B1Xh8XDH.js +0 -5
- package/dist/formatter-B1Xh8XDH.js.map +0 -1
- package/dist/styles-C_8vOEep.js +0 -167
- package/dist/styles-C_8vOEep.js.map +0 -1
package/dist/widgets/category.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useShallow as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { d as
|
|
1
|
+
import { jsx as g, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { c as B } from "react/compiler-runtime";
|
|
3
|
+
import { Box as C, Typography as V, useTheme as re, Skeleton as Y } from "@mui/material";
|
|
4
|
+
import { u as F } from "../widget-store-CzDt8oSK.js";
|
|
5
|
+
import { useShallow as I } from "zustand/shallow";
|
|
6
|
+
import { useState as ne } from "react";
|
|
7
|
+
import { a as ie, d as ae } from "../formatter-B9Bxn1k7.js";
|
|
8
8
|
import "@mui/icons-material";
|
|
9
9
|
import "react-markdown";
|
|
10
|
-
import { d as
|
|
10
|
+
import { d as te, a as Z } from "../exports-Cr43OCul.js";
|
|
11
11
|
import "../lasso-tool-BYbxrJ-7.js";
|
|
12
12
|
import "../cjs-D4KH3azB.js";
|
|
13
13
|
import "@dnd-kit/core";
|
|
14
14
|
import "@dnd-kit/sortable";
|
|
15
15
|
import "@dnd-kit/utilities";
|
|
16
|
-
const
|
|
16
|
+
const u = {
|
|
17
17
|
root: {
|
|
18
18
|
display: "flex",
|
|
19
19
|
flexDirection: "column",
|
|
@@ -143,120 +143,126 @@ const d = {
|
|
|
143
143
|
color: "text.disabled"
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
function
|
|
147
|
-
const e =
|
|
146
|
+
function oe(o) {
|
|
147
|
+
const e = B(6), {
|
|
148
148
|
value: t,
|
|
149
149
|
maxValue: r,
|
|
150
150
|
color: l,
|
|
151
|
-
selected:
|
|
152
|
-
} = o,
|
|
153
|
-
let
|
|
154
|
-
e[0] !== l || e[1] !==
|
|
155
|
-
...
|
|
156
|
-
width: `${
|
|
151
|
+
selected: s
|
|
152
|
+
} = o, n = s === void 0 ? !0 : s, i = r > 0 ? t / r * 100 : 0;
|
|
153
|
+
let c;
|
|
154
|
+
e[0] !== l || e[1] !== i || e[2] !== n ? (c = n ? {
|
|
155
|
+
...u.barFill,
|
|
156
|
+
width: `${i}%`,
|
|
157
157
|
backgroundColor: l
|
|
158
158
|
} : {
|
|
159
|
-
...
|
|
160
|
-
...
|
|
161
|
-
width: `${
|
|
162
|
-
}, e[0] = l, e[1] =
|
|
163
|
-
const
|
|
159
|
+
...u.barFill,
|
|
160
|
+
...u.barFillMuted,
|
|
161
|
+
width: `${i}%`
|
|
162
|
+
}, e[0] = l, e[1] = i, e[2] = n, e[3] = c) : c = e[3];
|
|
163
|
+
const d = c;
|
|
164
164
|
let a;
|
|
165
|
-
return e[4] !==
|
|
165
|
+
return e[4] !== d ? (a = /* @__PURE__ */ g(C, { sx: u.bar, children: /* @__PURE__ */ g(C, { sx: d }) }), e[4] = d, e[5] = a) : a = e[5], a;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
const e =
|
|
167
|
+
function se(o) {
|
|
168
|
+
const e = B(26), {
|
|
169
169
|
name: t,
|
|
170
170
|
value: r,
|
|
171
171
|
maxValue: l,
|
|
172
|
-
color:
|
|
173
|
-
formatter:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
color: s,
|
|
173
|
+
formatter: n,
|
|
174
|
+
labelFormatter: i,
|
|
175
|
+
onClick: c,
|
|
176
|
+
selected: d
|
|
177
|
+
} = o, a = d === void 0 ? !0 : d;
|
|
178
|
+
let f;
|
|
179
|
+
e[0] !== t || e[1] !== c ? (f = c ? () => c({
|
|
179
180
|
name: t
|
|
180
|
-
}) : void 0, e[0] = t, e[1] =
|
|
181
|
-
const
|
|
182
|
-
let h;
|
|
183
|
-
e[3] !== t ? (h = /* @__PURE__ */ m(T, { sx: d.rowLabel, children: t }), e[3] = t, e[4] = h) : h = e[4];
|
|
181
|
+
}) : void 0, e[0] = t, e[1] = c, e[2] = f) : f = e[2];
|
|
182
|
+
const y = f, k = c ? u.rowClickable : u.row;
|
|
184
183
|
let p;
|
|
185
|
-
e[
|
|
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];
|
|
187
|
+
let b;
|
|
188
|
+
e[8] !== n || e[9] !== r ? (b = n(r), e[8] = n, e[9] = r, e[10] = b) : b = e[10];
|
|
186
189
|
let x;
|
|
187
|
-
e[
|
|
188
|
-
let
|
|
189
|
-
e[
|
|
190
|
+
e[11] !== b ? (x = /* @__PURE__ */ g(V, { sx: u.rowValue, children: b }), e[11] = b, e[12] = x) : x = e[12];
|
|
191
|
+
let w;
|
|
192
|
+
e[13] !== h || e[14] !== x ? (w = /* @__PURE__ */ $(C, { sx: u.rowHeader, children: [
|
|
190
193
|
h,
|
|
191
194
|
x
|
|
192
|
-
] }), e[
|
|
193
|
-
let w;
|
|
194
|
-
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];
|
|
195
|
+
] }), e[13] = h, e[14] = x, e[15] = w) : w = e[15];
|
|
195
196
|
let v;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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;
|
|
200
203
|
}
|
|
201
|
-
function
|
|
202
|
-
const e =
|
|
204
|
+
function ce(o) {
|
|
205
|
+
const e = B(28), {
|
|
203
206
|
name: t,
|
|
204
207
|
values: r,
|
|
205
208
|
maxValue: l,
|
|
206
|
-
colors:
|
|
207
|
-
formatter:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
colors: s,
|
|
210
|
+
formatter: n,
|
|
211
|
+
labelFormatter: i,
|
|
212
|
+
onClick: c,
|
|
213
|
+
selected: d
|
|
214
|
+
} = o, a = d === void 0 ? !0 : d;
|
|
215
|
+
let f;
|
|
216
|
+
e[0] !== t || e[1] !== c ? (f = c ? () => c({
|
|
213
217
|
name: t
|
|
214
|
-
}) : void 0, e[0] = t, e[1] =
|
|
215
|
-
const
|
|
216
|
-
let h;
|
|
217
|
-
e[3] !== t ? (h = /* @__PURE__ */ m(T, { sx: d.rowLabel, children: t }), e[3] = t, e[4] = h) : h = e[4];
|
|
218
|
+
}) : void 0, e[0] = t, e[1] = c, e[2] = f) : f = e[2];
|
|
219
|
+
const y = f, k = c ? u.rowClickable : u.row;
|
|
218
220
|
let p;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
e[3] !== i || e[4] !== t ? (p = i ? i(t) : t, e[3] = i, e[4] = t, e[5] = p) : p = e[5];
|
|
222
|
+
let h;
|
|
223
|
+
e[6] !== p ? (h = /* @__PURE__ */ g(V, { sx: u.rowLabel, children: p }), e[6] = p, e[7] = h) : h = e[7];
|
|
224
|
+
let b;
|
|
225
|
+
if (e[8] !== s || e[9] !== n || e[10] !== l || e[11] !== t || e[12] !== a || e[13] !== r) {
|
|
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;
|
|
225
231
|
} else
|
|
226
|
-
|
|
232
|
+
b = e[14];
|
|
227
233
|
let x;
|
|
228
|
-
e[
|
|
229
|
-
let
|
|
230
|
-
return e[
|
|
234
|
+
e[21] !== b ? (x = /* @__PURE__ */ g(C, { sx: u.barContainer, children: b }), e[21] = b, e[22] = x) : x = e[22];
|
|
235
|
+
let w;
|
|
236
|
+
return e[23] !== y || e[24] !== k || e[25] !== h || e[26] !== x ? (w = /* @__PURE__ */ $(C, { sx: k, onClick: y, children: [
|
|
231
237
|
h,
|
|
232
238
|
x
|
|
233
|
-
] }), e[
|
|
239
|
+
] }), e[23] = y, e[24] = k, e[25] = h, e[26] = x, e[27] = w) : w = e[27], w;
|
|
234
240
|
}
|
|
235
|
-
function
|
|
236
|
-
const e =
|
|
241
|
+
function de(o) {
|
|
242
|
+
const e = B(10), {
|
|
237
243
|
hiddenCount: t,
|
|
238
244
|
otherLabel: r,
|
|
239
245
|
otherCountLabel: l
|
|
240
|
-
} = o,
|
|
241
|
-
let
|
|
242
|
-
e[0] !== t || e[1] !==
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
e[3] !==
|
|
246
|
+
} = o, s = r === void 0 ? "Other" : r, n = l === void 0 ? "{count} more" : l;
|
|
247
|
+
let i;
|
|
248
|
+
e[0] !== t || e[1] !== n ? (i = n.replace("{count}", String(t)), e[0] = t, e[1] = n, e[2] = i) : i = e[2];
|
|
249
|
+
const c = i;
|
|
250
|
+
let d;
|
|
251
|
+
e[3] !== s ? (d = /* @__PURE__ */ g(V, { sx: u.otherLabel, children: s }), e[3] = s, e[4] = d) : d = e[4];
|
|
246
252
|
let a;
|
|
247
|
-
e[5] !==
|
|
253
|
+
e[5] !== c ? (a = /* @__PURE__ */ $(V, { sx: u.otherCount, children: [
|
|
248
254
|
"(",
|
|
249
|
-
|
|
255
|
+
c,
|
|
250
256
|
")"
|
|
251
|
-
] }), e[5] =
|
|
252
|
-
let
|
|
253
|
-
return e[7] !==
|
|
254
|
-
|
|
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
|
+
d,
|
|
255
261
|
a
|
|
256
|
-
] }), e[7] =
|
|
262
|
+
] }), e[7] = d, e[8] = a, e[9] = f) : f = e[9], f;
|
|
257
263
|
}
|
|
258
|
-
function
|
|
259
|
-
const e =
|
|
264
|
+
function ue(o) {
|
|
265
|
+
const e = B(7), {
|
|
260
266
|
series: t,
|
|
261
267
|
colors: r
|
|
262
268
|
} = o;
|
|
@@ -264,103 +270,106 @@ function se(o) {
|
|
|
264
270
|
return null;
|
|
265
271
|
let l;
|
|
266
272
|
if (e[0] !== r || e[1] !== t) {
|
|
267
|
-
let
|
|
268
|
-
e[3] !== r ? (
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
...
|
|
271
|
-
backgroundColor:
|
|
273
|
+
let n;
|
|
274
|
+
e[3] !== r ? (n = (i, c) => /* @__PURE__ */ $(C, { sx: u.legendItem, children: [
|
|
275
|
+
/* @__PURE__ */ g(C, { sx: {
|
|
276
|
+
...u.legendDot,
|
|
277
|
+
backgroundColor: i.color ?? r[c % r.length]
|
|
272
278
|
} }),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
] },
|
|
279
|
+
/* @__PURE__ */ g(V, { sx: u.legendLabel, children: i.name })
|
|
280
|
+
] }, i.name), e[3] = r, e[4] = n) : n = e[4], l = t.map(n), e[0] = r, e[1] = t, e[2] = l;
|
|
275
281
|
} else
|
|
276
282
|
l = e[2];
|
|
277
|
-
let
|
|
278
|
-
return e[5] !== l ? (
|
|
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;
|
|
279
285
|
}
|
|
280
|
-
function
|
|
281
|
-
const e =
|
|
286
|
+
function De(o) {
|
|
287
|
+
const e = B(58), {
|
|
282
288
|
id: t
|
|
283
|
-
} = o, r =
|
|
289
|
+
} = o, r = re();
|
|
284
290
|
let l;
|
|
285
|
-
e[0] !== t ? (l = (
|
|
286
|
-
const
|
|
287
|
-
let
|
|
288
|
-
e[2] !== t ? (
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
e[4] !== t ? (
|
|
292
|
-
const
|
|
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));
|
|
296
|
+
let c;
|
|
297
|
+
e[4] !== t ? (c = (m) => m.getWidget(t)?.series, e[4] = t, e[5] = c) : c = e[5];
|
|
298
|
+
const d = F(I(c));
|
|
293
299
|
let a;
|
|
294
|
-
e[6] !== t ? (a = (
|
|
295
|
-
const
|
|
300
|
+
e[6] !== t ? (a = (m) => m.getWidget(t)?.data, e[6] = t, e[7] = a) : a = e[7];
|
|
301
|
+
const f = F(I(a));
|
|
296
302
|
let y;
|
|
297
|
-
e[8] !== t ? (y = (
|
|
298
|
-
const
|
|
303
|
+
e[8] !== t ? (y = (m) => m.getWidget(t)?.maxItems, e[8] = t, e[9] = y) : y = e[9];
|
|
304
|
+
const k = F(I(y));
|
|
299
305
|
let p;
|
|
300
|
-
e[10] !== t ? (p = (
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
e[12] !== t ? (
|
|
304
|
-
const
|
|
305
|
-
let
|
|
306
|
-
e[14] !== t ? (
|
|
307
|
-
const
|
|
308
|
-
let
|
|
309
|
-
|
|
310
|
-
|
|
306
|
+
e[10] !== t ? (p = (m) => m.getWidget(t)?.labels, e[10] = t, e[11] = p) : p = e[11];
|
|
307
|
+
const h = F(I(p));
|
|
308
|
+
let b;
|
|
309
|
+
e[12] !== t ? (b = (m) => m.getWidget(t)?.onRowClick, e[12] = t, e[13] = b) : b = e[13];
|
|
310
|
+
const x = F(I(b));
|
|
311
|
+
let w;
|
|
312
|
+
e[14] !== t ? (w = (m) => m.getWidget(t)?.selected, e[14] = t, e[15] = w) : w = e[15];
|
|
313
|
+
const v = F(I(w));
|
|
314
|
+
let S;
|
|
315
|
+
e[16] !== t ? (S = (m) => m.getWidget(t)?.max, e[16] = t, e[17] = S) : S = e[17];
|
|
316
|
+
const _ = F(I(S)), U = s ?? ae, z = i ?? ie, L = d ?? [], [N] = ne(k ? 40 * (L.length || 1) * k : void 0), ee = Object.values(r.palette.qualitative.bold), T = L.length > 0 ? L.map((m, K) => m.color ?? ee[K % ee.length] ?? r.palette.secondary.main) : [r.palette.secondary.main];
|
|
317
|
+
let j, A, R, O, D, H, M, q;
|
|
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");
|
|
311
320
|
e: {
|
|
312
|
-
const
|
|
313
|
-
data:
|
|
321
|
+
const m = fe({
|
|
322
|
+
data: f
|
|
314
323
|
});
|
|
315
|
-
if (
|
|
316
|
-
|
|
324
|
+
if (m.length === 0) {
|
|
325
|
+
q = null;
|
|
317
326
|
break e;
|
|
318
327
|
}
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
...
|
|
324
|
-
}, e[
|
|
325
|
-
const
|
|
326
|
-
e[
|
|
327
|
-
maxHeight:
|
|
328
|
-
overflow:
|
|
329
|
-
}, e[
|
|
328
|
+
const K = _ ?? Math.max(...m.flatMap(me)), Q = k !== void 0 && k >= 0 ? m.slice(0, k) : m;
|
|
329
|
+
R = m.length - Q.length;
|
|
330
|
+
const le = L.length > 1;
|
|
331
|
+
A = C, e[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
332
|
+
...u.root
|
|
333
|
+
}, e[36] = M) : M = e[36], j = C, O = u.list;
|
|
334
|
+
const X = R === 0 ? "auto" : "hidden";
|
|
335
|
+
e[37] !== N || e[38] !== X ? (D = {
|
|
336
|
+
maxHeight: N,
|
|
337
|
+
overflow: X
|
|
338
|
+
}, e[37] = N, e[38] = X, e[39] = D) : D = e[39], H = le ? Q.map((W) => /* @__PURE__ */ g(ce, { name: W.name, values: W.values, maxValue: K, colors: T, formatter: U, labelFormatter: z, onClick: x, selected: v?.(W.name) ?? !0 }, W.name)) : Q.map((W) => /* @__PURE__ */ g(se, { name: W.name, value: W.values[0] ?? 0, selected: v?.(W.name) ?? !0, maxValue: K, color: T[0], formatter: U, labelFormatter: z, onClick: x }, W.name));
|
|
330
339
|
}
|
|
331
|
-
e[
|
|
340
|
+
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, e[28] = j, e[29] = A, e[30] = R, e[31] = O, e[32] = D, e[33] = H, e[34] = M, e[35] = q;
|
|
332
341
|
} else
|
|
333
|
-
|
|
334
|
-
if (
|
|
335
|
-
return
|
|
336
|
-
let
|
|
337
|
-
e[
|
|
338
|
-
let
|
|
339
|
-
e[
|
|
340
|
-
F,
|
|
341
|
-
O
|
|
342
|
-
] }), e[41] = B, e[42] = W, e[43] = F, e[44] = O, e[45] = A, e[46] = H) : H = e[46];
|
|
343
|
-
let q;
|
|
344
|
-
e[47] !== M || e[48] !== S ? (q = S.length > 0 && /* @__PURE__ */ m(se, { series: S, colors: M }), e[47] = M, e[48] = S, e[49] = q) : q = e[49];
|
|
345
|
-
let N;
|
|
346
|
-
return e[50] !== _ || e[51] !== I || e[52] !== H || e[53] !== q ? (N = /* @__PURE__ */ k(_, { sx: I, children: [
|
|
342
|
+
j = e[28], A = e[29], R = e[30], O = e[31], D = e[32], H = e[33], M = e[34], q = e[35];
|
|
343
|
+
if (q !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
344
|
+
return q;
|
|
345
|
+
let E;
|
|
346
|
+
e[40] !== R || e[41] !== h?.other || e[42] !== h?.otherCount ? (E = R > 0 && /* @__PURE__ */ g(de, { hiddenCount: R, otherLabel: h?.other, otherCountLabel: h?.otherCount }), e[40] = R, e[41] = h?.other, e[42] = h?.otherCount, e[43] = E) : E = e[43];
|
|
347
|
+
let G;
|
|
348
|
+
e[44] !== j || e[45] !== O || e[46] !== D || e[47] !== H || e[48] !== E ? (G = /* @__PURE__ */ $(j, { sx: O, style: D, children: [
|
|
347
349
|
H,
|
|
348
|
-
|
|
349
|
-
] }), e[
|
|
350
|
+
E
|
|
351
|
+
] }), e[44] = j, e[45] = O, e[46] = D, e[47] = H, e[48] = E, e[49] = G) : G = e[49];
|
|
352
|
+
let P;
|
|
353
|
+
e[50] !== T || e[51] !== L ? (P = L.length > 0 && /* @__PURE__ */ g(ue, { series: L, colors: T }), e[50] = T, e[51] = L, e[52] = P) : P = e[52];
|
|
354
|
+
let J;
|
|
355
|
+
return e[53] !== A || e[54] !== M || e[55] !== G || e[56] !== P ? (J = /* @__PURE__ */ $(A, { sx: M, children: [
|
|
356
|
+
G,
|
|
357
|
+
P
|
|
358
|
+
] }), e[53] = A, e[54] = M, e[55] = G, e[56] = P, e[57] = J) : J = e[57], J;
|
|
350
359
|
}
|
|
351
|
-
function
|
|
360
|
+
function me(o) {
|
|
352
361
|
return o.values;
|
|
353
362
|
}
|
|
354
|
-
function
|
|
363
|
+
function fe({
|
|
355
364
|
data: o
|
|
356
365
|
}) {
|
|
357
366
|
if (!o || o.length === 0) return [];
|
|
358
367
|
const e = Math.max(o.length, 1), t = /* @__PURE__ */ new Map(), r = [];
|
|
359
368
|
for (let l = 0; l < o.length; l++) {
|
|
360
|
-
const
|
|
361
|
-
for (const
|
|
362
|
-
let
|
|
363
|
-
|
|
369
|
+
const s = o[l];
|
|
370
|
+
for (const n of s) {
|
|
371
|
+
let i = t.get(n.name);
|
|
372
|
+
i || (i = new Array(e).fill(0), t.set(n.name, i), r.push(n.name)), i[l] = n.value;
|
|
364
373
|
}
|
|
365
374
|
}
|
|
366
375
|
return r.map((l) => ({
|
|
@@ -368,54 +377,54 @@ function ce({
|
|
|
368
377
|
values: t.get(l)
|
|
369
378
|
}));
|
|
370
379
|
}
|
|
371
|
-
const
|
|
372
|
-
function
|
|
373
|
-
const o =
|
|
380
|
+
const ge = [85, 70, 55, 75, 60];
|
|
381
|
+
function Me() {
|
|
382
|
+
const o = B(1);
|
|
374
383
|
let e;
|
|
375
|
-
return o[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
384
|
+
return o[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ g(C, { sx: u.list, "aria-label": "Category skeleton", children: Array.from({
|
|
376
385
|
length: 5
|
|
377
|
-
}).map(
|
|
386
|
+
}).map(he) }), o[0] = e) : e = o[0], e;
|
|
378
387
|
}
|
|
379
|
-
function
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
388
|
+
function he(o, e) {
|
|
389
|
+
return /* @__PURE__ */ $(C, { sx: u.row, children: [
|
|
390
|
+
/* @__PURE__ */ $(C, { sx: u.rowHeader, children: [
|
|
391
|
+
/* @__PURE__ */ g(Y, { width: 80, height: 16 }),
|
|
392
|
+
/* @__PURE__ */ g(Y, { width: 40, height: 16 })
|
|
384
393
|
] }),
|
|
385
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ g(Y, { variant: "rectangular", height: 4, sx: {
|
|
386
395
|
borderRadius: 2,
|
|
387
|
-
width: `${
|
|
396
|
+
width: `${ge[e]}%`
|
|
388
397
|
} })
|
|
389
398
|
] }, e);
|
|
390
399
|
}
|
|
391
|
-
function
|
|
400
|
+
function Te({
|
|
392
401
|
refUI: o,
|
|
393
402
|
series: e
|
|
394
403
|
}) {
|
|
395
404
|
return [{
|
|
396
|
-
...
|
|
397
|
-
modifier: () =>
|
|
405
|
+
...te,
|
|
406
|
+
modifier: () => te.modifier(o)
|
|
398
407
|
}, {
|
|
399
|
-
...
|
|
408
|
+
...Z,
|
|
400
409
|
modifier: async (t) => {
|
|
401
410
|
if (!t?.length || t[0]?.length === 0)
|
|
402
|
-
return
|
|
403
|
-
const r = t.length, l = /* @__PURE__ */ new Map(),
|
|
404
|
-
for (let
|
|
405
|
-
const a = t[
|
|
406
|
-
for (const
|
|
407
|
-
let y = l.get(
|
|
408
|
-
y || (y = new Array(r).fill(0), l.set(
|
|
411
|
+
return Z.modifier([]);
|
|
412
|
+
const r = t.length, l = /* @__PURE__ */ new Map(), s = [];
|
|
413
|
+
for (let d = 0; d < r; d++) {
|
|
414
|
+
const a = t[d];
|
|
415
|
+
for (const f of a) {
|
|
416
|
+
let y = l.get(f.name);
|
|
417
|
+
y || (y = new Array(r).fill(0), l.set(f.name, y), s.push(f.name)), y[d] = f.value;
|
|
409
418
|
}
|
|
410
419
|
}
|
|
411
|
-
const
|
|
420
|
+
const n = s.map((d) => [d, ...l.get(d)]), c = r > 1 ? ["Category", ...e?.map((d) => d.name) ?? Array.from({
|
|
412
421
|
length: r
|
|
413
|
-
}, (
|
|
414
|
-
return
|
|
422
|
+
}, (d, a) => `Series ${a + 1}`)] : ["Category", "Value"];
|
|
423
|
+
return Z.modifier([c, ...n]);
|
|
415
424
|
}
|
|
416
425
|
}];
|
|
417
426
|
}
|
|
418
|
-
function
|
|
427
|
+
function Ve() {
|
|
419
428
|
return {
|
|
420
429
|
series: [],
|
|
421
430
|
maxItems: 10,
|
|
@@ -423,14 +432,14 @@ function De() {
|
|
|
423
432
|
};
|
|
424
433
|
}
|
|
425
434
|
export {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
oe as CategoryBar,
|
|
436
|
+
ue as CategoryLegend,
|
|
437
|
+
ce as CategoryRowMulti,
|
|
438
|
+
de as CategoryRowOther,
|
|
439
|
+
se as CategoryRowSingle,
|
|
440
|
+
Me as CategorySkeleton,
|
|
441
|
+
De as CategoryUI,
|
|
442
|
+
Ve as categoryConfig,
|
|
443
|
+
Te as categoryDownloadConfig
|
|
435
444
|
};
|
|
436
445
|
//# sourceMappingURL=category.js.map
|