@toolbox-web/grid 1.9.0 → 1.9.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 (65) hide show
  1. package/all.js +712 -692
  2. package/all.js.map +1 -1
  3. package/index.js +321 -300
  4. package/index.js.map +1 -1
  5. package/lib/core/grid.d.ts +9 -0
  6. package/lib/core/grid.d.ts.map +1 -1
  7. package/lib/core/plugin/base-plugin.d.ts +11 -0
  8. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  9. package/lib/plugins/clipboard/index.js +9 -0
  10. package/lib/plugins/clipboard/index.js.map +1 -1
  11. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +3 -0
  12. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  13. package/lib/plugins/column-virtualization/index.js +90 -57
  14. package/lib/plugins/column-virtualization/index.js.map +1 -1
  15. package/lib/plugins/context-menu/index.js +9 -0
  16. package/lib/plugins/context-menu/index.js.map +1 -1
  17. package/lib/plugins/editing/index.js +9 -0
  18. package/lib/plugins/editing/index.js.map +1 -1
  19. package/lib/plugins/export/index.js +38 -29
  20. package/lib/plugins/export/index.js.map +1 -1
  21. package/lib/plugins/filtering/index.js +14 -5
  22. package/lib/plugins/filtering/index.js.map +1 -1
  23. package/lib/plugins/grouping-columns/index.js +9 -0
  24. package/lib/plugins/grouping-columns/index.js.map +1 -1
  25. package/lib/plugins/grouping-rows/index.js +63 -54
  26. package/lib/plugins/grouping-rows/index.js.map +1 -1
  27. package/lib/plugins/master-detail/index.js +25 -16
  28. package/lib/plugins/master-detail/index.js.map +1 -1
  29. package/lib/plugins/multi-sort/index.js +13 -4
  30. package/lib/plugins/multi-sort/index.js.map +1 -1
  31. package/lib/plugins/pinned-columns/index.js +13 -4
  32. package/lib/plugins/pinned-columns/index.js.map +1 -1
  33. package/lib/plugins/pinned-rows/index.js +9 -0
  34. package/lib/plugins/pinned-rows/index.js.map +1 -1
  35. package/lib/plugins/pivot/index.js +13 -4
  36. package/lib/plugins/pivot/index.js.map +1 -1
  37. package/lib/plugins/print/index.js +9 -0
  38. package/lib/plugins/print/index.js.map +1 -1
  39. package/lib/plugins/reorder/index.js +13 -4
  40. package/lib/plugins/reorder/index.js.map +1 -1
  41. package/lib/plugins/responsive/index.js +42 -33
  42. package/lib/plugins/responsive/index.js.map +1 -1
  43. package/lib/plugins/row-reorder/index.js +10 -1
  44. package/lib/plugins/row-reorder/index.js.map +1 -1
  45. package/lib/plugins/selection/index.js +10 -1
  46. package/lib/plugins/selection/index.js.map +1 -1
  47. package/lib/plugins/server-side/index.js +29 -20
  48. package/lib/plugins/server-side/index.js.map +1 -1
  49. package/lib/plugins/tree/index.js +20 -11
  50. package/lib/plugins/tree/index.js.map +1 -1
  51. package/lib/plugins/undo-redo/index.js +15 -6
  52. package/lib/plugins/undo-redo/index.js.map +1 -1
  53. package/lib/plugins/visibility/index.js +9 -0
  54. package/lib/plugins/visibility/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/umd/grid.all.umd.js +14 -14
  57. package/umd/grid.all.umd.js.map +1 -1
  58. package/umd/grid.umd.js +14 -14
  59. package/umd/grid.umd.js.map +1 -1
  60. package/umd/plugins/column-virtualization.umd.js +1 -1
  61. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  62. package/umd/plugins/row-reorder.umd.js +1 -1
  63. package/umd/plugins/row-reorder.umd.js.map +1 -1
  64. package/umd/plugins/selection.umd.js +1 -1
  65. package/umd/plugins/selection.umd.js.map +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const we = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--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-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--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, #666666);--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-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--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: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm);color-scheme:light dark;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);font-feature-settings:"tnum","lnum";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;&,*{box-sizing:border-box}.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.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)}.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));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.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);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.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:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.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)}.faux-vscroll-spacer{width:1px}.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;content-visibility:auto;contain-intrinsic-size:auto var(--tbw-row-height);&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);line-height:calc(var(--tbw-row-height) - 5px);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}.sortable{cursor:pointer;user-select:none}.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);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.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}.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}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.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);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}.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);&[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)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.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}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.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:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.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}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}@keyframes tbw-spin{to{transform:rotate(360deg)}}.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}}', X = {
1
+ const we = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--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-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--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, #666666);--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-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--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: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm);color-scheme:inherit;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);font-feature-settings:"tnum","lnum";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;&,*{box-sizing:border-box}.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.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)}.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));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.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);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.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:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.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)}.faux-vscroll-spacer{width:1px}.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;content-visibility:auto;contain-intrinsic-size:auto var(--tbw-row-height);&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);line-height:calc(var(--tbw-row-height) - 5px);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}.sortable{cursor:pointer;user-select:none}.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);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.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}.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}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.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);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}.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);&[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)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.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}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.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:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.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}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}@keyframes tbw-spin{to{transform:rotate(360deg)}}.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}}', X = {
2
2
  STRETCH: "stretch",
3
3
  FIXED: "fixed"
4
4
  }, Je = {
@@ -22,37 +22,37 @@ function et(t) {
22
22
  return Array.from(t.querySelectorAll("tbw-grid-column")).map((o) => {
23
23
  const n = o.getAttribute("field") || "";
24
24
  if (!n) return null;
25
- const i = o.getAttribute("type") || void 0, s = i && (/* @__PURE__ */ new Set(["number", "string", "date", "boolean", "select"])).has(i) ? i : void 0, l = o.getAttribute("header") || void 0, a = o.hasAttribute("sortable"), c = o.hasAttribute("editable"), h = { field: n, type: s, header: l, sortable: a, editable: c }, u = o.getAttribute("width");
25
+ const i = o.getAttribute("type") || void 0, s = i && (/* @__PURE__ */ new Set(["number", "string", "date", "boolean", "select"])).has(i) ? i : void 0, l = o.getAttribute("header") || void 0, a = o.hasAttribute("sortable"), c = o.hasAttribute("editable"), d = { field: n, type: s, header: l, sortable: a, editable: c }, u = o.getAttribute("width");
26
26
  if (u) {
27
27
  const m = parseFloat(u);
28
- !isNaN(m) && /^\d+(\.\d+)?$/.test(u.trim()) ? h.width = m : h.width = u;
28
+ !isNaN(m) && /^\d+(\.\d+)?$/.test(u.trim()) ? d.width = m : d.width = u;
29
29
  }
30
30
  const p = o.getAttribute("minWidth") || o.getAttribute("min-width");
31
31
  if (p) {
32
32
  const m = parseFloat(p);
33
- isNaN(m) || (h.minWidth = m);
33
+ isNaN(m) || (d.minWidth = m);
34
34
  }
35
- o.hasAttribute("resizable") && (h.resizable = !0), o.hasAttribute("sizable") && (h.resizable = !0);
35
+ o.hasAttribute("resizable") && (d.resizable = !0), o.hasAttribute("sizable") && (d.resizable = !0);
36
36
  const f = o.getAttribute("editor"), g = o.getAttribute("renderer");
37
- f && (h.__editorName = f), g && (h.__rendererName = g);
38
- const d = o.getAttribute("options");
39
- d && (h.options = d.split(",").map((m) => {
37
+ f && (d.__editorName = f), g && (d.__rendererName = g);
38
+ const h = o.getAttribute("options");
39
+ h && (d.options = h.split(",").map((m) => {
40
40
  const [z, R] = m.includes(":") ? m.split(":") : [m.trim(), m.trim()];
41
41
  return { value: z.trim(), label: R?.trim() || z.trim() };
42
42
  }));
43
43
  const w = o.querySelector("tbw-grid-column-view"), b = o.querySelector("tbw-grid-column-editor"), S = o.querySelector("tbw-grid-column-header");
44
- w && (h.__viewTemplate = w), b && (h.__editorTemplate = b), S && (h.__headerTemplate = S);
44
+ w && (d.__viewTemplate = w), b && (d.__editorTemplate = b), S && (d.__headerTemplate = S);
45
45
  const _ = globalThis.DataGridElement?.getAdapters?.() ?? [], A = w ?? o, v = _.find((m) => m.canHandle(A));
46
46
  if (v) {
47
47
  const m = v.createRenderer(A);
48
- m && (h.viewRenderer = m);
48
+ m && (d.viewRenderer = m);
49
49
  }
50
50
  const E = b ?? o, y = _.find((m) => m.canHandle(E));
51
51
  if (y) {
52
52
  const m = y.createEditor(E);
53
- m && (h.editor = m);
53
+ m && (d.editor = m);
54
54
  }
55
- return h;
55
+ return d;
56
56
  }).filter((o) => !!o);
57
57
  }
58
58
  function me(t, e) {
@@ -100,8 +100,8 @@ function ve(t) {
100
100
  for (const a of t._rowPool) {
101
101
  const c = a.children[r];
102
102
  if (c) {
103
- const h = c.scrollWidth;
104
- h > l && (l = h);
103
+ const d = c.scrollWidth;
104
+ d > l && (l = d);
105
105
  }
106
106
  }
107
107
  l > 0 && (i.width = l + 2, i.__autoSized = !0, n = !0);
@@ -255,7 +255,7 @@ class gt {
255
255
  #s;
256
256
  #v;
257
257
  #r;
258
- #b;
258
+ #w;
259
259
  constructor(e) {
260
260
  this.#r = e;
261
261
  }
@@ -284,10 +284,10 @@ class gt {
284
284
  this.#h = e;
285
285
  }
286
286
  get lightDomTitle() {
287
- return this.#b;
287
+ return this.#w;
288
288
  }
289
289
  set lightDomTitle(e) {
290
- this.#b = e;
290
+ this.#w = e;
291
291
  }
292
292
  get initialColumnState() {
293
293
  return this.#v;
@@ -323,7 +323,7 @@ class gt {
323
323
  const e = (this.#n.columns?.length ?? 0) > 0;
324
324
  if (!this.#f && e)
325
325
  return;
326
- const o = this.#w();
326
+ const o = this.#b();
327
327
  this.#f = !1, this.#a = o, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#n = this.#R(this.#a), this.#H();
328
328
  }
329
329
  #R(e) {
@@ -342,7 +342,7 @@ class gt {
342
342
  n.width == null && (n.width = 80);
343
343
  }), this.#r.applyAnimationConfig(e);
344
344
  }
345
- #w() {
345
+ #b() {
346
346
  const e = this.#l ? { ...this.#l } : {}, o = Array.isArray(e.columns) ? [...e.columns] : [], n = (this.#d ?? []).map((s) => ({
347
347
  ...s
348
348
  }));
@@ -364,7 +364,7 @@ class gt {
364
364
  #C(e) {
365
365
  e.shell = e.shell ? { ...e.shell } : {}, e.shell.header = e.shell.header ? { ...e.shell.header } : {};
366
366
  const o = this.#r.getShellLightDomTitle();
367
- o && (this.#b = o), this.#b && !e.shell.header.title && (e.shell.header.title = this.#b);
367
+ o && (this.#w = o), this.#w && !e.shell.header.title && (e.shell.header.title = this.#w);
368
368
  const n = this.#r.getShellLightDomHeaderContent();
369
369
  n?.length > 0 && (e.shell.header.lightDomContent = n), this.#r.getShellHasToolButtonsContainer() && (e.shell.header.hasToolButtonsContainer = !0);
370
370
  const i = this.#r.getShellToolPanels();
@@ -377,10 +377,10 @@ class gt {
377
377
  const u = Array.from(r.values());
378
378
  u.sort((p, f) => (p.order ?? 100) - (f.order ?? 100)), e.shell.headerContents = u;
379
379
  }
380
- const s = this.#r.getShellToolbarContents(), l = Array.from(s.values()), a = this.#l?.shell?.header?.toolbarContents ?? [], c = new Set(a.map((u) => u.id)), h = [...a];
380
+ const s = this.#r.getShellToolbarContents(), l = Array.from(s.values()), a = this.#l?.shell?.header?.toolbarContents ?? [], c = new Set(a.map((u) => u.id)), d = [...a];
381
381
  for (const u of l)
382
- c.has(u.id) || h.push(u);
383
- h.sort((u, p) => (u.order ?? 0) - (p.order ?? 0)), e.shell.header.toolbarContents = h;
382
+ c.has(u.id) || d.push(u);
383
+ d.sort((u, p) => (u.order ?? 0) - (p.order ?? 0)), e.shell.header.toolbarContents = d;
384
384
  }
385
385
  collectState(e) {
386
386
  const o = this.columns, n = this.#y();
@@ -396,8 +396,8 @@ class gt {
396
396
  a && (s.sort = a);
397
397
  for (const c of e)
398
398
  if (c.getColumnState) {
399
- const h = c.getColumnState(i.field);
400
- h && Object.assign(s, h);
399
+ const d = c.getColumnState(i.field);
400
+ d && Object.assign(s, d);
401
401
  }
402
402
  return s;
403
403
  })
@@ -412,8 +412,8 @@ class gt {
412
412
  return a.width !== void 0 && (c.width = a.width, c.__renderedWidth = a.width), a.visible !== void 0 && (c.hidden = !a.visible), c;
413
413
  });
414
414
  r.sort((l, a) => {
415
- const c = i.get(l.field)?.order ?? 1 / 0, h = i.get(a.field)?.order ?? 1 / 0;
416
- return c - h;
415
+ const c = i.get(l.field)?.order ?? 1 / 0, d = i.get(a.field)?.order ?? 1 / 0;
416
+ return c - d;
417
417
  }), this.columns = r;
418
418
  const s = e.columns.filter((l) => l.sort !== void 0).sort((l, a) => (l.sort?.priority ?? 0) - (a.sort?.priority ?? 0));
419
419
  if (s.length > 0) {
@@ -666,31 +666,31 @@ function Ct(t, e, o, n, i) {
666
666
  }
667
667
  t._rowPool.length = r;
668
668
  }
669
- const h = i && t.__hasRenderRowPlugins !== !1, u = t._hasAfterRowRenderHook?.() ?? !1;
669
+ const d = i && t.__hasRenderRowPlugins !== !1, u = t._hasAfterRowRenderHook?.() ?? !1;
670
670
  for (let p = 0; p < r; p++) {
671
- const f = e + p, g = t._rows[f], d = t._rowPool[p];
672
- if (d.setAttribute("aria-rowindex", String(f + c + 1)), h && i(g, d, f)) {
673
- d.__epoch = n, d.__rowDataRef = g, d.parentNode !== s && s.appendChild(d);
671
+ const f = e + p, g = t._rows[f], h = t._rowPool[p];
672
+ if (h.setAttribute("aria-rowindex", String(f + c + 1)), d && i(g, h, f)) {
673
+ h.__epoch = n, h.__rowDataRef = g, h.parentNode !== s && s.appendChild(h);
674
674
  continue;
675
675
  }
676
- const w = d.__epoch, b = d.__rowDataRef, S = d.children.length, _ = w === n && S === a, A = b !== g;
676
+ const w = h.__epoch, b = h.__rowDataRef, S = h.children.length, _ = w === n && S === a, A = b !== g;
677
677
  let v = !1;
678
678
  if (_ && A) {
679
679
  for (let R = 0; R < a; R++)
680
- if (l[R].externalView && !d.querySelector(`.cell[data-col="${R}"] [data-external-view]`)) {
680
+ if (l[R].externalView && !h.querySelector(`.cell[data-col="${R}"] [data-external-view]`)) {
681
681
  v = !0;
682
682
  break;
683
683
  }
684
684
  }
685
685
  if (!_ || v) {
686
- const R = re(d), x = t._activeEditRows === f;
687
- R && !x ? (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), se(d), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g) : R && x ? (le(t, d, g, f), d.__rowDataRef = g) : (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g);
686
+ const R = re(h), x = t._activeEditRows === f;
687
+ R && !x ? (h.__isCustomRow && (h.className = "data-grid-row", h.setAttribute("role", "row"), h.__isCustomRow = !1), se(h), G(t, h, g, f), h.__epoch = n, h.__rowDataRef = g) : R && x ? (le(t, h, g, f), h.__rowDataRef = g) : (h.__isCustomRow && (h.className = "data-grid-row", h.setAttribute("role", "row"), h.__isCustomRow = !1), G(t, h, g, f), h.__epoch = n, h.__rowDataRef = g);
688
688
  } else if (A) {
689
- const R = re(d), x = t._activeEditRows === f;
690
- R && !x ? (se(d), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g) : (le(t, d, g, f), d.__rowDataRef = g);
689
+ const R = re(h), x = t._activeEditRows === f;
690
+ R && !x ? (se(h), G(t, h, g, f), h.__epoch = n, h.__rowDataRef = g) : (le(t, h, g, f), h.__rowDataRef = g);
691
691
  } else {
692
- const R = re(d), x = t._activeEditRows === f;
693
- R && !x ? (se(d), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g) : le(t, d, g, f);
692
+ const R = re(h), x = t._activeEditRows === f;
693
+ R && !x ? (se(h), G(t, h, g, f), h.__epoch = n, h.__rowDataRef = g) : le(t, h, g, f);
694
694
  }
695
695
  let E = !1;
696
696
  const y = t.changedRowIds;
@@ -700,39 +700,39 @@ function Ct(t, e, o, n, i) {
700
700
  R && (E = y.includes(R));
701
701
  } catch {
702
702
  }
703
- const m = d.classList.contains("changed");
704
- E !== m && d.classList.toggle("changed", E);
703
+ const m = h.classList.contains("changed");
704
+ E !== m && h.classList.toggle("changed", E);
705
705
  const z = t.effectiveConfig?.rowClass;
706
706
  if (z) {
707
- const R = d.getAttribute("data-dynamic-classes");
708
- R && R.split(" ").forEach((x) => x && d.classList.remove(x));
707
+ const R = h.getAttribute("data-dynamic-classes");
708
+ R && R.split(" ").forEach((x) => x && h.classList.remove(x));
709
709
  try {
710
710
  const x = z(g);
711
711
  if (x && x.length > 0) {
712
712
  const ie = x.filter((Y) => Y && typeof Y == "string");
713
- ie.forEach((Y) => d.classList.add(Y)), d.setAttribute("data-dynamic-classes", ie.join(" "));
713
+ ie.forEach((Y) => h.classList.add(Y)), h.setAttribute("data-dynamic-classes", ie.join(" "));
714
714
  } else
715
- d.removeAttribute("data-dynamic-classes");
715
+ h.removeAttribute("data-dynamic-classes");
716
716
  } catch (x) {
717
- console.warn("[tbw-grid] rowClass callback error:", x), d.removeAttribute("data-dynamic-classes");
717
+ console.warn("[tbw-grid] rowClass callback error:", x), h.removeAttribute("data-dynamic-classes");
718
718
  }
719
719
  }
720
720
  u && t._afterRowRender?.({
721
721
  row: g,
722
722
  rowIndex: f,
723
- rowElement: d
724
- }), d.parentNode !== s && s.appendChild(d);
723
+ rowElement: h
724
+ }), h.parentNode !== s && s.appendChild(h);
725
725
  }
726
726
  }
727
727
  function le(t, e, o, n) {
728
- const i = e.children, r = t._visibleColumns, s = r.length, l = i.length, a = s < l ? s : l, c = t._focusRow, h = t._focusCol, u = t._hasAfterCellRenderHook?.() ?? !1;
728
+ const i = e.children, r = t._visibleColumns, s = r.length, l = i.length, a = s < l ? s : l, c = t._focusRow, d = t._focusCol, u = t._hasAfterCellRenderHook?.() ?? !1;
729
729
  let p = t.__hasSpecialColumns;
730
730
  if (p === void 0) {
731
731
  p = !1;
732
- const g = t.effectiveConfig?.typeDefaults, d = t.__frameworkAdapter;
732
+ const g = t.effectiveConfig?.typeDefaults, h = t.__frameworkAdapter;
733
733
  for (let w = 0; w < s; w++) {
734
734
  const b = r[w];
735
- if (b.__viewTemplate || b.__compiledView || b.renderer || b.viewRenderer || b.externalView || b.format || b.type === "date" || b.type === "boolean" || b.type && g?.[b.type]?.renderer || b.type && g?.[b.type]?.format || b.type && d?.getTypeDefault?.(b.type)?.renderer || b.type && d?.getTypeDefault?.(b.type)?.format) {
735
+ if (b.__viewTemplate || b.__compiledView || b.renderer || b.viewRenderer || b.externalView || b.format || b.type === "date" || b.type === "boolean" || b.type && g?.[b.type]?.renderer || b.type && g?.[b.type]?.format || b.type && h?.getTypeDefault?.(b.type)?.renderer || b.type && h?.getTypeDefault?.(b.type)?.format) {
736
736
  p = !0;
737
737
  break;
738
738
  }
@@ -742,18 +742,18 @@ function le(t, e, o, n) {
742
742
  const f = String(n);
743
743
  if (!p) {
744
744
  for (let g = 0; g < a; g++) {
745
- const d = i[g];
746
- if (d.classList.contains("editing")) continue;
745
+ const h = i[g];
746
+ if (h.classList.contains("editing")) continue;
747
747
  const w = r[g], b = o[w.field];
748
- d.textContent = b == null ? "" : String(b), d.getAttribute("data-row") !== f && d.setAttribute("data-row", f);
749
- const S = c === n && h === g, C = d.classList.contains("cell-focus");
750
- S !== C && (d.classList.toggle("cell-focus", S), d.setAttribute("aria-selected", String(S))), u && t._afterCellRender?.({
748
+ h.textContent = b == null ? "" : String(b), h.getAttribute("data-row") !== f && h.setAttribute("data-row", f);
749
+ const S = c === n && d === g, C = h.classList.contains("cell-focus");
750
+ S !== C && (h.classList.toggle("cell-focus", S), h.setAttribute("aria-selected", String(S))), u && t._afterCellRender?.({
751
751
  row: o,
752
752
  rowIndex: n,
753
753
  column: w,
754
754
  colIndex: g,
755
755
  value: b,
756
- cellElement: d,
756
+ cellElement: h,
757
757
  rowElement: e
758
758
  });
759
759
  }
@@ -765,39 +765,39 @@ function le(t, e, o, n) {
765
765
  return;
766
766
  }
767
767
  for (let g = 0; g < a; g++) {
768
- const d = r[g], w = i[g];
768
+ const h = r[g], w = i[g];
769
769
  w.getAttribute("data-row") !== f && w.setAttribute("data-row", f);
770
- const b = c === n && h === g, S = w.classList.contains("cell-focus");
770
+ const b = c === n && d === g, S = w.classList.contains("cell-focus");
771
771
  b !== S && (w.classList.toggle("cell-focus", b), w.setAttribute("aria-selected", String(b)));
772
- const C = d.cellClass;
772
+ const C = h.cellClass;
773
773
  if (C) {
774
774
  const y = w.getAttribute("data-dynamic-classes");
775
775
  y && y.split(" ").forEach((m) => m && w.classList.remove(m));
776
776
  try {
777
- const m = o[d.field], z = C(m, o, d);
777
+ const m = o[h.field], z = C(m, o, h);
778
778
  if (z && z.length > 0) {
779
779
  const R = z.filter((x) => x && typeof x == "string");
780
780
  R.forEach((x) => w.classList.add(x)), w.setAttribute("data-dynamic-classes", R.join(" "));
781
781
  } else
782
782
  w.removeAttribute("data-dynamic-classes");
783
783
  } catch (m) {
784
- console.warn(`[tbw-grid] cellClass callback error for column '${d.field}':`, m), w.removeAttribute("data-dynamic-classes");
784
+ console.warn(`[tbw-grid] cellClass callback error for column '${h.field}':`, m), w.removeAttribute("data-dynamic-classes");
785
785
  }
786
786
  }
787
787
  if (w.classList.contains("editing")) continue;
788
- const _ = $e(t, d);
788
+ const _ = $e(t, h);
789
789
  if (_) {
790
- const y = o[d.field], m = _({
790
+ const y = o[h.field], m = _({
791
791
  row: o,
792
792
  value: y,
793
- field: d.field,
794
- column: d,
793
+ field: h.field,
794
+ column: h,
795
795
  cellEl: w
796
796
  });
797
797
  typeof m == "string" ? w.innerHTML = F(m) : m instanceof Node ? m.parentElement !== w && (w.innerHTML = "", w.appendChild(m)) : m == null && (w.textContent = y == null ? "" : String(y)), u && t._afterCellRender?.({
798
798
  row: o,
799
799
  rowIndex: n,
800
- column: d,
800
+ column: h,
801
801
  colIndex: g,
802
802
  value: y,
803
803
  cellElement: w,
@@ -805,24 +805,24 @@ function le(t, e, o, n) {
805
805
  });
806
806
  continue;
807
807
  }
808
- if (d.__viewTemplate || d.__compiledView || d.externalView)
808
+ if (h.__viewTemplate || h.__compiledView || h.externalView)
809
809
  continue;
810
- const A = o[d.field];
810
+ const A = o[h.field];
811
811
  let v;
812
- const E = Fe(t, d);
812
+ const E = Fe(t, h);
813
813
  if (E) {
814
814
  try {
815
815
  const y = E(A, o);
816
816
  v = y == null ? "" : String(y);
817
817
  } catch (y) {
818
- console.warn(`[tbw-grid] Format error in column '${d.field}':`, y), v = A == null ? "" : String(A);
818
+ console.warn(`[tbw-grid] Format error in column '${h.field}':`, y), v = A == null ? "" : String(A);
819
819
  }
820
820
  w.textContent = v;
821
- } else d.type === "date" ? (v = qe(A), w.textContent = v) : d.type === "boolean" ? w.innerHTML = Ie(!!A) : (v = A == null ? "" : String(A), w.textContent = v);
821
+ } else h.type === "date" ? (v = qe(A), w.textContent = v) : h.type === "boolean" ? w.innerHTML = Ie(!!A) : (v = A == null ? "" : String(A), w.textContent = v);
822
822
  u && t._afterCellRender?.({
823
823
  row: o,
824
824
  rowIndex: n,
825
- column: d,
825
+ column: h,
826
826
  colIndex: g,
827
827
  value: A,
828
828
  cellElement: w,
@@ -832,15 +832,15 @@ function le(t, e, o, n) {
832
832
  }
833
833
  function G(t, e, o, n) {
834
834
  e.innerHTML = "";
835
- const i = t._visibleColumns, r = i.length, s = t._focusRow, l = t._focusCol, a = t, c = t._hasAfterCellRenderHook?.() ?? !1, h = document.createDocumentFragment();
835
+ const i = t._visibleColumns, r = i.length, s = t._focusRow, l = t._focusCol, a = t, c = t._hasAfterCellRenderHook?.() ?? !1, d = document.createDocumentFragment();
836
836
  for (let u = 0; u < r; u++) {
837
837
  const p = i[u], f = mt();
838
838
  f.setAttribute("aria-colindex", String(u + 1)), f.setAttribute("data-col", String(u)), f.setAttribute("data-row", String(n)), f.setAttribute("data-field", p.field), f.setAttribute("data-header", p.header ?? p.field), p.type && f.setAttribute("data-type", p.type);
839
839
  let g = o[p.field];
840
- const d = Fe(t, p);
841
- if (d)
840
+ const h = Fe(t, p);
841
+ if (h)
842
842
  try {
843
- g = d(g, o);
843
+ g = h(g, o);
844
844
  } catch (v) {
845
845
  console.warn(`[tbw-grid] Format error in column '${p.field}':`, v);
846
846
  }
@@ -881,7 +881,7 @@ function G(t, e, o, n) {
881
881
  const v = b.innerHTML;
882
882
  /Reflect\.|\bProxy\b|ownKeys\(/.test(v) ? (f.textContent = "", f.setAttribute("data-blocked-template", "")) : (f.innerHTML = F(Ne(v, { row: o, value: g })), _ = !0);
883
883
  } else
884
- d ? f.textContent = g == null ? "" : String(g) : p.type === "date" ? f.textContent = qe(g) : p.type === "boolean" ? f.innerHTML = Ie(!!g) : f.textContent = g == null ? "" : String(g);
884
+ h ? f.textContent = g == null ? "" : String(g) : p.type === "date" ? f.textContent = qe(g) : p.type === "boolean" ? f.innerHTML = Ie(!!g) : f.textContent = g == null ? "" : String(g);
885
885
  if (_) {
886
886
  ft(f);
887
887
  const v = f.textContent || "";
@@ -907,9 +907,9 @@ function G(t, e, o, n) {
907
907
  value: g,
908
908
  cellElement: f,
909
909
  rowElement: e
910
- }), h.appendChild(f);
910
+ }), d.appendChild(f);
911
911
  }
912
- e.appendChild(h);
912
+ e.appendChild(d);
913
913
  }
914
914
  function Ee(t, e, o) {
915
915
  if (e.target?.closest(".resize-handle")) return;
@@ -941,10 +941,10 @@ function Ee(t, e, o) {
941
941
  function yt(t, e) {
942
942
  if (t._dispatchKeyDown?.(e))
943
943
  return;
944
- const o = t._rows.length - 1, n = t._visibleColumns.length - 1, i = t._activeEditRows !== void 0 && t._activeEditRows !== -1, s = t._visibleColumns[t._focusCol]?.type, l = e.composedPath?.() ?? [], a = l.length ? l[0] : e.target, c = (h) => {
945
- if (!h) return !1;
946
- const u = h.tagName;
947
- return !!(u === "INPUT" || u === "SELECT" || u === "TEXTAREA" || h.isContentEditable);
944
+ const o = t._rows.length - 1, n = t._visibleColumns.length - 1, i = t._activeEditRows !== void 0 && t._activeEditRows !== -1, s = t._visibleColumns[t._focusCol]?.type, l = e.composedPath?.() ?? [], a = l.length ? l[0] : e.target, c = (d) => {
945
+ if (!d) return !1;
946
+ const u = d.tagName;
947
+ return !!(u === "INPUT" || u === "SELECT" || u === "TEXTAREA" || d.isContentEditable);
948
948
  };
949
949
  if (!(c(a) && (e.key === "Home" || e.key === "End")) && !(c(a) && (e.key === "ArrowUp" || e.key === "ArrowDown") && a.tagName === "INPUT" && a.type === "number") && !(c(a) && (e.key === "ArrowLeft" || e.key === "ArrowRight")) && !(c(a) && (e.key === "Enter" || e.key === "Escape")) && !(i && s === "select" && (e.key === "ArrowDown" || e.key === "ArrowUp"))) {
950
950
  switch (e.key) {
@@ -979,13 +979,13 @@ function yt(t, e) {
979
979
  t._focusRow = Math.max(0, t._focusRow - 20), e.preventDefault();
980
980
  break;
981
981
  case "Enter": {
982
- const h = t._focusRow, u = t._focusCol, p = t._visibleColumns[u], f = t._rows[h], g = p?.field ?? "", d = g && f ? f[g] : void 0, w = t.querySelector(
983
- `[data-row="${h}"][data-col="${u}"]`
982
+ const d = t._focusRow, u = t._focusCol, p = t._visibleColumns[u], f = t._rows[d], g = p?.field ?? "", h = g && f ? f[g] : void 0, w = t.querySelector(
983
+ `[data-row="${d}"][data-col="${u}"]`
984
984
  ), b = {
985
- rowIndex: h,
985
+ rowIndex: d,
986
986
  colIndex: u,
987
987
  field: g,
988
- value: d,
988
+ value: h,
989
989
  row: f,
990
990
  cellEl: w,
991
991
  trigger: "keyboard",
@@ -997,7 +997,7 @@ function yt(t, e) {
997
997
  t.dispatchEvent(S);
998
998
  const C = new CustomEvent("activate-cell", {
999
999
  cancelable: !0,
1000
- detail: { row: h, col: u }
1000
+ detail: { row: d, col: u }
1001
1001
  });
1002
1002
  if (t.dispatchEvent(C), S.defaultPrevented || C.defaultPrevented) {
1003
1003
  e.preventDefault();
@@ -1013,10 +1013,10 @@ function yt(t, e) {
1013
1013
  }
1014
1014
  function $(t, e) {
1015
1015
  if (t._virtualization?.enabled) {
1016
- const { rowHeight: s, container: l, viewportEl: a } = t._virtualization, c = l, h = a?.clientHeight ?? c?.clientHeight ?? 0;
1017
- if (c && h > 0) {
1016
+ const { rowHeight: s, container: l, viewportEl: a } = t._virtualization, c = l, d = a?.clientHeight ?? c?.clientHeight ?? 0;
1017
+ if (c && d > 0) {
1018
1018
  const u = t._focusRow * s;
1019
- u < c.scrollTop ? c.scrollTop = u : u + s > c.scrollTop + h && (c.scrollTop = u - h + s);
1019
+ u < c.scrollTop ? c.scrollTop = u : u + s > c.scrollTop + d && (c.scrollTop = u - d + s);
1020
1020
  }
1021
1021
  }
1022
1022
  const o = t._activeEditRows !== void 0 && t._activeEditRows !== -1;
@@ -1038,8 +1038,8 @@ function $(t, e) {
1038
1038
  else {
1039
1039
  const c = t._getHorizontalScrollOffsets?.(s ?? void 0, l) ?? { left: 0, right: 0 };
1040
1040
  if (!c.skipScroll) {
1041
- const h = l.getBoundingClientRect(), u = a.getBoundingClientRect(), p = h.left - u.left + a.scrollLeft, f = p + h.width, g = a.scrollLeft + c.left, d = a.scrollLeft + a.clientWidth - c.right;
1042
- p < g ? a.scrollLeft = p - c.left : f > d && (a.scrollLeft = f - a.clientWidth + c.right);
1041
+ const d = l.getBoundingClientRect(), u = a.getBoundingClientRect(), p = d.left - u.left + a.scrollLeft, f = p + d.width, g = a.scrollLeft + c.left, h = a.scrollLeft + a.clientWidth - c.right;
1042
+ p < g ? a.scrollLeft = p - c.left : f > h && (a.scrollLeft = f - a.clientWidth + c.right);
1043
1043
  }
1044
1044
  }
1045
1045
  if (t._activeEditRows !== void 0 && t._activeEditRows !== -1 && l.classList.contains("editing")) {
@@ -1068,16 +1068,16 @@ function pe(t, e, o, n) {
1068
1068
  let i = null;
1069
1069
  const r = o.composedPath?.();
1070
1070
  if (r && r.length > 0 ? i = r[0] : i = o.target, i && !e.contains(i)) {
1071
- const d = document.elementFromPoint(o.clientX, o.clientY);
1072
- d && (i = d);
1071
+ const h = document.elementFromPoint(o.clientX, o.clientY);
1072
+ h && (i = h);
1073
1073
  }
1074
1074
  const s = i?.closest?.("[data-col]"), l = i?.closest?.(".data-grid-row"), a = i?.closest?.(".header-row");
1075
- let c, h, u, p, f, g;
1076
- return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), h = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && h >= 0 && (u = t._rows[c], g = t._columns[h], p = g?.field, f = u && p ? u[p] : void 0)), {
1075
+ let c, d, u, p, f, g;
1076
+ return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), d = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && d >= 0 && (u = t._rows[c], g = t._columns[d], p = g?.field, f = u && p ? u[p] : void 0)), {
1077
1077
  type: n,
1078
1078
  row: u,
1079
1079
  rowIndex: c !== void 0 && c >= 0 ? c : void 0,
1080
- colIndex: h !== void 0 && h >= 0 ? h : void 0,
1080
+ colIndex: d !== void 0 && d >= 0 ? d : void 0,
1081
1081
  field: p,
1082
1082
  value: f,
1083
1083
  column: g,
@@ -1085,7 +1085,7 @@ function pe(t, e, o, n) {
1085
1085
  cellElement: s ?? void 0,
1086
1086
  rowElement: l ?? void 0,
1087
1087
  isHeader: !!a,
1088
- cell: c !== void 0 && h !== void 0 && c >= 0 && h >= 0 ? { row: c, col: h } : void 0
1088
+ cell: c !== void 0 && d !== void 0 && c >= 0 && d >= 0 ? { row: c, col: d } : void 0
1089
1089
  };
1090
1090
  }
1091
1091
  function Et(t, e, o) {
@@ -1220,8 +1220,8 @@ function ne(t) {
1220
1220
  const a = {
1221
1221
  column: o,
1222
1222
  value: r
1223
- }, c = o.headerLabelRenderer(a), h = document.createElement("span");
1224
- c == null ? h.textContent = r : typeof c == "string" ? h.innerHTML = F(c) : c instanceof Node && h.appendChild(c), i.appendChild(h), U(t, o) && (J(t, o, n, i), i.appendChild(Q(t, o))), K(t, o) && (i.classList.add("resizable"), i.appendChild(Z(t, n, i)));
1223
+ }, c = o.headerLabelRenderer(a), d = document.createElement("span");
1224
+ c == null ? d.textContent = r : typeof c == "string" ? d.innerHTML = F(c) : c instanceof Node && d.appendChild(c), i.appendChild(d), U(t, o) && (J(t, o, n, i), i.appendChild(Q(t, o))), K(t, o) && (i.classList.add("resizable"), i.appendChild(Z(t, n, i)));
1225
1225
  } else if (o.__headerTemplate)
1226
1226
  Array.from(o.__headerTemplate.childNodes).forEach((a) => i.appendChild(a.cloneNode(!0))), U(t, o) && (J(t, o, n, i), i.appendChild(Q(t, o))), K(t, o) && (i.classList.add("resizable"), i.appendChild(Z(t, n, i)));
1227
1227
  else {
@@ -1294,11 +1294,11 @@ function Te(t) {
1294
1294
  let e = null, o = null, n = null, i = null;
1295
1295
  const r = (a) => {
1296
1296
  if (!e) return;
1297
- const c = a.clientX - e.startX, h = Math.max(40, e.startWidth + c), u = t._visibleColumns[e.colIndex];
1298
- u.width = h, u.__userResized = !0, u.__renderedWidth = h, o == null && (o = requestAnimationFrame(() => {
1297
+ const c = a.clientX - e.startX, d = Math.max(40, e.startWidth + c), u = t._visibleColumns[e.colIndex];
1298
+ u.width = d, u.__userResized = !0, u.__renderedWidth = d, o == null && (o = requestAnimationFrame(() => {
1299
1299
  o = null, t.updateTemplate?.();
1300
1300
  })), t.dispatchEvent(
1301
- new CustomEvent("column-resize", { detail: { field: u.field, width: h } })
1301
+ new CustomEvent("column-resize", { detail: { field: u.field, width: d } })
1302
1302
  );
1303
1303
  };
1304
1304
  let s = !1;
@@ -1312,9 +1312,9 @@ function Te(t) {
1312
1312
  get isResizing() {
1313
1313
  return e !== null || s;
1314
1314
  },
1315
- start(a, c, h) {
1315
+ start(a, c, d) {
1316
1316
  a.preventDefault();
1317
- const u = t._visibleColumns[c], p = typeof u?.width == "number" ? u.width : void 0, f = u?.__renderedWidth ?? p ?? h.getBoundingClientRect().width;
1317
+ const u = t._visibleColumns[c], p = typeof u?.width == "number" ? u.width : void 0, f = u?.__renderedWidth ?? p ?? d.getBoundingClientRect().width;
1318
1318
  e = { startX: a.clientX, colIndex: c, startWidth: f }, window.addEventListener("mousemove", r), window.addEventListener("mouseup", l), n === null && (n = document.documentElement.style.cursor), document.documentElement.style.cursor = "e-resize", i === null && (i = document.body.style.userSelect), document.body.style.userSelect = "none";
1319
1319
  },
1320
1320
  resetColumn(a) {
@@ -1487,7 +1487,7 @@ function Ft(t) {
1487
1487
  );
1488
1488
  const l = H("tbw-tool-panel-content", { role: "presentation" }), a = H("tbw-accordion");
1489
1489
  for (const c of t.panels) {
1490
- const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = H(h, { "data-section": c.id }), p = Xe("tbw-accordion-header", {
1490
+ const d = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = H(d, { "data-section": c.id }), p = Xe("tbw-accordion-header", {
1491
1491
  "aria-expanded": String(c.isExpanded),
1492
1492
  "aria-controls": `tbw-section-${c.id}`
1493
1493
  });
@@ -1537,16 +1537,16 @@ function Ke(t) {
1537
1537
  return !!(t?.header?.title || t?.header?.toolbarContents?.length || t?.toolPanels?.length || t?.headerContents?.length || t?.header?.lightDomContent?.length || t?.header?.hasToolButtonsContainer);
1538
1538
  }
1539
1539
  function Le(t, e, o = "☰") {
1540
- const n = t?.header?.title ?? e.lightDomTitle ?? "", i = !!n, r = N(o), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], a = new Set(s.map((d) => d.id)), c = [...s];
1541
- for (const d of l)
1542
- a.has(d.id) || c.push(d);
1543
- const h = c.length > 0, u = e.toolPanels.size > 0, p = h && u, f = [...c].sort((d, w) => (d.order ?? 0) - (w.order ?? 0));
1540
+ const n = t?.header?.title ?? e.lightDomTitle ?? "", i = !!n, r = N(o), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], a = new Set(s.map((h) => h.id)), c = [...s];
1541
+ for (const h of l)
1542
+ a.has(h.id) || c.push(h);
1543
+ const d = c.length > 0, u = e.toolPanels.size > 0, p = d && u, f = [...c].sort((h, w) => (h.order ?? 0) - (w.order ?? 0));
1544
1544
  let g = "";
1545
- for (const d of f)
1546
- g += `<div class="tbw-toolbar-content-slot" data-toolbar-content="${d.id}"></div>`;
1545
+ for (const h of f)
1546
+ g += `<div class="tbw-toolbar-content-slot" data-toolbar-content="${h.id}"></div>`;
1547
1547
  if (p && (g += '<div class="tbw-toolbar-separator"></div>'), u) {
1548
- const d = e.isPanelOpen;
1549
- g += `<button class="${d ? "tbw-toolbar-btn active" : "tbw-toolbar-btn"}" data-panel-toggle title="Settings" aria-label="Toggle settings panel" aria-pressed="${d}" aria-controls="tbw-tool-panel">${r}</button>`;
1548
+ const h = e.isPanelOpen;
1549
+ g += `<button class="${h ? "tbw-toolbar-btn active" : "tbw-toolbar-btn"}" data-panel-toggle title="Settings" aria-label="Toggle settings panel" aria-pressed="${h}" aria-controls="tbw-tool-panel">${r}</button>`;
1550
1550
  }
1551
1551
  return `
1552
1552
  <div class="tbw-shell-header" part="shell-header" role="presentation">
@@ -1593,24 +1593,24 @@ function W(t, e, o) {
1593
1593
  );
1594
1594
  return;
1595
1595
  }
1596
- const a = r.getAttribute("icon") ?? void 0, c = r.getAttribute("tooltip") ?? void 0, h = parseInt(r.getAttribute("order") ?? "100", 10);
1596
+ const a = r.getAttribute("icon") ?? void 0, c = r.getAttribute("tooltip") ?? void 0, d = parseInt(r.getAttribute("order") ?? "100", 10);
1597
1597
  let u;
1598
1598
  const p = o?.(r);
1599
1599
  if (p)
1600
1600
  u = p;
1601
1601
  else {
1602
- const d = r.innerHTML.trim();
1602
+ const h = r.innerHTML.trim();
1603
1603
  u = (w) => {
1604
1604
  const b = document.createElement("div");
1605
- return b.innerHTML = d, w.appendChild(b), () => b.remove();
1605
+ return b.innerHTML = h, w.appendChild(b), () => b.remove();
1606
1606
  };
1607
1607
  }
1608
1608
  const f = e.toolPanels.get(s);
1609
1609
  if (f) {
1610
1610
  if (p) {
1611
- f.render = u, f.order = h, f.icon = a, f.tooltip = c;
1612
- const d = e.panelCleanups.get(s);
1613
- d && (d(), e.panelCleanups.delete(s));
1611
+ f.render = u, f.order = d, f.icon = a, f.tooltip = c;
1612
+ const h = e.panelCleanups.get(s);
1613
+ h && (h(), e.panelCleanups.delete(s));
1614
1614
  }
1615
1615
  return;
1616
1616
  }
@@ -1619,7 +1619,7 @@ function W(t, e, o) {
1619
1619
  title: l,
1620
1620
  icon: a,
1621
1621
  tooltip: c,
1622
- order: h,
1622
+ order: d,
1623
1623
  render: u
1624
1624
  };
1625
1625
  e.toolPanels.set(s, g), e.lightDomToolPanelIds.add(s), r.style.display = "none";
@@ -1637,8 +1637,8 @@ function Vt(t, e, o, n) {
1637
1637
  r && r.addEventListener("click", (s) => {
1638
1638
  const a = s.target.closest(".tbw-accordion-header");
1639
1639
  if (a) {
1640
- const h = a.closest("[data-section]")?.getAttribute("data-section");
1641
- h && n.onSectionToggle(h);
1640
+ const d = a.closest("[data-section]")?.getAttribute("data-section");
1641
+ d && n.onSectionToggle(d);
1642
1642
  }
1643
1643
  });
1644
1644
  }
@@ -1648,19 +1648,19 @@ function Bt(t, e, o) {
1648
1648
  return () => {
1649
1649
  };
1650
1650
  const s = e?.toolPanel?.position ?? "right", l = 200;
1651
- let a = 0, c = 0, h = 0, u = !1;
1652
- const p = (d) => {
1651
+ let a = 0, c = 0, d = 0, u = !1;
1652
+ const p = (h) => {
1653
1653
  if (!u) return;
1654
- d.preventDefault();
1655
- const w = s === "left" ? d.clientX - a : a - d.clientX, b = Math.min(h, Math.max(l, c + w));
1654
+ h.preventDefault();
1655
+ const w = s === "left" ? h.clientX - a : a - h.clientX, b = Math.min(d, Math.max(l, c + w));
1656
1656
  n.style.width = `${b}px`;
1657
1657
  }, f = () => {
1658
1658
  if (!u) return;
1659
1659
  u = !1, i.classList.remove("resizing"), n.style.transition = "", document.body.style.cursor = "", document.body.style.userSelect = "";
1660
- const d = n.getBoundingClientRect().width;
1661
- o(d), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f);
1662
- }, g = (d) => {
1663
- d.preventDefault(), u = !0, a = d.clientX, c = n.getBoundingClientRect().width, h = r.getBoundingClientRect().width - 20, i.classList.add("resizing"), n.style.transition = "none", document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", p), document.addEventListener("mouseup", f);
1660
+ const h = n.getBoundingClientRect().width;
1661
+ o(h), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f);
1662
+ }, g = (h) => {
1663
+ h.preventDefault(), u = !0, a = h.clientX, c = n.getBoundingClientRect().width, d = r.getBoundingClientRect().width - 20, i.classList.add("resizing"), n.style.transition = "none", document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", p), document.addEventListener("mouseup", f);
1664
1664
  };
1665
1665
  return i.addEventListener("mousedown", g), () => {
1666
1666
  i.removeEventListener("mousedown", g), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f);
@@ -1705,8 +1705,8 @@ function Gt(t, e, o) {
1705
1705
  const l = e.expandedSections.has(r), a = t.querySelector(`[data-section="${r}"]`), c = a?.querySelector(".tbw-accordion-content");
1706
1706
  if (!a || !c) continue;
1707
1707
  a.classList.toggle("expanded", l);
1708
- const h = a.querySelector(".tbw-accordion-header");
1709
- h && h.setAttribute("aria-expanded", String(l));
1708
+ const d = a.querySelector(".tbw-accordion-header");
1709
+ d && d.setAttribute("aria-expanded", String(l));
1710
1710
  const u = a.querySelector(".tbw-accordion-chevron");
1711
1711
  if (u && (u.innerHTML = l ? i : n), l) {
1712
1712
  if (c.children.length === 0) {
@@ -1804,8 +1804,8 @@ function Yt(t, e) {
1804
1804
  } else {
1805
1805
  for (const [a, c] of t.toolPanels)
1806
1806
  if (a !== i && t.expandedSections.has(a)) {
1807
- const h = t.panelCleanups.get(a);
1808
- h && (h(), t.panelCleanups.delete(a)), c.onClose?.(), t.expandedSections.delete(a), ce(s, a, !1);
1807
+ const d = t.panelCleanups.get(a);
1808
+ d && (d(), t.panelCleanups.delete(a)), c.onClose?.(), t.expandedSections.delete(a), ce(s, a, !1);
1809
1809
  const u = s.querySelector(`[data-section="${a}"] .tbw-accordion-content`);
1810
1810
  u && (u.innerHTML = "");
1811
1811
  }
@@ -1901,7 +1901,7 @@ function Kt(t, e, o, n) {
1901
1901
  hasRender: !!C.render
1902
1902
  })),
1903
1903
  apiButtons: []
1904
- }, d = {
1904
+ }, h = {
1905
1905
  position: e?.toolPanel?.position ?? "right",
1906
1906
  isPanelOpen: o.isPanelOpen,
1907
1907
  expandIcon: a,
@@ -1912,7 +1912,7 @@ function Kt(t, e, o, n) {
1912
1912
  icon: N(C.icon),
1913
1913
  isExpanded: o.expandedSections.has(C.id)
1914
1914
  }))
1915
- }, w = $t(g), b = Ft(d), S = Pe({
1915
+ }, w = $t(g), b = Ft(h), S = Pe({
1916
1916
  hasShell: !0,
1917
1917
  shellHeader: w,
1918
1918
  shellBody: b
@@ -1955,15 +1955,15 @@ function eo(t, e, o) {
1955
1955
  return !1;
1956
1956
  const n = t.touches[0], i = n.clientY, r = n.clientX, s = performance.now(), l = e.startY - i, a = e.startX - r;
1957
1957
  if (e.lastTime !== null && e.lastY !== null && e.lastX !== null) {
1958
- const d = s - e.lastTime;
1959
- d > 0 && (e.velocityY = (e.lastY - i) / d, e.velocityX = (e.lastX - r) / d);
1958
+ const h = s - e.lastTime;
1959
+ h > 0 && (e.velocityY = (e.lastY - i) / h, e.velocityX = (e.lastX - r) / h);
1960
1960
  }
1961
1961
  e.lastY = i, e.lastX = r, e.lastTime = s;
1962
- const { scrollTop: c, scrollHeight: h, clientHeight: u } = o.fauxScrollbar, p = h - u, f = l > 0 && c < p || l < 0 && c > 0;
1962
+ const { scrollTop: c, scrollHeight: d, clientHeight: u } = o.fauxScrollbar, p = d - u, f = l > 0 && c < p || l < 0 && c > 0;
1963
1963
  let g = !1;
1964
1964
  if (o.scrollArea) {
1965
- const { scrollLeft: d, scrollWidth: w, clientWidth: b } = o.scrollArea, S = w - b;
1966
- g = a > 0 && d < S || a < 0 && d > 0;
1965
+ const { scrollLeft: h, scrollWidth: w, clientWidth: b } = o.scrollArea, S = w - b;
1966
+ g = a > 0 && h < S || a < 0 && h > 0;
1967
1967
  }
1968
1968
  return f && (o.fauxScrollbar.scrollTop = e.scrollTop + l), g && o.scrollArea && (o.scrollArea.scrollLeft = e.scrollLeft + a), f || g;
1969
1969
  }
@@ -2077,10 +2077,10 @@ function Me(t, e) {
2077
2077
  }
2078
2078
  function lo(t, e) {
2079
2079
  const o = io, n = ro, i = /* @__PURE__ */ new Map();
2080
- function r(l, a, c, h, u = !1) {
2080
+ function r(l, a, c, d, u = !1) {
2081
2081
  i.has(l) || i.set(l, { description: a, importHint: c, fields: [], isConfigProperty: u });
2082
2082
  const p = i.get(l);
2083
- p.fields.includes(h) || p.fields.push(h);
2083
+ p.fields.includes(d) || p.fields.push(d);
2084
2084
  }
2085
2085
  for (const l of n) {
2086
2086
  const a = t[l.property];
@@ -2098,12 +2098,12 @@ function lo(t, e) {
2098
2098
  }
2099
2099
  if (i.size > 0) {
2100
2100
  const l = [];
2101
- for (const [a, { description: c, importHint: h, fields: u, isConfigProperty: p }] of i)
2101
+ for (const [a, { description: c, importHint: d, fields: u, isConfigProperty: p }] of i)
2102
2102
  if (p)
2103
2103
  l.push(
2104
2104
  `Config uses ${c}, but the required plugin is not loaded.
2105
2105
  → Add the plugin to your gridConfig.plugins array:
2106
- ${h}
2106
+ ${d}
2107
2107
  plugins: [new ${a.charAt(0).toUpperCase() + a.slice(1)}Plugin(), ...]`
2108
2108
  );
2109
2109
  else {
@@ -2111,7 +2111,7 @@ function lo(t, e) {
2111
2111
  l.push(
2112
2112
  `Column(s) [${f}] use ${c}, but the required plugin is not loaded.
2113
2113
  → Add the plugin to your gridConfig.plugins array:
2114
- ${h}
2114
+ ${d}
2115
2115
  plugins: [new ${a.charAt(0).toUpperCase() + a.slice(1)}Plugin(), ...]`
2116
2116
  );
2117
2117
  }
@@ -2153,13 +2153,13 @@ function co(t, e) {
2153
2153
  const o = t.name, i = t.constructor.dependencies ?? [];
2154
2154
  for (const r of i) {
2155
2155
  const s = r.name, l = r.required ?? !0, a = r.reason;
2156
- if (!e.some((h) => h.name === s)) {
2157
- const h = a ?? `${O(o)}Plugin requires ${O(s)}Plugin`, u = ue(s);
2156
+ if (!e.some((d) => d.name === s)) {
2157
+ const d = a ?? `${O(o)}Plugin requires ${O(s)}Plugin`, u = ue(s);
2158
2158
  if (l)
2159
2159
  throw new Error(
2160
2160
  `[tbw-grid] Plugin dependency error:
2161
2161
 
2162
- ${h}.
2162
+ ${d}.
2163
2163
 
2164
2164
  → Add the plugin to your gridConfig.plugins array BEFORE ${O(o)}Plugin:
2165
2165
  ${u}
@@ -2456,7 +2456,7 @@ class uo {
2456
2456
  }
2457
2457
  class L extends HTMLElement {
2458
2458
  static tagName = "tbw-grid";
2459
- static version = "1.9.0";
2459
+ static version = "1.9.2";
2460
2460
  static #l = 0;
2461
2461
  static adapters = [];
2462
2462
  static registerAdapter(e) {
@@ -2492,14 +2492,14 @@ class L extends HTMLElement {
2492
2492
  #s;
2493
2493
  #v = 0;
2494
2494
  #r = null;
2495
- #b = !1;
2495
+ #w = !1;
2496
2496
  #R;
2497
2497
  #H = Qt();
2498
- #w;
2498
+ #b;
2499
2499
  #C;
2500
2500
  #y;
2501
2501
  #p;
2502
- #pe = {
2502
+ #J = {
2503
2503
  scrollTop: 0,
2504
2504
  scrollLeft: 0,
2505
2505
  scrollHeight: 0,
@@ -2511,6 +2511,7 @@ class L extends HTMLElement {
2511
2511
  #_;
2512
2512
  #M = !1;
2513
2513
  #D;
2514
+ #F;
2514
2515
  #O;
2515
2516
  #t;
2516
2517
  #e = Ut();
@@ -2522,7 +2523,7 @@ class L extends HTMLElement {
2522
2523
  #N;
2523
2524
  #E = /* @__PURE__ */ new Map();
2524
2525
  _rows = [];
2525
- #F = [];
2526
+ #U = [];
2526
2527
  get _columns() {
2527
2528
  return this.#n.columns ?? [];
2528
2529
  }
@@ -2604,16 +2605,16 @@ class L extends HTMLElement {
2604
2605
  }
2605
2606
  set loading(e) {
2606
2607
  const o = this.#k;
2607
- this.#k = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), o !== e && this.#De();
2608
+ this.#k = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), o !== e && this.#Oe();
2608
2609
  }
2609
2610
  setRowLoading(e, o) {
2610
2611
  const n = this.#x.has(e);
2611
- o ? this.#x.add(e) : this.#x.delete(e), n !== o && this.#he(e, o);
2612
+ o ? this.#x.add(e) : this.#x.delete(e), n !== o && this.#fe(e, o);
2612
2613
  }
2613
2614
  setCellLoading(e, o, n) {
2614
2615
  let i = this.#A.get(e);
2615
2616
  const r = i?.has(o) ?? !1;
2616
- n ? (i || (i = /* @__PURE__ */ new Set(), this.#A.set(e, i)), i.add(o)) : (i?.delete(o), i?.size === 0 && this.#A.delete(e)), r !== n && this.#ue(e, o, n);
2617
+ n ? (i || (i = /* @__PURE__ */ new Set(), this.#A.set(e, i)), i.add(o)) : (i?.delete(o), i?.size === 0 && this.#A.delete(e)), r !== n && this.#pe(e, o, n);
2617
2618
  }
2618
2619
  isRowLoading(e) {
2619
2620
  return this.#x.has(e);
@@ -2624,31 +2625,31 @@ class L extends HTMLElement {
2624
2625
  clearAllLoading() {
2625
2626
  this.loading = !1;
2626
2627
  for (const e of this.#x)
2627
- this.#he(e, !1);
2628
+ this.#fe(e, !1);
2628
2629
  this.#x.clear();
2629
2630
  for (const [e, o] of this.#A)
2630
2631
  for (const n of o)
2631
- this.#ue(e, n, !1);
2632
+ this.#pe(e, n, !1);
2632
2633
  this.#A.clear();
2633
2634
  }
2634
2635
  get effectiveConfig() {
2635
2636
  return this.#n;
2636
2637
  }
2637
2638
  get disconnectSignal() {
2638
- return this.#w || (this.#w = new AbortController()), this.#w.signal;
2639
+ return this.#b || (this.#b = new AbortController()), this.#b.signal;
2639
2640
  }
2640
2641
  constructor() {
2641
- super(), this.#we(), this.#d = new Promise((e) => this.#h = e), this.#s = new Ot({
2642
+ super(), this.#be(), this.#d = new Promise((e) => this.#h = e), this.#s = new Ot({
2642
2643
  mergeConfig: () => {
2643
- this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), lo(this.#n, this.#o?.getPlugins() ?? []), ao(this.#o?.getPlugins() ?? []), ho(this.#o?.getPlugins() ?? []), this.#Pe(), this.#F = [...this._columns];
2644
+ this.#t.parseLightDomColumns(this), this.#t.merge(), this.#oe(), lo(this.#n, this.#o?.getPlugins() ?? []), ao(this.#o?.getPlugins() ?? []), ho(this.#o?.getPlugins() ?? []), this.#Le(), this.#U = [...this._columns];
2644
2645
  },
2645
- processColumns: () => this.#xe(),
2646
- processRows: () => this.#Ae(),
2646
+ processColumns: () => this.#Ae(),
2647
+ processRows: () => this.#Te(),
2647
2648
  renderHeader: () => ne(this),
2648
2649
  updateTemplate: () => B(this),
2649
2650
  renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
2650
2651
  afterRender: () => {
2651
- this.#o?.afterRender(), this.#n.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, ve(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, $(this)), this._virtualization.enabled && !this.#W && this.#me();
2652
+ this.#o?.afterRender(), this.#n.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, ve(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, $(this)), this._virtualization.enabled && !this.#W && this.#ve();
2652
2653
  },
2653
2654
  isConnected: () => this.isConnected && this.#f
2654
2655
  }), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = Yt(this.#e, {
@@ -2681,7 +2682,7 @@ class L extends HTMLElement {
2681
2682
  setRowHeight: (e) => {
2682
2683
  this._virtualization.rowHeight = e;
2683
2684
  },
2684
- applyAnimationConfig: (e) => this.#Te(e),
2685
+ applyAnimationConfig: (e) => this.#Pe(e),
2685
2686
  getShellLightDomTitle: () => this.#e.lightDomTitle,
2686
2687
  getShellToolPanels: () => this.#e.toolPanels,
2687
2688
  getShellHeaderContents: () => this.#e.headerContents,
@@ -2690,25 +2691,25 @@ class L extends HTMLElement {
2690
2691
  getShellHasToolButtonsContainer: () => this.#e.hasToolButtonsContainer
2691
2692
  });
2692
2693
  }
2693
- static #Z = "tbw-grid-styles";
2694
+ static #ee = "tbw-grid-styles";
2694
2695
  static #I = "";
2695
- static #U = /* @__PURE__ */ new Map();
2696
- static #ge() {
2697
- let e = document.getElementById(this.#Z);
2698
- return e || (e = document.createElement("style"), e.id = this.#Z, e.setAttribute("data-tbw-grid", "true"), document.head.appendChild(e)), e;
2696
+ static #V = /* @__PURE__ */ new Map();
2697
+ static #we() {
2698
+ let e = document.getElementById(this.#ee);
2699
+ return e || (e = document.createElement("style"), e.id = this.#ee, e.setAttribute("data-tbw-grid", "true"), document.head.appendChild(e)), e;
2699
2700
  }
2700
- static #V() {
2701
- const e = this.#ge(), o = Array.from(this.#U.values()).join(`
2701
+ static #B() {
2702
+ const e = this.#we(), o = Array.from(this.#V.values()).join(`
2702
2703
  `);
2703
2704
  e.textContent = `${this.#I}
2704
2705
 
2705
2706
  /* Plugin Styles */
2706
2707
  ${o}`;
2707
2708
  }
2708
- async #we() {
2709
+ async #be() {
2709
2710
  if (!L.#I) {
2710
2711
  if (we.length > 0) {
2711
- L.#I = we, L.#V();
2712
+ L.#I = we, L.#B();
2712
2713
  return;
2713
2714
  }
2714
2715
  await new Promise((e) => setTimeout(e, 50));
@@ -2725,7 +2726,7 @@ ${o}`;
2725
2726
  } catch {
2726
2727
  continue;
2727
2728
  }
2728
- e ? (L.#I = e, L.#V()) : (typeof process > "u" || process.env?.NODE_ENV !== "test") && console.warn(
2729
+ e ? (L.#I = e, L.#B()) : (typeof process > "u" || process.env?.NODE_ENV !== "test") && console.warn(
2729
2730
  "[tbw-grid] Could not find grid.css in document.styleSheets. Grid styling will not work.",
2730
2731
  "Available stylesheets:",
2731
2732
  Array.from(document.styleSheets).map((o) => o.href || "(inline)")
@@ -2744,6 +2745,9 @@ ${o}`;
2744
2745
  requestRender() {
2745
2746
  this.#s.requestPhase(T.ROWS, "plugin:requestRender");
2746
2747
  }
2748
+ requestColumnsRender() {
2749
+ this.#s.requestPhase(T.COLUMNS, "plugin:requestColumnsRender");
2750
+ }
2747
2751
  requestRenderWithFocus() {
2748
2752
  this._restoreFocusAfterRender = !0, this.#s.requestPhase(T.ROWS, "plugin:requestRenderWithFocus");
2749
2753
  }
@@ -2753,7 +2757,7 @@ ${o}`;
2753
2757
  requestAfterRender() {
2754
2758
  this.#s.requestPhase(T.STYLE, "plugin:requestAfterRender");
2755
2759
  }
2756
- #J() {
2760
+ #te() {
2757
2761
  this.#o = new uo(this);
2758
2762
  const e = this.#n?.plugins, o = Array.isArray(e) ? e : [];
2759
2763
  this.#o.attachAll(o);
@@ -2762,10 +2766,10 @@ ${o}`;
2762
2766
  const e = this.#o?.getPluginStyles() ?? [];
2763
2767
  let o = !1;
2764
2768
  for (const { name: n, styles: i } of e)
2765
- L.#U.has(n) || (L.#U.set(n, i), o = !0);
2766
- o && L.#V();
2769
+ L.#V.has(n) || (L.#V.set(n, i), o = !0);
2770
+ o && L.#B();
2767
2771
  }
2768
- #ee() {
2772
+ #oe() {
2769
2773
  const e = this.#n?.plugins, o = Array.isArray(e) ? e : [];
2770
2774
  if (this.#_ !== o) {
2771
2775
  if (this.#_ && this.#_.length === o.length && this.#_.every((n, i) => n === o[i])) {
@@ -2784,13 +2788,13 @@ ${o}`;
2784
2788
  const i = this.#e.headerContentCleanups.get(n);
2785
2789
  i && (i(), this.#e.headerContentCleanups.delete(n)), this.#e.headerContents.delete(n);
2786
2790
  }
2787
- this.#J(), this.#q(), this.#_ = o, this.#te(), this.#b = this.#o?.getAll().some((n) => n.onScroll) ?? !1;
2791
+ this.#te(), this.#q(), this.#_ = o, this.#ne(), this.#w = this.#o?.getAll().some((n) => n.onScroll) ?? !1;
2788
2792
  }
2789
2793
  }
2790
- #be() {
2794
+ #me() {
2791
2795
  this.#o?.detachAll();
2792
2796
  }
2793
- #te() {
2797
+ #ne() {
2794
2798
  if (!this.#o) return;
2795
2799
  const e = this.#o.getToolPanels();
2796
2800
  for (const { panel: n } of e)
@@ -2816,17 +2820,17 @@ ${o}`;
2816
2820
  };
2817
2821
  }
2818
2822
  connectedCallback() {
2819
- this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", L.version), this.id || (this.id = `tbw-grid-${++L.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#w && (this.#w.abort(), this.#M = !1), this.#w = new AbortController(), this.#p && (Ae(this.#p), this.#p = void 0), I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#J();
2823
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", L.version), this.id || (this.id = `tbw-grid-${++L.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#M = !1), this.#b = new AbortController(), this.#p && (Ae(this.#p), this.#p = void 0), I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#te();
2820
2824
  const e = this.#n?.plugins;
2821
- this.#_ = Array.isArray(e) ? e : [], this.#te(), this.#u || (this.#K(), this.#q(), this.#u = !0), this.#oe(), this.#p = Dt(
2825
+ this.#_ = Array.isArray(e) ? e : [], this.#ne(), this.#u || (this.#Q(), this.#q(), this.#u = !0), this.#ie(), this.#p = Dt(
2822
2826
  () => {
2823
- this.#ke();
2827
+ this.#Ne();
2824
2828
  },
2825
2829
  { timeout: 100 }
2826
2830
  );
2827
2831
  }
2828
2832
  disconnectedCallback() {
2829
- this.#p && (Ae(this.#p), this.#p = void 0), this.#be(), Xt(this.#e), this.#c.setInitialized(!1), this.#z?.(), this.#z = void 0, Qe(this.#H), this.#w && (this.#w.abort(), this.#w = void 0), this.#D?.abort(), this.#D = void 0, this.#M = !1, this._resizeController && this._resizeController.dispose(), this.#C && (this.#C.disconnect(), this.#C = void 0), this.#y && (this.#y.disconnect(), this.#y = void 0, this.#W = !1), j(this), this.#S.clear(), this.#_ = void 0;
2833
+ this.#p && (Ae(this.#p), this.#p = void 0), this.#me(), Xt(this.#e), this.#c.setInitialized(!1), this.#z?.(), this.#z = void 0, Qe(this.#H), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#M = !1, this._resizeController && this._resizeController.dispose(), this.#C && (this.#C.disconnect(), this.#C = void 0), this.#y && (this.#y.disconnect(), this.#y = void 0, this.#W = !1), j(this), this.#S.clear(), this.#_ = void 0;
2830
2834
  for (const e of this._rowPool)
2831
2835
  e.remove();
2832
2836
  this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
@@ -2847,22 +2851,22 @@ ${o}`;
2847
2851
  }
2848
2852
  else e === "fit-mode" && (this.fitMode = n);
2849
2853
  }
2850
- #oe() {
2854
+ #ie() {
2851
2855
  const o = this.#i.querySelector(".tbw-grid-content") ?? this.#i.querySelector(".tbw-grid-root");
2852
2856
  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.__rowsBodyEl = o?.querySelector(".rows-body"), this.#c.isInitialized) {
2853
2857
  he(this.#i, this.#e), He(this.#i, this.#n?.shell, this.#e);
2854
2858
  const r = this.#n?.shell?.toolPanel?.defaultOpen;
2855
2859
  r && this.#e.toolPanels.has(r) && (this.openToolPanel(), this.#e.expandedSections.add(r));
2856
2860
  }
2857
- if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Te(this), this.#L(), this.#ie(o), this.#M)
2861
+ if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Te(this), this.#L(), this.#se(o), this.#M)
2858
2862
  return;
2859
2863
  this.#M = !0;
2860
2864
  const n = this.disconnectSignal;
2861
2865
  At(this, this, this.#i, n);
2862
2866
  const i = this.#n.rowHeight;
2863
- i && i > 0 ? this._virtualization.rowHeight = i : requestAnimationFrame(() => this.#ne()), queueMicrotask(() => this.#ve()), this.#s.requestPhase(T.FULL, "afterConnect");
2867
+ i && i > 0 ? this._virtualization.rowHeight = i : requestAnimationFrame(() => this.#re()), queueMicrotask(() => this.#Ce()), this.#s.requestPhase(T.FULL, "afterConnect");
2864
2868
  }
2865
- #ne() {
2869
+ #re() {
2866
2870
  if (this.#o.hasExtraHeight())
2867
2871
  return;
2868
2872
  const e = this._bodyEl?.querySelector(".data-grid-row");
@@ -2876,42 +2880,56 @@ ${o}`;
2876
2880
  const i = e.getBoundingClientRect(), r = Math.max(i.height, n);
2877
2881
  r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(T.VIRTUALIZATION, "measureRowHeight"));
2878
2882
  }
2879
- #ie(e) {
2883
+ #se(e) {
2880
2884
  this.#D?.abort(), this.#D = new AbortController();
2881
2885
  const o = this.#D.signal, n = e?.querySelector(".faux-vscroll"), i = e?.querySelector(".rows");
2882
- if (this._virtualization.container = n ?? this, this.#b = this.#o?.getAll().some((r) => r.onScroll) ?? !1, n && i) {
2886
+ if (this._virtualization.container = n ?? this, this.#w = this.#o?.getAll().some((r) => r.onScroll) ?? !1, n && i) {
2883
2887
  n.addEventListener(
2884
2888
  "scroll",
2885
2889
  () => {
2886
- if (!this._virtualization.enabled && !this.#b) return;
2887
- const l = n.scrollTop, a = this._virtualization.rowHeight;
2890
+ if (!this._virtualization.enabled && !this.#w) return;
2891
+ const a = n.scrollTop, c = this._virtualization.rowHeight;
2888
2892
  if (this._rows.length <= this._virtualization.bypassThreshold)
2889
- i.style.transform = `translateY(${-l}px)`;
2893
+ i.style.transform = `translateY(${-a}px)`;
2890
2894
  else {
2891
- const c = Math.floor(l / a), h = c - c % 2, u = -(l - h * a);
2892
- i.style.transform = `translateY(${u}px)`;
2895
+ const d = Math.floor(a / c), u = d - d % 2, p = -(a - u * c);
2896
+ i.style.transform = `translateY(${p}px)`;
2893
2897
  }
2894
- this.#r = l, this.#v || (this.#v = requestAnimationFrame(() => {
2895
- this.#v = 0, this.#r !== null && (this.#Oe(this.#r), this.#r = null);
2898
+ this.#r = a, this.#v || (this.#v = requestAnimationFrame(() => {
2899
+ this.#v = 0, this.#r !== null && (this.#Me(this.#r), this.#r = null);
2896
2900
  }));
2897
2901
  },
2898
2902
  { passive: !0, signal: o }
2899
2903
  );
2900
- const r = this.#i.querySelector(".tbw-grid-content"), s = this.#i.querySelector(".tbw-scroll-area");
2901
- r && (r.addEventListener(
2904
+ const r = this.#i.querySelector(".tbw-scroll-area");
2905
+ this.#F = r, r && this.#w && r.addEventListener(
2906
+ "scroll",
2907
+ () => {
2908
+ const a = this.#J;
2909
+ a.scrollTop = n.scrollTop, a.scrollLeft = r.scrollLeft, a.scrollHeight = n.scrollHeight, a.scrollWidth = r.scrollWidth, a.clientHeight = n.clientHeight, a.clientWidth = r.clientWidth, this.#o?.onScroll(a);
2910
+ },
2911
+ { passive: !0, signal: o }
2912
+ );
2913
+ const s = this.#i.querySelector(".tbw-grid-content"), l = this.#F;
2914
+ s && (s.addEventListener(
2902
2915
  "wheel",
2903
- (l) => {
2904
- const a = l.shiftKey || Math.abs(l.deltaX) > Math.abs(l.deltaY);
2905
- if (a && s) {
2906
- const c = l.shiftKey ? l.deltaY : l.deltaX, { scrollLeft: h, scrollWidth: u, clientWidth: p } = s;
2907
- (c > 0 && h < u - p || c < 0 && h > 0) && (l.preventDefault(), s.scrollLeft += c);
2908
- } else if (!a) {
2909
- const { scrollTop: c, scrollHeight: h, clientHeight: u } = n;
2910
- (l.deltaY > 0 && c < h - u || l.deltaY < 0 && c > 0) && (l.preventDefault(), n.scrollTop += l.deltaY);
2916
+ (a) => {
2917
+ const c = a.shiftKey || Math.abs(a.deltaX) > Math.abs(a.deltaY);
2918
+ if (c && l) {
2919
+ const d = a.shiftKey ? a.deltaY : a.deltaX, { scrollLeft: u, scrollWidth: p, clientWidth: f } = l;
2920
+ (d > 0 && u < p - f || d < 0 && u > 0) && (a.preventDefault(), l.scrollLeft += d);
2921
+ } else if (!c) {
2922
+ const { scrollTop: d, scrollHeight: u, clientHeight: p } = n;
2923
+ (a.deltaY > 0 && d < u - p || a.deltaY < 0 && d > 0) && (a.preventDefault(), n.scrollTop += a.deltaY);
2911
2924
  }
2912
2925
  },
2913
2926
  { passive: !1, signal: o }
2914
- ), no(r, this.#H, { fauxScrollbar: n, scrollArea: s }, o));
2927
+ ), no(
2928
+ s,
2929
+ this.#H,
2930
+ { fauxScrollbar: n, scrollArea: l },
2931
+ o
2932
+ ));
2915
2933
  }
2916
2934
  this._bodyEl && xt(this, this._bodyEl, o), this.#C?.disconnect(), this._virtualization.viewportEl && (this.#C = new ResizeObserver(() => {
2917
2935
  this.#s.requestPhase(T.VIRTUALIZATION, "resize-observer");
@@ -2931,17 +2949,17 @@ ${o}`;
2931
2949
  );
2932
2950
  }
2933
2951
  #W = !1;
2934
- #me() {
2952
+ #ve() {
2935
2953
  if (this.#W) return;
2936
2954
  const e = this._bodyEl?.querySelector(".data-grid-row");
2937
2955
  e && (this.#W = !0, this.#y?.disconnect(), this.#y = new ResizeObserver(() => {
2938
- this.#ne();
2956
+ this.#re();
2939
2957
  }), this.#y.observe(e));
2940
2958
  }
2941
2959
  #P(e, o) {
2942
2960
  this.dispatchEvent(new CustomEvent(e, { detail: o, bubbles: !0, composed: !0 }));
2943
2961
  }
2944
- #ve() {
2962
+ #Ce() {
2945
2963
  this._bodyEl?.querySelectorAll(".data-grid-row")?.forEach((o, n) => {
2946
2964
  const i = n === this._focusRow;
2947
2965
  o.setAttribute("aria-selected", String(i)), o.querySelectorAll(".cell").forEach((r, s) => {
@@ -2950,9 +2968,9 @@ ${o}`;
2950
2968
  });
2951
2969
  }
2952
2970
  #$(e) {
2953
- this.#m[e] = !0, !this.#g && (this.#g = !0, queueMicrotask(() => this.#Ce()));
2971
+ this.#m[e] = !0, !this.#g && (this.#g = !0, queueMicrotask(() => this.#ye()));
2954
2972
  }
2955
- #Ce() {
2973
+ #ye() {
2956
2974
  if (!this.#g || !this.#f) {
2957
2975
  this.#g = !1;
2958
2976
  return;
@@ -2964,66 +2982,66 @@ ${o}`;
2964
2982
  gridConfig: !1,
2965
2983
  fitMode: !1
2966
2984
  }, e.gridConfig) {
2967
- this.#Se(), e.rows && this.#re();
2985
+ this.#Re(), e.rows && this.#le();
2968
2986
  return;
2969
2987
  }
2970
- e.columns && this.#_e(), e.rows && this.#re(), e.fitMode && this.#Ee();
2988
+ e.columns && this.#Ee(), e.rows && this.#le(), e.fitMode && this.#Se();
2971
2989
  }
2972
- #re() {
2973
- this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#B(), this.#s.requestPhase(T.ROWS, "applyRowsUpdate");
2990
+ #le() {
2991
+ this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#G(), this.#s.requestPhase(T.ROWS, "applyRowsUpdate");
2974
2992
  }
2975
- #B() {
2993
+ #G() {
2976
2994
  this.#E.clear();
2977
2995
  const e = this.#n.getRowId;
2978
2996
  this._rows.forEach((o, n) => {
2979
- const i = this.#se(o, e);
2997
+ const i = this.#ae(o, e);
2980
2998
  i !== void 0 && this.#E.set(i, { row: o, index: n });
2981
2999
  });
2982
3000
  }
2983
- #se(e, o) {
3001
+ #ae(e, o) {
2984
3002
  if (o)
2985
3003
  return o(e);
2986
3004
  const n = e;
2987
3005
  if ("id" in n && n.id != null) return String(n.id);
2988
3006
  if ("_id" in n && n._id != null) return String(n._id);
2989
3007
  }
2990
- #ye(e, o) {
2991
- const n = this.#se(e, o);
3008
+ #_e(e, o) {
3009
+ const n = this.#ae(e, o);
2992
3010
  if (n === void 0)
2993
3011
  throw new Error(
2994
3012
  '[tbw-grid] Cannot determine row ID. Configure getRowId in gridConfig or ensure rows have an "id" property.'
2995
3013
  );
2996
3014
  return n;
2997
3015
  }
2998
- #_e() {
3016
+ #Ee() {
2999
3017
  j(this), this.#t.merge(), this.#L();
3000
3018
  }
3001
- #Ee() {
3019
+ #Se() {
3002
3020
  this.#t.merge(), this.#n.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, ve(this)) : (this._columns.forEach((o) => {
3003
3021
  !o.__userResized && o.__autoSized && delete o.width;
3004
3022
  }), B(this));
3005
3023
  }
3006
- #Se() {
3024
+ #Re() {
3007
3025
  I(this, this.#e), q(this, this.#e);
3008
3026
  const e = !!this.#i.querySelector(".has-shell"), o = !!this.#i.querySelector(".tbw-tool-panel"), n = this.#i.querySelectorAll(".tbw-accordion-section").length;
3009
- this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge();
3027
+ this.#t.parseLightDomColumns(this), this.#t.merge(), this.#oe(), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge();
3010
3028
  const i = Ke(this.#n?.shell), r = (this.#n?.shell?.toolPanels?.length ?? 0) > 0, s = (this.#n?.shell?.toolPanels?.length ?? 0) !== n;
3011
3029
  if (e !== i || !e && i || !o && r || o && s) {
3012
- this.#K(), this.#q(), this.#oe(), this.#B();
3030
+ this.#Q(), this.#q(), this.#ie(), this.#G();
3013
3031
  return;
3014
3032
  }
3015
- e && this.#Re(), this.#B(), this.#s.requestPhase(T.COLUMNS, "applyGridConfigUpdate");
3033
+ e && this.#xe(), this.#G(), this.#s.requestPhase(T.COLUMNS, "applyGridConfigUpdate");
3016
3034
  }
3017
- #Re() {
3035
+ #xe() {
3018
3036
  const e = this.#i.querySelector(".tbw-shell-header");
3019
3037
  if (!e) return;
3020
3038
  const o = this.#n.shell?.header?.title ?? this.#e.lightDomTitle;
3021
3039
  let n = e.querySelector(".tbw-shell-title");
3022
3040
  o ? (n || (n = document.createElement("h2"), n.className = "tbw-shell-title", n.setAttribute("part", "shell-title"), e.insertBefore(n, e.firstChild)), n.textContent = o) : n && n.remove();
3023
3041
  }
3024
- #xe() {
3042
+ #Ae() {
3025
3043
  if (this.#o) {
3026
- const e = this.#F.length > 0 ? this.#F : this._columns, o = e.filter((r) => !r.hidden), n = e.filter((r) => r.hidden), i = this.#o.processColumns([...o]);
3044
+ const e = this.#U.length > 0 ? this.#U : this._columns, o = e.filter((r) => !r.hidden), n = e.filter((r) => r.hidden), i = this.#o.processColumns([...o]);
3027
3045
  if (i !== o) {
3028
3046
  new Set(o.map((l) => l.field));
3029
3047
  const r = new Set(i.map((l) => l.field));
@@ -3032,12 +3050,12 @@ ${o}`;
3032
3050
  this._columns = [...e];
3033
3051
  }
3034
3052
  }
3035
- #Ae() {
3053
+ #Te() {
3036
3054
  j(this);
3037
3055
  const e = Array.isArray(this.#a) ? [...this.#a] : [], o = this.#o?.processRows(e) ?? e;
3038
3056
  this._rows = o;
3039
3057
  }
3040
- #Te(e) {
3058
+ #Pe(e) {
3041
3059
  const o = {
3042
3060
  ...Je,
3043
3061
  ...e.animation
@@ -3045,31 +3063,31 @@ ${o}`;
3045
3063
  let i = 1;
3046
3064
  n === !1 || n === "off" ? i = 0 : (n === !0 || n === "on") && (i = 1), this.style.setProperty("--tbw-animation-duration", `${o.duration}ms`), this.style.setProperty("--tbw-animation-easing", o.easing ?? "ease-out"), this.style.setProperty("--tbw-animation-enabled", String(i)), this.dataset.animationMode = typeof n == "boolean" ? n ? "on" : "off" : n;
3047
3065
  }
3048
- #G(e, o, n = this.__rowRenderEpoch) {
3066
+ #X(e, o, n = this.__rowRenderEpoch) {
3049
3067
  this.#R || (this.#R = (i, r, s) => this.#o?.renderRow(i, r, s) ?? !1), Ct(this, e, o, n, this.#R);
3050
3068
  }
3051
- #X = -1;
3052
- #le = -1;
3053
- #ae(e, o) {
3054
- if (e === this.#X && o === this.#le)
3069
+ #Y = -1;
3070
+ #ce = -1;
3071
+ #de(e, o) {
3072
+ if (e === this.#Y && o === this.#ce)
3055
3073
  return;
3056
- const n = this.#X;
3057
- this.#X = e, this.#le = o, this.__rowsBodyEl && (this.__rowsBodyEl.setAttribute("aria-rowcount", String(e)), this.__rowsBodyEl.setAttribute("aria-colcount", String(o))), e !== n && this._bodyEl && (e > 0 ? this._bodyEl.setAttribute("role", "rowgroup") : this._bodyEl.removeAttribute("role"));
3074
+ const n = this.#Y;
3075
+ this.#Y = e, this.#ce = o, this.__rowsBodyEl && (this.__rowsBodyEl.setAttribute("aria-rowcount", String(e)), this.__rowsBodyEl.setAttribute("aria-colcount", String(o))), e !== n && this._bodyEl && (e > 0 ? this._bodyEl.setAttribute("role", "rowgroup") : this._bodyEl.removeAttribute("role"));
3058
3076
  }
3059
- #ce;
3060
- #de;
3061
- #Pe() {
3077
+ #he;
3078
+ #ue;
3079
+ #Le() {
3062
3080
  if (!this.__rowsBodyEl) return;
3063
3081
  const e = this.#n.gridAriaLabel, o = this.#n.shell?.header?.title ?? this.#e?.lightDomTitle ?? void 0, n = e ?? o;
3064
- n !== this.#ce && (this.#ce = n, n ? this.__rowsBodyEl.setAttribute("aria-label", n) : this.__rowsBodyEl.removeAttribute("aria-label"));
3082
+ n !== this.#he && (this.#he = n, n ? this.__rowsBodyEl.setAttribute("aria-label", n) : this.__rowsBodyEl.removeAttribute("aria-label"));
3065
3083
  const i = this.#n.gridAriaDescribedBy;
3066
- i !== this.#de && (this.#de = i, i ? this.__rowsBodyEl.setAttribute("aria-describedby", i) : this.__rowsBodyEl.removeAttribute("aria-describedby"));
3084
+ i !== this.#ue && (this.#ue = i, i ? this.__rowsBodyEl.setAttribute("aria-describedby", i) : this.__rowsBodyEl.removeAttribute("aria-describedby"));
3067
3085
  }
3068
- #Le(e) {
3086
+ #He(e) {
3069
3087
  const o = document.createElement("div");
3070
3088
  return o.className = `tbw-spinner tbw-spinner--${e}`, o.setAttribute("role", "progressbar"), o.setAttribute("aria-label", "Loading"), o;
3071
3089
  }
3072
- #He(e) {
3090
+ #De(e) {
3073
3091
  const o = this.#n?.loadingRenderer;
3074
3092
  if (o) {
3075
3093
  const n = o({ size: e });
@@ -3079,27 +3097,27 @@ ${o}`;
3079
3097
  }
3080
3098
  return n;
3081
3099
  }
3082
- return this.#Le(e);
3100
+ return this.#He(e);
3083
3101
  }
3084
- #De() {
3102
+ #Oe() {
3085
3103
  const e = this.querySelector(".tbw-grid-root");
3086
3104
  if (e)
3087
3105
  if (this.#k) {
3088
3106
  if (!this.#N) {
3089
3107
  const o = document.createElement("div");
3090
- o.className = "tbw-loading-overlay", o.setAttribute("role", "status"), o.setAttribute("aria-live", "polite"), o.appendChild(this.#He("large")), this.#N = o;
3108
+ o.className = "tbw-loading-overlay", o.setAttribute("role", "status"), o.setAttribute("aria-live", "polite"), o.appendChild(this.#De("large")), this.#N = o;
3091
3109
  }
3092
3110
  e.appendChild(this.#N);
3093
3111
  } else
3094
3112
  this.#N?.remove();
3095
3113
  }
3096
- #he(e, o) {
3114
+ #fe(e, o) {
3097
3115
  const n = this.#E.get(e);
3098
3116
  if (!n) return;
3099
3117
  const i = this.findRenderedRowElement?.(n.index);
3100
3118
  i && (o ? (i.classList.add("tbw-row-loading"), i.setAttribute("aria-busy", "true")) : (i.classList.remove("tbw-row-loading"), i.removeAttribute("aria-busy")));
3101
3119
  }
3102
- #ue(e, o, n) {
3120
+ #pe(e, o, n) {
3103
3121
  const i = this.#E.get(e);
3104
3122
  if (!i) return;
3105
3123
  const r = this.findRenderedRowElement?.(i.index);
@@ -3120,10 +3138,10 @@ ${o}`;
3120
3138
  this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), this.#s.requestPhase(T.FULL, "setup");
3121
3139
  }
3122
3140
  }
3123
- #Oe(e) {
3124
- if (this.refreshVirtualWindow(!1), this.#o?.onScrollRender(), this.#b) {
3125
- const o = this._virtualization.container, n = this.#pe;
3126
- n.scrollTop = e, n.scrollLeft = o?.scrollLeft ?? 0, n.scrollHeight = o?.scrollHeight ?? 0, n.scrollWidth = o?.scrollWidth ?? 0, n.clientHeight = o?.clientHeight ?? 0, n.clientWidth = o?.clientWidth ?? 0, this.#o?.onScroll(n);
3141
+ #Me(e) {
3142
+ if (this.refreshVirtualWindow(!1), this.#o?.onScrollRender(), this.#w) {
3143
+ const o = this._virtualization.container, n = this.#F, i = this.#J;
3144
+ i.scrollTop = e, i.scrollLeft = n?.scrollLeft ?? 0, i.scrollHeight = o?.scrollHeight ?? 0, i.scrollWidth = n?.scrollWidth ?? 0, i.clientHeight = o?.clientHeight ?? 0, i.clientWidth = n?.clientWidth ?? 0, this.#o?.onScroll(i);
3127
3145
  }
3128
3146
  }
3129
3147
  findHeaderRow() {
@@ -3155,7 +3173,7 @@ ${o}`;
3155
3173
  });
3156
3174
  if (this.dispatchEvent(c), c.defaultPrevented)
3157
3175
  return !0;
3158
- const h = {
3176
+ const d = {
3159
3177
  row: r,
3160
3178
  rowIndex: o,
3161
3179
  colIndex: n,
@@ -3163,8 +3181,8 @@ ${o}`;
3163
3181
  value: a,
3164
3182
  cellEl: i,
3165
3183
  originalEvent: e
3166
- }, u = this.#o?.onCellClick(h) ?? !1;
3167
- return this.#P("cell-click", h), u;
3184
+ }, u = this.#o?.onCellClick(d) ?? !1;
3185
+ return this.#P("cell-click", d), u;
3168
3186
  }
3169
3187
  _dispatchRowClick(e, o, n, i) {
3170
3188
  if (!n) return !1;
@@ -3231,7 +3249,7 @@ ${o}`;
3231
3249
  return Object.freeze({ ...this.#n || {} });
3232
3250
  }
3233
3251
  getRowId(e) {
3234
- return this.#ye(e, this.#n.getRowId);
3252
+ return this.#_e(e, this.#n.getRowId);
3235
3253
  }
3236
3254
  getRow(e) {
3237
3255
  return this.#E.get(e)?.row;
@@ -3244,17 +3262,17 @@ ${o}`;
3244
3262
  );
3245
3263
  const { row: r, index: s } = i, l = [];
3246
3264
  for (const [a, c] of Object.entries(o)) {
3247
- const h = r[a];
3248
- h !== c && (l.push({ field: a, oldValue: h, newValue: c }), r[a] = c);
3265
+ const d = r[a];
3266
+ d !== c && (l.push({ field: a, oldValue: d, newValue: c }), r[a] = c);
3249
3267
  }
3250
- for (const { field: a, oldValue: c, newValue: h } of l)
3268
+ for (const { field: a, oldValue: c, newValue: d } of l)
3251
3269
  this.#P("cell-change", {
3252
3270
  row: r,
3253
3271
  rowId: e,
3254
3272
  rowIndex: s,
3255
3273
  field: a,
3256
3274
  oldValue: c,
3257
- newValue: h,
3275
+ newValue: d,
3258
3276
  changes: o,
3259
3277
  source: n
3260
3278
  });
@@ -3269,15 +3287,15 @@ ${o}`;
3269
3287
  `[tbw-grid] Row with ID "${i}" not found. Ensure the row exists and getRowId is correctly configured.`
3270
3288
  );
3271
3289
  const { row: l, index: a } = s;
3272
- for (const [c, h] of Object.entries(r)) {
3290
+ for (const [c, d] of Object.entries(r)) {
3273
3291
  const u = l[c];
3274
- u !== h && (n = !0, l[c] = h, this.#P("cell-change", {
3292
+ u !== d && (n = !0, l[c] = d, this.#P("cell-change", {
3275
3293
  row: l,
3276
3294
  rowId: i,
3277
3295
  rowIndex: a,
3278
3296
  field: c,
3279
3297
  oldValue: u,
3280
- newValue: h,
3298
+ newValue: d,
3281
3299
  changes: r,
3282
3300
  source: o
3283
3301
  }));
@@ -3322,12 +3340,12 @@ ${o}`;
3322
3340
  return this.#t.collectState(e);
3323
3341
  }
3324
3342
  set columnState(e) {
3325
- e && (this.#O = e, this.#t.initialColumnState = e, this.#u && this.#Me(e));
3343
+ e && (this.#O = e, this.#t.initialColumnState = e, this.#u && this.#ze(e));
3326
3344
  }
3327
3345
  get columnState() {
3328
3346
  return this.getColumnState();
3329
3347
  }
3330
- #Me(e) {
3348
+ #ze(e) {
3331
3349
  const o = this.#o?.getAll() ?? [];
3332
3350
  this.#t.applyState(e, o), this.#L();
3333
3351
  }
@@ -3385,39 +3403,39 @@ ${o}`;
3385
3403
  unregisterToolbarContent(e) {
3386
3404
  this.#c.unregisterToolbarContent(e);
3387
3405
  }
3388
- #Y = !1;
3406
+ #j = !1;
3389
3407
  refreshShellHeader() {
3390
- this.#Y || (this.#Y = !0, queueMicrotask(() => {
3391
- this.#Y = !1, this.isConnected && (I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge(), this.#K(), this.#q(), this.#ze());
3408
+ this.#j || (this.#j = !0, queueMicrotask(() => {
3409
+ this.#j = !1, this.isConnected && (I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge(), this.#Q(), this.#q(), this.#ke());
3392
3410
  }));
3393
3411
  }
3394
- #ze() {
3412
+ #ke() {
3395
3413
  const o = this.#i.querySelector(".tbw-grid-content") ?? this.#i.querySelector(".tbw-grid-root");
3396
3414
  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.__rowsBodyEl = o?.querySelector(".rows-body"), this.#c.isInitialized) {
3397
3415
  he(this.#i, this.#e), He(this.#i, this.#n?.shell, this.#e);
3398
3416
  const n = this.#n?.shell?.toolPanel?.defaultOpen;
3399
3417
  n && this.#e.toolPanels.has(n) && (this.openToolPanel(), this.#e.expandedSections.add(n));
3400
3418
  }
3401
- this._resizeController = Te(this), this.#ie(o), this.#s.requestPhase(T.COLUMNS, "shellRefresh");
3419
+ this._resizeController = Te(this), this.#se(o), this.#s.requestPhase(T.COLUMNS, "shellRefresh");
3402
3420
  }
3403
3421
  #S = /* @__PURE__ */ new Map();
3404
3422
  registerStyles(e, o) {
3405
3423
  let n = this.#S.get(e);
3406
- n || (n = new CSSStyleSheet(), this.#S.set(e, n)), n.replaceSync(o), this.#fe();
3424
+ n || (n = new CSSStyleSheet(), this.#S.set(e, n)), n.replaceSync(o), this.#ge();
3407
3425
  }
3408
3426
  unregisterStyles(e) {
3409
- this.#S.delete(e) && this.#fe();
3427
+ this.#S.delete(e) && this.#ge();
3410
3428
  }
3411
3429
  getRegisteredStyles() {
3412
3430
  return Array.from(this.#S.keys());
3413
3431
  }
3414
- #fe() {
3432
+ #ge() {
3415
3433
  const e = Array.from(this.#S.values()), o = document.adoptedStyleSheets.filter(
3416
3434
  (n) => !Array.from(this.#S.values()).includes(n)
3417
3435
  );
3418
3436
  document.adoptedStyleSheets = [...o, ...e];
3419
3437
  }
3420
- #ke() {
3438
+ #Ne() {
3421
3439
  const e = () => {
3422
3440
  const n = this.#e.lightDomTitle, i = this.#e.hasToolButtonsContainer;
3423
3441
  I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T());
@@ -3432,8 +3450,8 @@ ${o}`;
3432
3450
  this.#n.icons?.toolPanel
3433
3451
  ), c = document.createElement("div");
3434
3452
  c.innerHTML = a;
3435
- const h = c.firstElementChild;
3436
- h && (l.replaceWith(h), this.#Q());
3453
+ const d = c.firstElementChild;
3454
+ d && (l.replaceWith(d), this.#Z());
3437
3455
  }
3438
3456
  }
3439
3457
  }, o = () => {
@@ -3457,12 +3475,12 @@ ${o}`;
3457
3475
  ), a = document.createElement("div");
3458
3476
  a.innerHTML = l;
3459
3477
  const c = a.firstElementChild;
3460
- c && (s.replaceWith(c), this.#Q());
3478
+ c && (s.replaceWith(c), this.#Z());
3461
3479
  }
3462
3480
  }
3463
3481
  this.#s.requestPhase(T.COLUMNS, "refreshColumns");
3464
3482
  }
3465
- #j(e) {
3483
+ #K(e) {
3466
3484
  const o = this._virtualization.rowHeight, n = this._virtualization.container ?? this, i = this._virtualization.viewportEl ?? n, r = n.clientHeight, s = i.clientHeight, a = this.shadowRoot?.querySelector(".tbw-scroll-area"), c = a ? a.clientHeight : r, u = c - s, p = this.#o?.getExtraHeight() ?? 0, f = Math.max(0, r - c);
3467
3485
  return e * o + u + p + f;
3468
3486
  }
@@ -3470,20 +3488,20 @@ ${o}`;
3470
3488
  if (!this._bodyEl) return;
3471
3489
  const n = this._rows.length;
3472
3490
  if (!this._virtualization.enabled) {
3473
- this.#G(0, n), o || this.#o?.afterRender();
3491
+ this.#X(0, n), o || this.#o?.afterRender();
3474
3492
  return;
3475
3493
  }
3476
3494
  if (this._rows.length <= this._virtualization.bypassThreshold) {
3477
- this._virtualization.start = 0, this._virtualization.end = n, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#G(0, n, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#j(n)}px`), this.#ae(n, this._visibleColumns.length), o || this.#o?.afterRender();
3495
+ this._virtualization.start = 0, this._virtualization.end = n, e && (this._bodyEl.style.transform = "translateY(0px)"), this.#X(0, n, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${this.#K(n)}px`), this.#de(n, this._visibleColumns.length), o || this.#o?.afterRender();
3478
3496
  return;
3479
3497
  }
3480
3498
  const i = this._virtualization.container ?? this, r = this._virtualization.viewportEl ?? i, s = r.clientHeight, l = this._virtualization.rowHeight, a = i.scrollTop;
3481
- let c = Math.floor(a / l), h = 0;
3499
+ let c = Math.floor(a / l), d = 0;
3482
3500
  const u = 10;
3483
- for (; h < u; ) {
3501
+ for (; d < u; ) {
3484
3502
  const C = this.#o?.getExtraHeightBefore?.(c) ?? 0, _ = Math.floor((a - C) / l);
3485
3503
  if (_ >= c || _ < 0) break;
3486
- c = _, h++;
3504
+ c = _, d++;
3487
3505
  }
3488
3506
  c = c - c % 2, c < 0 && (c = 0);
3489
3507
  const p = this.#o?.adjustVirtualStart(c, a, l);
@@ -3494,17 +3512,17 @@ ${o}`;
3494
3512
  this.#s.requestPhase(T.VIRTUALIZATION, "stale-refs-retry");
3495
3513
  return;
3496
3514
  }
3497
- const w = this.#j(n);
3515
+ const w = this.#K(n);
3498
3516
  this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${w}px`);
3499
3517
  const b = this.#o?.getExtraHeightBefore?.(c) ?? 0, S = -(a - c * l - b);
3500
- this._bodyEl.style.transform = `translateY(${S}px)`, this.#G(c, g, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), this.#ae(n, this._visibleColumns.length), e && !o && (this.#o?.afterRender(), queueMicrotask(() => {
3518
+ this._bodyEl.style.transform = `translateY(${S}px)`, this.#X(c, g, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), this.#de(n, this._visibleColumns.length), e && !o && (this.#o?.afterRender(), queueMicrotask(() => {
3501
3519
  const C = i.clientHeight, _ = r.clientHeight;
3502
3520
  if (C === 0 && _ > 0) return;
3503
- const A = this.#j(n);
3521
+ const A = this.#K(n);
3504
3522
  this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${A}px`);
3505
3523
  }));
3506
3524
  }
3507
- #K() {
3525
+ #Q() {
3508
3526
  I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge();
3509
3527
  const e = this.#n?.shell;
3510
3528
  Kt(
@@ -3512,9 +3530,9 @@ ${o}`;
3512
3530
  e,
3513
3531
  { isPanelOpen: this.#e.isPanelOpen, expandedSections: this.#e.expandedSections },
3514
3532
  this.#n?.icons
3515
- ) && (this.#Q(), this.#c.setInitialized(!0));
3533
+ ) && (this.#Z(), this.#c.setInitialized(!0));
3516
3534
  }
3517
- #Q() {
3535
+ #Z() {
3518
3536
  Vt(this.#i, this.#n?.shell, this.#e, {
3519
3537
  onPanelToggle: () => this.toggleToolPanel(),
3520
3538
  onSectionToggle: (e) => this.toggleToolPanelSection(e)
@@ -3532,7 +3550,7 @@ const go = {
3532
3550
  class wo {
3533
3551
  static dependencies;
3534
3552
  static manifest;
3535
- version = "1.9.0";
3553
+ version = "1.9.2";
3536
3554
  styles;
3537
3555
  cellRenderers;
3538
3556
  headerRenderers;
@@ -3575,6 +3593,9 @@ class wo {
3575
3593
  requestRender() {
3576
3594
  this.grid?.requestRender?.();
3577
3595
  }
3596
+ requestColumnsRender() {
3597
+ this.grid?.requestColumnsRender?.();
3598
+ }
3578
3599
  requestRenderWithFocus() {
3579
3600
  this.grid?.requestRenderWithFocus?.();
3580
3601
  }