@carto/ps-react-ui 4.6.1 → 4.6.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.
Files changed (35) hide show
  1. package/dist/options-CthfUJDz.js +46 -0
  2. package/dist/options-CthfUJDz.js.map +1 -0
  3. package/dist/styles-BYTyKQFP.js +142 -0
  4. package/dist/{styles-Y8q7Jff3.js.map → styles-BYTyKQFP.js.map} +1 -1
  5. package/dist/types/widgets/utils/chart-config/index.d.ts +1 -1
  6. package/dist/types/widgets/utils/chart-config/option-builders.d.ts +27 -0
  7. package/dist/widgets/actions.js +125 -120
  8. package/dist/widgets/actions.js.map +1 -1
  9. package/dist/widgets/bar.js +34 -30
  10. package/dist/widgets/bar.js.map +1 -1
  11. package/dist/widgets/echart.js +1 -1
  12. package/dist/widgets/histogram.js +64 -61
  13. package/dist/widgets/histogram.js.map +1 -1
  14. package/dist/widgets/pie.js +37 -36
  15. package/dist/widgets/pie.js.map +1 -1
  16. package/dist/widgets/scatterplot.js +30 -29
  17. package/dist/widgets/scatterplot.js.map +1 -1
  18. package/dist/widgets/timeseries.js +34 -33
  19. package/dist/widgets/timeseries.js.map +1 -1
  20. package/dist/widgets/utils.js +1 -1
  21. package/package.json +1 -1
  22. package/src/widgets/actions/relative-data/relative-data.test.tsx +23 -0
  23. package/src/widgets/actions/relative-data/relative-data.tsx +11 -2
  24. package/src/widgets/bar/config.ts +5 -0
  25. package/src/widgets/echart/options.ts +1 -4
  26. package/src/widgets/histogram/config.ts +9 -4
  27. package/src/widgets/pie/config.ts +2 -0
  28. package/src/widgets/scatterplot/config.ts +2 -0
  29. package/src/widgets/timeseries/config.ts +2 -0
  30. package/src/widgets/utils/chart-config/index.ts +2 -0
  31. package/src/widgets/utils/chart-config/option-builders.test.ts +105 -1
  32. package/src/widgets/utils/chart-config/option-builders.ts +56 -0
  33. package/dist/options-D9wflre6.js +0 -49
  34. package/dist/options-D9wflre6.js.map +0 -1
  35. package/dist/styles-Y8q7Jff3.js +0 -118
@@ -1,6 +1,6 @@
1
1
  import { jsx as b, jsxs as ne, Fragment as he } from "react/jsx-runtime";
2
2
  import { c as U } from "react/compiler-runtime";
3
- import { IconButton as K, DialogContent as Ae, Dialog as Pe, Typography as We, DialogTitle as Be, CircularProgress as Re, MenuItem as xe, ListItemIcon as $e, ListItemText as Ee, Menu as Ce, useTheme as Fe, Box as ke, TextField as Me, InputAdornment as be, SvgIcon as Ge } from "@mui/material";
3
+ import { IconButton as K, DialogContent as Ae, Dialog as We, Typography as Pe, DialogTitle as Be, CircularProgress as Re, MenuItem as xe, ListItemIcon as $e, ListItemText as Ee, Menu as Ce, useTheme as Fe, Box as ke, TextField as Me, InputAdornment as be, SvgIcon as Ge } from "@mui/material";
4
4
  import { w as g } from "../widget-store-Bw5zRUGg.js";
5
5
  import { u as Q } from "../use-widget-selector-DFl2hW0R.js";
6
6
  import { FullscreenOutlined as Ze, Close as Ve, FileDownloadOutlined as He, PercentOutlined as Ne, SubdirectoryArrowLeftOutlined as je, ZoomInOutlined as Ue, CheckBoxOutlined as Ke, SearchOutlined as Le, ClearOutlined as Ye, HighlightAltOutlined as qe } from "@mui/icons-material";
@@ -38,7 +38,7 @@ function tn(n) {
38
38
  Icon: m,
39
39
  IconButtonProps: S,
40
40
  DialogContentProps: _,
41
- DialogProps: y
41
+ DialogProps: T
42
42
  } = n, o = _ === void 0 ? ut : _;
43
43
  let l, r;
44
44
  e[0] !== o ? ({
@@ -50,9 +50,9 @@ function tn(n) {
50
50
  title: a
51
51
  } = Q(t, ft);
52
52
  let u;
53
- e[3] !== t ? (u = (P) => {
53
+ e[3] !== t ? (u = (W) => {
54
54
  g.setWidget(t, {
55
- isFullScreen: P.isFullScreen
55
+ isFullScreen: W.isFullScreen
56
56
  });
57
57
  }, e[3] = t, e[4] = u) : u = e[4];
58
58
  const i = u;
@@ -71,7 +71,7 @@ function tn(n) {
71
71
  }), e[13] = i, e[14] = k) : k = e[14];
72
72
  const A = `fullscreen-dialog-title-${t}`;
73
73
  let w;
74
- e[15] !== a ? (w = /* @__PURE__ */ b(We, { variant: "subtitle1", component: "span", children: a }), e[15] = a, e[16] = w) : w = e[16];
74
+ e[15] !== a ? (w = /* @__PURE__ */ b(Pe, { variant: "subtitle1", component: "span", children: a }), e[15] = a, e[16] = w) : w = e[16];
75
75
  let D;
76
76
  e[17] !== i ? (D = () => i({
77
77
  isFullScreen: !1
@@ -85,18 +85,18 @@ function tn(n) {
85
85
  w,
86
86
  E
87
87
  ] }), e[22] = A, e[23] = w, e[24] = E, e[25] = z) : z = e[25];
88
- let T;
89
- e[26] !== r ? (T = {
88
+ let y;
89
+ e[26] !== r ? (y = {
90
90
  ...ve.content,
91
91
  ...r
92
- }, e[26] = r, e[27] = T) : T = e[27];
92
+ }, e[26] = r, e[27] = y) : y = e[27];
93
93
  let h;
94
- e[28] !== l || e[29] !== p || e[30] !== T ? (h = /* @__PURE__ */ b(Ae, { sx: T, ...l, children: p }), e[28] = l, e[29] = p, e[30] = T, e[31] = h) : h = e[31];
94
+ e[28] !== l || e[29] !== p || e[30] !== y ? (h = /* @__PURE__ */ b(Ae, { sx: y, ...l, children: p }), e[28] = l, e[29] = p, e[30] = y, e[31] = h) : h = e[31];
95
95
  let I;
96
- e[32] !== y || e[33] !== z || e[34] !== h || e[35] !== O || e[36] !== C || e[37] !== k ? (I = /* @__PURE__ */ ne(Pe, { maxWidth: !1, open: O, keepMounted: !0, "aria-labelledby": C, ...y, onClose: k, children: [
96
+ e[32] !== T || e[33] !== z || e[34] !== h || e[35] !== O || e[36] !== C || e[37] !== k ? (I = /* @__PURE__ */ ne(We, { maxWidth: !1, open: O, keepMounted: !0, "aria-labelledby": C, ...T, onClose: k, children: [
97
97
  z,
98
98
  h
99
- ] }), e[32] = y, e[33] = z, e[34] = h, e[35] = O, e[36] = C, e[37] = k, e[38] = I) : I = e[38];
99
+ ] }), e[32] = T, e[33] = z, e[34] = h, e[35] = O, e[36] = C, e[37] = k, e[38] = I) : I = e[38];
100
100
  let L;
101
101
  return e[39] !== I || e[40] !== v ? (L = /* @__PURE__ */ ne(he, { children: [
102
102
  v,
@@ -118,29 +118,29 @@ function nn(n) {
118
118
  Icon: m,
119
119
  IconButtonProps: S
120
120
  } = n, _ = p === void 0 ? mt : p, {
121
- data: y
121
+ data: T
122
122
  } = Q(t, gt), [o, l] = ge(!1), [r, s] = ge(null);
123
123
  let a;
124
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (P) => {
125
- P.stopPropagation(), s(P.currentTarget);
124
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (W) => {
125
+ W.stopPropagation(), s(W.currentTarget);
126
126
  }, e[0] = a) : a = e[0];
127
127
  const u = a;
128
128
  let i;
129
- e[1] !== t ? (i = (P, W) => {
129
+ e[1] !== t ? (i = (W, P) => {
130
130
  const B = document.createElement("a");
131
- B.href = P, B.download = W.filename ?? t, B.style.display = "none", document.body.appendChild(B), B.click(), document.body.removeChild(B), W.callback?.(B.href);
131
+ B.href = W, B.download = P.filename ?? t, B.style.display = "none", document.body.appendChild(B), B.click(), document.body.removeChild(B), P.callback?.(B.href);
132
132
  }, e[1] = t, e[2] = i) : i = e[2];
133
133
  const c = i;
134
134
  let d;
135
- e[3] !== y || e[4] !== c ? (d = async (P, W) => {
136
- P.stopPropagation(), l(!0), s(null);
137
- const B = await W.modifier(y);
135
+ e[3] !== T || e[4] !== c ? (d = async (W, P) => {
136
+ W.stopPropagation(), l(!0), s(null);
137
+ const B = await P.modifier(T);
138
138
  if (!B) {
139
139
  l(!1);
140
140
  return;
141
141
  }
142
- c(B, W), l(!1);
143
- }, e[3] = y, e[4] = c, e[5] = d) : d = e[5];
142
+ c(B, P), l(!1);
143
+ }, e[3] = T, e[4] = c, e[5] = d) : d = e[5];
144
144
  const v = d, O = _.ariaLabel ?? "download options", C = o || f.length === 0, k = o || r ? "active" : "";
145
145
  let A;
146
146
  e[6] !== m || e[7] !== o ? (A = o ? /* @__PURE__ */ b(Re, { size: 18, color: "inherit" }) : m ?? /* @__PURE__ */ b(He, {}), e[6] = m, e[7] = o, e[8] = A) : A = e[8];
@@ -155,27 +155,27 @@ function nn(n) {
155
155
  horizontal: "right"
156
156
  }, e[15] = D, e[16] = x) : (D = e[15], x = e[16]);
157
157
  const E = !!r;
158
- let z, T;
159
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => s(null), T = {
158
+ let z, y;
159
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => s(null), y = {
160
160
  sx: {
161
161
  paddingBottom: 0
162
162
  }
163
- }, e[17] = z, e[18] = T) : (z = e[17], T = e[18]);
163
+ }, e[17] = z, e[18] = y) : (z = e[17], y = e[18]);
164
164
  let h;
165
165
  if (e[19] !== v || e[20] !== f) {
166
- let P;
167
- e[22] !== v ? (P = (W) => /* @__PURE__ */ ne(xe, { disabled: W.disabled, onClick: (B) => {
168
- v(B, W);
166
+ let W;
167
+ e[22] !== v ? (W = (P) => /* @__PURE__ */ ne(xe, { disabled: P.disabled, onClick: (B) => {
168
+ v(B, P);
169
169
  }, children: [
170
- W.icon && /* @__PURE__ */ b($e, { sx: {
170
+ P.icon && /* @__PURE__ */ b($e, { sx: {
171
171
  color: "text.primary"
172
- }, children: W.icon }),
173
- /* @__PURE__ */ b(Ee, { children: W.label })
174
- ] }, W.id), e[22] = v, e[23] = P) : P = e[23], h = f.map(P), e[19] = v, e[20] = f, e[21] = h;
172
+ }, children: P.icon }),
173
+ /* @__PURE__ */ b(Ee, { children: P.label })
174
+ ] }, P.id), e[22] = v, e[23] = W) : W = e[23], h = f.map(W), e[19] = v, e[20] = f, e[21] = h;
175
175
  } else
176
176
  h = e[21];
177
177
  let I;
178
- e[24] !== r || e[25] !== E || e[26] !== h ? (I = /* @__PURE__ */ b(Ce, { variant: "menu", elevation: 8, anchorOrigin: D, transformOrigin: x, anchorEl: r, open: E, onClose: z, MenuListProps: T, children: h }), e[24] = r, e[25] = E, e[26] = h, e[27] = I) : I = e[27];
178
+ e[24] !== r || e[25] !== E || e[26] !== h ? (I = /* @__PURE__ */ b(Ce, { variant: "menu", elevation: 8, anchorOrigin: D, transformOrigin: x, anchorEl: r, open: E, onClose: z, MenuListProps: y, children: h }), e[24] = r, e[25] = E, e[26] = h, e[27] = I) : I = e[27];
179
179
  let L;
180
180
  return e[28] !== I || e[29] !== w ? (L = /* @__PURE__ */ ne(he, { children: [
181
181
  w,
@@ -227,49 +227,54 @@ function on(n) {
227
227
  labels: m,
228
228
  Icon: S,
229
229
  IconButtonProps: _
230
- } = n, y = f === void 0 ? 10 : f, o = p === void 0 ? !1 : p, l = le(void 0);
230
+ } = n, T = f === void 0 ? 10 : f, o = p === void 0 ? !1 : p, l = le(void 0);
231
231
  let r;
232
- e[0] !== o ? (r = (T) => ({
233
- isRelative: T?.isRelative ?? o
232
+ e[0] !== o ? (r = (y) => ({
233
+ isRelative: y?.isRelative ?? o
234
234
  }), e[0] = o, e[1] = r) : r = e[1];
235
235
  const {
236
236
  isRelative: s
237
237
  } = Q(t, r);
238
238
  let a, u;
239
239
  e[2] !== o || e[3] !== t ? (a = () => {
240
- g.getWidget(t)?.isRelative === void 0 && g.setWidget(t, {
240
+ const y = g.getWidget(t);
241
+ y?.isRelative === void 0 && (o ? g.setWidget(t, {
242
+ isRelative: !0,
243
+ originalFormatter: y?.formatter,
244
+ originalMax: y?.max
245
+ }) : g.setWidget(t, {
241
246
  isRelative: o
242
- });
247
+ }));
243
248
  }, u = [t, o], e[2] = o, e[3] = t, e[4] = a, e[5] = u) : (a = e[4], u = e[5]), $(a, u);
244
249
  let i, c;
245
- e[6] !== o || e[7] !== t || e[8] !== y ? (i = () => (g.registerTool(t, {
250
+ e[6] !== o || e[7] !== t || e[8] !== T ? (i = () => (g.registerTool(t, {
246
251
  id: ce,
247
- order: y,
252
+ order: T,
248
253
  enabled: o,
249
254
  fn: pt
250
- }), () => g.unregisterTool(t, ce)), c = [t, y, o], e[6] = o, e[7] = t, e[8] = y, e[9] = i, e[10] = c) : (i = e[9], c = e[10]), $(i, c);
255
+ }), () => g.unregisterTool(t, ce)), c = [t, T, o], e[6] = o, e[7] = t, e[8] = T, e[9] = i, e[10] = c) : (i = e[9], c = e[10]), $(i, c);
251
256
  let d, v;
252
257
  e[11] !== t || e[12] !== s ? (d = () => {
253
258
  g.setToolEnabled(t, ce, s);
254
259
  }, v = [t, s], e[11] = t, e[12] = s, e[13] = d, e[14] = v) : (d = e[13], v = e[14]), $(d, v);
255
260
  let O;
256
- e[15] !== t || e[16] !== y ? (O = () => (g.registerTool(t, {
261
+ e[15] !== t || e[16] !== T ? (O = () => (g.registerTool(t, {
257
262
  id: Ie,
258
263
  type: "config",
259
- order: y,
264
+ order: T,
260
265
  enabled: !0,
261
- fn: (T) => {
262
- const h = T, I = g.getWidget(t), L = I?.sourceData != null && !(Array.isArray(I.sourceData) && I.sourceData.length === 0);
266
+ fn: (y) => {
267
+ const h = y, I = g.getWidget(t), L = I?.sourceData != null && !(Array.isArray(I.sourceData) && I.sourceData.length === 0);
263
268
  if (I?.isRelative) {
264
269
  if (!L)
265
270
  return h;
266
271
  if (!l.current) {
267
- const P = I?.locale;
268
- l.current = (W) => new Intl.NumberFormat(P, {
272
+ const W = I?.locale;
273
+ l.current = (P) => new Intl.NumberFormat(W, {
269
274
  style: "percent",
270
275
  minimumFractionDigits: 1,
271
276
  maximumFractionDigits: 1
272
- }).format(W / 100);
277
+ }).format(P / 100);
273
278
  }
274
279
  return {
275
280
  ...h,
@@ -284,18 +289,18 @@ function on(n) {
284
289
  } : h;
285
290
  }
286
291
  }), () => {
287
- const T = g.getWidget(t);
288
- T?.isRelative && "originalFormatter" in T && g.setWidget(t, {
289
- formatter: T.originalFormatter,
290
- max: T.originalMax
292
+ const y = g.getWidget(t);
293
+ y?.isRelative && "originalFormatter" in y && g.setWidget(t, {
294
+ formatter: y.originalFormatter,
295
+ max: y.originalMax
291
296
  }), l.current = void 0, g.unregisterTool(t, Ie);
292
- }), e[15] = t, e[16] = y, e[17] = O) : O = e[17];
297
+ }), e[15] = t, e[16] = T, e[17] = O) : O = e[17];
293
298
  let C;
294
- e[18] !== o || e[19] !== t || e[20] !== y ? (C = [t, y, o], e[18] = o, e[19] = t, e[20] = y, e[21] = C) : C = e[21], $(O, C);
299
+ e[18] !== o || e[19] !== t || e[20] !== T ? (C = [t, T, o], e[18] = o, e[19] = t, e[20] = T, e[21] = C) : C = e[21], $(O, C);
295
300
  let k;
296
301
  e[22] !== t || e[23] !== s ? (k = () => {
297
- const T = !s;
298
- if (l.current = void 0, T) {
302
+ const y = !s;
303
+ if (l.current = void 0, y) {
299
304
  const h = g.getWidget(t);
300
305
  g.setWidget(t, {
301
306
  isRelative: !0,
@@ -341,7 +346,7 @@ function ln(n) {
341
346
  defaultZoomEnd: m,
342
347
  labels: S,
343
348
  Icon: _,
344
- ResetIcon: y,
349
+ ResetIcon: T,
345
350
  IconButtonProps: o
346
351
  } = n, l = f === void 0 ? !1 : f, r = p === void 0 ? 0 : p, s = m === void 0 ? 100 : m, a = Fe();
347
352
  let u;
@@ -418,16 +423,16 @@ function ln(n) {
418
423
  }, e[28] = t, e[29] = E) : E = e[29];
419
424
  let z;
420
425
  e[30] !== t || e[31] !== d || e[32] !== c ? (z = [t, c, d], e[30] = t, e[31] = d, e[32] = c, e[33] = z) : z = e[33], $(E, z);
421
- let T;
422
- e[34] !== t || e[35] !== i || e[36] !== d || e[37] !== c ? (T = () => {
426
+ let y;
427
+ e[34] !== t || e[35] !== i || e[36] !== d || e[37] !== c ? (y = () => {
423
428
  const R = !i;
424
429
  g.setWidget(t, {
425
430
  zoom: R,
426
431
  zoomStart: R ? c : 0,
427
432
  zoomEnd: R ? d : 100
428
433
  });
429
- }, e[34] = t, e[35] = i, e[36] = d, e[37] = c, e[38] = T) : T = e[38];
430
- const h = T;
434
+ }, e[34] = t, e[35] = i, e[36] = d, e[37] = c, e[38] = y) : y = e[38];
435
+ const h = y;
431
436
  let I;
432
437
  e[39] !== s || e[40] !== r || e[41] !== t ? (I = () => {
433
438
  g.setWidget(t, {
@@ -436,7 +441,7 @@ function ln(n) {
436
441
  zoomEnd: s
437
442
  });
438
443
  }, e[39] = s, e[40] = r, e[41] = t, e[42] = I) : I = e[42];
439
- const L = I, P = S?.enable ?? "Enable zoom", W = S?.disable ?? "Disable zoom", B = S?.reset ?? "Reset zoom", H = i ? W : P, Z = S?.ariaLabel ?? H;
444
+ const L = I, W = S?.enable ?? "Enable zoom", P = S?.disable ?? "Disable zoom", B = S?.reset ?? "Reset zoom", H = i ? P : W, Z = S?.ariaLabel ?? H;
440
445
  let F;
441
446
  e[43] !== _ ? (F = _ ?? /* @__PURE__ */ b(Ue, {}), e[43] = _, e[44] = F) : F = e[44];
442
447
  let G;
@@ -444,7 +449,7 @@ function ln(n) {
444
449
  let V;
445
450
  e[51] !== G || e[52] !== H ? (V = /* @__PURE__ */ b(ee, { title: H, children: G }), e[51] = G, e[52] = H, e[53] = V) : V = e[53];
446
451
  let M;
447
- e[54] !== o || e[55] !== y || e[56] !== L || e[57] !== B || e[58] !== i ? (M = i && /* @__PURE__ */ b(ee, { title: B, children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: L, ...o, children: y ?? /* @__PURE__ */ b(je, {}) }) }), e[54] = o, e[55] = y, e[56] = L, e[57] = B, e[58] = i, e[59] = M) : M = e[59];
452
+ e[54] !== o || e[55] !== T || e[56] !== L || e[57] !== B || e[58] !== i ? (M = i && /* @__PURE__ */ b(ee, { title: B, children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: L, ...o, children: T ?? /* @__PURE__ */ b(je, {}) }) }), e[54] = o, e[55] = T, e[56] = L, e[57] = B, e[58] = i, e[59] = M) : M = e[59];
448
453
  let J;
449
454
  return e[60] !== V || e[61] !== M ? (J = /* @__PURE__ */ ne(ke, { sx: ye.container, children: [
450
455
  V,
@@ -464,34 +469,34 @@ function rn(n) {
464
469
  Icon: m,
465
470
  IconButtonProps: S
466
471
  } = n, _ = f === void 0 ? !1 : f, {
467
- storeIsStacked: y,
472
+ storeIsStacked: T,
468
473
  option: o
469
474
  } = Q(t, Tt);
470
475
  let l;
471
476
  e: {
472
477
  if (!o) {
473
- let W;
474
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {
478
+ let P;
479
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
475
480
  hasMultiSeries: !1,
476
481
  hasStackInSeries: !1
477
- }, e[0] = W) : W = e[0], l = W;
482
+ }, e[0] = P) : P = e[0], l = P;
478
483
  break e;
479
484
  }
480
- let T;
481
- e[1] !== o.series ? (T = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = T) : T = e[2];
482
- const h = T, I = h.length > 1;
485
+ let y;
486
+ e[1] !== o.series ? (y = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = y) : y = e[2];
487
+ const h = y, I = h.length > 1;
483
488
  let L;
484
489
  e[3] !== h ? (L = h.some(yt), e[3] = h, e[4] = L) : L = e[4];
485
- let P;
486
- e[5] !== I || e[6] !== L ? (P = {
490
+ let W;
491
+ e[5] !== I || e[6] !== L ? (W = {
487
492
  hasMultiSeries: I,
488
493
  hasStackInSeries: L
489
- }, e[5] = I, e[6] = L, e[7] = P) : P = e[7], l = P;
494
+ }, e[5] = I, e[6] = L, e[7] = W) : W = e[7], l = W;
490
495
  }
491
496
  const {
492
497
  hasMultiSeries: r,
493
498
  hasStackInSeries: s
494
- } = l, a = s || _, u = y ?? a;
499
+ } = l, a = s || _, u = T ?? a;
495
500
  let i, c;
496
501
  e[8] !== t ? (i = () => (g.registerTool(t, {
497
502
  id: ue,
@@ -505,11 +510,11 @@ function rn(n) {
505
510
  g.setToolEnabled(t, ue, u && r);
506
511
  }, v = [t, u, r], e[11] = r, e[12] = t, e[13] = u, e[14] = d, e[15] = v) : (d = e[14], v = e[15]), $(d, v);
507
512
  let O, C;
508
- e[16] !== a || e[17] !== t || e[18] !== y ? (O = () => {
509
- y === void 0 && g.setWidget(t, {
513
+ e[16] !== a || e[17] !== t || e[18] !== T ? (O = () => {
514
+ T === void 0 && g.setWidget(t, {
510
515
  isStacked: a
511
516
  });
512
- }, C = [a, t, y], e[16] = a, e[17] = t, e[18] = y, e[19] = O, e[20] = C) : (O = e[19], C = e[20]), $(O, C);
517
+ }, C = [a, t, T], e[16] = a, e[17] = t, e[18] = T, e[19] = O, e[20] = C) : (O = e[19], C = e[20]), $(O, C);
513
518
  let k;
514
519
  e[21] !== t || e[22] !== u ? (k = () => {
515
520
  g.setWidget(t, {
@@ -565,19 +570,19 @@ function sn(n) {
565
570
  labels: m,
566
571
  Icon: S,
567
572
  IconButtonProps: _
568
- } = n, y = p === void 0 ? 30 : p, {
573
+ } = n, T = p === void 0 ? 30 : p, {
569
574
  storeIsLocked: o
570
575
  } = Q(t, _t), l = o ?? !1;
571
576
  let r, s;
572
- e[0] !== t || e[1] !== y ? (r = () => (g.registerTool(t, {
577
+ e[0] !== t || e[1] !== T ? (r = () => (g.registerTool(t, {
573
578
  id: ie,
574
- order: y,
579
+ order: T,
575
580
  enabled: !1,
576
581
  fn: (A) => {
577
582
  const D = g.getWidget(t)?.lockedItems ?? [];
578
583
  return D.length === 0 ? A : xt(A, D);
579
584
  }
580
- }), () => g.unregisterTool(t, ie)), s = [t, y], e[0] = t, e[1] = y, e[2] = r, e[3] = s) : (r = e[2], s = e[3]), $(r, s);
585
+ }), () => g.unregisterTool(t, ie)), s = [t, T], e[0] = t, e[1] = T, e[2] = r, e[3] = s) : (r = e[2], s = e[3]), $(r, s);
581
586
  let a, u;
582
587
  e[4] !== t || e[5] !== l || e[6] !== f.length ? (a = () => {
583
588
  if (l && f.length === 0) {
@@ -630,8 +635,8 @@ function an(n) {
630
635
  labels: m,
631
636
  TextFieldProps: S,
632
637
  ClearIcon: _,
633
- debounceDelay: y
634
- } = n, o = p === void 0 ? 20 : p, l = y === void 0 ? Et : y, r = le(null), s = le(null), {
638
+ debounceDelay: T
639
+ } = n, o = p === void 0 ? 20 : p, l = T === void 0 ? Et : T, r = le(null), s = le(null), {
635
640
  enabled: a,
636
641
  searchText: u
637
642
  } = Q(t, Ct), i = le(a), c = f ?? kt;
@@ -668,10 +673,10 @@ function an(n) {
668
673
  e[14] !== a ? (E = () => {
669
674
  a && !i.current && r.current && r.current.focus(), i.current = a;
670
675
  }, x = [a], e[14] = a, e[15] = x, e[16] = E) : (x = e[15], E = e[16]), $(E, x);
671
- let z, T;
676
+ let z, y;
672
677
  e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = () => () => {
673
678
  s.current && clearTimeout(s.current);
674
- }, T = [], e[17] = z, e[18] = T) : (z = e[17], T = e[18]), $(z, T);
679
+ }, y = [], e[17] = z, e[18] = y) : (z = e[17], y = e[18]), $(z, y);
675
680
  let h;
676
681
  e[19] !== D || e[20] !== v ? (h = (V) => {
677
682
  const M = V.target.value;
@@ -682,21 +687,21 @@ function an(n) {
682
687
  e[22] !== t || e[23] !== v ? (L = () => {
683
688
  v(""), g.triggerToolPipeline(t), r.current && r.current.focus();
684
689
  }, e[22] = t, e[23] = v, e[24] = L) : L = e[24];
685
- const P = L;
690
+ const W = L;
686
691
  if (!a)
687
692
  return null;
688
- const W = m?.placeholder ?? "Search...", B = m?.clearAriaLabel ?? "Clear search";
693
+ const P = m?.placeholder ?? "Search...", B = m?.clearAriaLabel ?? "Clear search";
689
694
  let H;
690
695
  e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ b(be, { position: "start", children: /* @__PURE__ */ b(Le, {}) }), e[25] = H) : H = e[25];
691
696
  let Z;
692
- e[26] !== _ || e[27] !== B || e[28] !== P || e[29] !== u ? (Z = u ? /* @__PURE__ */ b(be, { position: "end", children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: P, edge: "end", children: _ ?? /* @__PURE__ */ b(Ye, { fontSize: "small" }) }) }) : null, e[26] = _, e[27] = B, e[28] = P, e[29] = u, e[30] = Z) : Z = e[30];
697
+ e[26] !== _ || e[27] !== B || e[28] !== W || e[29] !== u ? (Z = u ? /* @__PURE__ */ b(be, { position: "end", children: /* @__PURE__ */ b(K, { size: "small", "aria-label": B, onClick: W, edge: "end", children: _ ?? /* @__PURE__ */ b(Ye, { fontSize: "small" }) }) }) : null, e[26] = _, e[27] = B, e[28] = W, e[29] = u, e[30] = Z) : Z = e[30];
693
698
  let F;
694
699
  e[31] !== Z ? (F = {
695
700
  startAdornment: H,
696
701
  endAdornment: Z
697
702
  }, e[31] = Z, e[32] = F) : F = e[32];
698
703
  let G;
699
- return e[33] !== S || e[34] !== I || e[35] !== W || e[36] !== u || e[37] !== F ? (G = /* @__PURE__ */ b(Me, { inputRef: r, size: "small", fullWidth: !0, variant: "filled", placeholder: W, value: u, onChange: I, InputProps: F, ...S }), e[33] = S, e[34] = I, e[35] = W, e[36] = u, e[37] = F, e[38] = G) : G = e[38], G;
704
+ return e[33] !== S || e[34] !== I || e[35] !== P || e[36] !== u || e[37] !== F ? (G = /* @__PURE__ */ b(Me, { inputRef: r, size: "small", fullWidth: !0, variant: "filled", placeholder: P, value: u, onChange: I, InputProps: F, ...S }), e[33] = S, e[34] = I, e[35] = P, e[36] = u, e[37] = F, e[38] = G) : G = e[38], G;
700
705
  }
701
706
  function Ct(n) {
702
707
  return {
@@ -717,8 +722,8 @@ function cn(n) {
717
722
  Icon: m,
718
723
  IconButtonProps: S
719
724
  } = n, _ = f === void 0 ? !1 : f, {
720
- storeIsEnabled: y
721
- } = Q(t, Lt), o = y ?? _;
725
+ storeIsEnabled: T
726
+ } = Q(t, Lt), o = T ?? _;
722
727
  let l, r;
723
728
  e[0] !== _ || e[1] !== t ? (l = () => {
724
729
  g.getWidget(t)?.isSearchEnabled === void 0 && g.setWidget(t, {
@@ -762,7 +767,7 @@ function zt(n) {
762
767
  listeners: m,
763
768
  setNodeRef: S,
764
769
  transform: _,
765
- transition: y,
770
+ transition: T,
766
771
  isDragging: o
767
772
  } = rt(f);
768
773
  let l;
@@ -772,12 +777,12 @@ function zt(n) {
772
777
  } : null), e[2] = _, e[3] = l) : l = e[3];
773
778
  const r = o ? 0.5 : 1, s = o ? "grabbing" : "grab";
774
779
  let a;
775
- e[4] !== l || e[5] !== r || e[6] !== s || e[7] !== y ? (a = {
780
+ e[4] !== l || e[5] !== r || e[6] !== s || e[7] !== T ? (a = {
776
781
  transform: l,
777
- transition: y,
782
+ transition: T,
778
783
  opacity: r,
779
784
  cursor: s
780
- }, e[4] = l, e[5] = r, e[6] = s, e[7] = y, e[8] = a) : a = e[8];
785
+ }, e[4] = l, e[5] = r, e[6] = s, e[7] = T, e[8] = a) : a = e[8];
781
786
  const u = a;
782
787
  let i;
783
788
  e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
@@ -802,9 +807,9 @@ function dn(n) {
802
807
  Icon: p,
803
808
  IconButtonProps: m,
804
809
  MenuProps: S
805
- } = n, [_, y] = ge(null), {
810
+ } = n, [_, T] = ge(null), {
806
811
  columns: o
807
- } = Q(t, Wt);
812
+ } = Q(t, Pt);
808
813
  let l;
809
814
  e[0] !== t ? (l = (M) => {
810
815
  const R = g.getWidget(t)?.columns;
@@ -813,7 +818,7 @@ function dn(n) {
813
818
  const j = M, N = j.columns;
814
819
  if (!N || N.length === 0 || N.length === R.length && N.every((q, X) => q.id === R[X]?.id))
815
820
  return M;
816
- const oe = new Map(N.map(Pt)), te = [];
821
+ const oe = new Map(N.map(Wt)), te = [];
817
822
  for (const q of R) {
818
823
  const X = oe.get(q.id);
819
824
  X && (te.push(X), oe.delete(q.id));
@@ -845,12 +850,12 @@ function dn(n) {
845
850
  }), () => g.unregisterTool(t, Te)), d = [t, r], e[5] = t, e[6] = r, e[7] = c, e[8] = d) : (c = e[7], d = e[8]), $(c, d);
846
851
  let v;
847
852
  e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = (M) => {
848
- M.stopPropagation(), y(M.currentTarget);
853
+ M.stopPropagation(), T(M.currentTarget);
849
854
  }, e[9] = v) : v = e[9];
850
855
  const O = v;
851
856
  let C;
852
857
  e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = () => {
853
- y(null);
858
+ T(null);
854
859
  }, e[10] = C) : C = e[10];
855
860
  const k = C;
856
861
  let A;
@@ -872,18 +877,18 @@ function dn(n) {
872
877
  const w = A;
873
878
  if (!o || o.length < 2)
874
879
  return null;
875
- const D = f?.tooltip ?? "Change column", x = !!_, E = f?.ariaLabel ?? D, z = x ? "change-column-menu" : void 0, T = x ? "true" : void 0;
880
+ const D = f?.tooltip ?? "Change column", x = !!_, E = f?.ariaLabel ?? D, z = x ? "change-column-menu" : void 0, y = x ? "true" : void 0;
876
881
  let h;
877
882
  e[14] !== p ? (h = p ?? /* @__PURE__ */ b(Ge, { children: /* @__PURE__ */ b(Ot, {}) }), e[14] = p, e[15] = h) : h = e[15];
878
883
  let I;
879
- e[16] !== m || e[17] !== x || e[18] !== z || e[19] !== T || e[20] !== h || e[21] !== E ? (I = /* @__PURE__ */ b(K, { size: "small", "aria-label": E, "aria-controls": z, "aria-haspopup": "true", "aria-expanded": T, onClick: O, "data-active": x, sx: re.trigger, ...m, children: h }), e[16] = m, e[17] = x, e[18] = z, e[19] = T, e[20] = h, e[21] = E, e[22] = I) : I = e[22];
884
+ e[16] !== m || e[17] !== x || e[18] !== z || e[19] !== y || e[20] !== h || e[21] !== E ? (I = /* @__PURE__ */ b(K, { size: "small", "aria-label": E, "aria-controls": z, "aria-haspopup": "true", "aria-expanded": y, onClick: O, "data-active": x, sx: re.trigger, ...m, children: h }), e[16] = m, e[17] = x, e[18] = z, e[19] = y, e[20] = h, e[21] = E, e[22] = I) : I = e[22];
880
885
  let L;
881
886
  e[23] !== I || e[24] !== D ? (L = /* @__PURE__ */ b(ee, { title: D, children: I }), e[23] = I, e[24] = D, e[25] = L) : L = e[25];
882
- let P, W, B;
883
- e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
887
+ let W, P, B;
888
+ e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {
884
889
  vertical: "bottom",
885
890
  horizontal: "right"
886
- }, W = {
891
+ }, P = {
887
892
  vertical: "top",
888
893
  horizontal: "right"
889
894
  }, B = {
@@ -892,13 +897,13 @@ function dn(n) {
892
897
  overflow: "hidden"
893
898
  }
894
899
  }
895
- }, e[26] = P, e[27] = W, e[28] = B) : (P = e[26], W = e[27], B = e[28]);
900
+ }, e[26] = W, e[27] = P, e[28] = B) : (W = e[26], P = e[27], B = e[28]);
896
901
  let H;
897
902
  e[29] !== o ? (H = o.map(wt), e[29] = o, e[30] = H) : H = e[30];
898
903
  let Z;
899
904
  e[31] !== i || e[32] !== H ? (Z = /* @__PURE__ */ b(at, { items: i, strategy: ct, children: H }), e[31] = i, e[32] = H, e[33] = Z) : Z = e[33];
900
905
  let F;
901
- e[34] !== S || e[35] !== _ || e[36] !== x || e[37] !== Z ? (F = /* @__PURE__ */ b(Ce, { id: "change-column-menu", anchorEl: _, open: x, onClose: k, anchorOrigin: P, transformOrigin: W, slotProps: B, ...S, children: Z }), e[34] = S, e[35] = _, e[36] = x, e[37] = Z, e[38] = F) : F = e[38];
906
+ e[34] !== S || e[35] !== _ || e[36] !== x || e[37] !== Z ? (F = /* @__PURE__ */ b(Ce, { id: "change-column-menu", anchorEl: _, open: x, onClose: k, anchorOrigin: W, transformOrigin: P, slotProps: B, ...S, children: Z }), e[34] = S, e[35] = _, e[36] = x, e[37] = Z, e[38] = F) : F = e[38];
902
907
  let G;
903
908
  e[39] !== w || e[40] !== a || e[41] !== F ? (G = /* @__PURE__ */ b(ot, { sensors: a, collisionDetection: lt, onDragEnd: w, children: F }), e[39] = w, e[40] = a, e[41] = F, e[42] = G) : G = e[42];
904
909
  let V;
@@ -913,10 +918,10 @@ function wt(n) {
913
918
  function At(n) {
914
919
  return n.id;
915
920
  }
916
- function Pt(n) {
921
+ function Wt(n) {
917
922
  return [n.id, n];
918
923
  }
919
- function Wt(n) {
924
+ function Pt(n) {
920
925
  return {
921
926
  columns: n?.columns
922
927
  };
@@ -948,7 +953,7 @@ function un(n) {
948
953
  dataIndex: [],
949
954
  seriesIndex: 0
950
955
  }, e[0] = _) : _ = e[0];
951
- const y = le(_), {
956
+ const T = le(_), {
952
957
  brush: o
953
958
  } = Q(t, $t);
954
959
  let l;
@@ -988,22 +993,22 @@ function un(n) {
988
993
  e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = (h) => {
989
994
  const L = h.batch?.flatMap(Rt) ?? [];
990
995
  if (!L.length) {
991
- y.current = {
996
+ T.current = {
992
997
  dataIndex: [],
993
998
  seriesIndex: 0
994
999
  };
995
1000
  return;
996
1001
  }
997
- const P = L[0]?.seriesIndex ?? 0, W = Array.from(new Set(L.filter((B) => B.seriesIndex === void 0 || B.seriesIndex === P).flatMap(Bt)));
998
- y.current = {
999
- dataIndex: W,
1000
- seriesIndex: P
1002
+ const W = L[0]?.seriesIndex ?? 0, P = Array.from(new Set(L.filter((B) => B.seriesIndex === void 0 || B.seriesIndex === W).flatMap(Bt)));
1003
+ T.current = {
1004
+ dataIndex: P,
1005
+ seriesIndex: W
1001
1006
  };
1002
1007
  }, e[9] = u) : u = e[9];
1003
1008
  const i = u;
1004
1009
  let c;
1005
1010
  e[10] !== t || e[11] !== f ? (c = () => {
1006
- f?.(y.current), g.setWidget(t, {
1011
+ f?.(T.current), g.setWidget(t, {
1007
1012
  brush: !1
1008
1013
  });
1009
1014
  }, e[10] = t, e[11] = f, e[12] = c) : c = e[12];
@@ -1015,8 +1020,8 @@ function un(n) {
1015
1020
  order: 25,
1016
1021
  enabled: !1,
1017
1022
  fn: (h) => {
1018
- const I = h, L = I.option, P = I.onEvents ?? {}, W = pe(), B = {
1019
- ...P,
1023
+ const I = h, L = I.option, W = I.onEvents ?? {}, P = pe(), B = {
1024
+ ...W,
1020
1025
  brushSelected: i,
1021
1026
  brushEnd: d
1022
1027
  };
@@ -1024,7 +1029,7 @@ function un(n) {
1024
1029
  ...I,
1025
1030
  option: {
1026
1031
  ...L,
1027
- ...W
1032
+ ...P
1028
1033
  },
1029
1034
  onEvents: B
1030
1035
  };
@@ -1039,8 +1044,8 @@ function un(n) {
1039
1044
  e[21] !== m ? (E = m ?? /* @__PURE__ */ b(qe, {}), e[21] = m, e[22] = E) : E = e[22];
1040
1045
  let z;
1041
1046
  e[23] !== S || e[24] !== o || e[25] !== r || e[26] !== x || e[27] !== E ? (z = /* @__PURE__ */ b(K, { size: "small", "aria-label": x, onClick: r, sx: _e.trigger, "data-active": o, ...S, children: E }), e[23] = S, e[24] = o, e[25] = r, e[26] = x, e[27] = E, e[28] = z) : z = e[28];
1042
- let T;
1043
- return e[29] !== z || e[30] !== D ? (T = /* @__PURE__ */ b(ke, { sx: _e.container, children: /* @__PURE__ */ b(ee, { title: D, children: z }) }), e[29] = z, e[30] = D, e[31] = T) : T = e[31], T;
1047
+ let y;
1048
+ return e[29] !== z || e[30] !== D ? (y = /* @__PURE__ */ b(ke, { sx: _e.container, children: /* @__PURE__ */ b(ee, { title: D, children: z }) }), e[29] = z, e[30] = D, e[31] = y) : y = e[31], y;
1044
1049
  }
1045
1050
  function Bt(n) {
1046
1051
  return n.dataIndex ?? [];