@carto/ps-react-ui 4.5.0 → 4.6.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/{download-config-DemuQ3Jm.js → download-config-C3I0jWIL.js} +2 -2
- package/dist/{download-config-DemuQ3Jm.js.map → download-config-C3I0jWIL.js.map} +1 -1
- package/dist/{row-D4VOhcNI.js → row-DZSP99LW.js} +2 -2
- package/dist/{row-D4VOhcNI.js.map → row-DZSP99LW.js.map} +1 -1
- package/dist/{series-Bola3CmD.js → series-DLNHDWs0.js} +3 -3
- package/dist/{series-Bola3CmD.js.map → series-DLNHDWs0.js.map} +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +3 -0
- package/dist/types/widgets/actions/index.d.ts +4 -4
- package/dist/types/widgets/actions/lock-selection/types.d.ts +2 -0
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +7 -2
- package/dist/types/widgets/actions/relative-data/types.d.ts +2 -0
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +4 -0
- package/dist/types/widgets/category/index.d.ts +10 -2
- package/dist/types/widgets/category/style.d.ts +1 -0
- package/dist/types/widgets/no-data/no-data.d.ts +3 -2
- package/dist/types/widgets/no-data/types.d.ts +5 -1
- package/dist/types/widgets/stores/index.d.ts +1 -1
- package/dist/types/widgets/stores/types.d.ts +10 -10
- package/dist/types/widgets/stores/widget-store.d.ts +2 -3
- package/dist/types/widgets/table/index.d.ts +6 -2
- package/dist/{use-widget-ref-BFazQvJK.js → use-widget-ref-Ddr_SlJJ.js} +2 -2
- package/dist/{use-widget-ref-BFazQvJK.js.map → use-widget-ref-Ddr_SlJJ.js.map} +1 -1
- package/dist/{use-widget-selector-DqRmWQ1K.js → use-widget-selector-DFl2hW0R.js} +2 -2
- package/dist/{use-widget-selector-DqRmWQ1K.js.map → use-widget-selector-DFl2hW0R.js.map} +1 -1
- package/dist/{widget-store-CIrb9RKP.js → widget-store-Bw5zRUGg.js} +93 -95
- package/dist/widget-store-Bw5zRUGg.js.map +1 -0
- package/dist/widgets/actions.js +770 -755
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +2 -2
- package/dist/widgets/category.js +187 -183
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +2 -2
- package/dist/widgets/error.js +37 -2
- package/dist/widgets/error.js.map +1 -1
- package/dist/widgets/formula.js +5 -5
- package/dist/widgets/histogram.js +1 -1
- package/dist/widgets/loader.js +1 -1
- package/dist/widgets/markdown.js +2 -2
- package/dist/widgets/no-data.js +58 -2
- package/dist/widgets/no-data.js.map +1 -1
- package/dist/widgets/note.js +121 -2
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +2 -2
- package/dist/widgets/range.js +3 -3
- package/dist/widgets/scatterplot.js +2 -2
- package/dist/widgets/skeleton-loader.js +1 -1
- package/dist/widgets/spread.js +5 -5
- package/dist/widgets/stores.js +2 -2
- package/dist/widgets/subheader.js +29 -29
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +3 -3
- package/dist/widgets/timeseries.js +2 -2
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets/wrapper.js +2 -2
- package/package.json +1 -5
- package/src/hooks/index.ts +0 -1
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +18 -22
- package/src/widgets/actions/change-column/change-column.test.tsx +1 -1
- package/src/widgets/actions/download/download.test.tsx +1 -1
- package/src/widgets/actions/index.ts +11 -2
- package/src/widgets/actions/lock-selection/lock-selection.test.tsx +14 -0
- package/src/widgets/actions/lock-selection/lock-selection.tsx +18 -11
- package/src/widgets/actions/lock-selection/types.ts +2 -0
- package/src/widgets/actions/relative-data/relative-data.test.tsx +211 -20
- package/src/widgets/actions/relative-data/relative-data.tsx +65 -34
- package/src/widgets/actions/relative-data/types.ts +2 -0
- package/src/widgets/actions/searcher/searcher.tsx +28 -30
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +11 -2
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +53 -45
- package/src/widgets/category/category-ui.tsx +7 -6
- package/src/widgets/category/index.ts +13 -14
- package/src/widgets/category/style.ts +1 -0
- package/src/widgets/no-data/no-data.test.tsx +90 -40
- package/src/widgets/no-data/no-data.tsx +7 -5
- package/src/widgets/no-data/types.ts +5 -1
- package/src/widgets/stores/index.ts +2 -0
- package/src/widgets/stores/types.ts +10 -18
- package/src/widgets/stores/widget-store.test.ts +132 -13
- package/src/widgets/stores/widget-store.ts +29 -35
- package/src/widgets/subheader/subheader.tsx +11 -3
- package/src/widgets/table/index.ts +6 -4
- package/dist/error-Cj8eUMrl.js +0 -40
- package/dist/error-Cj8eUMrl.js.map +0 -1
- package/dist/no-data-DkIt7Qt1.js +0 -61
- package/dist/no-data-DkIt7Qt1.js.map +0 -1
- package/dist/note-t51drNe0.js +0 -124
- package/dist/note-t51drNe0.js.map +0 -1
- package/dist/types/hooks/use-debounce.d.ts +0 -19
- package/dist/types/widgets/category/components/index.d.ts +0 -10
- package/dist/types/widgets/index.d.ts +0 -9
- package/dist/types/widgets/table/hooks/index.d.ts +0 -6
- package/dist/widget-store-CIrb9RKP.js.map +0 -1
- package/dist/widgets.js +0 -13
- package/dist/widgets.js.map +0 -1
- package/src/hooks/use-debounce.ts +0 -55
- package/src/widgets/category/components/index.ts +0 -14
- package/src/widgets/index.ts +0 -25
- package/src/widgets/table/hooks/index.ts +0 -7
package/dist/widgets/category.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as h, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { u as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { a as
|
|
7
|
-
import "../widget-
|
|
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-DFl2hW0R.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-Ddr_SlJJ.js";
|
|
8
|
+
import "../widget-store-Bw5zRUGg.js";
|
|
8
9
|
import "zustand/shallow";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
|
-
import { d as
|
|
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,7 +18,8 @@ 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",
|
|
@@ -143,126 +145,126 @@ const u = {
|
|
|
143
145
|
color: "text.disabled"
|
|
144
146
|
}
|
|
145
147
|
};
|
|
146
|
-
function
|
|
147
|
-
const e =
|
|
148
|
+
function z(t) {
|
|
149
|
+
const e = M(6), {
|
|
148
150
|
value: o,
|
|
149
151
|
maxValue: l,
|
|
150
152
|
color: r,
|
|
151
|
-
selected:
|
|
152
|
-
} = t,
|
|
153
|
-
let
|
|
154
|
-
e[0] !== r || e[1] !==
|
|
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: `${
|
|
158
|
+
width: `${s}%`,
|
|
157
159
|
backgroundColor: r
|
|
158
160
|
} : {
|
|
159
161
|
...u.barFill,
|
|
160
162
|
...u.barFillMuted,
|
|
161
|
-
width: `${
|
|
162
|
-
}, e[0] = r, e[1] =
|
|
163
|
-
const n =
|
|
164
|
-
let
|
|
165
|
-
return e[4] !== n ? (
|
|
163
|
+
width: `${s}%`
|
|
164
|
+
}, e[0] = r, e[1] = s, e[2] = i, e[3] = d) : d = e[3];
|
|
165
|
+
const n = d;
|
|
166
|
+
let a;
|
|
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
|
+
function te(t) {
|
|
170
|
+
const e = M(26), {
|
|
169
171
|
name: o,
|
|
170
172
|
value: l,
|
|
171
173
|
maxValue: r,
|
|
172
|
-
color:
|
|
173
|
-
formatter:
|
|
174
|
-
labelFormatter:
|
|
175
|
-
onClick:
|
|
174
|
+
color: c,
|
|
175
|
+
formatter: i,
|
|
176
|
+
labelFormatter: s,
|
|
177
|
+
onClick: d,
|
|
176
178
|
selected: n
|
|
177
|
-
} = t,
|
|
179
|
+
} = t, a = n === void 0 ? !0 : n;
|
|
178
180
|
let m;
|
|
179
|
-
e[0] !== o || e[1] !==
|
|
181
|
+
e[0] !== o || e[1] !== d ? (m = d ? () => d({
|
|
180
182
|
name: o
|
|
181
|
-
}) : void 0, e[0] = o, e[1] =
|
|
182
|
-
const
|
|
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;
|
|
183
185
|
let b;
|
|
184
|
-
e[3] !==
|
|
186
|
+
e[3] !== s || e[4] !== o ? (b = s ? s(o) : o, e[3] = s, e[4] = o, e[5] = b) : b = e[5];
|
|
187
|
+
let x;
|
|
188
|
+
e[6] !== b ? (x = /* @__PURE__ */ h(D, { sx: u.rowLabel, children: b }), e[6] = b, e[7] = x) : x = e[7];
|
|
185
189
|
let f;
|
|
186
|
-
e[
|
|
190
|
+
e[8] !== i || e[9] !== l ? (f = i(l), e[8] = i, e[9] = l, e[10] = f) : f = e[10];
|
|
187
191
|
let g;
|
|
188
|
-
e[
|
|
189
|
-
let w;
|
|
190
|
-
e[11] !== g ? (w = /* @__PURE__ */ h(_, { sx: u.rowValue, children: g }), e[11] = g, e[12] = w) : w = e[12];
|
|
191
|
-
let p;
|
|
192
|
-
e[13] !== f || e[14] !== w ? (p = /* @__PURE__ */ $(y, { sx: u.rowHeader, children: [
|
|
193
|
-
f,
|
|
194
|
-
w
|
|
195
|
-
] }), e[13] = f, e[14] = w, e[15] = p) : p = e[15];
|
|
196
|
-
let x;
|
|
197
|
-
e[16] !== d || e[17] !== r || e[18] !== c || e[19] !== l ? (x = /* @__PURE__ */ h(N, { value: l, maxValue: r, color: d, selected: c }), e[16] = d, e[17] = r, e[18] = c, e[19] = l, e[20] = x) : x = e[20];
|
|
192
|
+
e[11] !== f ? (g = /* @__PURE__ */ h(D, { sx: u.rowValue, children: f }), e[11] = f, e[12] = g) : g = e[12];
|
|
198
193
|
let v;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
] }), e[
|
|
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];
|
|
198
|
+
let p;
|
|
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;
|
|
203
205
|
}
|
|
204
|
-
function
|
|
205
|
-
const e =
|
|
206
|
+
function oe(t) {
|
|
207
|
+
const e = M(28), {
|
|
206
208
|
name: o,
|
|
207
209
|
values: l,
|
|
208
210
|
maxValue: r,
|
|
209
|
-
colors:
|
|
210
|
-
formatter:
|
|
211
|
-
labelFormatter:
|
|
212
|
-
onClick:
|
|
211
|
+
colors: c,
|
|
212
|
+
formatter: i,
|
|
213
|
+
labelFormatter: s,
|
|
214
|
+
onClick: d,
|
|
213
215
|
selected: n
|
|
214
|
-
} = t,
|
|
216
|
+
} = t, a = n === void 0 ? !0 : n;
|
|
215
217
|
let m;
|
|
216
|
-
e[0] !== o || e[1] !==
|
|
218
|
+
e[0] !== o || e[1] !== d ? (m = d ? () => d({
|
|
217
219
|
name: o
|
|
218
|
-
}) : void 0, e[0] = o, e[1] =
|
|
219
|
-
const
|
|
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;
|
|
220
222
|
let b;
|
|
221
|
-
e[3] !==
|
|
223
|
+
e[3] !== s || e[4] !== o ? (b = s ? s(o) : o, e[3] = s, e[4] = o, e[5] = b) : b = e[5];
|
|
224
|
+
let x;
|
|
225
|
+
e[6] !== b ? (x = /* @__PURE__ */ h(D, { sx: u.rowLabel, children: b }), e[6] = b, e[7] = x) : x = e[7];
|
|
222
226
|
let f;
|
|
223
|
-
e[
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
/* @__PURE__ */ h(_, { sx: u.multiBarValue, children: s(v) })
|
|
230
|
-
] }, `${o}-${v}-${S}`), e[15] = d, e[16] = s, e[17] = r, e[18] = o, e[19] = c, e[20] = x) : x = e[20], g = l.map(x), e[8] = d, e[9] = s, e[10] = r, e[11] = o, e[12] = c, e[13] = l, e[14] = g;
|
|
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;
|
|
231
233
|
} else
|
|
232
|
-
|
|
233
|
-
let
|
|
234
|
-
e[21] !==
|
|
235
|
-
let
|
|
236
|
-
return e[23] !==
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
] }), e[23] =
|
|
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
|
+
function re(t) {
|
|
244
|
+
const e = M(10), {
|
|
243
245
|
hiddenCount: o,
|
|
244
246
|
otherLabel: l,
|
|
245
247
|
otherCountLabel: r
|
|
246
|
-
} = t,
|
|
247
|
-
let
|
|
248
|
-
e[0] !== o || e[1] !==
|
|
249
|
-
const
|
|
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;
|
|
250
252
|
let n;
|
|
251
|
-
e[3] !==
|
|
252
|
-
let
|
|
253
|
-
e[5] !==
|
|
253
|
+
e[3] !== c ? (n = /* @__PURE__ */ h(D, { sx: u.otherLabel, children: c }), e[3] = c, e[4] = n) : n = e[4];
|
|
254
|
+
let a;
|
|
255
|
+
e[5] !== d ? (a = /* @__PURE__ */ S(D, { sx: u.otherCount, children: [
|
|
254
256
|
"(",
|
|
255
|
-
|
|
257
|
+
d,
|
|
256
258
|
")"
|
|
257
|
-
] }), e[5] =
|
|
259
|
+
] }), e[5] = d, e[6] = a) : a = e[6];
|
|
258
260
|
let m;
|
|
259
|
-
return e[7] !== n || e[8] !==
|
|
261
|
+
return e[7] !== n || e[8] !== a ? (m = /* @__PURE__ */ S(C, { sx: u.otherRow, children: [
|
|
260
262
|
n,
|
|
261
|
-
|
|
262
|
-
] }), e[7] = n, e[8] =
|
|
263
|
+
a
|
|
264
|
+
] }), e[7] = n, e[8] = a, e[9] = m) : m = e[9], m;
|
|
263
265
|
}
|
|
264
|
-
function
|
|
265
|
-
const e =
|
|
266
|
+
function le(t) {
|
|
267
|
+
const e = M(7), {
|
|
266
268
|
series: o,
|
|
267
269
|
colors: l
|
|
268
270
|
} = t;
|
|
@@ -270,80 +272,82 @@ function te(t) {
|
|
|
270
272
|
return null;
|
|
271
273
|
let r;
|
|
272
274
|
if (e[0] !== l || e[1] !== o) {
|
|
273
|
-
let
|
|
274
|
-
e[3] !== l ? (
|
|
275
|
-
/* @__PURE__ */ h(
|
|
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__ */ h(
|
|
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
284
|
r = e[2];
|
|
283
|
-
let
|
|
284
|
-
return e[5] !== r ? (
|
|
285
|
+
let c;
|
|
286
|
+
return e[5] !== r ? (c = /* @__PURE__ */ h(C, { sx: u.legend, children: r }), e[5] = r, e[6] = c) : c = e[6], c;
|
|
285
287
|
}
|
|
286
|
-
function
|
|
287
|
-
const e =
|
|
288
|
+
function Le(t) {
|
|
289
|
+
const e = M(43), {
|
|
288
290
|
id: o
|
|
289
|
-
} = t,
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
} = t, {
|
|
292
|
+
ref: l
|
|
293
|
+
} = ee(o), r = K(), {
|
|
294
|
+
_formatter: c,
|
|
295
|
+
_labelFormatter: i,
|
|
292
296
|
_series: s,
|
|
293
|
-
data:
|
|
294
|
-
maxItems:
|
|
295
|
-
labels:
|
|
296
|
-
onRowClick:
|
|
297
|
-
selected:
|
|
298
|
-
max:
|
|
299
|
-
} =
|
|
300
|
-
let
|
|
301
|
-
if (e[0] !== p || e[1] !==
|
|
302
|
-
|
|
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");
|
|
303
307
|
e: {
|
|
304
|
-
const
|
|
305
|
-
data:
|
|
308
|
+
const _ = ie({
|
|
309
|
+
data: d
|
|
306
310
|
});
|
|
307
|
-
if (
|
|
308
|
-
|
|
311
|
+
if (_.length === 0) {
|
|
312
|
+
W = null;
|
|
309
313
|
break e;
|
|
310
314
|
}
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
|
|
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 = {
|
|
315
319
|
...u.root
|
|
316
|
-
}, e[
|
|
317
|
-
const
|
|
318
|
-
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 = {
|
|
319
323
|
maxHeight: g,
|
|
320
|
-
overflow:
|
|
321
|
-
}, e[
|
|
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));
|
|
322
326
|
}
|
|
323
|
-
e[0] = p, e[1] =
|
|
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;
|
|
324
328
|
} else
|
|
325
|
-
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
328
|
-
let B;
|
|
329
|
-
e[22] !== S || e[23] !== n?.other || e[24] !== n?.otherCount ? (B = S > 0 && /* @__PURE__ */ h(ee, { hiddenCount: S, otherLabel: n?.other, otherCountLabel: n?.otherCount }), e[22] = S, e[23] = n?.other, e[24] = n?.otherCount, e[25] = B) : B = e[25];
|
|
330
|
-
let W;
|
|
331
|
-
e[26] !== x || e[27] !== M || e[28] !== F || e[29] !== T || e[30] !== B ? (W = /* @__PURE__ */ $(x, { sx: M, style: F, children: [
|
|
332
|
-
T,
|
|
333
|
-
B
|
|
334
|
-
] }), e[26] = x, e[27] = M, e[28] = F, e[29] = T, e[30] = B, e[31] = W) : W = e[31];
|
|
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;
|
|
335
332
|
let j;
|
|
336
|
-
e[
|
|
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];
|
|
337
334
|
let A;
|
|
338
|
-
|
|
339
|
-
|
|
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,
|
|
340
337
|
j
|
|
341
|
-
] }), e[
|
|
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;
|
|
342
346
|
}
|
|
343
|
-
function
|
|
347
|
+
function ne(t) {
|
|
344
348
|
return t.values;
|
|
345
349
|
}
|
|
346
|
-
function
|
|
350
|
+
function ae(t) {
|
|
347
351
|
const e = t;
|
|
348
352
|
return {
|
|
349
353
|
_formatter: e?.formatter,
|
|
@@ -357,16 +361,16 @@ function re(t) {
|
|
|
357
361
|
max: e?.max
|
|
358
362
|
};
|
|
359
363
|
}
|
|
360
|
-
function
|
|
364
|
+
function ie({
|
|
361
365
|
data: t
|
|
362
366
|
}) {
|
|
363
367
|
if (!t || t.length === 0) return [];
|
|
364
368
|
const e = Math.max(t.length, 1), o = /* @__PURE__ */ new Map(), l = [];
|
|
365
369
|
for (let r = 0; r < t.length; r++) {
|
|
366
|
-
const
|
|
367
|
-
for (const
|
|
368
|
-
let
|
|
369
|
-
|
|
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;
|
|
370
374
|
}
|
|
371
375
|
}
|
|
372
376
|
return l.map((r) => ({
|
|
@@ -374,54 +378,54 @@ function le({
|
|
|
374
378
|
values: o.get(r)
|
|
375
379
|
}));
|
|
376
380
|
}
|
|
377
|
-
const
|
|
378
|
-
function
|
|
379
|
-
const t =
|
|
381
|
+
const se = [85, 70, 55, 75, 60];
|
|
382
|
+
function Re() {
|
|
383
|
+
const t = M(1);
|
|
380
384
|
let e;
|
|
381
|
-
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ h(
|
|
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({
|
|
382
386
|
length: 5
|
|
383
|
-
}).map(
|
|
387
|
+
}).map(ce) }), t[0] = e) : e = t[0], e;
|
|
384
388
|
}
|
|
385
|
-
function
|
|
386
|
-
return /* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */ h(
|
|
389
|
-
/* @__PURE__ */ h(
|
|
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 })
|
|
390
394
|
] }),
|
|
391
|
-
/* @__PURE__ */ h(
|
|
395
|
+
/* @__PURE__ */ h(P, { variant: "rectangular", height: 4, sx: {
|
|
392
396
|
borderRadius: 2,
|
|
393
|
-
width: `${
|
|
397
|
+
width: `${se[e]}%`
|
|
394
398
|
} })
|
|
395
399
|
] }, e);
|
|
396
400
|
}
|
|
397
|
-
function
|
|
401
|
+
function Fe({
|
|
398
402
|
refUI: t,
|
|
399
403
|
series: e
|
|
400
404
|
}) {
|
|
401
405
|
return [{
|
|
402
|
-
...
|
|
403
|
-
modifier: () =>
|
|
406
|
+
...U,
|
|
407
|
+
modifier: () => U.modifier(t)
|
|
404
408
|
}, {
|
|
405
|
-
...
|
|
409
|
+
...N,
|
|
406
410
|
modifier: async (o) => {
|
|
407
411
|
if (!o?.length || o[0]?.length === 0)
|
|
408
|
-
return
|
|
409
|
-
const l = o.length, r = /* @__PURE__ */ new Map(),
|
|
412
|
+
return N.modifier([]);
|
|
413
|
+
const l = o.length, r = /* @__PURE__ */ new Map(), c = [];
|
|
410
414
|
for (let n = 0; n < l; n++) {
|
|
411
|
-
const
|
|
412
|
-
for (const m of
|
|
413
|
-
let
|
|
414
|
-
|
|
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;
|
|
415
419
|
}
|
|
416
420
|
}
|
|
417
|
-
const
|
|
421
|
+
const i = c.map((n) => [n, ...r.get(n)]), d = l > 1 ? ["Category", ...e?.map((n) => n.name) ?? Array.from({
|
|
418
422
|
length: l
|
|
419
|
-
}, (n,
|
|
420
|
-
return
|
|
423
|
+
}, (n, a) => `Series ${a + 1}`)] : ["Category", "Value"];
|
|
424
|
+
return N.modifier([d, ...i]);
|
|
421
425
|
}
|
|
422
426
|
}];
|
|
423
427
|
}
|
|
424
|
-
function
|
|
428
|
+
function Ie() {
|
|
425
429
|
return {
|
|
426
430
|
series: [],
|
|
427
431
|
maxItems: 10,
|
|
@@ -429,14 +433,14 @@ function $e() {
|
|
|
429
433
|
};
|
|
430
434
|
}
|
|
431
435
|
export {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
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
|
|
441
445
|
};
|
|
442
446
|
//# sourceMappingURL=category.js.map
|