@toolbox-web/grid 1.14.1 → 1.16.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 (91) hide show
  1. package/README.md +5 -1
  2. package/all.js +2013 -1564
  3. package/all.js.map +1 -1
  4. package/index.js +918 -880
  5. package/index.js.map +1 -1
  6. package/lib/core/grid.d.ts.map +1 -1
  7. package/lib/core/internal/columns.d.ts +0 -5
  8. package/lib/core/internal/columns.d.ts.map +1 -1
  9. package/lib/core/internal/rows.d.ts.map +1 -1
  10. package/lib/core/internal/validate-config.d.ts.map +1 -1
  11. package/lib/core/types.d.ts +12 -0
  12. package/lib/core/types.d.ts.map +1 -1
  13. package/lib/plugins/clipboard/index.js.map +1 -1
  14. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  15. package/lib/plugins/column-virtualization/index.js +1 -1
  16. package/lib/plugins/column-virtualization/index.js.map +1 -1
  17. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +20 -1
  18. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  19. package/lib/plugins/context-menu/index.d.ts +1 -1
  20. package/lib/plugins/context-menu/index.d.ts.map +1 -1
  21. package/lib/plugins/context-menu/index.js +177 -84
  22. package/lib/plugins/context-menu/index.js.map +1 -1
  23. package/lib/plugins/context-menu/menu.d.ts +7 -0
  24. package/lib/plugins/context-menu/menu.d.ts.map +1 -1
  25. package/lib/plugins/context-menu/types.d.ts +48 -2
  26. package/lib/plugins/context-menu/types.d.ts.map +1 -1
  27. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  28. package/lib/plugins/editing/index.js +327 -298
  29. package/lib/plugins/editing/index.js.map +1 -1
  30. package/lib/plugins/export/index.js.map +1 -1
  31. package/lib/plugins/filtering/FilteringPlugin.d.ts +7 -1
  32. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  33. package/lib/plugins/filtering/filter-model.d.ts.map +1 -1
  34. package/lib/plugins/filtering/index.js +173 -138
  35. package/lib/plugins/filtering/index.js.map +1 -1
  36. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +5 -1
  37. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  38. package/lib/plugins/grouping-columns/index.js +242 -109
  39. package/lib/plugins/grouping-columns/index.js.map +1 -1
  40. package/lib/plugins/grouping-columns/types.d.ts +7 -0
  41. package/lib/plugins/grouping-columns/types.d.ts.map +1 -1
  42. package/lib/plugins/grouping-rows/index.js.map +1 -1
  43. package/lib/plugins/master-detail/index.js.map +1 -1
  44. package/lib/plugins/multi-sort/index.js.map +1 -1
  45. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +11 -1
  46. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  47. package/lib/plugins/pinned-columns/index.d.ts +1 -1
  48. package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
  49. package/lib/plugins/pinned-columns/index.js +174 -79
  50. package/lib/plugins/pinned-columns/index.js.map +1 -1
  51. package/lib/plugins/pinned-columns/pinned-columns.d.ts +23 -4
  52. package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +1 -1
  53. package/lib/plugins/pinned-columns/types.d.ts +21 -9
  54. package/lib/plugins/pinned-columns/types.d.ts.map +1 -1
  55. package/lib/plugins/pinned-rows/index.js.map +1 -1
  56. package/lib/plugins/pivot/index.js.map +1 -1
  57. package/lib/plugins/print/index.js.map +1 -1
  58. package/lib/plugins/reorder/index.js.map +1 -1
  59. package/lib/plugins/responsive/index.js.map +1 -1
  60. package/lib/plugins/row-reorder/index.js.map +1 -1
  61. package/lib/plugins/selection/index.js.map +1 -1
  62. package/lib/plugins/server-side/index.js.map +1 -1
  63. package/lib/plugins/tree/index.js.map +1 -1
  64. package/lib/plugins/undo-redo/index.js.map +1 -1
  65. package/lib/plugins/visibility/VisibilityPlugin.d.ts +42 -2
  66. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  67. package/lib/plugins/visibility/index.d.ts +1 -1
  68. package/lib/plugins/visibility/index.d.ts.map +1 -1
  69. package/lib/plugins/visibility/index.js +219 -59
  70. package/lib/plugins/visibility/index.js.map +1 -1
  71. package/lib/plugins/visibility/types.d.ts +25 -0
  72. package/lib/plugins/visibility/types.d.ts.map +1 -1
  73. package/package.json +1 -1
  74. package/umd/grid.all.umd.js +27 -27
  75. package/umd/grid.all.umd.js.map +1 -1
  76. package/umd/grid.umd.js +21 -21
  77. package/umd/grid.umd.js.map +1 -1
  78. package/umd/plugins/column-virtualization.umd.js +1 -1
  79. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  80. package/umd/plugins/context-menu.umd.js +1 -1
  81. package/umd/plugins/context-menu.umd.js.map +1 -1
  82. package/umd/plugins/editing.umd.js +1 -1
  83. package/umd/plugins/editing.umd.js.map +1 -1
  84. package/umd/plugins/filtering.umd.js +1 -1
  85. package/umd/plugins/filtering.umd.js.map +1 -1
  86. package/umd/plugins/grouping-columns.umd.js +1 -1
  87. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  88. package/umd/plugins/pinned-columns.umd.js +1 -1
  89. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  90. package/umd/plugins/visibility.umd.js +1 -1
  91. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -1,4 +1,4 @@
1
- import { BaseGridPlugin, GridElement, PluginManifest } from '../../core/plugin/base-plugin';
1
+ import { BaseGridPlugin, GridElement, PluginManifest, PluginQuery } from '../../core/plugin/base-plugin';
2
2
  import { ColumnState } from '../../core/types';
3
3
  import { FilterConfig, FilterModel } from './types';
4
4
  /**
@@ -145,6 +145,12 @@ export declare class FilteringPlugin extends BaseGridPlugin<FilterConfig> {
145
145
  attach(grid: GridElement): void;
146
146
  /** @internal */
147
147
  detach(): void;
148
+ /**
149
+ * Handle inter-plugin queries.
150
+ * Contributes filter-related items to the header context menu.
151
+ * @internal
152
+ */
153
+ handleQuery(query: PluginQuery): unknown;
148
154
  /** @internal */
149
155
  processRows(rows: readonly unknown[]): unknown[];
150
156
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"FilteringPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/FilteringPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEtG,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIlE,OAAO,KAAK,EAAsB,YAAY,EAAE,WAAW,EAAqB,MAAM,SAAS,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,qBAAa,eAAgB,SAAQ,cAAc,CAAC,YAAY,CAAC;IAC/D;;;OAGG;IACH,gBAAyB,QAAQ,EAAE,cAAc,CAO/C;IAEF,gBAAgB;IAChB,QAAQ,CAAC,IAAI,eAAe;IAC5B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,CAO5D;IAID;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAI1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,QAAQ,CAAuB;IACvC,yGAAyG;IACzG,OAAO,CAAC,eAAe,CAA6E;IACpG,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,kBAAkB,CAA4B;IACtD,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,cAAc,CAAwC;IAC9D,OAAO,CAAC,oBAAoB,CAAgC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G;IACH,OAAO,CAAC,qBAAqB;IAoK7B;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,eAAe;IAiBvB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsD5B;;;OAGG;IACM,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS;IAcxE;;;OAGG;IACM,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;CAuBnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter-model.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/filter-model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAe3C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,UAAQ,GAAG,OAAO,CAiE/G;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,WAAW,EAAE,EACtB,aAAa,UAAQ,GACpB,CAAC,EAAE,CAGL;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CASpE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAetG"}
1
+ {"version":3,"file":"filter-model.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/filter-model.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAe3C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,UAAQ,GAAG,OAAO,CAoE/G;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,WAAW,EAAE,EACtB,aAAa,UAAQ,GACpB,CAAC,EAAE,CAGL;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CASpE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAetG"}
@@ -1,11 +1,11 @@
1
1
  function G(x) {
2
- const { totalRows: e, viewportHeight: t, scrollTop: r, rowHeight: n, overscan: a } = x, s = Math.ceil(t / n);
3
- let u = Math.floor(r / n) - a;
2
+ const { totalRows: e, viewportHeight: t, scrollTop: r, rowHeight: n, overscan: i } = x, l = Math.ceil(t / n);
3
+ let u = Math.floor(r / n) - i;
4
4
  u < 0 && (u = 0);
5
- let i = u + s + a * 2;
6
- return i > e && (i = e), i === e && u > 0 && (u = Math.max(0, i - s - a * 2)), {
5
+ let a = u + l + i * 2;
6
+ return a > e && (a = e), a === e && u > 0 && (u = Math.max(0, a - l - i * 2)), {
7
7
  start: u,
8
- end: i,
8
+ end: a,
9
9
  offsetY: u * n,
10
10
  totalHeight: e * n
11
11
  };
@@ -406,22 +406,26 @@ function j(x, e, t = !1) {
406
406
  return r == null || r === "";
407
407
  if (e.operator === "notBlank")
408
408
  return r != null && r !== "";
409
+ if (e.operator === "notIn")
410
+ return r == null ? !0 : Array.isArray(e.value) && !e.value.includes(r);
411
+ if (e.operator === "in")
412
+ return Array.isArray(e.value) && e.value.includes(r);
409
413
  if (r == null) return !1;
410
- const n = String(r), a = t ? n : n.toLowerCase(), s = t ? String(e.value) : String(e.value).toLowerCase();
414
+ const n = String(r), i = t ? n : n.toLowerCase(), l = t ? String(e.value) : String(e.value).toLowerCase();
411
415
  switch (e.operator) {
412
416
  // Text operators
413
417
  case "contains":
414
- return a.includes(s);
418
+ return i.includes(l);
415
419
  case "notContains":
416
- return !a.includes(s);
420
+ return !i.includes(l);
417
421
  case "equals":
418
- return a === s;
422
+ return i === l;
419
423
  case "notEquals":
420
- return a !== s;
424
+ return i !== l;
421
425
  case "startsWith":
422
- return a.startsWith(s);
426
+ return i.startsWith(l);
423
427
  case "endsWith":
424
- return a.endsWith(s);
428
+ return i.endsWith(l);
425
429
  // Number/Date operators (use toNumeric for Date objects and date strings)
426
430
  case "lessThan":
427
431
  return V(r) < V(e.value);
@@ -433,11 +437,6 @@ function j(x, e, t = !1) {
433
437
  return V(r) >= V(e.value);
434
438
  case "between":
435
439
  return V(r) >= V(e.value) && V(r) <= V(e.valueTo);
436
- // Set operators
437
- case "in":
438
- return Array.isArray(e.value) && e.value.includes(r);
439
- case "notIn":
440
- return Array.isArray(e.value) && !e.value.includes(r);
441
440
  default:
442
441
  return !0;
443
442
  }
@@ -475,6 +474,12 @@ class _ extends W {
475
474
  type: "filter-applied",
476
475
  description: "Emitted when filter criteria change. Subscribers can react to row visibility changes."
477
476
  }
477
+ ],
478
+ queries: [
479
+ {
480
+ type: "getContextMenuItems",
481
+ description: "Contributes filter-related items to the header context menu"
482
+ }
478
483
  ]
479
484
  };
480
485
  /** @internal */
@@ -557,6 +562,36 @@ class _ extends W {
557
562
  this.filters.clear(), this.cachedResult = null, this.cacheKey = null, this.cachedInputSpot = null, this.openPanelField = null, this.panelElement && (this.panelElement.remove(), this.panelElement = null), this.searchText.clear(), this.excludedValues.clear(), this.panelAbortController?.abort(), this.panelAbortController = null;
558
563
  }
559
564
  // #endregion
565
+ // #region Query Handlers
566
+ /**
567
+ * Handle inter-plugin queries.
568
+ * Contributes filter-related items to the header context menu.
569
+ * @internal
570
+ */
571
+ handleQuery(e) {
572
+ if (e.type === "getContextMenuItems") {
573
+ const t = e.context;
574
+ if (!t.isHeader) return;
575
+ const r = t.column;
576
+ if (!r?.field || !this.isFilteringEnabled() || !this.isColumnFilterable(r)) return;
577
+ const n = [], i = this.isFieldFiltered(r.field), l = this.filters.size > 0;
578
+ return i && n.push({
579
+ id: "filtering/clear-column-filter",
580
+ label: "Clear Filter",
581
+ icon: "✕",
582
+ order: 20,
583
+ action: () => this.clearFieldFilter(r.field)
584
+ }), l && n.push({
585
+ id: "filtering/clear-all-filters",
586
+ label: "Clear All Filters",
587
+ icon: "✕",
588
+ order: 21,
589
+ disabled: !l,
590
+ action: () => this.clearAllFilters()
591
+ }), n.length > 0 ? n : void 0;
592
+ }
593
+ }
594
+ // #endregion
560
595
  // #region Hooks
561
596
  /** @internal */
562
597
  processRows(e) {
@@ -569,11 +604,11 @@ class _ extends W {
569
604
  first: e[0],
570
605
  mid: e[Math.floor(e.length / 2)],
571
606
  last: e[e.length - 1]
572
- }, a = this.cachedInputSpot != null && n.len === this.cachedInputSpot.len && n.first === this.cachedInputSpot.first && n.mid === this.cachedInputSpot.mid && n.last === this.cachedInputSpot.last;
573
- if (this.cacheKey === r && this.cachedResult && a)
607
+ }, i = this.cachedInputSpot != null && n.len === this.cachedInputSpot.len && n.first === this.cachedInputSpot.first && n.mid === this.cachedInputSpot.mid && n.last === this.cachedInputSpot.last;
608
+ if (this.cacheKey === r && this.cachedResult && i)
574
609
  return this.cachedResult;
575
- const s = J([...e], t, this.config.caseSensitive);
576
- return this.cachedResult = s, this.cacheKey = r, this.cachedInputSpot = n, s;
610
+ const l = J([...e], t, this.config.caseSensitive);
611
+ return this.cachedResult = l, this.cacheKey = r, this.cachedInputSpot = n, l;
577
612
  }
578
613
  /** @internal */
579
614
  afterRender() {
@@ -582,27 +617,27 @@ class _ extends W {
582
617
  e.querySelectorAll('[part~="header-cell"]').forEach((r) => {
583
618
  const n = r.getAttribute("data-col");
584
619
  if (n === null) return;
585
- const a = this.visibleColumns[parseInt(n, 10)];
586
- if (!a || !this.isColumnFilterable(a) || U(a)) return;
587
- const s = a.field;
588
- if (!s) return;
589
- const u = this.filters.has(s);
590
- let i = r.querySelector(".tbw-filter-btn");
591
- if (i) {
592
- const y = i.classList.contains("active");
593
- if (i.classList.toggle("active", u), r.classList.toggle("filtered", u), y !== u) {
620
+ const i = this.visibleColumns[parseInt(n, 10)];
621
+ if (!i || !this.isColumnFilterable(i) || U(i)) return;
622
+ const l = i.field;
623
+ if (!l) return;
624
+ const u = this.filters.has(l);
625
+ let a = r.querySelector(".tbw-filter-btn");
626
+ if (a) {
627
+ const y = a.classList.contains("active");
628
+ if (a.classList.toggle("active", u), r.classList.toggle("filtered", u), y !== u) {
594
629
  const h = u ? "filterActive" : "filter";
595
- this.setIcon(i, this.resolveIcon(h));
630
+ this.setIcon(a, this.resolveIcon(h));
596
631
  }
597
632
  return;
598
633
  }
599
- i = document.createElement("button"), i.className = "tbw-filter-btn", i.setAttribute("aria-label", `Filter ${a.header ?? s}`);
634
+ a = document.createElement("button"), a.className = "tbw-filter-btn", a.setAttribute("aria-label", `Filter ${i.header ?? l}`);
600
635
  const f = u ? "filterActive" : "filter";
601
- this.setIcon(i, this.resolveIcon(f)), u && (i.classList.add("active"), r.classList.add("filtered")), i.addEventListener("click", (y) => {
602
- y.stopPropagation(), this.toggleFilterPanel(s, a, i);
636
+ this.setIcon(a, this.resolveIcon(f)), u && (a.classList.add("active"), r.classList.add("filtered")), a.addEventListener("click", (y) => {
637
+ y.stopPropagation(), this.toggleFilterPanel(l, i, a);
603
638
  });
604
639
  const N = r.querySelector(".resize-handle");
605
- N ? r.insertBefore(i, N) : r.appendChild(i);
640
+ N ? r.insertBefore(a, N) : r.appendChild(a);
606
641
  });
607
642
  }
608
643
  // #endregion
@@ -728,26 +763,26 @@ class _ extends W {
728
763
  this.closeFilterPanel();
729
764
  const n = document.createElement("div");
730
765
  if (n.className = "tbw-filter-panel", this.copyGridThemeContext(n), this.isAnimationEnabled && n.classList.add("tbw-filter-panel-animated"), this.panelElement = n, this.openPanelField = e, this.config.valuesHandler) {
731
- n.innerHTML = '<div class="tbw-filter-loading">Loading...</div>', document.body.appendChild(n), this.positionPanel(n, r), this.setupPanelCloseHandler(n, r), this.config.valuesHandler(e, t).then((s) => {
732
- this.openPanelField !== e || !this.panelElement || (n.innerHTML = "", this.renderPanelContent(e, t, n, s));
766
+ n.innerHTML = '<div class="tbw-filter-loading">Loading...</div>', document.body.appendChild(n), this.positionPanel(n, r), this.setupPanelCloseHandler(n, r), this.config.valuesHandler(e, t).then((l) => {
767
+ this.openPanelField !== e || !this.panelElement || (n.innerHTML = "", this.renderPanelContent(e, t, n, l));
733
768
  });
734
769
  return;
735
770
  }
736
- const a = O(this.sourceRows, e);
737
- document.body.appendChild(n), this.positionPanel(n, r), this.renderPanelContent(e, t, n, a), this.setupPanelCloseHandler(n, r);
771
+ const i = O(this.sourceRows, e);
772
+ document.body.appendChild(n), this.positionPanel(n, r), this.renderPanelContent(e, t, n, i), this.setupPanelCloseHandler(n, r);
738
773
  }
739
774
  /**
740
775
  * Render filter panel content with given values
741
776
  */
742
777
  renderPanelContent(e, t, r, n) {
743
- let a = this.excludedValues.get(e);
744
- a || (a = /* @__PURE__ */ new Set(), this.excludedValues.set(e, a));
745
- const s = this.searchText.get(e) ?? "", u = {
778
+ let i = this.excludedValues.get(e);
779
+ i || (i = /* @__PURE__ */ new Set(), this.excludedValues.set(e, i));
780
+ const l = this.searchText.get(e) ?? "", u = {
746
781
  field: e,
747
782
  column: t,
748
783
  uniqueValues: n,
749
- excludedValues: a,
750
- searchText: s,
784
+ excludedValues: i,
785
+ searchText: l,
751
786
  applySetFilter: (f) => {
752
787
  this.applySetFilter(e, f), this.closeFilterPanel();
753
788
  },
@@ -759,14 +794,14 @@ class _ extends W {
759
794
  },
760
795
  closePanel: () => this.closeFilterPanel()
761
796
  };
762
- let i = !1;
763
- if (this.config.filterPanelRenderer && (this.config.filterPanelRenderer(r, u), i = r.children.length > 0), !i && t.type) {
797
+ let a = !1;
798
+ if (this.config.filterPanelRenderer && (this.config.filterPanelRenderer(r, u), a = r.children.length > 0), !a && t.type) {
764
799
  const f = this.grid.effectiveConfig.typeDefaults?.[t.type];
765
- f?.filterPanelRenderer && (f.filterPanelRenderer(r, u), i = r.children.length > 0);
800
+ f?.filterPanelRenderer && (f.filterPanelRenderer(r, u), a = r.children.length > 0);
766
801
  }
767
- if (!i) {
802
+ if (!a) {
768
803
  const f = t.type;
769
- f === "number" ? this.renderNumberFilterPanel(r, u, n) : f === "date" ? this.renderDateFilterPanel(r, u, n) : this.renderDefaultFilterPanel(r, u, n, a);
804
+ f === "number" ? this.renderNumberFilterPanel(r, u, n) : f === "date" ? this.renderDateFilterPanel(r, u, n) : this.renderDefaultFilterPanel(r, u, n, i);
770
805
  }
771
806
  }
772
807
  /**
@@ -806,25 +841,25 @@ class _ extends W {
806
841
  const n = t.closest(".cell") ?? t;
807
842
  if (n.style.anchorName = "--tbw-filter-anchor", this.panelAnchorElement = n, _.checkAnchorPositioningSupport()) {
808
843
  requestAnimationFrame(() => {
809
- const s = e.getBoundingClientRect(), u = n.getBoundingClientRect();
810
- s.top < u.top && e.classList.add("tbw-filter-panel-above");
844
+ const l = e.getBoundingClientRect(), u = n.getBoundingClientRect();
845
+ l.top < u.top && e.classList.add("tbw-filter-panel-above");
811
846
  });
812
847
  return;
813
848
  }
814
- const a = n.getBoundingClientRect();
815
- e.style.position = "fixed", e.style.top = `${a.bottom + 4}px`, e.style.left = `${a.left}px`, requestAnimationFrame(() => {
816
- const s = e.getBoundingClientRect();
817
- s.right > window.innerWidth - 8 && (e.style.left = `${a.right - s.width}px`), s.bottom > window.innerHeight - 8 && (e.style.top = `${a.top - s.height - 4}px`, e.classList.add("tbw-filter-panel-above"));
849
+ const i = n.getBoundingClientRect();
850
+ e.style.position = "fixed", e.style.top = `${i.bottom + 4}px`, e.style.left = `${i.left}px`, requestAnimationFrame(() => {
851
+ const l = e.getBoundingClientRect();
852
+ l.right > window.innerWidth - 8 && (e.style.left = `${i.right - l.width}px`), l.bottom > window.innerHeight - 8 && (e.style.top = `${i.top - l.height - 4}px`, e.classList.add("tbw-filter-panel-above"));
818
853
  });
819
854
  }
820
855
  /**
821
856
  * Render the default filter panel content
822
857
  */
823
858
  renderDefaultFilterPanel(e, t, r, n) {
824
- const { field: a } = t, s = this.getListItemHeight(), u = document.createElement("div");
859
+ const { field: i } = t, l = this.getListItemHeight(), u = document.createElement("div");
825
860
  u.className = "tbw-filter-search";
826
- const i = document.createElement("input");
827
- i.type = "text", i.placeholder = "Search...", i.className = "tbw-filter-search-input", i.value = this.searchText.get(a) ?? "", u.appendChild(i), e.appendChild(u);
861
+ const a = document.createElement("input");
862
+ a.type = "text", a.placeholder = "Search...", a.className = "tbw-filter-search-input", a.value = this.searchText.get(i) ?? "", u.appendChild(a), e.appendChild(u);
828
863
  const f = document.createElement("div");
829
864
  f.className = "tbw-filter-actions";
830
865
  const N = document.createElement("label");
@@ -834,95 +869,95 @@ class _ extends W {
834
869
  const h = document.createElement("span");
835
870
  h.textContent = "Select All", N.appendChild(y), N.appendChild(h), f.appendChild(N);
836
871
  const C = () => {
837
- const l = [...F.values()], b = l.every((o) => o), m = l.every((o) => !o);
872
+ const s = [...k.values()], b = s.every((o) => o), m = s.every((o) => !o);
838
873
  y.checked = b, y.indeterminate = !b && !m;
839
874
  };
840
875
  y.addEventListener("change", () => {
841
- const l = y.checked;
842
- for (const b of F.keys())
843
- F.set(b, l);
844
- C(), A();
876
+ const s = y.checked;
877
+ for (const b of k.keys())
878
+ k.set(b, s);
879
+ C(), L();
845
880
  }), e.appendChild(f);
846
- const k = document.createElement("div");
847
- k.className = "tbw-filter-values";
881
+ const F = document.createElement("div");
882
+ F.className = "tbw-filter-values";
848
883
  const w = document.createElement("div");
849
- w.className = "tbw-filter-values-spacer", k.appendChild(w);
884
+ w.className = "tbw-filter-values-spacer", F.appendChild(w);
850
885
  const E = document.createElement("div");
851
- E.className = "tbw-filter-values-content", k.appendChild(E);
852
- const F = /* @__PURE__ */ new Map();
853
- r.forEach((l) => {
854
- const b = l == null ? "__null__" : String(l);
855
- F.set(b, !n.has(l));
886
+ E.className = "tbw-filter-values-content", F.appendChild(E);
887
+ const k = /* @__PURE__ */ new Map();
888
+ r.forEach((s) => {
889
+ const b = s == null ? "__null__" : String(s);
890
+ k.set(b, !n.has(s));
856
891
  }), C();
857
892
  let T = [];
858
- const I = (l, b) => {
859
- const m = l == null ? "(Blank)" : String(l), o = l == null ? "__null__" : String(l), c = document.createElement("label");
893
+ const R = (s, b) => {
894
+ const m = s == null ? "(Blank)" : String(s), o = s == null ? "__null__" : String(s), c = document.createElement("label");
860
895
  c.className = "tbw-filter-value-item", c.style.position = "absolute", c.style.top = `calc(var(--tbw-filter-item-height, 28px) * ${b})`, c.style.left = "0", c.style.right = "0", c.style.boxSizing = "border-box";
861
896
  const g = document.createElement("input");
862
- g.type = "checkbox", g.className = "tbw-filter-checkbox", g.checked = F.get(o) ?? !0, g.dataset.value = o, g.addEventListener("change", () => {
863
- F.set(o, g.checked), C();
897
+ g.type = "checkbox", g.className = "tbw-filter-checkbox", g.checked = k.get(o) ?? !0, g.dataset.value = o, g.addEventListener("change", () => {
898
+ k.set(o, g.checked), C();
864
899
  });
865
900
  const M = document.createElement("span");
866
901
  return M.textContent = m, c.appendChild(g), c.appendChild(M), c;
867
- }, A = () => {
868
- const l = T.length, b = k.clientHeight, m = k.scrollTop;
869
- if (w.style.height = `${l * s}px`, $(l, _.LIST_BYPASS_THRESHOLD / 3)) {
902
+ }, L = () => {
903
+ const s = T.length, b = F.clientHeight, m = F.scrollTop;
904
+ if (w.style.height = `${s * l}px`, $(s, _.LIST_BYPASS_THRESHOLD / 3)) {
870
905
  E.innerHTML = "", E.style.transform = "translateY(0px)", T.forEach((c, g) => {
871
- E.appendChild(I(c, g));
906
+ E.appendChild(R(c, g));
872
907
  });
873
908
  return;
874
909
  }
875
910
  const o = G({
876
- totalRows: l,
911
+ totalRows: s,
877
912
  viewportHeight: b,
878
913
  scrollTop: m,
879
- rowHeight: s,
914
+ rowHeight: l,
880
915
  overscan: _.LIST_OVERSCAN
881
916
  });
882
917
  E.style.transform = `translateY(${o.offsetY}px)`, E.innerHTML = "";
883
918
  for (let c = o.start; c < o.end; c++)
884
- E.appendChild(I(T[c], c - o.start));
885
- }, S = (l) => {
886
- const b = this.config.caseSensitive ?? !1, m = b ? l : l.toLowerCase();
919
+ E.appendChild(R(T[c], c - o.start));
920
+ }, S = (s) => {
921
+ const b = this.config.caseSensitive ?? !1, m = b ? s : s.toLowerCase();
887
922
  if (T = r.filter((o) => {
888
923
  const c = o == null ? "(Blank)" : String(o), g = b ? c : c.toLowerCase();
889
- return !l || g.includes(m);
924
+ return !s || g.includes(m);
890
925
  }), T.length === 0) {
891
926
  w.style.height = "0px", E.innerHTML = "";
892
927
  const o = document.createElement("div");
893
928
  o.className = "tbw-filter-no-match", o.textContent = "No matching values", E.appendChild(o);
894
929
  return;
895
930
  }
896
- A();
931
+ L();
897
932
  };
898
- k.addEventListener(
933
+ F.addEventListener(
899
934
  "scroll",
900
935
  () => {
901
- T.length > 0 && A();
936
+ T.length > 0 && L();
902
937
  },
903
938
  { passive: !0 }
904
- ), S(i.value), e.appendChild(k);
905
- let R;
906
- i.addEventListener("input", () => {
907
- clearTimeout(R), R = setTimeout(() => {
908
- this.searchText.set(a, i.value), S(i.value);
939
+ ), S(a.value), e.appendChild(F);
940
+ let I;
941
+ a.addEventListener("input", () => {
942
+ clearTimeout(I), I = setTimeout(() => {
943
+ this.searchText.set(i, a.value), S(a.value);
909
944
  }, this.config.debounceMs ?? 150);
910
945
  });
911
946
  const P = document.createElement("div");
912
947
  P.className = "tbw-filter-buttons";
913
- const L = document.createElement("button");
914
- L.className = "tbw-filter-apply-btn", L.textContent = "Apply", L.addEventListener("click", () => {
915
- const l = [];
916
- for (const [b, m] of F)
948
+ const A = document.createElement("button");
949
+ A.className = "tbw-filter-apply-btn", A.textContent = "Apply", A.addEventListener("click", () => {
950
+ const s = [];
951
+ for (const [b, m] of k)
917
952
  if (!m)
918
953
  if (b === "__null__")
919
- l.push(null);
954
+ s.push(null);
920
955
  else {
921
956
  const o = r.find((c) => String(c) === b);
922
- l.push(o !== void 0 ? o : b);
957
+ s.push(o !== void 0 ? o : b);
923
958
  }
924
- t.applySetFilter(l);
925
- }), P.appendChild(L);
959
+ t.applySetFilter(s);
960
+ }), P.appendChild(A);
926
961
  const v = document.createElement("button");
927
962
  v.className = "tbw-filter-clear-btn", v.textContent = "Clear Filter", v.addEventListener("click", () => {
928
963
  t.clearFilter();
@@ -932,42 +967,42 @@ class _ extends W {
932
967
  * Render a number range filter panel with min/max inputs and slider
933
968
  */
934
969
  renderNumberFilterPanel(e, t, r) {
935
- const { field: n, column: a } = t, s = a.filterParams, u = a.editorParams, i = (p, D) => {
970
+ const { field: n, column: i } = t, l = i.filterParams, u = i.editorParams, a = (p, D) => {
936
971
  if (typeof p == "number") return p;
937
972
  if (typeof p == "string") {
938
973
  const z = parseFloat(p);
939
974
  return isNaN(z) ? D : z;
940
975
  }
941
976
  return D;
942
- }, f = r.filter((p) => typeof p == "number" && !isNaN(p)), N = f.length > 0 ? Math.min(...f) : 0, y = f.length > 0 ? Math.max(...f) : 100, h = i(s?.min ?? u?.min, N), C = i(s?.max ?? u?.max, y), k = s?.step ?? u?.step ?? 1, w = this.filters.get(n);
943
- let E = h, F = C;
944
- w?.operator === "between" ? (E = i(w.value, h), F = i(w.valueTo, C)) : w?.operator === "greaterThanOrEqual" ? E = i(w.value, h) : w?.operator === "lessThanOrEqual" && (F = i(w.value, C));
977
+ }, f = r.filter((p) => typeof p == "number" && !isNaN(p)), N = f.length > 0 ? Math.min(...f) : 0, y = f.length > 0 ? Math.max(...f) : 100, h = a(l?.min ?? u?.min, N), C = a(l?.max ?? u?.max, y), F = l?.step ?? u?.step ?? 1, w = this.filters.get(n);
978
+ let E = h, k = C;
979
+ w?.operator === "between" ? (E = a(w.value, h), k = a(w.valueTo, C)) : w?.operator === "greaterThanOrEqual" ? E = a(w.value, h) : w?.operator === "lessThanOrEqual" && (k = a(w.value, C));
945
980
  const T = document.createElement("div");
946
981
  T.className = "tbw-filter-range-inputs";
947
- const I = document.createElement("div");
948
- I.className = "tbw-filter-range-group";
949
- const A = document.createElement("label");
950
- A.textContent = "Min", A.className = "tbw-filter-range-label";
982
+ const R = document.createElement("div");
983
+ R.className = "tbw-filter-range-group";
984
+ const L = document.createElement("label");
985
+ L.textContent = "Min", L.className = "tbw-filter-range-label";
951
986
  const S = document.createElement("input");
952
- S.type = "number", S.className = "tbw-filter-range-input", S.min = String(h), S.max = String(C), S.step = String(k), S.value = String(E), I.appendChild(A), I.appendChild(S), T.appendChild(I);
953
- const R = document.createElement("span");
954
- R.className = "tbw-filter-range-separator", R.textContent = "–", T.appendChild(R);
987
+ S.type = "number", S.className = "tbw-filter-range-input", S.min = String(h), S.max = String(C), S.step = String(F), S.value = String(E), R.appendChild(L), R.appendChild(S), T.appendChild(R);
988
+ const I = document.createElement("span");
989
+ I.className = "tbw-filter-range-separator", I.textContent = "–", T.appendChild(I);
955
990
  const P = document.createElement("div");
956
991
  P.className = "tbw-filter-range-group";
957
- const L = document.createElement("label");
958
- L.textContent = "Max", L.className = "tbw-filter-range-label";
992
+ const A = document.createElement("label");
993
+ A.textContent = "Max", A.className = "tbw-filter-range-label";
959
994
  const v = document.createElement("input");
960
- v.type = "number", v.className = "tbw-filter-range-input", v.min = String(h), v.max = String(C), v.step = String(k), v.value = String(F), P.appendChild(L), P.appendChild(v), T.appendChild(P), e.appendChild(T);
961
- const l = document.createElement("div");
962
- l.className = "tbw-filter-range-slider";
995
+ v.type = "number", v.className = "tbw-filter-range-input", v.min = String(h), v.max = String(C), v.step = String(F), v.value = String(k), P.appendChild(A), P.appendChild(v), T.appendChild(P), e.appendChild(T);
996
+ const s = document.createElement("div");
997
+ s.className = "tbw-filter-range-slider";
963
998
  const b = document.createElement("div");
964
999
  b.className = "tbw-filter-range-track";
965
1000
  const m = document.createElement("div");
966
1001
  m.className = "tbw-filter-range-fill";
967
1002
  const o = document.createElement("input");
968
- o.type = "range", o.className = "tbw-filter-range-thumb tbw-filter-range-thumb-min", o.min = String(h), o.max = String(C), o.step = String(k), o.value = String(E);
1003
+ o.type = "range", o.className = "tbw-filter-range-thumb tbw-filter-range-thumb-min", o.min = String(h), o.max = String(C), o.step = String(F), o.value = String(E);
969
1004
  const c = document.createElement("input");
970
- c.type = "range", c.className = "tbw-filter-range-thumb tbw-filter-range-thumb-max", c.min = String(h), c.max = String(C), c.step = String(k), c.value = String(F), l.appendChild(b), l.appendChild(m), l.appendChild(o), l.appendChild(c), e.appendChild(l);
1005
+ c.type = "range", c.className = "tbw-filter-range-thumb tbw-filter-range-thumb-max", c.min = String(h), c.max = String(C), c.step = String(F), c.value = String(k), s.appendChild(b), s.appendChild(m), s.appendChild(o), s.appendChild(c), e.appendChild(s);
971
1006
  const g = () => {
972
1007
  const p = parseFloat(o.value), D = parseFloat(c.value), z = C - h, q = (p - h) / z * 100, Y = (D - h) / z * 100;
973
1008
  m.style.left = `${q}%`, m.style.width = `${Y - q}%`;
@@ -1001,26 +1036,26 @@ class _ extends W {
1001
1036
  * Render a date range filter panel with from/to date inputs
1002
1037
  */
1003
1038
  renderDateFilterPanel(e, t, r) {
1004
- const { field: n, column: a } = t, s = a.filterParams, u = a.editorParams, i = r.filter((d) => d instanceof Date || typeof d == "string" && !isNaN(Date.parse(d))).map((d) => d instanceof Date ? d : new Date(d)).filter((d) => !isNaN(d.getTime())), f = i.length > 0 ? new Date(Math.min(...i.map((d) => d.getTime()))) : null, N = i.length > 0 ? new Date(Math.max(...i.map((d) => d.getTime()))) : null, y = (d) => d ? d.toISOString().split("T")[0] : "", h = (d) => d ? typeof d == "string" ? d : typeof d == "number" ? y(new Date(d)) : "" : "", C = h(s?.min) || h(u?.min) || y(f), k = h(s?.max) || h(u?.max) || y(N), w = this.filters.get(n);
1005
- let E = "", F = "";
1039
+ const { field: n, column: i } = t, l = i.filterParams, u = i.editorParams, a = r.filter((d) => d instanceof Date || typeof d == "string" && !isNaN(Date.parse(d))).map((d) => d instanceof Date ? d : new Date(d)).filter((d) => !isNaN(d.getTime())), f = a.length > 0 ? new Date(Math.min(...a.map((d) => d.getTime()))) : null, N = a.length > 0 ? new Date(Math.max(...a.map((d) => d.getTime()))) : null, y = (d) => d ? d.toISOString().split("T")[0] : "", h = (d) => d ? typeof d == "string" ? d : typeof d == "number" ? y(new Date(d)) : "" : "", C = h(l?.min) || h(u?.min) || y(f), F = h(l?.max) || h(u?.max) || y(N), w = this.filters.get(n);
1040
+ let E = "", k = "";
1006
1041
  const T = w?.operator === "blank";
1007
- w?.operator === "between" ? (E = h(w.value) || "", F = h(w.valueTo) || "") : w?.operator === "greaterThanOrEqual" ? E = h(w.value) || "" : w?.operator === "lessThanOrEqual" && (F = h(w.value) || "");
1008
- const I = document.createElement("div");
1009
- I.className = "tbw-filter-date-range";
1010
- const A = document.createElement("div");
1011
- A.className = "tbw-filter-date-group";
1042
+ w?.operator === "between" ? (E = h(w.value) || "", k = h(w.valueTo) || "") : w?.operator === "greaterThanOrEqual" ? E = h(w.value) || "" : w?.operator === "lessThanOrEqual" && (k = h(w.value) || "");
1043
+ const R = document.createElement("div");
1044
+ R.className = "tbw-filter-date-range";
1045
+ const L = document.createElement("div");
1046
+ L.className = "tbw-filter-date-group";
1012
1047
  const S = document.createElement("label");
1013
1048
  S.textContent = "From", S.className = "tbw-filter-range-label";
1014
- const R = document.createElement("input");
1015
- R.type = "date", R.className = "tbw-filter-date-input", C && (R.min = C), k && (R.max = k), R.value = E, A.appendChild(S), A.appendChild(R), I.appendChild(A);
1049
+ const I = document.createElement("input");
1050
+ I.type = "date", I.className = "tbw-filter-date-input", C && (I.min = C), F && (I.max = F), I.value = E, L.appendChild(S), L.appendChild(I), R.appendChild(L);
1016
1051
  const P = document.createElement("span");
1017
- P.className = "tbw-filter-range-separator", P.textContent = "–", I.appendChild(P);
1018
- const L = document.createElement("div");
1019
- L.className = "tbw-filter-date-group";
1052
+ P.className = "tbw-filter-range-separator", P.textContent = "–", R.appendChild(P);
1053
+ const A = document.createElement("div");
1054
+ A.className = "tbw-filter-date-group";
1020
1055
  const v = document.createElement("label");
1021
1056
  v.textContent = "To", v.className = "tbw-filter-range-label";
1022
- const l = document.createElement("input");
1023
- l.type = "date", l.className = "tbw-filter-date-input", C && (l.min = C), k && (l.max = k), l.value = F, L.appendChild(v), L.appendChild(l), I.appendChild(L), e.appendChild(I);
1057
+ const s = document.createElement("input");
1058
+ s.type = "date", s.className = "tbw-filter-date-input", C && (s.min = C), F && (s.max = F), s.value = k, A.appendChild(v), A.appendChild(s), R.appendChild(A), e.appendChild(R);
1024
1059
  const b = document.createElement("label");
1025
1060
  b.className = "tbw-filter-blank-option";
1026
1061
  const m = document.createElement("input");
@@ -1028,7 +1063,7 @@ class _ extends W {
1028
1063
  const o = document.createTextNode("Show only blank");
1029
1064
  b.appendChild(m), b.appendChild(o);
1030
1065
  const c = (d) => {
1031
- R.disabled = d, l.disabled = d, I.classList.toggle("tbw-filter-disabled", d);
1066
+ I.disabled = d, s.disabled = d, R.classList.toggle("tbw-filter-disabled", d);
1032
1067
  };
1033
1068
  c(T), m.addEventListener("change", () => {
1034
1069
  c(m.checked);
@@ -1041,7 +1076,7 @@ class _ extends W {
1041
1076
  t.applyTextFilter("blank", "");
1042
1077
  return;
1043
1078
  }
1044
- const d = R.value, p = l.value;
1079
+ const d = I.value, p = s.value;
1045
1080
  d && p ? t.applyTextFilter("between", d, p) : d ? t.applyTextFilter("greaterThanOrEqual", d) : p ? t.applyTextFilter("lessThanOrEqual", p) : t.clearFilter();
1046
1081
  }), g.appendChild(M);
1047
1082
  const H = document.createElement("button");
@@ -1081,10 +1116,10 @@ class _ extends W {
1081
1116
  if (this.config.filterHandler) {
1082
1117
  const t = this.grid;
1083
1118
  t.setAttribute("aria-busy", "true");
1084
- const r = this.config.filterHandler(e, this.sourceRows), n = (a) => {
1085
- t.removeAttribute("aria-busy"), this.cachedResult = a, this.grid.rows = a, this.emit("filter-change", {
1119
+ const r = this.config.filterHandler(e, this.sourceRows), n = (i) => {
1120
+ t.removeAttribute("aria-busy"), this.cachedResult = i, this.grid.rows = i, this.emit("filter-change", {
1086
1121
  filters: e,
1087
- filteredRowCount: a.length
1122
+ filteredRowCount: i.length
1088
1123
  }), this.emitPluginEvent("filter-applied", { filters: e }), this.requestRender();
1089
1124
  };
1090
1125
  r && typeof r.then == "function" ? r.then(n) : n(r);