@toolbox-web/grid 1.19.3 → 1.20.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/all.js +17 -19
- package/all.js.map +1 -1
- package/index.js +361 -349
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +22 -0
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/event-delegation.d.ts.map +1 -1
- package/lib/core/internal/sorting.d.ts +6 -0
- package/lib/core/internal/sorting.d.ts.map +1 -1
- package/lib/core/types.d.ts +6 -0
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +54 -54
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
- package/lib/plugins/master-detail/index.js +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +93 -95
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +21 -21
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +11 -11
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +4 -4
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ht() {
|
|
2
2
|
return {
|
|
3
3
|
rowCount: -1,
|
|
4
4
|
colCount: -1,
|
|
@@ -6,20 +6,20 @@ function dt() {
|
|
|
6
6
|
ariaDescribedBy: void 0
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function ut(t, e, i, o, n) {
|
|
10
10
|
if (o === t.rowCount && n === t.colCount)
|
|
11
11
|
return !1;
|
|
12
12
|
const r = t.rowCount;
|
|
13
13
|
return t.rowCount = o, t.colCount = n, e && (e.setAttribute("aria-rowcount", String(o)), e.setAttribute("aria-colcount", String(n))), o !== r && i && (o > 0 ? i.setAttribute("role", "rowgroup") : i.removeAttribute("role")), !0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function ft(t, e) {
|
|
16
16
|
const i = t?.gridAriaLabel;
|
|
17
17
|
return i || (t?.shell?.header?.title ?? e?.lightDomTitle ?? void 0);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function gt(t, e, i, o) {
|
|
20
20
|
if (!e) return !1;
|
|
21
21
|
let n = !1;
|
|
22
|
-
const r =
|
|
22
|
+
const r = ft(i, o);
|
|
23
23
|
r !== t.ariaLabel && (t.ariaLabel = r, r ? e.setAttribute("aria-label", r) : e.removeAttribute("aria-label"), n = !0);
|
|
24
24
|
const s = i?.gridAriaDescribedBy;
|
|
25
25
|
return s !== t.ariaDescribedBy && (t.ariaDescribedBy = s, s ? e.setAttribute("aria-describedby", s) : e.removeAttribute("aria-describedby"), n = !0), n;
|
|
@@ -27,7 +27,7 @@ function ft(t, e, i, o) {
|
|
|
27
27
|
const G = {
|
|
28
28
|
STRETCH: "stretch",
|
|
29
29
|
FIXED: "fixed"
|
|
30
|
-
},
|
|
30
|
+
}, pt = {
|
|
31
31
|
mode: "reduced-motion",
|
|
32
32
|
duration: 200,
|
|
33
33
|
easing: "ease-out"
|
|
@@ -44,7 +44,7 @@ const G = {
|
|
|
44
44
|
filterActive: Re,
|
|
45
45
|
print: "🖨️"
|
|
46
46
|
};
|
|
47
|
-
function
|
|
47
|
+
function wt(t) {
|
|
48
48
|
return Array.from(t.querySelectorAll("tbw-grid-column")).map((i) => {
|
|
49
49
|
const o = i.getAttribute("field") || "";
|
|
50
50
|
if (!o) return null;
|
|
@@ -133,9 +133,9 @@ function Te(t) {
|
|
|
133
133
|
l > 0 && (n.width = l + 2, n.__autoSized = !0, o = !0);
|
|
134
134
|
}), o && V(t), t.__didInitialAutoSize = !0;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const bt = /^(?:\d+(?:\.\d+)?(?:px|%|fr|em|rem|ch|vw|vh|vmin|vmax)|calc\(.+\)|min-content|max-content|minmax\(.+\)|fit-content\(.+\)|auto)$/i;
|
|
137
137
|
function xe(t, e) {
|
|
138
|
-
return typeof t == "number" ? `${t}px` : (
|
|
138
|
+
return typeof t == "number" ? `${t}px` : (bt.test(t) || console.warn(`[tbw-grid] Column '${e ?? "?"}' has an invalid CSS width value: '${t}'. Expected a number (px) or a valid CSS unit string (e.g. '30%', '2fr', 'calc(...)').`), t);
|
|
139
139
|
}
|
|
140
140
|
function V(t) {
|
|
141
141
|
(t.effectiveConfig?.fitMode || t.fitMode || G.STRETCH) === G.STRETCH ? t._gridTemplate = t._visibleColumns.map((i) => {
|
|
@@ -144,23 +144,23 @@ function V(t) {
|
|
|
144
144
|
return o != null ? `minmax(${o}px, 1fr)` : "1fr";
|
|
145
145
|
}).join(" ").trim() : t._gridTemplate = t._visibleColumns.map((i) => i.width != null ? xe(i.width, i.field) : "max-content").join(" "), t.style.setProperty("--tbw-column-template", t._gridTemplate);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function mt(t) {
|
|
148
148
|
return t == null ? "string" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date || typeof t == "string" && /\d{4}-\d{2}-\d{2}/.test(t) && !isNaN(Date.parse(t)) ? "date" : "string";
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function vt(t, e) {
|
|
151
151
|
const i = t[0] || {}, o = Object.keys(i).map((r) => {
|
|
152
|
-
const s = i[r], l =
|
|
152
|
+
const s = i[r], l = mt(s);
|
|
153
153
|
return { field: r, header: r.charAt(0).toUpperCase() + r.slice(1), type: l };
|
|
154
154
|
}), n = {};
|
|
155
155
|
return o.forEach((r) => {
|
|
156
156
|
n[r.field] = r.type || "string";
|
|
157
157
|
}), { columns: o, typeMap: n };
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
function
|
|
159
|
+
const Ct = /{{\s*([^}]+)\s*}}/g, z = "__DG_EMPTY__", yt = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, _t = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/;
|
|
160
|
+
function Et(t) {
|
|
161
161
|
return !t || typeof t != "string" ? "" : t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const St = /* @__PURE__ */ new Set([
|
|
164
164
|
"script",
|
|
165
165
|
"iframe",
|
|
166
166
|
"object",
|
|
@@ -185,18 +185,18 @@ const Et = /* @__PURE__ */ new Set([
|
|
|
185
185
|
"plaintext",
|
|
186
186
|
"xmp",
|
|
187
187
|
"listing"
|
|
188
|
-
]), He = /^on\w+$/i,
|
|
188
|
+
]), He = /^on\w+$/i, Rt = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), At = /^\s*(javascript|vbscript|data|blob):/i;
|
|
189
189
|
function k(t) {
|
|
190
190
|
if (!t || typeof t != "string") return "";
|
|
191
191
|
if (t.indexOf("<") === -1) return t;
|
|
192
192
|
const e = document.createElement("template");
|
|
193
|
-
return e.innerHTML = t,
|
|
193
|
+
return e.innerHTML = t, Tt(e.content), e.innerHTML;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Tt(t) {
|
|
196
196
|
const e = [], i = t.querySelectorAll("*");
|
|
197
197
|
for (const o of i) {
|
|
198
198
|
const n = o.tagName.toLowerCase();
|
|
199
|
-
if (
|
|
199
|
+
if (St.has(n)) {
|
|
200
200
|
e.push(o);
|
|
201
201
|
continue;
|
|
202
202
|
}
|
|
@@ -213,7 +213,7 @@ function At(t) {
|
|
|
213
213
|
r.push(s.name);
|
|
214
214
|
continue;
|
|
215
215
|
}
|
|
216
|
-
if (
|
|
216
|
+
if (Rt.has(l) && At.test(s.value)) {
|
|
217
217
|
r.push(s.name);
|
|
218
218
|
continue;
|
|
219
219
|
}
|
|
@@ -228,20 +228,20 @@ function At(t) {
|
|
|
228
228
|
}
|
|
229
229
|
function Ce(t, e) {
|
|
230
230
|
if (!t || t.indexOf("{{") === -1) return t;
|
|
231
|
-
const i = [], o = t.replace(
|
|
232
|
-
const c =
|
|
231
|
+
const i = [], o = t.replace(Ct, (l, a) => {
|
|
232
|
+
const c = xt(a, e);
|
|
233
233
|
return i.push({ expr: a.trim(), result: c }), c;
|
|
234
|
-
}), n =
|
|
234
|
+
}), n = Ht(o), r = i.length && i.every((l) => l.result === "" || l.result === z);
|
|
235
235
|
return $.test(t) || r ? "" : n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function xt(t, e) {
|
|
238
238
|
if (t = (t || "").trim(), !t || $.test(t)) return z;
|
|
239
239
|
if (t === "value") return e.value == null ? z : String(e.value);
|
|
240
240
|
if (t.startsWith("row.") && !/[()?]/.test(t) && !t.includes(":")) {
|
|
241
241
|
const o = t.slice(4), n = e.row ? e.row[o] : void 0;
|
|
242
242
|
return n == null ? z : String(n);
|
|
243
243
|
}
|
|
244
|
-
if (t.length > 80 || !
|
|
244
|
+
if (t.length > 80 || !yt.test(t) || _t.test(t)) return z;
|
|
245
245
|
const i = t.match(/\./g);
|
|
246
246
|
if (i && i.length > 1) return z;
|
|
247
247
|
try {
|
|
@@ -252,7 +252,7 @@ function Tt(t, e) {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
const $ = /Reflect|Proxy|ownKeys/;
|
|
255
|
-
function
|
|
255
|
+
function Ht(t) {
|
|
256
256
|
return t && t.replace(new RegExp(z, "g"), "").replace(/Reflect\.[^<>{}\s]+|\bProxy\b|ownKeys\([^)]*\)/g, "");
|
|
257
257
|
}
|
|
258
258
|
function ge(t) {
|
|
@@ -266,8 +266,8 @@ function Le(t) {
|
|
|
266
266
|
const e = $.test(t), i = ((o) => e ? "" : Ce(t, o));
|
|
267
267
|
return i.__blocked = e, i;
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
class
|
|
269
|
+
const Lt = 100;
|
|
270
|
+
class Pt {
|
|
271
271
|
#l;
|
|
272
272
|
#n;
|
|
273
273
|
#u;
|
|
@@ -391,7 +391,7 @@ class Lt {
|
|
|
391
391
|
o
|
|
392
392
|
));
|
|
393
393
|
const r = this.#r.getRows();
|
|
394
|
-
return n.length === 0 && r.length && (n =
|
|
394
|
+
return n.length === 0 && r.length && (n = vt(r).columns), n.length && (n.forEach((s) => {
|
|
395
395
|
s.sortable === void 0 && (s.sortable = !0), s.resizable === void 0 && (s.resizable = !0), s.__originalWidth === void 0 && typeof s.width == "number" && (s.__originalWidth = s.width);
|
|
396
396
|
}), n.forEach((s) => {
|
|
397
397
|
s.__viewTemplate && !s.__compiledView && (s.__compiledView = Le(s.__viewTemplate.innerHTML)), s.__editorTemplate && !s.__compiledEditor && (s.__compiledEditor = Le(s.__editorTemplate.innerHTML));
|
|
@@ -489,7 +489,7 @@ class Lt {
|
|
|
489
489
|
this.#s = void 0;
|
|
490
490
|
const i = this.collectState(e);
|
|
491
491
|
this.#r.emit("column-state-change", i);
|
|
492
|
-
},
|
|
492
|
+
}, Lt);
|
|
493
493
|
}
|
|
494
494
|
setColumnVisible(e, i) {
|
|
495
495
|
const o = this.columns, n = o.find((s) => s.field === e);
|
|
@@ -537,7 +537,7 @@ class Lt {
|
|
|
537
537
|
this.columns = o, this.#r.renderHeader(), this.#r.updateTemplate(), this.#r.refreshVirtualWindow();
|
|
538
538
|
}
|
|
539
539
|
parseLightDomColumns(e) {
|
|
540
|
-
this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ?
|
|
540
|
+
this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ? wt(e) : []);
|
|
541
541
|
}
|
|
542
542
|
clearLightDomCache() {
|
|
543
543
|
this.#d = void 0;
|
|
@@ -624,7 +624,7 @@ function Qe(t) {
|
|
|
624
624
|
if (n[r] === i) return r;
|
|
625
625
|
return -1;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function zt(t) {
|
|
628
628
|
if (!t) return -1;
|
|
629
629
|
const e = t.getAttribute("data-col");
|
|
630
630
|
return e ? parseInt(e, 10) : -1;
|
|
@@ -632,7 +632,7 @@ function Pt(t) {
|
|
|
632
632
|
function _e(t) {
|
|
633
633
|
t && t.querySelectorAll(".cell-focus").forEach((e) => e.classList.remove("cell-focus"));
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Ot(t) {
|
|
636
636
|
try {
|
|
637
637
|
if (getComputedStyle(t).direction === "rtl") return "rtl";
|
|
638
638
|
} catch {
|
|
@@ -644,9 +644,9 @@ function zt(t) {
|
|
|
644
644
|
return "ltr";
|
|
645
645
|
}
|
|
646
646
|
function Pe(t) {
|
|
647
|
-
return
|
|
647
|
+
return Ot(t) === "rtl";
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function ro(t, e) {
|
|
650
650
|
return t === "left" || t === "right" ? t : e === "rtl" ? t === "start" ? "right" : "left" : t === "start" ? "left" : "right";
|
|
651
651
|
}
|
|
652
652
|
function Ze(t, e) {
|
|
@@ -684,17 +684,17 @@ it.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
|
|
|
684
684
|
function Dt() {
|
|
685
685
|
return tt.content.firstElementChild.cloneNode(!0);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function Mt() {
|
|
688
688
|
return it.content.firstElementChild.cloneNode(!0);
|
|
689
689
|
}
|
|
690
690
|
function Y(t) {
|
|
691
691
|
t.__cellDisplayCache = void 0, t.__cellCacheEpoch = void 0, t.__hasSpecialColumns = void 0;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function kt(t, e, i, o, n) {
|
|
694
694
|
const r = Math.max(0, i - e), s = t._bodyEl, l = t._visibleColumns, a = l.length;
|
|
695
695
|
let c = t.__cachedHeaderRowCount;
|
|
696
696
|
for (c === void 0 && (c = t.querySelector(".header-group-row") ? 2 : 1, t.__cachedHeaderRowCount = c); t._rowPool.length < r; ) {
|
|
697
|
-
const p =
|
|
697
|
+
const p = Mt();
|
|
698
698
|
t._rowPool.push(p);
|
|
699
699
|
}
|
|
700
700
|
if (t._rowPool.length > r) {
|
|
@@ -1013,7 +1013,7 @@ function ze(t, e, i) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function It(t, e) {
|
|
1017
1017
|
if (t._dispatchKeyDown?.(e))
|
|
1018
1018
|
return;
|
|
1019
1019
|
const i = t._rows.length - 1, o = t._visibleColumns.length - 1, n = t._activeEditRows !== void 0 && t._activeEditRows !== -1, s = t._visibleColumns[t._focusCol]?.type, l = e.composedPath?.() ?? [], a = l.length ? l[0] : e.target, c = (h) => {
|
|
@@ -1139,8 +1139,8 @@ function W(t, e) {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
1141
|
const ie = /* @__PURE__ */ new WeakMap();
|
|
1142
|
-
function
|
|
1143
|
-
const i = Qe(e), o =
|
|
1142
|
+
function Nt(t, e) {
|
|
1143
|
+
const i = Qe(e), o = zt(e);
|
|
1144
1144
|
if (i < 0 || o < 0) return;
|
|
1145
1145
|
t._focusRow = i, t._focusCol = o, _e(t._bodyEl), e.classList.add("cell-focus"), e.setAttribute("aria-selected", "true");
|
|
1146
1146
|
const n = e.closest("tbw-grid");
|
|
@@ -1155,7 +1155,7 @@ function Ee(t, e, i, o) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
const s = n?.closest?.("[data-col]"), l = n?.closest?.(".data-grid-row"), a = n?.closest?.(".header-row");
|
|
1157
1157
|
let c, h, f, p, g, u;
|
|
1158
|
-
return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), h = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && h >= 0 && (f = t._rows[c], u = t.
|
|
1158
|
+
return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), h = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && h >= 0 && (f = t._rows[c], u = t._visibleColumns[h], p = u?.field, g = f && p ? f[p] : void 0)), {
|
|
1159
1159
|
type: o,
|
|
1160
1160
|
row: f,
|
|
1161
1161
|
rowIndex: c !== void 0 && c >= 0 ? c : void 0,
|
|
@@ -1170,26 +1170,26 @@ function Ee(t, e, i, o) {
|
|
|
1170
1170
|
cell: c !== void 0 && h !== void 0 && c >= 0 && h >= 0 ? { row: c, col: h } : void 0
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function qt(t, e, i) {
|
|
1174
1174
|
const o = Ee(t, e, i, "mousedown");
|
|
1175
1175
|
(t._dispatchCellMouseDown?.(o) ?? !1) && ie.set(t, !0);
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1177
|
+
function $t(t, e, i) {
|
|
1178
1178
|
if (!ie.get(t)) return;
|
|
1179
1179
|
const o = Ee(t, e, i, "mousemove");
|
|
1180
1180
|
t._dispatchCellMouseMove?.(o);
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function Wt(t, e, i) {
|
|
1183
1183
|
if (!ie.get(t)) return;
|
|
1184
1184
|
const o = Ee(t, e, i, "mouseup");
|
|
1185
1185
|
t._dispatchCellMouseUp?.(o), ie.set(t, !1);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Ft(t, e, i) {
|
|
1188
1188
|
e.addEventListener(
|
|
1189
1189
|
"mousedown",
|
|
1190
1190
|
(o) => {
|
|
1191
1191
|
const n = o.target.closest(".cell[data-col]");
|
|
1192
|
-
n && (n.classList.contains("editing") || (o.preventDefault(),
|
|
1192
|
+
n && (n.classList.contains("editing") || (o.preventDefault(), Nt(t, n)));
|
|
1193
1193
|
},
|
|
1194
1194
|
{ signal: i }
|
|
1195
1195
|
), e.addEventListener(
|
|
@@ -1211,34 +1211,40 @@ function Wt(t, e, i) {
|
|
|
1211
1211
|
{ signal: i }
|
|
1212
1212
|
);
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1215
|
-
e.addEventListener("keydown", (n) =>
|
|
1214
|
+
function Ut(t, e, i, o) {
|
|
1215
|
+
e.addEventListener("keydown", (n) => It(t, n), { signal: o }), i.addEventListener("mousedown", (n) => qt(t, i, n), { signal: o }), document.addEventListener("mousemove", (n) => $t(t, i, n), { signal: o }), document.addEventListener("mouseup", (n) => Wt(t, i, n), { signal: o });
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Vt(t, e) {
|
|
1218
1218
|
return t == null && e == null ? 0 : t == null ? -1 : e == null || t > e ? 1 : t < e ? -1 : 0;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1221
|
-
const n = i.find((l) => l.field === e.field)?.sortComparator ??
|
|
1220
|
+
function ot(t, e, i) {
|
|
1221
|
+
const n = i.find((l) => l.field === e.field)?.sortComparator ?? Vt, { field: r, direction: s } = e;
|
|
1222
1222
|
return [...t].sort((l, a) => n(l[r], a[r], l, a) * s);
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Oe(t, e, i, o) {
|
|
1225
1225
|
t._rows = e, t.__rowRenderEpoch++, t._rowPool.forEach((n) => n.__epoch = -1), oe(t), t.refreshVirtualWindow(!0), t.dispatchEvent(
|
|
1226
1226
|
new CustomEvent("sort-change", { detail: { field: i.field, direction: o } })
|
|
1227
1227
|
), t.requestStateChange?.();
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function De(t, e) {
|
|
1230
1230
|
!t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()), Me(t, e, 1)) : t._sortState.direction === 1 ? Me(t, e, -1) : (t._sortState = null, t.__rowRenderEpoch++, t._rowPool.forEach((o) => o.__epoch = -1), t._rows = t.__originalOrder.slice(), oe(t), t._headerRowEl?.querySelectorAll('[role="columnheader"].sortable')?.forEach((o) => {
|
|
1231
1231
|
o.getAttribute("aria-sort") ? (o.getAttribute("aria-sort") === "ascending" || o.getAttribute("aria-sort") === "descending") && (t._sortState || o.setAttribute("aria-sort", "none")) : o.setAttribute("aria-sort", "none");
|
|
1232
1232
|
}), t.refreshVirtualWindow(!0), t.dispatchEvent(
|
|
1233
1233
|
new CustomEvent("sort-change", { detail: { field: e.field, direction: 0 } })
|
|
1234
1234
|
), t.requestStateChange?.());
|
|
1235
1235
|
}
|
|
1236
|
+
function Bt(t, e) {
|
|
1237
|
+
if (!t._sortState) return e;
|
|
1238
|
+
t.__originalOrder = [...e];
|
|
1239
|
+
const o = (t.effectiveConfig?.sortHandler ?? ot)(e, t._sortState, t._columns);
|
|
1240
|
+
return o && typeof o.then == "function" ? e : o;
|
|
1241
|
+
}
|
|
1236
1242
|
function Me(t, e, i) {
|
|
1237
1243
|
t._sortState = { field: e.field, direction: i };
|
|
1238
|
-
const o = { field: e.field, direction: i }, n = t._columns, s = (t.effectiveConfig?.sortHandler ??
|
|
1244
|
+
const o = { field: e.field, direction: i }, n = t._columns, s = (t.effectiveConfig?.sortHandler ?? ot)(t._rows, o, n);
|
|
1239
1245
|
s && typeof s.then == "function" ? s.then((l) => {
|
|
1240
|
-
|
|
1241
|
-
}) :
|
|
1246
|
+
Oe(t, l, e, i);
|
|
1247
|
+
}) : Oe(t, s, e, i);
|
|
1242
1248
|
}
|
|
1243
1249
|
function F(t, e) {
|
|
1244
1250
|
return t.effectiveConfig?.sortable !== !1 && e.sortable === !0;
|
|
@@ -1246,14 +1252,14 @@ function F(t, e) {
|
|
|
1246
1252
|
function j(t, e) {
|
|
1247
1253
|
return t.effectiveConfig?.resizable !== !1 && e.resizable !== !1;
|
|
1248
1254
|
}
|
|
1249
|
-
function
|
|
1255
|
+
function Gt(t, e) {
|
|
1250
1256
|
typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
|
|
1251
1257
|
}
|
|
1252
1258
|
function K(t, e) {
|
|
1253
1259
|
const i = document.createElement("span");
|
|
1254
1260
|
Ye(i, "sort-indicator");
|
|
1255
1261
|
const o = t._sortState?.field === e.field ? t._sortState.direction : 0, n = { ...M, ...t.icons }, r = o === 1 ? n.sortAsc : o === -1 ? n.sortDesc : n.sortNone;
|
|
1256
|
-
return
|
|
1262
|
+
return Gt(i, r), i;
|
|
1257
1263
|
}
|
|
1258
1264
|
function Q(t, e, i) {
|
|
1259
1265
|
const o = document.createElement("div");
|
|
@@ -1267,15 +1273,15 @@ function Z(t, e, i, o) {
|
|
|
1267
1273
|
o.classList.add("sortable"), o.tabIndex = 0;
|
|
1268
1274
|
const n = t._sortState?.field === e.field ? t._sortState.direction : 0;
|
|
1269
1275
|
o.setAttribute("aria-sort", n === 0 ? "none" : n === 1 ? "ascending" : "descending"), o.addEventListener("click", (r) => {
|
|
1270
|
-
t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, e, o) ||
|
|
1276
|
+
t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, e, o) || De(t, e);
|
|
1271
1277
|
}), o.addEventListener("keydown", (r) => {
|
|
1272
1278
|
if (r.key === "Enter" || r.key === " ") {
|
|
1273
1279
|
if (r.preventDefault(), t._dispatchHeaderClick?.(r, e, o)) return;
|
|
1274
|
-
|
|
1280
|
+
De(t, e);
|
|
1275
1281
|
}
|
|
1276
1282
|
});
|
|
1277
1283
|
}
|
|
1278
|
-
function
|
|
1284
|
+
function Xt(t, e) {
|
|
1279
1285
|
if (e != null)
|
|
1280
1286
|
if (typeof e == "string") {
|
|
1281
1287
|
const i = document.createElement("span");
|
|
@@ -1300,7 +1306,7 @@ function oe(t) {
|
|
|
1300
1306
|
renderSortIcon: () => F(t, i) ? K(t, i) : null,
|
|
1301
1307
|
renderFilterButton: () => null
|
|
1302
1308
|
}, c = i.headerRenderer(a);
|
|
1303
|
-
|
|
1309
|
+
Xt(n, c), F(t, i) && Z(t, i, o, n), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
|
|
1304
1310
|
} else if (i.headerLabelRenderer) {
|
|
1305
1311
|
const a = {
|
|
1306
1312
|
column: i,
|
|
@@ -1318,9 +1324,9 @@ function oe(t) {
|
|
|
1318
1324
|
i.getAttribute("aria-sort") || i.setAttribute("aria-sort", "none");
|
|
1319
1325
|
}), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex")));
|
|
1320
1326
|
}
|
|
1321
|
-
const
|
|
1322
|
-
function
|
|
1323
|
-
return
|
|
1327
|
+
const nt = typeof requestIdleCallback == "function";
|
|
1328
|
+
function Yt(t, e) {
|
|
1329
|
+
return nt ? requestIdleCallback(t, e) : window.setTimeout(() => {
|
|
1324
1330
|
const i = Date.now();
|
|
1325
1331
|
t({
|
|
1326
1332
|
didTimeout: !1,
|
|
@@ -1329,13 +1335,13 @@ function Xt(t, e) {
|
|
|
1329
1335
|
}, 1);
|
|
1330
1336
|
}
|
|
1331
1337
|
function ke(t) {
|
|
1332
|
-
|
|
1338
|
+
nt ? cancelIdleCallback(t) : clearTimeout(t);
|
|
1333
1339
|
}
|
|
1334
|
-
function
|
|
1340
|
+
function jt(t) {
|
|
1335
1341
|
const e = document.createElement("div");
|
|
1336
1342
|
return e.className = `tbw-spinner tbw-spinner--${t}`, e.setAttribute("role", "progressbar"), e.setAttribute("aria-label", "Loading"), e;
|
|
1337
1343
|
}
|
|
1338
|
-
function
|
|
1344
|
+
function Kt(t, e) {
|
|
1339
1345
|
if (e) {
|
|
1340
1346
|
const o = e({ size: t });
|
|
1341
1347
|
if (typeof o == "string") {
|
|
@@ -1344,19 +1350,19 @@ function jt(t, e) {
|
|
|
1344
1350
|
}
|
|
1345
1351
|
return o;
|
|
1346
1352
|
}
|
|
1347
|
-
return
|
|
1353
|
+
return jt(t);
|
|
1348
1354
|
}
|
|
1349
|
-
function
|
|
1355
|
+
function Qt(t) {
|
|
1350
1356
|
const e = document.createElement("div");
|
|
1351
|
-
return e.className = "tbw-loading-overlay", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.appendChild(
|
|
1357
|
+
return e.className = "tbw-loading-overlay", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.appendChild(Kt("large", t)), e;
|
|
1352
1358
|
}
|
|
1353
|
-
function
|
|
1359
|
+
function Zt(t, e) {
|
|
1354
1360
|
t.appendChild(e);
|
|
1355
1361
|
}
|
|
1356
|
-
function
|
|
1362
|
+
function Jt(t) {
|
|
1357
1363
|
t?.remove();
|
|
1358
1364
|
}
|
|
1359
|
-
function
|
|
1365
|
+
function ei(t, e) {
|
|
1360
1366
|
if (e) {
|
|
1361
1367
|
if (t.classList.add("tbw-row-loading"), t.setAttribute("aria-busy", "true"), !t.querySelector(".tbw-row-loading-overlay")) {
|
|
1362
1368
|
const i = document.createElement("div");
|
|
@@ -1367,11 +1373,11 @@ function Jt(t, e) {
|
|
|
1367
1373
|
} else
|
|
1368
1374
|
t.classList.remove("tbw-row-loading"), t.removeAttribute("aria-busy"), t.querySelector(".tbw-row-loading-overlay")?.remove();
|
|
1369
1375
|
}
|
|
1370
|
-
function
|
|
1376
|
+
function ti(t, e) {
|
|
1371
1377
|
e ? (t.classList.add("tbw-cell-loading"), t.setAttribute("aria-busy", "true")) : (t.classList.remove("tbw-cell-loading"), t.removeAttribute("aria-busy"));
|
|
1372
1378
|
}
|
|
1373
1379
|
var A = ((t) => (t[t.STYLE = 1] = "STYLE", t[t.VIRTUALIZATION = 2] = "VIRTUALIZATION", t[t.HEADER = 3] = "HEADER", t[t.ROWS = 4] = "ROWS", t[t.COLUMNS = 5] = "COLUMNS", t[t.FULL = 6] = "FULL", t))(A || {});
|
|
1374
|
-
class
|
|
1380
|
+
class ii {
|
|
1375
1381
|
#l;
|
|
1376
1382
|
#n = 0;
|
|
1377
1383
|
#u = 0;
|
|
@@ -1452,31 +1458,31 @@ function Ie(t) {
|
|
|
1452
1458
|
}
|
|
1453
1459
|
};
|
|
1454
1460
|
}
|
|
1455
|
-
const ce = "data-animating",
|
|
1461
|
+
const ce = "data-animating", oi = {
|
|
1456
1462
|
change: "--tbw-row-change-duration",
|
|
1457
1463
|
insert: "--tbw-row-insert-duration",
|
|
1458
1464
|
remove: "--tbw-row-remove-duration"
|
|
1459
|
-
},
|
|
1465
|
+
}, ni = {
|
|
1460
1466
|
change: 500,
|
|
1461
1467
|
insert: 300,
|
|
1462
1468
|
remove: 200
|
|
1463
1469
|
};
|
|
1464
|
-
function
|
|
1470
|
+
function ri(t) {
|
|
1465
1471
|
const e = t.trim().toLowerCase();
|
|
1466
1472
|
return e.endsWith("ms") ? parseFloat(e) : e.endsWith("s") ? parseFloat(e) * 1e3 : parseFloat(e);
|
|
1467
1473
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const i =
|
|
1474
|
+
function si(t, e) {
|
|
1475
|
+
const i = oi[e], o = getComputedStyle(t).getPropertyValue(i);
|
|
1470
1476
|
if (o) {
|
|
1471
|
-
const n =
|
|
1477
|
+
const n = ri(o);
|
|
1472
1478
|
if (!isNaN(n) && n > 0)
|
|
1473
1479
|
return n;
|
|
1474
1480
|
}
|
|
1475
|
-
return
|
|
1481
|
+
return ni[e];
|
|
1476
1482
|
}
|
|
1477
|
-
function
|
|
1483
|
+
function li(t, e, i) {
|
|
1478
1484
|
t.removeAttribute(ce), t.offsetWidth, t.setAttribute(ce, e);
|
|
1479
|
-
const o =
|
|
1485
|
+
const o = si(t, e);
|
|
1480
1486
|
setTimeout(() => {
|
|
1481
1487
|
e !== "remove" && t.removeAttribute(ce);
|
|
1482
1488
|
}, o);
|
|
@@ -1485,15 +1491,15 @@ function Se(t, e, i) {
|
|
|
1485
1491
|
if (e < 0)
|
|
1486
1492
|
return !1;
|
|
1487
1493
|
const o = t.findRenderedRowElement?.(e);
|
|
1488
|
-
return o ? (
|
|
1494
|
+
return o ? (li(o, i), !0) : !1;
|
|
1489
1495
|
}
|
|
1490
|
-
function
|
|
1496
|
+
function ai(t, e, i) {
|
|
1491
1497
|
let o = 0;
|
|
1492
1498
|
for (const n of e)
|
|
1493
1499
|
Se(t, n, i) && o++;
|
|
1494
1500
|
return o;
|
|
1495
1501
|
}
|
|
1496
|
-
function
|
|
1502
|
+
function ci(t, e, i) {
|
|
1497
1503
|
const o = t._rows ?? [], n = t.getRowId;
|
|
1498
1504
|
if (!n)
|
|
1499
1505
|
return !1;
|
|
@@ -1525,7 +1531,7 @@ function P(t, e) {
|
|
|
1525
1531
|
}
|
|
1526
1532
|
return i;
|
|
1527
1533
|
}
|
|
1528
|
-
function
|
|
1534
|
+
function rt(t, e, i) {
|
|
1529
1535
|
const o = document.createElement("button");
|
|
1530
1536
|
if (t && (o.className = t), e)
|
|
1531
1537
|
for (const n in e) {
|
|
@@ -1534,8 +1540,8 @@ function nt(t, e, i) {
|
|
|
1534
1540
|
}
|
|
1535
1541
|
return o;
|
|
1536
1542
|
}
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1543
|
+
const st = document.createElement("template");
|
|
1544
|
+
st.innerHTML = `
|
|
1539
1545
|
<div class="tbw-scroll-area">
|
|
1540
1546
|
<div class="rows-body-wrapper">
|
|
1541
1547
|
<div class="rows-body" role="grid">
|
|
@@ -1554,8 +1560,8 @@ rt.innerHTML = `
|
|
|
1554
1560
|
<div class="faux-vscroll-spacer"></div>
|
|
1555
1561
|
</div>
|
|
1556
1562
|
`;
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
1563
|
+
function lt() {
|
|
1564
|
+
return st.content.cloneNode(!0);
|
|
1559
1565
|
}
|
|
1560
1566
|
function Ne(t) {
|
|
1561
1567
|
const e = document.createDocumentFragment(), i = P(t.hasShell ? "tbw-grid-root has-shell" : "tbw-grid-root");
|
|
@@ -1563,11 +1569,11 @@ function Ne(t) {
|
|
|
1563
1569
|
i.appendChild(t.shellHeader), i.appendChild(t.shellBody);
|
|
1564
1570
|
else {
|
|
1565
1571
|
const o = P("tbw-grid-content");
|
|
1566
|
-
o.appendChild(
|
|
1572
|
+
o.appendChild(lt()), i.appendChild(o);
|
|
1567
1573
|
}
|
|
1568
1574
|
return e.appendChild(i), e;
|
|
1569
1575
|
}
|
|
1570
|
-
function
|
|
1576
|
+
function di(t) {
|
|
1571
1577
|
const e = P("tbw-shell-header", { part: "shell-header", role: "presentation" });
|
|
1572
1578
|
if (t.title) {
|
|
1573
1579
|
const r = P("tbw-shell-title");
|
|
@@ -1585,7 +1591,7 @@ function ci(t) {
|
|
|
1585
1591
|
for (const r of t.apiButtons)
|
|
1586
1592
|
r.hasRender && o.appendChild(P("tbw-toolbar-content-slot", { "data-toolbar-content": r.id }));
|
|
1587
1593
|
if ((t.configButtons.some((r) => r.hasRender) || t.apiButtons.some((r) => r.hasRender)) && t.hasPanels && o.appendChild(P("tbw-toolbar-separator")), t.hasPanels) {
|
|
1588
|
-
const r =
|
|
1594
|
+
const r = rt(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
|
|
1589
1595
|
"data-panel-toggle": "",
|
|
1590
1596
|
title: "Settings",
|
|
1591
1597
|
"aria-label": "Toggle settings panel",
|
|
@@ -1596,9 +1602,9 @@ function ci(t) {
|
|
|
1596
1602
|
}
|
|
1597
1603
|
return e.appendChild(o), e;
|
|
1598
1604
|
}
|
|
1599
|
-
function
|
|
1605
|
+
function hi(t) {
|
|
1600
1606
|
const e = P("tbw-shell-body"), i = t.panels.length > 0, o = t.panels.length === 1, n = P("tbw-grid-content");
|
|
1601
|
-
n.appendChild(
|
|
1607
|
+
n.appendChild(lt());
|
|
1602
1608
|
let r = null;
|
|
1603
1609
|
if (i) {
|
|
1604
1610
|
r = J("aside", {
|
|
@@ -1618,7 +1624,7 @@ function di(t) {
|
|
|
1618
1624
|
);
|
|
1619
1625
|
const l = P("tbw-tool-panel-content", { role: "presentation" }), a = P("tbw-accordion");
|
|
1620
1626
|
for (const c of t.panels) {
|
|
1621
|
-
const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${o ? " single" : ""}`, f = P(h, { "data-section": c.id }), p =
|
|
1627
|
+
const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${o ? " single" : ""}`, f = P(h, { "data-section": c.id }), p = rt("tbw-accordion-header", {
|
|
1622
1628
|
"aria-expanded": String(c.isExpanded),
|
|
1623
1629
|
"aria-controls": `tbw-section-${c.id}`
|
|
1624
1630
|
});
|
|
@@ -1645,7 +1651,7 @@ function di(t) {
|
|
|
1645
1651
|
function q(t) {
|
|
1646
1652
|
return t ? typeof t == "string" ? t : t.outerHTML : "";
|
|
1647
1653
|
}
|
|
1648
|
-
function
|
|
1654
|
+
function ui() {
|
|
1649
1655
|
return {
|
|
1650
1656
|
toolPanels: /* @__PURE__ */ new Map(),
|
|
1651
1657
|
headerContents: /* @__PURE__ */ new Map(),
|
|
@@ -1664,10 +1670,10 @@ function hi() {
|
|
|
1664
1670
|
lightDomContentMoved: !1
|
|
1665
1671
|
};
|
|
1666
1672
|
}
|
|
1667
|
-
function
|
|
1673
|
+
function at(t) {
|
|
1668
1674
|
return !!(t?.header?.title || t?.header?.toolbarContents?.length || t?.toolPanels?.length || t?.headerContents?.length || t?.header?.lightDomContent?.length || t?.header?.hasToolButtonsContainer);
|
|
1669
1675
|
}
|
|
1670
|
-
function
|
|
1676
|
+
function fi(t, e, i = "☰") {
|
|
1671
1677
|
const o = t?.header?.title ?? e.lightDomTitle ?? "", n = !!o, r = q(i), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], a = new Set(s.map((d) => d.id)), c = [...s];
|
|
1672
1678
|
for (const d of l)
|
|
1673
1679
|
a.has(d.id) || c.push(d);
|
|
@@ -1681,7 +1687,7 @@ function ui(t, e, i = "☰") {
|
|
|
1681
1687
|
}
|
|
1682
1688
|
return `
|
|
1683
1689
|
<div class="tbw-shell-header" part="shell-header" role="presentation">
|
|
1684
|
-
${n ? `<div class="tbw-shell-title">${
|
|
1690
|
+
${n ? `<div class="tbw-shell-title">${Et(o)}</div>` : ""}
|
|
1685
1691
|
<div class="tbw-shell-content" part="shell-content" role="presentation" data-light-dom-header-content></div>
|
|
1686
1692
|
<div class="tbw-shell-toolbar" part="shell-toolbar" role="presentation">
|
|
1687
1693
|
${u}
|
|
@@ -1760,7 +1766,7 @@ function We(t, e, i) {
|
|
|
1760
1766
|
e.toolPanels.set(s, u), e.lightDomToolPanelIds.add(s), r.style.display = "none";
|
|
1761
1767
|
});
|
|
1762
1768
|
}
|
|
1763
|
-
function
|
|
1769
|
+
function gi(t, e, i, o) {
|
|
1764
1770
|
const n = t.querySelector(".tbw-shell-toolbar");
|
|
1765
1771
|
n && n.addEventListener("click", (s) => {
|
|
1766
1772
|
if (s.target.closest("[data-panel-toggle]")) {
|
|
@@ -1777,7 +1783,7 @@ function fi(t, e, i, o) {
|
|
|
1777
1783
|
}
|
|
1778
1784
|
});
|
|
1779
1785
|
}
|
|
1780
|
-
function
|
|
1786
|
+
function pi(t, e, i, o) {
|
|
1781
1787
|
if (!e?.toolPanel?.closeOnClickOutside)
|
|
1782
1788
|
return () => {
|
|
1783
1789
|
};
|
|
@@ -1788,7 +1794,7 @@ function gi(t, e, i, o) {
|
|
|
1788
1794
|
};
|
|
1789
1795
|
return t.addEventListener("mousedown", n), () => t.removeEventListener("mousedown", n);
|
|
1790
1796
|
}
|
|
1791
|
-
function
|
|
1797
|
+
function wi(t, e, i) {
|
|
1792
1798
|
const o = t.querySelector(".tbw-tool-panel"), n = t.querySelector("[data-resize-handle]"), r = t.querySelector(".tbw-shell-body");
|
|
1793
1799
|
if (!o || !n || !r)
|
|
1794
1800
|
return () => {
|
|
@@ -1844,7 +1850,7 @@ function pe(t, e) {
|
|
|
1844
1850
|
c && e.headerContentCleanups.set(s.id, c);
|
|
1845
1851
|
}
|
|
1846
1852
|
}
|
|
1847
|
-
function
|
|
1853
|
+
function bi(t, e, i) {
|
|
1848
1854
|
if (!e.isPanelOpen) return;
|
|
1849
1855
|
const o = q(i?.expand ?? M.expand), n = q(i?.collapse ?? M.collapse);
|
|
1850
1856
|
for (const [r, s] of e.toolPanels) {
|
|
@@ -1878,7 +1884,7 @@ function he(t) {
|
|
|
1878
1884
|
e();
|
|
1879
1885
|
t.toolbarContentCleanups.clear();
|
|
1880
1886
|
}
|
|
1881
|
-
function
|
|
1887
|
+
function mi(t) {
|
|
1882
1888
|
for (const e of t.headerContentCleanups.values())
|
|
1883
1889
|
e();
|
|
1884
1890
|
t.headerContentCleanups.clear();
|
|
@@ -1895,7 +1901,7 @@ function bi(t) {
|
|
|
1895
1901
|
t.toolPanels.get(e)?.onClose?.();
|
|
1896
1902
|
t.isPanelOpen = !1, t.expandedSections.clear(), t.toolPanels.clear(), t.headerContents.clear(), t.toolbarContents.clear(), t.lightDomHeaderContent = [], t.lightDomToolPanelIds.clear(), t.lightDomToolbarContentIds.clear(), t.lightDomContentMoved = !1;
|
|
1897
1903
|
}
|
|
1898
|
-
function
|
|
1904
|
+
function vi(t, e) {
|
|
1899
1905
|
let i = !1;
|
|
1900
1906
|
const o = {
|
|
1901
1907
|
get isInitialized() {
|
|
@@ -1924,7 +1930,7 @@ function mi(t, e) {
|
|
|
1924
1930
|
s && t.expandedSections.add(s.id);
|
|
1925
1931
|
}
|
|
1926
1932
|
const n = e.getShadow();
|
|
1927
|
-
Fe(n, t), Ue(n, t),
|
|
1933
|
+
Fe(n, t), Ue(n, t), bi(n, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: o.expandedSections });
|
|
1928
1934
|
},
|
|
1929
1935
|
closeToolPanel() {
|
|
1930
1936
|
if (!t.isPanelOpen) return;
|
|
@@ -1960,7 +1966,7 @@ function mi(t, e) {
|
|
|
1960
1966
|
const f = s.querySelector(`[data-section="${a}"] .tbw-accordion-content`);
|
|
1961
1967
|
f && (f.innerHTML = "");
|
|
1962
1968
|
}
|
|
1963
|
-
t.expandedSections.add(n), ue(s, n, !0),
|
|
1969
|
+
t.expandedSections.add(n), ue(s, n, !0), Ci(s, t, n);
|
|
1964
1970
|
}
|
|
1965
1971
|
e.emit("tool-panel-section-toggle", { id: n, expanded: !l });
|
|
1966
1972
|
},
|
|
@@ -2018,7 +2024,7 @@ function ue(t, e, i) {
|
|
|
2018
2024
|
const o = t.querySelector(`[data-section="${e}"]`);
|
|
2019
2025
|
o && o.classList.toggle("expanded", i);
|
|
2020
2026
|
}
|
|
2021
|
-
function
|
|
2027
|
+
function Ci(t, e, i) {
|
|
2022
2028
|
const o = e.toolPanels.get(i);
|
|
2023
2029
|
if (!o?.render) return;
|
|
2024
2030
|
const n = t.querySelector(`[data-section="${i}"] .tbw-accordion-content`);
|
|
@@ -2026,8 +2032,8 @@ function vi(t, e, i) {
|
|
|
2026
2032
|
const r = o.render(n);
|
|
2027
2033
|
r && e.panelCleanups.set(i, r);
|
|
2028
2034
|
}
|
|
2029
|
-
function
|
|
2030
|
-
const n =
|
|
2035
|
+
function yi(t, e, i, o) {
|
|
2036
|
+
const n = at(e), r = [], s = [
|
|
2031
2037
|
"tbw-grid-header",
|
|
2032
2038
|
"tbw-grid-tool-buttons",
|
|
2033
2039
|
"tbw-grid-tool-panel",
|
|
@@ -2063,7 +2069,7 @@ function Ci(t, e, i, o) {
|
|
|
2063
2069
|
icon: q(_.icon),
|
|
2064
2070
|
isExpanded: i.expandedSections.has(_.id)
|
|
2065
2071
|
}))
|
|
2066
|
-
}, w =
|
|
2072
|
+
}, w = di(u), C = hi(d), m = Ne({
|
|
2067
2073
|
hasShell: !0,
|
|
2068
2074
|
shellHeader: w,
|
|
2069
2075
|
shellBody: C
|
|
@@ -2078,25 +2084,25 @@ function Ci(t, e, i, o) {
|
|
|
2078
2084
|
const Ve = "tbw-grid-styles";
|
|
2079
2085
|
let te = "";
|
|
2080
2086
|
const we = /* @__PURE__ */ new Map();
|
|
2081
|
-
function
|
|
2087
|
+
function _i() {
|
|
2082
2088
|
let t = document.getElementById(Ve);
|
|
2083
2089
|
return t || (t = document.createElement("style"), t.id = Ve, t.setAttribute("data-tbw-grid", "true"), document.head.appendChild(t)), t;
|
|
2084
2090
|
}
|
|
2085
2091
|
function be() {
|
|
2086
|
-
const t =
|
|
2092
|
+
const t = _i(), e = Array.from(we.values()).join(`
|
|
2087
2093
|
`);
|
|
2088
2094
|
t.textContent = `${te}
|
|
2089
2095
|
|
|
2090
2096
|
/* Plugin Styles */
|
|
2091
2097
|
${e}`;
|
|
2092
2098
|
}
|
|
2093
|
-
function
|
|
2099
|
+
function Ei(t) {
|
|
2094
2100
|
let e = !1;
|
|
2095
2101
|
for (const { name: i, styles: o } of t)
|
|
2096
2102
|
we.has(i) || (we.set(i, o), e = !0);
|
|
2097
2103
|
return e && be(), e;
|
|
2098
2104
|
}
|
|
2099
|
-
function
|
|
2105
|
+
function Si() {
|
|
2100
2106
|
try {
|
|
2101
2107
|
for (const t of Array.from(document.styleSheets))
|
|
2102
2108
|
try {
|
|
@@ -2112,7 +2118,7 @@ function Ei() {
|
|
|
2112
2118
|
}
|
|
2113
2119
|
return null;
|
|
2114
2120
|
}
|
|
2115
|
-
async function
|
|
2121
|
+
async function Ri(t) {
|
|
2116
2122
|
if (te)
|
|
2117
2123
|
return;
|
|
2118
2124
|
if (typeof t == "string" && t.length > 0) {
|
|
@@ -2120,14 +2126,14 @@ async function Si(t) {
|
|
|
2120
2126
|
return;
|
|
2121
2127
|
}
|
|
2122
2128
|
await new Promise((i) => setTimeout(i, 50));
|
|
2123
|
-
const e =
|
|
2129
|
+
const e = Si();
|
|
2124
2130
|
e ? (te = e, be()) : (typeof process > "u" || process.env?.NODE_ENV !== "test") && console.warn(
|
|
2125
2131
|
"[tbw-grid] Could not find grid.css in document.styleSheets. Grid styling will not work.",
|
|
2126
2132
|
"Available stylesheets:",
|
|
2127
2133
|
Array.from(document.styleSheets).map((i) => i.href || "(inline)")
|
|
2128
2134
|
);
|
|
2129
2135
|
}
|
|
2130
|
-
function
|
|
2136
|
+
function Ai() {
|
|
2131
2137
|
return {
|
|
2132
2138
|
startY: null,
|
|
2133
2139
|
startX: null,
|
|
@@ -2141,19 +2147,19 @@ function Ri() {
|
|
|
2141
2147
|
momentumRaf: 0
|
|
2142
2148
|
};
|
|
2143
2149
|
}
|
|
2144
|
-
function
|
|
2150
|
+
function Ti(t) {
|
|
2145
2151
|
t.startY = null, t.startX = null, t.scrollTop = null, t.scrollLeft = null, t.lastY = null, t.lastX = null, t.lastTime = null;
|
|
2146
2152
|
}
|
|
2147
|
-
function
|
|
2153
|
+
function ct(t) {
|
|
2148
2154
|
t.momentumRaf && (cancelAnimationFrame(t.momentumRaf), t.momentumRaf = 0);
|
|
2149
2155
|
}
|
|
2150
|
-
function
|
|
2156
|
+
function xi(t, e, i) {
|
|
2151
2157
|
if (t.touches.length !== 1) return;
|
|
2152
|
-
|
|
2158
|
+
ct(e);
|
|
2153
2159
|
const o = t.touches[0];
|
|
2154
2160
|
e.startY = o.clientY, e.startX = o.clientX, e.lastY = o.clientY, e.lastX = o.clientX, e.lastTime = performance.now(), e.scrollTop = i.fauxScrollbar.scrollTop, e.scrollLeft = i.scrollArea?.scrollLeft ?? 0, e.velocityY = 0, e.velocityX = 0;
|
|
2155
2161
|
}
|
|
2156
|
-
function
|
|
2162
|
+
function Hi(t, e, i) {
|
|
2157
2163
|
if (t.touches.length !== 1 || e.startY === null || e.startX === null || e.scrollTop === null || e.scrollLeft === null)
|
|
2158
2164
|
return !1;
|
|
2159
2165
|
const o = t.touches[0], n = o.clientY, r = o.clientX, s = performance.now(), l = e.startY - n, a = e.startX - r;
|
|
@@ -2170,10 +2176,10 @@ function xi(t, e, i) {
|
|
|
2170
2176
|
}
|
|
2171
2177
|
return g && (i.fauxScrollbar.scrollTop = e.scrollTop + l), u && i.scrollArea && (i.scrollArea.scrollLeft = e.scrollLeft + a), g || u;
|
|
2172
2178
|
}
|
|
2173
|
-
function Hi(t, e) {
|
|
2174
|
-
(Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Li(t, e), Ai(t);
|
|
2175
|
-
}
|
|
2176
2179
|
function Li(t, e) {
|
|
2180
|
+
(Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Pi(t, e), Ti(t);
|
|
2181
|
+
}
|
|
2182
|
+
function Pi(t, e) {
|
|
2177
2183
|
const n = () => {
|
|
2178
2184
|
t.velocityY *= 0.95, t.velocityX *= 0.95;
|
|
2179
2185
|
const r = t.velocityY * 16, s = t.velocityX * 16;
|
|
@@ -2181,19 +2187,19 @@ function Li(t, e) {
|
|
|
2181
2187
|
};
|
|
2182
2188
|
t.momentumRaf = requestAnimationFrame(n);
|
|
2183
2189
|
}
|
|
2184
|
-
function
|
|
2185
|
-
t.addEventListener("touchstart", (n) =>
|
|
2190
|
+
function zi(t, e, i, o) {
|
|
2191
|
+
t.addEventListener("touchstart", (n) => xi(n, e, i), {
|
|
2186
2192
|
passive: !0,
|
|
2187
2193
|
signal: o
|
|
2188
2194
|
}), t.addEventListener(
|
|
2189
2195
|
"touchmove",
|
|
2190
2196
|
(n) => {
|
|
2191
|
-
|
|
2197
|
+
Hi(n, e, i) && n.preventDefault();
|
|
2192
2198
|
},
|
|
2193
2199
|
{ passive: !1, signal: o }
|
|
2194
|
-
), t.addEventListener("touchend", () =>
|
|
2200
|
+
), t.addEventListener("touchend", () => Li(e, i), { passive: !0, signal: o });
|
|
2195
2201
|
}
|
|
2196
|
-
const
|
|
2202
|
+
const Oi = [
|
|
2197
2203
|
{
|
|
2198
2204
|
property: "editable",
|
|
2199
2205
|
pluginName: "editing",
|
|
@@ -2242,20 +2248,20 @@ const zi = [
|
|
|
2242
2248
|
isUsed: (t) => Array.isArray(t) && t.length > 0
|
|
2243
2249
|
}
|
|
2244
2250
|
];
|
|
2245
|
-
function
|
|
2251
|
+
function Mi(t) {
|
|
2246
2252
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
2247
2253
|
}
|
|
2248
2254
|
function me(t) {
|
|
2249
|
-
return `import { ${
|
|
2255
|
+
return `import { ${O(t)}Plugin } from '@toolbox-web/grid/plugins/${Mi(t)}';`;
|
|
2250
2256
|
}
|
|
2251
|
-
function
|
|
2257
|
+
function O(t) {
|
|
2252
2258
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2253
2259
|
}
|
|
2254
2260
|
function Be(t, e) {
|
|
2255
2261
|
return t.some((i) => i.name === e);
|
|
2256
2262
|
}
|
|
2257
|
-
function
|
|
2258
|
-
const i =
|
|
2263
|
+
function ki(t, e) {
|
|
2264
|
+
const i = Oi, o = Di, n = /* @__PURE__ */ new Map();
|
|
2259
2265
|
function r(l, a, c, h, f = !1) {
|
|
2260
2266
|
n.has(l) || n.set(l, { description: a, importHint: c, fields: [], isConfigProperty: f });
|
|
2261
2267
|
const p = n.get(l);
|
|
@@ -2283,7 +2289,7 @@ function Mi(t, e) {
|
|
|
2283
2289
|
`Config uses ${c}, but the required plugin is not loaded.
|
|
2284
2290
|
→ Add the plugin to your gridConfig.plugins array:
|
|
2285
2291
|
${h}
|
|
2286
|
-
plugins: [new ${
|
|
2292
|
+
plugins: [new ${O(a)}Plugin(), ...]`
|
|
2287
2293
|
);
|
|
2288
2294
|
else {
|
|
2289
2295
|
const g = f.slice(0, 3).join(", ") + (f.length > 3 ? `, ... (${f.length} total)` : "");
|
|
@@ -2291,7 +2297,7 @@ function Mi(t, e) {
|
|
|
2291
2297
|
`Column(s) [${g}] use ${c}, but the required plugin is not loaded.
|
|
2292
2298
|
→ Add the plugin to your gridConfig.plugins array:
|
|
2293
2299
|
${h}
|
|
2294
|
-
plugins: [new ${
|
|
2300
|
+
plugins: [new ${O(a)}Plugin(), ...]`
|
|
2295
2301
|
);
|
|
2296
2302
|
}
|
|
2297
2303
|
throw new Error(
|
|
@@ -2305,7 +2311,7 @@ This validation helps catch misconfigurations early. The properties listed above
|
|
|
2305
2311
|
);
|
|
2306
2312
|
}
|
|
2307
2313
|
}
|
|
2308
|
-
function
|
|
2314
|
+
function Ii(t) {
|
|
2309
2315
|
const e = [], i = [];
|
|
2310
2316
|
for (const o of t) {
|
|
2311
2317
|
const r = o.constructor.manifest;
|
|
@@ -2313,7 +2319,7 @@ function ki(t) {
|
|
|
2313
2319
|
for (const s of r.configRules) {
|
|
2314
2320
|
const l = o.config;
|
|
2315
2321
|
if (s.check(l)) {
|
|
2316
|
-
const c = `${`[tbw-grid:${
|
|
2322
|
+
const c = `${`[tbw-grid:${O(o.name)}Plugin]`} Configuration warning: ${s.message}`;
|
|
2317
2323
|
s.severity === "error" ? e.push(c) : i.push(c);
|
|
2318
2324
|
}
|
|
2319
2325
|
}
|
|
@@ -2328,29 +2334,29 @@ ${e.join(`
|
|
|
2328
2334
|
|
|
2329
2335
|
`)}`);
|
|
2330
2336
|
}
|
|
2331
|
-
function
|
|
2337
|
+
function Ni(t, e) {
|
|
2332
2338
|
const i = t.name, n = t.constructor.dependencies ?? [];
|
|
2333
2339
|
for (const r of n) {
|
|
2334
2340
|
const s = r.name, l = r.required ?? !0, a = r.reason;
|
|
2335
2341
|
if (!e.some((h) => h.name === s)) {
|
|
2336
|
-
const h = a ?? `${
|
|
2342
|
+
const h = a ?? `${O(i)}Plugin requires ${O(s)}Plugin`, f = me(s);
|
|
2337
2343
|
if (l)
|
|
2338
2344
|
throw new Error(
|
|
2339
2345
|
`[tbw-grid] Plugin dependency error:
|
|
2340
2346
|
|
|
2341
2347
|
${h}.
|
|
2342
2348
|
|
|
2343
|
-
→ Add the plugin to your gridConfig.plugins array BEFORE ${
|
|
2349
|
+
→ Add the plugin to your gridConfig.plugins array BEFORE ${O(i)}Plugin:
|
|
2344
2350
|
${f}
|
|
2345
|
-
plugins: [new ${
|
|
2351
|
+
plugins: [new ${O(s)}Plugin(), new ${O(i)}Plugin()]`
|
|
2346
2352
|
);
|
|
2347
2353
|
console.info(
|
|
2348
|
-
`[tbw-grid] ${
|
|
2354
|
+
`[tbw-grid] ${O(i)}Plugin: Optional "${s}" plugin not found. Some features may be unavailable.`
|
|
2349
2355
|
);
|
|
2350
2356
|
}
|
|
2351
2357
|
}
|
|
2352
2358
|
}
|
|
2353
|
-
function
|
|
2359
|
+
function qi(t) {
|
|
2354
2360
|
if (!ye()) return;
|
|
2355
2361
|
const e = new Set(t.map((o) => o.name)), i = /* @__PURE__ */ new Set();
|
|
2356
2362
|
for (const o of t) {
|
|
@@ -2363,7 +2369,7 @@ function Ni(t) {
|
|
|
2363
2369
|
i.add(l), console.warn(
|
|
2364
2370
|
`[tbw-grid] Plugin incompatibility warning:
|
|
2365
2371
|
|
|
2366
|
-
${
|
|
2372
|
+
${O(o.name)}Plugin and ${O(s.name)}Plugin are both loaded, but they are currently incompatible.
|
|
2367
2373
|
|
|
2368
2374
|
→ ${s.reason}
|
|
2369
2375
|
|
|
@@ -2373,27 +2379,27 @@ ${D(o.name)}Plugin and ${D(s.name)}Plugin are both loaded, but they are currentl
|
|
|
2373
2379
|
}
|
|
2374
2380
|
}
|
|
2375
2381
|
}
|
|
2376
|
-
function
|
|
2382
|
+
function dt(t, e) {
|
|
2377
2383
|
return !t || typeof t != "object" ? t : "__rowCacheKey" in t ? t.__rowCacheKey : "rowId" in t && t.rowId != null ? `id:${t.rowId}` : e ? `id:${e(t)}` : t;
|
|
2378
2384
|
}
|
|
2379
|
-
function
|
|
2380
|
-
const o =
|
|
2385
|
+
function $i(t, e, i) {
|
|
2386
|
+
const o = dt(e, i);
|
|
2381
2387
|
if (typeof o == "string")
|
|
2382
2388
|
return t.byKey.get(o);
|
|
2383
2389
|
if (o && typeof o == "object")
|
|
2384
2390
|
return t.byRef.get(o);
|
|
2385
2391
|
}
|
|
2386
|
-
function
|
|
2387
|
-
const n =
|
|
2392
|
+
function Wi(t, e, i, o) {
|
|
2393
|
+
const n = dt(e, o);
|
|
2388
2394
|
typeof n == "string" ? t.byKey.set(n, i) : n && typeof n == "object" && t.byRef.set(n, i);
|
|
2389
2395
|
}
|
|
2390
|
-
function
|
|
2396
|
+
function Fi(t, e, i, o, n) {
|
|
2391
2397
|
const r = new Array(t.length);
|
|
2392
2398
|
let s = 0;
|
|
2393
2399
|
for (let l = 0; l < t.length; l++) {
|
|
2394
2400
|
const a = t[l];
|
|
2395
2401
|
let c = n?.(a, l), h = c !== void 0;
|
|
2396
|
-
c === void 0 && (c =
|
|
2402
|
+
c === void 0 && (c = $i(e, a, o.rowId), h = c !== void 0), c === void 0 && (c = i, h = !1), r[l] = { offset: s, height: c, measured: h }, s += c;
|
|
2397
2403
|
}
|
|
2398
2404
|
return r;
|
|
2399
2405
|
}
|
|
@@ -2406,7 +2412,7 @@ function ve(t, e, i) {
|
|
|
2406
2412
|
t[r].offset += n;
|
|
2407
2413
|
}
|
|
2408
2414
|
}
|
|
2409
|
-
function
|
|
2415
|
+
function Ui(t) {
|
|
2410
2416
|
if (t.length === 0) return 0;
|
|
2411
2417
|
const e = t[t.length - 1];
|
|
2412
2418
|
return e.offset + e.height;
|
|
@@ -2426,19 +2432,19 @@ function Ge(t, e) {
|
|
|
2426
2432
|
}
|
|
2427
2433
|
return Math.max(0, Math.min(i, t.length - 1));
|
|
2428
2434
|
}
|
|
2429
|
-
function
|
|
2435
|
+
function Vi(t, e) {
|
|
2430
2436
|
let i = 0, o = 0;
|
|
2431
2437
|
for (const n of t)
|
|
2432
2438
|
n.measured && (i += n.height, o++);
|
|
2433
2439
|
return o > 0 ? i / o : e;
|
|
2434
2440
|
}
|
|
2435
|
-
function
|
|
2441
|
+
function Bi(t) {
|
|
2436
2442
|
let e = 0;
|
|
2437
2443
|
for (const i of t)
|
|
2438
2444
|
i.measured && e++;
|
|
2439
2445
|
return e;
|
|
2440
2446
|
}
|
|
2441
|
-
function
|
|
2447
|
+
function Gi(t, e) {
|
|
2442
2448
|
const { positionCache: i, heightCache: o, rows: n, start: r, end: s, getPluginHeight: l, getRowId: a } = t;
|
|
2443
2449
|
let c = !1;
|
|
2444
2450
|
e.forEach((p) => {
|
|
@@ -2455,13 +2461,13 @@ function Bi(t, e) {
|
|
|
2455
2461
|
const C = p.offsetHeight;
|
|
2456
2462
|
if (C > 0) {
|
|
2457
2463
|
const m = i[u];
|
|
2458
|
-
(!m.measured || Math.abs(m.height - C) > 1) && (ve(i, u, C),
|
|
2464
|
+
(!m.measured || Math.abs(m.height - C) > 1) && (ve(i, u, C), Wi(o, d, C, a), c = !0);
|
|
2459
2465
|
}
|
|
2460
2466
|
});
|
|
2461
|
-
const h = c ?
|
|
2467
|
+
const h = c ? Bi(i) : 0, f = c ? Vi(i, t.defaultHeight) : 0;
|
|
2462
2468
|
return { hasChanges: c, measuredCount: h, averageHeight: f };
|
|
2463
2469
|
}
|
|
2464
|
-
function
|
|
2470
|
+
function Xi(t, e, i, o) {
|
|
2465
2471
|
let n = 0, r = 0;
|
|
2466
2472
|
for (let s = 0; s < t.length; s++) {
|
|
2467
2473
|
const l = t[s];
|
|
@@ -2472,7 +2478,7 @@ function Gi(t, e, i, o) {
|
|
|
2472
2478
|
averageHeight: n > 0 ? r / n : i
|
|
2473
2479
|
};
|
|
2474
2480
|
}
|
|
2475
|
-
function
|
|
2481
|
+
function so(t) {
|
|
2476
2482
|
const { totalRows: e, viewportHeight: i, scrollTop: o, rowHeight: n, overscan: r } = t, s = Math.ceil(i / n);
|
|
2477
2483
|
let l = Math.floor(o / n) - r;
|
|
2478
2484
|
l < 0 && (l = 0);
|
|
@@ -2484,7 +2490,7 @@ function ro(t) {
|
|
|
2484
2490
|
totalHeight: e * n
|
|
2485
2491
|
};
|
|
2486
2492
|
}
|
|
2487
|
-
function
|
|
2493
|
+
function lo(t, e) {
|
|
2488
2494
|
return t <= e;
|
|
2489
2495
|
}
|
|
2490
2496
|
class ne {
|
|
@@ -2507,7 +2513,7 @@ class ne {
|
|
|
2507
2513
|
this.attach(i);
|
|
2508
2514
|
}
|
|
2509
2515
|
attach(e) {
|
|
2510
|
-
if (
|
|
2516
|
+
if (Ni(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
|
|
2511
2517
|
for (const [i, o] of Object.entries(e.cellRenderers))
|
|
2512
2518
|
this.cellRenderers.set(i, o);
|
|
2513
2519
|
if (e.headerRenderers)
|
|
@@ -2772,7 +2778,7 @@ class ne {
|
|
|
2772
2778
|
return e.sort((i, o) => (i.content.order ?? 0) - (o.content.order ?? 0));
|
|
2773
2779
|
}
|
|
2774
2780
|
}
|
|
2775
|
-
const Xi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", Yi = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', ji = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Ki = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none}.tbw-row-loading-overlay{position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out;pointer-events:none;display:flex;align-items:center}.tbw-row-loading-spinner{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);margin-left:var(--tbw-spacing-md);width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:27}}}', Qi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Zi = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", Ji = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", eo = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", to = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", io = `/**
|
|
2781
|
+
const Yi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", ji = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', Ki = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Qi = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none}.tbw-row-loading-overlay{position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out;pointer-events:none;display:flex;align-items:center}.tbw-row-loading-spinner{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);margin-left:var(--tbw-spacing-md);width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:27}}}', Zi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Ji = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", eo = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", to = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", io = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", oo = `/**
|
|
2776
2782
|
* tbw-grid Light DOM Styles
|
|
2777
2783
|
*
|
|
2778
2784
|
* This stylesheet uses CSS nesting to scope all styles to the tbw-grid element.
|
|
@@ -2791,19 +2797,19 @@ const Xi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--t
|
|
|
2791
2797
|
/* Declare layer order - earlier layers have lower priority */
|
|
2792
2798
|
@layer tbw-base, tbw-plugins, tbw-theme;
|
|
2793
2799
|
|
|
2794
|
-
${
|
|
2795
|
-
${Yi}
|
|
2800
|
+
${io}
|
|
2796
2801
|
${ji}
|
|
2797
|
-
${
|
|
2802
|
+
${Ki}
|
|
2798
2803
|
${Ji}
|
|
2799
2804
|
${eo}
|
|
2800
|
-
${
|
|
2801
|
-
${Xi}
|
|
2805
|
+
${to}
|
|
2802
2806
|
${Qi}
|
|
2807
|
+
${Yi}
|
|
2808
|
+
${Zi}
|
|
2803
2809
|
`;
|
|
2804
2810
|
class I extends HTMLElement {
|
|
2805
2811
|
static tagName = "tbw-grid";
|
|
2806
|
-
static version = "1.
|
|
2812
|
+
static version = "1.20.0";
|
|
2807
2813
|
static #l = 0;
|
|
2808
2814
|
static adapters = [];
|
|
2809
2815
|
static registerAdapter(e) {
|
|
@@ -2843,12 +2849,12 @@ class I extends HTMLElement {
|
|
|
2843
2849
|
#x = !1;
|
|
2844
2850
|
#m = 0;
|
|
2845
2851
|
#z;
|
|
2846
|
-
#I =
|
|
2852
|
+
#I = Ai();
|
|
2847
2853
|
#b;
|
|
2848
2854
|
#y;
|
|
2849
2855
|
#p;
|
|
2850
2856
|
#R;
|
|
2851
|
-
#
|
|
2857
|
+
#te = {
|
|
2852
2858
|
scrollTop: 0,
|
|
2853
2859
|
scrollLeft: 0,
|
|
2854
2860
|
scrollHeight: 0,
|
|
@@ -2859,11 +2865,11 @@ class I extends HTMLElement {
|
|
|
2859
2865
|
#t;
|
|
2860
2866
|
#_;
|
|
2861
2867
|
#N = !1;
|
|
2862
|
-
#D;
|
|
2863
|
-
#G;
|
|
2864
2868
|
#O;
|
|
2869
|
+
#G;
|
|
2870
|
+
#D;
|
|
2865
2871
|
#i;
|
|
2866
|
-
#e =
|
|
2872
|
+
#e = ui();
|
|
2867
2873
|
#c;
|
|
2868
2874
|
#q;
|
|
2869
2875
|
#$;
|
|
@@ -2913,6 +2919,7 @@ class I extends HTMLElement {
|
|
|
2913
2919
|
_focusCol = 0;
|
|
2914
2920
|
_restoreFocusAfterRender = !1;
|
|
2915
2921
|
_sortState = null;
|
|
2922
|
+
#Y = !1;
|
|
2916
2923
|
_gridTemplate = "";
|
|
2917
2924
|
__rowRenderEpoch = 0;
|
|
2918
2925
|
__didInitialAutoSize = !1;
|
|
@@ -2967,16 +2974,16 @@ class I extends HTMLElement {
|
|
|
2967
2974
|
}
|
|
2968
2975
|
set loading(e) {
|
|
2969
2976
|
const i = this.#M;
|
|
2970
|
-
this.#M = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#
|
|
2977
|
+
this.#M = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#fe();
|
|
2971
2978
|
}
|
|
2972
2979
|
setRowLoading(e, i) {
|
|
2973
2980
|
const o = this.#E.has(e);
|
|
2974
|
-
i ? this.#E.add(e) : this.#E.delete(e), o !== i && this.#
|
|
2981
|
+
i ? this.#E.add(e) : this.#E.delete(e), o !== i && this.#Q(e, i);
|
|
2975
2982
|
}
|
|
2976
2983
|
setCellLoading(e, i, o) {
|
|
2977
2984
|
let n = this.#H.get(e);
|
|
2978
2985
|
const r = n?.has(i) ?? !1;
|
|
2979
|
-
o ? (n || (n = /* @__PURE__ */ new Set(), this.#H.set(e, n)), n.add(i)) : (n?.delete(i), n?.size === 0 && this.#H.delete(e)), r !== o && this.#
|
|
2986
|
+
o ? (n || (n = /* @__PURE__ */ new Set(), this.#H.set(e, n)), n.add(i)) : (n?.delete(i), n?.size === 0 && this.#H.delete(e)), r !== o && this.#ge(e, i, o);
|
|
2980
2987
|
}
|
|
2981
2988
|
isRowLoading(e) {
|
|
2982
2989
|
return this.#E.has(e);
|
|
@@ -2987,11 +2994,11 @@ class I extends HTMLElement {
|
|
|
2987
2994
|
clearAllLoading() {
|
|
2988
2995
|
this.loading = !1;
|
|
2989
2996
|
for (const e of this.#E)
|
|
2990
|
-
this.#
|
|
2997
|
+
this.#Q(e, !1);
|
|
2991
2998
|
this.#E.clear();
|
|
2992
2999
|
for (const [e, i] of this.#H)
|
|
2993
3000
|
for (const o of i)
|
|
2994
|
-
this.#
|
|
3001
|
+
this.#ge(e, o, !1);
|
|
2995
3002
|
this.#H.clear();
|
|
2996
3003
|
}
|
|
2997
3004
|
get effectiveConfig() {
|
|
@@ -3001,12 +3008,12 @@ class I extends HTMLElement {
|
|
|
3001
3008
|
return this.#b || (this.#b = new AbortController()), this.#b.signal;
|
|
3002
3009
|
}
|
|
3003
3010
|
constructor() {
|
|
3004
|
-
super(), this.#
|
|
3011
|
+
super(), this.#ve(), this.#d = new Promise((e) => this.#h = e), this.#s = new ii({
|
|
3005
3012
|
mergeConfig: () => {
|
|
3006
|
-
this.#i.parseLightDomColumns(this), this.#i.merge(), this.#
|
|
3013
|
+
this.#i.parseLightDomColumns(this), this.#i.merge(), this.#oe(), ki(this.#o, this.#t?.getPlugins() ?? []), Ii(this.#t?.getPlugins() ?? []), qi(this.#t?.getPlugins() ?? []), this.#De(), this.#X = [...this._columns];
|
|
3007
3014
|
},
|
|
3008
|
-
processColumns: () => this.#
|
|
3009
|
-
processRows: () => this.#
|
|
3015
|
+
processColumns: () => this.#Le(),
|
|
3016
|
+
processRows: () => this.#ze(),
|
|
3010
3017
|
renderHeader: () => oe(this),
|
|
3011
3018
|
updateTemplate: () => V(this),
|
|
3012
3019
|
renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
|
|
@@ -3015,14 +3022,14 @@ class I extends HTMLElement {
|
|
|
3015
3022
|
if (!this._virtualization.totalHeightEl) return;
|
|
3016
3023
|
const i = this.#T(this._rows.length);
|
|
3017
3024
|
this._virtualization.totalHeightEl.style.height = `${i}px`;
|
|
3018
|
-
}), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Te(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, W(this)), this._virtualization.enabled && !this.#U && this.#
|
|
3025
|
+
}), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Te(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, W(this)), this._virtualization.enabled && !this.#U && this.#_e(), this.#x && (this.#x = !1, requestAnimationFrame(() => {
|
|
3019
3026
|
requestAnimationFrame(() => {
|
|
3020
|
-
this.#
|
|
3027
|
+
this.#ye();
|
|
3021
3028
|
});
|
|
3022
|
-
})), this.#M && this.#
|
|
3029
|
+
})), this.#M && this.#fe();
|
|
3023
3030
|
},
|
|
3024
3031
|
isConnected: () => this.isConnected && this.#f
|
|
3025
|
-
}), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c =
|
|
3032
|
+
}), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = vi(this.#e, {
|
|
3026
3033
|
getShadow: () => this.#n,
|
|
3027
3034
|
getShellConfig: () => this.#o?.shell,
|
|
3028
3035
|
getAccordionIcons: () => ({
|
|
@@ -3031,7 +3038,7 @@ class I extends HTMLElement {
|
|
|
3031
3038
|
}),
|
|
3032
3039
|
emit: (e, i) => this.#L(e, i),
|
|
3033
3040
|
refreshShellHeader: () => this.refreshShellHeader()
|
|
3034
|
-
}), this.#i = new
|
|
3041
|
+
}), this.#i = new Pt({
|
|
3035
3042
|
getRows: () => this.#a,
|
|
3036
3043
|
getSortState: () => this._sortState,
|
|
3037
3044
|
setSortState: (e) => {
|
|
@@ -3052,7 +3059,7 @@ class I extends HTMLElement {
|
|
|
3052
3059
|
setRowHeight: (e) => {
|
|
3053
3060
|
this._virtualization.rowHeight = e;
|
|
3054
3061
|
},
|
|
3055
|
-
applyAnimationConfig: (e) => this.#
|
|
3062
|
+
applyAnimationConfig: (e) => this.#Oe(e),
|
|
3056
3063
|
getShellLightDomTitle: () => this.#e.lightDomTitle,
|
|
3057
3064
|
getShellToolPanels: () => this.#e.toolPanels,
|
|
3058
3065
|
getShellHeaderContents: () => this.#e.headerContents,
|
|
@@ -3061,8 +3068,8 @@ class I extends HTMLElement {
|
|
|
3061
3068
|
getShellHasToolButtonsContainer: () => this.#e.hasToolButtonsContainer
|
|
3062
3069
|
});
|
|
3063
3070
|
}
|
|
3064
|
-
async #
|
|
3065
|
-
await
|
|
3071
|
+
async #ve() {
|
|
3072
|
+
await Ri(oo);
|
|
3066
3073
|
}
|
|
3067
3074
|
getPlugin(e) {
|
|
3068
3075
|
return this.#t?.getPlugin(e);
|
|
@@ -3085,16 +3092,16 @@ class I extends HTMLElement {
|
|
|
3085
3092
|
requestAfterRender() {
|
|
3086
3093
|
this.#s.requestPhase(A.STYLE, "plugin:requestAfterRender");
|
|
3087
3094
|
}
|
|
3088
|
-
#
|
|
3095
|
+
#ie() {
|
|
3089
3096
|
this.#t = new ne(this);
|
|
3090
3097
|
const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
|
|
3091
3098
|
this.#t.attachAll(i);
|
|
3092
3099
|
}
|
|
3093
3100
|
#F() {
|
|
3094
3101
|
const e = this.#t?.getPluginStyles() ?? [];
|
|
3095
|
-
|
|
3102
|
+
Ei(e);
|
|
3096
3103
|
}
|
|
3097
|
-
#
|
|
3104
|
+
#oe() {
|
|
3098
3105
|
const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
|
|
3099
3106
|
if (this.#_ === i)
|
|
3100
3107
|
return;
|
|
@@ -3114,17 +3121,17 @@ class I extends HTMLElement {
|
|
|
3114
3121
|
const r = this.#e.headerContentCleanups.get(n);
|
|
3115
3122
|
r && (r(), this.#e.headerContentCleanups.delete(n)), this.#e.headerContents.delete(n);
|
|
3116
3123
|
}
|
|
3117
|
-
this.#
|
|
3124
|
+
this.#ie(), this.#F(), this.#_ = i, this.#le(), this.#ne();
|
|
3118
3125
|
const o = this.#g;
|
|
3119
3126
|
if (this.#g = this.#t?.getAll().some((n) => n.onScroll) ?? !1, !o && this.#g) {
|
|
3120
3127
|
const r = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
|
|
3121
|
-
this.#
|
|
3128
|
+
this.#j(r);
|
|
3122
3129
|
}
|
|
3123
3130
|
}
|
|
3124
|
-
#
|
|
3131
|
+
#Ce() {
|
|
3125
3132
|
this.#t?.detachAll();
|
|
3126
3133
|
}
|
|
3127
|
-
#
|
|
3134
|
+
#ne() {
|
|
3128
3135
|
if (!this.#t) return;
|
|
3129
3136
|
const e = this.#t.getToolPanels();
|
|
3130
3137
|
for (const { panel: o } of e)
|
|
@@ -3133,7 +3140,7 @@ class I extends HTMLElement {
|
|
|
3133
3140
|
for (const { content: o } of i)
|
|
3134
3141
|
this.#e.headerContents.has(o.id) || this.#e.headerContents.set(o.id, o);
|
|
3135
3142
|
}
|
|
3136
|
-
#
|
|
3143
|
+
#re() {
|
|
3137
3144
|
const e = I.getAdapters();
|
|
3138
3145
|
if (e.length === 0 && !this.__frameworkAdapter) return;
|
|
3139
3146
|
const i = this.__frameworkAdapter;
|
|
@@ -3150,17 +3157,17 @@ class I extends HTMLElement {
|
|
|
3150
3157
|
};
|
|
3151
3158
|
}
|
|
3152
3159
|
connectedCallback() {
|
|
3153
|
-
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", I.version), this.id || (this.id = `tbw-grid-${++I.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#N = !1), this.#b = new AbortController(), this.#R && (ke(this.#R), this.#R = void 0), this.#k(), this.#i.parseLightDomColumns(this), this.#i.merge(), this.#
|
|
3160
|
+
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", I.version), this.id || (this.id = `tbw-grid-${++I.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#N = !1), this.#b = new AbortController(), this.#R && (ke(this.#R), this.#R = void 0), this.#k(), this.#i.parseLightDomColumns(this), this.#i.merge(), this.#ie();
|
|
3154
3161
|
const e = this.#o?.plugins;
|
|
3155
|
-
this.#_ = Array.isArray(e) ? e : [], this.#
|
|
3162
|
+
this.#_ = Array.isArray(e) ? e : [], this.#ne(), this.#u || (this.#ee(), this.#F(), this.#u = !0), this.#se(), this.#R = Yt(
|
|
3156
3163
|
() => {
|
|
3157
|
-
this.#
|
|
3164
|
+
this.#Ne();
|
|
3158
3165
|
},
|
|
3159
3166
|
{ timeout: 100 }
|
|
3160
3167
|
);
|
|
3161
3168
|
}
|
|
3162
3169
|
disconnectedCallback() {
|
|
3163
|
-
this.#R && (ke(this.#R), this.#R = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#
|
|
3170
|
+
this.#R && (ke(this.#R), this.#R = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#Ce(), mi(this.#e), this.#c.setInitialized(!1), this.#q?.(), this.#q = void 0, this.#$?.(), this.#$ = void 0, ct(this.#I), this.#b && (this.#b.abort(), this.#b = void 0), this.#O?.abort(), this.#O = void 0, this.#N = !1, this._resizeController && this._resizeController.dispose(), this.#y && (this.#y.disconnect(), this.#y = void 0), this.#p && (this.#p.disconnect(), this.#p = void 0, this.#U = !1), Y(this), this.#A.clear(), this.#_ = void 0;
|
|
3164
3171
|
for (const e of this._rowPool)
|
|
3165
3172
|
e.remove();
|
|
3166
3173
|
this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
|
|
@@ -3181,24 +3188,24 @@ class I extends HTMLElement {
|
|
|
3181
3188
|
}
|
|
3182
3189
|
else e === "fit-mode" && (this.fitMode = o);
|
|
3183
3190
|
}
|
|
3184
|
-
#
|
|
3191
|
+
#se() {
|
|
3185
3192
|
const i = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
|
|
3186
3193
|
if (this._headerRowEl = i?.querySelector(".header-row"), this._virtualization.totalHeightEl = i?.querySelector(".faux-vscroll-spacer"), this._virtualization.viewportEl = i?.querySelector(".rows-viewport"), this._bodyEl = i?.querySelector(".rows"), this.__rowsBodyEl = i?.querySelector(".rows-body"), this.#c.isInitialized) {
|
|
3187
3194
|
pe(this.#n, this.#e), de(this.#n, this.#o?.shell, this.#e);
|
|
3188
3195
|
const n = this.#o?.shell?.toolPanel?.defaultOpen;
|
|
3189
3196
|
n && this.#e.toolPanels.has(n) && (this.openToolPanel(), this.#e.expandedSections.add(n));
|
|
3190
3197
|
}
|
|
3191
|
-
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Ie(this), this.#P(), this.#
|
|
3198
|
+
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Ie(this), this.#P(), this.#j(i), this.#N)
|
|
3192
3199
|
return;
|
|
3193
3200
|
this.#N = !0;
|
|
3194
3201
|
const o = this.disconnectSignal;
|
|
3195
|
-
|
|
3202
|
+
Ut(this, this, this.#n, o), this.#le(), queueMicrotask(() => this.#Ee()), this.#s.requestPhase(A.FULL, "afterConnect");
|
|
3196
3203
|
}
|
|
3197
|
-
#
|
|
3204
|
+
#le() {
|
|
3198
3205
|
const e = this.#o.rowHeight, i = this.#t.hasRowHeightPlugin();
|
|
3199
|
-
typeof e == "function" || i ? this._virtualization.variableHeights || (this._virtualization.variableHeights = !0, this._virtualization.rowHeight = typeof e == "number" && e > 0 ? e : this._virtualization.rowHeight || 28, this.#
|
|
3206
|
+
typeof e == "function" || i ? this._virtualization.variableHeights || (this._virtualization.variableHeights = !0, this._virtualization.rowHeight = typeof e == "number" && e > 0 ? e : this._virtualization.rowHeight || 28, this.#J(), typeof e != "function" && (this.#x = !0)) : !i && typeof e != "function" && this._virtualization.variableHeights ? (this._virtualization.variableHeights = !1, this._virtualization.positionCache = null) : typeof e == "number" && e > 0 ? (this._virtualization.rowHeight = e, this._virtualization.variableHeights = !1) : requestAnimationFrame(() => this.#ae());
|
|
3200
3207
|
}
|
|
3201
|
-
#
|
|
3208
|
+
#ae() {
|
|
3202
3209
|
if (this.#t.hasExtraHeight())
|
|
3203
3210
|
return;
|
|
3204
3211
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
@@ -3212,7 +3219,7 @@ class I extends HTMLElement {
|
|
|
3212
3219
|
const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
|
|
3213
3220
|
r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(A.VIRTUALIZATION, "measureRowHeight"));
|
|
3214
3221
|
}
|
|
3215
|
-
#
|
|
3222
|
+
#ye() {
|
|
3216
3223
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
3217
3224
|
if (!e) return;
|
|
3218
3225
|
const i = e.querySelectorAll(".cell");
|
|
@@ -3222,14 +3229,14 @@ class I extends HTMLElement {
|
|
|
3222
3229
|
l > o && (o = l);
|
|
3223
3230
|
});
|
|
3224
3231
|
const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
|
|
3225
|
-
if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#
|
|
3232
|
+
if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#J(), this._virtualization.totalHeightEl)) {
|
|
3226
3233
|
const l = this.#T(this._rows.length);
|
|
3227
3234
|
this._virtualization.totalHeightEl.style.height = `${l}px`;
|
|
3228
3235
|
}
|
|
3229
3236
|
}
|
|
3230
|
-
#
|
|
3231
|
-
this.#
|
|
3232
|
-
const i = this.#
|
|
3237
|
+
#j(e) {
|
|
3238
|
+
this.#O?.abort(), this.#O = new AbortController();
|
|
3239
|
+
const i = this.#O.signal, o = e?.querySelector(".faux-vscroll"), n = e?.querySelector(".rows");
|
|
3233
3240
|
if (this._virtualization.container = o ?? this, this.#g = this.#t?.getAll().some((r) => r.onScroll) ?? !1, o && n) {
|
|
3234
3241
|
o.addEventListener(
|
|
3235
3242
|
"scroll",
|
|
@@ -3251,7 +3258,7 @@ class I extends HTMLElement {
|
|
|
3251
3258
|
n.style.transform = `translateY(${g}px)`;
|
|
3252
3259
|
}
|
|
3253
3260
|
this.#r = a, this.#C || (this.#C = requestAnimationFrame(() => {
|
|
3254
|
-
this.#C = 0, this.#r !== null && (this.#
|
|
3261
|
+
this.#C = 0, this.#r !== null && (this.#Me(this.#r), this.#r = null);
|
|
3255
3262
|
}));
|
|
3256
3263
|
},
|
|
3257
3264
|
{ passive: !0, signal: i }
|
|
@@ -3260,7 +3267,7 @@ class I extends HTMLElement {
|
|
|
3260
3267
|
this.#G = r, this._virtualization.scrollAreaEl = r, r && this.#g && r.addEventListener(
|
|
3261
3268
|
"scroll",
|
|
3262
3269
|
() => {
|
|
3263
|
-
const a = this.#
|
|
3270
|
+
const a = this.#te;
|
|
3264
3271
|
a.scrollTop = o.scrollTop, a.scrollLeft = r.scrollLeft, a.scrollHeight = o.scrollHeight, a.scrollWidth = r.scrollWidth, a.clientHeight = o.clientHeight, a.clientWidth = r.clientWidth, this.#t?.onScroll(a);
|
|
3265
3272
|
},
|
|
3266
3273
|
{ passive: !0, signal: i }
|
|
@@ -3279,15 +3286,15 @@ class I extends HTMLElement {
|
|
|
3279
3286
|
}
|
|
3280
3287
|
},
|
|
3281
3288
|
{ passive: !1, signal: i }
|
|
3282
|
-
),
|
|
3289
|
+
), zi(
|
|
3283
3290
|
s,
|
|
3284
3291
|
this.#I,
|
|
3285
3292
|
{ fauxScrollbar: o, scrollArea: l },
|
|
3286
3293
|
i
|
|
3287
3294
|
));
|
|
3288
3295
|
}
|
|
3289
|
-
this._bodyEl &&
|
|
3290
|
-
this.#
|
|
3296
|
+
this._bodyEl && Ft(this, this._bodyEl, i), this.#y?.disconnect(), this._virtualization.viewportEl && (this.#y = new ResizeObserver(() => {
|
|
3297
|
+
this.#qe(), this.#s.requestPhase(A.VIRTUALIZATION, "resize-observer");
|
|
3291
3298
|
}), this.#y.observe(this._virtualization.viewportEl)), this.#n.addEventListener(
|
|
3292
3299
|
"focusin",
|
|
3293
3300
|
() => {
|
|
@@ -3304,11 +3311,11 @@ class I extends HTMLElement {
|
|
|
3304
3311
|
);
|
|
3305
3312
|
}
|
|
3306
3313
|
#U = !1;
|
|
3307
|
-
#
|
|
3314
|
+
#_e() {
|
|
3308
3315
|
if (this.#U) return;
|
|
3309
3316
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
3310
3317
|
e && (this.#U = !0, this.#p?.disconnect(), this.#p = new ResizeObserver(() => {
|
|
3311
|
-
this.#
|
|
3318
|
+
this.#ae();
|
|
3312
3319
|
}), this.#p.observe(e));
|
|
3313
3320
|
}
|
|
3314
3321
|
addEventListener(e, i, o) {
|
|
@@ -3320,7 +3327,7 @@ class I extends HTMLElement {
|
|
|
3320
3327
|
#L(e, i) {
|
|
3321
3328
|
this.dispatchEvent(new CustomEvent(e, { detail: i, bubbles: !0, composed: !0 }));
|
|
3322
3329
|
}
|
|
3323
|
-
#
|
|
3330
|
+
#Ee() {
|
|
3324
3331
|
this._bodyEl?.querySelectorAll(".data-grid-row")?.forEach((i, o) => {
|
|
3325
3332
|
const n = o === this._focusRow;
|
|
3326
3333
|
i.setAttribute("aria-selected", String(n)), i.querySelectorAll(".cell").forEach((r, s) => {
|
|
@@ -3329,9 +3336,9 @@ class I extends HTMLElement {
|
|
|
3329
3336
|
});
|
|
3330
3337
|
}
|
|
3331
3338
|
#V(e) {
|
|
3332
|
-
this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#
|
|
3339
|
+
this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#Se()));
|
|
3333
3340
|
}
|
|
3334
|
-
#
|
|
3341
|
+
#Se() {
|
|
3335
3342
|
if (!this.#w || !this.#f) {
|
|
3336
3343
|
this.#w = !1;
|
|
3337
3344
|
return;
|
|
@@ -3343,69 +3350,69 @@ class I extends HTMLElement {
|
|
|
3343
3350
|
gridConfig: !1,
|
|
3344
3351
|
fitMode: !1
|
|
3345
3352
|
}, e.gridConfig) {
|
|
3346
|
-
this.#
|
|
3353
|
+
this.#xe(), e.rows && this.#ce();
|
|
3347
3354
|
return;
|
|
3348
3355
|
}
|
|
3349
|
-
e.columns && this.#
|
|
3356
|
+
e.columns && this.#Ae(), e.rows && this.#ce(), e.fitMode && this.#Te();
|
|
3350
3357
|
}
|
|
3351
|
-
#
|
|
3358
|
+
#ce() {
|
|
3352
3359
|
this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#B(), this.#s.requestPhase(A.ROWS, "applyRowsUpdate");
|
|
3353
3360
|
}
|
|
3354
3361
|
#B() {
|
|
3355
3362
|
this.#S.clear();
|
|
3356
3363
|
const e = this.#o.getRowId;
|
|
3357
3364
|
this._rows.forEach((i, o) => {
|
|
3358
|
-
const n = this.#
|
|
3365
|
+
const n = this.#de(i, e);
|
|
3359
3366
|
n !== void 0 && this.#S.set(n, { row: i, index: o });
|
|
3360
3367
|
});
|
|
3361
3368
|
}
|
|
3362
|
-
#
|
|
3369
|
+
#de(e, i) {
|
|
3363
3370
|
if (i)
|
|
3364
3371
|
return i(e);
|
|
3365
3372
|
const o = e;
|
|
3366
3373
|
if ("id" in o && o.id != null) return String(o.id);
|
|
3367
3374
|
if ("_id" in o && o._id != null) return String(o._id);
|
|
3368
3375
|
}
|
|
3369
|
-
#
|
|
3370
|
-
const o = this.#
|
|
3376
|
+
#Re(e, i) {
|
|
3377
|
+
const o = this.#de(e, i);
|
|
3371
3378
|
if (o === void 0)
|
|
3372
3379
|
throw new Error(
|
|
3373
3380
|
'[tbw-grid] Cannot determine row ID. Configure getRowId in gridConfig or ensure rows have an "id" property.'
|
|
3374
3381
|
);
|
|
3375
3382
|
return o;
|
|
3376
3383
|
}
|
|
3377
|
-
#
|
|
3384
|
+
#Ae() {
|
|
3378
3385
|
Y(this), this.#i.merge(), this.#P();
|
|
3379
3386
|
}
|
|
3380
|
-
#
|
|
3387
|
+
#Te() {
|
|
3381
3388
|
this.#i.merge(), this.#o.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, Te(this)) : (this._columns.forEach((i) => {
|
|
3382
3389
|
!i.__userResized && i.__autoSized && delete i.width;
|
|
3383
3390
|
}), V(this));
|
|
3384
3391
|
}
|
|
3385
|
-
#
|
|
3392
|
+
#xe() {
|
|
3386
3393
|
qe(this, this.#e), $e(this, this.#e);
|
|
3387
3394
|
const e = !!this.#n.querySelector(".has-shell"), i = !!this.#n.querySelector(".tbw-tool-panel"), o = this.#n.querySelectorAll(".tbw-accordion-section").length;
|
|
3388
|
-
this.#i.parseLightDomColumns(this), this.#i.merge(), this.#
|
|
3389
|
-
const n =
|
|
3395
|
+
this.#i.parseLightDomColumns(this), this.#i.merge(), this.#oe(), We(this, this.#e, this.#re()), this.#i.markSourcesChanged(), this.#i.merge();
|
|
3396
|
+
const n = at(this.#o?.shell), r = (this.#o?.shell?.toolPanels?.length ?? 0) > 0, s = this.#o?.shell?.toolPanels?.length ?? 0;
|
|
3390
3397
|
if (e !== n || !i && r || i && s !== o) {
|
|
3391
|
-
he(this.#e), this.#
|
|
3398
|
+
he(this.#e), this.#ee(), this.#F(), this.#se(), this.#B();
|
|
3392
3399
|
return;
|
|
3393
3400
|
}
|
|
3394
|
-
e && this.#
|
|
3401
|
+
e && this.#He(), this.#B(), this.#s.requestPhase(A.COLUMNS, "applyGridConfigUpdate");
|
|
3395
3402
|
}
|
|
3396
|
-
#
|
|
3403
|
+
#He() {
|
|
3397
3404
|
const e = this.#n.querySelector(".tbw-shell-header");
|
|
3398
3405
|
if (!e) return;
|
|
3399
3406
|
const i = this.#o.shell?.header?.title ?? this.#e.lightDomTitle;
|
|
3400
3407
|
let o = e.querySelector(".tbw-shell-title");
|
|
3401
3408
|
i ? (o || (o = document.createElement("h2"), o.className = "tbw-shell-title", o.setAttribute("part", "shell-title"), e.insertBefore(o, e.firstChild)), o.textContent = i) : o && o.remove();
|
|
3402
3409
|
}
|
|
3403
|
-
#
|
|
3410
|
+
#Le() {
|
|
3404
3411
|
if (this.__rowRenderEpoch++, this.#t) {
|
|
3405
3412
|
const e = this.#X.length > 0 ? this.#X : this._columns, i = e.filter((r) => !r.hidden), o = e.filter((r) => r.hidden), n = this.#t.processColumns([...i]);
|
|
3406
3413
|
if (n !== i) {
|
|
3407
3414
|
const r = new Set(n.map((l) => l.field));
|
|
3408
|
-
!i.some((l) => r.has(l.field)) && n.length > 0 ? this._columns = [...n, ...o] : this._columns = this.#
|
|
3415
|
+
!i.some((l) => r.has(l.field)) && n.length > 0 ? this._columns = [...n, ...o] : this._columns = this.#Pe(
|
|
3409
3416
|
e,
|
|
3410
3417
|
n,
|
|
3411
3418
|
o
|
|
@@ -3414,7 +3421,7 @@ class I extends HTMLElement {
|
|
|
3414
3421
|
this._columns = [...e];
|
|
3415
3422
|
}
|
|
3416
3423
|
}
|
|
3417
|
-
#
|
|
3424
|
+
#Pe(e, i, o) {
|
|
3418
3425
|
if (o.length === 0) return i;
|
|
3419
3426
|
const n = /* @__PURE__ */ new Map();
|
|
3420
3427
|
for (const a of i)
|
|
@@ -3429,42 +3436,44 @@ class I extends HTMLElement {
|
|
|
3429
3436
|
}
|
|
3430
3437
|
return l.push(...s), l;
|
|
3431
3438
|
}
|
|
3432
|
-
#
|
|
3439
|
+
#ze() {
|
|
3433
3440
|
Y(this);
|
|
3434
|
-
const e = Array.isArray(this.#a) ? [...this.#a] : [], i = this.#
|
|
3435
|
-
|
|
3441
|
+
const e = Array.isArray(this.#a) ? [...this.#a] : [], i = this.#Y;
|
|
3442
|
+
i && (this.#Y = !1);
|
|
3443
|
+
const o = i ? e : Bt(this, this.#t?.processRows(e) ?? e);
|
|
3444
|
+
this._rows = o, this.#B(), this._virtualization.variableHeights && this.#J();
|
|
3436
3445
|
}
|
|
3437
|
-
#
|
|
3446
|
+
#Oe(e) {
|
|
3438
3447
|
const i = {
|
|
3439
|
-
...
|
|
3448
|
+
...pt,
|
|
3440
3449
|
...e.animation
|
|
3441
3450
|
}, o = i.mode ?? "reduced-motion";
|
|
3442
3451
|
let n = 1;
|
|
3443
3452
|
o === !1 || o === "off" ? n = 0 : (o === !0 || o === "on") && (n = 1), this.style.setProperty("--tbw-animation-duration", `${i.duration}ms`), this.style.setProperty("--tbw-animation-easing", i.easing ?? "ease-out"), this.style.setProperty("--tbw-animation-enabled", String(n)), this.dataset.animationMode = typeof o == "boolean" ? o ? "on" : "off" : o;
|
|
3444
3453
|
}
|
|
3445
|
-
#
|
|
3446
|
-
if (this.#z || (this.#z = (n, r, s) => this.#t?.renderRow(n, r, s) ?? !1),
|
|
3454
|
+
#K(e, i, o = this.__rowRenderEpoch) {
|
|
3455
|
+
if (this.#z || (this.#z = (n, r, s) => this.#t?.renderRow(n, r, s) ?? !1), kt(this, e, i, o, this.#z), this.#E.size > 0)
|
|
3447
3456
|
for (const n of this.#E)
|
|
3448
|
-
this.#
|
|
3457
|
+
this.#Q(n, !0);
|
|
3449
3458
|
}
|
|
3450
|
-
#
|
|
3451
|
-
#
|
|
3452
|
-
|
|
3459
|
+
#he = ht();
|
|
3460
|
+
#ue(e, i) {
|
|
3461
|
+
ut(this.#he, this.__rowsBodyEl, this._bodyEl, e, i);
|
|
3453
3462
|
}
|
|
3454
3463
|
#De() {
|
|
3455
|
-
|
|
3464
|
+
gt(this.#he, this.__rowsBodyEl, this.#o, this.#e);
|
|
3456
3465
|
}
|
|
3457
|
-
#
|
|
3466
|
+
#fe() {
|
|
3458
3467
|
const e = this.querySelector(".tbw-grid-root");
|
|
3459
|
-
e && (this.#M ? (this.#W || (this.#W =
|
|
3468
|
+
e && (this.#M ? (this.#W || (this.#W = Qt(this.#o?.loadingRenderer)), Zt(e, this.#W)) : Jt(this.#W));
|
|
3460
3469
|
}
|
|
3461
|
-
#
|
|
3470
|
+
#Q(e, i) {
|
|
3462
3471
|
const o = this.#S.get(e);
|
|
3463
3472
|
if (!o) return;
|
|
3464
3473
|
const n = this.findRenderedRowElement?.(o.index);
|
|
3465
|
-
n &&
|
|
3474
|
+
n && ei(n, i);
|
|
3466
3475
|
}
|
|
3467
|
-
#
|
|
3476
|
+
#ge(e, i, o) {
|
|
3468
3477
|
const n = this.#S.get(e);
|
|
3469
3478
|
if (!n) return;
|
|
3470
3479
|
const r = this.findRenderedRowElement?.(n.index);
|
|
@@ -3472,29 +3481,29 @@ class I extends HTMLElement {
|
|
|
3472
3481
|
const s = this._visibleColumns.findIndex((a) => a.field === i);
|
|
3473
3482
|
if (s < 0) return;
|
|
3474
3483
|
const l = r.children[s];
|
|
3475
|
-
l &&
|
|
3484
|
+
l && ti(l, o);
|
|
3476
3485
|
}
|
|
3477
3486
|
#P() {
|
|
3478
3487
|
if (this.isConnected && !(!this._headerRowEl || !this._bodyEl)) {
|
|
3479
|
-
if (this.#i.parseLightDomColumns(this), this.#
|
|
3480
|
-
const e = this.#
|
|
3481
|
-
this.#
|
|
3488
|
+
if (this.#i.parseLightDomColumns(this), this.#D) {
|
|
3489
|
+
const e = this.#D;
|
|
3490
|
+
this.#D = void 0, this.#i.merge();
|
|
3482
3491
|
const i = this.#t?.getAll() ?? [];
|
|
3483
3492
|
this.#i.applyState(e, i);
|
|
3484
3493
|
}
|
|
3485
3494
|
this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), this.#s.requestPhase(A.FULL, "setup");
|
|
3486
3495
|
}
|
|
3487
3496
|
}
|
|
3488
|
-
#
|
|
3497
|
+
#Me(e) {
|
|
3489
3498
|
let i = 0, o = 0, n = 0, r = 0, s = 0;
|
|
3490
3499
|
if (this.#g) {
|
|
3491
3500
|
const a = this._virtualization.container, c = this.#G;
|
|
3492
3501
|
i = c?.scrollLeft ?? 0, o = a?.scrollHeight ?? 0, n = c?.scrollWidth ?? 0, r = a?.clientHeight ?? 0, s = c?.clientWidth ?? 0;
|
|
3493
3502
|
}
|
|
3494
3503
|
if (this.refreshVirtualWindow(!1) && this.#t?.onScrollRender(), this._virtualization.variableHeights && (this.#m && clearTimeout(this.#m), this.#m = window.setTimeout(() => {
|
|
3495
|
-
this.#m = 0, this.#
|
|
3504
|
+
this.#m = 0, this.#be(this._virtualization.start, this._virtualization.end);
|
|
3496
3505
|
}, 100)), this.#g) {
|
|
3497
|
-
const a = this.#
|
|
3506
|
+
const a = this.#te;
|
|
3498
3507
|
a.scrollTop = e, a.scrollLeft = i, a.scrollHeight = o, a.scrollWidth = n, a.clientHeight = r, a.clientWidth = s, this.#t?.onScroll(a);
|
|
3499
3508
|
}
|
|
3500
3509
|
}
|
|
@@ -3508,7 +3517,7 @@ class I extends HTMLElement {
|
|
|
3508
3517
|
}) || null;
|
|
3509
3518
|
}
|
|
3510
3519
|
_dispatchCellClick(e, i, o, n) {
|
|
3511
|
-
const r = this._rows[i], s = this.
|
|
3520
|
+
const r = this._rows[i], s = this._visibleColumns[o];
|
|
3512
3521
|
if (!r || !s) return !1;
|
|
3513
3522
|
const l = s.field, a = r[l], c = new CustomEvent("cell-activate", {
|
|
3514
3523
|
cancelable: !0,
|
|
@@ -3600,11 +3609,14 @@ class I extends HTMLElement {
|
|
|
3600
3609
|
async forceLayout() {
|
|
3601
3610
|
return this.#s.requestPhase(A.FULL, "forceLayout"), this.#s.whenReady();
|
|
3602
3611
|
}
|
|
3612
|
+
suspendProcessing() {
|
|
3613
|
+
this.#Y = !0;
|
|
3614
|
+
}
|
|
3603
3615
|
async getConfig() {
|
|
3604
3616
|
return Object.freeze({ ...this.#o || {} });
|
|
3605
3617
|
}
|
|
3606
3618
|
getRowId(e) {
|
|
3607
|
-
return this.#
|
|
3619
|
+
return this.#Re(e, this.#o.getRowId);
|
|
3608
3620
|
}
|
|
3609
3621
|
getRow(e) {
|
|
3610
3622
|
return this.#S.get(e)?.row;
|
|
@@ -3665,10 +3677,10 @@ class I extends HTMLElement {
|
|
|
3665
3677
|
Se(this, e, i);
|
|
3666
3678
|
}
|
|
3667
3679
|
animateRows(e, i) {
|
|
3668
|
-
|
|
3680
|
+
ai(this, e, i);
|
|
3669
3681
|
}
|
|
3670
3682
|
animateRowById(e, i) {
|
|
3671
|
-
return
|
|
3683
|
+
return ci(this, e, i);
|
|
3672
3684
|
}
|
|
3673
3685
|
setColumnVisible(e, i) {
|
|
3674
3686
|
const o = this.#i.setColumnVisible(e, i);
|
|
@@ -3698,12 +3710,12 @@ class I extends HTMLElement {
|
|
|
3698
3710
|
return this.#i.collectState(e);
|
|
3699
3711
|
}
|
|
3700
3712
|
set columnState(e) {
|
|
3701
|
-
e && (this.#
|
|
3713
|
+
e && (this.#D = e, this.#i.initialColumnState = e, this.#u && this.#ke(e));
|
|
3702
3714
|
}
|
|
3703
3715
|
get columnState() {
|
|
3704
3716
|
return this.getColumnState();
|
|
3705
3717
|
}
|
|
3706
|
-
#
|
|
3718
|
+
#ke(e) {
|
|
3707
3719
|
const i = this.#t?.getAll() ?? [];
|
|
3708
3720
|
this.#i.applyState(e, i), this.#P();
|
|
3709
3721
|
}
|
|
@@ -3712,7 +3724,7 @@ class I extends HTMLElement {
|
|
|
3712
3724
|
this.#i.requestStateChange(e);
|
|
3713
3725
|
}
|
|
3714
3726
|
resetColumnState() {
|
|
3715
|
-
this.#
|
|
3727
|
+
this.#D = void 0, this.__originalOrder = [];
|
|
3716
3728
|
const e = this.#t?.getAll() ?? [];
|
|
3717
3729
|
this.#i.resetState(e), this.#i.merge(), this.#P();
|
|
3718
3730
|
}
|
|
@@ -3764,60 +3776,60 @@ class I extends HTMLElement {
|
|
|
3764
3776
|
unregisterToolbarContent(e) {
|
|
3765
3777
|
this.#c.unregisterToolbarContent(e);
|
|
3766
3778
|
}
|
|
3767
|
-
#
|
|
3779
|
+
#Z = !1;
|
|
3768
3780
|
refreshShellHeader() {
|
|
3769
|
-
this.#
|
|
3770
|
-
this.#
|
|
3781
|
+
this.#Z || (this.#Z = !0, queueMicrotask(() => {
|
|
3782
|
+
this.#Z = !1, this.isConnected && (this.#k(), this.#i.markSourcesChanged(), this.#i.merge(), he(this.#e), this.#ee(), this.#F(), this.#Ie());
|
|
3771
3783
|
}));
|
|
3772
3784
|
}
|
|
3773
|
-
#
|
|
3785
|
+
#Ie() {
|
|
3774
3786
|
const i = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
|
|
3775
3787
|
if (this._headerRowEl = i?.querySelector(".header-row"), this._virtualization.totalHeightEl = i?.querySelector(".faux-vscroll-spacer"), this._virtualization.viewportEl = i?.querySelector(".rows-viewport"), this._bodyEl = i?.querySelector(".rows"), this.__rowsBodyEl = i?.querySelector(".rows-body"), this.#c.isInitialized) {
|
|
3776
3788
|
pe(this.#n, this.#e), de(this.#n, this.#o?.shell, this.#e);
|
|
3777
3789
|
const o = this.#o?.shell?.toolPanel?.defaultOpen;
|
|
3778
3790
|
o && this.#e.toolPanels.has(o) && (this.openToolPanel(), this.#e.expandedSections.add(o));
|
|
3779
3791
|
}
|
|
3780
|
-
this._resizeController = Ie(this), this.#
|
|
3792
|
+
this._resizeController = Ie(this), this.#j(i), this.#s.requestPhase(A.COLUMNS, "shellRefresh");
|
|
3781
3793
|
}
|
|
3782
3794
|
#A = /* @__PURE__ */ new Map();
|
|
3783
3795
|
registerStyles(e, i) {
|
|
3784
3796
|
let o = this.#A.get(e);
|
|
3785
|
-
o || (o = new CSSStyleSheet(), this.#A.set(e, o)), o.replaceSync(i), this.#
|
|
3797
|
+
o || (o = new CSSStyleSheet(), this.#A.set(e, o)), o.replaceSync(i), this.#pe();
|
|
3786
3798
|
}
|
|
3787
3799
|
unregisterStyles(e) {
|
|
3788
|
-
this.#A.delete(e) && this.#
|
|
3800
|
+
this.#A.delete(e) && this.#pe();
|
|
3789
3801
|
}
|
|
3790
3802
|
getRegisteredStyles() {
|
|
3791
3803
|
return Array.from(this.#A.keys());
|
|
3792
3804
|
}
|
|
3793
|
-
#
|
|
3805
|
+
#pe() {
|
|
3794
3806
|
const e = Array.from(this.#A.values()), i = document.adoptedStyleSheets.filter(
|
|
3795
3807
|
(o) => !Array.from(this.#A.values()).includes(o)
|
|
3796
3808
|
);
|
|
3797
3809
|
document.adoptedStyleSheets = [...i, ...e];
|
|
3798
3810
|
}
|
|
3799
3811
|
#k() {
|
|
3800
|
-
qe(this, this.#e), $e(this, this.#e), We(this, this.#e, this.#
|
|
3812
|
+
qe(this, this.#e), $e(this, this.#e), We(this, this.#e, this.#re());
|
|
3801
3813
|
}
|
|
3802
|
-
#
|
|
3814
|
+
#we() {
|
|
3803
3815
|
const e = this.#n.querySelector(".tbw-shell-header");
|
|
3804
3816
|
if (!e) return;
|
|
3805
3817
|
he(this.#e);
|
|
3806
|
-
const i =
|
|
3818
|
+
const i = fi(
|
|
3807
3819
|
this.#o.shell,
|
|
3808
3820
|
this.#e,
|
|
3809
3821
|
this.#o.icons?.toolPanel
|
|
3810
3822
|
), o = document.createElement("div");
|
|
3811
3823
|
o.innerHTML = i;
|
|
3812
3824
|
const n = o.firstElementChild;
|
|
3813
|
-
n && (e.replaceWith(n), this.#
|
|
3825
|
+
n && (e.replaceWith(n), this.#me(), de(this.#n, this.#o?.shell, this.#e));
|
|
3814
3826
|
}
|
|
3815
|
-
#
|
|
3827
|
+
#Ne() {
|
|
3816
3828
|
const e = () => {
|
|
3817
3829
|
const o = this.#e.lightDomTitle, n = this.#e.hasToolButtonsContainer;
|
|
3818
3830
|
this.#k();
|
|
3819
3831
|
const r = this.#e.lightDomTitle, s = this.#e.hasToolButtonsContainer;
|
|
3820
|
-
(r && !o || s && !n) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#
|
|
3832
|
+
(r && !o || s && !n) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#we());
|
|
3821
3833
|
}, i = () => {
|
|
3822
3834
|
this.__lightDomColumnsCache = void 0, this.#P();
|
|
3823
3835
|
};
|
|
@@ -3828,9 +3840,9 @@ class I extends HTMLElement {
|
|
|
3828
3840
|
const e = this.#e.lightDomTitle, i = this.#e.hasToolButtonsContainer;
|
|
3829
3841
|
this.#k();
|
|
3830
3842
|
const o = this.#e.lightDomTitle, n = this.#e.hasToolButtonsContainer;
|
|
3831
|
-
(o && !e || n && !i) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#
|
|
3843
|
+
(o && !e || n && !i) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#we()), this.#s.requestPhase(A.COLUMNS, "refreshColumns");
|
|
3832
3844
|
}
|
|
3833
|
-
#
|
|
3845
|
+
#qe() {
|
|
3834
3846
|
const e = this._virtualization.container, i = this._virtualization.viewportEl ?? e;
|
|
3835
3847
|
i && (this._virtualization.cachedViewportHeight = i.clientHeight), e && (this._virtualization.cachedFauxHeight = e.clientHeight);
|
|
3836
3848
|
const o = this._virtualization.scrollAreaEl;
|
|
@@ -3846,12 +3858,12 @@ class I extends HTMLElement {
|
|
|
3846
3858
|
n = o.cachedFauxHeight, r = o.cachedViewportHeight, s = o.cachedScrollAreaHeight || n;
|
|
3847
3859
|
const l = s - r, a = Math.max(0, n - s);
|
|
3848
3860
|
let c, h = 0;
|
|
3849
|
-
return o.variableHeights && o.positionCache ? c =
|
|
3861
|
+
return o.variableHeights && o.positionCache ? c = Ui(o.positionCache) : (c = e * o.rowHeight, h = this.#t?.getExtraHeight() ?? 0), c + l + h + a;
|
|
3850
3862
|
}
|
|
3851
|
-
#
|
|
3863
|
+
#J() {
|
|
3852
3864
|
if (!this._virtualization.variableHeights) return;
|
|
3853
3865
|
const e = this._rows, i = this._virtualization.rowHeight || 28, o = this.#o.rowHeight, n = this.#o.getRowId, r = n ? (l) => n(l) : void 0;
|
|
3854
|
-
this._virtualization.positionCache =
|
|
3866
|
+
this._virtualization.positionCache = Fi(
|
|
3855
3867
|
e,
|
|
3856
3868
|
this._virtualization.heightCache,
|
|
3857
3869
|
i,
|
|
@@ -3865,7 +3877,7 @@ class I extends HTMLElement {
|
|
|
3865
3877
|
}
|
|
3866
3878
|
}
|
|
3867
3879
|
);
|
|
3868
|
-
const s =
|
|
3880
|
+
const s = Xi(
|
|
3869
3881
|
this._virtualization.positionCache,
|
|
3870
3882
|
e,
|
|
3871
3883
|
i,
|
|
@@ -3884,9 +3896,9 @@ class I extends HTMLElement {
|
|
|
3884
3896
|
this._virtualization.totalHeightEl.style.height = `${l}px`;
|
|
3885
3897
|
}
|
|
3886
3898
|
}
|
|
3887
|
-
#
|
|
3899
|
+
#be(e, i) {
|
|
3888
3900
|
if (!this._virtualization.variableHeights || !this._virtualization.positionCache || !this._bodyEl) return;
|
|
3889
|
-
const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r =
|
|
3901
|
+
const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r = Gi(
|
|
3890
3902
|
{
|
|
3891
3903
|
positionCache: this._virtualization.positionCache,
|
|
3892
3904
|
heightCache: this._virtualization.heightCache,
|
|
@@ -3908,9 +3920,9 @@ class I extends HTMLElement {
|
|
|
3908
3920
|
if (!this._bodyEl) return !1;
|
|
3909
3921
|
const o = this._rows.length;
|
|
3910
3922
|
if (!this._virtualization.enabled)
|
|
3911
|
-
return this.#
|
|
3923
|
+
return this.#K(0, o), i || this.#t?.afterRender(), !0;
|
|
3912
3924
|
if (this._rows.length <= this._virtualization.bypassThreshold)
|
|
3913
|
-
return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#
|
|
3925
|
+
return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#K(0, o, this.__rowRenderEpoch), e && this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#T(o, !0)}px`), this.#ue(o, this._visibleColumns.length), i || this.#t?.afterRender(), !0;
|
|
3914
3926
|
const n = this._virtualization.container ?? this, r = this._virtualization.viewportEl ?? n, s = e ? this._virtualization.cachedViewportHeight = r.clientHeight : this._virtualization.cachedViewportHeight || (this._virtualization.cachedViewportHeight = r.clientHeight), l = this._virtualization.rowHeight, a = n.scrollTop;
|
|
3915
3927
|
let c;
|
|
3916
3928
|
const h = this._virtualization.positionCache;
|
|
@@ -3965,29 +3977,29 @@ class I extends HTMLElement {
|
|
|
3965
3977
|
w = c * l + m;
|
|
3966
3978
|
}
|
|
3967
3979
|
const C = -(a - w);
|
|
3968
|
-
return this._bodyEl.style.transform = `translateY(${C}px)`, this.#
|
|
3980
|
+
return this._bodyEl.style.transform = `translateY(${C}px)`, this.#K(c, p, this.__rowRenderEpoch), e && this._virtualization.variableHeights && this.#be(c, p), this.#ue(o, this._visibleColumns.length), e && !i && (this.#t?.afterRender(), queueMicrotask(() => {
|
|
3969
3981
|
if (!this._virtualization.totalHeightEl) return;
|
|
3970
3982
|
const m = this.#T(o);
|
|
3971
3983
|
this._virtualization.cachedFauxHeight === 0 && this._virtualization.cachedViewportHeight > 0 || (this._virtualization.totalHeightEl.style.height = `${m}px`);
|
|
3972
3984
|
})), !0;
|
|
3973
3985
|
}
|
|
3974
|
-
#
|
|
3986
|
+
#ee() {
|
|
3975
3987
|
this.#k(), this.#i.markSourcesChanged(), this.#i.merge();
|
|
3976
3988
|
const e = this.#o?.shell;
|
|
3977
|
-
|
|
3989
|
+
yi(
|
|
3978
3990
|
this.#n,
|
|
3979
3991
|
e,
|
|
3980
3992
|
{ isPanelOpen: this.#e.isPanelOpen, expandedSections: this.#e.expandedSections },
|
|
3981
3993
|
this.#o?.icons
|
|
3982
|
-
) && (this.#
|
|
3994
|
+
) && (this.#me(), this.#c.setInitialized(!0));
|
|
3983
3995
|
}
|
|
3984
|
-
#
|
|
3985
|
-
|
|
3996
|
+
#me() {
|
|
3997
|
+
gi(this.#n, this.#o?.shell, this.#e, {
|
|
3986
3998
|
onPanelToggle: () => this.toggleToolPanel(),
|
|
3987
3999
|
onSectionToggle: (e) => this.toggleToolPanelSection(e)
|
|
3988
|
-
}), this.#q?.(), this.#q =
|
|
4000
|
+
}), this.#q?.(), this.#q = wi(this.#n, this.#o?.shell, (e) => {
|
|
3989
4001
|
this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
|
|
3990
|
-
}), this.#$?.(), this.#$ =
|
|
4002
|
+
}), this.#$?.(), this.#$ = pi(
|
|
3991
4003
|
this,
|
|
3992
4004
|
this.#o?.shell,
|
|
3993
4005
|
this.#e,
|
|
@@ -3997,14 +4009,14 @@ class I extends HTMLElement {
|
|
|
3997
4009
|
}
|
|
3998
4010
|
customElements.get(I.tagName) || customElements.define(I.tagName, I);
|
|
3999
4011
|
globalThis.DataGridElement = I;
|
|
4000
|
-
const
|
|
4012
|
+
const ao = {
|
|
4001
4013
|
CAN_MOVE_COLUMN: "canMoveColumn",
|
|
4002
4014
|
GET_CONTEXT_MENU_ITEMS: "getContextMenuItems"
|
|
4003
4015
|
};
|
|
4004
|
-
class
|
|
4016
|
+
class co {
|
|
4005
4017
|
static dependencies;
|
|
4006
4018
|
static manifest;
|
|
4007
|
-
version = "1.
|
|
4019
|
+
version = "1.20.0";
|
|
4008
4020
|
styles;
|
|
4009
4021
|
cellRenderers;
|
|
4010
4022
|
headerRenderers;
|
|
@@ -4143,7 +4155,7 @@ const H = {
|
|
|
4143
4155
|
GROUP_KEY: "data-group-key",
|
|
4144
4156
|
TREE_LEVEL: "data-tree-level",
|
|
4145
4157
|
STICKY: "data-sticky"
|
|
4146
|
-
},
|
|
4158
|
+
}, ho = {
|
|
4147
4159
|
ROOT: `.${H.ROOT}`,
|
|
4148
4160
|
HEADER: `.${H.HEADER}`,
|
|
4149
4161
|
HEADER_ROW: `.${H.HEADER_ROW}`,
|
|
@@ -4158,7 +4170,7 @@ const H = {
|
|
|
4158
4170
|
CELL_AT: (t, e) => `.${H.DATA_ROW}[${ee.ROW_INDEX}="${t}"] .${H.DATA_CELL}[${ee.COL_INDEX}="${e}"]`,
|
|
4159
4171
|
SELECTED_ROWS: `.${H.DATA_ROW}.${H.SELECTED}`,
|
|
4160
4172
|
EDITING_CELL: `.${H.DATA_CELL}.${H.EDITING}`
|
|
4161
|
-
},
|
|
4173
|
+
}, uo = {
|
|
4162
4174
|
COLOR_BG: "--tbw-color-bg",
|
|
4163
4175
|
COLOR_FG: "--tbw-color-fg",
|
|
4164
4176
|
COLOR_FG_MUTED: "--tbw-color-fg-muted",
|
|
@@ -4177,14 +4189,14 @@ const H = {
|
|
|
4177
4189
|
BORDER_RADIUS: "--tbw-border-radius",
|
|
4178
4190
|
FOCUS_OUTLINE: "--tbw-focus-outline"
|
|
4179
4191
|
};
|
|
4180
|
-
function
|
|
4192
|
+
function fo(t) {
|
|
4181
4193
|
const e = document.createElement("tbw-grid");
|
|
4182
4194
|
return t && (e.gridConfig = t), e;
|
|
4183
4195
|
}
|
|
4184
|
-
function
|
|
4196
|
+
function go(t, e = document) {
|
|
4185
4197
|
return e.querySelector(t);
|
|
4186
4198
|
}
|
|
4187
|
-
const
|
|
4199
|
+
const po = {
|
|
4188
4200
|
CELL_CHANGE: "cell-change",
|
|
4189
4201
|
CELL_COMMIT: "cell-commit",
|
|
4190
4202
|
ROW_COMMIT: "row-commit",
|
|
@@ -4199,7 +4211,7 @@ const go = {
|
|
|
4199
4211
|
CELL_ACTIVATE: "cell-activate",
|
|
4200
4212
|
GROUP_TOGGLE: "group-toggle",
|
|
4201
4213
|
COLUMN_STATE_CHANGE: "column-state-change"
|
|
4202
|
-
},
|
|
4214
|
+
}, wo = {
|
|
4203
4215
|
SELECTION_CHANGE: "selection-change",
|
|
4204
4216
|
TREE_EXPAND: "tree-expand",
|
|
4205
4217
|
FILTER_CHANGE: "filter-change",
|
|
@@ -4228,7 +4240,7 @@ const go = {
|
|
|
4228
4240
|
max: (t, e) => t.length ? Math.max(...t.map((i) => Number(i[e]) || -1 / 0)) : 0,
|
|
4229
4241
|
first: (t, e) => t[0]?.[e],
|
|
4230
4242
|
last: (t, e) => t[t.length - 1]?.[e]
|
|
4231
|
-
}, U = /* @__PURE__ */ new Map(),
|
|
4243
|
+
}, U = /* @__PURE__ */ new Map(), D = {
|
|
4232
4244
|
register(t, e) {
|
|
4233
4245
|
U.set(t, e);
|
|
4234
4246
|
},
|
|
@@ -4258,50 +4270,50 @@ const go = {
|
|
|
4258
4270
|
first: (t) => t[0] ?? 0,
|
|
4259
4271
|
last: (t) => t[t.length - 1] ?? 0
|
|
4260
4272
|
};
|
|
4261
|
-
function
|
|
4273
|
+
function no(t) {
|
|
4262
4274
|
return Xe[t] ?? Xe.sum;
|
|
4263
4275
|
}
|
|
4264
|
-
function
|
|
4265
|
-
return
|
|
4276
|
+
function bo(t, e) {
|
|
4277
|
+
return no(t)(e);
|
|
4266
4278
|
}
|
|
4267
|
-
const
|
|
4279
|
+
const mo = D.register.bind(D), vo = D.unregister.bind(D), Co = D.get.bind(D), yo = D.run.bind(D), _o = D.list.bind(D);
|
|
4268
4280
|
export {
|
|
4269
|
-
|
|
4270
|
-
|
|
4281
|
+
co as BaseGridPlugin,
|
|
4282
|
+
pt as DEFAULT_ANIMATION_CONFIG,
|
|
4271
4283
|
M as DEFAULT_GRID_ICONS,
|
|
4272
|
-
|
|
4284
|
+
po as DGEvents,
|
|
4273
4285
|
I as DataGridElement,
|
|
4274
4286
|
et as F,
|
|
4275
4287
|
G as FitModeEnum,
|
|
4276
|
-
|
|
4288
|
+
uo as GridCSSVars,
|
|
4277
4289
|
H as GridClasses,
|
|
4278
4290
|
ee as GridDataAttrs,
|
|
4279
4291
|
I as GridElement,
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4292
|
+
ho as GridSelectors,
|
|
4293
|
+
ao as PLUGIN_QUERIES,
|
|
4294
|
+
wo as PluginEvents,
|
|
4283
4295
|
ne as PluginManager,
|
|
4284
4296
|
A as RenderPhase,
|
|
4285
4297
|
Ce as a,
|
|
4286
|
-
|
|
4298
|
+
D as aggregatorRegistry,
|
|
4287
4299
|
k as b,
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4300
|
+
ot as builtInSort,
|
|
4301
|
+
so as c,
|
|
4302
|
+
fo as createGrid,
|
|
4291
4303
|
Qe as d,
|
|
4292
|
-
|
|
4304
|
+
Vt as defaultComparator,
|
|
4293
4305
|
W as e,
|
|
4294
4306
|
_e as f,
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4307
|
+
Ot as g,
|
|
4308
|
+
Co as getAggregator,
|
|
4309
|
+
no as getValueAggregator,
|
|
4310
|
+
_o as listAggregators,
|
|
4311
|
+
go as queryGrid,
|
|
4312
|
+
ro as r,
|
|
4313
|
+
mo as registerAggregator,
|
|
4314
|
+
yo as runAggregator,
|
|
4315
|
+
bo as runValueAggregator,
|
|
4316
|
+
lo as s,
|
|
4317
|
+
vo as unregisterAggregator
|
|
4306
4318
|
};
|
|
4307
4319
|
//# sourceMappingURL=index.js.map
|