@carto/ps-react-ui 5.0.0-widgets.5 → 5.0.0-widgets.7

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