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