@umriss-ui/table 0.11.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -0
- package/README.md +5 -2
- package/dist/index.d.ts +213 -85
- package/dist/table.js +1327 -1323
- package/docs/llms-full.md +5805 -2196
- package/package.json +3 -3
package/dist/table.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import "./table.css";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var ee = (e, t, n) =>
|
|
5
|
-
import { useState as Z, useCallback as
|
|
6
|
-
import { DEFAULT_FORMATS as
|
|
7
|
-
import { jsx as u, jsxs as T, Fragment as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
function
|
|
10
|
-
const [t, n] = Z(/* @__PURE__ */ new Set()), o =
|
|
2
|
+
var mo = Object.defineProperty;
|
|
3
|
+
var go = (e, t, n) => t in e ? mo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var ee = (e, t, n) => go(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
+
import { useState as Z, useCallback as xe, useMemo as se, useRef as fe, useId as Fe, useContext as Be, createContext as wt, useSyncExternalStore as yt, useLayoutEffect as le, useEffect as qe } from "react";
|
|
6
|
+
import { DEFAULT_FORMATS as Ln, treeModel as un, useVirtual as bo, useFormats as Ee, useWording as ke, Checkbox as tt, DateRangePicker as vo, FormField as Ft, NumberInput as Et, Tooltip as dt, Popover as _t, Button as ge, TagGroup as Fn, Tag as Yt, Menu as En, MenuItem as vt, MenuSeparator as wo, ControlSizeProvider as Dn, VisuallyHidden as Ge, Select as Bn, DatePicker as yo, Input as Pn, useDensityFor as zn, AngleGlyph as _o, usePortalTarget as ko, IconButton as So, assess as Co, verdictWeight as Dt, allBranches as xo, duplicateKey as No, DEFAULT_WORDING as Ao, Badge as at, useFreshness as Ro } from "@umriss-ui/core";
|
|
7
|
+
import { jsx as u, jsxs as T, Fragment as Se } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal as In } from "react-dom";
|
|
9
|
+
function To(e) {
|
|
10
|
+
const [t, n] = Z(/* @__PURE__ */ new Set()), o = xe((a) => t.has(a), [t]), r = xe((a) => {
|
|
11
11
|
n((f) => {
|
|
12
12
|
const d = new Set(f);
|
|
13
13
|
return d.has(a) ? d.delete(a) : d.add(a), d;
|
|
14
14
|
});
|
|
15
|
-
}, []), s =
|
|
15
|
+
}, []), s = se(
|
|
16
16
|
() => e.length > 0 && e.every((a) => t.has(a)),
|
|
17
17
|
[e, t]
|
|
18
|
-
), l =
|
|
18
|
+
), l = se(
|
|
19
19
|
() => !s && e.some((a) => t.has(a)),
|
|
20
20
|
[e, t, s]
|
|
21
|
-
), c =
|
|
21
|
+
), c = xe(() => {
|
|
22
22
|
n((a) => {
|
|
23
23
|
const f = new Set(a);
|
|
24
24
|
return e.length > 0 && e.every((m) => f.has(m)) ? e.forEach((m) => f.delete(m)) : e.forEach((m) => f.add(m)), f;
|
|
25
25
|
});
|
|
26
|
-
}, [e]), i =
|
|
26
|
+
}, [e]), i = xe(() => n(/* @__PURE__ */ new Set()), []);
|
|
27
27
|
return { selected: t, isSelected: o, toggle: r, toggleAll: c, clear: i, allSelected: s, someSelected: l, count: t.size };
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
function
|
|
31
|
-
return
|
|
29
|
+
const Ce = (e) => e == null || typeof e == "number" && Number.isNaN(e);
|
|
30
|
+
function kt(e) {
|
|
31
|
+
return Ce(e) ? "empty" : typeof e == "string" ? "text" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : e instanceof Date ? Number.isNaN(e.getTime()) ? "empty" : "date" : "other";
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function $n(e, t) {
|
|
34
34
|
for (const n of e) {
|
|
35
|
-
const o =
|
|
35
|
+
const o = kt(t(n));
|
|
36
36
|
if (o !== "empty") return o;
|
|
37
37
|
}
|
|
38
38
|
return "empty";
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
switch (
|
|
40
|
+
const Jt = (e, t) => t ?? e === "number";
|
|
41
|
+
function nt(e, t, n, o) {
|
|
42
|
+
switch (kt(e)) {
|
|
43
43
|
case "text":
|
|
44
44
|
return e;
|
|
45
45
|
case "number": {
|
|
@@ -56,10 +56,10 @@ function et(e, t, n, o) {
|
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
if (!
|
|
61
|
-
if (t) return
|
|
62
|
-
switch (
|
|
59
|
+
function Bt(e, t) {
|
|
60
|
+
if (!Ce(e)) {
|
|
61
|
+
if (t) return Bt(t(e));
|
|
62
|
+
switch (kt(e)) {
|
|
63
63
|
case "text":
|
|
64
64
|
return e;
|
|
65
65
|
case "number":
|
|
@@ -73,11 +73,11 @@ function Dt(e, t) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
78
|
-
if (!
|
|
79
|
-
if (t) return
|
|
80
|
-
switch (
|
|
76
|
+
const Oo = "ja", Mo = "nein";
|
|
77
|
+
function Vn(e, t) {
|
|
78
|
+
if (!Ce(e)) {
|
|
79
|
+
if (t) return Vn(t(e));
|
|
80
|
+
switch (kt(e)) {
|
|
81
81
|
case "text":
|
|
82
82
|
return e;
|
|
83
83
|
case "number":
|
|
@@ -85,21 +85,21 @@ function $n(e, t) {
|
|
|
85
85
|
case "date":
|
|
86
86
|
return e.toISOString();
|
|
87
87
|
case "boolean":
|
|
88
|
-
return e ?
|
|
88
|
+
return e ? Oo : Mo;
|
|
89
89
|
default:
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
96
|
-
const n = t.map(e.read).filter((i) => !
|
|
94
|
+
const Xt = "absent", Ve = (e) => Ce(e) ? Xt : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, dn = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
|
|
95
|
+
function Qt(e, t) {
|
|
96
|
+
const n = t.map(e.read).filter((i) => !Ce(i) && !(i instanceof Date && Number.isNaN(i.getTime()))), o = e.aggregate;
|
|
97
97
|
if (typeof o == "function") return o(n, t);
|
|
98
98
|
if (o === "count") return n.length;
|
|
99
|
-
if (o === "distinct") return new Set(n.map(
|
|
100
|
-
const r = n.filter((i) =>
|
|
99
|
+
if (o === "distinct") return new Set(n.map(Ve)).size;
|
|
100
|
+
const r = n.filter((i) => dn(i) !== void 0);
|
|
101
101
|
if (r.length === 0) return;
|
|
102
|
-
const s = r.map((i) =>
|
|
102
|
+
const s = r.map((i) => dn(i)), l = r[0] instanceof Date, c = (i) => l ? new Date(i) : i;
|
|
103
103
|
switch (o) {
|
|
104
104
|
case "sum":
|
|
105
105
|
return s.reduce((i, a) => i + a, 0);
|
|
@@ -113,26 +113,26 @@ function Xt(e, t) {
|
|
|
113
113
|
return [c(Math.min(...s)), c(Math.max(...s))];
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
if (!
|
|
116
|
+
const Zt = 3, ft = (e) => {
|
|
117
|
+
if (!Ce(e))
|
|
118
118
|
return e instanceof Date ? e.getTime() : typeof e == "boolean" ? e ? 1 : 0 : typeof e == "number" ? e : String(e);
|
|
119
119
|
};
|
|
120
|
-
function
|
|
120
|
+
function Rt(e, t, n) {
|
|
121
121
|
const o = ft(e), r = ft(t);
|
|
122
122
|
return o === void 0 || r === void 0 ? o === r ? 0 : o === void 0 ? 1 : -1 : typeof o == "number" && typeof r == "number" ? o - r : n(String(o), String(r));
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
const n = t.compareText ??
|
|
124
|
+
function Lo(e, t) {
|
|
125
|
+
const n = t.compareText ?? Ln.compareText, o = (r, s, l) => {
|
|
126
126
|
var p;
|
|
127
127
|
const c = /* @__PURE__ */ new Map(), i = t.levels[s];
|
|
128
128
|
if (!i) return [];
|
|
129
129
|
const a = /* @__PURE__ */ new Map();
|
|
130
130
|
for (const b of r) {
|
|
131
|
-
const R = i.value(b), E =
|
|
131
|
+
const R = i.value(b), E = Ve(R);
|
|
132
132
|
let y = a.get(E);
|
|
133
133
|
y || (y = {
|
|
134
134
|
path: JSON.stringify([...l, E]),
|
|
135
|
-
value:
|
|
135
|
+
value: Ce(R) ? void 0 : R,
|
|
136
136
|
level: s,
|
|
137
137
|
rows: [],
|
|
138
138
|
groups: [],
|
|
@@ -140,7 +140,7 @@ function Mo(e, t) {
|
|
|
140
140
|
}, a.set(E, y), c.set(y, [...l, E])), y.rows.push(b);
|
|
141
141
|
}
|
|
142
142
|
for (const b of a.values())
|
|
143
|
-
for (const R of t.aggregates ?? []) b.aggregates[R.id] =
|
|
143
|
+
for (const R of t.aggregates ?? []) b.aggregates[R.id] = Qt(R, b.rows);
|
|
144
144
|
const f = (p = t.sort) == null ? void 0 : p.find(
|
|
145
145
|
(b) => {
|
|
146
146
|
var R;
|
|
@@ -150,7 +150,7 @@ function Mo(e, t) {
|
|
|
150
150
|
let R;
|
|
151
151
|
for (const E of b.rows) {
|
|
152
152
|
const y = i.order(E);
|
|
153
|
-
ft(y) !== void 0 && (R === void 0 ||
|
|
153
|
+
ft(y) !== void 0 && (R === void 0 || Rt(y, R, n) < 0) && (R = y);
|
|
154
154
|
}
|
|
155
155
|
return R;
|
|
156
156
|
}, g = (b) => {
|
|
@@ -158,8 +158,8 @@ function Mo(e, t) {
|
|
|
158
158
|
const R = b.aggregates[m];
|
|
159
159
|
return Array.isArray(R) ? R[0] : R;
|
|
160
160
|
}, v = [...a.values()].sort((b, R) => {
|
|
161
|
-
if (b.value === void 0 || R.value === void 0) return
|
|
162
|
-
const E = g(b), y = g(R), _ =
|
|
161
|
+
if (b.value === void 0 || R.value === void 0) return Rt(b.value, R.value, n);
|
|
162
|
+
const E = g(b), y = g(R), _ = Rt(E, y, n);
|
|
163
163
|
return ft(E) === void 0 || ft(y) === void 0 ? _ : _ * d;
|
|
164
164
|
});
|
|
165
165
|
for (const b of v)
|
|
@@ -168,32 +168,32 @@ function Mo(e, t) {
|
|
|
168
168
|
};
|
|
169
169
|
return o(e, 0, []);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Fo(e, t) {
|
|
172
172
|
const n = /* @__PURE__ */ new Set(), o = (r) => {
|
|
173
173
|
for (const s of r)
|
|
174
174
|
n.add(s.path), o(s.groups);
|
|
175
175
|
};
|
|
176
176
|
return o(e), t.filter((r) => n.has(r));
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const Eo = (e) => (t) => {
|
|
179
179
|
if (!(t instanceof Date) || Number.isNaN(t.getTime())) return;
|
|
180
180
|
const n = t.getFullYear(), o = t.getMonth(), r = t.getDate();
|
|
181
181
|
return e === "year" ? new Date(n, 0, 1) : e === "month" ? new Date(n, o, 1) : e === "week" ? new Date(n, o, r - (t.getDay() + 6) % 7) : new Date(n, o, r);
|
|
182
182
|
};
|
|
183
|
-
function
|
|
183
|
+
function Do(e) {
|
|
184
184
|
const t = new Date(e.getFullYear(), e.getMonth(), e.getDate() + 3 - (e.getDay() + 6) % 7), n = new Date(t.getFullYear(), 0, 4);
|
|
185
185
|
return { week: 1 + Math.round((t.getTime() - n.getTime()) / 864e5 / 7 - ((n.getDay() + 6) % 7 - 3) / 7), year: t.getFullYear() };
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function Bo(e, t, n, o) {
|
|
188
188
|
if (e === "year") return String(t.getFullYear());
|
|
189
189
|
if (e === "month") return n.month(t);
|
|
190
190
|
if (e === "week") {
|
|
191
|
-
const { week: r, year: s } =
|
|
191
|
+
const { week: r, year: s } = Do(t);
|
|
192
192
|
return o.calendarWeek(r, s);
|
|
193
193
|
}
|
|
194
194
|
return n.date(t);
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Po(e, t) {
|
|
197
197
|
const n = [], o = (r, s) => {
|
|
198
198
|
for (const l of r) {
|
|
199
199
|
const c = t.has(l.path);
|
|
@@ -212,10 +212,10 @@ function zo(e, t, n) {
|
|
|
212
212
|
for (let i = 0; i += Math.max(1, n - (((c = e[i]) == null ? void 0 : c.parents.length) ?? 0)), !(i >= e.length); )
|
|
213
213
|
o.push(i);
|
|
214
214
|
const r = o.length, s = Math.min(Math.max(1, t), r), l = n > 0 ? e.slice(o[s - 1], o[s] ?? e.length) : [...e];
|
|
215
|
-
return { lines:
|
|
215
|
+
return { lines: Gn(l), page: s, pageCount: r };
|
|
216
216
|
}
|
|
217
|
-
const
|
|
218
|
-
function
|
|
217
|
+
const en = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
|
|
218
|
+
function Gn(e) {
|
|
219
219
|
const t = e[0];
|
|
220
220
|
if (!t) return [...e];
|
|
221
221
|
const n = t.parents.map((r, s) => ({
|
|
@@ -226,14 +226,14 @@ function Vn(e) {
|
|
|
226
226
|
})), o = t.kind === "row" && t.span && !t.first ? { ...t, first: !0, continued: !0 } : t;
|
|
227
227
|
return [...n, o, ...e.slice(1)];
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function tn(e, t) {
|
|
230
230
|
return t != null && t.length ? [
|
|
231
231
|
...t.map((n) => e.find((o) => o.id === n)).filter((n) => n !== void 0),
|
|
232
232
|
...e.filter((n) => !t.includes(n.id))
|
|
233
233
|
] : e;
|
|
234
234
|
}
|
|
235
|
-
const
|
|
236
|
-
function
|
|
235
|
+
const Ze = (e) => e == null || typeof e == "number" && Number.isNaN(e), Io = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : Ln.compareText(String(e), String(t));
|
|
236
|
+
function nn(e, t, n) {
|
|
237
237
|
var I;
|
|
238
238
|
const {
|
|
239
239
|
search: o = "",
|
|
@@ -243,66 +243,66 @@ function tn(e, t, n) {
|
|
|
243
243
|
pageSize: c,
|
|
244
244
|
hidden: i,
|
|
245
245
|
order: a
|
|
246
|
-
} = n, f =
|
|
246
|
+
} = n, f = tn(t, a), d = i != null && i.length ? f.filter((A) => A.hideable === !1 || !i.includes(A.id)) : f;
|
|
247
247
|
if (n.manual) {
|
|
248
|
-
const { rowCount: A } = n.manual,
|
|
248
|
+
const { rowCount: A } = n.manual, M = c && c > 0 ? c : Math.max(A, 1), D = Math.max(1, Math.ceil(A / M)), L = A > 0 ? Math.min(Math.max(1, l), D) : Math.max(1, l);
|
|
249
249
|
return {
|
|
250
250
|
columns: d,
|
|
251
251
|
filtered: [...e],
|
|
252
252
|
visible: [...e],
|
|
253
|
-
page:
|
|
253
|
+
page: L,
|
|
254
254
|
pageCount: D,
|
|
255
255
|
columnCount: d.length
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
const m = o.trim().toLowerCase(), w = t.filter((A) => A.searchable && A.value), g = (A) => !m || w.some((
|
|
259
|
-
const D =
|
|
260
|
-
return !
|
|
258
|
+
const m = o.trim().toLowerCase(), w = t.filter((A) => A.searchable && A.value), g = (A) => !m || w.some((M) => {
|
|
259
|
+
const D = M.value(A);
|
|
260
|
+
return !Ze(D) && String(D).toLowerCase().includes(m);
|
|
261
261
|
}), v = (A) => g(A) && (r ? r(A) : !0), p = Array.isArray(s) ? s : s ? [s] : [], b = p.map((A) => {
|
|
262
|
-
const
|
|
263
|
-
if (!
|
|
264
|
-
const D = A.direction === "asc" ? 1 : -1,
|
|
262
|
+
const M = t.find((H) => H.id === A.column);
|
|
263
|
+
if (!M || !M.compare && !M.value) return null;
|
|
264
|
+
const D = A.direction === "asc" ? 1 : -1, L = M.compare, B = M.value;
|
|
265
265
|
return B ? (H, J) => {
|
|
266
|
-
const
|
|
267
|
-
return
|
|
268
|
-
} : (H, J) =>
|
|
266
|
+
const G = B(H), ae = B(J);
|
|
267
|
+
return Ze(G) || Ze(ae) ? Ze(G) === Ze(ae) ? 0 : Ze(G) ? 1 : -1 : (L ? L(H, J) : Io(G, ae)) * D;
|
|
268
|
+
} : (H, J) => L(H, J) * D;
|
|
269
269
|
}).filter((A) => A !== null), R = (A) => (
|
|
270
270
|
// Array#sort is stable (ES2019), equal values keep their order.
|
|
271
|
-
b.length === 0 ? [...A] : [...A].sort((
|
|
272
|
-
for (const
|
|
273
|
-
const B =
|
|
271
|
+
b.length === 0 ? [...A] : [...A].sort((M, D) => {
|
|
272
|
+
for (const L of b) {
|
|
273
|
+
const B = L(M, D);
|
|
274
274
|
if (B !== 0) return B;
|
|
275
275
|
}
|
|
276
276
|
return 0;
|
|
277
277
|
})
|
|
278
278
|
);
|
|
279
|
-
if (n.tree) return
|
|
279
|
+
if (n.tree) return $o(e, n.tree, R, m || r ? v : void 0, d);
|
|
280
280
|
const E = R(e.filter(v));
|
|
281
281
|
if ((I = n.grouping) != null && I.levels.length) {
|
|
282
|
-
const { folded: A, ...
|
|
282
|
+
const { folded: A, ...M } = n.grouping, D = Lo(E, { ...M, sort: p }), L = Po(D, A), B = zo(L, l, c ?? 0);
|
|
283
283
|
return {
|
|
284
284
|
columns: d,
|
|
285
285
|
filtered: E,
|
|
286
|
-
visible:
|
|
286
|
+
visible: en(B.lines),
|
|
287
287
|
groups: D,
|
|
288
|
-
lines:
|
|
288
|
+
lines: L,
|
|
289
289
|
visibleLines: B.lines,
|
|
290
290
|
page: B.page,
|
|
291
291
|
pageCount: B.pageCount,
|
|
292
292
|
columnCount: d.length
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const y = c && c > 0 ? c : E.length || 1, _ = Math.max(1, Math.ceil(E.length / y)), x = Math.min(Math.max(1, l), _),
|
|
295
|
+
const y = c && c > 0 ? c : E.length || 1, _ = Math.max(1, Math.ceil(E.length / y)), x = Math.min(Math.max(1, l), _), O = E.slice((x - 1) * y, x * y);
|
|
296
296
|
return {
|
|
297
297
|
columns: d,
|
|
298
298
|
filtered: E,
|
|
299
|
-
visible:
|
|
299
|
+
visible: O,
|
|
300
300
|
page: x,
|
|
301
301
|
pageCount: _,
|
|
302
302
|
columnCount: d.length
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function $o(e, t, n, o, r) {
|
|
306
306
|
const { admit: s } = t, l = (b) => n(s ? b.filter(s) : b), c = /* @__PURE__ */ new Map(), i = {
|
|
307
307
|
key: t.key,
|
|
308
308
|
children: (b) => {
|
|
@@ -314,7 +314,7 @@ function Io(e, t, n, o, r) {
|
|
|
314
314
|
},
|
|
315
315
|
label: () => "",
|
|
316
316
|
matches: o
|
|
317
|
-
}, a = l(e), f = { expanded: t.open, checked: /* @__PURE__ */ new Set(), active: null, anchor: null, search: "" }, d =
|
|
317
|
+
}, a = l(e), f = { expanded: t.open, checked: /* @__PURE__ */ new Set(), active: null, anchor: null, search: "" }, d = un(a, i, f), m = /* @__PURE__ */ new Set();
|
|
318
318
|
let w = 0;
|
|
319
319
|
const g = (b) => {
|
|
320
320
|
for (const R of b) {
|
|
@@ -324,7 +324,7 @@ function Io(e, t, n, o, r) {
|
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
326
|
g(a);
|
|
327
|
-
const v =
|
|
327
|
+
const v = un(a, i, { ...f, expanded: m }), p = d.map((b) => b.node);
|
|
328
328
|
return {
|
|
329
329
|
columns: r,
|
|
330
330
|
filtered: v.filter((b) => b.matches).map((b) => b.node),
|
|
@@ -339,167 +339,167 @@ function Io(e, t, n, o, r) {
|
|
|
339
339
|
columnCount: r.length
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Vo(e, t, n) {
|
|
343
343
|
const { rowKey: o, filter: r, defaultSort: s = null, initialView: l, virtual: c, grouping: i, manual: a, tree: f } = n, [d, m] = Z((l == null ? void 0 : l.search) ?? ""), [w, g] = Z(() => {
|
|
344
344
|
var V;
|
|
345
345
|
return (V = l == null ? void 0 : l.sort) != null && V.length ? [...l.sort] : s ? Array.isArray(s) ? [...s] : [s] : [];
|
|
346
346
|
}), [v, p] = Z((l == null ? void 0 : l.page) ?? 1), [b, R] = Z(
|
|
347
347
|
(l == null ? void 0 : l.pageSize) ?? n.pageSize ?? 10
|
|
348
|
-
), [E, y] = Z([]), [_, x] = Z((l == null ? void 0 : l.hidden) ?? []), [
|
|
348
|
+
), [E, y] = Z([]), [_, x] = Z((l == null ? void 0 : l.hidden) ?? []), [O, I] = Z((l == null ? void 0 : l.order) ?? []), [A, M] = Z(() => {
|
|
349
349
|
if (l != null && l.widths) return { ...l.widths };
|
|
350
350
|
const V = {};
|
|
351
351
|
for (const X of t)
|
|
352
352
|
X.width !== void 0 && (V[X.id] = X.width);
|
|
353
353
|
return V;
|
|
354
|
-
}), D = c || f ? 0 : b,
|
|
355
|
-
() =>
|
|
354
|
+
}), D = c || f ? 0 : b, L = se(
|
|
355
|
+
() => nn(e, t, {
|
|
356
356
|
search: d,
|
|
357
357
|
filter: r,
|
|
358
358
|
sort: w,
|
|
359
359
|
page: v,
|
|
360
360
|
pageSize: D,
|
|
361
361
|
hidden: _,
|
|
362
|
-
order:
|
|
362
|
+
order: O,
|
|
363
363
|
grouping: i,
|
|
364
364
|
manual: a,
|
|
365
365
|
tree: f
|
|
366
366
|
}),
|
|
367
|
-
[e, t, d, r, w, v, D, _,
|
|
368
|
-
), [B, H] = Z(36), J =
|
|
367
|
+
[e, t, d, r, w, v, D, _, O, i, a, f]
|
|
368
|
+
), [B, H] = Z(36), J = bo(c ? (L.lines ?? L.shown ?? L.filtered).length : 0, {
|
|
369
369
|
rowHeight: c ? B : 0,
|
|
370
370
|
overscan: typeof c == "object" ? c.overscan : void 0
|
|
371
|
-
}),
|
|
372
|
-
() => c &&
|
|
373
|
-
[c,
|
|
374
|
-
),
|
|
375
|
-
() => c ?
|
|
376
|
-
[c,
|
|
377
|
-
),
|
|
371
|
+
}), G = se(
|
|
372
|
+
() => c && L.lines ? L.lines.slice(J.from, J.to) : L.visibleLines,
|
|
373
|
+
[c, L.lines, L.visibleLines, J.from, J.to]
|
|
374
|
+
), ae = se(
|
|
375
|
+
() => c ? G ? en(G) : (L.shown ?? L.filtered).slice(J.from, J.to) : L.visible,
|
|
376
|
+
[c, G, L.shown, L.filtered, L.visible, J.from, J.to]
|
|
377
|
+
), ne = se(() => L.filtered.map(o), [L.filtered, o]), Re = To(ne), k = xe((V) => {
|
|
378
378
|
m(V), p(1);
|
|
379
|
-
}, []), C =
|
|
379
|
+
}, []), C = xe((V) => {
|
|
380
380
|
R(V), p(1);
|
|
381
|
-
}, []), N =
|
|
382
|
-
g((
|
|
383
|
-
const
|
|
381
|
+
}, []), N = xe((V, X = !1) => {
|
|
382
|
+
g((re) => {
|
|
383
|
+
const we = re.find((pe) => pe.column === V);
|
|
384
384
|
if (!X) {
|
|
385
|
-
const
|
|
386
|
-
return [{ column: V, direction:
|
|
385
|
+
const pe = re.length === 1 && (we == null ? void 0 : we.direction) === "asc" ? "desc" : "asc";
|
|
386
|
+
return [{ column: V, direction: pe }];
|
|
387
387
|
}
|
|
388
|
-
return
|
|
389
|
-
(
|
|
390
|
-
) :
|
|
388
|
+
return we ? we.direction === "asc" ? re.map(
|
|
389
|
+
(pe) => pe.column === V ? { column: V, direction: "desc" } : pe
|
|
390
|
+
) : re.filter((pe) => pe.column !== V) : [...re, { column: V, direction: "asc" }];
|
|
391
391
|
}), p(1);
|
|
392
|
-
}, []),
|
|
392
|
+
}, []), K = xe((V) => {
|
|
393
393
|
y(
|
|
394
|
-
(X) => X.includes(V) ? X.filter((
|
|
394
|
+
(X) => X.includes(V) ? X.filter((re) => re !== V) : [...X, V]
|
|
395
395
|
);
|
|
396
|
-
}, []), W =
|
|
396
|
+
}, []), W = xe(
|
|
397
397
|
(V) => E.includes(V),
|
|
398
398
|
[E]
|
|
399
|
-
),
|
|
399
|
+
), oe = xe((V) => {
|
|
400
400
|
x(
|
|
401
|
-
(X) => X.includes(V) ? X.filter((
|
|
401
|
+
(X) => X.includes(V) ? X.filter((re) => re !== V) : [...X, V]
|
|
402
402
|
);
|
|
403
|
-
}, []),
|
|
404
|
-
|
|
403
|
+
}, []), P = xe((V, X) => {
|
|
404
|
+
M((re) => {
|
|
405
405
|
if (X === void 0) {
|
|
406
|
-
if (!(V in
|
|
407
|
-
const
|
|
408
|
-
return delete
|
|
406
|
+
if (!(V in re)) return re;
|
|
407
|
+
const we = { ...re };
|
|
408
|
+
return delete we[V], we;
|
|
409
409
|
}
|
|
410
|
-
return { ...
|
|
410
|
+
return { ...re, [V]: X };
|
|
411
411
|
});
|
|
412
|
-
}, []),
|
|
412
|
+
}, []), ce = xe(
|
|
413
413
|
(V) => {
|
|
414
414
|
var X;
|
|
415
|
-
return (X = w.find((
|
|
415
|
+
return (X = w.find((re) => re.column === V)) == null ? void 0 : X.direction;
|
|
416
416
|
},
|
|
417
417
|
[w]
|
|
418
|
-
), q =
|
|
418
|
+
), q = xe(
|
|
419
419
|
(V) => {
|
|
420
420
|
if (w.length < 2) return;
|
|
421
|
-
const X = w.findIndex((
|
|
421
|
+
const X = w.findIndex((re) => re.column === V);
|
|
422
422
|
return X === -1 ? void 0 : X + 1;
|
|
423
423
|
},
|
|
424
424
|
[w]
|
|
425
|
-
),
|
|
426
|
-
() =>
|
|
427
|
-
[t,
|
|
428
|
-
),
|
|
425
|
+
), he = se(
|
|
426
|
+
() => tn(t, O).filter((V) => V.label !== void 0 && V.hideable !== !1).map((V) => ({ id: V.id, label: V.label, visible: !_.includes(V.id) })),
|
|
427
|
+
[t, O, _]
|
|
428
|
+
), Y = n.pageSize ?? 10, te = se(() => {
|
|
429
429
|
const V = {};
|
|
430
430
|
for (const X of t)
|
|
431
431
|
X.width !== void 0 && (V[X.id] = X.width);
|
|
432
432
|
return V;
|
|
433
|
-
}, [t]),
|
|
433
|
+
}, [t]), Ne = se(() => {
|
|
434
434
|
const V = {};
|
|
435
|
-
for (const [X,
|
|
436
|
-
te[X] !==
|
|
435
|
+
for (const [X, re] of Object.entries(A))
|
|
436
|
+
te[X] !== re && (V[X] = re);
|
|
437
437
|
return V;
|
|
438
|
-
}, [A, te]),
|
|
438
|
+
}, [A, te]), Pe = se(
|
|
439
439
|
() => s ? Array.isArray(s) ? s : [s] : [],
|
|
440
440
|
[s]
|
|
441
|
-
),
|
|
441
|
+
), Le = w.length === Pe.length && w.every(
|
|
442
442
|
(V, X) => {
|
|
443
|
-
var
|
|
444
|
-
return V.column === ((
|
|
443
|
+
var re, we;
|
|
444
|
+
return V.column === ((re = Pe[X]) == null ? void 0 : re.column) && V.direction === ((we = Pe[X]) == null ? void 0 : we.direction);
|
|
445
445
|
}
|
|
446
|
-
),
|
|
446
|
+
), Ye = se(
|
|
447
447
|
() => ({
|
|
448
448
|
...d ? { search: d } : {},
|
|
449
|
-
...w.length && !
|
|
449
|
+
...w.length && !Le ? { sort: w } : {},
|
|
450
450
|
/* Without paging there is no page a view could carry - a page three in
|
|
451
451
|
the view of a virtualised table would be a promise nobody redeems on
|
|
452
452
|
opening. */
|
|
453
|
-
...!c &&
|
|
454
|
-
...!c && b !==
|
|
453
|
+
...!c && L.page > 1 ? { page: L.page } : {},
|
|
454
|
+
...!c && b !== Y ? { pageSize: b } : {},
|
|
455
455
|
..._.length ? { hidden: _ } : {},
|
|
456
|
-
...
|
|
457
|
-
...Object.keys(
|
|
456
|
+
...O.length ? { order: O } : {},
|
|
457
|
+
...Object.keys(Ne).length ? { widths: Ne } : {}
|
|
458
458
|
}),
|
|
459
459
|
[
|
|
460
460
|
c,
|
|
461
461
|
d,
|
|
462
462
|
w,
|
|
463
|
-
|
|
464
|
-
|
|
463
|
+
Le,
|
|
464
|
+
L.page,
|
|
465
465
|
b,
|
|
466
|
-
|
|
466
|
+
Y,
|
|
467
467
|
_,
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
O,
|
|
469
|
+
Ne
|
|
470
470
|
]
|
|
471
471
|
);
|
|
472
472
|
return {
|
|
473
|
-
...
|
|
474
|
-
visible:
|
|
475
|
-
visibleLines:
|
|
473
|
+
...L,
|
|
474
|
+
visible: ae,
|
|
475
|
+
visibleLines: G,
|
|
476
476
|
virtual: c ? J : void 0,
|
|
477
477
|
setPitch: H,
|
|
478
478
|
manual: a,
|
|
479
|
-
view:
|
|
479
|
+
view: Ye,
|
|
480
480
|
search: d,
|
|
481
481
|
setSearch: k,
|
|
482
482
|
sort: w,
|
|
483
483
|
toggleSort: N,
|
|
484
|
-
sortDirectionOf:
|
|
484
|
+
sortDirectionOf: ce,
|
|
485
485
|
sortRankOf: q,
|
|
486
486
|
setPage: p,
|
|
487
487
|
pageSize: b,
|
|
488
488
|
setPageSize: C,
|
|
489
489
|
expanded: E,
|
|
490
|
-
toggleRow:
|
|
490
|
+
toggleRow: K,
|
|
491
491
|
isExpanded: W,
|
|
492
492
|
hidden: _,
|
|
493
|
-
toggleColumn:
|
|
494
|
-
columnChoices:
|
|
495
|
-
order:
|
|
493
|
+
toggleColumn: oe,
|
|
494
|
+
columnChoices: he,
|
|
495
|
+
order: O,
|
|
496
496
|
setOrder: I,
|
|
497
497
|
widths: A,
|
|
498
|
-
setWidth:
|
|
499
|
-
selection:
|
|
498
|
+
setWidth: P,
|
|
499
|
+
selection: Re
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Go(e, t) {
|
|
503
503
|
return [
|
|
504
504
|
...e.filter((n) => t[n.id] === "start"),
|
|
505
505
|
...e.filter((n) => t[n.id] === void 0),
|
|
@@ -511,222 +511,222 @@ function Ko(e, t) {
|
|
|
511
511
|
for (const o of e) o.pin && (n[o.id] = o.pin);
|
|
512
512
|
return t !== void 0 && !n[t] && (n[t] = "start"), n;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Ho(e, t, n) {
|
|
515
515
|
const o = { ...e };
|
|
516
516
|
return n ? o[t] = n : delete o[t], o;
|
|
517
517
|
}
|
|
518
|
-
const
|
|
519
|
-
function
|
|
518
|
+
const jo = (e, t) => Object.keys(e).length === Object.keys(t).length && Object.entries(e).every(([n, o]) => t[n] === o);
|
|
519
|
+
function Wo(e, t, n) {
|
|
520
520
|
if (!e) return;
|
|
521
521
|
const o = n.size === 0 ? e : Object.fromEntries(Object.entries(e).filter(([r]) => n.has(r)));
|
|
522
|
-
return
|
|
522
|
+
return jo(o, t) ? void 0 : o;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function qo(e, t, n = t) {
|
|
525
525
|
if (n < e.start) return { side: "start", at: t, edge: n === e.start - 1 };
|
|
526
526
|
const o = e.count - e.end;
|
|
527
527
|
if (e.end > 0 && t >= o) return { side: "end", at: e.count - 1 - n, edge: t === o };
|
|
528
528
|
}
|
|
529
|
-
const
|
|
530
|
-
function
|
|
531
|
-
const o = n - Math.min(n / 2,
|
|
529
|
+
const Uo = 256;
|
|
530
|
+
function Yo(e, t, n) {
|
|
531
|
+
const o = n - Math.min(n / 2, Uo);
|
|
532
532
|
return n <= 0 || e + t <= o ? { start: !0, end: !0 } : e > 0 && e <= o ? { start: !0, end: !1 } : { start: !1, end: t > 0 && t <= o };
|
|
533
533
|
}
|
|
534
|
-
const
|
|
535
|
-
function
|
|
534
|
+
const Jo = (e) => JSON.stringify([e.search, e.conditions, e.sort, e.page, e.pageSize]);
|
|
535
|
+
function Xo() {
|
|
536
536
|
var t;
|
|
537
537
|
const e = import.meta;
|
|
538
538
|
return typeof ((t = e.env) == null ? void 0 : t.DEV) == "boolean" ? e.env.DEV : typeof process < "u" && (process != null && process.env) ? process.env.NODE_ENV !== "production" : !1;
|
|
539
539
|
}
|
|
540
|
-
const
|
|
540
|
+
const on = Xo(), fn = /* @__PURE__ */ new Set();
|
|
541
541
|
function ve(e, t) {
|
|
542
|
-
!
|
|
543
|
-
}
|
|
544
|
-
const
|
|
545
|
-
frame:
|
|
546
|
-
children:
|
|
547
|
-
scroll:
|
|
548
|
-
footerTarget:
|
|
549
|
-
table:
|
|
550
|
-
th:
|
|
551
|
-
sticky:
|
|
552
|
-
td:
|
|
553
|
-
rowHeader:
|
|
554
|
-
compact:
|
|
555
|
-
numeric:
|
|
556
|
-
value:
|
|
557
|
-
valueText:
|
|
558
|
-
sized:
|
|
559
|
-
cutTip:
|
|
560
|
-
absent:
|
|
561
|
-
striped:
|
|
562
|
-
pinned:
|
|
563
|
-
pinStartEdge:
|
|
564
|
-
pinEndEdge:
|
|
565
|
-
sortButton:
|
|
566
|
-
sortIndicator:
|
|
567
|
-
sortArrow:
|
|
568
|
-
sortArrowDesc:
|
|
569
|
-
sortActive:
|
|
570
|
-
sortRank:
|
|
571
|
-
thFlex:
|
|
572
|
-
footerKind:
|
|
573
|
-
emptyCell:
|
|
574
|
-
emptyTitle:
|
|
575
|
-
skeleton:
|
|
576
|
-
toolbar:
|
|
577
|
-
toolbarGroup:
|
|
578
|
-
toolbarGroupIdle:
|
|
579
|
-
toolbarMd:
|
|
580
|
-
toolbarInfo:
|
|
581
|
-
pagination:
|
|
582
|
-
paginationControls:
|
|
583
|
-
pageSize:
|
|
584
|
-
pageSteps:
|
|
542
|
+
!on || fn.has(e) || (fn.add(e), console.warn(`@umriss-ui/table: ${t}`));
|
|
543
|
+
}
|
|
544
|
+
const Qo = "_frame_1m1ru_11 _text_r8i8z_23", Zo = "_children_1m1ru_24", er = "_scroll_1m1ru_33 _scroll_r8i8z_96", tr = "_footerTarget_1m1ru_62", nr = "_table_1m1ru_75", or = "_th_1m1ru_87 _ring_r8i8z_125", rr = "_sticky_1m1ru_104", sr = "_td_1m1ru_112", ir = "_rowHeader_1m1ru_126", lr = "_compact_1m1ru_147 _dense_r8i8z_39", ar = "_numeric_1m1ru_178", cr = "_value_1m1ru_198", ur = "_valueText_1m1ru_208", dr = "_sized_1m1ru_212", fr = "_cutTip_1m1ru_229 _text_r8i8z_23", hr = "_absent_1m1ru_261", pr = "_striped_1m1ru_265", mr = "_pinned_1m1ru_292", gr = "_pinStartEdge_1m1ru_308", br = "_pinEndEdge_1m1ru_309", vr = "_sortButton_1m1ru_339 _ring_r8i8z_125", wr = "_sortIndicator_1m1ru_364", yr = "_sortArrow_1m1ru_371", _r = "_sortArrowDesc_1m1ru_375", kr = "_sortActive_1m1ru_383", Sr = "_sortRank_1m1ru_389", Cr = "_thFlex_1m1ru_397", xr = "_footerKind_1m1ru_422", Nr = "_emptyCell_1m1ru_440", Ar = "_emptyTitle_1m1ru_462", Rr = "_skeleton_1m1ru_471", Tr = "_toolbar_1m1ru_503 _text_r8i8z_23", Or = "_toolbarGroup_1m1ru_520", Mr = "_toolbarGroupIdle_1m1ru_537", Lr = "_toolbarMd_1m1ru_543", Fr = "_toolbarInfo_1m1ru_547", Er = "_pagination_1m1ru_553 _text_r8i8z_23", Dr = "_paginationControls_1m1ru_566", Br = "_pageSize_1m1ru_573", Pr = "_pageSteps_1m1ru_581", zr = "_paginationStatus_1m1ru_587", Ir = "_filterButton_1m1ru_596 _ring_r8i8z_125", $r = "_filterActive_1m1ru_623", Vr = "_filterPanel_1m1ru_628", Gr = "_filterContent_1m1ru_642 _scroll_r8i8z_96", Kr = "_filterFooter_1m1ru_653", Hr = "_filterLabel_1m1ru_667", jr = "_filterValue_1m1ru_677", Wr = "_filteredCount_1m1ru_683", qr = "_rangeFields_1m1ru_694", Ur = "_rangePeriod_1m1ru_704", Yr = "_conditions_1m1ru_710", Jr = "_conditionButton_1m1ru_716", Xr = "_condition_1m1ru_710", Qr = "_columnsPanel_1m1ru_741", Zr = "_columnsList_1m1ru_750", es = "_columnsEntry_1m1ru_759", ts = "_move_1m1ru_771", ns = "_pinOn_1m1ru_809", os = "_groupingChoice_1m1ru_819", rs = "_groupingHeading_1m1ru_827", ss = "_groupingOptions_1m1ru_836", is = "_groupingOption_1m1ru_836 _ring_r8i8z_125", ls = "_groupingLevel_1m1ru_879", as = "_groupingTag_1m1ru_884", cs = "_groupingTrigger_1m1ru_891", us = "_groupingPrefix_1m1ru_897", ds = "_groupingPath_1m1ru_902", fs = "_groupingSeparator_1m1ru_906", hs = "_groupHeader_1m1ru_923", ps = "_spanCell_1m1ru_966", ms = "_groupFolded_1m1ru_1045", gs = "_spanValue_1m1ru_1049", bs = "_groupLabel_1m1ru_1050", vs = "_spanText_1m1ru_1064", ws = "_groupValue_1m1ru_1065", ys = "_groupCount_1m1ru_1072", _s = "_continued_1m1ru_1086", ks = "_spanSelect_1m1ru_1117", Ss = "_treeCell_1m1ru_1133", Cs = "_treeText_1m1ru_1141", xs = "_foldSlot_1m1ru_1145", Ns = "_treeRow_1m1ru_1157", As = "_branchRow_1m1ru_1161", Rs = "_detailCell_1m1ru_1174", Ts = "_pathRow_1m1ru_1180", Os = "_fold_1m1ru_1145", Ms = "_foldClosed_1m1ru_1221", Ls = "_foldedCount_1m1ru_1231", Fs = "_shareHost_1m1ru_1239", Es = "_shareBar_1m1ru_1246", Ds = "_expander_1m1ru_1258", Bs = "_expanderOpen_1m1ru_1293", Ps = "_detailRow_1m1ru_1297", zs = "_treeDetail_1m1ru_1306", Is = "_treeDetailRail_1m1ru_1311", $s = "_actionsCell_1m1ru_1326", Vs = "_actions_1m1ru_1326", Gs = "_decision_1m1ru_1345", Ks = "_reserve_1m1ru_1364", Hs = "_grip_1m1ru_1374", js = "_virtualBody_1m1ru_1415", Ws = "_virtualRow_1m1ru_1431", qs = "_fillerRow_1m1ru_1455", Us = "_grid_1m1ru_1468", Ys = "_editing_1m1ru_1484", Js = "_editingValue_1m1ru_1488", Xs = "_editor_1m1ru_1494", Qs = "_editorField_1m1ru_1507", Zs = "_draftButtons_1m1ru_1539", ei = "_held_1m1ru_1547", ti = "_deleteAsk_1m1ru_1551", ni = "_newRowBar_1m1ru_1558", oi = "_draftMessage_1m1ru_1565", ri = "_editorMessage_1m1ru_1590", si = "_control_1m1ru_280", ii = "_empty_1m1ru_440", li = "_toned_1m1ru_1351", h = {
|
|
545
|
+
frame: Qo,
|
|
546
|
+
children: Zo,
|
|
547
|
+
scroll: er,
|
|
548
|
+
footerTarget: tr,
|
|
549
|
+
table: nr,
|
|
550
|
+
th: or,
|
|
551
|
+
sticky: rr,
|
|
552
|
+
td: sr,
|
|
553
|
+
rowHeader: ir,
|
|
554
|
+
compact: lr,
|
|
555
|
+
numeric: ar,
|
|
556
|
+
value: cr,
|
|
557
|
+
valueText: ur,
|
|
558
|
+
sized: dr,
|
|
559
|
+
cutTip: fr,
|
|
560
|
+
absent: hr,
|
|
561
|
+
striped: pr,
|
|
562
|
+
pinned: mr,
|
|
563
|
+
pinStartEdge: gr,
|
|
564
|
+
pinEndEdge: br,
|
|
565
|
+
sortButton: vr,
|
|
566
|
+
sortIndicator: wr,
|
|
567
|
+
sortArrow: yr,
|
|
568
|
+
sortArrowDesc: _r,
|
|
569
|
+
sortActive: kr,
|
|
570
|
+
sortRank: Sr,
|
|
571
|
+
thFlex: Cr,
|
|
572
|
+
footerKind: xr,
|
|
573
|
+
emptyCell: Nr,
|
|
574
|
+
emptyTitle: Ar,
|
|
575
|
+
skeleton: Rr,
|
|
576
|
+
toolbar: Tr,
|
|
577
|
+
toolbarGroup: Or,
|
|
578
|
+
toolbarGroupIdle: Mr,
|
|
579
|
+
toolbarMd: Lr,
|
|
580
|
+
toolbarInfo: Fr,
|
|
581
|
+
pagination: Er,
|
|
582
|
+
paginationControls: Dr,
|
|
583
|
+
pageSize: Br,
|
|
584
|
+
pageSteps: Pr,
|
|
585
585
|
paginationStatus: zr,
|
|
586
|
-
filterButton:
|
|
587
|
-
filterActive:
|
|
588
|
-
filterPanel:
|
|
589
|
-
filterContent:
|
|
586
|
+
filterButton: Ir,
|
|
587
|
+
filterActive: $r,
|
|
588
|
+
filterPanel: Vr,
|
|
589
|
+
filterContent: Gr,
|
|
590
590
|
filterFooter: Kr,
|
|
591
|
-
filterLabel:
|
|
592
|
-
filterValue:
|
|
593
|
-
filteredCount:
|
|
594
|
-
rangeFields:
|
|
595
|
-
rangePeriod:
|
|
596
|
-
conditions:
|
|
597
|
-
conditionButton:
|
|
598
|
-
condition:
|
|
599
|
-
columnsPanel:
|
|
600
|
-
columnsList:
|
|
601
|
-
columnsEntry:
|
|
602
|
-
move:
|
|
603
|
-
pinOn:
|
|
604
|
-
groupingChoice:
|
|
605
|
-
groupingHeading:
|
|
606
|
-
groupingOptions:
|
|
607
|
-
groupingOption:
|
|
608
|
-
groupingLevel:
|
|
609
|
-
groupingTag:
|
|
610
|
-
groupingTrigger:
|
|
611
|
-
groupingPrefix:
|
|
612
|
-
groupingPath:
|
|
613
|
-
groupingSeparator:
|
|
614
|
-
groupHeader:
|
|
615
|
-
spanCell:
|
|
616
|
-
groupFolded:
|
|
617
|
-
spanValue:
|
|
618
|
-
groupLabel:
|
|
619
|
-
spanText:
|
|
620
|
-
groupValue:
|
|
621
|
-
groupCount:
|
|
622
|
-
continued:
|
|
623
|
-
spanSelect:
|
|
624
|
-
treeCell:
|
|
625
|
-
treeText:
|
|
626
|
-
foldSlot:
|
|
627
|
-
treeRow:
|
|
628
|
-
branchRow:
|
|
629
|
-
detailCell:
|
|
630
|
-
pathRow:
|
|
631
|
-
fold:
|
|
632
|
-
foldClosed:
|
|
633
|
-
foldedCount:
|
|
634
|
-
shareHost:
|
|
635
|
-
shareBar:
|
|
636
|
-
expander:
|
|
637
|
-
expanderOpen:
|
|
638
|
-
detailRow:
|
|
591
|
+
filterLabel: Hr,
|
|
592
|
+
filterValue: jr,
|
|
593
|
+
filteredCount: Wr,
|
|
594
|
+
rangeFields: qr,
|
|
595
|
+
rangePeriod: Ur,
|
|
596
|
+
conditions: Yr,
|
|
597
|
+
conditionButton: Jr,
|
|
598
|
+
condition: Xr,
|
|
599
|
+
columnsPanel: Qr,
|
|
600
|
+
columnsList: Zr,
|
|
601
|
+
columnsEntry: es,
|
|
602
|
+
move: ts,
|
|
603
|
+
pinOn: ns,
|
|
604
|
+
groupingChoice: os,
|
|
605
|
+
groupingHeading: rs,
|
|
606
|
+
groupingOptions: ss,
|
|
607
|
+
groupingOption: is,
|
|
608
|
+
groupingLevel: ls,
|
|
609
|
+
groupingTag: as,
|
|
610
|
+
groupingTrigger: cs,
|
|
611
|
+
groupingPrefix: us,
|
|
612
|
+
groupingPath: ds,
|
|
613
|
+
groupingSeparator: fs,
|
|
614
|
+
groupHeader: hs,
|
|
615
|
+
spanCell: ps,
|
|
616
|
+
groupFolded: ms,
|
|
617
|
+
spanValue: gs,
|
|
618
|
+
groupLabel: bs,
|
|
619
|
+
spanText: vs,
|
|
620
|
+
groupValue: ws,
|
|
621
|
+
groupCount: ys,
|
|
622
|
+
continued: _s,
|
|
623
|
+
spanSelect: ks,
|
|
624
|
+
treeCell: Ss,
|
|
625
|
+
treeText: Cs,
|
|
626
|
+
foldSlot: xs,
|
|
627
|
+
treeRow: Ns,
|
|
628
|
+
branchRow: As,
|
|
629
|
+
detailCell: Rs,
|
|
630
|
+
pathRow: Ts,
|
|
631
|
+
fold: Os,
|
|
632
|
+
foldClosed: Ms,
|
|
633
|
+
foldedCount: Ls,
|
|
634
|
+
shareHost: Fs,
|
|
635
|
+
shareBar: Es,
|
|
636
|
+
expander: Ds,
|
|
637
|
+
expanderOpen: Bs,
|
|
638
|
+
detailRow: Ps,
|
|
639
639
|
treeDetail: zs,
|
|
640
|
-
treeDetailRail:
|
|
641
|
-
actionsCell:
|
|
642
|
-
actions:
|
|
643
|
-
decision:
|
|
640
|
+
treeDetailRail: Is,
|
|
641
|
+
actionsCell: $s,
|
|
642
|
+
actions: Vs,
|
|
643
|
+
decision: Gs,
|
|
644
644
|
reserve: Ks,
|
|
645
|
-
grip:
|
|
646
|
-
virtualBody:
|
|
647
|
-
virtualRow:
|
|
648
|
-
fillerRow:
|
|
649
|
-
grid:
|
|
650
|
-
editing:
|
|
651
|
-
editingValue:
|
|
652
|
-
editor:
|
|
653
|
-
editorField:
|
|
654
|
-
draftButtons:
|
|
655
|
-
held:
|
|
656
|
-
deleteAsk:
|
|
657
|
-
newRowBar:
|
|
658
|
-
draftMessage:
|
|
659
|
-
editorMessage:
|
|
660
|
-
control:
|
|
661
|
-
empty:
|
|
662
|
-
toned:
|
|
645
|
+
grip: Hs,
|
|
646
|
+
virtualBody: js,
|
|
647
|
+
virtualRow: Ws,
|
|
648
|
+
fillerRow: qs,
|
|
649
|
+
grid: Us,
|
|
650
|
+
editing: Ys,
|
|
651
|
+
editingValue: Js,
|
|
652
|
+
editor: Xs,
|
|
653
|
+
editorField: Qs,
|
|
654
|
+
draftButtons: Zs,
|
|
655
|
+
held: ei,
|
|
656
|
+
deleteAsk: ti,
|
|
657
|
+
newRowBar: ni,
|
|
658
|
+
draftMessage: oi,
|
|
659
|
+
editorMessage: ri,
|
|
660
|
+
control: si,
|
|
661
|
+
empty: ii,
|
|
662
|
+
toned: li
|
|
663
663
|
};
|
|
664
|
-
function
|
|
664
|
+
function Fa(e) {
|
|
665
665
|
return e;
|
|
666
666
|
}
|
|
667
667
|
const ht = /* @__PURE__ */ new WeakMap();
|
|
668
668
|
function Kn(e, t) {
|
|
669
669
|
return ht.set(e, t), e;
|
|
670
670
|
}
|
|
671
|
-
const
|
|
672
|
-
function
|
|
673
|
-
return e === "list" ?
|
|
671
|
+
const ai = (e) => ht.has(e);
|
|
672
|
+
function Ue(e) {
|
|
673
|
+
return e === "list" ? fi : e === "range" ? yi : typeof e == "object" && e !== null ? e : void 0;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Hn(e, t) {
|
|
676
676
|
if (t == null) return "empty";
|
|
677
677
|
const n = ht.get(e);
|
|
678
678
|
return n ? n.isCondition(t) ? n.isEmpty(t) ? "empty" : "effective" : "foreign" : "effective";
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function ci(e, t, n) {
|
|
681
681
|
var o;
|
|
682
|
-
return
|
|
682
|
+
return Ce(t) ? ((o = ht.get(e)) == null ? void 0 : o.absentMatches(n)) ?? !1 : e.matches(t, n);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function ui(e, t, n) {
|
|
685
685
|
const o = ht.get(e);
|
|
686
686
|
return o ? o.describeIn(t, n) : e.describe(t);
|
|
687
687
|
}
|
|
688
|
-
const
|
|
689
|
-
const o =
|
|
688
|
+
const hn = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : void 0, jn = (e) => (t, n) => {
|
|
689
|
+
const o = hn(t.value), r = hn(n.value);
|
|
690
690
|
return o !== void 0 && r !== void 0 ? o - r : e.compareText(t.text, n.text);
|
|
691
691
|
};
|
|
692
|
-
function
|
|
692
|
+
function Pt(e, t, n) {
|
|
693
693
|
const o = /* @__PURE__ */ new Map();
|
|
694
694
|
let r = !1;
|
|
695
695
|
for (const l of e) {
|
|
696
696
|
const c = t(l);
|
|
697
|
-
if (
|
|
697
|
+
if (Ce(c)) {
|
|
698
698
|
r = !0;
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
701
701
|
const i = c instanceof Date ? `date:${c.getTime()}` : typeof c == "object" || typeof c == "function" ? c : `${typeof c}:${String(c)}`;
|
|
702
702
|
o.has(i) || o.set(i, c);
|
|
703
703
|
}
|
|
704
|
-
return { values: [...o.values()].map((l) => ({ value: l, text: String(l) })).sort(
|
|
704
|
+
return { values: [...o.values()].map((l) => ({ value: l, text: String(l) })).sort(jn(n)).map(({ value: l }) => l), absent: r };
|
|
705
705
|
}
|
|
706
|
-
const
|
|
706
|
+
const pn = /* @__PURE__ */ new WeakMap();
|
|
707
707
|
function zt(e) {
|
|
708
|
-
let t =
|
|
709
|
-
return t || (t = new Set(e.map(
|
|
708
|
+
let t = pn.get(e);
|
|
709
|
+
return t || (t = new Set(e.map(Ve)), pn.set(e, t)), t;
|
|
710
710
|
}
|
|
711
|
-
const
|
|
712
|
-
function
|
|
711
|
+
const It = (e, t) => Ce(e) ? t.wording.cellAbsentValue : nt(e, t.format, t.formats, t.wording) ?? String(e);
|
|
712
|
+
function di({
|
|
713
713
|
condition: e,
|
|
714
714
|
setCondition: t,
|
|
715
715
|
values: n,
|
|
716
716
|
absentOccurs: o = !1,
|
|
717
717
|
format: r
|
|
718
718
|
}) {
|
|
719
|
-
const s =
|
|
720
|
-
const d = { formats: s, wording: l, format: r }, m = n.map((p) => ({ key:
|
|
721
|
-
m.sort(
|
|
722
|
-
const w = new Set(m.map((p) => p.key)), g = c.filter((p) => !
|
|
719
|
+
const s = Ee(), l = ke(), c = se(() => e ?? [], [e]), i = se(() => {
|
|
720
|
+
const d = { formats: s, wording: l, format: r }, m = n.map((p) => ({ key: Ve(p), text: It(p, d), value: p }));
|
|
721
|
+
m.sort(jn(s));
|
|
722
|
+
const w = new Set(m.map((p) => p.key)), g = c.filter((p) => !Ce(p) && !w.has(Ve(p))).map((p) => ({ key: Ve(p), text: It(p, d), value: p })), v = o || c.some(Ce) ? [{ key: Xt, text: l.cellAbsentValue, value: null }] : [];
|
|
723
723
|
return [...m, ...g, ...v];
|
|
724
724
|
}, [n, c, o, r, s, l]), a = zt(c), f = (d) => {
|
|
725
|
-
const m = a.has(d.key) ? c.filter((w) =>
|
|
725
|
+
const m = a.has(d.key) ? c.filter((w) => Ve(w) !== d.key) : [...c, d.value];
|
|
726
726
|
t(m.length > 0 ? m : null);
|
|
727
727
|
};
|
|
728
728
|
return /* @__PURE__ */ u("div", { className: h.filterContent, children: i.map((d) => /* @__PURE__ */ u(
|
|
729
|
-
|
|
729
|
+
tt,
|
|
730
730
|
{
|
|
731
731
|
label: d.text,
|
|
732
732
|
checked: a.has(d.key),
|
|
@@ -735,28 +735,28 @@ function ui({
|
|
|
735
735
|
d.key
|
|
736
736
|
)) });
|
|
737
737
|
}
|
|
738
|
-
const
|
|
738
|
+
const fi = Kn(
|
|
739
739
|
{
|
|
740
|
-
matches: (e, t) => zt(t).has(
|
|
741
|
-
Input:
|
|
742
|
-
describe: (e) => e.map((t) =>
|
|
740
|
+
matches: (e, t) => zt(t).has(Ve(e)),
|
|
741
|
+
Input: di,
|
|
742
|
+
describe: (e) => e.map((t) => Ce(t) ? "–" : String(t)).join(", ")
|
|
743
743
|
},
|
|
744
744
|
{
|
|
745
745
|
isCondition: (e) => Array.isArray(e),
|
|
746
746
|
isEmpty: (e) => e.length === 0,
|
|
747
|
-
absentMatches: (e) => zt(e).has(
|
|
747
|
+
absentMatches: (e) => zt(e).has(Xt),
|
|
748
748
|
/* From three values on the first two and how many more: a condition is one
|
|
749
749
|
line in the table toolbar, not a list. */
|
|
750
750
|
describeIn: (e, t) => {
|
|
751
|
-
const n = e.map((r) =>
|
|
751
|
+
const n = e.map((r) => It(r, t));
|
|
752
752
|
if (n.length <= 2) return n.join(", ");
|
|
753
753
|
const o = n.length - 2;
|
|
754
754
|
return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
),
|
|
758
|
-
function
|
|
759
|
-
const n =
|
|
757
|
+
), hi = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), pi = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), et = (e) => typeof e == "number" && Number.isFinite(e), De = (e) => e instanceof Date && !Number.isNaN(e.getTime()), mi = (e) => De(e) ? hi(e) : et(e) ? e : void 0, gi = (e) => De(e) ? { value: pi(e), open: !0 } : et(e) ? { value: e, open: !1 } : void 0, gt = (e, t) => De(e) ? t.formats.date(e) : nt(e, t.format, t.formats, t.wording) ?? String(e);
|
|
758
|
+
function bi({ condition: e, setCondition: t }) {
|
|
759
|
+
const n = ke(), [o, r] = Z(null), s = o !== null, l = o ? o.from : et(e == null ? void 0 : e.from) ? e.from : null, c = o ? o.to : et(e == null ? void 0 : e.to) ? e.to : null, i = (a, f) => {
|
|
760
760
|
const d = { from: l, to: c, [a]: f };
|
|
761
761
|
if (d.from !== null && d.to !== null && d.from > d.to) {
|
|
762
762
|
r(d);
|
|
@@ -772,14 +772,14 @@ function gi({ condition: e, setCondition: t }) {
|
|
|
772
772
|
});
|
|
773
773
|
};
|
|
774
774
|
return /* @__PURE__ */ T("div", { className: h.rangeFields, children: [
|
|
775
|
-
/* @__PURE__ */ u(
|
|
776
|
-
/* @__PURE__ */ u(
|
|
775
|
+
/* @__PURE__ */ u(Ft, { label: n.filterFrom, children: /* @__PURE__ */ u(Et, { size: "sm", value: l, invalid: s, onChange: (a) => i("from", a) }) }),
|
|
776
|
+
/* @__PURE__ */ u(Ft, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ u(Et, { size: "sm", value: c, onChange: (a) => i("to", a) }) })
|
|
777
777
|
] });
|
|
778
778
|
}
|
|
779
|
-
function
|
|
780
|
-
const n =
|
|
779
|
+
function vi({ condition: e, setCondition: t }) {
|
|
780
|
+
const n = De(e == null ? void 0 : e.from) && De(e == null ? void 0 : e.to) ? { from: e.from, to: e.to } : null;
|
|
781
781
|
return /* @__PURE__ */ u("div", { className: h.rangePeriod, children: /* @__PURE__ */ u(
|
|
782
|
-
|
|
782
|
+
vo,
|
|
783
783
|
{
|
|
784
784
|
size: "sm",
|
|
785
785
|
clearable: !0,
|
|
@@ -788,40 +788,40 @@ function bi({ condition: e, setCondition: t }) {
|
|
|
788
788
|
}
|
|
789
789
|
) });
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
return e.kind === "date" ? /* @__PURE__ */ u(
|
|
791
|
+
function wi(e) {
|
|
792
|
+
return e.kind === "date" ? /* @__PURE__ */ u(vi, { ...e }) : /* @__PURE__ */ u(bi, { ...e });
|
|
793
793
|
}
|
|
794
|
-
const
|
|
794
|
+
const yi = Kn(
|
|
795
795
|
{
|
|
796
796
|
matches: (e, t) => {
|
|
797
|
-
const n =
|
|
797
|
+
const n = De(e) ? e.getTime() : et(e) ? e : void 0;
|
|
798
798
|
if (n === void 0) return !1;
|
|
799
|
-
const o =
|
|
799
|
+
const o = mi(t.from), r = gi(t.to);
|
|
800
800
|
return !(o !== void 0 && n < o || r !== void 0 && (r.open ? n >= r.value : n > r.value));
|
|
801
801
|
},
|
|
802
|
-
Input:
|
|
802
|
+
Input: wi,
|
|
803
803
|
describe: (e) => [e.from, e.to].map((t) => t === void 0 ? "" : String(t)).join("–")
|
|
804
804
|
},
|
|
805
805
|
{
|
|
806
806
|
isCondition: (e) => typeof e != "object" || e === null || Array.isArray(e) || e instanceof Date ? !1 : Object.entries(e).every(
|
|
807
|
-
([n, o]) => (n === "from" || n === "to") && (o === void 0 ||
|
|
807
|
+
([n, o]) => (n === "from" || n === "to") && (o === void 0 || et(o) || De(o))
|
|
808
808
|
),
|
|
809
809
|
isEmpty: (e) => e.from === void 0 && e.to === void 0,
|
|
810
810
|
absentMatches: () => !1,
|
|
811
811
|
describeIn: (e, t) => {
|
|
812
812
|
const { from: n, to: o } = e;
|
|
813
813
|
if (n !== void 0 && o !== void 0) {
|
|
814
|
-
const r =
|
|
814
|
+
const r = De(n) && De(o) && n.getFullYear() === o.getFullYear();
|
|
815
815
|
return t.wording.rangeFromTo(
|
|
816
|
-
r ? t.formats.dateShort(n) :
|
|
817
|
-
|
|
816
|
+
r ? t.formats.dateShort(n) : gt(n, t),
|
|
817
|
+
gt(o, t)
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
return n !== void 0 ? t.wording.rangeFrom(
|
|
820
|
+
return n !== void 0 ? t.wording.rangeFrom(gt(n, t)) : o === void 0 ? "" : t.wording.rangeTo(gt(o, t));
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
);
|
|
824
|
-
class
|
|
824
|
+
class Tt {
|
|
825
825
|
constructor(t) {
|
|
826
826
|
ee(this, "entries", /* @__PURE__ */ new Map());
|
|
827
827
|
/** Keys in the order of the running pass. */
|
|
@@ -848,7 +848,7 @@ class Rt {
|
|
|
848
848
|
return this.dom = n, this.pass = n, o !== this.ordered().map((r) => r.key).join("|");
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const mn = (e) => JSON.stringify([
|
|
852
852
|
e.id,
|
|
853
853
|
e.label,
|
|
854
854
|
typeof e.value == "string" ? e.value : "ƒ",
|
|
@@ -874,18 +874,18 @@ const pn = (e) => JSON.stringify([
|
|
|
874
874
|
/* Whether a column edits, and how - not its editor or its check, which
|
|
875
875
|
are new functions on every render and are read when an edit starts. */
|
|
876
876
|
typeof e.edit == "function" ? "ƒ" : e.edit
|
|
877
|
-
]),
|
|
878
|
-
class
|
|
877
|
+
]), gn = (e, t) => e == null ? void 0 : e[t];
|
|
878
|
+
class _i {
|
|
879
879
|
constructor() {
|
|
880
|
-
ee(this, "columns", new
|
|
881
|
-
ee(this, "actions", new
|
|
880
|
+
ee(this, "columns", new Tt("data-umriss-column"));
|
|
881
|
+
ee(this, "actions", new Tt("data-umriss-action"));
|
|
882
882
|
/** The group keys: values to group by that are no column. */
|
|
883
|
-
ee(this, "groupKeys", new
|
|
883
|
+
ee(this, "groupKeys", new Tt("data-umriss-groupkey"));
|
|
884
884
|
ee(this, "signatures", /* @__PURE__ */ new Map());
|
|
885
885
|
/** The row detail: the presentation of the `RowDetail` that registered last. */
|
|
886
886
|
ee(this, "detail", null);
|
|
887
|
-
/**
|
|
888
|
-
ee(this, "actionGroups", /* @__PURE__ */ new
|
|
887
|
+
/** The `RowActions` that stand right now, with their `pin`. */
|
|
888
|
+
ee(this, "actionGroups", /* @__PURE__ */ new Map());
|
|
889
889
|
/** Whether the row header column sticks - `pin: "start"` on it. */
|
|
890
890
|
ee(this, "stickyRowHeader", !1);
|
|
891
891
|
/* Without a pagination bar the table does not page: one that stops quietly at
|
|
@@ -960,7 +960,7 @@ class yi {
|
|
|
960
960
|
/** A column registers during the render. Idempotent: the same spec changes no
|
|
961
961
|
version. */
|
|
962
962
|
registerColumn(t, n) {
|
|
963
|
-
const o = this.columns.entries.get(t), r =
|
|
963
|
+
const o = this.columns.entries.get(t), r = mn(n);
|
|
964
964
|
if (o) {
|
|
965
965
|
const s = o.spec;
|
|
966
966
|
this.signatures.get(t) !== r && this.structure++, (s.value !== n.value || s.ownSortValue !== n.ownSortValue || s.ownGroupValue !== n.ownGroupValue) && this.values++, (s.presentation !== n.presentation || s.ownExportValue !== n.ownExportValue || s.aggregate !== n.aggregate) && this.presentation++, o.spec = n;
|
|
@@ -970,7 +970,7 @@ class yi {
|
|
|
970
970
|
spec: n,
|
|
971
971
|
read: (l) => {
|
|
972
972
|
const c = s.spec.value;
|
|
973
|
-
return typeof c == "string" ?
|
|
973
|
+
return typeof c == "string" ? gn(l, c) : c(l);
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
this.columns.entries.set(t, s), this.structure++;
|
|
@@ -1012,7 +1012,7 @@ class yi {
|
|
|
1012
1012
|
/** The columns with the pinned blocks at either end - the one place where
|
|
1013
1013
|
that is decided, for screen, column menu and export. */
|
|
1014
1014
|
inPinOrder(t) {
|
|
1015
|
-
return
|
|
1015
|
+
return Go(t, this.pins());
|
|
1016
1016
|
}
|
|
1017
1017
|
/** The columns in JSX order, the first one per id. */
|
|
1018
1018
|
orderedColumns() {
|
|
@@ -1028,7 +1028,7 @@ class yi {
|
|
|
1028
1028
|
/* --- Group keys and the grouping ---------------------------------------------- */
|
|
1029
1029
|
/** A group key registers during the render, as a column does. Idempotent. */
|
|
1030
1030
|
registerGroupKey(t, n) {
|
|
1031
|
-
const o = this.groupKeys.entries.get(t), r =
|
|
1031
|
+
const o = this.groupKeys.entries.get(t), r = mn(n);
|
|
1032
1032
|
if (o)
|
|
1033
1033
|
this.signatures.get(t) !== r && this.structure++, (o.spec.value !== n.value || o.spec.ownGroupValue !== n.ownGroupValue) && this.values++, o.spec = n;
|
|
1034
1034
|
else {
|
|
@@ -1037,7 +1037,7 @@ class yi {
|
|
|
1037
1037
|
spec: n,
|
|
1038
1038
|
read: (l) => {
|
|
1039
1039
|
const c = s.spec.value;
|
|
1040
|
-
return typeof c == "string" ?
|
|
1040
|
+
return typeof c == "string" ? gn(l, c) : c(l);
|
|
1041
1041
|
}
|
|
1042
1042
|
};
|
|
1043
1043
|
this.groupKeys.entries.set(t, s), this.structure++;
|
|
@@ -1091,7 +1091,7 @@ class yi {
|
|
|
1091
1091
|
each once. */
|
|
1092
1092
|
effectiveGrouping(t, n) {
|
|
1093
1093
|
const o = new Set(this.groupingEntries(n).map((r) => r.spec.id));
|
|
1094
|
-
return [...new Set(t)].filter((r) => o.has(r)).slice(0,
|
|
1094
|
+
return [...new Set(t)].filter((r) => o.has(r)).slice(0, Zt);
|
|
1095
1095
|
}
|
|
1096
1096
|
/** The levels and aggregates for the model - the same identity as long as
|
|
1097
1097
|
nothing changed that they read. */
|
|
@@ -1105,10 +1105,10 @@ class yi {
|
|
|
1105
1105
|
const f = i.read(a);
|
|
1106
1106
|
if (f == null) return;
|
|
1107
1107
|
const { ownGroupValue: d, group: m } = i.spec;
|
|
1108
|
-
return d ? d(f) : m ?
|
|
1108
|
+
return d ? d(f) : m ? Eo(m)(f) : f;
|
|
1109
1109
|
},
|
|
1110
1110
|
/* A value of one's own is a name; its groups stand by what they hold. */
|
|
1111
|
-
order: i.spec.ownGroupValue ? (a) =>
|
|
1111
|
+
order: i.spec.ownGroupValue ? (a) => Bt(i.read(a), i.spec.ownSortValue) : void 0
|
|
1112
1112
|
})), l = this.orderedColumns().filter((i) => i.spec.aggregate !== void 0).map(
|
|
1113
1113
|
(i) => ({
|
|
1114
1114
|
id: i.spec.id,
|
|
@@ -1133,7 +1133,7 @@ class yi {
|
|
|
1133
1133
|
kindOf(t, n) {
|
|
1134
1134
|
const o = this.kinds.get(t.key);
|
|
1135
1135
|
if (o && o.rows === n && o.value === t.spec.value) return o.kind;
|
|
1136
|
-
const r =
|
|
1136
|
+
const r = $n(n, t.read);
|
|
1137
1137
|
return this.kinds.set(t.key, { rows: n, value: t.spec.value, kind: r }), r;
|
|
1138
1138
|
}
|
|
1139
1139
|
/** Can it be sorted by this column? Without a statement: when its value is
|
|
@@ -1152,7 +1152,7 @@ class yi {
|
|
|
1152
1152
|
if (((l = this.modelCache) == null ? void 0 : l.key) === r && this.modelCache.rows === t && this.modelCache.formats === n)
|
|
1153
1153
|
return this.modelCache.columns;
|
|
1154
1154
|
const s = o.map((c) => {
|
|
1155
|
-
const { spec: i } = c, a = this.kindOf(c, t), f = this.isSortable(c, t), d = i.searchable ?? a === "text", m = (w) =>
|
|
1155
|
+
const { spec: i } = c, a = this.kindOf(c, t), f = this.isSortable(c, t), d = i.searchable ?? a === "text", m = (w) => Bt(c.read(w), i.ownSortValue);
|
|
1156
1156
|
return {
|
|
1157
1157
|
id: i.id,
|
|
1158
1158
|
label: i.label,
|
|
@@ -1197,7 +1197,7 @@ class yi {
|
|
|
1197
1197
|
grouping: this.groupingFor(t),
|
|
1198
1198
|
manual: o.manual,
|
|
1199
1199
|
tree: t.tree
|
|
1200
|
-
}, s =
|
|
1200
|
+
}, s = nn(t.admitted, n, r), l = o.virtual ? ki(s, o.virtual.from, o.virtual.to) : s;
|
|
1201
1201
|
return this.projectionCache = { hook: t, columns: n, projection: l }, l;
|
|
1202
1202
|
}
|
|
1203
1203
|
/* --- The hook's snapshot ---------------------------------------------------------- */
|
|
@@ -1241,7 +1241,7 @@ class yi {
|
|
|
1241
1241
|
grouped: the tag that names and removes the grouping needs a place. */
|
|
1242
1242
|
needsOwnToolbar() {
|
|
1243
1243
|
var t, n;
|
|
1244
|
-
return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((o) =>
|
|
1244
|
+
return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((o) => Ue(o.spec.filter) !== void 0) || (((t = this.hook) == null ? void 0 : t.rowFilters.size) ?? 0) > 0 || (((n = this.hook) == null ? void 0 : n.publicSnapshot.grouping.length) ?? 0) > 0;
|
|
1245
1245
|
}
|
|
1246
1246
|
/* --- Row detail ------------------------------------------------------------------- */
|
|
1247
1247
|
registerDetail(t, n) {
|
|
@@ -1252,8 +1252,8 @@ class yi {
|
|
|
1252
1252
|
((n = this.detail) == null ? void 0 : n.key) === t && (this.detail = null, this.structure++);
|
|
1253
1253
|
}
|
|
1254
1254
|
/* --- Actions ---------------------------------------------------------------------- */
|
|
1255
|
-
registerActionGroup(t) {
|
|
1256
|
-
this.actionGroups.
|
|
1255
|
+
registerActionGroup(t, n) {
|
|
1256
|
+
this.actionGroups.get(t) !== n && (this.actionGroups.set(t, n), this.structure++);
|
|
1257
1257
|
}
|
|
1258
1258
|
removeActionGroup(t) {
|
|
1259
1259
|
this.actionGroups.delete(t) && this.structure++;
|
|
@@ -1261,6 +1261,10 @@ class yi {
|
|
|
1261
1261
|
hasRowActions() {
|
|
1262
1262
|
return this.actionGroups.size > 0 && this.actions.entries.size > 0;
|
|
1263
1263
|
}
|
|
1264
|
+
/** Whether the actions column sticks: unless a `RowActions` says `pin={false}`. */
|
|
1265
|
+
actionsPinned() {
|
|
1266
|
+
return ![...this.actionGroups.values()].includes(!1);
|
|
1267
|
+
}
|
|
1264
1268
|
registerAction(t, n) {
|
|
1265
1269
|
const o = this.actions.entries.get(t);
|
|
1266
1270
|
if (!o)
|
|
@@ -1278,15 +1282,15 @@ class yi {
|
|
|
1278
1282
|
this.actions.entries.delete(t) && this.structure++;
|
|
1279
1283
|
}
|
|
1280
1284
|
}
|
|
1281
|
-
function
|
|
1285
|
+
function ki(e, t, n) {
|
|
1282
1286
|
if (!e.lines) return { ...e, visible: (e.shown ?? e.filtered).slice(t, n) };
|
|
1283
1287
|
const o = e.lines.slice(t, n);
|
|
1284
|
-
return { ...e, visibleLines: o, visible:
|
|
1288
|
+
return { ...e, visibleLines: o, visible: en(o) };
|
|
1285
1289
|
}
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
},
|
|
1289
|
-
function
|
|
1290
|
+
const Wn = /* @__PURE__ */ new WeakMap(), Si = (e, t) => {
|
|
1291
|
+
Wn.set(e, t);
|
|
1292
|
+
}, Ci = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Wn.get(e) : void 0, j = (...e) => e.filter(Boolean).join(" ");
|
|
1293
|
+
function qn({
|
|
1290
1294
|
entry: e,
|
|
1291
1295
|
registry: t,
|
|
1292
1296
|
hook: n,
|
|
@@ -1297,20 +1301,20 @@ function Wn({
|
|
|
1297
1301
|
setOpen: c,
|
|
1298
1302
|
panelId: i
|
|
1299
1303
|
}) {
|
|
1300
|
-
const a =
|
|
1301
|
-
() => v ?
|
|
1304
|
+
const a = ke(), f = Ee(), { id: d, label: m, format: w } = e.spec, { filterOptions: g } = n, v = g == null ? void 0 : g(d), { values: p, absent: b } = se(
|
|
1305
|
+
() => v ? Pt(v, (O) => O, f) : Pt(n.admitted, e.read, f),
|
|
1302
1306
|
[v, n.admitted, e, f]
|
|
1303
|
-
), R =
|
|
1307
|
+
), R = Ue(e.spec.filter);
|
|
1304
1308
|
if (n.publicSnapshot.manual && !v && e.spec.filter === "list" && ve(
|
|
1305
1309
|
`manual-filter-options:${d}`,
|
|
1306
1310
|
`The list filter of "${d}" offers only the values of the page in manual mode; \`filterOptions\` gives it the server's.`
|
|
1307
1311
|
), !R) return null;
|
|
1308
|
-
const E = n.publicSnapshot, y = R.Input, _ =
|
|
1309
|
-
var
|
|
1310
|
-
c(!1), (
|
|
1312
|
+
const E = n.publicSnapshot, y = R.Input, _ = ai(R) ? { absentOccurs: b, format: w, kind: t.kindOf(e, n.rows) } : {}, x = () => {
|
|
1313
|
+
var O;
|
|
1314
|
+
c(!1), (O = (s ?? o).current) == null || O.focus();
|
|
1311
1315
|
};
|
|
1312
1316
|
return /* @__PURE__ */ T(
|
|
1313
|
-
|
|
1317
|
+
_t,
|
|
1314
1318
|
{
|
|
1315
1319
|
open: l,
|
|
1316
1320
|
onOpenChange: c,
|
|
@@ -1325,27 +1329,27 @@ function Wn({
|
|
|
1325
1329
|
y,
|
|
1326
1330
|
{
|
|
1327
1331
|
condition: E.filter[d] ?? null,
|
|
1328
|
-
setCondition: (
|
|
1332
|
+
setCondition: (O) => E.setFilter(d, O),
|
|
1329
1333
|
values: p,
|
|
1330
1334
|
column: { id: d, label: m },
|
|
1331
1335
|
..._
|
|
1332
1336
|
}
|
|
1333
1337
|
),
|
|
1334
1338
|
/* @__PURE__ */ T("div", { className: h.filterFooter, children: [
|
|
1335
|
-
/* @__PURE__ */ u(
|
|
1336
|
-
/* @__PURE__ */ u(
|
|
1339
|
+
/* @__PURE__ */ u(ge, { size: "sm", variant: "ghost", onClick: () => E.setFilter(d, null), children: a.filterReset }),
|
|
1340
|
+
/* @__PURE__ */ u(ge, { size: "sm", onClick: x, children: a.filterDone })
|
|
1337
1341
|
] })
|
|
1338
1342
|
]
|
|
1339
1343
|
}
|
|
1340
1344
|
);
|
|
1341
1345
|
}
|
|
1342
|
-
function
|
|
1346
|
+
function xi({
|
|
1343
1347
|
entry: e,
|
|
1344
1348
|
registry: t,
|
|
1345
1349
|
hook: n
|
|
1346
1350
|
}) {
|
|
1347
|
-
const o =
|
|
1348
|
-
return /* @__PURE__ */ T(
|
|
1351
|
+
const o = ke(), [r, s] = Z(!1), l = fe(null), c = Fe(), { id: i, label: a } = e.spec, f = i in n.publicSnapshot.filter;
|
|
1352
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
1349
1353
|
/* @__PURE__ */ u(dt, { content: o.filterHint, children: /* @__PURE__ */ u(
|
|
1350
1354
|
"button",
|
|
1351
1355
|
{
|
|
@@ -1372,7 +1376,7 @@ function Ci({
|
|
|
1372
1376
|
}
|
|
1373
1377
|
) }),
|
|
1374
1378
|
/* @__PURE__ */ u(
|
|
1375
|
-
|
|
1379
|
+
qn,
|
|
1376
1380
|
{
|
|
1377
1381
|
entry: e,
|
|
1378
1382
|
registry: t,
|
|
@@ -1386,18 +1390,18 @@ function Ci({
|
|
|
1386
1390
|
)
|
|
1387
1391
|
] });
|
|
1388
1392
|
}
|
|
1389
|
-
function
|
|
1390
|
-
const n =
|
|
1393
|
+
function Ni({ registry: e, hook: t }) {
|
|
1394
|
+
const n = ke(), o = Ee(), r = Object.entries(t.publicSnapshot.filter).flatMap(([s, l]) => {
|
|
1391
1395
|
const c = t.rowFilters.get(s);
|
|
1392
1396
|
if (c) return c.describe ? [{ id: s, rowFilter: c, text: c.describe(l) }] : [];
|
|
1393
|
-
const i = e.columnById(s), a = i ?
|
|
1397
|
+
const i = e.columnById(s), a = i ? Ue(i.spec.filter) : void 0;
|
|
1394
1398
|
if (!i || !a) return [];
|
|
1395
1399
|
const f = { formats: o, wording: n, format: i.spec.format, kind: e.kindOf(i, t.rows) };
|
|
1396
|
-
return [{ id: s, entry: i, text:
|
|
1400
|
+
return [{ id: s, entry: i, text: ui(a, l, f) }];
|
|
1397
1401
|
});
|
|
1398
|
-
return r.length === 0 ? null : /* @__PURE__ */ u(
|
|
1402
|
+
return r.length === 0 ? null : /* @__PURE__ */ u(Fn, { "aria-label": n.conditions, className: h.conditions, children: r.map(
|
|
1399
1403
|
(s) => "rowFilter" in s ? /* @__PURE__ */ T(
|
|
1400
|
-
|
|
1404
|
+
Yt,
|
|
1401
1405
|
{
|
|
1402
1406
|
className: h.condition,
|
|
1403
1407
|
onRemove: () => t.publicSnapshot.setFilter(s.id, null),
|
|
@@ -1408,19 +1412,19 @@ function xi({ registry: e, hook: t }) {
|
|
|
1408
1412
|
]
|
|
1409
1413
|
},
|
|
1410
1414
|
s.id
|
|
1411
|
-
) : /* @__PURE__ */ u(
|
|
1415
|
+
) : /* @__PURE__ */ u(Ai, { entry: s.entry, text: s.text, registry: e, hook: t }, s.id)
|
|
1412
1416
|
) });
|
|
1413
1417
|
}
|
|
1414
|
-
function
|
|
1418
|
+
function Ai({
|
|
1415
1419
|
entry: e,
|
|
1416
1420
|
text: t,
|
|
1417
1421
|
registry: n,
|
|
1418
1422
|
hook: o
|
|
1419
1423
|
}) {
|
|
1420
|
-
const r =
|
|
1421
|
-
return /* @__PURE__ */ T(
|
|
1424
|
+
const r = ke(), [s, l] = Z(!1), c = fe(null), i = fe(null), a = Fe(), { id: f, label: d } = e.spec;
|
|
1425
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
1422
1426
|
/* @__PURE__ */ u(
|
|
1423
|
-
|
|
1427
|
+
Yt,
|
|
1424
1428
|
{
|
|
1425
1429
|
ref: c,
|
|
1426
1430
|
className: h.condition,
|
|
@@ -1446,7 +1450,7 @@ function Ni({
|
|
|
1446
1450
|
}
|
|
1447
1451
|
),
|
|
1448
1452
|
/* @__PURE__ */ u(
|
|
1449
|
-
|
|
1453
|
+
qn,
|
|
1450
1454
|
{
|
|
1451
1455
|
entry: e,
|
|
1452
1456
|
registry: n,
|
|
@@ -1461,44 +1465,44 @@ function Ni({
|
|
|
1461
1465
|
)
|
|
1462
1466
|
] });
|
|
1463
1467
|
}
|
|
1464
|
-
const
|
|
1465
|
-
`,
|
|
1468
|
+
const bn = ";", Ri = `\r
|
|
1469
|
+
`, Ti = "\uFEFF", Oi = (e) => String(e).replace(".", ","), Un = (e) => /[";\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Mi = (e, t) => {
|
|
1466
1470
|
var o;
|
|
1467
1471
|
const n = (o = t.value) == null ? void 0 : o.call(t, e);
|
|
1468
|
-
return n == null ? "" :
|
|
1472
|
+
return n == null ? "" : Un(typeof n == "number" ? Oi(n) : String(n));
|
|
1469
1473
|
};
|
|
1470
|
-
function
|
|
1471
|
-
const n = t.map((r) =>
|
|
1472
|
-
return
|
|
1474
|
+
function vn(e, t) {
|
|
1475
|
+
const n = t.map((r) => Un(r.label ?? r.id)).join(bn), o = e.map((r) => t.map((s) => Mi(r, s)).join(bn));
|
|
1476
|
+
return Ti + [n, ...o].join(Ri);
|
|
1473
1477
|
}
|
|
1474
|
-
function
|
|
1478
|
+
function Yn(e) {
|
|
1475
1479
|
const t = new Map(e.orderedColumns().map((o) => [o.spec.id, o])), n = e.projection().columns.map((o) => t.get(o.id)).filter((o) => o !== void 0);
|
|
1476
1480
|
return e.inPinOrder(n.map((o) => ({ id: o.spec.id, e: o }))).map(({ e: o }) => o);
|
|
1477
1481
|
}
|
|
1478
|
-
function
|
|
1482
|
+
function Jn(e) {
|
|
1479
1483
|
e.setSearch("");
|
|
1480
1484
|
for (const t of Object.keys(e.filter)) e.setFilter(t, null);
|
|
1481
1485
|
}
|
|
1482
|
-
function
|
|
1486
|
+
function Li(e, t) {
|
|
1483
1487
|
const n = e.hook;
|
|
1484
1488
|
if (!n) return "";
|
|
1485
|
-
const o =
|
|
1489
|
+
const o = Yn(e).filter((i) => e.kindOf(i, n.rows) !== "other" || i.spec.ownExportValue).map(
|
|
1486
1490
|
(i) => ({
|
|
1487
1491
|
id: i.spec.id,
|
|
1488
1492
|
label: i.spec.label,
|
|
1489
|
-
value: (a) =>
|
|
1493
|
+
value: (a) => Vn(i.read(a), i.spec.ownExportValue)
|
|
1490
1494
|
})
|
|
1491
1495
|
), { exported: r, filtered: s } = e.projection();
|
|
1492
|
-
if (!r) return
|
|
1496
|
+
if (!r) return vn(s, o);
|
|
1493
1497
|
const l = new Map(r.map((i) => [i.node, i.level + 1])), c = { id: "#level", label: t, value: (i) => l.get(i) };
|
|
1494
|
-
return
|
|
1498
|
+
return vn(r.map((i) => i.node), [c, ...o]);
|
|
1495
1499
|
}
|
|
1496
|
-
const
|
|
1500
|
+
const Fi = (e, t, n) => {
|
|
1497
1501
|
var o;
|
|
1498
1502
|
return ((o = e.groupingEntries(t.rows).find((r) => r.spec.id === n)) == null ? void 0 : o.spec.label) ?? n;
|
|
1499
1503
|
};
|
|
1500
|
-
function
|
|
1501
|
-
const n =
|
|
1504
|
+
function Ei({ registry: e, hook: t }) {
|
|
1505
|
+
const n = ke(), o = e.groupingEntries(t.rows);
|
|
1502
1506
|
if (o.length === 0) return null;
|
|
1503
1507
|
const { grouping: r, setGrouping: s } = t.publicSnapshot;
|
|
1504
1508
|
return /* @__PURE__ */ T("section", { className: h.groupingChoice, "aria-label": n.grouping, children: [
|
|
@@ -1512,7 +1516,7 @@ function Fi({ registry: e, hook: t }) {
|
|
|
1512
1516
|
className: h.groupingOption,
|
|
1513
1517
|
"aria-label": n.groupBy(i),
|
|
1514
1518
|
"aria-pressed": f,
|
|
1515
|
-
disabled: !f && r.length >=
|
|
1519
|
+
disabled: !f && r.length >= Zt,
|
|
1516
1520
|
onClick: () => s(f ? r.filter((d) => d !== c) : [...r, c]),
|
|
1517
1521
|
children: [
|
|
1518
1522
|
f && /* @__PURE__ */ u("span", { className: h.groupingLevel, "aria-hidden": "true", children: a + 1 }),
|
|
@@ -1524,8 +1528,8 @@ function Fi({ registry: e, hook: t }) {
|
|
|
1524
1528
|
}) })
|
|
1525
1529
|
] });
|
|
1526
1530
|
}
|
|
1527
|
-
function
|
|
1528
|
-
const n =
|
|
1531
|
+
function Di({ registry: e, hook: t }) {
|
|
1532
|
+
const n = ke();
|
|
1529
1533
|
if (!e.tree) return null;
|
|
1530
1534
|
const o = t.publicSnapshot;
|
|
1531
1535
|
return /* @__PURE__ */ T("div", { className: j(h.groupingChoice, h.groupingOptions), children: [
|
|
@@ -1533,15 +1537,15 @@ function Ei({ registry: e, hook: t }) {
|
|
|
1533
1537
|
/* @__PURE__ */ u("button", { type: "button", className: h.groupingOption, onClick: o.foldAllBranches, children: n.foldAll })
|
|
1534
1538
|
] });
|
|
1535
1539
|
}
|
|
1536
|
-
function
|
|
1537
|
-
const n =
|
|
1540
|
+
function Bi({ registry: e, hook: t }) {
|
|
1541
|
+
const n = ke(), o = t.publicSnapshot, { grouping: r } = o;
|
|
1538
1542
|
if (r.length === 0) return null;
|
|
1539
|
-
const s = r.map((l) =>
|
|
1543
|
+
const s = r.map((l) => Fi(e, t, l));
|
|
1540
1544
|
return (
|
|
1541
1545
|
/* In a tag group, as the conditions stand: the tag is one stop, its button
|
|
1542
1546
|
the thing one tabs to, and the ring stands on the tag. */
|
|
1543
|
-
/* @__PURE__ */ u(
|
|
1544
|
-
|
|
1547
|
+
/* @__PURE__ */ u(Fn, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ u(Yt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ T(
|
|
1548
|
+
En,
|
|
1545
1549
|
{
|
|
1546
1550
|
trigger: /* @__PURE__ */ T("button", { type: "button", className: j(h.conditionButton, h.groupingTrigger), children: [
|
|
1547
1551
|
/* @__PURE__ */ u("span", { className: h.groupingPrefix, children: n.groupedBy }),
|
|
@@ -1551,41 +1555,41 @@ function Di({ registry: e, hook: t }) {
|
|
|
1551
1555
|
] }, r[c]))
|
|
1552
1556
|
] }),
|
|
1553
1557
|
children: [
|
|
1554
|
-
r.map((l, c) => /* @__PURE__ */ u(
|
|
1555
|
-
/* @__PURE__ */ u(
|
|
1556
|
-
/* @__PURE__ */ u(
|
|
1557
|
-
/* @__PURE__ */ u(
|
|
1558
|
+
r.map((l, c) => /* @__PURE__ */ u(vt, { onSelect: () => o.setGrouping(r.filter((i) => i !== l)), children: n.removeGroupingLevel(s[c]) }, l)),
|
|
1559
|
+
/* @__PURE__ */ u(wo, {}),
|
|
1560
|
+
/* @__PURE__ */ u(vt, { onSelect: o.unfoldAll, children: n.unfoldAll }),
|
|
1561
|
+
/* @__PURE__ */ u(vt, { onSelect: o.foldAll, children: n.foldAll })
|
|
1558
1562
|
]
|
|
1559
1563
|
}
|
|
1560
1564
|
) }) })
|
|
1561
1565
|
);
|
|
1562
1566
|
}
|
|
1563
|
-
const
|
|
1564
|
-
function
|
|
1565
|
-
const t =
|
|
1567
|
+
const Xn = wt("sm");
|
|
1568
|
+
function St(e) {
|
|
1569
|
+
const t = Be(Xn);
|
|
1566
1570
|
return e ?? t;
|
|
1567
1571
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const t =
|
|
1570
|
-
return /* @__PURE__ */ u(
|
|
1572
|
+
function Qn({ registry: e }) {
|
|
1573
|
+
const t = ke(), n = St();
|
|
1574
|
+
return /* @__PURE__ */ u(ge, { size: n, variant: "secondary", onClick: () => {
|
|
1571
1575
|
var o;
|
|
1572
1576
|
return (o = e.addRow) == null ? void 0 : o.call(e);
|
|
1573
1577
|
}, children: t.newRow });
|
|
1574
1578
|
}
|
|
1575
|
-
function
|
|
1579
|
+
function Zn({
|
|
1576
1580
|
registry: e,
|
|
1577
1581
|
className: t,
|
|
1578
1582
|
children: n,
|
|
1579
1583
|
own: o = !1,
|
|
1580
1584
|
size: r = "sm"
|
|
1581
1585
|
}) {
|
|
1582
|
-
const s =
|
|
1586
|
+
const s = ke(), l = Ee(), c = (e == null ? void 0 : e.hook) ?? null;
|
|
1583
1587
|
let i = null, a = null;
|
|
1584
1588
|
if (e && c) {
|
|
1585
1589
|
const f = c.publicSnapshot, d = f.search !== "" || Object.keys(f.filter).length > 0, m = o ? [] : c.selectedRows ?? f.filtered.filter((v) => f.selection.isSelected(c.rowKey(v))), w = e.hasRowActions() ? e.actions.ordered().filter((v) => v.spec.bulk) : [];
|
|
1586
|
-
i = /* @__PURE__ */ T(
|
|
1587
|
-
/* @__PURE__ */ u(
|
|
1588
|
-
/* @__PURE__ */ u(
|
|
1590
|
+
i = /* @__PURE__ */ T(Se, { children: [
|
|
1591
|
+
/* @__PURE__ */ u(Bi, { registry: e, hook: c }),
|
|
1592
|
+
/* @__PURE__ */ u(Ni, { registry: e, hook: c })
|
|
1589
1593
|
] });
|
|
1590
1594
|
const g = !d && m.length === 0 && !e.rowAdding;
|
|
1591
1595
|
a = /* @__PURE__ */ T("div", { className: j(h.toolbarGroup, g && h.toolbarGroupIdle), children: [
|
|
@@ -1593,11 +1597,11 @@ function Qn({
|
|
|
1593
1597
|
/* The server counts the matches only; a total beside them would be a second request. */
|
|
1594
1598
|
s.entries(f.rowCount, l.count(f.rowCount))
|
|
1595
1599
|
) : s.filteredOfTotal(l.count(f.filtered.length), l.count(c.companion.total ?? c.admitted.length)) : "" }),
|
|
1596
|
-
d && /* @__PURE__ */ u(
|
|
1597
|
-
m.length > 0 && /* @__PURE__ */ T(
|
|
1600
|
+
d && /* @__PURE__ */ u(ge, { size: r, variant: "ghost", onClick: () => Jn(f), children: s.resetAll }),
|
|
1601
|
+
m.length > 0 && /* @__PURE__ */ T(Se, { children: [
|
|
1598
1602
|
/* @__PURE__ */ u("span", { className: h.toolbarInfo, children: s.selectedCount(m.length, l.count(m.length)) }),
|
|
1599
1603
|
w.map(({ key: v, spec: p }) => /* @__PURE__ */ u(
|
|
1600
|
-
|
|
1604
|
+
ge,
|
|
1601
1605
|
{
|
|
1602
1606
|
size: r,
|
|
1603
1607
|
variant: p.tone === "danger" ? "danger" : "secondary",
|
|
@@ -1607,10 +1611,10 @@ function Qn({
|
|
|
1607
1611
|
v
|
|
1608
1612
|
))
|
|
1609
1613
|
] }),
|
|
1610
|
-
e.rowAdding && /* @__PURE__ */ u(
|
|
1614
|
+
e.rowAdding && /* @__PURE__ */ u(Qn, { registry: e })
|
|
1611
1615
|
] });
|
|
1612
1616
|
}
|
|
1613
|
-
return /* @__PURE__ */ u(
|
|
1617
|
+
return /* @__PURE__ */ u(Xn.Provider, { value: r, children: /* @__PURE__ */ u(Dn, { size: r, children: /* @__PURE__ */ T("div", { className: j(h.toolbar, r === "md" && h.toolbarMd, t), children: [
|
|
1614
1618
|
/* @__PURE__ */ T("div", { className: h.toolbarGroup, children: [
|
|
1615
1619
|
n,
|
|
1616
1620
|
i
|
|
@@ -1618,26 +1622,26 @@ function Qn({
|
|
|
1618
1622
|
a
|
|
1619
1623
|
] }) }) });
|
|
1620
1624
|
}
|
|
1621
|
-
const
|
|
1622
|
-
},
|
|
1625
|
+
const $t = wt(null), Pi = () => () => {
|
|
1626
|
+
}, wn = () => 0;
|
|
1623
1627
|
function pt(e) {
|
|
1624
1628
|
var r;
|
|
1625
|
-
const t =
|
|
1626
|
-
|
|
1627
|
-
n ? n.subscribe :
|
|
1628
|
-
n ? n.bodyVersion :
|
|
1629
|
-
n ? n.bodyVersion :
|
|
1629
|
+
const t = Be($t), n = e ? Ci(e.Table) ?? null : (t == null ? void 0 : t.registry) ?? null;
|
|
1630
|
+
yt(
|
|
1631
|
+
n ? n.subscribe : Pi,
|
|
1632
|
+
n ? n.bodyVersion : wn,
|
|
1633
|
+
n ? n.bodyVersion : wn
|
|
1630
1634
|
);
|
|
1631
1635
|
const o = (r = n == null ? void 0 : n.hook) == null ? void 0 : r.publicSnapshot;
|
|
1632
1636
|
return !n || !o ? null : { registry: n, snapshot: o, inside: !e && t !== null, footerTarget: e ? null : (t == null ? void 0 : t.footerTarget) ?? null };
|
|
1633
1637
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return /* @__PURE__ */ T(
|
|
1638
|
+
function eo({ wording: e }) {
|
|
1639
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
1636
1640
|
/* @__PURE__ */ u("span", { "aria-hidden": "true", className: h.absent, children: "—" }),
|
|
1637
|
-
/* @__PURE__ */ u(
|
|
1641
|
+
/* @__PURE__ */ u(Ge, { children: e.cellAbsentValue })
|
|
1638
1642
|
] });
|
|
1639
1643
|
}
|
|
1640
|
-
const zi = { sum: "Σ", avg: "⌀", min: "min", max: "max" },
|
|
1644
|
+
const zi = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Ii = (e, t) => ({
|
|
1641
1645
|
sum: t.footerSum,
|
|
1642
1646
|
avg: t.footerAverage,
|
|
1643
1647
|
min: t.footerMinimum,
|
|
@@ -1646,7 +1650,7 @@ const zi = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Pi = (e, t) => ({
|
|
|
1646
1650
|
count: t.footerCount,
|
|
1647
1651
|
distinct: t.footerDistinct
|
|
1648
1652
|
})[e] ?? t.footerAggregate;
|
|
1649
|
-
function
|
|
1653
|
+
function Vt({
|
|
1650
1654
|
entry: e,
|
|
1651
1655
|
rows: t,
|
|
1652
1656
|
formats: n,
|
|
@@ -1655,13 +1659,13 @@ function $t({
|
|
|
1655
1659
|
}) {
|
|
1656
1660
|
const { aggregate: s, format: l, presentation: c } = e.spec;
|
|
1657
1661
|
if (!s) return null;
|
|
1658
|
-
const i = typeof s == "function" ? "own" : s, a =
|
|
1662
|
+
const i = typeof s == "function" ? "own" : s, a = Qt({ id: e.spec.id, read: e.read, aggregate: s }, t), f = (w) => nt(w, l, n, o);
|
|
1659
1663
|
let d;
|
|
1660
|
-
if (
|
|
1664
|
+
if (Ce(a)) d = /* @__PURE__ */ u(eo, { wording: o });
|
|
1661
1665
|
else if ((i === "sum" || i === "avg") && l === void 0 && typeof a == "number") {
|
|
1662
|
-
const w = Math.max(0, ...t.map((g) => e.read(g)).filter(
|
|
1666
|
+
const w = Math.max(0, ...t.map((g) => e.read(g)).filter($i).map(Vi));
|
|
1663
1667
|
d = n.number(a, Math.min(10, i === "avg" ? w + 1 : w));
|
|
1664
|
-
} else if (i === "range" && l === "date" &&
|
|
1668
|
+
} else if (i === "range" && l === "date" && Gi(a)) {
|
|
1665
1669
|
const [w, g] = a;
|
|
1666
1670
|
d = w.getTime() === g.getTime() ? n.date(w) : o.rangeFromTo(n.dateShort(w), n.dateShort(g));
|
|
1667
1671
|
} else if (i === "count" || i === "distinct") d = n.count(a);
|
|
@@ -1670,23 +1674,23 @@ function $t({
|
|
|
1670
1674
|
d = f(w) === f(g) ? f(w) : o.rangeFromTo(f(w) ?? "", f(g) ?? "");
|
|
1671
1675
|
} else i === "own" && c ? d = c(a, t[0]) : d = f(a);
|
|
1672
1676
|
const m = zi[i];
|
|
1673
|
-
return /* @__PURE__ */ T(
|
|
1677
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
1674
1678
|
r && m && /* @__PURE__ */ u("span", { "aria-hidden": "true", className: h.footerKind, children: m }),
|
|
1675
|
-
r && /* @__PURE__ */ T(
|
|
1676
|
-
|
|
1679
|
+
r && /* @__PURE__ */ T(Ge, { children: [
|
|
1680
|
+
Ii(i, o),
|
|
1677
1681
|
" "
|
|
1678
1682
|
] }),
|
|
1679
1683
|
d
|
|
1680
1684
|
] });
|
|
1681
1685
|
}
|
|
1682
|
-
const
|
|
1686
|
+
const $i = (e) => typeof e == "number" && Number.isFinite(e), Vi = (e) => {
|
|
1683
1687
|
var o;
|
|
1684
1688
|
const [t = "", n = "0"] = e.toExponential().split("e");
|
|
1685
1689
|
return Math.max(0, (((o = t.split(".")[1]) == null ? void 0 : o.length) ?? 0) - Number(n));
|
|
1686
|
-
},
|
|
1687
|
-
function
|
|
1690
|
+
}, Gi = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
|
|
1691
|
+
function to(e, t) {
|
|
1688
1692
|
const n = e.spec.aggregate;
|
|
1689
|
-
return n === "count" || n === "distinct" ? !0 : e.spec.rightAligned !== void 0 ? e.spec.rightAligned :
|
|
1693
|
+
return n === "count" || n === "distinct" ? !0 : e.spec.rightAligned !== void 0 ? e.spec.rightAligned : $n(t, e.read) === "number";
|
|
1690
1694
|
}
|
|
1691
1695
|
function Ki(e, t) {
|
|
1692
1696
|
const n = /* @__PURE__ */ new Map();
|
|
@@ -1696,24 +1700,24 @@ function Ki(e, t) {
|
|
|
1696
1700
|
}
|
|
1697
1701
|
return n;
|
|
1698
1702
|
}
|
|
1699
|
-
function
|
|
1703
|
+
function no(e, t) {
|
|
1700
1704
|
const n = getComputedStyle(e).getPropertyValue(t).trim(), o = Number.parseFloat(n);
|
|
1701
1705
|
return Number.isFinite(o) ? n.endsWith("ms") ? o : o * 1e3 : 0;
|
|
1702
1706
|
}
|
|
1703
|
-
const
|
|
1707
|
+
const Hi = (e) => {
|
|
1704
1708
|
const t = /* @__PURE__ */ new Map(), n = e.getBoundingClientRect().top;
|
|
1705
1709
|
for (const o of Array.from(e.querySelectorAll("tbody > tr[data-motion]")))
|
|
1706
1710
|
t.set(o.dataset.motion, o.getBoundingClientRect().top - n);
|
|
1707
1711
|
return t;
|
|
1708
1712
|
};
|
|
1709
|
-
function
|
|
1710
|
-
const n =
|
|
1711
|
-
|
|
1713
|
+
function ji(e, t) {
|
|
1714
|
+
const n = fe(null);
|
|
1715
|
+
le(() => {
|
|
1712
1716
|
const o = e.current;
|
|
1713
1717
|
if (!o) return;
|
|
1714
|
-
const r =
|
|
1718
|
+
const r = Hi(o), s = n.current;
|
|
1715
1719
|
if (n.current = { trigger: t, positions: r }, !s || s.trigger === t) return;
|
|
1716
|
-
const l =
|
|
1720
|
+
const l = no(o, "--u-duration-medium");
|
|
1717
1721
|
if (l === 0 || typeof o.animate != "function") return;
|
|
1718
1722
|
const c = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", i = Ki(s.positions, r);
|
|
1719
1723
|
for (const a of Array.from(o.querySelectorAll("tbody > tr[data-motion]"))) {
|
|
@@ -1722,12 +1726,12 @@ function Hi(e, t) {
|
|
|
1722
1726
|
}
|
|
1723
1727
|
});
|
|
1724
1728
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const o =
|
|
1727
|
-
|
|
1729
|
+
function Wi(e, t, n) {
|
|
1730
|
+
const o = fe(t);
|
|
1731
|
+
le(() => {
|
|
1728
1732
|
const r = e.current, s = o.current;
|
|
1729
1733
|
if (o.current = t, !r || s === t || typeof r.animate != "function") return;
|
|
1730
|
-
const l =
|
|
1734
|
+
const l = no(r, "--u-duration-medium");
|
|
1731
1735
|
if (l === 0) return;
|
|
1732
1736
|
const c = performance.now();
|
|
1733
1737
|
let i = requestAnimationFrame(function a(f) {
|
|
@@ -1739,10 +1743,10 @@ function ji(e, t, n) {
|
|
|
1739
1743
|
};
|
|
1740
1744
|
}, [e, t, n]);
|
|
1741
1745
|
}
|
|
1742
|
-
const
|
|
1743
|
-
function
|
|
1744
|
-
const o =
|
|
1745
|
-
if (!o) return
|
|
1746
|
+
const oo = {};
|
|
1747
|
+
function rn(e, t, n = t) {
|
|
1748
|
+
const o = qo(e, t, n);
|
|
1749
|
+
if (!o) return oo;
|
|
1746
1750
|
const r = o.side === "start";
|
|
1747
1751
|
return {
|
|
1748
1752
|
className: j(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
|
|
@@ -1761,8 +1765,8 @@ function on(e, t, n = t) {
|
|
|
1761
1765
|
}
|
|
1762
1766
|
};
|
|
1763
1767
|
}
|
|
1764
|
-
const
|
|
1765
|
-
function
|
|
1768
|
+
const qi = (e) => e.controls + (e.span ? 1 : 0) + e.aggregates.length + (e.actions ? 1 : 0);
|
|
1769
|
+
function ro(e) {
|
|
1766
1770
|
const { controls: t, span: n, aggregates: o, actions: r, blocks: s } = e, l = o.length, c = o.indexOf(!0), i = s.end > 0 ? s.end - (r ? 1 : 0) : 0, a = Math.max(n || l === 0 ? 0 : 1, Math.min(c === -1 ? l : c, l - i)), f = t + (n ? 1 : 0), d = s.start > 0 ? s.start - f : 0;
|
|
1767
1771
|
return {
|
|
1768
1772
|
lead: a,
|
|
@@ -1770,24 +1774,24 @@ function oo(e) {
|
|
|
1770
1774
|
countColumns: d > 0 ? Math.min(a, d) : a
|
|
1771
1775
|
};
|
|
1772
1776
|
}
|
|
1773
|
-
function
|
|
1774
|
-
const n =
|
|
1777
|
+
function Ot(e, t) {
|
|
1778
|
+
const n = qi(t);
|
|
1775
1779
|
if (e === "cells") return Array.from({ length: n }, () => 1);
|
|
1776
1780
|
if (e === "whole") return [n];
|
|
1777
|
-
const { lead: o, labelColumns: r, countColumns: s } =
|
|
1781
|
+
const { lead: o, labelColumns: r, countColumns: s } = ro(t), l = Array.from({ length: t.controls }, () => 1), c = Array.from({ length: t.aggregates.length - o + (t.actions ? 1 : 0) }, () => 1), i = (a) => o - a > 0 ? [o - a] : [];
|
|
1778
1782
|
return e === "header" ? [...l, (t.span ? 1 : 0) + r, ...i(r), ...c] : [...l, 1, ...s > 0 ? [s] : [], ...i(s), ...c];
|
|
1779
1783
|
}
|
|
1780
|
-
const
|
|
1781
|
-
function
|
|
1782
|
-
const s =
|
|
1784
|
+
const Ct = (e) => `row:${e}`;
|
|
1785
|
+
function Ui({ layout: e, body: t, rowKey: n, expanded: o, foot: r }) {
|
|
1786
|
+
const s = Ot("cells", e), l = Ot("whole", e), c = [{ key: "head", cells: s, at: -1 }], i = (a, f) => {
|
|
1783
1787
|
const d = n(a);
|
|
1784
|
-
c.push({ key:
|
|
1788
|
+
c.push({ key: Ct(d), cells: s, at: f, row: a }), o.has(d) && c.push({ key: `detail:${d}`, cells: l, at: f, row: a });
|
|
1785
1789
|
};
|
|
1786
1790
|
return "rows" in t ? t.rows.forEach(i) : t.lines.forEach((a, f) => {
|
|
1787
|
-
a.kind === "row" ? i(a.row, f) : c.push({ key: `${a.kind}:${a.group.path}`, cells:
|
|
1791
|
+
a.kind === "row" ? i(a.row, f) : c.push({ key: `${a.kind}:${a.group.path}`, cells: Ot(a.kind, e), at: f });
|
|
1788
1792
|
}), c.length === 1 && c.push({ key: "empty", cells: l, at: -1 }), r && c.push({ key: "foot", cells: s, at: -1 }), c;
|
|
1789
1793
|
}
|
|
1790
|
-
function
|
|
1794
|
+
function so(e, t) {
|
|
1791
1795
|
let n = 0;
|
|
1792
1796
|
for (let o = 0; o < e.length; o++) {
|
|
1793
1797
|
const r = n + e[o];
|
|
@@ -1797,10 +1801,10 @@ function ro(e, t) {
|
|
|
1797
1801
|
return { index: 0, start: 0 };
|
|
1798
1802
|
}
|
|
1799
1803
|
const ut = (e, t) => e.slice(0, t).reduce((n, o) => n + o, 0);
|
|
1800
|
-
function
|
|
1804
|
+
function Yi(e, t, n, o) {
|
|
1801
1805
|
const r = e.length - 1, s = e[t.line];
|
|
1802
1806
|
if (!s) return t;
|
|
1803
|
-
const { index: l } =
|
|
1807
|
+
const { index: l } = so(s.cells, t.column), c = (i) => ({ line: Math.max(0, Math.min(r, i)), column: t.column });
|
|
1804
1808
|
switch (n) {
|
|
1805
1809
|
case "left":
|
|
1806
1810
|
return l > 0 ? { line: t.line, column: ut(s.cells, l - 1) } : t;
|
|
@@ -1824,24 +1828,24 @@ function Ui(e, t, n, o) {
|
|
|
1824
1828
|
return { line: r, column: ut(e[r].cells, e[r].cells.length - 1) };
|
|
1825
1829
|
}
|
|
1826
1830
|
}
|
|
1827
|
-
function
|
|
1828
|
-
const r = e.flatMap((c, i) => c.cells.map((a, f) => ({ line: i, column: ut(c.cells, f) }))), s = r.findIndex((c) => c.line === t.line && c.column ===
|
|
1831
|
+
function Ji(e, t, n, o) {
|
|
1832
|
+
const r = e.flatMap((c, i) => c.cells.map((a, f) => ({ line: i, column: ut(c.cells, f) }))), s = r.findIndex((c) => c.line === t.line && c.column === so(e[t.line].cells, t.column).start);
|
|
1829
1833
|
return (n ? r.slice(0, Math.max(0, s)).reverse() : r.slice(s + 1)).find(o) ?? null;
|
|
1830
1834
|
}
|
|
1831
|
-
function
|
|
1835
|
+
function yn(e, t, n) {
|
|
1832
1836
|
const o = e.indexOf(t);
|
|
1833
1837
|
return o >= 0 ? o : Math.max(0, Math.min(e.length - 1, n));
|
|
1834
1838
|
}
|
|
1835
|
-
function
|
|
1839
|
+
function xt(e, t, n, o) {
|
|
1836
1840
|
if (t === void 0) return o.groupNoValue;
|
|
1837
1841
|
const r = e == null ? void 0 : e.spec;
|
|
1838
|
-
if (r != null && r.group && t instanceof Date) return
|
|
1842
|
+
if (r != null && r.group && t instanceof Date) return Bo(r.group, t, n, o);
|
|
1839
1843
|
const s = r != null && r.ownGroupValue || r == null ? void 0 : r.format;
|
|
1840
|
-
return
|
|
1844
|
+
return nt(t, s, n, o) ?? String(t);
|
|
1841
1845
|
}
|
|
1842
|
-
function
|
|
1846
|
+
function Gt({ entry: e, group: t, formats: n, wording: o }) {
|
|
1843
1847
|
const r = e == null ? void 0 : e.spec;
|
|
1844
|
-
return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ u(
|
|
1848
|
+
return t.value !== void 0 && (r != null && r.presentation) && !r.ownGroupValue && !r.group ? /* @__PURE__ */ u(Se, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ u(Se, { children: xt(e, t.value, n, o) });
|
|
1845
1849
|
}
|
|
1846
1850
|
function Kt({
|
|
1847
1851
|
group: e,
|
|
@@ -1852,9 +1856,9 @@ function Kt({
|
|
|
1852
1856
|
formats: s,
|
|
1853
1857
|
wording: l
|
|
1854
1858
|
}) {
|
|
1855
|
-
const c =
|
|
1859
|
+
const c = xt(n, e.value, s, l), i = s.count(e.rows.length), a = () => r.publicSnapshot.toggleFold(e.path), f = (d) => {
|
|
1856
1860
|
if (d.altKey && (d.key === "ArrowLeft" || d.key === "ArrowRight")) {
|
|
1857
|
-
d.preventDefault(),
|
|
1861
|
+
d.preventDefault(), _n(e, d.key === "ArrowLeft", r);
|
|
1858
1862
|
return;
|
|
1859
1863
|
}
|
|
1860
1864
|
if (d.key === "ArrowRight" && !o)
|
|
@@ -1880,22 +1884,22 @@ function Kt({
|
|
|
1880
1884
|
onKeyDown: f,
|
|
1881
1885
|
onClick: (d) => {
|
|
1882
1886
|
if (!d.altKey) return a();
|
|
1883
|
-
|
|
1887
|
+
_n(e, o, r);
|
|
1884
1888
|
},
|
|
1885
|
-
children: /* @__PURE__ */ u(
|
|
1889
|
+
children: /* @__PURE__ */ u(io, {})
|
|
1886
1890
|
}
|
|
1887
1891
|
);
|
|
1888
1892
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const n =
|
|
1891
|
-
return
|
|
1893
|
+
function Xi({ value: e, formats: t }) {
|
|
1894
|
+
const n = fe(null);
|
|
1895
|
+
return Wi(n, e, t.count), /* @__PURE__ */ u("span", { ref: n, className: h.groupCount, children: t.count(e) });
|
|
1892
1896
|
}
|
|
1893
|
-
function
|
|
1897
|
+
function Ht({ group: e, entry: t, hook: n, formats: o, wording: r }) {
|
|
1894
1898
|
const { selection: s } = n.publicSnapshot, l = e.rows.map(n.rowKey), c = l.filter((a) => s.isSelected(a)).length, i = c === l.length;
|
|
1895
1899
|
return /* @__PURE__ */ u(
|
|
1896
|
-
|
|
1900
|
+
tt,
|
|
1897
1901
|
{
|
|
1898
|
-
"aria-label": r.selectGroup(
|
|
1902
|
+
"aria-label": r.selectGroup(xt(t, e.value, o, r)),
|
|
1899
1903
|
checked: i,
|
|
1900
1904
|
indeterminate: c > 0 && !i,
|
|
1901
1905
|
onChange: () => {
|
|
@@ -1904,7 +1908,7 @@ function Gt({ group: e, entry: t, hook: n, formats: o, wording: r }) {
|
|
|
1904
1908
|
}
|
|
1905
1909
|
);
|
|
1906
1910
|
}
|
|
1907
|
-
function
|
|
1911
|
+
function _n(e, t, n) {
|
|
1908
1912
|
const o = n.publicSnapshot, r = [], s = (l) => {
|
|
1909
1913
|
for (const c of l)
|
|
1910
1914
|
c.level === e.level ? r.push(c) : s(c.groups);
|
|
@@ -1913,7 +1917,7 @@ function yn(e, t, n) {
|
|
|
1913
1917
|
for (const l of r)
|
|
1914
1918
|
o.folded.includes(l.path) !== t && o.toggleFold(l.path);
|
|
1915
1919
|
}
|
|
1916
|
-
function
|
|
1920
|
+
function Qi({
|
|
1917
1921
|
line: e,
|
|
1918
1922
|
entry: t,
|
|
1919
1923
|
selectable: n,
|
|
@@ -1924,16 +1928,16 @@ function Xi({
|
|
|
1924
1928
|
}) {
|
|
1925
1929
|
const c = e.span;
|
|
1926
1930
|
return /* @__PURE__ */ u("td", { className: j(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ T("span", { className: h.spanValue, children: [
|
|
1927
|
-
n && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(
|
|
1931
|
+
n && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(Ht, { group: c, entry: t, hook: r, formats: s, wording: l }) }),
|
|
1928
1932
|
/* @__PURE__ */ u(Kt, { group: c, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: l }),
|
|
1929
|
-
/* @__PURE__ */ T("span", { className: h.spanText, title:
|
|
1930
|
-
/* @__PURE__ */ u(
|
|
1933
|
+
/* @__PURE__ */ T("span", { className: h.spanText, title: xt(t, c.value, s, l), children: [
|
|
1934
|
+
/* @__PURE__ */ u(Gt, { entry: t, group: c, formats: s, wording: l }),
|
|
1931
1935
|
e.continued && /* @__PURE__ */ u("span", { className: h.continued, children: l.groupContinued })
|
|
1932
1936
|
] }),
|
|
1933
1937
|
/* @__PURE__ */ u("span", { className: h.groupCount, children: s.count(c.rows.length) })
|
|
1934
1938
|
] }) });
|
|
1935
1939
|
}
|
|
1936
|
-
function
|
|
1940
|
+
function kn({
|
|
1937
1941
|
line: e,
|
|
1938
1942
|
index: t,
|
|
1939
1943
|
absolute: n,
|
|
@@ -1952,22 +1956,22 @@ function _n({
|
|
|
1952
1956
|
wording: v,
|
|
1953
1957
|
grid: p
|
|
1954
1958
|
}) {
|
|
1955
|
-
const { group: b } = e, R = e.kind === "header", E = R && !w.publicSnapshot.folded.includes(b.path), { lead: y, labelColumns: _, countColumns: x } =
|
|
1959
|
+
const { group: b } = e, R = e.kind === "header", E = R && !w.publicSnapshot.folded.includes(b.path), { lead: y, labelColumns: _, countColumns: x } = ro({
|
|
1956
1960
|
controls: l,
|
|
1957
1961
|
span: o !== void 0,
|
|
1958
1962
|
aggregates: s.map((H) => H.spec.aggregate !== void 0),
|
|
1959
1963
|
actions: a,
|
|
1960
1964
|
blocks: c
|
|
1961
|
-
}),
|
|
1965
|
+
}), O = s.slice(y), I = l + (o ? 1 : 0), A = (H, J = H) => rn(c, H, J), M = (H) => y - H > 0 && /* @__PURE__ */ u("td", { className: h.td, colSpan: y - H }), D = s.find((H) => H.spec.aggregate === "sum" && H.spec.share !== !1), L = n !== void 0, B = /* @__PURE__ */ T("span", { className: h.groupLabel, children: [
|
|
1962
1966
|
/* @__PURE__ */ u(Kt, { group: b, parent: e.parents.at(-1), entry: r, open: E, hook: w, formats: g, wording: v }),
|
|
1963
|
-
/* @__PURE__ */ u("span", { className: h.groupValue, children: /* @__PURE__ */ u(
|
|
1964
|
-
/* @__PURE__ */ u(
|
|
1967
|
+
/* @__PURE__ */ u("span", { className: h.groupValue, children: /* @__PURE__ */ u(Gt, { entry: r, group: b, formats: g, wording: v }) }),
|
|
1968
|
+
/* @__PURE__ */ u(Xi, { value: b.rows.length, formats: g }),
|
|
1965
1969
|
R && e.continued && /* @__PURE__ */ u("span", { className: h.continued, children: v.groupContinued })
|
|
1966
1970
|
] });
|
|
1967
1971
|
return /* @__PURE__ */ T(
|
|
1968
1972
|
"tr",
|
|
1969
1973
|
{
|
|
1970
|
-
className: j(R ? h.groupHeader : h.groupFolded,
|
|
1974
|
+
className: j(R ? h.groupHeader : h.groupFolded, L && h.virtualRow),
|
|
1971
1975
|
"data-line": e.kind,
|
|
1972
1976
|
"data-level": b.level,
|
|
1973
1977
|
"data-motion": n !== void 0 || !(R && e.continued) ? `${e.kind}:${b.path}` : void 0,
|
|
@@ -1975,8 +1979,8 @@ function _n({
|
|
|
1975
1979
|
"data-group-first": R ? void 0 : "",
|
|
1976
1980
|
"data-group": b.path,
|
|
1977
1981
|
"data-grid-line": p ? `${e.kind}:${b.path}` : void 0,
|
|
1978
|
-
"data-row":
|
|
1979
|
-
"aria-rowindex":
|
|
1982
|
+
"data-row": L ? n : void 0,
|
|
1983
|
+
"aria-rowindex": L ? n + 2 : void 0,
|
|
1980
1984
|
"data-index": t,
|
|
1981
1985
|
style: R ? { "--u-header-level": b.level } : void 0,
|
|
1982
1986
|
"aria-level": R ? b.level + 1 : m,
|
|
@@ -1984,8 +1988,8 @@ function _n({
|
|
|
1984
1988
|
"aria-posinset": d.indexOf(b) + 1 || void 0,
|
|
1985
1989
|
"aria-setsize": d.length || void 0,
|
|
1986
1990
|
children: [
|
|
1987
|
-
Array.from({ length: l }, (H, J) => /* @__PURE__ */ u("td", { className: j(h.td, h.control, A(J).className), style: A(J).style, children: J === 0 && i && R && /* @__PURE__ */ u(
|
|
1988
|
-
R ? /* @__PURE__ */ T(
|
|
1991
|
+
Array.from({ length: l }, (H, J) => /* @__PURE__ */ u("td", { className: j(h.td, h.control, A(J).className), style: A(J).style, children: J === 0 && i && R && /* @__PURE__ */ u(Ht, { group: b, entry: r, hook: w, formats: g, wording: v }) }, `c${J}`)),
|
|
1992
|
+
R ? /* @__PURE__ */ T(Se, { children: [
|
|
1989
1993
|
/* @__PURE__ */ u(
|
|
1990
1994
|
"td",
|
|
1991
1995
|
{
|
|
@@ -1998,12 +2002,12 @@ function _n({
|
|
|
1998
2002
|
children: B
|
|
1999
2003
|
}
|
|
2000
2004
|
),
|
|
2001
|
-
|
|
2002
|
-
] }) : /* @__PURE__ */ T(
|
|
2005
|
+
M(_)
|
|
2006
|
+
] }) : /* @__PURE__ */ T(Se, { children: [
|
|
2003
2007
|
/* @__PURE__ */ u("td", { className: j(h.td, h.spanCell, A(l).className), style: A(l).style, children: /* @__PURE__ */ T("span", { className: h.spanValue, children: [
|
|
2004
|
-
i && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(
|
|
2008
|
+
i && /* @__PURE__ */ u("span", { className: h.spanSelect, children: /* @__PURE__ */ u(Ht, { group: b, entry: o, hook: w, formats: g, wording: v }) }),
|
|
2005
2009
|
/* @__PURE__ */ u(Kt, { group: b, parent: e.parents.at(-1), entry: o, open: !1, hook: w, formats: g, wording: v }),
|
|
2006
|
-
/* @__PURE__ */ u("span", { className: h.spanText, children: /* @__PURE__ */ u(
|
|
2010
|
+
/* @__PURE__ */ u("span", { className: h.spanText, children: /* @__PURE__ */ u(Gt, { entry: o, group: b, formats: g, wording: v }) }),
|
|
2007
2011
|
/* @__PURE__ */ u("span", { className: h.groupCount, children: g.count(b.rows.length) })
|
|
2008
2012
|
] }) }),
|
|
2009
2013
|
x > 0 && /* @__PURE__ */ u(
|
|
@@ -2015,10 +2019,10 @@ function _n({
|
|
|
2015
2019
|
children: v.entries(b.rows.length, g.count(b.rows.length))
|
|
2016
2020
|
}
|
|
2017
2021
|
),
|
|
2018
|
-
|
|
2022
|
+
M(x)
|
|
2019
2023
|
] }),
|
|
2020
|
-
|
|
2021
|
-
|
|
2024
|
+
O.map((H, J) => /* @__PURE__ */ u(
|
|
2025
|
+
Zi,
|
|
2022
2026
|
{
|
|
2023
2027
|
pin: A(I + y + J),
|
|
2024
2028
|
entry: H,
|
|
@@ -2035,7 +2039,7 @@ function _n({
|
|
|
2035
2039
|
}
|
|
2036
2040
|
);
|
|
2037
2041
|
}
|
|
2038
|
-
function
|
|
2042
|
+
function Zi({
|
|
2039
2043
|
entry: e,
|
|
2040
2044
|
pin: t,
|
|
2041
2045
|
group: n,
|
|
@@ -2048,22 +2052,22 @@ function Qi({
|
|
|
2048
2052
|
if (!c.aggregate) return /* @__PURE__ */ u("td", { className: j(h.td, t.className), style: t.style });
|
|
2049
2053
|
let i = null;
|
|
2050
2054
|
if (o && c.aggregate === "sum" && c.share !== !1) {
|
|
2051
|
-
const a =
|
|
2055
|
+
const a = Qt({ id: c.id, read: e.read, aggregate: "sum" }, r), f = n.aggregates[c.id];
|
|
2052
2056
|
if (typeof a == "number" && a > 0 && typeof f == "number" && f > 0) {
|
|
2053
2057
|
const d = Math.min(1, f / a);
|
|
2054
2058
|
i = /* @__PURE__ */ u("span", { className: h.shareBar, style: { width: `${Math.max(2, Math.round(d * 64))}px` }, "aria-hidden": "true" });
|
|
2055
2059
|
}
|
|
2056
2060
|
}
|
|
2057
|
-
return /* @__PURE__ */ u("td", { className: j(h.td,
|
|
2058
|
-
/* @__PURE__ */ u(
|
|
2061
|
+
return /* @__PURE__ */ u("td", { className: j(h.td, to(e, n.rows) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof c.aggregate == "function" ? "own" : c.aggregate, children: i ? /* @__PURE__ */ T("span", { className: h.shareHost, children: [
|
|
2062
|
+
/* @__PURE__ */ u(Vt, { entry: e, rows: n.rows, formats: s, wording: l }),
|
|
2059
2063
|
i
|
|
2060
|
-
] }) : /* @__PURE__ */ u(
|
|
2064
|
+
] }) : /* @__PURE__ */ u(Vt, { entry: e, rows: n.rows, formats: s, wording: l }) });
|
|
2061
2065
|
}
|
|
2062
|
-
function
|
|
2066
|
+
function io() {
|
|
2063
2067
|
return /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ u("path", { d: "M2.5 3.75 5 6.25 7.5 3.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2064
2068
|
}
|
|
2065
|
-
const
|
|
2066
|
-
class
|
|
2069
|
+
const Me = "new";
|
|
2070
|
+
class el {
|
|
2067
2071
|
constructor() {
|
|
2068
2072
|
ee(this, "wish", null);
|
|
2069
2073
|
}
|
|
@@ -2077,17 +2081,17 @@ class Zi {
|
|
|
2077
2081
|
return n && (this.wish = null), n;
|
|
2078
2082
|
}
|
|
2079
2083
|
}
|
|
2080
|
-
function
|
|
2081
|
-
const [e, t] = Z({ active: null, widget: !1, editing: null }), [n] = Z(() => new
|
|
2084
|
+
function tl() {
|
|
2085
|
+
const [e, t] = Z({ active: null, widget: !1, editing: null }), [n] = Z(() => new el());
|
|
2082
2086
|
return { state: e, setState: t, focus: n };
|
|
2083
2087
|
}
|
|
2084
|
-
const
|
|
2085
|
-
function
|
|
2086
|
-
const n =
|
|
2088
|
+
const ot = wt(null);
|
|
2089
|
+
function nl(e, t) {
|
|
2090
|
+
const n = Be(ot), o = n == null ? void 0 : n.editing;
|
|
2087
2091
|
return o && o.line === e && t in o.drafts ? n : null;
|
|
2088
2092
|
}
|
|
2089
|
-
const
|
|
2090
|
-
function
|
|
2093
|
+
const jt = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]', ct = "data-grid-tabindex";
|
|
2094
|
+
function ol(e, t) {
|
|
2091
2095
|
if (t && !e.hasAttribute(ct))
|
|
2092
2096
|
e.setAttribute(ct, e.getAttribute("tabindex") ?? ""), e.tabIndex = -1;
|
|
2093
2097
|
else if (!t && e.hasAttribute(ct)) {
|
|
@@ -2095,21 +2099,21 @@ function nl(e, t) {
|
|
|
2095
2099
|
n === "" ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", n), e.removeAttribute(ct);
|
|
2096
2100
|
}
|
|
2097
2101
|
}
|
|
2098
|
-
function
|
|
2102
|
+
function sn(e) {
|
|
2099
2103
|
let t = 0;
|
|
2100
2104
|
return Array.from(e.cells).map((n) => {
|
|
2101
2105
|
const o = { cell: n, start: t, end: t + n.colSpan };
|
|
2102
2106
|
return t = o.end, o;
|
|
2103
2107
|
});
|
|
2104
2108
|
}
|
|
2105
|
-
function
|
|
2109
|
+
function Mt(e, t) {
|
|
2106
2110
|
if (!(t instanceof Element)) return null;
|
|
2107
2111
|
const n = t.closest("td, th"), o = n == null ? void 0 : n.parentElement, r = o == null ? void 0 : o.dataset.gridLine;
|
|
2108
2112
|
if (!n || !o || r === void 0 || o.closest("table") !== e) return null;
|
|
2109
|
-
const { start: s, end: l } =
|
|
2113
|
+
const { start: s, end: l } = sn(o).find((c) => c.cell === n);
|
|
2110
2114
|
return { cell: n, line: r, column: s, end: l };
|
|
2111
2115
|
}
|
|
2112
|
-
function
|
|
2116
|
+
function rl({
|
|
2113
2117
|
table: e,
|
|
2114
2118
|
grid: t,
|
|
2115
2119
|
lines: n,
|
|
@@ -2117,12 +2121,12 @@ function ol({
|
|
|
2117
2121
|
editable: r,
|
|
2118
2122
|
outside: s
|
|
2119
2123
|
}) {
|
|
2120
|
-
const l =
|
|
2121
|
-
|
|
2124
|
+
const l = fe(s);
|
|
2125
|
+
le(() => {
|
|
2122
2126
|
l.current = s;
|
|
2123
2127
|
});
|
|
2124
2128
|
const c = s !== void 0;
|
|
2125
|
-
return
|
|
2129
|
+
return qe(() => {
|
|
2126
2130
|
const i = e.current;
|
|
2127
2131
|
if (!c || !i) return;
|
|
2128
2132
|
const a = (f) => {
|
|
@@ -2132,19 +2136,19 @@ function ol({
|
|
|
2132
2136
|
(d = l.current) == null || d.call(l);
|
|
2133
2137
|
};
|
|
2134
2138
|
return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
|
|
2135
|
-
}, [c, e]),
|
|
2139
|
+
}, [c, e]), le(() => {
|
|
2136
2140
|
var E, y;
|
|
2137
2141
|
const i = e.current;
|
|
2138
2142
|
if (!i) return;
|
|
2139
|
-
const { active: a, widget: f, editing: d } = t.state, m =
|
|
2143
|
+
const { active: a, widget: f, editing: d } = t.state, m = sl(a, n, o), w = (E = n[m.line]) == null ? void 0 : E.key, g = new Map(n.map((_, x) => [_.key, x]));
|
|
2140
2144
|
let v = null, p = null;
|
|
2141
2145
|
for (const _ of Array.from(i.querySelectorAll("tr[data-grid-line]"))) {
|
|
2142
|
-
const x = _.dataset.gridLine,
|
|
2143
|
-
for (const { cell: I, start: A, end:
|
|
2144
|
-
const D = m.column >= A && m.column <
|
|
2146
|
+
const x = _.dataset.gridLine, O = sn(_);
|
|
2147
|
+
for (const { cell: I, start: A, end: M } of O) {
|
|
2148
|
+
const D = m.column >= A && m.column < M || I === O.at(-1).cell && m.column >= M;
|
|
2145
2149
|
D && x === w && (v = I), D && p === null && x !== "head" && (p = I), I.tabIndex = -1, r && x !== "head" && !r({ line: g.get(x) ?? -1, column: A }) ? I.setAttribute("aria-readonly", "true") : I.removeAttribute("aria-readonly");
|
|
2146
|
-
const
|
|
2147
|
-
for (const B of Array.from(I.querySelectorAll(
|
|
2150
|
+
const L = (d == null ? void 0 : d.row) === !0 && d.line === x || I === v && (f || d !== null && d.line === x);
|
|
2151
|
+
for (const B of Array.from(I.querySelectorAll(jt))) ol(B, !L);
|
|
2148
2152
|
}
|
|
2149
2153
|
}
|
|
2150
2154
|
const b = v ?? p ?? i.querySelector("tr[data-grid-line] > *");
|
|
@@ -2161,17 +2165,17 @@ function ol({
|
|
|
2161
2165
|
} else R === "cell" && (v == null || v.focus());
|
|
2162
2166
|
}), null;
|
|
2163
2167
|
}
|
|
2164
|
-
function
|
|
2168
|
+
function sl(e, t, n) {
|
|
2165
2169
|
return e ? {
|
|
2166
|
-
line:
|
|
2170
|
+
line: yn(
|
|
2167
2171
|
t.map((o) => o.key),
|
|
2168
2172
|
e.line,
|
|
2169
2173
|
e.lineIndex
|
|
2170
2174
|
),
|
|
2171
|
-
column:
|
|
2175
|
+
column: yn(n, e.column, e.columnIndex)
|
|
2172
2176
|
} : { line: Math.min(1, t.length - 1), column: 0 };
|
|
2173
2177
|
}
|
|
2174
|
-
const
|
|
2178
|
+
const il = {
|
|
2175
2179
|
ArrowLeft: "left",
|
|
2176
2180
|
ArrowRight: "right",
|
|
2177
2181
|
ArrowUp: "up",
|
|
@@ -2180,81 +2184,81 @@ const sl = {
|
|
|
2180
2184
|
End: "lineEnd",
|
|
2181
2185
|
PageUp: "pageUp",
|
|
2182
2186
|
PageDown: "pageDown"
|
|
2183
|
-
},
|
|
2184
|
-
function
|
|
2185
|
-
const n = (o) =>
|
|
2187
|
+
}, Sn = (e) => (e == null ? void 0 : e.spec.edit) !== void 0;
|
|
2188
|
+
function lo(e, t) {
|
|
2189
|
+
const n = (o) => Ce(o) || o === "" ? null : o instanceof Date ? o.getTime() : o;
|
|
2186
2190
|
return Object.is(n(e), n(t));
|
|
2187
2191
|
}
|
|
2188
|
-
function
|
|
2192
|
+
function ll(e) {
|
|
2189
2193
|
const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, virtual: l, onCellEdit: c, rowMode: i, onRowSave: a, onRowAdd: f, newRow: d, onRowDelete: m, select: w } = e, { setState: g } = t, v = n.map((k) => k.key), p = t.state.editing, b = (k) => {
|
|
2190
2194
|
var C;
|
|
2191
|
-
return k ===
|
|
2195
|
+
return k === Me ? p == null ? void 0 : p.fresh : (C = n.find((N) => N.key === k)) == null ? void 0 : C.row;
|
|
2192
2196
|
}, R = (k) => {
|
|
2193
2197
|
const C = n[k.line];
|
|
2194
|
-
return (C == null ? void 0 : C.key) ===
|
|
2195
|
-
}, E = (k) => R(k) !== null &&
|
|
2196
|
-
var
|
|
2198
|
+
return (C == null ? void 0 : C.key) === Me ? { row: C.row } : (C == null ? void 0 : C.row) !== void 0 && C.key === Ct(s(C.row)) ? { row: C.row } : null;
|
|
2199
|
+
}, E = (k) => R(k) !== null && Sn(r(o[k.column] ?? "")), y = () => o.map(r).filter(Sn), _ = (k, C = t.state.active) => C && C.line === k.line && C.columnIndex >= k.column && C.columnIndex < k.end ? C.columnIndex : k.column, x = (k, C) => {
|
|
2200
|
+
var oe;
|
|
2197
2201
|
const N = n[C.line];
|
|
2198
2202
|
if (!N) return;
|
|
2199
|
-
g((
|
|
2200
|
-
const
|
|
2203
|
+
g((P) => ({ ...P, widget: !1, active: { line: N.key, column: o[C.column] ?? "", lineIndex: C.line, columnIndex: C.column } }));
|
|
2204
|
+
const K = Array.from(k.querySelectorAll("tr[data-grid-line]")).find((P) => P.dataset.gridLine === N.key), W = K ? (oe = sn(K).find((P) => C.column >= P.start && C.column < P.end)) == null ? void 0 : oe.cell : void 0;
|
|
2201
2205
|
W ? W.focus({ preventScroll: N.key === "head" }) : (t.focus.want("cell"), l && N.at >= 0 && l.showRow(N.at));
|
|
2202
|
-
},
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2205
|
-
...
|
|
2206
|
-
active: { line:
|
|
2207
|
-
editing: { line:
|
|
2206
|
+
}, O = (k, C, N = !1) => {
|
|
2207
|
+
const K = n[k.line], W = r(o[k.column] ?? ""), oe = i ? Object.fromEntries(y().map((P) => [P.spec.id, P.read(K.row)])) : {};
|
|
2208
|
+
oe[W.spec.id] = C === void 0 ? W.read(K.row) : C, t.focus.want(N ? "open" : "editor"), g((P) => ({
|
|
2209
|
+
...P,
|
|
2210
|
+
active: { line: K.key, column: W.spec.id, lineIndex: k.line, columnIndex: k.column },
|
|
2211
|
+
editing: { line: K.key, column: W.spec.id, row: i, drafts: oe, errors: {}, refused: !1 }
|
|
2208
2212
|
}));
|
|
2209
2213
|
}, I = (k = {}, C = !0) => {
|
|
2210
|
-
var
|
|
2214
|
+
var ce, q, he;
|
|
2211
2215
|
if (!p) return !0;
|
|
2212
|
-
const N = { ...p.drafts, ...k },
|
|
2213
|
-
if (
|
|
2214
|
-
return g((
|
|
2216
|
+
const N = { ...p.drafts, ...k }, K = b(p.line);
|
|
2217
|
+
if (K === void 0)
|
|
2218
|
+
return g((Y) => ({ ...Y, editing: null })), !0;
|
|
2215
2219
|
const W = {};
|
|
2216
|
-
for (const [
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2220
|
+
for (const [Y, te] of Object.entries(N)) {
|
|
2221
|
+
const Ne = (he = (ce = r(Y)) == null ? void 0 : (q = ce.spec).validate) == null ? void 0 : he.call(q, te, K);
|
|
2222
|
+
Ne && (W[Y] = Ne);
|
|
2219
2223
|
}
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2222
|
-
const
|
|
2224
|
+
const oe = Object.keys(N).find((Y) => W[Y] !== void 0);
|
|
2225
|
+
if (oe !== void 0) {
|
|
2226
|
+
const Y = p.row ? oe : p.column;
|
|
2223
2227
|
return C && t.focus.want("editor"), g((te) => ({
|
|
2224
2228
|
...te,
|
|
2225
|
-
active: { line: p.line, column:
|
|
2226
|
-
editing: te.editing && { ...te.editing, column:
|
|
2229
|
+
active: { line: p.line, column: Y, lineIndex: Math.max(0, v.indexOf(p.line)), columnIndex: o.indexOf(Y) },
|
|
2230
|
+
editing: te.editing && { ...te.editing, column: Y, drafts: N, errors: W, refused: !1 }
|
|
2227
2231
|
})), !1;
|
|
2228
2232
|
}
|
|
2229
|
-
const
|
|
2233
|
+
const P = Object.keys(N).filter((Y) => {
|
|
2230
2234
|
var te;
|
|
2231
|
-
return !
|
|
2235
|
+
return !lo(N[Y], (te = r(Y)) == null ? void 0 : te.read(K));
|
|
2232
2236
|
});
|
|
2233
|
-
return p.line ===
|
|
2234
|
-
}, A = (k, C) => I({ [k]: C }),
|
|
2237
|
+
return p.line === Me ? f == null || f({ values: N }) : p.row ? P.length > 0 && (a == null || a({ rowKey: s(K), changes: Object.fromEntries(P.map((Y) => [Y, N[Y]])), row: K })) : P.length > 0 && (c == null || c({ rowKey: s(K), columnId: p.column, value: N[p.column], row: K })), C && t.focus.want("cell"), g((Y) => ({ ...Y, editing: null })), !0;
|
|
2238
|
+
}, A = (k, C) => I({ [k]: C }), M = () => {
|
|
2235
2239
|
t.focus.want("cell"), g((k) => ({ ...k, editing: null }));
|
|
2236
2240
|
}, D = () => {
|
|
2237
2241
|
t.focus.want("editor"), g((k) => k.editing ? { ...k, editing: { ...k.editing, refused: !0 } } : k);
|
|
2238
|
-
},
|
|
2239
|
-
var W,
|
|
2242
|
+
}, L = (k, C) => g((N) => {
|
|
2243
|
+
var W, oe, P;
|
|
2240
2244
|
if (!N.editing) return N;
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2245
|
+
const K = { ...N.editing.errors };
|
|
2246
|
+
if (K[k] !== void 0) {
|
|
2247
|
+
const ce = (P = (W = r(k)) == null ? void 0 : (oe = W.spec).validate) == null ? void 0 : P.call(oe, C, b(N.editing.line));
|
|
2248
|
+
ce ? K[k] = ce : delete K[k];
|
|
2245
2249
|
}
|
|
2246
|
-
return { ...N, editing: { ...N.editing, drafts: { ...N.editing.drafts, [k]: C }, errors:
|
|
2250
|
+
return { ...N, editing: { ...N.editing, drafts: { ...N.editing.drafts, [k]: C }, errors: K, refused: !1 } };
|
|
2247
2251
|
}), B = () => {
|
|
2248
2252
|
if (p && (p.row || !I())) return D();
|
|
2249
2253
|
const k = y(), C = k[0];
|
|
2250
2254
|
if (!C) return;
|
|
2251
2255
|
const N = (d == null ? void 0 : d()) ?? {};
|
|
2252
|
-
t.focus.want("editor"), g((
|
|
2253
|
-
...
|
|
2256
|
+
t.focus.want("editor"), g((K) => ({
|
|
2257
|
+
...K,
|
|
2254
2258
|
widget: !1,
|
|
2255
|
-
active: { line:
|
|
2259
|
+
active: { line: Me, column: C.spec.id, lineIndex: 1, columnIndex: o.indexOf(C.spec.id) },
|
|
2256
2260
|
editing: {
|
|
2257
|
-
line:
|
|
2261
|
+
line: Me,
|
|
2258
2262
|
column: C.spec.id,
|
|
2259
2263
|
row: !0,
|
|
2260
2264
|
/* What `newRow` leaves out is empty - `null`, as an emptied field says it. */
|
|
@@ -2265,103 +2269,103 @@ function il(e) {
|
|
|
2265
2269
|
}
|
|
2266
2270
|
}));
|
|
2267
2271
|
}, H = (k) => {
|
|
2268
|
-
var
|
|
2272
|
+
var oe;
|
|
2269
2273
|
const C = k.currentTarget;
|
|
2270
2274
|
if (k.defaultPrevented) return;
|
|
2271
|
-
const N =
|
|
2275
|
+
const N = Mt(C, k.target);
|
|
2272
2276
|
if (!N) return;
|
|
2273
|
-
const
|
|
2274
|
-
if (
|
|
2277
|
+
const K = { line: v.indexOf(N.line), column: _(N) };
|
|
2278
|
+
if (K.line < 0) return;
|
|
2275
2279
|
if (p != null && p.row && p.line === N.line) {
|
|
2276
|
-
k.key === "Escape" ? (k.preventDefault(),
|
|
2280
|
+
k.key === "Escape" ? (k.preventDefault(), M()) : k.key === "Enter" && !(k.target instanceof HTMLButtonElement) && (k.preventDefault(), I());
|
|
2277
2281
|
return;
|
|
2278
2282
|
}
|
|
2279
2283
|
if (p && p.line === N.line && p.column === o[N.column]) {
|
|
2280
2284
|
if (k.key === "Escape")
|
|
2281
|
-
k.preventDefault(),
|
|
2285
|
+
k.preventDefault(), M();
|
|
2282
2286
|
else if (k.key === "Enter" && !(k.target instanceof HTMLButtonElement))
|
|
2283
2287
|
k.preventDefault(), I();
|
|
2284
2288
|
else if (k.key === "Tab") {
|
|
2285
|
-
const
|
|
2286
|
-
if ((
|
|
2287
|
-
|
|
2289
|
+
const P = Ji(n, K, k.shiftKey, E), ce = I();
|
|
2290
|
+
if ((P || !ce) && k.preventDefault(), !ce) return;
|
|
2291
|
+
P ? O(P) : t.focus.want(null);
|
|
2288
2292
|
}
|
|
2289
2293
|
return;
|
|
2290
2294
|
}
|
|
2291
2295
|
if (k.target !== N.cell) {
|
|
2292
|
-
(k.key === "Escape" || k.key === "F2") && (k.preventDefault(), g((
|
|
2296
|
+
(k.key === "Escape" || k.key === "F2") && (k.preventDefault(), g((P) => ({ ...P, widget: !1 })), N.cell.focus());
|
|
2293
2297
|
return;
|
|
2294
2298
|
}
|
|
2295
2299
|
if (k.altKey || k.metaKey) return;
|
|
2296
|
-
const W = k.ctrlKey ? { Home: "first", End: "last" }[k.key] :
|
|
2300
|
+
const W = k.ctrlKey ? { Home: "first", End: "last" }[k.key] : il[k.key];
|
|
2297
2301
|
if (W) {
|
|
2298
|
-
k.preventDefault(), x(C,
|
|
2302
|
+
k.preventDefault(), x(C, Yi(n, K, W, al(N.cell, C)));
|
|
2299
2303
|
return;
|
|
2300
2304
|
}
|
|
2301
2305
|
if (!k.ctrlKey) {
|
|
2302
2306
|
if (k.key === " ") {
|
|
2303
|
-
const
|
|
2304
|
-
w &&
|
|
2307
|
+
const P = R(K);
|
|
2308
|
+
w && P && N.line !== Me && (k.preventDefault(), w(P.row));
|
|
2305
2309
|
return;
|
|
2306
2310
|
}
|
|
2307
2311
|
if (k.key === "Enter" || k.key === "F2") {
|
|
2308
|
-
if (E(
|
|
2309
|
-
k.preventDefault(),
|
|
2312
|
+
if (E(K)) {
|
|
2313
|
+
k.preventDefault(), O(K);
|
|
2310
2314
|
return;
|
|
2311
2315
|
}
|
|
2312
|
-
const
|
|
2313
|
-
|
|
2316
|
+
const P = N.cell.querySelector(jt);
|
|
2317
|
+
P && (k.preventDefault(), g((ce) => ({ ...ce, widget: !0 })), P.focus());
|
|
2314
2318
|
return;
|
|
2315
2319
|
}
|
|
2316
|
-
if (k.key.length === 1 && E(
|
|
2317
|
-
const
|
|
2318
|
-
k.preventDefault(),
|
|
2320
|
+
if (k.key.length === 1 && E(K)) {
|
|
2321
|
+
const P = (oe = r(o[N.column] ?? "")) == null ? void 0 : oe.spec.edit;
|
|
2322
|
+
k.preventDefault(), O(K, P === "text" ? k.key : P === "number" && /\d/.test(k.key) ? Number(k.key) : void 0);
|
|
2319
2323
|
}
|
|
2320
2324
|
}
|
|
2321
2325
|
}, J = (k) => {
|
|
2322
2326
|
if (k.button !== 0 || p) return;
|
|
2323
|
-
const C =
|
|
2324
|
-
if (!C || k.target.closest(
|
|
2327
|
+
const C = Mt(k.currentTarget, k.target);
|
|
2328
|
+
if (!C || k.target.closest(jt) !== C.cell) return;
|
|
2325
2329
|
const N = { line: v.indexOf(C.line), column: C.column };
|
|
2326
|
-
N.line >= 0 && E(N) &&
|
|
2327
|
-
},
|
|
2328
|
-
const C =
|
|
2330
|
+
N.line >= 0 && E(N) && O(N, void 0, !0);
|
|
2331
|
+
}, G = (k) => {
|
|
2332
|
+
const C = Mt(k.currentTarget, k.target);
|
|
2329
2333
|
if (!C) return;
|
|
2330
|
-
const N = v.indexOf(C.line),
|
|
2334
|
+
const N = v.indexOf(C.line), K = o[C.column] ?? "";
|
|
2331
2335
|
if (p != null && p.row) {
|
|
2332
2336
|
if (p.line !== C.line) return D();
|
|
2333
|
-
|
|
2334
|
-
} else if (p && (p.line !== C.line || p.column !==
|
|
2337
|
+
K in p.drafts && K !== p.column && g((W) => ({ ...W, editing: W.editing && { ...W.editing, column: K } }));
|
|
2338
|
+
} else if (p && (p.line !== C.line || p.column !== K) && !I()) {
|
|
2335
2339
|
t.focus.want("editor");
|
|
2336
2340
|
return;
|
|
2337
2341
|
}
|
|
2338
2342
|
t.focus.want(null), g((W) => {
|
|
2339
|
-
const
|
|
2343
|
+
const oe = _(C, W.active);
|
|
2340
2344
|
return {
|
|
2341
2345
|
...W,
|
|
2342
2346
|
widget: k.target !== C.cell,
|
|
2343
|
-
active: { line: C.line, column: o[
|
|
2347
|
+
active: { line: C.line, column: o[oe] ?? "", lineIndex: Math.max(0, N), columnIndex: oe }
|
|
2344
2348
|
};
|
|
2345
2349
|
});
|
|
2346
|
-
},
|
|
2350
|
+
}, ae = (k) => {
|
|
2347
2351
|
k.currentTarget.contains(k.relatedTarget) || g((C) => C.widget ? { ...C, widget: !1 } : C);
|
|
2348
|
-
},
|
|
2352
|
+
}, ne = {
|
|
2349
2353
|
editing: p,
|
|
2350
|
-
setDraft:
|
|
2354
|
+
setDraft: L,
|
|
2351
2355
|
commit: A,
|
|
2352
2356
|
save: () => void I(),
|
|
2353
|
-
discard:
|
|
2357
|
+
discard: M,
|
|
2354
2358
|
remove: m && ((k) => m({ rowKey: s(k), row: k }))
|
|
2355
|
-
},
|
|
2356
|
-
return { onKeyDown: H, onClick: J, onFocus:
|
|
2359
|
+
}, Re = p && !p.row ? () => void I({}, !1) : void 0;
|
|
2360
|
+
return { onKeyDown: H, onClick: J, onFocus: G, onBlur: ae, context: ne, editable: E, addRow: B, outside: Re };
|
|
2357
2361
|
}
|
|
2358
|
-
function
|
|
2362
|
+
function al(e, t) {
|
|
2359
2363
|
var s;
|
|
2360
2364
|
const n = ((s = e.parentElement) == null ? void 0 : s.getBoundingClientRect().height) ?? 0, o = t.parentElement, r = Math.min((o == null ? void 0 : o.clientHeight) || window.innerHeight, window.innerHeight);
|
|
2361
2365
|
return n > 0 ? Math.max(1, Math.floor(r / n) - 1) : 10;
|
|
2362
2366
|
}
|
|
2363
|
-
function
|
|
2364
|
-
const r =
|
|
2367
|
+
function cl({ entry: e, row: t, rowName: n, grid: o }) {
|
|
2368
|
+
const r = Ee(), s = fe(null), { spec: l } = e, c = o.editing, i = l.id, a = c.drafts[i], f = c.errors[i] ?? null, d = (g) => o.setDraft(i, g), m = o.wording.editCell(l.label, n);
|
|
2365
2369
|
let w;
|
|
2366
2370
|
if (typeof l.edit == "function")
|
|
2367
2371
|
w = l.edit({
|
|
@@ -2373,24 +2377,24 @@ function al({ entry: e, row: t, rowName: n, grid: o }) {
|
|
|
2373
2377
|
label: m
|
|
2374
2378
|
});
|
|
2375
2379
|
else if (l.edit === "number")
|
|
2376
|
-
w = /* @__PURE__ */ u(
|
|
2380
|
+
w = /* @__PURE__ */ u(Et, { size: "sm", value: typeof a == "number" ? a : null, onChange: d });
|
|
2377
2381
|
else if (l.edit === "date")
|
|
2378
|
-
w = /* @__PURE__ */ u(
|
|
2382
|
+
w = /* @__PURE__ */ u(yo, { size: "sm", value: a instanceof Date ? a : null, onChange: (g) => c.row ? d(g) : o.commit(i, g) });
|
|
2379
2383
|
else if (l.edit === "select") {
|
|
2380
|
-
const g = l.editOptions ??
|
|
2381
|
-
w = /* @__PURE__ */ T(
|
|
2384
|
+
const g = l.editOptions ?? Pt(o.hook.admitted, e.read, r).values, v = g.findIndex((p) => lo(p, a));
|
|
2385
|
+
w = /* @__PURE__ */ T(Bn, { size: "sm", value: v < 0 ? "" : String(v), onChange: (p) => d(g[Number(p.target.value)]), children: [
|
|
2382
2386
|
v < 0 && /* @__PURE__ */ u("option", { value: "" }),
|
|
2383
2387
|
g.map((p, b) => /* @__PURE__ */ u("option", { value: b, children: p instanceof Date ? r.date(p) : String(p) }, b))
|
|
2384
2388
|
] });
|
|
2385
2389
|
} else
|
|
2386
|
-
w = /* @__PURE__ */ u(
|
|
2390
|
+
w = /* @__PURE__ */ u(Pn, { size: "sm", value: Ce(a) ? "" : String(a), onChange: (g) => d(g.target.value) });
|
|
2387
2391
|
return /* @__PURE__ */ T("div", { ref: s, className: h.editor, children: [
|
|
2388
|
-
/* @__PURE__ */ u(
|
|
2389
|
-
/* @__PURE__ */ u(
|
|
2392
|
+
/* @__PURE__ */ u(Ft, { className: h.editorField, label: /* @__PURE__ */ u(Ge, { children: m }), error: f ?? void 0, children: w }),
|
|
2393
|
+
/* @__PURE__ */ u(_t, { open: f !== null, onOpenChange: () => {
|
|
2390
2394
|
}, anchorRef: s, restoreFocus: !1, offset: 4, className: h.editorMessage, children: /* @__PURE__ */ u("span", { "aria-hidden": "true", children: f }) })
|
|
2391
2395
|
] });
|
|
2392
2396
|
}
|
|
2393
|
-
function
|
|
2397
|
+
function ul(e) {
|
|
2394
2398
|
const t = typeof e.value == "string" ? e.value : void 0;
|
|
2395
2399
|
let n = e.id ?? t;
|
|
2396
2400
|
return n === void 0 && (ve(`without-id:${e.label}`, `The column "${e.label}" has a computed value but no id. Its label serves as the id.`), n = e.label), e.footer !== void 0 && ve(`footer:${n}`, `The column "${n}" uses \`footer\`, which is called \`aggregate\` now. The old name goes with the next minor version.`), e.children !== void 0 && typeof e.children != "function" && ve(`children:${n}`, `The children of the column "${n}" are not a function and are passed over.`), {
|
|
@@ -2419,66 +2423,66 @@ function cl(e) {
|
|
|
2419
2423
|
validate: e.validate
|
|
2420
2424
|
};
|
|
2421
2425
|
}
|
|
2422
|
-
function
|
|
2426
|
+
function dl(e, t, n, o, r) {
|
|
2423
2427
|
if (!t) return n.rowKey(e);
|
|
2424
2428
|
const s = t.read(e);
|
|
2425
|
-
return
|
|
2429
|
+
return Ce(s) ? r.cellAbsentValue : nt(s, t.spec.format, o, r) ?? n.rowKey(e);
|
|
2426
2430
|
}
|
|
2427
|
-
function
|
|
2431
|
+
function fl(e) {
|
|
2428
2432
|
function t(i) {
|
|
2429
|
-
const a =
|
|
2430
|
-
return e.registerColumn(a, d),
|
|
2433
|
+
const a = Fe(), f = Be($t), d = ul(i);
|
|
2434
|
+
return e.registerColumn(a, d), le(
|
|
2431
2435
|
() => () => {
|
|
2432
2436
|
e.removeColumn(a), e.commit();
|
|
2433
2437
|
},
|
|
2434
2438
|
[a]
|
|
2435
|
-
),
|
|
2439
|
+
), le(() => {
|
|
2436
2440
|
e.ensureColumn(a, d), e.checkOrder(), e.commit();
|
|
2437
|
-
}),
|
|
2441
|
+
}), on && f && f.registry !== e && ve(
|
|
2438
2442
|
`foreign:${d.id}`,
|
|
2439
2443
|
`The column "${d.id}" comes from a different useTable call than the table it stands in. It reads the rows of its own hook.`
|
|
2440
2444
|
), /* @__PURE__ */ u("span", { hidden: !0, "data-umriss-column": a });
|
|
2441
2445
|
}
|
|
2442
2446
|
function n({ children: i }) {
|
|
2443
|
-
const a =
|
|
2444
|
-
return e.registerDetail(a, i),
|
|
2447
|
+
const a = Fe();
|
|
2448
|
+
return e.registerDetail(a, i), le(
|
|
2445
2449
|
() => () => {
|
|
2446
2450
|
e.removeDetail(a), e.commit();
|
|
2447
2451
|
},
|
|
2448
2452
|
[a]
|
|
2449
|
-
),
|
|
2453
|
+
), le(() => {
|
|
2450
2454
|
e.detail || e.registerDetail(a, i), e.commit();
|
|
2451
2455
|
}), null;
|
|
2452
2456
|
}
|
|
2453
|
-
function o({ children: i }) {
|
|
2454
|
-
const
|
|
2455
|
-
return e.registerActionGroup(a),
|
|
2457
|
+
function o({ children: i, pin: a = !0 }) {
|
|
2458
|
+
const f = Fe();
|
|
2459
|
+
return e.registerActionGroup(f, a), le(
|
|
2456
2460
|
() => () => {
|
|
2457
|
-
e.removeActionGroup(
|
|
2461
|
+
e.removeActionGroup(f), e.commit();
|
|
2458
2462
|
},
|
|
2459
|
-
[
|
|
2460
|
-
),
|
|
2461
|
-
e.registerActionGroup(a), e.commit();
|
|
2462
|
-
}), /* @__PURE__ */ u(
|
|
2463
|
+
[f]
|
|
2464
|
+
), le(() => {
|
|
2465
|
+
e.registerActionGroup(f, a), e.commit();
|
|
2466
|
+
}), /* @__PURE__ */ u(Se, { children: i });
|
|
2463
2467
|
}
|
|
2464
2468
|
function r(i) {
|
|
2465
|
-
const a =
|
|
2469
|
+
const a = Fe(), f = {
|
|
2466
2470
|
label: i.children,
|
|
2467
2471
|
bulk: i.bulk === !0,
|
|
2468
2472
|
tone: i.tone ?? "default",
|
|
2469
2473
|
onSelect: i.onSelect
|
|
2470
2474
|
};
|
|
2471
|
-
return e.registerAction(a, f),
|
|
2475
|
+
return e.registerAction(a, f), le(
|
|
2472
2476
|
() => () => {
|
|
2473
2477
|
e.removeAction(a), e.commit();
|
|
2474
2478
|
},
|
|
2475
2479
|
[a]
|
|
2476
|
-
),
|
|
2480
|
+
), le(() => {
|
|
2477
2481
|
e.ensureAction(a, f), e.checkOrder(), e.commit();
|
|
2478
2482
|
}), /* @__PURE__ */ u("span", { hidden: !0, "data-umriss-action": a });
|
|
2479
2483
|
}
|
|
2480
2484
|
function s(i) {
|
|
2481
|
-
const a =
|
|
2485
|
+
const a = Fe(), f = typeof i.value == "string" ? i.value : void 0, m = {
|
|
2482
2486
|
id: i.id ?? f ?? i.label,
|
|
2483
2487
|
label: i.label,
|
|
2484
2488
|
value: i.value,
|
|
@@ -2488,37 +2492,37 @@ function dl(e) {
|
|
|
2488
2492
|
group: i.group,
|
|
2489
2493
|
groupable: !0
|
|
2490
2494
|
};
|
|
2491
|
-
return e.registerGroupKey(a, m),
|
|
2495
|
+
return e.registerGroupKey(a, m), le(
|
|
2492
2496
|
() => () => {
|
|
2493
2497
|
e.removeGroupKey(a), e.commit();
|
|
2494
2498
|
},
|
|
2495
2499
|
[a]
|
|
2496
|
-
),
|
|
2500
|
+
), le(() => {
|
|
2497
2501
|
e.ensureGroupKey(a, m), e.checkOrder(), e.commit();
|
|
2498
2502
|
}), /* @__PURE__ */ u("span", { hidden: !0, "data-umriss-groupkey": a });
|
|
2499
2503
|
}
|
|
2500
2504
|
function l(i) {
|
|
2501
2505
|
e.beginPass(), e.setStickyRowHeader(i.stickyRowHeader === !0), e.setTableGroupable(i.groupable !== !1), e.setRowAdding(i.grid === !0 && i.onRowAdd !== void 0), e.manual && i.groupable === !0 && ve("manual-groupable", "`groupable` is passed over in manual mode: the groups would be the page's, not the server's.");
|
|
2502
|
-
const a =
|
|
2503
|
-
|
|
2506
|
+
const a = fe(null), [f, d] = Z(null);
|
|
2507
|
+
le(() => {
|
|
2504
2508
|
e.children = a.current, e.checkOrder(), e.commit();
|
|
2505
2509
|
});
|
|
2506
|
-
const m =
|
|
2507
|
-
return /* @__PURE__ */ u(
|
|
2510
|
+
const m = se(() => ({ registry: e, footerTarget: f }), [f]);
|
|
2511
|
+
return /* @__PURE__ */ u($t.Provider, { value: m, children: /* @__PURE__ */ T("div", { className: j(h.frame, i.className), children: [
|
|
2508
2512
|
/* @__PURE__ */ u("div", { ref: a, className: h.children, children: i.children }),
|
|
2509
|
-
/* @__PURE__ */ u(
|
|
2510
|
-
/* @__PURE__ */ u(
|
|
2513
|
+
/* @__PURE__ */ u(hl, { registry: e }),
|
|
2514
|
+
/* @__PURE__ */ u(pl, { registry: e, props: i }),
|
|
2511
2515
|
/* @__PURE__ */ u("div", { ref: d, className: h.footerTarget })
|
|
2512
2516
|
] }) });
|
|
2513
2517
|
}
|
|
2514
2518
|
const c = { Table: l, Column: t, RowDetail: n, RowActions: o, Action: r, GroupBy: s };
|
|
2515
|
-
return
|
|
2519
|
+
return Si(l, e), c;
|
|
2516
2520
|
}
|
|
2517
|
-
function
|
|
2518
|
-
return
|
|
2521
|
+
function hl({ registry: e }) {
|
|
2522
|
+
return yt(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ u(Zn, { registry: e, own: !0 });
|
|
2519
2523
|
}
|
|
2520
|
-
function
|
|
2521
|
-
var
|
|
2524
|
+
function pl({ registry: e, props: t }) {
|
|
2525
|
+
var $e, it, Oe;
|
|
2522
2526
|
const {
|
|
2523
2527
|
selectable: n = !1,
|
|
2524
2528
|
stickyHeader: o = !1,
|
|
@@ -2531,140 +2535,140 @@ function hl({ registry: e, props: t }) {
|
|
|
2531
2535
|
ariaLabel: f,
|
|
2532
2536
|
grid: d = !1
|
|
2533
2537
|
} = t;
|
|
2534
|
-
|
|
2535
|
-
const m =
|
|
2536
|
-
|
|
2538
|
+
yt(e.subscribe, e.bodyVersion, e.bodyVersion);
|
|
2539
|
+
const m = ke(), w = Ee(), g = zn(s, "regular"), v = Fe(), p = fe(null), [b, R] = Z(0), E = tl(), [y, _] = Z({ start: !0, end: !0 }), x = ($e = E.state.editing) == null ? void 0 : $e.line;
|
|
2540
|
+
le(() => {
|
|
2537
2541
|
const S = e.hook;
|
|
2538
|
-
!S || x === void 0 || x ===
|
|
2539
|
-
}),
|
|
2540
|
-
var
|
|
2542
|
+
!S || x === void 0 || x === Me || S.rows.some((z) => Ct(S.rowKey(z)) === x) || E.setState((z) => ({ ...z, editing: null }));
|
|
2543
|
+
}), le(() => {
|
|
2544
|
+
var de, $, me;
|
|
2541
2545
|
const S = p.current;
|
|
2542
2546
|
if (S != null && S.parentElement && !o && S.parentElement.style.removeProperty("scroll-padding-top"), !S || !o) return;
|
|
2543
|
-
const
|
|
2544
|
-
S.style.setProperty("--u-table-head", `${
|
|
2545
|
-
}),
|
|
2546
|
-
const S = e.takeFocusBeforeFold(),
|
|
2547
|
-
if (!S || !
|
|
2548
|
-
const
|
|
2549
|
-
for (let $ =
|
|
2550
|
-
const
|
|
2551
|
-
if (
|
|
2547
|
+
const z = ((de = S.tHead) == null ? void 0 : de.getBoundingClientRect().height) ?? 0, ue = (($ = S.querySelector("tr[data-line='header']")) == null ? void 0 : $.getBoundingClientRect().height) ?? 0;
|
|
2548
|
+
S.style.setProperty("--u-table-head", `${z}px`), S.style.setProperty("--u-table-group-header", `${ue}px`), (me = S.parentElement) == null || me.style.setProperty("scroll-padding-top", `${z}px`), S.parentElement && Cn(S.parentElement);
|
|
2549
|
+
}), le(() => {
|
|
2550
|
+
const S = e.takeFocusBeforeFold(), z = p.current;
|
|
2551
|
+
if (!S || !z || S.table !== z || S.element.isConnected) return;
|
|
2552
|
+
const ue = Array.from(z.querySelectorAll("[data-fold-path]")), de = JSON.parse(S.group);
|
|
2553
|
+
for (let $ = de.length; $ > 0; $--) {
|
|
2554
|
+
const me = JSON.stringify(de.slice(0, $)), ye = ue.find((Te) => Te.dataset.foldPath === me);
|
|
2555
|
+
if (ye) return ye.focus();
|
|
2552
2556
|
}
|
|
2553
2557
|
});
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2556
|
-
var
|
|
2557
|
-
const S = (
|
|
2558
|
+
const O = fe(null);
|
|
2559
|
+
le(() => {
|
|
2560
|
+
var de;
|
|
2561
|
+
const S = (de = p.current) == null ? void 0 : de.tBodies[0];
|
|
2558
2562
|
if (!S || !e.manual) return;
|
|
2559
2563
|
if (!i) {
|
|
2560
2564
|
const $ = S.querySelector(":scope > tr[data-motion]");
|
|
2561
|
-
$ && (
|
|
2565
|
+
$ && (O.current = Array.from($.cells, (me) => me.getBoundingClientRect().width));
|
|
2562
2566
|
return;
|
|
2563
2567
|
}
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
}),
|
|
2567
|
-
var
|
|
2568
|
+
const z = O.current, ue = S.rows[0];
|
|
2569
|
+
z && (ue == null ? void 0 : ue.cells.length) === z.length && Array.from(ue.cells).forEach(($, me) => $.style.width = `${z[me]}px`);
|
|
2570
|
+
}), qe(() => {
|
|
2571
|
+
var z, ue, de, $;
|
|
2568
2572
|
const S = p.current;
|
|
2569
|
-
if (!(!
|
|
2570
|
-
for (const
|
|
2571
|
-
if (
|
|
2572
|
-
const
|
|
2573
|
+
if (!(!on || !S))
|
|
2574
|
+
for (const me of Array.from(S.querySelectorAll(`tbody .${h.value}`))) {
|
|
2575
|
+
if (me.scrollHeight <= me.clientHeight + 1) continue;
|
|
2576
|
+
const ye = me.closest("td, th"), Te = ye != null && ye.parentElement ? Array.from(ye.parentElement.children).indexOf(ye) : -1, lt = (($ = (de = (ue = (z = S.tHead) == null ? void 0 : z.rows[0]) == null ? void 0 : ue.cells[Te]) == null ? void 0 : de.textContent) == null ? void 0 : $.trim()) || `column ${Te + 1}`;
|
|
2573
2577
|
ve(
|
|
2574
2578
|
`taller-than-a-row:${lt}`,
|
|
2575
2579
|
`a value in "${lt}" is taller than a row and is cut at its edge. A row's height never follows what it shows (ADR-0042): draw it with a small control, or show it whole in the row's detail.`
|
|
2576
2580
|
);
|
|
2577
2581
|
}
|
|
2578
|
-
}),
|
|
2579
|
-
var
|
|
2580
|
-
const S = (
|
|
2582
|
+
}), le(() => {
|
|
2583
|
+
var z, ue, de, $;
|
|
2584
|
+
const S = (de = (ue = (z = p.current) == null ? void 0 : z.tHead) == null ? void 0 : ue.rows[0]) == null ? void 0 : de.getBoundingClientRect().height;
|
|
2581
2585
|
S && (($ = e.hook) != null && $.companion.virtual) && e.hook.companion.setPitch(S);
|
|
2582
2586
|
});
|
|
2583
2587
|
const I = e.hook && !e.hook.companion.virtual ? e.hook.publicSnapshot : null;
|
|
2584
|
-
|
|
2588
|
+
ji(p, I ? `${I.grouping.join("|")}#${I.folded.join("|")}` : "");
|
|
2585
2589
|
const A = e.hook;
|
|
2586
2590
|
if (!A) return null;
|
|
2587
|
-
const
|
|
2591
|
+
const M = A.publicSnapshot, D = e.projection(), L = e.rowHeader(), B = Yn(e), H = e.detail, J = e.hasRowActions() ? e.actions.ordered() : [], G = A.companion.virtual, ae = M.grouping, ne = ae.length > 0 ? D.visibleLines : void 0, Re = ne ? e.groupingEntries(A.rows) : [], k = (S) => Re.find((z) => z.spec.id === S), C = ne && ae.length > 1 ? k(ae.at(-1)) : void 0, N = ne ? B.filter((S) => !ae.includes(S.spec.id)) : B, K = D.entries;
|
|
2588
2592
|
let W;
|
|
2589
|
-
if (
|
|
2590
|
-
const S = /* @__PURE__ */ new Map(),
|
|
2591
|
-
|
|
2592
|
-
var
|
|
2593
|
-
S.set($.key, $),
|
|
2593
|
+
if (K) {
|
|
2594
|
+
const S = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Set(), de = [];
|
|
2595
|
+
K.forEach(($, me) => {
|
|
2596
|
+
var ye;
|
|
2597
|
+
S.set($.key, $), de.length = $.level, z.set($.key, de.at(-1)), de.push($.key), ((ye = K[me + 1]) == null ? void 0 : ye.level) === 0 && ue.add($.key);
|
|
2594
2598
|
}), W = {
|
|
2595
2599
|
column: N[0],
|
|
2596
2600
|
entry: ($) => S.get(A.rowKey($)),
|
|
2597
|
-
beforeRoot: ($) =>
|
|
2598
|
-
parent: ($) =>
|
|
2601
|
+
beforeRoot: ($) => ue.has($),
|
|
2602
|
+
parent: ($) => z.get($),
|
|
2599
2603
|
/* Against the open branches, not against what is shown: a branch open
|
|
2600
2604
|
only on the way to a match is not open, and folding it must not
|
|
2601
2605
|
open it once the search is gone. */
|
|
2602
|
-
set: ($,
|
|
2603
|
-
|
|
2606
|
+
set: ($, me) => {
|
|
2607
|
+
M.branches.includes($) !== me && M.toggleBranch($);
|
|
2604
2608
|
},
|
|
2605
2609
|
/* Alt on a fold acts on the branch and its siblings, as on a group header. */
|
|
2606
|
-
siblings: ($,
|
|
2607
|
-
const
|
|
2608
|
-
for (const
|
|
2609
|
-
|
|
2610
|
+
siblings: ($, me) => {
|
|
2611
|
+
const ye = z.get($);
|
|
2612
|
+
for (const Te of K)
|
|
2613
|
+
z.get(Te.key) === ye && Te.branch && !Te.empty && M.branches.includes(Te.key) !== me && M.toggleBranch(Te.key);
|
|
2610
2614
|
}
|
|
2611
2615
|
};
|
|
2612
2616
|
}
|
|
2613
|
-
const
|
|
2614
|
-
start:
|
|
2615
|
-
end:
|
|
2617
|
+
const oe = H !== null && !K, P = (n ? 1 : 0) + (oe ? 1 : 0), ce = P + (C ? 1 : 0), q = d && t.editMode === "row", he = d && (q || t.onRowAdd !== void 0 || t.onRowDelete !== void 0), Y = J.length > 0 || he, te = ce + N.length + (Y ? 1 : 0), Ne = e.pins(), Pe = N.filter((S) => Ne[S.spec.id] === "start").length, Le = N.filter((S) => Ne[S.spec.id] === "end").length, Ye = C !== void 0 && Ne[C.spec.id] === "start", V = ((it = E.state.editing) == null ? void 0 : it.row) === !0, X = J.length > 0 || t.onRowDelete !== void 0 || V, re = e.actionsPinned() ? X : V && he, we = {
|
|
2618
|
+
start: Pe > 0 || Ye ? ce + Pe : 0,
|
|
2619
|
+
end: Le > 0 ? Le + (Y ? 1 : 0) : Y && re ? 1 : 0,
|
|
2616
2620
|
count: te
|
|
2617
|
-
},
|
|
2618
|
-
start: y.start ?
|
|
2619
|
-
end: y.end || V &&
|
|
2621
|
+
}, pe = {
|
|
2622
|
+
start: y.start ? we.start : 0,
|
|
2623
|
+
end: y.end || V && he ? we.end : 0,
|
|
2620
2624
|
count: te
|
|
2621
|
-
},
|
|
2622
|
-
layout: { controls:
|
|
2623
|
-
body: i ? { rows: [] } :
|
|
2625
|
+
}, be = (S, z = S) => rn(pe, S, z), Ke = D.visible, rt = !i && !M.manual && N.some((S) => S.spec.aggregate), At = M.search !== "" || Object.keys(M.filter).length > 0, He = d ? Ui({
|
|
2626
|
+
layout: { controls: P, span: C !== void 0, aggregates: N.map((S) => S.spec.aggregate !== void 0), actions: Y, blocks: pe },
|
|
2627
|
+
body: i ? { rows: [] } : ne ? { lines: G ? D.lines : ne } : { rows: G ? D.shown ?? D.filtered : Ke },
|
|
2624
2628
|
rowKey: A.rowKey,
|
|
2625
|
-
expanded: H ?
|
|
2626
|
-
foot:
|
|
2627
|
-
}) : [],
|
|
2628
|
-
|
|
2629
|
-
const
|
|
2629
|
+
expanded: H ? yl(e, M, D.shown ?? D.filtered, A.rowKey, W) : /* @__PURE__ */ new Set(),
|
|
2630
|
+
foot: rt
|
|
2631
|
+
}) : [], je = ((Oe = E.state.editing) == null ? void 0 : Oe.line) === Me ? E.state.editing : null;
|
|
2632
|
+
je && He[0] && He.splice(1, 0, { key: Me, cells: He[0].cells, at: -1, row: je.fresh });
|
|
2633
|
+
const Je = [
|
|
2630
2634
|
...n ? ["#select"] : [],
|
|
2631
|
-
...
|
|
2635
|
+
...oe ? ["#detail"] : [],
|
|
2632
2636
|
...C ? ["#span"] : [],
|
|
2633
2637
|
...N.map((S) => S.spec.id),
|
|
2634
|
-
...
|
|
2635
|
-
],
|
|
2638
|
+
...Y ? ["#actions"] : []
|
|
2639
|
+
], ie = d ? ll({
|
|
2636
2640
|
grid: E,
|
|
2637
|
-
lines:
|
|
2638
|
-
ids:
|
|
2639
|
-
columnById: (S) => N.find((
|
|
2641
|
+
lines: He,
|
|
2642
|
+
ids: Je,
|
|
2643
|
+
columnById: (S) => N.find((z) => z.spec.id === S),
|
|
2640
2644
|
rowKey: A.rowKey,
|
|
2641
|
-
virtual:
|
|
2645
|
+
virtual: G,
|
|
2642
2646
|
onCellEdit: t.onCellEdit,
|
|
2643
2647
|
rowMode: q,
|
|
2644
2648
|
onRowSave: t.onRowSave,
|
|
2645
2649
|
onRowAdd: t.onRowAdd,
|
|
2646
2650
|
newRow: t.newRow,
|
|
2647
2651
|
onRowDelete: t.onRowDelete,
|
|
2648
|
-
select: n ? (S) =>
|
|
2652
|
+
select: n ? (S) => M.selection.toggle(A.rowKey(S)) : void 0
|
|
2649
2653
|
}) : void 0;
|
|
2650
|
-
e.setAddRow((
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2654
|
+
e.setAddRow((ie == null ? void 0 : ie.addRow) ?? null);
|
|
2655
|
+
const Xe = (S) => d ? S : void 0, We = (S, z, ue, de) => /* @__PURE__ */ u(
|
|
2656
|
+
Nn,
|
|
2653
2657
|
{
|
|
2654
2658
|
row: S,
|
|
2655
|
-
index:
|
|
2656
|
-
absolute:
|
|
2659
|
+
index: z,
|
|
2660
|
+
absolute: G ? ue : void 0,
|
|
2657
2661
|
registry: e,
|
|
2658
2662
|
hook: A,
|
|
2659
2663
|
columns: N,
|
|
2660
|
-
line:
|
|
2664
|
+
line: de,
|
|
2661
2665
|
tree: W,
|
|
2662
2666
|
spanEntry: C,
|
|
2663
|
-
header:
|
|
2667
|
+
header: L,
|
|
2664
2668
|
selectable: n,
|
|
2665
2669
|
actions: J,
|
|
2666
|
-
trailing:
|
|
2667
|
-
blocks:
|
|
2670
|
+
trailing: Y,
|
|
2671
|
+
blocks: pe,
|
|
2668
2672
|
columnCount: te,
|
|
2669
2673
|
rowProps: a,
|
|
2670
2674
|
baseId: v,
|
|
@@ -2673,10 +2677,10 @@ function hl({ registry: e, props: t }) {
|
|
|
2673
2677
|
grid: d
|
|
2674
2678
|
},
|
|
2675
2679
|
A.rowKey(S)
|
|
2676
|
-
),
|
|
2677
|
-
|
|
2680
|
+
), mt = je && /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u(
|
|
2681
|
+
Nn,
|
|
2678
2682
|
{
|
|
2679
|
-
row:
|
|
2683
|
+
row: je.fresh,
|
|
2680
2684
|
fresh: !0,
|
|
2681
2685
|
index: -1,
|
|
2682
2686
|
absolute: void 0,
|
|
@@ -2684,11 +2688,11 @@ function hl({ registry: e, props: t }) {
|
|
|
2684
2688
|
hook: A,
|
|
2685
2689
|
columns: N,
|
|
2686
2690
|
spanEntry: C,
|
|
2687
|
-
header:
|
|
2691
|
+
header: L,
|
|
2688
2692
|
selectable: n,
|
|
2689
2693
|
actions: J,
|
|
2690
|
-
trailing:
|
|
2691
|
-
blocks:
|
|
2694
|
+
trailing: Y,
|
|
2695
|
+
blocks: pe,
|
|
2692
2696
|
columnCount: te,
|
|
2693
2697
|
rowProps: void 0,
|
|
2694
2698
|
baseId: v,
|
|
@@ -2696,78 +2700,78 @@ function hl({ registry: e, props: t }) {
|
|
|
2696
2700
|
wording: m,
|
|
2697
2701
|
grid: !0
|
|
2698
2702
|
},
|
|
2699
|
-
|
|
2700
|
-
) }),
|
|
2701
|
-
|
|
2702
|
-
const
|
|
2703
|
-
let
|
|
2704
|
-
if (i && !
|
|
2705
|
-
|
|
2706
|
-
|
|
2703
|
+
Me
|
|
2704
|
+
) }), Ae = (e.paginates() || M.manual) && !G ? M.pageSize : 0, ze = ne ? ne.length : Ke.length, Qe = Ae && !i ? Math.min(ze, Ae) : 0;
|
|
2705
|
+
Qe > b && R(Qe);
|
|
2706
|
+
const Ie = Math.min(Math.max(Qe, b, M.pageCount > 1 ? Ae : 0), Ae), st = Ae && ze > 0 && ze < Ie ? /* @__PURE__ */ u(qt, { height: `calc(var(--_pitch) * ${Ie - ze})`, colSpan: te }) : null, F = i && ze > 0;
|
|
2707
|
+
let U, Q = null;
|
|
2708
|
+
if (i && !F)
|
|
2709
|
+
U = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u(
|
|
2710
|
+
xl,
|
|
2707
2711
|
{
|
|
2708
2712
|
columns: te,
|
|
2709
|
-
rows:
|
|
2713
|
+
rows: Ae ? Ie || Ae : void 0,
|
|
2710
2714
|
rightAligned: [
|
|
2711
|
-
...Array.from({ length:
|
|
2712
|
-
...N.map((S) =>
|
|
2715
|
+
...Array.from({ length: P + (C ? 1 : 0) }, () => !1),
|
|
2716
|
+
...N.map((S) => Jt(e.kindOf(S, A.rows), S.spec.rightAligned))
|
|
2713
2717
|
]
|
|
2714
2718
|
}
|
|
2715
2719
|
) });
|
|
2716
2720
|
else if (D.filtered.length === 0)
|
|
2717
|
-
|
|
2721
|
+
U = Q = /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u("tr", { "data-grid-line": Xe("empty"), children: /* @__PURE__ */ u(
|
|
2718
2722
|
"td",
|
|
2719
2723
|
{
|
|
2720
2724
|
colSpan: te,
|
|
2721
2725
|
className: h.emptyCell,
|
|
2722
|
-
style:
|
|
2723
|
-
children: /* @__PURE__ */ u("div", { className: h.empty, children: (
|
|
2726
|
+
style: Ae && Ie ? { height: `calc(var(--_pitch) * ${Ie})`, verticalAlign: "top" } : void 0,
|
|
2727
|
+
children: /* @__PURE__ */ u("div", { className: h.empty, children: (M.manual || A.admitted.length > 0) && At ? /* @__PURE__ */ T(Se, { children: [
|
|
2724
2728
|
/* @__PURE__ */ u("p", { className: h.emptyTitle, children: m.nothingMatchesFilters }),
|
|
2725
|
-
/* @__PURE__ */ u(
|
|
2729
|
+
/* @__PURE__ */ u(ge, { size: "sm", variant: "ghost", onClick: () => Jn(M), children: m.resetAll })
|
|
2726
2730
|
] }) : c ?? /* @__PURE__ */ u("p", { className: h.emptyTitle, children: m.noEntries }) })
|
|
2727
2731
|
}
|
|
2728
2732
|
) }) });
|
|
2729
|
-
else if (
|
|
2730
|
-
const S =
|
|
2731
|
-
var lt,
|
|
2732
|
-
const
|
|
2733
|
-
return
|
|
2734
|
-
|
|
2733
|
+
else if (ne) {
|
|
2734
|
+
const S = G ? Gn(ne).map(($) => $.kind === "folded" || !$.continued ? $ : { ...$, continued: !1 }) : ne, z = S.length - ne.length, ue = G && G.from > 0 ? G.fillerBefore / G.from : 0, de = ($, me) => {
|
|
2735
|
+
var lt, cn;
|
|
2736
|
+
const ye = me - z, Te = G ? G.from + ye : ye;
|
|
2737
|
+
return ye < 0 ? $.kind === "row" ? null : /* @__PURE__ */ u(
|
|
2738
|
+
kn,
|
|
2735
2739
|
{
|
|
2736
2740
|
line: $,
|
|
2737
|
-
index:
|
|
2741
|
+
index: me,
|
|
2738
2742
|
absolute: void 0,
|
|
2739
2743
|
spanEntry: C,
|
|
2740
|
-
levelEntry: k(
|
|
2744
|
+
levelEntry: k(ae[$.group.level]),
|
|
2741
2745
|
columns: N,
|
|
2742
|
-
controlColumns:
|
|
2743
|
-
blocks:
|
|
2746
|
+
controlColumns: P,
|
|
2747
|
+
blocks: pe,
|
|
2744
2748
|
selectable: n,
|
|
2745
|
-
hasActions:
|
|
2749
|
+
hasActions: Y,
|
|
2746
2750
|
total: D.filtered,
|
|
2747
2751
|
siblings: ((lt = $.parents.at(-1)) == null ? void 0 : lt.groups) ?? D.groups ?? [],
|
|
2748
|
-
depth:
|
|
2752
|
+
depth: ae.length,
|
|
2749
2753
|
grid: d,
|
|
2750
2754
|
hook: A,
|
|
2751
2755
|
formats: w,
|
|
2752
2756
|
wording: m
|
|
2753
2757
|
},
|
|
2754
2758
|
`${$.kind}:${$.group.path}:repeated`
|
|
2755
|
-
) : $.kind === "row" ?
|
|
2756
|
-
|
|
2759
|
+
) : $.kind === "row" ? We($.row, ye, Te, $) : /* @__PURE__ */ u(
|
|
2760
|
+
kn,
|
|
2757
2761
|
{
|
|
2758
2762
|
line: $,
|
|
2759
|
-
index:
|
|
2760
|
-
absolute:
|
|
2763
|
+
index: ye,
|
|
2764
|
+
absolute: G ? Te : void 0,
|
|
2761
2765
|
spanEntry: C,
|
|
2762
|
-
levelEntry: k(
|
|
2766
|
+
levelEntry: k(ae[$.group.level]),
|
|
2763
2767
|
columns: N,
|
|
2764
|
-
controlColumns:
|
|
2765
|
-
blocks:
|
|
2768
|
+
controlColumns: P,
|
|
2769
|
+
blocks: pe,
|
|
2766
2770
|
selectable: n,
|
|
2767
|
-
hasActions:
|
|
2771
|
+
hasActions: Y,
|
|
2768
2772
|
total: D.filtered,
|
|
2769
|
-
siblings: ((
|
|
2770
|
-
depth:
|
|
2773
|
+
siblings: ((cn = $.parents.at(-1)) == null ? void 0 : cn.groups) ?? D.groups ?? [],
|
|
2774
|
+
depth: ae.length,
|
|
2771
2775
|
grid: d,
|
|
2772
2776
|
hook: A,
|
|
2773
2777
|
formats: w,
|
|
@@ -2776,48 +2780,48 @@ function hl({ registry: e, props: t }) {
|
|
|
2776
2780
|
`${$.kind}:${$.group.path}${$.kind === "header" && $.continued ? ":continued" : ""}`
|
|
2777
2781
|
);
|
|
2778
2782
|
};
|
|
2779
|
-
|
|
2780
|
-
|
|
2783
|
+
U = G ? /* @__PURE__ */ u(
|
|
2784
|
+
Rn,
|
|
2781
2785
|
{
|
|
2782
|
-
virtual: { ...
|
|
2786
|
+
virtual: { ...G, fillerBefore: Math.max(0, G.fillerBefore - z * ue) },
|
|
2783
2787
|
colSpan: te,
|
|
2784
|
-
children: S.map(
|
|
2788
|
+
children: S.map(de)
|
|
2785
2789
|
}
|
|
2786
2790
|
) : /* @__PURE__ */ T("tbody", { children: [
|
|
2787
|
-
|
|
2788
|
-
|
|
2791
|
+
ne.map(de),
|
|
2792
|
+
st
|
|
2789
2793
|
] });
|
|
2790
|
-
} else
|
|
2791
|
-
|
|
2792
|
-
|
|
2794
|
+
} else G ? U = /* @__PURE__ */ u(Rn, { virtual: G, colSpan: te, children: Ke.map((S, z) => We(S, z, G.from + z)) }) : U = /* @__PURE__ */ T("tbody", { children: [
|
|
2795
|
+
Ke.map((S, z) => We(S, z, z)),
|
|
2796
|
+
st
|
|
2793
2797
|
] });
|
|
2794
|
-
return /* @__PURE__ */ T(
|
|
2798
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
2795
2799
|
/* @__PURE__ */ T(
|
|
2796
2800
|
"div",
|
|
2797
2801
|
{
|
|
2798
|
-
ref:
|
|
2802
|
+
ref: G == null ? void 0 : G.scrollRef,
|
|
2799
2803
|
onScroll: (S) => {
|
|
2800
|
-
|
|
2804
|
+
G == null || G.onScroll(), ne && o && Cn(S.currentTarget), (pe.start || pe.end) && ao(S.currentTarget), Wt(S.currentTarget, pe);
|
|
2801
2805
|
},
|
|
2802
2806
|
className: h.scroll,
|
|
2803
2807
|
style: l ? { maxHeight: l } : void 0,
|
|
2804
2808
|
children: [
|
|
2805
|
-
/* @__PURE__ */ u(
|
|
2809
|
+
/* @__PURE__ */ u(Dn, { size: "sm", children: /* @__PURE__ */ T(
|
|
2806
2810
|
"table",
|
|
2807
2811
|
{
|
|
2808
2812
|
ref: p,
|
|
2809
|
-
role:
|
|
2813
|
+
role: ne || K ? "treegrid" : d ? "grid" : void 0,
|
|
2810
2814
|
"aria-readonly": d && !N.some((S) => S.spec.edit !== void 0) ? !0 : void 0,
|
|
2811
|
-
onKeyDown:
|
|
2812
|
-
onFocus:
|
|
2813
|
-
onClick:
|
|
2814
|
-
onBlur:
|
|
2815
|
-
"data-depth":
|
|
2816
|
-
style:
|
|
2815
|
+
onKeyDown: ie == null ? void 0 : ie.onKeyDown,
|
|
2816
|
+
onFocus: ie == null ? void 0 : ie.onFocus,
|
|
2817
|
+
onClick: ie == null ? void 0 : ie.onClick,
|
|
2818
|
+
onBlur: ie == null ? void 0 : ie.onBlur,
|
|
2819
|
+
"data-depth": ne ? ae.length : void 0,
|
|
2820
|
+
style: ne ? { "--u-header-levels": ae.length - 1 } : void 0,
|
|
2817
2821
|
"aria-label": f,
|
|
2818
|
-
"aria-rowcount":
|
|
2822
|
+
"aria-rowcount": G ? (D.lines ?? D.shown ?? D.filtered).length + 1 + (rt ? 1 : 0) : void 0,
|
|
2819
2823
|
"aria-busy": i || void 0,
|
|
2820
|
-
"data-stale":
|
|
2824
|
+
"data-stale": F || void 0,
|
|
2821
2825
|
className: j(
|
|
2822
2826
|
h.table,
|
|
2823
2827
|
g === "compact" && h.compact,
|
|
@@ -2826,108 +2830,108 @@ function hl({ registry: e, props: t }) {
|
|
|
2826
2830
|
d && h.grid
|
|
2827
2831
|
),
|
|
2828
2832
|
children: [
|
|
2829
|
-
/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ T("tr", { "aria-rowindex":
|
|
2830
|
-
n && /* @__PURE__ */ u("th", { scope: "col", className: j(h.th, h.control,
|
|
2831
|
-
|
|
2833
|
+
/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": G ? 1 : void 0, "data-grid-line": Xe("head"), children: [
|
|
2834
|
+
n && /* @__PURE__ */ u("th", { scope: "col", className: j(h.th, h.control, be(0).className), style: be(0).style, children: /* @__PURE__ */ u(
|
|
2835
|
+
tt,
|
|
2832
2836
|
{
|
|
2833
|
-
"aria-label":
|
|
2834
|
-
checked:
|
|
2835
|
-
indeterminate:
|
|
2836
|
-
onChange:
|
|
2837
|
+
"aria-label": M.manual ? m.selectAllOnPage : m.selectAllRows,
|
|
2838
|
+
checked: M.selection.allSelected,
|
|
2839
|
+
indeterminate: M.selection.someSelected,
|
|
2840
|
+
onChange: M.selection.toggleAll
|
|
2837
2841
|
}
|
|
2838
2842
|
) }),
|
|
2839
|
-
|
|
2843
|
+
oe && /* @__PURE__ */ u(
|
|
2840
2844
|
"td",
|
|
2841
2845
|
{
|
|
2842
|
-
className: j(h.th, h.control,
|
|
2843
|
-
style:
|
|
2846
|
+
className: j(h.th, h.control, be(P - 1).className),
|
|
2847
|
+
style: be(P - 1).style
|
|
2844
2848
|
}
|
|
2845
2849
|
),
|
|
2846
|
-
C && (e.columnById(C.spec.id) === C ? /* @__PURE__ */ u(
|
|
2847
|
-
N.map((S,
|
|
2848
|
-
|
|
2850
|
+
C && (e.columnById(C.spec.id) === C ? /* @__PURE__ */ u(xn, { entry: C, registry: e, hook: A, pin: be(P) }) : /* @__PURE__ */ u("th", { scope: "col", className: j(h.th, be(P).className), style: be(P).style, children: C.spec.label })),
|
|
2851
|
+
N.map((S, z) => /* @__PURE__ */ u(xn, { entry: S, registry: e, hook: A, pin: be(ce + z) }, S.key)),
|
|
2852
|
+
Y && /* @__PURE__ */ T(
|
|
2849
2853
|
"th",
|
|
2850
2854
|
{
|
|
2851
2855
|
scope: "col",
|
|
2852
|
-
className: j(h.th, h.actionsCell,
|
|
2853
|
-
style:
|
|
2856
|
+
className: j(h.th, h.actionsCell, be(te - 1).className),
|
|
2857
|
+
style: be(te - 1).style,
|
|
2854
2858
|
children: [
|
|
2855
|
-
/* @__PURE__ */ u(
|
|
2856
|
-
|
|
2859
|
+
/* @__PURE__ */ u(Ge, { children: m.rowActions }),
|
|
2860
|
+
he && /* @__PURE__ */ T("span", { className: h.reserve, "aria-hidden": "true", children: [
|
|
2857
2861
|
(q || t.onRowAdd) && /* @__PURE__ */ T("span", { className: j(h.actions, h.decision), children: [
|
|
2858
|
-
/* @__PURE__ */ u(
|
|
2859
|
-
/* @__PURE__ */ u(
|
|
2862
|
+
/* @__PURE__ */ u(ge, { tabIndex: -1, size: "sm", children: m.saveRow }),
|
|
2863
|
+
/* @__PURE__ */ u(ge, { tabIndex: -1, size: "sm", children: m.discardRow })
|
|
2860
2864
|
] }),
|
|
2861
2865
|
t.onRowDelete && /* @__PURE__ */ T("span", { className: j(h.actions, h.decision), children: [
|
|
2862
2866
|
/* @__PURE__ */ u("span", { className: h.deleteAsk, children: m.deleteRowAsk }),
|
|
2863
|
-
/* @__PURE__ */ u(
|
|
2864
|
-
/* @__PURE__ */ u(
|
|
2867
|
+
/* @__PURE__ */ u(ge, { tabIndex: -1, size: "sm", children: m.deleteRow }),
|
|
2868
|
+
/* @__PURE__ */ u(ge, { tabIndex: -1, size: "sm", children: m.keepRow })
|
|
2865
2869
|
] })
|
|
2866
2870
|
] })
|
|
2867
2871
|
]
|
|
2868
2872
|
}
|
|
2869
2873
|
)
|
|
2870
2874
|
] }) }),
|
|
2871
|
-
/* @__PURE__ */ T(
|
|
2872
|
-
|
|
2873
|
-
|
|
2875
|
+
/* @__PURE__ */ T(ot.Provider, { value: ie ? { ...ie.context, hook: A, wording: m } : null, children: [
|
|
2876
|
+
mt,
|
|
2877
|
+
U
|
|
2874
2878
|
] }),
|
|
2875
|
-
|
|
2876
|
-
Array.from({ length:
|
|
2877
|
-
C && /* @__PURE__ */ u("td", { className: j(h.td,
|
|
2878
|
-
N.map((S,
|
|
2879
|
-
|
|
2879
|
+
rt && /* @__PURE__ */ u("tfoot", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": G ? (D.lines ?? D.shown ?? D.filtered).length + 2 : void 0, "data-grid-line": Xe("foot"), children: [
|
|
2880
|
+
Array.from({ length: P }, (S, z) => /* @__PURE__ */ u("td", { className: j(h.td, h.control, be(z).className), style: be(z).style }, z)),
|
|
2881
|
+
C && /* @__PURE__ */ u("td", { className: j(h.td, be(P).className), style: be(P).style }),
|
|
2882
|
+
N.map((S, z) => /* @__PURE__ */ u(
|
|
2883
|
+
kl,
|
|
2880
2884
|
{
|
|
2881
2885
|
entry: S,
|
|
2882
2886
|
rows: D.roots ?? D.filtered,
|
|
2883
2887
|
topLevel: D.roots !== void 0,
|
|
2884
2888
|
formats: w,
|
|
2885
2889
|
wording: m,
|
|
2886
|
-
pin:
|
|
2890
|
+
pin: be(ce + z)
|
|
2887
2891
|
},
|
|
2888
2892
|
S.key
|
|
2889
2893
|
)),
|
|
2890
|
-
|
|
2894
|
+
Y && /* @__PURE__ */ u("td", { className: j(h.td, be(te - 1).className), style: be(te - 1).style })
|
|
2891
2895
|
] }) })
|
|
2892
2896
|
]
|
|
2893
2897
|
}
|
|
2894
2898
|
) }),
|
|
2895
|
-
|
|
2896
|
-
/* @__PURE__ */ u(
|
|
2897
|
-
/* @__PURE__ */ u(
|
|
2899
|
+
U === Q && /* @__PURE__ */ u(gl, { table: p }),
|
|
2900
|
+
/* @__PURE__ */ u(vl, { table: p, blocks: pe }),
|
|
2901
|
+
/* @__PURE__ */ u(bl, { table: p }),
|
|
2898
2902
|
/* @__PURE__ */ u(
|
|
2899
|
-
|
|
2903
|
+
ml,
|
|
2900
2904
|
{
|
|
2901
2905
|
table: p,
|
|
2902
|
-
blocks:
|
|
2903
|
-
onSticking: (S) => _((
|
|
2904
|
-
pinnedKeys: N.filter((S) =>
|
|
2906
|
+
blocks: we,
|
|
2907
|
+
onSticking: (S) => _((z) => z.start === S.start && z.end === S.end ? z : S),
|
|
2908
|
+
pinnedKeys: N.filter((S) => Ne[S.spec.id]).map((S) => S.key).join("|")
|
|
2905
2909
|
}
|
|
2906
2910
|
),
|
|
2907
2911
|
d && /* @__PURE__ */ u(
|
|
2908
|
-
|
|
2912
|
+
rl,
|
|
2909
2913
|
{
|
|
2910
2914
|
table: p,
|
|
2911
2915
|
grid: E,
|
|
2912
|
-
lines:
|
|
2913
|
-
ids:
|
|
2914
|
-
editable: N.some((S) => S.spec.edit !== void 0) ?
|
|
2915
|
-
outside:
|
|
2916
|
+
lines: He,
|
|
2917
|
+
ids: Je,
|
|
2918
|
+
editable: N.some((S) => S.spec.edit !== void 0) ? ie == null ? void 0 : ie.editable : void 0,
|
|
2919
|
+
outside: ie == null ? void 0 : ie.outside
|
|
2916
2920
|
}
|
|
2917
2921
|
)
|
|
2918
2922
|
]
|
|
2919
2923
|
}
|
|
2920
2924
|
),
|
|
2921
|
-
e.rowAdding && !e.showsToolbar() && /* @__PURE__ */ u("div", { className: h.newRowBar, children: /* @__PURE__ */ u(
|
|
2925
|
+
e.rowAdding && !e.showsToolbar() && /* @__PURE__ */ u("div", { className: h.newRowBar, children: /* @__PURE__ */ u(Qn, { registry: e }) })
|
|
2922
2926
|
] });
|
|
2923
2927
|
}
|
|
2924
|
-
function
|
|
2928
|
+
function ml({
|
|
2925
2929
|
table: e,
|
|
2926
2930
|
blocks: t,
|
|
2927
2931
|
onSticking: n,
|
|
2928
2932
|
pinnedKeys: o
|
|
2929
2933
|
}) {
|
|
2930
|
-
const { start: r, end: s } = t, l =
|
|
2934
|
+
const { start: r, end: s } = t, l = fe({
|
|
2931
2935
|
key: "",
|
|
2932
2936
|
sticking: { start: !0, end: !0 }
|
|
2933
2937
|
}), c = () => {
|
|
@@ -2945,10 +2949,10 @@ function pl({
|
|
|
2945
2949
|
l.current.key !== w && (l.current = { key: w, sticking: l.current.sticking });
|
|
2946
2950
|
const g = l.current;
|
|
2947
2951
|
g.sticking.start && (g.start = d), g.sticking.end && (g.end = m);
|
|
2948
|
-
const v =
|
|
2949
|
-
g.sticking = v, n(v), v.start || (d = 0), v.end || (m = 0), i.style.setProperty("--u-table-pin-start", `${d}px`), i.style.setProperty("--u-table-pin-end", `${m}px`), d && a.style.setProperty("scroll-padding-left", `${d}px`), m && a.style.setProperty("scroll-padding-right", `${m}px`),
|
|
2952
|
+
const v = Yo(g.start ?? d, g.end ?? m, a.clientWidth);
|
|
2953
|
+
g.sticking = v, n(v), v.start || (d = 0), v.end || (m = 0), i.style.setProperty("--u-table-pin-start", `${d}px`), i.style.setProperty("--u-table-pin-end", `${m}px`), d && a.style.setProperty("scroll-padding-left", `${d}px`), m && a.style.setProperty("scroll-padding-right", `${m}px`), ao(a);
|
|
2950
2954
|
};
|
|
2951
|
-
return
|
|
2955
|
+
return le(c), qe(() => {
|
|
2952
2956
|
var d, m;
|
|
2953
2957
|
const i = e.current;
|
|
2954
2958
|
if (!i || !r && !s || typeof ResizeObserver > "u") return;
|
|
@@ -2957,8 +2961,8 @@ function pl({
|
|
|
2957
2961
|
return i.parentElement && a.observe(i.parentElement), () => a.disconnect();
|
|
2958
2962
|
}, [e, r, s, t.count, o]), null;
|
|
2959
2963
|
}
|
|
2960
|
-
function
|
|
2961
|
-
return
|
|
2964
|
+
function gl({ table: e }) {
|
|
2965
|
+
return le(() => {
|
|
2962
2966
|
var r;
|
|
2963
2967
|
const t = (r = e.current) == null ? void 0 : r.parentElement;
|
|
2964
2968
|
if (!t) return;
|
|
@@ -2968,9 +2972,9 @@ function ml({ table: e }) {
|
|
|
2968
2972
|
return o.observe(t), () => o.disconnect();
|
|
2969
2973
|
}, [e]), null;
|
|
2970
2974
|
}
|
|
2971
|
-
function
|
|
2972
|
-
const [t, n] = Z(null), o =
|
|
2973
|
-
return
|
|
2975
|
+
function bl({ table: e }) {
|
|
2976
|
+
const [t, n] = Z(null), o = ko(), r = fe(null);
|
|
2977
|
+
return qe(() => {
|
|
2974
2978
|
const s = e.current;
|
|
2975
2979
|
if (!s) return;
|
|
2976
2980
|
let l;
|
|
@@ -2988,88 +2992,88 @@ function gl({ table: e }) {
|
|
|
2988
2992
|
return s.addEventListener("pointerover", a), s.addEventListener("pointerleave", c), s.addEventListener("focusin", f), s.addEventListener("focusout", c), document.addEventListener("keydown", d), window.addEventListener("scroll", c, !0), () => {
|
|
2989
2993
|
clearTimeout(l), s.removeEventListener("pointerover", a), s.removeEventListener("pointerleave", c), s.removeEventListener("focusin", f), s.removeEventListener("focusout", c), document.removeEventListener("keydown", d), window.removeEventListener("scroll", c, !0);
|
|
2990
2994
|
};
|
|
2991
|
-
}, [e, o]),
|
|
2995
|
+
}, [e, o]), le(() => {
|
|
2992
2996
|
const s = r.current;
|
|
2993
2997
|
if (!t || !s) return;
|
|
2994
2998
|
const l = 4, c = t.cell.bottom + l + s.offsetHeight <= window.innerHeight;
|
|
2995
2999
|
s.style.top = `${c ? t.cell.bottom + l : t.cell.top - l - s.offsetHeight}px`, s.style.left = `${Math.max(8, Math.min(t.cell.left, window.innerWidth - 8 - s.offsetWidth))}px`, s.style.visibility = "";
|
|
2996
|
-
}, [t]), t ?
|
|
3000
|
+
}, [t]), t ? In(
|
|
2997
3001
|
/* @__PURE__ */ u("div", { ref: r, role: "tooltip", className: h.cutTip, style: { visibility: "hidden", top: 0, left: 0 }, children: t.text }),
|
|
2998
3002
|
t.target
|
|
2999
3003
|
) : null;
|
|
3000
3004
|
}
|
|
3001
|
-
function
|
|
3002
|
-
const n =
|
|
3003
|
-
return
|
|
3005
|
+
function vl({ table: e, blocks: t }) {
|
|
3006
|
+
const n = fe(t);
|
|
3007
|
+
return le(() => {
|
|
3004
3008
|
var r;
|
|
3005
3009
|
n.current = t;
|
|
3006
3010
|
const o = (r = e.current) == null ? void 0 : r.parentElement;
|
|
3007
|
-
o &&
|
|
3008
|
-
}),
|
|
3011
|
+
o && Wt(o, t);
|
|
3012
|
+
}), qe(() => {
|
|
3009
3013
|
const o = e.current, r = o == null ? void 0 : o.parentElement;
|
|
3010
3014
|
if (!o || !r || typeof ResizeObserver > "u") return;
|
|
3011
|
-
const s = new ResizeObserver(() =>
|
|
3015
|
+
const s = new ResizeObserver(() => Wt(r, n.current));
|
|
3012
3016
|
return s.observe(r), s.observe(o), () => s.disconnect();
|
|
3013
3017
|
}, [e]), null;
|
|
3014
3018
|
}
|
|
3015
|
-
function
|
|
3019
|
+
function Wt(e, t) {
|
|
3016
3020
|
const n = e.scrollWidth - e.clientWidth;
|
|
3017
3021
|
e.toggleAttribute("data-beyond-start", !t.start && e.scrollLeft > 0.5), e.toggleAttribute("data-beyond-end", !t.end && e.scrollLeft < n - 0.5);
|
|
3018
3022
|
}
|
|
3019
|
-
function
|
|
3023
|
+
function ao(e) {
|
|
3020
3024
|
const t = e.scrollWidth - e.clientWidth;
|
|
3021
3025
|
e.toggleAttribute("data-under-start", e.scrollLeft > 0.5), e.toggleAttribute("data-under-end", e.scrollLeft < t - 0.5);
|
|
3022
3026
|
}
|
|
3023
|
-
function
|
|
3027
|
+
function Cn(e) {
|
|
3024
3028
|
for (const t of Array.from(e.querySelectorAll("tbody > tr[data-line='header']"))) {
|
|
3025
3029
|
const n = t.cells[t.cells.length - 1], o = !!n && n.getBoundingClientRect().top > t.getBoundingClientRect().top + 0.5;
|
|
3026
3030
|
t.toggleAttribute("data-stuck", o);
|
|
3027
3031
|
}
|
|
3028
3032
|
}
|
|
3029
|
-
function
|
|
3033
|
+
function xn({
|
|
3030
3034
|
entry: e,
|
|
3031
3035
|
registry: t,
|
|
3032
3036
|
hook: n,
|
|
3033
3037
|
pin: o
|
|
3034
3038
|
}) {
|
|
3035
|
-
const { spec: r } = e, s = n.publicSnapshot, l = t.kindOf(e, n.rows), c =
|
|
3039
|
+
const { spec: r } = e, s = n.publicSnapshot, l = t.kindOf(e, n.rows), c = Jt(l, r.rightAligned), i = t.isSortable(e, n.rows), a = r.id, f = s.sort.findIndex((_) => _.column === a), d = f === -1 ? void 0 : s.sort[f].direction, m = s.sort.length > 1 && f !== -1 ? f + 1 : void 0, w = s.widths[a], g = 48, v = (_) => {
|
|
3036
3040
|
_.stopPropagation(), _.preventDefault();
|
|
3037
|
-
const x = _.currentTarget,
|
|
3038
|
-
if (!
|
|
3039
|
-
const I = _.clientX, A =
|
|
3040
|
-
x.setPointerCapture(
|
|
3041
|
+
const x = _.currentTarget, O = x.closest("th");
|
|
3042
|
+
if (!O) return;
|
|
3043
|
+
const I = _.clientX, A = O.getBoundingClientRect().width, M = _.pointerId;
|
|
3044
|
+
x.setPointerCapture(M);
|
|
3041
3045
|
const D = (B) => {
|
|
3042
|
-
B.pointerId ===
|
|
3043
|
-
},
|
|
3044
|
-
B.pointerId ===
|
|
3046
|
+
B.pointerId === M && s.setWidth(a, Math.max(g, A + (B.clientX - I)));
|
|
3047
|
+
}, L = (B) => {
|
|
3048
|
+
B.pointerId === M && (x.removeEventListener("pointermove", D), x.removeEventListener("pointerup", L), x.removeEventListener("pointercancel", L), x.hasPointerCapture(M) && x.releasePointerCapture(M));
|
|
3045
3049
|
};
|
|
3046
|
-
x.addEventListener("pointermove", D), x.addEventListener("pointerup",
|
|
3050
|
+
x.addEventListener("pointermove", D), x.addEventListener("pointerup", L), x.addEventListener("pointercancel", L);
|
|
3047
3051
|
}, p = (_) => {
|
|
3048
|
-
const x = _ == null ? void 0 : _.parentElement,
|
|
3049
|
-
if (!_ || !x || !
|
|
3050
|
-
const I = Array.from(x.children).indexOf(_), A = x.children.length,
|
|
3051
|
-
_.style.width = "",
|
|
3052
|
+
const x = _ == null ? void 0 : _.parentElement, O = _ == null ? void 0 : _.closest("table");
|
|
3053
|
+
if (!_ || !x || !O) return;
|
|
3054
|
+
const I = Array.from(x.children).indexOf(_), A = x.children.length, M = { cell: _.style.width, table: O.style.width };
|
|
3055
|
+
_.style.width = "", O.style.width = "auto";
|
|
3052
3056
|
let D = 0;
|
|
3053
|
-
for (const
|
|
3054
|
-
if (
|
|
3055
|
-
const B =
|
|
3057
|
+
for (const L of Array.from(O.rows)) {
|
|
3058
|
+
if (L.cells.length !== A) continue;
|
|
3059
|
+
const B = L.cells[I];
|
|
3056
3060
|
if (!B) continue;
|
|
3057
|
-
const H = B.querySelector(`.${h.value}`), J = getComputedStyle(B),
|
|
3058
|
-
D = Math.max(D, B.scrollWidth, H ? H.scrollWidth +
|
|
3061
|
+
const H = B.querySelector(`.${h.value}`), J = getComputedStyle(B), G = (parseFloat(J.paddingLeft) || 0) + (parseFloat(J.paddingRight) || 0);
|
|
3062
|
+
D = Math.max(D, B.scrollWidth, H ? H.scrollWidth + G : 0);
|
|
3059
3063
|
}
|
|
3060
|
-
_.style.width =
|
|
3064
|
+
_.style.width = M.cell, O.style.width = M.table, D > 0 && s.setWidth(a, Math.max(g, D + 1));
|
|
3061
3065
|
}, b = (_) => {
|
|
3062
3066
|
if (!r.resizable || !_.altKey) return;
|
|
3063
|
-
const x = _.key === "ArrowRight",
|
|
3064
|
-
if (!x && !
|
|
3067
|
+
const x = _.key === "ArrowRight", O = _.key === "ArrowLeft", I = _.key === "Home";
|
|
3068
|
+
if (!x && !O && !I) return;
|
|
3065
3069
|
_.preventDefault();
|
|
3066
3070
|
const A = _.currentTarget;
|
|
3067
3071
|
if (I) {
|
|
3068
3072
|
p(A);
|
|
3069
3073
|
return;
|
|
3070
3074
|
}
|
|
3071
|
-
const
|
|
3072
|
-
s.setWidth(a, Math.max(g,
|
|
3075
|
+
const M = A.getBoundingClientRect().width, D = _.shiftKey ? 32 : 8;
|
|
3076
|
+
s.setWidth(a, Math.max(g, M + (x ? D : -D)));
|
|
3073
3077
|
}, R = i ? /* @__PURE__ */ T(
|
|
3074
3078
|
"button",
|
|
3075
3079
|
{
|
|
@@ -3086,7 +3090,7 @@ function Cn({
|
|
|
3086
3090
|
) })
|
|
3087
3091
|
]
|
|
3088
3092
|
}
|
|
3089
|
-
) : r.label, E = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", y =
|
|
3093
|
+
) : r.label, E = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", y = Ue(r.filter) !== void 0 && !(r.filter === "list" && l === "other");
|
|
3090
3094
|
return /* @__PURE__ */ T(
|
|
3091
3095
|
"th",
|
|
3092
3096
|
{
|
|
@@ -3103,7 +3107,7 @@ function Cn({
|
|
|
3103
3107
|
children: [
|
|
3104
3108
|
y ? /* @__PURE__ */ T("span", { className: h.thFlex, children: [
|
|
3105
3109
|
R,
|
|
3106
|
-
/* @__PURE__ */ u(
|
|
3110
|
+
/* @__PURE__ */ u(xi, { entry: e, registry: t, hook: n })
|
|
3107
3111
|
] }) : R,
|
|
3108
3112
|
r.resizable && /* @__PURE__ */ u(
|
|
3109
3113
|
"span",
|
|
@@ -3121,7 +3125,7 @@ function Cn({
|
|
|
3121
3125
|
}
|
|
3122
3126
|
);
|
|
3123
3127
|
}
|
|
3124
|
-
function
|
|
3128
|
+
function Nn({
|
|
3125
3129
|
row: e,
|
|
3126
3130
|
index: t,
|
|
3127
3131
|
absolute: n,
|
|
@@ -3145,115 +3149,115 @@ function xn({
|
|
|
3145
3149
|
fresh: y = !1
|
|
3146
3150
|
}) {
|
|
3147
3151
|
var q;
|
|
3148
|
-
const _ =
|
|
3149
|
-
return /* @__PURE__ */ T(
|
|
3152
|
+
const _ = Be(uo), x = r.publicSnapshot, O = y ? Me : r.rowKey(e), I = y ? g.newRow : dl(e, l, r, w, g), A = y ? Me : Ct(O), M = (q = Be(ot)) == null ? void 0 : q.editing, D = (M == null ? void 0 : M.row) === !0 && M.line === A, L = o.detail, B = y || p == null ? void 0 : p.entry(e), H = y ? null : co(o, x, e, O, B), J = H !== null, G = (H == null ? void 0 : H.open) ?? !1, ae = H == null ? void 0 : H.content, ne = `${m}-detail-${t}`, { className: Re, ...k } = (d == null ? void 0 : d(e)) ?? {}, C = n !== void 0, N = v ? v.span ?? v.parents.at(-1) : void 0, K = L !== null && !p, W = (c ? 1 : 0) + (K ? 1 : 0), oe = W + (b ? 1 : 0), P = (he) => rn(a, he), ce = B !== void 0 && B.branch && !B.empty;
|
|
3153
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
3150
3154
|
/* @__PURE__ */ T(
|
|
3151
3155
|
"tr",
|
|
3152
3156
|
{
|
|
3153
3157
|
...k,
|
|
3154
3158
|
className: j(
|
|
3155
|
-
|
|
3159
|
+
Re,
|
|
3156
3160
|
C && h.virtualRow,
|
|
3157
3161
|
B && h.treeRow,
|
|
3158
|
-
|
|
3162
|
+
ce && h.branchRow,
|
|
3159
3163
|
(B == null ? void 0 : B.pathOnly) && h.pathRow
|
|
3160
3164
|
),
|
|
3161
|
-
"data-before-root": B && !
|
|
3165
|
+
"data-before-root": B && !G && (p != null && p.beforeRoot(O)) ? "" : void 0,
|
|
3162
3166
|
"data-row": C ? n : void 0,
|
|
3163
3167
|
"data-line": v ? "row" : void 0,
|
|
3164
|
-
"data-motion":
|
|
3165
|
-
"data-selected": c && x.selection.isSelected(
|
|
3168
|
+
"data-motion": O,
|
|
3169
|
+
"data-selected": c && x.selection.isSelected(O) ? "" : void 0,
|
|
3166
3170
|
"data-group-first": v != null && v.first ? "" : void 0,
|
|
3167
3171
|
"data-group": N == null ? void 0 : N.path,
|
|
3168
3172
|
"aria-level": v ? v.parents.length + 1 : B ? B.level + 1 : void 0,
|
|
3169
3173
|
"aria-posinset": N ? N.rows.indexOf(e) + 1 : B == null ? void 0 : B.position,
|
|
3170
3174
|
"aria-setsize": N ? N.rows.length : B == null ? void 0 : B.siblings,
|
|
3171
|
-
"aria-expanded":
|
|
3172
|
-
"data-branch":
|
|
3175
|
+
"aria-expanded": ce ? B.expanded : void 0,
|
|
3176
|
+
"data-branch": ce ? B.expanded ? "open" : "closed" : void 0,
|
|
3173
3177
|
tabIndex: C && !R ? n === _ ? 0 : -1 : void 0,
|
|
3174
3178
|
"data-grid-line": R ? A : void 0,
|
|
3175
3179
|
"data-draft": D ? "" : void 0,
|
|
3176
3180
|
"data-even": C && n % 2 === 1 ? "" : void 0,
|
|
3177
3181
|
"aria-rowindex": C ? n + 2 : void 0,
|
|
3178
3182
|
children: [
|
|
3179
|
-
y && Array.from({ length: W + (b ? 1 : 0) }, (
|
|
3180
|
-
!y && c && /* @__PURE__ */ u("td", { className: j(h.td, h.control,
|
|
3181
|
-
|
|
3183
|
+
y && Array.from({ length: W + (b ? 1 : 0) }, (he, Y) => /* @__PURE__ */ u("td", { className: j(h.td, Y < W && h.control, P(Y).className), style: P(Y).style }, Y)),
|
|
3184
|
+
!y && c && /* @__PURE__ */ u("td", { className: j(h.td, h.control, P(0).className), style: P(0).style, children: /* @__PURE__ */ u(
|
|
3185
|
+
tt,
|
|
3182
3186
|
{
|
|
3183
3187
|
"aria-label": g.selectRow(I),
|
|
3184
|
-
checked: x.selection.isSelected(
|
|
3185
|
-
onChange: () => x.selection.toggle(
|
|
3188
|
+
checked: x.selection.isSelected(O),
|
|
3189
|
+
onChange: () => x.selection.toggle(O)
|
|
3186
3190
|
}
|
|
3187
3191
|
) }),
|
|
3188
|
-
!y &&
|
|
3192
|
+
!y && K && /* @__PURE__ */ u("td", { className: j(h.td, h.control, P(W - 1).className), style: P(W - 1).style, children: J && /* @__PURE__ */ u(
|
|
3189
3193
|
"button",
|
|
3190
3194
|
{
|
|
3191
3195
|
type: "button",
|
|
3192
|
-
"aria-expanded":
|
|
3193
|
-
"aria-controls":
|
|
3194
|
-
"aria-label":
|
|
3195
|
-
className: j(h.expander,
|
|
3196
|
-
onClick: () => x.toggleRow(
|
|
3197
|
-
children: /* @__PURE__ */ u(
|
|
3196
|
+
"aria-expanded": G,
|
|
3197
|
+
"aria-controls": G ? ne : void 0,
|
|
3198
|
+
"aria-label": G ? g.collapseRowNamed(I) : g.expandRowNamed(I),
|
|
3199
|
+
className: j(h.expander, G && h.expanderOpen),
|
|
3200
|
+
onClick: () => x.toggleRow(O),
|
|
3201
|
+
children: /* @__PURE__ */ u(_o, {})
|
|
3198
3202
|
}
|
|
3199
3203
|
) }),
|
|
3200
3204
|
v && v.span && /* @__PURE__ */ u(
|
|
3201
|
-
|
|
3205
|
+
Qi,
|
|
3202
3206
|
{
|
|
3203
3207
|
line: { ...v, span: v.span },
|
|
3204
3208
|
entry: b,
|
|
3205
3209
|
selectable: c,
|
|
3206
|
-
pin:
|
|
3210
|
+
pin: P(W),
|
|
3207
3211
|
hook: r,
|
|
3208
3212
|
formats: w,
|
|
3209
3213
|
wording: g
|
|
3210
3214
|
}
|
|
3211
3215
|
),
|
|
3212
|
-
s.map((
|
|
3213
|
-
|
|
3216
|
+
s.map((he, Y) => /* @__PURE__ */ u(
|
|
3217
|
+
wl,
|
|
3214
3218
|
{
|
|
3215
|
-
entry:
|
|
3219
|
+
entry: he,
|
|
3216
3220
|
row: e,
|
|
3217
|
-
kind: o.kindOf(
|
|
3218
|
-
pin:
|
|
3221
|
+
kind: o.kindOf(he, r.rows),
|
|
3222
|
+
pin: P(oe + Y),
|
|
3219
3223
|
formats: w,
|
|
3220
3224
|
wording: g,
|
|
3221
3225
|
line: A,
|
|
3222
3226
|
rowName: I,
|
|
3223
|
-
width: x.widths[
|
|
3224
|
-
tree: B &&
|
|
3227
|
+
width: x.widths[he.spec.id],
|
|
3228
|
+
tree: B && he === (p == null ? void 0 : p.column) ? { setup: p, entry: B, detail: J && !ce ? { open: G, toggle: () => x.toggleRow(O) } : void 0 } : void 0
|
|
3225
3229
|
},
|
|
3226
|
-
|
|
3230
|
+
he.key
|
|
3227
3231
|
)),
|
|
3228
|
-
E && /* @__PURE__ */ u("td", { className: j(h.td, h.actionsCell,
|
|
3229
|
-
/* @__PURE__ */ u(
|
|
3230
|
-
/* @__PURE__ */ u("span", { className: h.held, "aria-hidden": "true", children: /* @__PURE__ */ u(
|
|
3231
|
-
] }) : /* @__PURE__ */ u(
|
|
3232
|
+
E && /* @__PURE__ */ u("td", { className: j(h.td, h.actionsCell, P(f - 1).className, D && h.editing), style: P(f - 1).style, children: D ? /* @__PURE__ */ T(Se, { children: [
|
|
3233
|
+
/* @__PURE__ */ u(Cl, { name: I, wording: g }),
|
|
3234
|
+
/* @__PURE__ */ u("span", { className: h.held, "aria-hidden": "true", children: /* @__PURE__ */ u(An, { actions: y ? [] : i, row: e, name: I, wording: g, line: A }) })
|
|
3235
|
+
] }) : /* @__PURE__ */ u(An, { actions: y ? [] : i, row: e, name: I, wording: g, line: A }) })
|
|
3232
3236
|
]
|
|
3233
3237
|
}
|
|
3234
3238
|
),
|
|
3235
|
-
|
|
3239
|
+
G && /* @__PURE__ */ u(
|
|
3236
3240
|
"tr",
|
|
3237
3241
|
{
|
|
3238
|
-
id:
|
|
3242
|
+
id: ne,
|
|
3239
3243
|
className: h.detailRow,
|
|
3240
3244
|
"data-group": N == null ? void 0 : N.path,
|
|
3241
|
-
"data-grid-line": R ? `detail:${
|
|
3242
|
-
"data-before-root": B && (p != null && p.beforeRoot(
|
|
3245
|
+
"data-grid-line": R ? `detail:${O}` : void 0,
|
|
3246
|
+
"data-before-root": B && (p != null && p.beforeRoot(O)) ? "" : void 0,
|
|
3243
3247
|
children: /* @__PURE__ */ u(
|
|
3244
3248
|
"td",
|
|
3245
3249
|
{
|
|
3246
3250
|
colSpan: f,
|
|
3247
3251
|
className: j(h.detailCell, B && h.treeDetail),
|
|
3248
3252
|
style: B ? { "--tree-level": B.level } : void 0,
|
|
3249
|
-
children: B ? /* @__PURE__ */ u("div", { className: h.treeDetailRail, children:
|
|
3253
|
+
children: B ? /* @__PURE__ */ u("div", { className: h.treeDetailRail, children: ae }) : ae
|
|
3250
3254
|
}
|
|
3251
3255
|
)
|
|
3252
3256
|
}
|
|
3253
3257
|
)
|
|
3254
3258
|
] });
|
|
3255
3259
|
}
|
|
3256
|
-
function
|
|
3260
|
+
function wl({
|
|
3257
3261
|
entry: e,
|
|
3258
3262
|
row: t,
|
|
3259
3263
|
kind: n,
|
|
@@ -3265,9 +3269,9 @@ function vl({
|
|
|
3265
3269
|
tree: i,
|
|
3266
3270
|
width: a
|
|
3267
3271
|
}) {
|
|
3268
|
-
const { spec: f } = e, d = e.read(t), m =
|
|
3272
|
+
const { spec: f } = e, d = e.read(t), m = Jt(n, f.rightAligned), w = nl(l, f.id), v = !(Be(ot) !== null) || f.edit === void 0 ? void 0 : f.edit === "text" || f.edit === "number" ? "type" : "pick";
|
|
3269
3273
|
let p;
|
|
3270
|
-
|
|
3274
|
+
Ce(d) ? p = /* @__PURE__ */ u(eo, { wording: s }) : f.presentation ? p = f.presentation(d, t) : p = nt(d, f.format, r, s);
|
|
3271
3275
|
const b = typeof p == "string";
|
|
3272
3276
|
p = /* @__PURE__ */ u(
|
|
3273
3277
|
"div",
|
|
@@ -3277,7 +3281,7 @@ function vl({
|
|
|
3277
3281
|
"aria-hidden": w ? !0 : void 0,
|
|
3278
3282
|
children: p
|
|
3279
3283
|
}
|
|
3280
|
-
), i && (p = /* @__PURE__ */ u(
|
|
3284
|
+
), i && (p = /* @__PURE__ */ u(_l, { ...i, name: c, wording: s, children: p }));
|
|
3281
3285
|
const R = f.rowHeader ? "th" : "td";
|
|
3282
3286
|
return /* @__PURE__ */ T(
|
|
3283
3287
|
R,
|
|
@@ -3287,29 +3291,29 @@ function vl({
|
|
|
3287
3291
|
style: o.style,
|
|
3288
3292
|
"data-edit": v,
|
|
3289
3293
|
children: [
|
|
3290
|
-
w && /* @__PURE__ */ u(
|
|
3294
|
+
w && /* @__PURE__ */ u(cl, { entry: e, row: t, rowName: c, grid: w }),
|
|
3291
3295
|
p
|
|
3292
3296
|
]
|
|
3293
3297
|
}
|
|
3294
3298
|
);
|
|
3295
3299
|
}
|
|
3296
|
-
function
|
|
3300
|
+
function co(e, t, n, o, r) {
|
|
3297
3301
|
var c;
|
|
3298
3302
|
const s = (c = e.detail) == null ? void 0 : c.presentation(n);
|
|
3299
3303
|
if (s == null || s === !1) return null;
|
|
3300
3304
|
const l = r !== void 0 && r.branch && !r.empty;
|
|
3301
3305
|
return { content: s, open: l ? t.branches.includes(o) : t.expanded.includes(o) };
|
|
3302
3306
|
}
|
|
3303
|
-
function
|
|
3307
|
+
function yl(e, t, n, o, r) {
|
|
3304
3308
|
var c;
|
|
3305
3309
|
const s = /* @__PURE__ */ new Set([...t.expanded, ...t.branches]), l = /* @__PURE__ */ new Set();
|
|
3306
3310
|
for (const i of n) {
|
|
3307
3311
|
const a = o(i);
|
|
3308
|
-
s.has(a) && ((c =
|
|
3312
|
+
s.has(a) && ((c = co(e, t, i, a, r == null ? void 0 : r.entry(i))) != null && c.open) && l.add(a);
|
|
3309
3313
|
}
|
|
3310
3314
|
return l;
|
|
3311
3315
|
}
|
|
3312
|
-
function
|
|
3316
|
+
function _l({
|
|
3313
3317
|
setup: e,
|
|
3314
3318
|
entry: t,
|
|
3315
3319
|
detail: n,
|
|
@@ -3342,21 +3346,21 @@ function yl({
|
|
|
3342
3346
|
"aria-label": i ? r.foldBranch(o) : r.unfoldBranch(o),
|
|
3343
3347
|
onKeyDown: f,
|
|
3344
3348
|
onClick: (d) => d.altKey ? e.siblings(t.key, !i) : a(!i),
|
|
3345
|
-
children: /* @__PURE__ */ u(
|
|
3349
|
+
children: /* @__PURE__ */ u(io, {})
|
|
3346
3350
|
}
|
|
3347
3351
|
) : /* @__PURE__ */ u("span", { className: h.foldSlot }),
|
|
3348
3352
|
/* @__PURE__ */ T("span", { className: h.treeText, children: [
|
|
3349
3353
|
s,
|
|
3350
|
-
t.pathOnly && /* @__PURE__ */ u(
|
|
3354
|
+
t.pathOnly && /* @__PURE__ */ u(Ge, { children: `, ${r.pathRow}` })
|
|
3351
3355
|
] })
|
|
3352
3356
|
] });
|
|
3353
3357
|
}
|
|
3354
|
-
function
|
|
3358
|
+
function kl({
|
|
3355
3359
|
entry: e,
|
|
3356
3360
|
rows: t,
|
|
3357
3361
|
formats: n,
|
|
3358
3362
|
wording: o,
|
|
3359
|
-
pin: r =
|
|
3363
|
+
pin: r = oo,
|
|
3360
3364
|
topLevel: s = !1
|
|
3361
3365
|
}) {
|
|
3362
3366
|
if (!e.spec.aggregate) return /* @__PURE__ */ u("td", { className: j(h.td, r.className), style: r.style });
|
|
@@ -3364,19 +3368,19 @@ function _l({
|
|
|
3364
3368
|
return /* @__PURE__ */ T(
|
|
3365
3369
|
"td",
|
|
3366
3370
|
{
|
|
3367
|
-
className: j(h.td,
|
|
3371
|
+
className: j(h.td, to(e, t) && h.numeric, r.className),
|
|
3368
3372
|
style: r.style,
|
|
3369
3373
|
"data-footer": l,
|
|
3370
3374
|
title: s ? o.footerTopLevel : void 0,
|
|
3371
3375
|
children: [
|
|
3372
|
-
/* @__PURE__ */ u(
|
|
3373
|
-
s && /* @__PURE__ */ u(
|
|
3376
|
+
/* @__PURE__ */ u(Vt, { entry: e, rows: t, formats: n, wording: o, signed: !0 }),
|
|
3377
|
+
s && /* @__PURE__ */ u(Ge, { children: ` (${o.footerTopLevel})` })
|
|
3374
3378
|
]
|
|
3375
3379
|
}
|
|
3376
3380
|
);
|
|
3377
3381
|
}
|
|
3378
|
-
const
|
|
3379
|
-
function
|
|
3382
|
+
const Sl = 2;
|
|
3383
|
+
function An({
|
|
3380
3384
|
actions: e,
|
|
3381
3385
|
row: t,
|
|
3382
3386
|
name: n,
|
|
@@ -3384,8 +3388,8 @@ function Nn({
|
|
|
3384
3388
|
line: r
|
|
3385
3389
|
}) {
|
|
3386
3390
|
var v;
|
|
3387
|
-
const s =
|
|
3388
|
-
|
|
3391
|
+
const s = Be(ot), l = ((v = s == null ? void 0 : s.editing) == null ? void 0 : v.row) === !0 && s.editing.line !== r, c = s == null ? void 0 : s.remove, [i, a] = Z(!1), f = fe(!1), d = fe(null), m = fe(null);
|
|
3392
|
+
qe(() => {
|
|
3389
3393
|
var p, b;
|
|
3390
3394
|
i ? (p = m.current) == null || p.focus() : f.current && ((b = d.current) == null || b.focus()), f.current = i;
|
|
3391
3395
|
}, [i]);
|
|
@@ -3393,16 +3397,16 @@ function Nn({
|
|
|
3393
3397
|
if (l) return;
|
|
3394
3398
|
const b = p.onSelect;
|
|
3395
3399
|
b(p.bulk ? [t] : t);
|
|
3396
|
-
}, g = c && (i ? /* @__PURE__ */ T(
|
|
3400
|
+
}, g = c && (i ? /* @__PURE__ */ T(Se, { children: [
|
|
3397
3401
|
/* @__PURE__ */ u("span", { className: h.deleteAsk, children: o.deleteRowAsk }),
|
|
3398
|
-
/* @__PURE__ */ u(
|
|
3402
|
+
/* @__PURE__ */ u(ge, { className: h.toned, size: "sm", variant: "danger", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => {
|
|
3399
3403
|
a(!1), c(t);
|
|
3400
3404
|
}, children: o.deleteRow }),
|
|
3401
|
-
/* @__PURE__ */ u(
|
|
3402
|
-
] }) : /* @__PURE__ */ u(
|
|
3403
|
-
return e.length <=
|
|
3405
|
+
/* @__PURE__ */ u(ge, { ref: m, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.keepRow, n), onClick: () => a(!1), children: o.keepRow })
|
|
3406
|
+
] }) : /* @__PURE__ */ u(ge, { ref: d, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => !l && a(!0), children: o.deleteRow }));
|
|
3407
|
+
return e.length <= Sl ? /* @__PURE__ */ T("div", { className: j(h.actions, i && h.decision), children: [
|
|
3404
3408
|
!i && e.map(({ key: p, spec: b }) => /* @__PURE__ */ u(
|
|
3405
|
-
|
|
3409
|
+
ge,
|
|
3406
3410
|
{
|
|
3407
3411
|
size: "sm",
|
|
3408
3412
|
variant: "ghost",
|
|
@@ -3415,24 +3419,24 @@ function Nn({
|
|
|
3415
3419
|
g
|
|
3416
3420
|
] }) : /* @__PURE__ */ T("div", { className: j(h.actions, i && h.decision), children: [
|
|
3417
3421
|
!i && /* @__PURE__ */ u(
|
|
3418
|
-
|
|
3422
|
+
En,
|
|
3419
3423
|
{
|
|
3420
3424
|
align: "end",
|
|
3421
|
-
trigger: /* @__PURE__ */ u(
|
|
3422
|
-
children: e.map(({ key: p, spec: b }) => /* @__PURE__ */ u(
|
|
3425
|
+
trigger: /* @__PURE__ */ u(So, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
|
|
3426
|
+
children: e.map(({ key: p, spec: b }) => /* @__PURE__ */ u(vt, { tone: b.tone, onSelect: () => w(b), children: b.label }, p))
|
|
3423
3427
|
}
|
|
3424
3428
|
),
|
|
3425
3429
|
g
|
|
3426
3430
|
] });
|
|
3427
3431
|
}
|
|
3428
|
-
function
|
|
3432
|
+
function Cl({ name: e, wording: t }) {
|
|
3429
3433
|
var r;
|
|
3430
|
-
const n =
|
|
3434
|
+
const n = Be(ot), o = fe(null);
|
|
3431
3435
|
return /* @__PURE__ */ T("div", { ref: o, className: j(h.actions, h.decision, h.draftButtons), children: [
|
|
3432
|
-
/* @__PURE__ */ u(
|
|
3433
|
-
/* @__PURE__ */ u(
|
|
3436
|
+
/* @__PURE__ */ u(ge, { className: h.toned, size: "sm", variant: "primary", "aria-label": t.rowAction(t.saveRow, e), onClick: n.save, children: t.saveRow }),
|
|
3437
|
+
/* @__PURE__ */ u(ge, { size: "sm", variant: "ghost", "aria-label": t.rowAction(t.discardRow, e), onClick: n.discard, children: t.discardRow }),
|
|
3434
3438
|
/* @__PURE__ */ u(
|
|
3435
|
-
|
|
3439
|
+
_t,
|
|
3436
3440
|
{
|
|
3437
3441
|
open: ((r = n.editing) == null ? void 0 : r.refused) === !0,
|
|
3438
3442
|
onOpenChange: () => {
|
|
@@ -3446,20 +3450,20 @@ function Sl({ name: e, wording: t }) {
|
|
|
3446
3450
|
)
|
|
3447
3451
|
] });
|
|
3448
3452
|
}
|
|
3449
|
-
function
|
|
3453
|
+
function xl({ columns: e, rightAligned: t = [], rows: n = 4 }) {
|
|
3450
3454
|
const o = [72, 48, 60, 40, 56, 64];
|
|
3451
|
-
return /* @__PURE__ */ u(
|
|
3455
|
+
return /* @__PURE__ */ u(Se, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ u("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (l, c) => /* @__PURE__ */ u("td", { className: j(h.td, t[c] && h.numeric), children: /* @__PURE__ */ u("span", { className: h.skeleton, style: { width: `${o[(s + c) % o.length]}%` } }) }, c)) }, s)) });
|
|
3452
3456
|
}
|
|
3453
|
-
const
|
|
3454
|
-
function
|
|
3457
|
+
const uo = wt(0);
|
|
3458
|
+
function qt({ height: e, colSpan: t }) {
|
|
3455
3459
|
return typeof e == "number" && e <= 0 ? null : /* @__PURE__ */ u("tr", { "aria-hidden": "true", "data-filler": "", className: h.fillerRow, children: /* @__PURE__ */ u("td", { colSpan: t, style: { height: e } }) });
|
|
3456
3460
|
}
|
|
3457
|
-
function
|
|
3461
|
+
function Rn({
|
|
3458
3462
|
virtual: e,
|
|
3459
3463
|
colSpan: t,
|
|
3460
3464
|
children: n
|
|
3461
3465
|
}) {
|
|
3462
|
-
const { count: o, fillerBefore: r, fillerAfter: s, showRow: l } = e, c =
|
|
3466
|
+
const { count: o, fillerBefore: r, fillerAfter: s, showRow: l } = e, c = fe(null), [i, a] = Z(0), f = (w, g) => {
|
|
3463
3467
|
c.current = g, a(g), l(g), requestAnimationFrame(() => {
|
|
3464
3468
|
var v;
|
|
3465
3469
|
(v = w.querySelector(`[data-row="${g}"]`)) == null || v.focus();
|
|
@@ -3481,54 +3485,54 @@ function An({
|
|
|
3481
3485
|
const g = w.target.closest("[data-row]");
|
|
3482
3486
|
g && a(Number(g.dataset.row));
|
|
3483
3487
|
},
|
|
3484
|
-
children: /* @__PURE__ */ T(
|
|
3485
|
-
/* @__PURE__ */ u(
|
|
3488
|
+
children: /* @__PURE__ */ T(uo.Provider, { value: d, children: [
|
|
3489
|
+
/* @__PURE__ */ u(qt, { height: r, colSpan: t }),
|
|
3486
3490
|
n,
|
|
3487
|
-
/* @__PURE__ */ u(
|
|
3491
|
+
/* @__PURE__ */ u(qt, { height: s, colSpan: t })
|
|
3488
3492
|
] })
|
|
3489
3493
|
}
|
|
3490
3494
|
);
|
|
3491
3495
|
}
|
|
3492
|
-
const
|
|
3493
|
-
verdict:
|
|
3494
|
-
glyph:
|
|
3495
|
-
value:
|
|
3496
|
-
excess:
|
|
3497
|
-
},
|
|
3496
|
+
const Nl = "_verdict_1mxfd_6", Al = "_glyph_1mxfd_13", Rl = "_value_1mxfd_23", Tl = "_excess_1mxfd_28", bt = {
|
|
3497
|
+
verdict: Nl,
|
|
3498
|
+
glyph: Al,
|
|
3499
|
+
value: Rl,
|
|
3500
|
+
excess: Tl
|
|
3501
|
+
}, Tn = (e, t, n) => t === "percent" ? n.percent(e) : t === "count" ? n.count(e) : n.number(e, typeof t == "object" ? t.decimals : void 0), Ol = (e, t) => e === "alarm" ? t.verdictAlarm : e === "warning" ? t.verdictWarning : e === "unknown" ? t.verdictUnknown : t.verdictOk, Ml = {
|
|
3498
3502
|
ok: "✓",
|
|
3499
3503
|
unknown: "?",
|
|
3500
3504
|
warning: "▲",
|
|
3501
3505
|
alarm: "■"
|
|
3502
3506
|
};
|
|
3503
|
-
function
|
|
3504
|
-
const n =
|
|
3505
|
-
return /* @__PURE__ */ T("span", { className:
|
|
3506
|
-
/* @__PURE__ */ u("span", { "aria-hidden": "true", className:
|
|
3507
|
-
/* @__PURE__ */ u("span", { className:
|
|
3508
|
-
s.excess !== void 0 && /* @__PURE__ */ T("span", { className:
|
|
3507
|
+
function Ll({ reading: e, format: t }) {
|
|
3508
|
+
const n = Ee(), o = ke(), { measured: r, assessment: s } = e, l = Ol(s.verdict, o);
|
|
3509
|
+
return /* @__PURE__ */ T("span", { className: bt.verdict, "data-verdict": s.verdict, title: l, children: [
|
|
3510
|
+
/* @__PURE__ */ u("span", { "aria-hidden": "true", className: bt.glyph, children: Ml[s.verdict] }),
|
|
3511
|
+
/* @__PURE__ */ u("span", { className: bt.value, children: r === null ? o.statAbsentValue : Tn(r, t, n) }),
|
|
3512
|
+
s.excess !== void 0 && /* @__PURE__ */ T("span", { className: bt.excess, children: [
|
|
3509
3513
|
"+",
|
|
3510
|
-
|
|
3514
|
+
Tn(s.excess, t, n)
|
|
3511
3515
|
] }),
|
|
3512
|
-
/* @__PURE__ */ u(
|
|
3516
|
+
/* @__PURE__ */ u(Ge, { children: l })
|
|
3513
3517
|
] });
|
|
3514
3518
|
}
|
|
3515
|
-
const
|
|
3516
|
-
(t, n) => !t ||
|
|
3519
|
+
const Fl = (e) => e.measured, El = (e) => e.reduce(
|
|
3520
|
+
(t, n) => !t || Dt(n.assessment.verdict) > Dt(t.assessment.verdict) ? n : t,
|
|
3517
3521
|
void 0
|
|
3518
3522
|
);
|
|
3519
|
-
function
|
|
3523
|
+
function Dl(e) {
|
|
3520
3524
|
return function({ id: n, value: o, label: r, limits: s, format: l, sortBy: c = "verdict", width: i, resizable: a, pin: f, aggregate: d }) {
|
|
3521
|
-
const m = JSON.stringify(s), w =
|
|
3525
|
+
const m = JSON.stringify(s), w = se(() => {
|
|
3522
3526
|
const v = JSON.parse(m);
|
|
3523
3527
|
return (p) => {
|
|
3524
3528
|
const b = typeof o == "string" ? p == null ? void 0 : p[o] : o(p);
|
|
3525
3529
|
return {
|
|
3526
3530
|
measured: typeof b == "number" && Number.isFinite(b) ? b : null,
|
|
3527
|
-
assessment:
|
|
3531
|
+
assessment: Co(b, v)
|
|
3528
3532
|
};
|
|
3529
3533
|
};
|
|
3530
|
-
}, [o, m]), g =
|
|
3531
|
-
(v) => c === "value" ? v.measured :
|
|
3534
|
+
}, [o, m]), g = xe(
|
|
3535
|
+
(v) => c === "value" ? v.measured : Dt(v.assessment.verdict),
|
|
3532
3536
|
[c]
|
|
3533
3537
|
);
|
|
3534
3538
|
return /* @__PURE__ */ u(
|
|
@@ -3542,24 +3546,24 @@ function El(e) {
|
|
|
3542
3546
|
pin: f,
|
|
3543
3547
|
value: w,
|
|
3544
3548
|
sortValue: g,
|
|
3545
|
-
exportValue:
|
|
3546
|
-
aggregate: d === "worst" ?
|
|
3547
|
-
children: (v) => /* @__PURE__ */ u(
|
|
3549
|
+
exportValue: Fl,
|
|
3550
|
+
aggregate: d === "worst" ? El : void 0,
|
|
3551
|
+
children: (v) => /* @__PURE__ */ u(Ll, { reading: v, format: l })
|
|
3548
3552
|
}
|
|
3549
3553
|
);
|
|
3550
3554
|
};
|
|
3551
3555
|
}
|
|
3552
|
-
const
|
|
3556
|
+
const Bl = [], fo = (e) => ve(
|
|
3553
3557
|
`condition-foreign:${e}`,
|
|
3554
3558
|
`The condition for "${e}" is not of the kind of its filter and is passed over.`
|
|
3555
3559
|
);
|
|
3556
|
-
function
|
|
3557
|
-
const o = e.columnById(t), r = o ?
|
|
3560
|
+
function ho(e, t, n) {
|
|
3561
|
+
const o = e.columnById(t), r = o ? Ue(o.spec.filter) : void 0;
|
|
3558
3562
|
if (!r) return !1;
|
|
3559
|
-
const s =
|
|
3560
|
-
return s === "foreign" &&
|
|
3563
|
+
const s = Hn(r, n);
|
|
3564
|
+
return s === "foreign" && fo(t), s === "effective";
|
|
3561
3565
|
}
|
|
3562
|
-
function
|
|
3566
|
+
function Pl(e, t, n) {
|
|
3563
3567
|
if (e.length === 0) return;
|
|
3564
3568
|
let o = -1, r = [];
|
|
3565
3569
|
return (s) => {
|
|
@@ -3572,9 +3576,9 @@ function Bl(e, t, n) {
|
|
|
3572
3576
|
continue;
|
|
3573
3577
|
}
|
|
3574
3578
|
const a = t.columnById(l);
|
|
3575
|
-
a &&
|
|
3576
|
-
const d =
|
|
3577
|
-
return !d ||
|
|
3579
|
+
a && ho(t, l, c) && r.push((f) => {
|
|
3580
|
+
const d = Ue(a.spec.filter);
|
|
3581
|
+
return !d || ci(d, a.read(f), c);
|
|
3578
3582
|
});
|
|
3579
3583
|
}
|
|
3580
3584
|
}
|
|
@@ -3582,12 +3586,12 @@ function Bl(e, t, n) {
|
|
|
3582
3586
|
};
|
|
3583
3587
|
}
|
|
3584
3588
|
function zl(e, t) {
|
|
3585
|
-
const n =
|
|
3589
|
+
const n = se(() => t ? e.filter((l) => t(l)) : e, [e, t]), [o, r] = Z(n);
|
|
3586
3590
|
if (!t) return e;
|
|
3587
3591
|
const s = o === n || o.length === n.length && o.every((l, c) => l === n[c]);
|
|
3588
3592
|
return s || r(n), s ? o : n;
|
|
3589
3593
|
}
|
|
3590
|
-
function
|
|
3594
|
+
function Il(e, t) {
|
|
3591
3595
|
var c, i, a, f, d, m;
|
|
3592
3596
|
if (t.size === 0) return e;
|
|
3593
3597
|
const n = (c = e.sort) == null ? void 0 : c.filter((w) => t.has(w.column)), o = (i = e.hidden) == null ? void 0 : i.filter((w) => t.has(w)), r = (a = e.order) == null ? void 0 : a.filter((w) => t.has(w)), s = e.widths ? Object.fromEntries(Object.entries(e.widths).filter(([w]) => t.has(w))) : void 0;
|
|
@@ -3601,15 +3605,15 @@ function Pl(e, t) {
|
|
|
3601
3605
|
...s && Object.keys(s).length ? { widths: s } : {}
|
|
3602
3606
|
};
|
|
3603
3607
|
}
|
|
3604
|
-
const
|
|
3605
|
-
function
|
|
3608
|
+
const Lt = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], $l = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
|
|
3609
|
+
function On(e) {
|
|
3606
3610
|
const t = [], n = (o) => {
|
|
3607
3611
|
for (const r of o)
|
|
3608
3612
|
t.push(r.path), n(r.groups);
|
|
3609
3613
|
};
|
|
3610
3614
|
return n(e ?? []), t;
|
|
3611
3615
|
}
|
|
3612
|
-
function
|
|
3616
|
+
function Vl(e, t, n) {
|
|
3613
3617
|
const o = [], r = (s, l) => {
|
|
3614
3618
|
if (!(l >= n))
|
|
3615
3619
|
for (const c of s) {
|
|
@@ -3619,155 +3623,155 @@ function $l(e, t, n) {
|
|
|
3619
3623
|
};
|
|
3620
3624
|
return r(e, 0), o;
|
|
3621
3625
|
}
|
|
3622
|
-
const
|
|
3623
|
-
function
|
|
3626
|
+
const Mn = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
|
|
3627
|
+
function Gl(e, t) {
|
|
3624
3628
|
const n = {};
|
|
3625
3629
|
for (const o of e) o.width !== void 0 && (n[o.id] = o.width);
|
|
3626
3630
|
return { ...n, ...t };
|
|
3627
3631
|
}
|
|
3628
3632
|
function Kl(e, t) {
|
|
3629
|
-
var
|
|
3630
|
-
const [n] = Z(() => new
|
|
3631
|
-
const
|
|
3632
|
-
return { ...
|
|
3633
|
+
var Ie, st;
|
|
3634
|
+
const [n] = Z(() => new _i()), [o] = Z(() => {
|
|
3635
|
+
const F = fl(n);
|
|
3636
|
+
return { ...F, VerdictColumn: Dl(F.Column) };
|
|
3633
3637
|
});
|
|
3634
|
-
|
|
3635
|
-
const r =
|
|
3636
|
-
n.setManual(a), a && ((t.preFilter ?? t.filter) && ve("manual-prefilter", "`preFilter` is passed over in manual mode: the server decides which rows the table has."), t.virtual && ve("manual-virtual", "`virtual` is passed over in manual mode: the table pages instead."), (t.defaultGrouping !== void 0 || (
|
|
3637
|
-
const [m, w] = Z(() => Object.entries((i == null ? void 0 : i.conditions) ?? {})), g = t.rowFilters ??
|
|
3638
|
-
() => new Map(g.map((
|
|
3638
|
+
yt(n.subscribe, n.structureVersion, n.structureVersion);
|
|
3639
|
+
const r = Ee(), s = ke(), l = e, c = n.modelColumns(l, r), [i] = Z(() => t.initialView), a = t.manual === !0, f = t.manual ? t.rowCount : 0, d = se(() => a ? { rowCount: f } : void 0, [a, f]);
|
|
3640
|
+
n.setManual(a), a && ((t.preFilter ?? t.filter) && ve("manual-prefilter", "`preFilter` is passed over in manual mode: the server decides which rows the table has."), t.virtual && ve("manual-virtual", "`virtual` is passed over in manual mode: the table pages instead."), (t.defaultGrouping !== void 0 || (Ie = i == null ? void 0 : i.grouping) != null && Ie.length) && ve("manual-grouping", "A grouping is passed over in manual mode: the groups would be the page's, not the server's."));
|
|
3641
|
+
const [m, w] = Z(() => Object.entries((i == null ? void 0 : i.conditions) ?? {})), g = t.rowFilters ?? Bl, v = g.map((F) => F.id).join("\0"), p = se(
|
|
3642
|
+
() => new Map(g.map((F) => [F.id, F])),
|
|
3639
3643
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the filters by their ids; they are defined outside the component
|
|
3640
3644
|
[v]
|
|
3641
3645
|
);
|
|
3642
|
-
for (const
|
|
3643
|
-
n.columnById(
|
|
3644
|
-
const b =
|
|
3645
|
-
() => i != null && i.grouping ? [...i.grouping] :
|
|
3646
|
-
), [x,
|
|
3647
|
-
n.setTree(
|
|
3648
|
-
const B =
|
|
3649
|
-
|
|
3650
|
-
B.current = { children: D, key:
|
|
3646
|
+
for (const F of g)
|
|
3647
|
+
n.columnById(F.id) && ve(`row-filter-column:${F.id}`, `The row filter "${F.id}" has the id of a column; a condition under that id is the row filter's, and the column's filter cannot hold one of its own.`);
|
|
3648
|
+
const b = se(() => Pl(m, n, p), [m, n, p]), R = t.preFilter ?? t.filter, E = zl(l, a ? void 0 : R), [y, _] = Z(
|
|
3649
|
+
() => i != null && i.grouping ? [...i.grouping] : Lt(t.defaultGrouping)
|
|
3650
|
+
), [x, O] = Z(() => (i == null ? void 0 : i.folded) ?? []), [I, A] = Z(() => i != null && i.pinned ? { ...i.pinned } : null), M = t.rowKey, D = t.manual ? void 0 : t.childRows, L = D !== void 0;
|
|
3651
|
+
n.setTree(L);
|
|
3652
|
+
const B = fe({ children: D, key: M });
|
|
3653
|
+
le(() => {
|
|
3654
|
+
B.current = { children: D, key: M };
|
|
3651
3655
|
});
|
|
3652
3656
|
const [H] = Z(() => ({
|
|
3653
|
-
key: (
|
|
3654
|
-
children: (
|
|
3655
|
-
var
|
|
3656
|
-
return (Q = (
|
|
3657
|
+
key: (F) => B.current.key(F),
|
|
3658
|
+
children: (F) => {
|
|
3659
|
+
var U, Q;
|
|
3660
|
+
return (Q = (U = B.current).children) == null ? void 0 : Q.call(U, F);
|
|
3657
3661
|
},
|
|
3658
3662
|
label: () => ""
|
|
3659
3663
|
})), [J] = Z(() => {
|
|
3660
|
-
const
|
|
3661
|
-
return !
|
|
3662
|
-
}), [
|
|
3663
|
-
|
|
3664
|
-
if (!
|
|
3665
|
-
const
|
|
3666
|
-
|
|
3667
|
-
}, [
|
|
3668
|
-
const k = n.orderedColumns().length + n.groupKeys.entries.size > 0, C = a ||
|
|
3669
|
-
() => W && W.levels.length ? { ...W, folded:
|
|
3664
|
+
const F = t.manual ? void 0 : t.defaultBranches;
|
|
3665
|
+
return !L || F === void 0 ? [] : typeof F == "number" ? Vl(l, H, F) : [...F];
|
|
3666
|
+
}), [G, ae] = Z(() => (i == null ? void 0 : i.branches) ?? J), ne = se(() => L ? new Set(xo(l, H)) : /* @__PURE__ */ new Set(), [L, l, H]), Re = L ? G.filter((F) => ne.has(F)) : [];
|
|
3667
|
+
se(() => {
|
|
3668
|
+
if (!L) return;
|
|
3669
|
+
const F = No(l, H);
|
|
3670
|
+
F !== null && ve(`tree-duplicate:${F}`, `The row key "${F}" occurs twice in the tree: its fold and its selection would act on both rows.`);
|
|
3671
|
+
}, [L, l, H]), L && (t.defaultGrouping !== void 0 || (st = i == null ? void 0 : i.grouping) != null && st.length) && ve("tree-grouping", "A grouping is passed over with `childRows`: tree rows and grouping both build levels.");
|
|
3672
|
+
const k = n.orderedColumns().length + n.groupKeys.entries.size > 0, C = a || L ? [] : k ? n.effectiveGrouping(y, l) : y.slice(0, Zt), N = C.join("|"), K = se(() => new Set(x), [x]), W = C.length ? n.groupingModel(C, l) : null, oe = se(
|
|
3673
|
+
() => W && W.levels.length ? { ...W, folded: K, compareText: r.compareText } : void 0,
|
|
3670
3674
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
|
|
3671
|
-
[W,
|
|
3672
|
-
),
|
|
3673
|
-
() =>
|
|
3675
|
+
[W, K, r.compareText, N]
|
|
3676
|
+
), P = Re.join("\0"), ce = se(
|
|
3677
|
+
() => L ? { key: M, children: H.children, open: new Set(Re), admit: R } : void 0,
|
|
3674
3678
|
/* ponytail: the pre-filter is read through the roots it admits - a new
|
|
3675
3679
|
pre-filter that only drops children takes hold with the next change of
|
|
3676
3680
|
rows or branches. Compare its admitted children, as useAdmitted does
|
|
3677
3681
|
the roots, if a caller needs that live. */
|
|
3678
3682
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the open keys by value; the rows the pre-filter admits stand for it
|
|
3679
|
-
[
|
|
3680
|
-
), q =
|
|
3681
|
-
rowKey:
|
|
3683
|
+
[L, P, E, H]
|
|
3684
|
+
), q = Vo(E, c, {
|
|
3685
|
+
rowKey: M,
|
|
3682
3686
|
pageSize: t.pageSize,
|
|
3683
3687
|
defaultSort: t.defaultSort,
|
|
3684
3688
|
filter: b,
|
|
3685
3689
|
initialView: i,
|
|
3686
3690
|
virtual: a ? void 0 : t.virtual,
|
|
3687
|
-
grouping:
|
|
3691
|
+
grouping: oe,
|
|
3688
3692
|
manual: d,
|
|
3689
|
-
tree:
|
|
3690
|
-
}), { setPage:
|
|
3691
|
-
(
|
|
3692
|
-
const Q = typeof
|
|
3693
|
-
let
|
|
3693
|
+
tree: ce
|
|
3694
|
+
}), { setPage: he } = q, Y = xe(
|
|
3695
|
+
(F, U) => {
|
|
3696
|
+
const Q = typeof F == "string" ? F : F.id;
|
|
3697
|
+
let $e = U == null;
|
|
3694
3698
|
const it = p.has(Q);
|
|
3695
|
-
if (typeof
|
|
3699
|
+
if (typeof F != "string" && !it) {
|
|
3696
3700
|
ve(
|
|
3697
3701
|
`row-filter-unknown:${Q}`,
|
|
3698
3702
|
`The row filter "${Q}" is not among the table's \`rowFilters\`; its condition is passed over.`
|
|
3699
3703
|
);
|
|
3700
3704
|
return;
|
|
3701
3705
|
}
|
|
3702
|
-
if (
|
|
3703
|
-
const
|
|
3704
|
-
if (!
|
|
3706
|
+
if (!$e && !it && n.orderedColumns().length > 0) {
|
|
3707
|
+
const Oe = n.columnById(Q), S = Oe ? Ue(Oe.spec.filter) : void 0;
|
|
3708
|
+
if (!S) {
|
|
3705
3709
|
ve(
|
|
3706
3710
|
`condition-without-filter:${Q}`,
|
|
3707
|
-
|
|
3711
|
+
Oe ? `The column "${Q}" has no filter; its condition is passed over.` : `No column is called "${Q}"; its condition is passed over.`
|
|
3708
3712
|
);
|
|
3709
3713
|
return;
|
|
3710
3714
|
}
|
|
3711
|
-
const
|
|
3712
|
-
if (
|
|
3713
|
-
|
|
3715
|
+
const z = Hn(S, U);
|
|
3716
|
+
if (z === "foreign") {
|
|
3717
|
+
fo(Q);
|
|
3714
3718
|
return;
|
|
3715
3719
|
}
|
|
3716
|
-
|
|
3720
|
+
$e = z === "empty";
|
|
3717
3721
|
}
|
|
3718
|
-
w((
|
|
3719
|
-
const
|
|
3720
|
-
return
|
|
3721
|
-
}),
|
|
3722
|
+
w((Oe) => {
|
|
3723
|
+
const S = Oe.findIndex(([z]) => z === Q);
|
|
3724
|
+
return $e ? S === -1 ? Oe : Oe.filter((z, ue) => ue !== S) : S === -1 ? [...Oe, [Q, U]] : Oe.map((z, ue) => ue === S ? [Q, U] : z);
|
|
3725
|
+
}), he(1);
|
|
3722
3726
|
},
|
|
3723
|
-
[n,
|
|
3724
|
-
), te = new Set(n.orderedColumns().map((
|
|
3725
|
-
if (!
|
|
3726
|
-
const
|
|
3727
|
-
|
|
3728
|
-
const
|
|
3729
|
-
m.some(([Q]) =>
|
|
3727
|
+
[n, he, p]
|
|
3728
|
+
), te = new Set(n.orderedColumns().map((F) => F.spec.id)), [Ne, Pe] = Z(() => /* @__PURE__ */ new Set());
|
|
3729
|
+
if (!Mn(Ne, te)) {
|
|
3730
|
+
const F = new Set([...Ne].filter((Q) => !te.has(Q)));
|
|
3731
|
+
Pe(te);
|
|
3732
|
+
const U = (Q) => F.has(Q) && !p.has(Q);
|
|
3733
|
+
m.some(([Q]) => U(Q)) && w((Q) => Q.filter(([$e]) => !U($e)));
|
|
3730
3734
|
}
|
|
3731
|
-
const
|
|
3735
|
+
const Le = te.size === 0 ? m : m.filter(([F, U]) => p.has(F) || ho(n, F, U)), Ye = Il(q.view, te), V = Le.length > 0 ? { ...Ye, conditions: Object.fromEntries(Le) } : Ye, X = te.size === 0 ? q.sort : q.sort.filter((F) => te.has(F.column)), re = a || L ? [] : k ? n.effectiveGrouping(Lt(t.defaultGrouping), l) : Lt(t.defaultGrouping), we = q.groups ? Fo(q.groups, x) : k ? [] : [...x], pe = n.declaredPins(), be = Wo(I, pe, te), Ke = {
|
|
3732
3736
|
...V,
|
|
3733
|
-
|
|
3734
|
-
...
|
|
3735
|
-
...
|
|
3736
|
-
...
|
|
3737
|
-
},
|
|
3738
|
-
_([...
|
|
3739
|
-
},
|
|
3740
|
-
|
|
3741
|
-
},
|
|
3742
|
-
...
|
|
3737
|
+
...$l(C, re) ? {} : { grouping: C },
|
|
3738
|
+
...we.length ? { folded: we } : {},
|
|
3739
|
+
...be ? { pinned: be } : {},
|
|
3740
|
+
...L && !Mn(new Set(Re), new Set(J.filter((F) => ne.has(F)))) ? { branches: Re } : {}
|
|
3741
|
+
}, rt = (F, U) => A((Q) => Ho(Q ?? n.declaredPins(), F, U)), At = (F) => {
|
|
3742
|
+
_([...F]), he(1);
|
|
3743
|
+
}, He = (F) => {
|
|
3744
|
+
On(q.groups).includes(F) && (n.noteFocusBeforeFold(), O((U) => U.includes(F) ? U.filter((Q) => Q !== F) : [...U, F]));
|
|
3745
|
+
}, je = !a && !!t.virtual, Je = !L && n.paginates() || je, ie = t.selection ?? q.selection, Xe = {
|
|
3746
|
+
...Ke,
|
|
3743
3747
|
search: q.search,
|
|
3744
|
-
conditions: Object.fromEntries(
|
|
3748
|
+
conditions: Object.fromEntries(Le),
|
|
3745
3749
|
sort: X,
|
|
3746
3750
|
page: q.page,
|
|
3747
3751
|
pageSize: q.pageSize
|
|
3748
|
-
},
|
|
3749
|
-
|
|
3750
|
-
var
|
|
3751
|
-
!a ||
|
|
3752
|
-
}, [
|
|
3753
|
-
const [
|
|
3754
|
-
let
|
|
3752
|
+
}, We = a ? Jo(Xe) : "", mt = fe(null);
|
|
3753
|
+
qe(() => {
|
|
3754
|
+
var F;
|
|
3755
|
+
!a || mt.current === We || (mt.current = We, (F = t.onViewChange) == null || F.call(t, Xe));
|
|
3756
|
+
}, [We]);
|
|
3757
|
+
const [Ae] = Z(() => /* @__PURE__ */ new Map());
|
|
3758
|
+
let ze;
|
|
3755
3759
|
if (a) {
|
|
3756
|
-
const
|
|
3757
|
-
for (const
|
|
3758
|
-
const Q =
|
|
3759
|
-
|
|
3760
|
+
const F = /* @__PURE__ */ new Set();
|
|
3761
|
+
for (const U of l) {
|
|
3762
|
+
const Q = M(U);
|
|
3763
|
+
F.add(Q), Ae.set(Q, U);
|
|
3760
3764
|
}
|
|
3761
|
-
for (const
|
|
3762
|
-
!
|
|
3763
|
-
|
|
3765
|
+
for (const U of [...Ae.keys()])
|
|
3766
|
+
!F.has(U) && !ie.isSelected(U) && Ae.delete(U);
|
|
3767
|
+
ze = [...ie.selected].filter((U) => Ae.has(U)).map((U) => Ae.get(U));
|
|
3764
3768
|
}
|
|
3765
|
-
const
|
|
3769
|
+
const Qe = {
|
|
3766
3770
|
rows: e,
|
|
3767
3771
|
filtered: q.filtered,
|
|
3768
|
-
visible:
|
|
3769
|
-
page:
|
|
3770
|
-
pageCount:
|
|
3772
|
+
visible: Je || L ? q.visible : q.filtered,
|
|
3773
|
+
page: Je ? q.page : 1,
|
|
3774
|
+
pageCount: Je ? q.pageCount : 1,
|
|
3771
3775
|
pageSize: q.pageSize,
|
|
3772
3776
|
setPage: q.setPage,
|
|
3773
3777
|
setPageSize: q.setPageSize,
|
|
@@ -3779,38 +3783,38 @@ function Kl(e, t) {
|
|
|
3779
3783
|
toggleColumn: q.toggleColumn,
|
|
3780
3784
|
order: q.order,
|
|
3781
3785
|
setOrder: q.setOrder,
|
|
3782
|
-
pinned: I ??
|
|
3783
|
-
setPin:
|
|
3784
|
-
widths:
|
|
3786
|
+
pinned: I ?? pe,
|
|
3787
|
+
setPin: rt,
|
|
3788
|
+
widths: Gl(c, q.widths),
|
|
3785
3789
|
setWidth: q.setWidth,
|
|
3786
3790
|
expanded: q.expanded,
|
|
3787
3791
|
toggleRow: q.toggleRow,
|
|
3788
|
-
filter: Object.fromEntries(
|
|
3789
|
-
setFilter:
|
|
3790
|
-
conditionOf: (
|
|
3791
|
-
var
|
|
3792
|
-
return ((
|
|
3792
|
+
filter: Object.fromEntries(Le),
|
|
3793
|
+
setFilter: Y,
|
|
3794
|
+
conditionOf: (F) => {
|
|
3795
|
+
var U;
|
|
3796
|
+
return ((U = Le.find(([Q]) => Q === F.id)) == null ? void 0 : U[1]) ?? null;
|
|
3793
3797
|
},
|
|
3794
|
-
selection:
|
|
3795
|
-
view:
|
|
3798
|
+
selection: ie,
|
|
3799
|
+
view: Ke,
|
|
3796
3800
|
grouping: C,
|
|
3797
|
-
setGrouping:
|
|
3798
|
-
folded:
|
|
3799
|
-
toggleFold:
|
|
3801
|
+
setGrouping: At,
|
|
3802
|
+
folded: we,
|
|
3803
|
+
toggleFold: He,
|
|
3800
3804
|
foldAll: () => {
|
|
3801
|
-
n.noteFocusBeforeFold(),
|
|
3805
|
+
n.noteFocusBeforeFold(), O(On(q.groups));
|
|
3802
3806
|
},
|
|
3803
3807
|
unfoldAll: () => {
|
|
3804
|
-
n.noteFocusBeforeFold(),
|
|
3808
|
+
n.noteFocusBeforeFold(), O([]);
|
|
3805
3809
|
},
|
|
3806
|
-
branches:
|
|
3807
|
-
toggleBranch: (
|
|
3808
|
-
|
|
3810
|
+
branches: Re,
|
|
3811
|
+
toggleBranch: (F) => {
|
|
3812
|
+
ne.has(F) && ae((U) => U.includes(F) ? U.filter((Q) => Q !== F) : [...U, F]);
|
|
3809
3813
|
},
|
|
3810
|
-
unfoldAllBranches: () =>
|
|
3811
|
-
foldAllBranches: () =>
|
|
3812
|
-
asCsv: () =>
|
|
3813
|
-
virtual:
|
|
3814
|
+
unfoldAllBranches: () => ae([...ne]),
|
|
3815
|
+
foldAllBranches: () => ae([]),
|
|
3816
|
+
asCsv: () => Li(n, s.levelColumn),
|
|
3817
|
+
virtual: je,
|
|
3814
3818
|
rowCount: a ? f : q.filtered.length,
|
|
3815
3819
|
manual: a
|
|
3816
3820
|
};
|
|
@@ -3820,42 +3824,42 @@ function Kl(e, t) {
|
|
|
3820
3824
|
modelColumns: c,
|
|
3821
3825
|
companion: q,
|
|
3822
3826
|
filter: b,
|
|
3823
|
-
grouping:
|
|
3824
|
-
tree:
|
|
3825
|
-
folded:
|
|
3826
|
-
publicSnapshot:
|
|
3827
|
-
rowKey:
|
|
3827
|
+
grouping: oe,
|
|
3828
|
+
tree: ce,
|
|
3829
|
+
folded: K,
|
|
3830
|
+
publicSnapshot: Qe,
|
|
3831
|
+
rowKey: M,
|
|
3828
3832
|
formats: r,
|
|
3829
3833
|
pins: I,
|
|
3830
3834
|
filterOptions: a ? t.filterOptions : void 0,
|
|
3831
|
-
selectedRows:
|
|
3835
|
+
selectedRows: ze,
|
|
3832
3836
|
rowFilters: p
|
|
3833
|
-
}), { ...
|
|
3837
|
+
}), { ...Qe, ...o };
|
|
3834
3838
|
}
|
|
3835
|
-
function
|
|
3839
|
+
function Ea(e) {
|
|
3836
3840
|
return e;
|
|
3837
3841
|
}
|
|
3838
|
-
function
|
|
3839
|
-
const n =
|
|
3840
|
-
e == null || e.register(t, n),
|
|
3842
|
+
function ln(e, t) {
|
|
3843
|
+
const n = Fe();
|
|
3844
|
+
e == null || e.register(t, n), le(() => {
|
|
3841
3845
|
if (e)
|
|
3842
3846
|
return e.register(t, n), e.commit(), () => {
|
|
3843
3847
|
e.remove(t, n), e.commit();
|
|
3844
3848
|
};
|
|
3845
3849
|
}, [e, t, n]);
|
|
3846
3850
|
}
|
|
3847
|
-
function
|
|
3851
|
+
function Da({ children: e, className: t, size: n = "sm", of: o }) {
|
|
3848
3852
|
const r = pt(o);
|
|
3849
|
-
|
|
3853
|
+
ln(r == null ? void 0 : r.registry, "toolbar");
|
|
3850
3854
|
const s = r == null ? void 0 : r.registry;
|
|
3851
|
-
return /* @__PURE__ */ u(
|
|
3855
|
+
return /* @__PURE__ */ u(Zn, { registry: s ?? null, className: t, size: n, children: e });
|
|
3852
3856
|
}
|
|
3853
|
-
function
|
|
3854
|
-
const s = pt(r), l =
|
|
3855
|
-
if (
|
|
3857
|
+
function Ba({ placeholder: e, "aria-label": t, className: n, size: o, of: r }) {
|
|
3858
|
+
const s = pt(r), l = St(o), c = ke();
|
|
3859
|
+
if (ln(s == null ? void 0 : s.registry, "search"), !s) return null;
|
|
3856
3860
|
const { snapshot: i } = s;
|
|
3857
3861
|
return /* @__PURE__ */ u(
|
|
3858
|
-
|
|
3862
|
+
Pn,
|
|
3859
3863
|
{
|
|
3860
3864
|
size: l,
|
|
3861
3865
|
type: "search",
|
|
@@ -3869,36 +3873,36 @@ function Da({ placeholder: e, "aria-label": t, className: n, size: o, of: r }) {
|
|
|
3869
3873
|
}
|
|
3870
3874
|
);
|
|
3871
3875
|
}
|
|
3872
|
-
function
|
|
3873
|
-
const n = pt(t), o =
|
|
3874
|
-
if (
|
|
3875
|
-
var
|
|
3876
|
+
function Pa({ size: e, of: t }) {
|
|
3877
|
+
const n = pt(t), o = St(e), r = ke(), [s, l] = Z(!1), c = fe(null), i = fe(null), a = Fe(), [f, d] = Z(null);
|
|
3878
|
+
if (le(() => {
|
|
3879
|
+
var O;
|
|
3876
3880
|
if (!f || !i.current) return;
|
|
3877
3881
|
const y = Array.from(i.current.children).find(
|
|
3878
3882
|
(I) => I.dataset.column === f.id
|
|
3879
3883
|
), _ = y == null ? void 0 : y.querySelector(f.key), x = f.otherwise ? y == null ? void 0 : y.querySelector(f.otherwise) : void 0;
|
|
3880
|
-
(
|
|
3884
|
+
(O = _ && !_.disabled ? _ : x) == null || O.focus();
|
|
3881
3885
|
}, [f]), !n) return null;
|
|
3882
|
-
const { registry: m, snapshot: w } = n, g = m.hook, v = m.inPinOrder(
|
|
3886
|
+
const { registry: m, snapshot: w } = n, g = m.hook, v = m.inPinOrder(tn(m.modelColumns(g.rows, g.formats), w.order)), p = m.pins(), b = (y, _) => {
|
|
3883
3887
|
const x = v[y + _];
|
|
3884
3888
|
return x !== void 0 && p[x.id] === p[v[y].id];
|
|
3885
3889
|
}, R = (y, _) => {
|
|
3886
|
-
const x = v.map((
|
|
3890
|
+
const x = v.map((M) => M.id), O = y + _;
|
|
3887
3891
|
if (!b(y, _)) return;
|
|
3888
|
-
[x[y], x[
|
|
3892
|
+
[x[y], x[O]] = [x[O], x[y]], w.setOrder(x);
|
|
3889
3893
|
const [I, A] = _ < 0 ? ["forward", "backward"] : ["backward", "forward"];
|
|
3890
3894
|
d({ id: v[y].id, key: `[data-direction="${I}"]`, otherwise: `[data-direction="${A}"]` });
|
|
3891
3895
|
}, E = (y, _, x) => {
|
|
3892
|
-
const
|
|
3893
|
-
return /* @__PURE__ */ u(dt, { content:
|
|
3896
|
+
const O = p[y] === x;
|
|
3897
|
+
return /* @__PURE__ */ u(dt, { content: O ? r.unpinHint : x === "start" ? r.pinToStartHint : r.pinToEndHint, children: /* @__PURE__ */ u(
|
|
3894
3898
|
"button",
|
|
3895
3899
|
{
|
|
3896
3900
|
type: "button",
|
|
3897
|
-
className: j(h.move,
|
|
3901
|
+
className: j(h.move, O && h.pinOn),
|
|
3898
3902
|
"data-pin": x,
|
|
3899
|
-
"aria-label":
|
|
3903
|
+
"aria-label": O ? r.unpinColumn(_) : x === "start" ? r.pinColumnToStart(_) : r.pinColumnToEnd(_),
|
|
3900
3904
|
onClick: () => {
|
|
3901
|
-
w.setPin(y,
|
|
3905
|
+
w.setPin(y, O ? null : x), d({ id: y, key: `[data-pin="${x}"]` });
|
|
3902
3906
|
},
|
|
3903
3907
|
children: /* @__PURE__ */ u("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ u(
|
|
3904
3908
|
"path",
|
|
@@ -3914,9 +3918,9 @@ function Ba({ size: e, of: t }) {
|
|
|
3914
3918
|
}
|
|
3915
3919
|
) });
|
|
3916
3920
|
};
|
|
3917
|
-
return /* @__PURE__ */ T(
|
|
3921
|
+
return /* @__PURE__ */ T(Se, { children: [
|
|
3918
3922
|
/* @__PURE__ */ u(
|
|
3919
|
-
|
|
3923
|
+
ge,
|
|
3920
3924
|
{
|
|
3921
3925
|
ref: c,
|
|
3922
3926
|
size: o,
|
|
@@ -3928,7 +3932,7 @@ function Ba({ size: e, of: t }) {
|
|
|
3928
3932
|
}
|
|
3929
3933
|
),
|
|
3930
3934
|
/* @__PURE__ */ T(
|
|
3931
|
-
|
|
3935
|
+
_t,
|
|
3932
3936
|
{
|
|
3933
3937
|
open: s,
|
|
3934
3938
|
onOpenChange: l,
|
|
@@ -3943,7 +3947,7 @@ function Ba({ size: e, of: t }) {
|
|
|
3943
3947
|
const x = y.label ?? y.id;
|
|
3944
3948
|
return /* @__PURE__ */ T("li", { className: h.columnsEntry, "data-column": y.id, children: [
|
|
3945
3949
|
/* @__PURE__ */ u(
|
|
3946
|
-
|
|
3950
|
+
tt,
|
|
3947
3951
|
{
|
|
3948
3952
|
label: x,
|
|
3949
3953
|
checked: !w.hidden.includes(y.id),
|
|
@@ -3979,18 +3983,18 @@ function Ba({ size: e, of: t }) {
|
|
|
3979
3983
|
E(y.id, x, "end")
|
|
3980
3984
|
] }, y.id);
|
|
3981
3985
|
}) }),
|
|
3982
|
-
/* @__PURE__ */ u(
|
|
3983
|
-
/* @__PURE__ */ u(
|
|
3986
|
+
/* @__PURE__ */ u(Ei, { registry: m, hook: g }),
|
|
3987
|
+
/* @__PURE__ */ u(Di, { registry: m, hook: g })
|
|
3984
3988
|
]
|
|
3985
3989
|
}
|
|
3986
3990
|
)
|
|
3987
3991
|
] });
|
|
3988
3992
|
}
|
|
3989
3993
|
function za({ filename: e, onExport: t, size: n, of: o }) {
|
|
3990
|
-
const r = pt(o), s =
|
|
3994
|
+
const r = pt(o), s = St(n), l = ke();
|
|
3991
3995
|
if (!r) return null;
|
|
3992
3996
|
const { snapshot: c } = r;
|
|
3993
|
-
return /* @__PURE__ */ u(
|
|
3997
|
+
return /* @__PURE__ */ u(ge, { size: s, onClick: () => {
|
|
3994
3998
|
const a = c.asCsv();
|
|
3995
3999
|
if (t) {
|
|
3996
4000
|
t(a);
|
|
@@ -4000,16 +4004,16 @@ function za({ filename: e, onExport: t, size: n, of: o }) {
|
|
|
4000
4004
|
d.href = f, d.download = e ?? l.exportFileName, d.click(), setTimeout(() => URL.revokeObjectURL(f), 1e4);
|
|
4001
4005
|
}, children: c.manual ? l.exportPageLabel : l.exportLabel });
|
|
4002
4006
|
}
|
|
4003
|
-
function
|
|
4004
|
-
const o = pt(n), r =
|
|
4005
|
-
if (
|
|
4007
|
+
function Ia({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
|
|
4008
|
+
const o = pt(n), r = ke(), s = Ee();
|
|
4009
|
+
if (ln(o == null ? void 0 : o.registry, "pagination"), o != null && o.registry.tree && ve("tree-pagination", "`Pagination` is passed over with `childRows`: a page cut through a branch tears rows from their parent. A large tree uses `virtual`."), !o || o.snapshot.virtual || o.registry.tree) return null;
|
|
4006
4010
|
const { snapshot: l } = o, c = l.rowCount, i = e.includes(l.pageSize) ? e : [...e, l.pageSize].sort((f, d) => f - d), a = /* @__PURE__ */ T("nav", { "aria-label": r.pagination, className: j(h.pagination, t), children: [
|
|
4007
4011
|
/* @__PURE__ */ u("span", { children: r.entries(c, s.count(c)) }),
|
|
4008
4012
|
/* @__PURE__ */ T("div", { className: h.paginationControls, children: [
|
|
4009
4013
|
/* @__PURE__ */ T("label", { className: h.pageSize, children: [
|
|
4010
4014
|
r.rows,
|
|
4011
4015
|
/* @__PURE__ */ u(
|
|
4012
|
-
|
|
4016
|
+
Bn,
|
|
4013
4017
|
{
|
|
4014
4018
|
size: "sm",
|
|
4015
4019
|
chars: Math.max(...i.map((f) => String(f).length)),
|
|
@@ -4025,88 +4029,88 @@ function Pa({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
|
|
|
4025
4029
|
page: s.count(l.page),
|
|
4026
4030
|
total: s.count(l.pageCount)
|
|
4027
4031
|
}) }),
|
|
4028
|
-
/* @__PURE__ */ u(
|
|
4029
|
-
/* @__PURE__ */ u(
|
|
4032
|
+
/* @__PURE__ */ u(ge, { size: "sm", disabled: l.page <= 1, onClick: () => l.setPage(l.page - 1), children: r.previousPage }),
|
|
4033
|
+
/* @__PURE__ */ u(ge, { size: "sm", disabled: l.page >= l.pageCount, onClick: () => l.setPage(l.page + 1), children: r.nextPage })
|
|
4030
4034
|
] })
|
|
4031
4035
|
] })
|
|
4032
4036
|
] });
|
|
4033
|
-
return o.inside ? o.footerTarget ?
|
|
4037
|
+
return o.inside ? o.footerTarget ? In(a, o.footerTarget) : null : a;
|
|
4034
4038
|
}
|
|
4035
|
-
const
|
|
4036
|
-
function
|
|
4039
|
+
const Hl = ["high", "medium", "low"], jl = (e) => Hl.indexOf(e), Wl = (e) => e === "active-unacknowledged" || e === "active-acknowledged", Nt = (e) => e === "active-acknowledged" || e === "resolved-acknowledged", ql = (e) => e === "resolved-acknowledged";
|
|
4040
|
+
function Ul(e, t) {
|
|
4037
4041
|
switch (t) {
|
|
4038
4042
|
case "raised":
|
|
4039
4043
|
return "active-unacknowledged";
|
|
4040
4044
|
case "acknowledged":
|
|
4041
|
-
return
|
|
4045
|
+
return Wl(e) ? "active-acknowledged" : "resolved-acknowledged";
|
|
4042
4046
|
case "resolved":
|
|
4043
|
-
return
|
|
4047
|
+
return Nt(e) ? "resolved-acknowledged" : "resolved-unacknowledged";
|
|
4044
4048
|
}
|
|
4045
4049
|
}
|
|
4046
|
-
const
|
|
4050
|
+
const Yl = [
|
|
4047
4051
|
"in-service",
|
|
4048
4052
|
"snoozed",
|
|
4049
4053
|
"suppressed",
|
|
4050
4054
|
"disabled"
|
|
4051
|
-
],
|
|
4052
|
-
function
|
|
4055
|
+
], Ut = (e) => e !== "in-service";
|
|
4056
|
+
function Jl(e, t) {
|
|
4053
4057
|
return e.availability === "snoozed" ? t >= e.snooze.until ? "in-service" : "snoozed" : e.availability ?? "in-service";
|
|
4054
4058
|
}
|
|
4055
|
-
function
|
|
4059
|
+
function $a(e, t, n) {
|
|
4056
4060
|
return e.availability === "disabled" || e.availability === "suppressed" ? e : { ...e, availability: "snoozed", snooze: { until: t, by: n } };
|
|
4057
4061
|
}
|
|
4058
|
-
function
|
|
4062
|
+
function Va(e) {
|
|
4059
4063
|
return e.availability !== "snoozed" ? e : { ...e, availability: "in-service", snooze: void 0 };
|
|
4060
4064
|
}
|
|
4061
|
-
function
|
|
4065
|
+
function Ga(e) {
|
|
4062
4066
|
return e.availability === "disabled" || e.availability === "suppressed" ? e : { ...e, availability: "disabled", snooze: void 0 };
|
|
4063
4067
|
}
|
|
4064
4068
|
function Ka(e) {
|
|
4065
4069
|
return e.availability !== "disabled" ? e : { ...e, availability: "in-service" };
|
|
4066
4070
|
}
|
|
4067
|
-
const
|
|
4068
|
-
function
|
|
4071
|
+
const Ha = (e, t) => e.direction === "upper" ? t <= e.returnTo : t >= e.returnTo, an = (e, t, n) => e > n - t && e <= n, ja = (e, t, n) => e.reduce((o, r) => o + (an(r, t, n) ? 1 : 0), 0);
|
|
4072
|
+
function Xl(e, t, n) {
|
|
4069
4073
|
const o = /* @__PURE__ */ new Map();
|
|
4070
4074
|
for (const r of e)
|
|
4071
|
-
|
|
4075
|
+
an(r.raised, t, n) && o.set(r.type, (o.get(r.type) ?? 0) + 1);
|
|
4072
4076
|
return o;
|
|
4073
4077
|
}
|
|
4074
|
-
function
|
|
4078
|
+
function Ql(e) {
|
|
4075
4079
|
let t = Number.POSITIVE_INFINITY;
|
|
4076
4080
|
for (const n of e) n < t && (t = n);
|
|
4077
4081
|
return t;
|
|
4078
4082
|
}
|
|
4079
|
-
function
|
|
4083
|
+
function Zl(e) {
|
|
4080
4084
|
let t = Number.NEGATIVE_INFINITY;
|
|
4081
4085
|
for (const n of e) n > t && (t = n);
|
|
4082
4086
|
return t;
|
|
4083
4087
|
}
|
|
4084
|
-
function
|
|
4085
|
-
const o = e.filter((s) =>
|
|
4088
|
+
function ea(e, t, n) {
|
|
4089
|
+
const o = e.filter((s) => an(s.raised, t.windowMs, n));
|
|
4086
4090
|
if (o.length < t.atLeast) return null;
|
|
4087
4091
|
const r = o.map((s) => s.raised);
|
|
4088
4092
|
return {
|
|
4089
4093
|
// No spread: a flood is the case with many elements, and an argument list
|
|
4090
4094
|
// of that size blows the call stack at some point. A loop cannot.
|
|
4091
|
-
from:
|
|
4092
|
-
to:
|
|
4095
|
+
from: Ql(r),
|
|
4096
|
+
to: Zl(r),
|
|
4093
4097
|
count: o.length,
|
|
4094
4098
|
alarms: o.map((s) => s.id)
|
|
4095
4099
|
};
|
|
4096
4100
|
}
|
|
4097
|
-
function
|
|
4101
|
+
function ta(e, t) {
|
|
4098
4102
|
const n = new Set(t);
|
|
4099
4103
|
return e.reduce(
|
|
4100
|
-
(o, r) => o + (n.has(r.id) && !
|
|
4104
|
+
(o, r) => o + (n.has(r.id) && !Nt(r.lifecycle) ? 1 : 0),
|
|
4101
4105
|
0
|
|
4102
4106
|
);
|
|
4103
4107
|
}
|
|
4104
|
-
function
|
|
4108
|
+
function Wa(e, t, n) {
|
|
4105
4109
|
const o = new Set(t);
|
|
4106
4110
|
let r = 0;
|
|
4107
|
-
return { alarms: e.map((l) => !o.has(l.id) ||
|
|
4111
|
+
return { alarms: e.map((l) => !o.has(l.id) || Nt(l.lifecycle) ? l : (r += 1, { ...l, lifecycle: Ul(l.lifecycle, "acknowledged"), acknowledgedAt: n })), count: r };
|
|
4108
4112
|
}
|
|
4109
|
-
const
|
|
4113
|
+
const na = (e) => [
|
|
4110
4114
|
{
|
|
4111
4115
|
id: "type",
|
|
4112
4116
|
label: e.columnAlarm,
|
|
@@ -4117,27 +4121,27 @@ const ta = (e) => [
|
|
|
4117
4121
|
{ id: "lifecycle", label: e.columnLifecycleState, value: (t) => t.lifecycle, searchable: !0 },
|
|
4118
4122
|
/* The rank, like the priority: the column exists for the first level of the
|
|
4119
4123
|
order. */
|
|
4120
|
-
{ id: "availability", label: e.columnAvailability, value: (t) =>
|
|
4124
|
+
{ id: "availability", label: e.columnAvailability, value: (t) => Yl.indexOf(t.availability) },
|
|
4121
4125
|
{ id: "priority", label: e.columnPriority, value: (t) => t.rank },
|
|
4122
4126
|
/* A column of its own instead of a glance at the lifecycle state: the second
|
|
4123
4127
|
level of the order asks only about the acknowledgement and expressly not
|
|
4124
4128
|
about whether the alarm is still active. Otherwise the fleeting alarm
|
|
4125
4129
|
falls back down again. */
|
|
4126
|
-
{ id: "acknowledgement", label: e.columnAcknowledgement, value: (t) =>
|
|
4130
|
+
{ id: "acknowledgement", label: e.columnAcknowledgement, value: (t) => Nt(t.lifecycle) ? 1 : 0 },
|
|
4127
4131
|
{ id: "raised", label: e.columnRaised, value: (t) => t.alarm.raised },
|
|
4128
4132
|
{ id: "age", label: e.columnAge, value: (t) => t.age },
|
|
4129
4133
|
{ id: "frequency", label: e.columnFrequency, value: (t) => t.frequency }
|
|
4130
|
-
],
|
|
4134
|
+
], oa = na(Ao), ra = [
|
|
4131
4135
|
{ column: "availability", direction: "asc" },
|
|
4132
4136
|
{ column: "priority", direction: "asc" },
|
|
4133
4137
|
{ column: "acknowledgement", direction: "asc" },
|
|
4134
4138
|
{ column: "raised", direction: "desc" }
|
|
4135
|
-
],
|
|
4139
|
+
], sa = (e) => ({
|
|
4136
4140
|
id: e,
|
|
4137
4141
|
label: e,
|
|
4138
4142
|
priority: "high"
|
|
4139
4143
|
});
|
|
4140
|
-
function
|
|
4144
|
+
function qa(e, t = {}) {
|
|
4141
4145
|
const {
|
|
4142
4146
|
alarms: n,
|
|
4143
4147
|
types: o,
|
|
@@ -4145,59 +4149,59 @@ function Wa(e, t = {}) {
|
|
|
4145
4149
|
chatter: s,
|
|
4146
4150
|
flood: l,
|
|
4147
4151
|
keepDone: c = !1,
|
|
4148
|
-
columns: i =
|
|
4149
|
-
} = e, a = new Map(o.map((v) => [v.id, v])), f =
|
|
4150
|
-
const p = a.get(v.type) ??
|
|
4152
|
+
columns: i = oa
|
|
4153
|
+
} = e, a = new Map(o.map((v) => [v.id, v])), f = Xl(n, (s == null ? void 0 : s.windowMs) ?? 1 / 0, r), d = l ? ea(n, l, r) : null, m = new Set((d == null ? void 0 : d.alarms) ?? []), w = n.filter((v) => c || !ql(v.lifecycle)).map((v) => {
|
|
4154
|
+
const p = a.get(v.type) ?? sa(v.type), b = f.get(v.type) ?? 0;
|
|
4151
4155
|
return {
|
|
4152
4156
|
id: v.id,
|
|
4153
4157
|
alarm: v,
|
|
4154
4158
|
type: p,
|
|
4155
4159
|
lifecycle: v.lifecycle,
|
|
4156
|
-
availability:
|
|
4160
|
+
availability: Jl(v, r),
|
|
4157
4161
|
priority: p.priority,
|
|
4158
|
-
rank:
|
|
4162
|
+
rank: jl(p.priority),
|
|
4159
4163
|
age: r - v.raised,
|
|
4160
4164
|
duration: (v.resolved ?? r) - v.raised,
|
|
4161
4165
|
frequency: b,
|
|
4162
4166
|
chatters: s !== void 0 && b >= s.atLeast,
|
|
4163
4167
|
inFlood: m.has(v.id)
|
|
4164
4168
|
};
|
|
4165
|
-
}), g =
|
|
4169
|
+
}), g = nn(w, i, {
|
|
4166
4170
|
...t,
|
|
4167
|
-
sort: t.sort === void 0 ?
|
|
4171
|
+
sort: t.sort === void 0 ? ra : t.sort
|
|
4168
4172
|
});
|
|
4169
4173
|
return {
|
|
4170
4174
|
...g,
|
|
4171
4175
|
flood: d,
|
|
4172
4176
|
activeUnacknowledged: g.filtered.reduce(
|
|
4173
|
-
(v, p) => v + (p.lifecycle === "active-unacknowledged" && !
|
|
4177
|
+
(v, p) => v + (p.lifecycle === "active-unacknowledged" && !Ut(p.availability) ? 1 : 0),
|
|
4174
4178
|
0
|
|
4175
4179
|
),
|
|
4176
4180
|
hiddenAlarms: g.filtered.reduce(
|
|
4177
|
-
(v, p) => v + (
|
|
4181
|
+
(v, p) => v + (Ut(p.availability) ? 1 : 0),
|
|
4178
4182
|
0
|
|
4179
4183
|
)
|
|
4180
4184
|
};
|
|
4181
4185
|
}
|
|
4182
|
-
const
|
|
4183
|
-
list:
|
|
4184
|
-
bar:
|
|
4185
|
-
heading:
|
|
4186
|
-
filler:
|
|
4187
|
-
asOf:
|
|
4188
|
-
live:
|
|
4189
|
-
alarm:
|
|
4190
|
-
label:
|
|
4191
|
-
counter:
|
|
4192
|
-
state:
|
|
4193
|
-
lifecycle:
|
|
4194
|
-
hidden:
|
|
4195
|
-
hiddenLabel:
|
|
4196
|
-
availability:
|
|
4197
|
-
empty:
|
|
4198
|
-
row:
|
|
4186
|
+
const ia = "_list_1t95e_4 _text_r8i8z_23", la = "_bar_1t95e_12", aa = "_heading_1t95e_19", ca = "_filler_1t95e_25", ua = "_asOf_1t95e_29", da = "_live_1t95e_46", fa = "_alarm_1t95e_54", ha = "_label_1t95e_59", pa = "_counter_1t95e_63", ma = "_state_1t95e_70", ga = "_lifecycle_1t95e_74", ba = "_hidden_1t95e_80", va = "_hiddenLabel_1t95e_87", wa = "_availability_1t95e_93", ya = "_empty_1t95e_97", _a = "_row_1t95e_105", _e = {
|
|
4187
|
+
list: ia,
|
|
4188
|
+
bar: la,
|
|
4189
|
+
heading: aa,
|
|
4190
|
+
filler: ca,
|
|
4191
|
+
asOf: ua,
|
|
4192
|
+
live: da,
|
|
4193
|
+
alarm: fa,
|
|
4194
|
+
label: ha,
|
|
4195
|
+
counter: pa,
|
|
4196
|
+
state: ma,
|
|
4197
|
+
lifecycle: ga,
|
|
4198
|
+
hidden: ba,
|
|
4199
|
+
hiddenLabel: va,
|
|
4200
|
+
availability: wa,
|
|
4201
|
+
empty: ya,
|
|
4202
|
+
row: _a
|
|
4199
4203
|
};
|
|
4200
|
-
function
|
|
4204
|
+
function ka(e, t) {
|
|
4201
4205
|
switch (e) {
|
|
4202
4206
|
case "active-unacknowledged":
|
|
4203
4207
|
return t.lifecycleActiveUnacknowledged;
|
|
@@ -4209,7 +4213,7 @@ function _a(e, t) {
|
|
|
4209
4213
|
return t.lifecycleResolvedAcknowledged;
|
|
4210
4214
|
}
|
|
4211
4215
|
}
|
|
4212
|
-
function
|
|
4216
|
+
function Sa(e, t, n) {
|
|
4213
4217
|
switch (e.availability) {
|
|
4214
4218
|
case "snoozed": {
|
|
4215
4219
|
const o = e.alarm.snooze;
|
|
@@ -4225,29 +4229,29 @@ function ka(e, t, n) {
|
|
|
4225
4229
|
return null;
|
|
4226
4230
|
}
|
|
4227
4231
|
}
|
|
4228
|
-
function
|
|
4232
|
+
function Ca(e, t) {
|
|
4229
4233
|
return e === "high" ? t.priorityHigh : e === "medium" ? t.priorityMedium : t.priorityLow;
|
|
4230
4234
|
}
|
|
4231
|
-
function
|
|
4235
|
+
function xa(e) {
|
|
4232
4236
|
return e === "high" ? "danger" : e === "medium" ? "warning" : "neutral";
|
|
4233
4237
|
}
|
|
4234
|
-
function
|
|
4238
|
+
function Na(e, t) {
|
|
4235
4239
|
const n = Math.max(0, Math.floor(e / 6e4)), o = Math.floor(n / 60), r = n % 60, s = [];
|
|
4236
4240
|
return o > 0 && s.push(t.hoursShort(o)), (o === 0 || r > 0) && s.push(t.minutesShort(r)), s.join(" ");
|
|
4237
4241
|
}
|
|
4238
|
-
function
|
|
4242
|
+
function Ua(e) {
|
|
4239
4243
|
const { asOf: t, freshness: n, ...o } = e;
|
|
4240
|
-
return t === void 0 || n === void 0 ? /* @__PURE__ */ u(
|
|
4244
|
+
return t === void 0 || n === void 0 ? /* @__PURE__ */ u(po, { ...o, freshness: null }) : /* @__PURE__ */ u(Aa, { ...o, asOf: t, ages: n });
|
|
4241
4245
|
}
|
|
4242
|
-
function
|
|
4246
|
+
function Aa({
|
|
4243
4247
|
asOf: e,
|
|
4244
4248
|
ages: t,
|
|
4245
4249
|
...n
|
|
4246
4250
|
}) {
|
|
4247
|
-
const o =
|
|
4248
|
-
return /* @__PURE__ */ u(
|
|
4251
|
+
const o = Ro(e, t);
|
|
4252
|
+
return /* @__PURE__ */ u(po, { ...n, freshness: o });
|
|
4249
4253
|
}
|
|
4250
|
-
function
|
|
4254
|
+
function po({
|
|
4251
4255
|
view: e,
|
|
4252
4256
|
selection: t,
|
|
4253
4257
|
onAcknowledge: n,
|
|
@@ -4258,28 +4262,28 @@ function ho({
|
|
|
4258
4262
|
onHiddenOnlyChange: c,
|
|
4259
4263
|
...i
|
|
4260
4264
|
}) {
|
|
4261
|
-
const a =
|
|
4262
|
-
return /* @__PURE__ */ T("div", { className: [
|
|
4263
|
-
/* @__PURE__ */ T("div", { className:
|
|
4264
|
-
/* @__PURE__ */ u("span", { className:
|
|
4265
|
+
const a = ke(), f = Ee(), d = s !== null, m = (s == null ? void 0 : s.freshness) === "lost", { Table: w, Column: g } = Kl(e.visible, { rowKey: (y) => y.id, selection: t }), v = se(() => e.filtered.map((y) => y.alarm), [e.filtered]), p = se(() => t === void 0 ? [] : e.filtered.map((y) => y.id).filter((y) => t.selected.has(y)), [e.filtered, t]), b = se(() => ta(v, p), [v, p]), R = zn(o, "compact"), E = a.hiddenAlarms(e.hiddenAlarms);
|
|
4266
|
+
return /* @__PURE__ */ T("div", { className: [_e.list, r].filter(Boolean).join(" "), ...i, children: [
|
|
4267
|
+
/* @__PURE__ */ T("div", { className: _e.bar, children: [
|
|
4268
|
+
/* @__PURE__ */ u("span", { className: _e.heading, children: a.alarms }),
|
|
4265
4269
|
e.flood !== null && /* @__PURE__ */ u(at, { tone: "warning", children: a.floodHint(e.flood.count) }),
|
|
4266
|
-
d && s !== null && /* @__PURE__ */ T("span", { className:
|
|
4270
|
+
d && s !== null && /* @__PURE__ */ T("span", { className: _e.asOf, "data-freshness": s.freshness, children: [
|
|
4267
4271
|
s.freshness === "lost" ? a.freshnessDisconnected : s.freshness === "stale" ? a.freshnessStale : a.freshnessFresh,
|
|
4268
4272
|
s.age !== null && ` · ${f.relative(s.age)}`
|
|
4269
4273
|
] }),
|
|
4270
4274
|
c !== void 0 && (e.hiddenAlarms > 0 || l) ? /* @__PURE__ */ u(
|
|
4271
|
-
|
|
4275
|
+
tt,
|
|
4272
4276
|
{
|
|
4273
|
-
className:
|
|
4277
|
+
className: _e.hidden,
|
|
4274
4278
|
checked: l,
|
|
4275
4279
|
onChange: (y) => c(y.currentTarget.checked),
|
|
4276
|
-
label: /* @__PURE__ */ u("span", { className:
|
|
4280
|
+
label: /* @__PURE__ */ u("span", { className: _e.hiddenLabel, children: E })
|
|
4277
4281
|
}
|
|
4278
|
-
) : e.hiddenAlarms > 0 && /* @__PURE__ */ u("span", { className:
|
|
4279
|
-
/* @__PURE__ */ u("span", { className:
|
|
4280
|
-
t !== void 0 && n !== void 0 && /* @__PURE__ */ u(
|
|
4282
|
+
) : e.hiddenAlarms > 0 && /* @__PURE__ */ u("span", { className: _e.hidden, children: E }),
|
|
4283
|
+
/* @__PURE__ */ u("span", { className: _e.filler }),
|
|
4284
|
+
t !== void 0 && n !== void 0 && /* @__PURE__ */ u(ge, { variant: "primary", size: "sm", disabled: b === 0, onClick: () => n(p), children: b === 0 ? a.acknowledgeAlarm : a.acknowledgeAlarms(b) })
|
|
4281
4285
|
] }),
|
|
4282
|
-
/* @__PURE__ */ u("div", { "aria-live": "polite", "aria-atomic": "true", className:
|
|
4286
|
+
/* @__PURE__ */ u("div", { "aria-live": "polite", "aria-atomic": "true", className: _e.live, children: a.activeUnacknowledged(e.activeUnacknowledged) }),
|
|
4283
4287
|
/* @__PURE__ */ T(
|
|
4284
4288
|
w,
|
|
4285
4289
|
{
|
|
@@ -4288,28 +4292,28 @@ function ho({
|
|
|
4288
4292
|
density: R,
|
|
4289
4293
|
stickyHeader: !0,
|
|
4290
4294
|
rowProps: (y) => ({
|
|
4291
|
-
className:
|
|
4295
|
+
className: _e.row,
|
|
4292
4296
|
"data-lifecycle": y.lifecycle,
|
|
4293
4297
|
"data-priority": y.priority,
|
|
4294
4298
|
"data-availability": y.availability
|
|
4295
4299
|
}),
|
|
4296
|
-
empty: /* @__PURE__ */ u("span", { className:
|
|
4300
|
+
empty: /* @__PURE__ */ u("span", { className: _e.empty, children: m ? a.noAlarmsDisconnected : a.noAlarms }),
|
|
4297
4301
|
children: [
|
|
4298
|
-
/* @__PURE__ */ u(g, { id: "type", label: a.columnAlarm, value: (y) => y.type.label, rowHeader: !0, sortable: !1, children: (y, _) => /* @__PURE__ */ T("span", { className:
|
|
4299
|
-
/* @__PURE__ */ u("span", { className:
|
|
4300
|
-
_.chatters && /* @__PURE__ */ u(at, { tone: "warning", pill: !0, className:
|
|
4302
|
+
/* @__PURE__ */ u(g, { id: "type", label: a.columnAlarm, value: (y) => y.type.label, rowHeader: !0, sortable: !1, children: (y, _) => /* @__PURE__ */ T("span", { className: _e.alarm, children: [
|
|
4303
|
+
/* @__PURE__ */ u("span", { className: _e.label, children: y }),
|
|
4304
|
+
_.chatters && /* @__PURE__ */ u(at, { tone: "warning", pill: !0, className: _e.counter, children: a.chatterHint(_.frequency) })
|
|
4301
4305
|
] }) }),
|
|
4302
4306
|
/* @__PURE__ */ u(g, { value: "lifecycle", label: a.columnLifecycleState, sortable: !1, children: (y, _) => {
|
|
4303
|
-
const x =
|
|
4307
|
+
const x = Sa(_, a, f), O = x === null ? null : x.short === x.full ? /* @__PURE__ */ u(at, { className: _e.availability, children: x.short }) : /* @__PURE__ */ u(dt, { content: x.full, children: /* @__PURE__ */ T(at, { className: _e.availability, children: [
|
|
4304
4308
|
/* @__PURE__ */ u("span", { "aria-hidden": "true", children: x.short }),
|
|
4305
|
-
/* @__PURE__ */ u(
|
|
4309
|
+
/* @__PURE__ */ u(Ge, { children: x.full })
|
|
4306
4310
|
] }) });
|
|
4307
|
-
return /* @__PURE__ */ T("span", { className:
|
|
4308
|
-
|
|
4309
|
-
/* @__PURE__ */ u("span", { className:
|
|
4311
|
+
return /* @__PURE__ */ T("span", { className: _e.state, children: [
|
|
4312
|
+
O,
|
|
4313
|
+
/* @__PURE__ */ u("span", { className: _e.lifecycle, children: ka(y, a) })
|
|
4310
4314
|
] });
|
|
4311
4315
|
} }),
|
|
4312
|
-
/* @__PURE__ */ u(g, { value: "priority", label: a.columnPriority, sortable: !1, children: (y, _) => /* @__PURE__ */ u(at, { tone:
|
|
4316
|
+
/* @__PURE__ */ u(g, { value: "priority", label: a.columnPriority, sortable: !1, children: (y, _) => /* @__PURE__ */ u(at, { tone: Ut(_.availability) ? "neutral" : xa(y), children: Ca(y, a) }) }),
|
|
4313
4317
|
/* @__PURE__ */ u(
|
|
4314
4318
|
g,
|
|
4315
4319
|
{
|
|
@@ -4320,49 +4324,49 @@ function ho({
|
|
|
4320
4324
|
sortable: !1
|
|
4321
4325
|
}
|
|
4322
4326
|
),
|
|
4323
|
-
/* @__PURE__ */ u(g, { value: "duration", label: a.columnDuration, sortable: !1, children: (y) => /* @__PURE__ */ u("span", { className:
|
|
4327
|
+
/* @__PURE__ */ u(g, { value: "duration", label: a.columnDuration, sortable: !1, children: (y) => /* @__PURE__ */ u("span", { className: _e.state, children: Na(y, a) }) }),
|
|
4324
4328
|
/* @__PURE__ */ u(g, { value: "frequency", label: a.columnFrequency, format: "count", sortable: !1 })
|
|
4325
4329
|
]
|
|
4326
4330
|
}
|
|
4327
4331
|
)
|
|
4328
4332
|
] });
|
|
4329
4333
|
}
|
|
4330
|
-
function
|
|
4334
|
+
function Ya(e) {
|
|
4331
4335
|
return e;
|
|
4332
4336
|
}
|
|
4333
4337
|
export {
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4338
|
+
oa as ALARM_COLUMNS,
|
|
4339
|
+
Yl as AVAILABILITIES,
|
|
4340
|
+
Ua as AlarmList,
|
|
4341
|
+
Pa as ColumnMenu,
|
|
4342
|
+
ra as DEFAULT_ORDER,
|
|
4339
4343
|
za as Export,
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4344
|
+
Hl as PRIORITIES,
|
|
4345
|
+
Ia as Pagination,
|
|
4346
|
+
Ba as Search,
|
|
4347
|
+
Da as Toolbar,
|
|
4348
|
+
Wa as acknowledge,
|
|
4349
|
+
na as alarmColumns,
|
|
4350
|
+
qa as alarmModel,
|
|
4351
|
+
Jl as availabilityAt,
|
|
4352
|
+
Ea as column,
|
|
4353
|
+
Fa as columnFilter,
|
|
4354
|
+
ta as countAcknowledgeable,
|
|
4355
|
+
ja as countInWindow,
|
|
4356
|
+
ea as detectFlood,
|
|
4357
|
+
Ga as disable,
|
|
4354
4358
|
Ka as enable,
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4359
|
+
Xl as frequencyByType,
|
|
4360
|
+
Ha as hasReturned,
|
|
4361
|
+
Nt as isAcknowledged,
|
|
4362
|
+
Wl as isActive,
|
|
4363
|
+
ql as isDone,
|
|
4364
|
+
Ut as isHidden,
|
|
4365
|
+
Ul as nextLifecycleState,
|
|
4366
|
+
jl as priorityRank,
|
|
4367
|
+
Ya as rowFilter,
|
|
4368
|
+
$a as snooze,
|
|
4369
|
+
Va as unsnooze,
|
|
4366
4370
|
Kl as useTable,
|
|
4367
|
-
|
|
4371
|
+
To as useTableSelection
|
|
4368
4372
|
};
|