@toolbox-web/grid 0.2.2 → 0.2.3

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.
Files changed (36) hide show
  1. package/README.md +46 -0
  2. package/all.d.ts +327 -178
  3. package/all.js +328 -287
  4. package/all.js.map +1 -1
  5. package/index.d.ts +219 -113
  6. package/index.js +1182 -1108
  7. package/index.js.map +1 -1
  8. package/lib/plugins/clipboard/index.js.map +1 -1
  9. package/lib/plugins/column-virtualization/index.js.map +1 -1
  10. package/lib/plugins/context-menu/index.js.map +1 -1
  11. package/lib/plugins/export/index.js.map +1 -1
  12. package/lib/plugins/filtering/index.js.map +1 -1
  13. package/lib/plugins/grouping-columns/index.js.map +1 -1
  14. package/lib/plugins/grouping-rows/index.js.map +1 -1
  15. package/lib/plugins/master-detail/index.js.map +1 -1
  16. package/lib/plugins/multi-sort/index.js.map +1 -1
  17. package/lib/plugins/pinned-columns/index.js +91 -48
  18. package/lib/plugins/pinned-columns/index.js.map +1 -1
  19. package/lib/plugins/pinned-rows/index.js.map +1 -1
  20. package/lib/plugins/pivot/index.js.map +1 -1
  21. package/lib/plugins/reorder/index.js +38 -35
  22. package/lib/plugins/reorder/index.js.map +1 -1
  23. package/lib/plugins/selection/index.js.map +1 -1
  24. package/lib/plugins/server-side/index.js.map +1 -1
  25. package/lib/plugins/tree/index.js.map +1 -1
  26. package/lib/plugins/undo-redo/index.js.map +1 -1
  27. package/lib/plugins/visibility/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/umd/grid.all.umd.js +19 -19
  30. package/umd/grid.all.umd.js.map +1 -1
  31. package/umd/grid.umd.js +16 -16
  32. package/umd/grid.umd.js.map +1 -1
  33. package/umd/plugins/pinned-columns.umd.js +1 -1
  34. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  35. package/umd/plugins/reorder.umd.js +1 -1
  36. package/umd/plugins/reorder.umd.js.map +1 -1
package/all.js CHANGED
@@ -1,5 +1,5 @@
1
- import { BaseGridPlugin as x, DEFAULT_GRID_ICONS as Ke, runAggregator as se, getAggregator as He, getValueAggregator as Ge } from "./index.js";
2
- import { DGEvents as Mn, DataGridElement as Nn, FitModeEnum as Pn, GridCSSVars as qn, GridClasses as Dn, GridDataAttrs as Kn, DataGridElement as Hn, GridSelectors as Gn, PluginEvents as Bn, PluginManager as On, aggregatorRegistry as zn, listAggregators as Vn, registerAggregator as Wn, runValueAggregator as $n, unregisterAggregator as jn } from "./index.js";
1
+ import { BaseGridPlugin as x, DEFAULT_GRID_ICONS as He, runAggregator as se, PLUGIN_QUERIES as Pe, getAggregator as Ge, getValueAggregator as Oe } from "./index.js";
2
+ import { DGEvents as Nn, DataGridElement as Pn, FitModeEnum as qn, GridCSSVars as Dn, GridClasses as Kn, GridDataAttrs as Hn, DataGridElement as Gn, GridSelectors as On, PluginEvents as Bn, PluginManager as Vn, aggregatorRegistry as zn, listAggregators as Wn, registerAggregator as $n, runValueAggregator as jn, unregisterAggregator as Un } from "./index.js";
3
3
  function Be(r, e, t, n) {
4
4
  if (n.processCell)
5
5
  return n.processCell(r, e, t);
@@ -60,7 +60,7 @@ async function ae() {
60
60
  return "";
61
61
  }
62
62
  }
63
- class mn extends x {
63
+ class wn extends x {
64
64
  name = "clipboard";
65
65
  version = "1.0.0";
66
66
  get defaultConfig() {
@@ -280,7 +280,7 @@ function ue(r) {
280
280
  function he(r) {
281
281
  return r.reduce((e, t) => e + Q(t.width), 0);
282
282
  }
283
- function Oe(r, e, t, n, o) {
283
+ function Ve(r, e, t, n, o) {
284
284
  const i = t.length;
285
285
  if (i === 0)
286
286
  return { startCol: 0, endCol: 0, visibleColumns: [] };
@@ -309,10 +309,10 @@ function ze(r, e, t) {
309
309
  }
310
310
  return n;
311
311
  }
312
- function Ve(r, e, t) {
312
+ function We(r, e, t) {
313
313
  return t ? r > e : !1;
314
314
  }
315
- class wn extends x {
315
+ class bn extends x {
316
316
  name = "columnVirtualization";
317
317
  version = "1.0.0";
318
318
  get defaultConfig() {
@@ -343,10 +343,10 @@ class wn extends x {
343
343
  // #endregion
344
344
  // #region Hooks
345
345
  processColumns(e) {
346
- const t = Ve(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
346
+ const t = We(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
347
347
  if (this.isVirtualized = t ?? !1, this.columnWidths = ce(e), this.columnOffsets = ue(e), this.totalWidth = he(e), !t)
348
348
  return this.startCol = 0, this.endCol = e.length - 1, [...e];
349
- const n = this.grid.clientWidth || 800, o = Oe(
349
+ const n = this.grid.clientWidth || 800, o = Ve(
350
350
  this.scrollLeft,
351
351
  n,
352
352
  this.columnOffsets,
@@ -406,14 +406,14 @@ class wn extends x {
406
406
  }
407
407
  // #endregion
408
408
  }
409
- const We = ".tbw-context-menu{position:fixed;background:light-dark(#f5f5f5,#2a2a2a);color:light-dark(#222,#eee);border:1px solid light-dark(#d0d0d4,#454545);border-radius:4px;box-shadow:0 2px 10px #00000026;min-width:160px;padding:4px 0;z-index:10000;font-size:13px;font-family:system-ui,sans-serif}.tbw-context-menu-item{display:flex;align-items:center;padding:6px 12px;cursor:pointer;gap:8px}.tbw-context-menu-item:hover:not(.disabled){background:light-dark(#e8e8e8,#3a3a3a)}.tbw-context-menu-item.disabled{opacity:.5;cursor:default}.tbw-context-menu-item.danger{color:light-dark(#c00,#f66)}.tbw-context-menu-icon{width:16px;text-align:center}.tbw-context-menu-label{flex:1}.tbw-context-menu-shortcut{color:light-dark(#888,#888);font-size:11px}.tbw-context-menu-arrow{font-size:10px;color:light-dark(#888,#888)}.tbw-context-menu-separator{height:1px;background:light-dark(#d0d0d4,#454545);margin:4px 0}";
409
+ const $e = ".tbw-context-menu{position:fixed;background:light-dark(#f5f5f5,#2a2a2a);color:light-dark(#222,#eee);border:1px solid light-dark(#d0d0d4,#454545);border-radius:4px;box-shadow:0 2px 10px #00000026;min-width:160px;padding:4px 0;z-index:10000;font-size:13px;font-family:system-ui,sans-serif}.tbw-context-menu-item{display:flex;align-items:center;padding:6px 12px;cursor:pointer;gap:8px}.tbw-context-menu-item:hover:not(.disabled){background:light-dark(#e8e8e8,#3a3a3a)}.tbw-context-menu-item.disabled{opacity:.5;cursor:default}.tbw-context-menu-item.danger{color:light-dark(#c00,#f66)}.tbw-context-menu-icon{width:16px;text-align:center}.tbw-context-menu-label{flex:1}.tbw-context-menu-shortcut{color:light-dark(#888,#888);font-size:11px}.tbw-context-menu-arrow{font-size:10px;color:light-dark(#888,#888)}.tbw-context-menu-separator{height:1px;background:light-dark(#d0d0d4,#454545);margin:4px 0}";
410
410
  function Y(r, e) {
411
411
  return (typeof r == "function" ? r(e) : r).filter((n) => !(n.hidden === !0 || typeof n.hidden == "function" && n.hidden(e)));
412
412
  }
413
- function $e(r, e) {
413
+ function je(r, e) {
414
414
  return r.disabled === !0 ? !0 : typeof r.disabled == "function" ? r.disabled(e) : !1;
415
415
  }
416
- function Z(r, e, t, n = Ke.submenuArrow) {
416
+ function Z(r, e, t, n = He.submenuArrow) {
417
417
  const o = document.createElement("div");
418
418
  o.className = "tbw-context-menu", o.setAttribute("role", "menu");
419
419
  for (const i of r) {
@@ -424,7 +424,7 @@ function Z(r, e, t, n = Ke.submenuArrow) {
424
424
  }
425
425
  const s = document.createElement("div");
426
426
  s.className = "tbw-context-menu-item", i.cssClass && s.classList.add(i.cssClass), s.setAttribute("role", "menuitem"), s.setAttribute("data-id", i.id);
427
- const l = $e(i, e);
427
+ const l = je(i, e);
428
428
  if (l && (s.classList.add("disabled"), s.setAttribute("aria-disabled", "true")), i.icon) {
429
429
  const d = document.createElement("span");
430
430
  d.className = "tbw-context-menu-icon", d.innerHTML = i.icon, s.appendChild(d);
@@ -457,8 +457,8 @@ function ge(r, e, t) {
457
457
  let s = e, l = t;
458
458
  e + n.width > o && (s = e - n.width), t + n.height > i && (l = t - n.height), s = Math.max(0, s), l = Math.max(0, l), r.style.left = `${s}px`, r.style.top = `${l}px`, r.style.visibility = "visible";
459
459
  }
460
- let _ = null, I = null, E = null, B = 0;
461
- const O = [
460
+ let _ = null, I = null, E = null, O = 0;
461
+ const B = [
462
462
  {
463
463
  id: "copy",
464
464
  name: "Copy",
@@ -476,12 +476,12 @@ const O = [
476
476
  }
477
477
  }
478
478
  ];
479
- class bn extends x {
479
+ class vn extends x {
480
480
  name = "contextMenu";
481
481
  version = "1.0.0";
482
482
  get defaultConfig() {
483
483
  return {
484
- items: O
484
+ items: B
485
485
  };
486
486
  }
487
487
  // #region Internal State
@@ -492,7 +492,7 @@ class bn extends x {
492
492
  // #endregion
493
493
  // #region Lifecycle
494
494
  attach(e) {
495
- super.attach(e), this.installGlobalHandlers(), B++;
495
+ super.attach(e), this.installGlobalHandlers(), O++;
496
496
  }
497
497
  detach() {
498
498
  this.menuElement && (this.menuElement.remove(), this.menuElement = null), this.isOpen = !1, this.params = null, this.uninstallGlobalHandlers();
@@ -500,7 +500,7 @@ class bn extends x {
500
500
  // #endregion
501
501
  // #region Private Methods
502
502
  installGlobalHandlers() {
503
- !E && typeof document < "u" && (E = document.createElement("style"), E.id = "tbw-context-menu-styles", E.textContent = We, document.head.appendChild(E)), _ || (_ = () => {
503
+ !E && typeof document < "u" && (E = document.createElement("style"), E.id = "tbw-context-menu-styles", E.textContent = $e, document.head.appendChild(E)), _ || (_ = () => {
504
504
  document.querySelectorAll(".tbw-context-menu").forEach((t) => t.remove());
505
505
  }, document.addEventListener("click", _)), I || (I = (e) => {
506
506
  e.key === "Escape" && document.querySelectorAll(".tbw-context-menu").forEach((n) => n.remove());
@@ -511,7 +511,7 @@ class bn extends x {
511
511
  * Uses reference counting to ensure handlers persist while any grid uses the plugin.
512
512
  */
513
513
  uninstallGlobalHandlers() {
514
- B--, !(B > 0) && (_ && (document.removeEventListener("click", _), _ = null), I && (document.removeEventListener("keydown", I), I = null), E && (E.remove(), E = null));
514
+ O--, !(O > 0) && (_ && (document.removeEventListener("click", _), _ = null), I && (document.removeEventListener("keydown", I), I = null), E && (E.remove(), E = null));
515
515
  }
516
516
  // #endregion
517
517
  // #region Hooks
@@ -551,7 +551,7 @@ class bn extends x {
551
551
  } else
552
552
  return;
553
553
  this.params = a, this.position = { x: o.clientX, y: o.clientY };
554
- const d = Y(this.config.items ?? O, a);
554
+ const d = Y(this.config.items ?? B, a);
555
555
  d.length && (this.menuElement && this.menuElement.remove(), this.menuElement = Z(
556
556
  d,
557
557
  a,
@@ -580,7 +580,7 @@ class bn extends x {
580
580
  value: n.value ?? null,
581
581
  isHeader: n.isHeader ?? !1,
582
582
  event: n.event ?? new MouseEvent("contextmenu")
583
- }, i = Y(this.config.items ?? O, o);
583
+ }, i = Y(this.config.items ?? B, o);
584
584
  this.menuElement && this.menuElement.remove(), this.menuElement = Z(
585
585
  i,
586
586
  o,
@@ -614,7 +614,7 @@ function pe(r, e = !0) {
614
614
  return e && (t.includes(",") || t.includes('"') || t.includes(`
615
615
  `) || t.includes("\r")) ? `"${t.replace(/"/g, '""')}"` : t;
616
616
  }
617
- function je(r, e, t, n = {}) {
617
+ function Ue(r, e, t, n = {}) {
618
618
  const o = n.delimiter ?? ",", i = n.newline ?? `
619
619
  `, s = [], l = n.bom ? "\uFEFF" : "";
620
620
  if (t.includeHeaders !== !1) {
@@ -637,14 +637,14 @@ function ee(r, e) {
637
637
  const t = URL.createObjectURL(r), n = document.createElement("a");
638
638
  n.href = t, n.download = e, n.style.display = "none", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(t);
639
639
  }
640
- function Ue(r, e) {
640
+ function Ye(r, e) {
641
641
  const t = new Blob([r], { type: "text/csv;charset=utf-8;" });
642
642
  ee(t, e);
643
643
  }
644
644
  function fe(r) {
645
645
  return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
646
646
  }
647
- function Ye(r, e, t) {
647
+ function Ze(r, e, t) {
648
648
  let n = `<?xml version="1.0" encoding="UTF-8"?>
649
649
  <?mso-application progid="Excel.Sheet"?>
650
650
  <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
@@ -676,13 +676,13 @@ function Ye(r, e, t) {
676
676
  </Worksheet>
677
677
  </Workbook>`, n;
678
678
  }
679
- function Ze(r, e) {
679
+ function Xe(r, e) {
680
680
  const t = e.endsWith(".xls") ? e : `${e}.xls`, n = new Blob([r], {
681
681
  type: "application/vnd.ms-excel;charset=utf-8;"
682
682
  });
683
683
  ee(n, t);
684
684
  }
685
- class vn extends x {
685
+ class xn extends x {
686
686
  name = "export";
687
687
  version = "1.0.0";
688
688
  get defaultConfig() {
@@ -723,13 +723,13 @@ class vn extends x {
723
723
  try {
724
724
  switch (e) {
725
725
  case "csv": {
726
- const a = je(s, i, o, { bom: !0 });
727
- l = l.endsWith(".csv") ? l : `${l}.csv`, Ue(a, l);
726
+ const a = Ue(s, i, o, { bom: !0 });
727
+ l = l.endsWith(".csv") ? l : `${l}.csv`, Ye(a, l);
728
728
  break;
729
729
  }
730
730
  case "excel": {
731
- const a = Ye(s, i, o);
732
- l = l.endsWith(".xls") ? l : `${l}.xls`, Ze(a, l);
731
+ const a = Ze(s, i, o);
732
+ l = l.endsWith(".xls") ? l : `${l}.xls`, Xe(a, l);
733
733
  break;
734
734
  }
735
735
  case "json": {
@@ -803,7 +803,7 @@ class vn extends x {
803
803
  }
804
804
  // #endregion
805
805
  }
806
- function Xe(r) {
806
+ function Je(r) {
807
807
  const { totalRows: e, viewportHeight: t, scrollTop: n, rowHeight: o, overscan: i } = r, s = Math.ceil(t / o);
808
808
  let l = Math.floor(n / o) - i;
809
809
  l < 0 && (l = 0);
@@ -815,10 +815,10 @@ function Xe(r) {
815
815
  totalHeight: e * o
816
816
  };
817
817
  }
818
- function Je(r, e) {
818
+ function Qe(r, e) {
819
819
  return r <= e;
820
820
  }
821
- function Qe(r, e, t = !1) {
821
+ function et(r, e, t = !1) {
822
822
  const n = r[e.field];
823
823
  if (e.operator === "blank")
824
824
  return n == null || n === "";
@@ -860,10 +860,10 @@ function Qe(r, e, t = !1) {
860
860
  return !0;
861
861
  }
862
862
  }
863
- function et(r, e, t = !1) {
864
- return e.length ? r.filter((n) => e.every((o) => Qe(n, o, t))) : r;
863
+ function tt(r, e, t = !1) {
864
+ return e.length ? r.filter((n) => e.every((o) => et(n, o, t))) : r;
865
865
  }
866
- function tt(r) {
866
+ function nt(r) {
867
867
  return JSON.stringify(
868
868
  r.map((e) => ({
869
869
  field: e.field,
@@ -881,7 +881,7 @@ function me(r, e) {
881
881
  }
882
882
  return [...t].sort((n, o) => typeof n == "number" && typeof o == "number" ? n - o : String(n).localeCompare(String(o)));
883
883
  }
884
- const nt = '.header-cell.filtered:before{content:"";position:absolute;top:4px;right:4px;width:6px;height:6px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:50%}.tbw-filter-btn{display:inline-flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:2px;margin-left:4px;opacity:.4;transition:opacity .15s;color:inherit;vertical-align:middle}.tbw-filter-btn:hover,.tbw-filter-btn.active{opacity:1}.tbw-filter-btn.active{color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}', ot = ".tbw-filter-panel{position:fixed;background:var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));color:var(--tbw-filter-panel-fg, var(--tbw-color-fg, light-dark(#222222, #eeeeee)));border:1px solid var(--tbw-filter-panel-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-panel-radius, var(--tbw-border-radius, 4px));box-shadow:0 4px 16px var(--tbw-filter-panel-shadow, var(--tbw-color-shadow, light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3))));padding:12px;z-index:10000;min-width:200px;max-width:280px;max-height:350px;display:flex;flex-direction:column;font-family:var(--tbw-font-family, system-ui, sans-serif);font-size:var(--tbw-font-size, 13px)}.tbw-filter-search{margin-bottom:8px}.tbw-filter-search-input{width:100%;padding:6px 10px;background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, 4px);font-size:inherit;box-sizing:border-box}.tbw-filter-search-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-actions{display:flex;padding:4px 2px;margin-bottom:8px;border-bottom:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-action-btn{background:transparent;border:none;color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));cursor:pointer;font-size:12px;padding:2px 0}.tbw-filter-action-btn:hover{text-decoration:underline}.tbw-filter-values{flex:1;overflow-y:auto;margin-bottom:8px;max-height:180px;position:relative}.tbw-filter-values-spacer{width:1px}.tbw-filter-values-content{position:absolute;top:0;left:0;right:0}.tbw-filter-value-item{display:flex;align-items:center;gap:8px;padding:4px 2px;cursor:pointer;border-radius:3px}.tbw-filter-value-item:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-checkbox{margin:0;cursor:pointer;accent-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}.tbw-filter-no-match{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding:8px 0;text-align:center;font-style:italic}.tbw-filter-buttons{display:flex;gap:8px;padding-top:8px;border-top:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-apply-btn{flex:1;padding:6px 12px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));color:var(--tbw-filter-accent-fg, var(--tbw-color-accent-fg, light-dark(#ffffff, #000000)));border:none;border-radius:4px;cursor:pointer;font-size:13px}.tbw-filter-apply-btn:hover{filter:brightness(.9)}.tbw-filter-clear-btn{flex:1;padding:6px 12px;background:transparent;color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:4px;cursor:pointer;font-size:13px}.tbw-filter-clear-btn:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}";
884
+ const ot = '.header-cell.filtered:before{content:"";position:absolute;top:4px;right:4px;width:6px;height:6px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));border-radius:50%}.tbw-filter-btn{display:inline-flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:2px;margin-left:4px;opacity:.4;transition:opacity .15s;color:inherit;vertical-align:middle}.tbw-filter-btn:hover,.tbw-filter-btn.active{opacity:1}.tbw-filter-btn.active{color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}', it = ".tbw-filter-panel{position:fixed;background:var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));color:var(--tbw-filter-panel-fg, var(--tbw-color-fg, light-dark(#222222, #eeeeee)));border:1px solid var(--tbw-filter-panel-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-panel-radius, var(--tbw-border-radius, 4px));box-shadow:0 4px 16px var(--tbw-filter-panel-shadow, var(--tbw-color-shadow, light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3))));padding:12px;z-index:10000;min-width:200px;max-width:280px;max-height:350px;display:flex;flex-direction:column;font-family:var(--tbw-font-family, system-ui, sans-serif);font-size:var(--tbw-font-size, 13px)}.tbw-filter-search{margin-bottom:8px}.tbw-filter-search-input{width:100%;padding:6px 10px;background:var(--tbw-filter-input-bg, var(--tbw-color-bg, transparent));color:inherit;border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:var(--tbw-filter-input-radius, 4px);font-size:inherit;box-sizing:border-box}.tbw-filter-search-input:focus{outline:none;border-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));box-shadow:0 0 0 2px rgba(from var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6)) r g b / 15%)}.tbw-filter-actions{display:flex;padding:4px 2px;margin-bottom:8px;border-bottom:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-action-btn{background:transparent;border:none;color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));cursor:pointer;font-size:12px;padding:2px 0}.tbw-filter-action-btn:hover{text-decoration:underline}.tbw-filter-values{flex:1;overflow-y:auto;margin-bottom:8px;max-height:180px;position:relative}.tbw-filter-values-spacer{width:1px}.tbw-filter-values-content{position:absolute;top:0;left:0;right:0}.tbw-filter-value-item{display:flex;align-items:center;gap:8px;padding:4px 2px;cursor:pointer;border-radius:3px}.tbw-filter-value-item:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}.tbw-filter-checkbox{margin:0;cursor:pointer;accent-color:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6))}.tbw-filter-no-match{color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));padding:8px 0;text-align:center;font-style:italic}.tbw-filter-buttons{display:flex;gap:8px;padding-top:8px;border-top:1px solid var(--tbw-filter-divider, var(--tbw-color-border, light-dark(#d0d0d4, #454545)))}.tbw-filter-apply-btn{flex:1;padding:6px 12px;background:var(--tbw-filter-accent, var(--tbw-color-accent, #3b82f6));color:var(--tbw-filter-accent-fg, var(--tbw-color-accent-fg, light-dark(#ffffff, #000000)));border:none;border-radius:4px;cursor:pointer;font-size:13px}.tbw-filter-apply-btn:hover{filter:brightness(.9)}.tbw-filter-clear-btn{flex:1;padding:6px 12px;background:transparent;color:var(--tbw-filter-muted, var(--tbw-color-fg-muted, light-dark(#555555, #aaaaaa)));border:1px solid var(--tbw-filter-input-border, var(--tbw-color-border, light-dark(#d0d0d4, #454545)));border-radius:4px;cursor:pointer;font-size:13px}.tbw-filter-clear-btn:hover{background:var(--tbw-filter-hover, var(--tbw-color-row-hover, light-dark(#f0f6ff, #1c1c1c)))}";
885
885
  class A extends x {
886
886
  name = "filtering";
887
887
  version = "1.0.0";
@@ -922,10 +922,10 @@ class A extends x {
922
922
  processRows(e) {
923
923
  const t = [...this.filters.values()];
924
924
  if (!t.length) return [...e];
925
- const n = tt(t);
925
+ const n = nt(t);
926
926
  if (this.cacheKey === n && this.cachedResult)
927
927
  return this.cachedResult;
928
- const o = et([...e], t, this.config.caseSensitive);
928
+ const o = tt([...e], t, this.config.caseSensitive);
929
929
  return this.cachedResult = o, this.cacheKey = n, o;
930
930
  }
931
931
  afterRender() {
@@ -1042,7 +1042,7 @@ class A extends x {
1042
1042
  return;
1043
1043
  }
1044
1044
  const e = document.createElement("style");
1045
- e.id = "tbw-filter-panel-styles", e.textContent = ot, document.head.appendChild(e), this.globalStylesInjected = !0;
1045
+ e.id = "tbw-filter-panel-styles", e.textContent = it, document.head.appendChild(e), this.globalStylesInjected = !0;
1046
1046
  }
1047
1047
  /**
1048
1048
  * Toggle the filter panel for a field
@@ -1119,13 +1119,13 @@ class A extends x {
1119
1119
  const u = document.createElement("span");
1120
1120
  u.textContent = "Select All", d.appendChild(c), d.appendChild(u), a.appendChild(d);
1121
1121
  const h = () => {
1122
- const b = [...m.values()], y = b.every((C) => C), R = b.every((C) => !C);
1123
- c.checked = y, c.indeterminate = !y && !R;
1122
+ const b = [...m.values()], C = b.every((y) => y), R = b.every((y) => !y);
1123
+ c.checked = C, c.indeterminate = !C && !R;
1124
1124
  };
1125
1125
  c.addEventListener("change", () => {
1126
1126
  const b = c.checked;
1127
- for (const y of m.keys())
1128
- m.set(y, b);
1127
+ for (const C of m.keys())
1128
+ m.set(C, b);
1129
1129
  h(), K();
1130
1130
  }), e.appendChild(a);
1131
1131
  const g = document.createElement("div");
@@ -1136,42 +1136,42 @@ class A extends x {
1136
1136
  f.className = "tbw-filter-values-content", g.appendChild(f);
1137
1137
  const m = /* @__PURE__ */ new Map();
1138
1138
  n.forEach((b) => {
1139
- const y = b == null ? "__null__" : String(b);
1140
- m.set(y, !o.has(b));
1139
+ const C = b == null ? "__null__" : String(b);
1140
+ m.set(C, !o.has(b));
1141
1141
  }), h();
1142
1142
  let w = [];
1143
- const k = (b, y) => {
1144
- const R = b == null ? "(Blank)" : String(b), C = b == null ? "__null__" : String(b), v = document.createElement("label");
1145
- v.className = "tbw-filter-value-item", v.style.position = "absolute", v.style.top = `${y * A.LIST_ITEM_HEIGHT}px`, v.style.left = "0", v.style.right = "0", v.style.height = `${A.LIST_ITEM_HEIGHT}px`, v.style.boxSizing = "border-box";
1143
+ const k = (b, C) => {
1144
+ const R = b == null ? "(Blank)" : String(b), y = b == null ? "__null__" : String(b), v = document.createElement("label");
1145
+ v.className = "tbw-filter-value-item", v.style.position = "absolute", v.style.top = `${C * A.LIST_ITEM_HEIGHT}px`, v.style.left = "0", v.style.right = "0", v.style.height = `${A.LIST_ITEM_HEIGHT}px`, v.style.boxSizing = "border-box";
1146
1146
  const S = document.createElement("input");
1147
- S.type = "checkbox", S.className = "tbw-filter-checkbox", S.checked = m.get(C) ?? !0, S.dataset.value = C, S.addEventListener("change", () => {
1148
- m.set(C, S.checked), h();
1147
+ S.type = "checkbox", S.className = "tbw-filter-checkbox", S.checked = m.get(y) ?? !0, S.dataset.value = y, S.addEventListener("change", () => {
1148
+ m.set(y, S.checked), h();
1149
1149
  });
1150
1150
  const re = document.createElement("span");
1151
1151
  return re.textContent = R, v.appendChild(S), v.appendChild(re), v;
1152
1152
  }, K = () => {
1153
- const b = w.length, y = g.clientHeight, R = g.scrollTop;
1154
- if (p.style.height = `${b * A.LIST_ITEM_HEIGHT}px`, Je(b, A.LIST_BYPASS_THRESHOLD / 3)) {
1153
+ const b = w.length, C = g.clientHeight, R = g.scrollTop;
1154
+ if (p.style.height = `${b * A.LIST_ITEM_HEIGHT}px`, Qe(b, A.LIST_BYPASS_THRESHOLD / 3)) {
1155
1155
  f.innerHTML = "", f.style.transform = "translateY(0px)", w.forEach((v, S) => {
1156
1156
  f.appendChild(k(v, S));
1157
1157
  });
1158
1158
  return;
1159
1159
  }
1160
- const C = Xe({
1160
+ const y = Je({
1161
1161
  totalRows: b,
1162
- viewportHeight: y,
1162
+ viewportHeight: C,
1163
1163
  scrollTop: R,
1164
1164
  rowHeight: A.LIST_ITEM_HEIGHT,
1165
1165
  overscan: A.LIST_OVERSCAN
1166
1166
  });
1167
- f.style.transform = `translateY(${C.offsetY}px)`, f.innerHTML = "";
1168
- for (let v = C.start; v < C.end; v++)
1169
- f.appendChild(k(w[v], v - C.start));
1167
+ f.style.transform = `translateY(${y.offsetY}px)`, f.innerHTML = "";
1168
+ for (let v = y.start; v < y.end; v++)
1169
+ f.appendChild(k(w[v], v - y.start));
1170
1170
  }, oe = (b) => {
1171
- const y = b.toLowerCase();
1171
+ const C = b.toLowerCase();
1172
1172
  if (w = n.filter((R) => {
1173
- const C = R == null ? "(Blank)" : String(R);
1174
- return !b || C.toLowerCase().includes(y);
1173
+ const y = R == null ? "(Blank)" : String(R);
1174
+ return !b || y.toLowerCase().includes(C);
1175
1175
  }), w.length === 0) {
1176
1176
  p.style.height = "0px", f.innerHTML = "";
1177
1177
  const R = document.createElement("div");
@@ -1198,13 +1198,13 @@ class A extends x {
1198
1198
  const N = document.createElement("button");
1199
1199
  N.className = "tbw-filter-apply-btn", N.textContent = "Apply", N.addEventListener("click", () => {
1200
1200
  const b = [];
1201
- for (const [y, R] of m)
1201
+ for (const [C, R] of m)
1202
1202
  if (!R)
1203
- if (y === "__null__")
1203
+ if (C === "__null__")
1204
1204
  b.push(null);
1205
1205
  else {
1206
- const C = n.find((v) => String(v) === y);
1207
- b.push(C !== void 0 ? C : y);
1206
+ const y = n.find((v) => String(v) === C);
1207
+ b.push(y !== void 0 ? y : C);
1208
1208
  }
1209
1209
  t.applySetFilter(b);
1210
1210
  }), M.appendChild(N);
@@ -1278,10 +1278,10 @@ class A extends x {
1278
1278
  }
1279
1279
  // #endregion
1280
1280
  // #region Styles
1281
- styles = nt;
1281
+ styles = ot;
1282
1282
  // #endregion
1283
1283
  }
1284
- function it(r) {
1284
+ function rt(r) {
1285
1285
  if (!r.length) return [];
1286
1286
  const e = /* @__PURE__ */ new Map(), t = [], n = (s, l) => {
1287
1287
  if (!l.length) return;
@@ -1316,7 +1316,7 @@ function it(r) {
1316
1316
  }, e.set(d, c), t.push(c)), c.columns.push(s);
1317
1317
  }), o.length && n(i, o), t.length === 1 && t[0].implicit && t[0].columns.length === r.length ? [] : t;
1318
1318
  }
1319
- function rt(r, e, t) {
1319
+ function st(r, e, t) {
1320
1320
  if (!e.length || !r) return;
1321
1321
  const n = /* @__PURE__ */ new Map();
1322
1322
  for (const i of e)
@@ -1332,7 +1332,7 @@ function rt(r, e, t) {
1332
1332
  l && l.classList.add("group-end");
1333
1333
  }
1334
1334
  }
1335
- function st(r, e) {
1335
+ function lt(r, e) {
1336
1336
  if (r.length === 0) return null;
1337
1337
  const t = document.createElement("div");
1338
1338
  t.className = "header-group-row", t.setAttribute("role", "row");
@@ -1342,11 +1342,11 @@ function st(r, e) {
1342
1342
  }
1343
1343
  return t;
1344
1344
  }
1345
- function lt(r) {
1345
+ function at(r) {
1346
1346
  return r.some((e) => e.group != null);
1347
1347
  }
1348
- const at = ".header-group-row{display:grid;grid-auto-flow:column;background:var(--tbw-grouping-columns-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell{display:flex;align-items:center;justify-content:center;padding:4px 8px;font-weight:600;font-size:.9em;text-transform:uppercase;letter-spacing:.5px;border-right:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell:last-child{border-right:none}.header-row .cell.grouped{border-top:none}.header-row .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong))}";
1349
- class xn extends x {
1348
+ const dt = ".header-group-row{display:grid;grid-auto-flow:column;background:var(--tbw-grouping-columns-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell{display:flex;align-items:center;justify-content:center;padding:4px 8px;font-weight:600;font-size:.9em;text-transform:uppercase;letter-spacing:.5px;border-right:1px solid var(--tbw-grouping-columns-border, var(--tbw-color-border))}.header-group-cell:last-child{border-right:none}.header-row .cell.grouped{border-top:none}.header-row .cell.group-end{border-right:2px solid var(--tbw-grouping-columns-separator, var(--tbw-color-border-strong))}";
1349
+ class yn extends x {
1350
1350
  name = "groupingColumns";
1351
1351
  version = "1.0.0";
1352
1352
  get defaultConfig() {
@@ -1369,12 +1369,12 @@ class xn extends x {
1369
1369
  */
1370
1370
  static detect(e, t) {
1371
1371
  const n = t?.columns;
1372
- return Array.isArray(n) ? lt(n) : !1;
1372
+ return Array.isArray(n) ? at(n) : !1;
1373
1373
  }
1374
1374
  // #endregion
1375
1375
  // #region Hooks
1376
1376
  processColumns(e) {
1377
- const t = it(e);
1377
+ const t = rt(e);
1378
1378
  return t.length === 0 ? (this.isActive = !1, this.groups = [], [...e]) : (this.isActive = !0, this.groups = t, [...e]);
1379
1379
  }
1380
1380
  afterRender() {
@@ -1387,13 +1387,13 @@ class xn extends x {
1387
1387
  if (!e) return;
1388
1388
  const t = e.querySelector(".header-group-row");
1389
1389
  t && t.remove();
1390
- const n = st(this.groups, this.columns);
1390
+ const n = lt(this.groups, this.columns);
1391
1391
  if (n) {
1392
1392
  const i = e.querySelector(".header-row");
1393
1393
  i ? e.insertBefore(n, i) : e.appendChild(n);
1394
1394
  }
1395
1395
  const o = e.querySelector(".header-row");
1396
- o && rt(o, this.groups, this.columns);
1396
+ o && st(o, this.groups, this.columns);
1397
1397
  }
1398
1398
  // #endregion
1399
1399
  // #region Public API
@@ -1428,10 +1428,10 @@ class xn extends x {
1428
1428
  }
1429
1429
  // #endregion
1430
1430
  // #region Styles
1431
- styles = at;
1431
+ styles = dt;
1432
1432
  // #endregion
1433
1433
  }
1434
- function dt({ rows: r, config: e, expanded: t }) {
1434
+ function ct({ rows: r, config: e, expanded: t }) {
1435
1435
  const n = e.groupOn;
1436
1436
  if (typeof n != "function")
1437
1437
  return [];
@@ -1464,23 +1464,23 @@ function dt({ rows: r, config: e, expanded: t }) {
1464
1464
  };
1465
1465
  return s(o), i;
1466
1466
  }
1467
- function ct(r, e) {
1467
+ function ut(r, e) {
1468
1468
  const t = new Set(r);
1469
1469
  return t.has(e) ? t.delete(e) : t.add(e), t;
1470
1470
  }
1471
- function ut(r) {
1471
+ function ht(r) {
1472
1472
  const e = /* @__PURE__ */ new Set();
1473
1473
  for (const t of r)
1474
1474
  t.kind === "group" && e.add(t.key);
1475
1475
  return e;
1476
1476
  }
1477
- function ht() {
1477
+ function gt() {
1478
1478
  return /* @__PURE__ */ new Set();
1479
1479
  }
1480
- function gt(r) {
1480
+ function pt(r) {
1481
1481
  return r.kind !== "group" ? 0 : r.rows.length;
1482
1482
  }
1483
- const pt = '.group-row{background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:4px;font-size:10px}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:2px}.group-label{display:inline-flex;align-items:center;gap:8px}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:.85em;font-weight:400}[data-group-depth="0"] .group-label{padding-left:0}[data-group-depth="1"] .group-label{padding-left:20px}[data-group-depth="2"] .group-label{padding-left:40px}[data-group-depth="3"] .group-label{padding-left:60px}[data-group-depth="4"] .group-label{padding-left:80px}';
1483
+ const ft = '.group-row{background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:4px;font-size:10px}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:2px}.group-label{display:inline-flex;align-items:center;gap:8px}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:.85em;font-weight:400}[data-group-depth="0"] .group-label{padding-left:0}[data-group-depth="1"] .group-label{padding-left:20px}[data-group-depth="2"] .group-label{padding-left:40px}[data-group-depth="3"] .group-label{padding-left:60px}[data-group-depth="4"] .group-label{padding-left:80px}';
1484
1484
  class Cn extends x {
1485
1485
  name = "groupingRows";
1486
1486
  version = "1.0.0";
@@ -1514,7 +1514,7 @@ class Cn extends x {
1514
1514
  const t = this.config;
1515
1515
  if (typeof t.groupOn != "function")
1516
1516
  return this.isActive = !1, this.flattenedRows = [], [...e];
1517
- const n = dt({
1517
+ const n = ct({
1518
1518
  rows: e,
1519
1519
  config: t,
1520
1520
  expanded: this.expandedKeys
@@ -1526,7 +1526,7 @@ class Cn extends x {
1526
1526
  __groupDepth: o.depth,
1527
1527
  __groupRows: o.rows,
1528
1528
  __groupExpanded: o.expanded,
1529
- __groupRowCount: gt(o)
1529
+ __groupRowCount: pt(o)
1530
1530
  } : o.row));
1531
1531
  }
1532
1532
  onCellClick(e) {
@@ -1618,20 +1618,20 @@ class Cn extends x {
1618
1618
  * Expand all groups.
1619
1619
  */
1620
1620
  expandAll() {
1621
- this.expandedKeys = ut(this.flattenedRows), this.requestRender();
1621
+ this.expandedKeys = ht(this.flattenedRows), this.requestRender();
1622
1622
  }
1623
1623
  /**
1624
1624
  * Collapse all groups.
1625
1625
  */
1626
1626
  collapseAll() {
1627
- this.expandedKeys = ht(), this.requestRender();
1627
+ this.expandedKeys = gt(), this.requestRender();
1628
1628
  }
1629
1629
  /**
1630
1630
  * Toggle expansion of a specific group.
1631
1631
  * @param key - The group key to toggle
1632
1632
  */
1633
1633
  toggle(e) {
1634
- this.expandedKeys = ct(this.expandedKeys, e);
1634
+ this.expandedKeys = ut(this.expandedKeys, e);
1635
1635
  const t = this.flattenedRows.find((n) => n.kind === "group" && n.key === e);
1636
1636
  this.emit("group-toggle", {
1637
1637
  key: e,
@@ -1722,25 +1722,25 @@ class Cn extends x {
1722
1722
  }
1723
1723
  // #endregion
1724
1724
  // #region Styles
1725
- styles = pt;
1725
+ styles = ft;
1726
1726
  // #endregion
1727
1727
  }
1728
- function z(r, e) {
1728
+ function V(r, e) {
1729
1729
  const t = new Set(r);
1730
1730
  return t.has(e) ? t.delete(e) : t.add(e), t;
1731
1731
  }
1732
- function ft(r, e) {
1732
+ function mt(r, e) {
1733
1733
  const t = new Set(r);
1734
1734
  return t.add(e), t;
1735
1735
  }
1736
- function mt(r, e) {
1736
+ function wt(r, e) {
1737
1737
  const t = new Set(r);
1738
1738
  return t.delete(e), t;
1739
1739
  }
1740
- function wt(r, e) {
1740
+ function bt(r, e) {
1741
1741
  return r.has(e);
1742
1742
  }
1743
- function bt(r, e, t, n) {
1743
+ function vt(r, e, t, n) {
1744
1744
  const o = document.createElement("div");
1745
1745
  o.className = "master-detail-row", o.setAttribute("data-detail-for", String(e)), o.setAttribute("role", "row");
1746
1746
  const i = document.createElement("div");
@@ -1748,8 +1748,8 @@ function bt(r, e, t, n) {
1748
1748
  const s = t(r, e);
1749
1749
  return typeof s == "string" ? i.innerHTML = s : s instanceof HTMLElement && i.appendChild(s), o.appendChild(i), o;
1750
1750
  }
1751
- const vt = ".master-detail-cell-wrapper{display:flex;align-items:center;gap:4px}.master-detail-toggle{cursor:pointer;font-size:10px;opacity:.7;user-select:none}.master-detail-toggle:hover{opacity:1}.master-detail-row{grid-column:1 / -1;display:grid;background:var(--tbw-master-detail-bg, var(--tbw-color-row-alt));border-bottom:1px solid var(--tbw-master-detail-border, var(--tbw-color-border))}.master-detail-cell{padding:16px;overflow:auto}";
1752
- class yn extends x {
1751
+ const xt = ".master-detail-cell-wrapper{display:flex;align-items:center;gap:4px}.master-detail-toggle{cursor:pointer;font-size:10px;opacity:.7;user-select:none}.master-detail-toggle:hover{opacity:1}.master-detail-row{grid-column:1 / -1;display:grid;background:var(--tbw-master-detail-bg, var(--tbw-color-row-alt));border-bottom:1px solid var(--tbw-master-detail-border, var(--tbw-color-border))}.master-detail-cell{padding:16px;overflow:auto}";
1752
+ class Rn extends x {
1753
1753
  name = "masterDetail";
1754
1754
  version = "1.0.0";
1755
1755
  get defaultConfig() {
@@ -1785,7 +1785,7 @@ class yn extends x {
1785
1785
  u.className = "master-detail-toggle", this.setIcon(u, this.resolveIcon(d ? "collapse" : "expand")), u.setAttribute("role", "button"), u.setAttribute("tabindex", "0"), u.setAttribute("aria-expanded", String(d)), u.setAttribute("aria-label", d ? "Collapse details" : "Expand details"), u.addEventListener("click", (g) => {
1786
1786
  g.stopPropagation();
1787
1787
  const p = this.rows.indexOf(a);
1788
- this.expandedRows = z(this.expandedRows, a), this.emit("detail-expand", {
1788
+ this.expandedRows = V(this.expandedRows, a), this.emit("detail-expand", {
1789
1789
  rowIndex: p,
1790
1790
  row: a,
1791
1791
  expanded: this.expandedRows.has(a)
@@ -1805,7 +1805,7 @@ class yn extends x {
1805
1805
  }
1806
1806
  onRowClick(e) {
1807
1807
  if (!(!this.config.expandOnRowClick || !this.config.detailRenderer))
1808
- return this.expandedRows = z(this.expandedRows, e.row), this.emit("detail-expand", {
1808
+ return this.expandedRows = V(this.expandedRows, e.row), this.emit("detail-expand", {
1809
1809
  rowIndex: e.rowIndex,
1810
1810
  row: e.row,
1811
1811
  expanded: this.expandedRows.has(e.row)
@@ -1850,7 +1850,7 @@ class yn extends x {
1850
1850
  d.previousElementSibling !== l && l.after(d);
1851
1851
  continue;
1852
1852
  }
1853
- const c = bt(a, s, this.config.detailRenderer, o);
1853
+ const c = vt(a, s, this.config.detailRenderer, o);
1854
1854
  typeof this.config.detailHeight == "number" && (c.style.height = `${this.config.detailHeight}px`), l.after(c), this.detailElements.set(a, c);
1855
1855
  }
1856
1856
  }
@@ -1918,7 +1918,7 @@ class yn extends x {
1918
1918
  */
1919
1919
  expand(e) {
1920
1920
  const t = this.rows[e];
1921
- t && (this.expandedRows = ft(this.expandedRows, t), this.requestRender());
1921
+ t && (this.expandedRows = mt(this.expandedRows, t), this.requestRender());
1922
1922
  }
1923
1923
  /**
1924
1924
  * Collapse the detail row at the given index.
@@ -1926,7 +1926,7 @@ class yn extends x {
1926
1926
  */
1927
1927
  collapse(e) {
1928
1928
  const t = this.rows[e];
1929
- t && (this.expandedRows = mt(this.expandedRows, t), this.requestRender());
1929
+ t && (this.expandedRows = wt(this.expandedRows, t), this.requestRender());
1930
1930
  }
1931
1931
  /**
1932
1932
  * Toggle the detail row at the given index.
@@ -1934,7 +1934,7 @@ class yn extends x {
1934
1934
  */
1935
1935
  toggle(e) {
1936
1936
  const t = this.rows[e];
1937
- t && (this.expandedRows = z(this.expandedRows, t), this.requestRender());
1937
+ t && (this.expandedRows = V(this.expandedRows, t), this.requestRender());
1938
1938
  }
1939
1939
  /**
1940
1940
  * Check if the detail row at the given index is expanded.
@@ -1943,7 +1943,7 @@ class yn extends x {
1943
1943
  */
1944
1944
  isExpanded(e) {
1945
1945
  const t = this.rows[e];
1946
- return t ? wt(this.expandedRows, t) : !1;
1946
+ return t ? bt(this.expandedRows, t) : !1;
1947
1947
  }
1948
1948
  /**
1949
1949
  * Expand all detail rows.
@@ -1982,10 +1982,10 @@ class yn extends x {
1982
1982
  }
1983
1983
  // #endregion
1984
1984
  // #region Styles
1985
- styles = vt;
1985
+ styles = xt;
1986
1986
  // #endregion
1987
1987
  }
1988
- function xt(r, e, t) {
1988
+ function yt(r, e, t) {
1989
1989
  return e.length ? [...r].sort((n, o) => {
1990
1990
  for (const i of e) {
1991
1991
  const l = t.find((u) => u.field === i.field)?.sortComparator ?? Ct, a = n[i.field], d = o[i.field], c = l(a, d, n, o);
@@ -1998,7 +1998,7 @@ function xt(r, e, t) {
1998
1998
  function Ct(r, e) {
1999
1999
  return r == null && e == null ? 0 : r == null ? 1 : e == null ? -1 : typeof r == "number" && typeof e == "number" ? r - e : r instanceof Date && e instanceof Date ? r.getTime() - e.getTime() : typeof r == "boolean" && typeof e == "boolean" ? r === e ? 0 : r ? -1 : 1 : String(r).localeCompare(String(e));
2000
2000
  }
2001
- function yt(r, e, t, n) {
2001
+ function Rt(r, e, t, n) {
2002
2002
  const o = r.find((i) => i.field === e);
2003
2003
  return t ? o ? o.direction === "asc" ? r.map((i) => i.field === e ? { ...i, direction: "desc" } : i) : r.filter((i) => i.field !== e) : r.length < n ? [...r, { field: e, direction: "asc" }] : r : o?.direction === "asc" ? [{ field: e, direction: "desc" }] : o?.direction === "desc" ? [] : [{ field: e, direction: "asc" }];
2004
2004
  }
@@ -2009,8 +2009,8 @@ function we(r, e) {
2009
2009
  function be(r, e) {
2010
2010
  return r.find((t) => t.field === e)?.direction;
2011
2011
  }
2012
- const Rt = '.header-cell[data-sort=asc]:after{content:"↑";margin-left:4px;opacity:.8}.header-cell[data-sort=desc]:after{content:"↓";margin-left:4px;opacity:.8}.sort-index{font-size:10px;background:var(--tbw-multi-sort-badge-bg, var(--tbw-color-panel-bg));color:var(--tbw-multi-sort-badge-color, var(--tbw-color-fg));border-radius:50%;width:14px;height:14px;display:inline-flex;align-items:center;justify-content:center;margin-left:2px;font-weight:600}';
2013
- class Rn extends x {
2012
+ const St = '.header-cell[data-sort=asc]:after{content:"↑";margin-left:4px;opacity:.8}.header-cell[data-sort=desc]:after{content:"↓";margin-left:4px;opacity:.8}.sort-index{font-size:10px;background:var(--tbw-multi-sort-badge-bg, var(--tbw-color-panel-bg));color:var(--tbw-multi-sort-badge-color, var(--tbw-color-fg));border-radius:50%;width:14px;height:14px;display:inline-flex;align-items:center;justify-content:center;margin-left:2px;font-weight:600}';
2013
+ class Sn extends x {
2014
2014
  name = "multiSort";
2015
2015
  version = "1.0.0";
2016
2016
  get defaultConfig() {
@@ -2029,12 +2029,12 @@ class Rn extends x {
2029
2029
  // #endregion
2030
2030
  // #region Hooks
2031
2031
  processRows(e) {
2032
- return this.sortModel.length === 0 ? [...e] : xt([...e], this.sortModel, [...this.columns]);
2032
+ return this.sortModel.length === 0 ? [...e] : yt([...e], this.sortModel, [...this.columns]);
2033
2033
  }
2034
2034
  onHeaderClick(e) {
2035
2035
  if (!this.columns.find((i) => i.field === e.field)?.sortable) return !1;
2036
2036
  const n = e.originalEvent.shiftKey, o = this.config.maxSortColumns ?? 3;
2037
- return this.sortModel = yt(this.sortModel, e.field, n, o), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2037
+ return this.sortModel = Rt(this.sortModel, e.field, n, o), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2038
2038
  }
2039
2039
  afterRender() {
2040
2040
  const e = this.shadowRoot;
@@ -2124,16 +2124,16 @@ class Rn extends x {
2124
2124
  }
2125
2125
  // #endregion
2126
2126
  // #region Styles
2127
- styles = Rt;
2127
+ styles = St;
2128
2128
  // #endregion
2129
2129
  }
2130
- function St(r) {
2130
+ function Et(r) {
2131
2131
  return r.filter((e) => e.sticky === "left");
2132
2132
  }
2133
- function Et(r) {
2133
+ function kt(r) {
2134
2134
  return r.filter((e) => e.sticky === "right");
2135
2135
  }
2136
- function V(r) {
2136
+ function z(r) {
2137
2137
  return r.some((e) => e.sticky === "left" || e.sticky === "right");
2138
2138
  }
2139
2139
  function ve(r, e) {
@@ -2149,16 +2149,16 @@ function ve(r, e) {
2149
2149
  for (const l of e)
2150
2150
  if (l.sticky === "left") {
2151
2151
  const a = o.get(l.field), d = n.find((c) => c.getAttribute("data-field") === l.field);
2152
- d && (d.classList.add("sticky-left"), d.style.left = i + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((c) => {
2153
- c.classList.add("sticky-left"), c.style.left = i + "px";
2152
+ d && (d.classList.add("sticky-left"), d.style.position = "sticky", d.style.left = i + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((c) => {
2153
+ c.classList.add("sticky-left"), c.style.position = "sticky", c.style.left = i + "px";
2154
2154
  }), i += d.offsetWidth);
2155
2155
  }
2156
2156
  let s = 0;
2157
2157
  for (const l of [...e].reverse())
2158
2158
  if (l.sticky === "right") {
2159
2159
  const a = o.get(l.field), d = n.find((c) => c.getAttribute("data-field") === l.field);
2160
- d && (d.classList.add("sticky-right"), d.style.right = s + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((c) => {
2161
- c.classList.add("sticky-right"), c.style.right = s + "px";
2160
+ d && (d.classList.add("sticky-right"), d.style.position = "sticky", d.style.right = s + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((c) => {
2161
+ c.classList.add("sticky-right"), c.style.position = "sticky", c.style.right = s + "px";
2162
2162
  }), s += d.offsetWidth);
2163
2163
  }
2164
2164
  }
@@ -2166,10 +2166,10 @@ function xe(r) {
2166
2166
  const e = r.shadowRoot;
2167
2167
  if (!e) return;
2168
2168
  e.querySelectorAll(".sticky-left, .sticky-right").forEach((n) => {
2169
- n.classList.remove("sticky-left", "sticky-right"), n.style.left = "", n.style.right = "";
2169
+ n.classList.remove("sticky-left", "sticky-right"), n.style.position = "", n.style.left = "", n.style.right = "";
2170
2170
  });
2171
2171
  }
2172
- class Sn extends x {
2172
+ class En extends x {
2173
2173
  name = "pinnedColumns";
2174
2174
  version = "1.0.0";
2175
2175
  get defaultConfig() {
@@ -2191,18 +2191,18 @@ class Sn extends x {
2191
2191
  */
2192
2192
  static detect(e, t) {
2193
2193
  const n = t?.columns;
2194
- return Array.isArray(n) ? V(n) : !1;
2194
+ return Array.isArray(n) ? z(n) : !1;
2195
2195
  }
2196
2196
  // #endregion
2197
2197
  // #region Hooks
2198
2198
  processColumns(e) {
2199
- return this.isApplied = V([...e]), [...e];
2199
+ return this.isApplied = z([...e]), [...e];
2200
2200
  }
2201
2201
  afterRender() {
2202
2202
  if (!this.isApplied)
2203
2203
  return;
2204
2204
  const e = this.grid, t = [...this.columns];
2205
- if (!V(t)) {
2205
+ if (!z(t)) {
2206
2206
  xe(e), this.isApplied = !1;
2207
2207
  return;
2208
2208
  }
@@ -2210,6 +2210,22 @@ class Sn extends x {
2210
2210
  ve(e, t);
2211
2211
  });
2212
2212
  }
2213
+ /**
2214
+ * Handle inter-plugin queries.
2215
+ */
2216
+ onPluginQuery(e) {
2217
+ switch (e.type) {
2218
+ case Pe.CAN_MOVE_COLUMN: {
2219
+ const t = e.context, n = t.sticky;
2220
+ if (n === "left" || n === "right")
2221
+ return !1;
2222
+ const o = t.meta?.sticky;
2223
+ return o === "left" || o === "right" ? !1 : void 0;
2224
+ }
2225
+ default:
2226
+ return;
2227
+ }
2228
+ }
2213
2229
  // #endregion
2214
2230
  // #region Public API
2215
2231
  /**
@@ -2224,14 +2240,14 @@ class Sn extends x {
2224
2240
  */
2225
2241
  getLeftPinnedColumns() {
2226
2242
  const e = [...this.columns];
2227
- return St(e);
2243
+ return Et(e);
2228
2244
  }
2229
2245
  /**
2230
2246
  * Get columns pinned to the right.
2231
2247
  */
2232
2248
  getRightPinnedColumns() {
2233
2249
  const e = [...this.columns];
2234
- return Et(e);
2250
+ return kt(e);
2235
2251
  }
2236
2252
  /**
2237
2253
  * Clear all sticky positioning.
@@ -2239,6 +2255,30 @@ class Sn extends x {
2239
2255
  clearStickyPositions() {
2240
2256
  xe(this.grid);
2241
2257
  }
2258
+ /**
2259
+ * Report horizontal scroll boundary offsets for pinned columns.
2260
+ * Used by keyboard navigation to ensure focused cells aren't hidden behind sticky columns.
2261
+ */
2262
+ getHorizontalScrollOffsets(e, t) {
2263
+ if (!this.isApplied)
2264
+ return;
2265
+ let n = 0, o = 0;
2266
+ if (e) {
2267
+ const s = e.querySelectorAll(".sticky-left"), l = e.querySelectorAll(".sticky-right");
2268
+ s.forEach((a) => {
2269
+ n += a.offsetWidth;
2270
+ }), l.forEach((a) => {
2271
+ o += a.offsetWidth;
2272
+ });
2273
+ } else {
2274
+ const l = this.grid.shadowRoot;
2275
+ l && l.querySelectorAll(".header-row .cell").forEach((d) => {
2276
+ d.classList.contains("sticky-left") ? n += d.offsetWidth : d.classList.contains("sticky-right") && (o += d.offsetWidth);
2277
+ });
2278
+ }
2279
+ const i = t?.classList.contains("sticky-left") || t?.classList.contains("sticky-right");
2280
+ return { left: n, right: o, skipScroll: i };
2281
+ }
2242
2282
  // #endregion
2243
2283
  }
2244
2284
  function W(r, e) {
@@ -2263,7 +2303,7 @@ function W(r, e) {
2263
2303
  }
2264
2304
  if (r.customPanels)
2265
2305
  for (const s of r.customPanels) {
2266
- const l = kt(s, e);
2306
+ const l = At(s, e);
2267
2307
  switch (s.position) {
2268
2308
  case "left":
2269
2309
  n.appendChild(l);
@@ -2278,11 +2318,11 @@ function W(r, e) {
2278
2318
  }
2279
2319
  return t.appendChild(n), t.appendChild(o), t.appendChild(i), t;
2280
2320
  }
2281
- function Ce(r) {
2321
+ function ye(r) {
2282
2322
  const e = document.createElement("div");
2283
2323
  return e.className = `tbw-aggregation-rows tbw-aggregation-rows-${r}`, e.setAttribute("role", "presentation"), e;
2284
2324
  }
2285
- function ye(r, e, t, n) {
2325
+ function Ce(r, e, t, n) {
2286
2326
  r.innerHTML = "";
2287
2327
  for (const o of e) {
2288
2328
  const i = document.createElement("div");
@@ -2296,7 +2336,7 @@ function ye(r, e, t, n) {
2296
2336
  let a;
2297
2337
  const d = o.aggregators?.[s.field];
2298
2338
  if (d) {
2299
- const c = He(d);
2339
+ const c = Ge(d);
2300
2340
  c && (a = c(n, s.field, s));
2301
2341
  } else if (o.cells && Object.prototype.hasOwnProperty.call(o.cells, s.field)) {
2302
2342
  const c = o.cells[s.field];
@@ -2307,7 +2347,7 @@ function ye(r, e, t, n) {
2307
2347
  r.appendChild(i);
2308
2348
  }
2309
2349
  }
2310
- function kt(r, e) {
2350
+ function At(r, e) {
2311
2351
  const t = document.createElement("div");
2312
2352
  t.className = "tbw-status-panel tbw-status-panel-custom", t.id = `status-panel-${r.id}`;
2313
2353
  const n = r.render(e);
@@ -2323,8 +2363,8 @@ function Re(r, e, t, n, o) {
2323
2363
  grid: t
2324
2364
  };
2325
2365
  }
2326
- const At = ".tbw-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:12px;color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:16px}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, 2px 8px);min-height:var(--tbw-row-height, 28px);display:flex;align-items:center;border-right:1px solid var(--tbw-color-border-cell)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0}";
2327
- class En extends x {
2366
+ const _t = ".tbw-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:12px;color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:16px}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, 2px 8px);min-height:var(--tbw-row-height, 28px);display:flex;align-items:center;border-right:1px solid var(--tbw-color-border-cell)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0}";
2367
+ class kn extends x {
2328
2368
  name = "pinnedRows";
2329
2369
  version = "1.0.0";
2330
2370
  get defaultConfig() {
@@ -2361,11 +2401,11 @@ class En extends x {
2361
2401
  ), s = this.config.aggregationRows || [], l = s.filter((h) => h.position === "top"), a = s.filter((h) => h.position !== "top");
2362
2402
  if (l.length > 0) {
2363
2403
  if (!this.topAggregationContainer) {
2364
- this.topAggregationContainer = Ce("top");
2404
+ this.topAggregationContainer = ye("top");
2365
2405
  const h = e.querySelector(".header");
2366
2406
  h && h.nextSibling ? t.insertBefore(this.topAggregationContainer, h.nextSibling) : t.appendChild(this.topAggregationContainer);
2367
2407
  }
2368
- ye(
2408
+ Ce(
2369
2409
  this.topAggregationContainer,
2370
2410
  l,
2371
2411
  this.visibleColumns,
@@ -2381,7 +2421,7 @@ class En extends x {
2381
2421
  this.infoBarElement.replaceWith(h), this.infoBarElement = h;
2382
2422
  }
2383
2423
  else this.config.position === "top" && this.infoBarElement && (this.infoBarElement.remove(), this.infoBarElement = null);
2384
- u ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", t.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", a.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = Ce("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), ye(
2424
+ u ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", t.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", a.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = ye("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), Ce(
2385
2425
  this.bottomAggregationContainer,
2386
2426
  a,
2387
2427
  this.visibleColumns,
@@ -2462,11 +2502,11 @@ class En extends x {
2462
2502
  }
2463
2503
  // #endregion
2464
2504
  // #region Styles
2465
- styles = At;
2505
+ styles = _t;
2466
2506
  // #endregion
2467
2507
  }
2468
- const _t = Ge;
2469
- function It(r) {
2508
+ const It = Oe;
2509
+ function Lt(r) {
2470
2510
  const e = [];
2471
2511
  return !r.rowGroupFields?.length && !r.columnGroupFields?.length && e.push("At least one row or column group field is required"), r.valueFields?.length || e.push("At least one value field is required"), e;
2472
2512
  }
@@ -2474,7 +2514,7 @@ function te(r, e) {
2474
2514
  return [...r, e].join("|");
2475
2515
  }
2476
2516
  function Ft(r, e) {
2477
- const t = e.rowGroupFields ?? [], n = e.columnGroupFields ?? [], o = e.valueFields ?? [], i = Lt(r, n), s = Pe(
2517
+ const t = e.rowGroupFields ?? [], n = e.columnGroupFields ?? [], o = e.valueFields ?? [], i = Tt(r, n), s = qe(
2478
2518
  r,
2479
2519
  t,
2480
2520
  n,
@@ -2484,7 +2524,7 @@ function Ft(r, e) {
2484
2524
  // starting depth
2485
2525
  ""
2486
2526
  // parent key prefix
2487
- ), l = Mt(s, i, o), a = Object.values(l).reduce((d, c) => d + c, 0);
2527
+ ), l = Nt(s, i, o), a = Object.values(l).reduce((d, c) => d + c, 0);
2488
2528
  return {
2489
2529
  rows: s,
2490
2530
  columnKeys: i,
@@ -2492,7 +2532,7 @@ function Ft(r, e) {
2492
2532
  grandTotal: a
2493
2533
  };
2494
2534
  }
2495
- function Lt(r, e) {
2535
+ function Tt(r, e) {
2496
2536
  if (e.length === 0) return ["value"];
2497
2537
  const t = /* @__PURE__ */ new Set();
2498
2538
  for (const n of r) {
@@ -2501,7 +2541,7 @@ function Lt(r, e) {
2501
2541
  }
2502
2542
  return [...t].sort();
2503
2543
  }
2504
- function Tt(r, e) {
2544
+ function Mt(r, e) {
2505
2545
  const t = /* @__PURE__ */ new Map();
2506
2546
  for (const n of r) {
2507
2547
  const o = String(n[e] ?? ""), i = t.get(o);
@@ -2509,7 +2549,7 @@ function Tt(r, e) {
2509
2549
  }
2510
2550
  return t;
2511
2551
  }
2512
- function Pe(r, e, t, n, o, i, s) {
2552
+ function qe(r, e, t, n, o, i, s) {
2513
2553
  const l = [];
2514
2554
  if (e.length === 0) {
2515
2555
  const h = Se(r, t, n, o), g = Ee(h);
@@ -2523,11 +2563,11 @@ function Pe(r, e, t, n, o, i, s) {
2523
2563
  rowCount: r.length
2524
2564
  }), l;
2525
2565
  }
2526
- const a = e[0], d = e.slice(1), c = d.length > 0, u = Tt(r, a);
2566
+ const a = e[0], d = e.slice(1), c = d.length > 0, u = Mt(r, a);
2527
2567
  for (const [h, g] of u) {
2528
2568
  const p = s ? `${s}|${h}` : h, f = Se(g, t, n, o), m = Ee(f);
2529
2569
  let w;
2530
- c && (w = Pe(
2570
+ c && (w = qe(
2531
2571
  g,
2532
2572
  d,
2533
2573
  t,
@@ -2552,7 +2592,7 @@ function Se(r, e, t, n) {
2552
2592
  const o = {};
2553
2593
  for (const i of t)
2554
2594
  for (const s of n) {
2555
- const a = (e.length > 0 ? r.filter((h) => e.map((g) => String(h[g] ?? "")).join("|") === i) : r).map((h) => Number(h[s.field]) || 0), d = _t(s.aggFunc), c = a.length > 0 ? d(a) : null, u = te([i], s.field);
2595
+ const a = (e.length > 0 ? r.filter((h) => e.map((g) => String(h[g] ?? "")).join("|") === i) : r).map((h) => Number(h[s.field]) || 0), d = It(s.aggFunc), c = a.length > 0 ? d(a) : null, u = te([i], s.field);
2556
2596
  o[u] = c;
2557
2597
  }
2558
2598
  return o;
@@ -2563,7 +2603,7 @@ function Ee(r) {
2563
2603
  e += t ?? 0;
2564
2604
  return e;
2565
2605
  }
2566
- function Mt(r, e, t) {
2606
+ function Nt(r, e, t) {
2567
2607
  const n = {};
2568
2608
  function o(i) {
2569
2609
  for (const s of i)
@@ -2577,7 +2617,7 @@ function Mt(r, e, t) {
2577
2617
  }
2578
2618
  return o(r), n;
2579
2619
  }
2580
- function Nt(r, e, t = !0) {
2620
+ function Pt(r, e, t = !0) {
2581
2621
  const n = [];
2582
2622
  function o(i) {
2583
2623
  n.push(i);
@@ -2601,14 +2641,14 @@ function $(r) {
2601
2641
  t(n);
2602
2642
  return e;
2603
2643
  }
2604
- const Pt = ["sum", "avg", "count", "min", "max", "first", "last"];
2605
- function qt(r, e, t, n) {
2644
+ const qt = ["sum", "avg", "count", "min", "max", "first", "last"];
2645
+ function Dt(r, e, t, n) {
2606
2646
  const o = new AbortController(), i = { config: e, callbacks: n, signal: o.signal }, s = document.createElement("div");
2607
- return s.className = "tbw-pivot-panel", s.appendChild(F("Options", () => Bt(t, i))), s.appendChild(F("Row Groups", () => ke("rowGroups", i))), s.appendChild(F("Column Groups", () => ke("columnGroups", i))), s.appendChild(F("Values", () => Kt(i))), s.appendChild(F("Available Fields", () => Gt(i))), r.appendChild(s), () => {
2647
+ return s.className = "tbw-pivot-panel", s.appendChild(L("Options", () => Bt(t, i))), s.appendChild(L("Row Groups", () => ke("rowGroups", i))), s.appendChild(L("Column Groups", () => ke("columnGroups", i))), s.appendChild(L("Values", () => Ht(i))), s.appendChild(L("Available Fields", () => Ot(i))), r.appendChild(s), () => {
2608
2648
  o.abort(), s.remove();
2609
2649
  };
2610
2650
  }
2611
- function F(r, e) {
2651
+ function L(r, e) {
2612
2652
  const t = document.createElement("div");
2613
2653
  t.className = "tbw-pivot-section";
2614
2654
  const n = document.createElement("div");
@@ -2625,7 +2665,7 @@ function ke(r, e) {
2625
2665
  l.className = "tbw-pivot-placeholder", l.textContent = "Drag fields here or click to add", i.appendChild(l);
2626
2666
  } else
2627
2667
  for (const l of s)
2628
- i.appendChild(Dt(l, r, e));
2668
+ i.appendChild(Kt(l, r, e));
2629
2669
  return i.addEventListener(
2630
2670
  "dragover",
2631
2671
  (l) => {
@@ -2648,7 +2688,7 @@ function ke(r, e) {
2648
2688
  { signal: o }
2649
2689
  ), i;
2650
2690
  }
2651
- function Dt(r, e, t) {
2691
+ function Kt(r, e, t) {
2652
2692
  const { callbacks: n, signal: o } = t, i = document.createElement("div");
2653
2693
  i.className = "tbw-pivot-field-chip", i.draggable = !0;
2654
2694
  const s = n.getAvailableFields().find((d) => d.field === r), l = document.createElement("span");
@@ -2674,7 +2714,7 @@ function Dt(r, e, t) {
2674
2714
  { signal: o }
2675
2715
  ), i;
2676
2716
  }
2677
- function Kt(r) {
2717
+ function Ht(r) {
2678
2718
  const { config: e, callbacks: t, signal: n } = r, o = document.createElement("div");
2679
2719
  o.className = "tbw-pivot-drop-zone tbw-pivot-values-zone", o.setAttribute("data-zone", "values");
2680
2720
  const i = e.valueFields ?? [];
@@ -2683,7 +2723,7 @@ function Kt(r) {
2683
2723
  s.className = "tbw-pivot-placeholder", s.textContent = "Drag numeric fields here for aggregation", o.appendChild(s);
2684
2724
  } else
2685
2725
  for (const s of i)
2686
- o.appendChild(Ht(s, r));
2726
+ o.appendChild(Gt(s, r));
2687
2727
  return o.addEventListener(
2688
2728
  "dragover",
2689
2729
  (s) => {
@@ -2706,7 +2746,7 @@ function Kt(r) {
2706
2746
  { signal: n }
2707
2747
  ), o;
2708
2748
  }
2709
- function Ht(r, e) {
2749
+ function Gt(r, e) {
2710
2750
  const { callbacks: t, signal: n } = e, o = document.createElement("div");
2711
2751
  o.className = "tbw-pivot-field-chip tbw-pivot-value-chip";
2712
2752
  const i = t.getAvailableFields().find((c) => c.field === r.field), s = document.createElement("div");
@@ -2715,7 +2755,7 @@ function Ht(r, e) {
2715
2755
  l.className = "tbw-pivot-chip-label", l.textContent = i?.header ?? r.field;
2716
2756
  const a = document.createElement("select");
2717
2757
  a.className = "tbw-pivot-agg-select", a.title = "Aggregation function";
2718
- for (const c of Pt) {
2758
+ for (const c of qt) {
2719
2759
  const u = document.createElement("option");
2720
2760
  u.value = c, u.textContent = c.toUpperCase(), u.selected = c === r.aggFunc, a.appendChild(u);
2721
2761
  }
@@ -2735,7 +2775,7 @@ function Ht(r, e) {
2735
2775
  { signal: n }
2736
2776
  ), s.appendChild(l), s.appendChild(a), o.appendChild(s), o.appendChild(d), o;
2737
2777
  }
2738
- function Gt(r) {
2778
+ function Ot(r) {
2739
2779
  const { config: e, callbacks: t, signal: n } = r, o = document.createElement("div");
2740
2780
  o.className = "tbw-pivot-available-fields";
2741
2781
  const i = t.getAvailableFields(), s = /* @__PURE__ */ new Set([
@@ -2804,7 +2844,7 @@ function j(r, e, t, n) {
2804
2844
  const s = document.createElement("span");
2805
2845
  return s.textContent = r, o.appendChild(i), o.appendChild(s), o;
2806
2846
  }
2807
- function Ot(r, e, t) {
2847
+ function Vt(r, e, t) {
2808
2848
  return e.className = "pivot-group-row", e.setAttribute("data-pivot-depth", String(r.__pivotDepth ?? 0)), e.setAttribute("role", "row"), e.innerHTML = "", t.columns.forEach((n, o) => {
2809
2849
  const i = document.createElement("div");
2810
2850
  if (i.className = "cell", i.setAttribute("data-col", String(o)), i.setAttribute("role", "gridcell"), o === 0) {
@@ -2840,7 +2880,7 @@ function zt(r, e, t) {
2840
2880
  e.appendChild(i);
2841
2881
  }), !0;
2842
2882
  }
2843
- function Vt(r, e, t) {
2883
+ function Wt(r, e, t) {
2844
2884
  return e.className = "pivot-grand-total-row", e.setAttribute("role", "presentation"), e.innerHTML = "", t.forEach((n, o) => {
2845
2885
  const i = document.createElement("div");
2846
2886
  if (i.className = "cell", i.setAttribute("data-col", String(o)), o === 0) {
@@ -2853,8 +2893,8 @@ function Vt(r, e, t) {
2853
2893
  e.appendChild(i);
2854
2894
  }), !0;
2855
2895
  }
2856
- const Wt = '.pivot-group-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:600;background:var(--tbw-pivot-group-bg, var(--tbw-color-row-alt));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-group-row:hover{background:var(--tbw-pivot-group-hover, var(--tbw-color-row-hover))}.pivot-leaf-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-pivot-leaf-bg, var(--tbw-color-bg));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-grand-total-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:700;background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-height:var(--tbw-row-height);border-top:2px solid var(--tbw-color-border-strong)}.pivot-grand-total-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-grand-total-row>.cell:last-child{border-right:0}.pivot-grand-total-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-width:fit-content}.pivot-group-row>.cell,.pivot-leaf-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-group-row>.cell:last-child,.pivot-leaf-row>.cell:last-child{border-right:0}.pivot-toggle{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:6px;border:none;background:transparent;cursor:pointer;font-size:10px;color:var(--tbw-pivot-toggle-color, var(--tbw-color-fg-muted));border-radius:var(--tbw-border-radius);transition:background .15s,color .15s}.pivot-toggle:hover{background:var(--tbw-pivot-toggle-hover-bg, var(--tbw-color-row-hover));color:var(--tbw-pivot-toggle-hover-color, var(--tbw-color-fg))}.pivot-toggle:focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}.pivot-label{font-weight:inherit}.pivot-count{color:var(--tbw-pivot-count-color, var(--tbw-color-fg-muted));font-size:.9em;font-weight:400}.pivot-total-row{font-weight:700;border-top:2px solid var(--tbw-pivot-border, var(--tbw-color-border-strong))}[data-pivot-depth="1"]{--tbw-pivot-depth: 1}[data-pivot-depth="2"]{--tbw-pivot-depth: 2}[data-pivot-depth="3"]{--tbw-pivot-depth: 3}[data-pivot-depth="4"]{--tbw-pivot-depth: 4}.tbw-pivot-panel{display:flex;flex-direction:column;gap:12px;padding:12px;height:100%;overflow-y:auto;font-size:13px}.tbw-pivot-section{border:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-section-bg, var(--tbw-color-bg))}.tbw-pivot-section-header{padding:8px 12px;font-weight:600;background:var(--tbw-pivot-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius) var(--tbw-border-radius) 0 0}.tbw-pivot-section-content{padding:8px}.tbw-pivot-toggle-wrapper{display:flex;align-items:center}.tbw-pivot-toggle-label{display:flex;align-items:center;gap:8px;cursor:pointer}.tbw-pivot-toggle-label input{width:16px;height:16px;cursor:pointer}.tbw-pivot-drop-zone{min-height:60px;padding:8px;border:2px dashed var(--tbw-pivot-drop-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-drop-bg, var(--tbw-color-row-alt));display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;transition:all .15s ease}.tbw-pivot-drop-zone.drag-over{border-color:var(--tbw-color-accent);background:var(--tbw-pivot-drop-active, var(--tbw-focus-background))}.tbw-pivot-placeholder{color:var(--tbw-color-fg-muted);font-style:italic;padding:8px;text-align:center;width:100%}.tbw-pivot-field-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tbw-pivot-chip-bg, var(--tbw-color-header-bg));border:1px solid var(--tbw-pivot-chip-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);cursor:grab;font-size:12px;transition:all .15s ease}.tbw-pivot-field-chip:hover{background:var(--tbw-pivot-chip-hover, var(--tbw-color-row-hover));border-color:var(--tbw-color-accent)}.tbw-pivot-field-chip.available{background:var(--tbw-color-bg)}.tbw-pivot-field-chip.dragging{opacity:.5;cursor:grabbing}.tbw-pivot-chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.tbw-pivot-chip-remove{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:var(--tbw-color-fg-muted);font-size:14px;font-weight:700;cursor:pointer;border-radius:50%;transition:all .15s ease}.tbw-pivot-chip-remove:hover{background:var(--tbw-pivot-chip-remove-hover-bg, var(--tbw-color-accent));color:var(--tbw-pivot-chip-remove-hover-fg, var(--tbw-color-accent-fg))}.tbw-pivot-value-chip{padding:4px 8px}.tbw-pivot-value-label-wrapper{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.tbw-pivot-agg-select{padding:2px 4px;font-size:11px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);cursor:pointer}.tbw-pivot-available-fields{display:flex;flex-wrap:wrap;gap:6px;min-height:40px}.tbw-pivot-options{display:flex;flex-direction:column;gap:8px}.tbw-pivot-checkbox{display:flex;align-items:center;gap:8px;cursor:pointer}.tbw-pivot-checkbox input{width:14px;height:14px;cursor:pointer}';
2857
- class L extends x {
2896
+ const $t = '.pivot-group-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:600;background:var(--tbw-pivot-group-bg, var(--tbw-color-row-alt));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-group-row:hover{background:var(--tbw-pivot-group-hover, var(--tbw-color-row-hover))}.pivot-leaf-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-pivot-leaf-bg, var(--tbw-color-bg));min-height:var(--tbw-row-height);border-bottom:var(--tbw-row-divider)}.pivot-grand-total-row{display:grid;grid-template-columns:var(--tbw-column-template);font-weight:700;background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-height:var(--tbw-row-height);border-top:2px solid var(--tbw-color-border-strong)}.pivot-grand-total-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-grand-total-row>.cell:last-child{border-right:0}.pivot-grand-total-footer{position:sticky;bottom:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-pivot-grand-total-bg, var(--tbw-color-header-bg));min-width:fit-content}.pivot-group-row>.cell,.pivot-leaf-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}.pivot-group-row>.cell:last-child,.pivot-leaf-row>.cell:last-child{border-right:0}.pivot-toggle{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:6px;border:none;background:transparent;cursor:pointer;font-size:10px;color:var(--tbw-pivot-toggle-color, var(--tbw-color-fg-muted));border-radius:var(--tbw-border-radius);transition:background .15s,color .15s}.pivot-toggle:hover{background:var(--tbw-pivot-toggle-hover-bg, var(--tbw-color-row-hover));color:var(--tbw-pivot-toggle-hover-color, var(--tbw-color-fg))}.pivot-toggle:focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}.pivot-label{font-weight:inherit}.pivot-count{color:var(--tbw-pivot-count-color, var(--tbw-color-fg-muted));font-size:.9em;font-weight:400}.pivot-total-row{font-weight:700;border-top:2px solid var(--tbw-pivot-border, var(--tbw-color-border-strong))}[data-pivot-depth="1"]{--tbw-pivot-depth: 1}[data-pivot-depth="2"]{--tbw-pivot-depth: 2}[data-pivot-depth="3"]{--tbw-pivot-depth: 3}[data-pivot-depth="4"]{--tbw-pivot-depth: 4}.tbw-pivot-panel{display:flex;flex-direction:column;gap:12px;padding:12px;height:100%;overflow-y:auto;font-size:13px}.tbw-pivot-section{border:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-section-bg, var(--tbw-color-bg))}.tbw-pivot-section-header{padding:8px 12px;font-weight:600;background:var(--tbw-pivot-header-bg, var(--tbw-color-header-bg));border-bottom:1px solid var(--tbw-pivot-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius) var(--tbw-border-radius) 0 0}.tbw-pivot-section-content{padding:8px}.tbw-pivot-toggle-wrapper{display:flex;align-items:center}.tbw-pivot-toggle-label{display:flex;align-items:center;gap:8px;cursor:pointer}.tbw-pivot-toggle-label input{width:16px;height:16px;cursor:pointer}.tbw-pivot-drop-zone{min-height:60px;padding:8px;border:2px dashed var(--tbw-pivot-drop-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);background:var(--tbw-pivot-drop-bg, var(--tbw-color-row-alt));display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;transition:all .15s ease}.tbw-pivot-drop-zone.drag-over{border-color:var(--tbw-color-accent);background:var(--tbw-pivot-drop-active, var(--tbw-focus-background))}.tbw-pivot-placeholder{color:var(--tbw-color-fg-muted);font-style:italic;padding:8px;text-align:center;width:100%}.tbw-pivot-field-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tbw-pivot-chip-bg, var(--tbw-color-header-bg));border:1px solid var(--tbw-pivot-chip-border, var(--tbw-color-border));border-radius:var(--tbw-border-radius);cursor:grab;font-size:12px;transition:all .15s ease}.tbw-pivot-field-chip:hover{background:var(--tbw-pivot-chip-hover, var(--tbw-color-row-hover));border-color:var(--tbw-color-accent)}.tbw-pivot-field-chip.available{background:var(--tbw-color-bg)}.tbw-pivot-field-chip.dragging{opacity:.5;cursor:grabbing}.tbw-pivot-chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.tbw-pivot-chip-remove{display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:var(--tbw-color-fg-muted);font-size:14px;font-weight:700;cursor:pointer;border-radius:50%;transition:all .15s ease}.tbw-pivot-chip-remove:hover{background:var(--tbw-pivot-chip-remove-hover-bg, var(--tbw-color-accent));color:var(--tbw-pivot-chip-remove-hover-fg, var(--tbw-color-accent-fg))}.tbw-pivot-value-chip{padding:4px 8px}.tbw-pivot-value-label-wrapper{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.tbw-pivot-agg-select{padding:2px 4px;font-size:11px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);cursor:pointer}.tbw-pivot-available-fields{display:flex;flex-wrap:wrap;gap:6px;min-height:40px}.tbw-pivot-options{display:flex;flex-direction:column;gap:8px}.tbw-pivot-checkbox{display:flex;align-items:center;gap:8px;cursor:pointer}.tbw-pivot-checkbox input{width:14px;height:14px;cursor:pointer}';
2897
+ class F extends x {
2858
2898
  name = "pivot";
2859
2899
  version = "1.0.0";
2860
2900
  /** Tool panel ID for shell integration */
@@ -2891,7 +2931,7 @@ class L extends x {
2891
2931
  // #region Shell Integration
2892
2932
  getToolPanel() {
2893
2933
  return {
2894
- id: L.PANEL_ID,
2934
+ id: F.PANEL_ID,
2895
2935
  title: "Pivot",
2896
2936
  icon: "⊞",
2897
2937
  tooltip: "Configure pivot table",
@@ -2904,7 +2944,7 @@ class L extends x {
2904
2944
  processRows(e) {
2905
2945
  if (!this.hasInitialized && this.config.active !== !1 && this.hasValidPivotConfig() && (this.hasInitialized = !0, this.isActive = !0), !this.isActive)
2906
2946
  return [...e];
2907
- const t = It(this.config);
2947
+ const t = Lt(this.config);
2908
2948
  if (t.length > 0)
2909
2949
  return this.warn(`Config errors: ${t.join(", ")}`), [...e];
2910
2950
  if (this.buildFieldHeaderMap(), this.defaultExpanded = this.config.defaultExpanded ?? !0, this.expandedKeys.size === 0 && this.defaultExpanded && this.pivotResult) {
@@ -2918,7 +2958,7 @@ class L extends x {
2918
2958
  this.expandedKeys.add(s);
2919
2959
  }
2920
2960
  const n = this.config.indentWidth ?? 20;
2921
- return Nt(
2961
+ return Pt(
2922
2962
  this.pivotResult.rows,
2923
2963
  this.expandedKeys,
2924
2964
  this.defaultExpanded
@@ -2963,7 +3003,7 @@ class L extends x {
2963
3003
  }
2964
3004
  renderRow(e, t) {
2965
3005
  const n = e;
2966
- return n.__pivotRowKey && n.__pivotHasChildren ? Ot(n, t, {
3006
+ return n.__pivotRowKey && n.__pivotHasChildren ? Vt(n, t, {
2967
3007
  columns: this.gridColumns,
2968
3008
  onToggle: (o) => this.toggle(o),
2969
3009
  resolveIcon: (o) => this.resolveIcon(o),
@@ -2998,7 +3038,7 @@ class L extends x {
2998
3038
  __pivotTotal: this.pivotResult.grandTotal,
2999
3039
  ...this.pivotResult.totals
3000
3040
  };
3001
- Vt(n, this.grandTotalFooter, this.gridColumns);
3041
+ Wt(n, this.grandTotalFooter, this.gridColumns);
3002
3042
  }
3003
3043
  /**
3004
3044
  * Remove the grand total footer element.
@@ -3060,16 +3100,16 @@ class L extends x {
3060
3100
  // #endregion
3061
3101
  // #region Tool Panel API
3062
3102
  showPanel() {
3063
- this.grid.openToolPanel(L.PANEL_ID);
3103
+ this.grid.openToolPanel(F.PANEL_ID);
3064
3104
  }
3065
3105
  hidePanel() {
3066
3106
  this.grid.closeToolPanel();
3067
3107
  }
3068
3108
  togglePanel() {
3069
- this.grid.toggleToolPanel(L.PANEL_ID);
3109
+ this.grid.toggleToolPanel(F.PANEL_ID);
3070
3110
  }
3071
3111
  isPanelVisible() {
3072
- return this.grid.activeToolPanel === L.PANEL_ID;
3112
+ return this.grid.activeToolPanel === F.PANEL_ID;
3073
3113
  }
3074
3114
  // #endregion
3075
3115
  // #region Private Helpers
@@ -3113,7 +3153,7 @@ class L extends x {
3113
3153
  },
3114
3154
  getAvailableFields: () => this.getAvailableFields()
3115
3155
  };
3116
- return qt(e, this.config, this.isActive, t);
3156
+ return Dt(e, this.config, this.isActive, t);
3117
3157
  }
3118
3158
  refreshPanel() {
3119
3159
  this.panelContainer && (this.panelContainer.innerHTML = "", this.renderPanel(this.panelContainer));
@@ -3147,23 +3187,20 @@ class L extends x {
3147
3187
  }
3148
3188
  // #endregion
3149
3189
  // #region Styles
3150
- styles = Wt;
3190
+ styles = $t;
3151
3191
  // #endregion
3152
3192
  }
3153
- function $t(r) {
3154
- const e = r.sticky;
3155
- if (e === "left" || e === "right")
3156
- return !1;
3157
- const t = r.meta ?? {}, n = t.sticky;
3158
- return n === "left" || n === "right" ? !1 : t.lockPosition !== !0 && t.suppressMovable !== !0;
3193
+ function jt(r) {
3194
+ const e = r.meta ?? {};
3195
+ return e.lockPosition !== !0 && e.suppressMovable !== !0;
3159
3196
  }
3160
3197
  function Ae(r, e, t) {
3161
3198
  if (e === t || e < 0 || e >= r.length || t < 0 || t > r.length) return r;
3162
3199
  const n = [...r], [o] = n.splice(e, 1);
3163
3200
  return n.splice(t, 0, o), n;
3164
3201
  }
3165
- const jt = '.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}';
3166
- class kn extends x {
3202
+ const Ut = '.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}';
3203
+ class An extends x {
3167
3204
  name = "reorder";
3168
3205
  version = "1.0.0";
3169
3206
  get defaultConfig() {
@@ -3201,36 +3238,39 @@ class kn extends x {
3201
3238
  e.querySelectorAll(".header-row > .cell").forEach((n) => {
3202
3239
  const o = n, i = o.getAttribute("data-field");
3203
3240
  if (!i) return;
3204
- const s = this.columns.find((l) => l.field === i);
3205
- if (!s || !$t(s)) {
3241
+ const s = this.columns.find((c) => c.field === i), d = !this.grid.queryPlugins({
3242
+ type: Pe.CAN_MOVE_COLUMN,
3243
+ context: s
3244
+ }).includes(!1);
3245
+ if (!s || !jt(s) || !d) {
3206
3246
  o.draggable = !1;
3207
3247
  return;
3208
3248
  }
3209
- o.draggable = !0, !o.getAttribute("data-dragstart-bound") && (o.setAttribute("data-dragstart-bound", "true"), o.addEventListener("dragstart", (l) => {
3210
- const d = this.getColumnOrder().indexOf(i);
3211
- this.isDragging = !0, this.draggedField = i, this.draggedIndex = d, l.dataTransfer && (l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", i)), o.classList.add("dragging");
3249
+ o.draggable = !0, !o.getAttribute("data-dragstart-bound") && (o.setAttribute("data-dragstart-bound", "true"), o.addEventListener("dragstart", (c) => {
3250
+ const h = this.getColumnOrder().indexOf(i);
3251
+ this.isDragging = !0, this.draggedField = i, this.draggedIndex = h, c.dataTransfer && (c.dataTransfer.effectAllowed = "move", c.dataTransfer.setData("text/plain", i)), o.classList.add("dragging");
3212
3252
  }), o.addEventListener("dragend", () => {
3213
- this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null, e.querySelectorAll(".header-row > .cell").forEach((l) => {
3214
- l.classList.remove("dragging", "drop-target", "drop-before", "drop-after");
3253
+ this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null, e.querySelectorAll(".header-row > .cell").forEach((c) => {
3254
+ c.classList.remove("dragging", "drop-target", "drop-before", "drop-after");
3215
3255
  });
3216
- }), o.addEventListener("dragover", (l) => {
3217
- if (l.preventDefault(), !this.isDragging || this.draggedField === i) return;
3218
- const a = o.getBoundingClientRect(), d = a.left + a.width / 2, u = this.getColumnOrder().indexOf(i);
3219
- this.dropIndex = l.clientX < d ? u : u + 1, o.classList.add("drop-target"), o.classList.toggle("drop-before", l.clientX < d), o.classList.toggle("drop-after", l.clientX >= d);
3256
+ }), o.addEventListener("dragover", (c) => {
3257
+ if (c.preventDefault(), !this.isDragging || this.draggedField === i) return;
3258
+ const u = o.getBoundingClientRect(), h = u.left + u.width / 2, p = this.getColumnOrder().indexOf(i);
3259
+ this.dropIndex = c.clientX < h ? p : p + 1, o.classList.add("drop-target"), o.classList.toggle("drop-before", c.clientX < h), o.classList.toggle("drop-after", c.clientX >= h);
3220
3260
  }), o.addEventListener("dragleave", () => {
3221
3261
  o.classList.remove("drop-target", "drop-before", "drop-after");
3222
- }), o.addEventListener("drop", (l) => {
3223
- l.preventDefault();
3224
- const a = this.draggedField, d = this.draggedIndex, c = this.dropIndex;
3225
- if (!this.isDragging || a === null || d === null || c === null)
3262
+ }), o.addEventListener("drop", (c) => {
3263
+ c.preventDefault();
3264
+ const u = this.draggedField, h = this.draggedIndex, g = this.dropIndex;
3265
+ if (!this.isDragging || u === null || h === null || g === null)
3226
3266
  return;
3227
- const u = c > d ? c - 1 : c, h = this.getColumnOrder(), g = Ae(h, d, u), p = {
3228
- field: a,
3229
- fromIndex: d,
3230
- toIndex: u,
3231
- columnOrder: g
3267
+ const p = g > h ? g - 1 : g, f = this.getColumnOrder(), m = Ae(f, h, p), w = {
3268
+ field: u,
3269
+ fromIndex: h,
3270
+ toIndex: p,
3271
+ columnOrder: m
3232
3272
  };
3233
- this.grid.setColumnOrder(g), this.emit("column-move", p), this.grid.requestStateChange?.();
3273
+ this.grid.setColumnOrder(m), this.emit("column-move", w), this.grid.requestStateChange?.();
3234
3274
  }));
3235
3275
  });
3236
3276
  }
@@ -3275,7 +3315,7 @@ class kn extends x {
3275
3315
  }
3276
3316
  // #endregion
3277
3317
  // #region Styles
3278
- styles = jt;
3318
+ styles = Ut;
3279
3319
  // #endregion
3280
3320
  }
3281
3321
  function D(r) {
@@ -3286,7 +3326,7 @@ function D(r) {
3286
3326
  endCol: Math.max(r.startCol, r.endCol)
3287
3327
  };
3288
3328
  }
3289
- function Ut(r) {
3329
+ function Yt(r) {
3290
3330
  const e = D(r);
3291
3331
  return {
3292
3332
  from: { row: e.startRow, col: e.startCol },
@@ -3294,26 +3334,26 @@ function Ut(r) {
3294
3334
  };
3295
3335
  }
3296
3336
  function X(r) {
3297
- return r.map(Ut);
3337
+ return r.map(Yt);
3298
3338
  }
3299
- function Yt(r, e, t) {
3339
+ function Zt(r, e, t) {
3300
3340
  const n = D(t);
3301
3341
  return r >= n.startRow && r <= n.endRow && e >= n.startCol && e <= n.endCol;
3302
3342
  }
3303
3343
  function _e(r, e, t) {
3304
- return t.some((n) => Yt(r, e, n));
3344
+ return t.some((n) => Zt(r, e, n));
3305
3345
  }
3306
- function Zt(r) {
3346
+ function Xt(r) {
3307
3347
  const e = [], t = D(r);
3308
3348
  for (let n = t.startRow; n <= t.endRow; n++)
3309
3349
  for (let o = t.startCol; o <= t.endCol; o++)
3310
3350
  e.push({ row: n, col: o });
3311
3351
  return e;
3312
3352
  }
3313
- function Xt(r) {
3353
+ function Jt(r) {
3314
3354
  const e = /* @__PURE__ */ new Map();
3315
3355
  for (const t of r)
3316
- for (const n of Zt(t))
3356
+ for (const n of Xt(t))
3317
3357
  e.set(`${n.row},${n.col}`, n);
3318
3358
  return [...e.values()];
3319
3359
  }
@@ -3325,8 +3365,8 @@ function U(r, e) {
3325
3365
  endCol: e.col
3326
3366
  };
3327
3367
  }
3328
- const Jt = ':host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row.row-focus{background-color:var(--tbw-focus-background, rgba(from var(--tbw-color-accent) r g b / 12%))}:host([data-selection-mode="row"]) .cell-focus{outline:none}:host .data-grid-row>.cell.selected{background-color:var(--tbw-range-selection-bg)}:host .data-grid-row>.cell.selected.top{border-top:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.bottom{border-bottom:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.first{border-left:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.last{border-right:2px solid var(--tbw-range-border-color)}';
3329
- function Qt(r, e, t) {
3368
+ const Qt = ':host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row.row-focus{background-color:var(--tbw-focus-background, rgba(from var(--tbw-color-accent) r g b / 12%))}:host([data-selection-mode="row"]) .cell-focus{outline:none}:host .data-grid-row>.cell.selected{background-color:var(--tbw-range-selection-bg)}:host .data-grid-row>.cell.selected.top{border-top:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.bottom{border-bottom:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.first{border-left:2px solid var(--tbw-range-border-color)}:host .data-grid-row>.cell.selected.last{border-right:2px solid var(--tbw-range-border-color)}';
3369
+ function en(r, e, t) {
3330
3370
  if (r === "cell" && e.selectedCell)
3331
3371
  return {
3332
3372
  mode: r,
@@ -3346,7 +3386,7 @@ function Qt(r, e, t) {
3346
3386
  }
3347
3387
  return r === "range" && e.ranges.length > 0 ? { mode: r, ranges: X(e.ranges) } : { mode: r, ranges: [] };
3348
3388
  }
3349
- class An extends x {
3389
+ class _n extends x {
3350
3390
  name = "selection";
3351
3391
  version = "1.0.0";
3352
3392
  get defaultConfig() {
@@ -3530,7 +3570,7 @@ class An extends x {
3530
3570
  * Get all selected cells across all ranges.
3531
3571
  */
3532
3572
  getSelectedCells() {
3533
- return Xt(this.ranges);
3573
+ return Jt(this.ranges);
3534
3574
  }
3535
3575
  /**
3536
3576
  * Check if a specific cell is in range selection.
@@ -3561,7 +3601,7 @@ class An extends x {
3561
3601
  // #endregion
3562
3602
  // #region Private Helpers
3563
3603
  #e() {
3564
- return Qt(
3604
+ return en(
3565
3605
  this.config.mode,
3566
3606
  {
3567
3607
  selectedCell: this.selectedCell,
@@ -3573,26 +3613,26 @@ class An extends x {
3573
3613
  }
3574
3614
  // #endregion
3575
3615
  // #region Styles
3576
- styles = Jt;
3616
+ styles = Qt;
3577
3617
  // #endregion
3578
3618
  }
3579
3619
  function q(r, e) {
3580
3620
  return Math.floor(r / e);
3581
3621
  }
3582
- function en(r, e) {
3622
+ function tn(r, e) {
3583
3623
  return {
3584
3624
  start: r * e,
3585
3625
  end: (r + 1) * e
3586
3626
  };
3587
3627
  }
3588
- function tn(r, e, t) {
3628
+ function nn(r, e, t) {
3589
3629
  const n = q(r, t), o = q(e - 1, t), i = [];
3590
3630
  for (let s = n; s <= o; s++)
3591
3631
  i.push(s);
3592
3632
  return i;
3593
3633
  }
3594
3634
  async function Ie(r, e, t, n) {
3595
- const o = en(e, t);
3635
+ const o = tn(e, t);
3596
3636
  return r.getRows({
3597
3637
  startRow: o.start,
3598
3638
  endRow: o.end,
@@ -3600,14 +3640,14 @@ async function Ie(r, e, t, n) {
3600
3640
  filterModel: n.filterModel
3601
3641
  });
3602
3642
  }
3603
- function nn(r, e, t) {
3643
+ function on(r, e, t) {
3604
3644
  const n = q(r, e), o = t.get(n);
3605
3645
  if (!o) return;
3606
3646
  const i = r % e;
3607
3647
  return o[i];
3608
3648
  }
3609
- const on = 100;
3610
- class _n extends x {
3649
+ const rn = 100;
3650
+ class In extends x {
3611
3651
  name = "serverSide";
3612
3652
  version = "1.0.0";
3613
3653
  get defaultConfig() {
@@ -3636,7 +3676,7 @@ class _n extends x {
3636
3676
  */
3637
3677
  loadRequiredBlocks() {
3638
3678
  if (!this.dataSource) return;
3639
- const e = this.grid, t = this.config.cacheBlockSize ?? 100, n = { startRow: e.virtualization.start, endRow: e.virtualization.end }, o = tn(n.startRow, n.endRow, t);
3679
+ const e = this.grid, t = this.config.cacheBlockSize ?? 100, n = { startRow: e.virtualization.start, endRow: e.virtualization.end }, o = nn(n.startRow, n.endRow, t);
3640
3680
  for (const i of o)
3641
3681
  if (!(this.loadedBlocks.has(i) || this.loadingBlocks.has(i))) {
3642
3682
  if (this.loadingBlocks.size >= (this.config.maxConcurrentRequests ?? 2))
@@ -3654,7 +3694,7 @@ class _n extends x {
3654
3694
  if (!this.dataSource) return [...e];
3655
3695
  const t = [];
3656
3696
  for (let n = 0; n < this.totalRowCount; n++) {
3657
- const o = nn(n, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
3697
+ const o = on(n, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
3658
3698
  t.push(o ?? { __loading: !0, __index: n });
3659
3699
  }
3660
3700
  return t;
@@ -3662,7 +3702,7 @@ class _n extends x {
3662
3702
  onScroll(e) {
3663
3703
  this.dataSource && (this.loadRequiredBlocks(), this.scrollDebounceTimer && clearTimeout(this.scrollDebounceTimer), this.scrollDebounceTimer = setTimeout(() => {
3664
3704
  this.loadRequiredBlocks();
3665
- }, on));
3705
+ }, rn));
3666
3706
  }
3667
3707
  // #endregion
3668
3708
  // #region Public API
@@ -3714,7 +3754,7 @@ class _n extends x {
3714
3754
  function ne(r, e, t) {
3715
3755
  return r.id !== void 0 ? String(r.id) : t ? `${t}-${e}` : String(e);
3716
3756
  }
3717
- function qe(r, e, t, n = null, o = 0) {
3757
+ function De(r, e, t, n = null, o = 0) {
3718
3758
  const i = e.childrenField ?? "children", s = [];
3719
3759
  for (let l = 0; l < r.length; l++) {
3720
3760
  const a = r[l], d = ne(a, l, n), c = a[i], u = Array.isArray(c) && c.length > 0, h = t.has(d);
@@ -3726,13 +3766,13 @@ function qe(r, e, t, n = null, o = 0) {
3726
3766
  isExpanded: h,
3727
3767
  parentKey: n
3728
3768
  }), u && h) {
3729
- const g = qe(c, e, t, d, o + 1);
3769
+ const g = De(c, e, t, d, o + 1);
3730
3770
  s.push(...g);
3731
3771
  }
3732
3772
  }
3733
3773
  return s;
3734
3774
  }
3735
- function Fe(r, e) {
3775
+ function Le(r, e) {
3736
3776
  const t = new Set(r);
3737
3777
  return t.has(e) ? t.delete(e) : t.add(e), t;
3738
3778
  }
@@ -3748,10 +3788,10 @@ function J(r, e, t = null, n = 0) {
3748
3788
  }
3749
3789
  return i;
3750
3790
  }
3751
- function rn() {
3791
+ function sn() {
3752
3792
  return /* @__PURE__ */ new Set();
3753
3793
  }
3754
- function De(r, e, t, n = null, o = 0) {
3794
+ function Ke(r, e, t, n = null, o = 0) {
3755
3795
  const i = t.childrenField ?? "children";
3756
3796
  for (let s = 0; s < r.length; s++) {
3757
3797
  const l = r[s], a = ne(l, s, n);
@@ -3759,29 +3799,29 @@ function De(r, e, t, n = null, o = 0) {
3759
3799
  return [a];
3760
3800
  const d = l[i];
3761
3801
  if (Array.isArray(d) && d.length > 0) {
3762
- const c = De(d, e, t, a, o + 1);
3802
+ const c = Ke(d, e, t, a, o + 1);
3763
3803
  if (c)
3764
3804
  return [a, ...c];
3765
3805
  }
3766
3806
  }
3767
3807
  return null;
3768
3808
  }
3769
- function sn(r, e, t, n) {
3770
- const o = De(r, e, t);
3809
+ function ln(r, e, t, n) {
3810
+ const o = Ke(r, e, t);
3771
3811
  if (!o) return n;
3772
3812
  const i = new Set(n);
3773
3813
  for (let s = 0; s < o.length - 1; s++)
3774
3814
  i.add(o[s]);
3775
3815
  return i;
3776
3816
  }
3777
- function Le(r, e = "children") {
3817
+ function Fe(r, e = "children") {
3778
3818
  if (!Array.isArray(r) || r.length === 0) return !1;
3779
3819
  for (const t of r)
3780
3820
  if (t && Array.isArray(t[e]) && t[e].length > 0)
3781
3821
  return !0;
3782
3822
  return !1;
3783
3823
  }
3784
- function ln(r) {
3824
+ function an(r) {
3785
3825
  if (!Array.isArray(r) || r.length === 0) return null;
3786
3826
  const e = ["children", "items", "nodes", "subRows", "nested"];
3787
3827
  for (const t of r)
@@ -3792,8 +3832,8 @@ function ln(r) {
3792
3832
  }
3793
3833
  return null;
3794
3834
  }
3795
- const an = ".tree-toggle{cursor:pointer;user-select:none;transition:transform .2s}.tree-toggle:hover{color:var(--tbw-tree-accent, var(--tbw-color-accent))}";
3796
- class In extends x {
3835
+ const dn = ".tree-toggle{cursor:pointer;user-select:none;transition:transform .2s}.tree-toggle:hover{color:var(--tbw-tree-accent, var(--tbw-color-accent))}";
3836
+ class Ln extends x {
3797
3837
  name = "tree";
3798
3838
  version = "1.0.0";
3799
3839
  get defaultConfig() {
@@ -3827,16 +3867,16 @@ class In extends x {
3827
3867
  */
3828
3868
  detect(e) {
3829
3869
  if (!this.config.autoDetect) return !1;
3830
- const t = this.config.childrenField ?? ln(e) ?? "children";
3831
- return Le(e, t);
3870
+ const t = this.config.childrenField ?? an(e) ?? "children";
3871
+ return Fe(e, t);
3832
3872
  }
3833
3873
  // #endregion
3834
3874
  // #region Data Processing
3835
3875
  processRows(e) {
3836
3876
  const t = this.config.childrenField ?? "children";
3837
- if (!Le(e, t))
3877
+ if (!Fe(e, t))
3838
3878
  return this.flattenedRows = [], this.rowKeyMap.clear(), [...e];
3839
- this.config.defaultExpanded && !this.initialExpansionDone && (this.expandedKeys = J(e, this.config), this.initialExpansionDone = !0), this.flattenedRows = qe(e, this.config, this.expandedKeys), this.rowKeyMap.clear();
3879
+ this.config.defaultExpanded && !this.initialExpansionDone && (this.expandedKeys = J(e, this.config), this.initialExpansionDone = !0), this.flattenedRows = De(e, this.config, this.expandedKeys), this.rowKeyMap.clear();
3840
3880
  for (const n of this.flattenedRows)
3841
3881
  this.rowKeyMap.set(n.key, n);
3842
3882
  return this.flattenedRows.map((n) => ({
@@ -3883,7 +3923,7 @@ class In extends x {
3883
3923
  const n = t.getAttribute("data-tree-key");
3884
3924
  if (!n) return !1;
3885
3925
  const o = this.rowKeyMap.get(n);
3886
- return o ? (this.expandedKeys = Fe(this.expandedKeys, n), this.emit("tree-expand", {
3926
+ return o ? (this.expandedKeys = Le(this.expandedKeys, n), this.emit("tree-expand", {
3887
3927
  key: n,
3888
3928
  row: o.data,
3889
3929
  expanded: this.expandedKeys.has(n),
@@ -3908,7 +3948,7 @@ class In extends x {
3908
3948
  * Toggle the expansion state of a node.
3909
3949
  */
3910
3950
  toggle(e) {
3911
- this.expandedKeys = Fe(this.expandedKeys, e), this.requestRender();
3951
+ this.expandedKeys = Le(this.expandedKeys, e), this.requestRender();
3912
3952
  }
3913
3953
  /**
3914
3954
  * Expand all nodes in the tree.
@@ -3920,7 +3960,7 @@ class In extends x {
3920
3960
  * Collapse all nodes in the tree.
3921
3961
  */
3922
3962
  collapseAll() {
3923
- this.expandedKeys = rn(), this.requestRender();
3963
+ this.expandedKeys = sn(), this.requestRender();
3924
3964
  }
3925
3965
  /**
3926
3966
  * Check if a node is currently expanded.
@@ -3950,14 +3990,14 @@ class In extends x {
3950
3990
  * Expand all ancestors of a node to make it visible.
3951
3991
  */
3952
3992
  expandToKey(e) {
3953
- this.expandedKeys = sn(this.rows, e, this.config, this.expandedKeys), this.requestRender();
3993
+ this.expandedKeys = ln(this.rows, e, this.config, this.expandedKeys), this.requestRender();
3954
3994
  }
3955
3995
  // #endregion
3956
3996
  // #region Styles
3957
- styles = an;
3997
+ styles = dn;
3958
3998
  // #endregion
3959
3999
  }
3960
- function dn(r, e, t) {
4000
+ function cn(r, e, t) {
3961
4001
  const n = [...r.undoStack, e];
3962
4002
  for (; n.length > t; )
3963
4003
  n.shift();
@@ -3991,16 +4031,16 @@ function Me(r) {
3991
4031
  action: t
3992
4032
  } : { newState: r, action: null };
3993
4033
  }
3994
- function cn(r) {
4034
+ function un(r) {
3995
4035
  return r.undoStack.length > 0;
3996
4036
  }
3997
- function un(r) {
4037
+ function hn(r) {
3998
4038
  return r.redoStack.length > 0;
3999
4039
  }
4000
- function hn() {
4040
+ function gn() {
4001
4041
  return { undoStack: [], redoStack: [] };
4002
4042
  }
4003
- function gn(r, e, t, n) {
4043
+ function pn(r, e, t, n) {
4004
4044
  return {
4005
4045
  type: "cell-edit",
4006
4046
  rowIndex: r,
@@ -4069,7 +4109,7 @@ class Fn extends x {
4069
4109
  * @param newValue - The value after the edit
4070
4110
  */
4071
4111
  recordEdit(e, t, n, o) {
4072
- const i = gn(e, t, n, o), s = dn(
4112
+ const i = pn(e, t, n, o), s = cn(
4073
4113
  { undoStack: this.undoStack, redoStack: this.redoStack },
4074
4114
  i,
4075
4115
  this.config.maxHistorySize ?? 100
@@ -4106,19 +4146,19 @@ class Fn extends x {
4106
4146
  * Check if there are any actions that can be undone.
4107
4147
  */
4108
4148
  canUndo() {
4109
- return cn({ undoStack: this.undoStack, redoStack: this.redoStack });
4149
+ return un({ undoStack: this.undoStack, redoStack: this.redoStack });
4110
4150
  }
4111
4151
  /**
4112
4152
  * Check if there are any actions that can be redone.
4113
4153
  */
4114
4154
  canRedo() {
4115
- return un({ undoStack: this.undoStack, redoStack: this.redoStack });
4155
+ return hn({ undoStack: this.undoStack, redoStack: this.redoStack });
4116
4156
  }
4117
4157
  /**
4118
4158
  * Clear all undo/redo history.
4119
4159
  */
4120
4160
  clearHistory() {
4121
- const e = hn();
4161
+ const e = gn();
4122
4162
  this.undoStack = e.undoStack, this.redoStack = e.redoStack;
4123
4163
  }
4124
4164
  /**
@@ -4135,7 +4175,7 @@ class Fn extends x {
4135
4175
  }
4136
4176
  // #endregion
4137
4177
  }
4138
- const pn = '.tbw-visibility-content{display:flex;flex-direction:column;height:100%}.tbw-visibility-list{flex:1;overflow-y:auto;padding:8px}.tbw-visibility-row{display:flex;align-items:center;gap:8px;padding:6px 4px;cursor:pointer;font-size:13px;border-radius:var(--tbw-border-radius, 4px);position:relative}.tbw-visibility-row:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover, #f3f4f6))}.tbw-visibility-row input[type=checkbox]{cursor:pointer}.tbw-visibility-row.locked span{color:var(--tbw-color-fg-muted, #888)}.tbw-visibility-handle{cursor:grab;color:var(--tbw-color-fg-muted, #888);font-size:10px;letter-spacing:-2px;user-select:none;flex-shrink:0}.tbw-visibility-row.reorderable:hover .tbw-visibility-handle{color:var(--tbw-color-fg, #1f2937)}.tbw-visibility-label{display:flex;align-items:center;gap:8px;flex:1;cursor:pointer}.tbw-visibility-row.dragging{opacity:.5;cursor:grabbing}.tbw-visibility-row.drop-before:before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent, #3b82f6))}.tbw-visibility-row.drop-after:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent, #3b82f6))}.tbw-visibility-show-all{margin:8px;padding:8px 12px;border:1px solid var(--tbw-visibility-border, var(--tbw-color-border, #e5e7eb));border-radius:var(--tbw-border-radius, 4px);background:var(--tbw-visibility-btn-bg, var(--tbw-color-header-bg, #f9fafb));color:var(--tbw-color-fg, #1f2937);cursor:pointer;font-size:13px}.tbw-visibility-show-all:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover, #f3f4f6))}';
4178
+ const fn = '.tbw-visibility-content{display:flex;flex-direction:column;height:100%}.tbw-visibility-list{flex:1;overflow-y:auto;padding:8px}.tbw-visibility-row{display:flex;align-items:center;gap:8px;padding:6px 4px;cursor:pointer;font-size:13px;border-radius:var(--tbw-border-radius, 4px);position:relative}.tbw-visibility-row:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover, #f3f4f6))}.tbw-visibility-row input[type=checkbox]{cursor:pointer}.tbw-visibility-row.locked span{color:var(--tbw-color-fg-muted, #888)}.tbw-visibility-handle{cursor:grab;color:var(--tbw-color-fg-muted, #888);font-size:10px;letter-spacing:-2px;user-select:none;flex-shrink:0}.tbw-visibility-row.reorderable:hover .tbw-visibility-handle{color:var(--tbw-color-fg, #1f2937)}.tbw-visibility-label{display:flex;align-items:center;gap:8px;flex:1;cursor:pointer}.tbw-visibility-row.dragging{opacity:.5;cursor:grabbing}.tbw-visibility-row.drop-before:before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent, #3b82f6))}.tbw-visibility-row.drop-after:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent, #3b82f6))}.tbw-visibility-show-all{margin:8px;padding:8px 12px;border:1px solid var(--tbw-visibility-border, var(--tbw-color-border, #e5e7eb));border-radius:var(--tbw-border-radius, 4px);background:var(--tbw-visibility-btn-bg, var(--tbw-color-header-bg, #f9fafb));color:var(--tbw-color-fg, #1f2937);cursor:pointer;font-size:13px}.tbw-visibility-show-all:hover{background:var(--tbw-visibility-hover, var(--tbw-color-row-hover, #f3f4f6))}';
4139
4179
  function Ne(r) {
4140
4180
  const e = r.meta ?? {};
4141
4181
  return e.lockPosition !== !0 && e.suppressMovable !== !0;
@@ -4365,47 +4405,48 @@ class T extends x {
4365
4405
  }
4366
4406
  // #endregion
4367
4407
  // #region Styles
4368
- styles = pn;
4408
+ styles = fn;
4369
4409
  // #endregion
4370
4410
  }
4371
4411
  export {
4372
4412
  x as BaseGridPlugin,
4373
- mn as ClipboardPlugin,
4374
- wn as ColumnVirtualizationPlugin,
4375
- bn as ContextMenuPlugin,
4376
- Ke as DEFAULT_GRID_ICONS,
4377
- Mn as DGEvents,
4378
- Nn as DataGridElement,
4379
- vn as ExportPlugin,
4413
+ wn as ClipboardPlugin,
4414
+ bn as ColumnVirtualizationPlugin,
4415
+ vn as ContextMenuPlugin,
4416
+ He as DEFAULT_GRID_ICONS,
4417
+ Nn as DGEvents,
4418
+ Pn as DataGridElement,
4419
+ xn as ExportPlugin,
4380
4420
  A as FilteringPlugin,
4381
- Pn as FitModeEnum,
4382
- qn as GridCSSVars,
4383
- Dn as GridClasses,
4384
- Kn as GridDataAttrs,
4385
- Hn as GridElement,
4386
- Gn as GridSelectors,
4387
- xn as GroupingColumnsPlugin,
4421
+ qn as FitModeEnum,
4422
+ Dn as GridCSSVars,
4423
+ Kn as GridClasses,
4424
+ Hn as GridDataAttrs,
4425
+ Gn as GridElement,
4426
+ On as GridSelectors,
4427
+ yn as GroupingColumnsPlugin,
4388
4428
  Cn as GroupingRowsPlugin,
4389
- yn as MasterDetailPlugin,
4390
- Rn as MultiSortPlugin,
4391
- Sn as PinnedColumnsPlugin,
4392
- En as PinnedRowsPlugin,
4393
- L as PivotPlugin,
4429
+ Rn as MasterDetailPlugin,
4430
+ Sn as MultiSortPlugin,
4431
+ Pe as PLUGIN_QUERIES,
4432
+ En as PinnedColumnsPlugin,
4433
+ kn as PinnedRowsPlugin,
4434
+ F as PivotPlugin,
4394
4435
  Bn as PluginEvents,
4395
- On as PluginManager,
4396
- kn as ReorderPlugin,
4397
- An as SelectionPlugin,
4398
- _n as ServerSidePlugin,
4399
- In as TreePlugin,
4436
+ Vn as PluginManager,
4437
+ An as ReorderPlugin,
4438
+ _n as SelectionPlugin,
4439
+ In as ServerSidePlugin,
4440
+ Ln as TreePlugin,
4400
4441
  Fn as UndoRedoPlugin,
4401
4442
  T as VisibilityPlugin,
4402
4443
  zn as aggregatorRegistry,
4403
- He as getAggregator,
4404
- Ge as getValueAggregator,
4405
- Vn as listAggregators,
4406
- Wn as registerAggregator,
4444
+ Ge as getAggregator,
4445
+ Oe as getValueAggregator,
4446
+ Wn as listAggregators,
4447
+ $n as registerAggregator,
4407
4448
  se as runAggregator,
4408
- $n as runValueAggregator,
4409
- jn as unregisterAggregator
4449
+ jn as runValueAggregator,
4450
+ Un as unregisterAggregator
4410
4451
  };
4411
4452
  //# sourceMappingURL=all.js.map