@carto/ps-react-ui 4.17.3 → 4.18.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.
Files changed (74) hide show
  1. package/dist/category-Ct2BzADB.js +753 -0
  2. package/dist/category-Ct2BzADB.js.map +1 -0
  3. package/dist/change-column-Bhcxmp-r.js +1148 -0
  4. package/dist/change-column-Bhcxmp-r.js.map +1 -0
  5. package/dist/echart-B10dhEaM.js +262 -0
  6. package/dist/echart-B10dhEaM.js.map +1 -0
  7. package/dist/types/widgets-v2/actions/lock-selection/lock-selection.d.ts +15 -5
  8. package/dist/types/widgets-v2/category/components/category-legend.d.ts +18 -2
  9. package/dist/types/widgets-v2/category/components/category-row-stacked.d.ts +6 -1
  10. package/dist/types/widgets-v2/category/style.d.ts +8 -0
  11. package/dist/types/widgets-v2/echart/use-chart-selection.d.ts +10 -4
  12. package/dist/types/widgets-v2/histogram/index.d.ts +1 -1
  13. package/dist/types/widgets-v2/histogram/transforms.d.ts +11 -0
  14. package/dist/types/widgets-v2/histogram/types.d.ts +9 -0
  15. package/dist/types/widgets-v2/scatterplot/index.d.ts +1 -1
  16. package/dist/types/widgets-v2/scatterplot/transforms.d.ts +9 -0
  17. package/dist/types/widgets-v2/table/index.d.ts +1 -0
  18. package/dist/types/widgets-v2/table/transforms.d.ts +13 -0
  19. package/dist/types/widgets-v2/table/transforms.test.d.ts +1 -0
  20. package/dist/types/widgets-v2/timeseries/index.d.ts +1 -0
  21. package/dist/types/widgets-v2/timeseries/transforms.d.ts +10 -0
  22. package/dist/types/widgets-v2/timeseries/transforms.test.d.ts +1 -0
  23. package/dist/widgets-v2/actions.js +1 -1
  24. package/dist/widgets-v2/category.js +1 -1
  25. package/dist/widgets-v2/echart.js +1 -1
  26. package/dist/widgets-v2/echart.js.map +1 -1
  27. package/dist/widgets-v2/histogram.js +181 -158
  28. package/dist/widgets-v2/histogram.js.map +1 -1
  29. package/dist/widgets-v2/pie.js +155 -116
  30. package/dist/widgets-v2/pie.js.map +1 -1
  31. package/dist/widgets-v2/scatterplot.js +91 -85
  32. package/dist/widgets-v2/scatterplot.js.map +1 -1
  33. package/dist/widgets-v2/table.js +55 -45
  34. package/dist/widgets-v2/table.js.map +1 -1
  35. package/dist/widgets-v2/timeseries.js +96 -85
  36. package/dist/widgets-v2/timeseries.js.map +1 -1
  37. package/dist/widgets-v2.js +4 -4
  38. package/package.json +1 -1
  39. package/src/widgets-v2/actions/lock-selection/lock-selection.test.tsx +62 -0
  40. package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +45 -13
  41. package/src/widgets-v2/category/category-ui.test.tsx +55 -0
  42. package/src/widgets-v2/category/category-ui.tsx +65 -6
  43. package/src/widgets-v2/category/components/category-legend.test.tsx +53 -2
  44. package/src/widgets-v2/category/components/category-legend.tsx +55 -12
  45. package/src/widgets-v2/category/components/category-row-stacked.test.tsx +7 -3
  46. package/src/widgets-v2/category/components/category-row-stacked.tsx +8 -3
  47. package/src/widgets-v2/category/style.ts +10 -2
  48. package/src/widgets-v2/echart/echart-ui.test.tsx +25 -0
  49. package/src/widgets-v2/echart/echart-ui.tsx +20 -0
  50. package/src/widgets-v2/echart/use-chart-selection.test.tsx +3 -1
  51. package/src/widgets-v2/echart/use-chart-selection.ts +10 -4
  52. package/src/widgets-v2/histogram/index.ts +4 -1
  53. package/src/widgets-v2/histogram/options.test.ts +86 -0
  54. package/src/widgets-v2/histogram/options.ts +50 -0
  55. package/src/widgets-v2/histogram/transforms.test.ts +36 -1
  56. package/src/widgets-v2/histogram/transforms.ts +23 -0
  57. package/src/widgets-v2/histogram/types.ts +9 -0
  58. package/src/widgets-v2/pie/options.test.ts +262 -0
  59. package/src/widgets-v2/pie/options.ts +80 -5
  60. package/src/widgets-v2/scatterplot/index.ts +4 -1
  61. package/src/widgets-v2/scatterplot/transforms.test.ts +38 -1
  62. package/src/widgets-v2/scatterplot/transforms.ts +23 -0
  63. package/src/widgets-v2/table/index.ts +1 -0
  64. package/src/widgets-v2/table/transforms.test.ts +40 -0
  65. package/src/widgets-v2/table/transforms.ts +26 -0
  66. package/src/widgets-v2/timeseries/index.ts +1 -0
  67. package/src/widgets-v2/timeseries/transforms.test.ts +49 -0
  68. package/src/widgets-v2/timeseries/transforms.ts +31 -0
  69. package/dist/category-CGS_eHr4.js +0 -719
  70. package/dist/category-CGS_eHr4.js.map +0 -1
  71. package/dist/change-column-CiVAjOUB.js +0 -1143
  72. package/dist/change-column-CiVAjOUB.js.map +0 -1
  73. package/dist/echart-Bdvbfx9s.js +0 -250
  74. package/dist/echart-Bdvbfx9s.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import * as N from "echarts";
2
- import { g as O, d as D, i as P, c as $, f as T, n as F } from "../option-builders-DPeoyQaM.js";
3
- import { jsx as x, jsxs as A } from "react/jsx-runtime";
4
- import { c as z } from "react/compiler-runtime";
5
- import { Skeleton as I, Box as w } from "@mui/material";
1
+ import * as _ from "echarts";
2
+ import { g as E, d as $, i as P, c as z, f as M, n as N } from "../option-builders-DPeoyQaM.js";
3
+ import { jsx as x, jsxs as j } from "react/jsx-runtime";
4
+ import { c as H } from "react/compiler-runtime";
5
+ import { Skeleton as L, Box as I } from "@mui/material";
6
6
  import "../widget-store-Bw5zRUGg.js";
7
7
  import "zustand/shallow";
8
8
  import "@mui/icons-material";
@@ -15,23 +15,23 @@ import "@dnd-kit/core";
15
15
  import "@dnd-kit/sortable";
16
16
  import "@dnd-kit/utilities";
17
17
  import "react-dom";
18
- import { m as E, r as M } from "../resolve-theme-color-BdojIw0K.js";
18
+ import { m as V, r as B } from "../resolve-theme-color-BdojIw0K.js";
19
19
  import "../widget-context-DTGO0Yta.js";
20
20
  import "zustand";
21
21
  import "zustand/vanilla";
22
22
  import "zustand/middleware";
23
23
  import "zustand/react/shallow";
24
- import { b as V } from "../png-item-9dNbB37T.js";
25
- import { b as B } from "../csv-item-hH_Gt7ur.js";
26
- const R = ["58%", "74%"];
27
- function H({
24
+ import { b as R } from "../png-item-9dNbB37T.js";
25
+ import { b as W } from "../csv-item-hH_Gt7ur.js";
26
+ const G = ["58%", "74%"];
27
+ function U({
28
28
  theme: e,
29
29
  formatter: r,
30
30
  labelFormatter: t
31
31
  }) {
32
32
  return {
33
33
  legend: {
34
- ...D({
34
+ ...$({
35
35
  hasLegend: !0,
36
36
  labelFormatter: t
37
37
  }),
@@ -44,7 +44,14 @@ function H({
44
44
  // 3–6 category case.
45
45
  left: "center",
46
46
  type: "scroll",
47
- itemGap: 16
47
+ itemGap: 16,
48
+ // The legend is presentational only here — the pie has its own
49
+ // click-to-select affordance on the slices themselves, so legend
50
+ // clicks toggling series visibility would be a second, redundant/
51
+ // conflicting interaction model. Hover-highlight is disabled per
52
+ // series via `legendHoverLink` (ECharts has no legend-level knob
53
+ // for it).
54
+ selectedMode: !1
48
55
  },
49
56
  tooltip: {
50
57
  // Pie uses item-trigger (no axis); the rest of the styling mirrors
@@ -60,8 +67,8 @@ function H({
60
67
  fontSize: 11,
61
68
  fontFamily: e.typography.caption.fontFamily
62
69
  },
63
- position: O(e),
64
- formatter: _(r, t)
70
+ position: E(e),
71
+ formatter: D(r, t)
65
72
  },
66
73
  // V1 used `qualitative.bold` only (no `secondary.main` prefix) because
67
74
  // pie slices are categorical — each slice deserves a distinct palette
@@ -75,6 +82,7 @@ function H({
75
82
  colorBy: "data",
76
83
  avoidLabelOverlap: !0,
77
84
  selectedOffset: 0,
85
+ legendHoverLink: !1,
78
86
  emphasis: {
79
87
  disabled: !0
80
88
  },
@@ -101,59 +109,66 @@ function H({
101
109
  }]
102
110
  };
103
111
  }
104
- function ve(e) {
112
+ function we(e) {
105
113
  const {
106
114
  theme: r,
107
115
  formatter: t,
108
116
  labelFormatter: a,
109
117
  optionsOverride: o,
110
118
  series: n
111
- } = e, c = e.radius ?? R, u = e.selection, g = u && u.length > 0 ? new Set(u) : null;
112
- return (d, f, b) => {
119
+ } = e, u = e.radius ?? G, c = e.selection, y = c == null || c.length === 0 ? null : new Set(c);
120
+ return (d, p, b) => {
113
121
  if (d == null) {
114
- const h = H({
122
+ const h = U({
115
123
  theme: r,
116
124
  formatter: t,
117
125
  labelFormatter: a
118
126
  });
119
- return o ? E(h, o) : h;
127
+ return o ? V(h, o) : h;
120
128
  }
121
- const p = Array.isArray(f) ? f : [];
122
- return p.length === 0 ? {
129
+ const g = Array.isArray(p) ? p : [];
130
+ return g.length === 0 ? {
123
131
  ...d,
124
132
  dataset: [],
125
133
  series: []
126
- } : p.length > 1 ? G(d, p, r, n, b, g) : W(d, p, c, n, b, g);
134
+ } : g.length > 1 ? q(d, g, r, n, b, y) : Z(d, g, u, n, b, y);
127
135
  };
128
136
  }
129
- function W(e, r, t, a, o, n) {
130
- const c = Array.isArray(e.series) ? e.series : [], u = c[0] ?? {}, g = typeof e.tooltip == "object" && !Array.isArray(e.tooltip) ? e.tooltip : {}, d = typeof e.legend == "object" && !Array.isArray(e.legend) ? e.legend : {}, f = o?.formatter, b = o?.labelFormatter, p = Array.isArray(e.color) ? e.color : [], h = (i) => (p.length > 0 ? p[i.dataIndex % p.length] : void 0) ?? i.color, C = (i) => {
131
- const l = h(i);
132
- if (!n) return l;
133
- const m = i.value?.name ?? i.name;
134
- return m != null && n.has(m) ? l : N.color.modifyAlpha(l, 0.15);
135
- }, s = (i) => {
137
+ function Z(e, r, t, a, o, n) {
138
+ const u = Array.isArray(e.series) ? e.series : [], c = u[0] ?? {}, y = typeof e.tooltip == "object" && !Array.isArray(e.tooltip) ? e.tooltip : {}, d = typeof e.legend == "object" && !Array.isArray(e.legend) ? e.legend : {}, p = o?.formatter, b = o?.labelFormatter, g = Array.isArray(e.color) ? e.color : [], h = (i) => (g.length > 0 ? g[i.dataIndex % g.length] : void 0) ?? i.color, k = (i) => {
139
+ const s = h(i);
140
+ if (!n) return s;
141
+ const f = i.value?.name ?? i.name;
142
+ return f != null && n.has(f) ? s : _.color.modifyAlpha(s, 0.15);
143
+ }, l = r[0] ?? [];
144
+ let m, S = -1 / 0;
145
+ for (const i of l)
146
+ n && !n.has(i.name) || typeof i.value == "number" && i.value > S && (S = i.value, m = i.name);
147
+ const A = (i) => {
136
148
  const {
137
- name: l
138
- } = i, y = i.encode?.value?.[0];
139
- if (y === void 0) return "";
140
- const m = Object.values(i.data ?? {}).at(y), S = typeof m == "number" ? f ? f(m) : String(m) : typeof m == "string" ? m : "", j = String(b ? b(l ?? "") : l ?? "");
141
- return `{c|${S}}
149
+ name: s
150
+ } = i;
151
+ if (s == null || s !== m) return "";
152
+ const w = i.encode?.value?.[0];
153
+ if (w === void 0) return "";
154
+ const f = Object.values(i.data ?? {}).at(w), C = typeof f == "number" ? p ? p(f) : String(f) : typeof f == "string" ? f : "", F = String(b ? b(s ?? "") : s ?? "");
155
+ return `{c|${C}}
142
156
 
143
- {b|${j}}`;
157
+ {b|${F}}`;
144
158
  };
145
159
  return {
146
160
  ...e,
147
161
  dataset: r.map((i) => ({
148
162
  source: i
149
163
  })),
150
- series: r.map((i, l) => {
151
- const y = c[l] ?? u, m = typeof y == "object" ? y : {}, S = m.label ?? {}, j = m.itemStyle ?? {};
164
+ series: r.map((i, s) => {
165
+ const w = u[s] ?? c, f = typeof w == "object" ? w : {}, C = f.label ?? {}, F = f.itemStyle ?? {};
152
166
  return {
153
- ...m,
167
+ ...f,
154
168
  type: "pie",
155
- datasetIndex: l,
156
- name: a?.[l]?.name ?? `Series ${l + 1}`,
169
+ legendHoverLink: !1,
170
+ datasetIndex: s,
171
+ name: a?.[s]?.name ?? `Series ${s + 1}`,
157
172
  radius: [...t],
158
173
  // Lift the donut up so the bottom-anchored legend has the
159
174
  // vertical real estate to wrap to multiple rows for long
@@ -166,67 +181,83 @@ function W(e, r, t, a, o, n) {
166
181
  value: "value"
167
182
  },
168
183
  label: {
169
- ...S,
170
- formatter: s
184
+ ...C,
185
+ formatter: A
171
186
  },
172
187
  itemStyle: {
173
- ...j,
174
- color: C
188
+ ...F,
189
+ color: k
175
190
  }
176
191
  };
177
192
  }),
178
193
  // Legend always shows for pie (mirrors v1) — slice names drive the
179
194
  // entries, so even a single donut benefits from a category list.
195
+ //
196
+ // Exclusion is conveyed purely via `colorFn`/`labelTextFormatter`
197
+ // dimming above, never via the legend's `selected` map: for a pie
198
+ // series, ECharts treats `legend.selected[name] = false` as "remove
199
+ // this data point," which recomputes every remaining slice's angle —
200
+ // the excluded slice disappears instead of rendering dimmed. Forcing
201
+ // every name to `true` on every render also overrides ECharts' own
202
+ // internal toggle state from a native legend click (which flips a
203
+ // name to `false` and hides it before our `legendselectchanged`
204
+ // handler gets a chance to react), so a legend click never leaves a
205
+ // slice structurally removed — only the color/label dimming reflects
206
+ // exclusion, and it stays in sync with the slice itself since both
207
+ // read `selectionSet` on the same render.
180
208
  legend: {
181
209
  ...d,
182
- show: !0
210
+ show: !0,
211
+ selectedMode: !1,
212
+ selected: Object.fromEntries((r[0] ?? []).map((i) => [String(i.name), !0]))
183
213
  },
184
214
  tooltip: {
185
- ...g,
186
- formatter: _(f, b)
215
+ ...y,
216
+ formatter: D(p, b)
187
217
  }
188
218
  };
189
219
  }
190
- function G(e, r, t, a, o, n) {
191
- const c = typeof e.tooltip == "object" && !Array.isArray(e.tooltip) ? e.tooltip : {}, u = typeof e.legend == "object" && !Array.isArray(e.legend) ? e.legend : {}, g = typeof e.grid == "object" && !Array.isArray(e.grid) ? e.grid : {}, d = o?.formatter, f = o?.labelFormatter, {
220
+ function q(e, r, t, a, o, n) {
221
+ const u = typeof e.tooltip == "object" && !Array.isArray(e.tooltip) ? e.tooltip : {}, c = typeof e.legend == "object" && !Array.isArray(e.legend) ? e.legend : {}, y = typeof e.grid == "object" && !Array.isArray(e.grid) ? e.grid : {}, d = o?.formatter, p = o?.labelFormatter, {
192
222
  niceMinVal: b,
193
- niceMaxVal: p
194
- } = Z(r), h = Array.isArray(e.color) ? e.color : [], C = (s) => {
195
- const i = s.seriesIndex ?? 0, y = (h.length > 0 ? h[i % h.length] : void 0) ?? s.color;
196
- if (!n) return y;
197
- const S = s.value?.name ?? s.name;
198
- return S != null && n.has(S) ? y : N.color.modifyAlpha(y, 0.15);
223
+ niceMaxVal: g
224
+ } = K(r), h = Array.isArray(e.color) ? e.color : [], k = (l) => {
225
+ const m = l.seriesIndex ?? 0, A = (h.length > 0 ? h[m % h.length] : void 0) ?? l.color;
226
+ if (!n) return A;
227
+ const s = l.value?.name ?? l.name;
228
+ return s != null && n.has(s) ? A : _.color.modifyAlpha(A, 0.15);
199
229
  };
200
230
  return {
201
231
  ...e,
202
- dataset: r.map((s) => ({
203
- source: s
232
+ dataset: r.map((l) => ({
233
+ source: l
204
234
  })),
205
235
  grid: {
206
- ...g,
207
- ...$(!0, t),
236
+ ...y,
237
+ ...z(!0, t),
208
238
  right: parseInt(t.spacing(4)),
209
239
  containLabel: !0
210
240
  },
211
241
  // Drop pie-specific structural keys that shouldn't render in the
212
242
  // bar fallback. ECharts ignores undefined keys, so this is a clean
213
243
  // override.
214
- series: r.map((s, i) => {
215
- const l = M(t, a?.[i]?.color);
244
+ series: r.map((l, m) => {
245
+ const S = B(t, a?.[m]?.color);
216
246
  return {
217
- datasetIndex: i,
247
+ datasetIndex: m,
218
248
  type: "bar",
219
- name: a?.[i]?.name ?? `Series ${i + 1}`,
249
+ name: a?.[m]?.name ?? `Series ${m + 1}`,
220
250
  barMaxWidth: 100,
251
+ legendHoverLink: !1,
221
252
  emphasis: {
222
253
  focus: "series"
223
254
  },
224
255
  ...P(d, "x"),
225
256
  itemStyle: {
226
- color: C
257
+ color: k
227
258
  },
228
- ...l ? {
229
- color: l
259
+ ...S ? {
260
+ color: S
230
261
  } : {}
231
262
  };
232
263
  }),
@@ -235,7 +266,7 @@ function G(e, r, t, a, o, n) {
235
266
  // Closures over the pre-computed nice bounds — ECharts calls them
236
267
  // once per render to resolve the axis extents.
237
268
  min: () => b,
238
- max: () => p,
269
+ max: () => g,
239
270
  axisLine: {
240
271
  show: !1
241
272
  },
@@ -262,7 +293,7 @@ function G(e, r, t, a, o, n) {
262
293
  margin: parseInt(t.spacing(1)),
263
294
  showMaxLabel: !0,
264
295
  showMinLabel: !0,
265
- formatter: (s) => s !== p && s !== b || s === 0 ? "" : d ? d(s) : String(s)
296
+ formatter: (l) => l !== g && l !== b || l === 0 ? "" : d ? d(l) : String(l)
266
297
  }
267
298
  },
268
299
  yAxis: {
@@ -275,55 +306,63 @@ function G(e, r, t, a, o, n) {
275
306
  },
276
307
  axisLabel: {
277
308
  padding: [parseInt(t.spacing(0.5)), 0, 0, 0],
278
- ...f && {
279
- formatter: (s) => String(f(s))
309
+ ...p && {
310
+ formatter: (l) => String(p(l))
280
311
  }
281
312
  }
282
313
  },
314
+ // Mirrors the donut branch's `selected` reset above — `selectedMode:
315
+ // false` blocks the native legend click that would otherwise undo an
316
+ // ECharts-internal toggle, so without forcing every entry back to
317
+ // `true` here a prior native toggle (from before `selectedMode` took
318
+ // effect, or a stale `keepAlive` instance) would stay hidden forever
319
+ // with no way to restore it.
283
320
  legend: {
284
- ...u,
285
- show: !0
321
+ ...c,
322
+ show: !0,
323
+ selectedMode: !1,
324
+ selected: Object.fromEntries(r.map((l, m) => [a?.[m]?.name ?? `Series ${m + 1}`, !0]))
286
325
  },
287
326
  tooltip: {
288
- ...c,
327
+ ...u,
289
328
  trigger: "axis",
290
- formatter: U(d, f)
329
+ formatter: J(d, p)
291
330
  }
292
331
  };
293
332
  }
294
- function U(e, r) {
295
- return T((t) => {
296
- const a = t.encode?.x?.at(0), o = a !== void 0 ? t.dimensionNames?.[a] : void 0, n = t.value && typeof t.value == "object" && !Array.isArray(t.value) ? t.value : void 0, c = o && n ? n[o] : void 0, u = typeof c == "number" && e ? e(c) : c ?? "", g = typeof t.marker == "string" ? t.marker : "", d = t.seriesName ? `${t.seriesName}: ` : "";
333
+ function J(e, r) {
334
+ return M((t) => {
335
+ const a = t.encode?.x?.at(0), o = a !== void 0 ? t.dimensionNames?.[a] : void 0, n = t.value && typeof t.value == "object" && !Array.isArray(t.value) ? t.value : void 0, u = o && n ? n[o] : void 0, c = typeof u == "number" && e ? e(u) : u ?? "", y = typeof t.marker == "string" ? t.marker : "", d = t.seriesName ? `${t.seriesName}: ` : "";
297
336
  return {
298
337
  name: String(r ? r(t.name ?? "") : t.name ?? ""),
299
338
  seriesName: d,
300
- marker: g,
301
- value: u
339
+ marker: y,
340
+ value: c
302
341
  };
303
342
  });
304
343
  }
305
- function Z(e) {
344
+ function K(e) {
306
345
  let r = 0, t = -1 / 0;
307
346
  for (const a of e)
308
347
  for (const o of a)
309
348
  typeof o?.value != "number" || !Number.isFinite(o.value) || (o.value < r && (r = o.value), o.value > t && (t = o.value));
310
349
  return {
311
- niceMinVal: r < 0 ? F(r) : 0,
312
- niceMaxVal: t <= 0 ? 1 : F(t)
350
+ niceMinVal: r < 0 ? N(r) : 0,
351
+ niceMaxVal: t <= 0 ? 1 : N(t)
313
352
  };
314
353
  }
315
- function _(e, r) {
316
- return T((t) => {
317
- const a = t.encode?.value?.at(0) ?? 1, n = (t.value && typeof t.value == "object" && !Array.isArray(t.value) ? Object.values(t.value) : [])[a], c = typeof n == "number" && e ? e(n) : n ?? "", u = typeof t.marker == "string" ? t.marker : "", g = t.seriesName ? `${t.seriesName}: ` : "";
354
+ function D(e, r) {
355
+ return M((t) => {
356
+ const a = t.encode?.value?.at(0) ?? 1, n = (t.value && typeof t.value == "object" && !Array.isArray(t.value) ? Object.values(t.value) : [])[a], u = typeof n == "number" && e ? e(n) : n ?? "", c = typeof t.marker == "string" ? t.marker : "", y = t.seriesName ? `${t.seriesName}: ` : "";
318
357
  return {
319
358
  name: String(r ? r(t.name ?? "") : t.name ?? ""),
320
- seriesName: g,
321
- marker: u,
322
- value: c
359
+ seriesName: y,
360
+ marker: c,
361
+ value: u
323
362
  };
324
363
  });
325
364
  }
326
- const L = 160, k = 96, v = {
365
+ const O = 160, T = 96, v = {
327
366
  root: {
328
367
  display: "flex",
329
368
  flexDirection: "column",
@@ -342,14 +381,14 @@ const L = 160, k = 96, v = {
342
381
  justifyContent: "center"
343
382
  },
344
383
  ring: {
345
- width: L,
346
- height: L
384
+ width: O,
385
+ height: O
347
386
  },
348
387
  hole: {
349
388
  position: "absolute",
350
389
  zIndex: 1,
351
- width: k,
352
- height: k,
390
+ width: T,
391
+ height: T,
353
392
  borderRadius: "50%",
354
393
  bgcolor: "background.paper"
355
394
  },
@@ -379,55 +418,55 @@ const L = 160, k = 96, v = {
379
418
  }) => e(1.5)
380
419
  }
381
420
  };
382
- function xe(e) {
383
- const r = z(4);
421
+ function Ie(e) {
422
+ const r = H(4);
384
423
  let t, a;
385
- r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ x(I, { variant: "circular", sx: v.ring }), a = /* @__PURE__ */ x(w, { sx: v.hole }), r[0] = t, r[1] = a) : (t = r[0], a = r[1]);
424
+ r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ x(L, { variant: "circular", sx: v.ring }), a = /* @__PURE__ */ x(I, { sx: v.hole }), r[0] = t, r[1] = a) : (t = r[0], a = r[1]);
386
425
  let o;
387
- r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ A(w, { sx: v.donut, children: [
426
+ r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ j(I, { sx: v.donut, children: [
388
427
  t,
389
428
  a,
390
- /* @__PURE__ */ A(w, { sx: v.label, children: [
391
- /* @__PURE__ */ x(I, { width: 56, height: 18 }),
392
- /* @__PURE__ */ x(I, { width: 36, height: 8 })
429
+ /* @__PURE__ */ j(I, { sx: v.label, children: [
430
+ /* @__PURE__ */ x(L, { width: 56, height: 18 }),
431
+ /* @__PURE__ */ x(L, { width: 36, height: 8 })
393
432
  ] })
394
433
  ] }), r[2] = o) : o = r[2];
395
434
  let n;
396
- return r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ A(w, { sx: v.root, children: [
435
+ return r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ j(I, { sx: v.root, children: [
397
436
  o,
398
- /* @__PURE__ */ x(w, { sx: v.legend, children: [0, 1].map(q) })
437
+ /* @__PURE__ */ x(I, { sx: v.legend, children: [0, 1].map(Q) })
399
438
  ] }), r[3] = n) : n = r[3], n;
400
439
  }
401
- function q(e) {
402
- return /* @__PURE__ */ A(w, { sx: v.legendItem, children: [
403
- /* @__PURE__ */ x(I, { variant: "circular", width: 8, height: 8 }),
404
- /* @__PURE__ */ x(I, { width: 48, height: 8 })
440
+ function Q(e) {
441
+ return /* @__PURE__ */ j(I, { sx: v.legendItem, children: [
442
+ /* @__PURE__ */ x(L, { variant: "circular", width: 8, height: 8 }),
443
+ /* @__PURE__ */ x(L, { width: 48, height: 8 })
405
444
  ] }, `legend-${e}`);
406
445
  }
407
- function Se(e) {
446
+ function Ae(e) {
408
447
  const r = [];
409
- return e.getCaptureEl && r.push(V({
448
+ return e.getCaptureEl && r.push(R({
410
449
  filename: e.filename,
411
450
  getCaptureEl: e.getCaptureEl,
412
451
  pixelRatio: e.pngPixelRatio,
413
452
  backgroundColor: e.pngBackgroundColor
414
- })), r.push(B({
453
+ })), r.push(W({
415
454
  filename: e.filename,
416
455
  getRows: () => {
417
456
  const t = e.getData(), a = [["series", "name", "value"]];
418
457
  for (const [o, n] of t.entries()) {
419
- const c = e.seriesNames?.[o] ?? `series_${o + 1}`;
420
- for (const u of n)
421
- a.push([c, u.name, u.value]);
458
+ const u = e.seriesNames?.[o] ?? `series_${o + 1}`;
459
+ for (const c of n)
460
+ a.push([u, c.name, c.value]);
422
461
  }
423
462
  return a;
424
463
  }
425
464
  })), r;
426
465
  }
427
466
  export {
428
- xe as PieSkeleton,
429
- Se as createPieDownloadConfig,
430
- ve as createPieOptionFactory,
431
- H as pieOptions
467
+ Ie as PieSkeleton,
468
+ Ae as createPieDownloadConfig,
469
+ we as createPieOptionFactory,
470
+ U as pieOptions
432
471
  };
433
472
  //# sourceMappingURL=pie.js.map