@toolbox-web/grid 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all.js +554 -519
- package/all.js.map +1 -1
- package/index.js +347 -325
- package/index.js.map +1 -1
- package/lib/core/internal/keyboard.d.ts.map +1 -1
- package/lib/core/internal/rows.d.ts.map +1 -1
- package/lib/core/internal/utils.d.ts +46 -0
- package/lib/core/internal/utils.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.js +2 -5
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +13 -6
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.js +92 -65
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-columns/pinned-columns.d.ts +24 -7
- package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/types.d.ts +51 -2
- package/lib/plugins/pinned-columns/types.d.ts.map +1 -1
- package/lib/plugins/print/index.js +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -1
- package/lib/plugins/responsive/index.js +245 -102
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
- package/lib/plugins/tree/index.js +6 -6
- package/lib/plugins/tree/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +23 -23
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +9 -9
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +1 -1
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/print.umd.js +1 -1
- package/umd/plugins/print.umd.js.map +1 -1
- package/umd/plugins/responsive.umd.js +1 -1
- package/umd/plugins/responsive.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -1
- package/umd/plugins/tree.umd.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const we = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm);color-scheme:light dark;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;content-visibility:auto;contain-intrinsic-size:auto var(--tbw-row-height);&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);line-height:calc(var(--tbw-row-height) - 5px);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align: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}@keyframes tbw-spin{to{transform:rotate(360deg)}}.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}}', X = {
|
|
1
|
+
const we = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-input: 1px solid var(--tbw-color-border-strong);--tbw-border-header: 1px solid var(--tbw-color-border-header);--tbw-row-divider: 1px solid var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline: 2px solid var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm);color-scheme:light dark;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;content-visibility:auto;contain-intrinsic-size:auto var(--tbw-row-height);&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);line-height:calc(var(--tbw-row-height) - 5px);border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}@keyframes tbw-spin{to{transform:rotate(360deg)}}.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);content:"";position:absolute;left:var(--tbw-spacing-md);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:10;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:11}}}', X = {
|
|
2
2
|
STRETCH: "stretch",
|
|
3
3
|
FIXED: "fixed"
|
|
4
|
-
},
|
|
4
|
+
}, Je = {
|
|
5
5
|
mode: "reduced-motion",
|
|
6
6
|
duration: 200,
|
|
7
7
|
easing: "ease-out"
|
|
@@ -18,7 +18,7 @@ const we = '@layer tbw-base,tbw-plugins,tbw-theme;@layer tbw-base{tbw-grid{--tbw
|
|
|
18
18
|
filterActive: be,
|
|
19
19
|
print: "🖨️"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function et(t) {
|
|
22
22
|
return Array.from(t.querySelectorAll("tbw-grid-column")).map((o) => {
|
|
23
23
|
const n = o.getAttribute("field") || "";
|
|
24
24
|
if (!n) return null;
|
|
@@ -37,14 +37,14 @@ function Je(t) {
|
|
|
37
37
|
f && (h.__editorName = f), g && (h.__rendererName = g);
|
|
38
38
|
const d = o.getAttribute("options");
|
|
39
39
|
d && (h.options = d.split(",").map((m) => {
|
|
40
|
-
const [
|
|
41
|
-
return { value:
|
|
40
|
+
const [z, R] = m.includes(":") ? m.split(":") : [m.trim(), m.trim()];
|
|
41
|
+
return { value: z.trim(), label: R?.trim() || z.trim() };
|
|
42
42
|
}));
|
|
43
43
|
const w = o.querySelector("tbw-grid-column-view"), b = o.querySelector("tbw-grid-column-editor"), S = o.querySelector("tbw-grid-column-header");
|
|
44
44
|
w && (h.__viewTemplate = w), b && (h.__editorTemplate = b), S && (h.__headerTemplate = S);
|
|
45
|
-
const _ = globalThis.DataGridElement?.getAdapters?.() ?? [],
|
|
45
|
+
const _ = globalThis.DataGridElement?.getAdapters?.() ?? [], A = w ?? o, v = _.find((m) => m.canHandle(A));
|
|
46
46
|
if (v) {
|
|
47
|
-
const m = v.createRenderer(
|
|
47
|
+
const m = v.createRenderer(A);
|
|
48
48
|
m && (h.viewRenderer = m);
|
|
49
49
|
}
|
|
50
50
|
const E = b ?? o, y = _.find((m) => m.canHandle(E));
|
|
@@ -79,7 +79,7 @@ function me(t, e) {
|
|
|
79
79
|
});
|
|
80
80
|
return Object.keys(o).forEach((i) => n.push(o[i])), n;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function ke(t, e) {
|
|
83
83
|
try {
|
|
84
84
|
t.part?.add?.(e);
|
|
85
85
|
} catch {
|
|
@@ -114,23 +114,23 @@ function B(t) {
|
|
|
114
114
|
return n != null ? `minmax(${n}px, 1fr)` : "1fr";
|
|
115
115
|
}).join(" ").trim() : t._gridTemplate = t._visibleColumns.map((o) => o.width ? `${o.width}px` : "max-content").join(" "), t.style.setProperty("--tbw-column-template", t._gridTemplate);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function tt(t) {
|
|
118
118
|
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";
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ot(t, e) {
|
|
121
121
|
const o = t[0] || {}, n = Object.keys(o).map((r) => {
|
|
122
|
-
const s = o[r], l =
|
|
122
|
+
const s = o[r], l = tt(s);
|
|
123
123
|
return { field: r, header: r.charAt(0).toUpperCase() + r.slice(1), type: l };
|
|
124
124
|
}), i = {};
|
|
125
125
|
return n.forEach((r) => {
|
|
126
126
|
i[r.field] = r.type || "string";
|
|
127
127
|
}), { columns: n, typeMap: i };
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const nt = /{{\s*([^}]+)\s*}}/g, D = "__DG_EMPTY__", it = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, rt = /__(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/;
|
|
130
|
+
function st(t) {
|
|
131
131
|
return !t || typeof t != "string" ? "" : t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const lt = /* @__PURE__ */ new Set([
|
|
134
134
|
"script",
|
|
135
135
|
"iframe",
|
|
136
136
|
"object",
|
|
@@ -155,18 +155,18 @@ const st = /* @__PURE__ */ new Set([
|
|
|
155
155
|
"plaintext",
|
|
156
156
|
"xmp",
|
|
157
157
|
"listing"
|
|
158
|
-
]), Ce = /^on\w+$/i,
|
|
158
|
+
]), Ce = /^on\w+$/i, at = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), ct = /^\s*(javascript|vbscript|data|blob):/i;
|
|
159
159
|
function F(t) {
|
|
160
160
|
if (!t || typeof t != "string") return "";
|
|
161
161
|
if (t.indexOf("<") === -1) return t;
|
|
162
162
|
const e = document.createElement("template");
|
|
163
|
-
return e.innerHTML = t,
|
|
163
|
+
return e.innerHTML = t, dt(e.content), e.innerHTML;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function dt(t) {
|
|
166
166
|
const e = [], o = t.querySelectorAll("*");
|
|
167
167
|
for (const n of o) {
|
|
168
168
|
const i = n.tagName.toLowerCase();
|
|
169
|
-
if (
|
|
169
|
+
if (lt.has(i)) {
|
|
170
170
|
e.push(n);
|
|
171
171
|
continue;
|
|
172
172
|
}
|
|
@@ -183,7 +183,7 @@ function ct(t) {
|
|
|
183
183
|
r.push(s.name);
|
|
184
184
|
continue;
|
|
185
185
|
}
|
|
186
|
-
if (
|
|
186
|
+
if (at.has(l) && ct.test(s.value)) {
|
|
187
187
|
r.push(s.name);
|
|
188
188
|
continue;
|
|
189
189
|
}
|
|
@@ -196,35 +196,35 @@ function ct(t) {
|
|
|
196
196
|
}
|
|
197
197
|
e.forEach((n) => n.remove());
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ne(t, e) {
|
|
200
200
|
if (!t || t.indexOf("{{") === -1) return t;
|
|
201
|
-
const o = [], n = t.replace(
|
|
202
|
-
const c =
|
|
201
|
+
const o = [], n = t.replace(nt, (l, a) => {
|
|
202
|
+
const c = ht(a, e);
|
|
203
203
|
return o.push({ expr: a.trim(), result: c }), c;
|
|
204
|
-
}), i =
|
|
204
|
+
}), i = ut(n), r = o.length && o.every((l) => l.result === "" || l.result === D);
|
|
205
205
|
return /Reflect\.|\bProxy\b|ownKeys\(/.test(t) || r ? "" : i;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
if (t = (t || "").trim(), !t || /\b(Reflect|Proxy|ownKeys)\b/.test(t)) return
|
|
209
|
-
if (t === "value") return e.value == null ?
|
|
207
|
+
function ht(t, e) {
|
|
208
|
+
if (t = (t || "").trim(), !t || /\b(Reflect|Proxy|ownKeys)\b/.test(t)) return D;
|
|
209
|
+
if (t === "value") return e.value == null ? D : String(e.value);
|
|
210
210
|
if (t.startsWith("row.") && !/[()?]/.test(t) && !t.includes(":")) {
|
|
211
211
|
const n = t.slice(4), i = e.row ? e.row[n] : void 0;
|
|
212
|
-
return i == null ?
|
|
212
|
+
return i == null ? D : String(i);
|
|
213
213
|
}
|
|
214
|
-
if (t.length > 80 || !
|
|
214
|
+
if (t.length > 80 || !it.test(t) || rt.test(t)) return D;
|
|
215
215
|
const o = t.match(/\./g);
|
|
216
|
-
if (o && o.length > 1) return
|
|
216
|
+
if (o && o.length > 1) return D;
|
|
217
217
|
try {
|
|
218
218
|
const i = new Function("value", "row", `return (${t});`)(e.value, e.row), r = i == null ? "" : String(i);
|
|
219
|
-
return /Reflect|Proxy|ownKeys/.test(r) ?
|
|
219
|
+
return /Reflect|Proxy|ownKeys/.test(r) ? D : r || D;
|
|
220
220
|
} catch {
|
|
221
|
-
return
|
|
221
|
+
return D;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function ht(t) {
|
|
225
|
-
return t && t.replace(new RegExp(O, "g"), "").replace(/Reflect\.[^<>{}\s]+/g, "").replace(/\bProxy\b/g, "").replace(/ownKeys\([^)]*\)/g, "");
|
|
226
|
-
}
|
|
227
224
|
function ut(t) {
|
|
225
|
+
return t && t.replace(new RegExp(D, "g"), "").replace(/Reflect\.[^<>{}\s]+/g, "").replace(/\bProxy\b/g, "").replace(/ownKeys\([^)]*\)/g, "");
|
|
226
|
+
}
|
|
227
|
+
function ft(t) {
|
|
228
228
|
if (/Reflect|Proxy|ownKeys/.test(t.textContent || "")) {
|
|
229
229
|
if (Array.from(t.childNodes).forEach((e) => {
|
|
230
230
|
e.nodeType === Node.TEXT_NODE && /Reflect|Proxy|ownKeys/.test(e.textContent || "") && (e.textContent = "");
|
|
@@ -237,11 +237,11 @@ function ut(t) {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function ye(t) {
|
|
240
|
-
const e = /Reflect\.|\bProxy\b|ownKeys\(/.test(t), o = ((n) => e ? "" :
|
|
240
|
+
const e = /Reflect\.|\bProxy\b|ownKeys\(/.test(t), o = ((n) => e ? "" : Ne(t, n));
|
|
241
241
|
return o.__blocked = e, o;
|
|
242
242
|
}
|
|
243
|
-
const
|
|
244
|
-
class
|
|
243
|
+
const pt = 100;
|
|
244
|
+
class gt {
|
|
245
245
|
#l;
|
|
246
246
|
#i;
|
|
247
247
|
#u;
|
|
@@ -355,7 +355,7 @@ class pt {
|
|
|
355
355
|
n
|
|
356
356
|
));
|
|
357
357
|
const r = this.#r.getRows();
|
|
358
|
-
return i.length === 0 && r.length && (i =
|
|
358
|
+
return i.length === 0 && r.length && (i = ot(r).columns), i.length && (i.forEach((s) => {
|
|
359
359
|
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);
|
|
360
360
|
}), i.forEach((s) => {
|
|
361
361
|
s.__viewTemplate && !s.__compiledView && (s.__compiledView = ye(s.__viewTemplate.innerHTML)), s.__editorTemplate && !s.__compiledEditor && (s.__compiledEditor = ye(s.__editorTemplate.innerHTML));
|
|
@@ -453,7 +453,7 @@ class pt {
|
|
|
453
453
|
this.#s = void 0;
|
|
454
454
|
const o = this.collectState(e);
|
|
455
455
|
this.#r.emit("column-state-change", o);
|
|
456
|
-
},
|
|
456
|
+
}, pt);
|
|
457
457
|
}
|
|
458
458
|
setColumnVisible(e, o) {
|
|
459
459
|
const n = this.columns, i = n.find((s) => s.field === e);
|
|
@@ -501,7 +501,7 @@ class pt {
|
|
|
501
501
|
this.columns = n, this.#r.renderHeader(), this.#r.updateTemplate(), this.#r.refreshVirtualWindow();
|
|
502
502
|
}
|
|
503
503
|
parseLightDomColumns(e) {
|
|
504
|
-
this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ?
|
|
504
|
+
this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ? et(e) : []);
|
|
505
505
|
}
|
|
506
506
|
clearLightDomCache() {
|
|
507
507
|
this.#d = void 0;
|
|
@@ -554,10 +554,10 @@ class pt {
|
|
|
554
554
|
this.#m?.disconnect(), this.#g = [], this.#s && clearTimeout(this.#s);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Ie(t) {
|
|
558
558
|
return `<span role="checkbox" aria-checked="${t}" aria-label="${t}">${t ? "🗹" : "☐"}</span>`;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function qe(t) {
|
|
561
561
|
if (t == null || t === "") return "";
|
|
562
562
|
if (t instanceof Date)
|
|
563
563
|
return isNaN(t.getTime()) ? "" : t.toLocaleDateString();
|
|
@@ -567,7 +567,7 @@ function Ie(t) {
|
|
|
567
567
|
}
|
|
568
568
|
return "";
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function We(t) {
|
|
571
571
|
if (!t) return -1;
|
|
572
572
|
const e = t.getAttribute("data-row");
|
|
573
573
|
if (e) return parseInt(e, 10);
|
|
@@ -580,7 +580,7 @@ function qe(t) {
|
|
|
580
580
|
if (i[r] === o) return r;
|
|
581
581
|
return -1;
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function wt(t) {
|
|
584
584
|
if (!t) return -1;
|
|
585
585
|
const e = t.getAttribute("data-col");
|
|
586
586
|
return e ? parseInt(e, 10) : -1;
|
|
@@ -588,7 +588,24 @@ function gt(t) {
|
|
|
588
588
|
function fe(t) {
|
|
589
589
|
t && t.querySelectorAll(".cell-focus").forEach((e) => e.classList.remove("cell-focus"));
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function bt(t) {
|
|
592
|
+
try {
|
|
593
|
+
if (getComputedStyle(t).direction === "rtl") return "rtl";
|
|
594
|
+
} catch {
|
|
595
|
+
}
|
|
596
|
+
try {
|
|
597
|
+
if (t.closest?.("[dir]")?.getAttribute("dir") === "rtl") return "rtl";
|
|
598
|
+
} catch {
|
|
599
|
+
}
|
|
600
|
+
return "ltr";
|
|
601
|
+
}
|
|
602
|
+
function _e(t) {
|
|
603
|
+
return bt(t) === "rtl";
|
|
604
|
+
}
|
|
605
|
+
function po(t, e) {
|
|
606
|
+
return t === "left" || t === "right" ? t : e === "rtl" ? t === "start" ? "right" : "left" : t === "start" ? "left" : "right";
|
|
607
|
+
}
|
|
608
|
+
function $e(t, e) {
|
|
592
609
|
const o = e.renderer || e.viewRenderer;
|
|
593
610
|
if (o) return o;
|
|
594
611
|
if (!e.type) return;
|
|
@@ -602,7 +619,7 @@ function We(t, e) {
|
|
|
602
619
|
return r.renderer;
|
|
603
620
|
}
|
|
604
621
|
}
|
|
605
|
-
function
|
|
622
|
+
function Fe(t, e) {
|
|
606
623
|
if (e.format) return e.format;
|
|
607
624
|
if (!e.type) return;
|
|
608
625
|
const o = t.effectiveConfig?.typeDefaults;
|
|
@@ -615,31 +632,31 @@ function $e(t, e) {
|
|
|
615
632
|
return i.format;
|
|
616
633
|
}
|
|
617
634
|
}
|
|
618
|
-
const
|
|
635
|
+
const Ue = 'input,select,textarea,[contenteditable="true"],[contenteditable=""],[tabindex]:not([tabindex="-1"])';
|
|
619
636
|
function re(t) {
|
|
620
637
|
return (t.__editingCellCount ?? 0) > 0;
|
|
621
638
|
}
|
|
622
639
|
function se(t) {
|
|
623
640
|
t.__editingCellCount = 0, t.removeAttribute("data-has-editing"), t.querySelectorAll(".cell.editing").forEach((o) => o.classList.remove("editing"));
|
|
624
641
|
}
|
|
625
|
-
const Ue = document.createElement("template");
|
|
626
|
-
Ue.innerHTML = '<div class="cell" role="gridcell" part="cell"></div>';
|
|
627
642
|
const Ve = document.createElement("template");
|
|
628
|
-
Ve.innerHTML = '<div class="
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
function bt() {
|
|
643
|
+
Ve.innerHTML = '<div class="cell" role="gridcell" part="cell"></div>';
|
|
644
|
+
const Be = document.createElement("template");
|
|
645
|
+
Be.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
|
|
646
|
+
function mt() {
|
|
633
647
|
return Ve.content.firstElementChild.cloneNode(!0);
|
|
634
648
|
}
|
|
649
|
+
function vt() {
|
|
650
|
+
return Be.content.firstElementChild.cloneNode(!0);
|
|
651
|
+
}
|
|
635
652
|
function j(t) {
|
|
636
653
|
t.__cellDisplayCache = void 0, t.__cellCacheEpoch = void 0, t.__hasSpecialColumns = void 0;
|
|
637
654
|
}
|
|
638
|
-
function
|
|
655
|
+
function Ct(t, e, o, n, i) {
|
|
639
656
|
const r = Math.max(0, o - e), s = t._bodyEl, l = t._visibleColumns, a = l.length;
|
|
640
657
|
let c = t.__cachedHeaderRowCount;
|
|
641
658
|
for (c === void 0 && (c = t.querySelector(".header-group-row") ? 2 : 1, t.__cachedHeaderRowCount = c); t._rowPool.length < r; ) {
|
|
642
|
-
const p =
|
|
659
|
+
const p = vt();
|
|
643
660
|
t._rowPool.push(p);
|
|
644
661
|
}
|
|
645
662
|
if (t._rowPool.length > r) {
|
|
@@ -656,9 +673,9 @@ function mt(t, e, o, n, i) {
|
|
|
656
673
|
d.__epoch = n, d.__rowDataRef = g, d.parentNode !== s && s.appendChild(d);
|
|
657
674
|
continue;
|
|
658
675
|
}
|
|
659
|
-
const w = d.__epoch, b = d.__rowDataRef, S = d.children.length, _ = w === n && S === a,
|
|
676
|
+
const w = d.__epoch, b = d.__rowDataRef, S = d.children.length, _ = w === n && S === a, A = b !== g;
|
|
660
677
|
let v = !1;
|
|
661
|
-
if (_ &&
|
|
678
|
+
if (_ && A) {
|
|
662
679
|
for (let R = 0; R < a; R++)
|
|
663
680
|
if (l[R].externalView && !d.querySelector(`.cell[data-col="${R}"] [data-external-view]`)) {
|
|
664
681
|
v = !0;
|
|
@@ -668,7 +685,7 @@ function mt(t, e, o, n, i) {
|
|
|
668
685
|
if (!_ || v) {
|
|
669
686
|
const R = re(d), x = t._activeEditRows === f;
|
|
670
687
|
R && !x ? (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), se(d), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g) : R && x ? (le(t, d, g, f), d.__rowDataRef = g) : (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g);
|
|
671
|
-
} else if (
|
|
688
|
+
} else if (A) {
|
|
672
689
|
const R = re(d), x = t._activeEditRows === f;
|
|
673
690
|
R && !x ? (se(d), G(t, d, g, f), d.__epoch = n, d.__rowDataRef = g) : (le(t, d, g, f), d.__rowDataRef = g);
|
|
674
691
|
} else {
|
|
@@ -685,12 +702,12 @@ function mt(t, e, o, n, i) {
|
|
|
685
702
|
}
|
|
686
703
|
const m = d.classList.contains("changed");
|
|
687
704
|
E !== m && d.classList.toggle("changed", E);
|
|
688
|
-
const
|
|
689
|
-
if (
|
|
705
|
+
const z = t.effectiveConfig?.rowClass;
|
|
706
|
+
if (z) {
|
|
690
707
|
const R = d.getAttribute("data-dynamic-classes");
|
|
691
708
|
R && R.split(" ").forEach((x) => x && d.classList.remove(x));
|
|
692
709
|
try {
|
|
693
|
-
const x =
|
|
710
|
+
const x = z(g);
|
|
694
711
|
if (x && x.length > 0) {
|
|
695
712
|
const ie = x.filter((Y) => Y && typeof Y == "string");
|
|
696
713
|
ie.forEach((Y) => d.classList.add(Y)), d.setAttribute("data-dynamic-classes", ie.join(" "));
|
|
@@ -757,9 +774,9 @@ function le(t, e, o, n) {
|
|
|
757
774
|
const y = w.getAttribute("data-dynamic-classes");
|
|
758
775
|
y && y.split(" ").forEach((m) => m && w.classList.remove(m));
|
|
759
776
|
try {
|
|
760
|
-
const m = o[d.field],
|
|
761
|
-
if (
|
|
762
|
-
const R =
|
|
777
|
+
const m = o[d.field], z = C(m, o, d);
|
|
778
|
+
if (z && z.length > 0) {
|
|
779
|
+
const R = z.filter((x) => x && typeof x == "string");
|
|
763
780
|
R.forEach((x) => w.classList.add(x)), w.setAttribute("data-dynamic-classes", R.join(" "));
|
|
764
781
|
} else
|
|
765
782
|
w.removeAttribute("data-dynamic-classes");
|
|
@@ -768,7 +785,7 @@ function le(t, e, o, n) {
|
|
|
768
785
|
}
|
|
769
786
|
}
|
|
770
787
|
if (w.classList.contains("editing")) continue;
|
|
771
|
-
const _ =
|
|
788
|
+
const _ = $e(t, d);
|
|
772
789
|
if (_) {
|
|
773
790
|
const y = o[d.field], m = _({
|
|
774
791
|
row: o,
|
|
@@ -790,23 +807,24 @@ function le(t, e, o, n) {
|
|
|
790
807
|
}
|
|
791
808
|
if (d.__viewTemplate || d.__compiledView || d.externalView)
|
|
792
809
|
continue;
|
|
793
|
-
const
|
|
810
|
+
const A = o[d.field];
|
|
794
811
|
let v;
|
|
795
|
-
const E =
|
|
796
|
-
if (E)
|
|
812
|
+
const E = Fe(t, d);
|
|
813
|
+
if (E) {
|
|
797
814
|
try {
|
|
798
|
-
const y = E(
|
|
815
|
+
const y = E(A, o);
|
|
799
816
|
v = y == null ? "" : String(y);
|
|
800
817
|
} catch (y) {
|
|
801
|
-
console.warn(`[tbw-grid] Format error in column '${d.field}':`, y), v =
|
|
818
|
+
console.warn(`[tbw-grid] Format error in column '${d.field}':`, y), v = A == null ? "" : String(A);
|
|
802
819
|
}
|
|
803
|
-
|
|
820
|
+
w.textContent = v;
|
|
821
|
+
} else d.type === "date" ? (v = qe(A), w.textContent = v) : d.type === "boolean" ? w.innerHTML = Ie(!!A) : (v = A == null ? "" : String(A), w.textContent = v);
|
|
804
822
|
u && t._afterCellRender?.({
|
|
805
823
|
row: o,
|
|
806
824
|
rowIndex: n,
|
|
807
825
|
column: d,
|
|
808
826
|
colIndex: g,
|
|
809
|
-
value:
|
|
827
|
+
value: A,
|
|
810
828
|
cellElement: w,
|
|
811
829
|
rowElement: e
|
|
812
830
|
});
|
|
@@ -816,17 +834,17 @@ function G(t, e, o, n) {
|
|
|
816
834
|
e.innerHTML = "";
|
|
817
835
|
const i = t._visibleColumns, r = i.length, s = t._focusRow, l = t._focusCol, a = t, c = t._hasAfterCellRenderHook?.() ?? !1, h = document.createDocumentFragment();
|
|
818
836
|
for (let u = 0; u < r; u++) {
|
|
819
|
-
const p = i[u], f =
|
|
837
|
+
const p = i[u], f = mt();
|
|
820
838
|
f.setAttribute("aria-colindex", String(u + 1)), f.setAttribute("data-col", String(u)), f.setAttribute("data-row", String(n)), f.setAttribute("data-field", p.field), f.setAttribute("data-header", p.header ?? p.field), p.type && f.setAttribute("data-type", p.type);
|
|
821
839
|
let g = o[p.field];
|
|
822
|
-
const d =
|
|
840
|
+
const d = Fe(t, p);
|
|
823
841
|
if (d)
|
|
824
842
|
try {
|
|
825
843
|
g = d(g, o);
|
|
826
844
|
} catch (v) {
|
|
827
845
|
console.warn(`[tbw-grid] Format error in column '${p.field}':`, v);
|
|
828
846
|
}
|
|
829
|
-
const w = p.__compiledView, b = p.__viewTemplate, S =
|
|
847
|
+
const w = p.__compiledView, b = p.__viewTemplate, S = $e(t, p), C = p.externalView;
|
|
830
848
|
let _ = !1;
|
|
831
849
|
if (S) {
|
|
832
850
|
const v = S({ row: o, value: g, field: p.field, column: p, cellEl: f });
|
|
@@ -861,19 +879,19 @@ function G(t, e, o, n) {
|
|
|
861
879
|
f.innerHTML = E ? "" : F(v), _ = !0, E && (f.textContent = "", f.setAttribute("data-blocked-template", ""));
|
|
862
880
|
} else if (b) {
|
|
863
881
|
const v = b.innerHTML;
|
|
864
|
-
/Reflect\.|\bProxy\b|ownKeys\(/.test(v) ? (f.textContent = "", f.setAttribute("data-blocked-template", "")) : (f.innerHTML = F(
|
|
882
|
+
/Reflect\.|\bProxy\b|ownKeys\(/.test(v) ? (f.textContent = "", f.setAttribute("data-blocked-template", "")) : (f.innerHTML = F(Ne(v, { row: o, value: g })), _ = !0);
|
|
865
883
|
} else
|
|
866
|
-
p.type === "date" ? f.textContent =
|
|
884
|
+
d ? f.textContent = g == null ? "" : String(g) : p.type === "date" ? f.textContent = qe(g) : p.type === "boolean" ? f.innerHTML = Ie(!!g) : f.textContent = g == null ? "" : String(g);
|
|
867
885
|
if (_) {
|
|
868
|
-
|
|
886
|
+
ft(f);
|
|
869
887
|
const v = f.textContent || "";
|
|
870
888
|
/Proxy|Reflect\.ownKeys/.test(v) && (f.textContent = v.replace(/Proxy|Reflect\.ownKeys/g, "").trim(), /Proxy|Reflect\.ownKeys/.test(f.textContent || "") && (f.textContent = ""));
|
|
871
889
|
}
|
|
872
890
|
f.hasAttribute("data-blocked-template") && (f.textContent || "").trim().length && (f.textContent = ""), p.editable ? f.tabIndex = 0 : p.type === "boolean" && (f.hasAttribute("tabindex") || (f.tabIndex = 0)), s === n && l === u ? (f.classList.add("cell-focus"), f.setAttribute("aria-selected", "true")) : f.setAttribute("aria-selected", "false");
|
|
873
|
-
const
|
|
874
|
-
if (
|
|
891
|
+
const A = p.cellClass;
|
|
892
|
+
if (A)
|
|
875
893
|
try {
|
|
876
|
-
const v = o[p.field], E =
|
|
894
|
+
const v = o[p.field], E = A(v, o, p);
|
|
877
895
|
if (E && E.length > 0) {
|
|
878
896
|
const y = E.filter((m) => m && typeof m == "string");
|
|
879
897
|
y.forEach((m) => f.classList.add(m)), f.setAttribute("data-dynamic-classes", y.join(" "));
|
|
@@ -893,9 +911,9 @@ function G(t, e, o, n) {
|
|
|
893
911
|
}
|
|
894
912
|
e.appendChild(h);
|
|
895
913
|
}
|
|
896
|
-
function
|
|
914
|
+
function Ee(t, e, o) {
|
|
897
915
|
if (e.target?.closest(".resize-handle")) return;
|
|
898
|
-
const n = o.querySelector(".cell[data-row]"), i =
|
|
916
|
+
const n = o.querySelector(".cell[data-row]"), i = We(n);
|
|
899
917
|
if (i < 0) return;
|
|
900
918
|
const r = t._rows[i];
|
|
901
919
|
if (!r || t._dispatchRowClick?.(e, i, r, o))
|
|
@@ -909,7 +927,7 @@ function _e(t, e, o) {
|
|
|
909
927
|
const a = t._focusRow !== i || t._focusCol !== l;
|
|
910
928
|
if (t._focusRow = i, t._focusCol = l, s.classList.contains("editing")) {
|
|
911
929
|
a && (fe(t._bodyEl ?? t), s.classList.add("cell-focus"));
|
|
912
|
-
const c = s.querySelector(
|
|
930
|
+
const c = s.querySelector(Ue);
|
|
913
931
|
try {
|
|
914
932
|
c?.focus({ preventScroll: !0 });
|
|
915
933
|
} catch {
|
|
@@ -920,7 +938,7 @@ function _e(t, e, o) {
|
|
|
920
938
|
}
|
|
921
939
|
}
|
|
922
940
|
}
|
|
923
|
-
function
|
|
941
|
+
function yt(t, e) {
|
|
924
942
|
if (t._dispatchKeyDown?.(e))
|
|
925
943
|
return;
|
|
926
944
|
const o = t._rows.length - 1, n = t._visibleColumns.length - 1, i = t._activeEditRows !== void 0 && t._activeEditRows !== -1, s = t._visibleColumns[t._focusCol]?.type, l = e.composedPath?.() ?? [], a = l.length ? l[0] : e.target, c = (h) => {
|
|
@@ -940,12 +958,14 @@ function vt(t, e) {
|
|
|
940
958
|
case "ArrowUp":
|
|
941
959
|
i && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = Math.max(0, t._focusRow - 1), e.preventDefault();
|
|
942
960
|
break;
|
|
943
|
-
case "ArrowRight":
|
|
944
|
-
t._focusCol = Math.min(n, t._focusCol + 1), e.preventDefault();
|
|
961
|
+
case "ArrowRight": {
|
|
962
|
+
_e(t) ? t._focusCol = Math.max(0, t._focusCol - 1) : t._focusCol = Math.min(n, t._focusCol + 1), e.preventDefault();
|
|
945
963
|
break;
|
|
946
|
-
|
|
947
|
-
|
|
964
|
+
}
|
|
965
|
+
case "ArrowLeft": {
|
|
966
|
+
_e(t) ? t._focusCol = Math.min(n, t._focusCol + 1) : t._focusCol = Math.max(0, t._focusCol - 1), e.preventDefault();
|
|
948
967
|
break;
|
|
968
|
+
}
|
|
949
969
|
case "Home":
|
|
950
970
|
(e.ctrlKey || e.metaKey) && (i && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = 0), t._focusCol = 0, e.preventDefault(), $(t, { forceScrollLeft: !0 });
|
|
951
971
|
return;
|
|
@@ -1023,7 +1043,7 @@ function $(t, e) {
|
|
|
1023
1043
|
}
|
|
1024
1044
|
}
|
|
1025
1045
|
if (t._activeEditRows !== void 0 && t._activeEditRows !== -1 && l.classList.contains("editing")) {
|
|
1026
|
-
const c = l.querySelector(
|
|
1046
|
+
const c = l.querySelector(Ue);
|
|
1027
1047
|
if (c && document.activeElement !== c)
|
|
1028
1048
|
try {
|
|
1029
1049
|
c.focus({ preventScroll: !0 });
|
|
@@ -1040,8 +1060,8 @@ function $(t, e) {
|
|
|
1040
1060
|
}
|
|
1041
1061
|
}
|
|
1042
1062
|
const oe = /* @__PURE__ */ new WeakMap();
|
|
1043
|
-
function
|
|
1044
|
-
const o =
|
|
1063
|
+
function _t(t, e) {
|
|
1064
|
+
const o = We(e), n = wt(e);
|
|
1045
1065
|
o < 0 || n < 0 || (t._focusRow = o, t._focusCol = n, fe(t._bodyEl), e.classList.add("cell-focus"), e.setAttribute("aria-selected", "true"));
|
|
1046
1066
|
}
|
|
1047
1067
|
function pe(t, e, o, n) {
|
|
@@ -1068,72 +1088,72 @@ function pe(t, e, o, n) {
|
|
|
1068
1088
|
cell: c !== void 0 && h !== void 0 && c >= 0 && h >= 0 ? { row: c, col: h } : void 0
|
|
1069
1089
|
};
|
|
1070
1090
|
}
|
|
1071
|
-
function
|
|
1091
|
+
function Et(t, e, o) {
|
|
1072
1092
|
const n = pe(t, e, o, "mousedown");
|
|
1073
1093
|
(t._dispatchCellMouseDown?.(n) ?? !1) && oe.set(t, !0);
|
|
1074
1094
|
}
|
|
1075
|
-
function
|
|
1095
|
+
function St(t, e, o) {
|
|
1076
1096
|
if (!oe.get(t)) return;
|
|
1077
1097
|
const n = pe(t, e, o, "mousemove");
|
|
1078
1098
|
t._dispatchCellMouseMove?.(n);
|
|
1079
1099
|
}
|
|
1080
|
-
function
|
|
1100
|
+
function Rt(t, e, o) {
|
|
1081
1101
|
if (!oe.get(t)) return;
|
|
1082
1102
|
const n = pe(t, e, o, "mouseup");
|
|
1083
1103
|
t._dispatchCellMouseUp?.(n), oe.set(t, !1);
|
|
1084
1104
|
}
|
|
1085
|
-
function
|
|
1105
|
+
function xt(t, e, o) {
|
|
1086
1106
|
e.addEventListener(
|
|
1087
1107
|
"mousedown",
|
|
1088
1108
|
(n) => {
|
|
1089
1109
|
const i = n.target.closest(".cell[data-col]");
|
|
1090
|
-
i && (i.classList.contains("editing") ||
|
|
1110
|
+
i && (i.classList.contains("editing") || _t(t, i));
|
|
1091
1111
|
},
|
|
1092
1112
|
{ signal: o }
|
|
1093
1113
|
), e.addEventListener(
|
|
1094
1114
|
"click",
|
|
1095
1115
|
(n) => {
|
|
1096
1116
|
const i = n.target.closest(".data-grid-row");
|
|
1097
|
-
i &&
|
|
1117
|
+
i && Ee(t, n, i);
|
|
1098
1118
|
},
|
|
1099
1119
|
{ signal: o }
|
|
1100
1120
|
), e.addEventListener(
|
|
1101
1121
|
"dblclick",
|
|
1102
1122
|
(n) => {
|
|
1103
1123
|
const i = n.target.closest(".data-grid-row");
|
|
1104
|
-
i &&
|
|
1124
|
+
i && Ee(t, n, i);
|
|
1105
1125
|
},
|
|
1106
1126
|
{ signal: o }
|
|
1107
1127
|
);
|
|
1108
1128
|
}
|
|
1109
|
-
function
|
|
1110
|
-
e.addEventListener("keydown", (i) =>
|
|
1129
|
+
function At(t, e, o, n) {
|
|
1130
|
+
e.addEventListener("keydown", (i) => yt(t, i), { signal: n }), o.addEventListener("mousedown", (i) => Et(t, o, i), { signal: n }), document.addEventListener("mousemove", (i) => St(t, o, i), { signal: n }), document.addEventListener("mouseup", (i) => Rt(t, o, i), { signal: n });
|
|
1111
1131
|
}
|
|
1112
|
-
function
|
|
1132
|
+
function Tt(t, e) {
|
|
1113
1133
|
return t == null && e == null ? 0 : t == null ? -1 : e == null || t > e ? 1 : t < e ? -1 : 0;
|
|
1114
1134
|
}
|
|
1115
|
-
function
|
|
1116
|
-
const i = o.find((l) => l.field === e.field)?.sortComparator ??
|
|
1135
|
+
function Pt(t, e, o) {
|
|
1136
|
+
const i = o.find((l) => l.field === e.field)?.sortComparator ?? Tt, { field: r, direction: s } = e;
|
|
1117
1137
|
return [...t].sort((l, a) => i(l[r], a[r], l, a) * s);
|
|
1118
1138
|
}
|
|
1119
|
-
function
|
|
1139
|
+
function Se(t, e, o, n) {
|
|
1120
1140
|
t._rows = e, t.__rowRenderEpoch++, t._rowPool.forEach((i) => i.__epoch = -1), ne(t), t.refreshVirtualWindow(!0), t.dispatchEvent(
|
|
1121
1141
|
new CustomEvent("sort-change", { detail: { field: o.field, direction: n } })
|
|
1122
1142
|
), t.requestStateChange?.();
|
|
1123
1143
|
}
|
|
1124
|
-
function
|
|
1125
|
-
!t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()),
|
|
1144
|
+
function Re(t, e) {
|
|
1145
|
+
!t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()), xe(t, e, 1)) : t._sortState.direction === 1 ? xe(t, e, -1) : (t._sortState = null, t.__rowRenderEpoch++, t._rowPool.forEach((n) => n.__epoch = -1), t._rows = t.__originalOrder.slice(), ne(t), t._headerRowEl?.querySelectorAll('[role="columnheader"].sortable')?.forEach((n) => {
|
|
1126
1146
|
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");
|
|
1127
1147
|
}), t.refreshVirtualWindow(!0), t.dispatchEvent(
|
|
1128
1148
|
new CustomEvent("sort-change", { detail: { field: e.field, direction: 0 } })
|
|
1129
1149
|
), t.requestStateChange?.());
|
|
1130
1150
|
}
|
|
1131
|
-
function
|
|
1151
|
+
function xe(t, e, o) {
|
|
1132
1152
|
t._sortState = { field: e.field, direction: o };
|
|
1133
|
-
const n = { field: e.field, direction: o }, i = t._columns, s = (t.effectiveConfig?.sortHandler ??
|
|
1153
|
+
const n = { field: e.field, direction: o }, i = t._columns, s = (t.effectiveConfig?.sortHandler ?? Pt)(t._rows, n, i);
|
|
1134
1154
|
s && typeof s.then == "function" ? s.then((l) => {
|
|
1135
|
-
|
|
1136
|
-
}) :
|
|
1155
|
+
Se(t, l, e, o);
|
|
1156
|
+
}) : Se(t, s, e, o);
|
|
1137
1157
|
}
|
|
1138
1158
|
function U(t, e) {
|
|
1139
1159
|
return t.effectiveConfig?.sortable !== !1 && e.sortable === !0;
|
|
@@ -1141,14 +1161,14 @@ function U(t, e) {
|
|
|
1141
1161
|
function K(t, e) {
|
|
1142
1162
|
return t.effectiveConfig?.resizable !== !1 && e.resizable !== !1;
|
|
1143
1163
|
}
|
|
1144
|
-
function
|
|
1164
|
+
function Lt(t, e) {
|
|
1145
1165
|
typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
|
|
1146
1166
|
}
|
|
1147
1167
|
function Q(t, e) {
|
|
1148
1168
|
const o = document.createElement("span");
|
|
1149
|
-
|
|
1169
|
+
ke(o, "sort-indicator");
|
|
1150
1170
|
const n = t._sortState?.field === e.field ? t._sortState.direction : 0, i = { ...k, ...t.icons }, r = n === 1 ? i.sortAsc : n === -1 ? i.sortDesc : i.sortNone;
|
|
1151
|
-
return
|
|
1171
|
+
return Lt(o, r), o;
|
|
1152
1172
|
}
|
|
1153
1173
|
function Z(t, e, o) {
|
|
1154
1174
|
const n = document.createElement("div");
|
|
@@ -1162,15 +1182,15 @@ function J(t, e, o, n) {
|
|
|
1162
1182
|
n.classList.add("sortable"), n.tabIndex = 0;
|
|
1163
1183
|
const i = t._sortState?.field === e.field ? t._sortState.direction : 0;
|
|
1164
1184
|
n.setAttribute("aria-sort", i === 0 ? "none" : i === 1 ? "ascending" : "descending"), n.addEventListener("click", (r) => {
|
|
1165
|
-
t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, o, n) ||
|
|
1185
|
+
t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, o, n) || Re(t, e);
|
|
1166
1186
|
}), n.addEventListener("keydown", (r) => {
|
|
1167
1187
|
if (r.key === "Enter" || r.key === " ") {
|
|
1168
1188
|
if (r.preventDefault(), t._dispatchHeaderClick?.(r, o, n)) return;
|
|
1169
|
-
|
|
1189
|
+
Re(t, e);
|
|
1170
1190
|
}
|
|
1171
1191
|
});
|
|
1172
1192
|
}
|
|
1173
|
-
function
|
|
1193
|
+
function Ht(t, e) {
|
|
1174
1194
|
if (e != null)
|
|
1175
1195
|
if (typeof e == "string") {
|
|
1176
1196
|
const o = document.createElement("span");
|
|
@@ -1183,7 +1203,7 @@ function ne(t) {
|
|
|
1183
1203
|
const e = t._headerRowEl;
|
|
1184
1204
|
e && (e.innerHTML = "", t._visibleColumns.forEach((o, n) => {
|
|
1185
1205
|
const i = document.createElement("div");
|
|
1186
|
-
i.className = "cell",
|
|
1206
|
+
i.className = "cell", ke(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));
|
|
1187
1207
|
const r = o.header ?? o.field, s = t._sortState?.field === o.field ? t._sortState.direction : 0, l = s === 1 ? "asc" : s === -1 ? "desc" : null;
|
|
1188
1208
|
if (o.headerRenderer) {
|
|
1189
1209
|
const a = {
|
|
@@ -1195,7 +1215,7 @@ function ne(t) {
|
|
|
1195
1215
|
renderSortIcon: () => U(t, o) ? Q(t, o) : null,
|
|
1196
1216
|
renderFilterButton: () => null
|
|
1197
1217
|
}, c = o.headerRenderer(a);
|
|
1198
|
-
|
|
1218
|
+
Ht(i, c), U(t, o) && J(t, o, n, i), K(t, o) && (i.classList.add("resizable"), i.appendChild(Z(t, n, i)));
|
|
1199
1219
|
} else if (o.headerLabelRenderer) {
|
|
1200
1220
|
const a = {
|
|
1201
1221
|
column: o,
|
|
@@ -1213,9 +1233,9 @@ function ne(t) {
|
|
|
1213
1233
|
o.getAttribute("aria-sort") || o.setAttribute("aria-sort", "none");
|
|
1214
1234
|
}), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex")));
|
|
1215
1235
|
}
|
|
1216
|
-
const
|
|
1217
|
-
function
|
|
1218
|
-
return
|
|
1236
|
+
const Ge = typeof requestIdleCallback == "function";
|
|
1237
|
+
function Dt(t, e) {
|
|
1238
|
+
return Ge ? requestIdleCallback(t, e) : window.setTimeout(() => {
|
|
1219
1239
|
const o = Date.now();
|
|
1220
1240
|
t({
|
|
1221
1241
|
didTimeout: !1,
|
|
@@ -1223,11 +1243,11 @@ function Lt(t, e) {
|
|
|
1223
1243
|
});
|
|
1224
1244
|
}, 1);
|
|
1225
1245
|
}
|
|
1226
|
-
function
|
|
1227
|
-
|
|
1246
|
+
function Ae(t) {
|
|
1247
|
+
Ge ? cancelIdleCallback(t) : clearTimeout(t);
|
|
1228
1248
|
}
|
|
1229
|
-
var
|
|
1230
|
-
class
|
|
1249
|
+
var T = ((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))(T || {});
|
|
1250
|
+
class Ot {
|
|
1231
1251
|
#l;
|
|
1232
1252
|
#i = 0;
|
|
1233
1253
|
#u = 0;
|
|
@@ -1308,31 +1328,31 @@ function Te(t) {
|
|
|
1308
1328
|
}
|
|
1309
1329
|
};
|
|
1310
1330
|
}
|
|
1311
|
-
const ae = "data-animating",
|
|
1331
|
+
const ae = "data-animating", Mt = {
|
|
1312
1332
|
change: "--tbw-row-change-duration",
|
|
1313
1333
|
insert: "--tbw-row-insert-duration",
|
|
1314
1334
|
remove: "--tbw-row-remove-duration"
|
|
1315
|
-
},
|
|
1335
|
+
}, zt = {
|
|
1316
1336
|
change: 500,
|
|
1317
1337
|
insert: 300,
|
|
1318
1338
|
remove: 200
|
|
1319
1339
|
};
|
|
1320
|
-
function
|
|
1340
|
+
function kt(t) {
|
|
1321
1341
|
const e = t.trim().toLowerCase();
|
|
1322
1342
|
return e.endsWith("ms") ? parseFloat(e) : e.endsWith("s") ? parseFloat(e) * 1e3 : parseFloat(e);
|
|
1323
1343
|
}
|
|
1324
|
-
function
|
|
1325
|
-
const o =
|
|
1344
|
+
function Nt(t, e) {
|
|
1345
|
+
const o = Mt[e], n = getComputedStyle(t).getPropertyValue(o);
|
|
1326
1346
|
if (n) {
|
|
1327
|
-
const i =
|
|
1347
|
+
const i = kt(n);
|
|
1328
1348
|
if (!isNaN(i) && i > 0)
|
|
1329
1349
|
return i;
|
|
1330
1350
|
}
|
|
1331
|
-
return
|
|
1351
|
+
return zt[e];
|
|
1332
1352
|
}
|
|
1333
|
-
function
|
|
1353
|
+
function It(t, e, o) {
|
|
1334
1354
|
t.removeAttribute(ae), t.offsetWidth, t.setAttribute(ae, e);
|
|
1335
|
-
const n =
|
|
1355
|
+
const n = Nt(t, e);
|
|
1336
1356
|
setTimeout(() => {
|
|
1337
1357
|
e !== "remove" && t.removeAttribute(ae);
|
|
1338
1358
|
}, n);
|
|
@@ -1341,15 +1361,15 @@ function ge(t, e, o) {
|
|
|
1341
1361
|
if (e < 0)
|
|
1342
1362
|
return !1;
|
|
1343
1363
|
const n = t.findRenderedRowElement?.(e);
|
|
1344
|
-
return n ? (
|
|
1364
|
+
return n ? (It(n, o), !0) : !1;
|
|
1345
1365
|
}
|
|
1346
|
-
function
|
|
1366
|
+
function qt(t, e, o) {
|
|
1347
1367
|
let n = 0;
|
|
1348
1368
|
for (const i of e)
|
|
1349
1369
|
ge(t, i, o) && n++;
|
|
1350
1370
|
return n;
|
|
1351
1371
|
}
|
|
1352
|
-
function
|
|
1372
|
+
function Wt(t, e, o) {
|
|
1353
1373
|
const n = t._rows ?? [], i = t.getRowId;
|
|
1354
1374
|
if (!i)
|
|
1355
1375
|
return !1;
|
|
@@ -1374,7 +1394,7 @@ function H(t, e) {
|
|
|
1374
1394
|
}
|
|
1375
1395
|
return o;
|
|
1376
1396
|
}
|
|
1377
|
-
function
|
|
1397
|
+
function Xe(t, e, o) {
|
|
1378
1398
|
const n = document.createElement("button");
|
|
1379
1399
|
if (t && (n.className = t), e)
|
|
1380
1400
|
for (const i in e) {
|
|
@@ -1383,8 +1403,8 @@ function Ge(t, e, o) {
|
|
|
1383
1403
|
}
|
|
1384
1404
|
return n;
|
|
1385
1405
|
}
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1406
|
+
const Ye = document.createElement("template");
|
|
1407
|
+
Ye.innerHTML = `
|
|
1388
1408
|
<div class="tbw-scroll-area">
|
|
1389
1409
|
<div class="rows-body-wrapper">
|
|
1390
1410
|
<div class="rows-body" role="grid">
|
|
@@ -1403,20 +1423,20 @@ Xe.innerHTML = `
|
|
|
1403
1423
|
<div class="faux-vscroll-spacer"></div>
|
|
1404
1424
|
</div>
|
|
1405
1425
|
`;
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1426
|
+
function je() {
|
|
1427
|
+
return Ye.content.cloneNode(!0);
|
|
1408
1428
|
}
|
|
1409
|
-
function
|
|
1429
|
+
function Pe(t) {
|
|
1410
1430
|
const e = document.createDocumentFragment(), o = H(t.hasShell ? "tbw-grid-root has-shell" : "tbw-grid-root");
|
|
1411
1431
|
if (t.hasShell && t.shellHeader && t.shellBody)
|
|
1412
1432
|
o.appendChild(t.shellHeader), o.appendChild(t.shellBody);
|
|
1413
1433
|
else {
|
|
1414
1434
|
const n = H("tbw-grid-content");
|
|
1415
|
-
n.appendChild(
|
|
1435
|
+
n.appendChild(je()), o.appendChild(n);
|
|
1416
1436
|
}
|
|
1417
1437
|
return e.appendChild(o), e;
|
|
1418
1438
|
}
|
|
1419
|
-
function
|
|
1439
|
+
function $t(t) {
|
|
1420
1440
|
const e = H("tbw-shell-header", { part: "shell-header", role: "presentation" });
|
|
1421
1441
|
if (t.title) {
|
|
1422
1442
|
const r = H("tbw-shell-title");
|
|
@@ -1434,7 +1454,7 @@ function qt(t) {
|
|
|
1434
1454
|
for (const r of t.apiButtons)
|
|
1435
1455
|
r.hasRender && n.appendChild(H("tbw-toolbar-content-slot", { "data-toolbar-content": r.id }));
|
|
1436
1456
|
if ((t.configButtons.some((r) => r.hasRender) || t.apiButtons.some((r) => r.hasRender)) && t.hasPanels && n.appendChild(H("tbw-toolbar-separator")), t.hasPanels) {
|
|
1437
|
-
const r =
|
|
1457
|
+
const r = Xe(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
|
|
1438
1458
|
"data-panel-toggle": "",
|
|
1439
1459
|
title: "Settings",
|
|
1440
1460
|
"aria-label": "Toggle settings panel",
|
|
@@ -1445,9 +1465,9 @@ function qt(t) {
|
|
|
1445
1465
|
}
|
|
1446
1466
|
return e.appendChild(n), e;
|
|
1447
1467
|
}
|
|
1448
|
-
function
|
|
1468
|
+
function Ft(t) {
|
|
1449
1469
|
const e = H("tbw-shell-body"), o = t.panels.length > 0, n = t.panels.length === 1, i = H("tbw-grid-content");
|
|
1450
|
-
i.appendChild(
|
|
1470
|
+
i.appendChild(je());
|
|
1451
1471
|
let r = null;
|
|
1452
1472
|
if (o) {
|
|
1453
1473
|
r = ee("aside", {
|
|
@@ -1467,7 +1487,7 @@ function Wt(t) {
|
|
|
1467
1487
|
);
|
|
1468
1488
|
const l = H("tbw-tool-panel-content", { role: "presentation" }), a = H("tbw-accordion");
|
|
1469
1489
|
for (const c of t.panels) {
|
|
1470
|
-
const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = H(h, { "data-section": c.id }), p =
|
|
1490
|
+
const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${n ? " single" : ""}`, u = H(h, { "data-section": c.id }), p = Xe("tbw-accordion-header", {
|
|
1471
1491
|
"aria-expanded": String(c.isExpanded),
|
|
1472
1492
|
"aria-controls": `tbw-section-${c.id}`
|
|
1473
1493
|
});
|
|
@@ -1494,7 +1514,7 @@ function Wt(t) {
|
|
|
1494
1514
|
function N(t) {
|
|
1495
1515
|
return t ? typeof t == "string" ? t : t.outerHTML : "";
|
|
1496
1516
|
}
|
|
1497
|
-
function
|
|
1517
|
+
function Ut() {
|
|
1498
1518
|
return {
|
|
1499
1519
|
toolPanels: /* @__PURE__ */ new Map(),
|
|
1500
1520
|
headerContents: /* @__PURE__ */ new Map(),
|
|
@@ -1513,10 +1533,10 @@ function $t() {
|
|
|
1513
1533
|
lightDomContentMoved: !1
|
|
1514
1534
|
};
|
|
1515
1535
|
}
|
|
1516
|
-
function
|
|
1536
|
+
function Ke(t) {
|
|
1517
1537
|
return !!(t?.header?.title || t?.header?.toolbarContents?.length || t?.toolPanels?.length || t?.headerContents?.length || t?.header?.lightDomContent?.length || t?.header?.hasToolButtonsContainer);
|
|
1518
1538
|
}
|
|
1519
|
-
function
|
|
1539
|
+
function Le(t, e, o = "☰") {
|
|
1520
1540
|
const n = t?.header?.title ?? e.lightDomTitle ?? "", i = !!n, r = N(o), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], a = new Set(s.map((d) => d.id)), c = [...s];
|
|
1521
1541
|
for (const d of l)
|
|
1522
1542
|
a.has(d.id) || c.push(d);
|
|
@@ -1530,7 +1550,7 @@ function Pe(t, e, o = "☰") {
|
|
|
1530
1550
|
}
|
|
1531
1551
|
return `
|
|
1532
1552
|
<div class="tbw-shell-header" part="shell-header" role="presentation">
|
|
1533
|
-
${i ? `<div class="tbw-shell-title">${
|
|
1553
|
+
${i ? `<div class="tbw-shell-title">${st(n)}</div>` : ""}
|
|
1534
1554
|
<div class="tbw-shell-content" part="shell-content" role="presentation" data-light-dom-header-content></div>
|
|
1535
1555
|
<div class="tbw-shell-toolbar" part="shell-toolbar" role="presentation">
|
|
1536
1556
|
${g}
|
|
@@ -1605,7 +1625,7 @@ function W(t, e, o) {
|
|
|
1605
1625
|
e.toolPanels.set(s, g), e.lightDomToolPanelIds.add(s), r.style.display = "none";
|
|
1606
1626
|
});
|
|
1607
1627
|
}
|
|
1608
|
-
function
|
|
1628
|
+
function Vt(t, e, o, n) {
|
|
1609
1629
|
const i = t.querySelector(".tbw-shell-toolbar");
|
|
1610
1630
|
i && i.addEventListener("click", (s) => {
|
|
1611
1631
|
if (s.target.closest("[data-panel-toggle]")) {
|
|
@@ -1622,7 +1642,7 @@ function Ft(t, e, o, n) {
|
|
|
1622
1642
|
}
|
|
1623
1643
|
});
|
|
1624
1644
|
}
|
|
1625
|
-
function
|
|
1645
|
+
function Bt(t, e, o) {
|
|
1626
1646
|
const n = t.querySelector(".tbw-tool-panel"), i = t.querySelector("[data-resize-handle]"), r = t.querySelector(".tbw-shell-body");
|
|
1627
1647
|
if (!n || !i || !r)
|
|
1628
1648
|
return () => {
|
|
@@ -1646,7 +1666,7 @@ function Ut(t, e, o) {
|
|
|
1646
1666
|
i.removeEventListener("mousedown", g), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f);
|
|
1647
1667
|
};
|
|
1648
1668
|
}
|
|
1649
|
-
function
|
|
1669
|
+
function He(t, e, o) {
|
|
1650
1670
|
const n = e?.header?.toolbarContents ?? [], i = [...o.toolbarContents.values()], r = new Set(n.map((l) => l.id)), s = [...n];
|
|
1651
1671
|
for (const l of i)
|
|
1652
1672
|
r.has(l.id) || s.push(l);
|
|
@@ -1678,7 +1698,7 @@ function he(t, e) {
|
|
|
1678
1698
|
c && e.headerContentCleanups.set(s.id, c);
|
|
1679
1699
|
}
|
|
1680
1700
|
}
|
|
1681
|
-
function
|
|
1701
|
+
function Gt(t, e, o) {
|
|
1682
1702
|
if (!e.isPanelOpen) return;
|
|
1683
1703
|
const n = N(o?.expand ?? k.expand), i = N(o?.collapse ?? k.collapse);
|
|
1684
1704
|
for (const [r, s] of e.toolPanels) {
|
|
@@ -1699,7 +1719,7 @@ function Vt(t, e, o) {
|
|
|
1699
1719
|
}
|
|
1700
1720
|
}
|
|
1701
1721
|
}
|
|
1702
|
-
function
|
|
1722
|
+
function De(t, e) {
|
|
1703
1723
|
const o = t.querySelector("[data-panel-toggle]");
|
|
1704
1724
|
o && (o.classList.toggle("active", e.isPanelOpen), o.setAttribute("aria-pressed", String(e.isPanelOpen)));
|
|
1705
1725
|
}
|
|
@@ -1707,7 +1727,7 @@ function Oe(t, e) {
|
|
|
1707
1727
|
const o = t.querySelector(".tbw-tool-panel");
|
|
1708
1728
|
o && (o.classList.toggle("open", e.isPanelOpen), e.isPanelOpen || (o.style.width = ""));
|
|
1709
1729
|
}
|
|
1710
|
-
function
|
|
1730
|
+
function Xt(t) {
|
|
1711
1731
|
for (const e of t.headerContentCleanups.values())
|
|
1712
1732
|
e();
|
|
1713
1733
|
t.headerContentCleanups.clear();
|
|
@@ -1724,7 +1744,7 @@ function Bt(t) {
|
|
|
1724
1744
|
t.toolPanels.get(e)?.onClose?.();
|
|
1725
1745
|
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;
|
|
1726
1746
|
}
|
|
1727
|
-
function
|
|
1747
|
+
function Yt(t, e) {
|
|
1728
1748
|
let o = !1;
|
|
1729
1749
|
const n = {
|
|
1730
1750
|
get isInitialized() {
|
|
@@ -1753,7 +1773,7 @@ function Gt(t, e) {
|
|
|
1753
1773
|
s && t.expandedSections.add(s.id);
|
|
1754
1774
|
}
|
|
1755
1775
|
const i = e.getShadow();
|
|
1756
|
-
|
|
1776
|
+
De(i, t), Oe(i, t), Gt(i, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: n.expandedSections });
|
|
1757
1777
|
},
|
|
1758
1778
|
closeToolPanel() {
|
|
1759
1779
|
if (!t.isPanelOpen) return;
|
|
@@ -1764,7 +1784,7 @@ function Gt(t, e) {
|
|
|
1764
1784
|
r.onClose?.();
|
|
1765
1785
|
t.isPanelOpen = !1;
|
|
1766
1786
|
const i = e.getShadow();
|
|
1767
|
-
|
|
1787
|
+
De(i, t), Oe(i, t), e.emit("tool-panel-close", {});
|
|
1768
1788
|
},
|
|
1769
1789
|
toggleToolPanel() {
|
|
1770
1790
|
t.isPanelOpen ? n.closeToolPanel() : n.openToolPanel();
|
|
@@ -1789,7 +1809,7 @@ function Gt(t, e) {
|
|
|
1789
1809
|
const u = s.querySelector(`[data-section="${a}"] .tbw-accordion-content`);
|
|
1790
1810
|
u && (u.innerHTML = "");
|
|
1791
1811
|
}
|
|
1792
|
-
t.expandedSections.add(i), ce(s, i, !0),
|
|
1812
|
+
t.expandedSections.add(i), ce(s, i, !0), jt(s, t, i);
|
|
1793
1813
|
}
|
|
1794
1814
|
e.emit("tool-panel-section-toggle", { id: i, expanded: !l });
|
|
1795
1815
|
},
|
|
@@ -1847,7 +1867,7 @@ function ce(t, e, o) {
|
|
|
1847
1867
|
const n = t.querySelector(`[data-section="${e}"]`);
|
|
1848
1868
|
n && n.classList.toggle("expanded", o);
|
|
1849
1869
|
}
|
|
1850
|
-
function
|
|
1870
|
+
function jt(t, e, o) {
|
|
1851
1871
|
const n = e.toolPanels.get(o);
|
|
1852
1872
|
if (!n?.render) return;
|
|
1853
1873
|
const i = t.querySelector(`[data-section="${o}"] .tbw-accordion-content`);
|
|
@@ -1855,8 +1875,8 @@ function Xt(t, e, o) {
|
|
|
1855
1875
|
const r = n.render(i);
|
|
1856
1876
|
r && e.panelCleanups.set(o, r);
|
|
1857
1877
|
}
|
|
1858
|
-
function
|
|
1859
|
-
const i =
|
|
1878
|
+
function Kt(t, e, o, n) {
|
|
1879
|
+
const i = Ke(e), r = [], s = [
|
|
1860
1880
|
"tbw-grid-header",
|
|
1861
1881
|
"tbw-grid-tool-buttons",
|
|
1862
1882
|
"tbw-grid-tool-panel",
|
|
@@ -1892,19 +1912,19 @@ function Yt(t, e, o, n) {
|
|
|
1892
1912
|
icon: N(C.icon),
|
|
1893
1913
|
isExpanded: o.expandedSections.has(C.id)
|
|
1894
1914
|
}))
|
|
1895
|
-
}, w =
|
|
1915
|
+
}, w = $t(g), b = Ft(d), S = Pe({
|
|
1896
1916
|
hasShell: !0,
|
|
1897
1917
|
shellHeader: w,
|
|
1898
1918
|
shellBody: b
|
|
1899
1919
|
});
|
|
1900
1920
|
t.appendChild(S);
|
|
1901
1921
|
} else {
|
|
1902
|
-
const l =
|
|
1922
|
+
const l = Pe({ hasShell: !1 });
|
|
1903
1923
|
t.appendChild(l);
|
|
1904
1924
|
}
|
|
1905
1925
|
return i;
|
|
1906
1926
|
}
|
|
1907
|
-
function
|
|
1927
|
+
function Qt() {
|
|
1908
1928
|
return {
|
|
1909
1929
|
startY: null,
|
|
1910
1930
|
startX: null,
|
|
@@ -1918,19 +1938,19 @@ function jt() {
|
|
|
1918
1938
|
momentumRaf: 0
|
|
1919
1939
|
};
|
|
1920
1940
|
}
|
|
1921
|
-
function
|
|
1941
|
+
function Zt(t) {
|
|
1922
1942
|
t.startY = null, t.startX = null, t.scrollTop = null, t.scrollLeft = null, t.lastY = null, t.lastX = null, t.lastTime = null;
|
|
1923
1943
|
}
|
|
1924
|
-
function
|
|
1944
|
+
function Qe(t) {
|
|
1925
1945
|
t.momentumRaf && (cancelAnimationFrame(t.momentumRaf), t.momentumRaf = 0);
|
|
1926
1946
|
}
|
|
1927
|
-
function
|
|
1947
|
+
function Jt(t, e, o) {
|
|
1928
1948
|
if (t.touches.length !== 1) return;
|
|
1929
|
-
|
|
1949
|
+
Qe(e);
|
|
1930
1950
|
const n = t.touches[0];
|
|
1931
1951
|
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;
|
|
1932
1952
|
}
|
|
1933
|
-
function
|
|
1953
|
+
function eo(t, e, o) {
|
|
1934
1954
|
if (t.touches.length !== 1 || e.startY === null || e.startX === null || e.scrollTop === null || e.scrollLeft === null)
|
|
1935
1955
|
return !1;
|
|
1936
1956
|
const n = t.touches[0], i = n.clientY, r = n.clientX, s = performance.now(), l = e.startY - i, a = e.startX - r;
|
|
@@ -1947,10 +1967,10 @@ function Zt(t, e, o) {
|
|
|
1947
1967
|
}
|
|
1948
1968
|
return f && (o.fauxScrollbar.scrollTop = e.scrollTop + l), g && o.scrollArea && (o.scrollArea.scrollLeft = e.scrollLeft + a), f || g;
|
|
1949
1969
|
}
|
|
1950
|
-
function
|
|
1951
|
-
(Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) &&
|
|
1970
|
+
function to(t, e) {
|
|
1971
|
+
(Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && oo(t, e), Zt(t);
|
|
1952
1972
|
}
|
|
1953
|
-
function
|
|
1973
|
+
function oo(t, e) {
|
|
1954
1974
|
const i = () => {
|
|
1955
1975
|
t.velocityY *= 0.95, t.velocityX *= 0.95;
|
|
1956
1976
|
const r = t.velocityY * 16, s = t.velocityX * 16;
|
|
@@ -1958,19 +1978,19 @@ function eo(t, e) {
|
|
|
1958
1978
|
};
|
|
1959
1979
|
t.momentumRaf = requestAnimationFrame(i);
|
|
1960
1980
|
}
|
|
1961
|
-
function
|
|
1962
|
-
t.addEventListener("touchstart", (i) =>
|
|
1981
|
+
function no(t, e, o, n) {
|
|
1982
|
+
t.addEventListener("touchstart", (i) => Jt(i, e, o), {
|
|
1963
1983
|
passive: !0,
|
|
1964
1984
|
signal: n
|
|
1965
1985
|
}), t.addEventListener(
|
|
1966
1986
|
"touchmove",
|
|
1967
1987
|
(i) => {
|
|
1968
|
-
|
|
1988
|
+
eo(i, e, o) && i.preventDefault();
|
|
1969
1989
|
},
|
|
1970
1990
|
{ passive: !1, signal: n }
|
|
1971
|
-
), t.addEventListener("touchend", () =>
|
|
1991
|
+
), t.addEventListener("touchend", () => to(e, o), { passive: !0, signal: n });
|
|
1972
1992
|
}
|
|
1973
|
-
const
|
|
1993
|
+
const io = [
|
|
1974
1994
|
{
|
|
1975
1995
|
property: "editable",
|
|
1976
1996
|
pluginName: "editing",
|
|
@@ -2006,9 +2026,9 @@ const oo = [
|
|
|
2006
2026
|
level: "column",
|
|
2007
2027
|
description: 'the "sticky" column property',
|
|
2008
2028
|
importHint: "import { PinnedColumnsPlugin } from '@toolbox-web/grid/plugins/pinned-columns';",
|
|
2009
|
-
isUsed: (t) => t === "left" || t === "right"
|
|
2029
|
+
isUsed: (t) => t === "left" || t === "right" || t === "start" || t === "end"
|
|
2010
2030
|
}
|
|
2011
|
-
],
|
|
2031
|
+
], ro = [
|
|
2012
2032
|
{
|
|
2013
2033
|
property: "columnGroups",
|
|
2014
2034
|
pluginName: "groupingColumns",
|
|
@@ -2017,7 +2037,7 @@ const oo = [
|
|
|
2017
2037
|
importHint: "import { GroupingColumnsPlugin } from '@toolbox-web/grid/plugins/grouping-columns';",
|
|
2018
2038
|
isUsed: (t) => Array.isArray(t) && t.length > 0
|
|
2019
2039
|
}
|
|
2020
|
-
],
|
|
2040
|
+
], so = {
|
|
2021
2041
|
editing: "import { EditingPlugin } from '@toolbox-web/grid/plugins/editing';",
|
|
2022
2042
|
selection: "import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';",
|
|
2023
2043
|
reorder: "import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';",
|
|
@@ -2039,9 +2059,9 @@ const oo = [
|
|
|
2039
2059
|
columnVirtualization: "import { ColumnVirtualizationPlugin } from '@toolbox-web/grid/plugins/column-virtualization';"
|
|
2040
2060
|
};
|
|
2041
2061
|
function ue(t) {
|
|
2042
|
-
return
|
|
2062
|
+
return so[t] ?? `import { ${O(t)}Plugin } from '@toolbox-web/grid/plugins/${t}';`;
|
|
2043
2063
|
}
|
|
2044
|
-
function
|
|
2064
|
+
function Ze() {
|
|
2045
2065
|
if (typeof window < "u" && window.location) {
|
|
2046
2066
|
const t = window.location.hostname;
|
|
2047
2067
|
if (t === "localhost" || t === "127.0.0.1" || t === "::1")
|
|
@@ -2049,14 +2069,14 @@ function Qe() {
|
|
|
2049
2069
|
}
|
|
2050
2070
|
return typeof process < "u" && process.env?.NODE_ENV !== "production";
|
|
2051
2071
|
}
|
|
2052
|
-
function
|
|
2072
|
+
function O(t) {
|
|
2053
2073
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2054
2074
|
}
|
|
2055
|
-
function
|
|
2075
|
+
function Me(t, e) {
|
|
2056
2076
|
return t.some((o) => o.name === e);
|
|
2057
2077
|
}
|
|
2058
|
-
function
|
|
2059
|
-
const o =
|
|
2078
|
+
function lo(t, e) {
|
|
2079
|
+
const o = io, n = ro, i = /* @__PURE__ */ new Map();
|
|
2060
2080
|
function r(l, a, c, h, u = !1) {
|
|
2061
2081
|
i.has(l) || i.set(l, { description: a, importHint: c, fields: [], isConfigProperty: u });
|
|
2062
2082
|
const p = i.get(l);
|
|
@@ -2064,14 +2084,14 @@ function ro(t, e) {
|
|
|
2064
2084
|
}
|
|
2065
2085
|
for (const l of n) {
|
|
2066
2086
|
const a = t[l.property];
|
|
2067
|
-
(l.isUsed ? l.isUsed(a) : a !== void 0) && !
|
|
2087
|
+
(l.isUsed ? l.isUsed(a) : a !== void 0) && !Me(e, l.pluginName) && r(l.pluginName, l.description, l.importHint ?? ue(l.pluginName), l.property, !0);
|
|
2068
2088
|
}
|
|
2069
2089
|
const s = t.columns;
|
|
2070
2090
|
if (s && s.length > 0)
|
|
2071
2091
|
for (const l of s)
|
|
2072
2092
|
for (const a of o) {
|
|
2073
2093
|
const c = l[a.property];
|
|
2074
|
-
if ((a.isUsed ? a.isUsed(c) : c !== void 0) && !
|
|
2094
|
+
if ((a.isUsed ? a.isUsed(c) : c !== void 0) && !Me(e, a.pluginName)) {
|
|
2075
2095
|
const u = l.field || "<unknown>";
|
|
2076
2096
|
r(a.pluginName, a.description, a.importHint ?? ue(a.pluginName), u);
|
|
2077
2097
|
}
|
|
@@ -2106,7 +2126,7 @@ This validation helps catch misconfigurations early. The properties listed above
|
|
|
2106
2126
|
);
|
|
2107
2127
|
}
|
|
2108
2128
|
}
|
|
2109
|
-
function
|
|
2129
|
+
function ao(t) {
|
|
2110
2130
|
const e = [], o = [];
|
|
2111
2131
|
for (const n of t) {
|
|
2112
2132
|
const r = n.constructor.manifest;
|
|
@@ -2114,12 +2134,12 @@ function so(t) {
|
|
|
2114
2134
|
for (const s of r.configRules) {
|
|
2115
2135
|
const l = n.config;
|
|
2116
2136
|
if (s.check(l)) {
|
|
2117
|
-
const c = `${`[tbw-grid:${
|
|
2137
|
+
const c = `${`[tbw-grid:${O(n.name)}Plugin]`} Configuration warning: ${s.message}`;
|
|
2118
2138
|
s.severity === "error" ? e.push(c) : o.push(c);
|
|
2119
2139
|
}
|
|
2120
2140
|
}
|
|
2121
2141
|
}
|
|
2122
|
-
if (o.length > 0 &&
|
|
2142
|
+
if (o.length > 0 && Ze())
|
|
2123
2143
|
for (const n of o)
|
|
2124
2144
|
console.warn(n);
|
|
2125
2145
|
if (e.length > 0)
|
|
@@ -2129,30 +2149,30 @@ ${e.join(`
|
|
|
2129
2149
|
|
|
2130
2150
|
`)}`);
|
|
2131
2151
|
}
|
|
2132
|
-
function
|
|
2152
|
+
function co(t, e) {
|
|
2133
2153
|
const o = t.name, i = t.constructor.dependencies ?? [];
|
|
2134
2154
|
for (const r of i) {
|
|
2135
2155
|
const s = r.name, l = r.required ?? !0, a = r.reason;
|
|
2136
2156
|
if (!e.some((h) => h.name === s)) {
|
|
2137
|
-
const h = a ?? `${
|
|
2157
|
+
const h = a ?? `${O(o)}Plugin requires ${O(s)}Plugin`, u = ue(s);
|
|
2138
2158
|
if (l)
|
|
2139
2159
|
throw new Error(
|
|
2140
2160
|
`[tbw-grid] Plugin dependency error:
|
|
2141
2161
|
|
|
2142
2162
|
${h}.
|
|
2143
2163
|
|
|
2144
|
-
→ Add the plugin to your gridConfig.plugins array BEFORE ${
|
|
2164
|
+
→ Add the plugin to your gridConfig.plugins array BEFORE ${O(o)}Plugin:
|
|
2145
2165
|
${u}
|
|
2146
|
-
plugins: [new ${
|
|
2166
|
+
plugins: [new ${O(s)}Plugin(), new ${O(o)}Plugin()]`
|
|
2147
2167
|
);
|
|
2148
2168
|
console.info(
|
|
2149
|
-
`[tbw-grid] ${
|
|
2169
|
+
`[tbw-grid] ${O(o)}Plugin: Optional "${s}" plugin not found. Some features may be unavailable.`
|
|
2150
2170
|
);
|
|
2151
2171
|
}
|
|
2152
2172
|
}
|
|
2153
2173
|
}
|
|
2154
|
-
function
|
|
2155
|
-
if (!
|
|
2174
|
+
function ho(t) {
|
|
2175
|
+
if (!Ze()) return;
|
|
2156
2176
|
const e = new Set(t.map((n) => n.name)), o = /* @__PURE__ */ new Set();
|
|
2157
2177
|
for (const n of t) {
|
|
2158
2178
|
const r = n.constructor.manifest;
|
|
@@ -2164,7 +2184,7 @@ function ao(t) {
|
|
|
2164
2184
|
o.add(l), console.warn(
|
|
2165
2185
|
`[tbw-grid] Plugin incompatibility warning:
|
|
2166
2186
|
|
|
2167
|
-
${
|
|
2187
|
+
${O(n.name)}Plugin and ${O(s.name)}Plugin are both loaded, but they are currently incompatible.
|
|
2168
2188
|
|
|
2169
2189
|
→ ${s.reason}
|
|
2170
2190
|
|
|
@@ -2174,7 +2194,7 @@ ${D(n.name)}Plugin and ${D(s.name)}Plugin are both loaded, but they are currentl
|
|
|
2174
2194
|
}
|
|
2175
2195
|
}
|
|
2176
2196
|
}
|
|
2177
|
-
class
|
|
2197
|
+
class uo {
|
|
2178
2198
|
constructor(e) {
|
|
2179
2199
|
this.grid = e;
|
|
2180
2200
|
}
|
|
@@ -2193,7 +2213,7 @@ class co {
|
|
|
2193
2213
|
this.attach(o);
|
|
2194
2214
|
}
|
|
2195
2215
|
attach(e) {
|
|
2196
|
-
if (
|
|
2216
|
+
if (co(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
|
|
2197
2217
|
for (const [o, n] of Object.entries(e.cellRenderers))
|
|
2198
2218
|
this.cellRenderers.set(o, n);
|
|
2199
2219
|
if (e.headerRenderers)
|
|
@@ -2436,7 +2456,7 @@ class co {
|
|
|
2436
2456
|
}
|
|
2437
2457
|
class L extends HTMLElement {
|
|
2438
2458
|
static tagName = "tbw-grid";
|
|
2439
|
-
static version = "1.
|
|
2459
|
+
static version = "1.9.0";
|
|
2440
2460
|
static #l = 0;
|
|
2441
2461
|
static adapters = [];
|
|
2442
2462
|
static registerAdapter(e) {
|
|
@@ -2474,7 +2494,7 @@ class L extends HTMLElement {
|
|
|
2474
2494
|
#r = null;
|
|
2475
2495
|
#b = !1;
|
|
2476
2496
|
#R;
|
|
2477
|
-
#H =
|
|
2497
|
+
#H = Qt();
|
|
2478
2498
|
#w;
|
|
2479
2499
|
#C;
|
|
2480
2500
|
#y;
|
|
@@ -2489,16 +2509,16 @@ class L extends HTMLElement {
|
|
|
2489
2509
|
};
|
|
2490
2510
|
#o;
|
|
2491
2511
|
#_;
|
|
2492
|
-
#
|
|
2493
|
-
#O;
|
|
2512
|
+
#M = !1;
|
|
2494
2513
|
#D;
|
|
2514
|
+
#O;
|
|
2495
2515
|
#t;
|
|
2496
|
-
#e =
|
|
2516
|
+
#e = Ut();
|
|
2497
2517
|
#c;
|
|
2498
|
-
#
|
|
2518
|
+
#z;
|
|
2499
2519
|
#k = !1;
|
|
2500
2520
|
#x = /* @__PURE__ */ new Set();
|
|
2501
|
-
#
|
|
2521
|
+
#A = /* @__PURE__ */ new Map();
|
|
2502
2522
|
#N;
|
|
2503
2523
|
#E = /* @__PURE__ */ new Map();
|
|
2504
2524
|
_rows = [];
|
|
@@ -2584,32 +2604,32 @@ class L extends HTMLElement {
|
|
|
2584
2604
|
}
|
|
2585
2605
|
set loading(e) {
|
|
2586
2606
|
const o = this.#k;
|
|
2587
|
-
this.#k = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), o !== e && this.#
|
|
2607
|
+
this.#k = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), o !== e && this.#De();
|
|
2588
2608
|
}
|
|
2589
2609
|
setRowLoading(e, o) {
|
|
2590
2610
|
const n = this.#x.has(e);
|
|
2591
2611
|
o ? this.#x.add(e) : this.#x.delete(e), n !== o && this.#he(e, o);
|
|
2592
2612
|
}
|
|
2593
2613
|
setCellLoading(e, o, n) {
|
|
2594
|
-
let i = this.#
|
|
2614
|
+
let i = this.#A.get(e);
|
|
2595
2615
|
const r = i?.has(o) ?? !1;
|
|
2596
|
-
n ? (i || (i = /* @__PURE__ */ new Set(), this.#
|
|
2616
|
+
n ? (i || (i = /* @__PURE__ */ new Set(), this.#A.set(e, i)), i.add(o)) : (i?.delete(o), i?.size === 0 && this.#A.delete(e)), r !== n && this.#ue(e, o, n);
|
|
2597
2617
|
}
|
|
2598
2618
|
isRowLoading(e) {
|
|
2599
2619
|
return this.#x.has(e);
|
|
2600
2620
|
}
|
|
2601
2621
|
isCellLoading(e, o) {
|
|
2602
|
-
return this.#
|
|
2622
|
+
return this.#A.get(e)?.has(o) ?? !1;
|
|
2603
2623
|
}
|
|
2604
2624
|
clearAllLoading() {
|
|
2605
2625
|
this.loading = !1;
|
|
2606
2626
|
for (const e of this.#x)
|
|
2607
2627
|
this.#he(e, !1);
|
|
2608
2628
|
this.#x.clear();
|
|
2609
|
-
for (const [e, o] of this.#
|
|
2629
|
+
for (const [e, o] of this.#A)
|
|
2610
2630
|
for (const n of o)
|
|
2611
2631
|
this.#ue(e, n, !1);
|
|
2612
|
-
this.#
|
|
2632
|
+
this.#A.clear();
|
|
2613
2633
|
}
|
|
2614
2634
|
get effectiveConfig() {
|
|
2615
2635
|
return this.#n;
|
|
@@ -2618,12 +2638,12 @@ class L extends HTMLElement {
|
|
|
2618
2638
|
return this.#w || (this.#w = new AbortController()), this.#w.signal;
|
|
2619
2639
|
}
|
|
2620
2640
|
constructor() {
|
|
2621
|
-
super(), this.#we(), this.#d = new Promise((e) => this.#h = e), this.#s = new
|
|
2641
|
+
super(), this.#we(), this.#d = new Promise((e) => this.#h = e), this.#s = new Ot({
|
|
2622
2642
|
mergeConfig: () => {
|
|
2623
|
-
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(),
|
|
2643
|
+
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), lo(this.#n, this.#o?.getPlugins() ?? []), ao(this.#o?.getPlugins() ?? []), ho(this.#o?.getPlugins() ?? []), this.#Pe(), this.#F = [...this._columns];
|
|
2624
2644
|
},
|
|
2625
2645
|
processColumns: () => this.#xe(),
|
|
2626
|
-
processRows: () => this.#
|
|
2646
|
+
processRows: () => this.#Ae(),
|
|
2627
2647
|
renderHeader: () => ne(this),
|
|
2628
2648
|
updateTemplate: () => B(this),
|
|
2629
2649
|
renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
|
|
@@ -2631,7 +2651,7 @@ class L extends HTMLElement {
|
|
|
2631
2651
|
this.#o?.afterRender(), this.#n.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, ve(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, $(this)), this._virtualization.enabled && !this.#W && this.#me();
|
|
2632
2652
|
},
|
|
2633
2653
|
isConnected: () => this.isConnected && this.#f
|
|
2634
|
-
}), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c =
|
|
2654
|
+
}), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = Yt(this.#e, {
|
|
2635
2655
|
getShadow: () => this.#i,
|
|
2636
2656
|
getShellConfig: () => this.#n?.shell,
|
|
2637
2657
|
getAccordionIcons: () => ({
|
|
@@ -2640,14 +2660,14 @@ class L extends HTMLElement {
|
|
|
2640
2660
|
}),
|
|
2641
2661
|
emit: (e, o) => this.#P(e, o),
|
|
2642
2662
|
refreshShellHeader: () => this.refreshShellHeader()
|
|
2643
|
-
}), this.#t = new
|
|
2663
|
+
}), this.#t = new gt({
|
|
2644
2664
|
getRows: () => this.#a,
|
|
2645
2665
|
getSortState: () => this._sortState,
|
|
2646
2666
|
setSortState: (e) => {
|
|
2647
2667
|
this._sortState = e;
|
|
2648
2668
|
},
|
|
2649
2669
|
onConfigChange: () => {
|
|
2650
|
-
this.#s.requestPhase(
|
|
2670
|
+
this.#s.requestPhase(T.FULL, "configChange");
|
|
2651
2671
|
},
|
|
2652
2672
|
emit: (e, o) => this.#P(e, o),
|
|
2653
2673
|
clearRowPool: () => {
|
|
@@ -2656,12 +2676,12 @@ class L extends HTMLElement {
|
|
|
2656
2676
|
setup: () => this.#L(),
|
|
2657
2677
|
renderHeader: () => ne(this),
|
|
2658
2678
|
updateTemplate: () => B(this),
|
|
2659
|
-
refreshVirtualWindow: () => this.#s.requestPhase(
|
|
2679
|
+
refreshVirtualWindow: () => this.#s.requestPhase(T.VIRTUALIZATION, "configManager"),
|
|
2660
2680
|
getVirtualization: () => this._virtualization,
|
|
2661
2681
|
setRowHeight: (e) => {
|
|
2662
2682
|
this._virtualization.rowHeight = e;
|
|
2663
2683
|
},
|
|
2664
|
-
applyAnimationConfig: (e) => this.#
|
|
2684
|
+
applyAnimationConfig: (e) => this.#Te(e),
|
|
2665
2685
|
getShellLightDomTitle: () => this.#e.lightDomTitle,
|
|
2666
2686
|
getShellToolPanels: () => this.#e.toolPanels,
|
|
2667
2687
|
getShellHeaderContents: () => this.#e.headerContents,
|
|
@@ -2722,19 +2742,19 @@ ${o}`;
|
|
|
2722
2742
|
return this.#o?.getPluginByName(e);
|
|
2723
2743
|
}
|
|
2724
2744
|
requestRender() {
|
|
2725
|
-
this.#s.requestPhase(
|
|
2745
|
+
this.#s.requestPhase(T.ROWS, "plugin:requestRender");
|
|
2726
2746
|
}
|
|
2727
2747
|
requestRenderWithFocus() {
|
|
2728
|
-
this._restoreFocusAfterRender = !0, this.#s.requestPhase(
|
|
2748
|
+
this._restoreFocusAfterRender = !0, this.#s.requestPhase(T.ROWS, "plugin:requestRenderWithFocus");
|
|
2729
2749
|
}
|
|
2730
2750
|
updateTemplate() {
|
|
2731
2751
|
B(this);
|
|
2732
2752
|
}
|
|
2733
2753
|
requestAfterRender() {
|
|
2734
|
-
this.#s.requestPhase(
|
|
2754
|
+
this.#s.requestPhase(T.STYLE, "plugin:requestAfterRender");
|
|
2735
2755
|
}
|
|
2736
2756
|
#J() {
|
|
2737
|
-
this.#o = new
|
|
2757
|
+
this.#o = new uo(this);
|
|
2738
2758
|
const e = this.#n?.plugins, o = Array.isArray(e) ? e : [];
|
|
2739
2759
|
this.#o.attachAll(o);
|
|
2740
2760
|
}
|
|
@@ -2779,7 +2799,7 @@ ${o}`;
|
|
|
2779
2799
|
for (const { content: n } of o)
|
|
2780
2800
|
this.#e.headerContents.has(n.id) || this.#e.headerContents.set(n.id, n);
|
|
2781
2801
|
}
|
|
2782
|
-
#
|
|
2802
|
+
#T() {
|
|
2783
2803
|
const e = L.getAdapters();
|
|
2784
2804
|
if (e.length === 0 && !this.__frameworkAdapter) return;
|
|
2785
2805
|
const o = this.__frameworkAdapter;
|
|
@@ -2796,9 +2816,9 @@ ${o}`;
|
|
|
2796
2816
|
};
|
|
2797
2817
|
}
|
|
2798
2818
|
connectedCallback() {
|
|
2799
|
-
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", L.version), this.id || (this.id = `tbw-grid-${++L.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#w && (this.#w.abort(), this.#
|
|
2819
|
+
this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", L.version), this.id || (this.id = `tbw-grid-${++L.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#w && (this.#w.abort(), this.#M = !1), this.#w = new AbortController(), this.#p && (Ae(this.#p), this.#p = void 0), I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.parseLightDomColumns(this), this.#t.merge(), this.#J();
|
|
2800
2820
|
const e = this.#n?.plugins;
|
|
2801
|
-
this.#_ = Array.isArray(e) ? e : [], this.#te(), this.#u || (this.#K(), this.#q(), this.#u = !0), this.#oe(), this.#p =
|
|
2821
|
+
this.#_ = Array.isArray(e) ? e : [], this.#te(), this.#u || (this.#K(), this.#q(), this.#u = !0), this.#oe(), this.#p = Dt(
|
|
2802
2822
|
() => {
|
|
2803
2823
|
this.#ke();
|
|
2804
2824
|
},
|
|
@@ -2806,7 +2826,7 @@ ${o}`;
|
|
|
2806
2826
|
);
|
|
2807
2827
|
}
|
|
2808
2828
|
disconnectedCallback() {
|
|
2809
|
-
this.#p && (
|
|
2829
|
+
this.#p && (Ae(this.#p), this.#p = void 0), this.#be(), Xt(this.#e), this.#c.setInitialized(!1), this.#z?.(), this.#z = void 0, Qe(this.#H), this.#w && (this.#w.abort(), this.#w = void 0), this.#D?.abort(), this.#D = void 0, this.#M = !1, this._resizeController && this._resizeController.dispose(), this.#C && (this.#C.disconnect(), this.#C = void 0), this.#y && (this.#y.disconnect(), this.#y = void 0, this.#W = !1), j(this), this.#S.clear(), this.#_ = void 0;
|
|
2810
2830
|
for (const e of this._rowPool)
|
|
2811
2831
|
e.remove();
|
|
2812
2832
|
this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
|
|
@@ -2830,17 +2850,17 @@ ${o}`;
|
|
|
2830
2850
|
#oe() {
|
|
2831
2851
|
const o = this.#i.querySelector(".tbw-grid-content") ?? this.#i.querySelector(".tbw-grid-root");
|
|
2832
2852
|
if (this._headerRowEl = o?.querySelector(".header-row"), this._virtualization.totalHeightEl = o?.querySelector(".faux-vscroll-spacer"), this._virtualization.viewportEl = o?.querySelector(".rows-viewport"), this._bodyEl = o?.querySelector(".rows"), this.__rowsBodyEl = o?.querySelector(".rows-body"), this.#c.isInitialized) {
|
|
2833
|
-
he(this.#i, this.#e),
|
|
2853
|
+
he(this.#i, this.#e), He(this.#i, this.#n?.shell, this.#e);
|
|
2834
2854
|
const r = this.#n?.shell?.toolPanel?.defaultOpen;
|
|
2835
2855
|
r && this.#e.toolPanels.has(r) && (this.openToolPanel(), this.#e.expandedSections.add(r));
|
|
2836
2856
|
}
|
|
2837
|
-
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Te(this), this.#L(), this.#ie(o), this.#
|
|
2857
|
+
if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Te(this), this.#L(), this.#ie(o), this.#M)
|
|
2838
2858
|
return;
|
|
2839
|
-
this.#
|
|
2859
|
+
this.#M = !0;
|
|
2840
2860
|
const n = this.disconnectSignal;
|
|
2841
|
-
|
|
2861
|
+
At(this, this, this.#i, n);
|
|
2842
2862
|
const i = this.#n.rowHeight;
|
|
2843
|
-
i && i > 0 ? this._virtualization.rowHeight = i : requestAnimationFrame(() => this.#ne()), queueMicrotask(() => this.#ve()), this.#s.requestPhase(
|
|
2863
|
+
i && i > 0 ? this._virtualization.rowHeight = i : requestAnimationFrame(() => this.#ne()), queueMicrotask(() => this.#ve()), this.#s.requestPhase(T.FULL, "afterConnect");
|
|
2844
2864
|
}
|
|
2845
2865
|
#ne() {
|
|
2846
2866
|
if (this.#o.hasExtraHeight())
|
|
@@ -2854,11 +2874,11 @@ ${o}`;
|
|
|
2854
2874
|
l > n && (n = l);
|
|
2855
2875
|
});
|
|
2856
2876
|
const i = e.getBoundingClientRect(), r = Math.max(i.height, n);
|
|
2857
|
-
r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(
|
|
2877
|
+
r > 0 && Math.abs(r - this._virtualization.rowHeight) > 1 && (this._virtualization.rowHeight = r, this.#s.requestPhase(T.VIRTUALIZATION, "measureRowHeight"));
|
|
2858
2878
|
}
|
|
2859
2879
|
#ie(e) {
|
|
2860
|
-
this.#
|
|
2861
|
-
const o = this.#
|
|
2880
|
+
this.#D?.abort(), this.#D = new AbortController();
|
|
2881
|
+
const o = this.#D.signal, n = e?.querySelector(".faux-vscroll"), i = e?.querySelector(".rows");
|
|
2862
2882
|
if (this._virtualization.container = n ?? this, this.#b = this.#o?.getAll().some((r) => r.onScroll) ?? !1, n && i) {
|
|
2863
2883
|
n.addEventListener(
|
|
2864
2884
|
"scroll",
|
|
@@ -2872,7 +2892,7 @@ ${o}`;
|
|
|
2872
2892
|
i.style.transform = `translateY(${u}px)`;
|
|
2873
2893
|
}
|
|
2874
2894
|
this.#r = l, this.#v || (this.#v = requestAnimationFrame(() => {
|
|
2875
|
-
this.#v = 0, this.#r !== null && (this.#
|
|
2895
|
+
this.#v = 0, this.#r !== null && (this.#Oe(this.#r), this.#r = null);
|
|
2876
2896
|
}));
|
|
2877
2897
|
},
|
|
2878
2898
|
{ passive: !0, signal: o }
|
|
@@ -2891,10 +2911,10 @@ ${o}`;
|
|
|
2891
2911
|
}
|
|
2892
2912
|
},
|
|
2893
2913
|
{ passive: !1, signal: o }
|
|
2894
|
-
),
|
|
2914
|
+
), no(r, this.#H, { fauxScrollbar: n, scrollArea: s }, o));
|
|
2895
2915
|
}
|
|
2896
|
-
this._bodyEl &&
|
|
2897
|
-
this.#s.requestPhase(
|
|
2916
|
+
this._bodyEl && xt(this, this._bodyEl, o), this.#C?.disconnect(), this._virtualization.viewportEl && (this.#C = new ResizeObserver(() => {
|
|
2917
|
+
this.#s.requestPhase(T.VIRTUALIZATION, "resize-observer");
|
|
2898
2918
|
}), this.#C.observe(this._virtualization.viewportEl)), this.#i.addEventListener(
|
|
2899
2919
|
"focusin",
|
|
2900
2920
|
() => {
|
|
@@ -2950,7 +2970,7 @@ ${o}`;
|
|
|
2950
2970
|
e.columns && this.#_e(), e.rows && this.#re(), e.fitMode && this.#Ee();
|
|
2951
2971
|
}
|
|
2952
2972
|
#re() {
|
|
2953
|
-
this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#B(), this.#s.requestPhase(
|
|
2973
|
+
this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#B(), this.#s.requestPhase(T.ROWS, "applyRowsUpdate");
|
|
2954
2974
|
}
|
|
2955
2975
|
#B() {
|
|
2956
2976
|
this.#E.clear();
|
|
@@ -2986,13 +3006,13 @@ ${o}`;
|
|
|
2986
3006
|
#Se() {
|
|
2987
3007
|
I(this, this.#e), q(this, this.#e);
|
|
2988
3008
|
const e = !!this.#i.querySelector(".has-shell"), o = !!this.#i.querySelector(".tbw-tool-panel"), n = this.#i.querySelectorAll(".tbw-accordion-section").length;
|
|
2989
|
-
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), W(this, this.#e, this.#
|
|
2990
|
-
const i =
|
|
3009
|
+
this.#t.parseLightDomColumns(this), this.#t.merge(), this.#ee(), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge();
|
|
3010
|
+
const i = Ke(this.#n?.shell), r = (this.#n?.shell?.toolPanels?.length ?? 0) > 0, s = (this.#n?.shell?.toolPanels?.length ?? 0) !== n;
|
|
2991
3011
|
if (e !== i || !e && i || !o && r || o && s) {
|
|
2992
3012
|
this.#K(), this.#q(), this.#oe(), this.#B();
|
|
2993
3013
|
return;
|
|
2994
3014
|
}
|
|
2995
|
-
e && this.#Re(), this.#B(), this.#s.requestPhase(
|
|
3015
|
+
e && this.#Re(), this.#B(), this.#s.requestPhase(T.COLUMNS, "applyGridConfigUpdate");
|
|
2996
3016
|
}
|
|
2997
3017
|
#Re() {
|
|
2998
3018
|
const e = this.#i.querySelector(".tbw-shell-header");
|
|
@@ -3012,21 +3032,21 @@ ${o}`;
|
|
|
3012
3032
|
this._columns = [...e];
|
|
3013
3033
|
}
|
|
3014
3034
|
}
|
|
3015
|
-
#
|
|
3035
|
+
#Ae() {
|
|
3016
3036
|
j(this);
|
|
3017
3037
|
const e = Array.isArray(this.#a) ? [...this.#a] : [], o = this.#o?.processRows(e) ?? e;
|
|
3018
3038
|
this._rows = o;
|
|
3019
3039
|
}
|
|
3020
|
-
#
|
|
3040
|
+
#Te(e) {
|
|
3021
3041
|
const o = {
|
|
3022
|
-
...
|
|
3042
|
+
...Je,
|
|
3023
3043
|
...e.animation
|
|
3024
3044
|
}, n = o.mode ?? "reduced-motion";
|
|
3025
3045
|
let i = 1;
|
|
3026
3046
|
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;
|
|
3027
3047
|
}
|
|
3028
3048
|
#G(e, o, n = this.__rowRenderEpoch) {
|
|
3029
|
-
this.#R || (this.#R = (i, r, s) => this.#o?.renderRow(i, r, s) ?? !1),
|
|
3049
|
+
this.#R || (this.#R = (i, r, s) => this.#o?.renderRow(i, r, s) ?? !1), Ct(this, e, o, n, this.#R);
|
|
3030
3050
|
}
|
|
3031
3051
|
#X = -1;
|
|
3032
3052
|
#le = -1;
|
|
@@ -3061,7 +3081,7 @@ ${o}`;
|
|
|
3061
3081
|
}
|
|
3062
3082
|
return this.#Le(e);
|
|
3063
3083
|
}
|
|
3064
|
-
#
|
|
3084
|
+
#De() {
|
|
3065
3085
|
const e = this.querySelector(".tbw-grid-root");
|
|
3066
3086
|
if (e)
|
|
3067
3087
|
if (this.#k) {
|
|
@@ -3091,16 +3111,16 @@ ${o}`;
|
|
|
3091
3111
|
}
|
|
3092
3112
|
#L() {
|
|
3093
3113
|
if (this.isConnected && !(!this._headerRowEl || !this._bodyEl)) {
|
|
3094
|
-
if (this.#t.parseLightDomColumns(this), this.#
|
|
3095
|
-
const e = this.#
|
|
3096
|
-
this.#
|
|
3114
|
+
if (this.#t.parseLightDomColumns(this), this.#O) {
|
|
3115
|
+
const e = this.#O;
|
|
3116
|
+
this.#O = void 0, this.#t.merge();
|
|
3097
3117
|
const o = this.#o?.getAll() ?? [];
|
|
3098
3118
|
this.#t.applyState(e, o);
|
|
3099
3119
|
}
|
|
3100
|
-
this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), this.#s.requestPhase(
|
|
3120
|
+
this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), this.#s.requestPhase(T.FULL, "setup");
|
|
3101
3121
|
}
|
|
3102
3122
|
}
|
|
3103
|
-
#
|
|
3123
|
+
#Oe(e) {
|
|
3104
3124
|
if (this.refreshVirtualWindow(!1), this.#o?.onScrollRender(), this.#b) {
|
|
3105
3125
|
const o = this._virtualization.container, n = this.#pe;
|
|
3106
3126
|
n.scrollTop = e, n.scrollLeft = o?.scrollLeft ?? 0, n.scrollHeight = o?.scrollHeight ?? 0, n.scrollWidth = o?.scrollWidth ?? 0, n.clientHeight = o?.clientHeight ?? 0, n.clientWidth = o?.clientWidth ?? 0, this.#o?.onScroll(n);
|
|
@@ -3205,7 +3225,7 @@ ${o}`;
|
|
|
3205
3225
|
return this.#d;
|
|
3206
3226
|
}
|
|
3207
3227
|
async forceLayout() {
|
|
3208
|
-
return this.#s.requestPhase(
|
|
3228
|
+
return this.#s.requestPhase(T.FULL, "forceLayout"), this.#s.whenReady();
|
|
3209
3229
|
}
|
|
3210
3230
|
async getConfig() {
|
|
3211
3231
|
return Object.freeze({ ...this.#n || {} });
|
|
@@ -3238,7 +3258,7 @@ ${o}`;
|
|
|
3238
3258
|
changes: o,
|
|
3239
3259
|
source: n
|
|
3240
3260
|
});
|
|
3241
|
-
l.length > 0 && this.#s.requestPhase(
|
|
3261
|
+
l.length > 0 && this.#s.requestPhase(T.ROWS, "updateRow");
|
|
3242
3262
|
}
|
|
3243
3263
|
updateRows(e, o = "api") {
|
|
3244
3264
|
let n = !1;
|
|
@@ -3263,16 +3283,16 @@ ${o}`;
|
|
|
3263
3283
|
}));
|
|
3264
3284
|
}
|
|
3265
3285
|
}
|
|
3266
|
-
n && this.#s.requestPhase(
|
|
3286
|
+
n && this.#s.requestPhase(T.ROWS, "updateRows");
|
|
3267
3287
|
}
|
|
3268
3288
|
animateRow(e, o) {
|
|
3269
3289
|
ge(this, e, o);
|
|
3270
3290
|
}
|
|
3271
3291
|
animateRows(e, o) {
|
|
3272
|
-
|
|
3292
|
+
qt(this, e, o);
|
|
3273
3293
|
}
|
|
3274
3294
|
animateRowById(e, o) {
|
|
3275
|
-
return
|
|
3295
|
+
return Wt(this, e, o);
|
|
3276
3296
|
}
|
|
3277
3297
|
setColumnVisible(e, o) {
|
|
3278
3298
|
const n = this.#t.setColumnVisible(e, o);
|
|
@@ -3302,12 +3322,12 @@ ${o}`;
|
|
|
3302
3322
|
return this.#t.collectState(e);
|
|
3303
3323
|
}
|
|
3304
3324
|
set columnState(e) {
|
|
3305
|
-
e && (this.#
|
|
3325
|
+
e && (this.#O = e, this.#t.initialColumnState = e, this.#u && this.#Me(e));
|
|
3306
3326
|
}
|
|
3307
3327
|
get columnState() {
|
|
3308
3328
|
return this.getColumnState();
|
|
3309
3329
|
}
|
|
3310
|
-
#
|
|
3330
|
+
#Me(e) {
|
|
3311
3331
|
const o = this.#o?.getAll() ?? [];
|
|
3312
3332
|
this.#t.applyState(e, o), this.#L();
|
|
3313
3333
|
}
|
|
@@ -3316,7 +3336,7 @@ ${o}`;
|
|
|
3316
3336
|
this.#t.requestStateChange(e);
|
|
3317
3337
|
}
|
|
3318
3338
|
resetColumnState() {
|
|
3319
|
-
this.#
|
|
3339
|
+
this.#O = void 0, this.__originalOrder = [];
|
|
3320
3340
|
const e = this.#o?.getAll() ?? [];
|
|
3321
3341
|
this.#t.resetState(e), this.#t.merge(), this.#L();
|
|
3322
3342
|
}
|
|
@@ -3368,17 +3388,17 @@ ${o}`;
|
|
|
3368
3388
|
#Y = !1;
|
|
3369
3389
|
refreshShellHeader() {
|
|
3370
3390
|
this.#Y || (this.#Y = !0, queueMicrotask(() => {
|
|
3371
|
-
this.#Y = !1, this.isConnected && (I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#
|
|
3391
|
+
this.#Y = !1, this.isConnected && (I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge(), this.#K(), this.#q(), this.#ze());
|
|
3372
3392
|
}));
|
|
3373
3393
|
}
|
|
3374
|
-
#
|
|
3394
|
+
#ze() {
|
|
3375
3395
|
const o = this.#i.querySelector(".tbw-grid-content") ?? this.#i.querySelector(".tbw-grid-root");
|
|
3376
3396
|
if (this._headerRowEl = o?.querySelector(".header-row"), this._virtualization.totalHeightEl = o?.querySelector(".faux-vscroll-spacer"), this._virtualization.viewportEl = o?.querySelector(".rows-viewport"), this._bodyEl = o?.querySelector(".rows"), this.__rowsBodyEl = o?.querySelector(".rows-body"), this.#c.isInitialized) {
|
|
3377
|
-
he(this.#i, this.#e),
|
|
3397
|
+
he(this.#i, this.#e), He(this.#i, this.#n?.shell, this.#e);
|
|
3378
3398
|
const n = this.#n?.shell?.toolPanel?.defaultOpen;
|
|
3379
3399
|
n && this.#e.toolPanels.has(n) && (this.openToolPanel(), this.#e.expandedSections.add(n));
|
|
3380
3400
|
}
|
|
3381
|
-
this._resizeController = Te(this), this.#ie(o), this.#s.requestPhase(
|
|
3401
|
+
this._resizeController = Te(this), this.#ie(o), this.#s.requestPhase(T.COLUMNS, "shellRefresh");
|
|
3382
3402
|
}
|
|
3383
3403
|
#S = /* @__PURE__ */ new Map();
|
|
3384
3404
|
registerStyles(e, o) {
|
|
@@ -3400,13 +3420,13 @@ ${o}`;
|
|
|
3400
3420
|
#ke() {
|
|
3401
3421
|
const e = () => {
|
|
3402
3422
|
const n = this.#e.lightDomTitle, i = this.#e.hasToolButtonsContainer;
|
|
3403
|
-
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#
|
|
3423
|
+
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T());
|
|
3404
3424
|
const r = this.#e.lightDomTitle, s = this.#e.hasToolButtonsContainer;
|
|
3405
3425
|
if (r && !n || s && !i) {
|
|
3406
3426
|
this.#t.markSourcesChanged(), this.#t.merge();
|
|
3407
3427
|
const l = this.#i.querySelector(".tbw-shell-header");
|
|
3408
3428
|
if (l) {
|
|
3409
|
-
const a =
|
|
3429
|
+
const a = Le(
|
|
3410
3430
|
this.#n.shell,
|
|
3411
3431
|
this.#e,
|
|
3412
3432
|
this.#n.icons?.toolPanel
|
|
@@ -3424,13 +3444,13 @@ ${o}`;
|
|
|
3424
3444
|
refreshColumns() {
|
|
3425
3445
|
this.__lightDomColumnsCache = void 0, j(this), this.#t.parseLightDomColumns(this);
|
|
3426
3446
|
const e = this.#e.lightDomTitle, o = this.#e.hasToolButtonsContainer;
|
|
3427
|
-
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#
|
|
3447
|
+
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T());
|
|
3428
3448
|
const n = this.#e.lightDomTitle, i = this.#e.hasToolButtonsContainer;
|
|
3429
3449
|
if (n && !e || i && !o) {
|
|
3430
3450
|
this.#t.markSourcesChanged(), this.#t.merge();
|
|
3431
3451
|
const s = this.#i.querySelector(".tbw-shell-header");
|
|
3432
3452
|
if (s) {
|
|
3433
|
-
const l =
|
|
3453
|
+
const l = Le(
|
|
3434
3454
|
this.#n.shell,
|
|
3435
3455
|
this.#e,
|
|
3436
3456
|
this.#n.icons?.toolPanel
|
|
@@ -3440,7 +3460,7 @@ ${o}`;
|
|
|
3440
3460
|
c && (s.replaceWith(c), this.#Q());
|
|
3441
3461
|
}
|
|
3442
3462
|
}
|
|
3443
|
-
this.#s.requestPhase(
|
|
3463
|
+
this.#s.requestPhase(T.COLUMNS, "refreshColumns");
|
|
3444
3464
|
}
|
|
3445
3465
|
#j(e) {
|
|
3446
3466
|
const o = this._virtualization.rowHeight, n = this._virtualization.container ?? this, i = this._virtualization.viewportEl ?? n, r = n.clientHeight, s = i.clientHeight, a = this.shadowRoot?.querySelector(".tbw-scroll-area"), c = a ? a.clientHeight : r, u = c - s, p = this.#o?.getExtraHeight() ?? 0, f = Math.max(0, r - c);
|
|
@@ -3471,7 +3491,7 @@ ${o}`;
|
|
|
3471
3491
|
const f = Math.ceil(s / l) + 3;
|
|
3472
3492
|
let g = c + f;
|
|
3473
3493
|
if (g > n && (g = n), this._virtualization.start = c, this._virtualization.end = g, i.clientHeight === 0 && s > 0) {
|
|
3474
|
-
this.#s.requestPhase(
|
|
3494
|
+
this.#s.requestPhase(T.VIRTUALIZATION, "stale-refs-retry");
|
|
3475
3495
|
return;
|
|
3476
3496
|
}
|
|
3477
3497
|
const w = this.#j(n);
|
|
@@ -3480,14 +3500,14 @@ ${o}`;
|
|
|
3480
3500
|
this._bodyEl.style.transform = `translateY(${S}px)`, this.#G(c, g, e ? ++this.__rowRenderEpoch : this.__rowRenderEpoch), this.#ae(n, this._visibleColumns.length), e && !o && (this.#o?.afterRender(), queueMicrotask(() => {
|
|
3481
3501
|
const C = i.clientHeight, _ = r.clientHeight;
|
|
3482
3502
|
if (C === 0 && _ > 0) return;
|
|
3483
|
-
const
|
|
3484
|
-
this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${
|
|
3503
|
+
const A = this.#j(n);
|
|
3504
|
+
this._virtualization.totalHeightEl && (this._virtualization.totalHeightEl.style.height = `${A}px`);
|
|
3485
3505
|
}));
|
|
3486
3506
|
}
|
|
3487
3507
|
#K() {
|
|
3488
|
-
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#
|
|
3508
|
+
I(this, this.#e), q(this, this.#e), W(this, this.#e, this.#T()), this.#t.markSourcesChanged(), this.#t.merge();
|
|
3489
3509
|
const e = this.#n?.shell;
|
|
3490
|
-
|
|
3510
|
+
Kt(
|
|
3491
3511
|
this.#i,
|
|
3492
3512
|
e,
|
|
3493
3513
|
{ isPanelOpen: this.#e.isPanelOpen, expandedSections: this.#e.expandedSections },
|
|
@@ -3495,24 +3515,24 @@ ${o}`;
|
|
|
3495
3515
|
) && (this.#Q(), this.#c.setInitialized(!0));
|
|
3496
3516
|
}
|
|
3497
3517
|
#Q() {
|
|
3498
|
-
|
|
3518
|
+
Vt(this.#i, this.#n?.shell, this.#e, {
|
|
3499
3519
|
onPanelToggle: () => this.toggleToolPanel(),
|
|
3500
3520
|
onSectionToggle: (e) => this.toggleToolPanelSection(e)
|
|
3501
|
-
}), this.#
|
|
3521
|
+
}), this.#z?.(), this.#z = Bt(this.#i, this.#n?.shell, (e) => {
|
|
3502
3522
|
this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
|
|
3503
3523
|
});
|
|
3504
3524
|
}
|
|
3505
3525
|
}
|
|
3506
3526
|
customElements.get(L.tagName) || customElements.define(L.tagName, L);
|
|
3507
3527
|
globalThis.DataGridElement = L;
|
|
3508
|
-
const
|
|
3528
|
+
const go = {
|
|
3509
3529
|
CAN_MOVE_COLUMN: "canMoveColumn",
|
|
3510
3530
|
GET_CONTEXT_MENU_ITEMS: "getContextMenuItems"
|
|
3511
3531
|
};
|
|
3512
|
-
class
|
|
3532
|
+
class wo {
|
|
3513
3533
|
static dependencies;
|
|
3514
3534
|
static manifest;
|
|
3515
|
-
version = "1.
|
|
3535
|
+
version = "1.9.0";
|
|
3516
3536
|
styles;
|
|
3517
3537
|
cellRenderers;
|
|
3518
3538
|
headerRenderers;
|
|
@@ -3648,7 +3668,7 @@ const P = {
|
|
|
3648
3668
|
GROUP_KEY: "data-group-key",
|
|
3649
3669
|
TREE_LEVEL: "data-tree-level",
|
|
3650
3670
|
STICKY: "data-sticky"
|
|
3651
|
-
},
|
|
3671
|
+
}, bo = {
|
|
3652
3672
|
ROOT: `.${P.ROOT}`,
|
|
3653
3673
|
HEADER: `.${P.HEADER}`,
|
|
3654
3674
|
HEADER_ROW: `.${P.HEADER_ROW}`,
|
|
@@ -3663,7 +3683,7 @@ const P = {
|
|
|
3663
3683
|
CELL_AT: (t, e) => `.${P.DATA_ROW}[${te.ROW_INDEX}="${t}"] .${P.DATA_CELL}[${te.COL_INDEX}="${e}"]`,
|
|
3664
3684
|
SELECTED_ROWS: `.${P.DATA_ROW}.${P.SELECTED}`,
|
|
3665
3685
|
EDITING_CELL: `.${P.DATA_CELL}.${P.EDITING}`
|
|
3666
|
-
},
|
|
3686
|
+
}, mo = {
|
|
3667
3687
|
COLOR_BG: "--tbw-color-bg",
|
|
3668
3688
|
COLOR_FG: "--tbw-color-fg",
|
|
3669
3689
|
COLOR_FG_MUTED: "--tbw-color-fg-muted",
|
|
@@ -3682,14 +3702,14 @@ const P = {
|
|
|
3682
3702
|
BORDER_RADIUS: "--tbw-border-radius",
|
|
3683
3703
|
FOCUS_OUTLINE: "--tbw-focus-outline"
|
|
3684
3704
|
};
|
|
3685
|
-
function
|
|
3705
|
+
function vo(t) {
|
|
3686
3706
|
const e = document.createElement("tbw-grid");
|
|
3687
3707
|
return t && (e.gridConfig = t), e;
|
|
3688
3708
|
}
|
|
3689
|
-
function
|
|
3709
|
+
function Co(t, e = document) {
|
|
3690
3710
|
return e.querySelector(t);
|
|
3691
3711
|
}
|
|
3692
|
-
const
|
|
3712
|
+
const yo = {
|
|
3693
3713
|
CELL_CHANGE: "cell-change",
|
|
3694
3714
|
CELL_COMMIT: "cell-commit",
|
|
3695
3715
|
ROW_COMMIT: "row-commit",
|
|
@@ -3702,7 +3722,7 @@ const mo = {
|
|
|
3702
3722
|
CELL_ACTIVATE: "cell-activate",
|
|
3703
3723
|
GROUP_TOGGLE: "group-toggle",
|
|
3704
3724
|
COLUMN_STATE_CHANGE: "column-state-change"
|
|
3705
|
-
},
|
|
3725
|
+
}, _o = {
|
|
3706
3726
|
SELECTION_CHANGE: "selection-change",
|
|
3707
3727
|
TREE_EXPAND: "tree-expand",
|
|
3708
3728
|
FILTER_CHANGE: "filter-change",
|
|
@@ -3731,7 +3751,7 @@ const mo = {
|
|
|
3731
3751
|
max: (t, e) => Math.max(...t.map((o) => Number(o[e]) || -1 / 0)),
|
|
3732
3752
|
first: (t, e) => t[0]?.[e],
|
|
3733
3753
|
last: (t, e) => t[t.length - 1]?.[e]
|
|
3734
|
-
}, V = /* @__PURE__ */ new Map(),
|
|
3754
|
+
}, V = /* @__PURE__ */ new Map(), M = {
|
|
3735
3755
|
register(t, e) {
|
|
3736
3756
|
V.set(t, e);
|
|
3737
3757
|
},
|
|
@@ -3761,46 +3781,48 @@ const mo = {
|
|
|
3761
3781
|
first: (t) => t[0] ?? 0,
|
|
3762
3782
|
last: (t) => t[t.length - 1] ?? 0
|
|
3763
3783
|
};
|
|
3764
|
-
function
|
|
3784
|
+
function fo(t) {
|
|
3765
3785
|
return ze[t] ?? ze.sum;
|
|
3766
3786
|
}
|
|
3767
|
-
function
|
|
3768
|
-
return
|
|
3787
|
+
function Eo(t, e) {
|
|
3788
|
+
return fo(t)(e);
|
|
3769
3789
|
}
|
|
3770
|
-
const
|
|
3790
|
+
const So = M.register.bind(M), Ro = M.unregister.bind(M), xo = M.get.bind(M), Ao = M.run.bind(M), To = M.list.bind(M);
|
|
3771
3791
|
export {
|
|
3772
|
-
|
|
3773
|
-
|
|
3792
|
+
wo as BaseGridPlugin,
|
|
3793
|
+
Je as DEFAULT_ANIMATION_CONFIG,
|
|
3774
3794
|
k as DEFAULT_GRID_ICONS,
|
|
3775
|
-
|
|
3795
|
+
yo as DGEvents,
|
|
3776
3796
|
L as DataGridElement,
|
|
3777
3797
|
X as FitModeEnum,
|
|
3778
|
-
|
|
3798
|
+
mo as GridCSSVars,
|
|
3779
3799
|
P as GridClasses,
|
|
3780
3800
|
te as GridDataAttrs,
|
|
3781
3801
|
L as GridElement,
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3802
|
+
bo as GridSelectors,
|
|
3803
|
+
go as PLUGIN_QUERIES,
|
|
3804
|
+
_o as PluginEvents,
|
|
3805
|
+
uo as PluginManager,
|
|
3806
|
+
T as RenderPhase,
|
|
3807
|
+
It as a,
|
|
3808
|
+
M as aggregatorRegistry,
|
|
3789
3809
|
$ as b,
|
|
3790
|
-
|
|
3810
|
+
Pt as builtInSort,
|
|
3791
3811
|
fe as c,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3812
|
+
vo as createGrid,
|
|
3813
|
+
We as d,
|
|
3814
|
+
Tt as defaultComparator,
|
|
3815
|
+
Ne as e,
|
|
3816
|
+
bt as g,
|
|
3817
|
+
xo as getAggregator,
|
|
3818
|
+
fo as getValueAggregator,
|
|
3819
|
+
To as listAggregators,
|
|
3820
|
+
Co as queryGrid,
|
|
3821
|
+
po as r,
|
|
3822
|
+
So as registerAggregator,
|
|
3823
|
+
Ao as runAggregator,
|
|
3824
|
+
Eo as runValueAggregator,
|
|
3803
3825
|
F as s,
|
|
3804
|
-
|
|
3826
|
+
Ro as unregisterAggregator
|
|
3805
3827
|
};
|
|
3806
3828
|
//# sourceMappingURL=index.js.map
|