@carto/ps-react-ui 4.11.0 → 4.11.2

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 (70) hide show
  1. package/dist/{change-column-BiuuHCDN.js → change-column-DjjwoPt1.js} +256 -269
  2. package/dist/change-column-DjjwoPt1.js.map +1 -0
  3. package/dist/{data-zoom-layout--YiY6ko_.js → data-zoom-layout-CkVnm6ej.js} +4 -5
  4. package/dist/{data-zoom-layout--YiY6ko_.js.map → data-zoom-layout-CkVnm6ej.js.map} +1 -1
  5. package/dist/echart-BMPpj7n_.js +250 -0
  6. package/dist/echart-BMPpj7n_.js.map +1 -0
  7. package/dist/{png-item-CS4z1iSH.js → png-item-BE9uEqlD.js} +2 -2
  8. package/dist/png-item-BE9uEqlD.js.map +1 -0
  9. package/dist/{spread-CPis22AE.js → spread-DYNpzgh_.js} +9 -11
  10. package/dist/{spread-CPis22AE.js.map → spread-DYNpzgh_.js.map} +1 -1
  11. package/dist/{table-CQCAnDLb.js → table-C9IMbTr0.js} +50 -53
  12. package/dist/table-C9IMbTr0.js.map +1 -0
  13. package/dist/types/widgets-v2/echart/edge-label-clamp.d.ts +57 -0
  14. package/dist/types/widgets-v2/echart/edge-label-clamp.test.d.ts +1 -0
  15. package/dist/widgets-v2/actions.js +2 -2
  16. package/dist/widgets-v2/bar.js +91 -105
  17. package/dist/widgets-v2/bar.js.map +1 -1
  18. package/dist/widgets-v2/category.js +27 -29
  19. package/dist/widgets-v2/category.js.map +1 -1
  20. package/dist/widgets-v2/echart.js +1 -1
  21. package/dist/widgets-v2/formula.js +24 -25
  22. package/dist/widgets-v2/formula.js.map +1 -1
  23. package/dist/widgets-v2/histogram.js +98 -112
  24. package/dist/widgets-v2/histogram.js.map +1 -1
  25. package/dist/widgets-v2/markdown.js +25 -27
  26. package/dist/widgets-v2/markdown.js.map +1 -1
  27. package/dist/widgets-v2/pie.js +7 -10
  28. package/dist/widgets-v2/pie.js.map +1 -1
  29. package/dist/widgets-v2/scatterplot.js +9 -12
  30. package/dist/widgets-v2/scatterplot.js.map +1 -1
  31. package/dist/widgets-v2/spread.js +14 -16
  32. package/dist/widgets-v2/spread.js.map +1 -1
  33. package/dist/widgets-v2/table.js +38 -40
  34. package/dist/widgets-v2/table.js.map +1 -1
  35. package/dist/widgets-v2/timeseries.js +106 -121
  36. package/dist/widgets-v2/timeseries.js.map +1 -1
  37. package/dist/widgets-v2/utils.js +1 -1
  38. package/dist/widgets-v2.js +43 -46
  39. package/dist/widgets-v2.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +1 -1
  42. package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +1 -1
  43. package/src/widgets-v2/actions/download/download.tsx +1 -1
  44. package/src/widgets-v2/actions/download/icons.tsx +1 -1
  45. package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +3 -3
  46. package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +2 -2
  47. package/src/widgets-v2/actions/relative-data/relative-data.tsx +1 -1
  48. package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +1 -1
  49. package/src/widgets-v2/actions/searcher/searcher.tsx +2 -2
  50. package/src/widgets-v2/actions/show-all/show-all.tsx +1 -1
  51. package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +1 -1
  52. package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +1 -1
  53. package/src/widgets-v2/bar/options.test.ts +31 -4
  54. package/src/widgets-v2/bar/options.ts +18 -22
  55. package/src/widgets-v2/echart/echart-ui.test.tsx +70 -0
  56. package/src/widgets-v2/echart/echart-ui.tsx +28 -0
  57. package/src/widgets-v2/echart/edge-label-clamp.test.ts +198 -0
  58. package/src/widgets-v2/echart/edge-label-clamp.ts +216 -0
  59. package/src/widgets-v2/histogram/options.test.ts +11 -4
  60. package/src/widgets-v2/histogram/options.ts +17 -21
  61. package/src/widgets-v2/table/table-ui.tsx +4 -4
  62. package/src/widgets-v2/timeseries/options.test.ts +9 -4
  63. package/src/widgets-v2/timeseries/options.ts +17 -22
  64. package/src/widgets-v2/toolbox/toolbox.tsx +1 -1
  65. package/src/widgets-v2/wrapper/widget-wrapper.tsx +1 -1
  66. package/dist/change-column-BiuuHCDN.js.map +0 -1
  67. package/dist/echart-CU0KmClP.js +0 -176
  68. package/dist/echart-CU0KmClP.js.map +0 -1
  69. package/dist/png-item-CS4z1iSH.js.map +0 -1
  70. package/dist/table-CQCAnDLb.js.map +0 -1
@@ -2,31 +2,28 @@ import { jsx as a, jsxs as G, Fragment as re } from "react/jsx-runtime";
2
2
  import { c as T } from "react/compiler-runtime";
3
3
  import { useState as V, useLayoutEffect as ee, Children as ae, isValidElement as ce, Component as be, useEffect as de, useRef as ve } from "react";
4
4
  import { W as Se, u as pe } from "./widget-context-DTGO0Yta.js";
5
- import { j as we, i as Ee, e as Ce, n as Te, r as ke, q as Ie, v as _e, u as Ae, s as Le } from "./widget-store-registry-_W4Z4xp-.js";
5
+ import { j as we, i as Ee, e as Ce, n as Te, r as ke, q as _e, v as Ie, u as Ae, s as Le } from "./widget-store-registry-_W4Z4xp-.js";
6
6
  import "zustand";
7
7
  import { Box as W, LinearProgress as We, Typography as X, AccordionSummary as $e, AccordionDetails as De, Accordion as Fe, AlertTitle as Be, Alert as Oe, Button as Me, IconButton as Re, Divider as Pe, Popper as Ue, Grow as Ne, Paper as je, Link as fe } from "@mui/material";
8
- import ze from "@mui/icons-material/ExpandMore";
9
- import { S as He } from "./smart-tooltip-D4vwQpFf.js";
10
- import { createPortal as Ve } from "react-dom";
11
- import Ge from "@mui/icons-material/Close";
8
+ import { ExpandMore as ze, Close as He } from "@mui/icons-material";
9
+ import { S as Ve } from "./smart-tooltip-D4vwQpFf.js";
10
+ import { createPortal as Ge } from "react-dom";
12
11
  import { WidgetOptions as qe } from "@carto/meridian-ds/custom-icons";
13
12
  import "./lasso-tool-CDFj4zKY.js";
14
13
  import "./cjs-D4KH3azB.js";
15
14
  import { T as Xe } from "./tooltip-BDnrRKrp.js";
16
- import "@mui/icons-material";
17
15
  import "@carto/ps-utils";
18
- import { o as Ze, a as Ke, E as Ye } from "./echart-CU0KmClP.js";
19
- import { D as Fn } from "./echart-CU0KmClP.js";
16
+ import { o as Ze, a as Ke, E as Ye } from "./echart-BMPpj7n_.js";
17
+ import { D as Wn } from "./echart-BMPpj7n_.js";
20
18
  import { a as Je, b as Qe, M as et } from "./markdown-BD1jcknS.js";
21
- import { C as tt, L as nt, F as ot, j as rt, R as it, B as lt, Z as st, m as at, n as ct, l as dt, k as pt } from "./change-column-BiuuHCDN.js";
19
+ import { C as tt, L as nt, F as ot, j as rt, R as it, B as lt, Z as st, m as at, n as ct, l as dt, k as pt } from "./change-column-DjjwoPt1.js";
22
20
  import "html2canvas";
23
- import "@mui/icons-material/ImageOutlined";
24
21
  import { a as ft, F as mt } from "./formula-DuC0NQLH.js";
25
22
  import "react-markdown";
26
- import { b as ut, a as gt } from "./spread-CPis22AE.js";
23
+ import { b as ut, a as gt } from "./spread-DYNpzgh_.js";
27
24
  import { a as ht, R as yt } from "./range-l4fNHLEg.js";
28
25
  import { f as xt, C as bt } from "./category-Dnd2_j0x.js";
29
- import { c as vt, T as St } from "./table-CQCAnDLb.js";
26
+ import { c as vt, T as St } from "./table-C9IMbTr0.js";
30
27
  function wt(t) {
31
28
  const e = T(31), {
32
29
  id: n,
@@ -56,7 +53,7 @@ function wt(t) {
56
53
  const [l] = V(g);
57
54
  let d, h;
58
55
  e[8] !== n || e[9] !== p || e[10] !== l ? (d = () => (ke(n, l), () => {
59
- Ie(n, {
56
+ _e(n, {
60
57
  keepAlive: p
61
58
  });
62
59
  }), h = [n, l, p], e[8] = n, e[9] = p, e[10] = l, e[11] = d, e[12] = h) : (d = e[11], h = e[12]), ee(d, h);
@@ -74,14 +71,14 @@ function wt(t) {
74
71
  error: s
75
72
  });
76
73
  }, w = [l, o, i, s], e[17] = s, e[18] = i, e[19] = o, e[20] = l, e[21] = b, e[22] = w) : (b = e[21], w = e[22]), ee(b, w);
77
- let k, I;
78
- e[23] !== c || e[24] !== f || e[25] !== l ? (I = () => {
74
+ let k, _;
75
+ e[23] !== c || e[24] !== f || e[25] !== l ? (_ = () => {
79
76
  l.setState({
80
77
  rawFormatter: c,
81
78
  formatter: c,
82
79
  labelFormatter: f
83
80
  });
84
- }, k = [l, c, f], e[23] = c, e[24] = f, e[25] = l, e[26] = k, e[27] = I) : (k = e[26], I = e[27]), ee(I, k);
81
+ }, k = [l, c, f], e[23] = c, e[24] = f, e[25] = l, e[26] = k, e[27] = _) : (k = e[26], _ = e[27]), ee(_, k);
85
82
  let A;
86
83
  return e[28] !== m || e[29] !== n ? (A = /* @__PURE__ */ a(Se.Provider, { value: n, children: m }), e[28] = m, e[29] = n, e[30] = A) : A = e[30], A;
87
84
  }
@@ -281,21 +278,21 @@ function kt(t) {
281
278
  iconProps: m,
282
279
  sx: p,
283
280
  children: g
284
- } = t, l = i === void 0 ? !1 : i, d = s === void 0 ? !1 : s, h = c === void 0 ? "elevation" : c, y = u === void 0 ? ze : u, x = pe(), b = _e(x, It), w = r !== void 0, [k, I] = V(l), A = w ? r : k;
281
+ } = t, l = i === void 0 ? !1 : i, d = s === void 0 ? !1 : s, h = c === void 0 ? "elevation" : c, y = u === void 0 ? ze : u, x = pe(), b = Ie(x, _t), w = r !== void 0, [k, _] = V(l), A = w ? r : k;
285
282
  let E;
286
283
  e[0] !== o ? (E = (H, N) => {
287
284
  const K = !N;
288
- o?.(K), I(K);
285
+ o?.(K), _(K);
289
286
  }, e[0] = o, e[1] = E) : E = e[1];
290
287
  const F = E;
291
- let _;
292
- e[2] !== f ? (_ = {
288
+ let I;
289
+ e[2] !== f ? (I = {
293
290
  ...Tt,
294
291
  ...f
295
- }, e[2] = f, e[3] = _) : _ = e[3];
296
- const L = _;
292
+ }, e[2] = f, e[3] = I) : I = e[3];
293
+ const L = I;
297
294
  let S;
298
- e[4] !== g ? (S = _t(g), e[4] = g, e[5] = S) : S = e[5];
295
+ e[4] !== g ? (S = It(g), e[4] = g, e[5] = S) : S = e[5];
299
296
  const {
300
297
  summary: v,
301
298
  details: q
@@ -317,7 +314,7 @@ function kt(t) {
317
314
  return /* @__PURE__ */ a(W, { sx: j.titleCell, children: /* @__PURE__ */ a(X, { ref: N, variant: "subtitle1", sx: j.titleText, textTransform: "none", children: n }) });
318
315
  }, e[13] = n, e[14] = P) : P = e[14];
319
316
  let U;
320
- e[15] !== P || e[16] !== n ? (U = /* @__PURE__ */ a(He, { title: n, children: P }), e[15] = P, e[16] = n, e[17] = U) : U = e[17];
317
+ e[15] !== P || e[16] !== n ? (U = /* @__PURE__ */ a(Ve, { title: n, children: P }), e[15] = P, e[16] = n, e[17] = U) : U = e[17];
321
318
  let $;
322
319
  e[18] !== te || e[19] !== v || e[20] !== R || e[21] !== U ? ($ = /* @__PURE__ */ G($e, { expandIcon: R, "aria-label": te, sx: j.summary, children: [
323
320
  U,
@@ -332,10 +329,10 @@ function kt(t) {
332
329
  D
333
330
  ] }), e[25] = d, e[26] = F, e[27] = O, e[28] = M, e[29] = $, e[30] = D, e[31] = B, e[32] = Z, e[33] = h, e[34] = z) : z = e[34], z;
334
331
  }
335
- function It(t) {
332
+ function _t(t) {
336
333
  return t.isFetching;
337
334
  }
338
- function _t(t) {
335
+ function It(t) {
339
336
  const e = [], n = [];
340
337
  for (const r of ae.toArray(t))
341
338
  se(r, me) || se(r, ue) ? e.push(r) : n.push(r);
@@ -649,23 +646,23 @@ function Ht(t) {
649
646
  ...r
650
647
  }, e[0] = r, e[1] = p) : p = e[1];
651
648
  const g = p, [l, d] = V(!1), [h, y] = V(null), [x, b] = V(null), [w, k] = V(null);
652
- let I;
653
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = () => d(Xt), e[2] = I) : I = e[2];
654
- const A = I;
649
+ let _;
650
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = () => d(Xt), e[2] = _) : _ = e[2];
651
+ const A = _;
655
652
  let E;
656
653
  e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = (C) => {
657
654
  y(C);
658
655
  }, e[3] = E) : E = e[3];
659
656
  const F = E;
660
- let _, L;
661
- e[4] !== l ? (_ = () => {
657
+ let I, L;
658
+ e[4] !== l ? (I = () => {
662
659
  if (!l)
663
660
  return;
664
661
  const C = (J) => {
665
662
  J.key === "Escape" && d(!1);
666
663
  };
667
664
  return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
668
- }, L = [l], e[4] = l, e[5] = _, e[6] = L) : (_ = e[5], L = e[6]), de(_, L);
665
+ }, L = [l], e[4] = l, e[5] = I, e[6] = L) : (I = e[5], L = e[6]), de(I, L);
669
666
  const [S] = V(qt);
670
667
  let v, q;
671
668
  e[7] !== f ? (v = ae.toArray(f).filter(Gt), q = v.reduce(Vt, 0), e[7] = f, e[8] = v, e[9] = q) : (v = e[8], q = e[9]);
@@ -698,7 +695,7 @@ function Ht(t) {
698
695
  e[22] !== u || e[23] !== i || e[24] !== l || e[25] !== B || e[26] !== P ? (D = B && /* @__PURE__ */ G(re, { children: [
699
696
  /* @__PURE__ */ a(Xe, { title: P, children: /* @__PURE__ */ a(Re, { ref: F, size: "small", "aria-label": P, "aria-pressed": l, onClick: A, className: l ? "active" : void 0, sx: {
700
697
  ...l && ne.triggerActive
701
- }, children: l ? /* @__PURE__ */ a(Ge, { fontSize: "small" }) : /* @__PURE__ */ a(u, { fontSize: "small", ...i }) }) }),
698
+ }, children: l ? /* @__PURE__ */ a(He, { fontSize: "small" }) : /* @__PURE__ */ a(u, { fontSize: "small", ...i }) }) }),
702
699
  /* @__PURE__ */ a(Pe, { orientation: "vertical", flexItem: !0, sx: {
703
700
  mx: 0.5
704
701
  } })
@@ -721,7 +718,7 @@ function Ht(t) {
721
718
  }, children: /* @__PURE__ */ a(je, { ref: k, sx: ne.paper }) });
722
719
  } }), e[29] = h, e[30] = m, e[31] = l, e[32] = B, e[33] = H) : H = e[33];
723
720
  let N;
724
- e[34] !== S || e[35] !== O || e[36] !== v || e[37] !== l ? (N = S ? Ve(v.map((C, J) => {
721
+ e[34] !== S || e[35] !== O || e[36] !== v || e[37] !== l ? (N = S ? Ge(v.map((C, J) => {
725
722
  const le = l || !O || O.has(J), xe = C.key ?? J;
726
723
  return /* @__PURE__ */ a("div", { "data-toolbox-item-visible": le ? "true" : "false", style: {
727
724
  display: le ? "contents" : "none"
@@ -875,12 +872,12 @@ function ye(t) {
875
872
  let b;
876
873
  e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = () => g(tn), e[8] = b) : b = e[8];
877
874
  const w = b, k = !p && !l;
878
- let I;
879
- e[9] !== k || e[10] !== n ? (I = k ? {
875
+ let _;
876
+ e[9] !== k || e[10] !== n ? (_ = k ? {
880
877
  ...oe.clamped,
881
878
  WebkitLineClamp: n
882
- } : null, e[9] = k, e[10] = n, e[11] = I) : I = e[11];
883
- const A = I;
879
+ } : null, e[9] = k, e[10] = n, e[11] = _) : _ = e[11];
880
+ const A = _;
884
881
  let E;
885
882
  e[12] !== A ? (E = A ?? {}, e[12] = A, e[13] = E) : E = e[13];
886
883
  let F;
@@ -888,20 +885,20 @@ function ye(t) {
888
885
  ...oe.text,
889
886
  ...E
890
887
  }, e[14] = E, e[15] = F) : F = e[15];
891
- let _;
892
- e[16] !== i || e[17] !== F ? (_ = /* @__PURE__ */ a(W, { ref: f, sx: F, children: i }), e[16] = i, e[17] = F, e[18] = _) : _ = e[18];
888
+ let I;
889
+ e[16] !== i || e[17] !== F ? (I = /* @__PURE__ */ a(W, { ref: f, sx: F, children: i }), e[16] = i, e[17] = F, e[18] = I) : I = e[18];
893
890
  let L;
894
891
  e[19] !== c || e[20] !== l || e[21] !== p || e[22] !== u ? (L = !l && (u || p) && /* @__PURE__ */ a(fe, { component: "button", variant: "caption", underline: "none", onClick: w, sx: oe.toggle, children: p ? c.showLess : c.showMore }), e[19] = c, e[20] = l, e[21] = p, e[22] = u, e[23] = L) : L = e[23];
895
892
  let S;
896
- return e[24] !== L || e[25] !== _ ? (S = /* @__PURE__ */ G(W, { sx: oe.root, children: [
897
- _,
893
+ return e[24] !== L || e[25] !== I ? (S = /* @__PURE__ */ G(W, { sx: oe.root, children: [
894
+ I,
898
895
  L
899
- ] }), e[24] = L, e[25] = _, e[26] = S) : S = e[26], S;
896
+ ] }), e[24] = L, e[25] = I, e[26] = S) : S = e[26], S;
900
897
  }
901
898
  function tn(t) {
902
899
  return !t;
903
900
  }
904
- const Wn = {
901
+ const In = {
905
902
  // Composition shell
906
903
  Provider: wt,
907
904
  Wrapper: kt,
@@ -947,12 +944,12 @@ const Wn = {
947
944
  TableUI: vt
948
945
  };
949
946
  export {
950
- Fn as DEFAULT_INIT_OPTS,
947
+ Wn as DEFAULT_INIT_OPTS,
951
948
  Kt as DEFAULT_NOTE_LABELS,
952
949
  Nt as DEFAULT_SELECTION_SUMMARY_LABELS,
953
950
  Dt as DEFAULT_STATE_LABELS,
954
951
  zt as DEFAULT_TOOLBOX_LABELS,
955
952
  Tt as DEFAULT_WRAPPER_LABELS,
956
- Wn as Widget
953
+ In as Widget
957
954
  };
958
955
  //# sourceMappingURL=widgets-v2.js.map