@toolbox-web/grid 1.13.0 → 1.14.1
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 +1850 -1742
- package/all.js.map +1 -1
- package/index.js +159 -139
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/loading.d.ts +2 -0
- package/lib/core/internal/loading.d.ts.map +1 -1
- package/lib/core/internal/row-animation.d.ts.map +1 -1
- package/lib/core/internal/rows.d.ts.map +1 -1
- package/lib/core/plugin/types.d.ts +1 -1
- package/lib/core/plugin/types.d.ts.map +1 -1
- package/lib/core/types.d.ts +44 -1
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts +69 -8
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.d.ts +1 -1
- package/lib/plugins/clipboard/index.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +257 -192
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/clipboard/types.d.ts +31 -0
- package/lib/plugins/clipboard/types.d.ts.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +8 -0
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.js +75 -60
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/context-menu/types.d.ts +7 -0
- package/lib/plugins/context-menu/types.d.ts.map +1 -1
- package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
- package/lib/plugins/editing/editors.d.ts +2 -2
- package/lib/plugins/editing/editors.d.ts.map +1 -1
- package/lib/plugins/editing/index.js +420 -381
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/types.d.ts +6 -23
- package/lib/plugins/editing/types.d.ts.map +1 -1
- package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
- package/lib/plugins/export/index.js +75 -66
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +2 -0
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
- package/lib/plugins/filtering/filter-model.d.ts.map +1 -1
- package/lib/plugins/filtering/index.d.ts +1 -1
- package/lib/plugins/filtering/index.d.ts.map +1 -1
- package/lib/plugins/filtering/index.js +319 -290
- 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/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/PinnedRowsPlugin.d.ts +1 -0
- package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-rows/index.js +118 -87
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pinned-rows/pinned-rows.d.ts +2 -1
- package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +1 -1
- package/lib/plugins/pinned-rows/types.d.ts +23 -2
- package/lib/plugins/pinned-rows/types.d.ts.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 +94 -86
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/shared/data-collection.d.ts +33 -0
- package/lib/plugins/shared/data-collection.d.ts.map +1 -0
- 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 +31 -31
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +4 -4
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +5 -5
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +1 -1
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/editing.umd.js +1 -1
- package/umd/plugins/editing.umd.js.map +1 -1
- package/umd/plugins/export.umd.js +7 -7
- package/umd/plugins/export.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +2 -2
- package/umd/plugins/selection.umd.js.map +1 -1
package/index.js
CHANGED
|
@@ -345,10 +345,10 @@ class Tt {
|
|
|
345
345
|
const e = (this.#o.columns?.length ?? 0) > 0;
|
|
346
346
|
if (!this.#f && e)
|
|
347
347
|
return;
|
|
348
|
-
const i = this.#
|
|
349
|
-
this.#f = !1, this.#a = i, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#o = this.#
|
|
348
|
+
const i = this.#N();
|
|
349
|
+
this.#f = !1, this.#a = i, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#o = this.#x(this.#a), this.#m();
|
|
350
350
|
}
|
|
351
|
-
#
|
|
351
|
+
#x(e) {
|
|
352
352
|
const i = { ...e };
|
|
353
353
|
return e.columns && (i.columns = e.columns.map((o) => ({ ...o }))), e.shell && (i.shell = {
|
|
354
354
|
...e.shell,
|
|
@@ -374,7 +374,7 @@ class Tt {
|
|
|
374
374
|
n && (!o.renderer && !o.viewRenderer && n.renderer && (o.renderer = n.renderer), !o.format && n.format && (o.format = n.format), !o.editor && n.editor && (o.editor = n.editor), !o.editorParams && n.editorParams && (o.editorParams = n.editorParams));
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
#
|
|
377
|
+
#N() {
|
|
378
378
|
const e = this.#l ? { ...this.#l } : {}, i = Array.isArray(e.columns) ? [...e.columns] : [], o = (this.#d ?? []).map((s) => ({
|
|
379
379
|
...s
|
|
380
380
|
}));
|
|
@@ -462,7 +462,7 @@ class Tt {
|
|
|
462
462
|
l.applyColumnState(a.field, a);
|
|
463
463
|
}
|
|
464
464
|
resetState(e) {
|
|
465
|
-
this.#C = void 0, this.#r.setSortState(null), this.#o = this.#
|
|
465
|
+
this.#C = void 0, this.#r.setSortState(null), this.#o = this.#x(this.#a), this.#m();
|
|
466
466
|
for (const i of e)
|
|
467
467
|
if (i.applyColumnState)
|
|
468
468
|
for (const o of this.columns)
|
|
@@ -707,7 +707,10 @@ function zt(t, e, i, o, n) {
|
|
|
707
707
|
h.__epoch = o, h.__rowDataRef = p, h.parentNode !== s && s.appendChild(h);
|
|
708
708
|
continue;
|
|
709
709
|
}
|
|
710
|
-
const w = h.__epoch, C = h.__rowDataRef
|
|
710
|
+
const w = h.__epoch, C = h.__rowDataRef;
|
|
711
|
+
let m = h.children.length;
|
|
712
|
+
m > a && h.lastElementChild?.classList.contains("tbw-row-loading-overlay") && m--;
|
|
713
|
+
const S = w === o && m === a, A = C !== p;
|
|
711
714
|
let v = !1;
|
|
712
715
|
if (S && A) {
|
|
713
716
|
for (let R = 0; R < a; R++)
|
|
@@ -865,7 +868,7 @@ function le(t, e, i, o) {
|
|
|
865
868
|
}
|
|
866
869
|
}
|
|
867
870
|
function V(t, e, i, o) {
|
|
868
|
-
e.innerHTML = "";
|
|
871
|
+
e.classList.remove("tbw-row-loading"), e.removeAttribute("aria-busy"), e.innerHTML = "";
|
|
869
872
|
const n = t._visibleColumns, r = n.length, s = t._focusRow, l = t._focusCol, a = t, c = t._hasAfterCellRenderHook?.() ?? !1, d = document.createDocumentFragment();
|
|
870
873
|
for (let f = 0; f < r; f++) {
|
|
871
874
|
const u = n[f], g = Lt();
|
|
@@ -1306,7 +1309,15 @@ function jt(t) {
|
|
|
1306
1309
|
t?.remove();
|
|
1307
1310
|
}
|
|
1308
1311
|
function Kt(t, e) {
|
|
1309
|
-
|
|
1312
|
+
if (e) {
|
|
1313
|
+
if (t.classList.add("tbw-row-loading"), t.setAttribute("aria-busy", "true"), !t.querySelector(".tbw-row-loading-overlay")) {
|
|
1314
|
+
const i = document.createElement("div");
|
|
1315
|
+
i.className = "tbw-row-loading-overlay", i.setAttribute("aria-hidden", "true");
|
|
1316
|
+
const o = document.createElement("div");
|
|
1317
|
+
o.className = "tbw-row-loading-spinner", i.appendChild(o), t.appendChild(i);
|
|
1318
|
+
}
|
|
1319
|
+
} else
|
|
1320
|
+
t.classList.remove("tbw-row-loading"), t.removeAttribute("aria-busy"), t.querySelector(".tbw-row-loading-overlay")?.remove();
|
|
1310
1321
|
}
|
|
1311
1322
|
function Qt(t, e) {
|
|
1312
1323
|
e ? (t.classList.add("tbw-cell-loading"), t.setAttribute("aria-busy", "true")) : (t.classList.remove("tbw-cell-loading"), t.removeAttribute("aria-busy"));
|
|
@@ -1438,7 +1449,14 @@ function ri(t, e, i) {
|
|
|
1438
1449
|
const o = t._rows ?? [], n = t.getRowId;
|
|
1439
1450
|
if (!n)
|
|
1440
1451
|
return !1;
|
|
1441
|
-
const r = o.findIndex((s) =>
|
|
1452
|
+
const r = o.findIndex((s) => {
|
|
1453
|
+
if (s == null) return !1;
|
|
1454
|
+
try {
|
|
1455
|
+
return n(s) === e;
|
|
1456
|
+
} catch {
|
|
1457
|
+
return !1;
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1442
1460
|
return r < 0 ? !1 : ye(t, r, i);
|
|
1443
1461
|
}
|
|
1444
1462
|
function Z(t, e, i) {
|
|
@@ -2688,7 +2706,7 @@ class oe {
|
|
|
2688
2706
|
return e.sort((i, o) => (i.content.order ?? 0) - (o.content.order ?? 0));
|
|
2689
2707
|
}
|
|
2690
2708
|
}
|
|
2691
|
-
const Ui = "@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}}", Vi = '@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)}}}', Bi = '@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}}}}}', Gi = '@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;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);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:11}}.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:10;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:11}}}', Xi = "@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}}}}", Yi = "@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}}}", Ki = "@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}}}", Qi = "@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-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid 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: 2px solid 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)}}", Zi = `/**
|
|
2709
|
+
const Ui = "@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}}", Vi = '@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)}}}', Bi = '@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}}}}}', Gi = '@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}}}', Xi = "@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}}}}", Yi = "@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}}}", Ki = "@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}}}", Qi = "@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)}}", Zi = `/**
|
|
2692
2710
|
* tbw-grid Light DOM Styles
|
|
2693
2711
|
*
|
|
2694
2712
|
* This stylesheet uses CSS nesting to scope all styles to the tbw-grid element.
|
|
@@ -2719,7 +2737,7 @@ ${Xi}
|
|
|
2719
2737
|
`;
|
|
2720
2738
|
class k extends HTMLElement {
|
|
2721
2739
|
static tagName = "tbw-grid";
|
|
2722
|
-
static version = "1.
|
|
2740
|
+
static version = "1.14.1";
|
|
2723
2741
|
static #l = 0;
|
|
2724
2742
|
static adapters = [];
|
|
2725
2743
|
static registerAdapter(e) {
|
|
@@ -2756,15 +2774,15 @@ class k extends HTMLElement {
|
|
|
2756
2774
|
#C = 0;
|
|
2757
2775
|
#r = null;
|
|
2758
2776
|
#g = !1;
|
|
2759
|
-
#
|
|
2777
|
+
#x = !1;
|
|
2760
2778
|
#m = 0;
|
|
2761
2779
|
#z;
|
|
2762
|
-
#
|
|
2780
|
+
#N = yi();
|
|
2763
2781
|
#b;
|
|
2764
2782
|
#y;
|
|
2765
2783
|
#p;
|
|
2766
|
-
#
|
|
2767
|
-
#
|
|
2784
|
+
#S;
|
|
2785
|
+
#J = {
|
|
2768
2786
|
scrollTop: 0,
|
|
2769
2787
|
scrollLeft: 0,
|
|
2770
2788
|
scrollHeight: 0,
|
|
@@ -2774,19 +2792,19 @@ class k extends HTMLElement {
|
|
|
2774
2792
|
};
|
|
2775
2793
|
#e;
|
|
2776
2794
|
#_;
|
|
2777
|
-
#
|
|
2795
|
+
#I = !1;
|
|
2778
2796
|
#D;
|
|
2779
2797
|
#V;
|
|
2780
2798
|
#O;
|
|
2781
2799
|
#t;
|
|
2782
2800
|
#i = ai();
|
|
2783
2801
|
#c;
|
|
2784
|
-
#
|
|
2785
|
-
#
|
|
2786
|
-
#
|
|
2802
|
+
#q;
|
|
2803
|
+
#M = !1;
|
|
2804
|
+
#E = /* @__PURE__ */ new Set();
|
|
2787
2805
|
#H = /* @__PURE__ */ new Map();
|
|
2788
2806
|
#$;
|
|
2789
|
-
#
|
|
2807
|
+
#R = /* @__PURE__ */ new Map();
|
|
2790
2808
|
_rows = [];
|
|
2791
2809
|
#B = [];
|
|
2792
2810
|
get _columns() {
|
|
@@ -2878,35 +2896,35 @@ class k extends HTMLElement {
|
|
|
2878
2896
|
this.#t?.setFitMode(e), i !== e && this.#U("fitMode");
|
|
2879
2897
|
}
|
|
2880
2898
|
get loading() {
|
|
2881
|
-
return this.#
|
|
2899
|
+
return this.#M;
|
|
2882
2900
|
}
|
|
2883
2901
|
set loading(e) {
|
|
2884
|
-
const i = this.#
|
|
2885
|
-
this.#
|
|
2902
|
+
const i = this.#M;
|
|
2903
|
+
this.#M = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#he();
|
|
2886
2904
|
}
|
|
2887
2905
|
setRowLoading(e, i) {
|
|
2888
|
-
const o = this.#
|
|
2889
|
-
i ? this.#
|
|
2906
|
+
const o = this.#E.has(e);
|
|
2907
|
+
i ? this.#E.add(e) : this.#E.delete(e), o !== i && this.#j(e, i);
|
|
2890
2908
|
}
|
|
2891
2909
|
setCellLoading(e, i, o) {
|
|
2892
2910
|
let n = this.#H.get(e);
|
|
2893
2911
|
const r = n?.has(i) ?? !1;
|
|
2894
|
-
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.#
|
|
2912
|
+
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.#ue(e, i, o);
|
|
2895
2913
|
}
|
|
2896
2914
|
isRowLoading(e) {
|
|
2897
|
-
return this.#
|
|
2915
|
+
return this.#E.has(e);
|
|
2898
2916
|
}
|
|
2899
2917
|
isCellLoading(e, i) {
|
|
2900
2918
|
return this.#H.get(e)?.has(i) ?? !1;
|
|
2901
2919
|
}
|
|
2902
2920
|
clearAllLoading() {
|
|
2903
2921
|
this.loading = !1;
|
|
2904
|
-
for (const e of this.#
|
|
2905
|
-
this.#
|
|
2906
|
-
this.#
|
|
2922
|
+
for (const e of this.#E)
|
|
2923
|
+
this.#j(e, !1);
|
|
2924
|
+
this.#E.clear();
|
|
2907
2925
|
for (const [e, i] of this.#H)
|
|
2908
2926
|
for (const o of i)
|
|
2909
|
-
this.#
|
|
2927
|
+
this.#ue(e, o, !1);
|
|
2910
2928
|
this.#H.clear();
|
|
2911
2929
|
}
|
|
2912
2930
|
get effectiveConfig() {
|
|
@@ -2916,25 +2934,25 @@ class k extends HTMLElement {
|
|
|
2916
2934
|
return this.#b || (this.#b = new AbortController()), this.#b.signal;
|
|
2917
2935
|
}
|
|
2918
2936
|
constructor() {
|
|
2919
|
-
super(), this.#
|
|
2937
|
+
super(), this.#be(), this.#d = new Promise((e) => this.#h = e), this.#s = new Zt({
|
|
2920
2938
|
mergeConfig: () => {
|
|
2921
|
-
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#
|
|
2939
|
+
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#te(), Pi(this.#o, this.#e?.getPlugins() ?? []), zi(this.#e?.getPlugins() ?? []), Oi(this.#e?.getPlugins() ?? []), this.#Pe(), this.#B = [...this._columns];
|
|
2922
2940
|
},
|
|
2923
|
-
processColumns: () => this.#
|
|
2924
|
-
processRows: () => this.#
|
|
2941
|
+
processColumns: () => this.#xe(),
|
|
2942
|
+
processRows: () => this.#He(),
|
|
2925
2943
|
renderHeader: () => ie(this),
|
|
2926
2944
|
updateTemplate: () => U(this),
|
|
2927
2945
|
renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
|
|
2928
2946
|
afterRender: () => {
|
|
2929
2947
|
this.#e?.afterRender(), this._virtualization.enabled && this._virtualization.totalHeightEl && queueMicrotask(() => {
|
|
2930
2948
|
if (!this._virtualization.totalHeightEl) return;
|
|
2931
|
-
const i = this.#
|
|
2949
|
+
const i = this.#T(this._rows.length);
|
|
2932
2950
|
this._virtualization.totalHeightEl.style.height = `${i}px`;
|
|
2933
|
-
}), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Se(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, q(this)), this._virtualization.enabled && !this.#F && this.#
|
|
2951
|
+
}), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Se(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, q(this)), this._virtualization.enabled && !this.#F && this.#Ce(), this.#x && (this.#x = !1, requestAnimationFrame(() => {
|
|
2934
2952
|
requestAnimationFrame(() => {
|
|
2935
|
-
this.#
|
|
2953
|
+
this.#ve();
|
|
2936
2954
|
});
|
|
2937
|
-
}));
|
|
2955
|
+
})), this.#M && this.#he();
|
|
2938
2956
|
},
|
|
2939
2957
|
isConnected: () => this.isConnected && this.#f
|
|
2940
2958
|
}), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = gi(this.#i, {
|
|
@@ -2967,7 +2985,7 @@ class k extends HTMLElement {
|
|
|
2967
2985
|
setRowHeight: (e) => {
|
|
2968
2986
|
this._virtualization.rowHeight = e;
|
|
2969
2987
|
},
|
|
2970
|
-
applyAnimationConfig: (e) => this.#
|
|
2988
|
+
applyAnimationConfig: (e) => this.#Le(e),
|
|
2971
2989
|
getShellLightDomTitle: () => this.#i.lightDomTitle,
|
|
2972
2990
|
getShellToolPanels: () => this.#i.toolPanels,
|
|
2973
2991
|
getShellHeaderContents: () => this.#i.headerContents,
|
|
@@ -2976,7 +2994,7 @@ class k extends HTMLElement {
|
|
|
2976
2994
|
getShellHasToolButtonsContainer: () => this.#i.hasToolButtonsContainer
|
|
2977
2995
|
});
|
|
2978
2996
|
}
|
|
2979
|
-
async #
|
|
2997
|
+
async #be() {
|
|
2980
2998
|
await Ci(Zi);
|
|
2981
2999
|
}
|
|
2982
3000
|
getPlugin(e) {
|
|
@@ -3000,7 +3018,7 @@ class k extends HTMLElement {
|
|
|
3000
3018
|
requestAfterRender() {
|
|
3001
3019
|
this.#s.requestPhase(x.STYLE, "plugin:requestAfterRender");
|
|
3002
3020
|
}
|
|
3003
|
-
#
|
|
3021
|
+
#ee() {
|
|
3004
3022
|
this.#e = new oe(this);
|
|
3005
3023
|
const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
|
|
3006
3024
|
this.#e.attachAll(i);
|
|
@@ -3009,7 +3027,7 @@ class k extends HTMLElement {
|
|
|
3009
3027
|
const e = this.#e?.getPluginStyles() ?? [];
|
|
3010
3028
|
mi(e);
|
|
3011
3029
|
}
|
|
3012
|
-
#
|
|
3030
|
+
#te() {
|
|
3013
3031
|
const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
|
|
3014
3032
|
if (this.#_ === i)
|
|
3015
3033
|
return;
|
|
@@ -3029,17 +3047,17 @@ class k extends HTMLElement {
|
|
|
3029
3047
|
const r = this.#i.headerContentCleanups.get(n);
|
|
3030
3048
|
r && (r(), this.#i.headerContentCleanups.delete(n)), this.#i.headerContents.delete(n);
|
|
3031
3049
|
}
|
|
3032
|
-
this.#
|
|
3050
|
+
this.#ee(), this.#W(), this.#_ = i, this.#re(), this.#ie();
|
|
3033
3051
|
const o = this.#g;
|
|
3034
3052
|
if (this.#g = this.#e?.getAll().some((n) => n.onScroll) ?? !1, !o && this.#g) {
|
|
3035
3053
|
const r = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
|
|
3036
3054
|
this.#G(r);
|
|
3037
3055
|
}
|
|
3038
3056
|
}
|
|
3039
|
-
#
|
|
3057
|
+
#me() {
|
|
3040
3058
|
this.#e?.detachAll();
|
|
3041
3059
|
}
|
|
3042
|
-
#
|
|
3060
|
+
#ie() {
|
|
3043
3061
|
if (!this.#e) return;
|
|
3044
3062
|
const e = this.#e.getToolPanels();
|
|
3045
3063
|
for (const { panel: o } of e)
|
|
@@ -3048,7 +3066,7 @@ class k extends HTMLElement {
|
|
|
3048
3066
|
for (const { content: o } of i)
|
|
3049
3067
|
this.#i.headerContents.has(o.id) || this.#i.headerContents.set(o.id, o);
|
|
3050
3068
|
}
|
|
3051
|
-
#
|
|
3069
|
+
#oe() {
|
|
3052
3070
|
const e = k.getAdapters();
|
|
3053
3071
|
if (e.length === 0 && !this.__frameworkAdapter) return;
|
|
3054
3072
|
const i = this.__frameworkAdapter;
|
|
@@ -3065,9 +3083,9 @@ class k extends HTMLElement {
|
|
|
3065
3083
|
};
|
|
3066
3084
|
}
|
|
3067
3085
|
connectedCallback() {
|
|
3068
|
-
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", k.version), this.id || (this.id = `tbw-grid-${++k.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#
|
|
3086
|
+
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", k.version), this.id || (this.id = `tbw-grid-${++k.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#I = !1), this.#b = new AbortController(), this.#S && (ze(this.#S), this.#S = void 0), this.#k(), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee();
|
|
3069
3087
|
const e = this.#o?.plugins;
|
|
3070
|
-
this.#_ = Array.isArray(e) ? e : [], this.#
|
|
3088
|
+
this.#_ = Array.isArray(e) ? e : [], this.#ie(), this.#u || (this.#Z(), this.#W(), this.#u = !0), this.#ne(), this.#S = Vt(
|
|
3071
3089
|
() => {
|
|
3072
3090
|
this.#Me();
|
|
3073
3091
|
},
|
|
@@ -3075,7 +3093,7 @@ class k extends HTMLElement {
|
|
|
3075
3093
|
);
|
|
3076
3094
|
}
|
|
3077
3095
|
disconnectedCallback() {
|
|
3078
|
-
this.#
|
|
3096
|
+
this.#S && (ze(this.#S), this.#S = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#me(), fi(this.#i), this.#c.setInitialized(!1), this.#q?.(), this.#q = void 0, rt(this.#N), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#I = !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.#F = !1), X(this), this.#A.clear(), this.#_ = void 0;
|
|
3079
3097
|
for (const e of this._rowPool)
|
|
3080
3098
|
e.remove();
|
|
3081
3099
|
this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
|
|
@@ -3096,24 +3114,24 @@ class k extends HTMLElement {
|
|
|
3096
3114
|
}
|
|
3097
3115
|
else e === "fit-mode" && (this.fitMode = o);
|
|
3098
3116
|
}
|
|
3099
|
-
#
|
|
3117
|
+
#ne() {
|
|
3100
3118
|
const i = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
|
|
3101
3119
|
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) {
|
|
3102
3120
|
fe(this.#n, this.#i), ce(this.#n, this.#o?.shell, this.#i);
|
|
3103
3121
|
const n = this.#o?.shell?.toolPanel?.defaultOpen;
|
|
3104
3122
|
n && this.#i.toolPanels.has(n) && (this.openToolPanel(), this.#i.expandedSections.add(n));
|
|
3105
3123
|
}
|
|
3106
|
-
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = De(this), this.#P(), this.#G(i), this.#
|
|
3124
|
+
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = De(this), this.#P(), this.#G(i), this.#I)
|
|
3107
3125
|
return;
|
|
3108
|
-
this.#
|
|
3126
|
+
this.#I = !0;
|
|
3109
3127
|
const o = this.disconnectSignal;
|
|
3110
|
-
qt(this, this, this.#n, o), this.#
|
|
3128
|
+
qt(this, this, this.#n, o), this.#re(), queueMicrotask(() => this.#ye()), this.#s.requestPhase(x.FULL, "afterConnect");
|
|
3111
3129
|
}
|
|
3112
|
-
#
|
|
3130
|
+
#re() {
|
|
3113
3131
|
const e = this.#o.rowHeight, i = this.#e.hasRowHeightPlugin();
|
|
3114
|
-
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.#
|
|
3132
|
+
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.#Q(), 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.#se());
|
|
3115
3133
|
}
|
|
3116
|
-
#
|
|
3134
|
+
#se() {
|
|
3117
3135
|
if (this.#e.hasExtraHeight())
|
|
3118
3136
|
return;
|
|
3119
3137
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
@@ -3127,7 +3145,7 @@ class k extends HTMLElement {
|
|
|
3127
3145
|
const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
|
|
3128
3146
|
r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(x.VIRTUALIZATION, "measureRowHeight"));
|
|
3129
3147
|
}
|
|
3130
|
-
#
|
|
3148
|
+
#ve() {
|
|
3131
3149
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
3132
3150
|
if (!e) return;
|
|
3133
3151
|
const i = e.querySelectorAll(".cell");
|
|
@@ -3137,8 +3155,8 @@ class k extends HTMLElement {
|
|
|
3137
3155
|
l > o && (o = l);
|
|
3138
3156
|
});
|
|
3139
3157
|
const n = e.getBoundingClientRect(), r = Math.max(n.height, o);
|
|
3140
|
-
if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#
|
|
3141
|
-
const l = this.#
|
|
3158
|
+
if (r > 0 && (Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r), this.#Q(), this._virtualization.totalHeightEl)) {
|
|
3159
|
+
const l = this.#T(this._rows.length);
|
|
3142
3160
|
this._virtualization.totalHeightEl.style.height = `${l}px`;
|
|
3143
3161
|
}
|
|
3144
3162
|
}
|
|
@@ -3175,7 +3193,7 @@ class k extends HTMLElement {
|
|
|
3175
3193
|
this.#V = r, this._virtualization.scrollAreaEl = r, r && this.#g && r.addEventListener(
|
|
3176
3194
|
"scroll",
|
|
3177
3195
|
() => {
|
|
3178
|
-
const a = this.#
|
|
3196
|
+
const a = this.#J;
|
|
3179
3197
|
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.#e?.onScroll(a);
|
|
3180
3198
|
},
|
|
3181
3199
|
{ passive: !0, signal: i }
|
|
@@ -3196,7 +3214,7 @@ class k extends HTMLElement {
|
|
|
3196
3214
|
{ passive: !1, signal: i }
|
|
3197
3215
|
), Ti(
|
|
3198
3216
|
s,
|
|
3199
|
-
this.#
|
|
3217
|
+
this.#N,
|
|
3200
3218
|
{ fauxScrollbar: o, scrollArea: l },
|
|
3201
3219
|
i
|
|
3202
3220
|
));
|
|
@@ -3219,11 +3237,11 @@ class k extends HTMLElement {
|
|
|
3219
3237
|
);
|
|
3220
3238
|
}
|
|
3221
3239
|
#F = !1;
|
|
3222
|
-
#
|
|
3240
|
+
#Ce() {
|
|
3223
3241
|
if (this.#F) return;
|
|
3224
3242
|
const e = this._bodyEl?.querySelector(".data-grid-row");
|
|
3225
3243
|
e && (this.#F = !0, this.#p?.disconnect(), this.#p = new ResizeObserver(() => {
|
|
3226
|
-
this.#
|
|
3244
|
+
this.#se();
|
|
3227
3245
|
}), this.#p.observe(e));
|
|
3228
3246
|
}
|
|
3229
3247
|
addEventListener(e, i, o) {
|
|
@@ -3235,7 +3253,7 @@ class k extends HTMLElement {
|
|
|
3235
3253
|
#L(e, i) {
|
|
3236
3254
|
this.dispatchEvent(new CustomEvent(e, { detail: i, bubbles: !0, composed: !0 }));
|
|
3237
3255
|
}
|
|
3238
|
-
#
|
|
3256
|
+
#ye() {
|
|
3239
3257
|
this._bodyEl?.querySelectorAll(".data-grid-row")?.forEach((i, o) => {
|
|
3240
3258
|
const n = o === this._focusRow;
|
|
3241
3259
|
i.setAttribute("aria-selected", String(n)), i.querySelectorAll(".cell").forEach((r, s) => {
|
|
@@ -3244,9 +3262,9 @@ class k extends HTMLElement {
|
|
|
3244
3262
|
});
|
|
3245
3263
|
}
|
|
3246
3264
|
#U(e) {
|
|
3247
|
-
this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#
|
|
3265
|
+
this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#_e()));
|
|
3248
3266
|
}
|
|
3249
|
-
#
|
|
3267
|
+
#_e() {
|
|
3250
3268
|
if (!this.#w || !this.#f) {
|
|
3251
3269
|
this.#w = !1;
|
|
3252
3270
|
return;
|
|
@@ -3258,64 +3276,64 @@ class k extends HTMLElement {
|
|
|
3258
3276
|
gridConfig: !1,
|
|
3259
3277
|
fitMode: !1
|
|
3260
3278
|
}, e.gridConfig) {
|
|
3261
|
-
this.#
|
|
3279
|
+
this.#Ae(), e.rows && this.#le();
|
|
3262
3280
|
return;
|
|
3263
3281
|
}
|
|
3264
|
-
e.columns && this.#
|
|
3282
|
+
e.columns && this.#Se(), e.rows && this.#le(), e.fitMode && this.#Re();
|
|
3265
3283
|
}
|
|
3266
|
-
#
|
|
3284
|
+
#le() {
|
|
3267
3285
|
this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#X(), this.#s.requestPhase(x.ROWS, "applyRowsUpdate");
|
|
3268
3286
|
}
|
|
3269
3287
|
#X() {
|
|
3270
|
-
this.#
|
|
3288
|
+
this.#R.clear();
|
|
3271
3289
|
const e = this.#o.getRowId;
|
|
3272
3290
|
this._rows.forEach((i, o) => {
|
|
3273
|
-
const n = this.#
|
|
3274
|
-
n !== void 0 && this.#
|
|
3291
|
+
const n = this.#ae(i, e);
|
|
3292
|
+
n !== void 0 && this.#R.set(n, { row: i, index: o });
|
|
3275
3293
|
});
|
|
3276
3294
|
}
|
|
3277
|
-
#
|
|
3295
|
+
#ae(e, i) {
|
|
3278
3296
|
if (i)
|
|
3279
3297
|
return i(e);
|
|
3280
3298
|
const o = e;
|
|
3281
3299
|
if ("id" in o && o.id != null) return String(o.id);
|
|
3282
3300
|
if ("_id" in o && o._id != null) return String(o._id);
|
|
3283
3301
|
}
|
|
3284
|
-
#
|
|
3285
|
-
const o = this.#
|
|
3302
|
+
#Ee(e, i) {
|
|
3303
|
+
const o = this.#ae(e, i);
|
|
3286
3304
|
if (o === void 0)
|
|
3287
3305
|
throw new Error(
|
|
3288
3306
|
'[tbw-grid] Cannot determine row ID. Configure getRowId in gridConfig or ensure rows have an "id" property.'
|
|
3289
3307
|
);
|
|
3290
3308
|
return o;
|
|
3291
3309
|
}
|
|
3292
|
-
#
|
|
3310
|
+
#Se() {
|
|
3293
3311
|
X(this), this.#t.merge(), this.#P();
|
|
3294
3312
|
}
|
|
3295
|
-
#
|
|
3313
|
+
#Re() {
|
|
3296
3314
|
this.#t.merge(), this.#o.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, Se(this)) : (this._columns.forEach((i) => {
|
|
3297
3315
|
!i.__userResized && i.__autoSized && delete i.width;
|
|
3298
3316
|
}), U(this));
|
|
3299
3317
|
}
|
|
3300
|
-
#
|
|
3318
|
+
#Ae() {
|
|
3301
3319
|
Me(this, this.#i), ke(this, this.#i);
|
|
3302
3320
|
const e = !!this.#n.querySelector(".has-shell"), i = !!this.#n.querySelector(".tbw-tool-panel"), o = this.#n.querySelectorAll(".tbw-accordion-section").length;
|
|
3303
|
-
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#
|
|
3321
|
+
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#te(), Ne(this, this.#i, this.#oe()), this.#t.markSourcesChanged(), this.#t.merge();
|
|
3304
3322
|
const n = nt(this.#o?.shell), r = (this.#o?.shell?.toolPanels?.length ?? 0) > 0, s = this.#o?.shell?.toolPanels?.length ?? 0;
|
|
3305
3323
|
if (e !== n || !i && r || i && s !== o) {
|
|
3306
|
-
de(this.#i), this.#
|
|
3324
|
+
de(this.#i), this.#Z(), this.#W(), this.#ne(), this.#X();
|
|
3307
3325
|
return;
|
|
3308
3326
|
}
|
|
3309
|
-
e && this.#
|
|
3327
|
+
e && this.#Te(), this.#X(), this.#s.requestPhase(x.COLUMNS, "applyGridConfigUpdate");
|
|
3310
3328
|
}
|
|
3311
|
-
#
|
|
3329
|
+
#Te() {
|
|
3312
3330
|
const e = this.#n.querySelector(".tbw-shell-header");
|
|
3313
3331
|
if (!e) return;
|
|
3314
3332
|
const i = this.#o.shell?.header?.title ?? this.#i.lightDomTitle;
|
|
3315
3333
|
let o = e.querySelector(".tbw-shell-title");
|
|
3316
3334
|
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();
|
|
3317
3335
|
}
|
|
3318
|
-
#
|
|
3336
|
+
#xe() {
|
|
3319
3337
|
if (this.#e) {
|
|
3320
3338
|
const e = this.#B.length > 0 ? this.#B : this._columns, i = e.filter((r) => !r.hidden), o = e.filter((r) => r.hidden), n = this.#e.processColumns([...i]);
|
|
3321
3339
|
if (n !== i) {
|
|
@@ -3325,12 +3343,12 @@ class k extends HTMLElement {
|
|
|
3325
3343
|
this._columns = [...e];
|
|
3326
3344
|
}
|
|
3327
3345
|
}
|
|
3328
|
-
#
|
|
3346
|
+
#He() {
|
|
3329
3347
|
X(this);
|
|
3330
3348
|
const e = Array.isArray(this.#a) ? [...this.#a] : [], i = this.#e?.processRows(e) ?? e;
|
|
3331
|
-
this._rows = i, this._virtualization.variableHeights && this.#
|
|
3349
|
+
this._rows = i, this._virtualization.variableHeights && this.#Q();
|
|
3332
3350
|
}
|
|
3333
|
-
#
|
|
3351
|
+
#Le(e) {
|
|
3334
3352
|
const i = {
|
|
3335
3353
|
...ht,
|
|
3336
3354
|
...e.animation
|
|
@@ -3339,27 +3357,29 @@ class k extends HTMLElement {
|
|
|
3339
3357
|
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;
|
|
3340
3358
|
}
|
|
3341
3359
|
#Y(e, i, o = this.__rowRenderEpoch) {
|
|
3342
|
-
this.#z || (this.#z = (n, r, s) => this.#e?.renderRow(n, r, s) ?? !1), zt(this, e, i, o, this.#z)
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
#ce(e, i) {
|
|
3346
|
-
at(this.#ae, this.__rowsBodyEl, this._bodyEl, e, i);
|
|
3360
|
+
if (this.#z || (this.#z = (n, r, s) => this.#e?.renderRow(n, r, s) ?? !1), zt(this, e, i, o, this.#z), this.#E.size > 0)
|
|
3361
|
+
for (const n of this.#E)
|
|
3362
|
+
this.#j(n, !0);
|
|
3347
3363
|
}
|
|
3348
|
-
#
|
|
3349
|
-
|
|
3364
|
+
#ce = lt();
|
|
3365
|
+
#de(e, i) {
|
|
3366
|
+
at(this.#ce, this.__rowsBodyEl, this._bodyEl, e, i);
|
|
3350
3367
|
}
|
|
3351
3368
|
#Pe() {
|
|
3369
|
+
dt(this.#ce, this.__rowsBodyEl, this.#o, this.#i);
|
|
3370
|
+
}
|
|
3371
|
+
#he() {
|
|
3352
3372
|
const e = this.querySelector(".tbw-grid-root");
|
|
3353
|
-
e && (this.#
|
|
3373
|
+
e && (this.#M ? (this.#$ || (this.#$ = Xt(this.#o?.loadingRenderer)), Yt(e, this.#$)) : jt(this.#$));
|
|
3354
3374
|
}
|
|
3355
|
-
#
|
|
3356
|
-
const o = this.#
|
|
3375
|
+
#j(e, i) {
|
|
3376
|
+
const o = this.#R.get(e);
|
|
3357
3377
|
if (!o) return;
|
|
3358
3378
|
const n = this.findRenderedRowElement?.(o.index);
|
|
3359
3379
|
n && Kt(n, i);
|
|
3360
3380
|
}
|
|
3361
|
-
#
|
|
3362
|
-
const n = this.#
|
|
3381
|
+
#ue(e, i, o) {
|
|
3382
|
+
const n = this.#R.get(e);
|
|
3363
3383
|
if (!n) return;
|
|
3364
3384
|
const r = this.findRenderedRowElement?.(n.index);
|
|
3365
3385
|
if (!r) return;
|
|
@@ -3386,9 +3406,9 @@ class k extends HTMLElement {
|
|
|
3386
3406
|
i = c?.scrollLeft ?? 0, o = a?.scrollHeight ?? 0, n = c?.scrollWidth ?? 0, r = a?.clientHeight ?? 0, s = c?.clientWidth ?? 0;
|
|
3387
3407
|
}
|
|
3388
3408
|
if (this.refreshVirtualWindow(!1) && this.#e?.onScrollRender(), this._virtualization.variableHeights && (this.#m && clearTimeout(this.#m), this.#m = window.setTimeout(() => {
|
|
3389
|
-
this.#m = 0, this.#
|
|
3409
|
+
this.#m = 0, this.#pe(this._virtualization.start, this._virtualization.end);
|
|
3390
3410
|
}, 100)), this.#g) {
|
|
3391
|
-
const a = this.#
|
|
3411
|
+
const a = this.#J;
|
|
3392
3412
|
a.scrollTop = e, a.scrollLeft = i, a.scrollHeight = o, a.scrollWidth = n, a.clientHeight = r, a.clientWidth = s, this.#e?.onScroll(a);
|
|
3393
3413
|
}
|
|
3394
3414
|
}
|
|
@@ -3497,13 +3517,13 @@ class k extends HTMLElement {
|
|
|
3497
3517
|
return Object.freeze({ ...this.#o || {} });
|
|
3498
3518
|
}
|
|
3499
3519
|
getRowId(e) {
|
|
3500
|
-
return this.#
|
|
3520
|
+
return this.#Ee(e, this.#o.getRowId);
|
|
3501
3521
|
}
|
|
3502
3522
|
getRow(e) {
|
|
3503
|
-
return this.#
|
|
3523
|
+
return this.#R.get(e)?.row;
|
|
3504
3524
|
}
|
|
3505
3525
|
updateRow(e, i, o = "api") {
|
|
3506
|
-
const n = this.#
|
|
3526
|
+
const n = this.#R.get(e);
|
|
3507
3527
|
if (!n)
|
|
3508
3528
|
throw new Error(
|
|
3509
3529
|
`[tbw-grid] Row with ID "${e}" not found. Ensure the row exists and getRowId is correctly configured.`
|
|
@@ -3529,7 +3549,7 @@ class k extends HTMLElement {
|
|
|
3529
3549
|
updateRows(e, i = "api") {
|
|
3530
3550
|
let o = !1;
|
|
3531
3551
|
for (const { id: n, changes: r } of e) {
|
|
3532
|
-
const s = this.#
|
|
3552
|
+
const s = this.#R.get(n);
|
|
3533
3553
|
if (!s)
|
|
3534
3554
|
throw new Error(
|
|
3535
3555
|
`[tbw-grid] Row with ID "${n}" not found. Ensure the row exists and getRowId is correctly configured.`
|
|
@@ -3654,10 +3674,10 @@ class k extends HTMLElement {
|
|
|
3654
3674
|
unregisterToolbarContent(e) {
|
|
3655
3675
|
this.#c.unregisterToolbarContent(e);
|
|
3656
3676
|
}
|
|
3657
|
-
#
|
|
3677
|
+
#K = !1;
|
|
3658
3678
|
refreshShellHeader() {
|
|
3659
|
-
this.#
|
|
3660
|
-
this.#
|
|
3679
|
+
this.#K || (this.#K = !0, queueMicrotask(() => {
|
|
3680
|
+
this.#K = !1, this.isConnected && (this.#k(), this.#t.markSourcesChanged(), this.#t.merge(), de(this.#i), this.#Z(), this.#W(), this.#Oe());
|
|
3661
3681
|
}));
|
|
3662
3682
|
}
|
|
3663
3683
|
#Oe() {
|
|
@@ -3669,27 +3689,27 @@ class k extends HTMLElement {
|
|
|
3669
3689
|
}
|
|
3670
3690
|
this._resizeController = De(this), this.#G(i), this.#s.requestPhase(x.COLUMNS, "shellRefresh");
|
|
3671
3691
|
}
|
|
3672
|
-
#
|
|
3692
|
+
#A = /* @__PURE__ */ new Map();
|
|
3673
3693
|
registerStyles(e, i) {
|
|
3674
|
-
let o = this.#
|
|
3675
|
-
o || (o = new CSSStyleSheet(), this.#
|
|
3694
|
+
let o = this.#A.get(e);
|
|
3695
|
+
o || (o = new CSSStyleSheet(), this.#A.set(e, o)), o.replaceSync(i), this.#fe();
|
|
3676
3696
|
}
|
|
3677
3697
|
unregisterStyles(e) {
|
|
3678
|
-
this.#
|
|
3698
|
+
this.#A.delete(e) && this.#fe();
|
|
3679
3699
|
}
|
|
3680
3700
|
getRegisteredStyles() {
|
|
3681
|
-
return Array.from(this.#
|
|
3701
|
+
return Array.from(this.#A.keys());
|
|
3682
3702
|
}
|
|
3683
|
-
#
|
|
3684
|
-
const e = Array.from(this.#
|
|
3685
|
-
(o) => !Array.from(this.#
|
|
3703
|
+
#fe() {
|
|
3704
|
+
const e = Array.from(this.#A.values()), i = document.adoptedStyleSheets.filter(
|
|
3705
|
+
(o) => !Array.from(this.#A.values()).includes(o)
|
|
3686
3706
|
);
|
|
3687
3707
|
document.adoptedStyleSheets = [...i, ...e];
|
|
3688
3708
|
}
|
|
3689
|
-
#
|
|
3690
|
-
Me(this, this.#i), ke(this, this.#i), Ne(this, this.#i, this.#
|
|
3709
|
+
#k() {
|
|
3710
|
+
Me(this, this.#i), ke(this, this.#i), Ne(this, this.#i, this.#oe());
|
|
3691
3711
|
}
|
|
3692
|
-
#
|
|
3712
|
+
#ge() {
|
|
3693
3713
|
const e = this.#n.querySelector(".tbw-shell-header");
|
|
3694
3714
|
if (!e) return;
|
|
3695
3715
|
de(this.#i);
|
|
@@ -3700,14 +3720,14 @@ class k extends HTMLElement {
|
|
|
3700
3720
|
), o = document.createElement("div");
|
|
3701
3721
|
o.innerHTML = i;
|
|
3702
3722
|
const n = o.firstElementChild;
|
|
3703
|
-
n && (e.replaceWith(n), this.#
|
|
3723
|
+
n && (e.replaceWith(n), this.#we(), ce(this.#n, this.#o?.shell, this.#i));
|
|
3704
3724
|
}
|
|
3705
3725
|
#Me() {
|
|
3706
3726
|
const e = () => {
|
|
3707
3727
|
const o = this.#i.lightDomTitle, n = this.#i.hasToolButtonsContainer;
|
|
3708
|
-
this.#
|
|
3728
|
+
this.#k();
|
|
3709
3729
|
const r = this.#i.lightDomTitle, s = this.#i.hasToolButtonsContainer;
|
|
3710
|
-
(r && !o || s && !n) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#
|
|
3730
|
+
(r && !o || s && !n) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#ge());
|
|
3711
3731
|
}, i = () => {
|
|
3712
3732
|
this.__lightDomColumnsCache = void 0, this.#P();
|
|
3713
3733
|
};
|
|
@@ -3716,9 +3736,9 @@ class k extends HTMLElement {
|
|
|
3716
3736
|
refreshColumns() {
|
|
3717
3737
|
this.__lightDomColumnsCache = void 0, X(this), this.#t.parseLightDomColumns(this);
|
|
3718
3738
|
const e = this.#i.lightDomTitle, i = this.#i.hasToolButtonsContainer;
|
|
3719
|
-
this.#
|
|
3739
|
+
this.#k();
|
|
3720
3740
|
const o = this.#i.lightDomTitle, n = this.#i.hasToolButtonsContainer;
|
|
3721
|
-
(o && !e || n && !i) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#
|
|
3741
|
+
(o && !e || n && !i) && (this.#t.markSourcesChanged(), this.#t.merge(), this.#ge()), this.#s.requestPhase(x.COLUMNS, "refreshColumns");
|
|
3722
3742
|
}
|
|
3723
3743
|
#ke() {
|
|
3724
3744
|
const e = this._virtualization.container, i = this._virtualization.viewportEl ?? e;
|
|
@@ -3726,7 +3746,7 @@ class k extends HTMLElement {
|
|
|
3726
3746
|
const o = this._virtualization.scrollAreaEl;
|
|
3727
3747
|
o && (this._virtualization.cachedScrollAreaHeight = o.clientHeight);
|
|
3728
3748
|
}
|
|
3729
|
-
#
|
|
3749
|
+
#T(e, i = !1) {
|
|
3730
3750
|
const o = this._virtualization;
|
|
3731
3751
|
let n, r, s;
|
|
3732
3752
|
if (i) {
|
|
@@ -3738,7 +3758,7 @@ class k extends HTMLElement {
|
|
|
3738
3758
|
let c, d = 0;
|
|
3739
3759
|
return o.variableHeights && o.positionCache ? c = Ii(o.positionCache) : (c = e * o.rowHeight, d = this.#e?.getExtraHeight() ?? 0), c + l + d + a;
|
|
3740
3760
|
}
|
|
3741
|
-
#
|
|
3761
|
+
#Q() {
|
|
3742
3762
|
if (!this._virtualization.variableHeights) return;
|
|
3743
3763
|
const e = this._rows, i = this._virtualization.rowHeight || 28, o = this.#o.rowHeight, n = this.#o.getRowId, r = n ? (l) => n(l) : void 0;
|
|
3744
3764
|
this._virtualization.positionCache = Ni(
|
|
@@ -3770,11 +3790,11 @@ class k extends HTMLElement {
|
|
|
3770
3790
|
r === void 0 && (r = this.#e?.getRowHeight?.(n, e)), r === void 0 && (r = this._virtualization.rowHeight);
|
|
3771
3791
|
const s = o[e];
|
|
3772
3792
|
if (!(!s || Math.abs(s.height - r) < 1) && (be(o, e, r), this._virtualization.totalHeightEl)) {
|
|
3773
|
-
const l = this.#
|
|
3793
|
+
const l = this.#T(this._rows.length);
|
|
3774
3794
|
this._virtualization.totalHeightEl.style.height = `${l}px`;
|
|
3775
3795
|
}
|
|
3776
3796
|
}
|
|
3777
|
-
#
|
|
3797
|
+
#pe(e, i) {
|
|
3778
3798
|
if (!this._virtualization.variableHeights || !this._virtualization.positionCache || !this._bodyEl) return;
|
|
3779
3799
|
const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r = Wi(
|
|
3780
3800
|
{
|
|
@@ -3790,7 +3810,7 @@ class k extends HTMLElement {
|
|
|
3790
3810
|
o
|
|
3791
3811
|
);
|
|
3792
3812
|
if (r.hasChanges && (this._virtualization.measuredCount = r.measuredCount, this._virtualization.averageHeight = r.averageHeight, this._virtualization.totalHeightEl)) {
|
|
3793
|
-
const s = this.#
|
|
3813
|
+
const s = this.#T(this._rows.length);
|
|
3794
3814
|
this._virtualization.totalHeightEl.style.height = `${s}px`;
|
|
3795
3815
|
}
|
|
3796
3816
|
}
|
|
@@ -3800,7 +3820,7 @@ class k extends HTMLElement {
|
|
|
3800
3820
|
if (!this._virtualization.enabled)
|
|
3801
3821
|
return this.#Y(0, o), i || this.#e?.afterRender(), !0;
|
|
3802
3822
|
if (this._rows.length <= this._virtualization.bypassThreshold)
|
|
3803
|
-
return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#Y(0, o, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#
|
|
3823
|
+
return this._virtualization.start = 0, this._virtualization.end = o, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#Y(0, o, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#T(o, !0)}px`), this.#de(o, this._visibleColumns.length), i || this.#e?.afterRender(), !0;
|
|
3804
3824
|
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;
|
|
3805
3825
|
let c;
|
|
3806
3826
|
const d = this._virtualization.positionCache;
|
|
@@ -3844,7 +3864,7 @@ class k extends HTMLElement {
|
|
|
3844
3864
|
if (h === 0 && s > 0)
|
|
3845
3865
|
return this.#s.requestPhase(x.VIRTUALIZATION, "stale-refs-retry"), !1;
|
|
3846
3866
|
if (e && this._virtualization.totalHeightEl) {
|
|
3847
|
-
const m = this.#
|
|
3867
|
+
const m = this.#T(o);
|
|
3848
3868
|
this._virtualization.totalHeightEl.style.height = `${m}px`;
|
|
3849
3869
|
}
|
|
3850
3870
|
let w;
|
|
@@ -3855,27 +3875,27 @@ class k extends HTMLElement {
|
|
|
3855
3875
|
w = c * l + m;
|
|
3856
3876
|
}
|
|
3857
3877
|
const C = -(a - w);
|
|
3858
|
-
return this._bodyEl.style.transform = `translateY(${C}px)`, this.#Y(c, u, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.variableHeights && this.#
|
|
3878
|
+
return this._bodyEl.style.transform = `translateY(${C}px)`, this.#Y(c, u, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), e && this._virtualization.variableHeights && this.#pe(c, u), this.#de(o, this._visibleColumns.length), e && !i && (this.#e?.afterRender(), queueMicrotask(() => {
|
|
3859
3879
|
if (!this._virtualization.totalHeightEl) return;
|
|
3860
|
-
const m = this.#
|
|
3880
|
+
const m = this.#T(o);
|
|
3861
3881
|
this._virtualization.cachedFauxHeight === 0 && this._virtualization.cachedViewportHeight > 0 || (this._virtualization.totalHeightEl.style.height = `${m}px`);
|
|
3862
3882
|
})), !0;
|
|
3863
3883
|
}
|
|
3864
|
-
#
|
|
3865
|
-
this.#
|
|
3884
|
+
#Z() {
|
|
3885
|
+
this.#k(), this.#t.markSourcesChanged(), this.#t.merge();
|
|
3866
3886
|
const e = this.#o?.shell;
|
|
3867
3887
|
wi(
|
|
3868
3888
|
this.#n,
|
|
3869
3889
|
e,
|
|
3870
3890
|
{ isPanelOpen: this.#i.isPanelOpen, expandedSections: this.#i.expandedSections },
|
|
3871
3891
|
this.#o?.icons
|
|
3872
|
-
) && (this.#
|
|
3892
|
+
) && (this.#we(), this.#c.setInitialized(!0));
|
|
3873
3893
|
}
|
|
3874
|
-
#
|
|
3894
|
+
#we() {
|
|
3875
3895
|
di(this.#n, this.#o?.shell, this.#i, {
|
|
3876
3896
|
onPanelToggle: () => this.toggleToolPanel(),
|
|
3877
3897
|
onSectionToggle: (e) => this.toggleToolPanelSection(e)
|
|
3878
|
-
}), this.#
|
|
3898
|
+
}), this.#q?.(), this.#q = hi(this.#n, this.#o?.shell, (e) => {
|
|
3879
3899
|
this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
|
|
3880
3900
|
});
|
|
3881
3901
|
}
|
|
@@ -3889,7 +3909,7 @@ const oo = {
|
|
|
3889
3909
|
class no {
|
|
3890
3910
|
static dependencies;
|
|
3891
3911
|
static manifest;
|
|
3892
|
-
version = "1.
|
|
3912
|
+
version = "1.14.1";
|
|
3893
3913
|
styles;
|
|
3894
3914
|
cellRenderers;
|
|
3895
3915
|
headerRenderers;
|