@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.
- package/dist/{error-G3sy6lw3.js → error-B2IJ9d2h.js} +2 -2
- package/dist/{error-G3sy6lw3.js.map → error-B2IJ9d2h.js.map} +1 -1
- package/dist/markdown-ui-CpNYUPqC.js +68 -0
- package/dist/markdown-ui-CpNYUPqC.js.map +1 -0
- package/dist/{no-data-DfkC_Kc_.js → no-data-C54XJt13.js} +2 -2
- package/dist/{no-data-DfkC_Kc_.js.map → no-data-C54XJt13.js.map} +1 -1
- package/dist/row-DLKZN5aF.js +33 -0
- package/dist/row-DLKZN5aF.js.map +1 -0
- package/dist/{row-B9hTUitn.js → row-DrHwXNvF.js} +2 -2
- package/dist/{row-B9hTUitn.js.map → row-DrHwXNvF.js.map} +1 -1
- package/dist/series-Cf1QPZHV.js +83 -0
- package/dist/series-Cf1QPZHV.js.map +1 -0
- package/dist/{series-DojKkd_o.js → series-Do02NQUF.js} +3 -3
- package/dist/{series-DojKkd_o.js.map → series-Do02NQUF.js.map} +1 -1
- package/dist/styles-CcC5L2cr.js +77 -0
- package/dist/styles-CcC5L2cr.js.map +1 -0
- package/dist/types/widgets/markdown/types.d.ts +1 -1
- package/dist/types/widgets/table/hooks/use-selection.d.ts +3 -3
- package/dist/types/widgets/table/hooks/use-sort.d.ts +1 -5
- package/dist/types/widgets/table/types.d.ts +2 -2
- package/dist/utils-DNtU8q7E.js +144 -0
- package/dist/utils-DNtU8q7E.js.map +1 -0
- package/dist/{widget-store-Dd7_sWZT.js → widget-store-CB6Trp_0.js} +31 -32
- package/dist/{widget-store-Dd7_sWZT.js.map → widget-store-CB6Trp_0.js.map} +1 -1
- package/dist/widget-store-yDO2ul8g.js +44 -0
- package/dist/widget-store-yDO2ul8g.js.map +1 -0
- package/dist/widgets/actions.js +448 -441
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +1 -1
- package/dist/widgets/category.js +1 -1
- package/dist/widgets/echart.js +1 -1
- package/dist/widgets/error.js +1 -1
- package/dist/widgets/formula.js +3 -3
- package/dist/widgets/histogram.js +1 -1
- package/dist/widgets/markdown.js +1 -1
- package/dist/widgets/no-data.js +1 -1
- package/dist/widgets/pie.js +1 -1
- package/dist/widgets/range.js +2 -2
- package/dist/widgets/root.js +1 -1
- package/dist/widgets/scatterplot.js +1 -1
- package/dist/widgets/skeleton-loader.js +1 -1
- package/dist/widgets/spread.js +3 -3
- package/dist/widgets/stores.js +1 -1
- package/dist/widgets/table.js +491 -503
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +1 -1
- package/dist/widgets/wrapper.js +1 -1
- package/dist/widgets.js +3 -3
- package/package.json +1 -1
package/dist/widgets/table.js
CHANGED
|
@@ -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
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useRef as
|
|
10
|
-
import { u as
|
|
11
|
-
import { useShallow as
|
|
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
|
|
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
|
|
19
|
+
function ge(n) {
|
|
20
20
|
const e = x(26), {
|
|
21
21
|
column: t,
|
|
22
|
-
sortState:
|
|
23
|
-
onSort:
|
|
22
|
+
sortState: o,
|
|
23
|
+
onSort: r,
|
|
24
24
|
isSelectAll: l,
|
|
25
|
-
isAllSelected:
|
|
26
|
-
isIndeterminate:
|
|
27
|
-
onSelectAll:
|
|
28
|
-
} =
|
|
25
|
+
isAllSelected: i,
|
|
26
|
+
isIndeterminate: s,
|
|
27
|
+
onSelectAll: a
|
|
28
|
+
} = n;
|
|
29
29
|
if (l) {
|
|
30
|
-
let
|
|
31
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
30
|
+
let u;
|
|
31
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
|
|
32
32
|
"aria-label": "select all rows"
|
|
33
|
-
}, e[0] =
|
|
34
|
-
let
|
|
35
|
-
return e[1] !==
|
|
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
|
|
38
|
-
if (t.sortable &&
|
|
39
|
-
let
|
|
40
|
-
e[5] !== t.width ? (
|
|
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] =
|
|
43
|
-
const
|
|
44
|
-
let
|
|
45
|
-
e[7] !== t.id || e[8] !==
|
|
46
|
-
let
|
|
47
|
-
e[10] !== t.label || e[11] !==
|
|
48
|
-
let
|
|
49
|
-
return e[15] !== t.align || e[16] !== c || e[17] !==
|
|
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
|
|
52
|
-
e[20] !== t.width ? (
|
|
51
|
+
let d;
|
|
52
|
+
e[20] !== t.width ? (d = {
|
|
53
53
|
width: t.width
|
|
54
|
-
}, e[20] = t.width, e[21] =
|
|
55
|
-
let
|
|
56
|
-
return e[22] !== t.align || e[23] !== t.label || e[24] !==
|
|
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
|
|
59
|
-
return
|
|
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
|
|
62
|
-
if (
|
|
61
|
+
function pe(n, e, t) {
|
|
62
|
+
if (n == null) return 1;
|
|
63
63
|
if (e == null) return -1;
|
|
64
|
-
let
|
|
65
|
-
if (typeof
|
|
66
|
-
|
|
67
|
-
else if (typeof
|
|
68
|
-
|
|
69
|
-
else if (typeof
|
|
70
|
-
|
|
71
|
-
else if (typeof
|
|
72
|
-
const
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
return t === "asc" ?
|
|
75
|
+
o = 0;
|
|
76
|
+
return t === "asc" ? o : -o;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return [...
|
|
78
|
+
function he(n, e, t) {
|
|
79
|
+
return [...n].sort((o, r) => pe(o[e], r[e], t));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
return
|
|
81
|
+
function be(n, e, t) {
|
|
82
|
+
const o = e * t, r = o + t;
|
|
83
|
+
return n.slice(o, r);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const N = (n) => {
|
|
86
86
|
const e = x(2), {
|
|
87
87
|
children: t
|
|
88
|
-
} =
|
|
89
|
-
let
|
|
90
|
-
return e[0] !== t ? (
|
|
91
|
-
},
|
|
92
|
-
h1:
|
|
93
|
-
h2:
|
|
94
|
-
h3:
|
|
95
|
-
p:
|
|
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:
|
|
97
|
+
children: n,
|
|
98
98
|
href: e
|
|
99
99
|
}) => {
|
|
100
100
|
const t = e?.startsWith("http");
|
|
101
|
-
return /* @__PURE__ */ p(
|
|
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:
|
|
105
|
-
ol:
|
|
106
|
-
li:
|
|
104
|
+
ul: N,
|
|
105
|
+
ol: N,
|
|
106
|
+
li: N
|
|
107
107
|
};
|
|
108
|
-
function
|
|
108
|
+
function Se(n) {
|
|
109
109
|
const e = x(16), {
|
|
110
110
|
column: t,
|
|
111
|
-
value:
|
|
112
|
-
} =
|
|
111
|
+
value: o
|
|
112
|
+
} = n;
|
|
113
113
|
if (t.formatter) {
|
|
114
|
-
const
|
|
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[
|
|
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
|
|
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[
|
|
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
|
|
126
|
+
const r = t.align;
|
|
127
127
|
let l;
|
|
128
|
-
e[11] !==
|
|
129
|
-
let
|
|
130
|
-
return e[13] !== t.align || e[14] !== l ? (
|
|
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
|
|
132
|
+
function _e(n) {
|
|
133
133
|
const e = x(32), {
|
|
134
134
|
row: t,
|
|
135
|
-
columns:
|
|
136
|
-
isSelected:
|
|
135
|
+
columns: o,
|
|
136
|
+
isSelected: r,
|
|
137
137
|
selectable: l,
|
|
138
|
-
onClick:
|
|
139
|
-
onSelect:
|
|
140
|
-
onMouseEnter:
|
|
141
|
-
onMouseLeave:
|
|
142
|
-
} =
|
|
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[
|
|
155
|
-
|
|
156
|
-
}, e[
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
e[
|
|
160
|
-
s?.();
|
|
161
|
-
}, e[
|
|
162
|
-
const
|
|
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[
|
|
165
|
-
|
|
166
|
-
}, e[
|
|
167
|
-
|
|
168
|
-
|
|
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] =
|
|
171
|
-
let
|
|
172
|
-
if (e[18] !==
|
|
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 ? ($ = (
|
|
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
|
-
|
|
177
|
-
let
|
|
178
|
-
return e[23] !==
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
] }), e[23] =
|
|
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
|
|
183
|
+
function I(n) {
|
|
184
184
|
const e = x(33), {
|
|
185
185
|
count: t,
|
|
186
|
-
page:
|
|
187
|
-
rowsPerPage:
|
|
186
|
+
page: o,
|
|
187
|
+
rowsPerPage: r,
|
|
188
188
|
onPageChange: l
|
|
189
|
-
} =
|
|
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[
|
|
197
|
-
l(
|
|
198
|
-
}, e[
|
|
199
|
-
const
|
|
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[
|
|
202
|
-
l(
|
|
203
|
-
}, e[
|
|
204
|
-
const
|
|
205
|
-
let
|
|
206
|
-
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] =
|
|
215
|
-
const
|
|
216
|
-
let
|
|
217
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
218
|
-
let
|
|
219
|
-
e[13] !==
|
|
220
|
-
const
|
|
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[
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
let
|
|
227
|
-
e[
|
|
228
|
-
|
|
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(
|
|
233
|
-
let
|
|
234
|
-
e[25] !==
|
|
235
|
-
let
|
|
236
|
-
return e[28] !==
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
] }), e[28] =
|
|
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
|
|
243
|
+
function ye(n) {
|
|
244
244
|
const e = x(13), {
|
|
245
245
|
page: t,
|
|
246
|
-
rowsPerPage:
|
|
247
|
-
total:
|
|
246
|
+
rowsPerPage: o,
|
|
247
|
+
total: r,
|
|
248
248
|
rowsPerPageOptions: l,
|
|
249
|
-
onPageChange:
|
|
250
|
-
onRowsPerPageChange:
|
|
251
|
-
} =
|
|
252
|
-
let
|
|
253
|
-
e[0] !== l ? (
|
|
254
|
-
const
|
|
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] !==
|
|
257
|
-
|
|
258
|
-
}, e[2] =
|
|
259
|
-
const
|
|
260
|
-
let
|
|
261
|
-
e[4] !==
|
|
262
|
-
|
|
263
|
-
}, e[4] =
|
|
264
|
-
const
|
|
265
|
-
let
|
|
266
|
-
return e[6] !==
|
|
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
|
|
269
|
-
const e = x(4), t =
|
|
270
|
-
let
|
|
271
|
-
return e[0] !==
|
|
272
|
-
t.current && n
|
|
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 = [
|
|
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
|
|
278
|
-
return
|
|
277
|
+
function ve(n) {
|
|
278
|
+
return n.setWidget;
|
|
279
279
|
}
|
|
280
|
-
function M(
|
|
280
|
+
function M(n) {
|
|
281
281
|
const e = x(10);
|
|
282
|
-
let t,
|
|
283
|
-
e[0] !==
|
|
282
|
+
let t, o, r, l;
|
|
283
|
+
e[0] !== n ? ({
|
|
284
284
|
children: t,
|
|
285
|
-
ref:
|
|
285
|
+
ref: r,
|
|
286
286
|
stickyHeader: l,
|
|
287
|
-
...
|
|
288
|
-
} =
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
return e[5] !== t || e[6] !==
|
|
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 =
|
|
294
|
-
M.CellHeader =
|
|
295
|
-
M.Body =
|
|
296
|
-
M.Row =
|
|
297
|
-
M.Cell =
|
|
298
|
-
M.Container =
|
|
299
|
-
M.Paper =
|
|
300
|
-
M.Pagination =
|
|
301
|
-
M.PaginationActions =
|
|
302
|
-
function
|
|
303
|
-
const e = x(3), t =
|
|
304
|
-
let
|
|
305
|
-
return e[0] !==
|
|
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
|
|
308
|
-
function
|
|
309
|
-
refUI:
|
|
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
|
-
...
|
|
313
|
-
modifier: () =>
|
|
312
|
+
...K,
|
|
313
|
+
modifier: () => K.modifier(n)
|
|
314
314
|
}, {
|
|
315
|
-
...
|
|
315
|
+
...H,
|
|
316
316
|
modifier: async (e) => {
|
|
317
317
|
if (!e?.length)
|
|
318
|
-
return
|
|
318
|
+
return H.modifier([]);
|
|
319
319
|
const t = e[0];
|
|
320
320
|
if (!t)
|
|
321
|
-
return
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
return
|
|
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
|
|
326
|
+
return H.modifier([o, ...r]);
|
|
327
327
|
}
|
|
328
328
|
}];
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function it(n = []) {
|
|
331
331
|
return {
|
|
332
|
-
columns:
|
|
332
|
+
columns: n,
|
|
333
333
|
selectable: !1,
|
|
334
|
-
selected:
|
|
335
|
-
mode:
|
|
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
|
|
349
|
-
const t = x(38),
|
|
350
|
-
let
|
|
351
|
-
t[0] !== e || t[1] !==
|
|
352
|
-
const
|
|
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: !!
|
|
355
|
-
page:
|
|
356
|
-
rowsPerPage:
|
|
357
|
-
rowsPerPageOptions:
|
|
358
|
-
total:
|
|
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] =
|
|
361
|
-
const l =
|
|
362
|
-
let
|
|
363
|
-
t[3] !==
|
|
364
|
-
const
|
|
365
|
-
let
|
|
366
|
-
t[5] !==
|
|
367
|
-
const
|
|
368
|
-
n
|
|
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:
|
|
361
|
+
page: v
|
|
372
362
|
}
|
|
373
363
|
});
|
|
374
|
-
}, t[5] =
|
|
375
|
-
const c =
|
|
376
|
-
let
|
|
377
|
-
t[10] !== l || t[11] !==
|
|
378
|
-
n
|
|
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:
|
|
371
|
+
rowsPerPage: P
|
|
382
372
|
}
|
|
383
373
|
});
|
|
384
|
-
}, t[10] = l, t[11] =
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
t[14] !== c ? (
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
t[16] !==
|
|
391
|
-
const
|
|
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[
|
|
394
|
-
const
|
|
395
|
-
let
|
|
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 (
|
|
401
|
-
|
|
390
|
+
if (s === "remote" || !l.paginationEnabled) {
|
|
391
|
+
T = e;
|
|
402
392
|
break e;
|
|
403
393
|
}
|
|
404
|
-
let
|
|
405
|
-
t[25] !== e || t[26] !== l.page || t[27] !== l.rowsPerPage ? (
|
|
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
|
|
408
|
-
let
|
|
409
|
-
return t[29] !==
|
|
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:
|
|
401
|
+
paginatedData: w,
|
|
412
402
|
setPage: c,
|
|
413
|
-
setRowsPerPage:
|
|
414
|
-
goToFirstPage:
|
|
415
|
-
goToLastPage:
|
|
416
|
-
goToNextPage:
|
|
417
|
-
goToPreviousPage:
|
|
418
|
-
}, t[29] =
|
|
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
|
|
421
|
-
return
|
|
410
|
+
function xe(n) {
|
|
411
|
+
return n.setWidget;
|
|
422
412
|
}
|
|
423
|
-
function
|
|
424
|
-
const
|
|
425
|
-
let
|
|
426
|
-
|
|
427
|
-
|
|
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: !!
|
|
435
|
-
columnId:
|
|
436
|
-
direction:
|
|
419
|
+
sortEnabled: !!C?.sort,
|
|
420
|
+
columnId: C?.sort?.columnId ?? $e,
|
|
421
|
+
direction: C?.sort?.direction ?? Re
|
|
437
422
|
};
|
|
438
|
-
},
|
|
439
|
-
const
|
|
440
|
-
let
|
|
441
|
-
|
|
442
|
-
const
|
|
443
|
-
let
|
|
444
|
-
|
|
445
|
-
let
|
|
446
|
-
|
|
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
|
-
...
|
|
449
|
-
columnId:
|
|
450
|
-
direction:
|
|
433
|
+
...i,
|
|
434
|
+
columnId: g,
|
|
435
|
+
direction: C
|
|
451
436
|
}
|
|
452
|
-
})
|
|
453
|
-
},
|
|
454
|
-
const
|
|
455
|
-
let
|
|
456
|
-
|
|
457
|
-
|
|
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
|
-
...
|
|
460
|
-
columnId:
|
|
461
|
-
direction:
|
|
444
|
+
...i,
|
|
445
|
+
columnId: g,
|
|
446
|
+
direction: C
|
|
462
447
|
}
|
|
463
|
-
})
|
|
464
|
-
},
|
|
465
|
-
const
|
|
466
|
-
let
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
|
|
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
|
-
...
|
|
456
|
+
...g.sort,
|
|
472
457
|
columnId: null,
|
|
473
458
|
direction: "asc"
|
|
474
459
|
}
|
|
475
460
|
});
|
|
476
|
-
},
|
|
477
|
-
const
|
|
478
|
-
let
|
|
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 (
|
|
481
|
-
|
|
465
|
+
if (a === "remote" || !i.columnId || !i.sortEnabled) {
|
|
466
|
+
h = e;
|
|
482
467
|
break e;
|
|
483
468
|
}
|
|
484
|
-
let
|
|
485
|
-
|
|
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
|
|
488
|
-
let
|
|
489
|
-
return
|
|
490
|
-
...
|
|
491
|
-
sortedData:
|
|
492
|
-
toggleSort:
|
|
493
|
-
setSort:
|
|
494
|
-
clearSort:
|
|
495
|
-
},
|
|
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
|
|
498
|
-
return
|
|
482
|
+
function Oe(n) {
|
|
483
|
+
return n.getWidget;
|
|
499
484
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
485
|
+
function We(n) {
|
|
486
|
+
return n.setWidget;
|
|
502
487
|
}
|
|
503
|
-
function
|
|
488
|
+
function ct(n, e) {
|
|
504
489
|
const t = x(46);
|
|
505
|
-
let
|
|
506
|
-
t[0] !== e ? (
|
|
490
|
+
let o;
|
|
491
|
+
t[0] !== e ? (o = e ?? {}, t[0] = e, t[1] = o) : o = t[1];
|
|
507
492
|
const {
|
|
508
|
-
onSelectionChange:
|
|
509
|
-
} =
|
|
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[
|
|
515
|
-
const
|
|
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[
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
t[
|
|
521
|
-
|
|
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
|
|
527
|
-
return
|
|
528
|
-
}, t[10] = c, t[11] =
|
|
529
|
-
const
|
|
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[
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
selected:
|
|
535
|
-
}),
|
|
536
|
-
}, t[
|
|
537
|
-
const
|
|
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[
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
selected:
|
|
543
|
-
}),
|
|
544
|
-
}, t[
|
|
545
|
-
const
|
|
546
|
-
let
|
|
547
|
-
t[
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
selected:
|
|
551
|
-
}),
|
|
552
|
-
}, t[
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
t[
|
|
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:
|
|
574
|
-
isAllSelected:
|
|
575
|
-
isIndeterminate:
|
|
576
|
-
toggleRow:
|
|
577
|
-
toggleAll:
|
|
578
|
-
selectRows:
|
|
579
|
-
deselectRows:
|
|
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] =
|
|
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
|
|
584
|
-
return
|
|
568
|
+
function De(n) {
|
|
569
|
+
return n.id;
|
|
585
570
|
}
|
|
586
|
-
function Le(
|
|
587
|
-
return
|
|
571
|
+
function Le(n) {
|
|
572
|
+
return n.getWidget;
|
|
588
573
|
}
|
|
589
|
-
function
|
|
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:
|
|
593
|
-
} =
|
|
594
|
-
let
|
|
595
|
-
e[0] !==
|
|
596
|
-
length:
|
|
597
|
-
}).map(
|
|
598
|
-
let
|
|
599
|
-
e[2] !== l ? (
|
|
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] =
|
|
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[
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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
|
|
613
|
-
return /* @__PURE__ */ p(
|
|
600
|
+
function Ne(n, e) {
|
|
601
|
+
return /* @__PURE__ */ p(L, { children: /* @__PURE__ */ p(V, { width: "70%", height: 20 }) }, e);
|
|
614
602
|
}
|
|
615
|
-
function
|
|
616
|
-
return /* @__PURE__ */ p(
|
|
603
|
+
function je(n, e) {
|
|
604
|
+
return /* @__PURE__ */ p(L, { children: /* @__PURE__ */ p(V, { width: "80%", height: 24 }) }, e);
|
|
617
605
|
}
|
|
618
|
-
function
|
|
606
|
+
function Fe(n) {
|
|
619
607
|
const e = {
|
|
620
|
-
id:
|
|
608
|
+
id: n.id
|
|
621
609
|
};
|
|
622
|
-
for (const [t,
|
|
610
|
+
for (const [t, o] of Object.entries(n))
|
|
623
611
|
if (t !== "id")
|
|
624
|
-
if (typeof
|
|
625
|
-
e[t] =
|
|
626
|
-
else if (Array.isArray(
|
|
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(
|
|
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
|
|
637
|
-
return
|
|
624
|
+
function ft(n) {
|
|
625
|
+
return n?.map(Fe);
|
|
638
626
|
}
|
|
639
|
-
const
|
|
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: (
|
|
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: (
|
|
646
|
+
backgroundColor: (n) => n.palette.action.hover
|
|
659
647
|
}
|
|
660
648
|
},
|
|
661
649
|
rowSelected: {
|
|
662
|
-
backgroundColor: (
|
|
650
|
+
backgroundColor: (n) => n.palette.action.selected,
|
|
663
651
|
"&:hover": {
|
|
664
|
-
backgroundColor: (
|
|
652
|
+
backgroundColor: (n) => n.palette.action.selected
|
|
665
653
|
}
|
|
666
654
|
},
|
|
667
655
|
pagination: {
|
|
668
|
-
borderTop: (
|
|
656
|
+
borderTop: (n) => `1px solid ${n.palette.divider}`
|
|
669
657
|
}
|
|
670
658
|
};
|
|
671
659
|
export {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
660
|
+
ge as CellHeader,
|
|
661
|
+
ye as Pagination,
|
|
662
|
+
I as PaginationActions,
|
|
663
|
+
_e as Row,
|
|
676
664
|
M as Table,
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
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
|