@umriss-ui/table 0.40.3 → 0.41.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 +18 -0
- package/dist/styles.d.ts +1 -0
- package/dist/table.css +1 -1
- package/dist/table.js +1111 -1108
- package/docs/llms-full.md +1 -1
- package/package.json +16 -5
package/dist/table.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./table.css";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { DEFAULT_FORMATS as
|
|
5
|
-
import { jsx as f, jsxs as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
function
|
|
8
|
-
const [t, n] =
|
|
3
|
+
import { useState as I, useCallback as fe, useMemo as H, useRef as q, useId as be, useContext as _e, createContext as rt, useSyncExternalStore as st, useLayoutEffect as Z, useEffect as Ce } from "react";
|
|
4
|
+
import { DEFAULT_FORMATS as Cn, treeModel as rn, useVirtual as Oo, useFormats as xe, useWording as ie, Checkbox as We, DateRangePicker as Eo, FormField as vt, NumberInput as yt, separatorsOf as Mo, Tooltip as tt, Popover as it, Button as Q, TagGroup as An, Tag as Pt, Menu as Nn, MenuItem as nt, MenuSeparator as Lo, ControlSizeProvider as Tn, Select as Rn, VisuallyHidden as Oe, DatePicker as Fo, Input as On, announce as Bo, usePortalTarget as Do, IconButton as Po, AngleGlyph as Vo, useDensityFor as Io, assess as $o, verdictWeight as _t, allBranches as zo, duplicateKey as Ko } from "@umriss-ui/core";
|
|
5
|
+
import { jsx as f, jsxs as T, Fragment as re } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as En } from "react-dom";
|
|
7
|
+
function Go(e) {
|
|
8
|
+
const [t, n] = I(/* @__PURE__ */ new Set()), o = fe((a) => t.has(a), [t]), r = fe((a) => {
|
|
9
9
|
n((u) => {
|
|
10
10
|
const d = new Set(u);
|
|
11
11
|
return d.has(a) ? d.delete(a) : d.add(a), d;
|
|
@@ -28,7 +28,7 @@ const se = (e) => e == null || typeof e == "number" && Number.isNaN(e);
|
|
|
28
28
|
function lt(e) {
|
|
29
29
|
return se(e) ? "empty" : typeof e == "string" ? "text" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : e instanceof Date ? Number.isNaN(e.getTime()) ? "empty" : "date" : "other";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Mn(e, t) {
|
|
32
32
|
for (const n of e) {
|
|
33
33
|
const o = lt(t(n));
|
|
34
34
|
if (o !== "empty") return o;
|
|
@@ -36,7 +36,7 @@ function En(e, t) {
|
|
|
36
36
|
return "empty";
|
|
37
37
|
}
|
|
38
38
|
const Vt = (e, t) => t ?? e === "number";
|
|
39
|
-
function
|
|
39
|
+
function Pe(e, t, n, o) {
|
|
40
40
|
switch (lt(e)) {
|
|
41
41
|
case "text":
|
|
42
42
|
return e;
|
|
@@ -54,9 +54,9 @@ function Be(e, t, n, o) {
|
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function xt(e, t) {
|
|
58
58
|
if (!se(e)) {
|
|
59
|
-
if (t) return
|
|
59
|
+
if (t) return xt(t(e));
|
|
60
60
|
switch (lt(e)) {
|
|
61
61
|
case "text":
|
|
62
62
|
return e;
|
|
@@ -71,9 +71,9 @@ function kt(e, t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function It(e, t) {
|
|
75
75
|
if (!se(e)) {
|
|
76
|
-
if (t) return
|
|
76
|
+
if (t) return It(t(e));
|
|
77
77
|
switch (lt(e)) {
|
|
78
78
|
case "text":
|
|
79
79
|
return e;
|
|
@@ -88,12 +88,12 @@ function Pt(e, t) {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
function
|
|
91
|
+
const $t = "absent", Se = (e) => se(e) ? $t : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, sn = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
|
|
92
|
+
function zt(e, t) {
|
|
93
93
|
const n = t.map(e.read).filter((u) => !se(u) && !(u instanceof Date && Number.isNaN(u.getTime()))), o = e.aggregate;
|
|
94
94
|
if (typeof o == "function") return o(n, t);
|
|
95
95
|
if (o === "count") return n.length;
|
|
96
|
-
if (o === "distinct") return new Set(n.map(
|
|
96
|
+
if (o === "distinct") return new Set(n.map(Se)).size;
|
|
97
97
|
const r = n.filter((u) => sn(u) !== void 0);
|
|
98
98
|
if (r.length === 0) return;
|
|
99
99
|
const s = r.map((u) => sn(u)), i = r[0] instanceof Date, l = (u) => i ? new Date(u) : u;
|
|
@@ -113,7 +113,7 @@ function $t(e, t) {
|
|
|
113
113
|
return [l(c), l(a)];
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const Kt = 3, He = (e) => {
|
|
117
117
|
if (!se(e))
|
|
118
118
|
return e instanceof Date ? e.getTime() : typeof e == "boolean" ? e ? 1 : 0 : typeof e == "number" ? e : String(e);
|
|
119
119
|
};
|
|
@@ -121,31 +121,31 @@ function pt(e, t, n) {
|
|
|
121
121
|
const o = He(e), r = He(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 jo(e, t) {
|
|
125
|
+
const n = t.compareText ?? Cn.compareText, o = (r, s, i) => {
|
|
126
126
|
const l = /* @__PURE__ */ new Map(), c = t.levels[s];
|
|
127
127
|
if (!c) return [];
|
|
128
128
|
const a = /* @__PURE__ */ new Map();
|
|
129
129
|
for (const g of r) {
|
|
130
|
-
const v = c.value(g),
|
|
131
|
-
let y = a.get(
|
|
130
|
+
const v = c.value(g), C = Se(v);
|
|
131
|
+
let y = a.get(C);
|
|
132
132
|
y || (y = {
|
|
133
|
-
path: JSON.stringify([...i,
|
|
133
|
+
path: JSON.stringify([...i, C]),
|
|
134
134
|
value: se(v) ? void 0 : v,
|
|
135
135
|
level: s,
|
|
136
136
|
rows: [],
|
|
137
137
|
groups: [],
|
|
138
138
|
aggregates: {}
|
|
139
|
-
}, a.set(
|
|
139
|
+
}, a.set(C, y), l.set(y, [...i, C])), y.rows.push(g);
|
|
140
140
|
}
|
|
141
141
|
for (const g of a.values())
|
|
142
|
-
for (const v of t.aggregates ?? []) g.aggregates[v.id] =
|
|
142
|
+
for (const v of t.aggregates ?? []) g.aggregates[v.id] = zt(v, g.rows);
|
|
143
143
|
const u = t.sort?.find(
|
|
144
144
|
(g) => g.column === c.id || t.aggregates?.some((v) => v.id === g.column)
|
|
145
145
|
), d = u?.direction === "desc" ? -1 : 1, b = u !== void 0 && u.column !== c.id ? u.column : void 0, p = (g) => {
|
|
146
146
|
let v;
|
|
147
|
-
for (const
|
|
148
|
-
const y = c.order(
|
|
147
|
+
for (const C of g.rows) {
|
|
148
|
+
const y = c.order(C);
|
|
149
149
|
He(y) !== void 0 && (v === void 0 || pt(y, v, n) < 0) && (v = y);
|
|
150
150
|
}
|
|
151
151
|
return v;
|
|
@@ -155,8 +155,8 @@ function Ko(e, t) {
|
|
|
155
155
|
return Array.isArray(v) ? v[0] : v;
|
|
156
156
|
}, w = [...a.values()].sort((g, v) => {
|
|
157
157
|
if (g.value === void 0 || v.value === void 0) return pt(g.value, v.value, n);
|
|
158
|
-
const
|
|
159
|
-
return He(
|
|
158
|
+
const C = m(g), y = m(v), _ = pt(C, y, n);
|
|
159
|
+
return He(C) === void 0 || He(y) === void 0 ? _ : _ * d;
|
|
160
160
|
});
|
|
161
161
|
for (const g of w)
|
|
162
162
|
g.groups = o(g.rows, s + 1, l.get(g));
|
|
@@ -164,32 +164,32 @@ function Ko(e, t) {
|
|
|
164
164
|
};
|
|
165
165
|
return o(e, 0, []);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Ho(e, t) {
|
|
168
168
|
const n = /* @__PURE__ */ new Set(), o = (r) => {
|
|
169
169
|
for (const s of r)
|
|
170
170
|
n.add(s.path), o(s.groups);
|
|
171
171
|
};
|
|
172
172
|
return o(e), t.filter((r) => n.has(r));
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const Wo = (e) => (t) => {
|
|
175
175
|
if (!(t instanceof Date) || Number.isNaN(t.getTime())) return;
|
|
176
176
|
const n = t.getFullYear(), o = t.getMonth(), r = t.getDate();
|
|
177
177
|
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);
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function qo(e) {
|
|
180
180
|
const t = new Date(e.getFullYear(), e.getMonth(), e.getDate() + 3 - (e.getDay() + 6) % 7), n = new Date(t.getFullYear(), 0, 4);
|
|
181
181
|
return { week: 1 + Math.round((t.getTime() - n.getTime()) / 864e5 / 7 - ((n.getDay() + 6) % 7 - 3) / 7), year: t.getFullYear() };
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Yo(e, t, n, o) {
|
|
184
184
|
if (e === "year") return String(t.getFullYear());
|
|
185
185
|
if (e === "month") return n.month(t);
|
|
186
186
|
if (e === "week") {
|
|
187
|
-
const { week: r, year: s } =
|
|
187
|
+
const { week: r, year: s } = qo(t);
|
|
188
188
|
return o.calendarWeek(r, s);
|
|
189
189
|
}
|
|
190
190
|
return n.date(t);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ln(e, t) {
|
|
193
193
|
const n = [], o = (r, s) => {
|
|
194
194
|
for (const i of r) {
|
|
195
195
|
const l = t.has(i.path);
|
|
@@ -201,16 +201,16 @@ function Mn(e, t) {
|
|
|
201
201
|
};
|
|
202
202
|
return o(e, []), n;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Uo(e, t, n) {
|
|
205
205
|
const o = [0];
|
|
206
206
|
if (n > 0)
|
|
207
207
|
for (let l = 0; l += Math.max(1, n - (e[l]?.parents.length ?? 0)), !(l >= e.length); )
|
|
208
208
|
o.push(l);
|
|
209
209
|
const r = o.length, s = Math.min(Math.max(1, t), r), i = n > 0 ? e.slice(o[s - 1], o[s] ?? e.length) : [...e];
|
|
210
|
-
return { lines:
|
|
210
|
+
return { lines: Bn(i), page: s, pageCount: r };
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
function
|
|
212
|
+
const Fn = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
|
|
213
|
+
function Bn(e) {
|
|
214
214
|
const t = e[0];
|
|
215
215
|
if (!t) return [...e];
|
|
216
216
|
const n = t.parents.map((r, s) => ({
|
|
@@ -227,11 +227,11 @@ function Dn(e, t) {
|
|
|
227
227
|
...e.filter((n) => !t.includes(n.id))
|
|
228
228
|
] : e;
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
function
|
|
230
|
+
const Be = (e) => e == null || typeof e == "number" && Number.isNaN(e), Jo = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : Cn.compareText(String(e), String(t));
|
|
231
|
+
function Pn(e, t, n) {
|
|
232
232
|
const o = (t ?? "").trim().toLowerCase(), r = e.filter((i) => i.searchable && i.value), s = (i) => !o || r.some((l) => {
|
|
233
233
|
const c = l.value(i);
|
|
234
|
-
return !
|
|
234
|
+
return !Be(c) && String(c).toLowerCase().includes(o);
|
|
235
235
|
});
|
|
236
236
|
return { term: o, matches: (i) => s(i) && (n ? n(i) : !0) };
|
|
237
237
|
}
|
|
@@ -242,7 +242,7 @@ function Vn(e, t) {
|
|
|
242
242
|
const c = i.direction === "asc" ? 1 : -1, a = l.compare, u = l.value, d = o.length;
|
|
243
243
|
return o.push(u), u ? (b, p) => {
|
|
244
244
|
const m = b.keys[d], w = p.keys[d];
|
|
245
|
-
return
|
|
245
|
+
return Be(m) || Be(w) ? Be(m) === Be(w) ? 0 : Be(m) ? 1 : -1 : (a ? a(b.row, p.row) : Jo(m, w)) * c;
|
|
246
246
|
} : (b, p) => a(b.row, p.row) * c;
|
|
247
247
|
}).filter((i) => i !== null);
|
|
248
248
|
return { levels: n, sorted: (i) => (
|
|
@@ -256,21 +256,21 @@ function Vn(e, t) {
|
|
|
256
256
|
}).map((l) => l.row)
|
|
257
257
|
) };
|
|
258
258
|
}
|
|
259
|
-
function
|
|
260
|
-
const { matches: o } =
|
|
259
|
+
function In(e, t, n) {
|
|
260
|
+
const { matches: o } = Pn(t, n.search, n.filter), { levels: r, sorted: s } = Vn(t, n.sort);
|
|
261
261
|
return { filtered: s(e.filter(o)), levels: r };
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function $n(e, t, n) {
|
|
264
|
+
return jo(e, { levels: n.levels, aggregates: n.aggregates, compareText: n.compareText, sort: t });
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
const { page: r = 1, pageSize: s, hidden: i, order: l } = t, c =
|
|
266
|
+
function kt(e, t, n, o) {
|
|
267
|
+
const { page: r = 1, pageSize: s, hidden: i, order: l } = t, c = St(e, i, l);
|
|
268
268
|
if (o) {
|
|
269
|
-
const b =
|
|
269
|
+
const b = Uo(o.lines, r, s ?? 0);
|
|
270
270
|
return {
|
|
271
271
|
columns: c,
|
|
272
272
|
filtered: n,
|
|
273
|
-
visible:
|
|
273
|
+
visible: Fn(b.lines),
|
|
274
274
|
groups: o.groups,
|
|
275
275
|
lines: o.lines,
|
|
276
276
|
visibleLines: b.lines,
|
|
@@ -289,14 +289,14 @@ function St(e, t, n, o) {
|
|
|
289
289
|
columnCount: c.length
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const St = (e, t, n) => {
|
|
293
293
|
const o = Dn(e, n);
|
|
294
294
|
return t?.length ? o.filter((r) => r.hideable === !1 || !t.includes(r.id)) : o;
|
|
295
295
|
};
|
|
296
|
-
function
|
|
296
|
+
function zn(e, t, n) {
|
|
297
297
|
const { page: o = 1, pageSize: r, hidden: s, order: i } = n;
|
|
298
298
|
if (n.server) {
|
|
299
|
-
const u =
|
|
299
|
+
const u = St(t, s, i), { rowCount: d } = n.server, b = r && r > 0 ? r : Math.max(d, 1), p = Math.max(1, Math.ceil(d / b)), m = d > 0 ? Math.min(Math.max(1, o), p) : Math.max(1, o);
|
|
300
300
|
return {
|
|
301
301
|
columns: u,
|
|
302
302
|
filtered: [...e],
|
|
@@ -307,21 +307,21 @@ function $n(e, t, n) {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
if (n.tree) {
|
|
310
|
-
const { term: u, matches: d } =
|
|
311
|
-
return
|
|
310
|
+
const { term: u, matches: d } = Pn(t, n.search, n.filter), { sorted: b } = Vn(t, n.sort);
|
|
311
|
+
return Xo(e, n.tree, b, u || n.filter ? d : void 0, St(t, s, i));
|
|
312
312
|
}
|
|
313
|
-
const { filtered: l, levels: c } =
|
|
314
|
-
if (!n.grouping?.levels.length) return
|
|
315
|
-
const a =
|
|
316
|
-
return
|
|
313
|
+
const { filtered: l, levels: c } = In(e, t, n);
|
|
314
|
+
if (!n.grouping?.levels.length) return kt(t, n, l);
|
|
315
|
+
const a = $n(l, c, n.grouping);
|
|
316
|
+
return kt(t, n, l, { groups: a, lines: Ln(a, n.grouping.folded) });
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Xo(e, t, n, o, r) {
|
|
319
319
|
const { admit: s } = t, i = (v) => n(s ? v.filter(s) : v), l = /* @__PURE__ */ new Map(), c = {
|
|
320
320
|
key: t.key,
|
|
321
321
|
children: (v) => {
|
|
322
322
|
if (!l.has(v)) {
|
|
323
|
-
const
|
|
324
|
-
l.set(v,
|
|
323
|
+
const C = t.children(v);
|
|
324
|
+
l.set(v, C && i(C));
|
|
325
325
|
}
|
|
326
326
|
return l.get(v);
|
|
327
327
|
},
|
|
@@ -330,10 +330,10 @@ function Jo(e, t, n, o, r) {
|
|
|
330
330
|
}, a = i(e), u = { expanded: t.open, checked: /* @__PURE__ */ new Set(), active: null, anchor: null, search: "" }, d = rn(a, c, u), b = /* @__PURE__ */ new Set();
|
|
331
331
|
let p = 0;
|
|
332
332
|
const m = (v) => {
|
|
333
|
-
for (const
|
|
333
|
+
for (const C of v) {
|
|
334
334
|
p++;
|
|
335
|
-
const y = c.children(
|
|
336
|
-
y && (b.add(t.key(
|
|
335
|
+
const y = c.children(C);
|
|
336
|
+
y && (b.add(t.key(C)), m(y));
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
339
|
m(a);
|
|
@@ -352,46 +352,46 @@ function Jo(e, t, n, o, r) {
|
|
|
352
352
|
columnCount: r.length
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ct(e) {
|
|
356
356
|
const t = {};
|
|
357
357
|
for (const n of e) n.width !== void 0 && (t[n.id] = n.width);
|
|
358
358
|
return t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Kn(e, t, n) {
|
|
361
361
|
if (!e.lines) return { ...e, visible: (e.shown ?? e.filtered).slice(t, n) };
|
|
362
362
|
const o = e.lines.slice(t, n);
|
|
363
|
-
return { ...e, visibleLines: o, visible:
|
|
363
|
+
return { ...e, visibleLines: o, visible: Fn(o) };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: l, grouping: c, server: a, tree: u } = n, d = (V) => V?.sort?.length ? [...V.sort] : s ? Array.isArray(s) ? [...s] : [s] : [], b = (V) => V?.widths ? { ...V.widths } :
|
|
365
|
+
function Qo(e, t, n) {
|
|
366
|
+
const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: l, grouping: c, server: a, tree: u } = n, d = (V) => V?.sort?.length ? [...V.sort] : s ? Array.isArray(s) ? [...s] : [s] : [], b = (V) => V?.widths ? { ...V.widths } : Ct(t), [p, m] = I(i?.search ?? ""), [w, g] = I(() => d(i)), [v, C] = I(i?.page ?? 1), [y, _] = I(
|
|
367
367
|
i?.pageSize ?? n.pageSize ?? 10
|
|
368
|
-
), [
|
|
369
|
-
m(V.search ?? ""), g(d(V)),
|
|
370
|
-
}, D = l || u ? 0 : y,
|
|
371
|
-
() =>
|
|
372
|
-
[
|
|
373
|
-
),
|
|
374
|
-
() =>
|
|
368
|
+
), [k, S] = I([]), [A, L] = I(i?.hidden ?? []), [x, O] = I(i?.order ?? []), [M, R] = I(() => b(i)), E = (V) => {
|
|
369
|
+
m(V.search ?? ""), g(d(V)), C(V.page ?? 1), _(V.pageSize ?? n.pageSize ?? 10), L(V.hidden ?? []), O(V.order ?? []), R(b(V));
|
|
370
|
+
}, D = l || u ? 0 : y, $ = !a && !u, P = H(
|
|
371
|
+
() => $ ? In(e, t, { search: p, filter: r, sort: w }) : null,
|
|
372
|
+
[$, e, t, p, r, w]
|
|
373
|
+
), K = c?.levels.length ? c : void 0, Y = H(
|
|
374
|
+
() => P && K ? $n(P.filtered, P.levels, K) : void 0,
|
|
375
375
|
// The fold is not an input of the grouping: it only chooses lines.
|
|
376
376
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
377
|
-
[
|
|
377
|
+
[P, K?.levels, K?.aggregates, K?.compareText]
|
|
378
378
|
), ce = H(
|
|
379
|
-
() => Y &&
|
|
379
|
+
() => Y && K ? Ln(Y, K.folded) : void 0,
|
|
380
380
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
381
|
-
[Y,
|
|
382
|
-
),
|
|
383
|
-
() =>
|
|
384
|
-
[
|
|
385
|
-
), [ne, de] =
|
|
381
|
+
[Y, K?.folded]
|
|
382
|
+
), j = H(
|
|
383
|
+
() => P ? kt(t, { page: v, pageSize: D, hidden: A, order: x }, P.filtered, Y && ce ? { groups: Y, lines: ce } : void 0) : zn(e, t, { search: p, filter: r, sort: w, page: v, pageSize: D, hidden: A, order: x, grouping: c, server: a, tree: u }),
|
|
384
|
+
[P, Y, ce, t, v, D, A, x, e, p, r, w, c, a, u]
|
|
385
|
+
), [ne, de] = I(36), le = Oo(l ? (j.lines ?? j.shown ?? j.filtered).length : 0, {
|
|
386
386
|
rowHeight: l ? ne : 0,
|
|
387
387
|
overscan: typeof l == "object" ? l.overscan : void 0
|
|
388
388
|
}), ee = H(
|
|
389
|
-
() => l ?
|
|
390
|
-
[l,
|
|
391
|
-
), oe = ee.visibleLines, W = ee.visible, ge = H(() =>
|
|
392
|
-
m(V),
|
|
389
|
+
() => l ? Kn(j, le.from, le.to) : j,
|
|
390
|
+
[l, j, le.from, le.to]
|
|
391
|
+
), oe = ee.visibleLines, W = ee.visible, ge = H(() => j.filtered.map(o), [j.filtered, o]), F = Go(ge), ae = fe((V) => {
|
|
392
|
+
m(V), C(1);
|
|
393
393
|
}, []), Ae = fe((V) => {
|
|
394
|
-
_(V),
|
|
394
|
+
_(V), C(1);
|
|
395
395
|
}, []), ue = fe((V, J = !1) => {
|
|
396
396
|
g((te) => {
|
|
397
397
|
const me = te.find((we) => we.column === V);
|
|
@@ -402,17 +402,17 @@ function Xo(e, t, n) {
|
|
|
402
402
|
return me ? me.direction === "asc" ? te.map(
|
|
403
403
|
(we) => we.column === V ? { column: V, direction: "desc" } : we
|
|
404
404
|
) : te.filter((we) => we.column !== V) : [...te, { column: V, direction: "asc" }];
|
|
405
|
-
}),
|
|
405
|
+
}), C(1);
|
|
406
406
|
}, []), Ne = fe((V) => {
|
|
407
|
-
|
|
407
|
+
S(
|
|
408
408
|
(J) => J.includes(V) ? J.filter((te) => te !== V) : [...J, V]
|
|
409
409
|
);
|
|
410
|
-
}, []),
|
|
411
|
-
|
|
410
|
+
}, []), Me = fe((V) => {
|
|
411
|
+
L(
|
|
412
412
|
(J) => J.includes(V) ? J.filter((te) => te !== V) : [...J, V]
|
|
413
413
|
);
|
|
414
414
|
}, []), pe = fe((V, J) => {
|
|
415
|
-
|
|
415
|
+
R((te) => {
|
|
416
416
|
if (J === void 0) {
|
|
417
417
|
if (!(V in te)) return te;
|
|
418
418
|
const me = { ...te };
|
|
@@ -420,106 +420,106 @@ function Xo(e, t, n) {
|
|
|
420
420
|
}
|
|
421
421
|
return { ...te, [V]: J };
|
|
422
422
|
});
|
|
423
|
-
}, []), U = n.pageSize ?? 10,
|
|
423
|
+
}, []), U = n.pageSize ?? 10, ke = H(() => Ct(t), [t]), Le = H(() => {
|
|
424
424
|
const V = {};
|
|
425
|
-
for (const [J, te] of Object.entries(
|
|
426
|
-
|
|
425
|
+
for (const [J, te] of Object.entries(M))
|
|
426
|
+
ke[J] !== te && (V[J] = te);
|
|
427
427
|
return V;
|
|
428
|
-
}, [
|
|
428
|
+
}, [M, ke]), Ie = H(
|
|
429
429
|
() => s ? Array.isArray(s) ? s : [s] : [],
|
|
430
430
|
[s]
|
|
431
|
-
),
|
|
432
|
-
(V, J) => V.column ===
|
|
431
|
+
), Fe = w.length === Ie.length && w.every(
|
|
432
|
+
(V, J) => V.column === Ie[J]?.column && V.direction === Ie[J]?.direction
|
|
433
433
|
), Je = H(
|
|
434
434
|
() => ({
|
|
435
435
|
...p ? { search: p } : {},
|
|
436
|
-
...w.length && !
|
|
436
|
+
...w.length && !Fe ? { sort: w } : {},
|
|
437
437
|
/* Without paging there is no page a view could carry - a page three in
|
|
438
438
|
the view of a virtualised table would be a promise nobody redeems on
|
|
439
439
|
opening. */
|
|
440
|
-
...!l &&
|
|
440
|
+
...!l && j.page > 1 ? { page: j.page } : {},
|
|
441
441
|
...!l && y !== U ? { pageSize: y } : {},
|
|
442
442
|
...A.length ? { hidden: A } : {},
|
|
443
|
-
...
|
|
444
|
-
...Object.keys(
|
|
443
|
+
...x.length ? { order: x } : {},
|
|
444
|
+
...Object.keys(Le).length ? { widths: Le } : {}
|
|
445
445
|
}),
|
|
446
446
|
[
|
|
447
447
|
l,
|
|
448
448
|
p,
|
|
449
449
|
w,
|
|
450
|
-
|
|
451
|
-
|
|
450
|
+
Fe,
|
|
451
|
+
j.page,
|
|
452
452
|
y,
|
|
453
453
|
U,
|
|
454
454
|
A,
|
|
455
|
-
|
|
456
|
-
|
|
455
|
+
x,
|
|
456
|
+
Le
|
|
457
457
|
]
|
|
458
458
|
);
|
|
459
459
|
return {
|
|
460
|
-
...
|
|
460
|
+
...j,
|
|
461
461
|
visible: W,
|
|
462
462
|
visibleLines: oe,
|
|
463
463
|
virtual: l ? le : void 0,
|
|
464
464
|
setPitch: de,
|
|
465
465
|
server: a,
|
|
466
|
-
restart:
|
|
466
|
+
restart: E,
|
|
467
467
|
view: Je,
|
|
468
468
|
search: p,
|
|
469
469
|
setSearch: ae,
|
|
470
470
|
sort: w,
|
|
471
471
|
toggleSort: ue,
|
|
472
|
-
setPage:
|
|
472
|
+
setPage: C,
|
|
473
473
|
pageSize: y,
|
|
474
474
|
setPageSize: Ae,
|
|
475
|
-
expanded:
|
|
475
|
+
expanded: k,
|
|
476
476
|
toggleRow: Ne,
|
|
477
477
|
hidden: A,
|
|
478
|
-
toggleColumn:
|
|
479
|
-
order:
|
|
480
|
-
setOrder:
|
|
481
|
-
widths:
|
|
478
|
+
toggleColumn: Me,
|
|
479
|
+
order: x,
|
|
480
|
+
setOrder: O,
|
|
481
|
+
widths: M,
|
|
482
482
|
setWidth: pe,
|
|
483
|
-
selection:
|
|
483
|
+
selection: F
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Zo(e, t) {
|
|
487
487
|
return [
|
|
488
488
|
...e.filter((n) => t[n.id] === "start"),
|
|
489
489
|
...e.filter((n) => t[n.id] === void 0),
|
|
490
490
|
...e.filter((n) => t[n.id] === "end")
|
|
491
491
|
];
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function er(e, t) {
|
|
494
494
|
const n = {};
|
|
495
495
|
for (const o of e) o.pin && (n[o.id] = o.pin);
|
|
496
496
|
return t !== void 0 && !n[t] && (n[t] = "start"), n;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function tr(e, t, n) {
|
|
499
499
|
const o = { ...e };
|
|
500
500
|
return n ? o[t] = n : delete o[t], o;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
502
|
+
const nr = (e, t) => Object.keys(e).length === Object.keys(t).length && Object.entries(e).every(([n, o]) => t[n] === o);
|
|
503
|
+
function or(e, t, n) {
|
|
504
504
|
if (!e) return;
|
|
505
505
|
const o = n.size === 0 ? e : Object.fromEntries(Object.entries(e).filter(([r]) => n.has(r)));
|
|
506
|
-
return
|
|
506
|
+
return nr(o, t) ? void 0 : o;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function rr(e, t, n = t) {
|
|
509
509
|
if (n < e.start) return { side: "start", at: t, edge: n === e.start - 1 };
|
|
510
510
|
const o = e.count - e.end;
|
|
511
511
|
if (e.end > 0 && t >= o) return { side: "end", at: e.count - 1 - n, edge: t === o };
|
|
512
512
|
}
|
|
513
|
-
const
|
|
514
|
-
function
|
|
515
|
-
const o = n - Math.min(n / 2,
|
|
513
|
+
const sr = 256;
|
|
514
|
+
function ir(e, t, n) {
|
|
515
|
+
const o = n - Math.min(n / 2, sr);
|
|
516
516
|
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 };
|
|
517
517
|
}
|
|
518
|
-
const
|
|
518
|
+
const lr = (e) => JSON.stringify([e.search, e.conditions, e.sort, e.page, e.pageSize]), ar = (e) => JSON.stringify(
|
|
519
519
|
{ ...e, hidden: mt(e.hidden), folded: mt(e.folded), branches: mt(e.branches) },
|
|
520
520
|
(t, n) => n && typeof n == "object" && !Array.isArray(n) ? Object.fromEntries(Object.entries(n).sort(([o], [r]) => o < r ? -1 : o > r ? 1 : 0)) : n
|
|
521
521
|
), mt = (e) => e === void 0 ? void 0 : [...e].sort();
|
|
522
|
-
function
|
|
522
|
+
function cr(e, t) {
|
|
523
523
|
if (t.size === 0) return e;
|
|
524
524
|
const n = e.sort?.filter((l) => t.has(l.column)), o = e.hidden?.filter((l) => t.has(l)), r = e.order?.filter((l) => t.has(l)), s = e.widths ? Object.fromEntries(Object.entries(e.widths).filter(([l]) => t.has(l))) : void 0;
|
|
525
525
|
return n?.length === e.sort?.length && o?.length === e.hidden?.length && r?.length === e.order?.length && Object.keys(s ?? {}).length === Object.keys(e.widths ?? {}).length ? e : {
|
|
@@ -532,149 +532,152 @@ function ar(e, t) {
|
|
|
532
532
|
...s && Object.keys(s).length ? { widths: s } : {}
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
function dr() {
|
|
536
|
+
try {
|
|
537
|
+
return process.env.NODE_ENV !== "production";
|
|
538
|
+
} catch {
|
|
539
|
+
return !1;
|
|
540
|
+
}
|
|
538
541
|
}
|
|
539
|
-
const
|
|
542
|
+
const Gt = dr(), ln = /* @__PURE__ */ new Set();
|
|
540
543
|
function X(e, t) {
|
|
541
|
-
!
|
|
542
|
-
}
|
|
543
|
-
const
|
|
544
|
-
frame:
|
|
545
|
-
children:
|
|
546
|
-
scroll:
|
|
547
|
-
footerTarget:
|
|
548
|
-
table:
|
|
549
|
-
th:
|
|
550
|
-
sticky:
|
|
551
|
-
td:
|
|
552
|
-
rowHeader:
|
|
553
|
-
compact:
|
|
554
|
-
numeric:
|
|
555
|
-
value:
|
|
544
|
+
!Gt || ln.has(e) || (ln.add(e), console.warn(`@umriss-ui/table: ${t}`));
|
|
545
|
+
}
|
|
546
|
+
const ur = "_frame_1lxch_11 _text_18806_22", fr = "_children_1lxch_24", hr = "_scroll_1lxch_33 _scroll_18806_96", gr = "_footerTarget_1lxch_62", pr = "_table_1lxch_76", mr = "_th_1lxch_88 _ring_18806_125", wr = "_sticky_1lxch_108", br = "_td_1lxch_128", vr = "_rowHeader_1lxch_142", yr = "_compact_1lxch_163 _dense_18806_38", _r = "_numeric_1lxch_194", xr = "_value_1lxch_214", kr = "_valueText_1lxch_224", Sr = "_sized_1lxch_228", Cr = "_cutTip_1lxch_245 _text_18806_22", Ar = "_absent_1lxch_287", Nr = "_striped_1lxch_291", Tr = "_pinned_1lxch_316", Rr = "_pinStartEdge_1lxch_332", Or = "_pinEndEdge_1lxch_333", Er = "_sortButton_1lxch_363 _ring_18806_125", Mr = "_sortIndicator_1lxch_388", Lr = "_sortArrow_1lxch_395", Fr = "_sortArrowDesc_1lxch_399", Br = "_sortActive_1lxch_407", Dr = "_sortRank_1lxch_413", Pr = "_thFlex_1lxch_421", Vr = "_headLine_1lxch_441", Ir = "_headLabel_1lxch_464", $r = "_footerKind_1lxch_480", zr = "_emptyCell_1lxch_498", Kr = "_emptyTitle_1lxch_520", Gr = "_skeleton_1lxch_529", jr = "_toolbar_1lxch_561 _text_18806_22", Hr = "_toolbarGroup_1lxch_577", Wr = "_toolbarGroupIdle_1lxch_593", qr = "_searchGrow_1lxch_600", Yr = "_toolbarMd_1lxch_610", Ur = "_toolbarInfo_1lxch_614", Jr = "_pagination_1lxch_620 _text_18806_22", Xr = "_paginationControls_1lxch_633", Qr = "_pageSize_1lxch_640", Zr = "_pageSteps_1lxch_648", es = "_paginationStatus_1lxch_654", ts = "_filterButton_1lxch_663 _ring_18806_125", ns = "_filterActive_1lxch_690", os = "_filterPanel_1lxch_695", rs = "_filterContent_1lxch_709 _scroll_18806_96", ss = "_filterFooter_1lxch_720", is = "_filterLabel_1lxch_734", ls = "_filterValue_1lxch_744", as = "_filteredCount_1lxch_750", cs = "_rangeFields_1lxch_761", ds = "_rangePeriod_1lxch_771", us = "_conditions_1lxch_777", fs = "_conditionButton_1lxch_783", hs = "_condition_1lxch_777", gs = "_columnsPanel_1lxch_808", ps = "_columnsList_1lxch_817", ms = "_columnsEntry_1lxch_826", ws = "_move_1lxch_838", bs = "_pinOn_1lxch_876", vs = "_groupingChoice_1lxch_886", ys = "_groupingHeading_1lxch_894", _s = "_groupingOptions_1lxch_903", xs = "_groupingOption_1lxch_903 _ring_18806_125", ks = "_groupingLevel_1lxch_946", Ss = "_groupingTag_1lxch_951", Cs = "_groupingTrigger_1lxch_958", As = "_groupingPrefix_1lxch_964", Ns = "_groupingPath_1lxch_969", Ts = "_groupingSeparator_1lxch_973", Rs = "_groupHeader_1lxch_990", Os = "_spanCell_1lxch_1033", Es = "_groupFolded_1lxch_1114", Ms = "_spanValue_1lxch_1118", Ls = "_groupLabel_1lxch_1119", Fs = "_spanText_1lxch_1132", Bs = "_groupValue_1lxch_1133", Ds = "_groupCount_1lxch_1140", Ps = "_continued_1lxch_1154", Vs = "_spanSelect_1lxch_1185", Is = "_treeCell_1lxch_1201", $s = "_treeText_1lxch_1209", zs = "_foldSlot_1lxch_1213", Ks = "_treeRow_1lxch_1223", Gs = "_branchRow_1lxch_1227", js = "_detailCell_1lxch_1239", Hs = "_pathRow_1lxch_1245", Ws = "_fold_1lxch_1213", qs = "_foldClosed_1lxch_1286", Ys = "_foldedCount_1lxch_1296", Us = "_shareHost_1lxch_1304", Js = "_shareBar_1lxch_1311", Xs = "_expander_1lxch_1323", Qs = "_expanderOpen_1lxch_1358", Zs = "_detailRow_1lxch_1362", ei = "_treeDetail_1lxch_1371", ti = "_treeDetailRail_1lxch_1376", ni = "_actionsCell_1lxch_1391", oi = "_actions_1lxch_1391", ri = "_decision_1lxch_1410", si = "_reserve_1lxch_1429", ii = "_grip_1lxch_1439", li = "_virtualBody_1lxch_1480", ai = "_virtualRow_1lxch_1496", ci = "_fillerRow_1lxch_1520", di = "_grid_1lxch_1533", ui = "_editing_1lxch_1549", fi = "_editingValue_1lxch_1553", hi = "_editor_1lxch_1559", gi = "_editorField_1lxch_1572", pi = "_draftButtons_1lxch_1604", mi = "_held_1lxch_1612", wi = "_deleteAsk_1lxch_1616", bi = "_newRowBar_1lxch_1623", vi = "_draftMessage_1lxch_1630", yi = "_editorMessage_1lxch_1655", _i = "_control_1lxch_304", xi = "_empty_1lxch_498", ki = "_toned_1lxch_1416", h = {
|
|
547
|
+
frame: ur,
|
|
548
|
+
children: fr,
|
|
549
|
+
scroll: hr,
|
|
550
|
+
footerTarget: gr,
|
|
551
|
+
table: pr,
|
|
552
|
+
th: mr,
|
|
553
|
+
sticky: wr,
|
|
554
|
+
td: br,
|
|
555
|
+
rowHeader: vr,
|
|
556
|
+
compact: yr,
|
|
557
|
+
numeric: _r,
|
|
558
|
+
value: xr,
|
|
556
559
|
valueText: kr,
|
|
557
560
|
sized: Sr,
|
|
558
561
|
cutTip: Cr,
|
|
559
|
-
absent:
|
|
560
|
-
striped:
|
|
561
|
-
pinned:
|
|
562
|
-
pinStartEdge:
|
|
563
|
-
pinEndEdge:
|
|
564
|
-
sortButton:
|
|
565
|
-
sortIndicator:
|
|
566
|
-
sortArrow:
|
|
567
|
-
sortArrowDesc:
|
|
568
|
-
sortActive:
|
|
569
|
-
sortRank:
|
|
570
|
-
thFlex:
|
|
571
|
-
headLine:
|
|
572
|
-
headLabel:
|
|
573
|
-
footerKind:
|
|
574
|
-
emptyCell:
|
|
575
|
-
emptyTitle:
|
|
576
|
-
skeleton:
|
|
577
|
-
toolbar:
|
|
578
|
-
toolbarGroup:
|
|
579
|
-
toolbarGroupIdle:
|
|
580
|
-
searchGrow:
|
|
581
|
-
toolbarMd:
|
|
582
|
-
toolbarInfo:
|
|
583
|
-
pagination:
|
|
584
|
-
paginationControls:
|
|
585
|
-
pageSize:
|
|
586
|
-
pageSteps:
|
|
587
|
-
paginationStatus:
|
|
588
|
-
filterButton:
|
|
589
|
-
filterActive:
|
|
590
|
-
filterPanel:
|
|
591
|
-
filterContent:
|
|
592
|
-
filterFooter:
|
|
593
|
-
filterLabel:
|
|
594
|
-
filterValue:
|
|
595
|
-
filteredCount:
|
|
596
|
-
rangeFields:
|
|
597
|
-
rangePeriod:
|
|
598
|
-
conditions:
|
|
599
|
-
conditionButton:
|
|
600
|
-
condition:
|
|
601
|
-
columnsPanel:
|
|
602
|
-
columnsList:
|
|
603
|
-
columnsEntry:
|
|
604
|
-
move:
|
|
605
|
-
pinOn:
|
|
606
|
-
groupingChoice:
|
|
607
|
-
groupingHeading:
|
|
608
|
-
groupingOptions:
|
|
609
|
-
groupingOption:
|
|
562
|
+
absent: Ar,
|
|
563
|
+
striped: Nr,
|
|
564
|
+
pinned: Tr,
|
|
565
|
+
pinStartEdge: Rr,
|
|
566
|
+
pinEndEdge: Or,
|
|
567
|
+
sortButton: Er,
|
|
568
|
+
sortIndicator: Mr,
|
|
569
|
+
sortArrow: Lr,
|
|
570
|
+
sortArrowDesc: Fr,
|
|
571
|
+
sortActive: Br,
|
|
572
|
+
sortRank: Dr,
|
|
573
|
+
thFlex: Pr,
|
|
574
|
+
headLine: Vr,
|
|
575
|
+
headLabel: Ir,
|
|
576
|
+
footerKind: $r,
|
|
577
|
+
emptyCell: zr,
|
|
578
|
+
emptyTitle: Kr,
|
|
579
|
+
skeleton: Gr,
|
|
580
|
+
toolbar: jr,
|
|
581
|
+
toolbarGroup: Hr,
|
|
582
|
+
toolbarGroupIdle: Wr,
|
|
583
|
+
searchGrow: qr,
|
|
584
|
+
toolbarMd: Yr,
|
|
585
|
+
toolbarInfo: Ur,
|
|
586
|
+
pagination: Jr,
|
|
587
|
+
paginationControls: Xr,
|
|
588
|
+
pageSize: Qr,
|
|
589
|
+
pageSteps: Zr,
|
|
590
|
+
paginationStatus: es,
|
|
591
|
+
filterButton: ts,
|
|
592
|
+
filterActive: ns,
|
|
593
|
+
filterPanel: os,
|
|
594
|
+
filterContent: rs,
|
|
595
|
+
filterFooter: ss,
|
|
596
|
+
filterLabel: is,
|
|
597
|
+
filterValue: ls,
|
|
598
|
+
filteredCount: as,
|
|
599
|
+
rangeFields: cs,
|
|
600
|
+
rangePeriod: ds,
|
|
601
|
+
conditions: us,
|
|
602
|
+
conditionButton: fs,
|
|
603
|
+
condition: hs,
|
|
604
|
+
columnsPanel: gs,
|
|
605
|
+
columnsList: ps,
|
|
606
|
+
columnsEntry: ms,
|
|
607
|
+
move: ws,
|
|
608
|
+
pinOn: bs,
|
|
609
|
+
groupingChoice: vs,
|
|
610
|
+
groupingHeading: ys,
|
|
611
|
+
groupingOptions: _s,
|
|
612
|
+
groupingOption: xs,
|
|
610
613
|
groupingLevel: ks,
|
|
611
614
|
groupingTag: Ss,
|
|
612
615
|
groupingTrigger: Cs,
|
|
613
|
-
groupingPrefix:
|
|
614
|
-
groupingPath:
|
|
615
|
-
groupingSeparator:
|
|
616
|
-
groupHeader:
|
|
617
|
-
spanCell:
|
|
618
|
-
groupFolded:
|
|
619
|
-
spanValue:
|
|
620
|
-
groupLabel:
|
|
621
|
-
spanText:
|
|
622
|
-
groupValue:
|
|
623
|
-
groupCount:
|
|
624
|
-
continued:
|
|
625
|
-
spanSelect:
|
|
626
|
-
treeCell:
|
|
627
|
-
treeText:
|
|
628
|
-
foldSlot:
|
|
629
|
-
treeRow:
|
|
630
|
-
branchRow:
|
|
631
|
-
detailCell:
|
|
632
|
-
pathRow:
|
|
633
|
-
fold:
|
|
634
|
-
foldClosed:
|
|
635
|
-
foldedCount:
|
|
636
|
-
shareHost:
|
|
637
|
-
shareBar:
|
|
638
|
-
expander:
|
|
639
|
-
expanderOpen:
|
|
640
|
-
detailRow:
|
|
641
|
-
treeDetail:
|
|
642
|
-
treeDetailRail:
|
|
643
|
-
actionsCell:
|
|
644
|
-
actions:
|
|
645
|
-
decision:
|
|
646
|
-
reserve:
|
|
647
|
-
grip:
|
|
648
|
-
virtualBody:
|
|
649
|
-
virtualRow:
|
|
650
|
-
fillerRow:
|
|
651
|
-
grid:
|
|
652
|
-
editing:
|
|
653
|
-
editingValue:
|
|
654
|
-
editor:
|
|
655
|
-
editorField:
|
|
656
|
-
draftButtons:
|
|
657
|
-
held:
|
|
658
|
-
deleteAsk:
|
|
659
|
-
newRowBar:
|
|
660
|
-
draftMessage:
|
|
661
|
-
editorMessage:
|
|
662
|
-
control:
|
|
663
|
-
empty:
|
|
616
|
+
groupingPrefix: As,
|
|
617
|
+
groupingPath: Ns,
|
|
618
|
+
groupingSeparator: Ts,
|
|
619
|
+
groupHeader: Rs,
|
|
620
|
+
spanCell: Os,
|
|
621
|
+
groupFolded: Es,
|
|
622
|
+
spanValue: Ms,
|
|
623
|
+
groupLabel: Ls,
|
|
624
|
+
spanText: Fs,
|
|
625
|
+
groupValue: Bs,
|
|
626
|
+
groupCount: Ds,
|
|
627
|
+
continued: Ps,
|
|
628
|
+
spanSelect: Vs,
|
|
629
|
+
treeCell: Is,
|
|
630
|
+
treeText: $s,
|
|
631
|
+
foldSlot: zs,
|
|
632
|
+
treeRow: Ks,
|
|
633
|
+
branchRow: Gs,
|
|
634
|
+
detailCell: js,
|
|
635
|
+
pathRow: Hs,
|
|
636
|
+
fold: Ws,
|
|
637
|
+
foldClosed: qs,
|
|
638
|
+
foldedCount: Ys,
|
|
639
|
+
shareHost: Us,
|
|
640
|
+
shareBar: Js,
|
|
641
|
+
expander: Xs,
|
|
642
|
+
expanderOpen: Qs,
|
|
643
|
+
detailRow: Zs,
|
|
644
|
+
treeDetail: ei,
|
|
645
|
+
treeDetailRail: ti,
|
|
646
|
+
actionsCell: ni,
|
|
647
|
+
actions: oi,
|
|
648
|
+
decision: ri,
|
|
649
|
+
reserve: si,
|
|
650
|
+
grip: ii,
|
|
651
|
+
virtualBody: li,
|
|
652
|
+
virtualRow: ai,
|
|
653
|
+
fillerRow: ci,
|
|
654
|
+
grid: di,
|
|
655
|
+
editing: ui,
|
|
656
|
+
editingValue: fi,
|
|
657
|
+
editor: hi,
|
|
658
|
+
editorField: gi,
|
|
659
|
+
draftButtons: pi,
|
|
660
|
+
held: mi,
|
|
661
|
+
deleteAsk: wi,
|
|
662
|
+
newRowBar: bi,
|
|
663
|
+
draftMessage: vi,
|
|
664
|
+
editorMessage: yi,
|
|
665
|
+
control: _i,
|
|
666
|
+
empty: xi,
|
|
664
667
|
toned: ki
|
|
665
668
|
};
|
|
666
|
-
function
|
|
669
|
+
function Ia(e) {
|
|
667
670
|
return e;
|
|
668
671
|
}
|
|
669
672
|
const qe = /* @__PURE__ */ new WeakMap();
|
|
670
|
-
function
|
|
673
|
+
function Gn(e, t) {
|
|
671
674
|
return qe.set(e, t), e;
|
|
672
675
|
}
|
|
673
676
|
const Si = (e) => qe.has(e);
|
|
674
|
-
function
|
|
675
|
-
return e === "list" ?
|
|
677
|
+
function Ee(e) {
|
|
678
|
+
return e === "list" ? Ti : e === "range" ? Di : typeof e == "object" && e !== null ? e : void 0;
|
|
676
679
|
}
|
|
677
|
-
function
|
|
680
|
+
function jn(e, t) {
|
|
678
681
|
if (t == null) return "empty";
|
|
679
682
|
const n = qe.get(e);
|
|
680
683
|
return n ? n.isCondition(t) ? n.isEmpty(t) ? "empty" : "effective" : "foreign" : "effective";
|
|
@@ -682,7 +685,7 @@ function Gn(e, t) {
|
|
|
682
685
|
function Ci(e, t, n) {
|
|
683
686
|
return se(t) ? qe.get(e)?.absentMatches(n) ?? !1 : e.matches(t, n);
|
|
684
687
|
}
|
|
685
|
-
function
|
|
688
|
+
function Ai(e, t, n) {
|
|
686
689
|
const o = qe.get(e);
|
|
687
690
|
return o ? o.describeIn(t, n) : e.describe(t);
|
|
688
691
|
}
|
|
@@ -707,23 +710,23 @@ function At(e, t, n) {
|
|
|
707
710
|
const cn = /* @__PURE__ */ new WeakMap();
|
|
708
711
|
function Nt(e) {
|
|
709
712
|
let t = cn.get(e);
|
|
710
|
-
return t || (t = new Set(e.map(
|
|
713
|
+
return t || (t = new Set(e.map(Se)), cn.set(e, t)), t;
|
|
711
714
|
}
|
|
712
|
-
const
|
|
713
|
-
function
|
|
715
|
+
const Tt = (e, t) => se(e) ? t.wording.cellAbsentValue : Pe(e, t.format, t.formats, t.wording) ?? String(e);
|
|
716
|
+
function Ni({
|
|
714
717
|
condition: e,
|
|
715
718
|
setCondition: t,
|
|
716
719
|
values: n,
|
|
717
720
|
absentOccurs: o = !1,
|
|
718
721
|
format: r
|
|
719
722
|
}) {
|
|
720
|
-
const s =
|
|
721
|
-
const d = { formats: s, wording: i, format: r }, b = n.map((g) => ({ key:
|
|
723
|
+
const s = xe(), i = ie(), l = H(() => e ?? [], [e]), c = H(() => {
|
|
724
|
+
const d = { formats: s, wording: i, format: r }, b = n.map((g) => ({ key: Se(g), text: Tt(g, d), value: g }));
|
|
722
725
|
b.sort(Hn(s));
|
|
723
|
-
const p = new Set(b.map((g) => g.key)), m = l.filter((g) => !se(g) && !p.has(
|
|
726
|
+
const p = new Set(b.map((g) => g.key)), m = l.filter((g) => !se(g) && !p.has(Se(g))).map((g) => ({ key: Se(g), text: Tt(g, d), value: g })), w = o || l.some(se) ? [{ key: $t, text: i.cellAbsentValue, value: null }] : [];
|
|
724
727
|
return [...b, ...m, ...w];
|
|
725
728
|
}, [n, l, o, r, s, i]), a = Nt(l), u = (d) => {
|
|
726
|
-
const b = a.has(d.key) ? l.filter((p) =>
|
|
729
|
+
const b = a.has(d.key) ? l.filter((p) => Se(p) !== d.key) : [...l, d.value];
|
|
727
730
|
t(b.length > 0 ? b : null);
|
|
728
731
|
};
|
|
729
732
|
return /* @__PURE__ */ f("div", { className: h.filterContent, children: c.map((d) => /* @__PURE__ */ f(
|
|
@@ -736,28 +739,28 @@ function Ai({
|
|
|
736
739
|
d.key
|
|
737
740
|
)) });
|
|
738
741
|
}
|
|
739
|
-
const
|
|
742
|
+
const Ti = /* @__PURE__ */ Gn(
|
|
740
743
|
{
|
|
741
|
-
matches: (e, t) => Nt(t).has(
|
|
742
|
-
Input:
|
|
744
|
+
matches: (e, t) => Nt(t).has(Se(e)),
|
|
745
|
+
Input: Ni,
|
|
743
746
|
describe: (e) => e.map((t) => se(t) ? "–" : String(t)).join(", ")
|
|
744
747
|
},
|
|
745
748
|
{
|
|
746
749
|
isCondition: (e) => Array.isArray(e),
|
|
747
750
|
isEmpty: (e) => e.length === 0,
|
|
748
|
-
absentMatches: (e) => Nt(e).has(
|
|
751
|
+
absentMatches: (e) => Nt(e).has($t),
|
|
749
752
|
/* From three values on the first two and how many more: a condition is one
|
|
750
753
|
line in the table toolbar, not a list. */
|
|
751
754
|
describeIn: (e, t) => {
|
|
752
|
-
const n = e.map((r) =>
|
|
755
|
+
const n = e.map((r) => Tt(r, t));
|
|
753
756
|
if (n.length <= 2) return n.join(", ");
|
|
754
757
|
const o = n.length - 2;
|
|
755
758
|
return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
|
|
756
759
|
}
|
|
757
760
|
}
|
|
758
|
-
),
|
|
759
|
-
function
|
|
760
|
-
const n = ie(), [o, r] =
|
|
761
|
+
), Ri = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), Oi = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), De = (e) => typeof e == "number" && Number.isFinite(e), ye = (e) => e instanceof Date && !Number.isNaN(e.getTime()), Ei = (e) => ye(e) ? Ri(e) : De(e) ? e : void 0, Mi = (e) => ye(e) ? { value: Oi(e), open: !0 } : De(e) ? { value: e, open: !1 } : void 0, Qe = (e, t) => ye(e) ? t.formats.date(e) : Pe(e, t.format, t.formats, t.wording) ?? String(e);
|
|
762
|
+
function Li({ condition: e, setCondition: t }) {
|
|
763
|
+
const n = ie(), [o, r] = I(null), s = o !== null, i = o ? o.from : De(e?.from) ? e.from : null, l = o ? o.to : De(e?.to) ? e.to : null, c = (a, u) => {
|
|
761
764
|
const d = { from: i, to: l, [a]: u };
|
|
762
765
|
if (d.from !== null && d.to !== null && d.from > d.to) {
|
|
763
766
|
r(d);
|
|
@@ -772,15 +775,15 @@ function Ei({ condition: e, setCondition: t }) {
|
|
|
772
775
|
...d.to !== null ? { to: d.to } : {}
|
|
773
776
|
});
|
|
774
777
|
};
|
|
775
|
-
return /* @__PURE__ */
|
|
778
|
+
return /* @__PURE__ */ T("div", { className: h.rangeFields, children: [
|
|
776
779
|
/* @__PURE__ */ f(vt, { label: n.filterFrom, children: /* @__PURE__ */ f(yt, { size: "sm", value: i, invalid: s, onChange: (a) => c("from", a) }) }),
|
|
777
780
|
/* @__PURE__ */ f(vt, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ f(yt, { size: "sm", value: l, onChange: (a) => c("to", a) }) })
|
|
778
781
|
] });
|
|
779
782
|
}
|
|
780
|
-
function
|
|
783
|
+
function Fi({ condition: e, setCondition: t }) {
|
|
781
784
|
const n = ye(e?.from) && ye(e?.to) ? { from: e.from, to: e.to } : null;
|
|
782
785
|
return /* @__PURE__ */ f("div", { className: h.rangePeriod, children: /* @__PURE__ */ f(
|
|
783
|
-
|
|
786
|
+
Eo,
|
|
784
787
|
{
|
|
785
788
|
size: "sm",
|
|
786
789
|
clearable: !0,
|
|
@@ -789,18 +792,18 @@ function Mi({ condition: e, setCondition: t }) {
|
|
|
789
792
|
}
|
|
790
793
|
) });
|
|
791
794
|
}
|
|
792
|
-
function
|
|
793
|
-
return e.kind === "date" ? /* @__PURE__ */ f(
|
|
795
|
+
function Bi(e) {
|
|
796
|
+
return e.kind === "date" ? /* @__PURE__ */ f(Fi, { ...e }) : /* @__PURE__ */ f(Li, { ...e });
|
|
794
797
|
}
|
|
795
|
-
const
|
|
798
|
+
const Di = /* @__PURE__ */ Gn(
|
|
796
799
|
{
|
|
797
800
|
matches: (e, t) => {
|
|
798
801
|
const n = ye(e) ? e.getTime() : De(e) ? e : void 0;
|
|
799
802
|
if (n === void 0) return !1;
|
|
800
|
-
const o =
|
|
803
|
+
const o = Ei(t.from), r = Mi(t.to);
|
|
801
804
|
return !(o !== void 0 && n < o || r !== void 0 && (r.open ? n >= r.value : n > r.value));
|
|
802
805
|
},
|
|
803
|
-
Input:
|
|
806
|
+
Input: Bi,
|
|
804
807
|
describe: (e) => [e.from, e.to].map((t) => t === void 0 ? "" : String(t)).join("–")
|
|
805
808
|
},
|
|
806
809
|
{
|
|
@@ -875,13 +878,13 @@ const dn = (e) => JSON.stringify([
|
|
|
875
878
|
/* Whether a column edits, and how - not its editor or its check, which
|
|
876
879
|
are new functions on every render and are read when an edit starts. */
|
|
877
880
|
typeof e.edit == "function" ? "ƒ" : e.edit
|
|
878
|
-
]),
|
|
881
|
+
]), Pi = (e, t) => e?.[t], un = (e, t) => {
|
|
879
882
|
const n = {
|
|
880
883
|
key: e,
|
|
881
884
|
spec: t,
|
|
882
885
|
read: (o) => {
|
|
883
886
|
const r = n.spec.value;
|
|
884
|
-
return typeof r == "string" ?
|
|
887
|
+
return typeof r == "string" ? Pi(o, r) : r(o);
|
|
885
888
|
}
|
|
886
889
|
};
|
|
887
890
|
return n;
|
|
@@ -896,7 +899,7 @@ function fn(e, t) {
|
|
|
896
899
|
const n = ot(e.value, t.value) ? e.value : t.value, o = ot(e.ownSortValue, t.ownSortValue) ? e.ownSortValue : t.ownSortValue, r = ot(e.ownGroupValue, t.ownGroupValue) ? e.ownGroupValue : t.ownGroupValue;
|
|
897
900
|
return n === t.value && o === t.ownSortValue && r === t.ownGroupValue ? t : { ...t, value: n, ownSortValue: o, ownGroupValue: r };
|
|
898
901
|
}
|
|
899
|
-
class
|
|
902
|
+
class Vi {
|
|
900
903
|
columns = new wt("data-umriss-column");
|
|
901
904
|
actions = new wt("data-umriss-action");
|
|
902
905
|
/** The group keys: values to group by that are no column. */
|
|
@@ -987,7 +990,7 @@ class Bi {
|
|
|
987
990
|
}
|
|
988
991
|
/** What the columns of this pass declare. */
|
|
989
992
|
declaredPins() {
|
|
990
|
-
return
|
|
993
|
+
return er(
|
|
991
994
|
this.orderedColumns().map((t) => ({ id: t.spec.id, pin: t.spec.pin })),
|
|
992
995
|
this.stickyRowHeader ? this.rowHeader()?.spec.id : void 0
|
|
993
996
|
);
|
|
@@ -999,7 +1002,7 @@ class Bi {
|
|
|
999
1002
|
/** The columns with the pinned blocks at either end - the one place where
|
|
1000
1003
|
that is decided, for screen, column menu and export. */
|
|
1001
1004
|
inPinOrder(t) {
|
|
1002
|
-
return
|
|
1005
|
+
return Zo(t, this.pins());
|
|
1003
1006
|
}
|
|
1004
1007
|
/** The columns in JSX order, the first one per id. */
|
|
1005
1008
|
orderedColumns() {
|
|
@@ -1081,7 +1084,7 @@ class Bi {
|
|
|
1081
1084
|
each once. */
|
|
1082
1085
|
effectiveGrouping(t, n) {
|
|
1083
1086
|
const o = new Set(this.groupingEntries(n).map((r) => r.spec.id));
|
|
1084
|
-
return [...new Set(t)].filter((r) => o.has(r)).slice(0,
|
|
1087
|
+
return [...new Set(t)].filter((r) => o.has(r)).slice(0, Kt);
|
|
1085
1088
|
}
|
|
1086
1089
|
groupingCache = null;
|
|
1087
1090
|
/** The levels and aggregates for the model - the same identity as long as
|
|
@@ -1095,10 +1098,10 @@ class Bi {
|
|
|
1095
1098
|
const a = l.read(c);
|
|
1096
1099
|
if (a == null) return;
|
|
1097
1100
|
const { ownGroupValue: u, group: d } = l.spec;
|
|
1098
|
-
return u ? u(a) : d ?
|
|
1101
|
+
return u ? u(a) : d ? Wo(d)(a) : a;
|
|
1099
1102
|
},
|
|
1100
1103
|
/* A value of one's own is a name; its groups stand by what they hold. */
|
|
1101
|
-
order: l.spec.ownGroupValue ? (c) =>
|
|
1104
|
+
order: l.spec.ownGroupValue ? (c) => xt(l.read(c), l.spec.ownSortValue) : void 0
|
|
1102
1105
|
})), i = this.orderedColumns().filter((l) => l.spec.aggregate !== void 0).map(
|
|
1103
1106
|
(l) => ({
|
|
1104
1107
|
id: l.spec.id,
|
|
@@ -1124,7 +1127,7 @@ class Bi {
|
|
|
1124
1127
|
kindOf(t, n) {
|
|
1125
1128
|
const o = this.kinds.get(t.key);
|
|
1126
1129
|
if (o && o.rows === n && o.value === t.spec.value) return o.kind;
|
|
1127
|
-
const r =
|
|
1130
|
+
const r = Mn(n, t.read);
|
|
1128
1131
|
return this.kinds.set(t.key, { rows: n, value: t.spec.value, kind: r }), r;
|
|
1129
1132
|
}
|
|
1130
1133
|
/** Can it be sorted by this column? Without a statement: when its value is
|
|
@@ -1144,7 +1147,7 @@ class Bi {
|
|
|
1144
1147
|
if (this.modelCache?.key === r && this.modelCache.rows === t && this.modelCache.formats === n)
|
|
1145
1148
|
return this.modelCache.columns;
|
|
1146
1149
|
const s = o.map((i) => {
|
|
1147
|
-
const { spec: l } = i, c = this.kindOf(i, t), a = this.isSortable(i, t), u = l.searchable ?? c === "text", d = (b) =>
|
|
1150
|
+
const { spec: l } = i, c = this.kindOf(i, t), a = this.isSortable(i, t), u = l.searchable ?? c === "text", d = (b) => xt(i.read(b), l.ownSortValue);
|
|
1148
1151
|
return {
|
|
1149
1152
|
id: l.id,
|
|
1150
1153
|
label: l.label,
|
|
@@ -1189,7 +1192,7 @@ class Bi {
|
|
|
1189
1192
|
grouping: this.groupingFor(t),
|
|
1190
1193
|
server: o.server,
|
|
1191
1194
|
tree: t.tree
|
|
1192
|
-
}, s =
|
|
1195
|
+
}, s = zn(t.admitted, n, r), i = o.virtual ? Kn(s, o.virtual.from, o.virtual.to) : s;
|
|
1193
1196
|
return this.projectionCache = { hook: t, columns: n, projection: i }, i;
|
|
1194
1197
|
}
|
|
1195
1198
|
/* --- The hook's snapshot ---------------------------------------------------------- */
|
|
@@ -1237,7 +1240,7 @@ class Bi {
|
|
|
1237
1240
|
/** Whether the table puts up a table toolbar of its own - also while it is
|
|
1238
1241
|
grouped: the tag that names and removes the grouping needs a place. */
|
|
1239
1242
|
needsOwnToolbar() {
|
|
1240
|
-
return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((t) =>
|
|
1243
|
+
return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((t) => Ee(t.spec.filter) !== void 0) || (this.hook?.rowFilters.size ?? 0) > 0 || (this.hook?.publicSnapshot.grouping.length ?? 0) > 0;
|
|
1241
1244
|
}
|
|
1242
1245
|
/* --- Row detail ------------------------------------------------------------------- */
|
|
1243
1246
|
registerDetail(t, n) {
|
|
@@ -1277,33 +1280,33 @@ class Bi {
|
|
|
1277
1280
|
this.actions.entries.delete(t) && this.structure++;
|
|
1278
1281
|
}
|
|
1279
1282
|
}
|
|
1280
|
-
const Wn = /* @__PURE__ */ new WeakMap(),
|
|
1283
|
+
const Wn = /* @__PURE__ */ new WeakMap(), Ii = (e, t) => {
|
|
1281
1284
|
Wn.set(e, t);
|
|
1282
|
-
},
|
|
1283
|
-
`,
|
|
1284
|
-
const
|
|
1285
|
-
return
|
|
1286
|
-
},
|
|
1287
|
-
t.map((
|
|
1288
|
-
...e.map((
|
|
1285
|
+
}, $i = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Wn.get(e) : void 0, B = (...e) => e.filter(Boolean).join(" "), qn = { separator: ",", decimal: ".", yes: "yes", no: "no" }, zi = `\r
|
|
1286
|
+
`, Ki = "\uFEFF", Yn = (e, t) => typeof e == "number" ? String(e).replace(".", t.decimal) : typeof e == "boolean" ? e ? t.yes : t.no : e, Un = (e, t) => e.includes(t) || /["\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Jn = (e, t) => t && /^[=+\-@\t\r]/.test(e) ? `'${e}` : e, Gi = (e, t, n, o) => {
|
|
1287
|
+
const r = t.value?.(e);
|
|
1288
|
+
return r == null ? "" : Un(typeof r == "string" ? Jn(r, o) : Yn(r, n), n.separator);
|
|
1289
|
+
}, Xn = (e, t, n, o) => [
|
|
1290
|
+
t.map((r) => Un(Jn(r.label ?? r.id, o), n.separator)).join(n.separator),
|
|
1291
|
+
...e.map((r) => t.map((s) => Gi(r, s, n, o)).join(n.separator))
|
|
1289
1292
|
];
|
|
1290
1293
|
function hn(e, t, n = qn) {
|
|
1291
|
-
return
|
|
1294
|
+
return Ki + Xn(e, t, n, !0).join(zi);
|
|
1292
1295
|
}
|
|
1293
|
-
function
|
|
1294
|
-
return
|
|
1296
|
+
function ji(e, t, n = qn) {
|
|
1297
|
+
return Xn(e, t, { ...n, separator: " " }, !1).join(`
|
|
1295
1298
|
`);
|
|
1296
1299
|
}
|
|
1297
|
-
function
|
|
1300
|
+
function Qn(e) {
|
|
1298
1301
|
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);
|
|
1299
1302
|
return e.inPinOrder(n.map((o) => ({ id: o.spec.id, e: o }))).map(({ e: o }) => o);
|
|
1300
1303
|
}
|
|
1301
|
-
function
|
|
1304
|
+
function Zn(e) {
|
|
1302
1305
|
e.setSearch("");
|
|
1303
1306
|
for (const t of Object.keys(e.filter)) e.setFilter(t, null);
|
|
1304
1307
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const { decimal: n } =
|
|
1308
|
+
function jt(e, t) {
|
|
1309
|
+
const { decimal: n } = Mo(e);
|
|
1307
1310
|
return {
|
|
1308
1311
|
separator: n === "," ? ";" : ",",
|
|
1309
1312
|
decimal: n,
|
|
@@ -1311,41 +1314,41 @@ function Gt(e, t) {
|
|
|
1311
1314
|
no: t.booleanNo.toLocaleLowerCase()
|
|
1312
1315
|
};
|
|
1313
1316
|
}
|
|
1314
|
-
function
|
|
1315
|
-
return
|
|
1317
|
+
function eo(e, t) {
|
|
1318
|
+
return Qn(e).filter((n) => e.kindOf(n, t) !== "other" || n.spec.ownExportValue).map(
|
|
1316
1319
|
(n) => ({
|
|
1317
1320
|
id: n.spec.id,
|
|
1318
1321
|
label: n.spec.label,
|
|
1319
|
-
value: (o) =>
|
|
1322
|
+
value: (o) => It(n.read(o), n.spec.ownExportValue)
|
|
1320
1323
|
})
|
|
1321
1324
|
);
|
|
1322
1325
|
}
|
|
1323
|
-
function
|
|
1326
|
+
function Hi(e, t, n, o) {
|
|
1324
1327
|
const r = e.hook;
|
|
1325
1328
|
if (!r) return "";
|
|
1326
|
-
const s =
|
|
1329
|
+
const s = eo(e, r.rows), i = jt(n, o), { exported: l, filtered: c } = e.projection();
|
|
1327
1330
|
if (!l) return hn(c, s, i);
|
|
1328
1331
|
const a = new Map(l.map((d) => [d.node, d.level + 1])), u = { id: "#level", label: t, value: (d) => a.get(d) };
|
|
1329
1332
|
return hn(l.map((d) => d.node), [u, ...s], i);
|
|
1330
1333
|
}
|
|
1331
|
-
function
|
|
1334
|
+
function to(e) {
|
|
1332
1335
|
const t = e.hook;
|
|
1333
1336
|
if (!t) return [];
|
|
1334
1337
|
const { exported: n, filtered: o } = e.projection(), r = n ? n.map((s) => s.node) : o;
|
|
1335
1338
|
return t.selectedRows ?? r.filter((s) => t.publicSnapshot.selection.isSelected(t.rowKey(s)));
|
|
1336
1339
|
}
|
|
1337
|
-
function
|
|
1338
|
-
const o = e.hook, r =
|
|
1339
|
-
return !o || r.length === 0 ? "" :
|
|
1340
|
+
function no(e, t, n) {
|
|
1341
|
+
const o = e.hook, r = to(e);
|
|
1342
|
+
return !o || r.length === 0 ? "" : ji(r, eo(e, o.rows), jt(t, n));
|
|
1340
1343
|
}
|
|
1341
|
-
function
|
|
1342
|
-
return
|
|
1344
|
+
function Wi(e, t, n, o) {
|
|
1345
|
+
return oo(e, e.read(t), n, o);
|
|
1343
1346
|
}
|
|
1344
|
-
function
|
|
1345
|
-
const r =
|
|
1346
|
-
return r === void 0 ? "" : Yn(r,
|
|
1347
|
+
function oo(e, t, n, o) {
|
|
1348
|
+
const r = It(t, e.spec.ownExportValue);
|
|
1349
|
+
return r === void 0 ? "" : Yn(r, jt(n, o));
|
|
1347
1350
|
}
|
|
1348
|
-
function
|
|
1351
|
+
function ro({
|
|
1349
1352
|
entry: e,
|
|
1350
1353
|
registry: t,
|
|
1351
1354
|
hook: n,
|
|
@@ -1356,18 +1359,18 @@ function oo({
|
|
|
1356
1359
|
setOpen: l,
|
|
1357
1360
|
panelId: c
|
|
1358
1361
|
}) {
|
|
1359
|
-
const a = ie(), u =
|
|
1362
|
+
const a = ie(), u = xe(), { id: d, label: b, format: p } = e.spec, { filterOptions: m } = n, w = m?.(d), { values: g, absent: v } = H(
|
|
1360
1363
|
() => w ? At(w, (A) => A, u) : At(n.admitted, e.read, u),
|
|
1361
1364
|
[w, n.admitted, e, u]
|
|
1362
|
-
),
|
|
1365
|
+
), C = Ee(e.spec.filter);
|
|
1363
1366
|
if (n.publicSnapshot.server && !w && e.spec.filter === "list" && X(
|
|
1364
1367
|
`server-filter-options:${d}`,
|
|
1365
1368
|
`The list filter of "${d}" offers only the values of the page in server mode; \`filterOptions\` gives it the server's.`
|
|
1366
|
-
), !
|
|
1367
|
-
const y = n.publicSnapshot, _ =
|
|
1369
|
+
), !C) return null;
|
|
1370
|
+
const y = n.publicSnapshot, _ = C.Input, k = Si(C) ? { absentOccurs: v, format: p, kind: t.kindOf(e, n.rows) } : {}, S = () => {
|
|
1368
1371
|
l(!1), (s ?? o).current?.focus();
|
|
1369
1372
|
};
|
|
1370
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ T(
|
|
1371
1374
|
it,
|
|
1372
1375
|
{
|
|
1373
1376
|
open: i,
|
|
@@ -1386,29 +1389,29 @@ function oo({
|
|
|
1386
1389
|
setCondition: (A) => y.setFilter(d, A),
|
|
1387
1390
|
values: g,
|
|
1388
1391
|
column: { id: d, label: b },
|
|
1389
|
-
...
|
|
1392
|
+
...k
|
|
1390
1393
|
}
|
|
1391
1394
|
),
|
|
1392
|
-
/* @__PURE__ */
|
|
1395
|
+
/* @__PURE__ */ T("div", { className: h.filterFooter, children: [
|
|
1393
1396
|
/* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", onClick: () => y.setFilter(d, null), children: a.filterReset }),
|
|
1394
|
-
/* @__PURE__ */ f(Q, { size: "sm", onClick:
|
|
1397
|
+
/* @__PURE__ */ f(Q, { size: "sm", onClick: S, children: a.filterDone })
|
|
1395
1398
|
] })
|
|
1396
1399
|
]
|
|
1397
1400
|
}
|
|
1398
1401
|
);
|
|
1399
1402
|
}
|
|
1400
|
-
function
|
|
1403
|
+
function qi({
|
|
1401
1404
|
entry: e,
|
|
1402
1405
|
registry: t,
|
|
1403
1406
|
hook: n
|
|
1404
1407
|
}) {
|
|
1405
|
-
const o = ie(), [r, s] =
|
|
1406
|
-
return /* @__PURE__ */
|
|
1408
|
+
const o = ie(), [r, s] = I(!1), i = q(null), l = be(), { id: c, label: a } = e.spec, u = c in n.publicSnapshot.filter;
|
|
1409
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
1407
1410
|
/* @__PURE__ */ f(tt, { content: o.filterHint, children: /* @__PURE__ */ f(
|
|
1408
1411
|
"button",
|
|
1409
1412
|
{
|
|
1410
1413
|
type: "button",
|
|
1411
|
-
className:
|
|
1414
|
+
className: B(h.filterButton, u && h.filterActive),
|
|
1412
1415
|
"aria-label": o.filterColumn(a),
|
|
1413
1416
|
"aria-haspopup": "dialog",
|
|
1414
1417
|
"aria-expanded": r,
|
|
@@ -1430,7 +1433,7 @@ function Wi({
|
|
|
1430
1433
|
}
|
|
1431
1434
|
) }),
|
|
1432
1435
|
/* @__PURE__ */ f(
|
|
1433
|
-
|
|
1436
|
+
ro,
|
|
1434
1437
|
{
|
|
1435
1438
|
entry: e,
|
|
1436
1439
|
registry: t,
|
|
@@ -1444,18 +1447,18 @@ function Wi({
|
|
|
1444
1447
|
)
|
|
1445
1448
|
] });
|
|
1446
1449
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const n = ie(), o =
|
|
1450
|
+
function Yi({ registry: e, hook: t }) {
|
|
1451
|
+
const n = ie(), o = xe(), r = Object.entries(t.publicSnapshot.filter).flatMap(([s, i]) => {
|
|
1449
1452
|
const l = t.rowFilters.get(s);
|
|
1450
1453
|
if (l) return l.describe ? [{ id: s, rowFilter: l, text: l.describe(i) }] : [];
|
|
1451
|
-
const c = e.columnById(s), a = c ?
|
|
1454
|
+
const c = e.columnById(s), a = c ? Ee(c.spec.filter) : void 0;
|
|
1452
1455
|
if (!c || !a) return [];
|
|
1453
1456
|
const u = { formats: o, wording: n, format: c.spec.format, kind: e.kindOf(c, t.rows) };
|
|
1454
|
-
return [{ id: s, entry: c, text:
|
|
1457
|
+
return [{ id: s, entry: c, text: Ai(a, i, u) }];
|
|
1455
1458
|
});
|
|
1456
1459
|
return r.length === 0 ? null : /* @__PURE__ */ f(An, { "aria-label": n.conditions, className: h.conditions, children: r.map(
|
|
1457
|
-
(s) => "rowFilter" in s ? /* @__PURE__ */
|
|
1458
|
-
|
|
1460
|
+
(s) => "rowFilter" in s ? /* @__PURE__ */ T(
|
|
1461
|
+
Pt,
|
|
1459
1462
|
{
|
|
1460
1463
|
className: h.condition,
|
|
1461
1464
|
onRemove: () => t.publicSnapshot.setFilter(s.id, null),
|
|
@@ -1466,25 +1469,25 @@ function qi({ registry: e, hook: t }) {
|
|
|
1466
1469
|
]
|
|
1467
1470
|
},
|
|
1468
1471
|
s.id
|
|
1469
|
-
) : /* @__PURE__ */ f(
|
|
1472
|
+
) : /* @__PURE__ */ f(Ui, { entry: s.entry, text: s.text, registry: e, hook: t }, s.id)
|
|
1470
1473
|
) });
|
|
1471
1474
|
}
|
|
1472
|
-
function
|
|
1475
|
+
function Ui({
|
|
1473
1476
|
entry: e,
|
|
1474
1477
|
text: t,
|
|
1475
1478
|
registry: n,
|
|
1476
1479
|
hook: o
|
|
1477
1480
|
}) {
|
|
1478
|
-
const r = ie(), [s, i] =
|
|
1479
|
-
return /* @__PURE__ */
|
|
1481
|
+
const r = ie(), [s, i] = I(!1), l = q(null), c = q(null), a = be(), { id: u, label: d } = e.spec;
|
|
1482
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
1480
1483
|
/* @__PURE__ */ f(
|
|
1481
|
-
|
|
1484
|
+
Pt,
|
|
1482
1485
|
{
|
|
1483
1486
|
ref: l,
|
|
1484
1487
|
className: h.condition,
|
|
1485
1488
|
onRemove: () => o.publicSnapshot.setFilter(u, null),
|
|
1486
1489
|
removeLabel: r.removeConditionNamed(d, t),
|
|
1487
|
-
children: /* @__PURE__ */
|
|
1490
|
+
children: /* @__PURE__ */ T(
|
|
1488
1491
|
"button",
|
|
1489
1492
|
{
|
|
1490
1493
|
ref: c,
|
|
@@ -1504,7 +1507,7 @@ function Yi({
|
|
|
1504
1507
|
}
|
|
1505
1508
|
),
|
|
1506
1509
|
/* @__PURE__ */ f(
|
|
1507
|
-
|
|
1510
|
+
ro,
|
|
1508
1511
|
{
|
|
1509
1512
|
entry: e,
|
|
1510
1513
|
registry: n,
|
|
@@ -1519,23 +1522,23 @@ function Yi({
|
|
|
1519
1522
|
)
|
|
1520
1523
|
] });
|
|
1521
1524
|
}
|
|
1522
|
-
const
|
|
1523
|
-
function
|
|
1525
|
+
const Ji = (e, t, n) => e.groupingEntries(t.rows).find((o) => o.spec.id === n)?.spec.label ?? n;
|
|
1526
|
+
function Xi({ registry: e, hook: t }) {
|
|
1524
1527
|
const n = ie(), o = e.groupingEntries(t.rows);
|
|
1525
1528
|
if (o.length === 0) return null;
|
|
1526
1529
|
const { grouping: r, setGrouping: s } = t.publicSnapshot;
|
|
1527
|
-
return /* @__PURE__ */
|
|
1530
|
+
return /* @__PURE__ */ T("section", { className: h.groupingChoice, "aria-label": n.grouping, children: [
|
|
1528
1531
|
/* @__PURE__ */ f("h3", { className: h.groupingHeading, children: n.grouping }),
|
|
1529
1532
|
/* @__PURE__ */ f("div", { className: h.groupingOptions, children: o.map((i) => {
|
|
1530
1533
|
const { id: l, label: c } = i.spec, a = r.indexOf(l), u = a !== -1;
|
|
1531
|
-
return /* @__PURE__ */
|
|
1534
|
+
return /* @__PURE__ */ T(
|
|
1532
1535
|
"button",
|
|
1533
1536
|
{
|
|
1534
1537
|
type: "button",
|
|
1535
1538
|
className: h.groupingOption,
|
|
1536
1539
|
"aria-label": n.groupBy(c),
|
|
1537
1540
|
"aria-pressed": u,
|
|
1538
|
-
disabled: !u && r.length >=
|
|
1541
|
+
disabled: !u && r.length >= Kt,
|
|
1539
1542
|
onClick: () => s(u ? r.filter((d) => d !== l) : [...r, l]),
|
|
1540
1543
|
children: [
|
|
1541
1544
|
u && /* @__PURE__ */ f("span", { className: h.groupingLevel, "aria-hidden": "true", children: a + 1 }),
|
|
@@ -1547,35 +1550,35 @@ function Ji({ registry: e, hook: t }) {
|
|
|
1547
1550
|
}) })
|
|
1548
1551
|
] });
|
|
1549
1552
|
}
|
|
1550
|
-
function
|
|
1553
|
+
function Qi({ registry: e, hook: t }) {
|
|
1551
1554
|
const n = ie();
|
|
1552
1555
|
if (!e.tree) return null;
|
|
1553
1556
|
const o = t.publicSnapshot;
|
|
1554
|
-
return /* @__PURE__ */
|
|
1557
|
+
return /* @__PURE__ */ T("div", { className: B(h.groupingChoice, h.groupingOptions), children: [
|
|
1555
1558
|
/* @__PURE__ */ f("button", { type: "button", className: h.groupingOption, onClick: o.unfoldAllBranches, children: n.unfoldAll }),
|
|
1556
1559
|
/* @__PURE__ */ f("button", { type: "button", className: h.groupingOption, onClick: o.foldAllBranches, children: n.foldAll })
|
|
1557
1560
|
] });
|
|
1558
1561
|
}
|
|
1559
|
-
function
|
|
1562
|
+
function Zi({ registry: e, hook: t }) {
|
|
1560
1563
|
const n = ie(), o = t.publicSnapshot, { grouping: r } = o;
|
|
1561
1564
|
if (r.length === 0) return null;
|
|
1562
|
-
const s = r.map((i) =>
|
|
1565
|
+
const s = r.map((i) => Ji(e, t, i));
|
|
1563
1566
|
return (
|
|
1564
1567
|
/* In a tag group, as the conditions stand: the tag is one stop, its button
|
|
1565
1568
|
the thing one tabs to, and the ring stands on the tag. */
|
|
1566
|
-
/* @__PURE__ */ f(An, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ f(
|
|
1569
|
+
/* @__PURE__ */ f(An, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ f(Pt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ T(
|
|
1567
1570
|
Nn,
|
|
1568
1571
|
{
|
|
1569
|
-
trigger: /* @__PURE__ */
|
|
1572
|
+
trigger: /* @__PURE__ */ T("button", { type: "button", className: B(h.conditionButton, h.groupingTrigger), children: [
|
|
1570
1573
|
/* @__PURE__ */ f("span", { className: h.groupingPrefix, children: n.groupedBy }),
|
|
1571
|
-
s.map((i, l) => /* @__PURE__ */
|
|
1574
|
+
s.map((i, l) => /* @__PURE__ */ T("span", { className: h.groupingPath, children: [
|
|
1572
1575
|
l > 0 && /* @__PURE__ */ f("span", { className: h.groupingSeparator, "aria-hidden": "true", children: "›" }),
|
|
1573
1576
|
i
|
|
1574
1577
|
] }, r[l]))
|
|
1575
1578
|
] }),
|
|
1576
1579
|
children: [
|
|
1577
1580
|
r.map((i, l) => /* @__PURE__ */ f(nt, { onSelect: () => o.setGrouping(r.filter((c) => c !== i)), children: n.removeGroupingLevel(s[l]) }, i)),
|
|
1578
|
-
/* @__PURE__ */ f(
|
|
1581
|
+
/* @__PURE__ */ f(Lo, {}),
|
|
1579
1582
|
/* @__PURE__ */ f(nt, { onSelect: o.unfoldAll, children: n.unfoldAll }),
|
|
1580
1583
|
/* @__PURE__ */ f(nt, { onSelect: o.foldAll, children: n.foldAll })
|
|
1581
1584
|
]
|
|
@@ -1583,38 +1586,38 @@ function Qi({ registry: e, hook: t }) {
|
|
|
1583
1586
|
) }) })
|
|
1584
1587
|
);
|
|
1585
1588
|
}
|
|
1586
|
-
const
|
|
1589
|
+
const so = /* @__PURE__ */ rt("sm");
|
|
1587
1590
|
function at(e) {
|
|
1588
|
-
const t = _e(
|
|
1591
|
+
const t = _e(so);
|
|
1589
1592
|
return e ?? t;
|
|
1590
1593
|
}
|
|
1591
|
-
function
|
|
1594
|
+
function io({ registry: e }) {
|
|
1592
1595
|
const t = ie(), n = at();
|
|
1593
1596
|
return /* @__PURE__ */ f(Q, { size: n, variant: "secondary", onClick: () => e.addRow?.(), children: t.newRow });
|
|
1594
1597
|
}
|
|
1595
|
-
function
|
|
1598
|
+
function lo({
|
|
1596
1599
|
registry: e,
|
|
1597
1600
|
className: t,
|
|
1598
1601
|
children: n,
|
|
1599
1602
|
own: o = !1,
|
|
1600
1603
|
size: r = "sm"
|
|
1601
1604
|
}) {
|
|
1602
|
-
const s = ie(), i =
|
|
1605
|
+
const s = ie(), i = xe(), l = e?.hook ?? null;
|
|
1603
1606
|
let c = null, a = null;
|
|
1604
1607
|
if (e && l) {
|
|
1605
1608
|
const u = l.publicSnapshot, d = u.search !== "" || Object.keys(u.filter).length > 0, b = o || u.selection.count === 0 ? [] : l.selectedRows ?? u.filtered.filter((w) => u.selection.isSelected(l.rowKey(w))), p = e.hasRowActions() ? e.actions.ordered().filter((w) => w.spec.bulk) : [];
|
|
1606
|
-
c = /* @__PURE__ */
|
|
1607
|
-
/* @__PURE__ */ f(
|
|
1608
|
-
/* @__PURE__ */ f(
|
|
1609
|
+
c = /* @__PURE__ */ T(re, { children: [
|
|
1610
|
+
/* @__PURE__ */ f(Zi, { registry: e, hook: l }),
|
|
1611
|
+
/* @__PURE__ */ f(Yi, { registry: e, hook: l })
|
|
1609
1612
|
] });
|
|
1610
1613
|
const m = !d && b.length === 0 && !e.rowAdding;
|
|
1611
|
-
a = /* @__PURE__ */
|
|
1614
|
+
a = /* @__PURE__ */ T("div", { className: B(h.toolbarGroup, m && h.toolbarGroupIdle), children: [
|
|
1612
1615
|
/* @__PURE__ */ f("span", { role: "status", className: h.filteredCount, children: d ? u.server ? (
|
|
1613
1616
|
/* The server counts the matches only; a total beside them would be a second request. */
|
|
1614
1617
|
s.entries(u.rowCount, i.count(u.rowCount))
|
|
1615
1618
|
) : s.filteredOfTotal(i.count(u.filtered.length), i.count(l.tableState.total ?? l.admitted.length)) : "" }),
|
|
1616
|
-
d && /* @__PURE__ */ f(Q, { size: r, variant: "ghost", onClick: () =>
|
|
1617
|
-
b.length > 0 && /* @__PURE__ */
|
|
1619
|
+
d && /* @__PURE__ */ f(Q, { size: r, variant: "ghost", onClick: () => Zn(u), children: s.resetAll }),
|
|
1620
|
+
b.length > 0 && /* @__PURE__ */ T(re, { children: [
|
|
1618
1621
|
/* @__PURE__ */ f("span", { className: h.toolbarInfo, children: s.selectedCount(b.length, i.count(b.length)) }),
|
|
1619
1622
|
p.map(({ key: w, spec: g }) => /* @__PURE__ */ f(
|
|
1620
1623
|
Q,
|
|
@@ -1627,30 +1630,30 @@ function io({
|
|
|
1627
1630
|
w
|
|
1628
1631
|
))
|
|
1629
1632
|
] }),
|
|
1630
|
-
e.rowAdding && /* @__PURE__ */ f(
|
|
1633
|
+
e.rowAdding && /* @__PURE__ */ f(io, { registry: e })
|
|
1631
1634
|
] });
|
|
1632
1635
|
}
|
|
1633
|
-
return /* @__PURE__ */ f(
|
|
1634
|
-
/* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ f(so, { value: r, children: /* @__PURE__ */ f(Tn, { size: r, children: /* @__PURE__ */ T("div", { className: B(h.toolbar, r === "md" && h.toolbarMd, t), children: [
|
|
1637
|
+
/* @__PURE__ */ T("div", { className: h.toolbarGroup, children: [
|
|
1635
1638
|
n,
|
|
1636
1639
|
c
|
|
1637
1640
|
] }),
|
|
1638
1641
|
a
|
|
1639
1642
|
] }) }) });
|
|
1640
1643
|
}
|
|
1641
|
-
const
|
|
1644
|
+
const Rt = /* @__PURE__ */ rt(null), el = () => () => {
|
|
1642
1645
|
}, gn = () => 0;
|
|
1643
1646
|
function Ye(e) {
|
|
1644
|
-
const t = _e(
|
|
1647
|
+
const t = _e(Rt), n = e ? $i(e.Table) ?? null : t?.registry ?? null;
|
|
1645
1648
|
st(
|
|
1646
|
-
n ? n.subscribe :
|
|
1649
|
+
n ? n.subscribe : el,
|
|
1647
1650
|
n ? n.bodyVersion : gn,
|
|
1648
1651
|
n ? n.bodyVersion : gn
|
|
1649
1652
|
);
|
|
1650
1653
|
const o = n?.hook?.publicSnapshot;
|
|
1651
1654
|
return !n || !o ? null : { registry: n, snapshot: o, inside: !e && t !== null, footerTarget: e ? null : t?.footerTarget ?? null };
|
|
1652
1655
|
}
|
|
1653
|
-
function
|
|
1656
|
+
function tl(e, t) {
|
|
1654
1657
|
const n = /* @__PURE__ */ new Map();
|
|
1655
1658
|
for (const [o, r] of t) {
|
|
1656
1659
|
const s = e.get(o);
|
|
@@ -1658,38 +1661,38 @@ function el(e, t) {
|
|
|
1658
1661
|
}
|
|
1659
1662
|
return n;
|
|
1660
1663
|
}
|
|
1661
|
-
function
|
|
1664
|
+
function ao(e, t) {
|
|
1662
1665
|
const n = getComputedStyle(e).getPropertyValue(t).trim(), o = Number.parseFloat(n);
|
|
1663
1666
|
return Number.isFinite(o) ? n.endsWith("ms") ? o : o * 1e3 : 0;
|
|
1664
1667
|
}
|
|
1665
|
-
const
|
|
1668
|
+
const nl = (e) => {
|
|
1666
1669
|
const t = /* @__PURE__ */ new Map(), n = e.getBoundingClientRect().top;
|
|
1667
1670
|
for (const o of Array.from(e.querySelectorAll("tbody > tr[data-motion]")))
|
|
1668
1671
|
t.set(o.dataset.motion, o.getBoundingClientRect().top - n);
|
|
1669
1672
|
return t;
|
|
1670
1673
|
};
|
|
1671
|
-
function
|
|
1674
|
+
function ol(e, t) {
|
|
1672
1675
|
const n = q(null);
|
|
1673
1676
|
Z(() => {
|
|
1674
1677
|
const o = e.current;
|
|
1675
1678
|
if (!o) return;
|
|
1676
|
-
const r =
|
|
1679
|
+
const r = nl(o), s = n.current;
|
|
1677
1680
|
if (n.current = { trigger: t, positions: r }, !s || s.trigger === t) return;
|
|
1678
|
-
const i =
|
|
1681
|
+
const i = ao(o, "--u-duration-medium");
|
|
1679
1682
|
if (i === 0 || typeof o.animate != "function") return;
|
|
1680
|
-
const l = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", c =
|
|
1683
|
+
const l = getComputedStyle(o).getPropertyValue("--u-ease-out").trim() || "ease-out", c = tl(s.positions, r);
|
|
1681
1684
|
for (const a of Array.from(o.querySelectorAll("tbody > tr[data-motion]"))) {
|
|
1682
1685
|
const u = a.dataset.motion, d = c.get(u);
|
|
1683
1686
|
d !== void 0 ? a.animate([{ transform: `translateY(${d}px)` }, { transform: "none" }], { duration: i, easing: l }) : s.positions.has(u) || a.animate([{ opacity: 0, transform: "translateY(-4px)" }, { opacity: 1, transform: "none" }], { duration: i, easing: l });
|
|
1684
1687
|
}
|
|
1685
1688
|
});
|
|
1686
1689
|
}
|
|
1687
|
-
function
|
|
1690
|
+
function rl(e, t, n) {
|
|
1688
1691
|
const o = q(t);
|
|
1689
1692
|
Z(() => {
|
|
1690
1693
|
const r = e.current, s = o.current;
|
|
1691
1694
|
if (o.current = t, !r || s === t || typeof r.animate != "function") return;
|
|
1692
|
-
const i =
|
|
1695
|
+
const i = ao(r, "--u-duration-medium");
|
|
1693
1696
|
if (i === 0) return;
|
|
1694
1697
|
const l = performance.now();
|
|
1695
1698
|
let c = requestAnimationFrame(function a(u) {
|
|
@@ -1701,8 +1704,8 @@ function ol(e, t, n) {
|
|
|
1701
1704
|
};
|
|
1702
1705
|
}, [e, t, n]);
|
|
1703
1706
|
}
|
|
1704
|
-
const
|
|
1705
|
-
function
|
|
1707
|
+
const sl = (e) => e.controls + (e.span ? 1 : 0) + e.aggregates.length + (e.actions ? 1 : 0);
|
|
1708
|
+
function co(e) {
|
|
1706
1709
|
const { controls: t, span: n, aggregates: o, actions: r, blocks: s } = e, i = o.length, l = o.indexOf(!0), c = s.end > 0 ? s.end - (r ? 1 : 0) : 0, a = Math.max(n || i === 0 ? 0 : 1, Math.min(l === -1 ? i : l, i - c)), u = t + (n ? 1 : 0), d = s.start > 0 ? s.start - u : 0;
|
|
1707
1710
|
return {
|
|
1708
1711
|
lead: a,
|
|
@@ -1711,14 +1714,14 @@ function ao(e) {
|
|
|
1711
1714
|
};
|
|
1712
1715
|
}
|
|
1713
1716
|
function bt(e, t) {
|
|
1714
|
-
const n =
|
|
1717
|
+
const n = sl(t);
|
|
1715
1718
|
if (e === "cells") return Array.from({ length: n }, () => 1);
|
|
1716
1719
|
if (e === "whole") return [n];
|
|
1717
|
-
const { lead: o, labelColumns: r, countColumns: s } =
|
|
1720
|
+
const { lead: o, labelColumns: r, countColumns: s } = co(t), i = Array.from({ length: t.controls }, () => 1), l = Array.from({ length: t.aggregates.length - o + (t.actions ? 1 : 0) }, () => 1), c = (a) => o - a > 0 ? [o - a] : [];
|
|
1718
1721
|
return e === "header" ? [...i, (t.span ? 1 : 0) + r, ...c(r), ...l] : [...i, 1, ...s > 0 ? [s] : [], ...c(s), ...l];
|
|
1719
1722
|
}
|
|
1720
1723
|
const Ue = (e) => `row:${e}`;
|
|
1721
|
-
function
|
|
1724
|
+
function il({ layout: e, body: t, rowKey: n, expanded: o, foot: r }) {
|
|
1722
1725
|
const s = bt("cells", e), i = bt("whole", e), l = [{ key: "head", cells: s, at: -1 }], c = (a, u) => {
|
|
1723
1726
|
const d = n(a);
|
|
1724
1727
|
l.push({ key: Ue(d), cells: s, at: u, row: a }), o.has(d) && l.push({ key: `detail:${d}`, cells: i, at: u, row: a });
|
|
@@ -1727,7 +1730,7 @@ function sl({ layout: e, body: t, rowKey: n, expanded: o, foot: r }) {
|
|
|
1727
1730
|
a.kind === "row" ? c(a.row, u) : l.push({ key: `${a.kind}:${a.group.path}`, cells: bt(a.kind, e), at: u });
|
|
1728
1731
|
}), l.length === 1 && l.push({ key: "empty", cells: i, at: -1 }), r && l.push({ key: "foot", cells: s, at: -1 }), l;
|
|
1729
1732
|
}
|
|
1730
|
-
function
|
|
1733
|
+
function uo(e, t) {
|
|
1731
1734
|
let n = 0;
|
|
1732
1735
|
for (let o = 0; o < e.length; o++) {
|
|
1733
1736
|
const r = n + e[o];
|
|
@@ -1736,16 +1739,16 @@ function co(e, t) {
|
|
|
1736
1739
|
}
|
|
1737
1740
|
return { index: 0, start: 0 };
|
|
1738
1741
|
}
|
|
1739
|
-
const
|
|
1740
|
-
function
|
|
1742
|
+
const je = (e, t) => e.slice(0, t).reduce((n, o) => n + o, 0);
|
|
1743
|
+
function ll(e, t, n, o) {
|
|
1741
1744
|
const r = e.length - 1, s = e[t.line];
|
|
1742
1745
|
if (!s) return t;
|
|
1743
|
-
const { index: i } =
|
|
1746
|
+
const { index: i } = uo(s.cells, t.column), l = (c) => ({ line: Math.max(0, Math.min(r, c)), column: t.column });
|
|
1744
1747
|
switch (n) {
|
|
1745
1748
|
case "left":
|
|
1746
|
-
return i > 0 ? { line: t.line, column:
|
|
1749
|
+
return i > 0 ? { line: t.line, column: je(s.cells, i - 1) } : t;
|
|
1747
1750
|
case "right":
|
|
1748
|
-
return i < s.cells.length - 1 ? { line: t.line, column:
|
|
1751
|
+
return i < s.cells.length - 1 ? { line: t.line, column: je(s.cells, i + 1) } : t;
|
|
1749
1752
|
case "up":
|
|
1750
1753
|
return l(t.line - 1);
|
|
1751
1754
|
case "down":
|
|
@@ -1757,15 +1760,15 @@ function il(e, t, n, o) {
|
|
|
1757
1760
|
case "lineStart":
|
|
1758
1761
|
return { line: t.line, column: 0 };
|
|
1759
1762
|
case "lineEnd":
|
|
1760
|
-
return { line: t.line, column:
|
|
1763
|
+
return { line: t.line, column: je(s.cells, s.cells.length - 1) };
|
|
1761
1764
|
case "first":
|
|
1762
1765
|
return { line: 0, column: 0 };
|
|
1763
1766
|
case "last":
|
|
1764
|
-
return { line: r, column:
|
|
1767
|
+
return { line: r, column: je(e[r].cells, e[r].cells.length - 1) };
|
|
1765
1768
|
}
|
|
1766
1769
|
}
|
|
1767
|
-
function
|
|
1768
|
-
const r = e.flatMap((l, c) => l.cells.map((a, u) => ({ line: c, column:
|
|
1770
|
+
function al(e, t, n, o) {
|
|
1771
|
+
const r = e.flatMap((l, c) => l.cells.map((a, u) => ({ line: c, column: je(l.cells, u) }))), s = r.findIndex((l) => l.line === t.line && l.column === uo(e[t.line].cells, t.column).start);
|
|
1769
1772
|
return (n ? r.slice(0, Math.max(0, s)).reverse() : r.slice(s + 1)).find(o) ?? null;
|
|
1770
1773
|
}
|
|
1771
1774
|
function pn(e, t, n) {
|
|
@@ -1773,7 +1776,7 @@ function pn(e, t, n) {
|
|
|
1773
1776
|
return o >= 0 ? o : Math.max(0, Math.min(e.length - 1, n));
|
|
1774
1777
|
}
|
|
1775
1778
|
const he = "new";
|
|
1776
|
-
class
|
|
1779
|
+
class cl {
|
|
1777
1780
|
wish = null;
|
|
1778
1781
|
/** `open`: the editor, with its list or calendar open - a click asked for it. */
|
|
1779
1782
|
want(t) {
|
|
@@ -1785,78 +1788,78 @@ class al {
|
|
|
1785
1788
|
return n && (this.wish = null), n;
|
|
1786
1789
|
}
|
|
1787
1790
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const [e, t] =
|
|
1791
|
+
function dl() {
|
|
1792
|
+
const [e, t] = I({ active: null, widget: !1, editing: null }), [n] = I(() => new cl());
|
|
1790
1793
|
return { state: e, setState: t, focus: n };
|
|
1791
1794
|
}
|
|
1792
1795
|
const mn = (e) => e?.spec.edit !== void 0;
|
|
1793
|
-
function
|
|
1796
|
+
function fo(e, t) {
|
|
1794
1797
|
const n = (o) => se(o) || o === "" ? null : o instanceof Date ? o.getTime() : o;
|
|
1795
1798
|
return Object.is(n(e), n(t));
|
|
1796
1799
|
}
|
|
1797
|
-
function
|
|
1798
|
-
const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, onCellEdit: i, rowMode: l, onRowSave: c, onRowAdd: a, newRow: u } = e, { setState: d } = t, b = n.map((
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1801
|
-
}, g = (
|
|
1802
|
-
const
|
|
1803
|
-
D[
|
|
1804
|
-
|
|
1805
|
-
active: { line:
|
|
1806
|
-
editing: { line:
|
|
1800
|
+
function ul(e) {
|
|
1801
|
+
const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, onCellEdit: i, rowMode: l, onRowSave: c, onRowAdd: a, newRow: u } = e, { setState: d } = t, b = n.map((x) => x.key), p = t.state.editing, m = (x) => x === he ? p?.fresh : n.find((O) => O.key === x)?.row, w = (x) => {
|
|
1802
|
+
const O = n[x.line];
|
|
1803
|
+
return O?.key === he ? { row: O.row } : O?.row !== void 0 && O.key === Ue(s(O.row)) ? { row: O.row } : null;
|
|
1804
|
+
}, g = (x) => w(x) !== null && mn(r(o[x.column] ?? "")), v = () => o.map(r).filter(mn), C = (x, O, M = !1) => {
|
|
1805
|
+
const R = n[x.line], E = r(o[x.column] ?? ""), D = l ? Object.fromEntries(v().map(($) => [$.spec.id, $.read(R.row)])) : {};
|
|
1806
|
+
D[E.spec.id] = O === void 0 ? E.read(R.row) : O, t.focus.want(M ? "open" : "editor"), d(($) => ({
|
|
1807
|
+
...$,
|
|
1808
|
+
active: { line: R.key, column: E.spec.id, lineIndex: x.line, columnIndex: x.column },
|
|
1809
|
+
editing: { line: R.key, column: E.spec.id, row: l, drafts: D, errors: {}, refused: !1 }
|
|
1807
1810
|
}));
|
|
1808
|
-
}, y = (
|
|
1811
|
+
}, y = (x = {}, O = !0) => {
|
|
1809
1812
|
if (!p) return !0;
|
|
1810
|
-
const
|
|
1811
|
-
if (
|
|
1812
|
-
return d((
|
|
1813
|
-
const
|
|
1814
|
-
for (const [
|
|
1815
|
-
const Y = r(
|
|
1816
|
-
Y && (
|
|
1813
|
+
const M = { ...p.drafts, ...x }, R = m(p.line);
|
|
1814
|
+
if (R === void 0)
|
|
1815
|
+
return d((P) => ({ ...P, editing: null })), !0;
|
|
1816
|
+
const E = {};
|
|
1817
|
+
for (const [P, K] of Object.entries(M)) {
|
|
1818
|
+
const Y = r(P)?.spec.validate?.(K, R);
|
|
1819
|
+
Y && (E[P] = Y);
|
|
1817
1820
|
}
|
|
1818
|
-
const D = Object.keys(
|
|
1821
|
+
const D = Object.keys(M).find((P) => E[P] !== void 0);
|
|
1819
1822
|
if (D !== void 0) {
|
|
1820
|
-
const
|
|
1821
|
-
return
|
|
1822
|
-
...
|
|
1823
|
-
active: { line: p.line, column:
|
|
1824
|
-
editing:
|
|
1823
|
+
const P = p.row ? D : p.column;
|
|
1824
|
+
return O && t.focus.want("editor"), d((K) => ({
|
|
1825
|
+
...K,
|
|
1826
|
+
active: { line: p.line, column: P, lineIndex: Math.max(0, b.indexOf(p.line)), columnIndex: o.indexOf(P) },
|
|
1827
|
+
editing: K.editing && { ...K.editing, column: P, drafts: M, errors: E, refused: !1 }
|
|
1825
1828
|
})), !1;
|
|
1826
1829
|
}
|
|
1827
|
-
const
|
|
1828
|
-
return p.line === he ? a?.({ values:
|
|
1829
|
-
}, _ = (
|
|
1830
|
-
t.focus.want("cell"), d((
|
|
1831
|
-
},
|
|
1832
|
-
t.focus.want("editor"), d((
|
|
1830
|
+
const $ = Object.keys(M).filter((P) => !fo(M[P], r(P)?.read(R)));
|
|
1831
|
+
return p.line === he ? a?.({ values: M }) : p.row ? $.length > 0 && c?.({ rowKey: s(R), changes: Object.fromEntries($.map((P) => [P, M[P]])), row: R }) : $.length > 0 && i?.({ rowKey: s(R), columnId: p.column, value: M[p.column], row: R }), O && t.focus.want("cell"), d((P) => ({ ...P, editing: null })), !0;
|
|
1832
|
+
}, _ = (x, O) => y({ [x]: O }), k = () => {
|
|
1833
|
+
t.focus.want("cell"), d((x) => ({ ...x, editing: null }));
|
|
1834
|
+
}, S = () => {
|
|
1835
|
+
t.focus.want("editor"), d((x) => x.editing ? { ...x, editing: { ...x.editing, refused: !0 } } : x);
|
|
1833
1836
|
};
|
|
1834
|
-
return { rowAt: w, editable: g, startEdit:
|
|
1835
|
-
if (!
|
|
1836
|
-
const
|
|
1837
|
-
if (
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1837
|
+
return { rowAt: w, editable: g, startEdit: C, save: y, commit: _, discard: k, refuse: S, setDraft: (x, O) => d((M) => {
|
|
1838
|
+
if (!M.editing) return M;
|
|
1839
|
+
const R = { ...M.editing.errors };
|
|
1840
|
+
if (R[x] !== void 0) {
|
|
1841
|
+
const E = r(x)?.spec.validate?.(O, m(M.editing.line));
|
|
1842
|
+
E ? R[x] = E : delete R[x];
|
|
1840
1843
|
}
|
|
1841
|
-
return { ...
|
|
1844
|
+
return { ...M, editing: { ...M.editing, drafts: { ...M.editing.drafts, [x]: O }, errors: R, refused: !1 } };
|
|
1842
1845
|
}), addRow: () => {
|
|
1843
|
-
if (p && (p.row || !y())) return
|
|
1844
|
-
const
|
|
1845
|
-
if (!
|
|
1846
|
-
const
|
|
1847
|
-
t.focus.want("editor"), d((
|
|
1848
|
-
...
|
|
1846
|
+
if (p && (p.row || !y())) return S();
|
|
1847
|
+
const x = v(), O = x[0];
|
|
1848
|
+
if (!O) return;
|
|
1849
|
+
const M = u?.() ?? {};
|
|
1850
|
+
t.focus.want("editor"), d((R) => ({
|
|
1851
|
+
...R,
|
|
1849
1852
|
widget: !1,
|
|
1850
|
-
active: { line: he, column:
|
|
1853
|
+
active: { line: he, column: O.spec.id, lineIndex: 1, columnIndex: o.indexOf(O.spec.id) },
|
|
1851
1854
|
editing: {
|
|
1852
1855
|
line: he,
|
|
1853
|
-
column:
|
|
1856
|
+
column: O.spec.id,
|
|
1854
1857
|
row: !0,
|
|
1855
1858
|
/* What `newRow` leaves out is empty - `null`, as an emptied field says it. */
|
|
1856
|
-
drafts: Object.fromEntries(
|
|
1859
|
+
drafts: Object.fromEntries(x.map((E) => [E.spec.id, E.read(M) ?? null])),
|
|
1857
1860
|
errors: {},
|
|
1858
1861
|
refused: !1,
|
|
1859
|
-
fresh:
|
|
1862
|
+
fresh: M
|
|
1860
1863
|
}
|
|
1861
1864
|
}));
|
|
1862
1865
|
} };
|
|
@@ -1876,7 +1879,7 @@ function qt(e, t) {
|
|
|
1876
1879
|
const { start: s, end: i } = Wt(o).find((l) => l.cell === n);
|
|
1877
1880
|
return { cell: n, line: r, column: s, end: i };
|
|
1878
1881
|
}
|
|
1879
|
-
const
|
|
1882
|
+
const fl = {
|
|
1880
1883
|
ArrowLeft: "left",
|
|
1881
1884
|
ArrowRight: "right",
|
|
1882
1885
|
ArrowUp: "up",
|
|
@@ -1886,26 +1889,26 @@ const ul = {
|
|
|
1886
1889
|
PageUp: "pageUp",
|
|
1887
1890
|
PageDown: "pageDown"
|
|
1888
1891
|
};
|
|
1889
|
-
function
|
|
1892
|
+
function hl(e, t) {
|
|
1890
1893
|
const n = e.parentElement?.getBoundingClientRect().height ?? 0, o = t.parentElement, r = Math.min(o?.clientHeight || window.innerHeight, window.innerHeight);
|
|
1891
1894
|
return n > 0 ? Math.max(1, Math.floor(r / n) - 1) : 10;
|
|
1892
1895
|
}
|
|
1893
|
-
function
|
|
1896
|
+
function ho(e, t) {
|
|
1894
1897
|
return t && t.line === e.line && t.columnIndex >= e.column && t.columnIndex < e.end ? t.columnIndex : e.column;
|
|
1895
1898
|
}
|
|
1896
|
-
function
|
|
1899
|
+
function gl({ grid: e, lines: t, ids: n, virtual: o }, r, s) {
|
|
1897
1900
|
const i = t[s.line];
|
|
1898
1901
|
if (!i) return;
|
|
1899
1902
|
e.setState((a) => ({ ...a, widget: !1, active: { line: i.key, column: n[s.column] ?? "", lineIndex: s.line, columnIndex: s.column } }));
|
|
1900
1903
|
const l = Array.from(r.querySelectorAll("tr[data-grid-line]")).find((a) => a.dataset.gridLine === i.key), c = l ? Wt(l).find((a) => s.column >= a.start && s.column < a.end)?.cell : void 0;
|
|
1901
1904
|
c ? c.focus({ preventScroll: i.key === "head" }) : (e.focus.want("cell"), o && i.at >= 0 && o.showRow(i.at));
|
|
1902
1905
|
}
|
|
1903
|
-
function
|
|
1906
|
+
function pl(e, t, n) {
|
|
1904
1907
|
const { grid: o, lines: r, ids: s, columnById: i, select: l } = e, { rowAt: c, editable: a, startEdit: u, save: d, discard: b } = t, p = r.map((y) => y.key), m = o.state.editing, w = n.currentTarget;
|
|
1905
1908
|
if (n.defaultPrevented) return;
|
|
1906
1909
|
const g = qt(w, n.target);
|
|
1907
1910
|
if (!g) return;
|
|
1908
|
-
const v = { line: p.indexOf(g.line), column:
|
|
1911
|
+
const v = { line: p.indexOf(g.line), column: ho(g, o.state.active) };
|
|
1909
1912
|
if (v.line < 0) return;
|
|
1910
1913
|
if (m?.row && m.line === g.line) {
|
|
1911
1914
|
n.key === "Escape" ? (n.preventDefault(), b()) : n.key === "Enter" && !(n.target instanceof HTMLButtonElement) && (n.preventDefault(), d());
|
|
@@ -1917,7 +1920,7 @@ function gl(e, t, n) {
|
|
|
1917
1920
|
else if (n.key === "Enter" && !(n.target instanceof HTMLButtonElement))
|
|
1918
1921
|
n.preventDefault(), d();
|
|
1919
1922
|
else if (n.key === "Tab") {
|
|
1920
|
-
const y =
|
|
1923
|
+
const y = al(r, v, n.shiftKey, a), _ = d();
|
|
1921
1924
|
if ((y || !_) && n.preventDefault(), !_) return;
|
|
1922
1925
|
y ? u(y) : o.focus.want(null);
|
|
1923
1926
|
}
|
|
@@ -1928,9 +1931,9 @@ function gl(e, t, n) {
|
|
|
1928
1931
|
return;
|
|
1929
1932
|
}
|
|
1930
1933
|
if (n.altKey || n.metaKey) return;
|
|
1931
|
-
const
|
|
1932
|
-
if (
|
|
1933
|
-
n.preventDefault(),
|
|
1934
|
+
const C = n.ctrlKey ? { Home: "first", End: "last" }[n.key] : fl[n.key];
|
|
1935
|
+
if (C) {
|
|
1936
|
+
n.preventDefault(), gl(e, w, ll(r, v, C, hl(g.cell, w)));
|
|
1934
1937
|
return;
|
|
1935
1938
|
}
|
|
1936
1939
|
if (!n.ctrlKey) {
|
|
@@ -1954,14 +1957,14 @@ function gl(e, t, n) {
|
|
|
1954
1957
|
}
|
|
1955
1958
|
}
|
|
1956
1959
|
}
|
|
1957
|
-
function
|
|
1960
|
+
function ml({ grid: e, lines: t }, { editable: n, startEdit: o }, r) {
|
|
1958
1961
|
if (r.button !== 0 || e.state.editing) return;
|
|
1959
1962
|
const s = qt(r.currentTarget, r.target);
|
|
1960
1963
|
if (!s || r.target.closest(Ht) !== s.cell) return;
|
|
1961
1964
|
const i = { line: t.findIndex((l) => l.key === s.line), column: s.column };
|
|
1962
1965
|
i.line >= 0 && n(i) && o(i, void 0, !0);
|
|
1963
1966
|
}
|
|
1964
|
-
function
|
|
1967
|
+
function wl({ grid: e, lines: t, ids: n }, { save: o, refuse: r }, s) {
|
|
1965
1968
|
const i = e.state.editing, l = qt(s.currentTarget, s.target);
|
|
1966
1969
|
if (!l) return;
|
|
1967
1970
|
const c = t.findIndex((u) => u.key === l.line), a = n[l.column] ?? "";
|
|
@@ -1973,7 +1976,7 @@ function ml({ grid: e, lines: t, ids: n }, { save: o, refuse: r }, s) {
|
|
|
1973
1976
|
return;
|
|
1974
1977
|
}
|
|
1975
1978
|
e.focus.want(null), e.setState((u) => {
|
|
1976
|
-
const d =
|
|
1979
|
+
const d = ho(l, u.active);
|
|
1977
1980
|
return {
|
|
1978
1981
|
...u,
|
|
1979
1982
|
widget: s.target !== l.cell,
|
|
@@ -1981,11 +1984,11 @@ function ml({ grid: e, lines: t, ids: n }, { save: o, refuse: r }, s) {
|
|
|
1981
1984
|
};
|
|
1982
1985
|
});
|
|
1983
1986
|
}
|
|
1984
|
-
function
|
|
1987
|
+
function bl({ grid: e }, t) {
|
|
1985
1988
|
t.currentTarget.contains(t.relatedTarget) || e.setState((n) => n.widget ? { ...n, widget: !1 } : n);
|
|
1986
1989
|
}
|
|
1987
|
-
function
|
|
1988
|
-
const { grid: t, rowKey: n, onRowDelete: o } = e, r =
|
|
1990
|
+
function vl(e) {
|
|
1991
|
+
const { grid: t, rowKey: n, onRowDelete: o } = e, r = ul(e), { save: s, discard: i, commit: l, setDraft: c, editable: a, addRow: u } = r, d = {
|
|
1989
1992
|
editing: t.state.editing,
|
|
1990
1993
|
setDraft: c,
|
|
1991
1994
|
commit: l,
|
|
@@ -1994,10 +1997,10 @@ function bl(e) {
|
|
|
1994
1997
|
remove: o && ((m) => o({ rowKey: n(m), row: m }))
|
|
1995
1998
|
}, b = t.state.editing, p = b && !b.row ? () => void s({}, !1) : void 0;
|
|
1996
1999
|
return {
|
|
1997
|
-
onKeyDown: (m) =>
|
|
1998
|
-
onClick: (m) =>
|
|
1999
|
-
onFocus: (m) =>
|
|
2000
|
-
onBlur: (m) =>
|
|
2000
|
+
onKeyDown: (m) => pl(e, r, m),
|
|
2001
|
+
onClick: (m) => ml(e, r, m),
|
|
2002
|
+
onFocus: (m) => wl(e, r, m),
|
|
2003
|
+
onBlur: (m) => bl(e, m),
|
|
2001
2004
|
context: d,
|
|
2002
2005
|
editable: a,
|
|
2003
2006
|
addRow: u,
|
|
@@ -2005,20 +2008,20 @@ function bl(e) {
|
|
|
2005
2008
|
};
|
|
2006
2009
|
}
|
|
2007
2010
|
const Ve = /* @__PURE__ */ rt(null);
|
|
2008
|
-
function
|
|
2011
|
+
function yl(e, t) {
|
|
2009
2012
|
const n = _e(Ve), o = n?.editing;
|
|
2010
2013
|
return o && o.line === e && t in o.drafts ? n : null;
|
|
2011
2014
|
}
|
|
2012
|
-
const
|
|
2013
|
-
function
|
|
2014
|
-
if (t && !e.hasAttribute(
|
|
2015
|
-
e.setAttribute(
|
|
2016
|
-
else if (!t && e.hasAttribute(
|
|
2017
|
-
const n = e.getAttribute(
|
|
2018
|
-
n === "" ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", n), e.removeAttribute(
|
|
2015
|
+
const Ke = "data-grid-tabindex";
|
|
2016
|
+
function _l(e, t) {
|
|
2017
|
+
if (t && !e.hasAttribute(Ke))
|
|
2018
|
+
e.setAttribute(Ke, e.getAttribute("tabindex") ?? ""), e.tabIndex = -1;
|
|
2019
|
+
else if (!t && e.hasAttribute(Ke)) {
|
|
2020
|
+
const n = e.getAttribute(Ke);
|
|
2021
|
+
n === "" ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", n), e.removeAttribute(Ke);
|
|
2019
2022
|
}
|
|
2020
2023
|
}
|
|
2021
|
-
function
|
|
2024
|
+
function xl({
|
|
2022
2025
|
table: e,
|
|
2023
2026
|
grid: t,
|
|
2024
2027
|
lines: n,
|
|
@@ -2031,7 +2034,7 @@ function _l({
|
|
|
2031
2034
|
i.current = s;
|
|
2032
2035
|
});
|
|
2033
2036
|
const l = s !== void 0;
|
|
2034
|
-
return
|
|
2037
|
+
return Ce(() => {
|
|
2035
2038
|
const c = e.current;
|
|
2036
2039
|
if (!l || !c) return;
|
|
2037
2040
|
const a = (u) => {
|
|
@@ -2046,26 +2049,26 @@ function _l({
|
|
|
2046
2049
|
const { active: a, widget: u, editing: d } = t.state, b = kl(a, n, o), p = n[b.line]?.key, m = new Map(n.map((y, _) => [y.key, _]));
|
|
2047
2050
|
let w = null, g = null;
|
|
2048
2051
|
for (const y of Array.from(c.querySelectorAll("tr[data-grid-line]"))) {
|
|
2049
|
-
const _ = y.dataset.gridLine,
|
|
2050
|
-
for (const { cell:
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2054
|
-
for (const
|
|
2052
|
+
const _ = y.dataset.gridLine, k = Wt(y);
|
|
2053
|
+
for (const { cell: S, start: A, end: L } of k) {
|
|
2054
|
+
const x = b.column >= A && b.column < L || S === k.at(-1).cell && b.column >= L;
|
|
2055
|
+
x && _ === p && (w = S), x && g === null && _ !== "head" && (g = S), S.tabIndex = -1, r && _ !== "head" && !r({ line: m.get(_) ?? -1, column: A }) ? S.setAttribute("aria-readonly", "true") : S.removeAttribute("aria-readonly");
|
|
2056
|
+
const O = d?.row === !0 && d.line === _ || S === w && (u || d !== null && d.line === _);
|
|
2057
|
+
for (const M of Array.from(S.querySelectorAll(Ht))) _l(M, !O);
|
|
2055
2058
|
}
|
|
2056
2059
|
}
|
|
2057
2060
|
const v = w ?? g ?? c.querySelector("tr[data-grid-line] > *");
|
|
2058
2061
|
v && !(d?.row && v.parentElement?.dataset.gridLine === d.line) && (v.tabIndex = 0);
|
|
2059
|
-
const
|
|
2060
|
-
if (
|
|
2062
|
+
const C = t.focus.take(w !== null);
|
|
2063
|
+
if (C === "editor" || C === "open") {
|
|
2061
2064
|
const y = w?.querySelector("input, select, textarea, button");
|
|
2062
|
-
if (y?.focus(), y instanceof HTMLInputElement && y.type === "text" && y.setSelectionRange(y.value.length, y.value.length),
|
|
2065
|
+
if (y?.focus(), y instanceof HTMLInputElement && y.type === "text" && y.setSelectionRange(y.value.length, y.value.length), C === "open" && y instanceof HTMLSelectElement)
|
|
2063
2066
|
try {
|
|
2064
2067
|
y.showPicker();
|
|
2065
2068
|
} catch {
|
|
2066
2069
|
}
|
|
2067
|
-
else
|
|
2068
|
-
} else
|
|
2070
|
+
else C === "open" && y instanceof HTMLButtonElement && y.click();
|
|
2071
|
+
} else C === "cell" && w?.focus();
|
|
2069
2072
|
}), null;
|
|
2070
2073
|
}
|
|
2071
2074
|
function kl(e, t, n) {
|
|
@@ -2079,7 +2082,7 @@ function kl(e, t, n) {
|
|
|
2079
2082
|
} : { line: Math.min(1, t.length - 1), column: 0 };
|
|
2080
2083
|
}
|
|
2081
2084
|
function Sl({ entry: e, row: t, rowName: n, grid: o }) {
|
|
2082
|
-
const r =
|
|
2085
|
+
const r = xe(), s = q(null), { spec: i } = e, l = o.editing, c = i.id, a = l.drafts[c], u = l.errors[c] ?? null, d = (m) => o.setDraft(c, m), b = o.wording.editCell(i.label, n);
|
|
2083
2086
|
let p;
|
|
2084
2087
|
if (typeof i.edit == "function")
|
|
2085
2088
|
p = i.edit({
|
|
@@ -2093,28 +2096,28 @@ function Sl({ entry: e, row: t, rowName: n, grid: o }) {
|
|
|
2093
2096
|
else if (i.edit === "number")
|
|
2094
2097
|
p = /* @__PURE__ */ f(yt, { size: "sm", value: typeof a == "number" ? a : null, onChange: d });
|
|
2095
2098
|
else if (i.edit === "date")
|
|
2096
|
-
p = /* @__PURE__ */ f(
|
|
2099
|
+
p = /* @__PURE__ */ f(Fo, { size: "sm", value: a instanceof Date ? a : null, onChange: (m) => l.row ? d(m) : o.commit(c, m) });
|
|
2097
2100
|
else if (i.edit === "select") {
|
|
2098
|
-
const m = i.editOptions ?? At(o.hook.admitted, e.read, r).values, w = m.findIndex((g) =>
|
|
2099
|
-
p = /* @__PURE__ */
|
|
2101
|
+
const m = i.editOptions ?? At(o.hook.admitted, e.read, r).values, w = m.findIndex((g) => fo(g, a));
|
|
2102
|
+
p = /* @__PURE__ */ T(Rn, { size: "sm", value: w < 0 ? "" : String(w), onChange: (g) => d(m[Number(g.target.value)]), children: [
|
|
2100
2103
|
w < 0 && /* @__PURE__ */ f("option", { value: "" }),
|
|
2101
2104
|
m.map((g, v) => /* @__PURE__ */ f("option", { value: v, children: g instanceof Date ? r.date(g) : String(g) }, v))
|
|
2102
2105
|
] });
|
|
2103
2106
|
} else
|
|
2104
|
-
p = /* @__PURE__ */ f(
|
|
2105
|
-
return /* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */ f(vt, { className: h.editorField, label: /* @__PURE__ */ f(
|
|
2107
|
+
p = /* @__PURE__ */ f(On, { size: "sm", value: se(a) ? "" : String(a), onChange: (m) => d(m.target.value) });
|
|
2108
|
+
return /* @__PURE__ */ T("div", { ref: s, className: h.editor, children: [
|
|
2109
|
+
/* @__PURE__ */ f(vt, { className: h.editorField, label: /* @__PURE__ */ f(Oe, { children: b }), error: u ?? void 0, children: p }),
|
|
2107
2110
|
/* @__PURE__ */ f(it, { open: u !== null, onOpenChange: () => {
|
|
2108
2111
|
}, anchorRef: s, restoreFocus: !1, offset: 4, className: h.editorMessage, children: /* @__PURE__ */ f("span", { "aria-hidden": "true", children: u }) })
|
|
2109
2112
|
] });
|
|
2110
2113
|
}
|
|
2111
|
-
function
|
|
2112
|
-
return /* @__PURE__ */
|
|
2114
|
+
function go({ wording: e }) {
|
|
2115
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
2113
2116
|
/* @__PURE__ */ f("span", { "aria-hidden": "true", className: h.absent, children: "—" }),
|
|
2114
|
-
/* @__PURE__ */ f(
|
|
2117
|
+
/* @__PURE__ */ f(Oe, { children: e.cellAbsentValue })
|
|
2115
2118
|
] });
|
|
2116
2119
|
}
|
|
2117
|
-
const Cl = { sum: "Σ", avg: "⌀", min: "min", max: "max" },
|
|
2120
|
+
const Cl = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, Al = (e, t) => ({
|
|
2118
2121
|
sum: t.footerSum,
|
|
2119
2122
|
avg: t.footerAverage,
|
|
2120
2123
|
min: t.footerMinimum,
|
|
@@ -2123,23 +2126,23 @@ const Cl = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, xl = (e, t) => ({
|
|
|
2123
2126
|
count: t.footerCount,
|
|
2124
2127
|
distinct: t.footerDistinct
|
|
2125
2128
|
})[e] ?? t.footerAggregate, wn = /* @__PURE__ */ new WeakMap();
|
|
2126
|
-
function
|
|
2129
|
+
function po(e, t, n) {
|
|
2127
2130
|
const o = e.spec.aggregate;
|
|
2128
2131
|
let r = wn.get(t);
|
|
2129
2132
|
r || wn.set(t, r = /* @__PURE__ */ new Map());
|
|
2130
2133
|
const s = r.get(e), i = e.spec.value, l = e.spec.rightAligned;
|
|
2131
2134
|
if (s && s.spec === o && s.reader === i && s.aligned === l) return s;
|
|
2132
|
-
const c = n ? n.value :
|
|
2135
|
+
const c = n ? n.value : zt({ id: e.spec.id, read: e.read, aggregate: o }, t);
|
|
2133
2136
|
let a = 0;
|
|
2134
2137
|
if ((o === "sum" || o === "avg") && typeof c == "number")
|
|
2135
2138
|
for (const b of t) {
|
|
2136
2139
|
const p = e.read(b);
|
|
2137
|
-
|
|
2140
|
+
Nl(p) && (a = Math.max(a, Tl(p)));
|
|
2138
2141
|
}
|
|
2139
|
-
const u = o === "count" || o === "distinct" || (l ??
|
|
2142
|
+
const u = o === "count" || o === "distinct" || (l ?? Mn(t, e.read) === "number"), d = { spec: o, reader: i, aligned: l, value: c, places: a, numeric: u };
|
|
2140
2143
|
return r.set(e, d), d;
|
|
2141
2144
|
}
|
|
2142
|
-
function
|
|
2145
|
+
function Ot({
|
|
2143
2146
|
entry: e,
|
|
2144
2147
|
rows: t,
|
|
2145
2148
|
formats: n,
|
|
@@ -2149,12 +2152,12 @@ function Rt({
|
|
|
2149
2152
|
}) {
|
|
2150
2153
|
const { aggregate: i, format: l, presentation: c } = e.spec;
|
|
2151
2154
|
if (!i) return null;
|
|
2152
|
-
const a = typeof i == "function" ? "own" : i, { value: u, places: d } =
|
|
2155
|
+
const a = typeof i == "function" ? "own" : i, { value: u, places: d } = po(e, t, s), b = (w) => Pe(w, l, n, o);
|
|
2153
2156
|
let p;
|
|
2154
|
-
if (se(u)) p = /* @__PURE__ */ f(
|
|
2157
|
+
if (se(u)) p = /* @__PURE__ */ f(go, { wording: o });
|
|
2155
2158
|
else if ((a === "sum" || a === "avg") && l === void 0 && typeof u == "number")
|
|
2156
2159
|
p = n.number(u, Math.min(10, a === "avg" ? d + 1 : d));
|
|
2157
|
-
else if (a === "range" && l === "date" &&
|
|
2160
|
+
else if (a === "range" && l === "date" && Rl(u)) {
|
|
2158
2161
|
const [w, g] = u;
|
|
2159
2162
|
p = w.getTime() === g.getTime() ? n.date(w) : o.rangeFromTo(n.dateShort(w), n.dateShort(g));
|
|
2160
2163
|
} else if (a === "count" || a === "distinct") p = n.count(u);
|
|
@@ -2163,29 +2166,29 @@ function Rt({
|
|
|
2163
2166
|
p = b(w) === b(g) ? b(w) : o.rangeFromTo(b(w) ?? "", b(g) ?? "");
|
|
2164
2167
|
} else a === "own" && c ? p = c(u, t[0]) : p = b(u);
|
|
2165
2168
|
const m = Cl[a];
|
|
2166
|
-
return /* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
2167
2170
|
r && m && /* @__PURE__ */ f("span", { "aria-hidden": "true", className: h.footerKind, children: m }),
|
|
2168
|
-
r && /* @__PURE__ */
|
|
2169
|
-
|
|
2171
|
+
r && /* @__PURE__ */ T(Oe, { children: [
|
|
2172
|
+
Al(a, o),
|
|
2170
2173
|
" "
|
|
2171
2174
|
] }),
|
|
2172
2175
|
p
|
|
2173
2176
|
] });
|
|
2174
2177
|
}
|
|
2175
|
-
const
|
|
2178
|
+
const Nl = (e) => typeof e == "number" && Number.isFinite(e), Tl = (e) => {
|
|
2176
2179
|
const [t = "", n = "0"] = e.toExponential().split("e");
|
|
2177
2180
|
return Math.max(0, (t.split(".")[1]?.length ?? 0) - Number(n));
|
|
2178
|
-
},
|
|
2179
|
-
function
|
|
2180
|
-
return e.spec.aggregate ?
|
|
2181
|
+
}, Rl = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
|
|
2182
|
+
function mo(e, t, n) {
|
|
2183
|
+
return e.spec.aggregate ? po(e, t, n).numeric : !1;
|
|
2181
2184
|
}
|
|
2182
|
-
const
|
|
2185
|
+
const wo = {};
|
|
2183
2186
|
function ct(e, t, n = t) {
|
|
2184
|
-
const o =
|
|
2185
|
-
if (!o) return
|
|
2187
|
+
const o = rr(e, t, n);
|
|
2188
|
+
if (!o) return wo;
|
|
2186
2189
|
const r = o.side === "start";
|
|
2187
2190
|
return {
|
|
2188
|
-
className:
|
|
2191
|
+
className: B(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
|
|
2189
2192
|
/* The scroll area keeps a padding as wide as the block for the browser's
|
|
2190
2193
|
scroll into view; a pinned cell lies inside it and would scroll the
|
|
2191
2194
|
table back to its start when focused. Its target is shifted out of the
|
|
@@ -2204,15 +2207,15 @@ function ct(e, t, n = t) {
|
|
|
2204
2207
|
function dt(e, t, n, o) {
|
|
2205
2208
|
if (t === void 0) return o.groupNoValue;
|
|
2206
2209
|
const r = e?.spec;
|
|
2207
|
-
if (r?.group && t instanceof Date) return
|
|
2210
|
+
if (r?.group && t instanceof Date) return Yo(r.group, t, n, o);
|
|
2208
2211
|
const s = r?.ownGroupValue ? void 0 : r?.format;
|
|
2209
|
-
return
|
|
2212
|
+
return Pe(t, s, n, o) ?? String(t);
|
|
2210
2213
|
}
|
|
2211
|
-
function
|
|
2214
|
+
function Et({ entry: e, group: t, formats: n, wording: o }) {
|
|
2212
2215
|
const r = e?.spec;
|
|
2213
2216
|
return t.value !== void 0 && r?.presentation && !r.ownGroupValue && !r.group ? /* @__PURE__ */ f(re, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ f(re, { children: dt(e, t.value, n, o) });
|
|
2214
2217
|
}
|
|
2215
|
-
function
|
|
2218
|
+
function Mt({
|
|
2216
2219
|
group: e,
|
|
2217
2220
|
parent: t,
|
|
2218
2221
|
entry: n,
|
|
@@ -2242,7 +2245,7 @@ function Et({
|
|
|
2242
2245
|
"button",
|
|
2243
2246
|
{
|
|
2244
2247
|
type: "button",
|
|
2245
|
-
className:
|
|
2248
|
+
className: B(h.fold, !o && h.foldClosed),
|
|
2246
2249
|
"data-fold-path": e.path,
|
|
2247
2250
|
"aria-expanded": o,
|
|
2248
2251
|
"aria-label": o ? i.foldGroup(l, c) : i.unfoldGroup(l, c),
|
|
@@ -2251,15 +2254,15 @@ function Et({
|
|
|
2251
2254
|
if (!d.altKey) return a();
|
|
2252
2255
|
bn(e, o, r);
|
|
2253
2256
|
},
|
|
2254
|
-
children: /* @__PURE__ */ f(
|
|
2257
|
+
children: /* @__PURE__ */ f(bo, {})
|
|
2255
2258
|
}
|
|
2256
2259
|
);
|
|
2257
2260
|
}
|
|
2258
|
-
function
|
|
2261
|
+
function Ol({ value: e, formats: t }) {
|
|
2259
2262
|
const n = q(null);
|
|
2260
|
-
return
|
|
2263
|
+
return rl(n, e, t.count), /* @__PURE__ */ f("span", { ref: n, className: h.groupCount, children: t.count(e) });
|
|
2261
2264
|
}
|
|
2262
|
-
function
|
|
2265
|
+
function Lt({ group: e, entry: t, hook: n, formats: o, wording: r }) {
|
|
2263
2266
|
const { selection: s } = n.publicSnapshot, i = e.rows.map(n.rowKey), l = i.filter((a) => s.isSelected(a)).length, c = l === i.length;
|
|
2264
2267
|
return /* @__PURE__ */ f(
|
|
2265
2268
|
We,
|
|
@@ -2282,7 +2285,7 @@ function bn(e, t, n) {
|
|
|
2282
2285
|
for (const i of r)
|
|
2283
2286
|
o.folded.includes(i.path) !== t && o.toggleFold(i.path);
|
|
2284
2287
|
}
|
|
2285
|
-
function
|
|
2288
|
+
function El({
|
|
2286
2289
|
line: e,
|
|
2287
2290
|
entry: t,
|
|
2288
2291
|
selectable: n,
|
|
@@ -2292,17 +2295,17 @@ function Rl({
|
|
|
2292
2295
|
wording: i
|
|
2293
2296
|
}) {
|
|
2294
2297
|
const l = e.span;
|
|
2295
|
-
return /* @__PURE__ */ f("td", { className:
|
|
2296
|
-
n && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(
|
|
2297
|
-
/* @__PURE__ */ f(
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */ f(
|
|
2298
|
+
return /* @__PURE__ */ f("td", { className: B(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ T("span", { className: h.spanValue, children: [
|
|
2299
|
+
n && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Lt, { group: l, entry: t, hook: r, formats: s, wording: i }) }),
|
|
2300
|
+
/* @__PURE__ */ f(Mt, { group: l, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: i }),
|
|
2301
|
+
/* @__PURE__ */ T("span", { className: h.spanText, title: dt(t, l.value, s, i), children: [
|
|
2302
|
+
/* @__PURE__ */ f(Et, { entry: t, group: l, formats: s, wording: i }),
|
|
2300
2303
|
e.continued && /* @__PURE__ */ f("span", { className: h.continued, children: i.groupContinued })
|
|
2301
2304
|
] }),
|
|
2302
2305
|
/* @__PURE__ */ f("span", { className: h.groupCount, children: s.count(l.rows.length) })
|
|
2303
2306
|
] }) });
|
|
2304
2307
|
}
|
|
2305
|
-
function
|
|
2308
|
+
function Ml({
|
|
2306
2309
|
line: e,
|
|
2307
2310
|
index: t,
|
|
2308
2311
|
absolute: n,
|
|
@@ -2321,97 +2324,97 @@ function Ol({
|
|
|
2321
2324
|
wording: w,
|
|
2322
2325
|
grid: g
|
|
2323
2326
|
}) {
|
|
2324
|
-
const { group: v } = e,
|
|
2327
|
+
const { group: v } = e, C = e.kind === "header", y = C && !p.publicSnapshot.folded.includes(v.path), { lead: _, labelColumns: k, countColumns: S } = co({
|
|
2325
2328
|
controls: i,
|
|
2326
2329
|
span: o !== void 0,
|
|
2327
2330
|
aggregates: s.map((D) => D.spec.aggregate !== void 0),
|
|
2328
2331
|
actions: a,
|
|
2329
2332
|
blocks: l
|
|
2330
|
-
}), A = s.slice(_),
|
|
2331
|
-
/* @__PURE__ */ f(
|
|
2332
|
-
/* @__PURE__ */ f("span", { className: h.groupValue, children: /* @__PURE__ */ f(
|
|
2333
|
-
/* @__PURE__ */ f(
|
|
2334
|
-
|
|
2333
|
+
}), A = s.slice(_), L = i + (o ? 1 : 0), x = (D, $ = D) => ct(l, D, $), O = (D) => _ - D > 0 && /* @__PURE__ */ f("td", { className: h.td, colSpan: _ - D }), M = s.find((D) => D.spec.aggregate === "sum" && D.spec.share !== !1), R = n !== void 0, E = /* @__PURE__ */ T("span", { className: h.groupLabel, children: [
|
|
2334
|
+
/* @__PURE__ */ f(Mt, { group: v, parent: e.parents.at(-1), entry: r, open: y, hook: p, formats: m, wording: w }),
|
|
2335
|
+
/* @__PURE__ */ f("span", { className: h.groupValue, children: /* @__PURE__ */ f(Et, { entry: r, group: v, formats: m, wording: w }) }),
|
|
2336
|
+
/* @__PURE__ */ f(Ol, { value: v.rows.length, formats: m }),
|
|
2337
|
+
C && e.continued && /* @__PURE__ */ f("span", { className: h.continued, children: w.groupContinued })
|
|
2335
2338
|
] });
|
|
2336
|
-
return /* @__PURE__ */
|
|
2339
|
+
return /* @__PURE__ */ T(
|
|
2337
2340
|
"tr",
|
|
2338
2341
|
{
|
|
2339
|
-
className:
|
|
2342
|
+
className: B(C ? h.groupHeader : h.groupFolded, R && h.virtualRow),
|
|
2340
2343
|
"data-line": e.kind,
|
|
2341
2344
|
"data-level": v.level,
|
|
2342
|
-
"data-motion": n !== void 0 || !(
|
|
2343
|
-
"data-continued":
|
|
2344
|
-
"data-group-first":
|
|
2345
|
+
"data-motion": n !== void 0 || !(C && e.continued) ? `${e.kind}:${v.path}` : void 0,
|
|
2346
|
+
"data-continued": C && e.continued ? "" : void 0,
|
|
2347
|
+
"data-group-first": C ? void 0 : "",
|
|
2345
2348
|
"data-group": v.path,
|
|
2346
2349
|
"data-grid-line": g ? `${e.kind}:${v.path}` : void 0,
|
|
2347
|
-
"data-row":
|
|
2348
|
-
"aria-rowindex":
|
|
2350
|
+
"data-row": R ? n : void 0,
|
|
2351
|
+
"aria-rowindex": R ? n + 2 : void 0,
|
|
2349
2352
|
"data-index": t,
|
|
2350
|
-
style:
|
|
2351
|
-
"aria-level":
|
|
2353
|
+
style: C ? { "--u-header-level": v.level } : void 0,
|
|
2354
|
+
"aria-level": C ? v.level + 1 : b,
|
|
2352
2355
|
"aria-expanded": y,
|
|
2353
2356
|
"aria-posinset": d.indexOf(v) + 1 || void 0,
|
|
2354
2357
|
"aria-setsize": d.length || void 0,
|
|
2355
2358
|
children: [
|
|
2356
|
-
Array.from({ length: i }, (D,
|
|
2357
|
-
|
|
2359
|
+
Array.from({ length: i }, (D, $) => /* @__PURE__ */ f("td", { className: B(h.td, h.control, x($).className), style: x($).style, children: $ === 0 && c && C && /* @__PURE__ */ f(Lt, { group: v, entry: r, hook: p, formats: m, wording: w }) }, `c${$}`)),
|
|
2360
|
+
C ? /* @__PURE__ */ T(re, { children: [
|
|
2358
2361
|
/* @__PURE__ */ f(
|
|
2359
2362
|
"td",
|
|
2360
2363
|
{
|
|
2361
|
-
className:
|
|
2362
|
-
colSpan: (o ? 1 : 0) +
|
|
2364
|
+
className: B(h.td, x(i, L + k - 1).className),
|
|
2365
|
+
colSpan: (o ? 1 : 0) + k,
|
|
2363
2366
|
style: {
|
|
2364
|
-
...
|
|
2367
|
+
...x(i, L + k - 1).style,
|
|
2365
2368
|
paddingLeft: `calc(var(--u-space-3) + ${v.level * 20}px)`
|
|
2366
2369
|
},
|
|
2367
|
-
children:
|
|
2370
|
+
children: E
|
|
2368
2371
|
}
|
|
2369
2372
|
),
|
|
2370
|
-
|
|
2371
|
-
] }) : /* @__PURE__ */
|
|
2372
|
-
/* @__PURE__ */ f("td", { className:
|
|
2373
|
-
c && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(
|
|
2374
|
-
/* @__PURE__ */ f(
|
|
2375
|
-
/* @__PURE__ */ f("span", { className: h.spanText, children: /* @__PURE__ */ f(
|
|
2373
|
+
O(k)
|
|
2374
|
+
] }) : /* @__PURE__ */ T(re, { children: [
|
|
2375
|
+
/* @__PURE__ */ f("td", { className: B(h.td, h.spanCell, x(i).className), style: x(i).style, children: /* @__PURE__ */ T("span", { className: h.spanValue, children: [
|
|
2376
|
+
c && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Lt, { group: v, entry: o, hook: p, formats: m, wording: w }) }),
|
|
2377
|
+
/* @__PURE__ */ f(Mt, { group: v, parent: e.parents.at(-1), entry: o, open: !1, hook: p, formats: m, wording: w }),
|
|
2378
|
+
/* @__PURE__ */ f("span", { className: h.spanText, children: /* @__PURE__ */ f(Et, { entry: o, group: v, formats: m, wording: w }) }),
|
|
2376
2379
|
/* @__PURE__ */ f("span", { className: h.groupCount, children: m.count(v.rows.length) })
|
|
2377
2380
|
] }) }),
|
|
2378
|
-
|
|
2381
|
+
S > 0 && /* @__PURE__ */ f(
|
|
2379
2382
|
"td",
|
|
2380
2383
|
{
|
|
2381
|
-
className:
|
|
2382
|
-
style:
|
|
2383
|
-
colSpan:
|
|
2384
|
+
className: B(h.td, h.foldedCount, x(L, L + S - 1).className),
|
|
2385
|
+
style: x(L, L + S - 1).style,
|
|
2386
|
+
colSpan: S,
|
|
2384
2387
|
children: w.entries(v.rows.length, m.count(v.rows.length))
|
|
2385
2388
|
}
|
|
2386
2389
|
),
|
|
2387
|
-
|
|
2390
|
+
O(S)
|
|
2388
2391
|
] }),
|
|
2389
|
-
A.map((D,
|
|
2390
|
-
|
|
2392
|
+
A.map((D, $) => /* @__PURE__ */ f(
|
|
2393
|
+
Fl,
|
|
2391
2394
|
{
|
|
2392
|
-
pin:
|
|
2395
|
+
pin: x(L + _ + $),
|
|
2393
2396
|
entry: D,
|
|
2394
2397
|
group: v,
|
|
2395
|
-
share:
|
|
2398
|
+
share: C && D === M,
|
|
2396
2399
|
total: u,
|
|
2397
2400
|
formats: m,
|
|
2398
2401
|
wording: w
|
|
2399
2402
|
},
|
|
2400
2403
|
D.key
|
|
2401
2404
|
)),
|
|
2402
|
-
a && /* @__PURE__ */ f("td", { className:
|
|
2405
|
+
a && /* @__PURE__ */ f("td", { className: B(h.td, x(l.count - 1).className), style: x(l.count - 1).style })
|
|
2403
2406
|
]
|
|
2404
2407
|
}
|
|
2405
2408
|
);
|
|
2406
2409
|
}
|
|
2407
2410
|
const vn = /* @__PURE__ */ new WeakMap();
|
|
2408
|
-
function
|
|
2411
|
+
function Ll(e, t) {
|
|
2409
2412
|
let n = vn.get(t);
|
|
2410
2413
|
n || vn.set(t, n = /* @__PURE__ */ new Map());
|
|
2411
2414
|
let o = n.get(e);
|
|
2412
|
-
return (!o || o.reader !== e.spec.value) && (o = { reader: e.spec.value, sum:
|
|
2415
|
+
return (!o || o.reader !== e.spec.value) && (o = { reader: e.spec.value, sum: zt({ id: e.spec.id, read: e.read, aggregate: "sum" }, t) }, n.set(e, o)), o.sum;
|
|
2413
2416
|
}
|
|
2414
|
-
function
|
|
2417
|
+
function Fl({
|
|
2415
2418
|
entry: e,
|
|
2416
2419
|
pin: t,
|
|
2417
2420
|
group: n,
|
|
@@ -2421,38 +2424,38 @@ function Ml({
|
|
|
2421
2424
|
wording: i
|
|
2422
2425
|
}) {
|
|
2423
2426
|
const { spec: l } = e;
|
|
2424
|
-
if (!l.aggregate) return /* @__PURE__ */ f("td", { className:
|
|
2427
|
+
if (!l.aggregate) return /* @__PURE__ */ f("td", { className: B(h.td, t.className), style: t.style });
|
|
2425
2428
|
let c = null;
|
|
2426
2429
|
if (o && l.aggregate === "sum" && l.share !== !1) {
|
|
2427
|
-
const a =
|
|
2430
|
+
const a = Ll(e, r), u = n.aggregates[l.id];
|
|
2428
2431
|
if (typeof a == "number" && a > 0 && typeof u == "number" && u > 0) {
|
|
2429
2432
|
const d = Math.min(1, u / a);
|
|
2430
2433
|
c = /* @__PURE__ */ f("span", { className: h.shareBar, style: { width: `${Math.max(2, Math.round(d * 64))}px` }, "aria-hidden": "true" });
|
|
2431
2434
|
}
|
|
2432
2435
|
}
|
|
2433
|
-
return /* @__PURE__ */ f("td", { className:
|
|
2434
|
-
/* @__PURE__ */ f(
|
|
2436
|
+
return /* @__PURE__ */ f("td", { className: B(h.td, mo(e, n.rows, { value: n.aggregates[l.id] }) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof l.aggregate == "function" ? "own" : l.aggregate, children: c ? /* @__PURE__ */ T("span", { className: h.shareHost, children: [
|
|
2437
|
+
/* @__PURE__ */ f(Ot, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }),
|
|
2435
2438
|
c
|
|
2436
|
-
] }) : /* @__PURE__ */ f(
|
|
2439
|
+
] }) : /* @__PURE__ */ f(Ot, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }) });
|
|
2437
2440
|
}
|
|
2438
|
-
function
|
|
2441
|
+
function bo() {
|
|
2439
2442
|
return /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2.5 3.75 5 6.25 7.5 3.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2440
2443
|
}
|
|
2441
|
-
function
|
|
2444
|
+
function vo(e, t, n, o, r) {
|
|
2442
2445
|
const s = e.detail?.presentation(n);
|
|
2443
2446
|
if (s == null || s === !1) return null;
|
|
2444
2447
|
const i = r !== void 0 && r.branch && !r.empty;
|
|
2445
2448
|
return { content: s, open: i ? t.branches.includes(o) : t.expanded.includes(o) };
|
|
2446
2449
|
}
|
|
2447
|
-
function
|
|
2450
|
+
function Bl(e, t, n, o, r) {
|
|
2448
2451
|
const s = /* @__PURE__ */ new Set([...t.expanded, ...t.branches]), i = /* @__PURE__ */ new Set();
|
|
2449
2452
|
for (const l of n) {
|
|
2450
2453
|
const c = o(l);
|
|
2451
|
-
s.has(c) &&
|
|
2454
|
+
s.has(c) && vo(e, t, l, c, r?.entry(l))?.open && i.add(c);
|
|
2452
2455
|
}
|
|
2453
2456
|
return i;
|
|
2454
2457
|
}
|
|
2455
|
-
function
|
|
2458
|
+
function Dl({
|
|
2456
2459
|
setup: e,
|
|
2457
2460
|
entry: t,
|
|
2458
2461
|
detail: n,
|
|
@@ -2474,27 +2477,27 @@ function Fl({
|
|
|
2474
2477
|
}
|
|
2475
2478
|
}
|
|
2476
2479
|
};
|
|
2477
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ T("span", { className: h.treeCell, style: { "--_table-tree-level": t.level }, children: [
|
|
2478
2481
|
l ? /* @__PURE__ */ f(
|
|
2479
2482
|
"button",
|
|
2480
2483
|
{
|
|
2481
2484
|
type: "button",
|
|
2482
|
-
className:
|
|
2485
|
+
className: B(h.fold, !c && h.foldClosed),
|
|
2483
2486
|
"data-branch-key": t.key,
|
|
2484
2487
|
"aria-expanded": c,
|
|
2485
2488
|
"aria-label": c ? r.foldBranch(o) : r.unfoldBranch(o),
|
|
2486
2489
|
onKeyDown: u,
|
|
2487
2490
|
onClick: (d) => d.altKey ? e.siblings(t.key, !c) : a(!c),
|
|
2488
|
-
children: /* @__PURE__ */ f(
|
|
2491
|
+
children: /* @__PURE__ */ f(bo, {})
|
|
2489
2492
|
}
|
|
2490
2493
|
) : /* @__PURE__ */ f("span", { className: h.foldSlot }),
|
|
2491
|
-
/* @__PURE__ */
|
|
2494
|
+
/* @__PURE__ */ T("span", { className: h.treeText, children: [
|
|
2492
2495
|
s,
|
|
2493
|
-
t.pathOnly && /* @__PURE__ */ f(
|
|
2496
|
+
t.pathOnly && /* @__PURE__ */ f(Oe, { children: `, ${r.pathRow}` })
|
|
2494
2497
|
] })
|
|
2495
2498
|
] });
|
|
2496
2499
|
}
|
|
2497
|
-
function
|
|
2500
|
+
function Pl(e, t, n, o) {
|
|
2498
2501
|
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), l = [];
|
|
2499
2502
|
return e.forEach((c, a) => {
|
|
2500
2503
|
r.set(c.key, c), l.length = c.level, s.set(c.key, l.at(-1)), l.push(c.key), e[a + 1]?.level === 0 && i.add(c.key);
|
|
@@ -2517,32 +2520,32 @@ function Dl(e, t, n, o) {
|
|
|
2517
2520
|
}
|
|
2518
2521
|
};
|
|
2519
2522
|
}
|
|
2520
|
-
function
|
|
2523
|
+
function Vl({
|
|
2521
2524
|
registry: e,
|
|
2522
2525
|
hook: t,
|
|
2523
2526
|
props: n,
|
|
2524
2527
|
layout: o,
|
|
2525
2528
|
grid: r
|
|
2526
2529
|
}) {
|
|
2527
|
-
const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, { snapshot: c, projection: a, virtual: u, lines: d, spanEntry: b, dataColumns: p, expanderColumn: m, controlColumns: w, trailing: g, blocks: v, rows:
|
|
2528
|
-
layout: { controls: w, span: b !== void 0, aggregates: p.map((
|
|
2529
|
-
body: i ? { rows: [] } : d ? { lines: u ? a.lines : d } : { rows: u ? a.shown ?? a.filtered :
|
|
2530
|
+
const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, { snapshot: c, projection: a, virtual: u, lines: d, spanEntry: b, dataColumns: p, expanderColumn: m, controlColumns: w, trailing: g, blocks: v, rows: C, footerShown: y } = o, _ = l ? il({
|
|
2531
|
+
layout: { controls: w, span: b !== void 0, aggregates: p.map((L) => L.spec.aggregate !== void 0), actions: g, blocks: v },
|
|
2532
|
+
body: i ? { rows: [] } : d ? { lines: u ? a.lines : d } : { rows: u ? a.shown ?? a.filtered : C },
|
|
2530
2533
|
rowKey: t.rowKey,
|
|
2531
|
-
expanded: o.detail ?
|
|
2534
|
+
expanded: o.detail ? Bl(e, c, a.shown ?? a.filtered, t.rowKey, o.tree) : /* @__PURE__ */ new Set(),
|
|
2532
2535
|
foot: y
|
|
2533
|
-
}) : [],
|
|
2534
|
-
|
|
2535
|
-
const
|
|
2536
|
+
}) : [], k = r.state.editing?.line === he ? r.state.editing : null;
|
|
2537
|
+
k && _[0] && _.splice(1, 0, { key: he, cells: _[0].cells, at: -1, row: k.fresh });
|
|
2538
|
+
const S = [
|
|
2536
2539
|
...s ? ["#select"] : [],
|
|
2537
2540
|
...m ? ["#detail"] : [],
|
|
2538
2541
|
...b ? ["#span"] : [],
|
|
2539
|
-
...p.map((
|
|
2542
|
+
...p.map((L) => L.spec.id),
|
|
2540
2543
|
...g ? ["#actions"] : []
|
|
2541
|
-
], A = l ?
|
|
2544
|
+
], A = l ? vl({
|
|
2542
2545
|
grid: r,
|
|
2543
2546
|
lines: _,
|
|
2544
|
-
ids:
|
|
2545
|
-
columnById: (
|
|
2547
|
+
ids: S,
|
|
2548
|
+
columnById: (L) => p.find((x) => x.spec.id === L),
|
|
2546
2549
|
rowKey: t.rowKey,
|
|
2547
2550
|
virtual: u,
|
|
2548
2551
|
onCellEdit: n.onCellEdit,
|
|
@@ -2551,16 +2554,16 @@ function Bl({
|
|
|
2551
2554
|
onRowAdd: n.onRowAdd,
|
|
2552
2555
|
newRow: n.newRow,
|
|
2553
2556
|
onRowDelete: n.onRowDelete,
|
|
2554
|
-
select: s ? (
|
|
2557
|
+
select: s ? (L) => c.selection.toggle(t.rowKey(L)) : void 0
|
|
2555
2558
|
}) : void 0;
|
|
2556
|
-
return { lines: _, fresh:
|
|
2559
|
+
return { lines: _, fresh: k, ids: S, events: A };
|
|
2557
2560
|
}
|
|
2558
|
-
function
|
|
2561
|
+
function Il(e) {
|
|
2559
2562
|
for (const t of e) t.removeAttribute("data-copied");
|
|
2560
2563
|
document.body.offsetWidth;
|
|
2561
2564
|
for (const t of e) t.setAttribute("data-copied", "");
|
|
2562
2565
|
}
|
|
2563
|
-
function
|
|
2566
|
+
function $l({
|
|
2564
2567
|
registry: e,
|
|
2565
2568
|
hook: t,
|
|
2566
2569
|
grid: n,
|
|
@@ -2572,38 +2575,38 @@ function Pl({
|
|
|
2572
2575
|
tableElement: c
|
|
2573
2576
|
}) {
|
|
2574
2577
|
return (a) => {
|
|
2575
|
-
const u = (A) =>
|
|
2578
|
+
const u = (A) => Bo(A, c());
|
|
2576
2579
|
if (a.defaultPrevented || a.altKey || a.shiftKey || a.ctrlKey === a.metaKey || a.key.toLowerCase() !== "c") return;
|
|
2577
2580
|
const { target: d, currentTarget: b } = a;
|
|
2578
2581
|
if (!(d instanceof Element)) return;
|
|
2579
2582
|
const p = d.closest("td, th"), m = p?.dataset.editing, w = d.closest("input, textarea, select, [contenteditable]:not([contenteditable='false'])");
|
|
2580
2583
|
if (w?.matches("textarea, [contenteditable]:not([contenteditable='false']), input:not([type=checkbox], [type=radio], [type=button], [type=submit], [type=reset], [type=range], [type=color], [type=file], [type=image])") && m === void 0 || window.getSelection()?.toString() || (w instanceof HTMLInputElement || w instanceof HTMLTextAreaElement) && w.selectionStart !== w.selectionEnd) return;
|
|
2581
|
-
let v = "",
|
|
2582
|
-
const _ =
|
|
2583
|
-
if (
|
|
2584
|
-
v = w instanceof HTMLInputElement || w instanceof HTMLTextAreaElement ? w.value :
|
|
2584
|
+
let v = "", C = "", y = p ? [p] : [];
|
|
2585
|
+
const _ = to(e), k = m === void 0 ? void 0 : s.find((A) => A.spec.id === m);
|
|
2586
|
+
if (k)
|
|
2587
|
+
v = w instanceof HTMLInputElement || w instanceof HTMLTextAreaElement ? w.value : oo(k, n.state.editing?.drafts[k.spec.id], i, l), C = l.copiedCell;
|
|
2585
2588
|
else if (_.length > 0) {
|
|
2586
|
-
v =
|
|
2587
|
-
const A = new Set(_.map((
|
|
2588
|
-
y = Array.from(b.querySelectorAll("tr[data-motion]")).filter((
|
|
2589
|
+
v = no(e, i, l), C = l.copiedRows(_.length, i.count(_.length));
|
|
2590
|
+
const A = new Set(_.map((L) => t.rowKey(L)));
|
|
2591
|
+
y = Array.from(b.querySelectorAll("tr[data-motion]")).filter((L) => A.has(L.dataset.motion)).flatMap((L) => Array.from(L.children));
|
|
2589
2592
|
} else if (o && n.state.active) {
|
|
2590
|
-
const { line: A, column:
|
|
2591
|
-
if (!
|
|
2592
|
-
const
|
|
2593
|
-
|
|
2593
|
+
const { line: A, column: L } = n.state.active, x = r.find((R) => R.key === A), O = s.find((R) => R.spec.id === L);
|
|
2594
|
+
if (!x || x.row === void 0 || x.key !== Ue(t.rowKey(x.row)) || !O) return;
|
|
2595
|
+
const M = Array.from(b.querySelectorAll("tr[data-grid-line]")).find((R) => R.dataset.gridLine === A)?.children[n.state.active.columnIndex];
|
|
2596
|
+
M && (y = [M]), v = Wi(O, x.row, i, l), C = l.copiedCell;
|
|
2594
2597
|
} else return;
|
|
2595
2598
|
a.preventDefault();
|
|
2596
|
-
const
|
|
2599
|
+
const S = (A) => {
|
|
2597
2600
|
X("copy-failed", `The clipboard refused the copy (${String(A)}). It needs a secure context and a focused document.`), u(l.copyFailed);
|
|
2598
2601
|
};
|
|
2599
2602
|
Promise.resolve().then(() => navigator.clipboard.writeText(v)).then(() => {
|
|
2600
|
-
|
|
2601
|
-
},
|
|
2603
|
+
Il(y), u(C);
|
|
2604
|
+
}, S);
|
|
2602
2605
|
};
|
|
2603
2606
|
}
|
|
2604
|
-
function
|
|
2605
|
-
const [t, n] =
|
|
2606
|
-
|
|
2607
|
+
function zl({ table: e }) {
|
|
2608
|
+
const [t, n] = I(null), o = Do(), r = q(null);
|
|
2609
|
+
Ce(() => {
|
|
2607
2610
|
const i = e.current;
|
|
2608
2611
|
if (!i) return;
|
|
2609
2612
|
let l;
|
|
@@ -2613,8 +2616,8 @@ function Il({ table: e }) {
|
|
|
2613
2616
|
clearTimeout(l);
|
|
2614
2617
|
const w = p instanceof Element ? p.closest("td, th") : null, g = p instanceof Element ? p.closest(`.${h.headLine}`) : null, v = g ? g.querySelector(`.${h.headLabel}`) : w?.querySelector(`:scope > .${h.value}, :scope .${h.treeText} > .${h.value}`);
|
|
2615
2618
|
if (!w || !v || v.childElementCount > 0 || v.scrollWidth <= v.clientWidth + 1) return n(null);
|
|
2616
|
-
const
|
|
2617
|
-
l = setTimeout(() => n({ text: v.textContent ?? "", cell: w.getBoundingClientRect(), target:
|
|
2619
|
+
const C = i.closest("dialog") ?? o() ?? document.body;
|
|
2620
|
+
l = setTimeout(() => n({ text: v.textContent ?? "", cell: w.getBoundingClientRect(), target: C }), m);
|
|
2618
2621
|
}, u = (p) => a(p.target, 300), d = (p) => a(p.target, 0), b = (p) => {
|
|
2619
2622
|
p.key === "Escape" && c();
|
|
2620
2623
|
};
|
|
@@ -2637,41 +2640,41 @@ function Il({ table: e }) {
|
|
|
2637
2640
|
if (!t || !i) return;
|
|
2638
2641
|
const l = 4, c = t.cell.bottom + l + i.offsetHeight <= window.innerHeight;
|
|
2639
2642
|
i.style.top = `${c ? t.cell.bottom + l : t.cell.top - l - i.offsetHeight}px`, i.style.left = `${Math.max(8, Math.min(t.cell.left, window.innerWidth - 8 - i.offsetWidth))}px`, i.style.visibility = "";
|
|
2640
|
-
}, [t]), t ?
|
|
2643
|
+
}, [t]), t ? En(
|
|
2641
2644
|
/* @__PURE__ */ f("div", { ref: r, role: "tooltip", popover: s ? "manual" : void 0, className: h.cutTip, style: { visibility: "hidden", top: 0, left: 0 }, children: t.text }),
|
|
2642
2645
|
t.target
|
|
2643
2646
|
) : null;
|
|
2644
2647
|
}
|
|
2645
|
-
function
|
|
2648
|
+
function Ft(e, t) {
|
|
2646
2649
|
const n = e.scrollWidth - e.clientWidth;
|
|
2647
2650
|
e.toggleAttribute("data-beyond-start", !t.start && e.scrollLeft > 0.5), e.toggleAttribute("data-beyond-end", !t.end && e.scrollLeft < n - 0.5);
|
|
2648
2651
|
}
|
|
2649
|
-
function
|
|
2652
|
+
function yo(e) {
|
|
2650
2653
|
const t = e.scrollWidth - e.clientWidth;
|
|
2651
2654
|
e.toggleAttribute("data-under-start", e.scrollLeft > 0.5), e.toggleAttribute("data-under-end", e.scrollLeft < t - 0.5);
|
|
2652
2655
|
}
|
|
2653
|
-
function
|
|
2656
|
+
function _o(e) {
|
|
2654
2657
|
for (const t of Array.from(e.querySelectorAll("tbody > tr[data-line='header']"))) {
|
|
2655
2658
|
const n = t.cells[t.cells.length - 1], o = !!n && n.getBoundingClientRect().top > t.getBoundingClientRect().top + 0.5;
|
|
2656
2659
|
t.toggleAttribute("data-stuck", o);
|
|
2657
2660
|
}
|
|
2658
2661
|
}
|
|
2659
|
-
function
|
|
2662
|
+
function Kl(e, t) {
|
|
2660
2663
|
const n = t.state.editing?.line;
|
|
2661
2664
|
Z(() => {
|
|
2662
2665
|
const o = e.hook;
|
|
2663
2666
|
!o || n === void 0 || n === he || o.rows.some((r) => Ue(o.rowKey(r)) === n) || t.setState((r) => ({ ...r, editing: null }));
|
|
2664
2667
|
});
|
|
2665
2668
|
}
|
|
2666
|
-
function
|
|
2669
|
+
function Gl(e, t) {
|
|
2667
2670
|
Z(() => {
|
|
2668
2671
|
const n = e.current;
|
|
2669
2672
|
if (n?.parentElement && !t && n.parentElement.style.removeProperty("scroll-padding-top"), !n || !t) return;
|
|
2670
2673
|
const o = n.tHead?.getBoundingClientRect().height ?? 0, r = n.querySelector("tr[data-line='header']")?.getBoundingClientRect().height ?? 0;
|
|
2671
|
-
n.style.setProperty("--u-table-head", `${o}px`), n.style.setProperty("--u-table-group-header", `${r}px`), n.parentElement?.style.setProperty("scroll-padding-top", `${o}px`), n.parentElement &&
|
|
2674
|
+
n.style.setProperty("--u-table-head", `${o}px`), n.style.setProperty("--u-table-group-header", `${r}px`), n.parentElement?.style.setProperty("scroll-padding-top", `${o}px`), n.parentElement && _o(n.parentElement);
|
|
2672
2675
|
});
|
|
2673
2676
|
}
|
|
2674
|
-
function
|
|
2677
|
+
function jl(e, t) {
|
|
2675
2678
|
Z(() => {
|
|
2676
2679
|
const n = e.takeFocusBeforeFold(), o = t.current;
|
|
2677
2680
|
if (!n || !o || n.table !== o || n.element.isConnected) return;
|
|
@@ -2682,7 +2685,7 @@ function Kl(e, t) {
|
|
|
2682
2685
|
}
|
|
2683
2686
|
});
|
|
2684
2687
|
}
|
|
2685
|
-
function
|
|
2688
|
+
function Hl(e, t, n) {
|
|
2686
2689
|
const o = q(null);
|
|
2687
2690
|
Z(() => {
|
|
2688
2691
|
const r = t.current?.tBodies[0];
|
|
@@ -2696,13 +2699,13 @@ function Gl(e, t, n) {
|
|
|
2696
2699
|
s && i?.cells.length === s.length && Array.from(i.cells).forEach((l, c) => l.style.width = `${s[c]}px`);
|
|
2697
2700
|
});
|
|
2698
2701
|
}
|
|
2699
|
-
function
|
|
2700
|
-
|
|
2702
|
+
function Wl(e) {
|
|
2703
|
+
Ce(() => {
|
|
2701
2704
|
const t = e.current;
|
|
2702
|
-
if (!(!
|
|
2705
|
+
if (!(!Gt || !t)) {
|
|
2703
2706
|
for (const n of Array.from(t.querySelectorAll(`tbody .${h.value}`))) {
|
|
2704
2707
|
if (n.scrollHeight <= n.clientHeight + 1) continue;
|
|
2705
|
-
const o = n.closest("td, th"), r = o?.parentElement ? Array.from(o.parentElement.children).indexOf(o) : -1, s = t.tHead?.rows[0]?.cells[r]?.textContent?.trim() || `column ${r + 1}`;
|
|
2708
|
+
const o = n.closest("td, th"), r = o?.parentElement ? Array.from(o.parentElement.children).indexOf(o) : -1, s = t.tHead?.rows?.[0]?.cells[r]?.textContent?.trim() || `column ${r + 1}`;
|
|
2706
2709
|
X(
|
|
2707
2710
|
`taller-than-a-row:${s}`,
|
|
2708
2711
|
`a value in "${s}" 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.`
|
|
@@ -2718,28 +2721,28 @@ function Hl(e) {
|
|
|
2718
2721
|
}
|
|
2719
2722
|
});
|
|
2720
2723
|
}
|
|
2721
|
-
function
|
|
2724
|
+
function ql(e, t) {
|
|
2722
2725
|
Z(() => {
|
|
2723
|
-
const n = t.current?.tHead?.rows[0]?.getBoundingClientRect().height;
|
|
2726
|
+
const n = t.current?.tHead?.rows?.[0]?.getBoundingClientRect().height;
|
|
2724
2727
|
n && e.hook?.tableState.virtual && e.hook.tableState.setPitch(n);
|
|
2725
2728
|
});
|
|
2726
2729
|
}
|
|
2727
2730
|
const Yt = (e, t) => e ? t : void 0;
|
|
2728
|
-
function
|
|
2731
|
+
function Yl({
|
|
2729
2732
|
registry: e,
|
|
2730
2733
|
hook: t,
|
|
2731
2734
|
props: n,
|
|
2732
2735
|
drafting: o,
|
|
2733
2736
|
sticking: r
|
|
2734
2737
|
}) {
|
|
2735
|
-
const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, c = t.publicSnapshot, a = e.projection(), u = e.rowHeader(), d =
|
|
2736
|
-
start:
|
|
2737
|
-
end:
|
|
2738
|
-
count:
|
|
2738
|
+
const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, c = t.publicSnapshot, a = e.projection(), u = e.rowHeader(), d = Qn(e), b = e.detail, p = e.hasRowActions() ? e.actions.ordered() : [], m = t.tableState.virtual, w = c.grouping, g = w.length > 0 ? a.visibleLines : void 0, v = g ? e.groupingEntries(t.rows) : [], C = (oe) => v.find((W) => W.spec.id === oe), y = g && w.length > 1 ? C(w.at(-1)) : void 0, _ = g ? d.filter((oe) => !w.includes(oe.spec.id)) : d, k = a.entries, S = k ? Pl(k, t, c, _[0]) : void 0, A = b !== null && !k, L = (s ? 1 : 0) + (A ? 1 : 0), x = L + (y ? 1 : 0), O = l && n.editMode === "row", M = l && (O || n.onRowAdd !== void 0 || n.onRowDelete !== void 0), R = p.length > 0 || M, E = x + _.length + (R ? 1 : 0), D = e.pins(), $ = _.filter((oe) => D[oe.spec.id] === "start").length, P = _.filter((oe) => D[oe.spec.id] === "end").length, K = y !== void 0 && D[y.spec.id] === "start", Y = p.length > 0 || n.onRowDelete !== void 0 || o, ce = e.actionsPinned() ? Y : o && M, j = {
|
|
2739
|
+
start: $ > 0 || K ? x + $ : 0,
|
|
2740
|
+
end: P > 0 ? P + (R ? 1 : 0) : R && ce ? 1 : 0,
|
|
2741
|
+
count: E
|
|
2739
2742
|
}, ne = {
|
|
2740
|
-
start: r.start ?
|
|
2741
|
-
end: r.end || o &&
|
|
2742
|
-
count:
|
|
2743
|
+
start: r.start ? j.start : 0,
|
|
2744
|
+
end: r.end || o && M ? j.end : 0,
|
|
2745
|
+
count: E
|
|
2743
2746
|
}, de = a.visible, le = !i && !c.server && _.some((oe) => oe.spec.aggregate), ee = c.search !== "" || Object.keys(c.filter).length > 0;
|
|
2744
2747
|
return {
|
|
2745
2748
|
snapshot: c,
|
|
@@ -2750,27 +2753,27 @@ function ql({
|
|
|
2750
2753
|
virtual: m,
|
|
2751
2754
|
grouping: w,
|
|
2752
2755
|
lines: g,
|
|
2753
|
-
entryOf:
|
|
2756
|
+
entryOf: C,
|
|
2754
2757
|
spanEntry: y,
|
|
2755
2758
|
dataColumns: _,
|
|
2756
|
-
entries:
|
|
2757
|
-
tree:
|
|
2759
|
+
entries: k,
|
|
2760
|
+
tree: S,
|
|
2758
2761
|
expanderColumn: A,
|
|
2759
|
-
controlColumns:
|
|
2760
|
-
leading:
|
|
2761
|
-
rowMode:
|
|
2762
|
-
rowTools:
|
|
2763
|
-
trailing:
|
|
2764
|
-
columnCount:
|
|
2762
|
+
controlColumns: L,
|
|
2763
|
+
leading: x,
|
|
2764
|
+
rowMode: O,
|
|
2765
|
+
rowTools: M,
|
|
2766
|
+
trailing: R,
|
|
2767
|
+
columnCount: E,
|
|
2765
2768
|
pins: D,
|
|
2766
|
-
pinned:
|
|
2769
|
+
pinned: j,
|
|
2767
2770
|
blocks: ne,
|
|
2768
2771
|
rows: de,
|
|
2769
2772
|
footerShown: le,
|
|
2770
2773
|
restricted: ee
|
|
2771
2774
|
};
|
|
2772
2775
|
}
|
|
2773
|
-
const
|
|
2776
|
+
const Ul = 2;
|
|
2774
2777
|
function yn({
|
|
2775
2778
|
actions: e,
|
|
2776
2779
|
row: t,
|
|
@@ -2778,22 +2781,22 @@ function yn({
|
|
|
2778
2781
|
wording: o,
|
|
2779
2782
|
line: r
|
|
2780
2783
|
}) {
|
|
2781
|
-
const s = _e(Ve), i = s?.editing?.row === !0 && s.editing.line !== r, l = s?.remove, [c, a] =
|
|
2782
|
-
|
|
2784
|
+
const s = _e(Ve), i = s?.editing?.row === !0 && s.editing.line !== r, l = s?.remove, [c, a] = I(!1), u = q(!1), d = q(null), b = q(null);
|
|
2785
|
+
Ce(() => {
|
|
2783
2786
|
c ? b.current?.focus() : u.current && d.current?.focus(), u.current = c;
|
|
2784
2787
|
}, [c]);
|
|
2785
2788
|
const p = (w) => {
|
|
2786
2789
|
if (i) return;
|
|
2787
2790
|
const g = w.onSelect;
|
|
2788
2791
|
g(w.bulk ? [t] : t);
|
|
2789
|
-
}, m = l && (c ? /* @__PURE__ */
|
|
2792
|
+
}, m = l && (c ? /* @__PURE__ */ T(re, { children: [
|
|
2790
2793
|
/* @__PURE__ */ f("span", { className: h.deleteAsk, children: o.deleteRowAsk }),
|
|
2791
2794
|
/* @__PURE__ */ f(Q, { className: h.toned, size: "sm", variant: "danger", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => {
|
|
2792
2795
|
a(!1), l(t);
|
|
2793
2796
|
}, children: o.deleteRow }),
|
|
2794
2797
|
/* @__PURE__ */ f(Q, { ref: b, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.keepRow, n), onClick: () => a(!1), children: o.keepRow })
|
|
2795
2798
|
] }) : /* @__PURE__ */ f(Q, { ref: d, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => !i && a(!0), children: o.deleteRow }));
|
|
2796
|
-
return e.length <=
|
|
2799
|
+
return e.length <= Ul ? /* @__PURE__ */ T("div", { className: B(h.actions, c && h.decision), children: [
|
|
2797
2800
|
!c && e.map(({ key: w, spec: g }) => /* @__PURE__ */ f(
|
|
2798
2801
|
Q,
|
|
2799
2802
|
{
|
|
@@ -2806,21 +2809,21 @@ function yn({
|
|
|
2806
2809
|
w
|
|
2807
2810
|
)),
|
|
2808
2811
|
m
|
|
2809
|
-
] }) : /* @__PURE__ */
|
|
2812
|
+
] }) : /* @__PURE__ */ T("div", { className: B(h.actions, c && h.decision), children: [
|
|
2810
2813
|
!c && /* @__PURE__ */ f(
|
|
2811
2814
|
Nn,
|
|
2812
2815
|
{
|
|
2813
2816
|
align: "end",
|
|
2814
|
-
trigger: /* @__PURE__ */ f(
|
|
2817
|
+
trigger: /* @__PURE__ */ f(Po, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
|
|
2815
2818
|
children: e.map(({ key: w, spec: g }) => /* @__PURE__ */ f(nt, { tone: g.tone, onSelect: () => p(g), children: g.label }, w))
|
|
2816
2819
|
}
|
|
2817
2820
|
),
|
|
2818
2821
|
m
|
|
2819
2822
|
] });
|
|
2820
2823
|
}
|
|
2821
|
-
function
|
|
2824
|
+
function Jl({ name: e, wording: t }) {
|
|
2822
2825
|
const n = _e(Ve), o = q(null);
|
|
2823
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ T("div", { ref: o, className: B(h.actions, h.decision, h.draftButtons), children: [
|
|
2824
2827
|
/* @__PURE__ */ f(Q, { className: h.toned, size: "sm", variant: "primary", "aria-label": t.rowAction(t.saveRow, e), onClick: n.save, children: t.saveRow }),
|
|
2825
2828
|
/* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", "aria-label": t.rowAction(t.discardRow, e), onClick: n.discard, children: t.discardRow }),
|
|
2826
2829
|
/* @__PURE__ */ f(
|
|
@@ -2838,12 +2841,12 @@ function Ul({ name: e, wording: t }) {
|
|
|
2838
2841
|
)
|
|
2839
2842
|
] });
|
|
2840
2843
|
}
|
|
2841
|
-
function
|
|
2844
|
+
function Xl({ columns: e, rightAligned: t = [], rows: n = 4 }) {
|
|
2842
2845
|
const o = [72, 48, 60, 40, 56, 64];
|
|
2843
|
-
return /* @__PURE__ */ f(re, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ f("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ f("td", { className:
|
|
2846
|
+
return /* @__PURE__ */ f(re, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ f("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ f("td", { className: B(h.td, t[l] && h.numeric), children: /* @__PURE__ */ f("span", { className: h.skeleton, style: { width: `${o[(s + l) % o.length]}%` } }) }, l)) }, s)) });
|
|
2844
2847
|
}
|
|
2845
|
-
const
|
|
2846
|
-
function
|
|
2848
|
+
const xo = /* @__PURE__ */ rt(0);
|
|
2849
|
+
function Bt({ height: e, colSpan: t }) {
|
|
2847
2850
|
return typeof e == "number" && e <= 0 ? null : /* @__PURE__ */ f("tr", { "aria-hidden": "true", "data-filler": "", className: h.fillerRow, children: /* @__PURE__ */ f("td", { colSpan: t, style: { height: e } }) });
|
|
2848
2851
|
}
|
|
2849
2852
|
function ko({
|
|
@@ -2851,7 +2854,7 @@ function ko({
|
|
|
2851
2854
|
colSpan: t,
|
|
2852
2855
|
children: n
|
|
2853
2856
|
}) {
|
|
2854
|
-
const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, l = q(null), [c, a] =
|
|
2857
|
+
const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, l = q(null), [c, a] = I(0), u = (p, m) => {
|
|
2855
2858
|
l.current = m, a(m), i(m), requestAnimationFrame(() => {
|
|
2856
2859
|
p.querySelector(`[data-row="${m}"]`)?.focus();
|
|
2857
2860
|
});
|
|
@@ -2872,18 +2875,18 @@ function ko({
|
|
|
2872
2875
|
const m = p.target.closest("[data-row]");
|
|
2873
2876
|
m && a(Number(m.dataset.row));
|
|
2874
2877
|
},
|
|
2875
|
-
children: /* @__PURE__ */
|
|
2876
|
-
/* @__PURE__ */ f(
|
|
2878
|
+
children: /* @__PURE__ */ T(xo, { value: d, children: [
|
|
2879
|
+
/* @__PURE__ */ f(Bt, { height: r, colSpan: t }),
|
|
2877
2880
|
n,
|
|
2878
|
-
/* @__PURE__ */ f(
|
|
2881
|
+
/* @__PURE__ */ f(Bt, { height: s, colSpan: t })
|
|
2879
2882
|
] })
|
|
2880
2883
|
}
|
|
2881
2884
|
);
|
|
2882
2885
|
}
|
|
2883
|
-
function
|
|
2886
|
+
function Ql(e, t, n, o, r) {
|
|
2884
2887
|
if (!t) return n.rowKey(e);
|
|
2885
2888
|
const s = t.read(e);
|
|
2886
|
-
return se(s) ? r.cellAbsentValue :
|
|
2889
|
+
return se(s) ? r.cellAbsentValue : Pe(s, t.spec.format, o, r) ?? n.rowKey(e);
|
|
2887
2890
|
}
|
|
2888
2891
|
function So({
|
|
2889
2892
|
row: e,
|
|
@@ -2904,64 +2907,64 @@ function So({
|
|
|
2904
2907
|
line: w,
|
|
2905
2908
|
tree: g,
|
|
2906
2909
|
spanEntry: v,
|
|
2907
|
-
grid:
|
|
2910
|
+
grid: C,
|
|
2908
2911
|
trailing: y,
|
|
2909
2912
|
fresh: _ = !1
|
|
2910
2913
|
}) {
|
|
2911
|
-
const
|
|
2912
|
-
return /* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
+
const k = _e(xo), S = r.publicSnapshot, A = _ ? he : r.rowKey(e), L = _ ? m.newRow : Ql(e, i, r, p, m), x = _ ? he : Ue(A), O = _e(Ve)?.editing, M = O?.row === !0 && O.line === x, R = o.detail, E = _ ? void 0 : g?.entry(e), D = _ ? null : vo(o, S, e, A, E), $ = D !== null, P = D?.open ?? !1, K = D?.content, Y = `${b}-detail-${t}`, { className: ce, ...j } = d?.(e) ?? {}, ne = n !== void 0, de = w ? w.span ?? w.parents.at(-1) : void 0, le = R !== null && !g, ee = (l ? 1 : 0) + (le ? 1 : 0), oe = ee + (v ? 1 : 0), W = (F) => ct(a, F), ge = E !== void 0 && E.branch && !E.empty;
|
|
2915
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
2916
|
+
/* @__PURE__ */ T(
|
|
2914
2917
|
"tr",
|
|
2915
2918
|
{
|
|
2916
|
-
...
|
|
2917
|
-
className:
|
|
2919
|
+
...j,
|
|
2920
|
+
className: B(
|
|
2918
2921
|
ce,
|
|
2919
2922
|
ne && h.virtualRow,
|
|
2920
|
-
|
|
2923
|
+
E && h.treeRow,
|
|
2921
2924
|
ge && h.branchRow,
|
|
2922
|
-
|
|
2925
|
+
E?.pathOnly && h.pathRow
|
|
2923
2926
|
),
|
|
2924
|
-
"data-before-root":
|
|
2927
|
+
"data-before-root": E && !P && g?.beforeRoot(A) ? "" : void 0,
|
|
2925
2928
|
"data-row": ne ? n : void 0,
|
|
2926
2929
|
"data-line": w ? "row" : void 0,
|
|
2927
2930
|
"data-motion": A,
|
|
2928
|
-
"data-selected": l &&
|
|
2931
|
+
"data-selected": l && S.selection.isSelected(A) ? "" : void 0,
|
|
2929
2932
|
"data-group-first": w?.first ? "" : void 0,
|
|
2930
2933
|
"data-group": de?.path,
|
|
2931
|
-
"aria-level": w ? w.parents.length + 1 :
|
|
2932
|
-
"aria-posinset": de ? de.rows.indexOf(e) + 1 :
|
|
2933
|
-
"aria-setsize": de ? de.rows.length :
|
|
2934
|
-
"aria-expanded": ge ?
|
|
2935
|
-
"data-branch": ge ?
|
|
2936
|
-
tabIndex: ne && !
|
|
2937
|
-
"data-grid-line":
|
|
2938
|
-
"data-draft":
|
|
2934
|
+
"aria-level": w ? w.parents.length + 1 : E ? E.level + 1 : void 0,
|
|
2935
|
+
"aria-posinset": de ? de.rows.indexOf(e) + 1 : E?.position,
|
|
2936
|
+
"aria-setsize": de ? de.rows.length : E?.siblings,
|
|
2937
|
+
"aria-expanded": ge ? E.expanded : void 0,
|
|
2938
|
+
"data-branch": ge ? E.expanded ? "open" : "closed" : void 0,
|
|
2939
|
+
tabIndex: ne && !C ? n === k ? 0 : -1 : void 0,
|
|
2940
|
+
"data-grid-line": C ? x : void 0,
|
|
2941
|
+
"data-draft": M ? "" : void 0,
|
|
2939
2942
|
"data-even": ne && n % 2 === 1 ? "" : void 0,
|
|
2940
2943
|
"aria-rowindex": ne ? n + 2 : void 0,
|
|
2941
2944
|
children: [
|
|
2942
|
-
_ && Array.from({ length: ee + (v ? 1 : 0) }, (
|
|
2943
|
-
!_ && l && /* @__PURE__ */ f("td", { className:
|
|
2945
|
+
_ && Array.from({ length: ee + (v ? 1 : 0) }, (F, ae) => /* @__PURE__ */ f("td", { className: B(h.td, ae < ee && h.control, W(ae).className), style: W(ae).style }, ae)),
|
|
2946
|
+
!_ && l && /* @__PURE__ */ f("td", { className: B(h.td, h.control, W(0).className), style: W(0).style, children: /* @__PURE__ */ f(
|
|
2944
2947
|
We,
|
|
2945
2948
|
{
|
|
2946
|
-
"aria-label": m.selectRow(
|
|
2947
|
-
checked:
|
|
2948
|
-
onChange: () =>
|
|
2949
|
+
"aria-label": m.selectRow(L),
|
|
2950
|
+
checked: S.selection.isSelected(A),
|
|
2951
|
+
onChange: () => S.selection.toggle(A)
|
|
2949
2952
|
}
|
|
2950
2953
|
) }),
|
|
2951
|
-
!_ && le && /* @__PURE__ */ f("td", { className:
|
|
2954
|
+
!_ && le && /* @__PURE__ */ f("td", { className: B(h.td, h.control, W(ee - 1).className), style: W(ee - 1).style, children: $ && /* @__PURE__ */ f(
|
|
2952
2955
|
"button",
|
|
2953
2956
|
{
|
|
2954
2957
|
type: "button",
|
|
2955
|
-
"aria-expanded":
|
|
2956
|
-
"aria-controls":
|
|
2957
|
-
"aria-label":
|
|
2958
|
-
className:
|
|
2959
|
-
onClick: () =>
|
|
2960
|
-
children: /* @__PURE__ */ f(
|
|
2958
|
+
"aria-expanded": P,
|
|
2959
|
+
"aria-controls": P ? Y : void 0,
|
|
2960
|
+
"aria-label": P ? m.collapseRowNamed(L) : m.expandRowNamed(L),
|
|
2961
|
+
className: B(h.expander, P && h.expanderOpen),
|
|
2962
|
+
onClick: () => S.toggleRow(A),
|
|
2963
|
+
children: /* @__PURE__ */ f(Vo, {})
|
|
2961
2964
|
}
|
|
2962
2965
|
) }),
|
|
2963
2966
|
w && w.span && /* @__PURE__ */ f(
|
|
2964
|
-
|
|
2967
|
+
El,
|
|
2965
2968
|
{
|
|
2966
2969
|
line: { ...w, span: w.span },
|
|
2967
2970
|
entry: v,
|
|
@@ -2972,52 +2975,52 @@ function So({
|
|
|
2972
2975
|
wording: m
|
|
2973
2976
|
}
|
|
2974
2977
|
),
|
|
2975
|
-
s.map((
|
|
2976
|
-
|
|
2978
|
+
s.map((F, ae) => /* @__PURE__ */ f(
|
|
2979
|
+
ta,
|
|
2977
2980
|
{
|
|
2978
|
-
entry:
|
|
2981
|
+
entry: F,
|
|
2979
2982
|
row: e,
|
|
2980
|
-
kind: o.kindOf(
|
|
2983
|
+
kind: o.kindOf(F, r.rows),
|
|
2981
2984
|
pin: W(oe + ae),
|
|
2982
2985
|
formats: p,
|
|
2983
2986
|
wording: m,
|
|
2984
|
-
line:
|
|
2985
|
-
rowName:
|
|
2986
|
-
width:
|
|
2987
|
-
tree:
|
|
2987
|
+
line: x,
|
|
2988
|
+
rowName: L,
|
|
2989
|
+
width: S.widths[F.spec.id],
|
|
2990
|
+
tree: E && F === g?.column ? { setup: g, entry: E, detail: $ && !ge ? { open: P, toggle: () => S.toggleRow(A) } : void 0 } : void 0
|
|
2988
2991
|
},
|
|
2989
|
-
|
|
2992
|
+
F.key
|
|
2990
2993
|
)),
|
|
2991
2994
|
y && /* @__PURE__ */ f(
|
|
2992
|
-
|
|
2995
|
+
Zl,
|
|
2993
2996
|
{
|
|
2994
|
-
draft:
|
|
2997
|
+
draft: M,
|
|
2995
2998
|
actions: _ ? [] : c,
|
|
2996
2999
|
row: e,
|
|
2997
|
-
name:
|
|
3000
|
+
name: L,
|
|
2998
3001
|
wording: m,
|
|
2999
|
-
line:
|
|
3002
|
+
line: x,
|
|
3000
3003
|
pin: W(u - 1)
|
|
3001
3004
|
}
|
|
3002
3005
|
)
|
|
3003
3006
|
]
|
|
3004
3007
|
}
|
|
3005
3008
|
),
|
|
3006
|
-
|
|
3007
|
-
|
|
3009
|
+
P && /* @__PURE__ */ f(
|
|
3010
|
+
ea,
|
|
3008
3011
|
{
|
|
3009
3012
|
id: Y,
|
|
3010
3013
|
group: de?.path,
|
|
3011
|
-
gridLine:
|
|
3012
|
-
beforeRoot:
|
|
3014
|
+
gridLine: C ? `detail:${A}` : void 0,
|
|
3015
|
+
beforeRoot: E && g?.beforeRoot(A) ? "" : void 0,
|
|
3013
3016
|
colSpan: u,
|
|
3014
|
-
entry:
|
|
3015
|
-
children:
|
|
3017
|
+
entry: E,
|
|
3018
|
+
children: K
|
|
3016
3019
|
}
|
|
3017
3020
|
)
|
|
3018
3021
|
] });
|
|
3019
3022
|
}
|
|
3020
|
-
function
|
|
3023
|
+
function Zl({
|
|
3021
3024
|
draft: e,
|
|
3022
3025
|
actions: t,
|
|
3023
3026
|
row: n,
|
|
@@ -3026,12 +3029,12 @@ function Ql({
|
|
|
3026
3029
|
line: s,
|
|
3027
3030
|
pin: i
|
|
3028
3031
|
}) {
|
|
3029
|
-
return /* @__PURE__ */ f("td", { className:
|
|
3030
|
-
/* @__PURE__ */ f(
|
|
3032
|
+
return /* @__PURE__ */ f("td", { className: B(h.td, h.actionsCell, i.className, e && h.editing), style: i.style, children: e ? /* @__PURE__ */ T(re, { children: [
|
|
3033
|
+
/* @__PURE__ */ f(Jl, { name: o, wording: r }),
|
|
3031
3034
|
/* @__PURE__ */ f("span", { className: h.held, "aria-hidden": "true", children: /* @__PURE__ */ f(yn, { actions: t, row: n, name: o, wording: r, line: s }) })
|
|
3032
3035
|
] }) : /* @__PURE__ */ f(yn, { actions: t, row: n, name: o, wording: r, line: s }) });
|
|
3033
3036
|
}
|
|
3034
|
-
function
|
|
3037
|
+
function ea({
|
|
3035
3038
|
id: e,
|
|
3036
3039
|
group: t,
|
|
3037
3040
|
gridLine: n,
|
|
@@ -3044,13 +3047,13 @@ function Zl({
|
|
|
3044
3047
|
"td",
|
|
3045
3048
|
{
|
|
3046
3049
|
colSpan: r,
|
|
3047
|
-
className:
|
|
3048
|
-
style: s ? { "--tree-level": s.level } : void 0,
|
|
3050
|
+
className: B(h.detailCell, s && h.treeDetail),
|
|
3051
|
+
style: s ? { "--_table-tree-level": s.level } : void 0,
|
|
3049
3052
|
children: s ? /* @__PURE__ */ f("div", { className: h.treeDetailRail, children: i }) : i
|
|
3050
3053
|
}
|
|
3051
3054
|
) });
|
|
3052
3055
|
}
|
|
3053
|
-
function
|
|
3056
|
+
function ta({
|
|
3054
3057
|
entry: e,
|
|
3055
3058
|
row: t,
|
|
3056
3059
|
kind: n,
|
|
@@ -3062,25 +3065,25 @@ function ea({
|
|
|
3062
3065
|
tree: c,
|
|
3063
3066
|
width: a
|
|
3064
3067
|
}) {
|
|
3065
|
-
const { spec: u } = e, d = e.read(t), b = Vt(n, u.rightAligned), p =
|
|
3068
|
+
const { spec: u } = e, d = e.read(t), b = Vt(n, u.rightAligned), p = yl(i, u.id), w = !(_e(Ve) !== null) || u.edit === void 0 ? void 0 : u.edit === "text" || u.edit === "number" ? "type" : "pick";
|
|
3066
3069
|
let g;
|
|
3067
|
-
se(d) ? g = /* @__PURE__ */ f(
|
|
3070
|
+
se(d) ? g = /* @__PURE__ */ f(go, { wording: s }) : u.presentation ? g = u.presentation(d, t) : g = Pe(d, u.format, r, s);
|
|
3068
3071
|
const v = typeof g == "string";
|
|
3069
3072
|
g = /* @__PURE__ */ f(
|
|
3070
3073
|
"div",
|
|
3071
3074
|
{
|
|
3072
|
-
className:
|
|
3073
|
-
style: a !== void 0 ? { "--
|
|
3075
|
+
className: B(h.value, v && h.valueText, a !== void 0 && h.sized, p && h.editingValue),
|
|
3076
|
+
style: a !== void 0 ? { "--_table-width": `${a}px` } : void 0,
|
|
3074
3077
|
"aria-hidden": p ? !0 : void 0,
|
|
3075
3078
|
children: g
|
|
3076
3079
|
}
|
|
3077
|
-
), c && (g = /* @__PURE__ */ f(
|
|
3078
|
-
const
|
|
3079
|
-
return /* @__PURE__ */
|
|
3080
|
-
|
|
3080
|
+
), c && (g = /* @__PURE__ */ f(Dl, { ...c, name: l, wording: s, children: g }));
|
|
3081
|
+
const C = u.rowHeader ? "th" : "td";
|
|
3082
|
+
return /* @__PURE__ */ T(
|
|
3083
|
+
C,
|
|
3081
3084
|
{
|
|
3082
3085
|
scope: u.rowHeader ? "row" : void 0,
|
|
3083
|
-
className:
|
|
3086
|
+
className: B(h.td, b && h.numeric, u.rowHeader && h.rowHeader, o.className, p && h.editing),
|
|
3084
3087
|
style: o.style,
|
|
3085
3088
|
"data-edit": w,
|
|
3086
3089
|
"data-editing": p ? u.id : void 0,
|
|
@@ -3120,7 +3123,7 @@ function Dt(e, t, n, o, r) {
|
|
|
3120
3123
|
i.rowKey(t)
|
|
3121
3124
|
);
|
|
3122
3125
|
}
|
|
3123
|
-
function
|
|
3126
|
+
function na(e, t) {
|
|
3124
3127
|
const { registry: n, hook: o, layout: r } = e;
|
|
3125
3128
|
return /* @__PURE__ */ f("tbody", { children: /* @__PURE__ */ f(
|
|
3126
3129
|
So,
|
|
@@ -3149,10 +3152,10 @@ function ta(e, t) {
|
|
|
3149
3152
|
he
|
|
3150
3153
|
) });
|
|
3151
3154
|
}
|
|
3152
|
-
function
|
|
3155
|
+
function oa(e) {
|
|
3153
3156
|
const { registry: t, hook: n, layout: o } = e;
|
|
3154
3157
|
return /* @__PURE__ */ f("tbody", { children: /* @__PURE__ */ f(
|
|
3155
|
-
|
|
3158
|
+
Xl,
|
|
3156
3159
|
{
|
|
3157
3160
|
columns: o.columnCount,
|
|
3158
3161
|
rows: e.pageSize ? e.heldLines || e.pageSize : void 0,
|
|
@@ -3163,24 +3166,24 @@ function na(e) {
|
|
|
3163
3166
|
}
|
|
3164
3167
|
) });
|
|
3165
3168
|
}
|
|
3166
|
-
function
|
|
3169
|
+
function ra(e) {
|
|
3167
3170
|
const { hook: t, layout: n, wording: o } = e, { snapshot: r } = n;
|
|
3168
3171
|
return /* @__PURE__ */ f("tbody", { children: /* @__PURE__ */ f("tr", { "data-grid-line": Yt(e.gridMode, "empty"), children: /* @__PURE__ */ f(
|
|
3169
3172
|
"td",
|
|
3170
3173
|
{
|
|
3171
3174
|
colSpan: n.columnCount,
|
|
3172
3175
|
className: h.emptyCell,
|
|
3173
|
-
style: e.pageSize && e.heldLines ? { height: `calc(var(--
|
|
3174
|
-
children: /* @__PURE__ */ f("div", { className: h.empty, children: (r.server || t.admitted.length > 0) && n.restricted ? /* @__PURE__ */
|
|
3176
|
+
style: e.pageSize && e.heldLines ? { height: `calc(var(--_table-pitch) * ${e.heldLines})`, verticalAlign: "top" } : void 0,
|
|
3177
|
+
children: /* @__PURE__ */ f("div", { className: h.empty, children: (r.server || t.admitted.length > 0) && n.restricted ? /* @__PURE__ */ T(re, { children: [
|
|
3175
3178
|
/* @__PURE__ */ f("p", { className: h.emptyTitle, children: o.nothingMatchesFilters }),
|
|
3176
|
-
/* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", onClick: () =>
|
|
3179
|
+
/* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", onClick: () => Zn(r), children: o.resetAll })
|
|
3177
3180
|
] }) : e.empty ?? /* @__PURE__ */ f("p", { className: h.emptyTitle, children: o.noEntries }) })
|
|
3178
3181
|
}
|
|
3179
3182
|
) }) });
|
|
3180
3183
|
}
|
|
3181
|
-
function
|
|
3182
|
-
const { hook: n, layout: o, wording: r, formats: s } = e, { virtual: i, grouping: l, projection: c } = o, a = i ?
|
|
3183
|
-
|
|
3184
|
+
function sa(e, t) {
|
|
3185
|
+
const { hook: n, layout: o, wording: r, formats: s } = e, { virtual: i, grouping: l, projection: c } = o, a = i ? Bn(t).map((m) => m.kind === "folded" || !m.continued ? m : { ...m, continued: !1 }) : t, u = a.length - t.length, d = i && i.from > 0 ? i.fillerBefore / i.from : 0, b = (m, w, g, v) => /* @__PURE__ */ f(
|
|
3186
|
+
Ml,
|
|
3184
3187
|
{
|
|
3185
3188
|
line: m,
|
|
3186
3189
|
index: g,
|
|
@@ -3217,21 +3220,21 @@ function ra(e, t) {
|
|
|
3217
3220
|
colSpan: o.columnCount,
|
|
3218
3221
|
children: a.map(p)
|
|
3219
3222
|
}
|
|
3220
|
-
) : /* @__PURE__ */
|
|
3223
|
+
) : /* @__PURE__ */ T("tbody", { children: [
|
|
3221
3224
|
t.map(p),
|
|
3222
3225
|
e.filler
|
|
3223
3226
|
] });
|
|
3224
3227
|
}
|
|
3225
|
-
function
|
|
3226
|
-
return n && t > 0 && t < e ? /* @__PURE__ */ f(
|
|
3228
|
+
function ia(e, t, n, o) {
|
|
3229
|
+
return n && t > 0 && t < e ? /* @__PURE__ */ f(Bt, { height: `calc(var(--_table-pitch) * ${e - t})`, colSpan: o }) : null;
|
|
3227
3230
|
}
|
|
3228
|
-
function
|
|
3231
|
+
function la(e, t, n) {
|
|
3229
3232
|
const { layout: o } = e, { virtual: r, lines: s, rows: i, projection: l } = o;
|
|
3230
|
-
return t && !n ? { body:
|
|
3233
|
+
return t && !n ? { body: oa(e), empty: !1 } : l.filtered.length === 0 ? { body: ra(e), empty: !0 } : s ? { body: sa(e, s), empty: !1 } : r ? {
|
|
3231
3234
|
body: /* @__PURE__ */ f(ko, { virtual: r, colSpan: o.columnCount, children: i.map((c, a) => Dt(e, c, a, r.from + a)) }),
|
|
3232
3235
|
empty: !1
|
|
3233
3236
|
} : {
|
|
3234
|
-
body: /* @__PURE__ */
|
|
3237
|
+
body: /* @__PURE__ */ T("tbody", { children: [
|
|
3235
3238
|
i.map((c, a) => Dt(e, c, a, a)),
|
|
3236
3239
|
e.filler
|
|
3237
3240
|
] }),
|
|
@@ -3244,62 +3247,62 @@ function _n({
|
|
|
3244
3247
|
hook: n,
|
|
3245
3248
|
pin: o
|
|
3246
3249
|
}) {
|
|
3247
|
-
const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = Vt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, u = s.sort.findIndex((
|
|
3248
|
-
|
|
3249
|
-
const
|
|
3250
|
+
const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = Vt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, u = s.sort.findIndex((k) => k.column === a), d = u === -1 ? void 0 : s.sort[u].direction, b = s.sort.length > 1 && u !== -1 ? u + 1 : void 0, p = s.widths[a], m = 48, w = (k) => {
|
|
3251
|
+
k.stopPropagation(), k.preventDefault();
|
|
3252
|
+
const S = k.currentTarget, A = S.closest("th");
|
|
3250
3253
|
if (!A) return;
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3253
|
-
const
|
|
3254
|
-
|
|
3255
|
-
},
|
|
3256
|
-
|
|
3254
|
+
const L = k.clientX, x = A.getBoundingClientRect().width, O = k.pointerId;
|
|
3255
|
+
S.setPointerCapture(O);
|
|
3256
|
+
const M = (E) => {
|
|
3257
|
+
E.pointerId === O && s.setWidth(a, Math.max(m, x + (E.clientX - L)));
|
|
3258
|
+
}, R = (E) => {
|
|
3259
|
+
E.pointerId === O && (S.removeEventListener("pointermove", M), S.removeEventListener("pointerup", R), S.removeEventListener("pointercancel", R), S.hasPointerCapture(O) && S.releasePointerCapture(O));
|
|
3257
3260
|
};
|
|
3258
|
-
|
|
3259
|
-
}, g = (
|
|
3260
|
-
const
|
|
3261
|
-
if (!
|
|
3262
|
-
const
|
|
3263
|
-
|
|
3264
|
-
let
|
|
3265
|
-
for (const
|
|
3266
|
-
if (
|
|
3267
|
-
const
|
|
3268
|
-
if (!
|
|
3269
|
-
const D =
|
|
3270
|
-
|
|
3261
|
+
S.addEventListener("pointermove", M), S.addEventListener("pointerup", R), S.addEventListener("pointercancel", R);
|
|
3262
|
+
}, g = (k) => {
|
|
3263
|
+
const S = k?.parentElement, A = k?.closest("table");
|
|
3264
|
+
if (!k || !S || !A) return;
|
|
3265
|
+
const L = Array.from(S.children).indexOf(k), x = S.children.length, O = { cell: k.style.width, table: A.style.width };
|
|
3266
|
+
k.style.width = "", A.style.width = "auto";
|
|
3267
|
+
let M = 0;
|
|
3268
|
+
for (const R of Array.from(A.rows)) {
|
|
3269
|
+
if (R.cells.length !== x) continue;
|
|
3270
|
+
const E = R.cells[L];
|
|
3271
|
+
if (!E) continue;
|
|
3272
|
+
const D = E.querySelector(`.${h.value}`), $ = getComputedStyle(E), P = (parseFloat($.paddingLeft) || 0) + (parseFloat($.paddingRight) || 0), K = E.querySelector(`.${h.headLabel}`), Y = K ? K.scrollWidth - K.clientWidth : 0;
|
|
3273
|
+
M = Math.max(M, E.scrollWidth + Y, D ? D.scrollWidth + P : 0);
|
|
3271
3274
|
}
|
|
3272
|
-
|
|
3273
|
-
}, v = (
|
|
3274
|
-
if (!r.resizable || !
|
|
3275
|
-
const
|
|
3276
|
-
if (!
|
|
3277
|
-
|
|
3278
|
-
const
|
|
3279
|
-
if (
|
|
3280
|
-
g(
|
|
3275
|
+
k.style.width = O.cell, A.style.width = O.table, M > 0 && s.setWidth(a, Math.max(m, M + 1));
|
|
3276
|
+
}, v = (k) => {
|
|
3277
|
+
if (!r.resizable || !k.altKey) return;
|
|
3278
|
+
const S = k.key === "ArrowRight", A = k.key === "ArrowLeft", L = k.key === "Home";
|
|
3279
|
+
if (!S && !A && !L) return;
|
|
3280
|
+
k.preventDefault();
|
|
3281
|
+
const x = k.currentTarget;
|
|
3282
|
+
if (L) {
|
|
3283
|
+
g(x);
|
|
3281
3284
|
return;
|
|
3282
3285
|
}
|
|
3283
|
-
const
|
|
3284
|
-
s.setWidth(a, Math.max(m,
|
|
3285
|
-
},
|
|
3286
|
+
const O = x.getBoundingClientRect().width, M = k.shiftKey ? 32 : 8;
|
|
3287
|
+
s.setWidth(a, Math.max(m, O + (S ? M : -M)));
|
|
3288
|
+
}, C = c ? /* @__PURE__ */ T(
|
|
3286
3289
|
"button",
|
|
3287
3290
|
{
|
|
3288
3291
|
type: "button",
|
|
3289
|
-
className:
|
|
3290
|
-
onClick: (
|
|
3292
|
+
className: B(h.sortButton, h.headLine),
|
|
3293
|
+
onClick: (k) => s.toggleSort(a, k.shiftKey || k.metaKey),
|
|
3291
3294
|
children: [
|
|
3292
3295
|
/* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }),
|
|
3293
3296
|
b !== void 0 && /* @__PURE__ */ f("span", { className: h.sortRank, "aria-hidden": "true", children: b }),
|
|
3294
|
-
/* @__PURE__ */ f("span", { className:
|
|
3297
|
+
/* @__PURE__ */ f("span", { className: B(h.sortIndicator, d && h.sortActive), "aria-hidden": "true", children: d ? /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: B(h.sortArrow, d === "desc" && h.sortArrowDesc), children: /* @__PURE__ */ f("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
|
|
3295
3298
|
/* Drawn in the nominal box and set in the 12 pixels the indicator
|
|
3296
3299
|
takes, so that the head does not move. */
|
|
3297
3300
|
/* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2.8 3.7 5 1.5l2.2 2.2M2.8 6.3 5 8.5l2.2-2.2", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3298
3301
|
) })
|
|
3299
3302
|
]
|
|
3300
3303
|
}
|
|
3301
|
-
) : /* @__PURE__ */ f("span", { className: h.headLine, children: /* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }) }), y = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", _ =
|
|
3302
|
-
return /* @__PURE__ */
|
|
3304
|
+
) : /* @__PURE__ */ f("span", { className: h.headLine, children: /* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }) }), y = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", _ = Ee(r.filter) !== void 0 && !(r.filter === "list" && i === "other");
|
|
3305
|
+
return /* @__PURE__ */ T(
|
|
3303
3306
|
"th",
|
|
3304
3307
|
{
|
|
3305
3308
|
scope: "col",
|
|
@@ -3307,25 +3310,25 @@ function _n({
|
|
|
3307
3310
|
"aria-sort": c ? y : void 0,
|
|
3308
3311
|
tabIndex: r.resizable && !c ? 0 : void 0,
|
|
3309
3312
|
onKeyDown: v,
|
|
3310
|
-
className:
|
|
3313
|
+
className: B(h.th, l && h.numeric, p !== void 0 && h.sized, o.className),
|
|
3311
3314
|
style: {
|
|
3312
3315
|
...p !== void 0 ? { width: p } : {},
|
|
3313
3316
|
...o.style
|
|
3314
3317
|
},
|
|
3315
3318
|
children: [
|
|
3316
|
-
_ ? /* @__PURE__ */
|
|
3317
|
-
|
|
3318
|
-
/* @__PURE__ */ f(
|
|
3319
|
-
] }) :
|
|
3319
|
+
_ ? /* @__PURE__ */ T("span", { className: h.thFlex, children: [
|
|
3320
|
+
C,
|
|
3321
|
+
/* @__PURE__ */ f(qi, { entry: e, registry: t, hook: n })
|
|
3322
|
+
] }) : C,
|
|
3320
3323
|
r.resizable && /* @__PURE__ */ f(
|
|
3321
3324
|
"span",
|
|
3322
3325
|
{
|
|
3323
3326
|
role: "presentation",
|
|
3324
3327
|
className: h.grip,
|
|
3325
3328
|
onPointerDown: w,
|
|
3326
|
-
onClick: (
|
|
3327
|
-
onDoubleClick: (
|
|
3328
|
-
|
|
3329
|
+
onClick: (k) => k.stopPropagation(),
|
|
3330
|
+
onDoubleClick: (k) => {
|
|
3331
|
+
k.stopPropagation(), g(k.currentTarget.closest("th"));
|
|
3329
3332
|
}
|
|
3330
3333
|
}
|
|
3331
3334
|
)
|
|
@@ -3333,16 +3336,16 @@ function _n({
|
|
|
3333
3336
|
}
|
|
3334
3337
|
);
|
|
3335
3338
|
}
|
|
3336
|
-
function
|
|
3339
|
+
function aa({
|
|
3337
3340
|
registry: e,
|
|
3338
3341
|
hook: t,
|
|
3339
3342
|
layout: n,
|
|
3340
3343
|
props: o,
|
|
3341
3344
|
wording: r
|
|
3342
3345
|
}) {
|
|
3343
|
-
const { selectable: s = !1, grid: i = !1 } = o, { snapshot: l, virtual: c, spanEntry: a, dataColumns: u, expanderColumn: d, controlColumns: b, leading: p, rowMode: m, rowTools: w, trailing: g, columnCount: v, blocks:
|
|
3344
|
-
return /* @__PURE__ */ f("thead", { children: /* @__PURE__ */
|
|
3345
|
-
s && /* @__PURE__ */ f("th", { scope: "col", className:
|
|
3346
|
+
const { selectable: s = !1, grid: i = !1 } = o, { snapshot: l, virtual: c, spanEntry: a, dataColumns: u, expanderColumn: d, controlColumns: b, leading: p, rowMode: m, rowTools: w, trailing: g, columnCount: v, blocks: C } = n, y = (_, k = _) => ct(C, _, k);
|
|
3347
|
+
return /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": c ? 1 : void 0, "data-grid-line": Yt(i, "head"), children: [
|
|
3348
|
+
s && /* @__PURE__ */ f("th", { scope: "col", className: B(h.th, h.control, y(0).className), style: y(0).style, children: /* @__PURE__ */ f(
|
|
3346
3349
|
We,
|
|
3347
3350
|
{
|
|
3348
3351
|
"aria-label": l.server ? r.selectAllOnPage : r.selectAllRows,
|
|
@@ -3354,26 +3357,26 @@ function la({
|
|
|
3354
3357
|
d && /* @__PURE__ */ f(
|
|
3355
3358
|
"td",
|
|
3356
3359
|
{
|
|
3357
|
-
className:
|
|
3360
|
+
className: B(h.th, h.control, y(b - 1).className),
|
|
3358
3361
|
style: y(b - 1).style
|
|
3359
3362
|
}
|
|
3360
3363
|
),
|
|
3361
|
-
a && (e.columnById(a.spec.id) === a ? /* @__PURE__ */ f(_n, { entry: a, registry: e, hook: t, pin: y(b) }) : /* @__PURE__ */ f("th", { scope: "col", className:
|
|
3362
|
-
u.map((_,
|
|
3363
|
-
g && /* @__PURE__ */
|
|
3364
|
+
a && (e.columnById(a.spec.id) === a ? /* @__PURE__ */ f(_n, { entry: a, registry: e, hook: t, pin: y(b) }) : /* @__PURE__ */ f("th", { scope: "col", className: B(h.th, y(b).className), style: y(b).style, children: a.spec.label })),
|
|
3365
|
+
u.map((_, k) => /* @__PURE__ */ f(_n, { entry: _, registry: e, hook: t, pin: y(p + k) }, _.key)),
|
|
3366
|
+
g && /* @__PURE__ */ T(
|
|
3364
3367
|
"th",
|
|
3365
3368
|
{
|
|
3366
3369
|
scope: "col",
|
|
3367
|
-
className:
|
|
3370
|
+
className: B(h.th, h.actionsCell, y(v - 1).className),
|
|
3368
3371
|
style: y(v - 1).style,
|
|
3369
3372
|
children: [
|
|
3370
|
-
/* @__PURE__ */ f(
|
|
3371
|
-
w && /* @__PURE__ */
|
|
3372
|
-
(m || o.onRowAdd) && /* @__PURE__ */
|
|
3373
|
+
/* @__PURE__ */ f(Oe, { children: r.rowActions }),
|
|
3374
|
+
w && /* @__PURE__ */ T("span", { className: h.reserve, "aria-hidden": "true", children: [
|
|
3375
|
+
(m || o.onRowAdd) && /* @__PURE__ */ T("span", { className: B(h.actions, h.decision), children: [
|
|
3373
3376
|
/* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.saveRow }),
|
|
3374
3377
|
/* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.discardRow })
|
|
3375
3378
|
] }),
|
|
3376
|
-
o.onRowDelete && /* @__PURE__ */
|
|
3379
|
+
o.onRowDelete && /* @__PURE__ */ T("span", { className: B(h.actions, h.decision), children: [
|
|
3377
3380
|
/* @__PURE__ */ f("span", { className: h.deleteAsk, children: r.deleteRowAsk }),
|
|
3378
3381
|
/* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.deleteRow }),
|
|
3379
3382
|
/* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.keepRow })
|
|
@@ -3384,18 +3387,18 @@ function la({
|
|
|
3384
3387
|
)
|
|
3385
3388
|
] }) });
|
|
3386
3389
|
}
|
|
3387
|
-
function
|
|
3390
|
+
function ca({
|
|
3388
3391
|
layout: e,
|
|
3389
3392
|
gridMode: t,
|
|
3390
3393
|
formats: n,
|
|
3391
3394
|
wording: o
|
|
3392
3395
|
}) {
|
|
3393
3396
|
const { projection: r, virtual: s, spanEntry: i, dataColumns: l, controlColumns: c, leading: a, trailing: u, columnCount: d, blocks: b } = e, p = (m, w = m) => ct(b, m, w);
|
|
3394
|
-
return /* @__PURE__ */ f("tfoot", { children: /* @__PURE__ */
|
|
3395
|
-
Array.from({ length: c }, (m, w) => /* @__PURE__ */ f("td", { className:
|
|
3396
|
-
i && /* @__PURE__ */ f("td", { className:
|
|
3397
|
+
return /* @__PURE__ */ f("tfoot", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": s ? (r.lines ?? r.shown ?? r.filtered).length + 2 : void 0, "data-grid-line": Yt(t, "foot"), children: [
|
|
3398
|
+
Array.from({ length: c }, (m, w) => /* @__PURE__ */ f("td", { className: B(h.td, h.control, p(w).className), style: p(w).style }, w)),
|
|
3399
|
+
i && /* @__PURE__ */ f("td", { className: B(h.td, p(c).className), style: p(c).style }),
|
|
3397
3400
|
l.map((m, w) => /* @__PURE__ */ f(
|
|
3398
|
-
|
|
3401
|
+
da,
|
|
3399
3402
|
{
|
|
3400
3403
|
entry: m,
|
|
3401
3404
|
rows: r.roots ?? r.filtered,
|
|
@@ -3406,34 +3409,34 @@ function aa({
|
|
|
3406
3409
|
},
|
|
3407
3410
|
m.key
|
|
3408
3411
|
)),
|
|
3409
|
-
u && /* @__PURE__ */ f("td", { className:
|
|
3412
|
+
u && /* @__PURE__ */ f("td", { className: B(h.td, p(d - 1).className), style: p(d - 1).style })
|
|
3410
3413
|
] }) });
|
|
3411
3414
|
}
|
|
3412
|
-
function
|
|
3415
|
+
function da({
|
|
3413
3416
|
entry: e,
|
|
3414
3417
|
rows: t,
|
|
3415
3418
|
formats: n,
|
|
3416
3419
|
wording: o,
|
|
3417
|
-
pin: r =
|
|
3420
|
+
pin: r = wo,
|
|
3418
3421
|
topLevel: s = !1
|
|
3419
3422
|
}) {
|
|
3420
|
-
if (!e.spec.aggregate) return /* @__PURE__ */ f("td", { className:
|
|
3423
|
+
if (!e.spec.aggregate) return /* @__PURE__ */ f("td", { className: B(h.td, r.className), style: r.style });
|
|
3421
3424
|
const i = typeof e.spec.aggregate == "function" ? "own" : e.spec.aggregate;
|
|
3422
|
-
return /* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ T(
|
|
3423
3426
|
"td",
|
|
3424
3427
|
{
|
|
3425
|
-
className:
|
|
3428
|
+
className: B(h.td, mo(e, t) && h.numeric, r.className),
|
|
3426
3429
|
style: r.style,
|
|
3427
3430
|
"data-footer": i,
|
|
3428
3431
|
title: s ? o.footerTopLevel : void 0,
|
|
3429
3432
|
children: [
|
|
3430
|
-
/* @__PURE__ */ f(
|
|
3431
|
-
s && /* @__PURE__ */ f(
|
|
3433
|
+
/* @__PURE__ */ f(Ot, { entry: e, rows: t, formats: n, wording: o, signed: !0 }),
|
|
3434
|
+
s && /* @__PURE__ */ f(Oe, { children: ` (${o.footerTopLevel})` })
|
|
3432
3435
|
]
|
|
3433
3436
|
}
|
|
3434
3437
|
);
|
|
3435
3438
|
}
|
|
3436
|
-
function
|
|
3439
|
+
function ua({
|
|
3437
3440
|
table: e,
|
|
3438
3441
|
blocks: t,
|
|
3439
3442
|
onSticking: n,
|
|
@@ -3445,7 +3448,7 @@ function da({
|
|
|
3445
3448
|
}), l = () => {
|
|
3446
3449
|
const c = e.current, a = c?.parentElement;
|
|
3447
3450
|
if (!c || !a || (a.style.removeProperty("scroll-padding-left"), a.style.removeProperty("scroll-padding-right"), !r && !s)) return;
|
|
3448
|
-
const u = Array.from(c.tHead?.rows[0]?.cells ?? []);
|
|
3451
|
+
const u = Array.from(c.tHead?.rows?.[0]?.cells ?? []);
|
|
3449
3452
|
let d = 0;
|
|
3450
3453
|
for (let g = 0; g < r; g++)
|
|
3451
3454
|
c.style.setProperty(`--u-table-pin-start-${g}`, `${d}px`), d += u[g]?.getBoundingClientRect().width ?? 0;
|
|
@@ -3456,18 +3459,18 @@ function da({
|
|
|
3456
3459
|
i.current.key !== p && (i.current = { key: p, sticking: i.current.sticking });
|
|
3457
3460
|
const m = i.current;
|
|
3458
3461
|
m.sticking.start && (m.start = d), m.sticking.end && (m.end = b);
|
|
3459
|
-
const w =
|
|
3460
|
-
m.sticking = w, n(w), w.start || (d = 0), w.end || (b = 0), c.style.setProperty("--u-table-pin-start", `${d}px`), c.style.setProperty("--u-table-pin-end", `${b}px`), d && a.style.setProperty("scroll-padding-left", `${d}px`), b && a.style.setProperty("scroll-padding-right", `${b}px`),
|
|
3462
|
+
const w = ir(m.start ?? d, m.end ?? b, a.clientWidth);
|
|
3463
|
+
m.sticking = w, n(w), w.start || (d = 0), w.end || (b = 0), c.style.setProperty("--u-table-pin-start", `${d}px`), c.style.setProperty("--u-table-pin-end", `${b}px`), d && a.style.setProperty("scroll-padding-left", `${d}px`), b && a.style.setProperty("scroll-padding-right", `${b}px`), yo(a);
|
|
3461
3464
|
};
|
|
3462
|
-
return Z(l),
|
|
3465
|
+
return Z(l), Ce(() => {
|
|
3463
3466
|
const c = e.current;
|
|
3464
3467
|
if (!c || !r && !s || typeof ResizeObserver > "u") return;
|
|
3465
|
-
const a = new ResizeObserver(l), u = Array.from(c.tHead?.rows[0]?.cells ?? []);
|
|
3468
|
+
const a = new ResizeObserver(l), u = Array.from(c.tHead?.rows?.[0]?.cells ?? []);
|
|
3466
3469
|
for (const d of [...u.slice(0, r), ...u.slice(u.length - s)]) a.observe(d);
|
|
3467
3470
|
return c.parentElement && a.observe(c.parentElement), () => a.disconnect();
|
|
3468
3471
|
}, [e, r, s, t.count, o]), null;
|
|
3469
3472
|
}
|
|
3470
|
-
function
|
|
3473
|
+
function fa({ table: e }) {
|
|
3471
3474
|
return Z(() => {
|
|
3472
3475
|
const t = e.current?.parentElement;
|
|
3473
3476
|
if (!t) return;
|
|
@@ -3477,20 +3480,20 @@ function ua({ table: e }) {
|
|
|
3477
3480
|
return o.observe(t), () => o.disconnect();
|
|
3478
3481
|
}, [e]), null;
|
|
3479
3482
|
}
|
|
3480
|
-
function
|
|
3483
|
+
function ha({ table: e, blocks: t }) {
|
|
3481
3484
|
const n = q(t);
|
|
3482
3485
|
return Z(() => {
|
|
3483
3486
|
n.current = t;
|
|
3484
3487
|
const o = e.current?.parentElement;
|
|
3485
|
-
o &&
|
|
3486
|
-
}),
|
|
3488
|
+
o && Ft(o, t);
|
|
3489
|
+
}), Ce(() => {
|
|
3487
3490
|
const o = e.current, r = o?.parentElement;
|
|
3488
3491
|
if (!o || !r || typeof ResizeObserver > "u") return;
|
|
3489
|
-
const s = new ResizeObserver(() =>
|
|
3492
|
+
const s = new ResizeObserver(() => Ft(r, n.current));
|
|
3490
3493
|
return s.observe(r), s.observe(o), () => s.disconnect();
|
|
3491
3494
|
}, [e]), null;
|
|
3492
3495
|
}
|
|
3493
|
-
function
|
|
3496
|
+
function ga({ registry: e, props: t }) {
|
|
3494
3497
|
const {
|
|
3495
3498
|
selectable: n = !1,
|
|
3496
3499
|
stickyHeader: o = !1,
|
|
@@ -3504,20 +3507,20 @@ function ha({ registry: e, props: t }) {
|
|
|
3504
3507
|
grid: d = !1
|
|
3505
3508
|
} = t;
|
|
3506
3509
|
st(e.subscribe, e.bodyVersion, e.bodyVersion);
|
|
3507
|
-
const b = ie(), p =
|
|
3508
|
-
|
|
3509
|
-
const
|
|
3510
|
-
|
|
3510
|
+
const b = ie(), p = xe(), m = Io(s, "regular"), w = be(), g = q(null), [v, C] = I(0), y = dl(), [_, k] = I({ start: !0, end: !0 });
|
|
3511
|
+
Kl(e, y), Gl(g, o), jl(e, g), Hl(e, g, c), Wl(g), ql(e, g);
|
|
3512
|
+
const S = e.hook && !e.hook.tableState.virtual ? e.hook.publicSnapshot : null;
|
|
3513
|
+
ol(g, S ? `${S.grouping.join("|")}#${S.folded.join("|")}` : "");
|
|
3511
3514
|
const A = e.hook;
|
|
3512
3515
|
if (!A) return null;
|
|
3513
|
-
const
|
|
3516
|
+
const L = y.state.editing?.row === !0, x = Yl({ registry: e, hook: A, props: t, drafting: L, sticking: _ }), { snapshot: O, projection: M, virtual: R, lines: E, entries: D, grouping: $, dataColumns: P, columnCount: K, pins: Y, pinned: ce, blocks: j, rows: ne, footerShown: de } = x, { lines: le, fresh: ee, ids: oe, events: W } = Vl({ registry: e, hook: A, props: t, layout: x, grid: y }), ge = $l({ registry: e, hook: A, grid: y, gridMode: d, gridLines: le, dataColumns: P, formats: p, wording: b, tableElement: () => g.current });
|
|
3514
3517
|
e.setAddRow(W?.addRow ?? null);
|
|
3515
|
-
const
|
|
3516
|
-
Ae > v &&
|
|
3517
|
-
const ue = Math.min(Math.max(Ae, v,
|
|
3518
|
+
const F = (e.paginates() || O.server) && !R ? O.pageSize : 0, ae = E ? E.length : ne.length, Ae = F && !c ? Math.min(ae, F) : 0;
|
|
3519
|
+
Ae > v && C(Ae);
|
|
3520
|
+
const ue = Math.min(Math.max(Ae, v, O.pageCount > 1 ? F : 0), F), Ne = c && ae > 0, Me = {
|
|
3518
3521
|
registry: e,
|
|
3519
3522
|
hook: A,
|
|
3520
|
-
layout:
|
|
3523
|
+
layout: x,
|
|
3521
3524
|
selectable: n,
|
|
3522
3525
|
gridMode: d,
|
|
3523
3526
|
empty: l,
|
|
@@ -3525,40 +3528,40 @@ function ha({ registry: e, props: t }) {
|
|
|
3525
3528
|
baseId: w,
|
|
3526
3529
|
formats: p,
|
|
3527
3530
|
wording: b,
|
|
3528
|
-
pageSize:
|
|
3531
|
+
pageSize: F,
|
|
3529
3532
|
heldLines: ue,
|
|
3530
|
-
filler:
|
|
3531
|
-
}, pe =
|
|
3532
|
-
return /* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
3533
|
+
filler: ia(ue, ae, F, K)
|
|
3534
|
+
}, pe = la(Me, c, Ne);
|
|
3535
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
3536
|
+
/* @__PURE__ */ T(
|
|
3534
3537
|
"div",
|
|
3535
3538
|
{
|
|
3536
|
-
ref:
|
|
3539
|
+
ref: R?.scrollRef,
|
|
3537
3540
|
onScroll: (U) => {
|
|
3538
|
-
|
|
3541
|
+
R?.onScroll(), E && o && _o(U.currentTarget), (j.start || j.end) && yo(U.currentTarget), Ft(U.currentTarget, j);
|
|
3539
3542
|
},
|
|
3540
3543
|
onKeyDown: ge,
|
|
3541
3544
|
onAnimationEnd: (U) => U.target.removeAttribute("data-copied"),
|
|
3542
3545
|
className: h.scroll,
|
|
3543
3546
|
style: i ? { maxHeight: i } : void 0,
|
|
3544
3547
|
children: [
|
|
3545
|
-
/* @__PURE__ */ f(
|
|
3548
|
+
/* @__PURE__ */ f(Tn, { size: "sm", children: /* @__PURE__ */ T(
|
|
3546
3549
|
"table",
|
|
3547
3550
|
{
|
|
3548
3551
|
ref: g,
|
|
3549
|
-
role:
|
|
3550
|
-
"aria-readonly": d && !
|
|
3552
|
+
role: E || D ? "treegrid" : d ? "grid" : void 0,
|
|
3553
|
+
"aria-readonly": d && !P.some((U) => U.spec.edit !== void 0) ? !0 : void 0,
|
|
3551
3554
|
onKeyDown: W?.onKeyDown,
|
|
3552
3555
|
onFocus: W?.onFocus,
|
|
3553
3556
|
onClick: W?.onClick,
|
|
3554
3557
|
onBlur: W?.onBlur,
|
|
3555
|
-
"data-depth":
|
|
3556
|
-
style:
|
|
3558
|
+
"data-depth": E ? $.length : void 0,
|
|
3559
|
+
style: E ? { "--u-header-levels": $.length - 1 } : void 0,
|
|
3557
3560
|
"aria-label": u,
|
|
3558
|
-
"aria-rowcount":
|
|
3561
|
+
"aria-rowcount": R ? (M.lines ?? M.shown ?? M.filtered).length + 1 + (de ? 1 : 0) : void 0,
|
|
3559
3562
|
"aria-busy": c || void 0,
|
|
3560
3563
|
"data-stale": Ne || void 0,
|
|
3561
|
-
className:
|
|
3564
|
+
className: B(
|
|
3562
3565
|
h.table,
|
|
3563
3566
|
m === "compact" && h.compact,
|
|
3564
3567
|
o && h.sticky,
|
|
@@ -3566,45 +3569,45 @@ function ha({ registry: e, props: t }) {
|
|
|
3566
3569
|
d && h.grid
|
|
3567
3570
|
),
|
|
3568
3571
|
children: [
|
|
3569
|
-
/* @__PURE__ */ f(
|
|
3570
|
-
/* @__PURE__ */
|
|
3571
|
-
ee &&
|
|
3572
|
+
/* @__PURE__ */ f(aa, { registry: e, hook: A, layout: x, props: t, wording: b }),
|
|
3573
|
+
/* @__PURE__ */ T(Ve, { value: W ? { ...W.context, hook: A, wording: b } : null, children: [
|
|
3574
|
+
ee && na(Me, ee),
|
|
3572
3575
|
pe.body
|
|
3573
3576
|
] }),
|
|
3574
|
-
de && /* @__PURE__ */ f(
|
|
3577
|
+
de && /* @__PURE__ */ f(ca, { layout: x, gridMode: d, formats: p, wording: b })
|
|
3575
3578
|
]
|
|
3576
3579
|
}
|
|
3577
3580
|
) }),
|
|
3578
|
-
pe.empty && /* @__PURE__ */ f(
|
|
3579
|
-
/* @__PURE__ */ f(
|
|
3580
|
-
/* @__PURE__ */ f(
|
|
3581
|
+
pe.empty && /* @__PURE__ */ f(fa, { table: g }),
|
|
3582
|
+
/* @__PURE__ */ f(ha, { table: g, blocks: j }),
|
|
3583
|
+
/* @__PURE__ */ f(zl, { table: g }),
|
|
3581
3584
|
/* @__PURE__ */ f(
|
|
3582
|
-
|
|
3585
|
+
ua,
|
|
3583
3586
|
{
|
|
3584
3587
|
table: g,
|
|
3585
3588
|
blocks: ce,
|
|
3586
|
-
onSticking: (U) =>
|
|
3587
|
-
pinnedKeys:
|
|
3589
|
+
onSticking: (U) => k((ke) => ke.start === U.start && ke.end === U.end ? ke : U),
|
|
3590
|
+
pinnedKeys: P.filter((U) => Y[U.spec.id]).map((U) => U.key).join("|")
|
|
3588
3591
|
}
|
|
3589
3592
|
),
|
|
3590
3593
|
d && /* @__PURE__ */ f(
|
|
3591
|
-
|
|
3594
|
+
xl,
|
|
3592
3595
|
{
|
|
3593
3596
|
table: g,
|
|
3594
3597
|
grid: y,
|
|
3595
3598
|
lines: le,
|
|
3596
3599
|
ids: oe,
|
|
3597
|
-
editable:
|
|
3600
|
+
editable: P.some((U) => U.spec.edit !== void 0) ? W?.editable : void 0,
|
|
3598
3601
|
outside: W?.outside
|
|
3599
3602
|
}
|
|
3600
3603
|
)
|
|
3601
3604
|
]
|
|
3602
3605
|
}
|
|
3603
3606
|
),
|
|
3604
|
-
e.rowAdding && !e.showsToolbar() && /* @__PURE__ */ f("div", { className: h.newRowBar, children: /* @__PURE__ */ f(
|
|
3607
|
+
e.rowAdding && !e.showsToolbar() && /* @__PURE__ */ f("div", { className: h.newRowBar, children: /* @__PURE__ */ f(io, { registry: e }) })
|
|
3605
3608
|
] });
|
|
3606
3609
|
}
|
|
3607
|
-
function
|
|
3610
|
+
function pa(e) {
|
|
3608
3611
|
const t = typeof e.value == "string" ? e.value : void 0;
|
|
3609
3612
|
let n = e.id ?? t;
|
|
3610
3613
|
return n === void 0 && (X(`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.children !== void 0 && typeof e.children != "function" && X(`children:${n}`, `The children of the column "${n}" are not a function and are passed over.`), {
|
|
@@ -3633,7 +3636,7 @@ function ga(e) {
|
|
|
3633
3636
|
validate: e.validate
|
|
3634
3637
|
};
|
|
3635
3638
|
}
|
|
3636
|
-
function
|
|
3639
|
+
function Ge(e, t, n, o, r) {
|
|
3637
3640
|
Z(
|
|
3638
3641
|
() => () => {
|
|
3639
3642
|
n(), e.commit();
|
|
@@ -3644,25 +3647,25 @@ function Ke(e, t, n, o, r) {
|
|
|
3644
3647
|
o(), r && e.checkOrder(), e.commit();
|
|
3645
3648
|
});
|
|
3646
3649
|
}
|
|
3647
|
-
function
|
|
3650
|
+
function ma(e) {
|
|
3648
3651
|
function t(c) {
|
|
3649
|
-
const a = be(), u = _e(
|
|
3650
|
-
return e.registerColumn(a, d),
|
|
3652
|
+
const a = be(), u = _e(Rt), d = pa(c);
|
|
3653
|
+
return e.registerColumn(a, d), Ge(e, a, () => e.removeColumn(a), () => {
|
|
3651
3654
|
e.ensureColumn(a, d);
|
|
3652
|
-
}, !0),
|
|
3655
|
+
}, !0), Gt && u && u.registry !== e && X(
|
|
3653
3656
|
`foreign:${d.id}`,
|
|
3654
3657
|
`The column "${d.id}" comes from a different useTable call than the table it stands in. It reads the rows of its own hook.`
|
|
3655
3658
|
), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-column": a });
|
|
3656
3659
|
}
|
|
3657
3660
|
function n({ children: c }) {
|
|
3658
3661
|
const a = be();
|
|
3659
|
-
return e.registerDetail(a, c),
|
|
3662
|
+
return e.registerDetail(a, c), Ge(e, a, () => e.removeDetail(a), () => {
|
|
3660
3663
|
e.detail || e.registerDetail(a, c);
|
|
3661
3664
|
}, !1), null;
|
|
3662
3665
|
}
|
|
3663
3666
|
function o({ children: c, pin: a = !0 }) {
|
|
3664
3667
|
const u = be();
|
|
3665
|
-
return e.registerActionGroup(u, a),
|
|
3668
|
+
return e.registerActionGroup(u, a), Ge(e, u, () => e.removeActionGroup(u), () => {
|
|
3666
3669
|
e.registerActionGroup(u, a);
|
|
3667
3670
|
}, !1), /* @__PURE__ */ f(re, { children: c });
|
|
3668
3671
|
}
|
|
@@ -3673,7 +3676,7 @@ function pa(e) {
|
|
|
3673
3676
|
tone: c.tone ?? "default",
|
|
3674
3677
|
onSelect: c.onSelect
|
|
3675
3678
|
};
|
|
3676
|
-
return e.registerAction(a, u),
|
|
3679
|
+
return e.registerAction(a, u), Ge(e, a, () => e.removeAction(a), () => {
|
|
3677
3680
|
e.ensureAction(a, u);
|
|
3678
3681
|
}, !0), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-action": a });
|
|
3679
3682
|
}
|
|
@@ -3688,58 +3691,58 @@ function pa(e) {
|
|
|
3688
3691
|
group: c.group,
|
|
3689
3692
|
groupable: !0
|
|
3690
3693
|
};
|
|
3691
|
-
return e.registerGroupKey(a, b),
|
|
3694
|
+
return e.registerGroupKey(a, b), Ge(e, a, () => e.removeGroupKey(a), () => {
|
|
3692
3695
|
e.ensureGroupKey(a, b);
|
|
3693
3696
|
}, !0), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-groupkey": a });
|
|
3694
3697
|
}
|
|
3695
3698
|
function i(c) {
|
|
3696
3699
|
e.beginPass(), e.setStickyRowHeader(c.stickyRowHeader === !0), e.setTableGroupable(c.groupable !== !1), e.setRowAdding(c.grid === !0 && c.onRowAdd !== void 0), e.server && c.groupable === !0 && X("server-groupable", "`groupable` is passed over in server mode: the groups would be the page's, not the server's.");
|
|
3697
|
-
const a = q(null), [u, d] =
|
|
3700
|
+
const a = q(null), [u, d] = I(null);
|
|
3698
3701
|
Z(() => {
|
|
3699
3702
|
e.children = a.current, e.checkOrder(), e.commit();
|
|
3700
3703
|
});
|
|
3701
3704
|
const b = H(() => ({ registry: e, footerTarget: u }), [u]);
|
|
3702
|
-
return /* @__PURE__ */ f(
|
|
3705
|
+
return /* @__PURE__ */ f(Rt, { value: b, children: /* @__PURE__ */ T("div", { className: B(h.frame, c.className), children: [
|
|
3703
3706
|
/* @__PURE__ */ f("div", { ref: a, className: h.children, children: c.children }),
|
|
3704
|
-
/* @__PURE__ */ f(
|
|
3705
|
-
/* @__PURE__ */ f(
|
|
3707
|
+
/* @__PURE__ */ f(wa, { registry: e }),
|
|
3708
|
+
/* @__PURE__ */ f(ga, { registry: e, props: c }),
|
|
3706
3709
|
/* @__PURE__ */ f("div", { ref: d, className: h.footerTarget })
|
|
3707
3710
|
] }) });
|
|
3708
3711
|
}
|
|
3709
3712
|
const l = { Table: i, Column: t, RowDetail: n, RowActions: o, Action: r, GroupBy: s };
|
|
3710
|
-
return
|
|
3713
|
+
return Ii(i, e), l;
|
|
3711
3714
|
}
|
|
3712
|
-
function
|
|
3713
|
-
return st(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ f(
|
|
3715
|
+
function wa({ registry: e }) {
|
|
3716
|
+
return st(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ f(lo, { registry: e, own: !0 });
|
|
3714
3717
|
}
|
|
3715
|
-
const
|
|
3716
|
-
verdict:
|
|
3717
|
-
glyph:
|
|
3718
|
-
value:
|
|
3719
|
-
excess:
|
|
3720
|
-
},
|
|
3718
|
+
const ba = "_verdict_1mxfd_6", va = "_glyph_1mxfd_13", ya = "_value_1mxfd_23", _a = "_excess_1mxfd_28", Ze = {
|
|
3719
|
+
verdict: ba,
|
|
3720
|
+
glyph: va,
|
|
3721
|
+
value: ya,
|
|
3722
|
+
excess: _a
|
|
3723
|
+
}, xn = (e, t, n) => t === "percent" ? n.percent(e) : t === "count" ? n.count(e) : n.number(e, typeof t == "object" ? t.decimals : void 0), xa = (e, t) => e === "alarm" ? t.verdictAlarm : e === "warning" ? t.verdictWarning : e === "unknown" ? t.verdictUnknown : t.verdictOk, ka = {
|
|
3721
3724
|
ok: "✓",
|
|
3722
3725
|
unknown: "?",
|
|
3723
3726
|
warning: "▲",
|
|
3724
3727
|
alarm: "■"
|
|
3725
3728
|
};
|
|
3726
3729
|
function Sa({ reading: e, format: t }) {
|
|
3727
|
-
const n =
|
|
3728
|
-
return /* @__PURE__ */
|
|
3730
|
+
const n = xe(), o = ie(), { measured: r, assessment: s } = e, i = xa(s.verdict, o);
|
|
3731
|
+
return /* @__PURE__ */ T("span", { className: Ze.verdict, "data-verdict": s.verdict, title: i, children: [
|
|
3729
3732
|
/* @__PURE__ */ f("span", { "aria-hidden": "true", className: Ze.glyph, children: ka[s.verdict] }),
|
|
3730
|
-
/* @__PURE__ */ f("span", { className: Ze.value, children: r === null ? o.statAbsentValue :
|
|
3731
|
-
s.excess !== void 0 && /* @__PURE__ */
|
|
3733
|
+
/* @__PURE__ */ f("span", { className: Ze.value, children: r === null ? o.statAbsentValue : xn(r, t, n) }),
|
|
3734
|
+
s.excess !== void 0 && /* @__PURE__ */ T("span", { className: Ze.excess, children: [
|
|
3732
3735
|
"+",
|
|
3733
|
-
|
|
3736
|
+
xn(s.excess, t, n)
|
|
3734
3737
|
] }),
|
|
3735
|
-
/* @__PURE__ */ f(
|
|
3738
|
+
/* @__PURE__ */ f(Oe, { children: i })
|
|
3736
3739
|
] });
|
|
3737
3740
|
}
|
|
3738
|
-
const Ca = (e) => e.measured,
|
|
3741
|
+
const Ca = (e) => e.measured, Aa = (e) => e.reduce(
|
|
3739
3742
|
(t, n) => !t || _t(n.assessment.verdict) > _t(t.assessment.verdict) ? n : t,
|
|
3740
3743
|
void 0
|
|
3741
3744
|
);
|
|
3742
|
-
function
|
|
3745
|
+
function Na(e) {
|
|
3743
3746
|
return function({ id: n, value: o, label: r, limits: s, format: i, sortBy: l = "verdict", width: c, resizable: a, pin: u, aggregate: d }) {
|
|
3744
3747
|
const b = JSON.stringify(s), p = H(() => {
|
|
3745
3748
|
const w = JSON.parse(b);
|
|
@@ -3747,7 +3750,7 @@ function Aa(e) {
|
|
|
3747
3750
|
const v = typeof o == "string" ? g?.[o] : o(g);
|
|
3748
3751
|
return {
|
|
3749
3752
|
measured: typeof v == "number" && Number.isFinite(v) ? v : null,
|
|
3750
|
-
assessment:
|
|
3753
|
+
assessment: $o(v, w)
|
|
3751
3754
|
};
|
|
3752
3755
|
};
|
|
3753
3756
|
}, [o, b]), m = fe(
|
|
@@ -3766,23 +3769,23 @@ function Aa(e) {
|
|
|
3766
3769
|
value: p,
|
|
3767
3770
|
sortValue: m,
|
|
3768
3771
|
exportValue: Ca,
|
|
3769
|
-
aggregate: d === "worst" ?
|
|
3772
|
+
aggregate: d === "worst" ? Aa : void 0,
|
|
3770
3773
|
children: (w) => /* @__PURE__ */ f(Sa, { reading: w, format: i })
|
|
3771
3774
|
}
|
|
3772
3775
|
);
|
|
3773
3776
|
};
|
|
3774
3777
|
}
|
|
3775
|
-
const
|
|
3778
|
+
const Ta = [], Co = (e) => X(
|
|
3776
3779
|
`condition-foreign:${e}`,
|
|
3777
3780
|
`The condition for "${e}" is not of the kind of its filter and is passed over.`
|
|
3778
3781
|
);
|
|
3779
|
-
function
|
|
3780
|
-
const o = e.columnById(t), r = o ?
|
|
3782
|
+
function Ao(e, t, n) {
|
|
3783
|
+
const o = e.columnById(t), r = o ? Ee(o.spec.filter) : void 0;
|
|
3781
3784
|
if (!r) return !1;
|
|
3782
|
-
const s =
|
|
3785
|
+
const s = jn(r, n);
|
|
3783
3786
|
return s === "foreign" && Co(t), s === "effective";
|
|
3784
3787
|
}
|
|
3785
|
-
function
|
|
3788
|
+
function Ra(e, t, n) {
|
|
3786
3789
|
if (e.length === 0) return;
|
|
3787
3790
|
let o = -1, r = [];
|
|
3788
3791
|
return (s) => {
|
|
@@ -3795,8 +3798,8 @@ function ja(e, t, n) {
|
|
|
3795
3798
|
continue;
|
|
3796
3799
|
}
|
|
3797
3800
|
const a = t.columnById(i);
|
|
3798
|
-
a &&
|
|
3799
|
-
const d =
|
|
3801
|
+
a && Ao(t, i, l) && r.push((u) => {
|
|
3802
|
+
const d = Ee(a.spec.filter);
|
|
3800
3803
|
return !d || Ci(d, a.read(u), l);
|
|
3801
3804
|
});
|
|
3802
3805
|
}
|
|
@@ -3804,25 +3807,25 @@ function ja(e, t, n) {
|
|
|
3804
3807
|
return r.every((i) => i(s));
|
|
3805
3808
|
};
|
|
3806
3809
|
}
|
|
3807
|
-
function
|
|
3808
|
-
const [t, n] =
|
|
3810
|
+
function Oa(e) {
|
|
3811
|
+
const [t, n] = I({ fn: e });
|
|
3809
3812
|
return ot(t.fn, e) ? t.fn : (n({ fn: e }), e);
|
|
3810
3813
|
}
|
|
3811
|
-
function
|
|
3812
|
-
const n = H(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] =
|
|
3814
|
+
function Ea(e, t) {
|
|
3815
|
+
const n = H(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = I(n);
|
|
3813
3816
|
if (!t) return e;
|
|
3814
3817
|
const s = o === n || o.length === n.length && o.every((i, l) => i === n[l]);
|
|
3815
3818
|
return s || r(n), s ? o : n;
|
|
3816
3819
|
}
|
|
3817
|
-
const et = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e],
|
|
3818
|
-
function
|
|
3820
|
+
const et = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], Ma = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
|
|
3821
|
+
function kn(e) {
|
|
3819
3822
|
const t = [], n = (o) => {
|
|
3820
3823
|
for (const r of o)
|
|
3821
3824
|
t.push(r.path), n(r.groups);
|
|
3822
3825
|
};
|
|
3823
3826
|
return n(e ?? []), t;
|
|
3824
3827
|
}
|
|
3825
|
-
function
|
|
3828
|
+
function La(e, t, n) {
|
|
3826
3829
|
const o = [], r = (s, i) => {
|
|
3827
3830
|
if (!(i >= n))
|
|
3828
3831
|
for (const l of s) {
|
|
@@ -3832,60 +3835,60 @@ function Ea(e, t, n) {
|
|
|
3832
3835
|
};
|
|
3833
3836
|
return r(e, 0), o;
|
|
3834
3837
|
}
|
|
3835
|
-
const
|
|
3836
|
-
function
|
|
3837
|
-
return { ...
|
|
3838
|
+
const Sn = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
|
|
3839
|
+
function Fa(e, t) {
|
|
3840
|
+
return { ...Ct(e), ...t };
|
|
3838
3841
|
}
|
|
3839
|
-
function
|
|
3840
|
-
const [n] =
|
|
3841
|
-
const N =
|
|
3842
|
-
return { ...N, VerdictColumn:
|
|
3842
|
+
function $a(e, t) {
|
|
3843
|
+
const [n] = I(() => new Vi()), [o] = I(() => {
|
|
3844
|
+
const N = ma(n);
|
|
3845
|
+
return { ...N, VerdictColumn: Na(N.Column) };
|
|
3843
3846
|
});
|
|
3844
3847
|
st(n.subscribe, n.structureVersion, n.structureVersion);
|
|
3845
|
-
const r =
|
|
3848
|
+
const r = xe(), s = ie(), i = e, l = n.modelColumns(i, r), [c] = I(() => t.initialView), a = t.server === !0, u = t.server ? t.rowCount : 0, d = H(() => a ? { rowCount: u } : void 0, [a, u]);
|
|
3846
3849
|
n.setServer(a), a && (t.preFilter && X("server-prefilter", "`preFilter` is passed over in server mode: the server decides which rows the table has."), t.virtual && X("server-virtual", "`virtual` is passed over in server mode: the table pages instead."), (t.defaultGrouping !== void 0 || c?.grouping?.length) && X("server-grouping", "A grouping is passed over in server mode: the groups would be the page's, not the server's."));
|
|
3847
|
-
const [b, p] =
|
|
3850
|
+
const [b, p] = I(() => Object.entries(c?.conditions ?? {})), m = t.rowFilters ?? Ta, w = m.map((N) => N.id).join("\0"), g = H(
|
|
3848
3851
|
() => new Map(m.map((N) => [N.id, N])),
|
|
3849
3852
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the filters by their ids; they are defined outside the component
|
|
3850
3853
|
[w]
|
|
3851
3854
|
);
|
|
3852
3855
|
for (const N of m)
|
|
3853
3856
|
n.columnById(N.id) && X(`row-filter-column:${N.id}`, `The row filter "${N.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.`);
|
|
3854
|
-
const v = H(() =>
|
|
3857
|
+
const v = H(() => Ra(b, n, g), [b, n, g]), C = t.preFilter, y = Ea(i, a ? void 0 : C), [_, k] = I(
|
|
3855
3858
|
() => c?.grouping ? [...c.grouping] : et(t.defaultGrouping)
|
|
3856
|
-
), [
|
|
3857
|
-
n.setTree(
|
|
3858
|
-
const
|
|
3859
|
+
), [S, A] = I(() => c?.folded ?? []), [L, x] = I(() => c?.pinned ? { ...c.pinned } : null), O = Oa(t.rowKey), M = t.server ? void 0 : t.childRows, R = M !== void 0;
|
|
3860
|
+
n.setTree(R);
|
|
3861
|
+
const E = q({ children: M, key: O });
|
|
3859
3862
|
Z(() => {
|
|
3860
|
-
|
|
3863
|
+
E.current = { children: M, key: O };
|
|
3861
3864
|
});
|
|
3862
|
-
const [D] =
|
|
3863
|
-
key: (N) =>
|
|
3864
|
-
children: (N) =>
|
|
3865
|
+
const [D] = I(() => ({
|
|
3866
|
+
key: (N) => E.current.key(N),
|
|
3867
|
+
children: (N) => E.current.children?.(N),
|
|
3865
3868
|
label: () => ""
|
|
3866
|
-
})), [
|
|
3869
|
+
})), [$] = I(() => {
|
|
3867
3870
|
const N = t.server ? void 0 : t.defaultBranches;
|
|
3868
|
-
return !
|
|
3869
|
-
}), [
|
|
3871
|
+
return !R || N === void 0 ? [] : typeof N == "number" ? La(i, D, N) : [...N];
|
|
3872
|
+
}), [P, K] = I(() => c?.branches ?? $), Y = H(() => R ? new Set(zo(i, D)) : /* @__PURE__ */ new Set(), [R, i, D]), ce = R ? P.filter((N) => Y.has(N)) : [];
|
|
3870
3873
|
H(() => {
|
|
3871
|
-
if (!
|
|
3872
|
-
const N =
|
|
3874
|
+
if (!R) return;
|
|
3875
|
+
const N = Ko(i, D);
|
|
3873
3876
|
N !== null && X(`tree-duplicate:${N}`, `The row key "${N}" occurs twice in the tree: its fold and its selection would act on both rows.`);
|
|
3874
|
-
}, [
|
|
3875
|
-
const
|
|
3877
|
+
}, [R, i, D]), R && (t.defaultGrouping !== void 0 || c?.grouping?.length) && X("tree-grouping", "A grouping is passed over with `childRows`: tree rows and grouping both build levels.");
|
|
3878
|
+
const j = n.orderedColumns().length + n.groupKeys.entries.size > 0, ne = a || R ? [] : j ? n.effectiveGrouping(_, i) : _.slice(0, Kt), de = ne.join("|"), le = H(() => new Set(S), [S]), ee = ne.length ? n.groupingModel(ne, i) : null, oe = H(
|
|
3876
3879
|
() => ee && ee.levels.length ? { ...ee, folded: le, compareText: r.compareText } : void 0,
|
|
3877
3880
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
|
|
3878
3881
|
[ee, le, r.compareText, de]
|
|
3879
3882
|
), W = ce.join("\0"), ge = H(
|
|
3880
|
-
() =>
|
|
3883
|
+
() => R ? { key: O, children: D.children, open: new Set(ce), admit: C } : void 0,
|
|
3881
3884
|
/* ponytail: the pre-filter is read through the roots it admits - a new
|
|
3882
3885
|
pre-filter that only drops children takes hold with the next change of
|
|
3883
3886
|
rows or branches. Compare its admitted children, as useAdmitted does
|
|
3884
3887
|
the roots, if a caller needs that live. */
|
|
3885
3888
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- the open keys by value; the rows the pre-filter admits stand for it
|
|
3886
|
-
[
|
|
3887
|
-
),
|
|
3888
|
-
rowKey:
|
|
3889
|
+
[R, W, y, D]
|
|
3890
|
+
), F = Qo(y, l, {
|
|
3891
|
+
rowKey: O,
|
|
3889
3892
|
pageSize: t.pageSize,
|
|
3890
3893
|
defaultSort: t.defaultSort,
|
|
3891
3894
|
filter: v,
|
|
@@ -3894,156 +3897,156 @@ function Pa(e, t) {
|
|
|
3894
3897
|
grouping: oe,
|
|
3895
3898
|
server: d,
|
|
3896
3899
|
tree: ge
|
|
3897
|
-
}), { setPage: ae } =
|
|
3898
|
-
(N,
|
|
3899
|
-
const
|
|
3900
|
-
let
|
|
3901
|
-
const on = g.has(
|
|
3900
|
+
}), { setPage: ae } = F, Ae = fe(
|
|
3901
|
+
(N, z) => {
|
|
3902
|
+
const G = typeof N == "string" ? N : N.id;
|
|
3903
|
+
let ze = z == null;
|
|
3904
|
+
const on = g.has(G);
|
|
3902
3905
|
if (typeof N != "string" && !on) {
|
|
3903
3906
|
X(
|
|
3904
|
-
`row-filter-unknown:${
|
|
3905
|
-
`The row filter "${
|
|
3907
|
+
`row-filter-unknown:${G}`,
|
|
3908
|
+
`The row filter "${G}" is not among the table's \`rowFilters\`; its condition is passed over.`
|
|
3906
3909
|
);
|
|
3907
3910
|
return;
|
|
3908
3911
|
}
|
|
3909
|
-
if (
|
|
3910
|
-
const ve = n.columnById(
|
|
3911
|
-
if (!
|
|
3912
|
+
if (!ze && !on && n.orderedColumns().length > 0) {
|
|
3913
|
+
const ve = n.columnById(G), Te = ve ? Ee(ve.spec.filter) : void 0;
|
|
3914
|
+
if (!Te) {
|
|
3912
3915
|
X(
|
|
3913
|
-
`condition-without-filter:${
|
|
3914
|
-
ve ? `The column "${
|
|
3916
|
+
`condition-without-filter:${G}`,
|
|
3917
|
+
ve ? `The column "${G}" has no filter; its condition is passed over.` : `No column is called "${G}"; its condition is passed over.`
|
|
3915
3918
|
);
|
|
3916
3919
|
return;
|
|
3917
3920
|
}
|
|
3918
|
-
const
|
|
3919
|
-
if (
|
|
3920
|
-
Co(
|
|
3921
|
+
const Re = jn(Te, z);
|
|
3922
|
+
if (Re === "foreign") {
|
|
3923
|
+
Co(G);
|
|
3921
3924
|
return;
|
|
3922
3925
|
}
|
|
3923
|
-
|
|
3926
|
+
ze = Re === "empty";
|
|
3924
3927
|
}
|
|
3925
3928
|
p((ve) => {
|
|
3926
|
-
const
|
|
3927
|
-
return
|
|
3929
|
+
const Te = ve.findIndex(([Re]) => Re === G);
|
|
3930
|
+
return ze ? Te === -1 ? ve : ve.filter((Re, gt) => gt !== Te) : Te === -1 ? [...ve, [G, z]] : ve.map((Re, gt) => gt === Te ? [G, z] : Re);
|
|
3928
3931
|
}), ae(1);
|
|
3929
3932
|
},
|
|
3930
3933
|
[n, ae, g]
|
|
3931
|
-
), ue = new Set(n.orderedColumns().map((N) => N.spec.id)), [Ne,
|
|
3932
|
-
if (!
|
|
3933
|
-
const N = new Set([...Ne].filter((
|
|
3934
|
-
|
|
3935
|
-
const
|
|
3936
|
-
b.some(([
|
|
3934
|
+
), ue = new Set(n.orderedColumns().map((N) => N.spec.id)), [Ne, Me] = I(() => /* @__PURE__ */ new Set());
|
|
3935
|
+
if (!Sn(Ne, ue)) {
|
|
3936
|
+
const N = new Set([...Ne].filter((G) => !ue.has(G)));
|
|
3937
|
+
Me(ue);
|
|
3938
|
+
const z = (G) => N.has(G) && !g.has(G);
|
|
3939
|
+
b.some(([G]) => z(G)) && p((G) => G.filter(([ze]) => !z(ze)));
|
|
3937
3940
|
}
|
|
3938
|
-
const pe = ue.size === 0 ? b : b.filter(([N,
|
|
3939
|
-
...
|
|
3940
|
-
...
|
|
3941
|
-
...
|
|
3941
|
+
const pe = ue.size === 0 ? b : b.filter(([N, z]) => g.has(N) || Ao(n, N, z)), U = cr(F.view, ue), ke = pe.length > 0 ? { ...U, conditions: Object.fromEntries(pe) } : U, Le = ue.size === 0 ? F.sort : F.sort.filter((N) => ue.has(N.column)), Ie = a || R ? [] : j ? n.effectiveGrouping(et(t.defaultGrouping), i) : et(t.defaultGrouping), Fe = F.groups ? Ho(F.groups, S) : j ? [] : [...S], Je = n.declaredPins(), V = or(L, Je, ue), J = {
|
|
3942
|
+
...ke,
|
|
3943
|
+
...Ma(ne, Ie) ? {} : { grouping: ne },
|
|
3944
|
+
...Fe.length ? { folded: Fe } : {},
|
|
3942
3945
|
...V ? { pinned: V } : {},
|
|
3943
|
-
...
|
|
3944
|
-
}, te = (N,
|
|
3945
|
-
|
|
3946
|
-
},
|
|
3947
|
-
|
|
3948
|
-
},
|
|
3949
|
-
|
|
3950
|
-
}, Jt = !a && !!t.virtual, ut = !
|
|
3951
|
-
|
|
3946
|
+
...R && !Sn(new Set(ce), new Set($.filter((N) => Y.has(N)))) ? { branches: ce } : {}
|
|
3947
|
+
}, te = (N, z) => x((G) => tr(G ?? n.declaredPins(), N, z)), [me, we] = I(0), No = (N) => {
|
|
3948
|
+
F.restart(N), p(Object.entries(N.conditions ?? {})), k(N.grouping ? [...N.grouping] : et(t.defaultGrouping)), A(N.folded ?? []), x(N.pinned ? { ...N.pinned } : null), K(N.branches ?? $), we((z) => z + 1);
|
|
3949
|
+
}, To = (N) => {
|
|
3950
|
+
k([...N]), ae(1);
|
|
3951
|
+
}, Ro = (N) => {
|
|
3952
|
+
kn(F.groups).includes(N) && (n.noteFocusBeforeFold(), A((z) => z.includes(N) ? z.filter((G) => G !== N) : [...z, N]));
|
|
3953
|
+
}, Jt = !a && !!t.virtual, ut = !R && n.paginates() || Jt, ft = t.selection ?? F.selection, Xe = ar(J), Xt = q(Xe), Qt = q(0);
|
|
3954
|
+
Ce(() => {
|
|
3952
3955
|
const N = Qt.current !== me;
|
|
3953
3956
|
Qt.current = me, Xt.current !== Xe && (Xt.current = Xe, N || t.onViewChange?.(J));
|
|
3954
3957
|
}, [Xe, me]);
|
|
3955
3958
|
const Zt = {
|
|
3956
|
-
search:
|
|
3959
|
+
search: F.search,
|
|
3957
3960
|
conditions: Object.fromEntries(pe),
|
|
3958
|
-
sort:
|
|
3959
|
-
page:
|
|
3960
|
-
pageSize:
|
|
3961
|
-
}, ht = a ?
|
|
3962
|
-
|
|
3961
|
+
sort: Le,
|
|
3962
|
+
page: F.page,
|
|
3963
|
+
pageSize: F.pageSize
|
|
3964
|
+
}, ht = a ? lr(Zt) : "", en = q(null);
|
|
3965
|
+
Ce(() => {
|
|
3963
3966
|
!a || en.current === ht || (en.current = ht, t.onRequest?.(Zt));
|
|
3964
3967
|
}, [ht]);
|
|
3965
|
-
const [
|
|
3968
|
+
const [$e] = I(() => /* @__PURE__ */ new Map());
|
|
3966
3969
|
let tn;
|
|
3967
3970
|
if (a) {
|
|
3968
3971
|
const N = /* @__PURE__ */ new Set();
|
|
3969
|
-
for (const
|
|
3970
|
-
const
|
|
3971
|
-
N.add(
|
|
3972
|
+
for (const z of i) {
|
|
3973
|
+
const G = O(z);
|
|
3974
|
+
N.add(G), $e.set(G, z);
|
|
3972
3975
|
}
|
|
3973
|
-
for (const
|
|
3974
|
-
!N.has(
|
|
3975
|
-
tn = [...ft.selected].filter((
|
|
3976
|
+
for (const z of [...$e.keys()])
|
|
3977
|
+
!N.has(z) && !ft.isSelected(z) && $e.delete(z);
|
|
3978
|
+
tn = [...ft.selected].filter((z) => $e.has(z)).map((z) => $e.get(z));
|
|
3976
3979
|
}
|
|
3977
3980
|
const nn = {
|
|
3978
3981
|
rows: e,
|
|
3979
|
-
filtered:
|
|
3980
|
-
visible: ut ||
|
|
3981
|
-
page: ut ?
|
|
3982
|
-
pageCount: ut ?
|
|
3983
|
-
pageSize:
|
|
3984
|
-
setPage:
|
|
3985
|
-
setPageSize:
|
|
3986
|
-
search:
|
|
3987
|
-
setSearch:
|
|
3988
|
-
sort:
|
|
3989
|
-
toggleSort:
|
|
3990
|
-
hidden:
|
|
3991
|
-
toggleColumn:
|
|
3992
|
-
order:
|
|
3993
|
-
setOrder:
|
|
3994
|
-
pinned:
|
|
3982
|
+
filtered: F.filtered,
|
|
3983
|
+
visible: ut || R ? F.visible : F.filtered,
|
|
3984
|
+
page: ut ? F.page : 1,
|
|
3985
|
+
pageCount: ut ? F.pageCount : 1,
|
|
3986
|
+
pageSize: F.pageSize,
|
|
3987
|
+
setPage: F.setPage,
|
|
3988
|
+
setPageSize: F.setPageSize,
|
|
3989
|
+
search: F.search,
|
|
3990
|
+
setSearch: F.setSearch,
|
|
3991
|
+
sort: Le,
|
|
3992
|
+
toggleSort: F.toggleSort,
|
|
3993
|
+
hidden: F.hidden,
|
|
3994
|
+
toggleColumn: F.toggleColumn,
|
|
3995
|
+
order: F.order,
|
|
3996
|
+
setOrder: F.setOrder,
|
|
3997
|
+
pinned: L ?? Je,
|
|
3995
3998
|
setPin: te,
|
|
3996
|
-
widths:
|
|
3997
|
-
setWidth:
|
|
3998
|
-
expanded:
|
|
3999
|
-
toggleRow:
|
|
3999
|
+
widths: Fa(l, F.widths),
|
|
4000
|
+
setWidth: F.setWidth,
|
|
4001
|
+
expanded: F.expanded,
|
|
4002
|
+
toggleRow: F.toggleRow,
|
|
4000
4003
|
filter: Object.fromEntries(pe),
|
|
4001
4004
|
setFilter: Ae,
|
|
4002
|
-
conditionOf: (N) => pe.find(([
|
|
4005
|
+
conditionOf: (N) => pe.find(([z]) => z === N.id)?.[1] ?? null,
|
|
4003
4006
|
selection: ft,
|
|
4004
4007
|
view: J,
|
|
4005
4008
|
grouping: ne,
|
|
4006
|
-
setGrouping:
|
|
4007
|
-
setView:
|
|
4008
|
-
folded:
|
|
4009
|
-
toggleFold:
|
|
4009
|
+
setGrouping: To,
|
|
4010
|
+
setView: No,
|
|
4011
|
+
folded: Fe,
|
|
4012
|
+
toggleFold: Ro,
|
|
4010
4013
|
foldAll: () => {
|
|
4011
|
-
n.noteFocusBeforeFold(), A(
|
|
4014
|
+
n.noteFocusBeforeFold(), A(kn(F.groups));
|
|
4012
4015
|
},
|
|
4013
4016
|
unfoldAll: () => {
|
|
4014
4017
|
n.noteFocusBeforeFold(), A([]);
|
|
4015
4018
|
},
|
|
4016
4019
|
branches: ce,
|
|
4017
4020
|
toggleBranch: (N) => {
|
|
4018
|
-
Y.has(N) &&
|
|
4021
|
+
Y.has(N) && K((z) => z.includes(N) ? z.filter((G) => G !== N) : [...z, N]);
|
|
4019
4022
|
},
|
|
4020
|
-
unfoldAllBranches: () =>
|
|
4021
|
-
foldAllBranches: () =>
|
|
4022
|
-
asCsv: () =>
|
|
4023
|
-
selectionAsText: () =>
|
|
4023
|
+
unfoldAllBranches: () => K([...Y]),
|
|
4024
|
+
foldAllBranches: () => K([]),
|
|
4025
|
+
asCsv: () => Hi(n, s.levelColumn, r, s),
|
|
4026
|
+
selectionAsText: () => no(n, r, s),
|
|
4024
4027
|
virtual: Jt,
|
|
4025
|
-
rowCount: a ? u :
|
|
4028
|
+
rowCount: a ? u : F.filtered.length,
|
|
4026
4029
|
server: a
|
|
4027
4030
|
};
|
|
4028
4031
|
return n.setHook({
|
|
4029
4032
|
rows: i,
|
|
4030
4033
|
admitted: y,
|
|
4031
4034
|
modelColumns: l,
|
|
4032
|
-
tableState:
|
|
4035
|
+
tableState: F,
|
|
4033
4036
|
filter: v,
|
|
4034
4037
|
grouping: oe,
|
|
4035
4038
|
tree: ge,
|
|
4036
4039
|
folded: le,
|
|
4037
4040
|
publicSnapshot: nn,
|
|
4038
|
-
rowKey:
|
|
4041
|
+
rowKey: O,
|
|
4039
4042
|
formats: r,
|
|
4040
|
-
pins:
|
|
4043
|
+
pins: L,
|
|
4041
4044
|
filterOptions: a ? t.filterOptions : void 0,
|
|
4042
4045
|
selectedRows: tn,
|
|
4043
4046
|
rowFilters: g
|
|
4044
4047
|
}), { ...nn, ...o };
|
|
4045
4048
|
}
|
|
4046
|
-
function
|
|
4049
|
+
function za(e) {
|
|
4047
4050
|
return e;
|
|
4048
4051
|
}
|
|
4049
4052
|
function Ut(e, t) {
|
|
@@ -4055,22 +4058,22 @@ function Ut(e, t) {
|
|
|
4055
4058
|
};
|
|
4056
4059
|
}, [e, t, n]);
|
|
4057
4060
|
}
|
|
4058
|
-
function
|
|
4061
|
+
function Ka({ children: e, className: t, size: n = "sm", of: o }) {
|
|
4059
4062
|
const r = Ye(o);
|
|
4060
4063
|
Ut(r?.registry, "toolbar");
|
|
4061
4064
|
const s = r?.registry;
|
|
4062
|
-
return /* @__PURE__ */ f(
|
|
4065
|
+
return /* @__PURE__ */ f(lo, { registry: s ?? null, className: t, size: n, children: e });
|
|
4063
4066
|
}
|
|
4064
|
-
function
|
|
4067
|
+
function Ga({ placeholder: e, "aria-label": t, className: n, size: o, grow: r, of: s }) {
|
|
4065
4068
|
const i = Ye(s), l = at(o), c = ie();
|
|
4066
4069
|
if (Ut(i?.registry, "search"), !i) return null;
|
|
4067
4070
|
const { snapshot: a } = i;
|
|
4068
4071
|
return /* @__PURE__ */ f(
|
|
4069
|
-
|
|
4072
|
+
On,
|
|
4070
4073
|
{
|
|
4071
4074
|
size: l,
|
|
4072
4075
|
type: "search",
|
|
4073
|
-
className:
|
|
4076
|
+
className: B(r && h.searchGrow, n),
|
|
4074
4077
|
value: a.search,
|
|
4075
4078
|
onChange: (u) => a.setSearch(u.target.value),
|
|
4076
4079
|
clearable: !0,
|
|
@@ -4080,40 +4083,40 @@ function za({ placeholder: e, "aria-label": t, className: n, size: o, grow: r, o
|
|
|
4080
4083
|
}
|
|
4081
4084
|
);
|
|
4082
4085
|
}
|
|
4083
|
-
function
|
|
4084
|
-
const n = Ye(t), o = at(e), r = ie(), [s, i] =
|
|
4086
|
+
function ja({ size: e, of: t }) {
|
|
4087
|
+
const n = Ye(t), o = at(e), r = ie(), [s, i] = I(!1), l = q(null), c = q(null), a = be(), [u, d] = I(null);
|
|
4085
4088
|
if (Z(() => {
|
|
4086
4089
|
if (!u || !c.current) return;
|
|
4087
4090
|
const _ = Array.from(c.current.children).find(
|
|
4088
4091
|
(A) => A.dataset.column === u.id
|
|
4089
|
-
),
|
|
4090
|
-
(
|
|
4092
|
+
), k = _?.querySelector(u.key), S = u.otherwise ? _?.querySelector(u.otherwise) : void 0;
|
|
4093
|
+
(k && !k.disabled ? k : S)?.focus();
|
|
4091
4094
|
}, [u]), !n) return null;
|
|
4092
|
-
const { registry: b, snapshot: p } = n, m = b.hook, w = b.inPinOrder(Dn(b.modelColumns(m.rows, m.formats), p.order)), g = b.pins(), v = (_,
|
|
4093
|
-
const
|
|
4094
|
-
return
|
|
4095
|
-
},
|
|
4096
|
-
const
|
|
4097
|
-
if (!v(_,
|
|
4098
|
-
[
|
|
4099
|
-
const [
|
|
4100
|
-
d({ id: w[_].id, key: `[data-direction="${
|
|
4101
|
-
}, y = (_,
|
|
4102
|
-
const A = g[_] ===
|
|
4103
|
-
return /* @__PURE__ */ f(tt, { content: A ? r.unpinHint :
|
|
4095
|
+
const { registry: b, snapshot: p } = n, m = b.hook, w = b.inPinOrder(Dn(b.modelColumns(m.rows, m.formats), p.order)), g = b.pins(), v = (_, k) => {
|
|
4096
|
+
const S = w[_ + k];
|
|
4097
|
+
return S !== void 0 && g[S.id] === g[w[_].id];
|
|
4098
|
+
}, C = (_, k) => {
|
|
4099
|
+
const S = w.map((O) => O.id), A = _ + k;
|
|
4100
|
+
if (!v(_, k)) return;
|
|
4101
|
+
[S[_], S[A]] = [S[A], S[_]], p.setOrder(S);
|
|
4102
|
+
const [L, x] = k < 0 ? ["forward", "backward"] : ["backward", "forward"];
|
|
4103
|
+
d({ id: w[_].id, key: `[data-direction="${L}"]`, otherwise: `[data-direction="${x}"]` });
|
|
4104
|
+
}, y = (_, k, S) => {
|
|
4105
|
+
const A = g[_] === S;
|
|
4106
|
+
return /* @__PURE__ */ f(tt, { content: A ? r.unpinHint : S === "start" ? r.pinToStartHint : r.pinToEndHint, children: /* @__PURE__ */ f(
|
|
4104
4107
|
"button",
|
|
4105
4108
|
{
|
|
4106
4109
|
type: "button",
|
|
4107
|
-
className:
|
|
4108
|
-
"data-pin":
|
|
4109
|
-
"aria-label": A ? r.unpinColumn(
|
|
4110
|
+
className: B(h.move, A && h.pinOn),
|
|
4111
|
+
"data-pin": S,
|
|
4112
|
+
"aria-label": A ? r.unpinColumn(k) : S === "start" ? r.pinColumnToStart(k) : r.pinColumnToEnd(k),
|
|
4110
4113
|
onClick: () => {
|
|
4111
|
-
p.setPin(_, A ? null :
|
|
4114
|
+
p.setPin(_, A ? null : S), d({ id: _, key: `[data-pin="${S}"]` });
|
|
4112
4115
|
},
|
|
4113
4116
|
children: /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ f(
|
|
4114
4117
|
"path",
|
|
4115
4118
|
{
|
|
4116
|
-
d:
|
|
4119
|
+
d: S === "start" ? "M2 1.5v7M8.5 5H4.5M6 3.5 4.5 5 6 6.5" : "M8 1.5v7M1.5 5h4M4 3.5 5.5 5 4 6.5",
|
|
4117
4120
|
fill: "none",
|
|
4118
4121
|
stroke: "currentColor",
|
|
4119
4122
|
strokeWidth: "1.4",
|
|
@@ -4124,7 +4127,7 @@ function Ka({ size: e, of: t }) {
|
|
|
4124
4127
|
}
|
|
4125
4128
|
) });
|
|
4126
4129
|
};
|
|
4127
|
-
return /* @__PURE__ */
|
|
4130
|
+
return /* @__PURE__ */ T(re, { children: [
|
|
4128
4131
|
/* @__PURE__ */ f(
|
|
4129
4132
|
Q,
|
|
4130
4133
|
{
|
|
@@ -4137,7 +4140,7 @@ function Ka({ size: e, of: t }) {
|
|
|
4137
4140
|
children: r.columns
|
|
4138
4141
|
}
|
|
4139
4142
|
),
|
|
4140
|
-
/* @__PURE__ */
|
|
4143
|
+
/* @__PURE__ */ T(
|
|
4141
4144
|
it,
|
|
4142
4145
|
{
|
|
4143
4146
|
open: s,
|
|
@@ -4149,13 +4152,13 @@ function Ka({ size: e, of: t }) {
|
|
|
4149
4152
|
id: a,
|
|
4150
4153
|
className: h.columnsPanel,
|
|
4151
4154
|
children: [
|
|
4152
|
-
/* @__PURE__ */ f("ul", { ref: c, className: h.columnsList, "aria-label": r.arrangeColumns, children: w.map((_,
|
|
4153
|
-
const
|
|
4154
|
-
return /* @__PURE__ */
|
|
4155
|
+
/* @__PURE__ */ f("ul", { ref: c, className: h.columnsList, "aria-label": r.arrangeColumns, children: w.map((_, k) => {
|
|
4156
|
+
const S = _.label ?? _.id;
|
|
4157
|
+
return /* @__PURE__ */ T("li", { className: h.columnsEntry, "data-column": _.id, children: [
|
|
4155
4158
|
/* @__PURE__ */ f(
|
|
4156
4159
|
We,
|
|
4157
4160
|
{
|
|
4158
|
-
label:
|
|
4161
|
+
label: S,
|
|
4159
4162
|
checked: !p.hidden.includes(_.id),
|
|
4160
4163
|
disabled: _.hideable === !1,
|
|
4161
4164
|
onChange: () => p.toggleColumn(_.id)
|
|
@@ -4167,9 +4170,9 @@ function Ka({ size: e, of: t }) {
|
|
|
4167
4170
|
type: "button",
|
|
4168
4171
|
className: h.move,
|
|
4169
4172
|
"data-direction": "forward",
|
|
4170
|
-
"aria-label": r.columnForward(
|
|
4171
|
-
disabled: !v(
|
|
4172
|
-
onClick: () =>
|
|
4173
|
+
"aria-label": r.columnForward(S),
|
|
4174
|
+
disabled: !v(k, -1),
|
|
4175
|
+
onClick: () => C(k, -1),
|
|
4173
4176
|
children: /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2 6.5 5 3.5l3 3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
4174
4177
|
}
|
|
4175
4178
|
) }),
|
|
@@ -4179,24 +4182,24 @@ function Ka({ size: e, of: t }) {
|
|
|
4179
4182
|
type: "button",
|
|
4180
4183
|
className: h.move,
|
|
4181
4184
|
"data-direction": "backward",
|
|
4182
|
-
"aria-label": r.columnBackward(
|
|
4183
|
-
disabled: !v(
|
|
4184
|
-
onClick: () =>
|
|
4185
|
+
"aria-label": r.columnBackward(S),
|
|
4186
|
+
disabled: !v(k, 1),
|
|
4187
|
+
onClick: () => C(k, 1),
|
|
4185
4188
|
children: /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2 3.5 5 6.5l3-3", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
4186
4189
|
}
|
|
4187
4190
|
) }),
|
|
4188
|
-
y(_.id,
|
|
4189
|
-
y(_.id,
|
|
4191
|
+
y(_.id, S, "start"),
|
|
4192
|
+
y(_.id, S, "end")
|
|
4190
4193
|
] }, _.id);
|
|
4191
4194
|
}) }),
|
|
4192
|
-
/* @__PURE__ */ f(
|
|
4193
|
-
/* @__PURE__ */ f(
|
|
4195
|
+
/* @__PURE__ */ f(Xi, { registry: b, hook: m }),
|
|
4196
|
+
/* @__PURE__ */ f(Qi, { registry: b, hook: m })
|
|
4194
4197
|
]
|
|
4195
4198
|
}
|
|
4196
4199
|
)
|
|
4197
4200
|
] });
|
|
4198
4201
|
}
|
|
4199
|
-
function
|
|
4202
|
+
function Ha({ filename: e, onExport: t, size: n, of: o }) {
|
|
4200
4203
|
const r = Ye(o), s = at(n), i = ie();
|
|
4201
4204
|
if (!r) return null;
|
|
4202
4205
|
const { snapshot: l } = r;
|
|
@@ -4210,16 +4213,16 @@ function Ga({ filename: e, onExport: t, size: n, of: o }) {
|
|
|
4210
4213
|
d.href = u, d.download = e ?? i.exportFileName, d.click(), setTimeout(() => URL.revokeObjectURL(u), 1e4);
|
|
4211
4214
|
}, children: l.server ? i.exportPageLabel : i.exportLabel });
|
|
4212
4215
|
}
|
|
4213
|
-
function
|
|
4214
|
-
const o = Ye(n), r = ie(), s =
|
|
4216
|
+
function Wa({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
|
|
4217
|
+
const o = Ye(n), r = ie(), s = xe();
|
|
4215
4218
|
if (Ut(o?.registry, "pagination"), o?.registry.tree && X("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;
|
|
4216
|
-
const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((u, d) => u - d), a = /* @__PURE__ */
|
|
4219
|
+
const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((u, d) => u - d), a = /* @__PURE__ */ T("nav", { "aria-label": r.pagination, className: B(h.pagination, t), children: [
|
|
4217
4220
|
/* @__PURE__ */ f("span", { children: r.entries(l, s.count(l)) }),
|
|
4218
|
-
/* @__PURE__ */
|
|
4219
|
-
/* @__PURE__ */
|
|
4221
|
+
/* @__PURE__ */ T("div", { className: h.paginationControls, children: [
|
|
4222
|
+
/* @__PURE__ */ T("label", { className: h.pageSize, children: [
|
|
4220
4223
|
r.rows,
|
|
4221
4224
|
/* @__PURE__ */ f(
|
|
4222
|
-
|
|
4225
|
+
Rn,
|
|
4223
4226
|
{
|
|
4224
4227
|
size: "sm",
|
|
4225
4228
|
chars: Math.max(...c.map((u) => String(u).length)),
|
|
@@ -4230,7 +4233,7 @@ function Ha({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
|
|
|
4230
4233
|
}
|
|
4231
4234
|
)
|
|
4232
4235
|
] }),
|
|
4233
|
-
/* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ T("span", { className: h.pageSteps, children: [
|
|
4234
4237
|
/* @__PURE__ */ f("span", { className: h.paginationStatus, children: r.pageOfPages(i.page, i.pageCount, {
|
|
4235
4238
|
page: s.count(i.page),
|
|
4236
4239
|
total: s.count(i.pageCount)
|
|
@@ -4240,20 +4243,20 @@ function Ha({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
|
|
|
4240
4243
|
] })
|
|
4241
4244
|
] })
|
|
4242
4245
|
] });
|
|
4243
|
-
return o.inside ? o.footerTarget ?
|
|
4246
|
+
return o.inside ? o.footerTarget ? En(a, o.footerTarget) : null : a;
|
|
4244
4247
|
}
|
|
4245
|
-
function
|
|
4248
|
+
function qa(e) {
|
|
4246
4249
|
return e;
|
|
4247
4250
|
}
|
|
4248
4251
|
export {
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4252
|
+
ja as ColumnMenu,
|
|
4253
|
+
Ha as Export,
|
|
4254
|
+
Wa as Pagination,
|
|
4255
|
+
Ga as Search,
|
|
4256
|
+
Ka as Toolbar,
|
|
4257
|
+
za as column,
|
|
4258
|
+
Ia as columnFilter,
|
|
4259
|
+
qa as rowFilter,
|
|
4260
|
+
$a as useTable,
|
|
4261
|
+
Go as useTableSelection
|
|
4259
4262
|
};
|