@vaadin/grid 24.4.6 → 24.5.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 +5 -5
- package/package.json +13 -13
- package/src/vaadin-grid-active-item-mixin.js +8 -14
- package/src/vaadin-grid-data-provider-mixin.js +2 -2
- package/src/vaadin-grid-drag-and-drop-mixin.js +17 -1
- package/src/vaadin-grid-event-context-mixin.js +1 -4
- package/src/vaadin-grid-keyboard-navigation-mixin.js +7 -5
- package/src/vaadin-grid-mixin.js +24 -0
- package/src/vaadin-grid-row-details-mixin.js +1 -1
- package/src/vaadin-grid-selection-column-base-mixin.js +2 -2
- package/src/vaadin-grid-selection-mixin.js +1 -1
- package/src/vaadin-grid-styles.js +26 -0
- package/src/vaadin-grid.d.ts +1 -0
- package/src/vaadin-grid.js +11 -1
- package/src/vaadin-lit-grid.js +8 -0
- package/theme/lumo/vaadin-grid-styles.js +10 -0
- package/theme/material/vaadin-grid-sorter-styles.js +3 -1
- package/theme/material/vaadin-grid-styles.js +6 -0
- package/web-types.json +4 -4
- package/web-types.lit.json +4 -4
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@ A web component for showing tabular data.
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/grid)
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<vaadin-grid
|
|
10
|
+
<vaadin-grid column-reordering-allowed multi-sort>
|
|
11
11
|
<vaadin-grid-selection-column auto-select frozen></vaadin-grid-selection-column>
|
|
12
|
-
<vaadin-grid-sort-column width="
|
|
13
|
-
<vaadin-grid-sort-column width="
|
|
14
|
-
<vaadin-grid-column id="address" width="
|
|
12
|
+
<vaadin-grid-sort-column width="9rem" path="firstName"></vaadin-grid-sort-column>
|
|
13
|
+
<vaadin-grid-sort-column width="9rem" path="lastName"></vaadin-grid-sort-column>
|
|
14
|
+
<vaadin-grid-column id="address" width="15rem" flex-grow="2" header="Address"></vaadin-grid-column>
|
|
15
15
|
</vaadin-grid>
|
|
16
16
|
|
|
17
17
|
<script>
|
|
@@ -87,7 +87,7 @@ import '@vaadin/grid/src/vaadin-grid-tree-column.js';
|
|
|
87
87
|
|
|
88
88
|
## Contributing
|
|
89
89
|
|
|
90
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/contributing
|
|
90
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
91
91
|
|
|
92
92
|
## License
|
|
93
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.5.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,24 +46,24 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
48
|
"@polymer/polymer": "^3.0.0",
|
|
49
|
-
"@vaadin/a11y-base": "
|
|
50
|
-
"@vaadin/checkbox": "
|
|
51
|
-
"@vaadin/component-base": "
|
|
52
|
-
"@vaadin/lit-renderer": "
|
|
53
|
-
"@vaadin/text-field": "
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
55
|
-
"@vaadin/vaadin-material-styles": "
|
|
56
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
49
|
+
"@vaadin/a11y-base": "24.5.0-alpha10",
|
|
50
|
+
"@vaadin/checkbox": "24.5.0-alpha10",
|
|
51
|
+
"@vaadin/component-base": "24.5.0-alpha10",
|
|
52
|
+
"@vaadin/lit-renderer": "24.5.0-alpha10",
|
|
53
|
+
"@vaadin/text-field": "24.5.0-alpha10",
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha10",
|
|
55
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha10",
|
|
56
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha10",
|
|
57
57
|
"lit": "^3.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@vaadin/testing-helpers": "^0.
|
|
62
|
-
"sinon": "^
|
|
60
|
+
"@vaadin/chai-plugins": "24.5.0-alpha10",
|
|
61
|
+
"@vaadin/testing-helpers": "^1.0.0",
|
|
62
|
+
"sinon": "^18.0.0"
|
|
63
63
|
},
|
|
64
64
|
"web-types": [
|
|
65
65
|
"web-types.json",
|
|
66
66
|
"web-types.lit.json"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "6f9c37308031af872a98017bfab4de89aeacda51"
|
|
69
69
|
}
|
|
@@ -4,27 +4,19 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { isElementFocusable } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* @param {!Element} target
|
|
9
11
|
* @return {boolean}
|
|
10
12
|
* @protected
|
|
11
13
|
*/
|
|
12
14
|
export const isFocusable = (target) => {
|
|
13
|
-
if (!target.parentNode) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
const focusables = Array.from(
|
|
17
|
-
target.parentNode.querySelectorAll(
|
|
18
|
-
'[tabindex], button, input, select, textarea, object, iframe, a[href], area[href]',
|
|
19
|
-
),
|
|
20
|
-
).filter((element) => {
|
|
21
|
-
const part = element.getAttribute('part');
|
|
22
|
-
return !(part && part.includes('body-cell'));
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const isFocusableElement = focusables.includes(target);
|
|
26
15
|
return (
|
|
27
|
-
|
|
16
|
+
target.offsetParent &&
|
|
17
|
+
!target.part.contains('body-cell') &&
|
|
18
|
+
isElementFocusable(target) &&
|
|
19
|
+
getComputedStyle(target).visibility !== 'hidden'
|
|
28
20
|
);
|
|
29
21
|
};
|
|
30
22
|
|
|
@@ -82,6 +74,8 @@ export const ActiveItemMixin = (superClass) =>
|
|
|
82
74
|
!cell ||
|
|
83
75
|
// Cell is a details cell
|
|
84
76
|
cell.getAttribute('part').includes('details-cell') ||
|
|
77
|
+
// Cell is the empty state cell
|
|
78
|
+
cell === this.$.emptystatecell ||
|
|
85
79
|
// Cell content is focused
|
|
86
80
|
cell._content.contains(this.getRootNode().activeElement) ||
|
|
87
81
|
// Clicked on a focusable element
|
|
@@ -148,7 +148,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
148
148
|
|
|
149
149
|
/** @type {DataProviderController} */
|
|
150
150
|
this._dataProviderController = new DataProviderController(this, {
|
|
151
|
-
size: this.size,
|
|
151
|
+
size: this.size || 0,
|
|
152
152
|
pageSize: this.pageSize,
|
|
153
153
|
getItemId: this.getItemId.bind(this),
|
|
154
154
|
isExpanded: this._isExpanded.bind(this),
|
|
@@ -269,7 +269,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
/** @private */
|
|
272
|
-
__computeExpandedKeys(
|
|
272
|
+
__computeExpandedKeys(_itemIdPath, expandedItems) {
|
|
273
273
|
const expanded = expandedItems || [];
|
|
274
274
|
const expandedKeys = new Set();
|
|
275
275
|
expanded.forEach((item) => {
|
|
@@ -103,6 +103,11 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
103
103
|
__dndAutoScrollThreshold: {
|
|
104
104
|
value: 50,
|
|
105
105
|
},
|
|
106
|
+
|
|
107
|
+
/** @private */
|
|
108
|
+
__draggedItems: {
|
|
109
|
+
value: () => [],
|
|
110
|
+
},
|
|
106
111
|
};
|
|
107
112
|
}
|
|
108
113
|
|
|
@@ -170,6 +175,8 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
170
175
|
.filter((row) => !this.dragFilter || this.dragFilter(this.__getRowModel(row)));
|
|
171
176
|
}
|
|
172
177
|
|
|
178
|
+
this.__draggedItems = rows.map((row) => row._item);
|
|
179
|
+
|
|
173
180
|
// Set the default transfer data
|
|
174
181
|
e.dataTransfer.setData('text', this.__formatDefaultTransferData(rows));
|
|
175
182
|
|
|
@@ -181,11 +188,12 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
181
188
|
updateBooleanRowStates(row, { dragstart: false });
|
|
182
189
|
this.style.setProperty('--_grid-drag-start-x', '');
|
|
183
190
|
this.style.setProperty('--_grid-drag-start-y', '');
|
|
191
|
+
this.requestContentUpdate();
|
|
184
192
|
});
|
|
185
193
|
|
|
186
194
|
const event = new CustomEvent('grid-dragstart', {
|
|
187
195
|
detail: {
|
|
188
|
-
draggedItems:
|
|
196
|
+
draggedItems: [...this.__draggedItems],
|
|
189
197
|
setDragData: (type, data) => e.dataTransfer.setData(type, data),
|
|
190
198
|
setDraggedItemsCount: (count) => row.setAttribute('dragstart', count),
|
|
191
199
|
},
|
|
@@ -202,6 +210,9 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
202
210
|
const event = new CustomEvent('grid-dragend');
|
|
203
211
|
event.originalEvent = e;
|
|
204
212
|
this.dispatchEvent(event);
|
|
213
|
+
|
|
214
|
+
this.__draggedItems = [];
|
|
215
|
+
this.requestContentUpdate();
|
|
205
216
|
}
|
|
206
217
|
|
|
207
218
|
/** @private */
|
|
@@ -331,6 +342,11 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
331
342
|
});
|
|
332
343
|
}
|
|
333
344
|
|
|
345
|
+
/** @private */
|
|
346
|
+
__updateDragSourceParts(row, model) {
|
|
347
|
+
updateBooleanRowStates(row, { 'drag-source': this.__draggedItems.includes(model.item) });
|
|
348
|
+
}
|
|
349
|
+
|
|
334
350
|
/** @private */
|
|
335
351
|
_onDrop(e) {
|
|
336
352
|
if (this.dropMode) {
|
|
@@ -33,10 +33,7 @@ export const EventContextMixin = (superClass) =>
|
|
|
33
33
|
getEventContext(event) {
|
|
34
34
|
const context = {};
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
// to avoid problem when accessing it after a timeout on iOS
|
|
38
|
-
const path = event.__composedPath || event.composedPath();
|
|
39
|
-
const cell = path[path.indexOf(this.$.table) - 3];
|
|
36
|
+
const { cell } = this._getGridEventLocation(event);
|
|
40
37
|
|
|
41
38
|
if (!cell) {
|
|
42
39
|
return context;
|
|
@@ -675,7 +675,7 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
675
675
|
const tabOrder = [
|
|
676
676
|
this.$.table,
|
|
677
677
|
this._headerFocusable,
|
|
678
|
-
this._itemsFocusable,
|
|
678
|
+
this.__emptyState ? this.$.emptystatecell : this._itemsFocusable,
|
|
679
679
|
this._footerFocusable,
|
|
680
680
|
this.$.focusexit,
|
|
681
681
|
];
|
|
@@ -860,7 +860,7 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
860
860
|
if (cell) {
|
|
861
861
|
const context = this.getEventContext(e);
|
|
862
862
|
this.__pendingBodyCellFocus = this.loading && context.section === 'body';
|
|
863
|
-
if (!this.__pendingBodyCellFocus) {
|
|
863
|
+
if (!this.__pendingBodyCellFocus && cell !== this.$.emptystatecell) {
|
|
864
864
|
// Fire a cell-focus event for the cell
|
|
865
865
|
cell.dispatchEvent(new CustomEvent('cell-focus', { bubbles: true, composed: true, detail: { context } }));
|
|
866
866
|
}
|
|
@@ -907,7 +907,7 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
907
907
|
* @private
|
|
908
908
|
*/
|
|
909
909
|
_detectInteracting(e) {
|
|
910
|
-
const isInteracting = e.composedPath().some((el) => el.localName === '
|
|
910
|
+
const isInteracting = e.composedPath().some((el) => el.localName === 'slot' && this.shadowRoot.contains(el));
|
|
911
911
|
this._setInteracting(isInteracting);
|
|
912
912
|
this.__updateHorizontalScrollPosition();
|
|
913
913
|
}
|
|
@@ -1069,10 +1069,12 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
1069
1069
|
* The event may either target table section, a row, a cell or contents of a cell.
|
|
1070
1070
|
* @param {Event} e
|
|
1071
1071
|
* @returns {GridEventLocation}
|
|
1072
|
-
* @
|
|
1072
|
+
* @protected
|
|
1073
1073
|
*/
|
|
1074
1074
|
_getGridEventLocation(e) {
|
|
1075
|
-
|
|
1075
|
+
// Use `composedPath()` stored by vaadin-context-menu gesture
|
|
1076
|
+
// to avoid problem when accessing it after a timeout on iOS
|
|
1077
|
+
const path = e.__composedPath || e.composedPath();
|
|
1076
1078
|
const tableIndex = path.indexOf(this.$.table);
|
|
1077
1079
|
// Assuming ascending path to table is: [...,] th|td, tr, thead|tbody, table [,...]
|
|
1078
1080
|
const section = tableIndex >= 1 ? path[tableIndex - 1] : null;
|
package/src/vaadin-grid-mixin.js
CHANGED
|
@@ -9,6 +9,7 @@ import { animationFrame, microTask } from '@vaadin/component-base/src/async.js';
|
|
|
9
9
|
import { isAndroid, isChrome, isFirefox, isIOS, isSafari, isTouch } from '@vaadin/component-base/src/browser-utils.js';
|
|
10
10
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
11
11
|
import { getClosestElement } from '@vaadin/component-base/src/dom-utils.js';
|
|
12
|
+
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
|
|
12
13
|
import { processTemplates } from '@vaadin/component-base/src/templates.js';
|
|
13
14
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
14
15
|
import { Virtualizer } from '@vaadin/component-base/src/virtualizer.js';
|
|
@@ -156,6 +157,18 @@ export const GridMixin = (superClass) =>
|
|
|
156
157
|
type: Boolean,
|
|
157
158
|
value: true,
|
|
158
159
|
},
|
|
160
|
+
|
|
161
|
+
/** @private */
|
|
162
|
+
__hasEmptyStateContent: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
value: false,
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
/** @private */
|
|
168
|
+
__emptyState: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
computed: '__computeEmptyState(_flatSize, __hasEmptyStateContent)',
|
|
171
|
+
},
|
|
159
172
|
};
|
|
160
173
|
}
|
|
161
174
|
|
|
@@ -261,6 +274,11 @@ export const GridMixin = (superClass) =>
|
|
|
261
274
|
this._tooltipController = new TooltipController(this);
|
|
262
275
|
this.addController(this._tooltipController);
|
|
263
276
|
this._tooltipController.setManual(true);
|
|
277
|
+
|
|
278
|
+
this.__emptyStateContentObserver = new SlotObserver(this.$.emptystateslot, ({ currentNodes }) => {
|
|
279
|
+
this.$.emptystatecell._content = currentNodes[0];
|
|
280
|
+
this.__hasEmptyStateContent = !!this.$.emptystatecell._content;
|
|
281
|
+
});
|
|
264
282
|
}
|
|
265
283
|
|
|
266
284
|
/** @private */
|
|
@@ -864,6 +882,11 @@ export const GridMixin = (superClass) =>
|
|
|
864
882
|
});
|
|
865
883
|
}
|
|
866
884
|
|
|
885
|
+
/** @private */
|
|
886
|
+
__computeEmptyState(flatSize, hasEmptyStateContent) {
|
|
887
|
+
return flatSize === 0 && hasEmptyStateContent;
|
|
888
|
+
}
|
|
889
|
+
|
|
867
890
|
/**
|
|
868
891
|
* @param {!Array<!GridColumn>} columnTree
|
|
869
892
|
* @protected
|
|
@@ -945,6 +968,7 @@ export const GridMixin = (superClass) =>
|
|
|
945
968
|
this._generateCellClassNames(row, model);
|
|
946
969
|
this._generateCellPartNames(row, model);
|
|
947
970
|
this._filterDragAndDrop(row, model);
|
|
971
|
+
this.__updateDragSourceParts(row, model);
|
|
948
972
|
|
|
949
973
|
iterateChildren(row, (cell) => {
|
|
950
974
|
if (cell._column && !cell._column.isConnected) {
|
|
@@ -94,7 +94,7 @@ export const RowDetailsMixin = (superClass) =>
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/** @private */
|
|
97
|
-
_detailsOpenedItemsChanged(
|
|
97
|
+
_detailsOpenedItemsChanged(_detailsOpenedItems, rowDetailsRenderer) {
|
|
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')) {
|
|
@@ -349,14 +349,14 @@ export const GridSelectionColumnBaseMixin = (superClass) =>
|
|
|
349
349
|
* @param {Object} item the item to select
|
|
350
350
|
* @protected
|
|
351
351
|
*/
|
|
352
|
-
_selectItem(
|
|
352
|
+
_selectItem(_item) {}
|
|
353
353
|
|
|
354
354
|
/**
|
|
355
355
|
* Override to handle the user deselecting an item.
|
|
356
356
|
* @param {Object} item the item to deselect
|
|
357
357
|
* @protected
|
|
358
358
|
*/
|
|
359
|
-
_deselectItem(
|
|
359
|
+
_deselectItem(_item) {}
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
362
|
* IOS needs indeterminate + checked at the same time
|
|
@@ -91,7 +91,7 @@ export const SelectionMixin = (superClass) =>
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/** @private */
|
|
94
|
-
__computeSelectedKeys(
|
|
94
|
+
__computeSelectedKeys(_itemIdPath, selectedItems) {
|
|
95
95
|
const selected = selectedItems || [];
|
|
96
96
|
const selectedKeys = new Set();
|
|
97
97
|
selected.forEach((item) => {
|
|
@@ -189,6 +189,32 @@ export const gridStyles = css`
|
|
|
189
189
|
overflow: hidden;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
/* Empty state */
|
|
193
|
+
|
|
194
|
+
#scroller:not([empty-state]) #emptystatebody,
|
|
195
|
+
#scroller[empty-state] #items {
|
|
196
|
+
display: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
#emptystatebody {
|
|
200
|
+
display: flex;
|
|
201
|
+
position: sticky;
|
|
202
|
+
inset: 0;
|
|
203
|
+
flex: 1;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
#emptystaterow {
|
|
208
|
+
display: flex;
|
|
209
|
+
flex: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
#emptystatecell {
|
|
213
|
+
display: block;
|
|
214
|
+
flex: 1;
|
|
215
|
+
overflow: auto;
|
|
216
|
+
}
|
|
217
|
+
|
|
192
218
|
/* Reordering styles */
|
|
193
219
|
:host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
|
|
194
220
|
:host([reordering]) [part~='resize-handle'],
|
package/src/vaadin-grid.d.ts
CHANGED
|
@@ -205,6 +205,7 @@ export type GridDefaultItem = any;
|
|
|
205
205
|
* `reorder-allowed-cell` | Cell in a column where another column can be reordered
|
|
206
206
|
* `reorder-dragging-cell` | Cell in a column currently being reordered
|
|
207
207
|
* `resize-handle` | Handle for resizing the columns
|
|
208
|
+
* `empty-state` | The container for the content to be displayed when there are no body rows to show
|
|
208
209
|
* `reorder-ghost` | Ghost element of the header cell being dragged
|
|
209
210
|
*
|
|
210
211
|
* The following state attributes are available for styling:
|
package/src/vaadin-grid.js
CHANGED
|
@@ -190,7 +190,8 @@ registerStyles('vaadin-grid', gridStyles, { moduleId: 'vaadin-grid-styles' });
|
|
|
190
190
|
* `collapsed-row-cell` | Cell in a collapsed row
|
|
191
191
|
* `expanded-row-cell` | Cell in an expanded row
|
|
192
192
|
* `details-opened-row-cell` | Cell in an row with details open
|
|
193
|
-
* `dragstart-row-cell` | Cell in
|
|
193
|
+
* `dragstart-row-cell` | Cell in the ghost image row, but not in a source row
|
|
194
|
+
* `drag-source-row-cell` | Cell in a source row, but not in the ghost image
|
|
194
195
|
* `dragover-above-row-cell` | Cell in a row that has another row dragged over above
|
|
195
196
|
* `dragover-below-row-cell` | Cell in a row that has another row dragged over below
|
|
196
197
|
* `dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top
|
|
@@ -205,6 +206,7 @@ registerStyles('vaadin-grid', gridStyles, { moduleId: 'vaadin-grid-styles' });
|
|
|
205
206
|
* `reorder-allowed-cell` | Cell in a column where another column can be reordered
|
|
206
207
|
* `reorder-dragging-cell` | Cell in a column currently being reordered
|
|
207
208
|
* `resize-handle` | Handle for resizing the columns
|
|
209
|
+
* `empty-state` | The container for the content to be displayed when there are no body rows to show
|
|
208
210
|
* `reorder-ghost` | Ghost element of the header cell being dragged
|
|
209
211
|
*
|
|
210
212
|
* The following state attributes are available for styling:
|
|
@@ -268,11 +270,19 @@ class Grid extends GridMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerE
|
|
|
268
270
|
ios$="[[_ios]]"
|
|
269
271
|
loading$="[[loading]]"
|
|
270
272
|
column-reordering-allowed$="[[columnReorderingAllowed]]"
|
|
273
|
+
empty-state$="[[__emptyState]]"
|
|
271
274
|
>
|
|
272
275
|
<table id="table" role="treegrid" aria-multiselectable="true" tabindex="0">
|
|
273
276
|
<caption id="sizer" part="row"></caption>
|
|
274
277
|
<thead id="header" role="rowgroup"></thead>
|
|
275
278
|
<tbody id="items" role="rowgroup"></tbody>
|
|
279
|
+
<tbody id="emptystatebody">
|
|
280
|
+
<tr id="emptystaterow">
|
|
281
|
+
<td part="empty-state" id="emptystatecell" tabindex="0">
|
|
282
|
+
<slot name="empty-state" id="emptystateslot"></slot>
|
|
283
|
+
</td>
|
|
284
|
+
</tr>
|
|
285
|
+
</tbody>
|
|
276
286
|
<tfoot id="footer" role="rowgroup"></tfoot>
|
|
277
287
|
</table>
|
|
278
288
|
|
package/src/vaadin-lit-grid.js
CHANGED
|
@@ -40,11 +40,19 @@ class Grid extends GridMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)
|
|
|
40
40
|
ios="${isIOS}"
|
|
41
41
|
?loading="${this.loading}"
|
|
42
42
|
column-reordering-allowed="${this.columnReorderingAllowed}"
|
|
43
|
+
?empty-state="${this.__emptyState}"
|
|
43
44
|
>
|
|
44
45
|
<table id="table" role="treegrid" aria-multiselectable="true" tabindex="0">
|
|
45
46
|
<caption id="sizer" part="row"></caption>
|
|
46
47
|
<thead id="header" role="rowgroup"></thead>
|
|
47
48
|
<tbody id="items" role="rowgroup"></tbody>
|
|
49
|
+
<tbody id="emptystatebody">
|
|
50
|
+
<tr id="emptystaterow">
|
|
51
|
+
<td part="empty-state" id="emptystatecell" tabindex="0">
|
|
52
|
+
<slot name="empty-state" id="emptystateslot"></slot>
|
|
53
|
+
</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
48
56
|
<tfoot id="footer" role="rowgroup"></tfoot>
|
|
49
57
|
</table>
|
|
50
58
|
|
|
@@ -90,6 +90,12 @@ registerStyles(
|
|
|
90
90
|
z-index: 3;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/* Empty state */
|
|
94
|
+
[part~='empty-state'] {
|
|
95
|
+
padding: var(--lumo-space-m);
|
|
96
|
+
color: var(--lumo-secondary-text-color);
|
|
97
|
+
}
|
|
98
|
+
|
|
93
99
|
/* Drag and Drop styles */
|
|
94
100
|
:host([dragover])::after {
|
|
95
101
|
content: '';
|
|
@@ -346,6 +352,10 @@ registerStyles(
|
|
|
346
352
|
min-height: calc(var(--lumo-size-s) - var(--_lumo-grid-border-width));
|
|
347
353
|
}
|
|
348
354
|
|
|
355
|
+
:host([theme~='compact']) [part~='empty-state'] {
|
|
356
|
+
padding: var(--lumo-space-s);
|
|
357
|
+
}
|
|
358
|
+
|
|
349
359
|
/* Wrap cell contents */
|
|
350
360
|
|
|
351
361
|
:host([theme~='wrap-cell-content']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
|
|
@@ -28,7 +28,9 @@ registerStyles(
|
|
|
28
28
|
font-family: 'material-icons';
|
|
29
29
|
font-size: 18px;
|
|
30
30
|
line-height: 18px;
|
|
31
|
-
transition:
|
|
31
|
+
transition:
|
|
32
|
+
0.1s opacity cubic-bezier(0.4, 0, 0.2, 0.1),
|
|
33
|
+
0.1s width cubic-bezier(0.4, 0, 0.2, 0.1);
|
|
32
34
|
opacity: 0.5;
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -151,6 +151,12 @@ registerStyles(
|
|
|
151
151
|
z-index: 3;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/* Empty state */
|
|
155
|
+
[part~='empty-state'] {
|
|
156
|
+
padding: 16px;
|
|
157
|
+
color: var(--material-secondary-text-color);
|
|
158
|
+
}
|
|
159
|
+
|
|
154
160
|
/* Drag and Drop styles */
|
|
155
161
|
:host([dragover])::after {
|
|
156
162
|
content: '';
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/grid",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.5.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
"name": "vaadin-grid-column",
|
|
241
|
-
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
241
|
+
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
242
242
|
"attributes": [
|
|
243
243
|
{
|
|
244
244
|
"name": "resizable",
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
},
|
|
952
952
|
{
|
|
953
953
|
"name": "vaadin-grid-selection-column",
|
|
954
|
-
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
954
|
+
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-items),\nthe column header gets an additional checkbox that can be used for toggling\nselection for all the items at once.\n\n__The default content can also be overridden__",
|
|
955
955
|
"attributes": [
|
|
956
956
|
{
|
|
957
957
|
"name": "resizable",
|
|
@@ -2152,7 +2152,7 @@
|
|
|
2152
2152
|
},
|
|
2153
2153
|
{
|
|
2154
2154
|
"name": "vaadin-grid",
|
|
2155
|
-
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in a row that user started to drag (set for one frame)\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
2155
|
+
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in the ghost image row, but not in a source row\n`drag-source-row-cell` | Cell in a source row, but not in the ghost image\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`empty-state` | The container for the content to be displayed when there are no body rows to show\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
2156
2156
|
"attributes": [
|
|
2157
2157
|
{
|
|
2158
2158
|
"name": "size",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/grid",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.5.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"name": "vaadin-grid-column",
|
|
103
|
-
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
103
|
+
"description": "A `<vaadin-grid-column>` is used to configure how a column in `<vaadin-grid>`\nshould look like.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
|
|
104
104
|
"extension": true,
|
|
105
105
|
"attributes": [
|
|
106
106
|
{
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
},
|
|
367
367
|
{
|
|
368
368
|
"name": "vaadin-grid-selection-column",
|
|
369
|
-
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
369
|
+
"description": "`<vaadin-grid-selection-column>` is a helper element for the `<vaadin-grid>`\nthat provides default renderers and functionality for item selection.\n\n#### Example:\n```html\n<vaadin-grid items=\"[[items]]\">\n <vaadin-grid-selection-column frozen auto-select></vaadin-grid-selection-column>\n\n <vaadin-grid-column>\n ...\n```\n\nBy default the selection column displays `<vaadin-checkbox>` elements in the\ncolumn cells. The checkboxes in the body rows toggle selection of the corresponding row items.\n\nWhen the grid data is provided as an array of [`items`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-items),\nthe column header gets an additional checkbox that can be used for toggling\nselection for all the items at once.\n\n__The default content can also be overridden__",
|
|
370
370
|
"extension": true,
|
|
371
371
|
"attributes": [
|
|
372
372
|
{
|
|
@@ -828,7 +828,7 @@
|
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
"name": "vaadin-grid",
|
|
831
|
-
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.4.6/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in a row that user started to drag (set for one frame)\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
831
|
+
"description": "`<vaadin-grid>` is a free, high quality data grid / data table Web Component. The content of the\nthe grid can be populated by using renderer callback function.\n\n### Quick Start\n\nStart with an assigning an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-column) element to configure the grid columns. Set `path` and `header`\nshorthand properties for the columns to define what gets rendered in the cells of the column.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column path=\"name.first\" header=\"First name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"name.last\" header=\"Last name\"></vaadin-grid-column>\n <vaadin-grid-column path=\"email\"></vaadin-grid-column>\n</vaadin-grid>\n```\n\nFor custom content `vaadin-grid-column` element provides you with three types of `renderer` callback functions: `headerRenderer`,\n`renderer` and `footerRenderer`.\n\nEach of those renderer functions provides `root`, `column`, `model` arguments when applicable.\nGenerate DOM content, append it to the `root` element and control the state\nof the host element by accessing `column`. Before generating new content,\nusers are able to check if there is already content in `root` for reusing it.\n\nRenderers are called on initialization of new column cells and each time the\nrelated row model is updated. DOM generated during the renderer call can be reused\nin the next renderer call and will be provided with the `root` argument.\nOn first call it will be empty.\n\n#### Example:\n```html\n<vaadin-grid>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n <vaadin-grid-column></vaadin-grid-column>\n</vaadin-grid>\n```\n```js\nconst grid = document.querySelector('vaadin-grid');\ngrid.items = [{'name': 'John', 'surname': 'Lennon', 'role': 'singer'},\n {'name': 'Ringo', 'surname': 'Starr', 'role': 'drums'}];\n\nconst columns = grid.querySelectorAll('vaadin-grid-column');\n\ncolumns[0].headerRenderer = function(root) {\n root.textContent = 'Name';\n};\ncolumns[0].renderer = function(root, column, model) {\n root.textContent = model.item.name;\n};\n\ncolumns[1].headerRenderer = function(root) {\n root.textContent = 'Surname';\n};\ncolumns[1].renderer = function(root, column, model) {\n root.textContent = model.item.surname;\n};\n\ncolumns[2].headerRenderer = function(root) {\n root.textContent = 'Role';\n};\ncolumns[2].renderer = function(root, column, model) {\n root.textContent = model.item.role;\n};\n```\n\nThe following properties are available in the `model` argument:\n\nProperty name | Type | Description\n--------------|------|------------\n`index`| Number | The index of the item.\n`item` | String or Object | The item.\n`level` | Number | Number of the item's tree sublevel, starts from 0.\n`expanded` | Boolean | True if the item's tree sublevel is expanded.\n`selected` | Boolean | True if the item is selected.\n`detailsOpened` | Boolean | True if the item's row details are open.\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid-tree-toggle)\n\n__Note that the helper elements must be explicitly imported.__\nIf you want to import everything at once you can use the `all-imports.html` bundle.\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively\nprovide the `<vaadin-grid>` data through the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-dataProvider) function property.\nThe `<vaadin-grid>` calls this function lazily, only when it needs more data\nto be displayed.\n\nSee the [`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha10/#/elements/vaadin-grid#property-dataProvider) property\ndocumentation for the detailed data provider arguments description.\n\n__Note that expanding the tree grid's item will trigger a call to the `dataProvider`.__\n\n__Also, note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```javascript\ngrid.dataProvider = ({page, pageSize}, callback) => {\n // page: the requested page index\n // pageSize: number of items on one page\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then(({ employees, totalSize }) => {\n callback(employees, totalSize);\n });\n};\n```\n\n__Alternatively, you can use the `size` property to set the total number of items:__\n\n```javascript\ngrid.size = 200; // The total number of items\ngrid.dataProvider = ({page, pageSize}, callback) => {\n const url = `https://api.example/data?page=${page}&per_page=${pageSize}`;\n\n fetch(url)\n .then((res) => res.json())\n .then((resJson) => callback(resJson.employees));\n};\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------------|----------------\n`row` | Row in the internal table\n`body-row` | Body row in the internal table\n`collapsed-row` | Collapsed row\n`expanded-row` | Expanded row\n`selected-row` | Selected row\n`details-opened-row` | Row with details open\n`odd-row` | Odd row\n`even-row` | Even row\n`first-row` | The first body row\n`last-row` | The last body row\n`dragstart-row` | Set on the row for one frame when drag is starting.\n`dragover-above-row` | Set on the row when the a row is dragged over above\n`dragover-below-row` | Set on the row when the a row is dragged over below\n`dragover-on-top-row` | Set on the row when the a row is dragged over on top\n`drag-disabled-row` | Set to a row that isn't available for dragging\n`drop-disabled-row` | Set to a row that can't be dropped on top of\n`cell` | Cell in the internal table\n`header-cell` | Header cell in the internal table\n`body-cell` | Body cell in the internal table\n`footer-cell` | Footer cell in the internal table\n`details-cell` | Row details cell in the internal table\n`focused-cell` | Focused cell in the internal table\n`odd-row-cell` | Cell in an odd row\n`even-row-cell` | Cell in an even row\n`first-row-cell` | Cell in the first body row\n`last-row-cell` | Cell in the last body row\n`first-header-row-cell` | Cell in the first header row\n`first-footer-row-cell` | Cell in the first footer row\n`last-header-row-cell` | Cell in the last header row\n`last-footer-row-cell` | Cell in the last footer row\n`loading-row-cell` | Cell in a row that is waiting for data from data provider\n`selected-row-cell` | Cell in a selected row\n`collapsed-row-cell` | Cell in a collapsed row\n`expanded-row-cell` | Cell in an expanded row\n`details-opened-row-cell` | Cell in an row with details open\n`dragstart-row-cell` | Cell in the ghost image row, but not in a source row\n`drag-source-row-cell` | Cell in a source row, but not in the ghost image\n`dragover-above-row-cell` | Cell in a row that has another row dragged over above\n`dragover-below-row-cell` | Cell in a row that has another row dragged over below\n`dragover-on-top-row-cell` | Cell in a row that has another row dragged over on top\n`drag-disabled-row-cell` | Cell in a row that isn't available for dragging\n`drop-disabled-row-cell` | Cell in a row that can't be dropped on top of\n`frozen-cell` | Frozen cell in the internal table\n`frozen-to-end-cell` | Frozen to end cell in the internal table\n`last-frozen-cell` | Last frozen cell\n`first-frozen-to-end-cell` | First cell frozen to end\n`first-column-cell` | First visible cell on a row\n`last-column-cell` | Last visible cell on a row\n`reorder-allowed-cell` | Cell in a column where another column can be reordered\n`reorder-dragging-cell` | Cell in a column currently being reordered\n`resize-handle` | Handle for resizing the columns\n`empty-state` | The container for the content to be displayed when there are no body rows to show\n`reorder-ghost` | Ghost element of the header cell being dragged\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n----------------------|---------------------------------------------------------------------------------------------------|-----------\n`loading` | Set when the grid is loading data from data provider | :host\n`interacting` | Keyboard navigation in interaction mode | :host\n`navigating` | Keyboard navigation in navigation mode | :host\n`overflow` | Set when rows are overflowing the grid viewport. Possible values: `top`, `bottom`, `start`, `end` | :host\n`reordering` | Set when the grid's columns are being reordered | :host\n`dragover` | Set when the grid (not a specific row) is dragged over | :host\n`dragging-rows` | Set when grid rows are dragged | :host\n`reorder-status` | Reflects the status of a cell while columns are being reordered | cell\n`frozen` | Frozen cell | cell\n`frozen-to-end` | Cell frozen to end | cell\n`last-frozen` | Last frozen cell | cell\n`first-frozen-to-end` | First cell frozen to end | cell\n`first-column` | First visible cell on a row | cell\n`last-column` | Last visible cell on a row | cell\n`selected` | Selected row | row\n`expanded` | Expanded row | row\n`details-opened` | Row with details open | row\n`loading` | Row that is waiting for data from data provider | row\n`odd` | Odd row | row\n`first` | The first body row | row\n`last` | The last body row | row\n`dragstart` | Set for one frame when starting to drag a row. The value is a number when dragging multiple rows | row\n`dragover` | Set when the row is dragged over | row\n`drag-disabled` | Set to a row that isn't available for dragging | row\n`drop-disabled` | Set to a row that can't be dropped on top of | row\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
832
832
|
"extension": true,
|
|
833
833
|
"attributes": [
|
|
834
834
|
{
|