@vaadin/grid 25.0.0-alpha6 → 25.0.0-alpha8

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.
@@ -6,15 +6,13 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const gridFilterStyles = css`
9
- @layer base {
10
- :host {
11
- display: inline-flex;
12
- max-width: 100%;
13
- }
9
+ :host {
10
+ display: inline-flex;
11
+ max-width: 100%;
12
+ }
14
13
 
15
- ::slotted(*) {
16
- width: 100%;
17
- box-sizing: border-box;
18
- }
14
+ ::slotted(*) {
15
+ width: 100%;
16
+ box-sizing: border-box;
19
17
  }
20
18
  `;
@@ -7,59 +7,57 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const gridSorterStyles = css`
10
- @layer base {
11
- :host {
12
- display: inline-flex;
13
- align-items: center;
14
- cursor: pointer;
15
- max-width: 100%;
16
- gap: var(--vaadin-gap-container-inline);
17
- -webkit-user-select: none;
18
- user-select: none;
19
- -webkit-tap-highlight-color: transparent;
20
- }
10
+ :host {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ cursor: pointer;
14
+ max-width: 100%;
15
+ gap: var(--vaadin-gap-container-inline);
16
+ -webkit-user-select: none;
17
+ user-select: none;
18
+ -webkit-tap-highlight-color: transparent;
19
+ }
21
20
 
22
- [part='content'] {
23
- flex: 1 1 auto;
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- }
21
+ [part='content'] {
22
+ flex: 1 1 auto;
23
+ overflow: hidden;
24
+ text-overflow: ellipsis;
25
+ }
27
26
 
28
- [part='indicators'] {
29
- position: relative;
30
- flex: none;
31
- }
27
+ [part='indicators'] {
28
+ position: relative;
29
+ flex: none;
30
+ }
32
31
 
33
- [part='order'] {
34
- display: inline;
35
- vertical-align: super;
36
- font-size: 0.75em;
37
- line-height: 1;
38
- }
32
+ [part='order'] {
33
+ display: inline;
34
+ vertical-align: super;
35
+ font-size: 0.75em;
36
+ line-height: 1;
37
+ }
39
38
 
40
- [part='indicators']::before {
41
- content: '';
42
- display: inline-block;
43
- height: 12px;
44
- width: 8px;
45
- mask-image: var(--_vaadin-icon-sort);
46
- background: currentColor;
47
- }
39
+ [part='indicators']::before {
40
+ content: '';
41
+ display: inline-block;
42
+ height: 12px;
43
+ width: 8px;
44
+ mask-image: var(--_vaadin-icon-sort);
45
+ background: currentColor;
46
+ }
48
47
 
49
- :host([direction]) [part='indicators']::before {
50
- padding-bottom: 6px;
51
- height: 6px;
52
- mask-clip: content-box;
53
- }
48
+ :host([direction]) [part='indicators']::before {
49
+ padding-bottom: 6px;
50
+ height: 6px;
51
+ mask-clip: content-box;
52
+ }
54
53
 
55
- :host([direction='desc']) [part='indicators']::before {
56
- padding-block: 6px 0;
57
- }
54
+ :host([direction='desc']) [part='indicators']::before {
55
+ padding-block: 6px 0;
56
+ }
58
57
 
59
- @media (forced-colors: active) {
60
- [part='indicators']::before {
61
- background: CanvasText;
62
- }
58
+ @media (forced-colors: active) {
59
+ [part='indicators']::before {
60
+ background: CanvasText;
63
61
  }
64
62
  }
65
63
  `;
@@ -7,72 +7,70 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const gridTreeToggleStyles = css`
10
- @layer base {
11
- :host {
12
- display: flex;
13
- max-width: 100%;
14
- pointer-events: none;
15
- }
10
+ :host {
11
+ display: flex;
12
+ max-width: 100%;
13
+ pointer-events: none;
14
+ }
16
15
 
17
- /* Don't expand/collapse when clicking #level-spacer */
18
- [part] {
19
- pointer-events: auto;
20
- }
16
+ /* Don't expand/collapse when clicking #level-spacer */
17
+ [part] {
18
+ pointer-events: auto;
19
+ }
21
20
 
22
- :host([hidden]) {
23
- display: none !important;
24
- }
21
+ :host([hidden]) {
22
+ display: none !important;
23
+ }
25
24
 
26
- :host(:not([leaf])) {
27
- cursor: var(--vaadin-clickable-cursor);
28
- }
25
+ :host(:not([leaf])) {
26
+ cursor: var(--vaadin-clickable-cursor);
27
+ }
29
28
 
30
- #level-spacer,
31
- [part='toggle'] {
32
- flex: none;
33
- }
29
+ #level-spacer,
30
+ [part='toggle'] {
31
+ flex: none;
32
+ }
34
33
 
35
- #level-spacer {
36
- width: calc(var(--_level, 0) * var(--vaadin-grid-tree-toggle-level-offset, 1em));
37
- }
34
+ #level-spacer {
35
+ width: calc(var(--_level, 0) * var(--vaadin-grid-tree-toggle-level-offset, 16px));
36
+ }
38
37
 
39
- [part='toggle'] {
40
- margin-inline-end: var(--vaadin-gap-container-inline);
41
- }
38
+ [part='toggle'] {
39
+ margin-inline-end: var(--vaadin-gap-container-inline);
40
+ }
42
41
 
43
- [part='toggle']::before {
44
- content: '';
45
- display: block;
46
- width: var(--vaadin-icon-size, 1lh);
47
- height: var(--vaadin-icon-size, 1lh);
48
- background: currentColor;
49
- mask-image: var(--_vaadin-icon-chevron-down);
50
- }
42
+ [part='toggle']::before {
43
+ content: '';
44
+ display: block;
45
+ width: var(--vaadin-icon-size, 1lh);
46
+ height: var(--vaadin-icon-size, 1lh);
47
+ background: currentColor;
48
+ mask-image: var(--_vaadin-icon-chevron-down);
49
+ }
51
50
 
52
- :host(:not([expanded])) [part='toggle']::before {
53
- rotate: -90deg;
54
- }
51
+ :host(:not([expanded])) [part='toggle']::before {
52
+ rotate: -90deg;
53
+ }
55
54
 
56
- @media (prefers-reduced-motion: no-preference) {
57
- [part='toggle']::before {
58
- transition: rotate 120ms;
59
- }
55
+ @media (prefers-reduced-motion: no-preference) {
56
+ [part='toggle']::before {
57
+ transition: rotate 120ms;
60
58
  }
59
+ }
61
60
 
62
- :host([leaf]) [part='toggle'] {
63
- visibility: hidden;
64
- }
61
+ :host([leaf]) [part='toggle'] {
62
+ visibility: hidden;
63
+ }
65
64
 
66
- slot {
67
- display: block;
68
- overflow: hidden;
69
- text-overflow: ellipsis;
70
- }
65
+ slot {
66
+ display: block;
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ }
71
70
 
72
- @media (forced-colors: active) {
73
- [part='toggle']::before {
74
- background: CanvasText;
75
- }
71
+ @media (forced-colors: active) {
72
+ [part='toggle']::before {
73
+ background: CanvasText;
76
74
  }
77
75
  }
78
76
  `;
@@ -7,7 +7,6 @@ import { microTask, timeOut } from '@vaadin/component-base/src/async.js';
7
7
  import { DataProviderController } from '@vaadin/component-base/src/data-provider-controller/data-provider-controller.js';
8
8
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
9
9
  import { get } from '@vaadin/component-base/src/path-utils.js';
10
- import { getBodyRowCells, updateCellsPart, updateState } from './vaadin-grid-helpers.js';
11
10
 
12
11
  /**
13
12
  * @polymerMixin
@@ -182,46 +181,20 @@ export const DataProviderMixin = (superClass) =>
182
181
  this.requestContentUpdate();
183
182
  }
184
183
 
185
- /**
186
- * @param {number} index
187
- * @param {HTMLElement} el
188
- * @protected
189
- */
190
- _getItem(index, el) {
191
- el.index = index;
192
-
193
- const { item } = this._dataProviderController.getFlatIndexContext(index);
194
- if (item) {
195
- this.__updateLoading(el, false);
196
- this._updateItem(el, item);
197
- if (this._isExpanded(item)) {
198
- this._dataProviderController.ensureFlatIndexHierarchy(index);
199
- }
200
- } else {
201
- this.__updateLoading(el, true);
202
- this._dataProviderController.ensureFlatIndexLoaded(index);
203
- }
184
+ /** @private */
185
+ __getRowItem(row) {
186
+ const { item } = this._dataProviderController.getFlatIndexContext(row.index);
187
+ return item;
204
188
  }
205
189
 
206
- /**
207
- * @param {!HTMLElement} row
208
- * @param {boolean} loading
209
- * @private
210
- */
211
- __updateLoading(row, loading) {
212
- const cells = getBodyRowCells(row);
213
-
214
- // Row state attribute
215
- updateState(row, 'loading', loading);
216
-
217
- // Cells part attribute
218
- updateCellsPart(cells, 'loading-row-cell', loading);
190
+ /** @private */
191
+ __ensureRowItem(row) {
192
+ this._dataProviderController.ensureFlatIndexLoaded(row.index);
193
+ }
219
194
 
220
- if (loading) {
221
- // Run style generators for the loading row to have custom names cleared
222
- this._generateCellClassNames(row);
223
- this._generateCellPartNames(row);
224
- }
195
+ /** @private */
196
+ __ensureRowHierarchy(row) {
197
+ this._dataProviderController.ensureFlatIndexHierarchy(row.index);
225
198
  }
226
199
 
227
200
  /**
@@ -302,7 +275,7 @@ export const DataProviderMixin = (superClass) =>
302
275
  if (this._flatSize !== this._dataProviderController.flatSize) {
303
276
  // Schedule an update of all rendered rows by _debouncerApplyCachedData,
304
277
  // to ensure that all pages associated with the rendered rows are loaded.
305
- this._shouldUpdateAllRenderedRowsAfterPageLoad = true;
278
+ this._shouldLoadAllRenderedRowsAfterPageLoad = true;
306
279
 
307
280
  // TODO: Updating the flat size property can still result in a synchonous virtualizer update
308
281
  // if the size change requires the virtualizer to increase the amount of physical elements
@@ -312,9 +285,7 @@ export const DataProviderMixin = (superClass) =>
312
285
  }
313
286
 
314
287
  // After updating the cache, check if some of the expanded items should have sub-caches loaded
315
- this._getRenderedRows().forEach((row) => {
316
- this._dataProviderController.ensureFlatIndexHierarchy(row.index);
317
- });
288
+ this._getRenderedRows().forEach((row) => this.__ensureRowHierarchy(row));
318
289
 
319
290
  this._hasData = true;
320
291
  }
@@ -325,13 +296,14 @@ export const DataProviderMixin = (superClass) =>
325
296
  this._debouncerApplyCachedData = Debouncer.debounce(this._debouncerApplyCachedData, timeOut.after(0), () => {
326
297
  this._setLoading(false);
327
298
 
328
- const shouldUpdateAllRenderedRowsAfterPageLoad = this._shouldUpdateAllRenderedRowsAfterPageLoad;
329
- this._shouldUpdateAllRenderedRowsAfterPageLoad = false;
299
+ const shouldLoadAllRenderedRowsAfterPageLoad = this._shouldLoadAllRenderedRowsAfterPageLoad;
300
+ this._shouldLoadAllRenderedRowsAfterPageLoad = false;
330
301
 
331
302
  this._getRenderedRows().forEach((row) => {
332
- const { item } = this._dataProviderController.getFlatIndexContext(row.index);
333
- if (item || shouldUpdateAllRenderedRowsAfterPageLoad) {
334
- this._getItem(row.index, row);
303
+ this.__updateRow(row);
304
+
305
+ if (shouldLoadAllRenderedRowsAfterPageLoad) {
306
+ this.__ensureRowItem(row);
335
307
  }
336
308
  });
337
309
 
@@ -41,7 +41,7 @@ import { GridFilterElementMixin } from './vaadin-grid-filter-element-mixin.js';
41
41
  * @extends HTMLElement
42
42
  * @mixes GridFilterElementMixin
43
43
  */
44
- class GridFilter extends GridFilterElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))) {
44
+ class GridFilter extends GridFilterElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
45
45
  static get is() {
46
46
  return 'vaadin-grid-filter';
47
47
  }
@@ -28,6 +28,7 @@ import {
28
28
  iterateRowCells,
29
29
  updateBooleanRowStates,
30
30
  updateCellsPart,
31
+ updateState,
31
32
  } from './vaadin-grid-helpers.js';
32
33
  import { KeyboardNavigationMixin } from './vaadin-grid-keyboard-navigation-mixin.js';
33
34
  import { RowDetailsMixin } from './vaadin-grid-row-details-mixin.js';
@@ -345,7 +346,7 @@ export const GridMixin = (superClass) =>
345
346
  row.setAttribute('role', 'row');
346
347
  row.setAttribute('tabindex', '-1');
347
348
  if (this._columnTree) {
348
- this._updateRow(row, this._columnTree[this._columnTree.length - 1], 'body', false, true);
349
+ this.__initRow(row, this._columnTree[this._columnTree.length - 1], 'body', false, true);
349
350
  }
350
351
  rows.push(row);
351
352
  }
@@ -457,9 +458,9 @@ export const GridMixin = (superClass) =>
457
458
  * @param {?string} section
458
459
  * @param {boolean} isColumnRow
459
460
  * @param {boolean} noNotify
460
- * @protected
461
+ * @private
461
462
  */
462
- _updateRow(row, columns, section = 'body', isColumnRow = false, noNotify = false) {
463
+ __initRow(row, columns, section = 'body', isColumnRow = false, noNotify = false) {
463
464
  const contentsFragment = document.createDocumentFragment();
464
465
 
465
466
  iterateRowCells(row, (cell) => {
@@ -639,10 +640,15 @@ export const GridMixin = (superClass) =>
639
640
  return;
640
641
  }
641
642
 
643
+ row.index = index;
644
+
642
645
  this._updateRowOrderParts(row, index);
643
646
 
644
647
  this._a11yUpdateRowRowindex(row, index);
645
- this._getItem(index, row);
648
+
649
+ this.__ensureRowItem(row);
650
+ this.__ensureRowHierarchy(row);
651
+ this.__updateRow(row);
646
652
  }
647
653
 
648
654
  /** @private */
@@ -683,7 +689,7 @@ export const GridMixin = (superClass) =>
683
689
  */
684
690
  _renderColumnTree(columnTree) {
685
691
  iterateChildren(this.$.items, (row) => {
686
- this._updateRow(row, columnTree[columnTree.length - 1], 'body', false, true);
692
+ this.__initRow(row, columnTree[columnTree.length - 1], 'body', false, true);
687
693
 
688
694
  const model = this.__getRowModel(row);
689
695
  this._updateRowOrderParts(row);
@@ -710,7 +716,7 @@ export const GridMixin = (superClass) =>
710
716
  }
711
717
 
712
718
  iterateChildren(this.$.header, (headerRow, index, rows) => {
713
- this._updateRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1);
719
+ this.__initRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1);
714
720
 
715
721
  const cells = getBodyRowCells(headerRow);
716
722
  updateCellsPart(cells, 'first-header-row-cell', index === 0);
@@ -718,7 +724,7 @@ export const GridMixin = (superClass) =>
718
724
  });
719
725
 
720
726
  iterateChildren(this.$.footer, (footerRow, index, rows) => {
721
- this._updateRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0);
727
+ this.__initRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0);
722
728
 
723
729
  const cells = getBodyRowCells(footerRow);
724
730
  updateCellsPart(cells, 'first-footer-row-cell', index === 0);
@@ -726,7 +732,7 @@ export const GridMixin = (superClass) =>
726
732
  });
727
733
 
728
734
  // Sizer rows
729
- this._updateRow(this.$.sizer, columnTree[columnTree.length - 1]);
735
+ this.__initRow(this.$.sizer, columnTree[columnTree.length - 1]);
730
736
 
731
737
  this._resizeHandler();
732
738
  this._frozenCellsChanged();
@@ -741,10 +747,38 @@ export const GridMixin = (superClass) =>
741
747
 
742
748
  /**
743
749
  * @param {!HTMLElement} row
744
- * @param {GridItem} item
745
- * @protected
750
+ * @param {boolean} loading
751
+ * @private
746
752
  */
747
- _updateItem(row, item) {
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
772
+ */
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
+
748
782
  row._item = item;
749
783
  const model = this.__getRowModel(row);
750
784
 
@@ -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._updateRow(row, this._columnTree[this._columnTree.length - 1]);
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._updateItem(row, row._item);
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._updateItem(row, row._item);
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 `_updateItem` method.
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
  }
@@ -57,7 +57,7 @@ import { GridSorterMixin } from './vaadin-grid-sorter-mixin.js';
57
57
  * @mixes ThemableMixin
58
58
  * @mixes DirMixin
59
59
  */
60
- class GridSorter extends GridSorterMixin(ThemableMixin(DirMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
60
+ class GridSorter extends GridSorterMixin(ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
61
61
  static get is() {
62
62
  return 'vaadin-grid-sorter';
63
63
  }
@@ -67,7 +67,7 @@ import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
67
67
  * @mixes GridTreeToggleMixin
68
68
  */
69
69
  class GridTreeToggle extends GridTreeToggleMixin(
70
- ThemableMixin(DirMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
70
+ ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
71
71
  ) {
72
72
  static get is() {
73
73
  return 'vaadin-grid-tree-toggle';
@@ -262,7 +262,7 @@ import { GridMixin } from './vaadin-grid-mixin.js';
262
262
  * @mixes GridMixin
263
263
  * @mixes ThemableMixin
264
264
  */
265
- class Grid extends GridMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
265
+ class Grid extends GridMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
266
266
  static get is() {
267
267
  return 'vaadin-grid';
268
268
  }
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": "25.0.0-alpha6",
4
+ "version": "25.0.0-alpha8",
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/25.0.0-alpha6/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<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/25.0.0-alpha8/#/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>\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/25.0.0-alpha6/#/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__",
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>\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/25.0.0-alpha8/#/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/25.0.0-alpha6/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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/25.0.0-alpha6/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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.js` entrypoint.\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/25.0.0-alpha6/#/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/25.0.0-alpha6/#/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`nonselectable-row` | Row that the user may not select or deselect\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`nonselectable-row-cell` | Cell in a row that the user may not select or deselect\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.",
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/25.0.0-alpha8/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/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/25.0.0-alpha8/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/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.js` entrypoint.\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/25.0.0-alpha8/#/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/25.0.0-alpha8/#/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`nonselectable-row` | Row that the user may not select or deselect\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`nonselectable-row-cell` | Cell in a row that the user may not select or deselect\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": "accessible-name",