@carto/ps-react-ui 5.0.0-widgets.8 → 5.0.0-widgets.9

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 (49) hide show
  1. package/dist/{error-G3sy6lw3.js → error-B2IJ9d2h.js} +2 -2
  2. package/dist/{error-G3sy6lw3.js.map → error-B2IJ9d2h.js.map} +1 -1
  3. package/dist/markdown-ui-CpNYUPqC.js +68 -0
  4. package/dist/markdown-ui-CpNYUPqC.js.map +1 -0
  5. package/dist/{no-data-DfkC_Kc_.js → no-data-C54XJt13.js} +2 -2
  6. package/dist/{no-data-DfkC_Kc_.js.map → no-data-C54XJt13.js.map} +1 -1
  7. package/dist/row-DLKZN5aF.js +33 -0
  8. package/dist/row-DLKZN5aF.js.map +1 -0
  9. package/dist/{row-B9hTUitn.js → row-DrHwXNvF.js} +2 -2
  10. package/dist/{row-B9hTUitn.js.map → row-DrHwXNvF.js.map} +1 -1
  11. package/dist/series-Cf1QPZHV.js +83 -0
  12. package/dist/series-Cf1QPZHV.js.map +1 -0
  13. package/dist/{series-DojKkd_o.js → series-Do02NQUF.js} +3 -3
  14. package/dist/{series-DojKkd_o.js.map → series-Do02NQUF.js.map} +1 -1
  15. package/dist/styles-CcC5L2cr.js +77 -0
  16. package/dist/styles-CcC5L2cr.js.map +1 -0
  17. package/dist/types/widgets/markdown/types.d.ts +1 -1
  18. package/dist/types/widgets/table/hooks/use-selection.d.ts +3 -3
  19. package/dist/types/widgets/table/hooks/use-sort.d.ts +1 -5
  20. package/dist/types/widgets/table/types.d.ts +2 -2
  21. package/dist/utils-DNtU8q7E.js +144 -0
  22. package/dist/utils-DNtU8q7E.js.map +1 -0
  23. package/dist/{widget-store-Dd7_sWZT.js → widget-store-CB6Trp_0.js} +31 -32
  24. package/dist/{widget-store-Dd7_sWZT.js.map → widget-store-CB6Trp_0.js.map} +1 -1
  25. package/dist/widget-store-yDO2ul8g.js +44 -0
  26. package/dist/widget-store-yDO2ul8g.js.map +1 -0
  27. package/dist/widgets/actions.js +448 -441
  28. package/dist/widgets/actions.js.map +1 -1
  29. package/dist/widgets/bar.js +1 -1
  30. package/dist/widgets/category.js +1 -1
  31. package/dist/widgets/echart.js +1 -1
  32. package/dist/widgets/error.js +1 -1
  33. package/dist/widgets/formula.js +3 -3
  34. package/dist/widgets/histogram.js +1 -1
  35. package/dist/widgets/markdown.js +1 -1
  36. package/dist/widgets/no-data.js +1 -1
  37. package/dist/widgets/pie.js +1 -1
  38. package/dist/widgets/range.js +2 -2
  39. package/dist/widgets/root.js +1 -1
  40. package/dist/widgets/scatterplot.js +1 -1
  41. package/dist/widgets/skeleton-loader.js +1 -1
  42. package/dist/widgets/spread.js +3 -3
  43. package/dist/widgets/stores.js +1 -1
  44. package/dist/widgets/table.js +491 -503
  45. package/dist/widgets/table.js.map +1 -1
  46. package/dist/widgets/timeseries.js +1 -1
  47. package/dist/widgets/wrapper.js +1 -1
  48. package/dist/widgets.js +3 -3
  49. package/package.json +1 -1
@@ -1,631 +1,619 @@
1
1
  import { jsx as p, jsxs as G } from "react/jsx-runtime";
2
2
  import { c as x } from "react/compiler-runtime";
3
- import { TableSortLabel as le, TableCell as D, Checkbox as K, Link as ie, Typography as re, TableRow as J, IconButton as H, Box as q, TablePagination as se, Table as Q, TableHead as X, TableBody as Y, Paper as ce, TableContainer as ae, Skeleton as Z } from "@mui/material";
4
- import fe from "react-markdown";
5
- import ue from "@mui/icons-material/FirstPage";
6
- import de from "@mui/icons-material/KeyboardArrowLeft";
7
- import ge from "@mui/icons-material/KeyboardArrowRight";
8
- import he from "@mui/icons-material/LastPage";
9
- import { useRef as pe, useEffect as me } from "react";
10
- import { u as W } from "../widget-store-Dd7_sWZT.js";
11
- import { useShallow as U } from "zustand/shallow";
3
+ import { TableSortLabel as ee, TableCell as L, Checkbox as q, Link as te, Typography as ne, TableRow as J, IconButton as U, Box as Q, TablePagination as oe, Table as X, TableHead as Y, TableBody as Z, Paper as le, TableContainer as ie, Skeleton as V } from "@mui/material";
4
+ import re from "react-markdown";
5
+ import se from "@mui/icons-material/FirstPage";
6
+ import ce from "@mui/icons-material/KeyboardArrowLeft";
7
+ import ae from "@mui/icons-material/KeyboardArrowRight";
8
+ import fe from "@mui/icons-material/LastPage";
9
+ import { useRef as ue, useEffect as de } from "react";
10
+ import { u as D } from "../widget-store-CB6Trp_0.js";
11
+ import { useShallow as j } from "zustand/shallow";
12
12
  import "@mui/icons-material";
13
- import { d as z, a as B } from "../exports-Cr43OCul.js";
13
+ import { d as K, a as H } from "../exports-Cr43OCul.js";
14
14
  import "../lasso-tool-CYn3ivf-.js";
15
15
  import "../cjs-D9ro6BXv.js";
16
16
  import "@dnd-kit/core";
17
17
  import "@dnd-kit/sortable";
18
18
  import "@dnd-kit/utilities";
19
- function Pe(o) {
19
+ function ge(n) {
20
20
  const e = x(26), {
21
21
  column: t,
22
- sortState: n,
23
- onSort: i,
22
+ sortState: o,
23
+ onSort: r,
24
24
  isSelectAll: l,
25
- isAllSelected: r,
26
- isIndeterminate: a,
27
- onSelectAll: f
28
- } = o;
25
+ isAllSelected: i,
26
+ isIndeterminate: s,
27
+ onSelectAll: a
28
+ } = n;
29
29
  if (l) {
30
- let g;
31
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (g = {
30
+ let u;
31
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
32
32
  "aria-label": "select all rows"
33
- }, e[0] = g) : g = e[0];
34
- let h;
35
- return e[1] !== r || e[2] !== a || e[3] !== f ? (h = /* @__PURE__ */ p(D, { padding: "checkbox", children: /* @__PURE__ */ p(K, { checked: r, indeterminate: a, onChange: f, inputProps: g }) }), e[1] = r, e[2] = a, e[3] = f, e[4] = h) : h = e[4], h;
33
+ }, e[0] = u) : u = e[0];
34
+ let m;
35
+ return e[1] !== i || e[2] !== s || e[3] !== a ? (m = /* @__PURE__ */ p(L, { padding: "checkbox", children: /* @__PURE__ */ p(q, { checked: i, indeterminate: s, onChange: a, inputProps: u }) }), e[1] = i, e[2] = s, e[3] = a, e[4] = m) : m = e[4], m;
36
36
  }
37
- const s = n?.columnId === t.id, c = s ? n.direction : void 0;
38
- if (t.sortable && i) {
39
- let g;
40
- e[5] !== t.width ? (g = {
37
+ const f = o?.columnId === t.id, c = f ? o.direction : void 0;
38
+ if (t.sortable && r) {
39
+ let u;
40
+ e[5] !== t.width ? (u = {
41
41
  width: t.width
42
- }, e[5] = t.width, e[6] = g) : g = e[6];
43
- const h = c ?? "asc";
44
- let m;
45
- e[7] !== t.id || e[8] !== i ? (m = () => i(t.id), e[7] = t.id, e[8] = i, e[9] = m) : m = e[9];
46
- let b;
47
- e[10] !== t.label || e[11] !== s || e[12] !== h || e[13] !== m ? (b = /* @__PURE__ */ p(le, { active: s, direction: h, onClick: m, children: t.label }), e[10] = t.label, e[11] = s, e[12] = h, e[13] = m, e[14] = b) : b = e[14];
48
- let C;
49
- return e[15] !== t.align || e[16] !== c || e[17] !== g || e[18] !== b ? (C = /* @__PURE__ */ p(D, { align: t.align, style: g, sortDirection: c, children: b }), e[15] = t.align, e[16] = c, e[17] = g, e[18] = b, e[19] = C) : C = e[19], C;
42
+ }, e[5] = t.width, e[6] = u) : u = e[6];
43
+ const m = c ?? "asc";
44
+ let h;
45
+ e[7] !== t.id || e[8] !== r ? (h = () => r(t.id), e[7] = t.id, e[8] = r, e[9] = h) : h = e[9];
46
+ let S;
47
+ e[10] !== t.label || e[11] !== f || e[12] !== m || e[13] !== h ? (S = /* @__PURE__ */ p(ee, { active: f, direction: m, onClick: h, children: t.label }), e[10] = t.label, e[11] = f, e[12] = m, e[13] = h, e[14] = S) : S = e[14];
48
+ let _;
49
+ return e[15] !== t.align || e[16] !== c || e[17] !== u || e[18] !== S ? (_ = /* @__PURE__ */ p(L, { align: t.align, style: u, sortDirection: c, children: S }), e[15] = t.align, e[16] = c, e[17] = u, e[18] = S, e[19] = _) : _ = e[19], _;
50
50
  }
51
- let u;
52
- e[20] !== t.width ? (u = {
51
+ let d;
52
+ e[20] !== t.width ? (d = {
53
53
  width: t.width
54
- }, e[20] = t.width, e[21] = u) : u = e[21];
55
- let P;
56
- return e[22] !== t.align || e[23] !== t.label || e[24] !== u ? (P = /* @__PURE__ */ p(D, { align: t.align, style: u, children: t.label }), e[22] = t.align, e[23] = t.label, e[24] = u, e[25] = P) : P = e[25], P;
54
+ }, e[20] = t.width, e[21] = d) : d = e[21];
55
+ let b;
56
+ return e[22] !== t.align || e[23] !== t.label || e[24] !== d ? (b = /* @__PURE__ */ p(L, { align: t.align, style: d, children: t.label }), e[22] = t.align, e[23] = t.label, e[24] = d, e[25] = b) : b = e[25], b;
57
57
  }
58
- function be(o) {
59
- return o == null ? "" : Array.isArray(o) ? `[${o.map((t) => typeof t == "string" ? `"${t}"` : String(t)).join(", ")}]` : typeof o == "object" ? JSON.stringify(o) : o;
58
+ function me(n) {
59
+ return n == null ? "" : Array.isArray(n) ? `[${n.map((t) => typeof t == "string" ? `"${t}"` : String(t)).join(", ")}]` : typeof n == "object" ? JSON.stringify(n) : n;
60
60
  }
61
- function Se(o, e, t) {
62
- if (o == null) return 1;
61
+ function pe(n, e, t) {
62
+ if (n == null) return 1;
63
63
  if (e == null) return -1;
64
- let n = 0;
65
- if (typeof o == "string" && typeof e == "string")
66
- n = o.localeCompare(e);
67
- else if (typeof o == "number" && typeof e == "number")
68
- n = o - e;
69
- else if (typeof o == "boolean" && typeof e == "boolean")
70
- n = o === e ? 0 : o ? 1 : -1;
71
- else if (typeof o == "object" || typeof e == "object") {
72
- const i = JSON.stringify(o), l = JSON.stringify(e);
73
- n = i.localeCompare(l);
64
+ let o = 0;
65
+ if (typeof n == "string" && typeof e == "string")
66
+ o = n.localeCompare(e);
67
+ else if (typeof n == "number" && typeof e == "number")
68
+ o = n - e;
69
+ else if (typeof n == "boolean" && typeof e == "boolean")
70
+ o = n === e ? 0 : n ? 1 : -1;
71
+ else if (typeof n == "object" || typeof e == "object") {
72
+ const r = JSON.stringify(n), l = JSON.stringify(e);
73
+ o = r.localeCompare(l);
74
74
  } else
75
- n = 0;
76
- return t === "asc" ? n : -n;
75
+ o = 0;
76
+ return t === "asc" ? o : -o;
77
77
  }
78
- function ye(o, e, t) {
79
- return [...o].sort((n, i) => Se(n[e], i[e], t));
78
+ function he(n, e, t) {
79
+ return [...n].sort((o, r) => pe(o[e], r[e], t));
80
80
  }
81
- function _e(o, e, t) {
82
- const n = e * t, i = n + t;
83
- return o.slice(n, i);
81
+ function be(n, e, t) {
82
+ const o = e * t, r = o + t;
83
+ return n.slice(o, r);
84
84
  }
85
- const j = (o) => {
85
+ const N = (n) => {
86
86
  const e = x(2), {
87
87
  children: t
88
- } = o;
89
- let n;
90
- return e[0] !== t ? (n = /* @__PURE__ */ p(re, { component: "span", variant: "body2", color: "inherit", children: t }), e[0] = t, e[1] = n) : n = e[1], n;
91
- }, Ce = {
92
- h1: j,
93
- h2: j,
94
- h3: j,
95
- p: j,
88
+ } = n;
89
+ let o;
90
+ return e[0] !== t ? (o = /* @__PURE__ */ p(ne, { component: "span", variant: "body2", color: "inherit", children: t }), e[0] = t, e[1] = o) : o = e[1], o;
91
+ }, Pe = {
92
+ h1: N,
93
+ h2: N,
94
+ h3: N,
95
+ p: N,
96
96
  a: ({
97
- children: o,
97
+ children: n,
98
98
  href: e
99
99
  }) => {
100
100
  const t = e?.startsWith("http");
101
- return /* @__PURE__ */ p(ie, { href: e, target: t ? "_blank" : void 0, rel: t ? "noopener noreferrer" : void 0, color: "text.primary", underline: "always", children: o });
101
+ return /* @__PURE__ */ p(te, { href: e, target: t ? "_blank" : void 0, rel: t ? "noopener noreferrer" : void 0, color: "text.primary", underline: "always", children: n });
102
102
  },
103
103
  img: () => null,
104
- ul: j,
105
- ol: j,
106
- li: j
104
+ ul: N,
105
+ ol: N,
106
+ li: N
107
107
  };
108
- function ve(o) {
108
+ function Se(n) {
109
109
  const e = x(16), {
110
110
  column: t,
111
- value: n
112
- } = o;
111
+ value: o
112
+ } = n;
113
113
  if (t.formatter) {
114
- const a = t.align;
114
+ const s = t.align;
115
+ let a;
116
+ e[0] !== t || e[1] !== o ? (a = t.formatter(o), e[0] = t, e[1] = o, e[2] = a) : a = e[2];
115
117
  let f;
116
- e[0] !== t || e[1] !== n ? (f = t.formatter(n), e[0] = t, e[1] = n, e[2] = f) : f = e[2];
117
- let s;
118
- return e[3] !== t.align || e[4] !== f ? (s = /* @__PURE__ */ p(D, { align: a, children: f }), e[3] = t.align, e[4] = f, e[5] = s) : s = e[5], s;
118
+ return e[3] !== t.align || e[4] !== a ? (f = /* @__PURE__ */ p(L, { align: s, children: a }), e[3] = t.align, e[4] = a, e[5] = f) : f = e[5], f;
119
119
  }
120
- if (typeof n == "string") {
120
+ if (typeof o == "string") {
121
+ let s;
122
+ e[6] !== o ? (s = /* @__PURE__ */ p(re, { components: Pe, children: o }), e[6] = o, e[7] = s) : s = e[7];
121
123
  let a;
122
- e[6] !== n ? (a = /* @__PURE__ */ p(fe, { components: Ce, children: n }), e[6] = n, e[7] = a) : a = e[7];
123
- let f;
124
- return e[8] !== t.align || e[9] !== a ? (f = /* @__PURE__ */ p(D, { align: t.align, children: a }), e[8] = t.align, e[9] = a, e[10] = f) : f = e[10], f;
124
+ return e[8] !== t.align || e[9] !== s ? (a = /* @__PURE__ */ p(L, { align: t.align, children: s }), e[8] = t.align, e[9] = s, e[10] = a) : a = e[10], a;
125
125
  }
126
- const i = t.align;
126
+ const r = t.align;
127
127
  let l;
128
- e[11] !== n ? (l = be(n), e[11] = n, e[12] = l) : l = e[12];
129
- let r;
130
- return e[13] !== t.align || e[14] !== l ? (r = /* @__PURE__ */ p(D, { align: i, children: l }), e[13] = t.align, e[14] = l, e[15] = r) : r = e[15], r;
128
+ e[11] !== o ? (l = me(o), e[11] = o, e[12] = l) : l = e[12];
129
+ let i;
130
+ return e[13] !== t.align || e[14] !== l ? (i = /* @__PURE__ */ p(L, { align: r, children: l }), e[13] = t.align, e[14] = l, e[15] = i) : i = e[15], i;
131
131
  }
132
- function we(o) {
132
+ function _e(n) {
133
133
  const e = x(32), {
134
134
  row: t,
135
- columns: n,
136
- isSelected: i,
135
+ columns: o,
136
+ isSelected: r,
137
137
  selectable: l,
138
- onClick: r,
139
- onSelect: a,
140
- onMouseEnter: f,
141
- onMouseLeave: s
142
- } = o, c = i === void 0 ? !1 : i, u = l === void 0 ? !1 : l;
143
- let P;
144
- e[0] !== r || e[1] !== t ? (P = () => {
145
- r?.(t);
146
- }, e[0] = r, e[1] = t, e[2] = P) : P = e[2];
147
- const g = P;
148
- let h;
149
- e[3] !== a || e[4] !== t ? (h = ($) => {
150
- $.stopPropagation(), a?.(t);
151
- }, e[3] = a, e[4] = t, e[5] = h) : h = e[5];
152
- const m = h;
138
+ onClick: i,
139
+ onSelect: s,
140
+ onMouseEnter: a,
141
+ onMouseLeave: f
142
+ } = n, c = r === void 0 ? !1 : r, d = l === void 0 ? !1 : l;
153
143
  let b;
154
- e[6] !== f || e[7] !== t ? (b = () => {
155
- f?.(t);
156
- }, e[6] = f, e[7] = t, e[8] = b) : b = e[8];
157
- const C = b;
158
- let v;
159
- e[9] !== s ? (v = () => {
160
- s?.();
161
- }, e[9] = s, e[10] = v) : v = e[10];
162
- const k = v, T = !!f || !!s || !!r, d = r ? "pointer" : "default";
144
+ e[0] !== i || e[1] !== t ? (b = () => {
145
+ i?.(t);
146
+ }, e[0] = i, e[1] = t, e[2] = b) : b = e[2];
147
+ const u = b;
148
+ let m;
149
+ e[3] !== s || e[4] !== t ? (m = ($) => {
150
+ $.stopPropagation(), s?.(t);
151
+ }, e[3] = s, e[4] = t, e[5] = m) : m = e[5];
152
+ const h = m;
163
153
  let S;
164
- e[11] !== d ? (S = {
165
- cursor: d
166
- }, e[11] = d, e[12] = S) : S = e[12];
167
- let A;
168
- e[13] !== m || e[14] !== c || e[15] !== t || e[16] !== u ? (A = u && /* @__PURE__ */ p(D, { padding: "checkbox", children: /* @__PURE__ */ p(K, { checked: c, onClick: m, inputProps: {
154
+ e[6] !== a || e[7] !== t ? (S = () => {
155
+ a?.(t);
156
+ }, e[6] = a, e[7] = t, e[8] = S) : S = e[8];
157
+ const _ = S;
158
+ let g;
159
+ e[9] !== f ? (g = () => {
160
+ f?.();
161
+ }, e[9] = f, e[10] = g) : g = e[10];
162
+ const C = g, E = !!a || !!f || !!i, T = i ? "pointer" : "default";
163
+ let w;
164
+ e[11] !== T ? (w = {
165
+ cursor: T
166
+ }, e[11] = T, e[12] = w) : w = e[12];
167
+ let k;
168
+ e[13] !== h || e[14] !== c || e[15] !== t || e[16] !== d ? (k = d && /* @__PURE__ */ p(L, { padding: "checkbox", children: /* @__PURE__ */ p(q, { checked: c, onClick: h, inputProps: {
169
169
  "aria-label": `select row ${t.id}`
170
- } }) }), e[13] = m, e[14] = c, e[15] = t, e[16] = u, e[17] = A) : A = e[17];
171
- let y;
172
- if (e[18] !== n || e[19] !== t) {
170
+ } }) }), e[13] = h, e[14] = c, e[15] = t, e[16] = d, e[17] = k) : k = e[17];
171
+ let P;
172
+ if (e[18] !== o || e[19] !== t) {
173
173
  let $;
174
- e[21] !== t ? ($ = (O) => /* @__PURE__ */ p(ve, { column: O, value: t[O.id] }, O.id), e[21] = t, e[22] = $) : $ = e[22], y = n.map($), e[18] = n, e[19] = t, e[20] = y;
174
+ e[21] !== t ? ($ = (R) => /* @__PURE__ */ p(Se, { column: R, value: t[R.id] }, R.id), e[21] = t, e[22] = $) : $ = e[22], P = o.map($), e[18] = o, e[19] = t, e[20] = P;
175
175
  } else
176
- y = e[20];
177
- let w;
178
- return e[23] !== g || e[24] !== C || e[25] !== k || e[26] !== c || e[27] !== A || e[28] !== y || e[29] !== T || e[30] !== S ? (w = /* @__PURE__ */ G(J, { hover: T, selected: c, onClick: g, onMouseEnter: C, onMouseLeave: k, sx: S, children: [
179
- A,
180
- y
181
- ] }), e[23] = g, e[24] = C, e[25] = k, e[26] = c, e[27] = A, e[28] = y, e[29] = T, e[30] = S, e[31] = w) : w = e[31], w;
176
+ P = e[20];
177
+ let v;
178
+ return e[23] !== u || e[24] !== _ || e[25] !== C || e[26] !== c || e[27] !== k || e[28] !== P || e[29] !== E || e[30] !== w ? (v = /* @__PURE__ */ G(J, { hover: E, selected: c, onClick: u, onMouseEnter: _, onMouseLeave: C, sx: w, children: [
179
+ k,
180
+ P
181
+ ] }), e[23] = u, e[24] = _, e[25] = C, e[26] = c, e[27] = k, e[28] = P, e[29] = E, e[30] = w, e[31] = v) : v = e[31], v;
182
182
  }
183
- function V(o) {
183
+ function I(n) {
184
184
  const e = x(33), {
185
185
  count: t,
186
- page: n,
187
- rowsPerPage: i,
186
+ page: o,
187
+ rowsPerPage: r,
188
188
  onPageChange: l
189
- } = o, r = Math.max(0, Math.ceil(t / i) - 1);
190
- let a;
191
- e[0] !== l ? (a = (E) => {
192
- l(E, 0);
193
- }, e[0] = l, e[1] = a) : a = e[1];
194
- const f = a;
189
+ } = n, i = Math.max(0, Math.ceil(t / r) - 1);
195
190
  let s;
196
- e[2] !== l || e[3] !== n ? (s = (E) => {
197
- l(E, n - 1);
198
- }, e[2] = l, e[3] = n, e[4] = s) : s = e[4];
199
- const c = s;
191
+ e[0] !== l ? (s = (A) => {
192
+ l(A, 0);
193
+ }, e[0] = l, e[1] = s) : s = e[1];
194
+ const a = s;
195
+ let f;
196
+ e[2] !== l || e[3] !== o ? (f = (A) => {
197
+ l(A, o - 1);
198
+ }, e[2] = l, e[3] = o, e[4] = f) : f = e[4];
199
+ const c = f;
200
+ let d;
201
+ e[5] !== l || e[6] !== o ? (d = (A) => {
202
+ l(A, o + 1);
203
+ }, e[5] = l, e[6] = o, e[7] = d) : d = e[7];
204
+ const b = d;
200
205
  let u;
201
- e[5] !== l || e[6] !== n ? (u = (E) => {
202
- l(E, n + 1);
203
- }, e[5] = l, e[6] = n, e[7] = u) : u = e[7];
204
- const P = u;
205
- let g;
206
- e[8] !== r || e[9] !== l ? (g = (E) => {
207
- l(E, r);
208
- }, e[8] = r, e[9] = l, e[10] = g) : g = e[10];
209
- const h = g;
210
- let m;
211
- e[11] === Symbol.for("react.memo_cache_sentinel") ? (m = {
206
+ e[8] !== i || e[9] !== l ? (u = (A) => {
207
+ l(A, i);
208
+ }, e[8] = i, e[9] = l, e[10] = u) : u = e[10];
209
+ const m = u;
210
+ let h;
211
+ e[11] === Symbol.for("react.memo_cache_sentinel") ? (h = {
212
212
  flexShrink: 0,
213
213
  ml: 2.5
214
- }, e[11] = m) : m = e[11];
215
- const b = n === 0;
216
- let C;
217
- e[12] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ p(ue, {}), e[12] = C) : C = e[12];
218
- let v;
219
- e[13] !== f || e[14] !== b ? (v = /* @__PURE__ */ p(H, { onClick: f, disabled: b, "aria-label": "first page", children: C }), e[13] = f, e[14] = b, e[15] = v) : v = e[15];
220
- const k = n === 0;
214
+ }, e[11] = h) : h = e[11];
215
+ const S = o === 0;
216
+ let _;
217
+ e[12] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ p(se, {}), e[12] = _) : _ = e[12];
218
+ let g;
219
+ e[13] !== a || e[14] !== S ? (g = /* @__PURE__ */ p(U, { onClick: a, disabled: S, "aria-label": "first page", children: _ }), e[13] = a, e[14] = S, e[15] = g) : g = e[15];
220
+ const C = o === 0;
221
+ let E;
222
+ e[16] === Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ p(ce, {}), e[16] = E) : E = e[16];
221
223
  let T;
222
- e[16] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ p(de, {}), e[16] = T) : T = e[16];
223
- let d;
224
- e[17] !== c || e[18] !== k ? (d = /* @__PURE__ */ p(H, { onClick: c, disabled: k, "aria-label": "previous page", children: T }), e[17] = c, e[18] = k, e[19] = d) : d = e[19];
225
- const S = n >= r;
226
- let A;
227
- e[20] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ p(ge, {}), e[20] = A) : A = e[20];
228
- let y;
229
- e[21] !== P || e[22] !== S ? (y = /* @__PURE__ */ p(H, { onClick: P, disabled: S, "aria-label": "next page", children: A }), e[21] = P, e[22] = S, e[23] = y) : y = e[23];
230
- const w = n >= r;
224
+ e[17] !== c || e[18] !== C ? (T = /* @__PURE__ */ p(U, { onClick: c, disabled: C, "aria-label": "previous page", children: E }), e[17] = c, e[18] = C, e[19] = T) : T = e[19];
225
+ const w = o >= i;
226
+ let k;
227
+ e[20] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ p(ae, {}), e[20] = k) : k = e[20];
228
+ let P;
229
+ e[21] !== b || e[22] !== w ? (P = /* @__PURE__ */ p(U, { onClick: b, disabled: w, "aria-label": "next page", children: k }), e[21] = b, e[22] = w, e[23] = P) : P = e[23];
230
+ const v = o >= i;
231
231
  let $;
232
- e[24] === Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ p(he, {}), e[24] = $) : $ = e[24];
233
- let O;
234
- e[25] !== h || e[26] !== w ? (O = /* @__PURE__ */ p(H, { onClick: h, disabled: w, "aria-label": "last page", children: $ }), e[25] = h, e[26] = w, e[27] = O) : O = e[27];
235
- let _;
236
- return e[28] !== d || e[29] !== y || e[30] !== O || e[31] !== v ? (_ = /* @__PURE__ */ G(q, { sx: m, children: [
237
- v,
238
- d,
239
- y,
240
- O
241
- ] }), e[28] = d, e[29] = y, e[30] = O, e[31] = v, e[32] = _) : _ = e[32], _;
232
+ e[24] === Symbol.for("react.memo_cache_sentinel") ? ($ = /* @__PURE__ */ p(fe, {}), e[24] = $) : $ = e[24];
233
+ let R;
234
+ e[25] !== m || e[26] !== v ? (R = /* @__PURE__ */ p(U, { onClick: m, disabled: v, "aria-label": "last page", children: $ }), e[25] = m, e[26] = v, e[27] = R) : R = e[27];
235
+ let y;
236
+ return e[28] !== T || e[29] !== P || e[30] !== R || e[31] !== g ? (y = /* @__PURE__ */ G(Q, { sx: h, children: [
237
+ g,
238
+ T,
239
+ P,
240
+ R
241
+ ] }), e[28] = T, e[29] = P, e[30] = R, e[31] = g, e[32] = y) : y = e[32], y;
242
242
  }
243
- function ke(o) {
243
+ function ye(n) {
244
244
  const e = x(13), {
245
245
  page: t,
246
- rowsPerPage: n,
247
- total: i,
246
+ rowsPerPage: o,
247
+ total: r,
248
248
  rowsPerPageOptions: l,
249
- onPageChange: r,
250
- onRowsPerPageChange: a
251
- } = o;
252
- let f;
253
- e[0] !== l ? (f = l === void 0 ? [5, 10, 25, 50] : l, e[0] = l, e[1] = f) : f = e[1];
254
- const s = f;
249
+ onPageChange: i,
250
+ onRowsPerPageChange: s
251
+ } = n;
252
+ let a;
253
+ e[0] !== l ? (a = l === void 0 ? [5, 10, 25, 50] : l, e[0] = l, e[1] = a) : a = e[1];
254
+ const f = a;
255
255
  let c;
256
- e[2] !== r ? (c = (m, b) => {
257
- r(b);
258
- }, e[2] = r, e[3] = c) : c = e[3];
259
- const u = c;
260
- let P;
261
- e[4] !== a ? (P = (m) => {
262
- a(parseInt(m.target.value, 10));
263
- }, e[4] = a, e[5] = P) : P = e[5];
264
- const g = P;
265
- let h;
266
- return e[6] !== u || e[7] !== g || e[8] !== t || e[9] !== n || e[10] !== s || e[11] !== i ? (h = /* @__PURE__ */ p(se, { component: "div", count: i, page: t, rowsPerPage: n, rowsPerPageOptions: s, onPageChange: u, onRowsPerPageChange: g, ActionsComponent: V }), e[6] = u, e[7] = g, e[8] = t, e[9] = n, e[10] = s, e[11] = i, e[12] = h) : h = e[12], h;
256
+ e[2] !== i ? (c = (h, S) => {
257
+ i(S);
258
+ }, e[2] = i, e[3] = c) : c = e[3];
259
+ const d = c;
260
+ let b;
261
+ e[4] !== s ? (b = (h) => {
262
+ s(parseInt(h.target.value, 10));
263
+ }, e[4] = s, e[5] = b) : b = e[5];
264
+ const u = b;
265
+ let m;
266
+ return e[6] !== d || e[7] !== u || e[8] !== t || e[9] !== o || e[10] !== f || e[11] !== r ? (m = /* @__PURE__ */ p(oe, { component: "div", count: r, page: t, rowsPerPage: o, rowsPerPageOptions: f, onPageChange: d, onRowsPerPageChange: u, ActionsComponent: I }), e[6] = d, e[7] = u, e[8] = t, e[9] = o, e[10] = f, e[11] = r, e[12] = m) : m = e[12], m;
267
267
  }
268
- function Te(o) {
269
- const e = x(4), t = pe(null), n = W(Ae);
270
- let i, l;
271
- return e[0] !== n || e[1] !== o ? (i = () => {
272
- t.current && n(o, {
268
+ function Ce(n) {
269
+ const e = x(4), t = ue(null), o = D(ve);
270
+ let r, l;
271
+ return e[0] !== o || e[1] !== n ? (r = () => {
272
+ t.current && o(n, {
273
273
  refUI: t
274
274
  });
275
- }, l = [o, n], e[0] = n, e[1] = o, e[2] = i, e[3] = l) : (i = e[2], l = e[3]), me(i, l), t;
275
+ }, l = [n, o], e[0] = o, e[1] = n, e[2] = r, e[3] = l) : (r = e[2], l = e[3]), de(r, l), t;
276
276
  }
277
- function Ae(o) {
278
- return o.setWidget;
277
+ function ve(n) {
278
+ return n.setWidget;
279
279
  }
280
- function M(o) {
280
+ function M(n) {
281
281
  const e = x(10);
282
- let t, n, i, l;
283
- e[0] !== o ? ({
282
+ let t, o, r, l;
283
+ e[0] !== n ? ({
284
284
  children: t,
285
- ref: i,
285
+ ref: r,
286
286
  stickyHeader: l,
287
- ...n
288
- } = o, e[0] = o, e[1] = t, e[2] = n, e[3] = i, e[4] = l) : (t = e[1], n = e[2], i = e[3], l = e[4]);
289
- const r = l === void 0 ? !0 : l;
290
- let a;
291
- return e[5] !== t || e[6] !== n || e[7] !== i || e[8] !== r ? (a = /* @__PURE__ */ p(Q, { stickyHeader: r, ref: i, ...n, children: t }), e[5] = t, e[6] = n, e[7] = i, e[8] = r, e[9] = a) : a = e[9], a;
287
+ ...o
288
+ } = n, e[0] = n, e[1] = t, e[2] = o, e[3] = r, e[4] = l) : (t = e[1], o = e[2], r = e[3], l = e[4]);
289
+ const i = l === void 0 ? !0 : l;
290
+ let s;
291
+ return e[5] !== t || e[6] !== o || e[7] !== r || e[8] !== i ? (s = /* @__PURE__ */ p(X, { stickyHeader: i, ref: r, ...o, children: t }), e[5] = t, e[6] = o, e[7] = r, e[8] = i, e[9] = s) : s = e[9], s;
292
292
  }
293
- M.Head = X;
294
- M.CellHeader = Pe;
295
- M.Body = Y;
296
- M.Row = we;
297
- M.Cell = D;
298
- M.Container = Ee;
299
- M.Paper = ce;
300
- M.Pagination = ke;
301
- M.PaginationActions = V;
302
- function Ee(o) {
303
- const e = x(3), t = Te(o.id);
304
- let n;
305
- return e[0] !== o.children || e[1] !== t ? (n = /* @__PURE__ */ p(ae, { ref: t, children: o.children }), e[0] = o.children, e[1] = t, e[2] = n) : n = e[2], n;
293
+ M.Head = Y;
294
+ M.CellHeader = ge;
295
+ M.Body = Z;
296
+ M.Row = _e;
297
+ M.Cell = L;
298
+ M.Container = ke;
299
+ M.Paper = le;
300
+ M.Pagination = ye;
301
+ M.PaginationActions = I;
302
+ function ke(n) {
303
+ const e = x(3), t = Ce(n.id);
304
+ let o;
305
+ return e[0] !== n.children || e[1] !== t ? (o = /* @__PURE__ */ p(ie, { ref: t, children: n.children }), e[0] = n.children, e[1] = t, e[2] = o) : o = e[2], o;
306
306
  }
307
- const $e = "local", I = 0, ee = 10, te = [5, 10, 25, 50], ne = null, oe = "asc";
308
- function nt({
309
- refUI: o
307
+ const Te = "local", we = 0, Ae = 10, Ee = [5, 10, 25, 50], $e = null, Re = "asc";
308
+ function lt({
309
+ refUI: n
310
310
  }) {
311
311
  return [{
312
- ...z,
313
- modifier: () => z.modifier(o)
312
+ ...K,
313
+ modifier: () => K.modifier(n)
314
314
  }, {
315
- ...B,
315
+ ...H,
316
316
  modifier: async (e) => {
317
317
  if (!e?.length)
318
- return B.modifier([]);
318
+ return H.modifier([]);
319
319
  const t = e[0];
320
320
  if (!t)
321
- return B.modifier([]);
322
- const n = Object.keys(t).filter((l) => l !== "id"), i = e.map((l) => n.map((r) => {
323
- const a = l[r];
324
- return a == null ? "" : typeof a == "object" ? JSON.stringify(a) : a;
321
+ return H.modifier([]);
322
+ const o = Object.keys(t).filter((l) => l !== "id"), r = e.map((l) => o.map((i) => {
323
+ const s = l[i];
324
+ return s == null ? "" : typeof s == "object" ? JSON.stringify(s) : s;
325
325
  }));
326
- return B.modifier([n, ...i]);
326
+ return H.modifier([o, ...r]);
327
327
  }
328
328
  }];
329
329
  }
330
- function ot(o = []) {
330
+ function it(n = []) {
331
331
  return {
332
- columns: o,
332
+ columns: n,
333
333
  selectable: !1,
334
- selected: /* @__PURE__ */ new Set(),
335
- mode: $e,
336
- pagination: {
337
- page: I,
338
- rowsPerPageOptions: te,
339
- rowsPerPage: ee,
340
- total: 0
341
- },
342
- sort: {
343
- columnId: ne,
344
- direction: oe
345
- }
334
+ selected: [],
335
+ mode: Te
346
336
  };
347
337
  }
348
- function lt(o, e) {
349
- const t = x(38), n = W(Oe);
350
- let i;
351
- t[0] !== e || t[1] !== o ? (i = (y) => {
352
- const w = y.widgets[o];
338
+ function rt(n, e) {
339
+ const t = x(38), o = D(xe);
340
+ let r;
341
+ t[0] !== e || t[1] !== n ? (r = (P) => {
342
+ const v = P.widgets[n];
353
343
  return {
354
- paginationEnabled: !!w?.pagination,
355
- page: w?.pagination?.page ?? I,
356
- rowsPerPage: w?.pagination?.rowsPerPage ?? ee,
357
- rowsPerPageOptions: w?.pagination?.rowsPerPageOptions ?? te,
358
- total: w?.pagination?.total ?? e.length
344
+ paginationEnabled: !!v?.pagination,
345
+ page: v?.pagination?.page ?? we,
346
+ rowsPerPage: v?.pagination?.rowsPerPage ?? Ae,
347
+ rowsPerPageOptions: v?.pagination?.rowsPerPageOptions ?? Ee,
348
+ total: v?.pagination?.total ?? e.length
359
349
  };
360
- }, t[0] = e, t[1] = o, t[2] = i) : i = t[2];
361
- const l = W(U(i));
362
- let r;
363
- t[3] !== o ? (r = (y) => y.widgets[o]?.mode, t[3] = o, t[4] = r) : r = t[4];
364
- const a = W(U(r)), f = Math.max(0, Math.ceil(l.total / (l?.rowsPerPage ?? 1)) - 1);
365
- let s;
366
- t[5] !== f || t[6] !== l || t[7] !== n || t[8] !== o ? (s = (y) => {
367
- const w = Math.max(0, Math.min(y, f));
368
- n(o, {
350
+ }, t[0] = e, t[1] = n, t[2] = r) : r = t[2];
351
+ const l = D(j(r));
352
+ let i;
353
+ t[3] !== n ? (i = (P) => P.widgets[n]?.mode, t[3] = n, t[4] = i) : i = t[4];
354
+ const s = D(j(i)), a = Math.max(0, Math.ceil(l.total / (l?.rowsPerPage ?? 1)) - 1);
355
+ let f;
356
+ t[5] !== a || t[6] !== l || t[7] !== o || t[8] !== n ? (f = (P) => {
357
+ const v = Math.max(0, Math.min(P, a));
358
+ o(n, {
369
359
  pagination: {
370
360
  ...l,
371
- page: w
361
+ page: v
372
362
  }
373
363
  });
374
- }, t[5] = f, t[6] = l, t[7] = n, t[8] = o, t[9] = s) : s = t[9];
375
- const c = s;
376
- let u;
377
- t[10] !== l || t[11] !== n || t[12] !== o ? (u = (y) => {
378
- n(o, {
364
+ }, t[5] = a, t[6] = l, t[7] = o, t[8] = n, t[9] = f) : f = t[9];
365
+ const c = f;
366
+ let d;
367
+ t[10] !== l || t[11] !== o || t[12] !== n ? (d = (P) => {
368
+ o(n, {
379
369
  pagination: {
380
370
  ...l,
381
- rowsPerPage: y
371
+ rowsPerPage: P
382
372
  }
383
373
  });
384
- }, t[10] = l, t[11] = n, t[12] = o, t[13] = u) : u = t[13];
385
- const P = u;
386
- let g;
387
- t[14] !== c ? (g = () => c(0), t[14] = c, t[15] = g) : g = t[15];
388
- const h = g;
389
- let m;
390
- t[16] !== f || t[17] !== c ? (m = () => c(f), t[16] = f, t[17] = c, t[18] = m) : m = t[18];
391
- const b = m;
374
+ }, t[10] = l, t[11] = o, t[12] = n, t[13] = d) : d = t[13];
375
+ const b = d;
376
+ let u;
377
+ t[14] !== c ? (u = () => c(0), t[14] = c, t[15] = u) : u = t[15];
378
+ const m = u;
379
+ let h;
380
+ t[16] !== a || t[17] !== c ? (h = () => c(a), t[16] = a, t[17] = c, t[18] = h) : h = t[18];
381
+ const S = h;
382
+ let _;
383
+ t[19] !== l.page || t[20] !== c ? (_ = () => c(l.page + 1), t[19] = l.page, t[20] = c, t[21] = _) : _ = t[21];
384
+ const g = _;
392
385
  let C;
393
- t[19] !== l.page || t[20] !== c ? (C = () => c(l.page + 1), t[19] = l.page, t[20] = c, t[21] = C) : C = t[21];
394
- const v = C;
395
- let k;
396
- t[22] !== l.page || t[23] !== c ? (k = () => c(l.page - 1), t[22] = l.page, t[23] = c, t[24] = k) : k = t[24];
397
- const T = k;
398
- let d;
386
+ t[22] !== l.page || t[23] !== c ? (C = () => c(l.page - 1), t[22] = l.page, t[23] = c, t[24] = C) : C = t[24];
387
+ const E = C;
388
+ let T;
399
389
  e: {
400
- if (a === "remote" || !l.paginationEnabled) {
401
- d = e;
390
+ if (s === "remote" || !l.paginationEnabled) {
391
+ T = e;
402
392
  break e;
403
393
  }
404
- let y;
405
- t[25] !== e || t[26] !== l.page || t[27] !== l.rowsPerPage ? (y = _e(e, l.page, l.rowsPerPage), t[25] = e, t[26] = l.page, t[27] = l.rowsPerPage, t[28] = y) : y = t[28], d = y;
394
+ let P;
395
+ t[25] !== e || t[26] !== l.page || t[27] !== l.rowsPerPage ? (P = be(e, l.page, l.rowsPerPage), t[25] = e, t[26] = l.page, t[27] = l.rowsPerPage, t[28] = P) : P = t[28], T = P;
406
396
  }
407
- const S = d;
408
- let A;
409
- return t[29] !== h || t[30] !== b || t[31] !== v || t[32] !== T || t[33] !== S || t[34] !== l || t[35] !== c || t[36] !== P ? (A = {
397
+ const w = T;
398
+ let k;
399
+ return t[29] !== m || t[30] !== S || t[31] !== g || t[32] !== E || t[33] !== w || t[34] !== l || t[35] !== c || t[36] !== b ? (k = {
410
400
  ...l,
411
- paginatedData: S,
401
+ paginatedData: w,
412
402
  setPage: c,
413
- setRowsPerPage: P,
414
- goToFirstPage: h,
415
- goToLastPage: b,
416
- goToNextPage: v,
417
- goToPreviousPage: T
418
- }, t[29] = h, t[30] = b, t[31] = v, t[32] = T, t[33] = S, t[34] = l, t[35] = c, t[36] = P, t[37] = A) : A = t[37], A;
403
+ setRowsPerPage: b,
404
+ goToFirstPage: m,
405
+ goToLastPage: S,
406
+ goToNextPage: g,
407
+ goToPreviousPage: E
408
+ }, t[29] = m, t[30] = S, t[31] = g, t[32] = E, t[33] = w, t[34] = l, t[35] = c, t[36] = b, t[37] = k) : k = t[37], k;
419
409
  }
420
- function Oe(o) {
421
- return o.setWidget;
410
+ function xe(n) {
411
+ return n.setWidget;
422
412
  }
423
- function it(o, e, t) {
424
- const n = x(32);
425
- let i;
426
- n[0] !== t ? (i = t ?? {}, n[0] = t, n[1] = i) : i = n[1];
427
- const {
428
- onSortChange: l
429
- } = i, r = W(xe), a = W(Re);
430
- let f;
431
- n[2] !== o ? (f = (d) => {
432
- const S = d.widgets[o];
413
+ function st(n, e) {
414
+ const t = x(26), o = D(We), r = D(Oe);
415
+ let l;
416
+ t[0] !== n ? (l = (g) => {
417
+ const C = g.widgets[n];
433
418
  return {
434
- sortEnabled: !!S?.sort,
435
- columnId: S?.sort?.columnId ?? ne,
436
- direction: S?.sort?.direction ?? oe
419
+ sortEnabled: !!C?.sort,
420
+ columnId: C?.sort?.columnId ?? $e,
421
+ direction: C?.sort?.direction ?? Re
437
422
  };
438
- }, n[2] = o, n[3] = f) : f = n[3];
439
- const s = W(U(f));
440
- let c;
441
- n[4] !== o ? (c = (d) => d.widgets[o]?.mode, n[4] = o, n[5] = c) : c = n[5];
442
- const u = W(U(c));
443
- let P;
444
- n[6] !== u || n[7] !== l || n[8] !== r || n[9] !== s || n[10] !== o ? (P = (d) => {
445
- let S = "asc";
446
- s.columnId === d && (S = s.direction === "asc" ? "desc" : "asc"), r(o, {
423
+ }, t[0] = n, t[1] = l) : l = t[1];
424
+ const i = D(j(l));
425
+ let s;
426
+ t[2] !== n ? (s = (g) => g.widgets[n]?.mode, t[2] = n, t[3] = s) : s = t[3];
427
+ const a = D(j(s));
428
+ let f;
429
+ t[4] !== o || t[5] !== i || t[6] !== n ? (f = (g) => {
430
+ let C = "asc";
431
+ i.columnId === g && (C = i.direction === "asc" ? "desc" : "asc"), o(n, {
447
432
  sort: {
448
- ...s,
449
- columnId: d,
450
- direction: S
433
+ ...i,
434
+ columnId: g,
435
+ direction: C
451
436
  }
452
- }), u === "remote" && l && l(d, S);
453
- }, n[6] = u, n[7] = l, n[8] = r, n[9] = s, n[10] = o, n[11] = P) : P = n[11];
454
- const g = P;
455
- let h;
456
- n[12] !== u || n[13] !== l || n[14] !== r || n[15] !== s || n[16] !== o ? (h = (d, S) => {
457
- r(o, {
437
+ });
438
+ }, t[4] = o, t[5] = i, t[6] = n, t[7] = f) : f = t[7];
439
+ const c = f;
440
+ let d;
441
+ t[8] !== o || t[9] !== i || t[10] !== n ? (d = (g, C) => {
442
+ o(n, {
458
443
  sort: {
459
- ...s,
460
- columnId: d,
461
- direction: S
444
+ ...i,
445
+ columnId: g,
446
+ direction: C
462
447
  }
463
- }), u === "remote" && l && d && l(d, S);
464
- }, n[12] = u, n[13] = l, n[14] = r, n[15] = s, n[16] = o, n[17] = h) : h = n[17];
465
- const m = h;
466
- let b;
467
- n[18] !== a || n[19] !== r || n[20] !== o ? (b = () => {
468
- const d = a(o);
469
- d?.sort && r(o, {
448
+ });
449
+ }, t[8] = o, t[9] = i, t[10] = n, t[11] = d) : d = t[11];
450
+ const b = d;
451
+ let u;
452
+ t[12] !== r || t[13] !== o || t[14] !== n ? (u = () => {
453
+ const g = r(n);
454
+ g?.sort && o(n, {
470
455
  sort: {
471
- ...d.sort,
456
+ ...g.sort,
472
457
  columnId: null,
473
458
  direction: "asc"
474
459
  }
475
460
  });
476
- }, n[18] = a, n[19] = r, n[20] = o, n[21] = b) : b = n[21];
477
- const C = b;
478
- let v;
461
+ }, t[12] = r, t[13] = o, t[14] = n, t[15] = u) : u = t[15];
462
+ const m = u;
463
+ let h;
479
464
  e: {
480
- if (u === "remote" || !s.columnId || !s.sortEnabled) {
481
- v = e;
465
+ if (a === "remote" || !i.columnId || !i.sortEnabled) {
466
+ h = e;
482
467
  break e;
483
468
  }
484
- let d;
485
- n[22] !== e || n[23] !== s.columnId || n[24] !== s.direction ? (d = ye(e, s.columnId, s.direction), n[22] = e, n[23] = s.columnId, n[24] = s.direction, n[25] = d) : d = n[25], v = d;
469
+ let g;
470
+ t[16] !== e || t[17] !== i.columnId || t[18] !== i.direction ? (g = he(e, i.columnId, i.direction), t[16] = e, t[17] = i.columnId, t[18] = i.direction, t[19] = g) : g = t[19], h = g;
486
471
  }
487
- const k = v;
488
- let T;
489
- return n[26] !== C || n[27] !== m || n[28] !== s || n[29] !== k || n[30] !== g ? (T = {
490
- ...s,
491
- sortedData: k,
492
- toggleSort: g,
493
- setSort: m,
494
- clearSort: C
495
- }, n[26] = C, n[27] = m, n[28] = s, n[29] = k, n[30] = g, n[31] = T) : T = n[31], T;
472
+ const S = h;
473
+ let _;
474
+ return t[20] !== m || t[21] !== b || t[22] !== i || t[23] !== S || t[24] !== c ? (_ = {
475
+ ...i,
476
+ sortedData: S,
477
+ toggleSort: c,
478
+ setSort: b,
479
+ clearSort: m
480
+ }, t[20] = m, t[21] = b, t[22] = i, t[23] = S, t[24] = c, t[25] = _) : _ = t[25], _;
496
481
  }
497
- function Re(o) {
498
- return o.getWidget;
482
+ function Oe(n) {
483
+ return n.getWidget;
499
484
  }
500
- function xe(o) {
501
- return o.setWidget;
485
+ function We(n) {
486
+ return n.setWidget;
502
487
  }
503
- function rt(o, e) {
488
+ function ct(n, e) {
504
489
  const t = x(46);
505
- let n;
506
- t[0] !== e ? (n = e ?? {}, t[0] = e, t[1] = n) : n = t[1];
490
+ let o;
491
+ t[0] !== e ? (o = e ?? {}, t[0] = e, t[1] = o) : o = t[1];
507
492
  const {
508
- onSelectionChange: i
509
- } = n, l = W(Le), r = W(We);
510
- let a;
511
- t[2] !== o ? (a = (_) => _.widgets[o]?.selected, t[2] = o, t[3] = a) : a = t[3];
512
- const f = W(U(a));
493
+ onSelectionChange: r
494
+ } = o, l = D(Me), i = D(Le);
513
495
  let s;
514
- t[4] !== f ? (s = f ?? /* @__PURE__ */ new Set(), t[4] = f, t[5] = s) : s = t[5];
515
- const c = s;
496
+ t[2] !== n ? (s = (y) => y.widgets[n]?.selected, t[2] = n, t[3] = s) : s = t[3];
497
+ const a = D(j(s));
498
+ let f;
499
+ t[4] !== a ? (f = a ?? [], t[4] = a, t[5] = f) : f = t[5];
500
+ const c = f;
501
+ let d;
502
+ t[6] !== c ? (d = (y) => c.includes(y), t[6] = c, t[7] = d) : d = t[7];
503
+ const b = d;
516
504
  let u;
517
- t[6] !== c ? (u = (_) => c.has(_), t[6] = c, t[7] = u) : u = t[7];
518
- const P = u;
519
- let g;
520
- t[8] !== c ? (g = (_) => _.length === 0 ? !1 : _.every((E) => c.has(E.id)), t[8] = c, t[9] = g) : g = t[9];
521
- const h = g;
522
- let m;
523
- t[10] !== c ? (m = (_) => {
524
- if (_.length === 0)
505
+ t[8] !== c ? (u = (y) => y.length === 0 ? !1 : y.every((A) => c.includes(A.id)), t[8] = c, t[9] = u) : u = t[9];
506
+ const m = u;
507
+ let h;
508
+ t[10] !== c ? (h = (y) => {
509
+ if (y.length === 0)
525
510
  return !1;
526
- const E = _.filter((L) => c.has(L.id)).length;
527
- return E > 0 && E < _.length;
528
- }, t[10] = c, t[11] = m) : m = t[11];
529
- const b = m;
511
+ const A = y.filter((O) => c.includes(O.id)).length;
512
+ return A > 0 && A < y.length;
513
+ }, t[10] = c, t[11] = h) : h = t[11];
514
+ const S = h;
515
+ let _;
516
+ t[12] !== i || t[13] !== r || t[14] !== l || t[15] !== n ? (_ = (y) => {
517
+ const O = i(n)?.selected ?? [], W = O.includes(y) ? O.filter((F) => F !== y) : [...O, y];
518
+ l(n, {
519
+ selected: W
520
+ }), r && r(W);
521
+ }, t[12] = i, t[13] = r, t[14] = l, t[15] = n, t[16] = _) : _ = t[16];
522
+ const g = _;
530
523
  let C;
531
- t[12] !== r || t[13] !== i || t[14] !== l || t[15] !== o ? (C = (_) => {
532
- const L = r(o)?.selected ?? /* @__PURE__ */ new Set(), R = new Set(L);
533
- R.has(_) ? R.delete(_) : R.add(_), l(o, {
534
- selected: R
535
- }), i && i(R);
536
- }, t[12] = r, t[13] = i, t[14] = l, t[15] = o, t[16] = C) : C = t[16];
537
- const v = C;
524
+ t[17] !== i || t[18] !== r || t[19] !== l || t[20] !== n ? (C = (y) => {
525
+ const O = i(n)?.selected ?? [], W = y.map(De), z = W.every((B) => O.includes(B)) ? O.filter((B) => !W.includes(B)) : [.../* @__PURE__ */ new Set([...O, ...W])];
526
+ l(n, {
527
+ selected: z
528
+ }), r && r(z);
529
+ }, t[17] = i, t[18] = r, t[19] = l, t[20] = n, t[21] = C) : C = t[21];
530
+ const E = C;
531
+ let T;
532
+ t[22] !== i || t[23] !== r || t[24] !== l || t[25] !== n ? (T = (y) => {
533
+ const O = i(n)?.selected ?? [], W = [.../* @__PURE__ */ new Set([...O, ...y])];
534
+ l(n, {
535
+ selected: W
536
+ }), r && r(W);
537
+ }, t[22] = i, t[23] = r, t[24] = l, t[25] = n, t[26] = T) : T = t[26];
538
+ const w = T;
538
539
  let k;
539
- t[17] !== r || t[18] !== i || t[19] !== l || t[20] !== o ? (k = (_) => {
540
- const L = r(o)?.selected ?? /* @__PURE__ */ new Set(), R = _.every((F) => L.has(F.id)), N = new Set(L);
541
- R ? _.forEach((F) => N.delete(F.id)) : _.forEach((F) => N.add(F.id)), l(o, {
542
- selected: N
543
- }), i && i(N);
544
- }, t[17] = r, t[18] = i, t[19] = l, t[20] = o, t[21] = k) : k = t[21];
545
- const T = k;
546
- let d;
547
- t[22] !== r || t[23] !== i || t[24] !== l || t[25] !== o ? (d = (_) => {
548
- const L = r(o)?.selected ?? /* @__PURE__ */ new Set(), R = new Set(L);
549
- _.forEach((N) => R.add(N)), l(o, {
550
- selected: R
551
- }), i && i(R);
552
- }, t[22] = r, t[23] = i, t[24] = l, t[25] = o, t[26] = d) : d = t[26];
553
- const S = d;
554
- let A;
555
- t[27] !== r || t[28] !== i || t[29] !== l || t[30] !== o ? (A = (_) => {
556
- const L = r(o)?.selected ?? /* @__PURE__ */ new Set(), R = new Set(L);
557
- _.forEach((N) => R.delete(N)), l(o, {
558
- selected: R
559
- }), i && i(R);
560
- }, t[27] = r, t[28] = i, t[29] = l, t[30] = o, t[31] = A) : A = t[31];
561
- const y = A;
562
- let w;
563
- t[32] !== i || t[33] !== l || t[34] !== o ? (w = () => {
564
- const _ = /* @__PURE__ */ new Set();
565
- l(o, {
566
- selected: _
567
- }), i && i(_);
568
- }, t[32] = i, t[33] = l, t[34] = o, t[35] = w) : w = t[35];
569
- const $ = w;
570
- let O;
571
- return t[36] !== $ || t[37] !== y || t[38] !== h || t[39] !== b || t[40] !== P || t[41] !== S || t[42] !== c || t[43] !== T || t[44] !== v ? (O = {
540
+ t[27] !== i || t[28] !== r || t[29] !== l || t[30] !== n ? (k = (y) => {
541
+ const W = (i(n)?.selected ?? []).filter((F) => !y.includes(F));
542
+ l(n, {
543
+ selected: W
544
+ }), r && r(W);
545
+ }, t[27] = i, t[28] = r, t[29] = l, t[30] = n, t[31] = k) : k = t[31];
546
+ const P = k;
547
+ let v;
548
+ t[32] !== r || t[33] !== l || t[34] !== n ? (v = () => {
549
+ const y = [];
550
+ l(n, {
551
+ selected: y
552
+ }), r && r(y);
553
+ }, t[32] = r, t[33] = l, t[34] = n, t[35] = v) : v = t[35];
554
+ const $ = v;
555
+ let R;
556
+ return t[36] !== $ || t[37] !== P || t[38] !== m || t[39] !== S || t[40] !== b || t[41] !== w || t[42] !== c || t[43] !== E || t[44] !== g ? (R = {
572
557
  selectedIds: c,
573
- isSelected: P,
574
- isAllSelected: h,
575
- isIndeterminate: b,
576
- toggleRow: v,
577
- toggleAll: T,
578
- selectRows: S,
579
- deselectRows: y,
558
+ isSelected: b,
559
+ isAllSelected: m,
560
+ isIndeterminate: S,
561
+ toggleRow: g,
562
+ toggleAll: E,
563
+ selectRows: w,
564
+ deselectRows: P,
580
565
  clearSelection: $
581
- }, t[36] = $, t[37] = y, t[38] = h, t[39] = b, t[40] = P, t[41] = S, t[42] = c, t[43] = T, t[44] = v, t[45] = O) : O = t[45], O;
566
+ }, t[36] = $, t[37] = P, t[38] = m, t[39] = S, t[40] = b, t[41] = w, t[42] = c, t[43] = E, t[44] = g, t[45] = R) : R = t[45], R;
582
567
  }
583
- function We(o) {
584
- return o.getWidget;
568
+ function De(n) {
569
+ return n.id;
585
570
  }
586
- function Le(o) {
587
- return o.setWidget;
571
+ function Le(n) {
572
+ return n.getWidget;
588
573
  }
589
- function st(o) {
574
+ function Me(n) {
575
+ return n.setWidget;
576
+ }
577
+ function at(n) {
590
578
  const e = x(10), {
591
579
  columns: t,
592
- rows: n
593
- } = o, i = t === void 0 ? 4 : t, l = n === void 0 ? 5 : n;
594
- let r;
595
- e[0] !== i ? (r = /* @__PURE__ */ p(X, { children: /* @__PURE__ */ p(J, { children: Array.from({
596
- length: i
597
- }).map(Me) }) }), e[0] = i, e[1] = r) : r = e[1];
598
- let a;
599
- e[2] !== l ? (a = Array.from({
580
+ rows: o
581
+ } = n, r = t === void 0 ? 4 : t, l = o === void 0 ? 5 : o;
582
+ let i;
583
+ e[0] !== r ? (i = /* @__PURE__ */ p(Y, { children: /* @__PURE__ */ p(J, { children: Array.from({
584
+ length: r
585
+ }).map(je) }) }), e[0] = r, e[1] = i) : i = e[1];
586
+ let s;
587
+ e[2] !== l ? (s = Array.from({
600
588
  length: l
601
- }), e[2] = l, e[3] = a) : a = e[3];
589
+ }), e[2] = l, e[3] = s) : s = e[3];
590
+ let a;
591
+ e[4] !== r || e[5] !== s ? (a = /* @__PURE__ */ p(Z, { children: s.map((c, d) => /* @__PURE__ */ p(J, { children: Array.from({
592
+ length: r
593
+ }).map(Ne) }, d)) }), e[4] = r, e[5] = s, e[6] = a) : a = e[6];
602
594
  let f;
603
- e[4] !== i || e[5] !== a ? (f = /* @__PURE__ */ p(Y, { children: a.map((c, u) => /* @__PURE__ */ p(J, { children: Array.from({
604
- length: i
605
- }).map(De) }, u)) }), e[4] = i, e[5] = a, e[6] = f) : f = e[6];
606
- let s;
607
- return e[7] !== r || e[8] !== f ? (s = /* @__PURE__ */ p(q, { "aria-label": "Table skeleton", children: /* @__PURE__ */ G(Q, { children: [
608
- r,
609
- f
610
- ] }) }), e[7] = r, e[8] = f, e[9] = s) : s = e[9], s;
595
+ return e[7] !== i || e[8] !== a ? (f = /* @__PURE__ */ p(Q, { "aria-label": "Table skeleton", children: /* @__PURE__ */ G(X, { children: [
596
+ i,
597
+ a
598
+ ] }) }), e[7] = i, e[8] = a, e[9] = f) : f = e[9], f;
611
599
  }
612
- function De(o, e) {
613
- return /* @__PURE__ */ p(D, { children: /* @__PURE__ */ p(Z, { width: "70%", height: 20 }) }, e);
600
+ function Ne(n, e) {
601
+ return /* @__PURE__ */ p(L, { children: /* @__PURE__ */ p(V, { width: "70%", height: 20 }) }, e);
614
602
  }
615
- function Me(o, e) {
616
- return /* @__PURE__ */ p(D, { children: /* @__PURE__ */ p(Z, { width: "80%", height: 24 }) }, e);
603
+ function je(n, e) {
604
+ return /* @__PURE__ */ p(L, { children: /* @__PURE__ */ p(V, { width: "80%", height: 24 }) }, e);
617
605
  }
618
- function Ne(o) {
606
+ function Fe(n) {
619
607
  const e = {
620
- id: o.id
608
+ id: n.id
621
609
  };
622
- for (const [t, n] of Object.entries(o))
610
+ for (const [t, o] of Object.entries(n))
623
611
  if (t !== "id")
624
- if (typeof n == "string" || typeof n == "number" || typeof n == "boolean" || n === null)
625
- e[t] = n;
626
- else if (Array.isArray(n) || typeof n == "object")
612
+ if (typeof o == "string" || typeof o == "number" || typeof o == "boolean" || o === null)
613
+ e[t] = o;
614
+ else if (Array.isArray(o) || typeof o == "object")
627
615
  try {
628
- JSON.stringify(n), e[t] = n;
616
+ JSON.stringify(o), e[t] = o;
629
617
  } catch {
630
618
  e[t] = void 0;
631
619
  }
@@ -633,10 +621,10 @@ function Ne(o) {
633
621
  e[t] = void 0;
634
622
  return e;
635
623
  }
636
- function ct(o) {
637
- return o?.map(Ne);
624
+ function ft(n) {
625
+ return n?.map(Fe);
638
626
  }
639
- const at = {
627
+ const ut = {
640
628
  container: {
641
629
  width: "100%",
642
630
  overflow: "auto"
@@ -646,7 +634,7 @@ const at = {
646
634
  },
647
635
  headerCell: {
648
636
  fontWeight: 600,
649
- backgroundColor: (o) => o.palette.background.paper
637
+ backgroundColor: (n) => n.palette.background.paper
650
638
  },
651
639
  row: {
652
640
  "&:last-child td, &:last-child th": {
@@ -655,37 +643,37 @@ const at = {
655
643
  },
656
644
  rowHover: {
657
645
  "&:hover": {
658
- backgroundColor: (o) => o.palette.action.hover
646
+ backgroundColor: (n) => n.palette.action.hover
659
647
  }
660
648
  },
661
649
  rowSelected: {
662
- backgroundColor: (o) => o.palette.action.selected,
650
+ backgroundColor: (n) => n.palette.action.selected,
663
651
  "&:hover": {
664
- backgroundColor: (o) => o.palette.action.selected
652
+ backgroundColor: (n) => n.palette.action.selected
665
653
  }
666
654
  },
667
655
  pagination: {
668
- borderTop: (o) => `1px solid ${o.palette.divider}`
656
+ borderTop: (n) => `1px solid ${n.palette.divider}`
669
657
  }
670
658
  };
671
659
  export {
672
- Pe as CellHeader,
673
- ke as Pagination,
674
- V as PaginationActions,
675
- we as Row,
660
+ ge as CellHeader,
661
+ ye as Pagination,
662
+ I as PaginationActions,
663
+ _e as Row,
676
664
  M as Table,
677
- st as TableSkeleton,
678
- Se as compareValues,
679
- be as getCellValue,
680
- _e as paginateData,
681
- ct as sanitizeTableData,
682
- Ne as sanitizeTableRow,
683
- ye as sortData,
684
- ot as tableConfig,
685
- nt as tableDownloadConfig,
686
- at as tableStyles,
687
- lt as usePagination,
688
- rt as useSelection,
689
- it as useSort
665
+ at as TableSkeleton,
666
+ pe as compareValues,
667
+ me as getCellValue,
668
+ be as paginateData,
669
+ ft as sanitizeTableData,
670
+ Fe as sanitizeTableRow,
671
+ he as sortData,
672
+ it as tableConfig,
673
+ lt as tableDownloadConfig,
674
+ ut as tableStyles,
675
+ rt as usePagination,
676
+ ct as useSelection,
677
+ st as useSort
690
678
  };
691
679
  //# sourceMappingURL=table.js.map