@toolbox-web/grid 0.2.4 → 0.2.5
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.
- package/all.d.ts +5 -0
- package/index.d.ts +5 -0
- package/index.js +75 -57
- package/index.js.map +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/themes/dg-theme-bootstrap.css +0 -2
- package/themes/dg-theme-contrast.css +0 -1
- package/themes/dg-theme-large.css +0 -1
- package/themes/dg-theme-material.css +0 -2
- package/themes/dg-theme-standard.css +0 -1
- package/themes/dg-theme-vibrant.css +0 -1
- package/umd/grid.all.umd.js +4 -4
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +4 -4
- package/umd/grid.umd.js.map +1 -1
package/all.d.ts
CHANGED
|
@@ -1719,6 +1719,8 @@ declare interface ColumnInternal<T = any> extends ColumnConfig<T> {
|
|
|
1719
1719
|
__autoSized?: boolean;
|
|
1720
1720
|
__userResized?: boolean;
|
|
1721
1721
|
__renderedWidth?: number;
|
|
1722
|
+
/** Original configured width (for reset on double-click) */
|
|
1723
|
+
__originalWidth?: number;
|
|
1722
1724
|
__viewTemplate?: HTMLElement;
|
|
1723
1725
|
__editorTemplate?: HTMLElement;
|
|
1724
1726
|
__headerTemplate?: HTMLElement;
|
|
@@ -2071,6 +2073,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
|
|
|
2071
2073
|
/* Excluded from this release type: getPlugin */
|
|
2072
2074
|
/* Excluded from this release type: getPluginByName */
|
|
2073
2075
|
/* Excluded from this release type: requestRender */
|
|
2076
|
+
/* Excluded from this release type: updateTemplate */
|
|
2074
2077
|
/* Excluded from this release type: requestAfterRender */
|
|
2075
2078
|
connectedCallback(): void;
|
|
2076
2079
|
disconnectedCallback(): void;
|
|
@@ -4455,6 +4458,8 @@ export declare class ReorderPlugin extends BaseGridPlugin_2<ReorderConfig> {
|
|
|
4455
4458
|
/** Controller managing drag-based column resize lifecycle. */
|
|
4456
4459
|
declare interface ResizeController {
|
|
4457
4460
|
start: (e: MouseEvent, colIndex: number, cell: HTMLElement) => void;
|
|
4461
|
+
/** Reset a column to its configured width (or auto-size if none configured). */
|
|
4462
|
+
resetColumn: (colIndex: number) => void;
|
|
4458
4463
|
dispose: () => void;
|
|
4459
4464
|
/** True while a resize drag is in progress (used to suppress header click/sort). */
|
|
4460
4465
|
isResizing: boolean;
|
package/index.d.ts
CHANGED
|
@@ -889,6 +889,8 @@ declare interface ColumnInternal<T = any> extends ColumnConfig<T> {
|
|
|
889
889
|
__autoSized?: boolean;
|
|
890
890
|
__userResized?: boolean;
|
|
891
891
|
__renderedWidth?: number;
|
|
892
|
+
/** Original configured width (for reset on double-click) */
|
|
893
|
+
__originalWidth?: number;
|
|
892
894
|
__viewTemplate?: HTMLElement;
|
|
893
895
|
__editorTemplate?: HTMLElement;
|
|
894
896
|
__headerTemplate?: HTMLElement;
|
|
@@ -1023,6 +1025,7 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
|
|
|
1023
1025
|
/* Excluded from this release type: getPlugin */
|
|
1024
1026
|
/* Excluded from this release type: getPluginByName */
|
|
1025
1027
|
/* Excluded from this release type: requestRender */
|
|
1028
|
+
/* Excluded from this release type: updateTemplate */
|
|
1026
1029
|
/* Excluded from this release type: requestAfterRender */
|
|
1027
1030
|
connectedCallback(): void;
|
|
1028
1031
|
disconnectedCallback(): void;
|
|
@@ -2184,6 +2187,8 @@ export declare const registerAggregator: (name: string, fn: AggregatorFn) => voi
|
|
|
2184
2187
|
/** Controller managing drag-based column resize lifecycle. */
|
|
2185
2188
|
declare interface ResizeController {
|
|
2186
2189
|
start: (e: MouseEvent, colIndex: number, cell: HTMLElement) => void;
|
|
2190
|
+
/** Reset a column to its configured width (or auto-size if none configured). */
|
|
2191
|
+
resetColumn: (colIndex: number) => void;
|
|
2187
2192
|
dispose: () => void;
|
|
2188
2193
|
/** True while a resize drag is in progress (used to suppress header click/sort). */
|
|
2189
2194
|
isResizing: boolean;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const fe = ":root{color-scheme:light dark}:host{--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #adacac);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: 2px 8px;--tbw-cell-padding: 2px 8px;--tbw-cell-padding-input: 2px 6px;--tbw-row-height: 28px;--tbw-header-height: 30px;--tbw-cell-white-space: nowrap;--tbw-border-radius: 4px;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: 4px;--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-checkbox-size: 16px;--tbw-density-scale: 1}:host{position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none}:host,:host *{box-sizing:border-box}:host .header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}:host .header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}:host .header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start))}:host .header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30)}:host .header-row>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .header-row>.cell>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .header-row>.cell>span[part~=sort-indicator]{flex-shrink:0}:host .header-row>.cell:last-child{border-right:0}:host .header-group-cell,:host .header-row>.cell.grouped.group-end{border-right:2px solid var(--tbw-color-border)}:host .tbw-grid-root{display:flex;flex-direction:column;height:100%}:host .rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}:host .rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}:host .rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}:host .rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip}:host .faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}:host .faux-vscroll-spacer{width:1px}:host .rows-viewport .rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}:host .data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style}:host .data-grid-row:has(.editing){background:var(--tbw-editing-bg)}:host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row>.cell.selected:focus-visible,:host .data-grid-row>.cell:focus-visible:not(.cell-focus){outline:none}:host .data-grid-row>.cell{display: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}:host .data-grid-row>.cell>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}:host .data-grid-row>.cell:last-child{border-right:0}:host .data-grid-row>.cell[data-type=boolean]{text-align:center}:host .data-grid-row>.cell[data-type=boolean] input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}:host .data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex}:host .data-grid-row>.cell.editing input:not([type=checkbox]),:host .data-grid-row>.cell.editing select,:host .data-grid-row>.cell.editing textarea{width:100%;height:100%;max-width:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}:host .data-grid-row:nth-child(2n){background:var(--tbw-color-row-alt)}:host .data-grid-row:hover{background:var(--tbw-color-row-hover)}:host .sortable{cursor:pointer;user-select:none}:host .resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius)}:host .resize-handle:hover{background:var(--tbw-resize-handle-color-hover)}:host .cell-focus,:host .row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-row-alt);font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}:host .group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px)}:host .group-row .group-toggle{background:none;border:0;cursor:pointer;padding:0 4px 0 0;font:inherit}:host .group-row .group-count{margin-left:4px;opacity:.7}:host .sticky-left,:host .sticky-right{position:sticky;z-index:25}:host .header-row>.cell.sticky-left,:host .header-row>.cell.sticky-right{background:var(--tbw-color-header-bg);z-index:35}:host .data-grid-row>.cell.sticky-left,:host .data-grid-row>.cell.sticky-right{background:var(--tbw-color-panel-bg)}:host .sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}:host .sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.grid-container{position:relative;width:100%;height:100%}.grid-placeholder{padding:2rem;text-align:center;color:var(--tbw-color-fg);opacity:.6}:host{--tbw-shell-header-height: 44px;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: 14px;--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 280px;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 40px;--tbw-tool-panel-transition: .2s ease-out;--tbw-toolbar-button-size: 32px;--tbw-toolbar-button-gap: 4px}:host .tbw-grid-root.has-shell{display:flex;flex-direction:column;height:100%}:host .tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}:host .tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}:host .tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}:host .tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease)}:host .tbw-toolbar-btn:hover{background:var(--tbw-color-row-hover)}:host .tbw-toolbar-btn:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .tbw-toolbar-btn.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}:host .tbw-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}:host .tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}:host .tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}:host .tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}:host .tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden}:host .tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel.open{width:var(--tbw-tool-panel-width)}:host .tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .15s ease}:host .tbw-tool-panel-resize[data-handle-position=left]{left:0}:host .tbw-tool-panel-resize[data-handle-position=right]{right:0}:host .tbw-tool-panel-resize:hover,:host .tbw-tool-panel-resize.resizing{background:var(--tbw-color-accent)}:host .tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}:host .tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px}:host .tbw-tool-panel-close:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}:host .tbw-tool-panel-content{flex:1;overflow:auto}:host .tbw-accordion{display:flex;flex-direction:column;gap:0}:host .tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border)}:host .tbw-accordion-section:last-child{border-bottom:none}:host .tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:left;cursor:pointer;user-select:none}:host .tbw-accordion-header:hover{background:var(--tbw-color-row-hover)}:host .tbw-accordion-section.single .tbw-accordion-header{cursor:default}:host .tbw-accordion-section.single .tbw-accordion-header:hover{background:transparent}:host .tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}:host .tbw-accordion-section.expanded .tbw-accordion-chevron{transform:rotate(90deg)}:host .tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}:host .tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tbw-accordion-content{display:none}:host .tbw-accordion-section.expanded .tbw-accordion-content{display:block}:host .tbw-quick-filter-input{flex:1;max-width:300px;height:28px;padding:0 8px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:13px}:host .tbw-quick-filter-input:focus{outline:none;border-color:var(--tbw-color-accent)}:host .tbw-selection-summary{font-size:13px;color:var(--tbw-color-fg-muted);white-space:nowrap}";
|
|
1
|
+
const fe = ":root{color-scheme:light dark}:host{--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #adacac);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: 2px 8px;--tbw-cell-padding: 2px 8px;--tbw-cell-padding-input: 2px 6px;--tbw-row-height: 28px;--tbw-header-height: 30px;--tbw-cell-white-space: nowrap;--tbw-border-radius: 4px;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: 6px;--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-scrollbar-thumb: var(--tbw-color-border-strong);--tbw-scrollbar-track: var(--tbw-color-bg);--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-editing-bg: var(--tbw-color-selection);--tbw-editing-border: var(--tbw-border-input, 1px solid var(--tbw-color-border-strong));--tbw-padding-editing-input: var(--tbw-cell-padding-input, 2px 6px);--tbw-font-size-editor: inherit;--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-checkbox-size: 16px;--tbw-density-scale: 1}:host{position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none}:host,:host *{box-sizing:border-box}:host .header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}:host .header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}:host .header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start))}:host .header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30)}:host .header-row>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0}:host .header-row>.cell>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .header-row>.cell>span[part~=sort-indicator]{flex-shrink:0}:host .header-row>.cell:last-child{border-right:0}:host .header-group-cell,:host .header-row>.cell.grouped.group-end{border-right:2px solid var(--tbw-color-border)}:host .tbw-grid-root{display:flex;flex-direction:column;height:100%}:host .rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}:host .rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}:host .rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}:host .rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip}:host .faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}:host .faux-vscroll-spacer{width:1px}:host .rows-viewport .rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}:host .data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style}:host .data-grid-row:has(.editing){background:var(--tbw-editing-bg)}:host .selecting .data-grid-row>.cell{user-select:none}:host .data-grid-row>.cell.selected:focus-visible,:host .data-grid-row>.cell:focus-visible:not(.cell-focus){outline:none}:host .data-grid-row>.cell{display: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}:host .data-grid-row>.cell>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}:host .data-grid-row>.cell:last-child{border-right:0}:host .data-grid-row>.cell[data-type=boolean]{text-align:center}:host .data-grid-row>.cell[data-type=boolean] input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}:host .data-grid-row>.cell.editing{overflow:hidden;padding:0;display:flex}:host .data-grid-row>.cell.editing input:not([type=checkbox]),:host .data-grid-row>.cell.editing select,:host .data-grid-row>.cell.editing textarea{width:100%;height:100%;max-width:100%;flex:1 1 auto;min-width:0;border:var(--tbw-editing-border);padding:var(--tbw-padding-editing-input);font-size:var(--tbw-font-size-editor)}:host .data-grid-row:nth-child(2n){background:var(--tbw-color-row-alt)}:host .data-grid-row:hover{background:var(--tbw-color-row-hover)}:host .sortable{cursor:pointer;user-select:none}:host .resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius)}:host .resize-handle:hover{background:var(--tbw-resize-handle-color-hover)}:host .cell-focus,:host .row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-row-alt);font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}:host .group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, 2px 8px)}:host .group-row .group-toggle{background:none;border:0;cursor:pointer;padding:0 4px 0 0;font:inherit}:host .group-row .group-count{margin-left:4px;opacity:.7}:host .sticky-left,:host .sticky-right{position:sticky;z-index:25}:host .header-row>.cell.sticky-left,:host .header-row>.cell.sticky-right{background:var(--tbw-color-header-bg);z-index:35}:host .data-grid-row>.cell.sticky-left,:host .data-grid-row>.cell.sticky-right{background:var(--tbw-color-panel-bg)}:host .sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}:host .sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.grid-container{position:relative;width:100%;height:100%}.grid-placeholder{padding:2rem;text-align:center;color:var(--tbw-color-fg);opacity:.6}:host{--tbw-shell-header-height: 44px;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: 14px;--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 280px;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 40px;--tbw-tool-panel-transition: .2s ease-out;--tbw-toolbar-button-size: 32px;--tbw-toolbar-button-gap: 4px}:host .tbw-grid-root.has-shell{display:flex;flex-direction:column;height:100%}:host .tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}:host .tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}:host .tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}:host .tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease)}:host .tbw-toolbar-btn:hover{background:var(--tbw-color-row-hover)}:host .tbw-toolbar-btn:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}:host .tbw-toolbar-btn.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}:host .tbw-toolbar-btn:disabled{opacity:.5;cursor:not-allowed}:host .tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}:host .tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}:host .tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}:host .tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden}:host .tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}:host .tbw-tool-panel.open{width:var(--tbw-tool-panel-width)}:host .tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background .15s ease}:host .tbw-tool-panel-resize[data-handle-position=left]{left:0}:host .tbw-tool-panel-resize[data-handle-position=right]{right:0}:host .tbw-tool-panel-resize:hover,:host .tbw-tool-panel-resize.resizing{background:var(--tbw-color-accent)}:host .tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}:host .tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px}:host .tbw-tool-panel-close:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}:host .tbw-tool-panel-content{flex:1;overflow:auto}:host .tbw-accordion{display:flex;flex-direction:column;gap:0}:host .tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border)}:host .tbw-accordion-section:last-child{border-bottom:none}:host .tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:left;cursor:pointer;user-select:none}:host .tbw-accordion-header:hover{background:var(--tbw-color-row-hover)}:host .tbw-accordion-section.single .tbw-accordion-header{cursor:default}:host .tbw-accordion-section.single .tbw-accordion-header:hover{background:transparent}:host .tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}:host .tbw-accordion-section.expanded .tbw-accordion-chevron{transform:rotate(90deg)}:host .tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}:host .tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .tbw-accordion-content{display:none}:host .tbw-accordion-section.expanded .tbw-accordion-content{display:block}:host .tbw-quick-filter-input{flex:1;max-width:300px;height:28px;padding:0 8px;border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);background:var(--tbw-color-bg);color:var(--tbw-color-fg);font-size:13px}:host .tbw-quick-filter-input:focus{outline:none;border-color:var(--tbw-color-accent)}:host .tbw-selection-summary{font-size:13px;color:var(--tbw-color-fg-muted);white-space:nowrap}";
|
|
2
2
|
function pe(t) {
|
|
3
3
|
const e = /* @__PURE__ */ new Map();
|
|
4
4
|
return t._sortState && e.set(t._sortState.field, {
|
|
@@ -271,9 +271,9 @@ function te(t) {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
l > 0 && (n.width = l + 2, n.__autoSized = !0, i = !0);
|
|
274
|
-
}), i &&
|
|
274
|
+
}), i && M(t), t.__didInitialAutoSize = !0;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function M(t) {
|
|
277
277
|
(t.effectiveConfig?.fitMode || t.fitMode || $.STRETCH) === $.STRETCH ? t._gridTemplate = t._visibleColumns.map((o) => {
|
|
278
278
|
if (o.width) return `${o.width}px`;
|
|
279
279
|
const i = o.minWidth;
|
|
@@ -331,7 +331,7 @@ function He(t) {
|
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function ke(t, e) {
|
|
335
335
|
if (t._dispatchKeyDown?.(e))
|
|
336
336
|
return;
|
|
337
337
|
const o = t._rows.length - 1, i = t._visibleColumns.length - 1, n = t._activeEditRows !== void 0 && t._activeEditRows !== -1, r = t._visibleColumns[t._focusCol]?.type, l = e.composedPath ? e.composedPath() : [], a = l && l.length ? l[0] : e.target, d = (f) => {
|
|
@@ -427,9 +427,9 @@ function z(t, e) {
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
const
|
|
430
|
+
const Oe = "__cellDisplayCache", ze = "__cellCacheEpoch";
|
|
431
431
|
function Y(t) {
|
|
432
|
-
t[
|
|
432
|
+
t[Oe] = void 0, t[ze] = void 0, t.__hasSpecialColumns = void 0;
|
|
433
433
|
}
|
|
434
434
|
function Me(t, e, o, i, n) {
|
|
435
435
|
const s = Math.max(0, o - e), r = t._bodyEl, l = t._visibleColumns, a = l.length;
|
|
@@ -464,36 +464,36 @@ function Me(t, e, o, i, n) {
|
|
|
464
464
|
if (!x || g) {
|
|
465
465
|
const _ = u.querySelector(".cell.editing"), E = t._activeEditRows === p;
|
|
466
466
|
if (_ && !E)
|
|
467
|
-
u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1),
|
|
467
|
+
u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1), N(t, u, c, p), u.__epoch = i, u.__rowDataRef = c;
|
|
468
468
|
else if (_ && E)
|
|
469
469
|
U(t, u, c, p), u.__rowDataRef = c;
|
|
470
|
-
else if (u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1),
|
|
470
|
+
else if (u.__isCustomRow && (u.className = "data-grid-row", u.setAttribute("role", "row"), u.__isCustomRow = !1), N(t, u, c, p), u.__epoch = i, u.__rowDataRef = c, E) {
|
|
471
471
|
const S = u.children;
|
|
472
472
|
for (let A = 0; A < S.length; A++) {
|
|
473
473
|
const P = t._visibleColumns[A];
|
|
474
|
-
P && P.editable &&
|
|
474
|
+
P && P.editable && k(t, c, p, P, S[A]);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
} else if (R) {
|
|
478
478
|
const _ = u.querySelector(".cell.editing"), E = t._activeEditRows === p;
|
|
479
479
|
if (_ && !E)
|
|
480
|
-
|
|
480
|
+
N(t, u, c, p), u.__epoch = i, u.__rowDataRef = c;
|
|
481
481
|
else if (U(t, u, c, p), u.__rowDataRef = c, E && !_) {
|
|
482
482
|
const S = u.children;
|
|
483
483
|
for (let A = 0; A < S.length; A++) {
|
|
484
484
|
const P = t._visibleColumns[A];
|
|
485
|
-
P && P.editable &&
|
|
485
|
+
P && P.editable && k(t, c, p, P, S[A]);
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
} else {
|
|
489
489
|
const _ = u.querySelector(".cell.editing"), E = t._activeEditRows === p;
|
|
490
490
|
if (_ && !E)
|
|
491
|
-
|
|
491
|
+
N(t, u, c, p), u.__epoch = i, u.__rowDataRef = c;
|
|
492
492
|
else if (U(t, u, c, p), E && !_) {
|
|
493
493
|
const S = u.children;
|
|
494
494
|
for (let A = 0; A < S.length; A++) {
|
|
495
495
|
const P = t._visibleColumns[A];
|
|
496
|
-
P && P.editable &&
|
|
496
|
+
P && P.editable && k(t, c, p, P, S[A]);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
}
|
|
@@ -527,7 +527,7 @@ function U(t, e, o, i) {
|
|
|
527
527
|
}
|
|
528
528
|
for (let c = 0; c < a; c++)
|
|
529
529
|
if (s[c].externalView && !n[c].querySelector("[data-external-view]")) {
|
|
530
|
-
|
|
530
|
+
N(t, e, o, i);
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
533
|
for (let c = 0; c < a; c++) {
|
|
@@ -568,7 +568,7 @@ function U(t, e, o, i) {
|
|
|
568
568
|
x = y == null ? "" : String(y), b.textContent = x;
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function N(t, e, o, i) {
|
|
572
572
|
e.innerHTML = "";
|
|
573
573
|
const n = t._visibleColumns, s = n.length, r = t._focusRow, l = t._focusCol, a = t.effectiveConfig?.editOn || t.editOn, d = t, f = document.createDocumentFragment();
|
|
574
574
|
for (let h = 0; h < s; h++) {
|
|
@@ -647,7 +647,7 @@ function D(t, e, o, i) {
|
|
|
647
647
|
const m = Number(c.getAttribute("data-row")), C = Number(c.getAttribute("data-col"));
|
|
648
648
|
if (isNaN(m) || isNaN(C)) return;
|
|
649
649
|
const _ = t._rows[m], E = t._visibleColumns[C];
|
|
650
|
-
!_ || !E || (t._focusRow = m, t._focusCol = C,
|
|
650
|
+
!_ || !E || (t._focusRow = m, t._focusCol = C, k(t, _, m, E, c));
|
|
651
651
|
}) : c.addEventListener("dblclick", (g) => {
|
|
652
652
|
g.stopPropagation();
|
|
653
653
|
const m = Number(c.getAttribute("data-row"));
|
|
@@ -660,7 +660,7 @@ function D(t, e, o, i) {
|
|
|
660
660
|
const E = _.children;
|
|
661
661
|
for (let S = 0; S < E.length; S++) {
|
|
662
662
|
const A = t._visibleColumns[S];
|
|
663
|
-
A && A.editable &&
|
|
663
|
+
A && A.editable && k(t, C, m, A, E[S]);
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
}), c.addEventListener("keydown", (g) => {
|
|
@@ -669,7 +669,7 @@ function D(t, e, o, i) {
|
|
|
669
669
|
const _ = t._rows[m], E = t._visibleColumns[C];
|
|
670
670
|
if (!(!_ || !E)) {
|
|
671
671
|
if ((E.type === "select" || E.type === "typeahead") && !c.classList.contains("editing") && g.key === "Enter") {
|
|
672
|
-
g.preventDefault(), t._activeEditRows !== m && B(t, m, _),
|
|
672
|
+
g.preventDefault(), t._activeEditRows !== m && B(t, m, _), k(t, _, m, E, c), setTimeout(() => {
|
|
673
673
|
const S = c.querySelector("select");
|
|
674
674
|
try {
|
|
675
675
|
S?.showPicker?.();
|
|
@@ -686,11 +686,11 @@ function D(t, e, o, i) {
|
|
|
686
686
|
return;
|
|
687
687
|
}
|
|
688
688
|
if (g.key === "Enter" && !c.classList.contains("editing")) {
|
|
689
|
-
g.preventDefault(), g.stopPropagation(), t._focusRow = m, t._focusCol = C, typeof t.beginBulkEdit == "function" ? t.beginBulkEdit(m) :
|
|
689
|
+
g.preventDefault(), g.stopPropagation(), t._focusRow = m, t._focusCol = C, typeof t.beginBulkEdit == "function" ? t.beginBulkEdit(m) : k(t, _, m, E, c);
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
692
692
|
if (g.key === "F2" && !c.classList.contains("editing")) {
|
|
693
|
-
g.preventDefault(),
|
|
693
|
+
g.preventDefault(), k(t, _, m, E, c);
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
@@ -726,7 +726,7 @@ function oe(t, e, o, i) {
|
|
|
726
726
|
else return;
|
|
727
727
|
Array.from(o.children).forEach((d, f) => {
|
|
728
728
|
const h = t._visibleColumns[f];
|
|
729
|
-
h && h.editable &&
|
|
729
|
+
h && h.editable && k(t, r, s, h, d);
|
|
730
730
|
}), l && queueMicrotask(() => {
|
|
731
731
|
const d = o.querySelector(`.cell[data-col="${t._focusCol}"]`);
|
|
732
732
|
if (d?.classList.contains("editing")) {
|
|
@@ -746,7 +746,7 @@ function Z(t) {
|
|
|
746
746
|
function B(t, e, o) {
|
|
747
747
|
t._activeEditRows !== e && (t._rowEditSnapshots.set(e, { ...o }), t._activeEditRows = e);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function D(t, e, o) {
|
|
750
750
|
if (t._activeEditRows !== e) return;
|
|
751
751
|
const i = t._rowEditSnapshots.get(e), n = t._rows[e], s = t.findRenderedRowElement?.(e);
|
|
752
752
|
if (!o && s && n && s.querySelectorAll(".cell.editing").forEach((l) => {
|
|
@@ -775,7 +775,7 @@ function M(t, e, o) {
|
|
|
775
775
|
})
|
|
776
776
|
);
|
|
777
777
|
}
|
|
778
|
-
t._rowEditSnapshots.delete(e), t._activeEditRows = -1, s && (
|
|
778
|
+
t._rowEditSnapshots.delete(e), t._activeEditRows = -1, s && (N(t, s, t._rows[e], e), t._changedRowIndices.has(e) ? s.classList.add("changed") : s.classList.remove("changed")), queueMicrotask(() => {
|
|
779
779
|
try {
|
|
780
780
|
const r = t._focusRow, l = t._focusCol, a = t.findRenderedRowElement?.(r);
|
|
781
781
|
if (a) {
|
|
@@ -810,7 +810,7 @@ function J(t, e, o, i, n) {
|
|
|
810
810
|
})
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function k(t, e, o, i, n) {
|
|
814
814
|
if (!i.editable || (t._activeEditRows !== o && B(t, o, e), n.classList.contains("editing"))) return;
|
|
815
815
|
const s = Z(i.field) ? e[i.field] : void 0;
|
|
816
816
|
n.classList.add("editing");
|
|
@@ -823,7 +823,7 @@ function O(t, e, o, i, n) {
|
|
|
823
823
|
c && (typeof HTMLInputElement < "u" && c instanceof HTMLInputElement && c.type === "checkbox" ? c.checked = !!s : "value" in c && (c.value = s ?? ""));
|
|
824
824
|
}, d = document.createElement("div");
|
|
825
825
|
d.style.display = "contents", n.innerHTML = "", n.appendChild(d), d.addEventListener("keydown", (c) => {
|
|
826
|
-
c.key === "Enter" && (c.stopPropagation(), c.preventDefault(), r = !0,
|
|
826
|
+
c.key === "Enter" && (c.stopPropagation(), c.preventDefault(), r = !0, D(t, o, !1)), c.key === "Escape" && (c.stopPropagation(), c.preventDefault(), a(), D(t, o, !0));
|
|
827
827
|
});
|
|
828
828
|
const f = i.__editorTemplate, h = i.editor || (f ? "template" : He(i)), p = s;
|
|
829
829
|
if (h === "template" && f) {
|
|
@@ -844,9 +844,9 @@ function O(t, e, o, i, n) {
|
|
|
844
844
|
if (v.key === "Enter") {
|
|
845
845
|
v.stopPropagation(), v.preventDefault(), r = !0;
|
|
846
846
|
const y = w && b instanceof HTMLInputElement && b.type === "checkbox" ? b.checked : b.value;
|
|
847
|
-
l(y),
|
|
847
|
+
l(y), D(t, o, !1);
|
|
848
848
|
}
|
|
849
|
-
v.key === "Escape" && (v.stopPropagation(), v.preventDefault(), a(),
|
|
849
|
+
v.key === "Escape" && (v.stopPropagation(), v.preventDefault(), a(), D(t, o, !0));
|
|
850
850
|
}), w && b instanceof HTMLInputElement && b.type === "checkbox" && b.addEventListener("change", () => {
|
|
851
851
|
const v = b.checked;
|
|
852
852
|
l(v);
|
|
@@ -888,7 +888,7 @@ function ie(t, e, o) {
|
|
|
888
888
|
new CustomEvent("sort-change", { detail: { field: e.field, direction: o } })
|
|
889
889
|
), t.requestStateChange?.();
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function De(t, e) {
|
|
892
892
|
typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
|
|
893
893
|
}
|
|
894
894
|
function q(t) {
|
|
@@ -908,7 +908,7 @@ function q(t) {
|
|
|
908
908
|
const r = document.createElement("span");
|
|
909
909
|
j(r, "sort-indicator"), r.style.opacity = "0.6";
|
|
910
910
|
const l = t._sortState?.field === o.field ? t._sortState.direction : 0, a = { ...H, ...t.icons }, d = l === 1 ? a.sortAsc : l === -1 ? a.sortDesc : a.sortNone;
|
|
911
|
-
|
|
911
|
+
De(r, d), n.appendChild(r), n.setAttribute("aria-sort", l === 0 ? "none" : l === 1 ? "ascending" : "descending"), n.addEventListener("click", (f) => {
|
|
912
912
|
t._resizeController?.isResizing || t._dispatchHeaderClick?.(f, i, n) || ne(t, o);
|
|
913
913
|
}), n.addEventListener("keydown", (f) => {
|
|
914
914
|
if (f.key === "Enter" || f.key === " ") {
|
|
@@ -922,6 +922,8 @@ function q(t) {
|
|
|
922
922
|
const r = document.createElement("div");
|
|
923
923
|
r.className = "resize-handle", r.setAttribute("aria-hidden", "true"), r.addEventListener("mousedown", (l) => {
|
|
924
924
|
l.stopPropagation(), l.preventDefault(), t._resizeController.start(l, i, n);
|
|
925
|
+
}), r.addEventListener("dblclick", (l) => {
|
|
926
|
+
l.stopPropagation(), l.preventDefault(), t._resizeController.resetColumn(i);
|
|
925
927
|
}), n.appendChild(r);
|
|
926
928
|
}
|
|
927
929
|
e.appendChild(n);
|
|
@@ -929,7 +931,7 @@ function q(t) {
|
|
|
929
931
|
o.getAttribute("aria-sort") || o.setAttribute("aria-sort", "none");
|
|
930
932
|
}), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex"));
|
|
931
933
|
}
|
|
932
|
-
function
|
|
934
|
+
function Ne(t) {
|
|
933
935
|
let e = null, o = null, i = null, n = null;
|
|
934
936
|
const s = (a) => {
|
|
935
937
|
if (!e) return;
|
|
@@ -956,6 +958,12 @@ function De(t) {
|
|
|
956
958
|
const h = f.getBoundingClientRect();
|
|
957
959
|
e = { startX: a.clientX, colIndex: d, startWidth: h.width }, window.addEventListener("mousemove", s), window.addEventListener("mouseup", l), i === null && (i = document.documentElement.style.cursor), document.documentElement.style.cursor = "e-resize", n === null && (n = document.body.style.userSelect), document.body.style.userSelect = "none";
|
|
958
960
|
},
|
|
961
|
+
resetColumn(a) {
|
|
962
|
+
const d = t._visibleColumns[a];
|
|
963
|
+
d && (d.__userResized = !1, d.__renderedWidth = void 0, d.width = d.__originalWidth, t.updateTemplate?.(), t.requestStateChange?.(), t.dispatchEvent(
|
|
964
|
+
new CustomEvent("column-resize-reset", { detail: { field: d.field, width: d.width } })
|
|
965
|
+
));
|
|
966
|
+
},
|
|
959
967
|
dispose() {
|
|
960
968
|
l();
|
|
961
969
|
}
|
|
@@ -1670,7 +1678,7 @@ class Ye {
|
|
|
1670
1678
|
class W extends HTMLElement {
|
|
1671
1679
|
// TODO: Rename to 'data-grid' when migration is complete
|
|
1672
1680
|
static tagName = "tbw-grid";
|
|
1673
|
-
static version = "0.2.
|
|
1681
|
+
static version = "0.2.5";
|
|
1674
1682
|
// ---------------- Observed Attributes ----------------
|
|
1675
1683
|
static get observedAttributes() {
|
|
1676
1684
|
return ["rows", "columns", "grid-config", "fit-mode", "edit-on"];
|
|
@@ -1881,7 +1889,15 @@ class W extends HTMLElement {
|
|
|
1881
1889
|
* @internal Plugin API
|
|
1882
1890
|
*/
|
|
1883
1891
|
requestRender() {
|
|
1884
|
-
this.#x(), this.#H(), q(this),
|
|
1892
|
+
this.#x(), this.#H(), q(this), M(this), this.refreshVirtualWindow(!0);
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Update the grid's column template CSS.
|
|
1896
|
+
* Called by resize controller during column resize operations.
|
|
1897
|
+
* @internal
|
|
1898
|
+
*/
|
|
1899
|
+
updateTemplate() {
|
|
1900
|
+
M(this);
|
|
1885
1901
|
}
|
|
1886
1902
|
/**
|
|
1887
1903
|
* Request a lightweight style update without rebuilding DOM.
|
|
@@ -1896,7 +1912,7 @@ class W extends HTMLElement {
|
|
|
1896
1912
|
* Initialize plugin system with instances from config.
|
|
1897
1913
|
* Plugins are class instances passed in gridConfig.plugins[].
|
|
1898
1914
|
*/
|
|
1899
|
-
#
|
|
1915
|
+
#D() {
|
|
1900
1916
|
this.#e = new Ye(this);
|
|
1901
1917
|
const e = this.#t?.plugins, o = Array.isArray(e) ? e : [];
|
|
1902
1918
|
this.#e.attachAll(o);
|
|
@@ -1905,7 +1921,7 @@ class W extends HTMLElement {
|
|
|
1905
1921
|
* Inject all plugin styles into the shadow DOM.
|
|
1906
1922
|
* Must be called after #render() since innerHTML wipes existing content.
|
|
1907
1923
|
*/
|
|
1908
|
-
#
|
|
1924
|
+
#N() {
|
|
1909
1925
|
const e = this.#e?.getAllStyles() ?? "";
|
|
1910
1926
|
if (e) {
|
|
1911
1927
|
const o = document.createElement("style");
|
|
@@ -1917,7 +1933,7 @@ class W extends HTMLElement {
|
|
|
1917
1933
|
* With class-based plugins, we need to detach old and attach new.
|
|
1918
1934
|
*/
|
|
1919
1935
|
#q() {
|
|
1920
|
-
this.#e && this.#e.detachAll(), this.#
|
|
1936
|
+
this.#e && this.#e.detachAll(), this.#D(), this.#N(), this.#v = this.#e?.getAll().some((e) => e.onScroll) ?? !1;
|
|
1921
1937
|
}
|
|
1922
1938
|
/**
|
|
1923
1939
|
* Clean up plugin states when grid disconnects.
|
|
@@ -1940,7 +1956,7 @@ class W extends HTMLElement {
|
|
|
1940
1956
|
}
|
|
1941
1957
|
// ---------------- Lifecycle ----------------
|
|
1942
1958
|
connectedCallback() {
|
|
1943
|
-
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", W.version), this._rows = Array.isArray(this.#r) ? [...this.#r] : [], this.#a?.abort(), this.#a = new AbortController(), this.#u(), this.#
|
|
1959
|
+
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", W.version), this._rows = Array.isArray(this.#r) ? [...this.#r] : [], this.#a?.abort(), this.#a = new AbortController(), this.#u(), this.#D(), this.#G(), this.#A || (this.#$(), this.#N(), this.#A = !0), this.#B();
|
|
1944
1960
|
}
|
|
1945
1961
|
disconnectedCallback() {
|
|
1946
1962
|
this.#V(), Xe(this.#i), this.#n.setInitialized(!1), this.#S?.(), this.#S = void 0, this.#a && (this.#a.abort(), this.#a = void 0), this._resizeController && this._resizeController.dispose(), this.#b && (this.#b.disconnect(), this.#b = void 0), this.#h = !1;
|
|
@@ -1978,10 +1994,10 @@ class W extends HTMLElement {
|
|
|
1978
1994
|
}
|
|
1979
1995
|
this.setAttribute("data-upgraded", ""), this.#h = !0;
|
|
1980
1996
|
const i = this.disconnectSignal;
|
|
1981
|
-
this.#c(), this.addEventListener("keydown", (l) =>
|
|
1997
|
+
this._resizeController = Ne(this), this.#c(), this.addEventListener("keydown", (l) => ke(this, l), { signal: i }), document.addEventListener(
|
|
1982
1998
|
"keydown",
|
|
1983
1999
|
(l) => {
|
|
1984
|
-
l.key === "Escape" && this._activeEditRows !== -1 &&
|
|
2000
|
+
l.key === "Escape" && this._activeEditRows !== -1 && D(this, this._activeEditRows, !0);
|
|
1985
2001
|
},
|
|
1986
2002
|
{ capture: !0, signal: i }
|
|
1987
2003
|
), document.addEventListener(
|
|
@@ -1989,7 +2005,7 @@ class W extends HTMLElement {
|
|
|
1989
2005
|
(l) => {
|
|
1990
2006
|
if (this._activeEditRows === -1) return;
|
|
1991
2007
|
const a = this.findRenderedRowElement(this._activeEditRows);
|
|
1992
|
-
!a || (l.composedPath && l.composedPath() || []).includes(a) ||
|
|
2008
|
+
!a || (l.composedPath && l.composedPath() || []).includes(a) || D(this, this._activeEditRows, !1);
|
|
1993
2009
|
},
|
|
1994
2010
|
{ signal: i }
|
|
1995
2011
|
);
|
|
@@ -2036,7 +2052,7 @@ class W extends HTMLElement {
|
|
|
2036
2052
|
{ passive: !0, signal: i }
|
|
2037
2053
|
));
|
|
2038
2054
|
}
|
|
2039
|
-
this
|
|
2055
|
+
this.#o.addEventListener("mousedown", (l) => this.#J(l), { signal: i }), document.addEventListener("mousemove", (l) => this.#Q(l), { signal: i }), document.addEventListener("mouseup", (l) => this.#ee(l), { signal: i }), this._virtualization.enabled && requestAnimationFrame(() => this.refreshVirtualWindow(!0));
|
|
2040
2056
|
const r = this.#t.rowHeight;
|
|
2041
2057
|
r && r > 0 ? this._virtualization.rowHeight = r : requestAnimationFrame(() => {
|
|
2042
2058
|
const l = this._bodyEl?.querySelector(".data-grid-row");
|
|
@@ -2083,7 +2099,7 @@ class W extends HTMLElement {
|
|
|
2083
2099
|
if (!this.#h) return;
|
|
2084
2100
|
this.#u(), this.#t.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, te(this)) : (this._columns.forEach((o) => {
|
|
2085
2101
|
!o.__userResized && o.__autoSized && delete o.width;
|
|
2086
|
-
}),
|
|
2102
|
+
}), M(this));
|
|
2087
2103
|
}
|
|
2088
2104
|
#X() {
|
|
2089
2105
|
this.#h && (this.#u(), this._rowPool.length = 0, this._bodyEl && (this._bodyEl.innerHTML = ""), this.__rowRenderEpoch++, this.refreshVirtualWindow(!0));
|
|
@@ -2095,7 +2111,7 @@ class W extends HTMLElement {
|
|
|
2095
2111
|
Y(this), this.#h && (this.#u(), this.#c());
|
|
2096
2112
|
}
|
|
2097
2113
|
#Y() {
|
|
2098
|
-
this.#h && (this.#u(), this.#q(), this.#x(), this.#H(), q(this),
|
|
2114
|
+
this.#h && (this.#u(), this.#q(), this.#x(), this.#H(), q(this), M(this), this.refreshVirtualWindow(!0));
|
|
2099
2115
|
}
|
|
2100
2116
|
#H() {
|
|
2101
2117
|
if (this.#e) {
|
|
@@ -2156,6 +2172,8 @@ class W extends HTMLElement {
|
|
|
2156
2172
|
if (this.#l && this.#l.length && (o = [...this.#l]), (!o || o.length === 0) && this._rows.length && (o = de(this._rows).columns), o.length) {
|
|
2157
2173
|
o.forEach((r) => {
|
|
2158
2174
|
r.sortable === void 0 && (r.sortable = !0), r.resizable === void 0 && (r.resizable = !0);
|
|
2175
|
+
const l = r;
|
|
2176
|
+
l.__originalWidth === void 0 && typeof r.width == "number" && (l.__originalWidth = r.width);
|
|
2159
2177
|
});
|
|
2160
2178
|
const n = this.#t.columns;
|
|
2161
2179
|
n?.some((r) => r.__compiledView || r.__compiledEditor) ? e.columns = n : e.columns = o;
|
|
@@ -2168,7 +2186,7 @@ class W extends HTMLElement {
|
|
|
2168
2186
|
});
|
|
2169
2187
|
}
|
|
2170
2188
|
// ---------------- Delegate Wrappers ----------------
|
|
2171
|
-
#
|
|
2189
|
+
#k(e, o, i = this.__rowRenderEpoch) {
|
|
2172
2190
|
this.#T || (this.#T = (n, s, r) => this.#e?.renderRow(n, s, r) ?? !1), Me(this, e, o, i, this.#T);
|
|
2173
2191
|
}
|
|
2174
2192
|
// ---------------- Core Helpers ----------------
|
|
@@ -2187,7 +2205,7 @@ class W extends HTMLElement {
|
|
|
2187
2205
|
const i = this.#d;
|
|
2188
2206
|
this.#d = void 0, this.#I(i);
|
|
2189
2207
|
}
|
|
2190
|
-
q(this),
|
|
2208
|
+
q(this), M(this), this.refreshVirtualWindow(!0), this.#t.fitMode === "fixed" && !this.__didInitialAutoSize && requestAnimationFrame(() => te(this)), this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), queueMicrotask(() => this.#e?.afterRender());
|
|
2191
2209
|
}
|
|
2192
2210
|
/** Internal method to apply column state without triggering setup loop */
|
|
2193
2211
|
#I(e) {
|
|
@@ -2299,7 +2317,7 @@ class W extends HTMLElement {
|
|
|
2299
2317
|
* Build a CellMouseEvent from a native MouseEvent.
|
|
2300
2318
|
* Extracts cell/row information from the event target.
|
|
2301
2319
|
*/
|
|
2302
|
-
#
|
|
2320
|
+
#O(e, o) {
|
|
2303
2321
|
let i = null;
|
|
2304
2322
|
const n = e.composedPath?.();
|
|
2305
2323
|
if (n && n.length > 0 ? i = n[0] : i = e.target, i && !this.#o.contains(i)) {
|
|
@@ -2327,7 +2345,7 @@ class W extends HTMLElement {
|
|
|
2327
2345
|
* Handle mousedown events and dispatch to plugin system.
|
|
2328
2346
|
*/
|
|
2329
2347
|
#J(e) {
|
|
2330
|
-
const o = this.#
|
|
2348
|
+
const o = this.#O(e, "mousedown");
|
|
2331
2349
|
(this.#e?.onCellMouseDown(o) ?? !1) && (this.#_ = !0);
|
|
2332
2350
|
}
|
|
2333
2351
|
/**
|
|
@@ -2335,7 +2353,7 @@ class W extends HTMLElement {
|
|
|
2335
2353
|
*/
|
|
2336
2354
|
#Q(e) {
|
|
2337
2355
|
if (!this.#_) return;
|
|
2338
|
-
const o = this.#
|
|
2356
|
+
const o = this.#O(e, "mousemove");
|
|
2339
2357
|
this.#e?.onCellMouseMove(o);
|
|
2340
2358
|
}
|
|
2341
2359
|
/**
|
|
@@ -2343,7 +2361,7 @@ class W extends HTMLElement {
|
|
|
2343
2361
|
*/
|
|
2344
2362
|
#ee(e) {
|
|
2345
2363
|
if (!this.#_) return;
|
|
2346
|
-
const o = this.#
|
|
2364
|
+
const o = this.#O(e, "mouseup");
|
|
2347
2365
|
this.#e?.onCellMouseUp(o), this.#_ = !1;
|
|
2348
2366
|
}
|
|
2349
2367
|
// API consumed by internal utils (rows.ts)
|
|
@@ -2365,7 +2383,7 @@ class W extends HTMLElement {
|
|
|
2365
2383
|
const l = this._visibleColumns[r];
|
|
2366
2384
|
if (l?.editable) {
|
|
2367
2385
|
const a = s;
|
|
2368
|
-
a.classList.contains("editing") ||
|
|
2386
|
+
a.classList.contains("editing") || k(this, i, e, l, a);
|
|
2369
2387
|
}
|
|
2370
2388
|
}), queueMicrotask(() => {
|
|
2371
2389
|
const s = n.querySelector(`.cell[data-col="${this._focusCol}"]`);
|
|
@@ -2381,7 +2399,7 @@ class W extends HTMLElement {
|
|
|
2381
2399
|
}));
|
|
2382
2400
|
}
|
|
2383
2401
|
async commitActiveRowEdit() {
|
|
2384
|
-
this._activeEditRows !== -1 &&
|
|
2402
|
+
this._activeEditRows !== -1 && D(this, this._activeEditRows, !1);
|
|
2385
2403
|
}
|
|
2386
2404
|
async ready() {
|
|
2387
2405
|
return this.#z;
|
|
@@ -2468,7 +2486,7 @@ class W extends HTMLElement {
|
|
|
2468
2486
|
}
|
|
2469
2487
|
for (const n of o.values())
|
|
2470
2488
|
i.push(n);
|
|
2471
|
-
this._columns = i, q(this),
|
|
2489
|
+
this._columns = i, q(this), M(this), this.refreshVirtualWindow(!0);
|
|
2472
2490
|
}
|
|
2473
2491
|
/**
|
|
2474
2492
|
* Get the current column order as an array of field names.
|
|
@@ -2632,11 +2650,11 @@ class W extends HTMLElement {
|
|
|
2632
2650
|
if (!this._bodyEl) return;
|
|
2633
2651
|
const o = this._rows.length;
|
|
2634
2652
|
if (!this._virtualization.enabled) {
|
|
2635
|
-
this.#
|
|
2653
|
+
this.#k(0, o), this.#e?.afterRender();
|
|
2636
2654
|
return;
|
|
2637
2655
|
}
|
|
2638
2656
|
if (this._rows.length <= this._virtualization.bypassThreshold) {
|
|
2639
|
-
if (this._virtualization.start = 0, this._virtualization.end = o, this._bodyEl.style.transform = "translateY(0px)", this.#
|
|
2657
|
+
if (this._virtualization.start = 0, this._virtualization.end = o, this._bodyEl.style.transform = "translateY(0px)", this.#k(0, o, this.__rowRenderEpoch), this._virtualization.totalHeightEl) {
|
|
2640
2658
|
const C = this.#o.querySelector(".tbw-scroll-area"), _ = C ? C.offsetHeight - C.clientHeight : 0;
|
|
2641
2659
|
this._virtualization.totalHeightEl.style.height = `${o * this._virtualization.rowHeight + _}px`;
|
|
2642
2660
|
}
|
|
@@ -2661,7 +2679,7 @@ class W extends HTMLElement {
|
|
|
2661
2679
|
const b = this.#o.querySelector(".tbw-footer")?.offsetHeight ?? 0, w = this.#e?.getExtraHeight() ?? 0, v = this.#o.querySelector(".tbw-scroll-area"), y = v ? v.offsetHeight - v.clientHeight : 0;
|
|
2662
2680
|
this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${o * r + r + b + w + y}px`);
|
|
2663
2681
|
const x = this.#e?.getExtraHeightBefore?.(a) ?? 0, R = -(l - a * r - x);
|
|
2664
|
-
this._bodyEl.style.transform = `translateY(${R}px)`, this.#
|
|
2682
|
+
this._bodyEl.style.transform = `translateY(${R}px)`, this.#k(a, c, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch);
|
|
2665
2683
|
const g = this.#o.querySelector(".rows-body");
|
|
2666
2684
|
g?.setAttribute("aria-rowcount", String(o)), g?.setAttribute("aria-colcount", String(this._visibleColumns.length)), e && this.#e?.afterRender();
|
|
2667
2685
|
}
|
|
@@ -3047,7 +3065,7 @@ const T = {
|
|
|
3047
3065
|
max: (t, e) => Math.max(...t.map((o) => Number(o[e]) || -1 / 0)),
|
|
3048
3066
|
first: (t, e) => t[0]?.[e],
|
|
3049
3067
|
last: (t, e) => t[t.length - 1]?.[e]
|
|
3050
|
-
}, I = /* @__PURE__ */ new Map(),
|
|
3068
|
+
}, I = /* @__PURE__ */ new Map(), O = {
|
|
3051
3069
|
/**
|
|
3052
3070
|
* Register a custom aggregator function.
|
|
3053
3071
|
*/
|
|
@@ -3101,7 +3119,7 @@ function Ze(t) {
|
|
|
3101
3119
|
function it(t, e) {
|
|
3102
3120
|
return Ze(t)(e);
|
|
3103
3121
|
}
|
|
3104
|
-
const st =
|
|
3122
|
+
const st = O.register.bind(O), rt = O.unregister.bind(O), lt = O.get.bind(O), at = O.run.bind(O), ct = O.list.bind(O);
|
|
3105
3123
|
export {
|
|
3106
3124
|
Qe as BaseGridPlugin,
|
|
3107
3125
|
H as DEFAULT_GRID_ICONS,
|
|
@@ -3116,7 +3134,7 @@ export {
|
|
|
3116
3134
|
Je as PLUGIN_QUERIES,
|
|
3117
3135
|
nt as PluginEvents,
|
|
3118
3136
|
Ye as PluginManager,
|
|
3119
|
-
|
|
3137
|
+
O as aggregatorRegistry,
|
|
3120
3138
|
lt as getAggregator,
|
|
3121
3139
|
Ze as getValueAggregator,
|
|
3122
3140
|
ct as listAggregators,
|