@vaadin/grid 24.8.4 → 25.0.0-alpha10
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/README.md +0 -36
- package/package.json +14 -14
- package/src/array-data-provider.js +6 -0
- package/src/lit/column-renderer-directives.d.ts +0 -1
- package/src/styles/vaadin-grid-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-base-styles.js +510 -0
- package/src/styles/vaadin-grid-core-styles.d.ts +8 -0
- package/src/{vaadin-grid-styles.js → styles/vaadin-grid-core-styles.js} +2 -3
- package/src/styles/vaadin-grid-filter-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-filter-base-styles.js +18 -0
- package/src/styles/vaadin-grid-filter-core-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-filter-core-styles.js +18 -0
- package/src/styles/vaadin-grid-sorter-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-sorter-base-styles.js +63 -0
- package/src/styles/vaadin-grid-sorter-core-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-sorter-core-styles.js +61 -0
- package/src/styles/vaadin-grid-tree-toggle-base-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-tree-toggle-base-styles.js +76 -0
- package/src/styles/vaadin-grid-tree-toggle-core-styles.d.ts +8 -0
- package/src/styles/vaadin-grid-tree-toggle-core-styles.js +78 -0
- package/src/vaadin-grid-column-auto-width-mixin.js +8 -2
- package/src/vaadin-grid-column-group.js +3 -3
- package/src/vaadin-grid-column-mixin.js +0 -8
- package/src/vaadin-grid-column.js +3 -2
- package/src/vaadin-grid-data-provider-mixin.js +19 -76
- package/src/vaadin-grid-drag-and-drop-mixin.js +3 -0
- package/src/vaadin-grid-filter-element-mixin.d.ts +1 -2
- package/src/vaadin-grid-filter-element-mixin.js +1 -21
- package/src/vaadin-grid-filter.js +14 -6
- package/src/vaadin-grid-mixin.js +50 -31
- package/src/vaadin-grid-row-details-mixin.js +4 -4
- package/src/vaadin-grid-scroll-mixin.js +20 -4
- package/src/vaadin-grid-sorter-mixin.js +0 -60
- package/src/vaadin-grid-sorter.js +17 -9
- package/src/vaadin-grid-tree-toggle-mixin.js +0 -77
- package/src/vaadin-grid-tree-toggle.js +13 -3
- package/src/vaadin-grid.d.ts +0 -2
- package/src/vaadin-grid.js +29 -19
- package/theme/lumo/vaadin-grid-styles.js +1 -1
- package/web-types.json +4 -4
- package/web-types.lit.json +4 -4
- package/src/lit-all-imports.js +0 -14
- package/src/vaadin-lit-grid-column-group.js +0 -28
- package/src/vaadin-lit-grid-column.js +0 -30
- package/src/vaadin-lit-grid-filter-column.js +0 -28
- package/src/vaadin-lit-grid-filter.js +0 -35
- package/src/vaadin-lit-grid-selection-column.js +0 -28
- package/src/vaadin-lit-grid-sort-column.js +0 -28
- package/src/vaadin-lit-grid-sorter.js +0 -42
- package/src/vaadin-lit-grid-tree-column.js +0 -28
- package/src/vaadin-lit-grid-tree-toggle.js +0 -39
- package/src/vaadin-lit-grid.js +0 -78
- package/theme/lumo/lit-all-imports.d.ts +0 -11
- package/theme/lumo/lit-all-imports.js +0 -11
- package/theme/lumo/vaadin-lit-grid-column-group.d.ts +0 -1
- package/theme/lumo/vaadin-lit-grid-column-group.js +0 -1
- package/theme/lumo/vaadin-lit-grid-column.d.ts +0 -1
- package/theme/lumo/vaadin-lit-grid-column.js +0 -1
- package/theme/lumo/vaadin-lit-grid-filter-column.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-filter-column.js +0 -2
- package/theme/lumo/vaadin-lit-grid-filter.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-filter.js +0 -2
- package/theme/lumo/vaadin-lit-grid-selection-column.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-selection-column.js +0 -2
- package/theme/lumo/vaadin-lit-grid-sort-column.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-sort-column.js +0 -2
- package/theme/lumo/vaadin-lit-grid-sorter.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-sorter.js +0 -2
- package/theme/lumo/vaadin-lit-grid-tree-column.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-tree-column.js +0 -2
- package/theme/lumo/vaadin-lit-grid-tree-toggle.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid-tree-toggle.js +0 -2
- package/theme/lumo/vaadin-lit-grid.d.ts +0 -2
- package/theme/lumo/vaadin-lit-grid.js +0 -2
- package/theme/material/all-imports.d.ts +0 -11
- package/theme/material/all-imports.js +0 -11
- package/theme/material/lit-all-imports.d.ts +0 -11
- package/theme/material/lit-all-imports.js +0 -11
- package/theme/material/vaadin-grid-column-group.d.ts +0 -1
- package/theme/material/vaadin-grid-column-group.js +0 -1
- package/theme/material/vaadin-grid-column.d.ts +0 -1
- package/theme/material/vaadin-grid-column.js +0 -1
- package/theme/material/vaadin-grid-filter-column.d.ts +0 -2
- package/theme/material/vaadin-grid-filter-column.js +0 -2
- package/theme/material/vaadin-grid-filter.d.ts +0 -2
- package/theme/material/vaadin-grid-filter.js +0 -2
- package/theme/material/vaadin-grid-selection-column.d.ts +0 -2
- package/theme/material/vaadin-grid-selection-column.js +0 -2
- package/theme/material/vaadin-grid-sort-column.d.ts +0 -2
- package/theme/material/vaadin-grid-sort-column.js +0 -2
- package/theme/material/vaadin-grid-sorter-styles.d.ts +0 -2
- package/theme/material/vaadin-grid-sorter-styles.js +0 -73
- package/theme/material/vaadin-grid-sorter.d.ts +0 -2
- package/theme/material/vaadin-grid-sorter.js +0 -2
- package/theme/material/vaadin-grid-styles.d.ts +0 -2
- package/theme/material/vaadin-grid-styles.js +0 -266
- package/theme/material/vaadin-grid-tree-column.d.ts +0 -2
- package/theme/material/vaadin-grid-tree-column.js +0 -2
- package/theme/material/vaadin-grid-tree-toggle-styles.d.ts +0 -3
- package/theme/material/vaadin-grid-tree-toggle-styles.js +0 -42
- package/theme/material/vaadin-grid-tree-toggle.d.ts +0 -2
- package/theme/material/vaadin-grid-tree-toggle.js +0 -2
- package/theme/material/vaadin-grid.d.ts +0 -2
- package/theme/material/vaadin-grid.js +0 -2
- package/theme/material/vaadin-lit-grid-column-group.d.ts +0 -1
- package/theme/material/vaadin-lit-grid-column-group.js +0 -1
- package/theme/material/vaadin-lit-grid-column.d.ts +0 -1
- package/theme/material/vaadin-lit-grid-column.js +0 -1
- package/theme/material/vaadin-lit-grid-filter-column.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-filter-column.js +0 -2
- package/theme/material/vaadin-lit-grid-filter.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-filter.js +0 -2
- package/theme/material/vaadin-lit-grid-selection-column.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-selection-column.js +0 -2
- package/theme/material/vaadin-lit-grid-sort-column.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-sort-column.js +0 -2
- package/theme/material/vaadin-lit-grid-sorter.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-sorter.js +0 -2
- package/theme/material/vaadin-lit-grid-tree-column.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-tree-column.js +0 -2
- package/theme/material/vaadin-lit-grid-tree-toggle.d.ts +0 -2
- package/theme/material/vaadin-lit-grid-tree-toggle.js +0 -2
- package/theme/material/vaadin-lit-grid.d.ts +0 -2
- package/theme/material/vaadin-lit-grid.js +0 -2
- package/vaadin-lit-grid-column-group.d.ts +0 -1
- package/vaadin-lit-grid-column-group.js +0 -3
- package/vaadin-lit-grid-column.d.ts +0 -1
- package/vaadin-lit-grid-column.js +0 -3
- package/vaadin-lit-grid-filter-column.d.ts +0 -1
- package/vaadin-lit-grid-filter-column.js +0 -3
- package/vaadin-lit-grid-filter.d.ts +0 -1
- package/vaadin-lit-grid-filter.js +0 -3
- package/vaadin-lit-grid-selection-column.d.ts +0 -1
- package/vaadin-lit-grid-selection-column.js +0 -3
- package/vaadin-lit-grid-sort-column.d.ts +0 -1
- package/vaadin-lit-grid-sort-column.js +0 -3
- package/vaadin-lit-grid-sorter.d.ts +0 -1
- package/vaadin-lit-grid-sorter.js +0 -3
- package/vaadin-lit-grid-tree-column.d.ts +0 -1
- package/vaadin-lit-grid-tree-column.js +0 -3
- package/vaadin-lit-grid-tree-toggle.d.ts +0 -1
- package/vaadin-lit-grid-tree-toggle.js +0 -3
- package/vaadin-lit-grid.d.ts +0 -1
- package/vaadin-lit-grid.js +0 -3
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/text-field/src/vaadin-text-field.js';
|
|
7
|
-
import { html,
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
|
+
import { gridFilterStyles } from './styles/vaadin-grid-filter-core-styles.js';
|
|
10
13
|
import { GridFilterElementMixin } from './vaadin-grid-filter-element-mixin.js';
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -38,14 +41,19 @@ import { GridFilterElementMixin } from './vaadin-grid-filter-element-mixin.js';
|
|
|
38
41
|
* @extends HTMLElement
|
|
39
42
|
* @mixes GridFilterElementMixin
|
|
40
43
|
*/
|
|
41
|
-
class GridFilter extends GridFilterElementMixin(ThemableMixin(
|
|
42
|
-
static get template() {
|
|
43
|
-
return html`<slot></slot>`;
|
|
44
|
-
}
|
|
45
|
-
|
|
44
|
+
class GridFilter extends GridFilterElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
|
|
46
45
|
static get is() {
|
|
47
46
|
return 'vaadin-grid-filter';
|
|
48
47
|
}
|
|
48
|
+
|
|
49
|
+
static get styles() {
|
|
50
|
+
return gridFilterStyles;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @protected */
|
|
54
|
+
render() {
|
|
55
|
+
return html`<slot></slot>`;
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
defineCustomElement(GridFilter);
|
package/src/vaadin-grid-mixin.js
CHANGED
|
@@ -5,19 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';
|
|
7
7
|
import { animationFrame, microTask } from '@vaadin/component-base/src/async.js';
|
|
8
|
-
import {
|
|
9
|
-
isAndroid,
|
|
10
|
-
isChrome,
|
|
11
|
-
isFirefox,
|
|
12
|
-
isIOS,
|
|
13
|
-
isSafari,
|
|
14
|
-
isTouch,
|
|
15
|
-
supportsAdoptingStyleSheets,
|
|
16
|
-
} from '@vaadin/component-base/src/browser-utils.js';
|
|
8
|
+
import { isAndroid, isChrome, isFirefox, isIOS, isSafari, isTouch } from '@vaadin/component-base/src/browser-utils.js';
|
|
17
9
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
18
10
|
import { getClosestElement } from '@vaadin/component-base/src/dom-utils.js';
|
|
19
11
|
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
|
|
20
|
-
import { processTemplates } from '@vaadin/component-base/src/templates.js';
|
|
21
12
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
22
13
|
import { Virtualizer } from '@vaadin/component-base/src/virtualizer.js';
|
|
23
14
|
import { A11yMixin } from './vaadin-grid-a11y-mixin.js';
|
|
@@ -37,6 +28,7 @@ import {
|
|
|
37
28
|
iterateRowCells,
|
|
38
29
|
updateBooleanRowStates,
|
|
39
30
|
updateCellsPart,
|
|
31
|
+
updateState,
|
|
40
32
|
} from './vaadin-grid-helpers.js';
|
|
41
33
|
import { KeyboardNavigationMixin } from './vaadin-grid-keyboard-navigation-mixin.js';
|
|
42
34
|
import { RowDetailsMixin } from './vaadin-grid-row-details-mixin.js';
|
|
@@ -282,8 +274,6 @@ export const GridMixin = (superClass) =>
|
|
|
282
274
|
minHeightObserver.observe(this.$.items);
|
|
283
275
|
minHeightObserver.observe(this.$.footer);
|
|
284
276
|
|
|
285
|
-
processTemplates(this);
|
|
286
|
-
|
|
287
277
|
this._tooltipController = new TooltipController(this);
|
|
288
278
|
this.addController(this._tooltipController);
|
|
289
279
|
this._tooltipController.setManual(true);
|
|
@@ -356,7 +346,7 @@ export const GridMixin = (superClass) =>
|
|
|
356
346
|
row.setAttribute('role', 'row');
|
|
357
347
|
row.setAttribute('tabindex', '-1');
|
|
358
348
|
if (this._columnTree) {
|
|
359
|
-
this.
|
|
349
|
+
this.__initRow(row, this._columnTree[this._columnTree.length - 1], 'body', false, true);
|
|
360
350
|
}
|
|
361
351
|
rows.push(row);
|
|
362
352
|
}
|
|
@@ -468,9 +458,9 @@ export const GridMixin = (superClass) =>
|
|
|
468
458
|
* @param {?string} section
|
|
469
459
|
* @param {boolean} isColumnRow
|
|
470
460
|
* @param {boolean} noNotify
|
|
471
|
-
* @
|
|
461
|
+
* @private
|
|
472
462
|
*/
|
|
473
|
-
|
|
463
|
+
__initRow(row, columns, section = 'body', isColumnRow = false, noNotify = false) {
|
|
474
464
|
const contentsFragment = document.createDocumentFragment();
|
|
475
465
|
|
|
476
466
|
iterateRowCells(row, (cell) => {
|
|
@@ -650,10 +640,15 @@ export const GridMixin = (superClass) =>
|
|
|
650
640
|
return;
|
|
651
641
|
}
|
|
652
642
|
|
|
643
|
+
row.index = index;
|
|
644
|
+
|
|
653
645
|
this._updateRowOrderParts(row, index);
|
|
654
646
|
|
|
655
647
|
this._a11yUpdateRowRowindex(row, index);
|
|
656
|
-
|
|
648
|
+
|
|
649
|
+
this.__ensureRowItem(row);
|
|
650
|
+
this.__ensureRowHierarchy(row);
|
|
651
|
+
this.__updateRow(row);
|
|
657
652
|
}
|
|
658
653
|
|
|
659
654
|
/** @private */
|
|
@@ -694,7 +689,7 @@ export const GridMixin = (superClass) =>
|
|
|
694
689
|
*/
|
|
695
690
|
_renderColumnTree(columnTree) {
|
|
696
691
|
iterateChildren(this.$.items, (row) => {
|
|
697
|
-
this.
|
|
692
|
+
this.__initRow(row, columnTree[columnTree.length - 1], 'body', false, true);
|
|
698
693
|
|
|
699
694
|
const model = this.__getRowModel(row);
|
|
700
695
|
this._updateRowOrderParts(row);
|
|
@@ -721,7 +716,7 @@ export const GridMixin = (superClass) =>
|
|
|
721
716
|
}
|
|
722
717
|
|
|
723
718
|
iterateChildren(this.$.header, (headerRow, index, rows) => {
|
|
724
|
-
this.
|
|
719
|
+
this.__initRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1);
|
|
725
720
|
|
|
726
721
|
const cells = getBodyRowCells(headerRow);
|
|
727
722
|
updateCellsPart(cells, 'first-header-row-cell', index === 0);
|
|
@@ -729,7 +724,7 @@ export const GridMixin = (superClass) =>
|
|
|
729
724
|
});
|
|
730
725
|
|
|
731
726
|
iterateChildren(this.$.footer, (footerRow, index, rows) => {
|
|
732
|
-
this.
|
|
727
|
+
this.__initRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0);
|
|
733
728
|
|
|
734
729
|
const cells = getBodyRowCells(footerRow);
|
|
735
730
|
updateCellsPart(cells, 'first-footer-row-cell', index === 0);
|
|
@@ -737,7 +732,7 @@ export const GridMixin = (superClass) =>
|
|
|
737
732
|
});
|
|
738
733
|
|
|
739
734
|
// Sizer rows
|
|
740
|
-
this.
|
|
735
|
+
this.__initRow(this.$.sizer, columnTree[columnTree.length - 1]);
|
|
741
736
|
|
|
742
737
|
this._resizeHandler();
|
|
743
738
|
this._frozenCellsChanged();
|
|
@@ -752,10 +747,38 @@ export const GridMixin = (superClass) =>
|
|
|
752
747
|
|
|
753
748
|
/**
|
|
754
749
|
* @param {!HTMLElement} row
|
|
755
|
-
* @param {
|
|
756
|
-
* @
|
|
750
|
+
* @param {boolean} loading
|
|
751
|
+
* @private
|
|
752
|
+
*/
|
|
753
|
+
__updateRowLoading(row, loading) {
|
|
754
|
+
const cells = getBodyRowCells(row);
|
|
755
|
+
|
|
756
|
+
// Row state attribute
|
|
757
|
+
updateState(row, 'loading', loading);
|
|
758
|
+
|
|
759
|
+
// Cells part attribute
|
|
760
|
+
updateCellsPart(cells, 'loading-row-cell', loading);
|
|
761
|
+
|
|
762
|
+
if (loading) {
|
|
763
|
+
// Run style generators for the loading row to have custom names cleared
|
|
764
|
+
this._generateCellClassNames(row);
|
|
765
|
+
this._generateCellPartNames(row);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* @param {!HTMLElement} row
|
|
771
|
+
* @private
|
|
757
772
|
*/
|
|
758
|
-
|
|
773
|
+
__updateRow(row) {
|
|
774
|
+
const item = this.__getRowItem(row);
|
|
775
|
+
if (item) {
|
|
776
|
+
this.__updateRowLoading(row, false);
|
|
777
|
+
} else {
|
|
778
|
+
this.__updateRowLoading(row, true);
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
|
|
759
782
|
row._item = item;
|
|
760
783
|
const model = this.__getRowModel(row);
|
|
761
784
|
|
|
@@ -932,15 +955,11 @@ export const GridMixin = (superClass) =>
|
|
|
932
955
|
|
|
933
956
|
// The style is set to host instead of the scroller so that the value can be overridden by the user with "grid { min-height: 0 }"
|
|
934
957
|
// Prefer setting style in adopted style sheet to avoid the need to add a confusing inline style on the host element
|
|
935
|
-
|
|
936
|
-
if (!this.__minHeightStyleSheet && supportsAdoptingStyleSheets) {
|
|
958
|
+
if (!this.__minHeightStyleSheet) {
|
|
937
959
|
this.__minHeightStyleSheet = new CSSStyleSheet();
|
|
938
|
-
this.shadowRoot.adoptedStyleSheets
|
|
939
|
-
}
|
|
940
|
-
if (this.__minHeightStyleSheet) {
|
|
941
|
-
this.__minHeightStyleSheet.replaceSync(`:host { --_grid-min-height: ${minHeight}px; }`);
|
|
942
|
-
} else {
|
|
943
|
-
this.style.setProperty('--_grid-min-height', `${minHeight}px`);
|
|
960
|
+
this.shadowRoot.adoptedStyleSheets.push(this.__minHeightStyleSheet);
|
|
944
961
|
}
|
|
962
|
+
|
|
963
|
+
this.__minHeightStyleSheet.replaceSync(`:host { --_grid-min-height: ${minHeight}px; }`);
|
|
945
964
|
}
|
|
946
965
|
};
|
|
@@ -85,7 +85,7 @@ export const RowDetailsMixin = (superClass) =>
|
|
|
85
85
|
// Only update the rows if the column tree has already been initialized
|
|
86
86
|
iterateChildren(this.$.items, (row) => {
|
|
87
87
|
if (!row.querySelector('[part~=details-cell]')) {
|
|
88
|
-
this.
|
|
88
|
+
this.__initRow(row, this._columnTree[this._columnTree.length - 1]);
|
|
89
89
|
const isDetailsOpened = this._isDetailsOpened(row._item);
|
|
90
90
|
this._toggleDetailsCell(row, isDetailsOpened);
|
|
91
91
|
}
|
|
@@ -98,13 +98,13 @@ export const RowDetailsMixin = (superClass) =>
|
|
|
98
98
|
iterateChildren(this.$.items, (row) => {
|
|
99
99
|
// Re-renders the row to possibly close the previously opened details.
|
|
100
100
|
if (row.hasAttribute('details-opened')) {
|
|
101
|
-
this.
|
|
101
|
+
this.__updateRow(row);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// Re-renders the row to open the details when a row details renderer is provided.
|
|
106
106
|
if (rowDetailsRenderer && this._isDetailsOpened(row._item)) {
|
|
107
|
-
this.
|
|
107
|
+
this.__updateRow(row);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -140,7 +140,7 @@ export const RowDetailsMixin = (superClass) =>
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// Assigns a renderer when the details cell is opened.
|
|
143
|
-
// The details cell content is rendered later in the `
|
|
143
|
+
// The details cell content is rendered later in the `__updateRow` method.
|
|
144
144
|
if (this.rowDetailsRenderer) {
|
|
145
145
|
cell._renderer = this.rowDetailsRenderer;
|
|
146
146
|
}
|
|
@@ -491,6 +491,7 @@ export const ScrollMixin = (superClass) =>
|
|
|
491
491
|
|
|
492
492
|
// Position frozen cells
|
|
493
493
|
const x = this.__isRTL ? normalizedScrollLeft + clientWidth - scrollWidth : scrollLeft;
|
|
494
|
+
this.__horizontalScrollPosition = x;
|
|
494
495
|
const transformFrozen = `translate(${x}px, 0)`;
|
|
495
496
|
this._frozenCells.forEach((cell) => {
|
|
496
497
|
cell.style.transform = transformFrozen;
|
|
@@ -526,10 +527,25 @@ export const ScrollMixin = (superClass) =>
|
|
|
526
527
|
}
|
|
527
528
|
});
|
|
528
529
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
this
|
|
530
|
+
const focusedRow = this.shadowRoot.querySelector("[part~='row']:focus");
|
|
531
|
+
if (focusedRow) {
|
|
532
|
+
// Update the horizontal scroll position property of the focused row
|
|
533
|
+
this.__updateRowScrollPositionProperty(focusedRow);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Synchronizes the internal `--_grid-horizontal-scroll-position` CSS property
|
|
539
|
+
* of the given row with the current horizontal scroll position of the grid.
|
|
540
|
+
* @private
|
|
541
|
+
*/
|
|
542
|
+
__updateRowScrollPositionProperty(row) {
|
|
543
|
+
if (row instanceof HTMLTableRowElement === false) {
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
const newValue = `${this.__horizontalScrollPosition}px`;
|
|
547
|
+
if (row.style.getPropertyValue('--_grid-horizontal-scroll-position') !== newValue) {
|
|
548
|
+
row.style.setProperty('--_grid-horizontal-scroll-position', newValue);
|
|
533
549
|
}
|
|
534
550
|
}
|
|
535
551
|
|
|
@@ -3,66 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
|
-
|
|
8
|
-
const template = document.createElement('template');
|
|
9
|
-
|
|
10
|
-
template.innerHTML = `
|
|
11
|
-
<style>
|
|
12
|
-
@font-face {
|
|
13
|
-
font-family: 'vaadin-grid-sorter-icons';
|
|
14
|
-
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQwAA0AAAAABuwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAEFAAAABkAAAAcfep+mUdERUYAAAP4AAAAHAAAAB4AJwAOT1MvMgAAAZgAAAA/AAAAYA8TBPpjbWFwAAAB7AAAAFUAAAFeF1fZ4mdhc3AAAAPwAAAACAAAAAgAAAAQZ2x5ZgAAAlgAAABcAAAAnMvguMloZWFkAAABMAAAAC8AAAA2C5Ap72hoZWEAAAFgAAAAHQAAACQGbQPHaG10eAAAAdgAAAAUAAAAHAoAAABsb2NhAAACRAAAABIAAAASAIwAYG1heHAAAAGAAAAAFgAAACAACwAKbmFtZQAAArQAAAECAAACZxWCgKhwb3N0AAADuAAAADUAAABZCrApUXicY2BkYGAA4rDECVrx/DZfGbhZGEDgyqNPOxH0/wNMq5kPALkcDEwgUQBWRA0dAHicY2BkYGA+8P8AAwMLAwgwrWZgZEAFbABY4QM8AAAAeJxjYGRgYOAAQiYGEICQSAAAAi8AFgAAeJxjYGY6yziBgZWBgWkm0xkGBoZ+CM34msGYkZMBFTAKoAkwODAwvmRiPvD/AIMDMxCD1CDJKjAwAgBktQsXAHicY2GAAMZQCM0EwqshbAALxAEKeJxjYGBgZoBgGQZGBhCIAPIYwXwWBhsgzcXAwcAEhIwMCi+Z/v/9/x+sSuElA4T9/4k4K1gHFwMMMILMY2QDYmaoABOQYGJABUA7WBiGNwAAJd4NIQAAAAAAAAAACAAIABAAGAAmAEAATgAAeJyNjLENgDAMBP9tIURJwQCMQccSZgk2i5fIYBDAidJjycXr7x5EPwE2wY8si7jmyBNXGo/bNBerxJNrpxhbO3/fEFpx8ZICpV+ghxJ74fAMe+h7Ox14AbrsHB14nK2QQWrDMBRER4mTkhQK3ZRQKOgCNk7oGQqhhEIX2WSlWEI1BAlkJ5CDdNsj5Ey9Rncdi38ES+jzNJo/HwTgATcoDEthhY3wBHc4CE+pfwsX5F/hGe7Vo/AcK/UhvMSz+mGXKhZU6pww8ISz3oWn1BvhgnwTnuEJf8Jz1OpFeIlX9YULDLdFi4ASHolkSR0iuYdjLak1vAequBhj21D61Nqyi6l3qWybGPjySbPHGScGJl6dP58MYcQRI0bts7mjebBqrFENH7t3qWtj0OuqHnXcW7b0HOTZFnKryRGW2hFX1m0O2vEM3opNMfTau+CS6Z3Vx6veNnEXY6jwDxhsc2gAAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSrpYEBlIbxjQDrzgsuAAAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKyoz1cD0o087YTQATOcIewAAAA==) format('woff');
|
|
15
|
-
font-weight: normal;
|
|
16
|
-
font-style: normal;
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
document.head.appendChild(template.content);
|
|
22
|
-
|
|
23
|
-
registerStyles(
|
|
24
|
-
'vaadin-grid-sorter',
|
|
25
|
-
css`
|
|
26
|
-
:host {
|
|
27
|
-
display: inline-flex;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
max-width: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[part='content'] {
|
|
33
|
-
flex: 1 1 auto;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[part='indicators'] {
|
|
37
|
-
position: relative;
|
|
38
|
-
align-self: center;
|
|
39
|
-
flex: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[part='order'] {
|
|
43
|
-
display: inline;
|
|
44
|
-
vertical-align: super;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[part='indicators']::before {
|
|
48
|
-
font-family: 'vaadin-grid-sorter-icons';
|
|
49
|
-
display: inline-block;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host(:not([direction])) [part='indicators']::before {
|
|
53
|
-
content: '\\e901';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:host([direction='asc']) [part='indicators']::before {
|
|
57
|
-
content: '\\e900';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:host([direction='desc']) [part='indicators']::before {
|
|
61
|
-
content: '\\e902';
|
|
62
|
-
}
|
|
63
|
-
`,
|
|
64
|
-
{ moduleId: 'vaadin-grid-sorter-styles' },
|
|
65
|
-
);
|
|
66
6
|
|
|
67
7
|
/**
|
|
68
8
|
* A mixin providing common sorter functionality.
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { html,
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
|
-
import {
|
|
9
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
|
+
import { gridSorterStyles } from './styles/vaadin-grid-sorter-core-styles.js';
|
|
10
13
|
import { GridSorterMixin } from './vaadin-grid-sorter-mixin.js';
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -54,21 +57,26 @@ import { GridSorterMixin } from './vaadin-grid-sorter-mixin.js';
|
|
|
54
57
|
* @mixes ThemableMixin
|
|
55
58
|
* @mixes DirMixin
|
|
56
59
|
*/
|
|
57
|
-
class GridSorter extends GridSorterMixin(ThemableMixin(DirMixin(
|
|
58
|
-
static get
|
|
60
|
+
class GridSorter extends GridSorterMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
61
|
+
static get is() {
|
|
62
|
+
return 'vaadin-grid-sorter';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static get styles() {
|
|
66
|
+
return gridSorterStyles;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** @protected */
|
|
70
|
+
render() {
|
|
59
71
|
return html`
|
|
60
72
|
<div part="content">
|
|
61
73
|
<slot></slot>
|
|
62
74
|
</div>
|
|
63
75
|
<div part="indicators">
|
|
64
|
-
<span part="order"
|
|
76
|
+
<span part="order">${this._getDisplayOrder(this._order)}</span>
|
|
65
77
|
</div>
|
|
66
78
|
`;
|
|
67
79
|
}
|
|
68
|
-
|
|
69
|
-
static get is() {
|
|
70
|
-
return 'vaadin-grid-sorter';
|
|
71
|
-
}
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
defineCustomElement(GridSorter);
|
|
@@ -3,85 +3,8 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
6
|
import { isFocusable } from './vaadin-grid-active-item-mixin.js';
|
|
8
7
|
|
|
9
|
-
const template = document.createElement('template');
|
|
10
|
-
|
|
11
|
-
template.innerHTML = `
|
|
12
|
-
<style>
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: "vaadin-grid-tree-icons";
|
|
15
|
-
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQkAA0AAAAABrwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAECAAAABoAAAAcgHwa6EdERUYAAAPsAAAAHAAAAB4AJwAOT1MvMgAAAZQAAAA/AAAAYA8TBIJjbWFwAAAB8AAAAFUAAAFeGJvXWmdhc3AAAAPkAAAACAAAAAgAAAAQZ2x5ZgAAAlwAAABLAAAAhIrPOhFoZWFkAAABMAAAACsAAAA2DsJI02hoZWEAAAFcAAAAHQAAACQHAgPHaG10eAAAAdQAAAAZAAAAHAxVAgBsb2NhAAACSAAAABIAAAASAIAAVG1heHAAAAF8AAAAGAAAACAACgAFbmFtZQAAAqgAAAECAAACTwflzbdwb3N0AAADrAAAADYAAABZQ7Ajh3icY2BkYGAA4twv3Vfi+W2+MnCzMIDANSOmbGSa2YEZRHEwMIEoAAoiB6sAeJxjYGRgYD7w/wADAwsDCDA7MDAyoAI2AFEEAtIAAAB4nGNgZGBg4GBgZgDRDAxMDGgAAAGbABB4nGNgZp7JOIGBlYGBaSbTGQYGhn4IzfiawZiRkwEVMAqgCTA4MDA+38d84P8BBgdmIAapQZJVYGAEAGc/C54AeJxjYYAAxlAIzQTELAwMBxgZGB0ACy0BYwAAAHicY2BgYGaAYBkGRgYQiADyGMF8FgYbIM3FwMHABISMDArP9/3/+/8/WJXC8z0Q9v8nEp5gHVwMMMAIMo+RDYiZoQJMQIKJARUA7WBhGN4AACFKDtoAAAAAAAAAAAgACAAQABgAJgA0AEIAAHichYvBEYBADAKBVHBjBT4swl9KS2k05o0XHd/yW1hAfBFwCv9sIlJu3nZaNS3PXAaXXHI8Lge7DlzF7C1RgXc7xkK6+gvcD2URmQB4nK2RQWoCMRiFX3RUqtCli65yADModOMBLLgQSqHddRFnQghIAnEUvEA3vUUP0LP0Fj1G+yb8R5iEhO9/ef/7FwFwj28o9EthiVp4hBlehcfUP4Ur8o/wBAv8CU+xVFvhOR7UB7tUdUdlVRJ6HnHWTnhM/V24In8JT5j/KzzFSi2E53hUz7jCcrcIiDDwyKSW1JEct2HdIPH1DFytbUM0PofWdNk5E5oUqb/Q6HHBiVGZpfOXkyUMEj5IyBuNmYZQjBobfsuassvnkKLe1OuBBj0VQ8cRni2xjLWsHaM0jrjx3peYA0/vrdmUYqe9iy7bzrX6eNP7Jh1SijX+AaUVbB8AAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSruZMzlHaB0q4A76kLlwAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKxJigiD6mhFTNowGACmcA/8AAA==) format('woff');
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
}
|
|
19
|
-
</style>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
document.head.appendChild(template.content);
|
|
23
|
-
|
|
24
|
-
registerStyles(
|
|
25
|
-
'vaadin-grid-tree-toggle',
|
|
26
|
-
css`
|
|
27
|
-
:host {
|
|
28
|
-
display: inline-flex;
|
|
29
|
-
align-items: baseline;
|
|
30
|
-
max-width: 100%;
|
|
31
|
-
|
|
32
|
-
/* CSS API for :host */
|
|
33
|
-
--vaadin-grid-tree-toggle-level-offset: 1em;
|
|
34
|
-
--_collapsed-icon: '\\e7be\\00a0';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([dir='rtl']) {
|
|
38
|
-
--_collapsed-icon: '\\e7bd\\00a0';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([hidden]) {
|
|
42
|
-
display: none !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host(:not([leaf])) {
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#level-spacer,
|
|
50
|
-
[part='toggle'] {
|
|
51
|
-
flex: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#level-spacer {
|
|
55
|
-
display: inline-block;
|
|
56
|
-
width: calc(var(--_level, '0') * var(--vaadin-grid-tree-toggle-level-offset));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
[part='toggle']::before {
|
|
60
|
-
font-family: 'vaadin-grid-tree-icons';
|
|
61
|
-
line-height: 1em; /* make icon font metrics not affect baseline */
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host(:not([expanded])) [part='toggle']::before {
|
|
65
|
-
content: var(--_collapsed-icon);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:host([expanded]) [part='toggle']::before {
|
|
69
|
-
content: '\\e7bc\\00a0'; /* icon glyph + single non-breaking space */
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host([leaf]) [part='toggle'] {
|
|
73
|
-
visibility: hidden;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
slot {
|
|
77
|
-
display: block;
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
}
|
|
81
|
-
`,
|
|
82
|
-
{ moduleId: 'vaadin-grid-tree-toggle-styles' },
|
|
83
|
-
);
|
|
84
|
-
|
|
85
8
|
/**
|
|
86
9
|
* @polymerMixin
|
|
87
10
|
*/
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { html,
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
7
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
8
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
|
|
11
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
|
+
import { gridTreeToggleStyles } from './styles/vaadin-grid-tree-toggle-core-styles.js';
|
|
10
13
|
import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -63,12 +66,19 @@ import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
|
|
|
63
66
|
* @mixes DirMixin
|
|
64
67
|
* @mixes GridTreeToggleMixin
|
|
65
68
|
*/
|
|
66
|
-
class GridTreeToggle extends GridTreeToggleMixin(
|
|
69
|
+
class GridTreeToggle extends GridTreeToggleMixin(
|
|
70
|
+
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
71
|
+
) {
|
|
67
72
|
static get is() {
|
|
68
73
|
return 'vaadin-grid-tree-toggle';
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
static get
|
|
76
|
+
static get styles() {
|
|
77
|
+
return gridTreeToggleStyles;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @protected */
|
|
81
|
+
render() {
|
|
72
82
|
return html`
|
|
73
83
|
<span id="level-spacer"></span>
|
|
74
84
|
<span part="toggle"></span>
|
package/src/vaadin-grid.d.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
7
|
-
import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
|
|
8
7
|
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
8
|
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
9
|
import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
@@ -277,7 +276,6 @@ interface Grid<TItem = GridDefaultItem>
|
|
|
277
276
|
ElementMixinClass,
|
|
278
277
|
ThemableMixinClass,
|
|
279
278
|
ThemePropertyMixinClass,
|
|
280
|
-
ControllerMixinClass,
|
|
281
279
|
GridMixinClass<TItem> {}
|
|
282
280
|
|
|
283
281
|
declare global {
|
package/src/vaadin-grid.js
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-grid-column.js';
|
|
7
|
-
import { html,
|
|
8
|
-
import {
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
9
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
-
import {
|
|
11
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
13
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
+
import { gridStyles } from './styles/vaadin-grid-core-styles.js';
|
|
12
15
|
import { GridMixin } from './vaadin-grid-mixin.js';
|
|
13
|
-
import { gridStyles } from './vaadin-grid-styles.js';
|
|
14
|
-
|
|
15
|
-
registerStyles('vaadin-grid', gridStyles, { moduleId: 'vaadin-grid-styles' });
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* `<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the
|
|
@@ -261,20 +261,34 @@ registerStyles('vaadin-grid', gridStyles, { moduleId: 'vaadin-grid-styles' });
|
|
|
261
261
|
* @extends HTMLElement
|
|
262
262
|
* @mixes GridMixin
|
|
263
263
|
* @mixes ThemableMixin
|
|
264
|
-
* @mixes ControllerMixin
|
|
265
264
|
*/
|
|
266
|
-
class Grid extends GridMixin(ElementMixin(ThemableMixin(
|
|
267
|
-
static get
|
|
265
|
+
class Grid extends GridMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
266
|
+
static get is() {
|
|
267
|
+
return 'vaadin-grid';
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static get styles() {
|
|
271
|
+
return gridStyles;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** @protected */
|
|
275
|
+
render() {
|
|
268
276
|
return html`
|
|
269
277
|
<div
|
|
270
278
|
id="scroller"
|
|
271
|
-
safari
|
|
272
|
-
ios
|
|
273
|
-
loading
|
|
274
|
-
column-reordering-allowed
|
|
275
|
-
empty-state
|
|
279
|
+
?safari="${this._safari}"
|
|
280
|
+
?ios="${this._ios}"
|
|
281
|
+
?loading="${this.loading}"
|
|
282
|
+
?column-reordering-allowed="${this.columnReorderingAllowed}"
|
|
283
|
+
?empty-state="${this.__emptyState}"
|
|
276
284
|
>
|
|
277
|
-
<table
|
|
285
|
+
<table
|
|
286
|
+
id="table"
|
|
287
|
+
role="treegrid"
|
|
288
|
+
aria-multiselectable="true"
|
|
289
|
+
tabindex="0"
|
|
290
|
+
aria-label="${ifDefined(this.accessibleName)}"
|
|
291
|
+
>
|
|
278
292
|
<caption id="sizer" part="row"></caption>
|
|
279
293
|
<thead id="header" role="rowgroup"></thead>
|
|
280
294
|
<tbody id="items" role="rowgroup"></tbody>
|
|
@@ -296,10 +310,6 @@ class Grid extends GridMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerE
|
|
|
296
310
|
<div id="focusexit" tabindex="0"></div>
|
|
297
311
|
`;
|
|
298
312
|
}
|
|
299
|
-
|
|
300
|
-
static get is() {
|
|
301
|
-
return 'vaadin-grid';
|
|
302
|
-
}
|
|
303
313
|
}
|
|
304
314
|
|
|
305
315
|
defineCustomElement(Grid);
|