@toolbox-web/grid 0.0.4 → 0.0.6

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 (64) hide show
  1. package/README.md +24 -0
  2. package/all.d.ts +1709 -135
  3. package/all.js +745 -645
  4. package/all.js.map +1 -1
  5. package/index.d.ts +161 -1
  6. package/index.js +1050 -913
  7. package/index.js.map +1 -1
  8. package/lib/plugins/clipboard/index.js +110 -52
  9. package/lib/plugins/clipboard/index.js.map +1 -1
  10. package/lib/plugins/column-virtualization/index.js +78 -20
  11. package/lib/plugins/column-virtualization/index.js.map +1 -1
  12. package/lib/plugins/context-menu/index.js +163 -95
  13. package/lib/plugins/context-menu/index.js.map +1 -1
  14. package/lib/plugins/export/index.js +93 -35
  15. package/lib/plugins/export/index.js.map +1 -1
  16. package/lib/plugins/filtering/index.js +188 -133
  17. package/lib/plugins/filtering/index.js.map +1 -1
  18. package/lib/plugins/grouping-columns/index.js +69 -11
  19. package/lib/plugins/grouping-columns/index.js.map +1 -1
  20. package/lib/plugins/grouping-rows/index.js +111 -55
  21. package/lib/plugins/grouping-rows/index.js.map +1 -1
  22. package/lib/plugins/master-detail/index.js +196 -51
  23. package/lib/plugins/master-detail/index.js.map +1 -1
  24. package/lib/plugins/multi-sort/index.js +104 -46
  25. package/lib/plugins/multi-sort/index.js.map +1 -1
  26. package/lib/plugins/pinned-columns/index.js +74 -16
  27. package/lib/plugins/pinned-columns/index.js.map +1 -1
  28. package/lib/plugins/pinned-rows/index.js +65 -7
  29. package/lib/plugins/pinned-rows/index.js.map +1 -1
  30. package/lib/plugins/pivot/index.js +117 -59
  31. package/lib/plugins/pivot/index.js.map +1 -1
  32. package/lib/plugins/reorder/index.js +103 -45
  33. package/lib/plugins/reorder/index.js.map +1 -1
  34. package/lib/plugins/selection/index.js +139 -81
  35. package/lib/plugins/selection/index.js.map +1 -1
  36. package/lib/plugins/server-side/index.js +96 -38
  37. package/lib/plugins/server-side/index.js.map +1 -1
  38. package/lib/plugins/tree/index.js +108 -47
  39. package/lib/plugins/tree/index.js.map +1 -1
  40. package/lib/plugins/undo-redo/index.js +70 -12
  41. package/lib/plugins/undo-redo/index.js.map +1 -1
  42. package/lib/plugins/visibility/index.js +82 -24
  43. package/lib/plugins/visibility/index.js.map +1 -1
  44. package/package.json +1 -1
  45. package/umd/grid.all.umd.js +31 -31
  46. package/umd/grid.all.umd.js.map +1 -1
  47. package/umd/grid.umd.js +15 -15
  48. package/umd/grid.umd.js.map +1 -1
  49. package/umd/plugins/context-menu.umd.js +2 -2
  50. package/umd/plugins/context-menu.umd.js.map +1 -1
  51. package/umd/plugins/filtering.umd.js +3 -3
  52. package/umd/plugins/filtering.umd.js.map +1 -1
  53. package/umd/plugins/grouping-rows.umd.js +2 -2
  54. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  55. package/umd/plugins/master-detail.umd.js +2 -2
  56. package/umd/plugins/master-detail.umd.js.map +1 -1
  57. package/umd/plugins/multi-sort.umd.js +1 -1
  58. package/umd/plugins/multi-sort.umd.js.map +1 -1
  59. package/umd/plugins/reorder.umd.js +1 -1
  60. package/umd/plugins/reorder.umd.js.map +1 -1
  61. package/umd/plugins/tree.umd.js +2 -2
  62. package/umd/plugins/tree.umd.js.map +1 -1
  63. package/umd/plugins/visibility.umd.js +1 -1
  64. package/umd/plugins/visibility.umd.js.map +1 -1
package/all.js CHANGED
@@ -1,33 +1,33 @@
1
- import { BaseGridPlugin as y, runAggregator as X, getAggregator as xe } from "./index.js";
2
- import { DGEvents as Pt, DataGridElement as Dt, FitModeEnum as Bt, GridCSSVars as Ht, GridClasses as Ot, GridDataAttrs as Wt, DataGridElement as Kt, GridSelectors as Vt, PluginEvents as Gt, SelectionPlugin as zt, TreePlugin as $t } from "./index.js";
3
- function ve(i, e, t, n) {
1
+ import { BaseGridPlugin as y, DEFAULT_GRID_ICONS as xe, runAggregator as X, getAggregator as ve } from "./index.js";
2
+ import { DGEvents as Pt, DataGridElement as Bt, FitModeEnum as Ht, GridCSSVars as Ot, GridClasses as Wt, GridDataAttrs as Vt, DataGridElement as Kt, GridSelectors as Gt, PluginEvents as zt, PluginManager as $t, SelectionPlugin as jt, TreePlugin as Ut, aggregatorRegistry as Yt, listAggregators as Xt, registerAggregator as Jt, unregisterAggregator as Qt } from "./index.js";
3
+ function ye(i, e, t, n) {
4
4
  if (n.processCell)
5
5
  return n.processCell(i, e, t);
6
6
  if (i == null) return "";
7
7
  if (i instanceof Date) return i.toISOString();
8
8
  if (typeof i == "object") return JSON.stringify(i);
9
- const r = String(i), o = n.delimiter ?? " ", s = n.newline ?? `
9
+ const o = String(i), r = n.delimiter ?? " ", s = n.newline ?? `
10
10
  `;
11
- return n.quoteStrings || r.includes(o) || r.includes(s) || r.includes('"') ? `"${r.replace(/"/g, '""')}"` : r;
11
+ return n.quoteStrings || o.includes(r) || o.includes(s) || o.includes('"') ? `"${o.replace(/"/g, '""')}"` : o;
12
12
  }
13
13
  function F(i) {
14
- const { rows: e, columns: t, selectedIndices: n, config: r } = i, o = r.delimiter ?? " ", s = r.newline ?? `
14
+ const { rows: e, columns: t, selectedIndices: n, config: o } = i, r = o.delimiter ?? " ", s = o.newline ?? `
15
15
  `, l = t.filter((u) => !u.hidden && !u.field.startsWith("__")), a = [];
16
- if (r.includeHeaders) {
16
+ if (o.includeHeaders) {
17
17
  const u = l.map((h) => {
18
18
  const f = h.header || h.field;
19
- return f.includes(o) || f.includes(s) || f.includes('"') ? `"${f.replace(/"/g, '""')}"` : f;
19
+ return f.includes(r) || f.includes(s) || f.includes('"') ? `"${f.replace(/"/g, '""')}"` : f;
20
20
  });
21
- a.push(u.join(o));
21
+ a.push(u.join(r));
22
22
  }
23
- const d = [...n instanceof Set ? [...n] : n].sort((u, h) => u - h);
24
- for (const u of d) {
23
+ const c = [...n instanceof Set ? [...n] : n].sort((u, h) => u - h);
24
+ for (const u of c) {
25
25
  const h = e[u];
26
26
  if (!h) continue;
27
27
  const f = l.map(
28
- (g) => ve(h[g.field], g.field, h, r)
28
+ (g) => ye(h[g.field], g.field, h, o)
29
29
  );
30
- a.push(f.join(o));
30
+ a.push(f.join(r));
31
31
  }
32
32
  return a.join(s);
33
33
  }
@@ -43,15 +43,15 @@ async function N(i) {
43
43
  }
44
44
  function J(i, e) {
45
45
  const t = e.delimiter ?? " ", n = e.newline ?? `
46
- `, r = i.replace(/\r\n/g, `
46
+ `, o = i.replace(/\r\n/g, `
47
47
  `).replace(/\r/g, `
48
- `), o = [];
48
+ `), r = [];
49
49
  let s = [], l = "", a = !1;
50
- for (let c = 0; c < r.length; c++) {
51
- const d = r[c];
52
- d === '"' && !a ? a = !0 : d === '"' && a ? r[c + 1] === '"' ? (l += '"', c++) : a = !1 : d === t && !a ? (s.push(l), l = "") : d === n && !a ? (s.push(l), l = "", (s.length > 1 || s.some((u) => u.trim() !== "")) && o.push(s), s = []) : l += d;
50
+ for (let d = 0; d < o.length; d++) {
51
+ const c = o[d];
52
+ c === '"' && !a ? a = !0 : c === '"' && a ? o[d + 1] === '"' ? (l += '"', d++) : a = !1 : c === t && !a ? (s.push(l), l = "") : c === n && !a ? (s.push(l), l = "", (s.length > 1 || s.some((u) => u.trim() !== "")) && r.push(s), s = []) : l += c;
53
53
  }
54
- return s.push(l), (s.length > 1 || s.some((c) => c.trim() !== "")) && o.push(s), o;
54
+ return s.push(l), (s.length > 1 || s.some((d) => d.trim() !== "")) && r.push(s), r;
55
55
  }
56
56
  async function Q() {
57
57
  try {
@@ -60,7 +60,7 @@ async function Q() {
60
60
  return "";
61
61
  }
62
62
  }
63
- class vt extends y {
63
+ class yt extends y {
64
64
  name = "clipboard";
65
65
  version = "1.0.0";
66
66
  get defaultConfig() {
@@ -84,41 +84,41 @@ class vt extends y {
84
84
  onKeyDown(e) {
85
85
  if (this.config.enabled === !1) return !1;
86
86
  const t = (e.ctrlKey || e.metaKey) && e.key === "c", n = (e.ctrlKey || e.metaKey) && e.key === "v";
87
- return t ? (this.#t(e.target), !0) : n ? (this.#n(), !0) : !1;
87
+ return t ? (this.#e(e.target), !0) : n ? (this.#n(), !0) : !1;
88
88
  }
89
89
  // ===== Private Methods =====
90
90
  /**
91
91
  * Handle copy operation
92
92
  */
93
- #t(e) {
94
- const t = this.#e(), n = t?.getSelectedRows() ?? [], r = n.length > 0, o = t?.getRanges() ?? [], s = o.length > 0, l = t?.getSelectedCell() != null;
95
- let a, c, d;
96
- if (r && t)
93
+ #e(e) {
94
+ const t = this.#t(), n = t?.getSelectedRows() ?? [], o = n.length > 0, r = t?.getRanges() ?? [], s = r.length > 0, l = t?.getSelectedCell() != null;
95
+ let a, d, c;
96
+ if (o && t)
97
97
  a = F({
98
98
  rows: this.rows,
99
99
  columns: [...this.columns],
100
100
  selectedIndices: n,
101
101
  config: this.config
102
- }), c = n.length, d = this.columns.filter((u) => !u.hidden && !u.field.startsWith("__")).length;
102
+ }), d = n.length, c = this.columns.filter((u) => !u.hidden && !u.field.startsWith("__")).length;
103
103
  else if (s && t) {
104
- const u = o[o.length - 1], h = this.#o({
104
+ const u = r[r.length - 1], h = this.#r({
105
105
  startRow: u.from.row,
106
106
  startCol: u.from.col,
107
107
  endRow: u.to.row,
108
108
  endCol: u.to.col
109
109
  });
110
- a = h.text, c = h.rowCount, d = h.columnCount;
110
+ a = h.text, d = h.rowCount, c = h.columnCount;
111
111
  } else if (l && t) {
112
- const u = t.getSelectedCell(), h = this.#r(u.row, u.col);
112
+ const u = t.getSelectedCell(), h = this.#o(u.row, u.col);
113
113
  if (!h) return;
114
- a = h.text, c = 1, d = 1;
114
+ a = h.text, d = 1, c = 1;
115
115
  } else {
116
116
  const u = this.#i(e);
117
117
  if (!u) return;
118
- a = u.text, c = 1, d = 1;
118
+ a = u.text, d = 1, c = 1;
119
119
  }
120
120
  N(a).then(() => {
121
- this.lastCopied = { text: a, timestamp: Date.now() }, this.emit("copy", { text: a, rowCount: c, columnCount: d });
121
+ this.lastCopied = { text: a, timestamp: Date.now() }, this.emit("copy", { text: a, rowCount: d, columnCount: c });
122
122
  });
123
123
  }
124
124
  /**
@@ -134,7 +134,7 @@ class vt extends y {
134
134
  /**
135
135
  * Get the selection plugin instance if available.
136
136
  */
137
- #e() {
137
+ #t() {
138
138
  try {
139
139
  const e = this.grid;
140
140
  if (e?._plugins) {
@@ -148,29 +148,29 @@ class vt extends y {
148
148
  /**
149
149
  * Build text for a single cell by row/col index.
150
150
  */
151
- #r(e, t) {
151
+ #o(e, t) {
152
152
  const n = this.rows[e];
153
153
  if (!n) return null;
154
- const r = this.columns[t];
155
- if (!r) return null;
156
- const o = n[r.field], s = r.header || r.field;
154
+ const o = this.columns[t];
155
+ if (!o) return null;
156
+ const r = n[o.field], s = o.header || o.field;
157
157
  let l;
158
158
  if (this.config.includeHeaders) {
159
- const a = o == null ? "" : String(o);
159
+ const a = r == null ? "" : String(r);
160
160
  l = `${s}: ${a}`;
161
161
  } else
162
- l = o == null ? "" : String(o);
162
+ l = r == null ? "" : String(r);
163
163
  return { text: l };
164
164
  }
165
165
  /**
166
166
  * Build text for a rectangular range of cells.
167
167
  */
168
- #o(e) {
169
- const { startRow: t, startCol: n, endRow: r, endCol: o } = e, s = Math.min(t, r), l = Math.max(t, r), a = Math.min(n, o), c = Math.max(n, o), d = this.config.delimiter ?? " ", u = this.config.newline ?? `
170
- `, h = [], f = this.columns.slice(a, c + 1);
168
+ #r(e) {
169
+ const { startRow: t, startCol: n, endRow: o, endCol: r } = e, s = Math.min(t, o), l = Math.max(t, o), a = Math.min(n, r), d = Math.max(n, r), c = this.config.delimiter ?? " ", u = this.config.newline ?? `
170
+ `, h = [], f = this.columns.slice(a, d + 1);
171
171
  if (this.config.includeHeaders) {
172
172
  const g = f.map((m) => m.header || m.field);
173
- h.push(g.join(d));
173
+ h.push(g.join(c));
174
174
  }
175
175
  for (let g = s; g <= l; g++) {
176
176
  const m = this.rows[g];
@@ -179,12 +179,12 @@ class vt extends y {
179
179
  const R = m[S.field];
180
180
  return R == null ? "" : R instanceof Date ? R.toISOString() : String(R);
181
181
  });
182
- h.push(b.join(d));
182
+ h.push(b.join(c));
183
183
  }
184
184
  return {
185
185
  text: h.join(u),
186
186
  rowCount: l - s + 1,
187
- columnCount: c - a + 1
187
+ columnCount: d - a + 1
188
188
  };
189
189
  }
190
190
  /**
@@ -196,20 +196,20 @@ class vt extends y {
196
196
  if (!t) return null;
197
197
  const n = t.dataset.fieldCache;
198
198
  if (!n) return null;
199
- const r = t.dataset.row;
200
- if (!r) return null;
201
- const o = parseInt(r, 10);
202
- if (isNaN(o)) return null;
203
- const s = this.rows[o];
199
+ const o = t.dataset.row;
200
+ if (!o) return null;
201
+ const r = parseInt(o, 10);
202
+ if (isNaN(r)) return null;
203
+ const s = this.rows[r];
204
204
  if (!s) return null;
205
- const l = s[n], c = this.columns.find((u) => u.field === n)?.header || n;
206
- let d;
205
+ const l = s[n], d = this.columns.find((u) => u.field === n)?.header || n;
206
+ let c;
207
207
  if (this.config.includeHeaders) {
208
208
  const u = l == null ? "" : String(l);
209
- d = `${c}: ${u}`;
209
+ c = `${d}: ${u}`;
210
210
  } else
211
- d = l == null ? "" : String(l);
212
- return { text: d, field: n, value: l };
211
+ c = l == null ? "" : String(l);
212
+ return { text: c, field: n, value: l };
213
213
  }
214
214
  // ===== Public API =====
215
215
  /**
@@ -217,7 +217,7 @@ class vt extends y {
217
217
  * @returns The copied text
218
218
  */
219
219
  async copy() {
220
- const t = this.#e()?.getSelectedRows() ?? [], n = F({
220
+ const t = this.#t()?.getSelectedRows() ?? [], n = F({
221
221
  rows: this.rows,
222
222
  columns: [...this.columns],
223
223
  selectedIndices: t,
@@ -277,39 +277,39 @@ function te(i) {
277
277
  function ne(i) {
278
278
  return i.reduce((e, t) => e + G(t.width), 0);
279
279
  }
280
- function ye(i, e, t, n, r) {
281
- const o = t.length;
282
- if (o === 0)
280
+ function Ce(i, e, t, n, o) {
281
+ const r = t.length;
282
+ if (r === 0)
283
283
  return { startCol: 0, endCol: 0, visibleColumns: [] };
284
- let s = Ce(i, t, n);
285
- s = Math.max(0, s - r);
284
+ let s = Se(i, t, n);
285
+ s = Math.max(0, s - o);
286
286
  const l = i + e;
287
287
  let a = s;
288
- for (let d = s; d < o; d++) {
289
- if (t[d] >= l) {
290
- a = d - 1;
288
+ for (let c = s; c < r; c++) {
289
+ if (t[c] >= l) {
290
+ a = c - 1;
291
291
  break;
292
292
  }
293
- a = d;
293
+ a = c;
294
294
  }
295
- a = Math.min(o - 1, a + r);
296
- const c = [];
297
- for (let d = s; d <= a; d++)
298
- c.push(d);
299
- return { startCol: s, endCol: a, visibleColumns: c };
295
+ a = Math.min(r - 1, a + o);
296
+ const d = [];
297
+ for (let c = s; c <= a; c++)
298
+ d.push(c);
299
+ return { startCol: s, endCol: a, visibleColumns: d };
300
300
  }
301
- function Ce(i, e, t) {
302
- let n = 0, r = e.length - 1;
303
- for (; n < r; ) {
304
- const o = Math.floor((n + r) / 2);
305
- e[o] + t[o] <= i ? n = o + 1 : r = o;
301
+ function Se(i, e, t) {
302
+ let n = 0, o = e.length - 1;
303
+ for (; n < o; ) {
304
+ const r = Math.floor((n + o) / 2);
305
+ e[r] + t[r] <= i ? n = r + 1 : o = r;
306
306
  }
307
307
  return n;
308
308
  }
309
- function Se(i, e, t) {
309
+ function Re(i, e, t) {
310
310
  return t ? i > e : !1;
311
311
  }
312
- class yt extends y {
312
+ class Ct extends y {
313
313
  name = "columnVirtualization";
314
314
  version = "1.0.0";
315
315
  get defaultConfig() {
@@ -339,28 +339,28 @@ class yt extends y {
339
339
  }
340
340
  // ===== Hooks =====
341
341
  processColumns(e) {
342
- const t = this.config.enabled && Se(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
342
+ const t = this.config.enabled && Re(e.length, this.config.threshold ?? 30, this.config.autoEnable ?? !0);
343
343
  if (this.isVirtualized = t ?? !1, this.columnWidths = ee(e), this.columnOffsets = te(e), this.totalWidth = ne(e), !t)
344
344
  return this.startCol = 0, this.endCol = e.length - 1, [...e];
345
- const n = this.grid.clientWidth || 800, r = ye(
345
+ const n = this.grid.clientWidth || 800, o = Ce(
346
346
  this.scrollLeft,
347
347
  n,
348
348
  this.columnOffsets,
349
349
  this.columnWidths,
350
350
  this.config.overscan ?? 3
351
351
  );
352
- return this.startCol = r.startCol, this.endCol = r.endCol, r.visibleColumns.map((o) => e[o]);
352
+ return this.startCol = o.startCol, this.endCol = o.endCol, o.visibleColumns.map((r) => e[r]);
353
353
  }
354
354
  afterRender() {
355
355
  if (!this.isVirtualized) return;
356
356
  const e = this.shadowRoot;
357
357
  if (!e) return;
358
- const t = this.columnOffsets[this.startCol] ?? 0, n = e.querySelector(".header-row"), r = e.querySelectorAll(".data-grid-row");
359
- n && (n.style.paddingLeft = `${t}px`), r.forEach((s) => {
358
+ const t = this.columnOffsets[this.startCol] ?? 0, n = e.querySelector(".header-row"), o = e.querySelectorAll(".data-grid-row");
359
+ n && (n.style.paddingLeft = `${t}px`), o.forEach((s) => {
360
360
  s.style.paddingLeft = `${t}px`;
361
361
  });
362
- const o = e.querySelector(".rows-viewport .rows");
363
- o && (o.style.width = `${this.totalWidth}px`);
362
+ const r = e.querySelector(".rows-viewport .rows");
363
+ r && (r.style.width = `${this.totalWidth}px`);
364
364
  }
365
365
  onScroll(e) {
366
366
  !this.isVirtualized || Math.abs(e.scrollLeft - this.scrollLeft) < 1 || (this.scrollLeft = e.scrollLeft, this.requestRender());
@@ -400,58 +400,58 @@ class yt extends y {
400
400
  return this.totalWidth;
401
401
  }
402
402
  }
403
- function K(i, e) {
403
+ function V(i, e) {
404
404
  return (typeof i == "function" ? i(e) : i).filter((n) => !(n.hidden === !0 || typeof n.hidden == "function" && n.hidden(e)));
405
405
  }
406
- function Re(i, e) {
406
+ function ke(i, e) {
407
407
  return i.disabled === !0 ? !0 : typeof i.disabled == "function" ? i.disabled(e) : !1;
408
408
  }
409
- function V(i, e, t) {
410
- const n = document.createElement("div");
411
- n.className = "tbw-context-menu", n.setAttribute("role", "menu");
409
+ function K(i, e, t, n = xe.submenuArrow) {
410
+ const o = document.createElement("div");
411
+ o.className = "tbw-context-menu", o.setAttribute("role", "menu");
412
412
  for (const r of i) {
413
413
  if (r.separator) {
414
- const a = document.createElement("div");
415
- a.className = "tbw-context-menu-separator", a.setAttribute("role", "separator"), n.appendChild(a);
414
+ const d = document.createElement("div");
415
+ d.className = "tbw-context-menu-separator", d.setAttribute("role", "separator"), o.appendChild(d);
416
416
  continue;
417
417
  }
418
- const o = document.createElement("div");
419
- o.className = "tbw-context-menu-item", r.cssClass && o.classList.add(r.cssClass), o.setAttribute("role", "menuitem"), o.setAttribute("data-id", r.id);
420
- const s = Re(r, e);
421
- if (s && (o.classList.add("disabled"), o.setAttribute("aria-disabled", "true")), r.icon) {
422
- const a = document.createElement("span");
423
- a.className = "tbw-context-menu-icon", a.innerHTML = r.icon, o.appendChild(a);
418
+ const s = document.createElement("div");
419
+ s.className = "tbw-context-menu-item", r.cssClass && s.classList.add(r.cssClass), s.setAttribute("role", "menuitem"), s.setAttribute("data-id", r.id);
420
+ const l = ke(r, e);
421
+ if (l && (s.classList.add("disabled"), s.setAttribute("aria-disabled", "true")), r.icon) {
422
+ const d = document.createElement("span");
423
+ d.className = "tbw-context-menu-icon", d.innerHTML = r.icon, s.appendChild(d);
424
424
  }
425
- const l = document.createElement("span");
426
- if (l.className = "tbw-context-menu-label", l.textContent = r.name, o.appendChild(l), r.shortcut) {
427
- const a = document.createElement("span");
428
- a.className = "tbw-context-menu-shortcut", a.textContent = r.shortcut, o.appendChild(a);
425
+ const a = document.createElement("span");
426
+ if (a.className = "tbw-context-menu-label", a.textContent = r.name, s.appendChild(a), r.shortcut) {
427
+ const d = document.createElement("span");
428
+ d.className = "tbw-context-menu-shortcut", d.textContent = r.shortcut, s.appendChild(d);
429
429
  }
430
430
  if (r.subMenu?.length) {
431
- const a = document.createElement("span");
432
- a.className = "tbw-context-menu-arrow", a.textContent = "▶", o.appendChild(a), o.addEventListener("mouseenter", () => {
433
- if (o.querySelector(".tbw-context-menu") || !r.subMenu) return;
434
- const d = K(r.subMenu, e), u = V(d, e, t);
435
- u.classList.add("tbw-context-submenu"), u.style.position = "absolute", u.style.left = "100%", u.style.top = "0", o.style.position = "relative", o.appendChild(u);
436
- }), o.addEventListener("mouseleave", () => {
437
- const c = o.querySelector(".tbw-context-menu");
431
+ const d = document.createElement("span");
432
+ d.className = "tbw-context-menu-arrow", typeof n == "string" ? d.innerHTML = n : n instanceof HTMLElement && d.appendChild(n.cloneNode(!0)), s.appendChild(d), s.addEventListener("mouseenter", () => {
433
+ if (s.querySelector(".tbw-context-menu") || !r.subMenu) return;
434
+ const u = V(r.subMenu, e), h = K(u, e, t, n);
435
+ h.classList.add("tbw-context-submenu"), h.style.position = "absolute", h.style.left = "100%", h.style.top = "0", s.style.position = "relative", s.appendChild(h);
436
+ }), s.addEventListener("mouseleave", () => {
437
+ const c = s.querySelector(".tbw-context-menu");
438
438
  c && c.remove();
439
439
  });
440
440
  }
441
- !s && r.action && !r.subMenu && o.addEventListener("click", (a) => {
442
- a.stopPropagation(), t(r);
443
- }), n.appendChild(o);
441
+ !l && r.action && !r.subMenu && s.addEventListener("click", (d) => {
442
+ d.stopPropagation(), t(r);
443
+ }), o.appendChild(s);
444
444
  }
445
- return n;
445
+ return o;
446
446
  }
447
- function re(i, e, t) {
447
+ function oe(i, e, t) {
448
448
  i.style.position = "fixed", i.style.left = `${e}px`, i.style.top = `${t}px`, i.style.visibility = "hidden", i.style.zIndex = "10000";
449
- const n = i.getBoundingClientRect(), r = window.innerWidth, o = window.innerHeight;
449
+ const n = i.getBoundingClientRect(), o = window.innerWidth, r = window.innerHeight;
450
450
  let s = e, l = t;
451
- e + n.width > r && (s = e - n.width), t + n.height > o && (l = t - n.height), s = Math.max(0, s), l = Math.max(0, l), i.style.left = `${s}px`, i.style.top = `${l}px`, i.style.visibility = "visible";
451
+ e + n.width > o && (s = e - n.width), t + n.height > r && (l = t - n.height), s = Math.max(0, s), l = Math.max(0, l), i.style.left = `${s}px`, i.style.top = `${l}px`, i.style.visibility = "visible";
452
452
  }
453
- let P = null, D = null, A = null;
454
- const ke = `
453
+ let D = null, P = null, A = null;
454
+ const Ee = `
455
455
  .tbw-context-menu {
456
456
  position: fixed;
457
457
  background: light-dark(#f5f5f5, #2a2a2a);
@@ -520,7 +520,7 @@ const ke = `
520
520
  }
521
521
  }
522
522
  ];
523
- class Ct extends y {
523
+ class St extends y {
524
524
  name = "contextMenu";
525
525
  version = "1.0.0";
526
526
  get defaultConfig() {
@@ -543,11 +543,11 @@ class Ct extends y {
543
543
  }
544
544
  // ===== Private Methods =====
545
545
  installGlobalHandlers() {
546
- !A && typeof document < "u" && (A = document.createElement("style"), A.id = "tbw-context-menu-styles", A.textContent = ke, document.head.appendChild(A)), P || (P = () => {
546
+ !A && typeof document < "u" && (A = document.createElement("style"), A.id = "tbw-context-menu-styles", A.textContent = Ee, document.head.appendChild(A)), D || (D = () => {
547
547
  document.querySelectorAll(".tbw-context-menu").forEach((t) => t.remove());
548
- }, document.addEventListener("click", P)), D || (D = (e) => {
548
+ }, document.addEventListener("click", D)), P || (P = (e) => {
549
549
  e.key === "Escape" && document.querySelectorAll(".tbw-context-menu").forEach((n) => n.remove());
550
- }, document.addEventListener("keydown", D));
550
+ }, document.addEventListener("keydown", P));
551
551
  }
552
552
  // ===== Hooks =====
553
553
  afterRender() {
@@ -557,41 +557,46 @@ class Ct extends y {
557
557
  const t = e.children[0];
558
558
  t && t.getAttribute("data-context-menu-bound") !== "true" && (t.setAttribute("data-context-menu-bound", "true"), t.addEventListener("contextmenu", (n) => {
559
559
  if (!this.config.enabled) return;
560
- const r = n;
561
- r.preventDefault();
562
- const o = r.target, s = o.closest("[data-row][data-col]"), l = o.closest(".header-cell");
560
+ const o = n;
561
+ o.preventDefault();
562
+ const r = o.target, s = r.closest("[data-row][data-col]"), l = r.closest(".header-cell");
563
563
  let a;
564
564
  if (s) {
565
- const d = parseInt(s.getAttribute("data-row") ?? "-1", 10), u = parseInt(s.getAttribute("data-col") ?? "-1", 10), h = this.columns[u], f = this.rows[d];
565
+ const c = parseInt(s.getAttribute("data-row") ?? "-1", 10), u = parseInt(s.getAttribute("data-col") ?? "-1", 10), h = this.columns[u], f = this.rows[c];
566
566
  a = {
567
567
  row: f,
568
- rowIndex: d,
568
+ rowIndex: c,
569
569
  column: h,
570
570
  columnIndex: u,
571
571
  field: h?.field ?? "",
572
572
  value: f?.[h?.field] ?? null,
573
573
  isHeader: !1,
574
- event: r
574
+ event: o
575
575
  };
576
576
  } else if (l) {
577
- const d = parseInt(l.getAttribute("data-col") ?? "-1", 10), u = this.columns[d];
577
+ const c = parseInt(l.getAttribute("data-col") ?? "-1", 10), u = this.columns[c];
578
578
  a = {
579
579
  row: null,
580
580
  rowIndex: -1,
581
581
  column: u,
582
- columnIndex: d,
582
+ columnIndex: c,
583
583
  field: u?.field ?? "",
584
584
  value: null,
585
585
  isHeader: !0,
586
- event: r
586
+ event: o
587
587
  };
588
588
  } else
589
589
  return;
590
- this.params = a, this.position = { x: r.clientX, y: r.clientY };
591
- const c = K(this.config.items ?? B, a);
592
- c.length && (this.menuElement && this.menuElement.remove(), this.menuElement = V(c, a, (d) => {
593
- d.action && d.action(a), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
594
- }), document.body.appendChild(this.menuElement), re(this.menuElement, r.clientX, r.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: a, items: c }));
590
+ this.params = a, this.position = { x: o.clientX, y: o.clientY };
591
+ const d = V(this.config.items ?? B, a);
592
+ d.length && (this.menuElement && this.menuElement.remove(), this.menuElement = K(
593
+ d,
594
+ a,
595
+ (c) => {
596
+ c.action && c.action(a), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
597
+ },
598
+ this.gridIcons.submenuArrow
599
+ ), document.body.appendChild(this.menuElement), oe(this.menuElement, o.clientX, o.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: a, items: d }));
595
600
  }));
596
601
  }
597
602
  // ===== Public API =====
@@ -602,7 +607,7 @@ class Ct extends y {
602
607
  * @param params - Partial context menu parameters
603
608
  */
604
609
  showMenu(e, t, n) {
605
- const r = {
610
+ const o = {
606
611
  row: n.row ?? null,
607
612
  rowIndex: n.rowIndex ?? -1,
608
613
  column: n.column ?? null,
@@ -611,10 +616,15 @@ class Ct extends y {
611
616
  value: n.value ?? null,
612
617
  isHeader: n.isHeader ?? !1,
613
618
  event: n.event ?? new MouseEvent("contextmenu")
614
- }, o = K(this.config.items ?? B, r);
615
- this.menuElement && this.menuElement.remove(), this.menuElement = V(o, r, (s) => {
616
- s.action && s.action(r), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
617
- }), document.body.appendChild(this.menuElement), re(this.menuElement, e, t), this.isOpen = !0;
619
+ }, r = V(this.config.items ?? B, o);
620
+ this.menuElement && this.menuElement.remove(), this.menuElement = K(
621
+ r,
622
+ o,
623
+ (s) => {
624
+ s.action && s.action(o), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
625
+ },
626
+ this.gridIcons.submenuArrow
627
+ ), document.body.appendChild(this.menuElement), oe(this.menuElement, e, t), this.isOpen = !0;
618
628
  }
619
629
  /**
620
630
  * Hide the context menu.
@@ -631,7 +641,7 @@ class Ct extends y {
631
641
  }
632
642
  // Styles are injected globally via installGlobalHandlers() since menu renders in document.body
633
643
  }
634
- function oe(i, e = !0) {
644
+ function re(i, e = !0) {
635
645
  if (i == null) return "";
636
646
  if (i instanceof Date) return i.toISOString();
637
647
  if (typeof i == "object") return JSON.stringify(i);
@@ -639,30 +649,30 @@ function oe(i, e = !0) {
639
649
  return e && (t.includes(",") || t.includes('"') || t.includes(`
640
650
  `) || t.includes("\r")) ? `"${t.replace(/"/g, '""')}"` : t;
641
651
  }
642
- function Ee(i, e, t, n = {}) {
643
- const r = n.delimiter ?? ",", o = n.newline ?? `
652
+ function Ae(i, e, t, n = {}) {
653
+ const o = n.delimiter ?? ",", r = n.newline ?? `
644
654
  `, s = [], l = n.bom ? "\uFEFF" : "";
645
655
  if (t.includeHeaders !== !1) {
646
- const a = e.map((c) => {
647
- const d = c.header || c.field, u = t.processHeader ? t.processHeader(d, c.field) : d;
648
- return oe(u);
656
+ const a = e.map((d) => {
657
+ const c = d.header || d.field, u = t.processHeader ? t.processHeader(c, d.field) : c;
658
+ return re(u);
649
659
  });
650
- s.push(a.join(r));
660
+ s.push(a.join(o));
651
661
  }
652
662
  for (const a of i) {
653
- const c = e.map((d) => {
654
- let u = a[d.field];
655
- return t.processCell && (u = t.processCell(u, d.field, a)), oe(u);
663
+ const d = e.map((c) => {
664
+ let u = a[c.field];
665
+ return t.processCell && (u = t.processCell(u, c.field, a)), re(u);
656
666
  });
657
- s.push(c.join(r));
667
+ s.push(d.join(o));
658
668
  }
659
- return l + s.join(o);
669
+ return l + s.join(r);
660
670
  }
661
671
  function z(i, e) {
662
672
  const t = URL.createObjectURL(i), n = document.createElement("a");
663
673
  n.href = t, n.download = e, n.style.display = "none", document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(t);
664
674
  }
665
- function Ae(i, e) {
675
+ function Ie(i, e) {
666
676
  const t = new Blob([i], { type: "text/csv;charset=utf-8;" });
667
677
  z(t, e);
668
678
  }
@@ -679,18 +689,18 @@ function _e(i, e, t) {
679
689
  if (t.includeHeaders !== !1) {
680
690
  n += `
681
691
  <Row>`;
682
- for (const r of e) {
683
- const o = r.header || r.field, s = t.processHeader ? t.processHeader(o, r.field) : o;
692
+ for (const o of e) {
693
+ const r = o.header || o.field, s = t.processHeader ? t.processHeader(r, o.field) : r;
684
694
  n += `<Cell><Data ss:Type="String">${ie(s)}</Data></Cell>`;
685
695
  }
686
696
  n += "</Row>";
687
697
  }
688
- for (const r of i) {
698
+ for (const o of i) {
689
699
  n += `
690
700
  <Row>`;
691
- for (const o of e) {
692
- let s = r[o.field];
693
- t.processCell && (s = t.processCell(s, o.field, r));
701
+ for (const r of e) {
702
+ let s = o[r.field];
703
+ t.processCell && (s = t.processCell(s, r.field, o));
694
704
  let l = "String", a = "";
695
705
  s == null ? a = "" : typeof s == "number" && !isNaN(s) ? (l = "Number", a = String(s)) : s instanceof Date ? (l = "DateTime", a = s.toISOString()) : a = ie(String(s)), n += `<Cell><Data ss:Type="${l}">${a}</Data></Cell>`;
696
706
  }
@@ -701,13 +711,13 @@ function _e(i, e, t) {
701
711
  </Worksheet>
702
712
  </Workbook>`, n;
703
713
  }
704
- function Ie(i, e) {
714
+ function Te(i, e) {
705
715
  const t = e.endsWith(".xls") ? e : `${e}.xls`, n = new Blob([i], {
706
716
  type: "application/vnd.ms-excel;charset=utf-8;"
707
717
  });
708
718
  z(n, t);
709
719
  }
710
- class St extends y {
720
+ class Rt extends y {
711
721
  name = "export";
712
722
  version = "1.0.0";
713
723
  get defaultConfig() {
@@ -724,7 +734,7 @@ class St extends y {
724
734
  lastExportInfo = null;
725
735
  // ===== Private Methods =====
726
736
  performExport(e, t) {
727
- const n = this.config, r = {
737
+ const n = this.config, o = {
728
738
  format: e,
729
739
  fileName: t?.fileName ?? n.fileName ?? "export",
730
740
  includeHeaders: t?.includeHeaders ?? n.includeHeaders,
@@ -733,42 +743,42 @@ class St extends y {
733
743
  columns: t?.columns,
734
744
  rowIndices: t?.rowIndices
735
745
  };
736
- let o = [...this.columns];
737
- if (n.onlyVisible && (o = o.filter((a) => !a.hidden && !a.field.startsWith("__"))), t?.columns) {
746
+ let r = [...this.columns];
747
+ if (n.onlyVisible && (r = r.filter((a) => !a.hidden && !a.field.startsWith("__"))), t?.columns) {
738
748
  const a = new Set(t.columns);
739
- o = o.filter((c) => a.has(c.field));
749
+ r = r.filter((d) => a.has(d.field));
740
750
  }
741
751
  let s = [...this.rows];
742
752
  if (n.onlySelected) {
743
753
  const a = this.getSelectionState();
744
- a?.selected?.size && (s = [...a.selected].sort((d, u) => d - u).map((d) => this.rows[d]).filter(Boolean));
754
+ a?.selected?.size && (s = [...a.selected].sort((c, u) => c - u).map((c) => this.rows[c]).filter(Boolean));
745
755
  }
746
756
  t?.rowIndices && (s = t.rowIndices.map((a) => this.rows[a]).filter(Boolean)), this.isExportingFlag = !0;
747
- let l = r.fileName;
757
+ let l = o.fileName;
748
758
  try {
749
759
  switch (e) {
750
760
  case "csv": {
751
- const a = Ee(s, o, r, { bom: !0 });
752
- l = l.endsWith(".csv") ? l : `${l}.csv`, Ae(a, l);
761
+ const a = Ae(s, r, o, { bom: !0 });
762
+ l = l.endsWith(".csv") ? l : `${l}.csv`, Ie(a, l);
753
763
  break;
754
764
  }
755
765
  case "excel": {
756
- const a = _e(s, o, r);
757
- l = l.endsWith(".xls") ? l : `${l}.xls`, Ie(a, l);
766
+ const a = _e(s, r, o);
767
+ l = l.endsWith(".xls") ? l : `${l}.xls`, Te(a, l);
758
768
  break;
759
769
  }
760
770
  case "json": {
761
771
  const a = s.map((u) => {
762
772
  const h = {};
763
- for (const f of o) {
773
+ for (const f of r) {
764
774
  let g = u[f.field];
765
- r.processCell && (g = r.processCell(g, f.field, u)), h[f.field] = g;
775
+ o.processCell && (g = o.processCell(g, f.field, u)), h[f.field] = g;
766
776
  }
767
777
  return h;
768
- }), c = JSON.stringify(a, null, 2);
778
+ }), d = JSON.stringify(a, null, 2);
769
779
  l = l.endsWith(".json") ? l : `${l}.json`;
770
- const d = new Blob([c], { type: "application/json" });
771
- z(d, l);
780
+ const c = new Blob([d], { type: "application/json" });
781
+ z(c, l);
772
782
  break;
773
783
  }
774
784
  }
@@ -776,7 +786,7 @@ class St extends y {
776
786
  format: e,
777
787
  fileName: l,
778
788
  rowCount: s.length,
779
- columnCount: o.length
789
+ columnCount: r.length
780
790
  });
781
791
  } finally {
782
792
  this.isExportingFlag = !1;
@@ -826,43 +836,43 @@ class St extends y {
826
836
  return this.lastExportInfo;
827
837
  }
828
838
  }
829
- function Te(i) {
830
- const { totalRows: e, viewportHeight: t, scrollTop: n, rowHeight: r, overscan: o } = i, s = Math.ceil(t / r);
831
- let l = Math.floor(n / r) - o;
839
+ function Le(i) {
840
+ const { totalRows: e, viewportHeight: t, scrollTop: n, rowHeight: o, overscan: r } = i, s = Math.ceil(t / o);
841
+ let l = Math.floor(n / o) - r;
832
842
  l < 0 && (l = 0);
833
- let a = l + s + o * 2;
834
- return a > e && (a = e), a === e && l > 0 && (l = Math.max(0, a - s - o * 2)), {
843
+ let a = l + s + r * 2;
844
+ return a > e && (a = e), a === e && l > 0 && (l = Math.max(0, a - s - r * 2)), {
835
845
  start: l,
836
846
  end: a,
837
- offsetY: l * r,
838
- totalHeight: e * r
847
+ offsetY: l * o,
848
+ totalHeight: e * o
839
849
  };
840
850
  }
841
- function Le(i, e) {
851
+ function Me(i, e) {
842
852
  return i <= e;
843
853
  }
844
- function Me(i, e, t = !1) {
854
+ function qe(i, e, t = !1) {
845
855
  const n = i[e.field];
846
856
  if (e.operator === "blank")
847
857
  return n == null || n === "";
848
858
  if (e.operator === "notBlank")
849
859
  return n != null && n !== "";
850
860
  if (n == null) return !1;
851
- const r = String(n), o = t ? r : r.toLowerCase(), s = t ? String(e.value) : String(e.value).toLowerCase();
861
+ const o = String(n), r = t ? o : o.toLowerCase(), s = t ? String(e.value) : String(e.value).toLowerCase();
852
862
  switch (e.operator) {
853
863
  // Text operators
854
864
  case "contains":
855
- return o.includes(s);
865
+ return r.includes(s);
856
866
  case "notContains":
857
- return !o.includes(s);
867
+ return !r.includes(s);
858
868
  case "equals":
859
- return o === s;
869
+ return r === s;
860
870
  case "notEquals":
861
- return o !== s;
871
+ return r !== s;
862
872
  case "startsWith":
863
- return o.startsWith(s);
873
+ return r.startsWith(s);
864
874
  case "endsWith":
865
- return o.endsWith(s);
875
+ return r.endsWith(s);
866
876
  // Number/Date operators (use raw numeric values)
867
877
  case "lessThan":
868
878
  return Number(n) < Number(e.value);
@@ -883,10 +893,10 @@ function Me(i, e, t = !1) {
883
893
  return !0;
884
894
  }
885
895
  }
886
- function qe(i, e, t = !1) {
887
- return e.length ? i.filter((n) => e.every((r) => Me(n, r, t))) : i;
896
+ function Fe(i, e, t = !1) {
897
+ return e.length ? i.filter((n) => e.every((o) => qe(n, o, t))) : i;
888
898
  }
889
- function Fe(i) {
899
+ function Ne(i) {
890
900
  return JSON.stringify(
891
901
  i.map((e) => ({
892
902
  field: e.field,
@@ -899,12 +909,12 @@ function Fe(i) {
899
909
  function se(i, e) {
900
910
  const t = /* @__PURE__ */ new Set();
901
911
  for (const n of i) {
902
- const r = n[e];
903
- r != null && t.add(r);
912
+ const o = n[e];
913
+ o != null && t.add(o);
904
914
  }
905
- return [...t].sort((n, r) => typeof n == "number" && typeof r == "number" ? n - r : String(n).localeCompare(String(r)));
915
+ return [...t].sort((n, o) => typeof n == "number" && typeof o == "number" ? n - o : String(n).localeCompare(String(o)));
906
916
  }
907
- const Ne = `
917
+ const De = `
908
918
  .tbw-filter-panel {
909
919
  position: fixed;
910
920
  background: var(--tbw-filter-panel-bg, var(--tbw-color-panel-bg, light-dark(#eeeeee, #222222)));
@@ -1066,7 +1076,8 @@ class E extends y {
1066
1076
  panelElement = null;
1067
1077
  searchText = /* @__PURE__ */ new Map();
1068
1078
  excludedValues = /* @__PURE__ */ new Map();
1069
- documentClickHandler = null;
1079
+ panelAbortController = null;
1080
+ // For panel-scoped listeners
1070
1081
  globalStylesInjected = !1;
1071
1082
  // Virtualization constants for filter value list
1072
1083
  static LIST_ITEM_HEIGHT = 28;
@@ -1078,32 +1089,32 @@ class E extends y {
1078
1089
  super.attach(e), this.injectGlobalStyles();
1079
1090
  }
1080
1091
  detach() {
1081
- this.filters.clear(), this.cachedResult = null, this.cacheKey = null, this.openPanelField = null, this.panelElement && (this.panelElement.remove(), this.panelElement = null), this.searchText.clear(), this.excludedValues.clear(), this.removeDocumentClickHandler();
1092
+ this.filters.clear(), this.cachedResult = null, this.cacheKey = null, this.openPanelField = null, this.panelElement && (this.panelElement.remove(), this.panelElement = null), this.searchText.clear(), this.excludedValues.clear(), this.panelAbortController?.abort(), this.panelAbortController = null;
1082
1093
  }
1083
1094
  // ===== Hooks =====
1084
1095
  processRows(e) {
1085
1096
  const t = [...this.filters.values()];
1086
1097
  if (!t.length) return [...e];
1087
- const n = Fe(t);
1098
+ const n = Ne(t);
1088
1099
  if (this.cacheKey === n && this.cachedResult)
1089
1100
  return this.cachedResult;
1090
- const r = qe([...e], t, this.config.caseSensitive);
1091
- return this.cachedResult = r, this.cacheKey = n, r;
1101
+ const o = Fe([...e], t, this.config.caseSensitive);
1102
+ return this.cachedResult = o, this.cacheKey = n, o;
1092
1103
  }
1093
1104
  afterRender() {
1094
1105
  if (!this.config.enabled) return;
1095
1106
  const e = this.shadowRoot;
1096
1107
  if (!e) return;
1097
1108
  e.querySelectorAll('[part~="header-cell"]').forEach((n) => {
1098
- const r = n.getAttribute("data-col");
1099
- if (r === null) return;
1100
- const o = this.columns[parseInt(r, 10)];
1101
- if (!o || o.filterable === !1 || n.querySelector(".tbw-filter-btn")) return;
1102
- const s = o.field;
1109
+ const o = n.getAttribute("data-col");
1110
+ if (o === null) return;
1111
+ const r = this.columns[parseInt(o, 10)];
1112
+ if (!r || r.filterable === !1 || n.querySelector(".tbw-filter-btn")) return;
1113
+ const s = r.field;
1103
1114
  if (!s) return;
1104
1115
  const l = document.createElement("button");
1105
- l.className = "tbw-filter-btn", l.setAttribute("aria-label", `Filter ${o.header ?? s}`), l.innerHTML = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', this.filters.has(s) && (l.classList.add("active"), n.classList.add("filtered")), l.addEventListener("click", (a) => {
1106
- a.stopPropagation(), this.toggleFilterPanel(s, o, l);
1116
+ l.className = "tbw-filter-btn", l.setAttribute("aria-label", `Filter ${r.header ?? s}`), l.innerHTML = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', this.filters.has(s) && (l.classList.add("active"), n.classList.add("filtered")), l.addEventListener("click", (a) => {
1117
+ a.stopPropagation(), this.toggleFilterPanel(s, r, l);
1107
1118
  }), n.appendChild(l);
1108
1119
  });
1109
1120
  }
@@ -1203,7 +1214,7 @@ class E extends y {
1203
1214
  return;
1204
1215
  }
1205
1216
  const e = document.createElement("style");
1206
- e.id = "tbw-filter-panel-styles", e.textContent = Ne, document.head.appendChild(e), this.globalStylesInjected = !0;
1217
+ e.id = "tbw-filter-panel-styles", e.textContent = De, document.head.appendChild(e), this.globalStylesInjected = !0;
1207
1218
  }
1208
1219
  /**
1209
1220
  * Toggle the filter panel for a field
@@ -1214,48 +1225,44 @@ class E extends y {
1214
1225
  return;
1215
1226
  }
1216
1227
  this.closeFilterPanel();
1217
- const r = document.createElement("div");
1218
- r.className = "tbw-filter-panel", this.panelElement = r, this.openPanelField = e;
1219
- const o = se(this.sourceRows, e);
1228
+ const o = document.createElement("div");
1229
+ o.className = "tbw-filter-panel", this.panelElement = o, this.openPanelField = e;
1230
+ const r = se(this.sourceRows, e);
1220
1231
  let s = this.excludedValues.get(e);
1221
1232
  s || (s = /* @__PURE__ */ new Set(), this.excludedValues.set(e, s));
1222
1233
  const l = this.searchText.get(e) ?? "", a = {
1223
1234
  field: e,
1224
1235
  column: t,
1225
- uniqueValues: o,
1236
+ uniqueValues: r,
1226
1237
  excludedValues: s,
1227
1238
  searchText: l,
1228
- applySetFilter: (u) => {
1229
- this.applySetFilter(e, u), this.closeFilterPanel();
1239
+ applySetFilter: (c) => {
1240
+ this.applySetFilter(e, c), this.closeFilterPanel();
1230
1241
  },
1231
- applyTextFilter: (u, h, f) => {
1232
- this.applyTextFilter(e, u, h, f), this.closeFilterPanel();
1242
+ applyTextFilter: (c, u, h) => {
1243
+ this.applyTextFilter(e, c, u, h), this.closeFilterPanel();
1233
1244
  },
1234
1245
  clearFilter: () => {
1235
1246
  this.clearFieldFilter(e), this.closeFilterPanel();
1236
1247
  },
1237
1248
  closePanel: () => this.closeFilterPanel()
1238
1249
  };
1239
- let c = !1;
1240
- this.config.filterPanelRenderer && (this.config.filterPanelRenderer(r, a), c = r.children.length > 0), c || this.renderDefaultFilterPanel(r, a, o, s), document.body.appendChild(r), this.positionPanel(r, n);
1241
- const d = (u) => {
1242
- !r.contains(u.target) && u.target !== n && this.closeFilterPanel();
1243
- };
1244
- this.documentClickHandler = d, setTimeout(() => {
1245
- document.addEventListener("click", d);
1250
+ let d = !1;
1251
+ this.config.filterPanelRenderer && (this.config.filterPanelRenderer(o, a), d = o.children.length > 0), d || this.renderDefaultFilterPanel(o, a, r, s), document.body.appendChild(o), this.positionPanel(o, n), this.panelAbortController = new AbortController(), setTimeout(() => {
1252
+ document.addEventListener(
1253
+ "click",
1254
+ (c) => {
1255
+ !o.contains(c.target) && c.target !== n && this.closeFilterPanel();
1256
+ },
1257
+ { signal: this.panelAbortController?.signal }
1258
+ );
1246
1259
  }, 0);
1247
1260
  }
1248
1261
  /**
1249
1262
  * Close the filter panel
1250
1263
  */
1251
1264
  closeFilterPanel() {
1252
- this.panelElement && (this.panelElement.remove(), this.panelElement = null), this.openPanelField = null, this.removeDocumentClickHandler();
1253
- }
1254
- /**
1255
- * Remove the document click handler
1256
- */
1257
- removeDocumentClickHandler() {
1258
- this.documentClickHandler && (document.removeEventListener("click", this.documentClickHandler), this.documentClickHandler = null);
1265
+ this.panelElement && (this.panelElement.remove(), this.panelElement = null), this.openPanelField = null, this.panelAbortController?.abort(), this.panelAbortController = null;
1259
1266
  }
1260
1267
  /**
1261
1268
  * Position the panel below the button
@@ -1263,32 +1270,32 @@ class E extends y {
1263
1270
  positionPanel(e, t) {
1264
1271
  const n = t.getBoundingClientRect();
1265
1272
  e.style.position = "fixed", e.style.top = `${n.bottom + 4}px`, e.style.left = `${n.left}px`, requestAnimationFrame(() => {
1266
- const r = e.getBoundingClientRect();
1267
- r.right > window.innerWidth - 8 && (e.style.left = `${window.innerWidth - r.width - 8}px`), r.bottom > window.innerHeight - 8 && (e.style.top = `${n.top - r.height - 4}px`);
1273
+ const o = e.getBoundingClientRect();
1274
+ o.right > window.innerWidth - 8 && (e.style.left = `${window.innerWidth - o.width - 8}px`), o.bottom > window.innerHeight - 8 && (e.style.top = `${n.top - o.height - 4}px`);
1268
1275
  });
1269
1276
  }
1270
1277
  /**
1271
1278
  * Render the default filter panel content
1272
1279
  */
1273
- renderDefaultFilterPanel(e, t, n, r) {
1274
- const { field: o } = t, s = document.createElement("div");
1280
+ renderDefaultFilterPanel(e, t, n, o) {
1281
+ const { field: r } = t, s = document.createElement("div");
1275
1282
  s.className = "tbw-filter-search";
1276
1283
  const l = document.createElement("input");
1277
- l.type = "text", l.placeholder = "Search...", l.className = "tbw-filter-search-input", l.value = this.searchText.get(o) ?? "", s.appendChild(l), e.appendChild(s);
1284
+ l.type = "text", l.placeholder = "Search...", l.className = "tbw-filter-search-input", l.value = this.searchText.get(r) ?? "", s.appendChild(l), e.appendChild(s);
1278
1285
  const a = document.createElement("div");
1279
1286
  a.className = "tbw-filter-actions";
1280
- const c = document.createElement("label");
1281
- c.className = "tbw-filter-value-item", c.style.padding = "0", c.style.margin = "0";
1282
- const d = document.createElement("input");
1283
- d.type = "checkbox", d.className = "tbw-filter-checkbox";
1287
+ const d = document.createElement("label");
1288
+ d.className = "tbw-filter-value-item", d.style.padding = "0", d.style.margin = "0";
1289
+ const c = document.createElement("input");
1290
+ c.type = "checkbox", c.className = "tbw-filter-checkbox";
1284
1291
  const u = document.createElement("span");
1285
- u.textContent = "Select All", c.appendChild(d), c.appendChild(u), a.appendChild(c);
1292
+ u.textContent = "Select All", d.appendChild(c), d.appendChild(u), a.appendChild(d);
1286
1293
  const h = () => {
1287
1294
  const p = [...b.values()], v = p.every((x) => x), C = p.every((x) => !x);
1288
- d.checked = v, d.indeterminate = !v && !C;
1295
+ c.checked = v, c.indeterminate = !v && !C;
1289
1296
  };
1290
- d.addEventListener("change", () => {
1291
- const p = d.checked;
1297
+ c.addEventListener("change", () => {
1298
+ const p = c.checked;
1292
1299
  for (const v of b.keys())
1293
1300
  b.set(v, p);
1294
1301
  h(), q();
@@ -1302,7 +1309,7 @@ class E extends y {
1302
1309
  const b = /* @__PURE__ */ new Map();
1303
1310
  n.forEach((p) => {
1304
1311
  const v = p == null ? "__null__" : String(p);
1305
- b.set(v, !r.has(p));
1312
+ b.set(v, !o.has(p));
1306
1313
  }), h();
1307
1314
  let S = [];
1308
1315
  const R = (p, v) => {
@@ -1316,13 +1323,13 @@ class E extends y {
1316
1323
  return Y.textContent = C, w.appendChild(k), w.appendChild(Y), w;
1317
1324
  }, q = () => {
1318
1325
  const p = S.length, v = f.clientHeight, C = f.scrollTop;
1319
- if (g.style.height = `${p * E.LIST_ITEM_HEIGHT}px`, Le(p, E.LIST_BYPASS_THRESHOLD / 3)) {
1326
+ if (g.style.height = `${p * E.LIST_ITEM_HEIGHT}px`, Me(p, E.LIST_BYPASS_THRESHOLD / 3)) {
1320
1327
  m.innerHTML = "", m.style.transform = "translateY(0px)", S.forEach((w, k) => {
1321
1328
  m.appendChild(R(w, k));
1322
1329
  });
1323
1330
  return;
1324
1331
  }
1325
- const x = Te({
1332
+ const x = Le({
1326
1333
  totalRows: p,
1327
1334
  viewportHeight: v,
1328
1335
  scrollTop: C,
@@ -1355,11 +1362,11 @@ class E extends y {
1355
1362
  let U;
1356
1363
  l.addEventListener("input", () => {
1357
1364
  clearTimeout(U), U = setTimeout(() => {
1358
- this.searchText.set(o, l.value), j(l.value);
1365
+ this.searchText.set(r, l.value), j(l.value);
1359
1366
  }, this.config.debounceMs ?? 150);
1360
1367
  });
1361
- const I = document.createElement("div");
1362
- I.className = "tbw-filter-buttons";
1368
+ const _ = document.createElement("div");
1369
+ _.className = "tbw-filter-buttons";
1363
1370
  const T = document.createElement("button");
1364
1371
  T.className = "tbw-filter-apply-btn", T.textContent = "Apply", T.addEventListener("click", () => {
1365
1372
  const p = [];
@@ -1372,11 +1379,11 @@ class E extends y {
1372
1379
  p.push(x !== void 0 ? x : v);
1373
1380
  }
1374
1381
  t.applySetFilter(p);
1375
- }), I.appendChild(T);
1382
+ }), _.appendChild(T);
1376
1383
  const L = document.createElement("button");
1377
1384
  L.className = "tbw-filter-clear-btn", L.textContent = "Clear Filter", L.addEventListener("click", () => {
1378
1385
  t.clearFilter();
1379
- }), I.appendChild(L), e.appendChild(I);
1386
+ }), _.appendChild(L), e.appendChild(_);
1380
1387
  }
1381
1388
  /**
1382
1389
  * Apply a set filter (exclude values)
@@ -1395,13 +1402,13 @@ class E extends y {
1395
1402
  /**
1396
1403
  * Apply a text filter
1397
1404
  */
1398
- applyTextFilter(e, t, n, r) {
1405
+ applyTextFilter(e, t, n, o) {
1399
1406
  this.filters.set(e, {
1400
1407
  field: e,
1401
1408
  type: "text",
1402
1409
  operator: t,
1403
1410
  value: n,
1404
- valueTo: r
1411
+ valueTo: o
1405
1412
  }), this.cachedResult = null, this.cacheKey = null, this.emit("filter-change", {
1406
1413
  filters: [...this.filters.values()],
1407
1414
  filteredRowCount: 0
@@ -1492,54 +1499,54 @@ function Pe(i) {
1492
1499
  implicit: !0
1493
1500
  });
1494
1501
  };
1495
- let r = [], o = 0;
1502
+ let o = [], r = 0;
1496
1503
  return i.forEach((s, l) => {
1497
1504
  const a = s.group;
1498
1505
  if (!a) {
1499
- r.length === 0 && (o = l), r.push(s);
1506
+ o.length === 0 && (r = l), o.push(s);
1500
1507
  return;
1501
1508
  }
1502
- r.length && (n(o, r.slice()), r = []);
1503
- const c = typeof a == "string" ? a : a.id;
1504
- let d = e.get(c);
1505
- d || (d = {
1506
- id: c,
1509
+ o.length && (n(r, o.slice()), o = []);
1510
+ const d = typeof a == "string" ? a : a.id;
1511
+ let c = e.get(d);
1512
+ c || (c = {
1513
+ id: d,
1507
1514
  label: typeof a == "string" ? void 0 : a.label,
1508
1515
  columns: [],
1509
1516
  firstIndex: l
1510
- }, e.set(c, d), t.push(d)), d.columns.push(s);
1511
- }), r.length && n(o, r), t.length === 1 && t[0].implicit && t[0].columns.length === i.length ? [] : t;
1517
+ }, e.set(d, c), t.push(c)), c.columns.push(s);
1518
+ }), o.length && n(r, o), t.length === 1 && t[0].implicit && t[0].columns.length === i.length ? [] : t;
1512
1519
  }
1513
- function De(i, e, t) {
1520
+ function Be(i, e, t) {
1514
1521
  if (!e.length || !i) return;
1515
1522
  const n = /* @__PURE__ */ new Map();
1516
- for (const o of e)
1517
- for (const s of o.columns)
1518
- s?.field && n.set(s.field, o.id);
1519
- const r = Array.from(i.querySelectorAll(".cell[data-field]"));
1520
- r.forEach((o) => {
1521
- const s = o.getAttribute("data-field") || "", l = n.get(s);
1522
- l && (o.classList.add("grouped"), o.getAttribute("data-group") || o.setAttribute("data-group", l));
1523
+ for (const r of e)
1524
+ for (const s of r.columns)
1525
+ s?.field && n.set(s.field, r.id);
1526
+ const o = Array.from(i.querySelectorAll(".cell[data-field]"));
1527
+ o.forEach((r) => {
1528
+ const s = r.getAttribute("data-field") || "", l = n.get(s);
1529
+ l && (r.classList.add("grouped"), r.getAttribute("data-group") || r.setAttribute("data-group", l));
1523
1530
  });
1524
- for (const o of e) {
1525
- const s = o.columns[o.columns.length - 1], l = r.find((a) => a.getAttribute("data-field") === s.field);
1531
+ for (const r of e) {
1532
+ const s = r.columns[r.columns.length - 1], l = o.find((a) => a.getAttribute("data-field") === s.field);
1526
1533
  l && l.classList.add("group-end");
1527
1534
  }
1528
1535
  }
1529
- function Be(i, e) {
1536
+ function He(i, e) {
1530
1537
  if (i.length === 0) return null;
1531
1538
  const t = document.createElement("div");
1532
1539
  t.className = "header-group-row", t.setAttribute("role", "row");
1533
1540
  for (const n of i) {
1534
- const r = n.firstIndex != null ? n.firstIndex : e.findIndex((a) => n.columns.includes(a)), o = String(n.id).startsWith("__implicit__"), s = o ? "" : n.label || n.id, l = document.createElement("div");
1535
- l.className = "cell header-group-cell", o && l.classList.add("implicit-group"), l.setAttribute("data-group", String(n.id)), l.style.gridColumn = `${r + 1} / span ${n.columns.length}`, l.textContent = s, t.appendChild(l);
1541
+ const o = n.firstIndex != null ? n.firstIndex : e.findIndex((a) => n.columns.includes(a)), r = String(n.id).startsWith("__implicit__"), s = r ? "" : n.label || n.id, l = document.createElement("div");
1542
+ l.className = "cell header-group-cell", r && l.classList.add("implicit-group"), l.setAttribute("data-group", String(n.id)), l.style.gridColumn = `${o + 1} / span ${n.columns.length}`, l.textContent = s, t.appendChild(l);
1536
1543
  }
1537
1544
  return t;
1538
1545
  }
1539
- function He(i) {
1546
+ function Oe(i) {
1540
1547
  return i.some((e) => e.group != null);
1541
1548
  }
1542
- class Rt extends y {
1549
+ class kt extends y {
1543
1550
  name = "groupingColumns";
1544
1551
  version = "1.0.0";
1545
1552
  get defaultConfig() {
@@ -1561,7 +1568,7 @@ class Rt extends y {
1561
1568
  */
1562
1569
  static detect(e, t) {
1563
1570
  const n = t?.columns;
1564
- return Array.isArray(n) ? He(n) : !1;
1571
+ return Array.isArray(n) ? Oe(n) : !1;
1565
1572
  }
1566
1573
  // ===== Hooks =====
1567
1574
  processColumns(e) {
@@ -1580,13 +1587,13 @@ class Rt extends y {
1580
1587
  if (!e) return;
1581
1588
  const t = e.querySelector(".header-group-row");
1582
1589
  t && t.remove();
1583
- const n = Be(this.groups, this.columns);
1590
+ const n = He(this.groups, this.columns);
1584
1591
  if (n) {
1585
- const o = e.querySelector(".header-row");
1586
- o ? e.insertBefore(n, o) : e.appendChild(n);
1592
+ const r = e.querySelector(".header-row");
1593
+ r ? e.insertBefore(n, r) : e.appendChild(n);
1587
1594
  }
1588
- const r = e.querySelector(".header-row");
1589
- r && De(r, this.groups, this.columns);
1595
+ const o = e.querySelector(".header-row");
1596
+ o && Be(o, this.groups, this.columns);
1590
1597
  }
1591
1598
  // ===== Public API =====
1592
1599
  /**
@@ -1648,40 +1655,40 @@ class Rt extends y {
1648
1655
  }
1649
1656
  `;
1650
1657
  }
1651
- function Oe({ rows: i, config: e, expanded: t }) {
1658
+ function We({ rows: i, config: e, expanded: t }) {
1652
1659
  const n = e.groupOn;
1653
1660
  if (!e.enabled || typeof n != "function")
1654
1661
  return [];
1655
- const r = { key: "__root__", value: null, depth: -1, rows: [], children: /* @__PURE__ */ new Map() };
1662
+ const o = { key: "__root__", value: null, depth: -1, rows: [], children: /* @__PURE__ */ new Map() };
1656
1663
  if (i.forEach((l) => {
1657
1664
  let a = n(l);
1658
1665
  a == null || a === !1 ? a = ["__ungrouped__"] : Array.isArray(a) || (a = [a]);
1659
- let c = r;
1660
- a.forEach((d, u) => {
1661
- const h = d == null ? "∅" : String(d), f = c.key === "__root__" ? h : c.key + "||" + h;
1662
- let g = c.children.get(h);
1663
- g || (g = { key: f, value: d, depth: u, rows: [], children: /* @__PURE__ */ new Map(), parent: c }, c.children.set(h, g)), c = g;
1664
- }), c.rows.push(l);
1665
- }), r.children.size === 1 && r.children.has("__ungrouped__") && r.children.get("__ungrouped__").rows.length === i.length)
1666
+ let d = o;
1667
+ a.forEach((c, u) => {
1668
+ const h = c == null ? "∅" : String(c), f = d.key === "__root__" ? h : d.key + "||" + h;
1669
+ let g = d.children.get(h);
1670
+ g || (g = { key: f, value: c, depth: u, rows: [], children: /* @__PURE__ */ new Map(), parent: d }, d.children.set(h, g)), d = g;
1671
+ }), d.rows.push(l);
1672
+ }), o.children.size === 1 && o.children.has("__ungrouped__") && o.children.get("__ungrouped__").rows.length === i.length)
1666
1673
  return [];
1667
- const o = [], s = (l) => {
1668
- if (l === r) {
1669
- l.children.forEach((c) => s(c));
1674
+ const r = [], s = (l) => {
1675
+ if (l === o) {
1676
+ l.children.forEach((d) => s(d));
1670
1677
  return;
1671
1678
  }
1672
1679
  const a = t.has(l.key);
1673
- o.push({
1680
+ r.push({
1674
1681
  kind: "group",
1675
1682
  key: l.key,
1676
1683
  value: l.value,
1677
1684
  depth: l.depth,
1678
1685
  rows: l.rows,
1679
1686
  expanded: a
1680
- }), a && (l.children.size ? l.children.forEach((c) => s(c)) : l.rows.forEach((c) => o.push({ kind: "data", row: c, rowIndex: i.indexOf(c) })));
1687
+ }), a && (l.children.size ? l.children.forEach((d) => s(d)) : l.rows.forEach((d) => r.push({ kind: "data", row: d, rowIndex: i.indexOf(d) })));
1681
1688
  };
1682
- return s(r), o;
1689
+ return s(o), r;
1683
1690
  }
1684
- function We(i, e) {
1691
+ function Ve(i, e) {
1685
1692
  const t = new Set(i);
1686
1693
  return t.has(e) ? t.delete(e) : t.add(e), t;
1687
1694
  }
@@ -1691,13 +1698,13 @@ function Ke(i) {
1691
1698
  t.kind === "group" && e.add(t.key);
1692
1699
  return e;
1693
1700
  }
1694
- function Ve() {
1701
+ function Ge() {
1695
1702
  return /* @__PURE__ */ new Set();
1696
1703
  }
1697
- function Ge(i) {
1704
+ function ze(i) {
1698
1705
  return i.kind !== "group" ? 0 : i.rows.length;
1699
1706
  }
1700
- class kt extends y {
1707
+ class Et extends y {
1701
1708
  name = "groupingRows";
1702
1709
  version = "1.0.0";
1703
1710
  get defaultConfig() {
@@ -1729,20 +1736,20 @@ class kt extends y {
1729
1736
  const t = this.config;
1730
1737
  if (!t.enabled || typeof t.groupOn != "function")
1731
1738
  return this.isActive = !1, this.flattenedRows = [], [...e];
1732
- const n = Oe({
1739
+ const n = We({
1733
1740
  rows: e,
1734
1741
  config: t,
1735
1742
  expanded: this.expandedKeys
1736
1743
  });
1737
- return n.length === 0 ? (this.isActive = !1, this.flattenedRows = [], [...e]) : (this.isActive = !0, this.flattenedRows = n, n.map((r) => r.kind === "group" ? {
1744
+ return n.length === 0 ? (this.isActive = !1, this.flattenedRows = [], [...e]) : (this.isActive = !0, this.flattenedRows = n, n.map((o) => o.kind === "group" ? {
1738
1745
  __isGroupRow: !0,
1739
- __groupKey: r.key,
1740
- __groupValue: r.value,
1741
- __groupDepth: r.depth,
1742
- __groupRows: r.rows,
1743
- __groupExpanded: r.expanded,
1744
- __groupRowCount: Ge(r)
1745
- } : r.row));
1746
+ __groupKey: o.key,
1747
+ __groupValue: o.value,
1748
+ __groupDepth: o.depth,
1749
+ __groupRows: o.rows,
1750
+ __groupExpanded: o.expanded,
1751
+ __groupRowCount: ze(o)
1752
+ } : o.row));
1746
1753
  }
1747
1754
  onCellClick(e) {
1748
1755
  const t = e.row;
@@ -1755,11 +1762,11 @@ class kt extends y {
1755
1762
  renderRow(e, t, n) {
1756
1763
  if (!e?.__isGroupRow)
1757
1764
  return !1;
1758
- const r = this.config;
1759
- if (r.groupRowRenderer) {
1765
+ const o = this.config;
1766
+ if (o.groupRowRenderer) {
1760
1767
  const l = () => {
1761
1768
  this.toggle(e.__groupKey);
1762
- }, a = r.groupRowRenderer({
1769
+ }, a = o.groupRowRenderer({
1763
1770
  key: e.__groupKey,
1764
1771
  value: e.__groupValue,
1765
1772
  depth: e.__groupDepth,
@@ -1770,57 +1777,55 @@ class kt extends y {
1770
1777
  if (a)
1771
1778
  return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), typeof a == "string" ? t.innerHTML = a : (t.innerHTML = "", t.appendChild(a)), !0;
1772
1779
  }
1773
- const o = () => {
1780
+ const r = () => {
1774
1781
  this.toggle(e.__groupKey);
1775
1782
  };
1776
- return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), t.setAttribute("role", "row"), t.setAttribute("aria-expanded", String(e.__groupExpanded)), t.style.paddingLeft = `${(e.__groupDepth || 0) * (r.indentWidth ?? 20)}px`, t.innerHTML = "", r.fullWidth !== !1 ? this.renderFullWidthGroupRow(e, t, o) : this.renderPerColumnGroupRow(e, t, o), !0;
1783
+ return t.className = "group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), t.setAttribute("role", "row"), t.setAttribute("aria-expanded", String(e.__groupExpanded)), t.style.paddingLeft = `${(e.__groupDepth || 0) * (o.indentWidth ?? 20)}px`, t.innerHTML = "", o.fullWidth !== !1 ? this.renderFullWidthGroupRow(e, t, r) : this.renderPerColumnGroupRow(e, t, r), !0;
1777
1784
  }
1778
1785
  afterRender() {
1779
1786
  }
1780
1787
  // ===== Private Rendering Helpers =====
1781
1788
  renderFullWidthGroupRow(e, t, n) {
1782
- const r = this.config, o = document.createElement("div");
1783
- o.className = "cell group-full", o.style.gridColumn = "1 / -1", o.setAttribute("role", "gridcell");
1789
+ const o = this.config, r = document.createElement("div");
1790
+ r.className = "cell group-full", r.style.gridColumn = "1 / -1", r.setAttribute("role", "gridcell");
1784
1791
  const s = document.createElement("button");
1785
- s.type = "button", s.className = "group-toggle", s.setAttribute("aria-label", e.__groupExpanded ? "Collapse group" : "Expand group"), s.textContent = e.__groupExpanded ? "" : "", s.addEventListener("click", (c) => {
1786
- c.stopPropagation(), n();
1787
- }), o.appendChild(s);
1792
+ s.type = "button", s.className = "group-toggle", s.setAttribute("aria-label", e.__groupExpanded ? "Collapse group" : "Expand group"), this.setIcon(s, this.resolveIcon(e.__groupExpanded ? "collapse" : "expand")), s.addEventListener("click", (d) => {
1793
+ d.stopPropagation(), n();
1794
+ }), r.appendChild(s);
1788
1795
  const l = document.createElement("span");
1789
1796
  l.className = "group-label";
1790
- const a = r.formatLabel ? r.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
1791
- if (l.textContent = a, o.appendChild(l), r.showRowCount !== !1) {
1792
- const c = document.createElement("span");
1793
- c.className = "group-count", c.textContent = `(${e.__groupRowCount ?? e.__groupRows?.length ?? 0})`, o.appendChild(c);
1797
+ const a = o.formatLabel ? o.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
1798
+ if (l.textContent = a, r.appendChild(l), o.showRowCount !== !1) {
1799
+ const d = document.createElement("span");
1800
+ d.className = "group-count", d.textContent = `(${e.__groupRowCount ?? e.__groupRows?.length ?? 0})`, r.appendChild(d);
1794
1801
  }
1795
- t.appendChild(o);
1802
+ t.appendChild(r);
1796
1803
  }
1797
1804
  renderPerColumnGroupRow(e, t, n) {
1798
- const r = this.config, o = r.aggregators ?? {}, s = this.columns, l = e.__groupRows ?? [];
1799
- this.grid;
1800
- const c = this.shadowRoot?.querySelector(".body")?.style.gridTemplateColumns || "";
1801
- c && (t.style.display = "grid", t.style.gridTemplateColumns = c), s.forEach((d, u) => {
1805
+ const o = this.config, r = o.aggregators ?? {}, s = this.columns, l = e.__groupRows ?? [], d = this.shadowRoot?.querySelector(".body")?.style.gridTemplateColumns || "";
1806
+ d && (t.style.display = "grid", t.style.gridTemplateColumns = d), s.forEach((c, u) => {
1802
1807
  const h = document.createElement("div");
1803
1808
  if (h.className = "cell group-cell", h.setAttribute("data-col", String(u)), h.setAttribute("role", "gridcell"), u === 0) {
1804
1809
  const f = document.createElement("button");
1805
- f.type = "button", f.className = "group-toggle", f.textContent = e.__groupExpanded ? "" : "", f.addEventListener("click", (b) => {
1810
+ f.type = "button", f.className = "group-toggle", f.setAttribute("aria-label", e.__groupExpanded ? "Collapse group" : "Expand group"), this.setIcon(f, this.resolveIcon(e.__groupExpanded ? "collapse" : "expand")), f.addEventListener("click", (b) => {
1806
1811
  b.stopPropagation(), n();
1807
1812
  }), h.appendChild(f);
1808
- const g = document.createElement("span"), m = o[d.field];
1813
+ const g = document.createElement("span"), m = r[c.field];
1809
1814
  if (m) {
1810
- const b = X(m, l, d.field, d);
1815
+ const b = X(m, l, c.field, c);
1811
1816
  g.textContent = b != null ? String(b) : String(e.__groupValue);
1812
1817
  } else {
1813
- const b = r.formatLabel ? r.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
1818
+ const b = o.formatLabel ? o.formatLabel(e.__groupValue, e.__groupDepth || 0, e.__groupKey) : String(e.__groupValue);
1814
1819
  g.textContent = b;
1815
1820
  }
1816
- if (h.appendChild(g), r.showRowCount !== !1) {
1821
+ if (h.appendChild(g), o.showRowCount !== !1) {
1817
1822
  const b = document.createElement("span");
1818
1823
  b.className = "group-count", b.textContent = ` (${l.length})`, h.appendChild(b);
1819
1824
  }
1820
1825
  } else {
1821
- const f = o[d.field];
1826
+ const f = r[c.field];
1822
1827
  if (f) {
1823
- const g = X(f, l, d.field, d);
1828
+ const g = X(f, l, c.field, c);
1824
1829
  h.textContent = g != null ? String(g) : "";
1825
1830
  } else
1826
1831
  h.textContent = "";
@@ -1839,14 +1844,14 @@ class kt extends y {
1839
1844
  * Collapse all groups.
1840
1845
  */
1841
1846
  collapseAll() {
1842
- this.expandedKeys = Ve(), this.requestRender();
1847
+ this.expandedKeys = Ge(), this.requestRender();
1843
1848
  }
1844
1849
  /**
1845
1850
  * Toggle expansion of a specific group.
1846
1851
  * @param key - The group key to toggle
1847
1852
  */
1848
1853
  toggle(e) {
1849
- this.expandedKeys = We(this.expandedKeys, e);
1854
+ this.expandedKeys = Ve(this.expandedKeys, e);
1850
1855
  const t = this.flattenedRows.find((n) => n.kind === "group" && n.key === e);
1851
1856
  this.emit("group-toggle", {
1852
1857
  key: e,
@@ -1980,26 +1985,26 @@ function H(i, e) {
1980
1985
  const t = new Set(i);
1981
1986
  return t.has(e) ? t.delete(e) : t.add(e), t;
1982
1987
  }
1983
- function ze(i, e) {
1988
+ function $e(i, e) {
1984
1989
  const t = new Set(i);
1985
1990
  return t.add(e), t;
1986
1991
  }
1987
- function $e(i, e) {
1992
+ function je(i, e) {
1988
1993
  const t = new Set(i);
1989
1994
  return t.delete(e), t;
1990
1995
  }
1991
- function je(i, e) {
1996
+ function Ue(i, e) {
1992
1997
  return i.has(e);
1993
1998
  }
1994
- function Ue(i, e, t, n) {
1995
- const r = document.createElement("div");
1996
- r.className = "master-detail-row", r.setAttribute("data-detail-for", String(e)), r.setAttribute("role", "row");
1999
+ function Ye(i, e, t, n) {
1997
2000
  const o = document.createElement("div");
1998
- o.className = "master-detail-cell", o.setAttribute("role", "cell"), o.style.gridColumn = `1 / ${n + 1}`;
2001
+ o.className = "master-detail-row", o.setAttribute("data-detail-for", String(e)), o.setAttribute("role", "row");
2002
+ const r = document.createElement("div");
2003
+ r.className = "master-detail-cell", r.setAttribute("role", "cell"), r.style.gridColumn = `1 / ${n + 1}`;
1999
2004
  const s = t(i, e);
2000
- return typeof s == "string" ? o.innerHTML = s : s instanceof HTMLElement && o.appendChild(s), r.appendChild(o), r;
2005
+ return typeof s == "string" ? r.innerHTML = s : s instanceof HTMLElement && r.appendChild(s), o.appendChild(r), o;
2001
2006
  }
2002
- class Et extends y {
2007
+ class At extends y {
2003
2008
  name = "masterDetail";
2004
2009
  version = "1.0.0";
2005
2010
  get defaultConfig() {
@@ -2024,28 +2029,31 @@ class Et extends y {
2024
2029
  return [...e];
2025
2030
  const t = [...e];
2026
2031
  if (t.length > 0) {
2027
- const n = { ...t[0] }, r = n.viewRenderer;
2028
- n.viewRenderer = (o) => {
2029
- const { value: s, row: l } = o, a = this.expandedRows.has(l), c = document.createElement("span");
2032
+ const n = { ...t[0] }, o = n.viewRenderer;
2033
+ if (o?.__masterDetailWrapped)
2034
+ return t;
2035
+ const r = (s) => {
2036
+ const { value: l, row: a } = s, d = this.expandedRows.has(a), c = document.createElement("span");
2030
2037
  c.className = "master-detail-cell-wrapper";
2031
- const d = document.createElement("span");
2032
- d.className = "master-detail-toggle", d.textContent = a ? "▼" : "▶", d.setAttribute("aria-expanded", String(a)), d.setAttribute("aria-label", a ? "Collapse details" : "Expand details"), d.addEventListener("click", (h) => {
2033
- h.stopPropagation();
2034
- const f = this.rows.indexOf(l);
2035
- this.expandedRows = H(this.expandedRows, l), this.emit("detail-expand", {
2036
- rowIndex: f,
2037
- row: l,
2038
- expanded: this.expandedRows.has(l)
2039
- }), this.requestRender();
2040
- }), c.appendChild(d);
2041
2038
  const u = document.createElement("span");
2042
- if (r) {
2043
- const h = r(o);
2044
- h instanceof Node ? u.appendChild(h) : u.textContent = String(h ?? s ?? "");
2039
+ u.className = "master-detail-toggle", this.setIcon(u, this.resolveIcon(d ? "collapse" : "expand")), u.setAttribute("aria-expanded", String(d)), u.setAttribute("aria-label", d ? "Collapse details" : "Expand details"), u.addEventListener("click", (f) => {
2040
+ f.stopPropagation();
2041
+ const g = this.rows.indexOf(a);
2042
+ this.expandedRows = H(this.expandedRows, a), this.emit("detail-expand", {
2043
+ rowIndex: g,
2044
+ row: a,
2045
+ expanded: this.expandedRows.has(a)
2046
+ }), this.requestRender();
2047
+ }), c.appendChild(u);
2048
+ const h = document.createElement("span");
2049
+ if (o) {
2050
+ const f = o(s);
2051
+ f instanceof Node ? h.appendChild(f) : h.textContent = String(f ?? l ?? "");
2045
2052
  } else
2046
- u.textContent = String(s ?? "");
2047
- return c.appendChild(u), c;
2048
- }, t[0] = n;
2053
+ h.textContent = String(l ?? "");
2054
+ return c.appendChild(h), c;
2055
+ };
2056
+ r.__masterDetailWrapped = !0, n.viewRenderer = r, t[0] = n;
2049
2057
  }
2050
2058
  return t;
2051
2059
  }
@@ -2057,20 +2065,104 @@ class Et extends y {
2057
2065
  expanded: this.expandedRows.has(e.row)
2058
2066
  }), this.requestRender(), !1;
2059
2067
  }
2068
+ onCellClick() {
2069
+ this.expandedRows.size > 0 && queueMicrotask(() => this.#e());
2070
+ }
2060
2071
  afterRender() {
2072
+ this.#e();
2073
+ }
2074
+ /**
2075
+ * Called on scroll to sync detail elements with visible rows.
2076
+ * Removes details for rows that scrolled out of view and reattaches for visible rows.
2077
+ */
2078
+ onScrollRender() {
2079
+ !this.config.detailRenderer || this.expandedRows.size === 0 || this.#e();
2080
+ }
2081
+ /**
2082
+ * Full sync of detail rows - cleans up stale elements and creates new ones.
2083
+ * Detail rows are inserted as siblings AFTER their master row to survive row rebuilds.
2084
+ */
2085
+ #e() {
2061
2086
  if (!this.config.detailRenderer) return;
2062
2087
  const e = this.shadowRoot?.querySelector(".rows");
2063
2088
  if (!e) return;
2064
- e.querySelectorAll(".master-detail-row").forEach((r) => r.remove()), this.detailElements.clear();
2065
- const t = e.querySelectorAll(".data-grid-row"), n = this.columns.length;
2066
- for (const r of t) {
2067
- const o = r.querySelector(".cell[data-row]"), s = o ? parseInt(o.getAttribute("data-row") ?? "-1", 10) : -1;
2068
- if (s < 0) continue;
2069
- const l = this.rows[s];
2070
- if (!l || !this.expandedRows.has(l)) continue;
2071
- const a = Ue(l, s, this.config.detailRenderer, n);
2072
- typeof this.config.detailHeight == "number" && (a.style.height = `${this.config.detailHeight}px`), r.appendChild(a), this.detailElements.set(l, a);
2089
+ const t = /* @__PURE__ */ new Map(), n = e.querySelectorAll(".data-grid-row"), o = this.columns.length;
2090
+ for (const s of n) {
2091
+ const l = s.querySelector(".cell[data-row]"), a = l ? parseInt(l.getAttribute("data-row") ?? "-1", 10) : -1;
2092
+ a >= 0 && t.set(a, s);
2093
+ }
2094
+ const r = e.querySelectorAll(".master-detail-row");
2095
+ for (const s of r) {
2096
+ const l = parseInt(s.getAttribute("data-detail-for") ?? "-1", 10), a = l >= 0 ? this.rows[l] : void 0, d = a && this.expandedRows.has(a), c = t.has(l);
2097
+ (!d || !c) && (s.remove(), a && this.detailElements.delete(a));
2098
+ }
2099
+ for (const [s, l] of t) {
2100
+ const a = this.rows[s];
2101
+ if (!a || !this.expandedRows.has(a)) continue;
2102
+ const d = this.detailElements.get(a);
2103
+ if (d) {
2104
+ d.previousElementSibling !== l && l.after(d);
2105
+ continue;
2106
+ }
2107
+ const c = Ye(a, s, this.config.detailRenderer, o);
2108
+ typeof this.config.detailHeight == "number" && (c.style.height = `${this.config.detailHeight}px`), l.after(c), this.detailElements.set(a, c);
2109
+ }
2110
+ }
2111
+ /**
2112
+ * Return total extra height from all expanded detail rows.
2113
+ * Used by grid virtualization to adjust scrollbar height.
2114
+ */
2115
+ getExtraHeight() {
2116
+ let e = 0;
2117
+ for (const t of this.expandedRows) {
2118
+ const n = this.detailElements.get(t);
2119
+ if (n)
2120
+ e += n.offsetHeight;
2121
+ else {
2122
+ const o = this.config?.detailHeight;
2123
+ e += typeof o == "number" ? o : 150;
2124
+ }
2125
+ }
2126
+ return e;
2127
+ }
2128
+ /**
2129
+ * Return extra height that appears before a given row index.
2130
+ * This is the sum of heights of all expanded details whose parent row is before the given index.
2131
+ */
2132
+ getExtraHeightBefore(e) {
2133
+ let t = 0;
2134
+ for (const n of this.expandedRows) {
2135
+ const o = this.rows.indexOf(n);
2136
+ if (o >= 0 && o < e) {
2137
+ const r = this.detailElements.get(n);
2138
+ if (r)
2139
+ t += r.offsetHeight;
2140
+ else {
2141
+ const s = this.config?.detailHeight;
2142
+ t += typeof s == "number" ? s : 150;
2143
+ }
2144
+ }
2073
2145
  }
2146
+ return t;
2147
+ }
2148
+ /**
2149
+ * Adjust the virtualization start index to keep expanded row visible while its detail is visible.
2150
+ * This ensures the detail scrolls smoothly out of view instead of disappearing abruptly.
2151
+ */
2152
+ adjustVirtualStart(e, t, n) {
2153
+ if (this.expandedRows.size === 0) return e;
2154
+ const o = [];
2155
+ for (const l of this.expandedRows) {
2156
+ const a = this.rows.indexOf(l);
2157
+ a >= 0 && o.push({ index: a, row: l });
2158
+ }
2159
+ o.sort((l, a) => l.index - a.index);
2160
+ let r = e, s = 0;
2161
+ for (const { index: l, row: a } of o) {
2162
+ const d = l * n + s, u = this.detailElements.get(a)?.offsetHeight ?? (typeof this.config?.detailHeight == "number" ? this.config.detailHeight : 150), h = d + n + u;
2163
+ s += u, !(l >= e) && h > t && l < r && (r = l);
2164
+ }
2165
+ return r;
2074
2166
  }
2075
2167
  // ===== Public API =====
2076
2168
  /**
@@ -2079,7 +2171,7 @@ class Et extends y {
2079
2171
  */
2080
2172
  expand(e) {
2081
2173
  const t = this.rows[e];
2082
- t && (this.expandedRows = ze(this.expandedRows, t), this.requestRender());
2174
+ t && (this.expandedRows = $e(this.expandedRows, t), this.requestRender());
2083
2175
  }
2084
2176
  /**
2085
2177
  * Collapse the detail row at the given index.
@@ -2087,7 +2179,7 @@ class Et extends y {
2087
2179
  */
2088
2180
  collapse(e) {
2089
2181
  const t = this.rows[e];
2090
- t && (this.expandedRows = $e(this.expandedRows, t), this.requestRender());
2182
+ t && (this.expandedRows = je(this.expandedRows, t), this.requestRender());
2091
2183
  }
2092
2184
  /**
2093
2185
  * Toggle the detail row at the given index.
@@ -2104,7 +2196,7 @@ class Et extends y {
2104
2196
  */
2105
2197
  isExpanded(e) {
2106
2198
  const t = this.rows[e];
2107
- return t ? je(this.expandedRows, t) : !1;
2199
+ return t ? Ue(this.expandedRows, t) : !1;
2108
2200
  }
2109
2201
  /**
2110
2202
  * Expand all detail rows.
@@ -2169,22 +2261,22 @@ class Et extends y {
2169
2261
  }
2170
2262
  `;
2171
2263
  }
2172
- function Ye(i, e, t) {
2173
- return e.length ? [...i].sort((n, r) => {
2174
- for (const o of e) {
2175
- const l = t.find((u) => u.field === o.field)?.sortComparator ?? Xe, a = n[o.field], c = r[o.field], d = l(a, c, n, r);
2176
- if (d !== 0)
2177
- return o.direction === "asc" ? d : -d;
2264
+ function Xe(i, e, t) {
2265
+ return e.length ? [...i].sort((n, o) => {
2266
+ for (const r of e) {
2267
+ const l = t.find((u) => u.field === r.field)?.sortComparator ?? Je, a = n[r.field], d = o[r.field], c = l(a, d, n, o);
2268
+ if (c !== 0)
2269
+ return r.direction === "asc" ? c : -c;
2178
2270
  }
2179
2271
  return 0;
2180
2272
  }) : [...i];
2181
2273
  }
2182
- function Xe(i, e) {
2274
+ function Je(i, e) {
2183
2275
  return i == null && e == null ? 0 : i == null ? 1 : e == null ? -1 : typeof i == "number" && typeof e == "number" ? i - e : i instanceof Date && e instanceof Date ? i.getTime() - e.getTime() : typeof i == "boolean" && typeof e == "boolean" ? i === e ? 0 : i ? -1 : 1 : String(i).localeCompare(String(e));
2184
2276
  }
2185
- function Je(i, e, t, n) {
2186
- const r = i.find((o) => o.field === e);
2187
- return t ? r ? r.direction === "asc" ? i.map((o) => o.field === e ? { ...o, direction: "desc" } : o) : i.filter((o) => o.field !== e) : i.length < n ? [...i, { field: e, direction: "asc" }] : i : r?.direction === "asc" ? [{ field: e, direction: "desc" }] : r?.direction === "desc" ? [] : [{ field: e, direction: "asc" }];
2277
+ function Qe(i, e, t, n) {
2278
+ const o = i.find((r) => r.field === e);
2279
+ return t ? o ? o.direction === "asc" ? i.map((r) => r.field === e ? { ...r, direction: "desc" } : r) : i.filter((r) => r.field !== e) : i.length < n ? [...i, { field: e, direction: "asc" }] : i : o?.direction === "asc" ? [{ field: e, direction: "desc" }] : o?.direction === "desc" ? [] : [{ field: e, direction: "asc" }];
2188
2280
  }
2189
2281
  function le(i, e) {
2190
2282
  const t = i.findIndex((n) => n.field === e);
@@ -2193,7 +2285,7 @@ function le(i, e) {
2193
2285
  function ae(i, e) {
2194
2286
  return i.find((t) => t.field === e)?.direction;
2195
2287
  }
2196
- class At extends y {
2288
+ class It extends y {
2197
2289
  name = "multiSort";
2198
2290
  version = "1.0.0";
2199
2291
  get defaultConfig() {
@@ -2211,30 +2303,30 @@ class At extends y {
2211
2303
  }
2212
2304
  // ===== Hooks =====
2213
2305
  processRows(e) {
2214
- return this.sortModel.length === 0 ? [...e] : Ye([...e], this.sortModel, [...this.columns]);
2306
+ return this.sortModel.length === 0 ? [...e] : Xe([...e], this.sortModel, [...this.columns]);
2215
2307
  }
2216
2308
  onHeaderClick(e) {
2217
- if (!this.columns.find((o) => o.field === e.field)?.sortable) return !1;
2218
- const n = e.originalEvent.shiftKey, r = this.config.maxSortColumns ?? 3;
2219
- return this.sortModel = Je(this.sortModel, e.field, n, r), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2309
+ if (!this.columns.find((r) => r.field === e.field)?.sortable) return !1;
2310
+ const n = e.originalEvent.shiftKey, o = this.config.maxSortColumns ?? 3;
2311
+ return this.sortModel = Qe(this.sortModel, e.field, n, o), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
2220
2312
  }
2221
2313
  afterRender() {
2222
2314
  const e = this.shadowRoot;
2223
2315
  if (!e) return;
2224
2316
  const t = this.config.showSortIndex !== !1;
2225
- e.querySelectorAll(".header-row .cell[data-field]").forEach((r) => {
2226
- const o = r.getAttribute("data-field");
2227
- if (!o) return;
2228
- const s = le(this.sortModel, o), l = ae(this.sortModel, o);
2229
- if (r.querySelector(".sort-index")?.remove(), l) {
2230
- r.querySelector('[part~="sort-indicator"], .sort-indicator')?.remove(), r.setAttribute("data-sort", l);
2231
- const d = document.createElement("span");
2232
- if (d.className = "sort-indicator", d.style.marginLeft = "4px", d.style.opacity = "0.8", d.textContent = l === "asc" ? "" : "", r.appendChild(d), t && this.sortModel.length > 1 && s !== void 0) {
2317
+ e.querySelectorAll(".header-row .cell[data-field]").forEach((o) => {
2318
+ const r = o.getAttribute("data-field");
2319
+ if (!r) return;
2320
+ const s = le(this.sortModel, r), l = ae(this.sortModel, r);
2321
+ if (o.querySelector(".sort-index")?.remove(), l) {
2322
+ o.querySelector('[part~="sort-indicator"], .sort-indicator')?.remove(), o.setAttribute("data-sort", l);
2323
+ const c = document.createElement("span");
2324
+ if (c.className = "sort-indicator", c.style.marginLeft = "4px", c.style.opacity = "0.8", this.setIcon(c, this.resolveIcon(l === "asc" ? "sortAsc" : "sortDesc")), o.appendChild(c), t && this.sortModel.length > 1 && s !== void 0) {
2233
2325
  const u = document.createElement("span");
2234
- u.className = "sort-index", u.textContent = String(s), r.appendChild(u);
2326
+ u.className = "sort-index", u.textContent = String(s), o.appendChild(u);
2235
2327
  }
2236
2328
  } else
2237
- r.removeAttribute("data-sort");
2329
+ o.removeAttribute("data-sort");
2238
2330
  });
2239
2331
  }
2240
2332
  // ===== Public API =====
@@ -2279,7 +2371,7 @@ class At extends y {
2279
2371
  * Return sort state for a column if it's in the sort model.
2280
2372
  */
2281
2373
  getColumnState(e) {
2282
- const t = this.sortModel.findIndex((r) => r.field === e);
2374
+ const t = this.sortModel.findIndex((o) => o.field === e);
2283
2375
  return t === -1 ? void 0 : {
2284
2376
  sort: {
2285
2377
  direction: this.sortModel[t].direction,
@@ -2293,14 +2385,14 @@ class At extends y {
2293
2385
  */
2294
2386
  applyColumnState(e, t) {
2295
2387
  if (!t.sort) {
2296
- this.sortModel = this.sortModel.filter((o) => o.field !== e);
2388
+ this.sortModel = this.sortModel.filter((r) => r.field !== e);
2297
2389
  return;
2298
2390
  }
2299
- const n = this.sortModel.findIndex((o) => o.field === e), r = {
2391
+ const n = this.sortModel.findIndex((r) => r.field === e), o = {
2300
2392
  field: e,
2301
2393
  direction: t.sort.direction
2302
2394
  };
2303
- n !== -1 ? this.sortModel[n] = r : this.sortModel.splice(t.sort.priority, 0, r);
2395
+ n !== -1 ? this.sortModel[n] = o : this.sortModel.splice(t.sort.priority, 0, o);
2304
2396
  }
2305
2397
  // ===== Styles =====
2306
2398
  styles = `
@@ -2329,10 +2421,10 @@ class At extends y {
2329
2421
  }
2330
2422
  `;
2331
2423
  }
2332
- function Qe(i) {
2424
+ function Ze(i) {
2333
2425
  return i.filter((e) => e.sticky === "left");
2334
2426
  }
2335
- function Ze(i) {
2427
+ function et(i) {
2336
2428
  return i.filter((e) => e.sticky === "right");
2337
2429
  }
2338
2430
  function O(i) {
@@ -2343,25 +2435,25 @@ function de(i, e) {
2343
2435
  if (!t) return;
2344
2436
  const n = Array.from(t.querySelectorAll(".header-row .cell"));
2345
2437
  if (!n.length) return;
2346
- const r = /* @__PURE__ */ new Map();
2438
+ const o = /* @__PURE__ */ new Map();
2347
2439
  e.forEach((l, a) => {
2348
- l.field && r.set(l.field, a);
2440
+ l.field && o.set(l.field, a);
2349
2441
  });
2350
- let o = 0;
2442
+ let r = 0;
2351
2443
  for (const l of e)
2352
2444
  if (l.sticky === "left") {
2353
- const a = r.get(l.field), c = n.find((d) => d.getAttribute("data-field") === l.field);
2354
- c && (c.classList.add("sticky-left"), c.style.left = o + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((d) => {
2355
- d.classList.add("sticky-left"), d.style.left = o + "px";
2356
- }), o += c.offsetWidth);
2445
+ const a = o.get(l.field), d = n.find((c) => c.getAttribute("data-field") === l.field);
2446
+ d && (d.classList.add("sticky-left"), d.style.left = r + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((c) => {
2447
+ c.classList.add("sticky-left"), c.style.left = r + "px";
2448
+ }), r += d.offsetWidth);
2357
2449
  }
2358
2450
  let s = 0;
2359
2451
  for (const l of [...e].reverse())
2360
2452
  if (l.sticky === "right") {
2361
- const a = r.get(l.field), c = n.find((d) => d.getAttribute("data-field") === l.field);
2362
- c && (c.classList.add("sticky-right"), c.style.right = s + "px", a !== void 0 && t.querySelectorAll(`.data-grid-row .cell[data-col="${a}"]`).forEach((d) => {
2363
- d.classList.add("sticky-right"), d.style.right = s + "px";
2364
- }), s += c.offsetWidth);
2453
+ const a = o.get(l.field), d = n.find((c) => c.getAttribute("data-field") === l.field);
2454
+ 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) => {
2455
+ c.classList.add("sticky-right"), c.style.right = s + "px";
2456
+ }), s += d.offsetWidth);
2365
2457
  }
2366
2458
  }
2367
2459
  function ce(i) {
@@ -2424,14 +2516,14 @@ class _t extends y {
2424
2516
  */
2425
2517
  getLeftPinnedColumns() {
2426
2518
  const e = [...this.columns];
2427
- return Qe(e);
2519
+ return Ze(e);
2428
2520
  }
2429
2521
  /**
2430
2522
  * Get columns pinned to the right.
2431
2523
  */
2432
2524
  getRightPinnedColumns() {
2433
2525
  const e = [...this.columns];
2434
- return Ze(e);
2526
+ return et(e);
2435
2527
  }
2436
2528
  /**
2437
2529
  * Clear all sticky positioning.
@@ -2445,10 +2537,10 @@ function W(i, e) {
2445
2537
  t.className = "tbw-pinned-rows", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite");
2446
2538
  const n = document.createElement("div");
2447
2539
  n.className = "tbw-pinned-rows-left";
2448
- const r = document.createElement("div");
2449
- r.className = "tbw-pinned-rows-center";
2450
2540
  const o = document.createElement("div");
2451
- if (o.className = "tbw-pinned-rows-right", i.showRowCount !== !1) {
2541
+ o.className = "tbw-pinned-rows-center";
2542
+ const r = document.createElement("div");
2543
+ if (r.className = "tbw-pinned-rows-right", i.showRowCount !== !1) {
2452
2544
  const s = document.createElement("span");
2453
2545
  s.className = "tbw-status-panel tbw-status-panel-row-count", s.textContent = `Total: ${e.totalRows} rows`, n.appendChild(s);
2454
2546
  }
@@ -2458,24 +2550,24 @@ function W(i, e) {
2458
2550
  }
2459
2551
  if (i.showSelectedCount && e.selectedRows > 0) {
2460
2552
  const s = document.createElement("span");
2461
- s.className = "tbw-status-panel tbw-status-panel-selected-count", s.textContent = `Selected: ${e.selectedRows}`, o.appendChild(s);
2553
+ s.className = "tbw-status-panel tbw-status-panel-selected-count", s.textContent = `Selected: ${e.selectedRows}`, r.appendChild(s);
2462
2554
  }
2463
2555
  if (i.customPanels)
2464
2556
  for (const s of i.customPanels) {
2465
- const l = et(s, e);
2557
+ const l = tt(s, e);
2466
2558
  switch (s.position) {
2467
2559
  case "left":
2468
2560
  n.appendChild(l);
2469
2561
  break;
2470
2562
  case "center":
2471
- r.appendChild(l);
2563
+ o.appendChild(l);
2472
2564
  break;
2473
2565
  case "right":
2474
- o.appendChild(l);
2566
+ r.appendChild(l);
2475
2567
  break;
2476
2568
  }
2477
2569
  }
2478
- return t.appendChild(n), t.appendChild(r), t.appendChild(o), t;
2570
+ return t.appendChild(n), t.appendChild(o), t.appendChild(r), t;
2479
2571
  }
2480
2572
  function ue(i) {
2481
2573
  const e = document.createElement("div");
@@ -2483,46 +2575,46 @@ function ue(i) {
2483
2575
  }
2484
2576
  function he(i, e, t, n) {
2485
2577
  i.innerHTML = "";
2486
- for (const r of e) {
2487
- const o = document.createElement("div");
2488
- if (o.className = "tbw-aggregation-row", o.setAttribute("role", "row"), r.id && o.setAttribute("data-aggregation-id", r.id), r.fullWidth) {
2578
+ for (const o of e) {
2579
+ const r = document.createElement("div");
2580
+ if (r.className = "tbw-aggregation-row", r.setAttribute("role", "row"), o.id && r.setAttribute("data-aggregation-id", o.id), o.fullWidth) {
2489
2581
  const s = document.createElement("div");
2490
- s.className = "tbw-aggregation-cell tbw-aggregation-cell-full", s.style.gridColumn = "1 / -1", s.textContent = r.label || "", o.appendChild(s);
2582
+ s.className = "tbw-aggregation-cell tbw-aggregation-cell-full", s.style.gridColumn = "1 / -1", s.textContent = o.label || "", r.appendChild(s);
2491
2583
  } else
2492
2584
  for (const s of t) {
2493
2585
  const l = document.createElement("div");
2494
2586
  l.className = "tbw-aggregation-cell", l.setAttribute("data-field", s.field);
2495
2587
  let a;
2496
- const c = r.aggregators?.[s.field];
2497
- if (c) {
2498
- const d = xe(c);
2499
- d && (a = d(n, s.field, s));
2500
- } else if (r.cells && Object.prototype.hasOwnProperty.call(r.cells, s.field)) {
2501
- const d = r.cells[s.field];
2502
- typeof d == "function" ? a = d(n, s.field, s) : a = d;
2588
+ const d = o.aggregators?.[s.field];
2589
+ if (d) {
2590
+ const c = ve(d);
2591
+ c && (a = c(n, s.field, s));
2592
+ } else if (o.cells && Object.prototype.hasOwnProperty.call(o.cells, s.field)) {
2593
+ const c = o.cells[s.field];
2594
+ typeof c == "function" ? a = c(n, s.field, s) : a = c;
2503
2595
  }
2504
- l.textContent = a != null ? String(a) : "", o.appendChild(l);
2596
+ l.textContent = a != null ? String(a) : "", r.appendChild(l);
2505
2597
  }
2506
- i.appendChild(o);
2598
+ i.appendChild(r);
2507
2599
  }
2508
2600
  }
2509
- function et(i, e) {
2601
+ function tt(i, e) {
2510
2602
  const t = document.createElement("div");
2511
2603
  t.className = "tbw-status-panel tbw-status-panel-custom", t.id = `status-panel-${i.id}`;
2512
2604
  const n = i.render(e);
2513
2605
  return typeof n == "string" ? t.innerHTML = n : t.appendChild(n), t;
2514
2606
  }
2515
- function fe(i, e, t, n, r) {
2607
+ function fe(i, e, t, n, o) {
2516
2608
  return {
2517
2609
  totalRows: i.length,
2518
- filteredRows: r?.cachedResult?.length ?? i.length,
2610
+ filteredRows: o?.cachedResult?.length ?? i.length,
2519
2611
  selectedRows: n?.selected?.size ?? 0,
2520
2612
  columns: e,
2521
2613
  rows: i,
2522
2614
  grid: t
2523
2615
  };
2524
2616
  }
2525
- class It extends y {
2617
+ class Tt extends y {
2526
2618
  name = "pinnedRows";
2527
2619
  version = "1.0.0";
2528
2620
  get defaultConfig() {
@@ -2553,12 +2645,12 @@ class It extends y {
2553
2645
  if (!e) return;
2554
2646
  const t = e.querySelector(".tbw-scroll-area") ?? e.querySelector(".tbw-grid-content") ?? e.children[0];
2555
2647
  if (!t) return;
2556
- const n = this.getSelectionState(), r = this.getFilterState(), o = fe(
2648
+ const n = this.getSelectionState(), o = this.getFilterState(), r = fe(
2557
2649
  this.rows,
2558
2650
  this.columns,
2559
2651
  this.grid,
2560
2652
  n,
2561
- r
2653
+ o
2562
2654
  ), s = this.config.aggregationRows || [], l = s.filter((h) => h.position === "top"), a = s.filter((h) => h.position !== "top");
2563
2655
  if (l.length > 0) {
2564
2656
  if (!this.topAggregationContainer) {
@@ -2573,12 +2665,12 @@ class It extends y {
2573
2665
  this.rows
2574
2666
  );
2575
2667
  } else this.topAggregationContainer && (this.topAggregationContainer.remove(), this.topAggregationContainer = null);
2576
- const c = this.config.showRowCount !== !1 || this.config.showSelectedCount && o.selectedRows > 0 || this.config.showFilteredCount && o.filteredRows !== o.totalRows || this.config.customPanels && this.config.customPanels.length > 0, d = c && this.config.position !== "top", u = a.length > 0 || d;
2577
- if (c && this.config.position === "top")
2668
+ const d = this.config.showRowCount !== !1 || this.config.showSelectedCount && r.selectedRows > 0 || this.config.showFilteredCount && r.filteredRows !== r.totalRows || this.config.customPanels && this.config.customPanels.length > 0, c = d && this.config.position !== "top", u = a.length > 0 || c;
2669
+ if (d && this.config.position === "top")
2578
2670
  if (!this.infoBarElement)
2579
- this.infoBarElement = W(this.config, o), t.insertBefore(this.infoBarElement, t.firstChild);
2671
+ this.infoBarElement = W(this.config, r), t.insertBefore(this.infoBarElement, t.firstChild);
2580
2672
  else {
2581
- const h = W(this.config, o);
2673
+ const h = W(this.config, r);
2582
2674
  this.infoBarElement.replaceWith(h), this.infoBarElement = h;
2583
2675
  }
2584
2676
  else this.config.position === "top" && this.infoBarElement && (this.infoBarElement.remove(), this.infoBarElement = null);
@@ -2587,7 +2679,7 @@ class It extends y {
2587
2679
  a,
2588
2680
  this.visibleColumns,
2589
2681
  this.rows
2590
- )), d && (this.infoBarElement = W(this.config, o), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
2682
+ )), c && (this.infoBarElement = W(this.config, r), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
2591
2683
  }
2592
2684
  // ===== Private Methods =====
2593
2685
  cleanup() {
@@ -2733,11 +2825,11 @@ class It extends y {
2733
2825
  }
2734
2826
  `;
2735
2827
  }
2736
- function tt(i) {
2828
+ function nt(i) {
2737
2829
  const e = [];
2738
2830
  return !i.rowGroupFields?.length && !i.columnGroupFields?.length && e.push("At least one row or column group field is required"), i.valueFields?.length || e.push("At least one value field is required"), e;
2739
2831
  }
2740
- function nt(i) {
2832
+ function ot(i) {
2741
2833
  switch (i) {
2742
2834
  case "sum":
2743
2835
  return (e) => e.reduce((t, n) => t + n, 0);
@@ -2761,75 +2853,75 @@ function $(i, e) {
2761
2853
  return [...i, e].join("|");
2762
2854
  }
2763
2855
  function rt(i, e) {
2764
- const t = e.rowGroupFields ?? [], n = e.columnGroupFields ?? [], r = e.valueFields ?? [], o = ot(i, n), s = it(i, t), l = st(s, n, o, r, 0), a = lt(l, o, r), c = Object.values(a).reduce((d, u) => d + u, 0);
2856
+ const t = e.rowGroupFields ?? [], n = e.columnGroupFields ?? [], o = e.valueFields ?? [], r = it(i, n), s = st(i, t), l = lt(s, n, r, o, 0), a = at(l, r, o), d = Object.values(a).reduce((c, u) => c + u, 0);
2765
2857
  return {
2766
2858
  rows: l,
2767
- columnKeys: o,
2859
+ columnKeys: r,
2768
2860
  totals: a,
2769
- grandTotal: c
2861
+ grandTotal: d
2770
2862
  };
2771
2863
  }
2772
- function ot(i, e) {
2864
+ function it(i, e) {
2773
2865
  if (e.length === 0) return ["value"];
2774
2866
  const t = /* @__PURE__ */ new Set();
2775
2867
  for (const n of i) {
2776
- const r = e.map((o) => String(n[o] ?? "")).join("|");
2777
- t.add(r);
2868
+ const o = e.map((r) => String(n[r] ?? "")).join("|");
2869
+ t.add(o);
2778
2870
  }
2779
2871
  return [...t].sort();
2780
2872
  }
2781
- function it(i, e) {
2873
+ function st(i, e) {
2782
2874
  const t = /* @__PURE__ */ new Map();
2783
2875
  for (const n of i) {
2784
- const r = e.map((s) => String(n[s] ?? "")).join("|");
2785
- t.has(r) || t.set(r, []);
2786
- const o = t.get(r);
2787
- o && o.push(n);
2876
+ const o = e.map((s) => String(n[s] ?? "")).join("|");
2877
+ t.has(o) || t.set(o, []);
2878
+ const r = t.get(o);
2879
+ r && r.push(n);
2788
2880
  }
2789
2881
  return t;
2790
2882
  }
2791
- function st(i, e, t, n, r) {
2792
- const o = [];
2883
+ function lt(i, e, t, n, o) {
2884
+ const r = [];
2793
2885
  for (const [s, l] of i) {
2794
2886
  const a = {};
2795
- let c = 0;
2796
- for (const d of t)
2887
+ let d = 0;
2888
+ for (const c of t)
2797
2889
  for (const u of n) {
2798
- const f = (e.length > 0 ? l.filter((S) => e.map((R) => String(S[R] ?? "")).join("|") === d) : l).map((S) => Number(S[u.field]) || 0), g = nt(u.aggFunc), m = f.length > 0 ? g(f) : null, b = $([d], u.field);
2799
- a[b] = m, m !== null && (c += m);
2890
+ const f = (e.length > 0 ? l.filter((S) => e.map((R) => String(S[R] ?? "")).join("|") === c) : l).map((S) => Number(S[u.field]) || 0), g = ot(u.aggFunc), m = f.length > 0 ? g(f) : null, b = $([c], u.field);
2891
+ a[b] = m, m !== null && (d += m);
2800
2892
  }
2801
- o.push({
2893
+ r.push({
2802
2894
  rowKey: s,
2803
2895
  rowLabel: s || "(blank)",
2804
- depth: r,
2896
+ depth: o,
2805
2897
  values: a,
2806
- total: c,
2898
+ total: d,
2807
2899
  isGroup: !1
2808
2900
  });
2809
2901
  }
2810
- return o;
2902
+ return r;
2811
2903
  }
2812
- function lt(i, e, t) {
2904
+ function at(i, e, t) {
2813
2905
  const n = {};
2814
- for (const r of e)
2815
- for (const o of t) {
2816
- const s = $([r], o.field);
2906
+ for (const o of e)
2907
+ for (const r of t) {
2908
+ const s = $([o], r.field);
2817
2909
  n[s] = i.reduce((l, a) => l + (a.values[s] ?? 0), 0);
2818
2910
  }
2819
2911
  return n;
2820
2912
  }
2821
- function at(i) {
2913
+ function dt(i) {
2822
2914
  const e = [];
2823
2915
  function t(n) {
2824
2916
  if (e.push(n), n.children)
2825
- for (const r of n.children)
2826
- t(r);
2917
+ for (const o of n.children)
2918
+ t(o);
2827
2919
  }
2828
2920
  for (const n of i)
2829
2921
  t(n);
2830
2922
  return e;
2831
2923
  }
2832
- class Tt extends y {
2924
+ class Lt extends y {
2833
2925
  name = "pivot";
2834
2926
  version = "1.0.0";
2835
2927
  get defaultConfig() {
@@ -2852,8 +2944,8 @@ class Tt extends y {
2852
2944
  processRows(e) {
2853
2945
  if (!this.config.enabled || !this.isActive)
2854
2946
  return [...e];
2855
- const t = tt(this.config);
2856
- return t.length > 0 ? (this.warn(`Config errors: ${t.join(", ")}`), [...e]) : (this.pivotResult = rt(e, this.config), at(this.pivotResult.rows).map((n) => ({
2947
+ const t = nt(this.config);
2948
+ return t.length > 0 ? (this.warn(`Config errors: ${t.join(", ")}`), [...e]) : (this.pivotResult = rt(e, this.config), dt(this.pivotResult.rows).map((n) => ({
2857
2949
  __pivotRowKey: n.rowKey,
2858
2950
  __pivotLabel: n.rowLabel,
2859
2951
  __pivotDepth: n.depth,
@@ -2872,11 +2964,11 @@ class Tt extends y {
2872
2964
  width: 200
2873
2965
  });
2874
2966
  for (const n of this.pivotResult.columnKeys)
2875
- for (const r of this.config.valueFields ?? []) {
2876
- const o = $([n], r.field);
2967
+ for (const o of this.config.valueFields ?? []) {
2968
+ const r = $([n], o.field);
2877
2969
  t.push({
2878
- field: o,
2879
- header: `${n} - ${r.header || r.field} (${r.aggFunc})`,
2970
+ field: r,
2971
+ header: `${n} - ${o.header || o.field} (${o.aggFunc})`,
2880
2972
  width: 120,
2881
2973
  type: "number"
2882
2974
  });
@@ -2949,7 +3041,7 @@ class Tt extends y {
2949
3041
  .pivot-total-row { font-weight: bold; border-top: 2px solid var(--tbw-pivot-border, var(--tbw-color-border-strong)); }
2950
3042
  `;
2951
3043
  }
2952
- function dt(i) {
3044
+ function ct(i) {
2953
3045
  const e = i.sticky;
2954
3046
  if (e === "left" || e === "right")
2955
3047
  return !1;
@@ -2958,10 +3050,10 @@ function dt(i) {
2958
3050
  }
2959
3051
  function ge(i, e, t) {
2960
3052
  if (e === t || e < 0 || e >= i.length || t < 0 || t > i.length) return i;
2961
- const n = [...i], [r] = n.splice(e, 1);
2962
- return n.splice(t, 0, r), n;
3053
+ const n = [...i], [o] = n.splice(e, 1);
3054
+ return n.splice(t, 0, o), n;
2963
3055
  }
2964
- class Lt extends y {
3056
+ class Mt extends y {
2965
3057
  name = "reorder";
2966
3058
  version = "1.0.0";
2967
3059
  get defaultConfig() {
@@ -2976,19 +3068,19 @@ class Lt extends y {
2976
3068
  draggedField = null;
2977
3069
  draggedIndex = null;
2978
3070
  dropIndex = null;
2979
- boundReorderRequestHandler = null;
2980
3071
  // ===== Lifecycle =====
2981
3072
  attach(e) {
2982
- super.attach(e), this.boundReorderRequestHandler = (t) => {
2983
- const n = t.detail;
2984
- n?.field && typeof n.toIndex == "number" && this.moveColumn(n.field, n.toIndex);
2985
- }, e.addEventListener("column-reorder-request", this.boundReorderRequestHandler);
3073
+ super.attach(e), e.addEventListener(
3074
+ "column-reorder-request",
3075
+ (t) => {
3076
+ const n = t.detail;
3077
+ n?.field && typeof n.toIndex == "number" && this.moveColumn(n.field, n.toIndex);
3078
+ },
3079
+ { signal: this.disconnectSignal }
3080
+ );
2986
3081
  }
2987
3082
  detach() {
2988
- this.boundReorderRequestHandler && this.grid && (this.grid.removeEventListener(
2989
- "column-reorder-request",
2990
- this.boundReorderRequestHandler
2991
- ), this.boundReorderRequestHandler = null), this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null;
3083
+ this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null;
2992
3084
  }
2993
3085
  // ===== Hooks =====
2994
3086
  // Note: No processColumns hook needed - we directly update the grid's column order
@@ -2997,34 +3089,34 @@ class Lt extends y {
2997
3089
  const e = this.shadowRoot;
2998
3090
  if (!e) return;
2999
3091
  e.querySelectorAll(".header-row > .cell").forEach((n) => {
3000
- const r = n, o = r.getAttribute("data-field");
3001
- if (!o) return;
3002
- const s = this.columns.find((l) => l.field === o);
3003
- if (!s || !dt(s)) {
3004
- r.draggable = !1;
3092
+ const o = n, r = o.getAttribute("data-field");
3093
+ if (!r) return;
3094
+ const s = this.columns.find((l) => l.field === r);
3095
+ if (!s || !ct(s)) {
3096
+ o.draggable = !1;
3005
3097
  return;
3006
3098
  }
3007
- r.draggable = !0, !r.getAttribute("data-dragstart-bound") && (r.setAttribute("data-dragstart-bound", "true"), r.addEventListener("dragstart", (l) => {
3008
- const c = this.getColumnOrder().indexOf(o);
3009
- this.isDragging = !0, this.draggedField = o, this.draggedIndex = c, l.dataTransfer && (l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", o)), r.classList.add("dragging");
3010
- }), r.addEventListener("dragend", () => {
3099
+ o.draggable = !0, !o.getAttribute("data-dragstart-bound") && (o.setAttribute("data-dragstart-bound", "true"), o.addEventListener("dragstart", (l) => {
3100
+ const d = this.getColumnOrder().indexOf(r);
3101
+ this.isDragging = !0, this.draggedField = r, this.draggedIndex = d, l.dataTransfer && (l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", r)), o.classList.add("dragging");
3102
+ }), o.addEventListener("dragend", () => {
3011
3103
  this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null, e.querySelectorAll(".header-row > .cell").forEach((l) => {
3012
3104
  l.classList.remove("dragging", "drop-target", "drop-before", "drop-after");
3013
3105
  });
3014
- }), r.addEventListener("dragover", (l) => {
3015
- if (l.preventDefault(), !this.isDragging || this.draggedField === o) return;
3016
- const a = r.getBoundingClientRect(), c = a.left + a.width / 2, u = this.getColumnOrder().indexOf(o);
3017
- this.dropIndex = l.clientX < c ? u : u + 1, r.classList.add("drop-target"), r.classList.toggle("drop-before", l.clientX < c), r.classList.toggle("drop-after", l.clientX >= c);
3018
- }), r.addEventListener("dragleave", () => {
3019
- r.classList.remove("drop-target", "drop-before", "drop-after");
3020
- }), r.addEventListener("drop", (l) => {
3106
+ }), o.addEventListener("dragover", (l) => {
3107
+ if (l.preventDefault(), !this.isDragging || this.draggedField === r) return;
3108
+ const a = o.getBoundingClientRect(), d = a.left + a.width / 2, u = this.getColumnOrder().indexOf(r);
3109
+ 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);
3110
+ }), o.addEventListener("dragleave", () => {
3111
+ o.classList.remove("drop-target", "drop-before", "drop-after");
3112
+ }), o.addEventListener("drop", (l) => {
3021
3113
  l.preventDefault();
3022
- const a = this.draggedField, c = this.draggedIndex, d = this.dropIndex;
3023
- if (!this.isDragging || a === null || c === null || d === null)
3114
+ const a = this.draggedField, d = this.draggedIndex, c = this.dropIndex;
3115
+ if (!this.isDragging || a === null || d === null || c === null)
3024
3116
  return;
3025
- const u = d > c ? d - 1 : d, h = this.getColumnOrder(), f = ge(h, c, u), g = {
3117
+ const u = c > d ? c - 1 : c, h = this.getColumnOrder(), f = ge(h, d, u), g = {
3026
3118
  field: a,
3027
- fromIndex: c,
3119
+ fromIndex: d,
3028
3120
  toIndex: u,
3029
3121
  columnOrder: f
3030
3122
  };
@@ -3046,14 +3138,14 @@ class Lt extends y {
3046
3138
  * @param toIndex - The target index
3047
3139
  */
3048
3140
  moveColumn(e, t) {
3049
- const n = this.getColumnOrder(), r = n.indexOf(e);
3050
- if (r === -1) return;
3051
- const o = ge(n, r, t);
3052
- this.grid.setColumnOrder(o), this.emit("column-move", {
3141
+ const n = this.getColumnOrder(), o = n.indexOf(e);
3142
+ if (o === -1) return;
3143
+ const r = ge(n, o, t);
3144
+ this.grid.setColumnOrder(r), this.emit("column-move", {
3053
3145
  field: e,
3054
- fromIndex: r,
3146
+ fromIndex: o,
3055
3147
  toIndex: t,
3056
- columnOrder: o
3148
+ columnOrder: r
3057
3149
  }), this.grid.requestStateChange?.();
3058
3150
  }
3059
3151
  /**
@@ -3105,35 +3197,35 @@ class Lt extends y {
3105
3197
  function M(i, e) {
3106
3198
  return Math.floor(i / e);
3107
3199
  }
3108
- function ct(i, e) {
3200
+ function ut(i, e) {
3109
3201
  return {
3110
3202
  start: i * e,
3111
3203
  end: (i + 1) * e
3112
3204
  };
3113
3205
  }
3114
- function ut(i, e, t) {
3115
- const n = M(i, t), r = M(e - 1, t), o = [];
3116
- for (let s = n; s <= r; s++)
3117
- o.push(s);
3118
- return o;
3206
+ function ht(i, e, t) {
3207
+ const n = M(i, t), o = M(e - 1, t), r = [];
3208
+ for (let s = n; s <= o; s++)
3209
+ r.push(s);
3210
+ return r;
3119
3211
  }
3120
3212
  async function pe(i, e, t, n) {
3121
- const r = ct(e, t);
3213
+ const o = ut(e, t);
3122
3214
  return i.getRows({
3123
- startRow: r.start,
3124
- endRow: r.end,
3215
+ startRow: o.start,
3216
+ endRow: o.end,
3125
3217
  sortModel: n.sortModel,
3126
3218
  filterModel: n.filterModel
3127
3219
  });
3128
3220
  }
3129
- function ht(i, e, t) {
3130
- const n = M(i, e), r = t.get(n);
3131
- if (!r) return;
3132
- const o = i % e;
3133
- return r[o];
3221
+ function ft(i, e, t) {
3222
+ const n = M(i, e), o = t.get(n);
3223
+ if (!o) return;
3224
+ const r = i % e;
3225
+ return o[r];
3134
3226
  }
3135
- const ft = 100;
3136
- class Mt extends y {
3227
+ const gt = 100;
3228
+ class qt extends y {
3137
3229
  name = "serverSide";
3138
3230
  version = "1.0.0";
3139
3231
  get defaultConfig() {
@@ -3161,15 +3253,15 @@ class Mt extends y {
3161
3253
  */
3162
3254
  loadRequiredBlocks() {
3163
3255
  if (!this.dataSource) return;
3164
- const e = this.grid, t = this.config.cacheBlockSize ?? 100, n = { startRow: e.virtualization.start, endRow: e.virtualization.end }, r = ut(n.startRow, n.endRow, t);
3165
- for (const o of r)
3166
- if (!(this.loadedBlocks.has(o) || this.loadingBlocks.has(o))) {
3256
+ const e = this.grid, t = this.config.cacheBlockSize ?? 100, n = { startRow: e.virtualization.start, endRow: e.virtualization.end }, o = ht(n.startRow, n.endRow, t);
3257
+ for (const r of o)
3258
+ if (!(this.loadedBlocks.has(r) || this.loadingBlocks.has(r))) {
3167
3259
  if (this.loadingBlocks.size >= (this.config.maxConcurrentRequests ?? 2))
3168
3260
  break;
3169
- this.loadingBlocks.add(o), pe(this.dataSource, o, t, {}).then((s) => {
3170
- this.loadedBlocks.set(o, s.rows), this.totalRowCount = s.totalRowCount, this.loadingBlocks.delete(o), this.requestRender(), this.loadRequiredBlocks();
3261
+ this.loadingBlocks.add(r), pe(this.dataSource, r, t, {}).then((s) => {
3262
+ this.loadedBlocks.set(r, s.rows), this.totalRowCount = s.totalRowCount, this.loadingBlocks.delete(r), this.requestRender(), this.loadRequiredBlocks();
3171
3263
  }).catch(() => {
3172
- this.loadingBlocks.delete(o);
3264
+ this.loadingBlocks.delete(r);
3173
3265
  });
3174
3266
  }
3175
3267
  }
@@ -3178,15 +3270,15 @@ class Mt extends y {
3178
3270
  if (!this.dataSource) return [...e];
3179
3271
  const t = [];
3180
3272
  for (let n = 0; n < this.totalRowCount; n++) {
3181
- const r = ht(n, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
3182
- t.push(r ?? { __loading: !0, __index: n });
3273
+ const o = ft(n, this.config.cacheBlockSize ?? 100, this.loadedBlocks);
3274
+ t.push(o ?? { __loading: !0, __index: n });
3183
3275
  }
3184
3276
  return t;
3185
3277
  }
3186
3278
  onScroll(e) {
3187
3279
  this.dataSource && (this.loadRequiredBlocks(), this.scrollDebounceTimer && clearTimeout(this.scrollDebounceTimer), this.scrollDebounceTimer = setTimeout(() => {
3188
3280
  this.loadRequiredBlocks();
3189
- }, ft));
3281
+ }, gt));
3190
3282
  }
3191
3283
  // ===== Public API =====
3192
3284
  /**
@@ -3233,7 +3325,7 @@ class Mt extends y {
3233
3325
  return this.loadedBlocks.size;
3234
3326
  }
3235
3327
  }
3236
- function gt(i, e, t) {
3328
+ function pt(i, e, t) {
3237
3329
  const n = [...i.undoStack, e];
3238
3330
  for (; n.length > t; )
3239
3331
  n.shift();
@@ -3267,16 +3359,16 @@ function be(i) {
3267
3359
  action: t
3268
3360
  } : { newState: i, action: null };
3269
3361
  }
3270
- function pt(i) {
3362
+ function mt(i) {
3271
3363
  return i.undoStack.length > 0;
3272
3364
  }
3273
- function mt(i) {
3365
+ function bt(i) {
3274
3366
  return i.redoStack.length > 0;
3275
3367
  }
3276
- function bt() {
3368
+ function wt() {
3277
3369
  return { undoStack: [], redoStack: [] };
3278
3370
  }
3279
- function wt(i, e, t, n) {
3371
+ function xt(i, e, t, n) {
3280
3372
  return {
3281
3373
  type: "cell-edit",
3282
3374
  rowIndex: i,
@@ -3286,7 +3378,7 @@ function wt(i, e, t, n) {
3286
3378
  timestamp: Date.now()
3287
3379
  };
3288
3380
  }
3289
- class qt extends y {
3381
+ class Ft extends y {
3290
3382
  name = "undoRedo";
3291
3383
  version = "1.0.0";
3292
3384
  get defaultConfig() {
@@ -3313,22 +3405,22 @@ class qt extends y {
3313
3405
  if (!this.config.enabled) return !1;
3314
3406
  const t = (e.ctrlKey || e.metaKey) && e.key === "z" && !e.shiftKey, n = (e.ctrlKey || e.metaKey) && (e.key === "y" || e.key === "z" && e.shiftKey);
3315
3407
  if (t) {
3316
- const r = me({ undoStack: this.undoStack, redoStack: this.redoStack });
3317
- if (r.action) {
3318
- const o = this.rows;
3319
- o[r.action.rowIndex] && (o[r.action.rowIndex][r.action.field] = r.action.oldValue), this.undoStack = r.newState.undoStack, this.redoStack = r.newState.redoStack, this.emit("undo", {
3320
- action: r.action,
3408
+ const o = me({ undoStack: this.undoStack, redoStack: this.redoStack });
3409
+ if (o.action) {
3410
+ const r = this.rows;
3411
+ r[o.action.rowIndex] && (r[o.action.rowIndex][o.action.field] = o.action.oldValue), this.undoStack = o.newState.undoStack, this.redoStack = o.newState.redoStack, this.emit("undo", {
3412
+ action: o.action,
3321
3413
  type: "undo"
3322
3414
  }), this.requestRender();
3323
3415
  }
3324
3416
  return !0;
3325
3417
  }
3326
3418
  if (n) {
3327
- const r = be({ undoStack: this.undoStack, redoStack: this.redoStack });
3328
- if (r.action) {
3329
- const o = this.rows;
3330
- o[r.action.rowIndex] && (o[r.action.rowIndex][r.action.field] = r.action.newValue), this.undoStack = r.newState.undoStack, this.redoStack = r.newState.redoStack, this.emit("redo", {
3331
- action: r.action,
3419
+ const o = be({ undoStack: this.undoStack, redoStack: this.redoStack });
3420
+ if (o.action) {
3421
+ const r = this.rows;
3422
+ r[o.action.rowIndex] && (r[o.action.rowIndex][o.action.field] = o.action.newValue), this.undoStack = o.newState.undoStack, this.redoStack = o.newState.redoStack, this.emit("redo", {
3423
+ action: o.action,
3332
3424
  type: "redo"
3333
3425
  }), this.requestRender();
3334
3426
  }
@@ -3346,10 +3438,10 @@ class qt extends y {
3346
3438
  * @param oldValue - The value before the edit
3347
3439
  * @param newValue - The value after the edit
3348
3440
  */
3349
- recordEdit(e, t, n, r) {
3350
- const o = wt(e, t, n, r), s = gt(
3441
+ recordEdit(e, t, n, o) {
3442
+ const r = xt(e, t, n, o), s = pt(
3351
3443
  { undoStack: this.undoStack, redoStack: this.redoStack },
3352
- o,
3444
+ r,
3353
3445
  this.config.maxHistorySize ?? 100
3354
3446
  );
3355
3447
  this.undoStack = s.undoStack, this.redoStack = s.redoStack;
@@ -3384,19 +3476,19 @@ class qt extends y {
3384
3476
  * Check if there are any actions that can be undone.
3385
3477
  */
3386
3478
  canUndo() {
3387
- return pt({ undoStack: this.undoStack, redoStack: this.redoStack });
3479
+ return mt({ undoStack: this.undoStack, redoStack: this.redoStack });
3388
3480
  }
3389
3481
  /**
3390
3482
  * Check if there are any actions that can be redone.
3391
3483
  */
3392
3484
  canRedo() {
3393
- return mt({ undoStack: this.undoStack, redoStack: this.redoStack });
3485
+ return bt({ undoStack: this.undoStack, redoStack: this.redoStack });
3394
3486
  }
3395
3487
  /**
3396
3488
  * Clear all undo/redo history.
3397
3489
  */
3398
3490
  clearHistory() {
3399
- const e = bt();
3491
+ const e = wt();
3400
3492
  this.undoStack = e.undoStack, this.redoStack = e.redoStack;
3401
3493
  }
3402
3494
  /**
@@ -3416,7 +3508,7 @@ function we(i) {
3416
3508
  const e = i.meta ?? {};
3417
3509
  return e.lockPosition !== !0 && e.suppressMovable !== !0;
3418
3510
  }
3419
- class _ extends y {
3511
+ class I extends y {
3420
3512
  name = "visibility";
3421
3513
  version = "1.0.0";
3422
3514
  /** Tool panel ID for shell integration */
@@ -3445,7 +3537,7 @@ class _ extends y {
3445
3537
  getToolPanel() {
3446
3538
  if (this.config.enabled)
3447
3539
  return {
3448
- id: _.PANEL_ID,
3540
+ id: I.PANEL_ID,
3449
3541
  title: "Columns",
3450
3542
  icon: "☰",
3451
3543
  tooltip: "Column visibility",
@@ -3459,7 +3551,7 @@ class _ extends y {
3459
3551
  * Show the visibility sidebar panel.
3460
3552
  */
3461
3553
  show() {
3462
- this.grid.openToolPanel(_.PANEL_ID);
3554
+ this.grid.openToolPanel(I.PANEL_ID);
3463
3555
  }
3464
3556
  /**
3465
3557
  * Hide the visibility sidebar panel.
@@ -3471,7 +3563,7 @@ class _ extends y {
3471
3563
  * Toggle the visibility sidebar panel.
3472
3564
  */
3473
3565
  toggle() {
3474
- this.grid.toggleToolPanel(_.PANEL_ID);
3566
+ this.grid.toggleToolPanel(I.PANEL_ID);
3475
3567
  }
3476
3568
  /**
3477
3569
  * Check if a specific column is visible.
@@ -3549,7 +3641,7 @@ class _ extends y {
3549
3641
  * @returns True if the panel is open
3550
3642
  */
3551
3643
  isPanelVisible() {
3552
- return this.grid.activeToolPanel === _.PANEL_ID;
3644
+ return this.grid.activeToolPanel === I.PANEL_ID;
3553
3645
  }
3554
3646
  // ===== Private Methods =====
3555
3647
  /**
@@ -3559,12 +3651,12 @@ class _ extends y {
3559
3651
  renderPanelContent(e) {
3560
3652
  const t = this.grid, n = document.createElement("div");
3561
3653
  n.className = "tbw-visibility-content";
3562
- const r = document.createElement("div");
3563
- r.className = "tbw-visibility-list", n.appendChild(r);
3564
- const o = document.createElement("button");
3565
- return o.className = "tbw-visibility-show-all", o.textContent = "Show All", o.addEventListener("click", () => {
3566
- t.showAllColumns(), this.rebuildToggles(r);
3567
- }), n.appendChild(o), this.columnListElement = r, this.rebuildToggles(r), e.appendChild(n), () => {
3654
+ const o = document.createElement("div");
3655
+ o.className = "tbw-visibility-list", n.appendChild(o);
3656
+ const r = document.createElement("button");
3657
+ return r.className = "tbw-visibility-show-all", r.textContent = "Show All", r.addEventListener("click", () => {
3658
+ t.showAllColumns(), this.rebuildToggles(o);
3659
+ }), n.appendChild(r), this.columnListElement = o, this.rebuildToggles(o), e.appendChild(n), () => {
3568
3660
  this.columnListElement = null, n.remove();
3569
3661
  };
3570
3662
  }
@@ -3582,57 +3674,57 @@ class _ extends y {
3582
3674
  rebuildToggles(e) {
3583
3675
  const t = this.grid, n = this.hasReorderPlugin();
3584
3676
  e.innerHTML = "";
3585
- const r = t.getAllColumns();
3586
- for (let o = 0; o < r.length; o++) {
3587
- const s = r[o], l = s.header || s.field, a = document.createElement("div");
3588
- a.className = s.lockVisible ? "tbw-visibility-row locked" : "tbw-visibility-row", a.setAttribute("data-field", s.field), a.setAttribute("data-index", String(o)), n && we(s) && (a.draggable = !0, a.classList.add("reorderable"), this.setupDragListeners(a, s.field, o, e));
3589
- const c = document.createElement("label");
3590
- c.className = "tbw-visibility-label";
3591
- const d = document.createElement("input");
3592
- d.type = "checkbox", d.checked = s.visible, d.disabled = s.lockVisible ?? !1, d.addEventListener("change", () => {
3677
+ const o = t.getAllColumns();
3678
+ for (let r = 0; r < o.length; r++) {
3679
+ const s = o[r], l = s.header || s.field, a = document.createElement("div");
3680
+ a.className = s.lockVisible ? "tbw-visibility-row locked" : "tbw-visibility-row", a.setAttribute("data-field", s.field), a.setAttribute("data-index", String(r)), n && we(s) && (a.draggable = !0, a.classList.add("reorderable"), this.setupDragListeners(a, s.field, r, e));
3681
+ const d = document.createElement("label");
3682
+ d.className = "tbw-visibility-label";
3683
+ const c = document.createElement("input");
3684
+ c.type = "checkbox", c.checked = s.visible, c.disabled = s.lockVisible ?? !1, c.addEventListener("change", () => {
3593
3685
  t.toggleColumnVisibility(s.field), setTimeout(() => this.rebuildToggles(e), 0);
3594
3686
  });
3595
3687
  const u = document.createElement("span");
3596
- if (u.textContent = l, c.appendChild(d), c.appendChild(u), n && we(s)) {
3688
+ if (u.textContent = l, d.appendChild(c), d.appendChild(u), n && we(s)) {
3597
3689
  const h = document.createElement("span");
3598
- h.className = "tbw-visibility-handle", h.textContent = "⋮⋮", h.title = "Drag to reorder", a.appendChild(h);
3690
+ h.className = "tbw-visibility-handle", this.setIcon(h, this.resolveIcon("dragHandle")), h.title = "Drag to reorder", a.appendChild(h);
3599
3691
  }
3600
- a.appendChild(c), e.appendChild(a);
3692
+ a.appendChild(d), e.appendChild(a);
3601
3693
  }
3602
3694
  }
3603
3695
  /**
3604
3696
  * Set up drag-and-drop event listeners for a row.
3605
3697
  * On drop, emits a 'column-reorder-request' event for other plugins to handle.
3606
3698
  */
3607
- setupDragListeners(e, t, n, r) {
3608
- e.addEventListener("dragstart", (o) => {
3609
- this.isDragging = !0, this.draggedField = t, this.draggedIndex = n, o.dataTransfer && (o.dataTransfer.effectAllowed = "move", o.dataTransfer.setData("text/plain", t)), e.classList.add("dragging");
3699
+ setupDragListeners(e, t, n, o) {
3700
+ e.addEventListener("dragstart", (r) => {
3701
+ this.isDragging = !0, this.draggedField = t, this.draggedIndex = n, r.dataTransfer && (r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData("text/plain", t)), e.classList.add("dragging");
3610
3702
  }), e.addEventListener("dragend", () => {
3611
- this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null, r.querySelectorAll(".tbw-visibility-row").forEach((o) => {
3612
- o.classList.remove("dragging", "drop-target", "drop-before", "drop-after");
3703
+ this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null, o.querySelectorAll(".tbw-visibility-row").forEach((r) => {
3704
+ r.classList.remove("dragging", "drop-target", "drop-before", "drop-after");
3613
3705
  });
3614
- }), e.addEventListener("dragover", (o) => {
3615
- if (o.preventDefault(), !this.isDragging || this.draggedField === t) return;
3706
+ }), e.addEventListener("dragover", (r) => {
3707
+ if (r.preventDefault(), !this.isDragging || this.draggedField === t) return;
3616
3708
  const s = e.getBoundingClientRect(), l = s.top + s.height / 2;
3617
- this.dropIndex = o.clientY < l ? n : n + 1, r.querySelectorAll(".tbw-visibility-row").forEach((a) => {
3709
+ this.dropIndex = r.clientY < l ? n : n + 1, o.querySelectorAll(".tbw-visibility-row").forEach((a) => {
3618
3710
  a !== e && a.classList.remove("drop-target", "drop-before", "drop-after");
3619
- }), e.classList.add("drop-target"), e.classList.toggle("drop-before", o.clientY < l), e.classList.toggle("drop-after", o.clientY >= l);
3711
+ }), e.classList.add("drop-target"), e.classList.toggle("drop-before", r.clientY < l), e.classList.toggle("drop-after", r.clientY >= l);
3620
3712
  }), e.addEventListener("dragleave", () => {
3621
3713
  e.classList.remove("drop-target", "drop-before", "drop-after");
3622
- }), e.addEventListener("drop", (o) => {
3623
- o.preventDefault();
3714
+ }), e.addEventListener("drop", (r) => {
3715
+ r.preventDefault();
3624
3716
  const s = this.draggedField, l = this.draggedIndex, a = this.dropIndex;
3625
3717
  if (!this.isDragging || s === null || l === null || a === null)
3626
3718
  return;
3627
- const c = a > l ? a - 1 : a;
3628
- if (c !== l) {
3629
- const d = {
3719
+ const d = a > l ? a - 1 : a;
3720
+ if (d !== l) {
3721
+ const c = {
3630
3722
  field: s,
3631
3723
  fromIndex: l,
3632
- toIndex: c
3724
+ toIndex: d
3633
3725
  };
3634
- this.emit("column-reorder-request", d), setTimeout(() => {
3635
- this.rebuildToggles(r);
3726
+ this.emit("column-reorder-request", c), setTimeout(() => {
3727
+ this.rebuildToggles(o);
3636
3728
  }, 0);
3637
3729
  }
3638
3730
  });
@@ -3734,32 +3826,40 @@ class _ extends y {
3734
3826
  }
3735
3827
  export {
3736
3828
  y as BaseGridPlugin,
3737
- vt as ClipboardPlugin,
3738
- yt as ColumnVirtualizationPlugin,
3739
- Ct as ContextMenuPlugin,
3829
+ yt as ClipboardPlugin,
3830
+ Ct as ColumnVirtualizationPlugin,
3831
+ St as ContextMenuPlugin,
3832
+ xe as DEFAULT_GRID_ICONS,
3740
3833
  Pt as DGEvents,
3741
- Dt as DataGridElement,
3742
- St as ExportPlugin,
3834
+ Bt as DataGridElement,
3835
+ Rt as ExportPlugin,
3743
3836
  E as FilteringPlugin,
3744
- Bt as FitModeEnum,
3745
- Ht as GridCSSVars,
3746
- Ot as GridClasses,
3747
- Wt as GridDataAttrs,
3837
+ Ht as FitModeEnum,
3838
+ Ot as GridCSSVars,
3839
+ Wt as GridClasses,
3840
+ Vt as GridDataAttrs,
3748
3841
  Kt as GridElement,
3749
- Vt as GridSelectors,
3750
- Rt as GroupingColumnsPlugin,
3751
- kt as GroupingRowsPlugin,
3752
- Et as MasterDetailPlugin,
3753
- At as MultiSortPlugin,
3842
+ Gt as GridSelectors,
3843
+ kt as GroupingColumnsPlugin,
3844
+ Et as GroupingRowsPlugin,
3845
+ At as MasterDetailPlugin,
3846
+ It as MultiSortPlugin,
3754
3847
  _t as PinnedColumnsPlugin,
3755
- It as PinnedRowsPlugin,
3756
- Tt as PivotPlugin,
3757
- Gt as PluginEvents,
3758
- Lt as ReorderPlugin,
3759
- zt as SelectionPlugin,
3760
- Mt as ServerSidePlugin,
3761
- $t as TreePlugin,
3762
- qt as UndoRedoPlugin,
3763
- _ as VisibilityPlugin
3848
+ Tt as PinnedRowsPlugin,
3849
+ Lt as PivotPlugin,
3850
+ zt as PluginEvents,
3851
+ $t as PluginManager,
3852
+ Mt as ReorderPlugin,
3853
+ jt as SelectionPlugin,
3854
+ qt as ServerSidePlugin,
3855
+ Ut as TreePlugin,
3856
+ Ft as UndoRedoPlugin,
3857
+ I as VisibilityPlugin,
3858
+ Yt as aggregatorRegistry,
3859
+ ve as getAggregator,
3860
+ Xt as listAggregators,
3861
+ Jt as registerAggregator,
3862
+ X as runAggregator,
3863
+ Qt as unregisterAggregator
3764
3864
  };
3765
3865
  //# sourceMappingURL=all.js.map