@toolbox-web/grid 0.2.1 → 0.2.2

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 (67) hide show
  1. package/README.md +50 -59
  2. package/all.d.ts +1 -47
  3. package/all.js +195 -239
  4. package/all.js.map +1 -1
  5. package/index.d.ts +1 -47
  6. package/index.js +129 -118
  7. package/index.js.map +1 -1
  8. package/lib/plugins/clipboard/index.js +11 -5
  9. package/lib/plugins/clipboard/index.js.map +1 -1
  10. package/lib/plugins/column-virtualization/index.js +9 -4
  11. package/lib/plugins/column-virtualization/index.js.map +1 -1
  12. package/lib/plugins/context-menu/index.js +11 -5
  13. package/lib/plugins/context-menu/index.js.map +1 -1
  14. package/lib/plugins/export/index.js +7 -3
  15. package/lib/plugins/export/index.js.map +1 -1
  16. package/lib/plugins/filtering/index.js +16 -149
  17. package/lib/plugins/filtering/index.js.map +1 -1
  18. package/lib/plugins/grouping-columns/index.js +13 -6
  19. package/lib/plugins/grouping-columns/index.js.map +1 -1
  20. package/lib/plugins/grouping-rows/index.js +13 -6
  21. package/lib/plugins/grouping-rows/index.js.map +1 -1
  22. package/lib/plugins/master-detail/index.js +11 -5
  23. package/lib/plugins/master-detail/index.js.map +1 -1
  24. package/lib/plugins/multi-sort/index.js +13 -6
  25. package/lib/plugins/multi-sort/index.js.map +1 -1
  26. package/lib/plugins/pinned-columns/index.js +11 -5
  27. package/lib/plugins/pinned-columns/index.js.map +1 -1
  28. package/lib/plugins/pinned-rows/index.js +13 -6
  29. package/lib/plugins/pinned-rows/index.js.map +1 -1
  30. package/lib/plugins/pivot/index.js +19 -9
  31. package/lib/plugins/pivot/index.js.map +1 -1
  32. package/lib/plugins/reorder/index.js +11 -5
  33. package/lib/plugins/reorder/index.js.map +1 -1
  34. package/lib/plugins/selection/index.js +13 -6
  35. package/lib/plugins/selection/index.js.map +1 -1
  36. package/lib/plugins/server-side/index.js +11 -5
  37. package/lib/plugins/server-side/index.js.map +1 -1
  38. package/lib/plugins/tree/index.js +15 -7
  39. package/lib/plugins/tree/index.js.map +1 -1
  40. package/lib/plugins/undo-redo/index.js +3 -1
  41. package/lib/plugins/undo-redo/index.js.map +1 -1
  42. package/lib/plugins/visibility/index.js +13 -6
  43. package/lib/plugins/visibility/index.js.map +1 -1
  44. package/package.json +1 -1
  45. package/umd/grid.all.umd.js +15 -156
  46. package/umd/grid.all.umd.js.map +1 -1
  47. package/umd/grid.umd.js +6 -6
  48. package/umd/grid.umd.js.map +1 -1
  49. package/umd/plugins/clipboard.umd.js.map +1 -1
  50. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  51. package/umd/plugins/context-menu.umd.js.map +1 -1
  52. package/umd/plugins/export.umd.js.map +1 -1
  53. package/umd/plugins/filtering.umd.js +1 -142
  54. package/umd/plugins/filtering.umd.js.map +1 -1
  55. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  56. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  57. package/umd/plugins/master-detail.umd.js.map +1 -1
  58. package/umd/plugins/multi-sort.umd.js.map +1 -1
  59. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  60. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  61. package/umd/plugins/pivot.umd.js.map +1 -1
  62. package/umd/plugins/reorder.umd.js.map +1 -1
  63. package/umd/plugins/selection.umd.js.map +1 -1
  64. package/umd/plugins/server-side.umd.js.map +1 -1
  65. package/umd/plugins/tree.umd.js.map +1 -1
  66. package/umd/plugins/undo-redo.umd.js.map +1 -1
  67. package/umd/plugins/visibility.umd.js.map +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- const de = ":root{color-scheme:light dark}:host{--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #adacac);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: 2px 8px;--tbw-cell-padding: 2px 8px;--tbw-cell-padding-input: 2px 6px;--tbw-row-height: 28px;--tbw-header-height: 30px;--tbw-border-radius: 4px;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: 4px;--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-checkbox-size: 16px;--tbw-density-scale: 1}:host{position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none}:host,:host *{box-sizing:border-box}:host .header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}:host .header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}:host .header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start))}:host .header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30)}:host .header-row>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .header-row>.cell>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .header-row>.cell>span[part~=sort-indicator]{flex-shrink:0}:host .header-row>.cell:last-child{border-right:0}:host .header-group-cell,:host .header-row>.cell.grouped.group-end{border-right:2px solid var(--tbw-color-border)}:host .tbw-grid-root{display:flex;flex-direction:column;height:100%}:host .rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}:host .rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}:host .rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}:host .rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip}:host .faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}:host .faux-vscroll-spacer{width:1px}:host .rows-viewport .rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}:host .data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style}:host .data-grid-row:has(.editing){background:var(--tbw-editing-bg)}:host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row>.cell.selected:focus-visible,:host .data-grid-row>.cell:focus-visible:not(.cell-focus){outline:none}:host .data-grid-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .data-grid-row>.cell>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .data-grid-row>.cell:last-child{border-right:0}:host .data-grid-row>.cell[data-type=boolean]{justify-content:center}:host .data-grid-row>.cell[data-type=boolean] input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size)}:host .data-grid-row>.cell.editing{overflow:hidden;padding:0}:host .data-grid-row>.cell.editing input:not([type=checkbox]),:host .data-grid-row>.cell.editing select,:host .data-grid-row>.cell.editing textarea{width:100%;height:100%;max-width:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}:host .data-grid-row:nth-child(2n){background:var(--tbw-color-row-alt)}:host .data-grid-row:hover{background:var(--tbw-color-row-hover)}:host .sortable{cursor:pointer;user-select:none}:host .resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius)}:host .resize-handle:hover{background:var(--tbw-resize-handle-color-hover)}:host .cell-focus,:host .row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-row-alt);font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}:host .group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px)}:host .group-row .group-toggle{background:none;border:0;cursor:pointer;padding:0 4px 0 0;font:inherit}:host .group-row .group-count{margin-left:4px;opacity:.7}:host .sticky-left,:host .sticky-right{position:sticky;z-index:25}:host .header-row>.cell.sticky-left,:host .header-row>.cell.sticky-right{background:var(--tbw-color-header-bg);z-index:35}:host .data-grid-row>.cell.sticky-left,:host .data-grid-row>.cell.sticky-right{background:var(--tbw-color-panel-bg)}:host .sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}:host .sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.grid-container{position:relative;width:100%;height:100%}.grid-placeholder{padding:2rem;text-align:center;color:var(--tbw-color-fg);opacity:.6}:host{--tbw-shell-header-height: 44px;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: 14px;--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 280px;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 40px;--tbw-tool-panel-transition: .2s ease-out;--tbw-toolbar-button-size: 32px;--tbw-toolbar-button-gap: 4px}:host .tbw-grid-root.has-shell{display:flex;flex-direction:column;height:100%}:host .tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}:host .tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}:host .tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}:host .tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease)}:host .tbw-toolbar-btn:hover{background:var(--tbw-color-row-hover)}:host .tbw-toolbar-btn:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .tbw-toolbar-btn.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}:host .tbw-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}:host .tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}:host .tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}:host .tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}:host .tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden}:host .tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel.open{width:var(--tbw-tool-panel-width)}:host .tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .15s ease}:host .tbw-tool-panel-resize[data-handle-position=left]{left:0}:host .tbw-tool-panel-resize[data-handle-position=right]{right:0}:host .tbw-tool-panel-resize:hover,:host .tbw-tool-panel-resize.resizing{background:var(--tbw-color-accent)}:host .tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}:host .tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px}:host .tbw-tool-panel-close:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}:host .tbw-tool-panel-content{flex:1;overflow:auto}:host .tbw-accordion{display:flex;flex-direction:column;gap:0}:host .tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border)}:host .tbw-accordion-section:last-child{border-bottom:none}:host .tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:left;cursor:pointer;user-select:none}:host .tbw-accordion-header:hover{background:var(--tbw-color-row-hover)}:host .tbw-accordion-section.single .tbw-accordion-header{cursor:default}:host .tbw-accordion-section.single .tbw-accordion-header:hover{background:transparent}:host .tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}:host .tbw-accordion-section.expanded .tbw-accordion-chevron{transform:rotate(90deg)}:host .tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}:host .tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tbw-accordion-content{display:none}:host .tbw-accordion-section.expanded .tbw-accordion-content{display:block}:host .tbw-quick-filter-input{flex:1;max-width:300px;height:28px;padding:0 8px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:13px}:host .tbw-quick-filter-input:focus{outline:none;border-color:var(--tbw-color-accent)}:host .tbw-selection-summary{font-size:13px;color:var(--tbw-color-fg-muted);white-space:nowrap}";
2
- function ue(t) {
1
+ const ue = ":root{color-scheme:light dark}:host{--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #adacac);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: 2px 8px;--tbw-cell-padding: 2px 8px;--tbw-cell-padding-input: 2px 6px;--tbw-row-height: 28px;--tbw-header-height: 30px;--tbw-border-radius: 4px;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: 4px;--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-checkbox-size: 16px;--tbw-density-scale: 1}:host{position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none}:host,:host *{box-sizing:border-box}:host .header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}:host .header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}:host .header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start))}:host .header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30)}:host .header-row>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .header-row>.cell>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .header-row>.cell>span[part~=sort-indicator]{flex-shrink:0}:host .header-row>.cell:last-child{border-right:0}:host .header-group-cell,:host .header-row>.cell.grouped.group-end{border-right:2px solid var(--tbw-color-border)}:host .tbw-grid-root{display:flex;flex-direction:column;height:100%}:host .rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}:host .rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}:host .rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}:host .rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip}:host .faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}:host .faux-vscroll-spacer{width:1px}:host .rows-viewport .rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}:host .data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style}:host .data-grid-row:has(.editing){background:var(--tbw-editing-bg)}:host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row>.cell.selected:focus-visible,:host .data-grid-row>.cell:focus-visible:not(.cell-focus){outline:none}:host .data-grid-row>.cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .data-grid-row>.cell>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .data-grid-row>.cell:last-child{border-right:0}:host .data-grid-row>.cell[data-type=boolean]{justify-content:center}:host .data-grid-row>.cell[data-type=boolean] input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size)}:host .data-grid-row>.cell.editing{overflow:hidden;padding:0}:host .data-grid-row>.cell.editing input:not([type=checkbox]),:host .data-grid-row>.cell.editing select,:host .data-grid-row>.cell.editing textarea{width:100%;height:100%;max-width:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}:host .data-grid-row:nth-child(2n){background:var(--tbw-color-row-alt)}:host .data-grid-row:hover{background:var(--tbw-color-row-hover)}:host .sortable{cursor:pointer;user-select:none}:host .resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius)}:host .resize-handle:hover{background:var(--tbw-resize-handle-color-hover)}:host .cell-focus,:host .row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-row-alt);font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}:host .group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px)}:host .group-row .group-toggle{background:none;border:0;cursor:pointer;padding:0 4px 0 0;font:inherit}:host .group-row .group-count{margin-left:4px;opacity:.7}:host .sticky-left,:host .sticky-right{position:sticky;z-index:25}:host .header-row>.cell.sticky-left,:host .header-row>.cell.sticky-right{background:var(--tbw-color-header-bg);z-index:35}:host .data-grid-row>.cell.sticky-left,:host .data-grid-row>.cell.sticky-right{background:var(--tbw-color-panel-bg)}:host .sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}:host .sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.grid-container{position:relative;width:100%;height:100%}.grid-placeholder{padding:2rem;text-align:center;color:var(--tbw-color-fg);opacity:.6}:host{--tbw-shell-header-height: 44px;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: 14px;--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 280px;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 40px;--tbw-tool-panel-transition: .2s ease-out;--tbw-toolbar-button-size: 32px;--tbw-toolbar-button-gap: 4px}:host .tbw-grid-root.has-shell{display:flex;flex-direction:column;height:100%}:host .tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}:host .tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}:host .tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}:host .tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease)}:host .tbw-toolbar-btn:hover{background:var(--tbw-color-row-hover)}:host .tbw-toolbar-btn:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .tbw-toolbar-btn.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}:host .tbw-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}:host .tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}:host .tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}:host .tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}:host .tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden}:host .tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel.open{width:var(--tbw-tool-panel-width)}:host .tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .15s ease}:host .tbw-tool-panel-resize[data-handle-position=left]{left:0}:host .tbw-tool-panel-resize[data-handle-position=right]{right:0}:host .tbw-tool-panel-resize:hover,:host .tbw-tool-panel-resize.resizing{background:var(--tbw-color-accent)}:host .tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}:host .tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px}:host .tbw-tool-panel-close:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}:host .tbw-tool-panel-content{flex:1;overflow:auto}:host .tbw-accordion{display:flex;flex-direction:column;gap:0}:host .tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border)}:host .tbw-accordion-section:last-child{border-bottom:none}:host .tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:left;cursor:pointer;user-select:none}:host .tbw-accordion-header:hover{background:var(--tbw-color-row-hover)}:host .tbw-accordion-section.single .tbw-accordion-header{cursor:default}:host .tbw-accordion-section.single .tbw-accordion-header:hover{background:transparent}:host .tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}:host .tbw-accordion-section.expanded .tbw-accordion-chevron{transform:rotate(90deg)}:host .tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}:host .tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tbw-accordion-content{display:none}:host .tbw-accordion-section.expanded .tbw-accordion-content{display:block}:host .tbw-quick-filter-input{flex:1;max-width:300px;height:28px;padding:0 8px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:13px}:host .tbw-quick-filter-input:focus{outline:none;border-color:var(--tbw-color-accent)}:host .tbw-selection-summary{font-size:13px;color:var(--tbw-color-fg-muted);white-space:nowrap}";
2
+ function he(t) {
3
3
  const e = /* @__PURE__ */ new Map();
4
4
  return t.sortState && e.set(t.sortState.field, {
5
5
  direction: t.sortState.direction === 1 ? "asc" : "desc",
@@ -7,7 +7,7 @@ function ue(t) {
7
7
  }), e;
8
8
  }
9
9
  function re(t, e) {
10
- const o = t._columns, n = ue(t);
10
+ const o = t._columns, n = he(t);
11
11
  return {
12
12
  columns: o.map((i, s) => {
13
13
  const r = {
@@ -28,7 +28,7 @@ function re(t, e) {
28
28
  })
29
29
  };
30
30
  }
31
- function he(t, e, o, n) {
31
+ function fe(t, e, o, n) {
32
32
  if (!e.columns || e.columns.length === 0) return;
33
33
  const i = new Map(e.columns.map((l) => [l.field, l])), s = o.map((l) => {
34
34
  const a = i.get(l.field);
@@ -54,7 +54,7 @@ function he(t, e, o, n) {
54
54
  for (const a of e.columns)
55
55
  l.applyColumnState(a.field, a);
56
56
  }
57
- function fe(t, e, o) {
57
+ function pe(t, e, o) {
58
58
  let n = null;
59
59
  return () => {
60
60
  n !== null && clearTimeout(n), n = setTimeout(() => {
@@ -77,7 +77,7 @@ const q = {
77
77
  dragHandle: "⋮⋮",
78
78
  toolPanel: "☰"
79
79
  };
80
- function pe(t) {
80
+ function be(t) {
81
81
  return t == null ? "string" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date || typeof t == "string" && /\d{4}-\d{2}-\d{2}/.test(t) && !isNaN(Date.parse(t)) ? "date" : "string";
82
82
  }
83
83
  function le(t, e) {
@@ -88,14 +88,14 @@ function le(t, e) {
88
88
  }), { columns: e, typeMap: s };
89
89
  }
90
90
  const o = t[0] || {}, n = Object.keys(o).map((s) => {
91
- const r = o[s], l = pe(r);
91
+ const r = o[s], l = be(r);
92
92
  return { field: s, header: s.charAt(0).toUpperCase() + s.slice(1), type: l };
93
93
  }), i = {};
94
94
  return n.forEach((s) => {
95
95
  i[s.field] = s.type || "string";
96
96
  }), { columns: n, typeMap: i };
97
97
  }
98
- const be = /{{\s*([^}]+)\s*}}/g, k = "__DG_EMPTY__", we = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, ge = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/, me = /* @__PURE__ */ new Set([
98
+ const we = /{{\s*([^}]+)\s*}}/g, k = "__DG_EMPTY__", ge = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, me = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/, ve = /* @__PURE__ */ new Set([
99
99
  "script",
100
100
  "iframe",
101
101
  "object",
@@ -120,18 +120,18 @@ const be = /{{\s*([^}]+)\s*}}/g, k = "__DG_EMPTY__", we = /^[\w$. '?+\-*/%:()!<>
120
120
  "plaintext",
121
121
  "xmp",
122
122
  "listing"
123
- ]), Y = /^on\w+$/i, ve = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), Ee = /^\s*(javascript|vbscript|data|blob):/i;
124
- function V(t) {
123
+ ]), Y = /^on\w+$/i, Ee = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), Ce = /^\s*(javascript|vbscript|data|blob):/i;
124
+ function W(t) {
125
125
  if (!t || typeof t != "string") return "";
126
126
  if (t.indexOf("<") === -1) return t;
127
127
  const e = document.createElement("template");
128
- return e.innerHTML = t, Ce(e.content), e.innerHTML;
128
+ return e.innerHTML = t, ye(e.content), e.innerHTML;
129
129
  }
130
- function Ce(t) {
130
+ function ye(t) {
131
131
  const e = [], o = t.querySelectorAll("*");
132
132
  for (const n of o) {
133
133
  const i = n.tagName.toLowerCase();
134
- if (me.has(i)) {
134
+ if (ve.has(i)) {
135
135
  e.push(n);
136
136
  continue;
137
137
  }
@@ -148,7 +148,7 @@ function Ce(t) {
148
148
  s.push(r.name);
149
149
  continue;
150
150
  }
151
- if (ve.has(l) && Ee.test(r.value)) {
151
+ if (Ee.has(l) && Ce.test(r.value)) {
152
152
  s.push(r.name);
153
153
  continue;
154
154
  }
@@ -163,20 +163,20 @@ function Ce(t) {
163
163
  }
164
164
  function ae(t, e) {
165
165
  if (!t || t.indexOf("{{") === -1) return t;
166
- const o = [], n = t.replace(be, (l, a) => {
167
- const d = ye(a, e);
166
+ const o = [], n = t.replace(we, (l, a) => {
167
+ const d = _e(a, e);
168
168
  return o.push({ expr: a.trim(), result: d }), d;
169
- }), i = _e(n), s = o.length && o.every((l) => l.result === "" || l.result === k);
169
+ }), i = Re(n), s = o.length && o.every((l) => l.result === "" || l.result === k);
170
170
  return /Reflect\.|\bProxy\b|ownKeys\(/.test(t) || s ? "" : i;
171
171
  }
172
- function ye(t, e) {
172
+ function _e(t, e) {
173
173
  if (t = (t || "").trim(), !t || /\b(Reflect|Proxy|ownKeys)\b/.test(t)) return k;
174
174
  if (t === "value") return e.value == null ? k : String(e.value);
175
175
  if (t.startsWith("row.") && !/[()?]/.test(t) && !t.includes(":")) {
176
176
  const n = t.slice(4), i = e.row ? e.row[n] : void 0;
177
177
  return i == null ? k : String(i);
178
178
  }
179
- if (t.length > 80 || !we.test(t) || ge.test(t)) return k;
179
+ if (t.length > 80 || !ge.test(t) || me.test(t)) return k;
180
180
  const o = t.match(/\./g);
181
181
  if (o && o.length > 1) return k;
182
182
  try {
@@ -186,10 +186,10 @@ function ye(t, e) {
186
186
  return k;
187
187
  }
188
188
  }
189
- function _e(t) {
189
+ function Re(t) {
190
190
  return t && t.replace(new RegExp(k, "g"), "").replace(/Reflect\.[^<>{}\s]+/g, "").replace(/\bProxy\b/g, "").replace(/ownKeys\([^)]*\)/g, "");
191
191
  }
192
- function Re(t) {
192
+ function Se(t) {
193
193
  if (/Reflect|Proxy|ownKeys/.test(t.textContent || "")) {
194
194
  if (Array.from(t.childNodes).forEach((e) => {
195
195
  e.nodeType === Node.TEXT_NODE && /Reflect|Proxy|ownKeys/.test(e.textContent || "") && (e.textContent = "");
@@ -205,7 +205,7 @@ function Z(t) {
205
205
  const e = /Reflect\.|\bProxy\b|ownKeys\(/.test(t), o = (n) => e ? "" : ae(t, n);
206
206
  return o.__blocked = e, o;
207
207
  }
208
- function Se(t) {
208
+ function xe(t) {
209
209
  return Array.from(t.querySelectorAll("tbw-grid-column")).map((o) => {
210
210
  const n = o.getAttribute("field") || "";
211
211
  if (!n) return null;
@@ -220,7 +220,7 @@ function Se(t) {
220
220
  return b && (h.__viewTemplate = b), c && (h.__editorTemplate = c), u && (h.__headerTemplate = u), h;
221
221
  }).filter((o) => !!o);
222
222
  }
223
- function xe(t, e) {
223
+ function Ae(t, e) {
224
224
  if ((!t || !t.length) && (!e || !e.length)) return [];
225
225
  if (!t || !t.length) return e || [];
226
226
  if (!e || !e.length) return t;
@@ -242,18 +242,18 @@ function U(t, e) {
242
242
  const o = t.getAttribute("part");
243
243
  o ? o.split(/\s+/).includes(e) || t.setAttribute("part", o + " " + e) : t.setAttribute("part", e);
244
244
  }
245
- function Ae(t) {
245
+ function Te(t) {
246
246
  t.__lightDomColumnsCache || (t.__originalColumnNodes = Array.from(
247
247
  t.querySelectorAll("tbw-grid-column")
248
- ), t.__lightDomColumnsCache = t.__originalColumnNodes.length ? Se(t) : []);
249
- const e = t.__lightDomColumnsCache, o = xe(t._columns, e);
248
+ ), t.__lightDomColumnsCache = t.__originalColumnNodes.length ? xe(t) : []);
249
+ const e = t.__lightDomColumnsCache, o = Ae(t._columns, e);
250
250
  o.forEach((i) => {
251
251
  i.__viewTemplate && !i.__compiledView && (i.__compiledView = Z(i.__viewTemplate.innerHTML)), i.__editorTemplate && !i.__compiledEditor && (i.__compiledEditor = Z(i.__editorTemplate.innerHTML));
252
252
  });
253
253
  const { columns: n } = le(t._rows, o);
254
254
  t._columns = n;
255
255
  }
256
- function Te(t) {
256
+ function Le(t) {
257
257
  const e = t.effectiveConfig?.fitMode || t.fitMode || q.STRETCH;
258
258
  if (e !== q.STRETCH && e !== q.FIXED || t.__didInitialAutoSize || !t.isConnected) return;
259
259
  const o = t.headerRowEl?.children || [];
@@ -280,7 +280,7 @@ function ce(t) {
280
280
  return n != null ? `minmax(${n}px, 1fr)` : "1fr";
281
281
  }).join(" ").trim() : t.gridTemplate = t.visibleColumns.map((o) => o.width ? `${o.width}px` : "max-content").join(" "), t.style.setProperty("--tbw-column-template", t.gridTemplate);
282
282
  }
283
- function Le(t) {
283
+ function ke(t) {
284
284
  switch (t.type) {
285
285
  case "number":
286
286
  return (e) => {
@@ -331,7 +331,7 @@ function Le(t) {
331
331
  };
332
332
  }
333
333
  }
334
- function ke(t, e) {
334
+ function Pe(t, e) {
335
335
  if (t.dispatchKeyDown?.(e))
336
336
  return;
337
337
  const o = t._rows.length - 1, n = t.visibleColumns.length - 1, i = t.activeEditRows !== void 0 && t.activeEditRows !== -1, r = t.visibleColumns[t.focusCol]?.type, l = e.composedPath ? e.composedPath() : [], a = l && l.length ? l[0] : e.target, d = (h) => {
@@ -413,11 +413,11 @@ function $(t) {
413
413
  }
414
414
  }
415
415
  }
416
- const Pe = "__cellDisplayCache", Oe = "__cellCacheEpoch";
416
+ const Oe = "__cellDisplayCache", He = "__cellCacheEpoch";
417
417
  function X(t) {
418
- t[Pe] = void 0, t[Oe] = void 0, t.__hasSpecialColumns = void 0;
418
+ t[Oe] = void 0, t[He] = void 0, t.__hasSpecialColumns = void 0;
419
419
  }
420
- function He(t, e, o, n, i) {
420
+ function Me(t, e, o, n, i) {
421
421
  const s = Math.max(0, o - e), r = t.bodyEl, l = t.visibleColumns, a = l.length;
422
422
  let d = t.__cachedHeaderRowCount;
423
423
  for (d === void 0 && (d = t.shadowRoot?.querySelector(".header-group-row") ? 2 : 1, t.__cachedHeaderRowCount = d); t.rowPool.length < s; ) {
@@ -452,7 +452,7 @@ function He(t, e, o, n, i) {
452
452
  if (E && !y)
453
453
  u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1), M(t, u, c, b), u.__epoch = n, u.__rowDataRef = c;
454
454
  else if (E && y)
455
- W(t, u, c, b), u.__rowDataRef = c;
455
+ G(t, u, c, b), u.__rowDataRef = c;
456
456
  else if (u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1), M(t, u, c, b), u.__epoch = n, u.__rowDataRef = c, y) {
457
457
  const _ = u.children;
458
458
  for (let C = 0; C < _.length; C++) {
@@ -464,7 +464,7 @@ function He(t, e, o, n, i) {
464
464
  const E = u.querySelector(".cell.editing"), y = t.activeEditRows === b;
465
465
  if (E && !y)
466
466
  M(t, u, c, b), u.__epoch = n, u.__rowDataRef = c;
467
- else if (W(t, u, c, b), u.__rowDataRef = c, y && !E) {
467
+ else if (G(t, u, c, b), u.__rowDataRef = c, y && !E) {
468
468
  const _ = u.children;
469
469
  for (let C = 0; C < _.length; C++) {
470
470
  const L = t.visibleColumns[C];
@@ -475,7 +475,7 @@ function He(t, e, o, n, i) {
475
475
  const E = u.querySelector(".cell.editing"), y = t.activeEditRows === b;
476
476
  if (E && !y)
477
477
  M(t, u, c, b), u.__epoch = n, u.__rowDataRef = c;
478
- else if (W(t, u, c, b), y && !E) {
478
+ else if (G(t, u, c, b), y && !E) {
479
479
  const _ = u.children;
480
480
  for (let C = 0; C < _.length; C++) {
481
481
  const L = t.visibleColumns[C];
@@ -487,7 +487,7 @@ function He(t, e, o, n, i) {
487
487
  g !== m && u.classList.toggle("changed", g), u.parentNode !== r && r.appendChild(u);
488
488
  }
489
489
  }
490
- function W(t, e, o, n) {
490
+ function G(t, e, o, n) {
491
491
  const i = e.children, s = t.visibleColumns, r = s.length, l = i.length, a = r < l ? r : l, d = t.focusRow, h = t.focusCol;
492
492
  let p = t.__hasSpecialColumns;
493
493
  if (p === void 0) {
@@ -523,7 +523,7 @@ function W(t, e, o, n) {
523
523
  if (w !== v && (f.classList.toggle("cell-focus", w), f.setAttribute("aria-selected", String(w))), f.classList.contains("editing")) continue;
524
524
  if (u.viewRenderer) {
525
525
  const R = o[u.field], T = u.viewRenderer({ row: o, value: R, field: u.field, column: u });
526
- typeof T == "string" ? f.innerHTML = V(T) : T ? (f.innerHTML = "", f.appendChild(T)) : f.textContent = R == null ? "" : String(R);
526
+ typeof T == "string" ? f.innerHTML = W(T) : T ? (f.innerHTML = "", f.appendChild(T)) : f.textContent = R == null ? "" : String(R);
527
527
  continue;
528
528
  }
529
529
  if (u.__viewTemplate || u.__compiledView || u.externalView)
@@ -573,7 +573,7 @@ function M(t, e, o, n) {
573
573
  let T = !1;
574
574
  if (x) {
575
575
  const g = x({ row: o, value: f, field: b.field, column: b });
576
- typeof g == "string" ? (c.innerHTML = V(g), T = !0) : g ? c.appendChild(g) : c.textContent = f == null ? "" : String(f);
576
+ typeof g == "string" ? (c.innerHTML = W(g), T = !0) : g ? c.appendChild(g) : c.textContent = f == null ? "" : String(f);
577
577
  } else if (R) {
578
578
  const g = R, m = document.createElement("div");
579
579
  m.setAttribute("data-external-view", ""), m.setAttribute("data-field", b.field), c.appendChild(m);
@@ -599,10 +599,10 @@ function M(t, e, o, n) {
599
599
  m.setAttribute("data-mounted", "");
600
600
  } else if (v) {
601
601
  const g = v({ row: o, value: f, field: b.field, column: b }), m = v.__blocked;
602
- c.innerHTML = m ? "" : V(g), T = !0, m && (c.textContent = "", c.setAttribute("data-blocked-template", ""));
602
+ c.innerHTML = m ? "" : W(g), T = !0, m && (c.textContent = "", c.setAttribute("data-blocked-template", ""));
603
603
  } else if (S) {
604
604
  const g = S.innerHTML;
605
- /Reflect\.|\bProxy\b|ownKeys\(/.test(g) ? (c.textContent = "", c.setAttribute("data-blocked-template", "")) : (c.innerHTML = V(ae(g, { row: o, value: f })), T = !0);
605
+ /Reflect\.|\bProxy\b|ownKeys\(/.test(g) ? (c.textContent = "", c.setAttribute("data-blocked-template", "")) : (c.innerHTML = W(ae(g, { row: o, value: f })), T = !0);
606
606
  } else if (b.type === "date")
607
607
  if (f == null || f === "")
608
608
  c.textContent = "";
@@ -621,7 +621,7 @@ function M(t, e, o, n) {
621
621
  } else
622
622
  c.textContent = f == null ? "" : String(f);
623
623
  if (T) {
624
- Re(c);
624
+ Se(c);
625
625
  const g = c.textContent || "";
626
626
  /Proxy|Reflect\.ownKeys/.test(g) && (c.textContent = g.replace(/Proxy|Reflect\.ownKeys/g, "").trim(), /Proxy|Reflect\.ownKeys/.test(c.textContent || "") && (c.textContent = ""));
627
627
  }
@@ -728,6 +728,9 @@ function J(t, e, o, n) {
728
728
  }
729
729
  });
730
730
  }
731
+ function de(t) {
732
+ return !(t === "__proto__" || t === "constructor" || t === "prototype");
733
+ }
731
734
  function z(t, e, o) {
732
735
  t.activeEditRows !== e && (t.rowEditSnapshots.set(e, { ...o }), t.activeEditRows = e);
733
736
  }
@@ -774,7 +777,7 @@ function N(t, e, o) {
774
777
  }
775
778
  function j(t, e, o, n, i) {
776
779
  const s = o.field;
777
- if (i[s] === n) return;
780
+ if (!de(s) || i[s] === n) return;
778
781
  i[s] = n;
779
782
  const l = !t._changedRowIndices.has(e);
780
783
  t._changedRowIndices.add(e);
@@ -801,14 +804,14 @@ function O(t, e, o, n, i) {
801
804
  const l = (c) => {
802
805
  r || t.activeEditRows === -1 || j(t, o, n, c, e);
803
806
  }, a = () => {
804
- r = !0, e[n.field] = s;
807
+ r = !0, de(n.field) && (e[n.field] = s);
805
808
  const c = i.querySelector("input,textarea,select");
806
809
  c && (typeof HTMLInputElement < "u" && c instanceof HTMLInputElement && c.type === "checkbox" ? c.checked = !!s : "value" in c && (c.value = s ?? ""));
807
810
  }, d = document.createElement("div");
808
811
  d.style.display = "contents", i.innerHTML = "", i.appendChild(d), d.addEventListener("keydown", (c) => {
809
812
  c.key === "Enter" && (c.stopPropagation(), c.preventDefault(), r = !0, N(t, o, !1)), c.key === "Escape" && (c.stopPropagation(), c.preventDefault(), a(), N(t, o, !0));
810
813
  });
811
- const h = n.__editorTemplate, p = n.editor || (h ? "template" : Le(n)), b = s;
814
+ const h = n.__editorTemplate, p = n.editor || (h ? "template" : ke(n)), b = s;
812
815
  if (p === "template" && h) {
813
816
  const c = h.cloneNode(!0), u = n.__compiledEditor;
814
817
  u ? c.innerHTML = u({ row: e, value: s, field: n.field, column: n }) : c.querySelectorAll("*").forEach((w) => {
@@ -871,7 +874,7 @@ function ee(t, e, o) {
871
874
  new CustomEvent("sort-change", { detail: { field: e.field, direction: o } })
872
875
  ), t.requestStateChange?.();
873
876
  }
874
- function Me(t, e) {
877
+ function ze(t, e) {
875
878
  typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
876
879
  }
877
880
  function K(t) {
@@ -891,7 +894,7 @@ function K(t) {
891
894
  const r = document.createElement("span");
892
895
  U(r, "sort-indicator"), r.style.opacity = "0.6";
893
896
  const l = t.sortState?.field === o.field ? t.sortState.direction : 0, a = { ...P, ...t.icons }, d = l === 1 ? a.sortAsc : l === -1 ? a.sortDesc : a.sortNone;
894
- Me(r, d), i.appendChild(r), i.setAttribute("aria-sort", l === 0 ? "none" : l === 1 ? "ascending" : "descending"), i.addEventListener("click", (h) => {
897
+ ze(r, d), i.appendChild(r), i.setAttribute("aria-sort", l === 0 ? "none" : l === 1 ? "ascending" : "descending"), i.addEventListener("click", (h) => {
895
898
  t.resizeController?.isResizing || t.dispatchHeaderClick?.(h, n, i) || Q(t, o);
896
899
  }), i.addEventListener("keydown", (h) => {
897
900
  if (h.key === "Enter" || h.key === " ") {
@@ -920,7 +923,7 @@ function K(t) {
920
923
  o.getAttribute("aria-sort") || o.setAttribute("aria-sort", "none");
921
924
  }), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex"));
922
925
  }
923
- function ze(t) {
926
+ function De(t) {
924
927
  let e = null, o = null, n = null, i = null;
925
928
  const s = (a) => {
926
929
  if (!e) return;
@@ -952,10 +955,10 @@ function ze(t) {
952
955
  }
953
956
  };
954
957
  }
955
- function I(t) {
958
+ function B(t) {
956
959
  return t ? typeof t == "string" ? t : t.outerHTML : "";
957
960
  }
958
- function De() {
961
+ function Ne() {
959
962
  return {
960
963
  toolPanels: /* @__PURE__ */ new Map(),
961
964
  headerContents: /* @__PURE__ */ new Map(),
@@ -972,11 +975,11 @@ function De() {
972
975
  activePanelCleanup: null
973
976
  };
974
977
  }
975
- function Ne(t, e) {
978
+ function qe(t, e) {
976
979
  return !!(t?.header?.title || t?.header?.toolbarButtons?.length || e.toolPanels.size > 0 || e.headerContents.size > 0 || e.toolbarButtons.size > 0 || e.lightDomButtons.length > 0 || e.lightDomHeaderContent.length > 0);
977
980
  }
978
- function qe(t, e, o = "☰") {
979
- const n = t?.header?.title ?? "", i = !!n, s = I(o), r = t?.header?.toolbarButtons ?? [], l = r.length > 0, a = e.toolbarButtons.size > 0, d = e.lightDomButtons.length > 0, h = e.toolPanels.size > 0, b = (l || a || d) && h, c = [...r].sort((w, v) => (w.order ?? 100) - (v.order ?? 100)), u = [...e.toolbarButtons.values()].sort((w, v) => (w.order ?? 100) - (v.order ?? 100));
981
+ function $e(t, e, o = "☰") {
982
+ const n = t?.header?.title ?? "", i = !!n, s = B(o), r = t?.header?.toolbarButtons ?? [], l = r.length > 0, a = e.toolbarButtons.size > 0, d = e.lightDomButtons.length > 0, h = e.toolPanels.size > 0, b = (l || a || d) && h, c = [...r].sort((w, v) => (w.order ?? 100) - (v.order ?? 100)), u = [...e.toolbarButtons.values()].sort((w, v) => (w.order ?? 100) - (v.order ?? 100));
980
983
  let f = "";
981
984
  for (const w of c)
982
985
  w.icon && w.action && (f += `<button class="tbw-toolbar-btn" data-btn="${w.id}" title="${w.label}" aria-label="${w.label}"${w.disabled ? " disabled" : ""}>${w.icon}</button>`);
@@ -1002,8 +1005,8 @@ function qe(t, e, o = "☰") {
1002
1005
  </div>
1003
1006
  `;
1004
1007
  }
1005
- function $e(t, e, o, n) {
1006
- const i = t?.toolPanel?.position ?? "right", s = e.toolPanels.size > 0, r = e.isPanelOpen, l = I(n?.expand ?? P.expand), a = I(n?.collapse ?? P.collapse), d = [...e.toolPanels.values()].sort((u, f) => (u.order ?? 100) - (f.order ?? 100)), h = d.length === 1;
1008
+ function Ie(t, e, o, n) {
1009
+ const i = t?.toolPanel?.position ?? "right", s = e.toolPanels.size > 0, r = e.isPanelOpen, l = B(n?.expand ?? P.expand), a = B(n?.collapse ?? P.collapse), d = [...e.toolPanels.values()].sort((u, f) => (u.order ?? 100) - (f.order ?? 100)), h = d.length === 1;
1007
1010
  let p = "";
1008
1011
  for (const u of d) {
1009
1012
  const f = e.expandedSections.has(u.id), w = u.icon ? `<span class="tbw-accordion-icon">${u.icon}</span>` : "", v = h ? "" : `<span class="tbw-accordion-chevron">${f ? a : l}</span>`;
@@ -1060,7 +1063,7 @@ function te(t, e) {
1060
1063
  s.setAttribute("slot", "toolbar");
1061
1064
  });
1062
1065
  }
1063
- function Ie(t, e, o, n) {
1066
+ function Be(t, e, o, n) {
1064
1067
  const i = t.querySelector(".tbw-shell-toolbar");
1065
1068
  i && i.addEventListener("click", (r) => {
1066
1069
  const l = r.target;
@@ -1083,7 +1086,7 @@ function Ie(t, e, o, n) {
1083
1086
  }
1084
1087
  });
1085
1088
  }
1086
- function Be(t, e, o) {
1089
+ function Ve(t, e, o) {
1087
1090
  const n = t.querySelector(".tbw-tool-panel"), i = t.querySelector("[data-resize-handle]"), s = t.querySelector(".tbw-shell-body");
1088
1091
  if (!n || !i || !s)
1089
1092
  return () => {
@@ -1107,7 +1110,7 @@ function Be(t, e, o) {
1107
1110
  i.removeEventListener("mousedown", u), document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", c);
1108
1111
  };
1109
1112
  }
1110
- function Ve(t, e, o) {
1113
+ function We(t, e, o) {
1111
1114
  const n = [...e?.header?.toolbarButtons ?? [], ...o.toolbarButtons.values()];
1112
1115
  for (const i of n) {
1113
1116
  const s = t.querySelector(`[data-btn-slot="${i.id}"]`);
@@ -1134,9 +1137,9 @@ function oe(t, e) {
1134
1137
  a && e.headerContentCleanups.set(s.id, a);
1135
1138
  }
1136
1139
  }
1137
- function We(t, e, o) {
1140
+ function Ge(t, e, o) {
1138
1141
  if (!e.isPanelOpen) return;
1139
- const n = I(o?.expand ?? P.expand), i = I(o?.collapse ?? P.collapse);
1142
+ const n = B(o?.expand ?? P.expand), i = B(o?.collapse ?? P.collapse);
1140
1143
  for (const [s, r] of e.toolPanels) {
1141
1144
  const l = e.expandedSections.has(s), a = t.querySelector(`[data-section="${s}"]`), d = a?.querySelector(".tbw-accordion-content");
1142
1145
  if (!a || !d) continue;
@@ -1163,7 +1166,7 @@ function ie(t, e) {
1163
1166
  const o = t.querySelector(".tbw-tool-panel");
1164
1167
  o && (o.classList.toggle("open", e.isPanelOpen), e.isPanelOpen || (o.style.width = ""));
1165
1168
  }
1166
- function Ge(t, e) {
1169
+ function Fe(t, e) {
1167
1170
  const o = [];
1168
1171
  for (const n of t?.header?.toolbarButtons ?? [])
1169
1172
  o.push({
@@ -1198,7 +1201,7 @@ function Ge(t, e) {
1198
1201
  });
1199
1202
  return o;
1200
1203
  }
1201
- function Fe(t) {
1204
+ function Ue(t) {
1202
1205
  for (const e of t.headerContentCleanups.values())
1203
1206
  e();
1204
1207
  t.headerContentCleanups.clear(), t.activePanelCleanup && (t.activePanelCleanup(), t.activePanelCleanup = null);
@@ -1206,7 +1209,7 @@ function Fe(t) {
1206
1209
  e();
1207
1210
  t.toolbarButtonCleanups.clear(), t.activePanel && t.toolPanels.get(t.activePanel)?.onClose?.(), t.toolPanels.clear(), t.headerContents.clear(), t.toolbarButtons.clear(), t.lightDomButtons = [], t.lightDomHeaderContent = [], t.activePanel = null;
1208
1211
  }
1209
- class Ue {
1212
+ class Xe {
1210
1213
  constructor(e) {
1211
1214
  this.grid = e;
1212
1215
  }
@@ -1299,7 +1302,7 @@ class Ue {
1299
1302
  return this.plugins.filter((e) => e.styles).map((e) => e.styles).join(`
1300
1303
  `);
1301
1304
  }
1302
- // ===== Hook execution methods =====
1305
+ // #region Hook execution methods
1303
1306
  /**
1304
1307
  * Execute processRows hook on all plugins.
1305
1308
  */
@@ -1471,7 +1474,8 @@ class Ue {
1471
1474
  }
1472
1475
  return o;
1473
1476
  }
1474
- // ===== Shell Integration Hooks =====
1477
+ // #endregion
1478
+ // #region Shell Integration Hooks
1475
1479
  /**
1476
1480
  * Collect tool panels from all plugins.
1477
1481
  * Returns panels sorted by order (ascending).
@@ -1496,16 +1500,18 @@ class Ue {
1496
1500
  }
1497
1501
  return e.sort((o, n) => (o.content.order ?? 0) - (n.content.order ?? 0));
1498
1502
  }
1503
+ // #endregion
1499
1504
  }
1500
- class G extends HTMLElement {
1505
+ class I extends HTMLElement {
1501
1506
  // TODO: Rename to 'data-grid' when migration is complete
1502
1507
  static tagName = "tbw-grid";
1508
+ static version = "0.2.2";
1503
1509
  #n;
1504
1510
  #k = !1;
1505
1511
  // ---------------- Ready Promise ----------------
1506
1512
  #$;
1507
1513
  #I;
1508
- // ================== INPUT PROPERTIES ==================
1514
+ // #region Input Properties
1509
1515
  // These backing fields store raw user input. They are merged into
1510
1516
  // #effectiveConfig by #mergeEffectiveConfig(). Never read directly
1511
1517
  // for rendering logic - always use effectiveConfig or derived state.
@@ -1514,7 +1520,8 @@ class G extends HTMLElement {
1514
1520
  #p;
1515
1521
  #m;
1516
1522
  #v;
1517
- // ================== SINGLE SOURCE OF TRUTH ==================
1523
+ // #endregion
1524
+ // #region Single Source of Truth
1518
1525
  // All input sources converge here. This is the canonical config
1519
1526
  // that all rendering and logic should read from.
1520
1527
  #o = {};
@@ -1538,10 +1545,11 @@ class G extends HTMLElement {
1538
1545
  #O;
1539
1546
  #d;
1540
1547
  // ---------------- Shell State ----------------
1541
- #e = De();
1548
+ #e = Ne();
1542
1549
  #a = !1;
1543
1550
  #A;
1544
- // ================== DERIVED STATE ==================
1551
+ // #endregion
1552
+ // #region Derived State
1545
1553
  // _rows: result of applying plugin processRows hooks
1546
1554
  _rows = [];
1547
1555
  // _baseColumns: columns before plugin transformation (analogous to #rows for row processing)
@@ -1561,7 +1569,8 @@ class G extends HTMLElement {
1561
1569
  get visibleColumns() {
1562
1570
  return this._columns.filter((e) => !e.hidden);
1563
1571
  }
1564
- // ================== RUNTIME STATE ==================
1572
+ // #endregion
1573
+ // #region Runtime State
1565
1574
  // User-driven state changes at runtime (sort, etc.)
1566
1575
  // Visibility is stored in effectiveConfig.columns[].hidden
1567
1576
  rowPool = [];
@@ -1595,6 +1604,7 @@ class G extends HTMLElement {
1595
1604
  gridTemplate = "";
1596
1605
  rowEditSnapshots = /* @__PURE__ */ new Map();
1597
1606
  _changedRowIndices = /* @__PURE__ */ new Set();
1607
+ // #endregion
1598
1608
  // ---------------- Public API Props (getters/setters) ----------------
1599
1609
  // Getters return the EFFECTIVE value (after merging), not the raw input.
1600
1610
  // This is what consumers and plugins need - the current resolved state.
@@ -1662,7 +1672,7 @@ class G extends HTMLElement {
1662
1672
  }
1663
1673
  #j() {
1664
1674
  const e = new CSSStyleSheet();
1665
- e.replaceSync(de), this.#n.adoptedStyleSheets = [e];
1675
+ e.replaceSync(ue), this.#n.adoptedStyleSheets = [e];
1666
1676
  }
1667
1677
  // ---------------- Plugin System ----------------
1668
1678
  /**
@@ -1700,7 +1710,7 @@ class G extends HTMLElement {
1700
1710
  * Plugins are class instances passed in gridConfig.plugins[].
1701
1711
  */
1702
1712
  #B() {
1703
- this.#t = new Ue(this);
1713
+ this.#t = new Xe(this);
1704
1714
  const e = this.#o?.plugins, o = Array.isArray(e) ? e : [];
1705
1715
  this.#t.attachAll(o);
1706
1716
  }
@@ -1743,21 +1753,21 @@ class G extends HTMLElement {
1743
1753
  }
1744
1754
  // ---------------- Lifecycle ----------------
1745
1755
  connectedCallback() {
1746
- this.hasAttribute("tabindex") || (this.tabIndex = 0), this._rows = Array.isArray(this.#s) ? [...this.#s] : [], this.#l?.abort(), this.#l = new AbortController(), this.#u(), this.#B(), this.#Y(), this.#k || (this.#X(), this.#V(), this.#k = !0), this.#G();
1756
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", I.version), this._rows = Array.isArray(this.#s) ? [...this.#s] : [], this.#l?.abort(), this.#l = new AbortController(), this.#u(), this.#B(), this.#Y(), this.#k || (this.#X(), this.#V(), this.#k = !0), this.#G();
1747
1757
  }
1748
1758
  disconnectedCallback() {
1749
- this.#K(), Fe(this.#e), this.#a = !1, this.#A?.(), this.#A = void 0, this.#l && (this.#l.abort(), this.#l = void 0), this.resizeController && this.resizeController.dispose(), this.#b && (this.#b.disconnect(), this.#b = void 0), this.#h = !1;
1759
+ this.#K(), Ue(this.#e), this.#a = !1, this.#A?.(), this.#A = void 0, this.#l && (this.#l.abort(), this.#l = void 0), this.resizeController && this.resizeController.dispose(), this.#b && (this.#b.disconnect(), this.#b = void 0), this.#h = !1;
1750
1760
  }
1751
1761
  #G() {
1752
1762
  const o = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
1753
1763
  if (this.headerRowEl = o?.querySelector(".header-row"), this.virtualization.totalHeightEl = o?.querySelector(".faux-vscroll-spacer"), this.virtualization.viewportEl = o?.querySelector(".rows-viewport"), this.bodyEl = o?.querySelector(".rows"), this.#a) {
1754
- oe(this.#n, this.#e), Ve(this.#n, this.#o?.shell, this.#e);
1764
+ oe(this.#n, this.#e), We(this.#n, this.#o?.shell, this.#e);
1755
1765
  const r = this.#o?.shell?.toolPanel?.defaultOpen;
1756
1766
  r && this.#e.toolPanels.has(r) && (this.openToolPanel(), this.#e.expandedSections.add(r));
1757
1767
  }
1758
1768
  this.setAttribute("data-upgraded", ""), this.#h = !0;
1759
1769
  const n = this.disconnectSignal;
1760
- this.#c(), this.addEventListener("keydown", (r) => ke(this, r), { signal: n }), document.addEventListener(
1770
+ this.#c(), this.addEventListener("keydown", (r) => Pe(this, r), { signal: n }), document.addEventListener(
1761
1771
  "keydown",
1762
1772
  (r) => {
1763
1773
  r.key === "Escape" && this.activeEditRows !== -1 && this.#D(this.activeEditRows, !0);
@@ -1815,7 +1825,7 @@ class G extends HTMLElement {
1815
1825
  { passive: !0, signal: n }
1816
1826
  ));
1817
1827
  }
1818
- this.resizeController = ze(this), this.#n.addEventListener("mousedown", (r) => this.#le(r), { signal: n }), document.addEventListener("mousemove", (r) => this.#ae(r), { signal: n }), document.addEventListener("mouseup", (r) => this.#ce(r), { signal: n }), this.virtualization.enabled && requestAnimationFrame(() => this.refreshVirtualWindow(!0)), requestAnimationFrame(() => {
1828
+ this.resizeController = De(this), this.#n.addEventListener("mousedown", (r) => this.#le(r), { signal: n }), document.addEventListener("mousemove", (r) => this.#ae(r), { signal: n }), document.addEventListener("mouseup", (r) => this.#ce(r), { signal: n }), this.virtualization.enabled && requestAnimationFrame(() => this.refreshVirtualWindow(!0)), requestAnimationFrame(() => {
1819
1829
  const r = this.bodyEl.querySelector(".data-grid-row");
1820
1830
  if (r) {
1821
1831
  const l = r.getBoundingClientRect().height;
@@ -1876,7 +1886,7 @@ class G extends HTMLElement {
1876
1886
  }
1877
1887
  // ---------------- Helper Wrappers ----------------
1878
1888
  #ne() {
1879
- Ae(this);
1889
+ Te(this);
1880
1890
  }
1881
1891
  #T() {
1882
1892
  K(this);
@@ -1885,7 +1895,7 @@ class G extends HTMLElement {
1885
1895
  ce(this);
1886
1896
  }
1887
1897
  #F() {
1888
- Te(this);
1898
+ Le(this);
1889
1899
  }
1890
1900
  #M() {
1891
1901
  if (this.#t) {
@@ -1963,7 +1973,7 @@ class G extends HTMLElement {
1963
1973
  }
1964
1974
  // ---------------- Delegate Wrappers ----------------
1965
1975
  #z(e, o, n = this.__rowRenderEpoch) {
1966
- this.#P || (this.#P = (i, s, r) => this.#t?.renderRow(i, s, r) ?? !1), He(this, e, o, n, this.#P);
1976
+ this.#P || (this.#P = (i, s, r) => this.#t?.renderRow(i, s, r) ?? !1), Me(this, e, o, n, this.#P);
1967
1977
  }
1968
1978
  #ie(e, o) {
1969
1979
  z(this, e, o);
@@ -1992,7 +2002,7 @@ class G extends HTMLElement {
1992
2002
  /** Internal method to apply column state without triggering setup loop */
1993
2003
  #U(e) {
1994
2004
  const o = this.#o.columns ?? [], n = this.#t?.getAll() ?? [];
1995
- he(this, e, o, n);
2005
+ fe(this, e, o, n);
1996
2006
  for (const i of e.columns) {
1997
2007
  const s = o.find((r) => r.field === i.field);
1998
2008
  s && (s.hidden = !i.visible);
@@ -2284,7 +2294,7 @@ class G extends HTMLElement {
2284
2294
  * The event is debounced to avoid excessive events during drag operations.
2285
2295
  */
2286
2296
  requestStateChange() {
2287
- this.#O || (this.#O = fe(
2297
+ this.#O || (this.#O = pe(
2288
2298
  this,
2289
2299
  () => this.#t?.getAll() ?? [],
2290
2300
  (e) => this.#i("column-state-change", e)
@@ -2345,7 +2355,7 @@ class G extends HTMLElement {
2345
2355
  expand: this.#o?.icons?.expand ?? P.expand,
2346
2356
  collapse: this.#o?.icons?.collapse ?? P.collapse
2347
2357
  };
2348
- We(this.#n, this.#e, e), this.#i("tool-panel-open", { sections: this.expandedToolPanelSections });
2358
+ Ge(this.#n, this.#e, e), this.#i("tool-panel-open", { sections: this.expandedToolPanelSections });
2349
2359
  }
2350
2360
  /**
2351
2361
  * Close the tool panel.
@@ -2462,7 +2472,7 @@ class G extends HTMLElement {
2462
2472
  * Get all registered toolbar buttons.
2463
2473
  */
2464
2474
  getToolbarButtons() {
2465
- return Ge(this.#o?.shell, this.#e);
2475
+ return Fe(this.#o?.shell, this.#e);
2466
2476
  }
2467
2477
  /**
2468
2478
  * Register a custom toolbar button programmatically.
@@ -2545,7 +2555,7 @@ class G extends HTMLElement {
2545
2555
  // ---------------- Render ----------------
2546
2556
  #X() {
2547
2557
  te(this, this.#e);
2548
- const e = this.#o?.shell, o = Ne(e, this.#e), n = `
2558
+ const e = this.#o?.shell, o = qe(e, this.#e), n = `
2549
2559
  <div class="tbw-scroll-area">
2550
2560
  <div class="rows-body-wrapper">
2551
2561
  <div class="rows-body" role="grid">
@@ -2568,7 +2578,7 @@ class G extends HTMLElement {
2568
2578
  const i = this.#o?.icons?.toolPanel ?? P.toolPanel, s = {
2569
2579
  expand: this.#o?.icons?.expand ?? P.expand,
2570
2580
  collapse: this.#o?.icons?.collapse ?? P.collapse
2571
- }, r = qe(e, this.#e, i), l = $e(e, this.#e, n, s);
2581
+ }, r = $e(e, this.#e, i), l = Ie(e, this.#e, n, s);
2572
2582
  this.#n.innerHTML = `
2573
2583
  <div class="tbw-grid-root has-shell">
2574
2584
  ${r}
@@ -2588,11 +2598,11 @@ class G extends HTMLElement {
2588
2598
  * Set up shell event listeners after render.
2589
2599
  */
2590
2600
  #he() {
2591
- Ie(this.#n, this.#o?.shell, this.#e, {
2601
+ Be(this.#n, this.#o?.shell, this.#e, {
2592
2602
  onPanelToggle: () => this.toggleToolPanel(),
2593
2603
  onSectionToggle: (e) => this.toggleToolPanelSection(e),
2594
2604
  onToolbarButtonClick: (e) => this.#fe(e)
2595
- }), this.#A?.(), this.#A = Be(this.#n, this.#o?.shell, (e) => {
2605
+ }), this.#A?.(), this.#A = Ve(this.#n, this.#o?.shell, (e) => {
2596
2606
  this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
2597
2607
  });
2598
2608
  }
@@ -2609,8 +2619,8 @@ class G extends HTMLElement {
2609
2619
  i?.action && i.action();
2610
2620
  }
2611
2621
  }
2612
- customElements.get(G.tagName) || customElements.define(G.tagName, G);
2613
- class je {
2622
+ customElements.get(I.tagName) || customElements.define(I.tagName, I);
2623
+ class Ke {
2614
2624
  /** Plugin version - override in subclass if needed */
2615
2625
  version = "1.0.0";
2616
2626
  /** CSS styles to inject into the grid's shadow DOM */
@@ -2764,6 +2774,7 @@ class je {
2764
2774
  warn(e) {
2765
2775
  console.warn(`[tbw-grid:${this.name}] ${e}`);
2766
2776
  }
2777
+ // #endregion
2767
2778
  }
2768
2779
  const A = {
2769
2780
  // Root structure
@@ -2810,14 +2821,14 @@ const A = {
2810
2821
  // Selection
2811
2822
  RANGE_SELECTION: "range-selection",
2812
2823
  SELECTION_OVERLAY: "selection-overlay"
2813
- }, B = {
2824
+ }, V = {
2814
2825
  ROW_INDEX: "data-row-index",
2815
2826
  COL_INDEX: "data-col-index",
2816
2827
  FIELD: "data-field",
2817
2828
  GROUP_KEY: "data-group-key",
2818
2829
  TREE_LEVEL: "data-tree-level",
2819
2830
  STICKY: "data-sticky"
2820
- }, Ke = {
2831
+ }, Ye = {
2821
2832
  ROOT: `.${A.ROOT}`,
2822
2833
  HEADER: `.${A.HEADER}`,
2823
2834
  HEADER_ROW: `.${A.HEADER_ROW}`,
@@ -2828,13 +2839,13 @@ const A = {
2828
2839
  DATA_CELL: `.${A.DATA_CELL}`,
2829
2840
  GROUP_ROW: `.${A.GROUP_ROW}`,
2830
2841
  // By data attribute
2831
- ROW_BY_INDEX: (t) => `.${A.DATA_ROW}[${B.ROW_INDEX}="${t}"]`,
2832
- CELL_BY_FIELD: (t) => `.${A.DATA_CELL}[${B.FIELD}="${t}"]`,
2833
- CELL_AT: (t, e) => `.${A.DATA_ROW}[${B.ROW_INDEX}="${t}"] .${A.DATA_CELL}[${B.COL_INDEX}="${e}"]`,
2842
+ ROW_BY_INDEX: (t) => `.${A.DATA_ROW}[${V.ROW_INDEX}="${t}"]`,
2843
+ CELL_BY_FIELD: (t) => `.${A.DATA_CELL}[${V.FIELD}="${t}"]`,
2844
+ CELL_AT: (t, e) => `.${A.DATA_ROW}[${V.ROW_INDEX}="${t}"] .${A.DATA_CELL}[${V.COL_INDEX}="${e}"]`,
2834
2845
  // State selectors
2835
2846
  SELECTED_ROWS: `.${A.DATA_ROW}.${A.SELECTED}`,
2836
2847
  EDITING_CELL: `.${A.DATA_CELL}.${A.EDITING}`
2837
- }, Ye = {
2848
+ }, Ze = {
2838
2849
  // Colors
2839
2850
  COLOR_BG: "--tbw-color-bg",
2840
2851
  COLOR_FG: "--tbw-color-fg",
@@ -2856,7 +2867,7 @@ const A = {
2856
2867
  // Borders
2857
2868
  BORDER_RADIUS: "--tbw-border-radius",
2858
2869
  FOCUS_OUTLINE: "--tbw-focus-outline"
2859
- }, Ze = {
2870
+ }, Je = {
2860
2871
  CELL_COMMIT: "cell-commit",
2861
2872
  ROW_COMMIT: "row-commit",
2862
2873
  CHANGED_ROWS_RESET: "changed-rows-reset",
@@ -2867,7 +2878,7 @@ const A = {
2867
2878
  ACTIVATE_CELL: "activate-cell",
2868
2879
  GROUP_TOGGLE: "group-toggle",
2869
2880
  COLUMN_STATE_CHANGE: "column-state-change"
2870
- }, Je = {
2881
+ }, Qe = {
2871
2882
  // Selection plugin
2872
2883
  SELECTION_CHANGE: "selection-change",
2873
2884
  // Tree plugin
@@ -2957,33 +2968,33 @@ const A = {
2957
2968
  first: (t) => t[0] ?? 0,
2958
2969
  last: (t) => t[t.length - 1] ?? 0
2959
2970
  };
2960
- function Xe(t) {
2971
+ function je(t) {
2961
2972
  return se[t] ?? se.sum;
2962
2973
  }
2963
- function Qe(t, e) {
2964
- return Xe(t)(e);
2974
+ function et(t, e) {
2975
+ return je(t)(e);
2965
2976
  }
2966
- const et = H.register.bind(H), tt = H.unregister.bind(H), ot = H.get.bind(H), nt = H.run.bind(H), it = H.list.bind(H);
2977
+ const tt = H.register.bind(H), ot = H.unregister.bind(H), nt = H.get.bind(H), it = H.run.bind(H), st = H.list.bind(H);
2967
2978
  export {
2968
- je as BaseGridPlugin,
2979
+ Ke as BaseGridPlugin,
2969
2980
  P as DEFAULT_GRID_ICONS,
2970
- Ze as DGEvents,
2971
- G as DataGridElement,
2981
+ Je as DGEvents,
2982
+ I as DataGridElement,
2972
2983
  q as FitModeEnum,
2973
- Ye as GridCSSVars,
2984
+ Ze as GridCSSVars,
2974
2985
  A as GridClasses,
2975
- B as GridDataAttrs,
2976
- G as GridElement,
2977
- Ke as GridSelectors,
2978
- Je as PluginEvents,
2979
- Ue as PluginManager,
2986
+ V as GridDataAttrs,
2987
+ I as GridElement,
2988
+ Ye as GridSelectors,
2989
+ Qe as PluginEvents,
2990
+ Xe as PluginManager,
2980
2991
  H as aggregatorRegistry,
2981
- ot as getAggregator,
2982
- Xe as getValueAggregator,
2983
- it as listAggregators,
2984
- et as registerAggregator,
2985
- nt as runAggregator,
2986
- Qe as runValueAggregator,
2987
- tt as unregisterAggregator
2992
+ nt as getAggregator,
2993
+ je as getValueAggregator,
2994
+ st as listAggregators,
2995
+ tt as registerAggregator,
2996
+ it as runAggregator,
2997
+ et as runValueAggregator,
2998
+ ot as unregisterAggregator
2988
2999
  };
2989
3000
  //# sourceMappingURL=index.js.map