@carto/ps-react-ui 4.3.9 → 4.4.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 (121) hide show
  1. package/dist/components.js +692 -700
  2. package/dist/components.js.map +1 -1
  3. package/dist/{lasso-tool-jl4YK02H.js → lasso-tool-BYbxrJ-7.js} +184 -190
  4. package/dist/lasso-tool-BYbxrJ-7.js.map +1 -0
  5. package/dist/{row-BKmVAUN5.js → row-DTCV0Ocm.js} +2 -2
  6. package/dist/row-DTCV0Ocm.js.map +1 -0
  7. package/dist/{series-D1pynfeh.js → series-CYNOu2Ju.js} +2 -2
  8. package/dist/{series-D1pynfeh.js.map → series-CYNOu2Ju.js.map} +1 -1
  9. package/dist/smart-tooltip-D4vwQpFf.js +37 -0
  10. package/dist/smart-tooltip-D4vwQpFf.js.map +1 -0
  11. package/dist/{styles-DrPyd0y5.js → styles-CAroD5Rc.js} +12 -12
  12. package/dist/styles-CAroD5Rc.js.map +1 -0
  13. package/dist/types/hooks/use-widget-ref.d.ts +5 -2
  14. package/dist/types/widgets/_shared/chart-config/option-builders.d.ts +1 -1
  15. package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +21 -0
  16. package/dist/types/widgets/actions/{relative-data → brush-toggle}/style.d.ts +5 -0
  17. package/dist/types/widgets/actions/brush-toggle/types.d.ts +33 -0
  18. package/dist/types/widgets/actions/index.d.ts +2 -0
  19. package/dist/types/widgets/category/config.d.ts +3 -10
  20. package/dist/types/widgets/echart/types.d.ts +2 -1
  21. package/dist/types/widgets/echart/utils.d.ts +12 -6
  22. package/dist/types/widgets/range/config.d.ts +0 -4
  23. package/dist/types/widgets/spread/config.d.ts +0 -5
  24. package/dist/types/widgets/table/config.d.ts +1 -2
  25. package/dist/types/widgets/table/table-ui.d.ts +1 -1
  26. package/dist/types/widgets/wrapper/components/options.d.ts +1 -1
  27. package/dist/use-widget-ref-wtFLDFCD.js +25 -0
  28. package/dist/use-widget-ref-wtFLDFCD.js.map +1 -0
  29. package/dist/{utils-idmvq0Oa.js → utils-Cx3gYUcL.js} +74 -68
  30. package/dist/utils-Cx3gYUcL.js.map +1 -0
  31. package/dist/widgets/actions.js +788 -700
  32. package/dist/widgets/actions.js.map +1 -1
  33. package/dist/widgets/bar.js +48 -49
  34. package/dist/widgets/bar.js.map +1 -1
  35. package/dist/widgets/category.js +28 -28
  36. package/dist/widgets/category.js.map +1 -1
  37. package/dist/widgets/echart.js +85 -82
  38. package/dist/widgets/echart.js.map +1 -1
  39. package/dist/widgets/formula.js +7 -5
  40. package/dist/widgets/formula.js.map +1 -1
  41. package/dist/widgets/histogram.js +50 -50
  42. package/dist/widgets/histogram.js.map +1 -1
  43. package/dist/widgets/markdown.js +1 -1
  44. package/dist/widgets/pie.js +10 -10
  45. package/dist/widgets/pie.js.map +1 -1
  46. package/dist/widgets/range.js +1 -1
  47. package/dist/widgets/range.js.map +1 -1
  48. package/dist/widgets/scatterplot.js +14 -14
  49. package/dist/widgets/scatterplot.js.map +1 -1
  50. package/dist/widgets/spread.js +7 -5
  51. package/dist/widgets/spread.js.map +1 -1
  52. package/dist/widgets/table.js +5 -3
  53. package/dist/widgets/table.js.map +1 -1
  54. package/dist/widgets/timeseries.js +4 -4
  55. package/dist/widgets/timeseries.js.map +1 -1
  56. package/dist/widgets/wrapper.js +152 -162
  57. package/dist/widgets/wrapper.js.map +1 -1
  58. package/dist/widgets.js +1 -1
  59. package/package.json +1 -1
  60. package/src/components/basemaps/basemaps.tsx +3 -1
  61. package/src/components/geolocation-controls/geolocation-controls.tsx +10 -6
  62. package/src/components/lasso-tool/lasso-tool-inline.tsx +6 -2
  63. package/src/components/lasso-tool/lasso-tool.tsx +9 -3
  64. package/src/components/list-data/list-data-skeleton.tsx +1 -1
  65. package/src/components/list-data/list-data.tsx +5 -3
  66. package/src/components/measurement-tools/measurement-tools.tsx +5 -1
  67. package/src/components/smart-tooltip/smart-tooltip.tsx +3 -1
  68. package/src/hooks/use-widget-ref.ts +4 -3
  69. package/src/widgets/_shared/chart-config/option-builders.test.ts +2 -2
  70. package/src/widgets/_shared/chart-config/option-builders.ts +6 -4
  71. package/src/widgets/actions/brush-toggle/brush-toggle.tsx +220 -0
  72. package/src/widgets/actions/{relative-data → brush-toggle}/style.ts +5 -0
  73. package/src/widgets/actions/brush-toggle/types.ts +37 -0
  74. package/src/widgets/actions/download/download.test.tsx +6 -2
  75. package/src/widgets/actions/download/download.tsx +3 -1
  76. package/src/widgets/actions/fullscreen/fullscreen.tsx +8 -1
  77. package/src/widgets/actions/index.ts +9 -0
  78. package/src/widgets/actions/lock-selection/lock-selection.tsx +0 -9
  79. package/src/widgets/actions/relative-data/relative-data.tsx +2 -6
  80. package/src/widgets/actions/searcher/searcher.tsx +0 -6
  81. package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +4 -4
  82. package/src/widgets/actions/stack-toggle/stack-toggle.tsx +2 -13
  83. package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +2 -12
  84. package/src/widgets/bar/config.ts +8 -4
  85. package/src/widgets/bar/skeleton.tsx +1 -1
  86. package/src/widgets/category/components/category-row-multi.tsx +1 -1
  87. package/src/widgets/category/config.ts +1 -11
  88. package/src/widgets/echart/echart-ui.tsx +5 -2
  89. package/src/widgets/echart/echart.tsx +1 -1
  90. package/src/widgets/echart/types.ts +2 -1
  91. package/src/widgets/echart/utils.ts +20 -15
  92. package/src/widgets/formula/components/row.tsx +1 -1
  93. package/src/widgets/formula/formula-ui.tsx +1 -1
  94. package/src/widgets/histogram/config.ts +7 -2
  95. package/src/widgets/histogram/skeleton.tsx +2 -2
  96. package/src/widgets/pie/skeleton.tsx +1 -1
  97. package/src/widgets/range/config.ts +0 -5
  98. package/src/widgets/scatterplot/skeleton.tsx +2 -2
  99. package/src/widgets/spread/config.ts +0 -6
  100. package/src/widgets/spread/spread-ui.tsx +1 -1
  101. package/src/widgets/table/config.ts +1 -1
  102. package/src/widgets/table/table-ui.tsx +2 -2
  103. package/src/widgets/timeseries/skeleton.tsx +1 -1
  104. package/src/widgets/wrapper/components/actions.test.tsx +6 -2
  105. package/src/widgets/wrapper/components/actions.tsx +3 -1
  106. package/src/widgets/wrapper/components/options.test.tsx +12 -4
  107. package/src/widgets/wrapper/components/options.tsx +8 -3
  108. package/src/widgets/wrapper/wrapper-ui.tsx +5 -2
  109. package/src/widgets/wrapper/wrapper.tsx +2 -4
  110. package/dist/lasso-tool-jl4YK02H.js.map +0 -1
  111. package/dist/row-BKmVAUN5.js.map +0 -1
  112. package/dist/smart-tooltip-BEtBaIdz.js +0 -39
  113. package/dist/smart-tooltip-BEtBaIdz.js.map +0 -1
  114. package/dist/styles-DrPyd0y5.js.map +0 -1
  115. package/dist/types/widgets/actions/zoom-toggle/index.d.ts +0 -2
  116. package/dist/types/widgets/table/components/index.d.ts +0 -4
  117. package/dist/use-widget-ref-P-2i0MJG.js +0 -19
  118. package/dist/use-widget-ref-P-2i0MJG.js.map +0 -1
  119. package/dist/utils-idmvq0Oa.js.map +0 -1
  120. package/src/widgets/actions/zoom-toggle/index.ts +0 -2
  121. package/src/widgets/table/components/index.ts +0 -4
@@ -1,46 +1,46 @@
1
- import { jsx as i, jsxs as B, Fragment as V } from "react/jsx-runtime";
2
- import { c as C } from "react/compiler-runtime";
3
- import { ArrowDropDown as ee, MoreVertOutlined as te } from "@mui/icons-material";
4
- import { Chip as oe, Paper as le, Menu as ie, Box as ne, Divider as X, IconButton as re, MenuItem as U, ListItemIcon as se, SvgIcon as ae, ListItemText as ce, ToggleButton as de, Typography as N } from "@mui/material";
5
- import { d as q } from "./cjs-D4KH3azB.js";
6
- import { useState as ue, useMemo as J } from "react";
7
- import { T as K } from "./tooltip-BDnrRKrp.js";
8
- function ge(t) {
9
- const e = C(3);
1
+ import { jsx as i, jsxs as D, Fragment as k } from "react/jsx-runtime";
2
+ import { c as M } from "react/compiler-runtime";
3
+ import { ArrowDropDown as Q, MoreVertOutlined as ee } from "@mui/icons-material";
4
+ import { Chip as te, Paper as oe, Menu as le, Box as ie, Divider as W, IconButton as ne, MenuItem as U, ListItemIcon as re, SvgIcon as ce, ListItemText as se, ToggleButton as ae, Typography as Y } from "@mui/material";
5
+ import { d as F } from "./cjs-D4KH3azB.js";
6
+ import { useState as de, useMemo as N } from "react";
7
+ import { T as q } from "./tooltip-BDnrRKrp.js";
8
+ function ue(t) {
9
+ const e = M(3);
10
10
  let l;
11
11
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.996 2.996 0 0 0 0 2H6.829a2.995 2.995 0 0 0 0-2h10.342Zm-2.463-5.707 3.998 4a3.013 3.013 0 0 0-1.414 1.414l-4-3.999a3.014 3.014 0 0 0 1.31-1.214l.106-.201ZM2.998 6.829a2.995 2.995 0 0 0 2.002 0v10.342a2.993 2.993 0 0 0-2.002 0V6.83ZM12 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm1.84-3.919c.464.483 1.09.81 1.79.896l-1.47 2.94a2.992 2.992 0 0 0-1.79-.894l1.47-2.942ZM16 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm9.171.998a2.994 2.994 0 0 0 0 2.002H6.829a2.995 2.995 0 0 0 0-2.002h6.342Z", fill: "currentColor" }), e[0] = l) : l = e[0];
12
12
  let o;
13
13
  return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: l }), e[1] = t, e[2] = o) : o = e[2], o;
14
14
  }
15
- function pe(t) {
16
- const e = C(3);
15
+ function ge(t) {
16
+ const e = M(3);
17
17
  let l;
18
18
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 18a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm16 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm-2.829 1a2.993 2.993 0 0 0-.17.974l-.001.052.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2h10.342ZM2.998 6.828a2.995 2.995 0 0 0 2.002 0V17.17a2.993 2.993 0 0 0-2.002 0V6.83Zm16.001 0a2.995 2.995 0 0 0 2 0V17.17a2.993 2.993 0 0 0-2 0V6.829ZM20 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM4 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm13.171.998a2.991 2.991 0 0 0-.17.976L17 4.026l.007.183a3 3 0 0 0 .164.79H6.829a2.995 2.995 0 0 0 0-2H17.17Z", fill: "currentColor" }), e[0] = l) : l = e[0];
19
19
  let o;
20
20
  return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: l }), e[1] = t, e[2] = o) : o = e[2], o;
21
21
  }
22
- function he(t) {
23
- const e = C(3);
22
+ function pe(t) {
23
+ const e = M(3);
24
24
  let l;
25
25
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = l) : l = e[0];
26
26
  let o;
27
27
  return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: l }), e[1] = t, e[2] = o) : o = e[2], o;
28
28
  }
29
- function fe(t) {
30
- const e = C(3);
29
+ function he(t) {
30
+ const e = M(3);
31
31
  let l;
32
32
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 3c4.935 0 9 3.736 9 9l-.002.343-.012.668c-.012.438-.033.86-.062 1.266l-.05.597C20.498 18.767 19.267 21 17 21c-1.192 0-1.971-.341-2.988-1.122l-.472-.375c-.401-.319-.64-.473-.888-.566a4.938 4.938 0 0 0-.415-.13l-.34-.085-.398-.086-.456-.086-.66-.111-1.708-.273a9.112 9.112 0 0 1-.952-.206C5.46 17.301 3 14.954 3 12.015c0-1.508.485-2.995 1.436-4.458.355.585.906 1.04 1.562 1.272C5.328 9.916 5 10.977 5 12.015c0 1.889 1.78 3.588 3.282 4.025l.085.023.345.076.517.092 1.619.257.583.1.518.098.237.05.433.103c.272.07.512.143.73.224.434.161.783.373 1.235.718l.457.362c.806.646 1.24.857 1.959.857.893 0 1.63-1.518 1.895-4.45l.045-.585c.013-.2.024-.407.033-.62l.02-.655c.005-.224.007-.454.007-.69 0-4.12-3.133-7-7-7a1 1 0 1 1 0-2ZM7 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z", fill: "currentColor" }), e[0] = l) : l = e[0];
33
33
  let o;
34
34
  return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: l }), e[1] = t, e[2] = o) : o = e[2], o;
35
35
  }
36
- function me(t) {
37
- const e = C(3);
36
+ function fe(t) {
37
+ const e = M(3);
38
38
  let l;
39
39
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m10.083 19.394.057.113a1 1 0 0 0 1.72.007l2.869-4.786 4.786-2.87a1 1 0 0 0-.121-1.777l-14-6c-.83-.356-1.669.483-1.313 1.313l6.002 14ZM6.905 6.904l9.903 4.244-3.322 1.995-.102.069a1 1 0 0 0-.242.274l-1.992 3.321-4.245-9.903Z", fill: "currentColor" }), e[0] = l) : l = e[0];
40
40
  let o;
41
41
  return e[1] !== t ? (o = /* @__PURE__ */ i("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...t, children: l }), e[1] = t, e[2] = o) : o = e[2], o;
42
42
  }
43
- const L = {
43
+ const B = {
44
44
  action: {
45
45
  tooltip: {
46
46
  active: "Click on the map to draw your spatial filter",
@@ -78,19 +78,19 @@ const L = {
78
78
  }
79
79
  }, Be = {
80
80
  polygon: {
81
- icon: /* @__PURE__ */ i(ge, {})
81
+ icon: /* @__PURE__ */ i(ue, {})
82
82
  },
83
83
  rectangle: {
84
- icon: /* @__PURE__ */ i(pe, {})
84
+ icon: /* @__PURE__ */ i(ge, {})
85
85
  },
86
86
  circle: {
87
- icon: /* @__PURE__ */ i(he, {})
87
+ icon: /* @__PURE__ */ i(pe, {})
88
88
  },
89
89
  lasso: {
90
- icon: /* @__PURE__ */ i(fe, {})
90
+ icon: /* @__PURE__ */ i(he, {})
91
91
  },
92
92
  edit: {
93
- icon: /* @__PURE__ */ i(me, {})
93
+ icon: /* @__PURE__ */ i(fe, {})
94
94
  }
95
95
  }, A = {
96
96
  container: {
@@ -256,14 +256,14 @@ const L = {
256
256
  }
257
257
  }
258
258
  };
259
- function ve(t) {
260
- const e = C(18), {
259
+ function me(t) {
260
+ const e = M(18), {
261
261
  chipProps: l,
262
262
  value: o,
263
- labels: r,
263
+ labels: c,
264
264
  onChipToggle: a,
265
265
  onDelete: n
266
- } = t, c = o.visible ? "active" : "inactive", s = r?.tooltip?.[c] ?? L.chip.tooltip[c], d = l?.TooltipProps;
266
+ } = t, s = o.visible ? "active" : "inactive", r = c?.tooltip?.[s] ?? B.chip.tooltip[s], d = l?.TooltipProps;
267
267
  let u;
268
268
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
269
269
  ...A.chip.chip
@@ -273,201 +273,195 @@ function ve(t) {
273
273
  e[1] !== n || e[2] !== o.id ? (g = () => n(o.id), e[1] = n, e[2] = o.id, e[3] = g) : g = e[3];
274
274
  let h;
275
275
  e[4] !== a || e[5] !== o.id || e[6] !== o.visible ? (h = () => a(o.id, !o.visible), e[4] = a, e[5] = o.id, e[6] = o.visible, e[7] = h) : h = e[7];
276
- const f = l?.ChipsProps;
277
- let m;
278
- e[8] !== p || e[9] !== g || e[10] !== h || e[11] !== f || e[12] !== o.label ? (m = /* @__PURE__ */ i(oe, { sx: u, color: p, size: "small", onDelete: g, label: o.label, onClick: h, ...f }), e[8] = p, e[9] = g, e[10] = h, e[11] = f, e[12] = o.label, e[13] = m) : m = e[13];
279
- let b;
280
- return e[14] !== s || e[15] !== d || e[16] !== m ? (b = /* @__PURE__ */ i(K, { title: s, placement: "bottom", ...d, children: m }), e[14] = s, e[15] = d, e[16] = m, e[17] = b) : b = e[17], b;
276
+ const v = l?.ChipsProps;
277
+ let f;
278
+ e[8] !== p || e[9] !== g || e[10] !== h || e[11] !== v || e[12] !== o.label ? (f = /* @__PURE__ */ i(te, { sx: u, color: p, size: "small", onDelete: g, label: o.label, onClick: h, ...v }), e[8] = p, e[9] = g, e[10] = h, e[11] = v, e[12] = o.label, e[13] = f) : f = e[13];
279
+ let w;
280
+ return e[14] !== r || e[15] !== d || e[16] !== f ? (w = /* @__PURE__ */ i(q, { title: r, placement: "bottom", ...d, children: f }), e[14] = r, e[15] = d, e[16] = f, e[17] = w) : w = e[17], w;
281
281
  }
282
- function D(t) {
283
- const e = C(44), {
282
+ const ve = [], be = {};
283
+ function P(t) {
284
+ const e = M(40), {
284
285
  enabled: l,
285
286
  values: o,
286
- actionProps: r,
287
+ actionProps: c,
287
288
  chipProps: a,
288
289
  labels: n,
289
- modes: c,
290
- modesMapping: s,
290
+ modes: s,
291
+ modesMapping: r,
291
292
  modeSelected: d,
292
293
  PaperProps: u,
293
294
  onActionToggle: p,
294
295
  onChipToggle: g,
295
296
  onDelete: h,
296
- onChangeMode: f,
297
- onAllChipToggle: m,
298
- onAllDelete: b,
299
- ChipsSlot: $,
297
+ onChangeMode: v,
298
+ onAllChipToggle: f,
299
+ onAllDelete: w,
300
+ ChipsSlot: C,
300
301
  ActionSlot: x,
301
- SecondaryActionsSlot: y,
302
- OptionsSlot: Z
303
- } = t;
304
- let S;
305
- e[0] !== o ? (S = o === void 0 ? [] : o, e[0] = o, e[1] = S) : S = e[1];
306
- const T = S;
307
- let w;
308
- e[2] !== u ? (w = u === void 0 ? {} : u, e[2] = u, e[3] = w) : w = e[3];
309
- let v, _;
310
- e[4] !== w ? ({
302
+ SecondaryActionsSlot: R,
303
+ OptionsSlot: y
304
+ } = t, S = o === void 0 ? ve : o, T = u === void 0 ? be : u;
305
+ let m, _;
306
+ e[0] !== T ? ({
311
307
  sx: _,
312
- ...v
313
- } = w, e[4] = w, e[5] = v, e[6] = _) : (v = e[5], _ = e[6]);
314
- const G = $ === void 0 ? D.Chips : $, E = x === void 0 ? D.Action : x, H = y === void 0 ? D.SecondaryActions : y, z = Z === void 0 ? D.Options : Z;
315
- let j;
316
- e[7] !== v || e[8] !== r || e[9] !== a || e[10] !== l || e[11] !== n || e[12] !== d || e[13] !== c || e[14] !== s || e[15] !== p || e[16] !== m || e[17] !== b || e[18] !== f || e[19] !== g || e[20] !== h || e[21] !== T ? (j = {
308
+ ...m
309
+ } = T, e[0] = T, e[1] = m, e[2] = _) : (m = e[1], _ = e[2]);
310
+ const G = C === void 0 ? P.Chips : C, V = x === void 0 ? P.Action : x, $ = R === void 0 ? P.SecondaryActions : R, H = y === void 0 ? P.Options : y;
311
+ let z;
312
+ e[3] !== m || e[4] !== c || e[5] !== a || e[6] !== l || e[7] !== n || e[8] !== d || e[9] !== s || e[10] !== r || e[11] !== p || e[12] !== f || e[13] !== w || e[14] !== v || e[15] !== g || e[16] !== h || e[17] !== S ? (z = {
317
313
  enabled: l,
318
- values: T,
319
- actionProps: r,
314
+ values: S,
315
+ actionProps: c,
320
316
  chipProps: a,
321
317
  labels: n,
322
- modes: c,
323
- modesMapping: s,
318
+ modes: s,
319
+ modesMapping: r,
324
320
  modeSelected: d,
325
- PaperProps: v,
321
+ PaperProps: m,
326
322
  onActionToggle: p,
327
323
  onChipToggle: g,
328
324
  onDelete: h,
329
- onChangeMode: f,
330
- onAllChipToggle: m,
331
- onAllDelete: b
332
- }, e[7] = v, e[8] = r, e[9] = a, e[10] = l, e[11] = n, e[12] = d, e[13] = c, e[14] = s, e[15] = p, e[16] = m, e[17] = b, e[18] = f, e[19] = g, e[20] = h, e[21] = T, e[22] = j) : j = e[22];
333
- const M = j;
334
- let I;
335
- e[23] !== _ ? (I = {
325
+ onChangeMode: v,
326
+ onAllChipToggle: f,
327
+ onAllDelete: w
328
+ }, e[3] = m, e[4] = c, e[5] = a, e[6] = l, e[7] = n, e[8] = d, e[9] = s, e[10] = r, e[11] = p, e[12] = f, e[13] = w, e[14] = v, e[15] = g, e[16] = h, e[17] = S, e[18] = z) : z = e[18];
329
+ const b = z;
330
+ let L;
331
+ e[19] !== _ ? (L = {
336
332
  ...A.container,
337
333
  ..._
338
- }, e[23] = _, e[24] = I) : I = e[24];
339
- let P;
340
- e[25] !== E || e[26] !== M ? (P = !!E && /* @__PURE__ */ i(E, { ...M }), e[25] = E, e[26] = M, e[27] = P) : P = e[27];
341
- let R;
342
- e[28] !== z || e[29] !== M ? (R = !!z && /* @__PURE__ */ i(Q, { children: (Y) => /* @__PURE__ */ i(z, { ...M, ...Y }) }), e[28] = z, e[29] = M, e[30] = R) : R = e[30];
334
+ }, e[19] = _, e[20] = L) : L = e[20];
335
+ let Z;
336
+ e[21] !== V || e[22] !== b ? (Z = !!V && /* @__PURE__ */ i(V, { ...b }), e[21] = V, e[22] = b, e[23] = Z) : Z = e[23];
337
+ let I;
338
+ e[24] !== H || e[25] !== b ? (I = !!H && /* @__PURE__ */ i(J, { children: (K) => /* @__PURE__ */ i(H, { ...b, ...K }) }), e[24] = H, e[25] = b, e[26] = I) : I = e[26];
343
339
  let O;
344
- e[31] !== G || e[32] !== M ? (O = !!G && /* @__PURE__ */ i(G, { ...M }), e[31] = G, e[32] = M, e[33] = O) : O = e[33];
345
- let k;
346
- e[34] !== H || e[35] !== M ? (k = !!H && /* @__PURE__ */ i(H, { ...M }), e[34] = H, e[35] = M, e[36] = k) : k = e[36];
347
- let W;
348
- return e[37] !== v || e[38] !== I || e[39] !== P || e[40] !== R || e[41] !== O || e[42] !== k ? (W = /* @__PURE__ */ B(le, { sx: I, ...v, children: [
349
- P,
350
- R,
340
+ e[27] !== G || e[28] !== b ? (O = !!G && /* @__PURE__ */ i(G, { ...b }), e[27] = G, e[28] = b, e[29] = O) : O = e[29];
341
+ let E;
342
+ e[30] !== $ || e[31] !== b ? (E = !!$ && /* @__PURE__ */ i($, { ...b }), e[30] = $, e[31] = b, e[32] = E) : E = e[32];
343
+ let j;
344
+ return e[33] !== m || e[34] !== Z || e[35] !== I || e[36] !== O || e[37] !== E || e[38] !== L ? (j = /* @__PURE__ */ D(oe, { sx: L, ...m, children: [
345
+ Z,
346
+ I,
351
347
  O,
352
- k
353
- ] }), e[37] = v, e[38] = I, e[39] = P, e[40] = R, e[41] = O, e[42] = k, e[43] = W) : W = e[43], W;
348
+ E
349
+ ] }), e[33] = m, e[34] = Z, e[35] = I, e[36] = O, e[37] = E, e[38] = L, e[39] = j) : j = e[39], j;
354
350
  }
355
- function be(t) {
356
- const e = C(12), {
351
+ function we(t) {
352
+ const e = M(12), {
357
353
  actionProps: l,
358
354
  labels: o,
359
- enabled: r,
355
+ enabled: c,
360
356
  children: a,
361
357
  onActionToggle: n
362
- } = t, c = r ? "active" : "inactive", s = o?.tooltip?.[c] ?? L.action.tooltip[c], d = l?.TooltipProps;
358
+ } = t, s = c ? "active" : "inactive", r = o?.tooltip?.[s] ?? B.action.tooltip[s], d = l?.TooltipProps;
363
359
  let u;
364
- e[0] !== r || e[1] !== n ? (u = () => n(!r), e[0] = r, e[1] = n, e[2] = u) : u = e[2];
360
+ e[0] !== c || e[1] !== n ? (u = () => n(!c), e[0] = c, e[1] = n, e[2] = u) : u = e[2];
365
361
  let p;
366
- e[3] !== s || e[4] !== a || e[5] !== r || e[6] !== u ? (p = /* @__PURE__ */ i(de, { value: "toggle", sx: A.actions.icon, onClick: u, "aria-label": s, selected: r, children: a }), e[3] = s, e[4] = a, e[5] = r, e[6] = u, e[7] = p) : p = e[7];
362
+ e[3] !== r || e[4] !== a || e[5] !== c || e[6] !== u ? (p = /* @__PURE__ */ i(ae, { value: "toggle", sx: A.actions.icon, onClick: u, "aria-label": r, selected: c, children: a }), e[3] = r, e[4] = a, e[5] = c, e[6] = u, e[7] = p) : p = e[7];
367
363
  let g;
368
- return e[8] !== s || e[9] !== d || e[10] !== p ? (g = /* @__PURE__ */ i(K, { title: s, placement: "right", ...d, children: p }), e[8] = s, e[9] = d, e[10] = p, e[11] = g) : g = e[11], g;
364
+ return e[8] !== r || e[9] !== d || e[10] !== p ? (g = /* @__PURE__ */ i(q, { title: r, placement: "right", ...d, children: p }), e[8] = r, e[9] = d, e[10] = p, e[11] = g) : g = e[11], g;
369
365
  }
370
- function Q(t) {
371
- const e = C(24), {
366
+ const Me = {};
367
+ function J(t) {
368
+ const e = M(22), {
372
369
  TriggerProps: l,
373
370
  MenuProps: o,
374
- children: r
375
- } = t;
376
- let a;
377
- e[0] !== l ? (a = l === void 0 ? {} : l, e[0] = l, e[1] = a) : a = e[1];
378
- const n = a, {
379
- Icon: c,
371
+ children: c
372
+ } = t, a = l === void 0 ? Me : l, {
373
+ Icon: n,
380
374
  sx: s
381
- } = n;
382
- let d;
383
- e[2] !== c ? (d = c ?? /* @__PURE__ */ i(ee, {}), e[2] = c, e[3] = d) : d = e[3];
384
- const u = d, [p, g] = ue(null), h = !!p;
375
+ } = a;
376
+ let r;
377
+ e[0] !== n ? (r = n ?? /* @__PURE__ */ i(Q, {}), e[0] = n, e[1] = r) : r = e[1];
378
+ const d = r, [u, p] = de(null), g = !!u;
379
+ let h;
380
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = (_) => {
381
+ p(_.currentTarget);
382
+ }, e[2] = h) : h = e[2];
383
+ const v = h;
385
384
  let f;
386
- e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = (_) => {
387
- g(_.currentTarget);
388
- }, e[4] = f) : f = e[4];
389
- const m = f;
390
- let b;
391
- e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = () => {
392
- g(null);
393
- }, e[5] = b) : b = e[5];
394
- const $ = b;
395
- let x;
396
- e[6] !== s ? (x = {
385
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = () => {
386
+ p(null);
387
+ }, e[3] = f) : f = e[3];
388
+ const w = f;
389
+ let C;
390
+ e[4] !== s ? (C = {
397
391
  ...A.options.icon,
398
392
  ...s
399
- }, e[6] = s, e[7] = x) : x = e[7];
400
- let y;
401
- e[8] !== u || e[9] !== x ? (y = /* @__PURE__ */ i(re, { sx: x, onClick: m, children: u }), e[8] = u, e[9] = x, e[10] = y) : y = e[10];
402
- let Z;
403
- e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Z = {
393
+ }, e[4] = s, e[5] = C) : C = e[5];
394
+ let x;
395
+ e[6] !== d || e[7] !== C ? (x = /* @__PURE__ */ i(ne, { sx: C, onClick: v, children: d }), e[6] = d, e[7] = C, e[8] = x) : x = e[8];
396
+ let R;
397
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
404
398
  "aria-labelledby": "lasso-button",
405
399
  sx: A.options.menu
406
- }, e[11] = Z) : Z = e[11];
400
+ }, e[9] = R) : R = e[9];
401
+ let y;
402
+ e[10] !== c ? (y = c({
403
+ onClose: w
404
+ }), e[10] = c, e[11] = y) : y = e[11];
407
405
  let S;
408
- e[12] !== r ? (S = r({
409
- onClose: $
410
- }), e[12] = r, e[13] = S) : S = e[13];
406
+ e[12] !== y ? (S = /* @__PURE__ */ i("div", { children: y }), e[12] = y, e[13] = S) : S = e[13];
411
407
  let T;
412
- e[14] !== S ? (T = /* @__PURE__ */ i("div", { children: S }), e[14] = S, e[15] = T) : T = e[15];
413
- let w;
414
- e[16] !== o || e[17] !== p || e[18] !== h || e[19] !== T ? (w = /* @__PURE__ */ i(ie, { id: "lasso-menu", anchorEl: p, open: h, onClose: $, MenuListProps: Z, ...o, children: T }), e[16] = o, e[17] = p, e[18] = h, e[19] = T, e[20] = w) : w = e[20];
415
- let v;
416
- return e[21] !== w || e[22] !== y ? (v = /* @__PURE__ */ B(V, { children: [
417
- y,
418
- w
419
- ] }), e[21] = w, e[22] = y, e[23] = v) : v = e[23], v;
408
+ e[14] !== o || e[15] !== u || e[16] !== g || e[17] !== S ? (T = /* @__PURE__ */ i(le, { id: "lasso-menu", anchorEl: u, open: g, onClose: w, MenuListProps: R, ...o, children: S }), e[14] = o, e[15] = u, e[16] = g, e[17] = S, e[18] = T) : T = e[18];
409
+ let m;
410
+ return e[19] !== T || e[20] !== x ? (m = /* @__PURE__ */ D(k, { children: [
411
+ x,
412
+ T
413
+ ] }), e[19] = T, e[20] = x, e[21] = m) : m = e[21], m;
420
414
  }
421
- function we(t) {
422
- const e = C(5), {
415
+ function Se(t) {
416
+ const e = M(5), {
423
417
  data: l,
424
418
  labels: o,
425
- children: r
419
+ children: c
426
420
  } = t;
427
421
  if (l.length <= 1)
428
422
  return null;
429
- const a = o?.mode?.title ?? L.options.mode.title;
423
+ const a = o?.mode?.title ?? B.options.mode.title;
430
424
  let n;
431
- e[0] !== a ? (n = /* @__PURE__ */ i(N, { variant: "subtitle2", color: "text.secondary", sx: A.options.title, children: a }), e[0] = a, e[1] = n) : n = e[1];
432
- let c;
433
- return e[2] !== r || e[3] !== n ? (c = /* @__PURE__ */ B(V, { children: [
425
+ e[0] !== a ? (n = /* @__PURE__ */ i(Y, { variant: "subtitle2", color: "text.secondary", sx: A.options.title, children: a }), e[0] = a, e[1] = n) : n = e[1];
426
+ let s;
427
+ return e[2] !== c || e[3] !== n ? (s = /* @__PURE__ */ D(k, { children: [
434
428
  n,
435
- r
436
- ] }), e[2] = r, e[3] = n, e[4] = c) : c = e[4], c;
429
+ c
430
+ ] }), e[2] = c, e[3] = n, e[4] = s) : s = e[4], s;
437
431
  }
438
- function F({
432
+ function X({
439
433
  data: t,
440
434
  modeSelected: e,
441
435
  labels: l,
442
436
  onChangeMode: o,
443
- onClose: r
437
+ onClose: c
444
438
  }) {
445
- const a = (n, c) => {
446
- n.preventDefault(), o?.(c), r();
439
+ const a = (n, s) => {
440
+ n.preventDefault(), o?.(s), c();
447
441
  };
448
442
  return t.filter((n) => !!n).map((n) => {
449
- const s = (l?.mode?.options ?? L.options.mode.options)[n.value];
450
- return /* @__PURE__ */ B(U, { disabled: !!n.disabled, onClick: (d) => a(d, n.value), selected: n.value === e, children: [
451
- /* @__PURE__ */ i(se, { sx: A.options.icons, children: /* @__PURE__ */ i(ae, { children: n.icon }) }),
452
- /* @__PURE__ */ i(ce, { children: s })
443
+ const r = (l?.mode?.options ?? B.options.mode.options)[n.value];
444
+ return /* @__PURE__ */ D(U, { disabled: !!n.disabled, onClick: (d) => a(d, n.value), selected: n.value === e, children: [
445
+ /* @__PURE__ */ i(re, { sx: A.options.icons, children: /* @__PURE__ */ i(ce, { children: n.icon }) }),
446
+ /* @__PURE__ */ i(se, { children: r })
453
447
  ] }, n.value);
454
448
  });
455
449
  }
456
- function Me(t) {
457
- const e = C(8), {
450
+ function Te(t) {
451
+ const e = M(8), {
458
452
  values: l,
459
453
  labels: o,
460
- onAllChipToggle: r,
454
+ onAllChipToggle: c,
461
455
  onAllDelete: a
462
456
  } = t;
463
457
  if (!l?.length || l.length <= 1)
464
458
  return null;
465
- const c = l?.some(Se) ? o?.actions?.toggleAll?.active ?? L.actions.toggleAll.active : o?.actions?.toggleAll?.inactive ?? L.actions.toggleAll.inactive, s = o?.actions?.deleteAll ?? L.actions.deleteAll;
459
+ const s = l?.some(Ce) ? o?.actions?.toggleAll?.active ?? B.actions.toggleAll.active : o?.actions?.toggleAll?.inactive ?? B.actions.toggleAll.inactive, r = o?.actions?.deleteAll ?? B.actions.deleteAll;
466
460
  let d;
467
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ i(X, { orientation: "vertical", flexItem: !0 }), e[0] = d) : d = e[0];
461
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ i(W, { orientation: "vertical", flexItem: !0 }), e[0] = d) : d = e[0];
468
462
  let u, p;
469
463
  e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
470
- Icon: /* @__PURE__ */ i(te, {}),
464
+ Icon: /* @__PURE__ */ i(ee, {}),
471
465
  sx: A.options.more
472
466
  }, p = {
473
467
  anchorOrigin: {
@@ -480,80 +474,80 @@ function Me(t) {
480
474
  }
481
475
  }, e[1] = u, e[2] = p) : (u = e[1], p = e[2]);
482
476
  let g;
483
- return e[3] !== s || e[4] !== r || e[5] !== a || e[6] !== c ? (g = /* @__PURE__ */ B(V, { children: [
477
+ return e[3] !== r || e[4] !== c || e[5] !== a || e[6] !== s ? (g = /* @__PURE__ */ D(k, { children: [
484
478
  d,
485
- /* @__PURE__ */ i(Q, { TriggerProps: u, MenuProps: p, children: (h) => /* @__PURE__ */ B(V, { children: [
479
+ /* @__PURE__ */ i(J, { TriggerProps: u, MenuProps: p, children: (h) => /* @__PURE__ */ D(k, { children: [
486
480
  /* @__PURE__ */ i(U, { color: "inherit", onClick: () => {
487
- r?.(), h.onClose();
488
- }, children: c }),
489
- /* @__PURE__ */ i(X, {}),
481
+ c?.(), h.onClose();
482
+ }, children: s }),
483
+ /* @__PURE__ */ i(W, {}),
490
484
  /* @__PURE__ */ i(U, { color: "error", onClick: () => {
491
485
  a?.(), h.onClose();
492
- }, children: /* @__PURE__ */ i(N, { variant: "body2", color: "error", children: s }) })
486
+ }, children: /* @__PURE__ */ i(Y, { variant: "body2", color: "error", children: r }) })
493
487
  ] }) })
494
- ] }), e[3] = s, e[4] = r, e[5] = a, e[6] = c, e[7] = g) : g = e[7], g;
488
+ ] }), e[3] = r, e[4] = c, e[5] = a, e[6] = s, e[7] = g) : g = e[7], g;
495
489
  }
496
- function Se(t) {
490
+ function Ce(t) {
497
491
  return t.visible;
498
492
  }
499
- D.Action = function({
493
+ P.Action = function({
500
494
  modes: e,
501
495
  modesMapping: l,
502
496
  modeSelected: o,
503
- actionProps: r,
497
+ actionProps: c,
504
498
  enabled: a,
505
499
  labels: n,
506
- onActionToggle: c
500
+ onActionToggle: s
507
501
  }) {
508
- const s = J(() => q(e ?? {}, l ?? {}), [e, l]), d = (h) => c?.(h), p = (o ? o in (e ?? {}) : !1) ? o : Object.keys(s)[0], g = s[p];
509
- return /* @__PURE__ */ i(be, { actionProps: r, labels: n?.action, enabled: a ?? !1, onActionToggle: d, children: g?.icon });
502
+ const r = N(() => F(e ?? {}, l ?? {}), [e, l]), d = (h) => s?.(h), p = (o ? o in (e ?? {}) : !1) ? o : Object.keys(r)[0], g = r[p];
503
+ return /* @__PURE__ */ i(we, { actionProps: c, labels: n?.action, enabled: a ?? !1, onActionToggle: d, children: g?.icon });
510
504
  };
511
- D.Chips = function({
505
+ P.Chips = function({
512
506
  values: e,
513
507
  labels: l,
514
508
  chipProps: o,
515
- onDelete: r,
509
+ onDelete: c,
516
510
  onChipToggle: a,
517
511
  onActionToggle: n
518
512
  }) {
519
- const c = (s) => (n?.(!1), r?.(s));
520
- return !!e?.length && /* @__PURE__ */ i(ne, { sx: A.chip.container, children: e?.map((s) => /* @__PURE__ */ i(ve, { value: s, labels: l?.chip, chipProps: o, onDelete: c, onChipToggle: (d, u) => a?.(d, u) }, s.id)) });
513
+ const s = (r) => (n?.(!1), c?.(r));
514
+ return !!e?.length && /* @__PURE__ */ i(ie, { sx: A.chip.container, children: e?.map((r) => /* @__PURE__ */ i(me, { value: r, labels: l?.chip, chipProps: o, onDelete: s, onChipToggle: (d, u) => a?.(d, u) }, r.id)) });
521
515
  };
522
- D.SecondaryActions = Me;
523
- D.Options = function({
516
+ P.SecondaryActions = Te;
517
+ P.Options = function({
524
518
  values: e,
525
519
  modes: l,
526
520
  modesMapping: o,
527
- modeSelected: r,
521
+ modeSelected: c,
528
522
  labels: a,
529
523
  onChangeMode: n,
530
- ...c
524
+ ...s
531
525
  }) {
532
- const s = J(() => q(l ?? {}, o ?? {}), [l, o]), {
526
+ const r = N(() => F(l ?? {}, o ?? {}), [l, o]), {
533
527
  edit: d,
534
528
  ...u
535
- } = s, g = (r ? r in (l ?? {}) : !1) ? r : Object.keys(s)[0], h = Object.values(u), f = (m) => n?.(m);
536
- return /* @__PURE__ */ B(V, { children: [
537
- /* @__PURE__ */ i(we, { data: h, labels: a?.options, children: /* @__PURE__ */ i(F, { ...c, labels: a?.options, data: h, modeSelected: g, onChangeMode: f }) }),
538
- !!d && /* @__PURE__ */ B(V, { children: [
539
- /* @__PURE__ */ i(X, {}),
540
- /* @__PURE__ */ i(F, { ...c, labels: a?.options, data: [{
529
+ } = r, g = (c ? c in (l ?? {}) : !1) ? c : Object.keys(r)[0], h = Object.values(u), v = (f) => n?.(f);
530
+ return /* @__PURE__ */ D(k, { children: [
531
+ /* @__PURE__ */ i(Se, { data: h, labels: a?.options, children: /* @__PURE__ */ i(X, { ...s, labels: a?.options, data: h, modeSelected: g, onChangeMode: v }) }),
532
+ !!d && /* @__PURE__ */ D(k, { children: [
533
+ /* @__PURE__ */ i(W, {}),
534
+ /* @__PURE__ */ i(X, { ...s, labels: a?.options, data: [{
541
535
  ...d,
542
536
  disabled: !e?.length
543
- }], modeSelected: g, onChangeMode: f })
537
+ }], modeSelected: g, onChangeMode: v })
544
538
  ] })
545
539
  ] });
546
540
  };
547
541
  export {
548
542
  Be as D,
549
- ve as L,
550
- me as S,
551
- L as a,
552
- he as b,
553
- fe as c,
554
- ge as d,
555
- pe as e,
556
- D as f,
543
+ me as L,
544
+ fe as S,
545
+ B as a,
546
+ pe as b,
547
+ he as c,
548
+ ue as d,
549
+ ge as e,
550
+ P as f,
557
551
  A as s
558
552
  };
559
- //# sourceMappingURL=lasso-tool-jl4YK02H.js.map
553
+ //# sourceMappingURL=lasso-tool-BYbxrJ-7.js.map