@toolbox-web/grid 1.14.1 → 1.15.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 (70) hide show
  1. package/README.md +5 -1
  2. package/all.js +1985 -1558
  3. package/all.js.map +1 -1
  4. package/index.js +46 -20
  5. package/index.js.map +1 -1
  6. package/lib/core/grid.d.ts.map +1 -1
  7. package/lib/core/internal/validate-config.d.ts.map +1 -1
  8. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  9. package/lib/plugins/column-virtualization/index.js +1 -1
  10. package/lib/plugins/column-virtualization/index.js.map +1 -1
  11. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +20 -1
  12. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  13. package/lib/plugins/context-menu/index.d.ts +1 -1
  14. package/lib/plugins/context-menu/index.d.ts.map +1 -1
  15. package/lib/plugins/context-menu/index.js +153 -70
  16. package/lib/plugins/context-menu/index.js.map +1 -1
  17. package/lib/plugins/context-menu/menu.d.ts +7 -0
  18. package/lib/plugins/context-menu/menu.d.ts.map +1 -1
  19. package/lib/plugins/context-menu/types.d.ts +46 -0
  20. package/lib/plugins/context-menu/types.d.ts.map +1 -1
  21. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  22. package/lib/plugins/editing/index.js +214 -197
  23. package/lib/plugins/editing/index.js.map +1 -1
  24. package/lib/plugins/filtering/FilteringPlugin.d.ts +7 -1
  25. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  26. package/lib/plugins/filtering/index.js +169 -133
  27. package/lib/plugins/filtering/index.js.map +1 -1
  28. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +5 -1
  29. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  30. package/lib/plugins/grouping-columns/index.js +242 -109
  31. package/lib/plugins/grouping-columns/index.js.map +1 -1
  32. package/lib/plugins/grouping-columns/types.d.ts +7 -0
  33. package/lib/plugins/grouping-columns/types.d.ts.map +1 -1
  34. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +11 -1
  35. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  36. package/lib/plugins/pinned-columns/index.d.ts +1 -1
  37. package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
  38. package/lib/plugins/pinned-columns/index.js +174 -79
  39. package/lib/plugins/pinned-columns/index.js.map +1 -1
  40. package/lib/plugins/pinned-columns/pinned-columns.d.ts +23 -4
  41. package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +1 -1
  42. package/lib/plugins/pinned-columns/types.d.ts +21 -9
  43. package/lib/plugins/pinned-columns/types.d.ts.map +1 -1
  44. package/lib/plugins/visibility/VisibilityPlugin.d.ts +42 -2
  45. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  46. package/lib/plugins/visibility/index.d.ts +1 -1
  47. package/lib/plugins/visibility/index.d.ts.map +1 -1
  48. package/lib/plugins/visibility/index.js +219 -59
  49. package/lib/plugins/visibility/index.js.map +1 -1
  50. package/lib/plugins/visibility/types.d.ts +25 -0
  51. package/lib/plugins/visibility/types.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/umd/grid.all.umd.js +25 -25
  54. package/umd/grid.all.umd.js.map +1 -1
  55. package/umd/grid.umd.js +2 -2
  56. package/umd/grid.umd.js.map +1 -1
  57. package/umd/plugins/column-virtualization.umd.js +1 -1
  58. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  59. package/umd/plugins/context-menu.umd.js +1 -1
  60. package/umd/plugins/context-menu.umd.js.map +1 -1
  61. package/umd/plugins/editing.umd.js +1 -1
  62. package/umd/plugins/editing.umd.js.map +1 -1
  63. package/umd/plugins/filtering.umd.js +1 -1
  64. package/umd/plugins/filtering.umd.js.map +1 -1
  65. package/umd/plugins/grouping-columns.umd.js +1 -1
  66. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  67. package/umd/plugins/pinned-columns.umd.js +1 -1
  68. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  69. package/umd/plugins/visibility.umd.js +1 -1
  70. 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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eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE;IAOzC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAkDzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAmE1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiBxB,qDAAqD;IACrD,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAwB;IAEhE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAO5C;;;OAGG;IACH,OAAO,CAAC,aAAa;IAgDrB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAuPhC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgM/B;;OAEG;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,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
  };
@@ -407,21 +407,21 @@ function j(x, e, t = !1) {
407
407
  if (e.operator === "notBlank")
408
408
  return r != null && r !== "";
409
409
  if (r == null) return !1;
410
- const n = String(r), a = t ? n : n.toLowerCase(), s = t ? String(e.value) : String(e.value).toLowerCase();
410
+ const n = String(r), i = t ? n : n.toLowerCase(), l = t ? String(e.value) : String(e.value).toLowerCase();
411
411
  switch (e.operator) {
412
412
  // Text operators
413
413
  case "contains":
414
- return a.includes(s);
414
+ return i.includes(l);
415
415
  case "notContains":
416
- return !a.includes(s);
416
+ return !i.includes(l);
417
417
  case "equals":
418
- return a === s;
418
+ return i === l;
419
419
  case "notEquals":
420
- return a !== s;
420
+ return i !== l;
421
421
  case "startsWith":
422
- return a.startsWith(s);
422
+ return i.startsWith(l);
423
423
  case "endsWith":
424
- return a.endsWith(s);
424
+ return i.endsWith(l);
425
425
  // Number/Date operators (use toNumeric for Date objects and date strings)
426
426
  case "lessThan":
427
427
  return V(r) < V(e.value);
@@ -475,6 +475,12 @@ class _ extends W {
475
475
  type: "filter-applied",
476
476
  description: "Emitted when filter criteria change. Subscribers can react to row visibility changes."
477
477
  }
478
+ ],
479
+ queries: [
480
+ {
481
+ type: "getContextMenuItems",
482
+ description: "Contributes filter-related items to the header context menu"
483
+ }
478
484
  ]
479
485
  };
480
486
  /** @internal */
@@ -557,6 +563,36 @@ class _ extends W {
557
563
  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
564
  }
559
565
  // #endregion
566
+ // #region Query Handlers
567
+ /**
568
+ * Handle inter-plugin queries.
569
+ * Contributes filter-related items to the header context menu.
570
+ * @internal
571
+ */
572
+ handleQuery(e) {
573
+ if (e.type === "getContextMenuItems") {
574
+ const t = e.context;
575
+ if (!t.isHeader) return;
576
+ const r = t.column;
577
+ if (!r?.field || !this.isFilteringEnabled() || !this.isColumnFilterable(r)) return;
578
+ const n = [], i = this.isFieldFiltered(r.field), l = this.filters.size > 0;
579
+ return i && n.push({
580
+ id: "filtering/clear-column-filter",
581
+ label: "Clear Filter",
582
+ icon: "✕",
583
+ order: 20,
584
+ action: () => this.clearFieldFilter(r.field)
585
+ }), l && n.push({
586
+ id: "filtering/clear-all-filters",
587
+ label: "Clear All Filters",
588
+ icon: "✕",
589
+ order: 21,
590
+ disabled: !l,
591
+ action: () => this.clearAllFilters()
592
+ }), n.length > 0 ? n : void 0;
593
+ }
594
+ }
595
+ // #endregion
560
596
  // #region Hooks
561
597
  /** @internal */
562
598
  processRows(e) {
@@ -569,11 +605,11 @@ class _ extends W {
569
605
  first: e[0],
570
606
  mid: e[Math.floor(e.length / 2)],
571
607
  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)
608
+ }, i = this.cachedInputSpot != null && n.len === this.cachedInputSpot.len && n.first === this.cachedInputSpot.first && n.mid === this.cachedInputSpot.mid && n.last === this.cachedInputSpot.last;
609
+ if (this.cacheKey === r && this.cachedResult && i)
574
610
  return this.cachedResult;
575
- const s = J([...e], t, this.config.caseSensitive);
576
- return this.cachedResult = s, this.cacheKey = r, this.cachedInputSpot = n, s;
611
+ const l = J([...e], t, this.config.caseSensitive);
612
+ return this.cachedResult = l, this.cacheKey = r, this.cachedInputSpot = n, l;
577
613
  }
578
614
  /** @internal */
579
615
  afterRender() {
@@ -582,27 +618,27 @@ class _ extends W {
582
618
  e.querySelectorAll('[part~="header-cell"]').forEach((r) => {
583
619
  const n = r.getAttribute("data-col");
584
620
  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) {
621
+ const i = this.visibleColumns[parseInt(n, 10)];
622
+ if (!i || !this.isColumnFilterable(i) || U(i)) return;
623
+ const l = i.field;
624
+ if (!l) return;
625
+ const u = this.filters.has(l);
626
+ let a = r.querySelector(".tbw-filter-btn");
627
+ if (a) {
628
+ const y = a.classList.contains("active");
629
+ if (a.classList.toggle("active", u), r.classList.toggle("filtered", u), y !== u) {
594
630
  const h = u ? "filterActive" : "filter";
595
- this.setIcon(i, this.resolveIcon(h));
631
+ this.setIcon(a, this.resolveIcon(h));
596
632
  }
597
633
  return;
598
634
  }
599
- i = document.createElement("button"), i.className = "tbw-filter-btn", i.setAttribute("aria-label", `Filter ${a.header ?? s}`);
635
+ a = document.createElement("button"), a.className = "tbw-filter-btn", a.setAttribute("aria-label", `Filter ${i.header ?? l}`);
600
636
  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);
637
+ this.setIcon(a, this.resolveIcon(f)), u && (a.classList.add("active"), r.classList.add("filtered")), a.addEventListener("click", (y) => {
638
+ y.stopPropagation(), this.toggleFilterPanel(l, i, a);
603
639
  });
604
640
  const N = r.querySelector(".resize-handle");
605
- N ? r.insertBefore(i, N) : r.appendChild(i);
641
+ N ? r.insertBefore(a, N) : r.appendChild(a);
606
642
  });
607
643
  }
608
644
  // #endregion
@@ -728,26 +764,26 @@ class _ extends W {
728
764
  this.closeFilterPanel();
729
765
  const n = document.createElement("div");
730
766
  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));
767
+ 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) => {
768
+ this.openPanelField !== e || !this.panelElement || (n.innerHTML = "", this.renderPanelContent(e, t, n, l));
733
769
  });
734
770
  return;
735
771
  }
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);
772
+ const i = O(this.sourceRows, e);
773
+ document.body.appendChild(n), this.positionPanel(n, r), this.renderPanelContent(e, t, n, i), this.setupPanelCloseHandler(n, r);
738
774
  }
739
775
  /**
740
776
  * Render filter panel content with given values
741
777
  */
742
778
  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 = {
779
+ let i = this.excludedValues.get(e);
780
+ i || (i = /* @__PURE__ */ new Set(), this.excludedValues.set(e, i));
781
+ const l = this.searchText.get(e) ?? "", u = {
746
782
  field: e,
747
783
  column: t,
748
784
  uniqueValues: n,
749
- excludedValues: a,
750
- searchText: s,
785
+ excludedValues: i,
786
+ searchText: l,
751
787
  applySetFilter: (f) => {
752
788
  this.applySetFilter(e, f), this.closeFilterPanel();
753
789
  },
@@ -759,14 +795,14 @@ class _ extends W {
759
795
  },
760
796
  closePanel: () => this.closeFilterPanel()
761
797
  };
762
- let i = !1;
763
- if (this.config.filterPanelRenderer && (this.config.filterPanelRenderer(r, u), i = r.children.length > 0), !i && t.type) {
798
+ let a = !1;
799
+ if (this.config.filterPanelRenderer && (this.config.filterPanelRenderer(r, u), a = r.children.length > 0), !a && t.type) {
764
800
  const f = this.grid.effectiveConfig.typeDefaults?.[t.type];
765
- f?.filterPanelRenderer && (f.filterPanelRenderer(r, u), i = r.children.length > 0);
801
+ f?.filterPanelRenderer && (f.filterPanelRenderer(r, u), a = r.children.length > 0);
766
802
  }
767
- if (!i) {
803
+ if (!a) {
768
804
  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);
805
+ f === "number" ? this.renderNumberFilterPanel(r, u, n) : f === "date" ? this.renderDateFilterPanel(r, u, n) : this.renderDefaultFilterPanel(r, u, n, i);
770
806
  }
771
807
  }
772
808
  /**
@@ -806,25 +842,25 @@ class _ extends W {
806
842
  const n = t.closest(".cell") ?? t;
807
843
  if (n.style.anchorName = "--tbw-filter-anchor", this.panelAnchorElement = n, _.checkAnchorPositioningSupport()) {
808
844
  requestAnimationFrame(() => {
809
- const s = e.getBoundingClientRect(), u = n.getBoundingClientRect();
810
- s.top < u.top && e.classList.add("tbw-filter-panel-above");
845
+ const l = e.getBoundingClientRect(), u = n.getBoundingClientRect();
846
+ l.top < u.top && e.classList.add("tbw-filter-panel-above");
811
847
  });
812
848
  return;
813
849
  }
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"));
850
+ const i = n.getBoundingClientRect();
851
+ e.style.position = "fixed", e.style.top = `${i.bottom + 4}px`, e.style.left = `${i.left}px`, requestAnimationFrame(() => {
852
+ const l = e.getBoundingClientRect();
853
+ 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
854
  });
819
855
  }
820
856
  /**
821
857
  * Render the default filter panel content
822
858
  */
823
859
  renderDefaultFilterPanel(e, t, r, n) {
824
- const { field: a } = t, s = this.getListItemHeight(), u = document.createElement("div");
860
+ const { field: i } = t, l = this.getListItemHeight(), u = document.createElement("div");
825
861
  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);
862
+ const a = document.createElement("input");
863
+ 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
864
  const f = document.createElement("div");
829
865
  f.className = "tbw-filter-actions";
830
866
  const N = document.createElement("label");
@@ -834,95 +870,95 @@ class _ extends W {
834
870
  const h = document.createElement("span");
835
871
  h.textContent = "Select All", N.appendChild(y), N.appendChild(h), f.appendChild(N);
836
872
  const C = () => {
837
- const l = [...F.values()], b = l.every((o) => o), m = l.every((o) => !o);
873
+ const s = [...k.values()], b = s.every((o) => o), m = s.every((o) => !o);
838
874
  y.checked = b, y.indeterminate = !b && !m;
839
875
  };
840
876
  y.addEventListener("change", () => {
841
- const l = y.checked;
842
- for (const b of F.keys())
843
- F.set(b, l);
844
- C(), A();
877
+ const s = y.checked;
878
+ for (const b of k.keys())
879
+ k.set(b, s);
880
+ C(), L();
845
881
  }), e.appendChild(f);
846
- const k = document.createElement("div");
847
- k.className = "tbw-filter-values";
882
+ const F = document.createElement("div");
883
+ F.className = "tbw-filter-values";
848
884
  const w = document.createElement("div");
849
- w.className = "tbw-filter-values-spacer", k.appendChild(w);
885
+ w.className = "tbw-filter-values-spacer", F.appendChild(w);
850
886
  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));
887
+ E.className = "tbw-filter-values-content", F.appendChild(E);
888
+ const k = /* @__PURE__ */ new Map();
889
+ r.forEach((s) => {
890
+ const b = s == null ? "__null__" : String(s);
891
+ k.set(b, !n.has(s));
856
892
  }), C();
857
893
  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");
894
+ const R = (s, b) => {
895
+ const m = s == null ? "(Blank)" : String(s), o = s == null ? "__null__" : String(s), c = document.createElement("label");
860
896
  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
897
  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();
898
+ g.type = "checkbox", g.className = "tbw-filter-checkbox", g.checked = k.get(o) ?? !0, g.dataset.value = o, g.addEventListener("change", () => {
899
+ k.set(o, g.checked), C();
864
900
  });
865
901
  const M = document.createElement("span");
866
902
  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)) {
903
+ }, L = () => {
904
+ const s = T.length, b = F.clientHeight, m = F.scrollTop;
905
+ if (w.style.height = `${s * l}px`, $(s, _.LIST_BYPASS_THRESHOLD / 3)) {
870
906
  E.innerHTML = "", E.style.transform = "translateY(0px)", T.forEach((c, g) => {
871
- E.appendChild(I(c, g));
907
+ E.appendChild(R(c, g));
872
908
  });
873
909
  return;
874
910
  }
875
911
  const o = G({
876
- totalRows: l,
912
+ totalRows: s,
877
913
  viewportHeight: b,
878
914
  scrollTop: m,
879
- rowHeight: s,
915
+ rowHeight: l,
880
916
  overscan: _.LIST_OVERSCAN
881
917
  });
882
918
  E.style.transform = `translateY(${o.offsetY}px)`, E.innerHTML = "";
883
919
  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();
920
+ E.appendChild(R(T[c], c - o.start));
921
+ }, S = (s) => {
922
+ const b = this.config.caseSensitive ?? !1, m = b ? s : s.toLowerCase();
887
923
  if (T = r.filter((o) => {
888
924
  const c = o == null ? "(Blank)" : String(o), g = b ? c : c.toLowerCase();
889
- return !l || g.includes(m);
925
+ return !s || g.includes(m);
890
926
  }), T.length === 0) {
891
927
  w.style.height = "0px", E.innerHTML = "";
892
928
  const o = document.createElement("div");
893
929
  o.className = "tbw-filter-no-match", o.textContent = "No matching values", E.appendChild(o);
894
930
  return;
895
931
  }
896
- A();
932
+ L();
897
933
  };
898
- k.addEventListener(
934
+ F.addEventListener(
899
935
  "scroll",
900
936
  () => {
901
- T.length > 0 && A();
937
+ T.length > 0 && L();
902
938
  },
903
939
  { 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);
940
+ ), S(a.value), e.appendChild(F);
941
+ let I;
942
+ a.addEventListener("input", () => {
943
+ clearTimeout(I), I = setTimeout(() => {
944
+ this.searchText.set(i, a.value), S(a.value);
909
945
  }, this.config.debounceMs ?? 150);
910
946
  });
911
947
  const P = document.createElement("div");
912
948
  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)
949
+ const A = document.createElement("button");
950
+ A.className = "tbw-filter-apply-btn", A.textContent = "Apply", A.addEventListener("click", () => {
951
+ const s = [];
952
+ for (const [b, m] of k)
917
953
  if (!m)
918
954
  if (b === "__null__")
919
- l.push(null);
955
+ s.push(null);
920
956
  else {
921
957
  const o = r.find((c) => String(c) === b);
922
- l.push(o !== void 0 ? o : b);
958
+ s.push(o !== void 0 ? o : b);
923
959
  }
924
- t.applySetFilter(l);
925
- }), P.appendChild(L);
960
+ t.applySetFilter(s);
961
+ }), P.appendChild(A);
926
962
  const v = document.createElement("button");
927
963
  v.className = "tbw-filter-clear-btn", v.textContent = "Clear Filter", v.addEventListener("click", () => {
928
964
  t.clearFilter();
@@ -932,42 +968,42 @@ class _ extends W {
932
968
  * Render a number range filter panel with min/max inputs and slider
933
969
  */
934
970
  renderNumberFilterPanel(e, t, r) {
935
- const { field: n, column: a } = t, s = a.filterParams, u = a.editorParams, i = (p, D) => {
971
+ const { field: n, column: i } = t, l = i.filterParams, u = i.editorParams, a = (p, D) => {
936
972
  if (typeof p == "number") return p;
937
973
  if (typeof p == "string") {
938
974
  const z = parseFloat(p);
939
975
  return isNaN(z) ? D : z;
940
976
  }
941
977
  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));
978
+ }, 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);
979
+ let E = h, k = C;
980
+ 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
981
  const T = document.createElement("div");
946
982
  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";
983
+ const R = document.createElement("div");
984
+ R.className = "tbw-filter-range-group";
985
+ const L = document.createElement("label");
986
+ L.textContent = "Min", L.className = "tbw-filter-range-label";
951
987
  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);
988
+ 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);
989
+ const I = document.createElement("span");
990
+ I.className = "tbw-filter-range-separator", I.textContent = "–", T.appendChild(I);
955
991
  const P = document.createElement("div");
956
992
  P.className = "tbw-filter-range-group";
957
- const L = document.createElement("label");
958
- L.textContent = "Max", L.className = "tbw-filter-range-label";
993
+ const A = document.createElement("label");
994
+ A.textContent = "Max", A.className = "tbw-filter-range-label";
959
995
  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";
996
+ 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);
997
+ const s = document.createElement("div");
998
+ s.className = "tbw-filter-range-slider";
963
999
  const b = document.createElement("div");
964
1000
  b.className = "tbw-filter-range-track";
965
1001
  const m = document.createElement("div");
966
1002
  m.className = "tbw-filter-range-fill";
967
1003
  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);
1004
+ 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
1005
  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);
1006
+ 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
1007
  const g = () => {
972
1008
  const p = parseFloat(o.value), D = parseFloat(c.value), z = C - h, q = (p - h) / z * 100, Y = (D - h) / z * 100;
973
1009
  m.style.left = `${q}%`, m.style.width = `${Y - q}%`;
@@ -1001,26 +1037,26 @@ class _ extends W {
1001
1037
  * Render a date range filter panel with from/to date inputs
1002
1038
  */
1003
1039
  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 = "";
1040
+ 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);
1041
+ let E = "", k = "";
1006
1042
  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";
1043
+ 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) || "");
1044
+ const R = document.createElement("div");
1045
+ R.className = "tbw-filter-date-range";
1046
+ const L = document.createElement("div");
1047
+ L.className = "tbw-filter-date-group";
1012
1048
  const S = document.createElement("label");
1013
1049
  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);
1050
+ const I = document.createElement("input");
1051
+ 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
1052
  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";
1053
+ P.className = "tbw-filter-range-separator", P.textContent = "–", R.appendChild(P);
1054
+ const A = document.createElement("div");
1055
+ A.className = "tbw-filter-date-group";
1020
1056
  const v = document.createElement("label");
1021
1057
  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);
1058
+ const s = document.createElement("input");
1059
+ 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
1060
  const b = document.createElement("label");
1025
1061
  b.className = "tbw-filter-blank-option";
1026
1062
  const m = document.createElement("input");
@@ -1028,7 +1064,7 @@ class _ extends W {
1028
1064
  const o = document.createTextNode("Show only blank");
1029
1065
  b.appendChild(m), b.appendChild(o);
1030
1066
  const c = (d) => {
1031
- R.disabled = d, l.disabled = d, I.classList.toggle("tbw-filter-disabled", d);
1067
+ I.disabled = d, s.disabled = d, R.classList.toggle("tbw-filter-disabled", d);
1032
1068
  };
1033
1069
  c(T), m.addEventListener("change", () => {
1034
1070
  c(m.checked);
@@ -1041,7 +1077,7 @@ class _ extends W {
1041
1077
  t.applyTextFilter("blank", "");
1042
1078
  return;
1043
1079
  }
1044
- const d = R.value, p = l.value;
1080
+ const d = I.value, p = s.value;
1045
1081
  d && p ? t.applyTextFilter("between", d, p) : d ? t.applyTextFilter("greaterThanOrEqual", d) : p ? t.applyTextFilter("lessThanOrEqual", p) : t.clearFilter();
1046
1082
  }), g.appendChild(M);
1047
1083
  const H = document.createElement("button");
@@ -1081,10 +1117,10 @@ class _ extends W {
1081
1117
  if (this.config.filterHandler) {
1082
1118
  const t = this.grid;
1083
1119
  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", {
1120
+ const r = this.config.filterHandler(e, this.sourceRows), n = (i) => {
1121
+ t.removeAttribute("aria-busy"), this.cachedResult = i, this.grid.rows = i, this.emit("filter-change", {
1086
1122
  filters: e,
1087
- filteredRowCount: a.length
1123
+ filteredRowCount: i.length
1088
1124
  }), this.emitPluginEvent("filter-applied", { filters: e }), this.requestRender();
1089
1125
  };
1090
1126
  r && typeof r.then == "function" ? r.then(n) : n(r);