@toolbox-web/grid 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/all.js +1483 -1403
  2. package/all.js.map +1 -1
  3. package/index.js +11 -4
  4. package/index.js.map +1 -1
  5. package/lib/core/internal/row-animation.d.ts.map +1 -1
  6. package/lib/core/plugin/types.d.ts +1 -1
  7. package/lib/core/plugin/types.d.ts.map +1 -1
  8. package/lib/core/types.d.ts +44 -1
  9. package/lib/core/types.d.ts.map +1 -1
  10. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +69 -8
  11. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  12. package/lib/plugins/clipboard/index.d.ts +1 -1
  13. package/lib/plugins/clipboard/index.d.ts.map +1 -1
  14. package/lib/plugins/clipboard/index.js +257 -192
  15. package/lib/plugins/clipboard/index.js.map +1 -1
  16. package/lib/plugins/clipboard/types.d.ts +31 -0
  17. package/lib/plugins/clipboard/types.d.ts.map +1 -1
  18. package/lib/plugins/column-virtualization/index.js.map +1 -1
  19. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +8 -0
  20. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  21. package/lib/plugins/context-menu/index.js +75 -60
  22. package/lib/plugins/context-menu/index.js.map +1 -1
  23. package/lib/plugins/context-menu/types.d.ts +7 -0
  24. package/lib/plugins/context-menu/types.d.ts.map +1 -1
  25. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  26. package/lib/plugins/editing/editors.d.ts +2 -2
  27. package/lib/plugins/editing/editors.d.ts.map +1 -1
  28. package/lib/plugins/editing/index.js +420 -381
  29. package/lib/plugins/editing/index.js.map +1 -1
  30. package/lib/plugins/editing/types.d.ts +6 -23
  31. package/lib/plugins/editing/types.d.ts.map +1 -1
  32. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  33. package/lib/plugins/export/index.js +75 -66
  34. package/lib/plugins/export/index.js.map +1 -1
  35. package/lib/plugins/filtering/index.d.ts +1 -1
  36. package/lib/plugins/filtering/index.d.ts.map +1 -1
  37. package/lib/plugins/filtering/index.js.map +1 -1
  38. package/lib/plugins/grouping-columns/index.js.map +1 -1
  39. package/lib/plugins/grouping-rows/index.js.map +1 -1
  40. package/lib/plugins/master-detail/index.js.map +1 -1
  41. package/lib/plugins/multi-sort/index.js.map +1 -1
  42. package/lib/plugins/pinned-columns/index.js.map +1 -1
  43. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +1 -0
  44. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  45. package/lib/plugins/pinned-rows/index.js +118 -87
  46. package/lib/plugins/pinned-rows/index.js.map +1 -1
  47. package/lib/plugins/pinned-rows/pinned-rows.d.ts +2 -1
  48. package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +1 -1
  49. package/lib/plugins/pinned-rows/types.d.ts +23 -2
  50. package/lib/plugins/pinned-rows/types.d.ts.map +1 -1
  51. package/lib/plugins/pivot/index.js.map +1 -1
  52. package/lib/plugins/print/index.js.map +1 -1
  53. package/lib/plugins/reorder/index.js.map +1 -1
  54. package/lib/plugins/responsive/index.js.map +1 -1
  55. package/lib/plugins/row-reorder/index.js.map +1 -1
  56. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  57. package/lib/plugins/selection/index.js +147 -139
  58. package/lib/plugins/selection/index.js.map +1 -1
  59. package/lib/plugins/server-side/index.js.map +1 -1
  60. package/lib/plugins/shared/data-collection.d.ts +33 -0
  61. package/lib/plugins/shared/data-collection.d.ts.map +1 -0
  62. package/lib/plugins/tree/index.js.map +1 -1
  63. package/lib/plugins/undo-redo/index.js.map +1 -1
  64. package/lib/plugins/visibility/index.js.map +1 -1
  65. package/package.json +1 -1
  66. package/umd/grid.all.umd.js +23 -23
  67. package/umd/grid.all.umd.js.map +1 -1
  68. package/umd/grid.umd.js +2 -2
  69. package/umd/grid.umd.js.map +1 -1
  70. package/umd/plugins/clipboard.umd.js +5 -5
  71. package/umd/plugins/clipboard.umd.js.map +1 -1
  72. package/umd/plugins/context-menu.umd.js +1 -1
  73. package/umd/plugins/context-menu.umd.js.map +1 -1
  74. package/umd/plugins/editing.umd.js +1 -1
  75. package/umd/plugins/editing.umd.js.map +1 -1
  76. package/umd/plugins/export.umd.js +7 -7
  77. package/umd/plugins/export.umd.js.map +1 -1
  78. package/umd/plugins/pinned-rows.umd.js +1 -1
  79. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  80. package/umd/plugins/selection.umd.js +2 -2
  81. package/umd/plugins/selection.umd.js.map +1 -1
@@ -21,6 +21,7 @@ import { AggregationRowConfig, PinnedRowsConfig, PinnedRowsContext, PinnedRowsPa
21
21
  * | `showRowCount` | `boolean` | `true` | Show total row count |
22
22
  * | `showSelectedCount` | `boolean` | `true` | Show selected row count |
23
23
  * | `showFilteredCount` | `boolean` | `true` | Show filtered row count |
24
+ * | `fullWidth` | `boolean` | `false` | Default fullWidth for aggregation rows |
24
25
  * | `aggregationRows` | `AggregationRowConfig[]` | - | Aggregation row configs |
25
26
  *
26
27
  * ## Built-in Aggregation Functions
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedRowsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/pinned-rows/PinnedRowsPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AACH,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACpE,gBAAgB;IAChB,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAOhE;IAGD,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,uBAAuB,CAA4B;IAC3D,OAAO,CAAC,0BAA0B,CAA4B;IAC9D,OAAO,CAAC,aAAa,CAA4B;IAIjD,gBAAgB;IACP,MAAM,IAAI,IAAI;IAqBvB,gBAAgB;IACP,WAAW,IAAI,IAAI;IA4H5B,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,cAAc;IAUtB;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;;OAGG;IACH,UAAU,IAAI,iBAAiB;IAa/B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAQtC;;;OAGG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO7B;;;OAGG;IACH,iBAAiB,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI;IAQlD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAOvC"}
1
+ {"version":3,"file":"PinnedRowsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/pinned-rows/PinnedRowsPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACpE,gBAAgB;IAChB,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAOhE;IAGD,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,uBAAuB,CAA4B;IAC3D,OAAO,CAAC,0BAA0B,CAA4B;IAC9D,OAAO,CAAC,aAAa,CAA4B;IAIjD,gBAAgB;IACP,MAAM,IAAI,IAAI;IAqBvB,gBAAgB;IACP,WAAW,IAAI,IAAI;IA8H5B,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,cAAc;IAUtB;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;;OAGG;IACH,UAAU,IAAI,iBAAiB;IAa/B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAQtC;;;OAGG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO7B;;;OAGG;IACH,iBAAiB,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI;IAQlD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAOvC"}
@@ -11,7 +11,7 @@ const b = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentCo
11
11
  filterActive: b,
12
12
  print: "🖨️"
13
13
  };
14
- class A {
14
+ class y {
15
15
  /**
16
16
  * Plugin dependencies - declare other plugins this one requires.
17
17
  *
@@ -146,8 +146,8 @@ class A {
146
146
  * @returns `true` if the event was cancelled (preventDefault called), `false` otherwise
147
147
  */
148
148
  emitCancelable(t, e) {
149
- const o = new CustomEvent(t, { detail: e, bubbles: !0, cancelable: !0 });
150
- return this.grid?.dispatchEvent?.(o), o.defaultPrevented;
149
+ const r = new CustomEvent(t, { detail: e, bubbles: !0, cancelable: !0 });
150
+ return this.grid?.dispatchEvent?.(r), r.defaultPrevented;
151
151
  }
152
152
  // =========================================================================
153
153
  // Event Bus - Plugin-to-Plugin Communication
@@ -342,8 +342,8 @@ class A {
342
342
  get animationDuration() {
343
343
  const t = this.gridElement;
344
344
  if (t) {
345
- const e = getComputedStyle(t).getPropertyValue("--tbw-animation-duration").trim(), o = parseInt(e, 10);
346
- if (!isNaN(o)) return o;
345
+ const e = getComputedStyle(t).getPropertyValue("--tbw-animation-duration").trim(), r = parseInt(e, 10);
346
+ if (!isNaN(r)) return r;
347
347
  }
348
348
  return 200;
349
349
  }
@@ -378,9 +378,9 @@ class A {
378
378
  // #endregion
379
379
  }
380
380
  const p = {
381
- sum: (n, t) => n.reduce((e, o) => e + (Number(o[t]) || 0), 0),
381
+ sum: (n, t) => n.reduce((e, r) => e + (Number(r[t]) || 0), 0),
382
382
  avg: (n, t) => {
383
- const e = n.reduce((o, r) => o + (Number(r[t]) || 0), 0);
383
+ const e = n.reduce((r, s) => r + (Number(s[t]) || 0), 0);
384
384
  return n.length ? e / n.length : 0;
385
385
  },
386
386
  count: (n) => n.length,
@@ -388,147 +388,176 @@ const p = {
388
388
  max: (n, t) => n.length ? Math.max(...n.map((e) => Number(e[t]) || -1 / 0)) : 0,
389
389
  first: (n, t) => n[0]?.[t],
390
390
  last: (n, t) => n[n.length - 1]?.[t]
391
- }, f = /* @__PURE__ */ new Map(), d = {
391
+ }, h = /* @__PURE__ */ new Map(), g = {
392
392
  /**
393
393
  * Register a custom aggregator function.
394
394
  */
395
395
  register(n, t) {
396
- f.set(n, t);
396
+ h.set(n, t);
397
397
  },
398
398
  /**
399
399
  * Unregister a custom aggregator function.
400
400
  */
401
401
  unregister(n) {
402
- f.delete(n);
402
+ h.delete(n);
403
403
  },
404
404
  /**
405
405
  * Get an aggregator function by reference.
406
406
  */
407
407
  get(n) {
408
408
  if (n !== void 0)
409
- return typeof n == "function" ? n : f.get(n) ?? p[n];
409
+ return typeof n == "function" ? n : h.get(n) ?? p[n];
410
410
  },
411
411
  /**
412
412
  * Run an aggregator on a set of rows.
413
413
  */
414
- run(n, t, e, o) {
415
- const r = this.get(n);
416
- return r ? r(t, e, o) : void 0;
414
+ run(n, t, e, r) {
415
+ const s = this.get(n);
416
+ return s ? s(t, e, r) : void 0;
417
417
  },
418
418
  /**
419
419
  * Check if an aggregator exists.
420
420
  */
421
421
  has(n) {
422
- return f.has(n) || n in p;
422
+ return h.has(n) || n in p;
423
423
  },
424
424
  /**
425
425
  * List all available aggregator names.
426
426
  */
427
427
  list() {
428
- return [...Object.keys(p), ...f.keys()];
428
+ return [...Object.keys(p), ...h.keys()];
429
429
  }
430
430
  };
431
- d.register.bind(d);
432
- d.unregister.bind(d);
433
- const w = d.get.bind(d);
434
- d.run.bind(d);
435
- d.list.bind(d);
436
- function y(n) {
431
+ g.register.bind(g);
432
+ g.unregister.bind(g);
433
+ const w = g.get.bind(g);
434
+ g.run.bind(g);
435
+ g.list.bind(g);
436
+ function S(n) {
437
437
  return typeof n == "object" && n !== null && "aggFunc" in n;
438
438
  }
439
439
  function m(n, t) {
440
440
  const e = document.createElement("div");
441
441
  e.className = "tbw-pinned-rows", e.setAttribute("role", "presentation"), e.setAttribute("aria-live", "polite");
442
- const o = document.createElement("div");
443
- o.className = "tbw-pinned-rows-left";
444
442
  const r = document.createElement("div");
445
- r.className = "tbw-pinned-rows-center";
443
+ r.className = "tbw-pinned-rows-left";
446
444
  const s = document.createElement("div");
447
- if (s.className = "tbw-pinned-rows-right", n.showRowCount !== !1) {
445
+ s.className = "tbw-pinned-rows-center";
446
+ const o = document.createElement("div");
447
+ if (o.className = "tbw-pinned-rows-right", n.showRowCount !== !1) {
448
448
  const i = document.createElement("span");
449
- i.className = "tbw-status-panel tbw-status-panel-row-count", i.textContent = `Total: ${t.totalRows} rows`, o.appendChild(i);
449
+ i.className = "tbw-status-panel tbw-status-panel-row-count", i.textContent = `Total: ${t.totalRows} rows`, r.appendChild(i);
450
450
  }
451
451
  if (n.showFilteredCount && t.filteredRows !== t.totalRows) {
452
452
  const i = document.createElement("span");
453
- i.className = "tbw-status-panel tbw-status-panel-filtered-count", i.textContent = `Filtered: ${t.filteredRows}`, o.appendChild(i);
453
+ i.className = "tbw-status-panel tbw-status-panel-filtered-count", i.textContent = `Filtered: ${t.filteredRows}`, r.appendChild(i);
454
454
  }
455
455
  if (n.showSelectedCount && t.selectedRows > 0) {
456
456
  const i = document.createElement("span");
457
- i.className = "tbw-status-panel tbw-status-panel-selected-count", i.textContent = `Selected: ${t.selectedRows}`, s.appendChild(i);
457
+ i.className = "tbw-status-panel tbw-status-panel-selected-count", i.textContent = `Selected: ${t.selectedRows}`, o.appendChild(i);
458
458
  }
459
459
  if (n.customPanels)
460
460
  for (const i of n.customPanels) {
461
- const a = S(i, t);
461
+ const a = N(i, t);
462
462
  switch (i.position) {
463
463
  case "left":
464
- o.appendChild(a);
464
+ r.appendChild(a);
465
465
  break;
466
466
  case "center":
467
- r.appendChild(a);
467
+ s.appendChild(a);
468
468
  break;
469
469
  case "right":
470
- s.appendChild(a);
470
+ o.appendChild(a);
471
471
  break;
472
472
  }
473
473
  }
474
- return e.appendChild(o), e.appendChild(r), e.appendChild(s), e;
474
+ return e.appendChild(r), e.appendChild(s), e.appendChild(o), e;
475
475
  }
476
476
  function C(n) {
477
477
  const t = document.createElement("div");
478
478
  return t.className = `tbw-aggregation-rows tbw-aggregation-rows-${n}`, t.setAttribute("role", "presentation"), t;
479
479
  }
480
- function v(n, t, e, o) {
480
+ function v(n, t, e, r, s = !1) {
481
481
  n.innerHTML = "";
482
- for (const r of t) {
483
- const s = document.createElement("div");
484
- if (s.className = "tbw-aggregation-row", s.setAttribute("role", "presentation"), r.id && s.setAttribute("data-aggregation-id", r.id), r.fullWidth) {
485
- const i = document.createElement("div");
486
- i.className = "tbw-aggregation-cell tbw-aggregation-cell-full", i.style.gridColumn = "1 / -1", i.textContent = r.label || "", s.appendChild(i);
487
- } else
488
- for (const i of e) {
489
- const a = document.createElement("div");
490
- a.className = "tbw-aggregation-cell", a.setAttribute("data-field", i.field);
491
- let l, u;
492
- const h = r.aggregators?.[i.field];
493
- if (h)
494
- if (y(h)) {
495
- const g = w(h.aggFunc);
496
- g && (l = g(o, i.field, i)), u = h.formatter;
497
- } else {
498
- const g = w(h);
499
- g && (l = g(o, i.field, i));
500
- }
501
- else if (r.cells && Object.prototype.hasOwnProperty.call(r.cells, i.field)) {
502
- const g = r.cells[i.field];
503
- typeof g == "function" ? l = g(o, i.field, i) : l = g;
504
- }
505
- l != null ? a.textContent = u ? u(l, i.field, i) : String(l) : a.textContent = "", s.appendChild(a);
506
- }
507
- n.appendChild(s);
482
+ for (const o of t) {
483
+ const i = document.createElement("div");
484
+ i.className = "tbw-aggregation-row", i.setAttribute("role", "presentation"), o.id && i.setAttribute("data-aggregation-id", o.id), o.fullWidth ?? s ? B(i, o, e, r) : x(i, o, e, r), n.appendChild(i);
485
+ }
486
+ }
487
+ function B(n, t, e, r) {
488
+ const s = document.createElement("div");
489
+ s.className = "tbw-aggregation-cell tbw-aggregation-cell-full", s.style.gridColumn = "1 / -1";
490
+ const o = typeof t.label == "function" ? t.label(r, e) : t.label;
491
+ if (o) {
492
+ const a = document.createElement("span");
493
+ a.className = "tbw-aggregation-label", a.textContent = o, s.appendChild(a);
494
+ }
495
+ const i = W(t, e, r);
496
+ i && s.appendChild(i), n.appendChild(s);
497
+ }
498
+ function x(n, t, e, r) {
499
+ for (const s of e) {
500
+ const o = document.createElement("div");
501
+ o.className = "tbw-aggregation-cell", o.setAttribute("data-field", s.field);
502
+ const { value: i, formatter: a } = A(t, s, r);
503
+ i != null ? o.textContent = a ? a(i, s.field, s) : String(i) : o.textContent = "", n.appendChild(o);
504
+ }
505
+ }
506
+ function A(n, t, e) {
507
+ let r, s;
508
+ const o = n.aggregators?.[t.field];
509
+ if (o)
510
+ if (S(o)) {
511
+ const i = w(o.aggFunc);
512
+ i && (r = i(e, t.field, t)), s = o.formatter;
513
+ } else {
514
+ const i = w(o);
515
+ i && (r = i(e, t.field, t));
516
+ }
517
+ else if (n.cells && Object.prototype.hasOwnProperty.call(n.cells, t.field)) {
518
+ const i = n.cells[t.field];
519
+ typeof i == "function" ? r = i(e, t.field, t) : r = i;
508
520
  }
521
+ return { value: r, formatter: s };
509
522
  }
510
- function S(n, t) {
523
+ function W(n, t, e) {
524
+ const r = n.aggregators && Object.keys(n.aggregators).length > 0, s = n.cells && Object.keys(n.cells).length > 0;
525
+ if (!r && !s) return null;
526
+ const o = document.createElement("span");
527
+ o.className = "tbw-aggregation-aggregates";
528
+ for (const i of t) {
529
+ const { value: a, formatter: d } = A(n, i, e);
530
+ if (a != null) {
531
+ const c = document.createElement("span");
532
+ c.className = "tbw-aggregation-aggregate", c.setAttribute("data-field", i.field);
533
+ const u = i.header ?? i.field, f = d ? d(a, i.field, i) : String(a);
534
+ c.textContent = `${u}: ${f}`, o.appendChild(c);
535
+ }
536
+ }
537
+ return o.children.length > 0 ? o : null;
538
+ }
539
+ function N(n, t) {
511
540
  const e = document.createElement("div");
512
541
  e.className = "tbw-status-panel tbw-status-panel-custom", e.id = `status-panel-${n.id}`;
513
- const o = n.render(t);
514
- return typeof o == "string" ? e.innerHTML = o : e.appendChild(o), e;
542
+ const r = n.render(t);
543
+ return typeof r == "string" ? e.innerHTML = r : e.appendChild(r), e;
515
544
  }
516
- function E(n, t, e, o, r) {
545
+ function E(n, t, e, r, s) {
517
546
  return {
518
547
  totalRows: n.length,
519
- filteredRows: r?.cachedResult?.length ?? n.length,
520
- selectedRows: o?.selected?.size ?? 0,
548
+ filteredRows: s?.cachedResult?.length ?? n.length,
549
+ selectedRows: r?.selected?.size ?? 0,
521
550
  columns: t,
522
551
  rows: n,
523
552
  grid: e
524
553
  };
525
554
  }
526
- const B = "@layer tbw-plugins{.tbw-footer{flex-shrink:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:var(--tbw-spacing-xl, 1rem)}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-size:var(--tbw-aggregation-font-size, .8em);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, .125rem .5rem);min-height:var(--tbw-row-height, 1.75rem);display:block;align-items:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;text-overflow:ellipsis;white-space:var(--tbw-cell-white-space, nowrap)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0}}";
527
- class x extends A {
555
+ const P = "@layer tbw-plugins{.tbw-footer{flex-shrink:0;z-index:var(--tbw-z-layer-pinned-rows, 20);background:var(--tbw-color-panel-bg)}.tbw-pinned-rows{display:flex;align-items:center;justify-content:space-between;padding:var(--tbw-button-padding, var(--tbw-spacing-md, .5rem) var(--tbw-spacing-lg, .75rem));background:var(--tbw-pinned-rows-bg, var(--tbw-color-panel-bg));border-top:1px solid var(--tbw-pinned-rows-border, var(--tbw-color-border));font-size:var(--tbw-font-size-xs, .75rem);color:var(--tbw-pinned-rows-color, var(--tbw-color-fg-muted));min-height:32px;box-sizing:border-box;min-width:fit-content}.tbw-pinned-rows-left,.tbw-pinned-rows-center,.tbw-pinned-rows-right{display:flex;align-items:center;gap:var(--tbw-spacing-xl, 1rem)}.tbw-pinned-rows-left{justify-content:flex-start}.tbw-pinned-rows-center{justify-content:center;flex:1}.tbw-pinned-rows-right{justify-content:flex-end}.tbw-status-panel{white-space:nowrap}.tbw-aggregation-rows{min-width:fit-content;background:var(--tbw-aggregation-bg, var(--tbw-color-header-bg))}.tbw-aggregation-rows-top{border-bottom:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-rows-bottom{border-top:1px solid var(--tbw-aggregation-border, var(--tbw-color-border))}.tbw-aggregation-row{display:grid;grid-template-columns:var(--tbw-column-template);font-size:var(--tbw-aggregation-font-size, .8em);font-weight:var(--tbw-aggregation-font-weight, 600)}.tbw-aggregation-cell{padding:var(--tbw-cell-padding, .125rem .5rem);min-height:var(--tbw-row-height, 1.75rem);display:block;align-items:center;align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;text-overflow:ellipsis;white-space:var(--tbw-cell-white-space, nowrap)}.tbw-aggregation-cell:last-child{border-right:0}.tbw-aggregation-cell-full{grid-column:1 / -1;border-right:0;display:flex;align-items:center;gap:var(--tbw-spacing-lg, .75rem)}.tbw-aggregation-label{white-space:nowrap}.tbw-aggregation-aggregates{display:flex;align-items:center;gap:var(--tbw-spacing-lg, .75rem);font-weight:400;opacity:.85}.tbw-aggregation-aggregate{white-space:nowrap}}";
556
+ class F extends y {
528
557
  /** @internal */
529
558
  name = "pinnedRows";
530
559
  /** @internal */
531
- styles = B;
560
+ styles = P;
532
561
  /** @internal */
533
562
  get defaultConfig() {
534
563
  return {
@@ -558,41 +587,43 @@ class x extends A {
558
587
  const e = t.querySelector(".tbw-scroll-area") ?? t.querySelector(".tbw-grid-content") ?? t.children[0];
559
588
  if (!e) return;
560
589
  this.footerWrapper && !e.contains(this.footerWrapper) && (this.footerWrapper = null, this.bottomAggregationContainer = null, this.infoBarElement = null), this.topAggregationContainer && !e.contains(this.topAggregationContainer) && (this.topAggregationContainer = null), this.infoBarElement && !e.contains(this.infoBarElement) && (this.infoBarElement = null);
561
- const o = this.getSelectionState(), r = this.getFilterState(), s = E(
590
+ const r = this.getSelectionState(), s = this.getFilterState(), o = E(
562
591
  this.sourceRows,
563
592
  this.columns,
564
593
  this.grid,
565
- o,
566
- r
567
- ), i = this.config.aggregationRows || [], a = i.filter((c) => c.position === "top"), l = i.filter((c) => c.position !== "top");
594
+ r,
595
+ s
596
+ ), i = this.config.aggregationRows || [], a = i.filter((l) => l.position === "top"), d = i.filter((l) => l.position !== "top");
568
597
  if (a.length > 0) {
569
598
  if (!this.topAggregationContainer) {
570
599
  this.topAggregationContainer = C("top");
571
- const c = t.querySelector(".header");
572
- c && c.nextSibling ? e.insertBefore(this.topAggregationContainer, c.nextSibling) : e.appendChild(this.topAggregationContainer);
600
+ const l = t.querySelector(".header");
601
+ l && l.nextSibling ? e.insertBefore(this.topAggregationContainer, l.nextSibling) : e.appendChild(this.topAggregationContainer);
573
602
  }
574
603
  v(
575
604
  this.topAggregationContainer,
576
605
  a,
577
606
  this.visibleColumns,
578
- this.sourceRows
607
+ this.sourceRows,
608
+ this.config.fullWidth
579
609
  );
580
610
  } else this.topAggregationContainer && (this.topAggregationContainer.remove(), this.topAggregationContainer = null);
581
- const u = this.config.showRowCount !== !1 || this.config.showSelectedCount && s.selectedRows > 0 || this.config.showFilteredCount && s.filteredRows !== s.totalRows || this.config.customPanels && this.config.customPanels.length > 0, h = u && this.config.position !== "top", g = l.length > 0 || h;
582
- if (u && this.config.position === "top")
611
+ 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, u = c && this.config.position !== "top", f = d.length > 0 || u;
612
+ if (c && this.config.position === "top")
583
613
  if (!this.infoBarElement)
584
- this.infoBarElement = m(this.config, s), e.insertBefore(this.infoBarElement, e.firstChild);
614
+ this.infoBarElement = m(this.config, o), e.insertBefore(this.infoBarElement, e.firstChild);
585
615
  else {
586
- const c = m(this.config, s);
587
- this.infoBarElement.replaceWith(c), this.infoBarElement = c;
616
+ const l = m(this.config, o);
617
+ this.infoBarElement.replaceWith(l), this.infoBarElement = l;
588
618
  }
589
619
  else this.config.position === "top" && this.infoBarElement && (this.infoBarElement.remove(), this.infoBarElement = null);
590
- g ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", e.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", l.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = C("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), v(
620
+ f ? (this.footerWrapper || (this.footerWrapper = document.createElement("div"), this.footerWrapper.className = "tbw-footer", e.appendChild(this.footerWrapper)), this.footerWrapper.innerHTML = "", d.length > 0 && (this.bottomAggregationContainer || (this.bottomAggregationContainer = C("bottom")), this.footerWrapper.appendChild(this.bottomAggregationContainer), v(
591
621
  this.bottomAggregationContainer,
592
- l,
622
+ d,
593
623
  this.visibleColumns,
594
- this.sourceRows
595
- )), h && (this.infoBarElement = m(this.config, s), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
624
+ this.sourceRows,
625
+ this.config.fullWidth
626
+ )), u && (this.infoBarElement = m(this.config, o), this.footerWrapper.appendChild(this.infoBarElement))) : this.cleanupFooter();
596
627
  }
597
628
  // #endregion
598
629
  // #region Private Methods
@@ -669,6 +700,6 @@ class x extends A {
669
700
  // #endregion
670
701
  }
671
702
  export {
672
- x as PinnedRowsPlugin
703
+ F as PinnedRowsPlugin
673
704
  };
674
705
  //# sourceMappingURL=index.js.map