@toolbox-web/grid 1.3.0 → 1.3.1

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 (57) hide show
  1. package/all.js +469 -444
  2. package/all.js.map +1 -1
  3. package/index.js +242 -240
  4. package/index.js.map +1 -1
  5. package/lib/core/types.d.ts +4 -0
  6. package/lib/core/types.d.ts.map +1 -1
  7. package/lib/plugins/clipboard/index.js +18 -16
  8. package/lib/plugins/clipboard/index.js.map +1 -1
  9. package/lib/plugins/column-virtualization/index.js +43 -41
  10. package/lib/plugins/column-virtualization/index.js.map +1 -1
  11. package/lib/plugins/context-menu/index.js +24 -22
  12. package/lib/plugins/context-menu/index.js.map +1 -1
  13. package/lib/plugins/editing/index.js +48 -46
  14. package/lib/plugins/editing/index.js.map +1 -1
  15. package/lib/plugins/export/index.js +22 -20
  16. package/lib/plugins/export/index.js.map +1 -1
  17. package/lib/plugins/filtering/FilteringPlugin.d.ts +11 -1
  18. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  19. package/lib/plugins/filtering/index.js +160 -125
  20. package/lib/plugins/filtering/index.js.map +1 -1
  21. package/lib/plugins/grouping-columns/index.js +20 -18
  22. package/lib/plugins/grouping-columns/index.js.map +1 -1
  23. package/lib/plugins/grouping-rows/index.js +66 -64
  24. package/lib/plugins/grouping-rows/index.js.map +1 -1
  25. package/lib/plugins/master-detail/index.js +51 -49
  26. package/lib/plugins/master-detail/index.js.map +1 -1
  27. package/lib/plugins/multi-sort/index.js +17 -15
  28. package/lib/plugins/multi-sort/index.js.map +1 -1
  29. package/lib/plugins/pinned-columns/index.js +24 -22
  30. package/lib/plugins/pinned-columns/index.js.map +1 -1
  31. package/lib/plugins/pinned-rows/index.js +25 -23
  32. package/lib/plugins/pinned-rows/index.js.map +1 -1
  33. package/lib/plugins/pivot/index.js +49 -47
  34. package/lib/plugins/pivot/index.js.map +1 -1
  35. package/lib/plugins/reorder/index.js +24 -22
  36. package/lib/plugins/reorder/index.js.map +1 -1
  37. package/lib/plugins/responsive/index.js +19 -17
  38. package/lib/plugins/responsive/index.js.map +1 -1
  39. package/lib/plugins/row-reorder/index.js +38 -36
  40. package/lib/plugins/row-reorder/index.js.map +1 -1
  41. package/lib/plugins/selection/index.js +41 -39
  42. package/lib/plugins/selection/index.js.map +1 -1
  43. package/lib/plugins/server-side/index.js +34 -32
  44. package/lib/plugins/server-side/index.js.map +1 -1
  45. package/lib/plugins/tree/index.js +25 -23
  46. package/lib/plugins/tree/index.js.map +1 -1
  47. package/lib/plugins/undo-redo/index.js +22 -20
  48. package/lib/plugins/undo-redo/index.js.map +1 -1
  49. package/lib/plugins/visibility/index.js +21 -19
  50. package/lib/plugins/visibility/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/umd/grid.all.umd.js +19 -19
  53. package/umd/grid.all.umd.js.map +1 -1
  54. package/umd/grid.umd.js +9 -9
  55. package/umd/grid.umd.js.map +1 -1
  56. package/umd/plugins/filtering.umd.js +1 -1
  57. package/umd/plugins/filtering.umd.js.map +1 -1
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
- const he = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{:root{color-scheme:light dark}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-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--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-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--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-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);position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{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);>.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}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6}&: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{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:left;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}}', B = {
1
+ const he = '@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-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--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-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--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-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);position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{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);>.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;visibility:var(--tbw-sort-indicator-visibility, visible)}&: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{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:left;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}}', B = {
2
2
  STRETCH: "stretch",
3
3
  FIXED: "fixed"
4
- }, Be = {
4
+ }, Ge = {
5
5
  mode: "reduced-motion",
6
6
  duration: 200,
7
7
  easing: "ease-out"
8
- }, z = {
8
+ }, ue = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', z = {
9
9
  expand: "▶",
10
10
  collapse: "▼",
11
11
  sortAsc: "▲",
@@ -13,9 +13,11 @@ const he = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{:root{color-sc
13
13
  sortNone: "⇅",
14
14
  submenuArrow: "▶",
15
15
  dragHandle: "⋮⋮",
16
- toolPanel: "☰"
16
+ toolPanel: "☰",
17
+ filter: ue,
18
+ filterActive: ue
17
19
  };
18
- function Ge(t) {
20
+ function Xe(t) {
19
21
  return Array.from(t.querySelectorAll("tbw-grid-column")).map((o) => {
20
22
  const n = o.getAttribute("field") || "";
21
23
  if (!n) return null;
@@ -52,7 +54,7 @@ function Ge(t) {
52
54
  return h;
53
55
  }).filter((o) => !!o);
54
56
  }
55
- function ue(t, e) {
57
+ function fe(t, e) {
56
58
  if ((!t || !t.length) && (!e || !e.length)) return [];
57
59
  if (!t || !t.length) return e || [];
58
60
  if (!e || !e.length) return t;
@@ -76,7 +78,7 @@ function ue(t, e) {
76
78
  });
77
79
  return Object.keys(o).forEach((i) => n.push(o[i])), n;
78
80
  }
79
- function fe(t, e) {
81
+ function pe(t, e) {
80
82
  try {
81
83
  t.part?.add?.(e);
82
84
  } catch {
@@ -84,7 +86,7 @@ function fe(t, e) {
84
86
  const o = t.getAttribute("part");
85
87
  o ? o.split(/\s+/).includes(e) || t.setAttribute("part", o + " " + e) : t.setAttribute("part", e);
86
88
  }
87
- function pe(t) {
89
+ function ge(t) {
88
90
  const e = t.effectiveConfig?.fitMode || t.fitMode || B.STRETCH;
89
91
  if (e !== B.STRETCH && e !== B.FIXED || t.__didInitialAutoSize || !t.isConnected) return;
90
92
  const o = Array.from(t._headerRowEl?.children || []);
@@ -111,23 +113,23 @@ function U(t) {
111
113
  return n != null ? `minmax(${n}px, 1fr)` : "1fr";
112
114
  }).join(" ").trim() : t._gridTemplate = t._visibleColumns.map((o) => o.width ? `${o.width}px` : "max-content").join(" "), t.style.setProperty("--tbw-column-template", t._gridTemplate);
113
115
  }
114
- function Xe(t) {
116
+ function Ye(t) {
115
117
  return t == null ? "string" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date || typeof t == "string" && /\d{4}-\d{2}-\d{2}/.test(t) && !isNaN(Date.parse(t)) ? "date" : "string";
116
118
  }
117
- function Ye(t, e) {
119
+ function je(t, e) {
118
120
  const o = t[0] || {}, n = Object.keys(o).map((r) => {
119
- const s = o[r], l = Xe(s);
121
+ const s = o[r], l = Ye(s);
120
122
  return { field: r, header: r.charAt(0).toUpperCase() + r.slice(1), type: l };
121
123
  }), i = {};
122
124
  return n.forEach((r) => {
123
125
  i[r.field] = r.type || "string";
124
126
  }), { columns: n, typeMap: i };
125
127
  }
126
- const je = /{{\s*([^}]+)\s*}}/g, O = "__DG_EMPTY__", Ke = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, Ze = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/;
127
- function Je(t) {
128
+ const Ke = /{{\s*([^}]+)\s*}}/g, O = "__DG_EMPTY__", Ze = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, Je = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/;
129
+ function Qe(t) {
128
130
  return !t || typeof t != "string" ? "" : t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
129
131
  }
130
- const Qe = /* @__PURE__ */ new Set([
132
+ const et = /* @__PURE__ */ new Set([
131
133
  "script",
132
134
  "iframe",
133
135
  "object",
@@ -152,23 +154,23 @@ const Qe = /* @__PURE__ */ new Set([
152
154
  "plaintext",
153
155
  "xmp",
154
156
  "listing"
155
- ]), ge = /^on\w+$/i, et = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), tt = /^\s*(javascript|vbscript|data|blob):/i;
157
+ ]), we = /^on\w+$/i, tt = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), ot = /^\s*(javascript|vbscript|data|blob):/i;
156
158
  function K(t) {
157
159
  if (!t || typeof t != "string") return "";
158
160
  if (t.indexOf("<") === -1) return t;
159
161
  const e = document.createElement("template");
160
- return e.innerHTML = t, ot(e.content), e.innerHTML;
162
+ return e.innerHTML = t, nt(e.content), e.innerHTML;
161
163
  }
162
- function ot(t) {
164
+ function nt(t) {
163
165
  const e = [], o = t.querySelectorAll("*");
164
166
  for (const n of o) {
165
167
  const i = n.tagName.toLowerCase();
166
- if (Qe.has(i)) {
168
+ if (et.has(i)) {
167
169
  e.push(n);
168
170
  continue;
169
171
  }
170
172
  if ((i === "svg" || n.namespaceURI === "http://www.w3.org/2000/svg") && Array.from(n.attributes).some(
171
- (l) => ge.test(l.name) || l.name === "href" || l.name === "xlink:href"
173
+ (l) => we.test(l.name) || l.name === "href" || l.name === "xlink:href"
172
174
  )) {
173
175
  e.push(n);
174
176
  continue;
@@ -176,11 +178,11 @@ function ot(t) {
176
178
  const r = [];
177
179
  for (const s of n.attributes) {
178
180
  const l = s.name.toLowerCase();
179
- if (ge.test(l)) {
181
+ if (we.test(l)) {
180
182
  r.push(s.name);
181
183
  continue;
182
184
  }
183
- if (et.has(l) && tt.test(s.value)) {
185
+ if (tt.has(l) && ot.test(s.value)) {
184
186
  r.push(s.name);
185
187
  continue;
186
188
  }
@@ -193,22 +195,22 @@ function ot(t) {
193
195
  }
194
196
  e.forEach((n) => n.remove());
195
197
  }
196
- function Le(t, e) {
198
+ function He(t, e) {
197
199
  if (!t || t.indexOf("{{") === -1) return t;
198
- const o = [], n = t.replace(je, (l, c) => {
199
- const a = nt(c, e);
200
+ const o = [], n = t.replace(Ke, (l, c) => {
201
+ const a = it(c, e);
200
202
  return o.push({ expr: c.trim(), result: a }), a;
201
- }), i = it(n), r = o.length && o.every((l) => l.result === "" || l.result === O);
203
+ }), i = rt(n), r = o.length && o.every((l) => l.result === "" || l.result === O);
202
204
  return /Reflect\.|\bProxy\b|ownKeys\(/.test(t) || r ? "" : i;
203
205
  }
204
- function nt(t, e) {
206
+ function it(t, e) {
205
207
  if (t = (t || "").trim(), !t || /\b(Reflect|Proxy|ownKeys)\b/.test(t)) return O;
206
208
  if (t === "value") return e.value == null ? O : String(e.value);
207
209
  if (t.startsWith("row.") && !/[()?]/.test(t) && !t.includes(":")) {
208
210
  const n = t.slice(4), i = e.row ? e.row[n] : void 0;
209
211
  return i == null ? O : String(i);
210
212
  }
211
- if (t.length > 80 || !Ke.test(t) || Ze.test(t)) return O;
213
+ if (t.length > 80 || !Ze.test(t) || Je.test(t)) return O;
212
214
  const o = t.match(/\./g);
213
215
  if (o && o.length > 1) return O;
214
216
  try {
@@ -218,10 +220,10 @@ function nt(t, e) {
218
220
  return O;
219
221
  }
220
222
  }
221
- function it(t) {
223
+ function rt(t) {
222
224
  return t && t.replace(new RegExp(O, "g"), "").replace(/Reflect\.[^<>{}\s]+/g, "").replace(/\bProxy\b/g, "").replace(/ownKeys\([^)]*\)/g, "");
223
225
  }
224
- function rt(t) {
226
+ function st(t) {
225
227
  if (/Reflect|Proxy|ownKeys/.test(t.textContent || "")) {
226
228
  if (Array.from(t.childNodes).forEach((e) => {
227
229
  e.nodeType === Node.TEXT_NODE && /Reflect|Proxy|ownKeys/.test(e.textContent || "") && (e.textContent = "");
@@ -233,12 +235,12 @@ function rt(t) {
233
235
  (t.textContent || "").trim().length === 0 && (t.textContent = "");
234
236
  }
235
237
  }
236
- function we(t) {
237
- const e = /Reflect\.|\bProxy\b|ownKeys\(/.test(t), o = ((n) => e ? "" : Le(t, n));
238
+ function me(t) {
239
+ const e = /Reflect\.|\bProxy\b|ownKeys\(/.test(t), o = ((n) => e ? "" : He(t, n));
238
240
  return o.__blocked = e, o;
239
241
  }
240
- const st = 100;
241
- class lt {
242
+ const lt = 100;
243
+ class at {
242
244
  #n;
243
245
  #c;
244
246
  #f;
@@ -343,19 +345,19 @@ class lt {
343
345
  const e = this.#n ? { ...this.#n } : {}, o = Array.isArray(e.columns) ? [...e.columns] : [], n = (this.#d ?? []).map((s) => ({
344
346
  ...s
345
347
  }));
346
- let i = ue(
348
+ let i = fe(
347
349
  o,
348
350
  n
349
351
  );
350
- this.#c && this.#c.length && (i = ue(
352
+ this.#c && this.#c.length && (i = fe(
351
353
  this.#c,
352
354
  n
353
355
  ));
354
356
  const r = this.#r.getRows();
355
- return i.length === 0 && r.length && (i = Ye(r).columns), i.length && (i.forEach((s) => {
357
+ return i.length === 0 && r.length && (i = je(r).columns), i.length && (i.forEach((s) => {
356
358
  s.sortable === void 0 && (s.sortable = !0), s.resizable === void 0 && (s.resizable = !0), s.__originalWidth === void 0 && typeof s.width == "number" && (s.__originalWidth = s.width);
357
359
  }), i.forEach((s) => {
358
- s.__viewTemplate && !s.__compiledView && (s.__compiledView = we(s.__viewTemplate.innerHTML)), s.__editorTemplate && !s.__compiledEditor && (s.__compiledEditor = we(s.__editorTemplate.innerHTML));
360
+ s.__viewTemplate && !s.__compiledView && (s.__compiledView = me(s.__viewTemplate.innerHTML)), s.__editorTemplate && !s.__compiledEditor && (s.__compiledEditor = me(s.__editorTemplate.innerHTML));
359
361
  }), e.columns = i), this.#f && (e.fitMode = this.#f), e.fitMode || (e.fitMode = "stretch"), this.#y(e), e.columnState && !this.#w && (this.#w = e.columnState), e;
360
362
  }
361
363
  #y(e) {
@@ -450,7 +452,7 @@ class lt {
450
452
  this.#g = void 0;
451
453
  const o = this.collectState(e);
452
454
  this.#r.emit("column-state-change", o);
453
- }, st);
455
+ }, lt);
454
456
  }
455
457
  setColumnVisible(e, o) {
456
458
  const n = this.columns, i = n.find((s) => s.field === e);
@@ -498,7 +500,7 @@ class lt {
498
500
  this.columns = n, this.#r.renderHeader(), this.#r.updateTemplate(), this.#r.refreshVirtualWindow();
499
501
  }
500
502
  parseLightDomColumns(e) {
501
- this.#d || (this.#s = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#s.length ? Ge(e) : []);
503
+ this.#d || (this.#s = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#s.length ? Xe(e) : []);
502
504
  }
503
505
  clearLightDomCache() {
504
506
  this.#d = void 0;
@@ -551,10 +553,10 @@ class lt {
551
553
  this.#l?.disconnect(), this.#m = [], this.#g && clearTimeout(this.#g);
552
554
  }
553
555
  }
554
- function He(t) {
556
+ function Oe(t) {
555
557
  return `<span role="checkbox" aria-checked="${t}" aria-label="${t}">${t ? "&#x1F5F9;" : "&#9744;"}</span>`;
556
558
  }
557
- function Oe(t) {
559
+ function De(t) {
558
560
  if (t == null || t === "") return "";
559
561
  if (t instanceof Date)
560
562
  return isNaN(t.getTime()) ? "" : t.toLocaleDateString();
@@ -564,7 +566,7 @@ function Oe(t) {
564
566
  }
565
567
  return "";
566
568
  }
567
- function De(t) {
569
+ function Me(t) {
568
570
  if (!t) return -1;
569
571
  const e = t.getAttribute("data-row");
570
572
  if (e) return parseInt(e, 10);
@@ -577,7 +579,7 @@ function De(t) {
577
579
  if (i[r] === o) return r;
578
580
  return -1;
579
581
  }
580
- function at(t) {
582
+ function ct(t) {
581
583
  if (!t) return -1;
582
584
  const e = t.getAttribute("data-col");
583
585
  return e ? parseInt(e, 10) : -1;
@@ -585,7 +587,7 @@ function at(t) {
585
587
  function ae(t) {
586
588
  t && t.querySelectorAll(".cell-focus").forEach((e) => e.classList.remove("cell-focus"));
587
589
  }
588
- function Me(t, e) {
590
+ function ze(t, e) {
589
591
  const o = e.renderer || e.viewRenderer;
590
592
  if (o) return o;
591
593
  if (!e.type) return;
@@ -599,31 +601,31 @@ function Me(t, e) {
599
601
  return r.renderer;
600
602
  }
601
603
  }
602
- const ze = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
604
+ const Ne = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
603
605
  function ee(t) {
604
606
  return (t.__editingCellCount ?? 0) > 0;
605
607
  }
606
608
  function te(t) {
607
609
  t.__editingCellCount = 0, t.removeAttribute("data-has-editing"), t.querySelectorAll(".cell.editing").forEach((o) => o.classList.remove("editing"));
608
610
  }
609
- const Ne = document.createElement("template");
610
- Ne.innerHTML = '<div class="cell" role="gridcell" part="cell"></div>';
611
611
  const ke = document.createElement("template");
612
- ke.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
613
- function ct() {
614
- return Ne.content.firstElementChild.cloneNode(!0);
615
- }
612
+ ke.innerHTML = '<div class="cell" role="gridcell" part="cell"></div>';
613
+ const Ie = document.createElement("template");
614
+ Ie.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
616
615
  function dt() {
617
616
  return ke.content.firstElementChild.cloneNode(!0);
618
617
  }
618
+ function ht() {
619
+ return Ie.content.firstElementChild.cloneNode(!0);
620
+ }
619
621
  function X(t) {
620
622
  t.__cellDisplayCache = void 0, t.__cellCacheEpoch = void 0, t.__hasSpecialColumns = void 0;
621
623
  }
622
- function ht(t, e, o, n, i) {
624
+ function ut(t, e, o, n, i) {
623
625
  const r = Math.max(0, o - e), s = t._bodyEl, l = t._visibleColumns, c = l.length;
624
626
  let a = t.__cachedHeaderRowCount;
625
627
  for (a === void 0 && (a = t.querySelector(".header-group-row") ? 2 : 1, t.__cachedHeaderRowCount = a); t._rowPool.length < r; ) {
626
- const p = dt();
628
+ const p = ht();
627
629
  t._rowPool.push(p);
628
630
  }
629
631
  if (t._rowPool.length > r) {
@@ -752,7 +754,7 @@ function oe(t, e, o, n) {
752
754
  }
753
755
  }
754
756
  if (w.classList.contains("editing")) continue;
755
- const T = Me(t, d);
757
+ const T = ze(t, d);
756
758
  if (T) {
757
759
  const E = o[d.field], C = T({
758
760
  row: o,
@@ -783,7 +785,7 @@ function oe(t, e, o, n) {
783
785
  } catch (E) {
784
786
  console.warn(`[tbw-grid] Format error in column '${d.field}':`, E), y = b == null ? "" : String(b);
785
787
  }
786
- else d.type === "date" ? (y = Oe(b), w.textContent = y) : d.type === "boolean" ? w.innerHTML = He(!!b) : (y = b == null ? "" : String(b), w.textContent = y);
788
+ else d.type === "date" ? (y = De(b), w.textContent = y) : d.type === "boolean" ? w.innerHTML = Oe(!!b) : (y = b == null ? "" : String(b), w.textContent = y);
787
789
  u && t._afterCellRender?.({
788
790
  row: o,
789
791
  rowIndex: n,
@@ -799,7 +801,7 @@ function V(t, e, o, n) {
799
801
  e.innerHTML = "";
800
802
  const i = t._visibleColumns, r = i.length, s = t._focusRow, l = t._focusCol, c = t, a = t._hasAfterCellRenderHook?.() ?? !1, h = document.createDocumentFragment();
801
803
  for (let u = 0; u < r; u++) {
802
- const p = i[u], f = ct();
804
+ const p = i[u], f = dt();
803
805
  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);
804
806
  let g = o[p.field];
805
807
  if (p.format)
@@ -808,7 +810,7 @@ function V(t, e, o, n) {
808
810
  } catch (b) {
809
811
  console.warn(`[tbw-grid] Format error in column '${p.field}':`, b);
810
812
  }
811
- const d = p.__compiledView, w = p.__viewTemplate, m = Me(t, p), R = p.externalView;
813
+ const d = p.__compiledView, w = p.__viewTemplate, m = ze(t, p), R = p.externalView;
812
814
  let v = !1;
813
815
  if (m) {
814
816
  const b = m({ row: o, value: g, field: p.field, column: p, cellEl: f });
@@ -843,11 +845,11 @@ function V(t, e, o, n) {
843
845
  f.innerHTML = y ? "" : K(b), v = !0, y && (f.textContent = "", f.setAttribute("data-blocked-template", ""));
844
846
  } else if (w) {
845
847
  const b = w.innerHTML;
846
- /Reflect\.|\bProxy\b|ownKeys\(/.test(b) ? (f.textContent = "", f.setAttribute("data-blocked-template", "")) : (f.innerHTML = K(Le(b, { row: o, value: g })), v = !0);
848
+ /Reflect\.|\bProxy\b|ownKeys\(/.test(b) ? (f.textContent = "", f.setAttribute("data-blocked-template", "")) : (f.innerHTML = K(He(b, { row: o, value: g })), v = !0);
847
849
  } else
848
- p.type === "date" ? f.textContent = Oe(g) : p.type === "boolean" ? f.innerHTML = He(!!g) : f.textContent = g == null ? "" : String(g);
850
+ p.type === "date" ? f.textContent = De(g) : p.type === "boolean" ? f.innerHTML = Oe(!!g) : f.textContent = g == null ? "" : String(g);
849
851
  if (v) {
850
- rt(f);
852
+ st(f);
851
853
  const b = f.textContent || "";
852
854
  /Proxy|Reflect\.ownKeys/.test(b) && (f.textContent = b.replace(/Proxy|Reflect\.ownKeys/g, "").trim(), /Proxy|Reflect\.ownKeys/.test(f.textContent || "") && (f.textContent = ""));
853
855
  }
@@ -875,9 +877,9 @@ function V(t, e, o, n) {
875
877
  }
876
878
  e.appendChild(h);
877
879
  }
878
- function me(t, e, o) {
880
+ function be(t, e, o) {
879
881
  if (e.target?.closest(".resize-handle")) return;
880
- const n = o.querySelector(".cell[data-row]"), i = De(n);
882
+ const n = o.querySelector(".cell[data-row]"), i = Me(n);
881
883
  if (i < 0) return;
882
884
  const r = t._rows[i];
883
885
  if (!r || t._dispatchRowClick?.(e, i, r, o))
@@ -891,7 +893,7 @@ function me(t, e, o) {
891
893
  const c = t._focusRow !== i || t._focusCol !== l;
892
894
  if (t._focusRow = i, t._focusCol = l, s.classList.contains("editing")) {
893
895
  c && (ae(t._bodyEl ?? t), s.classList.add("cell-focus"));
894
- const a = s.querySelector(ze);
896
+ const a = s.querySelector(Ne);
895
897
  try {
896
898
  a?.focus({ preventScroll: !0 });
897
899
  } catch {
@@ -902,7 +904,7 @@ function me(t, e, o) {
902
904
  }
903
905
  }
904
906
  }
905
- function ut(t, e) {
907
+ function ft(t, e) {
906
908
  if (t._dispatchKeyDown?.(e))
907
909
  return;
908
910
  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?.() ?? [], c = l.length ? l[0] : e.target, a = (h) => {
@@ -1005,7 +1007,7 @@ function $(t, e) {
1005
1007
  }
1006
1008
  }
1007
1009
  if (t._activeEditRows !== void 0 && t._activeEditRows !== -1 && l.classList.contains("editing")) {
1008
- const a = l.querySelector(ze);
1010
+ const a = l.querySelector(Ne);
1009
1011
  if (a && document.activeElement !== a)
1010
1012
  try {
1011
1013
  a.focus({ preventScroll: !0 });
@@ -1022,8 +1024,8 @@ function $(t, e) {
1022
1024
  }
1023
1025
  }
1024
1026
  const Z = /* @__PURE__ */ new WeakMap();
1025
- function ft(t, e) {
1026
- const o = De(e), n = at(e);
1027
+ function pt(t, e) {
1028
+ const o = Me(e), n = ct(e);
1027
1029
  o < 0 || n < 0 || (t._focusRow = o, t._focusCol = n, ae(t._bodyEl), e.classList.add("cell-focus"), e.setAttribute("aria-selected", "true"));
1028
1030
  }
1029
1031
  function ce(t, e, o, n) {
@@ -1050,74 +1052,74 @@ function ce(t, e, o, n) {
1050
1052
  cell: a !== void 0 && h !== void 0 && a >= 0 && h >= 0 ? { row: a, col: h } : void 0
1051
1053
  };
1052
1054
  }
1053
- function pt(t, e, o) {
1055
+ function gt(t, e, o) {
1054
1056
  const n = ce(t, e, o, "mousedown");
1055
1057
  (t._dispatchCellMouseDown?.(n) ?? !1) && Z.set(t, !0);
1056
1058
  }
1057
- function gt(t, e, o) {
1059
+ function wt(t, e, o) {
1058
1060
  if (!Z.get(t)) return;
1059
1061
  const n = ce(t, e, o, "mousemove");
1060
1062
  t._dispatchCellMouseMove?.(n);
1061
1063
  }
1062
- function wt(t, e, o) {
1064
+ function mt(t, e, o) {
1063
1065
  if (!Z.get(t)) return;
1064
1066
  const n = ce(t, e, o, "mouseup");
1065
1067
  t._dispatchCellMouseUp?.(n), Z.set(t, !1);
1066
1068
  }
1067
- function mt(t, e, o) {
1069
+ function bt(t, e, o) {
1068
1070
  e.addEventListener(
1069
1071
  "mousedown",
1070
1072
  (n) => {
1071
1073
  const i = n.target.closest(".cell[data-col]");
1072
- i && (i.classList.contains("editing") || ft(t, i));
1074
+ i && (i.classList.contains("editing") || pt(t, i));
1073
1075
  },
1074
1076
  { signal: o }
1075
1077
  ), e.addEventListener(
1076
1078
  "click",
1077
1079
  (n) => {
1078
1080
  const i = n.target.closest(".data-grid-row");
1079
- i && me(t, n, i);
1081
+ i && be(t, n, i);
1080
1082
  },
1081
1083
  { signal: o }
1082
1084
  ), e.addEventListener(
1083
1085
  "dblclick",
1084
1086
  (n) => {
1085
1087
  const i = n.target.closest(".data-grid-row");
1086
- i && me(t, n, i);
1088
+ i && be(t, n, i);
1087
1089
  },
1088
1090
  { signal: o }
1089
1091
  );
1090
1092
  }
1091
- function bt(t, e, o, n) {
1092
- e.addEventListener("keydown", (i) => ut(t, i), { signal: n }), o.addEventListener("mousedown", (i) => pt(t, o, i), { signal: n }), document.addEventListener("mousemove", (i) => gt(t, o, i), { signal: n }), document.addEventListener("mouseup", (i) => wt(t, o, i), { signal: n });
1093
+ function vt(t, e, o, n) {
1094
+ e.addEventListener("keydown", (i) => ft(t, i), { signal: n }), o.addEventListener("mousedown", (i) => gt(t, o, i), { signal: n }), document.addEventListener("mousemove", (i) => wt(t, o, i), { signal: n }), document.addEventListener("mouseup", (i) => mt(t, o, i), { signal: n });
1093
1095
  }
1094
- function vt(t, e) {
1096
+ function Ct(t, e) {
1095
1097
  return t == null && e == null ? 0 : t == null ? -1 : e == null || t > e ? 1 : t < e ? -1 : 0;
1096
1098
  }
1097
- function Ct(t, e, o) {
1098
- const i = o.find((l) => l.field === e.field)?.sortComparator ?? vt, { field: r, direction: s } = e;
1099
+ function yt(t, e, o) {
1100
+ const i = o.find((l) => l.field === e.field)?.sortComparator ?? Ct, { field: r, direction: s } = e;
1099
1101
  return [...t].sort((l, c) => i(l[r], c[r], l, c) * s);
1100
1102
  }
1101
- function be(t, e, o, n) {
1103
+ function ve(t, e, o, n) {
1102
1104
  t._rows = e, t.__rowRenderEpoch++, t._rowPool.forEach((i) => i.__epoch = -1), J(t), t.refreshVirtualWindow(!0), t.dispatchEvent(
1103
1105
  new CustomEvent("sort-change", { detail: { field: o.field, direction: n } })
1104
1106
  ), t.requestStateChange?.();
1105
1107
  }
1106
- function ve(t, e) {
1107
- !t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()), Ce(t, e, 1)) : t._sortState.direction === 1 ? Ce(t, e, -1) : (t._sortState = null, t.__rowRenderEpoch++, t._rowPool.forEach((n) => n.__epoch = -1), t._rows = t.__originalOrder.slice(), J(t), t._headerRowEl?.querySelectorAll('[role="columnheader"].sortable')?.forEach((n) => {
1108
+ function Ce(t, e) {
1109
+ !t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()), ye(t, e, 1)) : t._sortState.direction === 1 ? ye(t, e, -1) : (t._sortState = null, t.__rowRenderEpoch++, t._rowPool.forEach((n) => n.__epoch = -1), t._rows = t.__originalOrder.slice(), J(t), t._headerRowEl?.querySelectorAll('[role="columnheader"].sortable')?.forEach((n) => {
1108
1110
  n.getAttribute("aria-sort") ? (n.getAttribute("aria-sort") === "ascending" || n.getAttribute("aria-sort") === "descending") && (t._sortState || n.setAttribute("aria-sort", "none")) : n.setAttribute("aria-sort", "none");
1109
1111
  }), t.refreshVirtualWindow(!0), t.dispatchEvent(
1110
1112
  new CustomEvent("sort-change", { detail: { field: e.field, direction: 0 } })
1111
1113
  ), t.requestStateChange?.());
1112
1114
  }
1113
- function Ce(t, e, o) {
1115
+ function ye(t, e, o) {
1114
1116
  t._sortState = { field: e.field, direction: o };
1115
- const n = { field: e.field, direction: o }, i = t._columns, s = (t.effectiveConfig?.sortHandler ?? Ct)(t._rows, n, i);
1117
+ const n = { field: e.field, direction: o }, i = t._columns, s = (t.effectiveConfig?.sortHandler ?? yt)(t._rows, n, i);
1116
1118
  s && typeof s.then == "function" ? s.then((l) => {
1117
- be(t, l, e, o);
1118
- }) : be(t, s, e, o);
1119
+ ve(t, l, e, o);
1120
+ }) : ve(t, s, e, o);
1119
1121
  }
1120
- function yt(t, e) {
1122
+ function _t(t, e) {
1121
1123
  typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
1122
1124
  }
1123
1125
  function J(t) {
@@ -1125,7 +1127,7 @@ function J(t) {
1125
1127
  const e = t._headerRowEl;
1126
1128
  e && (e.innerHTML = "", t._visibleColumns.forEach((o, n) => {
1127
1129
  const i = document.createElement("div");
1128
- i.className = "cell", fe(i, "header-cell"), i.setAttribute("role", "columnheader"), i.setAttribute("aria-colindex", String(n + 1)), i.setAttribute("data-field", o.field), i.setAttribute("data-col", String(n));
1130
+ i.className = "cell", pe(i, "header-cell"), i.setAttribute("role", "columnheader"), i.setAttribute("aria-colindex", String(n + 1)), i.setAttribute("data-field", o.field), i.setAttribute("data-col", String(n));
1129
1131
  const r = o.__headerTemplate;
1130
1132
  if (r) Array.from(r.childNodes).forEach((s) => i.appendChild(s.cloneNode(!0)));
1131
1133
  else {
@@ -1135,14 +1137,14 @@ function J(t) {
1135
1137
  if (o.sortable) {
1136
1138
  i.classList.add("sortable"), i.tabIndex = 0;
1137
1139
  const s = document.createElement("span");
1138
- fe(s, "sort-indicator");
1140
+ pe(s, "sort-indicator");
1139
1141
  const l = t._sortState?.field === o.field ? t._sortState.direction : 0, c = { ...z, ...t.icons }, a = l === 1 ? c.sortAsc : l === -1 ? c.sortDesc : c.sortNone;
1140
- yt(s, a), i.appendChild(s), i.setAttribute("aria-sort", l === 0 ? "none" : l === 1 ? "ascending" : "descending"), i.addEventListener("click", (h) => {
1141
- t._resizeController?.isResizing || t._dispatchHeaderClick?.(h, n, i) || ve(t, o);
1142
+ _t(s, a), i.appendChild(s), i.setAttribute("aria-sort", l === 0 ? "none" : l === 1 ? "ascending" : "descending"), i.addEventListener("click", (h) => {
1143
+ t._resizeController?.isResizing || t._dispatchHeaderClick?.(h, n, i) || Ce(t, o);
1142
1144
  }), i.addEventListener("keydown", (h) => {
1143
1145
  if (h.key === "Enter" || h.key === " ") {
1144
1146
  if (h.preventDefault(), t._dispatchHeaderClick?.(h, n, i)) return;
1145
- ve(t, o);
1147
+ Ce(t, o);
1146
1148
  }
1147
1149
  });
1148
1150
  }
@@ -1160,9 +1162,9 @@ function J(t) {
1160
1162
  o.getAttribute("aria-sort") || o.setAttribute("aria-sort", "none");
1161
1163
  }), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex")));
1162
1164
  }
1163
- const Ie = typeof requestIdleCallback == "function";
1164
- function _t(t, e) {
1165
- return Ie ? requestIdleCallback(t, e) : window.setTimeout(() => {
1165
+ const qe = typeof requestIdleCallback == "function";
1166
+ function Et(t, e) {
1167
+ return qe ? requestIdleCallback(t, e) : window.setTimeout(() => {
1166
1168
  const o = Date.now();
1167
1169
  t({
1168
1170
  didTimeout: !1,
@@ -1170,11 +1172,11 @@ function _t(t, e) {
1170
1172
  });
1171
1173
  }, 1);
1172
1174
  }
1173
- function ye(t) {
1174
- Ie ? cancelIdleCallback(t) : clearTimeout(t);
1175
+ function _e(t) {
1176
+ qe ? cancelIdleCallback(t) : clearTimeout(t);
1175
1177
  }
1176
1178
  var x = ((t) => (t[t.STYLE = 1] = "STYLE", t[t.VIRTUALIZATION = 2] = "VIRTUALIZATION", t[t.HEADER = 3] = "HEADER", t[t.ROWS = 4] = "ROWS", t[t.COLUMNS = 5] = "COLUMNS", t[t.FULL = 6] = "FULL", t))(x || {});
1177
- class Et {
1179
+ class St {
1178
1180
  #n;
1179
1181
  #c = 0;
1180
1182
  #f = 0;
@@ -1217,7 +1219,7 @@ class Et {
1217
1219
  this.#c = 0, e >= 5 && this.#n.mergeConfig(), e >= 4 && this.#n.processRows(), e >= 5 && (this.#n.processColumns(), this.#n.updateTemplate()), e >= 3 && this.#n.renderHeader(), e >= 2 && this.#n.renderVirtualWindow(), e >= 1 && this.#n.afterRender(), !this.#h && this.#i && (this.#h = !0, this.#i()), this.#s && (this.#s(), this.#s = null, this.#d = null);
1218
1220
  }
1219
1221
  }
1220
- function _e(t) {
1222
+ function Ee(t) {
1221
1223
  let e = null, o = null, n = null, i = null;
1222
1224
  const r = (c) => {
1223
1225
  if (!e) return;
@@ -1255,31 +1257,31 @@ function _e(t) {
1255
1257
  }
1256
1258
  };
1257
1259
  }
1258
- const ne = "data-animating", St = {
1260
+ const ne = "data-animating", Rt = {
1259
1261
  change: "--tbw-row-change-duration",
1260
1262
  insert: "--tbw-row-insert-duration",
1261
1263
  remove: "--tbw-row-remove-duration"
1262
- }, Rt = {
1264
+ }, Tt = {
1263
1265
  change: 500,
1264
1266
  insert: 300,
1265
1267
  remove: 200
1266
1268
  };
1267
- function Tt(t) {
1269
+ function xt(t) {
1268
1270
  const e = t.trim().toLowerCase();
1269
1271
  return e.endsWith("ms") ? parseFloat(e) : e.endsWith("s") ? parseFloat(e) * 1e3 : parseFloat(e);
1270
1272
  }
1271
- function xt(t, e) {
1272
- const o = St[e], n = getComputedStyle(t).getPropertyValue(o);
1273
+ function At(t, e) {
1274
+ const o = Rt[e], n = getComputedStyle(t).getPropertyValue(o);
1273
1275
  if (n) {
1274
- const i = Tt(n);
1276
+ const i = xt(n);
1275
1277
  if (!isNaN(i) && i > 0)
1276
1278
  return i;
1277
1279
  }
1278
- return Rt[e];
1280
+ return Tt[e];
1279
1281
  }
1280
- function At(t, e, o) {
1282
+ function Pt(t, e, o) {
1281
1283
  t.removeAttribute(ne), t.offsetWidth, t.setAttribute(ne, e);
1282
- const n = xt(t, e);
1284
+ const n = At(t, e);
1283
1285
  setTimeout(() => {
1284
1286
  e !== "remove" && t.removeAttribute(ne);
1285
1287
  }, n);
@@ -1288,15 +1290,15 @@ function de(t, e, o) {
1288
1290
  if (e < 0)
1289
1291
  return !1;
1290
1292
  const n = t.findRenderedRowElement?.(e);
1291
- return n ? (At(n, o), !0) : !1;
1293
+ return n ? (Pt(n, o), !0) : !1;
1292
1294
  }
1293
- function Pt(t, e, o) {
1295
+ function Lt(t, e, o) {
1294
1296
  let n = 0;
1295
1297
  for (const i of e)
1296
1298
  de(t, i, o) && n++;
1297
1299
  return n;
1298
1300
  }
1299
- function Lt(t, e, o) {
1301
+ function Ht(t, e, o) {
1300
1302
  const n = t._rows ?? [], i = t.getRowId;
1301
1303
  if (!i)
1302
1304
  return !1;
@@ -1321,7 +1323,7 @@ function L(t, e) {
1321
1323
  }
1322
1324
  return o;
1323
1325
  }
1324
- function qe(t, e, o) {
1326
+ function We(t, e, o) {
1325
1327
  const n = document.createElement("button");
1326
1328
  if (t && (n.className = t), e)
1327
1329
  for (const i in e) {
@@ -1330,8 +1332,8 @@ function qe(t, e, o) {
1330
1332
  }
1331
1333
  return n;
1332
1334
  }
1333
- const We = document.createElement("template");
1334
- We.innerHTML = `
1335
+ const $e = document.createElement("template");
1336
+ $e.innerHTML = `
1335
1337
  <div class="tbw-scroll-area">
1336
1338
  <div class="rows-body-wrapper">
1337
1339
  <div class="rows-body" role="grid">
@@ -1350,20 +1352,20 @@ We.innerHTML = `
1350
1352
  <div class="faux-vscroll-spacer"></div>
1351
1353
  </div>
1352
1354
  `;
1353
- function $e() {
1354
- return We.content.cloneNode(!0);
1355
+ function Fe() {
1356
+ return $e.content.cloneNode(!0);
1355
1357
  }
1356
- function Ee(t) {
1358
+ function Se(t) {
1357
1359
  const e = document.createDocumentFragment(), o = L(t.hasShell ? "tbw-grid-root has-shell" : "tbw-grid-root");
1358
1360
  if (t.hasShell && t.shellHeader && t.shellBody)
1359
1361
  o.appendChild(t.shellHeader), o.appendChild(t.shellBody);
1360
1362
  else {
1361
1363
  const n = L("tbw-grid-content");
1362
- n.appendChild($e()), o.appendChild(n);
1364
+ n.appendChild(Fe()), o.appendChild(n);
1363
1365
  }
1364
1366
  return e.appendChild(o), e;
1365
1367
  }
1366
- function Ht(t) {
1368
+ function Ot(t) {
1367
1369
  const e = L("tbw-shell-header", { part: "shell-header", role: "presentation" });
1368
1370
  if (t.title) {
1369
1371
  const r = L("tbw-shell-title");
@@ -1381,7 +1383,7 @@ function Ht(t) {
1381
1383
  for (const r of t.apiButtons)
1382
1384
  r.hasRender && n.appendChild(L("tbw-toolbar-content-slot", { "data-toolbar-content": r.id }));
1383
1385
  if ((t.configButtons.some((r) => r.hasRender) || t.apiButtons.some((r) => r.hasRender)) && t.hasPanels && n.appendChild(L("tbw-toolbar-separator")), t.hasPanels) {
1384
- const r = qe(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
1386
+ const r = We(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
1385
1387
  "data-panel-toggle": "",
1386
1388
  title: "Settings",
1387
1389
  "aria-label": "Toggle settings panel",
@@ -1392,9 +1394,9 @@ function Ht(t) {
1392
1394
  }
1393
1395
  return e.appendChild(n), e;
1394
1396
  }
1395
- function Ot(t) {
1397
+ function Dt(t) {
1396
1398
  const e = L("tbw-shell-body"), o = t.panels.length > 0, n = t.panels.length === 1, i = L("tbw-grid-content");
1397
- i.appendChild($e());
1399
+ i.appendChild(Fe());
1398
1400
  let r = null;
1399
1401
  if (o) {
1400
1402
  r = Y("aside", {
@@ -1414,7 +1416,7 @@ function Ot(t) {
1414
1416
  );
1415
1417
  const l = L("tbw-tool-panel-content", { role: "presentation" }), c = L("tbw-accordion");
1416
1418
  for (const a of t.panels) {
1417
- const h = `tbw-accordion-section${a.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = L(h, { "data-section": a.id }), p = qe("tbw-accordion-header", {
1419
+ const h = `tbw-accordion-section${a.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = L(h, { "data-section": a.id }), p = We("tbw-accordion-header", {
1418
1420
  "aria-expanded": String(a.isExpanded),
1419
1421
  "aria-controls": `tbw-section-${a.id}`
1420
1422
  });
@@ -1441,7 +1443,7 @@ function Ot(t) {
1441
1443
  function k(t) {
1442
1444
  return t ? typeof t == "string" ? t : t.outerHTML : "";
1443
1445
  }
1444
- function Dt() {
1446
+ function Mt() {
1445
1447
  return {
1446
1448
  toolPanels: /* @__PURE__ */ new Map(),
1447
1449
  headerContents: /* @__PURE__ */ new Map(),
@@ -1460,10 +1462,10 @@ function Dt() {
1460
1462
  lightDomContentMoved: !1
1461
1463
  };
1462
1464
  }
1463
- function Fe(t) {
1465
+ function Ue(t) {
1464
1466
  return !!(t?.header?.title || t?.header?.toolbarContents?.length || t?.toolPanels?.length || t?.headerContents?.length || t?.header?.lightDomContent?.length || t?.header?.hasToolButtonsContainer);
1465
1467
  }
1466
- function Se(t, e, o = "☰") {
1468
+ function Re(t, e, o = "☰") {
1467
1469
  const n = t?.header?.title ?? e.lightDomTitle ?? "", i = !!n, r = k(o), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], c = new Set(s.map((d) => d.id)), a = [...s];
1468
1470
  for (const d of l)
1469
1471
  c.has(d.id) || a.push(d);
@@ -1477,7 +1479,7 @@ function Se(t, e, o = "☰") {
1477
1479
  }
1478
1480
  return `
1479
1481
  <div class="tbw-shell-header" part="shell-header" role="presentation">
1480
- ${i ? `<div class="tbw-shell-title">${Je(n)}</div>` : ""}
1482
+ ${i ? `<div class="tbw-shell-title">${Qe(n)}</div>` : ""}
1481
1483
  <div class="tbw-shell-content" part="shell-content" role="presentation" data-light-dom-header-content></div>
1482
1484
  <div class="tbw-shell-toolbar" part="shell-toolbar" role="presentation">
1483
1485
  ${g}
@@ -1552,7 +1554,7 @@ function W(t, e, o) {
1552
1554
  e.toolPanels.set(s, g), e.lightDomToolPanelIds.add(s), r.style.display = "none";
1553
1555
  });
1554
1556
  }
1555
- function Mt(t, e, o, n) {
1557
+ function zt(t, e, o, n) {
1556
1558
  const i = t.querySelector(".tbw-shell-toolbar");
1557
1559
  i && i.addEventListener("click", (s) => {
1558
1560
  if (s.target.closest("[data-panel-toggle]")) {
@@ -1569,7 +1571,7 @@ function Mt(t, e, o, n) {
1569
1571
  }
1570
1572
  });
1571
1573
  }
1572
- function zt(t, e, o) {
1574
+ function Nt(t, e, o) {
1573
1575
  const n = t.querySelector(".tbw-tool-panel"), i = t.querySelector("[data-resize-handle]"), r = t.querySelector(".tbw-shell-body");
1574
1576
  if (!n || !i || !r)
1575
1577
  return () => {
@@ -1593,7 +1595,7 @@ function zt(t, e, o) {
1593
1595
  i.removeEventListener("mousedown", g), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f);
1594
1596
  };
1595
1597
  }
1596
- function Re(t, e, o) {
1598
+ function Te(t, e, o) {
1597
1599
  const n = e?.header?.toolbarContents ?? [], i = [...o.toolbarContents.values()], r = new Set(n.map((l) => l.id)), s = [...n];
1598
1600
  for (const l of i)
1599
1601
  r.has(l.id) || s.push(l);
@@ -1625,7 +1627,7 @@ function se(t, e) {
1625
1627
  a && e.headerContentCleanups.set(s.id, a);
1626
1628
  }
1627
1629
  }
1628
- function Nt(t, e, o) {
1630
+ function kt(t, e, o) {
1629
1631
  if (!e.isPanelOpen) return;
1630
1632
  const n = k(o?.expand ?? z.expand), i = k(o?.collapse ?? z.collapse);
1631
1633
  for (const [r, s] of e.toolPanels) {
@@ -1646,15 +1648,15 @@ function Nt(t, e, o) {
1646
1648
  }
1647
1649
  }
1648
1650
  }
1649
- function Te(t, e) {
1651
+ function xe(t, e) {
1650
1652
  const o = t.querySelector("[data-panel-toggle]");
1651
1653
  o && (o.classList.toggle("active", e.isPanelOpen), o.setAttribute("aria-pressed", String(e.isPanelOpen)));
1652
1654
  }
1653
- function xe(t, e) {
1655
+ function Ae(t, e) {
1654
1656
  const o = t.querySelector(".tbw-tool-panel");
1655
1657
  o && (o.classList.toggle("open", e.isPanelOpen), e.isPanelOpen || (o.style.width = ""));
1656
1658
  }
1657
- function kt(t) {
1659
+ function It(t) {
1658
1660
  for (const e of t.headerContentCleanups.values())
1659
1661
  e();
1660
1662
  t.headerContentCleanups.clear();
@@ -1671,7 +1673,7 @@ function kt(t) {
1671
1673
  t.toolPanels.get(e)?.onClose?.();
1672
1674
  t.isPanelOpen = !1, t.expandedSections.clear(), t.toolPanels.clear(), t.headerContents.clear(), t.toolbarContents.clear(), t.lightDomHeaderContent = [], t.lightDomToolPanelIds.clear(), t.lightDomToolbarContentIds.clear(), t.lightDomContentMoved = !1;
1673
1675
  }
1674
- function It(t, e) {
1676
+ function qt(t, e) {
1675
1677
  let o = !1;
1676
1678
  const n = {
1677
1679
  get isInitialized() {
@@ -1700,7 +1702,7 @@ function It(t, e) {
1700
1702
  s && t.expandedSections.add(s.id);
1701
1703
  }
1702
1704
  const i = e.getShadow();
1703
- Te(i, t), xe(i, t), Nt(i, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: n.expandedSections });
1705
+ xe(i, t), Ae(i, t), kt(i, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: n.expandedSections });
1704
1706
  },
1705
1707
  closeToolPanel() {
1706
1708
  if (!t.isPanelOpen) return;
@@ -1711,7 +1713,7 @@ function It(t, e) {
1711
1713
  r.onClose?.();
1712
1714
  t.isPanelOpen = !1;
1713
1715
  const i = e.getShadow();
1714
- Te(i, t), xe(i, t), e.emit("tool-panel-close", {});
1716
+ xe(i, t), Ae(i, t), e.emit("tool-panel-close", {});
1715
1717
  },
1716
1718
  toggleToolPanel() {
1717
1719
  t.isPanelOpen ? n.closeToolPanel() : n.openToolPanel();
@@ -1736,7 +1738,7 @@ function It(t, e) {
1736
1738
  const u = s.querySelector(`[data-section="${c}"] .tbw-accordion-content`);
1737
1739
  u && (u.innerHTML = "");
1738
1740
  }
1739
- t.expandedSections.add(i), ie(s, i, !0), qt(s, t, i);
1741
+ t.expandedSections.add(i), ie(s, i, !0), Wt(s, t, i);
1740
1742
  }
1741
1743
  e.emit("tool-panel-section-toggle", { id: i, expanded: !l });
1742
1744
  },
@@ -1794,7 +1796,7 @@ function ie(t, e, o) {
1794
1796
  const n = t.querySelector(`[data-section="${e}"]`);
1795
1797
  n && n.classList.toggle("expanded", o);
1796
1798
  }
1797
- function qt(t, e, o) {
1799
+ function Wt(t, e, o) {
1798
1800
  const n = e.toolPanels.get(o);
1799
1801
  if (!n?.render) return;
1800
1802
  const i = t.querySelector(`[data-section="${o}"] .tbw-accordion-content`);
@@ -1802,8 +1804,8 @@ function qt(t, e, o) {
1802
1804
  const r = n.render(i);
1803
1805
  r && e.panelCleanups.set(o, r);
1804
1806
  }
1805
- function Wt(t, e, o, n) {
1806
- const i = Fe(e), r = [], s = [
1807
+ function $t(t, e, o, n) {
1808
+ const i = Ue(e), r = [], s = [
1807
1809
  "tbw-grid-header",
1808
1810
  "tbw-grid-tool-buttons",
1809
1811
  "tbw-grid-tool-panel",
@@ -1839,19 +1841,19 @@ function Wt(t, e, o, n) {
1839
1841
  icon: k(v.icon),
1840
1842
  isExpanded: o.expandedSections.has(v.id)
1841
1843
  }))
1842
- }, w = Ht(g), m = Ot(d), R = Ee({
1844
+ }, w = Ot(g), m = Dt(d), R = Se({
1843
1845
  hasShell: !0,
1844
1846
  shellHeader: w,
1845
1847
  shellBody: m
1846
1848
  });
1847
1849
  t.appendChild(R);
1848
1850
  } else {
1849
- const l = Ee({ hasShell: !1 });
1851
+ const l = Se({ hasShell: !1 });
1850
1852
  t.appendChild(l);
1851
1853
  }
1852
1854
  return i;
1853
1855
  }
1854
- function $t() {
1856
+ function Ft() {
1855
1857
  return {
1856
1858
  startY: null,
1857
1859
  startX: null,
@@ -1865,19 +1867,19 @@ function $t() {
1865
1867
  momentumRaf: 0
1866
1868
  };
1867
1869
  }
1868
- function Ft(t) {
1870
+ function Ut(t) {
1869
1871
  t.startY = null, t.startX = null, t.scrollTop = null, t.scrollLeft = null, t.lastY = null, t.lastX = null, t.lastTime = null;
1870
1872
  }
1871
- function Ue(t) {
1873
+ function Ve(t) {
1872
1874
  t.momentumRaf && (cancelAnimationFrame(t.momentumRaf), t.momentumRaf = 0);
1873
1875
  }
1874
- function Ut(t, e, o) {
1876
+ function Vt(t, e, o) {
1875
1877
  if (t.touches.length !== 1) return;
1876
- Ue(e);
1878
+ Ve(e);
1877
1879
  const n = t.touches[0];
1878
1880
  e.startY = n.clientY, e.startX = n.clientX, e.lastY = n.clientY, e.lastX = n.clientX, e.lastTime = performance.now(), e.scrollTop = o.fauxScrollbar.scrollTop, e.scrollLeft = o.scrollArea?.scrollLeft ?? 0, e.velocityY = 0, e.velocityX = 0;
1879
1881
  }
1880
- function Vt(t, e, o) {
1882
+ function Bt(t, e, o) {
1881
1883
  if (t.touches.length !== 1 || e.startY === null || e.startX === null || e.scrollTop === null || e.scrollLeft === null)
1882
1884
  return !1;
1883
1885
  const n = t.touches[0], i = n.clientY, r = n.clientX, s = performance.now(), l = e.startY - i, c = e.startX - r;
@@ -1894,10 +1896,10 @@ function Vt(t, e, o) {
1894
1896
  }
1895
1897
  return f && (o.fauxScrollbar.scrollTop = e.scrollTop + l), g && o.scrollArea && (o.scrollArea.scrollLeft = e.scrollLeft + c), f || g;
1896
1898
  }
1897
- function Bt(t, e) {
1898
- (Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Gt(t, e), Ft(t);
1899
- }
1900
1899
  function Gt(t, e) {
1900
+ (Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Xt(t, e), Ut(t);
1901
+ }
1902
+ function Xt(t, e) {
1901
1903
  const i = () => {
1902
1904
  t.velocityY *= 0.95, t.velocityX *= 0.95;
1903
1905
  const r = t.velocityY * 16, s = t.velocityX * 16;
@@ -1905,19 +1907,19 @@ function Gt(t, e) {
1905
1907
  };
1906
1908
  t.momentumRaf = requestAnimationFrame(i);
1907
1909
  }
1908
- function Xt(t, e, o, n) {
1909
- t.addEventListener("touchstart", (i) => Ut(i, e, o), {
1910
+ function Yt(t, e, o, n) {
1911
+ t.addEventListener("touchstart", (i) => Vt(i, e, o), {
1910
1912
  passive: !0,
1911
1913
  signal: n
1912
1914
  }), t.addEventListener(
1913
1915
  "touchmove",
1914
1916
  (i) => {
1915
- Vt(i, e, o) && i.preventDefault();
1917
+ Bt(i, e, o) && i.preventDefault();
1916
1918
  },
1917
1919
  { passive: !1, signal: n }
1918
- ), t.addEventListener("touchend", () => Bt(e, o), { passive: !0, signal: n });
1920
+ ), t.addEventListener("touchend", () => Gt(e, o), { passive: !0, signal: n });
1919
1921
  }
1920
- const Yt = [
1922
+ const jt = [
1921
1923
  {
1922
1924
  property: "editable",
1923
1925
  pluginName: "editing",
@@ -1955,7 +1957,7 @@ const Yt = [
1955
1957
  importHint: "import { PinnedColumnsPlugin } from '@toolbox-web/grid/plugins/pinned-columns';",
1956
1958
  isUsed: (t) => t === "left" || t === "right"
1957
1959
  }
1958
- ], jt = [
1960
+ ], Kt = [
1959
1961
  {
1960
1962
  property: "columnGroups",
1961
1963
  pluginName: "groupingColumns",
@@ -1964,7 +1966,7 @@ const Yt = [
1964
1966
  importHint: "import { GroupingColumnsPlugin } from '@toolbox-web/grid/plugins/grouping-columns';",
1965
1967
  isUsed: (t) => Array.isArray(t) && t.length > 0
1966
1968
  }
1967
- ], Kt = {
1969
+ ], Zt = {
1968
1970
  editing: "import { EditingPlugin } from '@toolbox-web/grid/plugins/editing';",
1969
1971
  selection: "import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';",
1970
1972
  reorder: "import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';",
@@ -1986,9 +1988,9 @@ const Yt = [
1986
1988
  columnVirtualization: "import { ColumnVirtualizationPlugin } from '@toolbox-web/grid/plugins/column-virtualization';"
1987
1989
  };
1988
1990
  function le(t) {
1989
- return Kt[t] ?? `import { ${D(t)}Plugin } from '@toolbox-web/grid/plugins/${t}';`;
1991
+ return Zt[t] ?? `import { ${D(t)}Plugin } from '@toolbox-web/grid/plugins/${t}';`;
1990
1992
  }
1991
- function Ve() {
1993
+ function Be() {
1992
1994
  if (typeof window < "u" && window.location) {
1993
1995
  const t = window.location.hostname;
1994
1996
  if (t === "localhost" || t === "127.0.0.1" || t === "::1")
@@ -1999,11 +2001,11 @@ function Ve() {
1999
2001
  function D(t) {
2000
2002
  return t.charAt(0).toUpperCase() + t.slice(1);
2001
2003
  }
2002
- function Ae(t, e) {
2004
+ function Pe(t, e) {
2003
2005
  return t.some((o) => o.name === e);
2004
2006
  }
2005
- function Zt(t, e) {
2006
- const o = Yt, n = jt, i = /* @__PURE__ */ new Map();
2007
+ function Jt(t, e) {
2008
+ const o = jt, n = Kt, i = /* @__PURE__ */ new Map();
2007
2009
  function r(l, c, a, h, u = !1) {
2008
2010
  i.has(l) || i.set(l, { description: c, importHint: a, fields: [], isConfigProperty: u });
2009
2011
  const p = i.get(l);
@@ -2011,14 +2013,14 @@ function Zt(t, e) {
2011
2013
  }
2012
2014
  for (const l of n) {
2013
2015
  const c = t[l.property];
2014
- (l.isUsed ? l.isUsed(c) : c !== void 0) && !Ae(e, l.pluginName) && r(l.pluginName, l.description, l.importHint ?? le(l.pluginName), l.property, !0);
2016
+ (l.isUsed ? l.isUsed(c) : c !== void 0) && !Pe(e, l.pluginName) && r(l.pluginName, l.description, l.importHint ?? le(l.pluginName), l.property, !0);
2015
2017
  }
2016
2018
  const s = t.columns;
2017
2019
  if (s && s.length > 0)
2018
2020
  for (const l of s)
2019
2021
  for (const c of o) {
2020
2022
  const a = l[c.property];
2021
- if ((c.isUsed ? c.isUsed(a) : a !== void 0) && !Ae(e, c.pluginName)) {
2023
+ if ((c.isUsed ? c.isUsed(a) : a !== void 0) && !Pe(e, c.pluginName)) {
2022
2024
  const u = l.field || "<unknown>";
2023
2025
  r(c.pluginName, c.description, c.importHint ?? le(c.pluginName), u);
2024
2026
  }
@@ -2053,7 +2055,7 @@ This validation helps catch misconfigurations early. The properties listed above
2053
2055
  );
2054
2056
  }
2055
2057
  }
2056
- function Jt(t) {
2058
+ function Qt(t) {
2057
2059
  const e = [], o = [];
2058
2060
  for (const n of t) {
2059
2061
  const r = n.constructor.manifest;
@@ -2066,7 +2068,7 @@ function Jt(t) {
2066
2068
  }
2067
2069
  }
2068
2070
  }
2069
- if (o.length > 0 && Ve())
2071
+ if (o.length > 0 && Be())
2070
2072
  for (const n of o)
2071
2073
  console.warn(n);
2072
2074
  if (e.length > 0)
@@ -2076,7 +2078,7 @@ ${e.join(`
2076
2078
 
2077
2079
  `)}`);
2078
2080
  }
2079
- function Qt(t, e) {
2081
+ function eo(t, e) {
2080
2082
  const o = t.name, i = t.constructor.dependencies ?? [];
2081
2083
  for (const r of i) {
2082
2084
  const s = r.name, l = r.required ?? !0, c = r.reason;
@@ -2098,8 +2100,8 @@ ${h}.
2098
2100
  }
2099
2101
  }
2100
2102
  }
2101
- function eo(t) {
2102
- if (!Ve()) return;
2103
+ function to(t) {
2104
+ if (!Be()) return;
2103
2105
  const e = new Set(t.map((n) => n.name)), o = /* @__PURE__ */ new Set();
2104
2106
  for (const n of t) {
2105
2107
  const r = n.constructor.manifest;
@@ -2121,7 +2123,7 @@ ${D(n.name)}Plugin and ${D(s.name)}Plugin are both loaded, but they are currentl
2121
2123
  }
2122
2124
  }
2123
2125
  }
2124
- class to {
2126
+ class oo {
2125
2127
  constructor(e) {
2126
2128
  this.grid = e;
2127
2129
  }
@@ -2138,7 +2140,7 @@ class to {
2138
2140
  this.attach(o);
2139
2141
  }
2140
2142
  attach(e) {
2141
- if (Qt(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
2143
+ if (eo(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
2142
2144
  for (const [o, n] of Object.entries(e.cellRenderers))
2143
2145
  this.cellRenderers.set(o, n);
2144
2146
  if (e.headerRenderers)
@@ -2338,7 +2340,7 @@ class to {
2338
2340
  }
2339
2341
  class H extends HTMLElement {
2340
2342
  static tagName = "tbw-grid";
2341
- static version = "1.3.0";
2343
+ static version = "1.3.1";
2342
2344
  static adapters = [];
2343
2345
  static registerAdapter(e) {
2344
2346
  this.adapters.push(e);
@@ -2375,7 +2377,7 @@ class H extends HTMLElement {
2375
2377
  #w = null;
2376
2378
  #r = !1;
2377
2379
  #b;
2378
- #A = $t();
2380
+ #A = Ft();
2379
2381
  #p;
2380
2382
  #C;
2381
2383
  #y;
@@ -2394,7 +2396,7 @@ class H extends HTMLElement {
2394
2396
  #P;
2395
2397
  #L;
2396
2398
  #t;
2397
- #e = Dt();
2399
+ #e = Mt();
2398
2400
  #a;
2399
2401
  #D;
2400
2402
  #H = /* @__PURE__ */ new Map();
@@ -2483,9 +2485,9 @@ class H extends HTMLElement {
2483
2485
  return this.#p || (this.#p = new AbortController()), this.#p.signal;
2484
2486
  }
2485
2487
  constructor() {
2486
- super(), this.#le(), this.#f = new Promise((e) => this.#d = e), this.#l = new Et({
2488
+ super(), this.#le(), this.#f = new Promise((e) => this.#d = e), this.#l = new St({
2487
2489
  mergeConfig: () => {
2488
- this.#t.parseLightDomColumns(this), this.#t.merge(), this.#K(), Zt(this.#i, this.#o?.getPlugins() ?? []), Jt(this.#o?.getPlugins() ?? []), eo(this.#o?.getPlugins() ?? []), this.#I = [...this._columns];
2490
+ this.#t.parseLightDomColumns(this), this.#t.merge(), this.#K(), Jt(this.#i, this.#o?.getPlugins() ?? []), Qt(this.#o?.getPlugins() ?? []), to(this.#o?.getPlugins() ?? []), this.#I = [...this._columns];
2489
2491
  },
2490
2492
  processColumns: () => this.#me(),
2491
2493
  processRows: () => this.#be(),
@@ -2493,10 +2495,10 @@ class H extends HTMLElement {
2493
2495
  updateTemplate: () => U(this),
2494
2496
  renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
2495
2497
  afterRender: () => {
2496
- this.#o?.afterRender(), this.#i.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, pe(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, $(this)), this._virtualization.enabled && !this.#N && this.#ce();
2498
+ this.#o?.afterRender(), this.#i.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, ge(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, $(this)), this._virtualization.enabled && !this.#N && this.#ce();
2497
2499
  },
2498
2500
  isConnected: () => this.isConnected && this.#h
2499
- }), this.#l.setInitialReadyResolver(() => this.#d?.()), this.#a = It(this.#e, {
2501
+ }), this.#l.setInitialReadyResolver(() => this.#d?.()), this.#a = qt(this.#e, {
2500
2502
  getShadow: () => this.#n,
2501
2503
  getShellConfig: () => this.#i?.shell,
2502
2504
  getAccordionIcons: () => ({
@@ -2505,7 +2507,7 @@ class H extends HTMLElement {
2505
2507
  }),
2506
2508
  emit: (e, o) => this.#T(e, o),
2507
2509
  refreshShellHeader: () => this.refreshShellHeader()
2508
- }), this.#t = new lt({
2510
+ }), this.#t = new at({
2509
2511
  getRows: () => this.#s,
2510
2512
  getSortState: () => this._sortState,
2511
2513
  setSortState: (e) => {
@@ -2599,7 +2601,7 @@ ${o}`;
2599
2601
  this.#l.requestPhase(x.STYLE, "plugin:requestAfterRender");
2600
2602
  }
2601
2603
  #j() {
2602
- this.#o = new to(this);
2604
+ this.#o = new oo(this);
2603
2605
  const e = this.#i?.plugins, o = Array.isArray(e) ? e : [];
2604
2606
  this.#o.attachAll(o);
2605
2607
  }
@@ -2661,9 +2663,9 @@ ${o}`;
2661
2663
  };
2662
2664
  }
2663
2665
  connectedCallback() {
2664
- this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", H.version), this._rows = Array.isArray(this.#s) ? [...this.#s] : [], this.#p && (this.#p.abort(), this.#O = !1), this.#p = new AbortController(), this.#v && (ye(this.#v), this.#v = void 0), I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#R()), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#j();
2666
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", H.version), this._rows = Array.isArray(this.#s) ? [...this.#s] : [], this.#p && (this.#p.abort(), this.#O = !1), this.#p = new AbortController(), this.#v && (_e(this.#v), this.#v = void 0), I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#R()), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#j();
2665
2667
  const e = this.#i?.plugins;
2666
- this.#_ = Array.isArray(e) ? e : [], this.#Z(), this.#c || (this.#G(), this.#z(), this.#c = !0), this.#J(), this.#v = _t(
2668
+ this.#_ = Array.isArray(e) ? e : [], this.#Z(), this.#c || (this.#G(), this.#z(), this.#c = !0), this.#J(), this.#v = Et(
2667
2669
  () => {
2668
2670
  this.#Ee();
2669
2671
  },
@@ -2671,7 +2673,7 @@ ${o}`;
2671
2673
  );
2672
2674
  }
2673
2675
  disconnectedCallback() {
2674
- this.#v && (ye(this.#v), this.#v = void 0), this.#ae(), kt(this.#e), this.#a.setInitialized(!1), this.#D?.(), this.#D = void 0, Ue(this.#A), this.#p && (this.#p.abort(), this.#p = void 0), this.#P?.abort(), this.#P = void 0, this.#O = !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.#N = !1), X(this), this.#S.clear(), this.#_ = void 0;
2676
+ this.#v && (_e(this.#v), this.#v = void 0), this.#ae(), It(this.#e), this.#a.setInitialized(!1), this.#D?.(), this.#D = void 0, Ve(this.#A), this.#p && (this.#p.abort(), this.#p = void 0), this.#P?.abort(), this.#P = void 0, this.#O = !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.#N = !1), X(this), this.#S.clear(), this.#_ = void 0;
2675
2677
  for (const e of this._rowPool)
2676
2678
  e.remove();
2677
2679
  this._rowPool.length = 0, this.__rowsBodyEl = null, this.#h = !1;
@@ -2690,15 +2692,15 @@ ${o}`;
2690
2692
  #J() {
2691
2693
  const o = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
2692
2694
  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.#a.isInitialized) {
2693
- se(this.#n, this.#e), Re(this.#n, this.#i?.shell, this.#e);
2695
+ se(this.#n, this.#e), Te(this.#n, this.#i?.shell, this.#e);
2694
2696
  const r = this.#i?.shell?.toolPanel?.defaultOpen;
2695
2697
  r && this.#e.toolPanels.has(r) && (this.openToolPanel(), this.#e.expandedSections.add(r));
2696
2698
  }
2697
- if (this.setAttribute("data-upgraded", ""), this.#h = !0, this._resizeController = _e(this), this.#x(), this.#ee(o), this.#O)
2699
+ if (this.setAttribute("data-upgraded", ""), this.#h = !0, this._resizeController = Ee(this), this.#x(), this.#ee(o), this.#O)
2698
2700
  return;
2699
2701
  this.#O = !0;
2700
2702
  const n = this.disconnectSignal;
2701
- bt(this, this, this.#n, n);
2703
+ vt(this, this, this.#n, n);
2702
2704
  const i = this.#i.rowHeight;
2703
2705
  i && i > 0 ? this._virtualization.rowHeight = i : requestAnimationFrame(() => this.#Q()), queueMicrotask(() => this.#de()), this.#l.requestPhase(x.FULL, "afterConnect");
2704
2706
  }
@@ -2751,9 +2753,9 @@ ${o}`;
2751
2753
  }
2752
2754
  },
2753
2755
  { passive: !1, signal: o }
2754
- ), Xt(r, this.#A, { fauxScrollbar: n, scrollArea: s }, o));
2756
+ ), Yt(r, this.#A, { fauxScrollbar: n, scrollArea: s }, o));
2755
2757
  }
2756
- this._bodyEl && mt(this, this._bodyEl, o), this.#C?.disconnect(), this._virtualization.viewportEl && (this.#C = new ResizeObserver(() => {
2758
+ this._bodyEl && bt(this, this._bodyEl, o), this.#C?.disconnect(), this._virtualization.viewportEl && (this.#C = new ResizeObserver(() => {
2757
2759
  this.#l.requestPhase(x.VIRTUALIZATION, "resize-observer");
2758
2760
  }), this.#C.observe(this._virtualization.viewportEl)), this.#n.addEventListener(
2759
2761
  "focusin",
@@ -2839,7 +2841,7 @@ ${o}`;
2839
2841
  X(this), this.#t.merge(), this.#x();
2840
2842
  }
2841
2843
  #pe() {
2842
- this.#t.merge(), this.#i.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, pe(this)) : (this._columns.forEach((o) => {
2844
+ this.#t.merge(), this.#i.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, ge(this)) : (this._columns.forEach((o) => {
2843
2845
  !o.__userResized && o.__autoSized && delete o.width;
2844
2846
  }), U(this));
2845
2847
  }
@@ -2847,7 +2849,7 @@ ${o}`;
2847
2849
  I(this, this.#e), q(this, this.#e);
2848
2850
  const e = !!this.#n.querySelector(".has-shell"), o = !!this.#n.querySelector(".tbw-tool-panel"), n = this.#n.querySelectorAll(".tbw-accordion-section").length;
2849
2851
  this.#t.parseLightDomColumns(this), this.#t.merge(), this.#K(), W(this, this.#e, this.#R()), this.#t.markSourcesChanged(), this.#t.merge();
2850
- const i = Fe(this.#i?.shell), r = (this.#i?.shell?.toolPanels?.length ?? 0) > 0, s = (this.#i?.shell?.toolPanels?.length ?? 0) !== n;
2852
+ const i = Ue(this.#i?.shell), r = (this.#i?.shell?.toolPanels?.length ?? 0) > 0, s = (this.#i?.shell?.toolPanels?.length ?? 0) !== n;
2851
2853
  if (e !== i || !e && i || !o && r || o && s) {
2852
2854
  this.#G(), this.#z(), this.#J(), this.#$();
2853
2855
  return;
@@ -2879,14 +2881,14 @@ ${o}`;
2879
2881
  }
2880
2882
  #ve(e) {
2881
2883
  const o = {
2882
- ...Be,
2884
+ ...Ge,
2883
2885
  ...e.animation
2884
2886
  }, n = o.mode ?? "reduced-motion";
2885
2887
  let i = 1;
2886
2888
  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;
2887
2889
  }
2888
2890
  #F(e, o, n = this.__rowRenderEpoch) {
2889
- this.#b || (this.#b = (i, r, s) => this.#o?.renderRow(i, r, s) ?? !1), ht(this, e, o, n, this.#b);
2891
+ this.#b || (this.#b = (i, r, s) => this.#o?.renderRow(i, r, s) ?? !1), ut(this, e, o, n, this.#b);
2890
2892
  }
2891
2893
  #U = -1;
2892
2894
  #ne = -1;
@@ -3073,10 +3075,10 @@ ${o}`;
3073
3075
  de(this, e, o);
3074
3076
  }
3075
3077
  animateRows(e, o) {
3076
- Pt(this, e, o);
3078
+ Lt(this, e, o);
3077
3079
  }
3078
3080
  animateRowById(e, o) {
3079
- return Lt(this, e, o);
3081
+ return Ht(this, e, o);
3080
3082
  }
3081
3083
  setColumnVisible(e, o) {
3082
3084
  const n = this.#t.setColumnVisible(e, o);
@@ -3178,11 +3180,11 @@ ${o}`;
3178
3180
  #_e() {
3179
3181
  const o = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
3180
3182
  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.#a.isInitialized) {
3181
- se(this.#n, this.#e), Re(this.#n, this.#i?.shell, this.#e);
3183
+ se(this.#n, this.#e), Te(this.#n, this.#i?.shell, this.#e);
3182
3184
  const n = this.#i?.shell?.toolPanel?.defaultOpen;
3183
3185
  n && this.#e.toolPanels.has(n) && (this.openToolPanel(), this.#e.expandedSections.add(n));
3184
3186
  }
3185
- this._resizeController = _e(this), this.#ee(o), this.#l.requestPhase(x.COLUMNS, "shellRefresh");
3187
+ this._resizeController = Ee(this), this.#ee(o), this.#l.requestPhase(x.COLUMNS, "shellRefresh");
3186
3188
  }
3187
3189
  #S = /* @__PURE__ */ new Map();
3188
3190
  registerStyles(e, o) {
@@ -3210,7 +3212,7 @@ ${o}`;
3210
3212
  this.#t.markSourcesChanged(), this.#t.merge();
3211
3213
  const l = this.#n.querySelector(".tbw-shell-header");
3212
3214
  if (l) {
3213
- const c = Se(
3215
+ const c = Re(
3214
3216
  this.#i.shell,
3215
3217
  this.#e,
3216
3218
  this.#i.icons?.toolPanel
@@ -3234,7 +3236,7 @@ ${o}`;
3234
3236
  this.#t.markSourcesChanged(), this.#t.merge();
3235
3237
  const s = this.#n.querySelector(".tbw-shell-header");
3236
3238
  if (s) {
3237
- const l = Se(
3239
+ const l = Re(
3238
3240
  this.#i.shell,
3239
3241
  this.#e,
3240
3242
  this.#i.icons?.toolPanel
@@ -3291,7 +3293,7 @@ ${o}`;
3291
3293
  #G() {
3292
3294
  I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#R()), this.#t.markSourcesChanged(), this.#t.merge();
3293
3295
  const e = this.#i?.shell;
3294
- Wt(
3296
+ $t(
3295
3297
  this.#n,
3296
3298
  e,
3297
3299
  { isPanelOpen: this.#e.isPanelOpen, expandedSections: this.#e.expandedSections },
@@ -3299,24 +3301,24 @@ ${o}`;
3299
3301
  ) && (this.#X(), this.#a.setInitialized(!0));
3300
3302
  }
3301
3303
  #X() {
3302
- Mt(this.#n, this.#i?.shell, this.#e, {
3304
+ zt(this.#n, this.#i?.shell, this.#e, {
3303
3305
  onPanelToggle: () => this.toggleToolPanel(),
3304
3306
  onSectionToggle: (e) => this.toggleToolPanelSection(e)
3305
- }), this.#D?.(), this.#D = zt(this.#n, this.#i?.shell, (e) => {
3307
+ }), this.#D?.(), this.#D = Nt(this.#n, this.#i?.shell, (e) => {
3306
3308
  this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
3307
3309
  });
3308
3310
  }
3309
3311
  }
3310
3312
  customElements.get(H.tagName) || customElements.define(H.tagName, H);
3311
3313
  globalThis.DataGridElement = H;
3312
- const no = {
3314
+ const io = {
3313
3315
  CAN_MOVE_COLUMN: "canMoveColumn",
3314
3316
  GET_CONTEXT_MENU_ITEMS: "getContextMenuItems"
3315
3317
  };
3316
- class io {
3318
+ class ro {
3317
3319
  static dependencies;
3318
3320
  static manifest;
3319
- version = "1.3.0";
3321
+ version = "1.3.1";
3320
3322
  styles;
3321
3323
  cellRenderers;
3322
3324
  headerRenderers;
@@ -3443,7 +3445,7 @@ const A = {
3443
3445
  GROUP_KEY: "data-group-key",
3444
3446
  TREE_LEVEL: "data-tree-level",
3445
3447
  STICKY: "data-sticky"
3446
- }, ro = {
3448
+ }, so = {
3447
3449
  ROOT: `.${A.ROOT}`,
3448
3450
  HEADER: `.${A.HEADER}`,
3449
3451
  HEADER_ROW: `.${A.HEADER_ROW}`,
@@ -3458,7 +3460,7 @@ const A = {
3458
3460
  CELL_AT: (t, e) => `.${A.DATA_ROW}[${j.ROW_INDEX}="${t}"] .${A.DATA_CELL}[${j.COL_INDEX}="${e}"]`,
3459
3461
  SELECTED_ROWS: `.${A.DATA_ROW}.${A.SELECTED}`,
3460
3462
  EDITING_CELL: `.${A.DATA_CELL}.${A.EDITING}`
3461
- }, so = {
3463
+ }, lo = {
3462
3464
  COLOR_BG: "--tbw-color-bg",
3463
3465
  COLOR_FG: "--tbw-color-fg",
3464
3466
  COLOR_FG_MUTED: "--tbw-color-fg-muted",
@@ -3477,14 +3479,14 @@ const A = {
3477
3479
  BORDER_RADIUS: "--tbw-border-radius",
3478
3480
  FOCUS_OUTLINE: "--tbw-focus-outline"
3479
3481
  };
3480
- function lo(t) {
3482
+ function ao(t) {
3481
3483
  const e = document.createElement("tbw-grid");
3482
3484
  return t && (e.gridConfig = t), e;
3483
3485
  }
3484
- function ao(t, e = document) {
3486
+ function co(t, e = document) {
3485
3487
  return e.querySelector(t);
3486
3488
  }
3487
- const co = {
3489
+ const ho = {
3488
3490
  CELL_CHANGE: "cell-change",
3489
3491
  CELL_COMMIT: "cell-commit",
3490
3492
  ROW_COMMIT: "row-commit",
@@ -3497,7 +3499,7 @@ const co = {
3497
3499
  CELL_ACTIVATE: "cell-activate",
3498
3500
  GROUP_TOGGLE: "group-toggle",
3499
3501
  COLUMN_STATE_CHANGE: "column-state-change"
3500
- }, ho = {
3502
+ }, uo = {
3501
3503
  SELECTION_CHANGE: "selection-change",
3502
3504
  TREE_EXPAND: "tree-expand",
3503
3505
  FILTER_CHANGE: "filter-change",
@@ -3547,7 +3549,7 @@ const co = {
3547
3549
  list() {
3548
3550
  return [...Object.keys(re), ...F.keys()];
3549
3551
  }
3550
- }, Pe = {
3552
+ }, Le = {
3551
3553
  sum: (t) => t.reduce((e, o) => e + o, 0),
3552
3554
  avg: (t) => t.length ? t.reduce((e, o) => e + o, 0) / t.length : 0,
3553
3555
  count: (t) => t.length,
@@ -3556,46 +3558,46 @@ const co = {
3556
3558
  first: (t) => t[0] ?? 0,
3557
3559
  last: (t) => t[t.length - 1] ?? 0
3558
3560
  };
3559
- function oo(t) {
3560
- return Pe[t] ?? Pe.sum;
3561
+ function no(t) {
3562
+ return Le[t] ?? Le.sum;
3561
3563
  }
3562
- function uo(t, e) {
3563
- return oo(t)(e);
3564
+ function fo(t, e) {
3565
+ return no(t)(e);
3564
3566
  }
3565
- const fo = M.register.bind(M), po = M.unregister.bind(M), go = M.get.bind(M), wo = M.run.bind(M), mo = M.list.bind(M);
3567
+ const po = M.register.bind(M), go = M.unregister.bind(M), wo = M.get.bind(M), mo = M.run.bind(M), bo = M.list.bind(M);
3566
3568
  export {
3567
- io as BaseGridPlugin,
3568
- Be as DEFAULT_ANIMATION_CONFIG,
3569
+ ro as BaseGridPlugin,
3570
+ Ge as DEFAULT_ANIMATION_CONFIG,
3569
3571
  z as DEFAULT_GRID_ICONS,
3570
- co as DGEvents,
3572
+ ho as DGEvents,
3571
3573
  H as DataGridElement,
3572
3574
  B as FitModeEnum,
3573
- so as GridCSSVars,
3575
+ lo as GridCSSVars,
3574
3576
  A as GridClasses,
3575
3577
  j as GridDataAttrs,
3576
3578
  H as GridElement,
3577
- ro as GridSelectors,
3578
- no as PLUGIN_QUERIES,
3579
- ho as PluginEvents,
3580
- to as PluginManager,
3579
+ so as GridSelectors,
3580
+ io as PLUGIN_QUERIES,
3581
+ uo as PluginEvents,
3582
+ oo as PluginManager,
3581
3583
  x as RenderPhase,
3582
- At as a,
3584
+ Pt as a,
3583
3585
  M as aggregatorRegistry,
3584
3586
  $ as b,
3585
- Ct as builtInSort,
3587
+ yt as builtInSort,
3586
3588
  ae as c,
3587
- lo as createGrid,
3588
- vt as defaultComparator,
3589
- Le as e,
3590
- De as g,
3591
- go as getAggregator,
3592
- oo as getValueAggregator,
3593
- mo as listAggregators,
3594
- ao as queryGrid,
3595
- fo as registerAggregator,
3596
- wo as runAggregator,
3597
- uo as runValueAggregator,
3589
+ ao as createGrid,
3590
+ Ct as defaultComparator,
3591
+ He as e,
3592
+ Me as g,
3593
+ wo as getAggregator,
3594
+ no as getValueAggregator,
3595
+ bo as listAggregators,
3596
+ co as queryGrid,
3597
+ po as registerAggregator,
3598
+ mo as runAggregator,
3599
+ fo as runValueAggregator,
3598
3600
  K as s,
3599
- po as unregisterAggregator
3601
+ go as unregisterAggregator
3600
3602
  };
3601
3603
  //# sourceMappingURL=index.js.map