@vaadin/grid 25.3.0-alpha7 → 25.3.0-dev.1fa5a51482

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.
@@ -1723,33 +1723,6 @@
1723
1723
  }
1724
1724
  ]
1725
1725
  },
1726
- {
1727
- "kind": "javascript-module",
1728
- "path": "src/vaadin-grid-column-rendering-mixin.js",
1729
- "declarations": [
1730
- {
1731
- "kind": "mixin",
1732
- "description": "A mixin providing rendering of rows based on the column tree.",
1733
- "name": "ColumnRenderingMixin",
1734
- "members": [],
1735
- "parameters": [
1736
- {
1737
- "name": "superClass"
1738
- }
1739
- ]
1740
- }
1741
- ],
1742
- "exports": [
1743
- {
1744
- "kind": "js",
1745
- "name": "ColumnRenderingMixin",
1746
- "declaration": {
1747
- "name": "ColumnRenderingMixin",
1748
- "module": "src/vaadin-grid-column-rendering-mixin.js"
1749
- }
1750
- }
1751
- ]
1752
- },
1753
1726
  {
1754
1727
  "kind": "javascript-module",
1755
1728
  "path": "src/vaadin-grid-column-reordering-mixin.js",
@@ -3377,30 +3350,6 @@
3377
3350
  "name": "value-changed"
3378
3351
  }
3379
3352
  ],
3380
- "mixins": [
3381
- {
3382
- "name": "GridFilterElementMixin",
3383
- "module": "src/vaadin-grid-filter-element-mixin.js"
3384
- },
3385
- {
3386
- "name": "ThemableMixin",
3387
- "package": "@vaadin/vaadin-themable-mixin"
3388
- },
3389
- {
3390
- "name": "PolylitMixin",
3391
- "package": "@vaadin/component-base/src/polylit-mixin.js"
3392
- },
3393
- {
3394
- "name": "LumoInjectionMixin",
3395
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
3396
- }
3397
- ],
3398
- "superclass": {
3399
- "name": "LitElement",
3400
- "package": "lit"
3401
- },
3402
- "tagName": "vaadin-grid-filter",
3403
- "customElement": true,
3404
3353
  "attributes": [
3405
3354
  {
3406
3355
  "name": "path",
@@ -3414,6 +3363,13 @@
3414
3363
  "module": "src/vaadin-grid-filter-element-mixin.js"
3415
3364
  }
3416
3365
  },
3366
+ {
3367
+ "type": {
3368
+ "text": "string"
3369
+ },
3370
+ "description": "The theme variants to apply to the component.",
3371
+ "name": "theme"
3372
+ },
3417
3373
  {
3418
3374
  "name": "value",
3419
3375
  "type": {
@@ -3426,7 +3382,31 @@
3426
3382
  "module": "src/vaadin-grid-filter-element-mixin.js"
3427
3383
  }
3428
3384
  }
3429
- ]
3385
+ ],
3386
+ "mixins": [
3387
+ {
3388
+ "name": "GridFilterElementMixin",
3389
+ "module": "src/vaadin-grid-filter-element-mixin.js"
3390
+ },
3391
+ {
3392
+ "name": "ThemableMixin",
3393
+ "package": "@vaadin/vaadin-themable-mixin"
3394
+ },
3395
+ {
3396
+ "name": "PolylitMixin",
3397
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
3398
+ },
3399
+ {
3400
+ "name": "LumoInjectionMixin",
3401
+ "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
3402
+ }
3403
+ ],
3404
+ "superclass": {
3405
+ "name": "LitElement",
3406
+ "package": "lit"
3407
+ },
3408
+ "tagName": "vaadin-grid-filter",
3409
+ "customElement": true
3430
3410
  }
3431
3411
  ],
3432
3412
  "exports": [
@@ -3440,6 +3420,33 @@
3440
3420
  }
3441
3421
  ]
3442
3422
  },
3423
+ {
3424
+ "kind": "javascript-module",
3425
+ "path": "src/vaadin-grid-header-footer-rendering-mixin.js",
3426
+ "declarations": [
3427
+ {
3428
+ "kind": "mixin",
3429
+ "description": "A mixin providing rendering of header and footer rows based on the column tree.",
3430
+ "name": "HeaderFooterRenderingMixin",
3431
+ "members": [],
3432
+ "parameters": [
3433
+ {
3434
+ "name": "superClass"
3435
+ }
3436
+ ]
3437
+ }
3438
+ ],
3439
+ "exports": [
3440
+ {
3441
+ "kind": "js",
3442
+ "name": "HeaderFooterRenderingMixin",
3443
+ "declaration": {
3444
+ "name": "HeaderFooterRenderingMixin",
3445
+ "module": "src/vaadin-grid-header-footer-rendering-mixin.js"
3446
+ }
3447
+ }
3448
+ ]
3449
+ },
3443
3450
  {
3444
3451
  "kind": "javascript-module",
3445
3452
  "path": "src/vaadin-grid-helpers.js",
@@ -4767,8 +4774,8 @@
4767
4774
  "module": "src/vaadin-grid-dynamic-columns-mixin.js"
4768
4775
  },
4769
4776
  {
4770
- "name": "ColumnRenderingMixin",
4771
- "module": "src/vaadin-grid-column-rendering-mixin.js"
4777
+ "name": "HeaderFooterRenderingMixin",
4778
+ "module": "src/vaadin-grid-header-footer-rendering-mixin.js"
4772
4779
  },
4773
4780
  {
4774
4781
  "name": "ActiveItemMixin",
@@ -6799,6 +6806,39 @@
6799
6806
  }
6800
6807
  }
6801
6808
  ],
6809
+ "attributes": [
6810
+ {
6811
+ "name": "direction",
6812
+ "type": {
6813
+ "text": "string"
6814
+ },
6815
+ "description": "How to sort the data.\nPossible values are `asc` to use an ascending algorithm, `desc` to sort the data in\ndescending direction, or `null` for not sorting the data.",
6816
+ "fieldName": "direction",
6817
+ "inheritedFrom": {
6818
+ "name": "GridSorterMixin",
6819
+ "module": "src/vaadin-grid-sorter-mixin.js"
6820
+ }
6821
+ },
6822
+ {
6823
+ "name": "path",
6824
+ "type": {
6825
+ "text": "string"
6826
+ },
6827
+ "description": "JS Path of the property in the item used for sorting the data.",
6828
+ "fieldName": "path",
6829
+ "inheritedFrom": {
6830
+ "name": "GridSorterMixin",
6831
+ "module": "src/vaadin-grid-sorter-mixin.js"
6832
+ }
6833
+ },
6834
+ {
6835
+ "type": {
6836
+ "text": "string"
6837
+ },
6838
+ "description": "The theme variants to apply to the component.",
6839
+ "name": "theme"
6840
+ }
6841
+ ],
6802
6842
  "mixins": [
6803
6843
  {
6804
6844
  "name": "GridSorterMixin",
@@ -6826,33 +6866,7 @@
6826
6866
  "package": "lit"
6827
6867
  },
6828
6868
  "tagName": "vaadin-grid-sorter",
6829
- "customElement": true,
6830
- "attributes": [
6831
- {
6832
- "name": "direction",
6833
- "type": {
6834
- "text": "string"
6835
- },
6836
- "description": "How to sort the data.\nPossible values are `asc` to use an ascending algorithm, `desc` to sort the data in\ndescending direction, or `null` for not sorting the data.",
6837
- "fieldName": "direction",
6838
- "inheritedFrom": {
6839
- "name": "GridSorterMixin",
6840
- "module": "src/vaadin-grid-sorter-mixin.js"
6841
- }
6842
- },
6843
- {
6844
- "name": "path",
6845
- "type": {
6846
- "text": "string"
6847
- },
6848
- "description": "JS Path of the property in the item used for sorting the data.",
6849
- "fieldName": "path",
6850
- "inheritedFrom": {
6851
- "name": "GridSorterMixin",
6852
- "module": "src/vaadin-grid-sorter-mixin.js"
6853
- }
6854
- }
6855
- ]
6869
+ "customElement": true
6856
6870
  }
6857
6871
  ],
6858
6872
  "exports": [
@@ -7568,34 +7582,6 @@
7568
7582
  "name": "expanded-changed"
7569
7583
  }
7570
7584
  ],
7571
- "mixins": [
7572
- {
7573
- "name": "GridTreeToggleMixin",
7574
- "module": "src/vaadin-grid-tree-toggle-mixin.js"
7575
- },
7576
- {
7577
- "name": "ThemableMixin",
7578
- "package": "@vaadin/vaadin-themable-mixin"
7579
- },
7580
- {
7581
- "name": "DirMixin",
7582
- "package": "@vaadin/component-base/src/dir-mixin.js"
7583
- },
7584
- {
7585
- "name": "PolylitMixin",
7586
- "package": "@vaadin/component-base/src/polylit-mixin.js"
7587
- },
7588
- {
7589
- "name": "LumoInjectionMixin",
7590
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
7591
- }
7592
- ],
7593
- "superclass": {
7594
- "name": "LitElement",
7595
- "package": "lit"
7596
- },
7597
- "tagName": "vaadin-grid-tree-toggle",
7598
- "customElement": true,
7599
7585
  "attributes": [
7600
7586
  {
7601
7587
  "name": "expanded",
@@ -7632,8 +7618,43 @@
7632
7618
  "name": "GridTreeToggleMixin",
7633
7619
  "module": "src/vaadin-grid-tree-toggle-mixin.js"
7634
7620
  }
7621
+ },
7622
+ {
7623
+ "type": {
7624
+ "text": "string"
7625
+ },
7626
+ "description": "The theme variants to apply to the component.",
7627
+ "name": "theme"
7635
7628
  }
7636
- ]
7629
+ ],
7630
+ "mixins": [
7631
+ {
7632
+ "name": "GridTreeToggleMixin",
7633
+ "module": "src/vaadin-grid-tree-toggle-mixin.js"
7634
+ },
7635
+ {
7636
+ "name": "ThemableMixin",
7637
+ "package": "@vaadin/vaadin-themable-mixin"
7638
+ },
7639
+ {
7640
+ "name": "DirMixin",
7641
+ "package": "@vaadin/component-base/src/dir-mixin.js"
7642
+ },
7643
+ {
7644
+ "name": "PolylitMixin",
7645
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
7646
+ },
7647
+ {
7648
+ "name": "LumoInjectionMixin",
7649
+ "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
7650
+ }
7651
+ ],
7652
+ "superclass": {
7653
+ "name": "LitElement",
7654
+ "package": "lit"
7655
+ },
7656
+ "tagName": "vaadin-grid-tree-toggle",
7657
+ "customElement": true
7637
7658
  }
7638
7659
  ],
7639
7660
  "exports": [
@@ -8400,38 +8421,6 @@
8400
8421
  "name": "size-changed"
8401
8422
  }
8402
8423
  ],
8403
- "mixins": [
8404
- {
8405
- "name": "GridMixin",
8406
- "module": "src/vaadin-grid-mixin.js"
8407
- },
8408
- {
8409
- "name": "I18nMixin",
8410
- "package": "@vaadin/component-base/src/i18n-mixin.js"
8411
- },
8412
- {
8413
- "name": "ElementMixin",
8414
- "package": "@vaadin/component-base/src/element-mixin.js"
8415
- },
8416
- {
8417
- "name": "ThemableMixin",
8418
- "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
8419
- },
8420
- {
8421
- "name": "PolylitMixin",
8422
- "package": "@vaadin/component-base/src/polylit-mixin.js"
8423
- },
8424
- {
8425
- "name": "LumoInjectionMixin",
8426
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
8427
- }
8428
- ],
8429
- "superclass": {
8430
- "name": "LitElement",
8431
- "package": "lit"
8432
- },
8433
- "tagName": "vaadin-grid",
8434
- "customElement": true,
8435
8424
  "attributes": [
8436
8425
  {
8437
8426
  "name": "accessible-name",
@@ -8708,8 +8697,47 @@
8708
8697
  "name": "DataProviderMixin",
8709
8698
  "module": "src/vaadin-grid-data-provider-mixin.js"
8710
8699
  }
8700
+ },
8701
+ {
8702
+ "type": {
8703
+ "text": "string"
8704
+ },
8705
+ "description": "The theme variants to apply to the component.",
8706
+ "name": "theme"
8711
8707
  }
8712
- ]
8708
+ ],
8709
+ "mixins": [
8710
+ {
8711
+ "name": "GridMixin",
8712
+ "module": "src/vaadin-grid-mixin.js"
8713
+ },
8714
+ {
8715
+ "name": "I18nMixin",
8716
+ "package": "@vaadin/component-base/src/i18n-mixin.js"
8717
+ },
8718
+ {
8719
+ "name": "ElementMixin",
8720
+ "package": "@vaadin/component-base/src/element-mixin.js"
8721
+ },
8722
+ {
8723
+ "name": "ThemableMixin",
8724
+ "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
8725
+ },
8726
+ {
8727
+ "name": "PolylitMixin",
8728
+ "package": "@vaadin/component-base/src/polylit-mixin.js"
8729
+ },
8730
+ {
8731
+ "name": "LumoInjectionMixin",
8732
+ "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
8733
+ }
8734
+ ],
8735
+ "superclass": {
8736
+ "name": "LitElement",
8737
+ "package": "lit"
8738
+ },
8739
+ "tagName": "vaadin-grid",
8740
+ "customElement": true
8713
8741
  }
8714
8742
  ],
8715
8743
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid",
3
- "version": "25.3.0-alpha7",
3
+ "version": "25.3.0-dev.1fa5a51482",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -45,20 +45,20 @@
45
45
  ],
46
46
  "dependencies": {
47
47
  "@open-wc/dedupe-mixin": "^1.3.0",
48
- "@vaadin/a11y-base": "25.3.0-alpha7",
49
- "@vaadin/checkbox": "25.3.0-alpha7",
50
- "@vaadin/component-base": "25.3.0-alpha7",
51
- "@vaadin/lit-renderer": "25.3.0-alpha7",
52
- "@vaadin/text-field": "25.3.0-alpha7",
53
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha7",
48
+ "@vaadin/a11y-base": "25.3.0-dev.1fa5a51482",
49
+ "@vaadin/checkbox": "25.3.0-dev.1fa5a51482",
50
+ "@vaadin/component-base": "25.3.0-dev.1fa5a51482",
51
+ "@vaadin/lit-renderer": "25.3.0-dev.1fa5a51482",
52
+ "@vaadin/text-field": "25.3.0-dev.1fa5a51482",
53
+ "@vaadin/vaadin-themable-mixin": "25.3.0-dev.1fa5a51482",
54
54
  "lit": "^3.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@vaadin/aura": "25.3.0-alpha7",
58
- "@vaadin/chai-plugins": "25.3.0-alpha7",
59
- "@vaadin/test-runner-commands": "25.3.0-alpha7",
57
+ "@vaadin/aura": "25.3.0-dev.1fa5a51482",
58
+ "@vaadin/chai-plugins": "25.3.0-dev.1fa5a51482",
59
+ "@vaadin/test-runner-commands": "25.3.0-dev.1fa5a51482",
60
60
  "@vaadin/testing-helpers": "^2.0.0",
61
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha7",
61
+ "@vaadin/vaadin-lumo-styles": "25.3.0-dev.1fa5a51482",
62
62
  "sinon": "^22.0.0"
63
63
  },
64
64
  "customElements": "custom-elements.json",
@@ -66,5 +66,5 @@
66
66
  "web-types.json",
67
67
  "web-types.lit.json"
68
68
  ],
69
- "gitHead": "ae7b9823df5598faebd7a482993029ee489c35ae"
69
+ "gitHead": "1cd5964b758ffbce3ddb6248a1997f55f8e0ebf6"
70
70
  }
@@ -153,15 +153,6 @@ export const A11yMixin = (superClass) =>
153
153
  });
154
154
  }
155
155
 
156
- /**
157
- * @param {!HTMLElement} cell
158
- * @param {number} colspan
159
- * @private
160
- */
161
- __a11yUpdateCellColspan(cell, colspan) {
162
- cell.setAttribute('aria-colspan', Number(colspan));
163
- }
164
-
165
156
  /** @private */
166
157
  __a11yUpdateSorters() {
167
158
  Array.from(this.querySelectorAll('vaadin-grid-sorter')).forEach((sorter) => {
@@ -57,7 +57,7 @@ export const GridColumnGroupMixin = (superClass) =>
57
57
  '_groupFrozenChanged(frozen, _rootColumns)',
58
58
  '_groupFrozenToEndChanged(frozenToEnd, _rootColumns)',
59
59
  '_groupHiddenChanged(hidden)',
60
- '_colSpanChanged(_colSpan, _headerCell, _footerCell)',
60
+ '_colSpanChanged(_colSpan)',
61
61
  '_groupOrderChanged(_order, _rootColumns)',
62
62
  '_groupReorderStatusChanged(_reorderStatus, _rootColumns)',
63
63
  '_groupResizableChanged(resizable, _rootColumns)',
@@ -307,19 +307,8 @@ export const GridColumnGroupMixin = (superClass) =>
307
307
  }
308
308
 
309
309
  /** @private */
310
- _colSpanChanged(colSpan, headerCell, footerCell) {
311
- if (headerCell) {
312
- headerCell.setAttribute('colspan', colSpan);
313
- if (this._grid) {
314
- this._grid.__a11yUpdateCellColspan(headerCell, colSpan);
315
- }
316
- }
317
- if (footerCell) {
318
- footerCell.setAttribute('colspan', colSpan);
319
- if (this._grid) {
320
- this._grid.__a11yUpdateCellColspan(footerCell, colSpan);
321
- }
322
- }
310
+ _colSpanChanged() {
311
+ this._grid?.__scheduleRenderHeaderFooter?.();
323
312
  }
324
313
 
325
314
  /**
@@ -457,9 +457,12 @@ export const ColumnReorderingMixin = (superClass) =>
457
457
  }
458
458
  });
459
459
 
460
+ [...this.$.items.children, this.$.sizer].forEach((row) => {
461
+ this._updateFirstAndLastColumnForRow(row);
462
+ });
463
+
460
464
  this.__scheduleRenderHeaderFooter();
461
465
  this._debounceUpdateFrozenColumn();
462
- this._updateFirstAndLastColumn();
463
466
  }
464
467
 
465
468
  /**
@@ -143,11 +143,6 @@ export const DynamicColumnsMixin = (superClass) =>
143
143
  });
144
144
  }
145
145
 
146
- /** @protected */
147
- _updateFirstAndLastColumn() {
148
- Array.from(this.shadowRoot.querySelectorAll('tr')).forEach((row) => this._updateFirstAndLastColumnForRow(row));
149
- }
150
-
151
146
  /**
152
147
  * @param {!HTMLElement} row
153
148
  * @protected
@@ -37,6 +37,7 @@ import { GridFilterElementMixin } from './vaadin-grid-filter-element-mixin.js';
37
37
  *
38
38
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
39
39
  *
40
+ * @attr {string} theme - The theme variants to apply to the component.
40
41
  * @customElement vaadin-grid-filter
41
42
  * @extends HTMLElement
42
43
  */
@@ -5,9 +5,12 @@
5
5
  */
6
6
  import { html, nothing, render } from 'lit';
7
7
  import { cache } from 'lit/directives/cache.js';
8
+ import { classMap } from 'lit/directives/class-map.js';
9
+ import { ifDefined } from 'lit/directives/if-defined.js';
8
10
  import { repeat } from 'lit/directives/repeat.js';
9
11
  import { microTask } from '@vaadin/component-base/src/async.js';
10
12
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
13
+ import { partMap } from '@vaadin/component-base/src/directives/part-map.js';
11
14
  import { cellContent } from './directives/cell-content-directive.js';
12
15
 
13
16
  function isEmptyCell(column, level, columnTree) {
@@ -46,10 +49,10 @@ function isFooterRowVisible(columns, level, columnTree) {
46
49
  }
47
50
 
48
51
  /**
49
- * A mixin providing rendering of rows based on the column tree.
52
+ * A mixin providing rendering of header and footer rows based on the column tree.
50
53
  */
51
- export const ColumnRenderingMixin = (superClass) =>
52
- class ColumnRenderingMixin extends superClass {
54
+ export const HeaderFooterRenderingMixin = (superClass) =>
55
+ class HeaderFooterRenderingMixin extends superClass {
53
56
  /** @private */
54
57
  __scheduleRenderHeaderFooter() {
55
58
  this.__renderHeaderFooterDebouncer = Debouncer.debounce(this.__renderHeaderFooterDebouncer, microTask, () => {
@@ -77,10 +80,10 @@ export const ColumnRenderingMixin = (superClass) =>
77
80
  }
78
81
 
79
82
  #renderHeader(columnTree) {
80
- render(columnTree.map(this.#renderHeaderRow), this.$.header, { host: this });
83
+ const rows = this.#getRows(columnTree, 'header');
84
+ render(rows.map(this.#renderHeaderRow), this.$.header, { host: this });
81
85
 
82
86
  this.$.table.toggleAttribute('has-header', !!this.$.header.querySelector('tr:not([hidden])'));
83
- this.__updateHeaderFooterRowParts('header');
84
87
 
85
88
  this.$.header.querySelectorAll('.header-cell').forEach((cell) => {
86
89
  const column = cell._column;
@@ -93,19 +96,24 @@ export const ColumnRenderingMixin = (superClass) =>
93
96
  });
94
97
  }
95
98
 
96
- #renderHeaderRow = (columns, level, columnTree) => {
99
+ #renderHeaderRow = ({ level, cells, isLastRow, isFirstRow, isRowVisible }) => {
100
+ const rowParts = {
101
+ 'first-header-row': isFirstRow,
102
+ 'last-header-row': isLastRow,
103
+ };
104
+
97
105
  return html`
98
106
  <tr
99
107
  role="row"
100
- part="row header-row"
101
- class="row header-row"
108
+ part="row header-row${partMap(rowParts)}"
109
+ class="row header-row${classMap(rowParts)}"
102
110
  tabindex="-1"
103
- ?hidden=${!isHeaderRowVisible(columns, level, columnTree)}
111
+ ?hidden=${!isRowVisible}
104
112
  >
105
113
  ${repeat(
106
- columns,
107
- (column) => column._id,
108
- (column) => {
114
+ cells,
115
+ ({ column }) => column._id,
116
+ ({ column, isFirstCell, isLastCell }) => {
109
117
  // `cache` keeps the cell and its rendered content when the
110
118
  // column gets hidden, so it can be restored as-is when the
111
119
  // column is shown again.
@@ -113,15 +121,26 @@ export const ColumnRenderingMixin = (superClass) =>
113
121
  return cache(nothing);
114
122
  }
115
123
 
124
+ const cellParts = {
125
+ 'first-header-row-cell': isFirstRow,
126
+ 'last-header-row-cell': isLastRow,
127
+ 'first-column-cell': isFirstCell,
128
+ 'last-column-cell': isLastCell,
129
+ };
130
+
116
131
  return cache(html`
117
132
  <th
118
133
  role="columnheader"
119
- part="cell header-cell"
120
- class="cell header-cell"
134
+ part="cell header-cell${partMap(cellParts)}"
135
+ class="cell header-cell${classMap(cellParts)}"
136
+ ?first-column="${isFirstCell}"
137
+ ?last-column="${isLastCell}"
121
138
  @keydown="${this.__onCellKeyDown}"
122
139
  @mousedown=${this.__onCellMouseDown}
123
140
  @mouseenter=${this.__onCellMouseEnter}
124
141
  @mouseleave=${this.__onCellMouseLeave}
142
+ colspan="${ifDefined(column._colSpan)}"
143
+ aria-colspan="${ifDefined(column._colSpan)}"
125
144
  tabindex="-1"
126
145
  ._column=${column}
127
146
  >
@@ -136,10 +155,10 @@ export const ColumnRenderingMixin = (superClass) =>
136
155
  };
137
156
 
138
157
  #renderFooter(columnTree) {
139
- render(columnTree.map(this.#renderFooterRow).toReversed(), this.$.footer, { host: this });
158
+ const rows = this.#getRows(columnTree, 'footer');
159
+ render(rows.map(this.#renderFooterRow), this.$.footer, { host: this });
140
160
 
141
161
  this.$.table.toggleAttribute('has-footer', !!this.$.footer.querySelector('tr:not([hidden])'));
142
- this.__updateHeaderFooterRowParts('footer');
143
162
 
144
163
  this.$.footer.querySelectorAll('.footer-cell').forEach((cell) => {
145
164
  const column = cell._column;
@@ -152,19 +171,24 @@ export const ColumnRenderingMixin = (superClass) =>
152
171
  });
153
172
  }
154
173
 
155
- #renderFooterRow = (columns, level, columnTree) => {
174
+ #renderFooterRow = ({ level, cells, isLastRow, isFirstRow, isRowVisible }) => {
175
+ const rowParts = {
176
+ 'first-footer-row': isFirstRow,
177
+ 'last-footer-row': isLastRow,
178
+ };
179
+
156
180
  return html`
157
181
  <tr
158
182
  role="row"
159
- part="row footer-row"
160
- class="row footer-row"
183
+ part="row footer-row${partMap(rowParts)}"
184
+ class="row footer-row${classMap(rowParts)}"
161
185
  tabindex="-1"
162
- ?hidden=${!isFooterRowVisible(columns, level, columnTree)}
186
+ ?hidden=${!isRowVisible}
163
187
  >
164
188
  ${repeat(
165
- columns,
166
- (column) => column._id,
167
- (column) => {
189
+ cells,
190
+ ({ column }) => column._id,
191
+ ({ column, isFirstCell, isLastCell }) => {
168
192
  // `cache` keeps the cell and its rendered content when the
169
193
  // column gets hidden, so it can be restored as-is when the
170
194
  // column is shown again.
@@ -172,15 +196,26 @@ export const ColumnRenderingMixin = (superClass) =>
172
196
  return cache(nothing);
173
197
  }
174
198
 
199
+ const cellParts = {
200
+ 'first-footer-row-cell': isFirstRow,
201
+ 'last-footer-row-cell': isLastRow,
202
+ 'first-column-cell': isFirstCell,
203
+ 'last-column-cell': isLastCell,
204
+ };
205
+
175
206
  return cache(html`
176
207
  <td
177
208
  role="gridcell"
178
- part="cell footer-cell"
179
- class="cell footer-cell"
209
+ part="cell footer-cell${partMap(cellParts)}"
210
+ class="cell footer-cell${classMap(cellParts)}"
211
+ ?first-column="${isFirstCell}"
212
+ ?last-column="${isLastCell}"
180
213
  @keydown="${this.__onCellKeyDown}"
181
214
  @mousedown=${this.__onCellMouseDown}
182
215
  @mouseenter=${this.__onCellMouseEnter}
183
216
  @mouseleave=${this.__onCellMouseLeave}
217
+ colspan="${ifDefined(column._colSpan)}"
218
+ aria-colspan="${ifDefined(column._colSpan)}"
184
219
  tabindex="-1"
185
220
  ._column=${column}
186
221
  >
@@ -192,4 +227,39 @@ export const ColumnRenderingMixin = (superClass) =>
192
227
  </tr>
193
228
  `;
194
229
  };
230
+
231
+ #getRows(columnTree, section) {
232
+ let rows = columnTree.map((columns, level) => {
233
+ const visibleColumns = columns.filter((column) => !column.hidden);
234
+
235
+ return {
236
+ level,
237
+ cells: columns.map((column) => {
238
+ return {
239
+ column,
240
+ isFirstCell: column === visibleColumns.at(0),
241
+ isLastCell: column === visibleColumns.at(-1),
242
+ };
243
+ }),
244
+ isRowVisible:
245
+ section === 'header'
246
+ ? isHeaderRowVisible(columns, level, columnTree)
247
+ : isFooterRowVisible(columns, level, columnTree),
248
+ };
249
+ });
250
+
251
+ if (section === 'footer') {
252
+ rows = rows.toReversed();
253
+ }
254
+
255
+ const visibleRows = rows.filter((row) => row.isRowVisible);
256
+
257
+ return rows.map((row) => {
258
+ return {
259
+ ...row,
260
+ isFirstRow: row === visibleRows.at(0),
261
+ isLastRow: row === visibleRows.at(-1),
262
+ };
263
+ });
264
+ }
195
265
  };
@@ -13,7 +13,6 @@ import { A11yMixin } from './vaadin-grid-a11y-mixin.js';
13
13
  import { ActiveItemMixin } from './vaadin-grid-active-item-mixin.js';
14
14
  import { ArrayDataProviderMixin } from './vaadin-grid-array-data-provider-mixin.js';
15
15
  import { ColumnAutoWidthMixin } from './vaadin-grid-column-auto-width-mixin.js';
16
- import { ColumnRenderingMixin } from './vaadin-grid-column-rendering-mixin.js';
17
16
  import { ColumnReorderingMixin } from './vaadin-grid-column-reordering-mixin.js';
18
17
  import { ColumnResizingMixin } from './vaadin-grid-column-resizing-mixin.js';
19
18
  import { DataProviderMixin } from './vaadin-grid-data-provider-mixin.js';
@@ -21,6 +20,7 @@ import { DragAndDropMixin } from './vaadin-grid-drag-and-drop-mixin.js';
21
20
  import { DynamicColumnsMixin } from './vaadin-grid-dynamic-columns-mixin.js';
22
21
  import { EventContextMixin } from './vaadin-grid-event-context-mixin.js';
23
22
  import { FilterMixin } from './vaadin-grid-filter-mixin.js';
23
+ import { HeaderFooterRenderingMixin } from './vaadin-grid-header-footer-rendering-mixin.js';
24
24
  import {
25
25
  getBodyRowCells,
26
26
  getClosestCell,
@@ -47,7 +47,7 @@ export const GridMixin = (superClass) =>
47
47
  ArrayDataProviderMixin(
48
48
  DataProviderMixin(
49
49
  DynamicColumnsMixin(
50
- ColumnRenderingMixin(
50
+ HeaderFooterRenderingMixin(
51
51
  ActiveItemMixin(
52
52
  ScrollMixin(
53
53
  SelectionMixin(
@@ -597,7 +597,6 @@ export const GridMixin = (superClass) =>
597
597
 
598
598
  this._resizeHandler();
599
599
  this._frozenCellsChanged();
600
- this._updateFirstAndLastColumn();
601
600
  this._resetKeyboardNavigation();
602
601
  this.__a11yUpdateHeaderRows();
603
602
  this.__a11yUpdateFooterRows();
@@ -605,22 +604,6 @@ export const GridMixin = (superClass) =>
605
604
  this.__updateHeaderAndFooter();
606
605
  }
607
606
 
608
- /** @private */
609
- __updateHeaderFooterRowParts(section) {
610
- const visibleRows = [...this.$[section].querySelectorAll('tr:not([hidden])')];
611
- [...this.$[section].children].forEach((row) => {
612
- updatePart(row, `first-${section}-row`, row === visibleRows.at(0));
613
- updatePart(row, `last-${section}-row`, row === visibleRows.at(-1));
614
-
615
- getBodyRowCells(row).forEach((cell) => {
616
- updatePart(cell, `first-${section}-row-cell`, row === visibleRows.at(0));
617
- updatePart(cell, `last-${section}-row-cell`, row === visibleRows.at(-1));
618
- });
619
-
620
- this._updateFirstAndLastColumnForRow(row);
621
- });
622
- }
623
-
624
607
  /**
625
608
  * @param {!HTMLElement} row
626
609
  * @param {boolean} loading
@@ -51,6 +51,7 @@ import { GridSorterMixin } from './vaadin-grid-sorter-mixin.js';
51
51
  * @fires {CustomEvent} direction-changed - Fired when the `direction` property changes.
52
52
  * @fires {CustomEvent} sorter-changed - Fired when the `path` or `direction` property changes.
53
53
  *
54
+ * @attr {string} theme - The theme variants to apply to the component.
54
55
  * @customElement vaadin-grid-sorter
55
56
  * @extends HTMLElement
56
57
  */
@@ -59,6 +59,7 @@ import { GridTreeToggleMixin } from './vaadin-grid-tree-toggle-mixin.js';
59
59
  *
60
60
  * @fires {CustomEvent} expanded-changed - Fired when the `expanded` property changes.
61
61
  *
62
+ * @attr {string} theme - The theme variants to apply to the component.
62
63
  * @customElement vaadin-grid-tree-toggle
63
64
  * @extends HTMLElement
64
65
  */
@@ -274,6 +274,7 @@ const DEFAULT_I18N = {
274
274
  * @fires {CustomEvent} size-changed - Fired when the `size` property changes.
275
275
  * @fires {CustomEvent} item-toggle - Fired when the user selects or deselects an item through the selection column.
276
276
  *
277
+ * @attr {string} theme - The theme variants to apply to the component.
277
278
  * @customElement vaadin-grid
278
279
  * @extends HTMLElement
279
280
  */
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.3.0-alpha7",
4
+ "version": "25.3.0-dev.1fa5a51482",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -90,17 +90,6 @@
90
90
  "string"
91
91
  ]
92
92
  }
93
- },
94
- {
95
- "name": "theme",
96
- "description": "The theme variants to apply to the component.",
97
- "value": {
98
- "type": [
99
- "string",
100
- "null",
101
- "undefined"
102
- ]
103
- }
104
93
  }
105
94
  ],
106
95
  "js": {
@@ -214,7 +203,7 @@
214
203
  },
215
204
  {
216
205
  "name": "vaadin-grid-column",
217
- "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.3.0-alpha7/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
206
+ "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.3.0-dev.1fa5a51482/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<vaadin-grid-column>`.",
218
207
  "attributes": [
219
208
  {
220
209
  "name": "auto-width",
@@ -324,17 +313,6 @@
324
313
  ]
325
314
  }
326
315
  },
327
- {
328
- "name": "theme",
329
- "description": "The theme variants to apply to the component.",
330
- "value": {
331
- "type": [
332
- "string",
333
- "null",
334
- "undefined"
335
- ]
336
- }
337
- },
338
316
  {
339
317
  "name": "width",
340
318
  "description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
@@ -613,17 +591,6 @@
613
591
  ]
614
592
  }
615
593
  },
616
- {
617
- "name": "theme",
618
- "description": "The theme variants to apply to the component.",
619
- "value": {
620
- "type": [
621
- "string",
622
- "null",
623
- "undefined"
624
- ]
625
- }
626
- },
627
594
  {
628
595
  "name": "width",
629
596
  "description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
@@ -808,9 +775,7 @@
808
775
  "description": "The theme variants to apply to the component.",
809
776
  "value": {
810
777
  "type": [
811
- "string",
812
- "null",
813
- "undefined"
778
+ "string"
814
779
  ]
815
780
  }
816
781
  },
@@ -855,7 +820,7 @@
855
820
  },
856
821
  {
857
822
  "name": "vaadin-grid-selection-column",
858
- "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.3.0-alpha7/#/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__",
823
+ "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.3.0-dev.1fa5a51482/#/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__",
859
824
  "attributes": [
860
825
  {
861
826
  "name": "auto-select",
@@ -992,17 +957,6 @@
992
957
  ]
993
958
  }
994
959
  },
995
- {
996
- "name": "theme",
997
- "description": "The theme variants to apply to the component.",
998
- "value": {
999
- "type": [
1000
- "string",
1001
- "null",
1002
- "undefined"
1003
- ]
1004
- }
1005
- },
1006
960
  {
1007
961
  "name": "width",
1008
962
  "description": "Width of the cells for this column.",
@@ -1322,17 +1276,6 @@
1322
1276
  ]
1323
1277
  }
1324
1278
  },
1325
- {
1326
- "name": "theme",
1327
- "description": "The theme variants to apply to the component.",
1328
- "value": {
1329
- "type": [
1330
- "string",
1331
- "null",
1332
- "undefined"
1333
- ]
1334
- }
1335
- },
1336
1279
  {
1337
1280
  "name": "width",
1338
1281
  "description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
@@ -1540,9 +1483,7 @@
1540
1483
  "description": "The theme variants to apply to the component.",
1541
1484
  "value": {
1542
1485
  "type": [
1543
- "string",
1544
- "null",
1545
- "undefined"
1486
+ "string"
1546
1487
  ]
1547
1488
  }
1548
1489
  }
@@ -1692,17 +1633,6 @@
1692
1633
  ]
1693
1634
  }
1694
1635
  },
1695
- {
1696
- "name": "theme",
1697
- "description": "The theme variants to apply to the component.",
1698
- "value": {
1699
- "type": [
1700
- "string",
1701
- "null",
1702
- "undefined"
1703
- ]
1704
- }
1705
- },
1706
1636
  {
1707
1637
  "name": "width",
1708
1638
  "description": "Width of the cells for this column.\n\nPlease note that using the `em` length unit is discouraged as\nit might lead to misalignment issues if the header, body, and footer\ncells have different font sizes. Instead, use `rem` if you need\na length unit relative to the font size.",
@@ -1905,9 +1835,7 @@
1905
1835
  "description": "The theme variants to apply to the component.",
1906
1836
  "value": {
1907
1837
  "type": [
1908
- "string",
1909
- "null",
1910
- "undefined"
1838
+ "string"
1911
1839
  ]
1912
1840
  }
1913
1841
  }
@@ -1952,7 +1880,7 @@
1952
1880
  },
1953
1881
  {
1954
1882
  "name": "vaadin-grid",
1955
- "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.3.0-alpha7/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/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`hasChildren` | Boolean | True if the item has children\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/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.3.0-alpha7/#/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.3.0-alpha7/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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.",
1883
+ "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.3.0-dev.1fa5a51482/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/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`hasChildren` | Boolean | True if the item has children\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/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.3.0-dev.1fa5a51482/#/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.3.0-dev.1fa5a51482/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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.",
1956
1884
  "attributes": [
1957
1885
  {
1958
1886
  "name": "accessible-name",
@@ -2085,9 +2013,7 @@
2085
2013
  "description": "The theme variants to apply to the component.",
2086
2014
  "value": {
2087
2015
  "type": [
2088
- "string",
2089
- "null",
2090
- "undefined"
2016
+ "string"
2091
2017
  ]
2092
2018
  }
2093
2019
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid",
4
- "version": "25.3.0-alpha7",
4
+ "version": "25.3.0-dev.1fa5a51482",
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/25.3.0-alpha7/#/elements/vaadin-grid) documentation for instructions on how\nto configure the `<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/25.3.0-dev.1fa5a51482/#/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>\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.3.0-alpha7/#/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__",
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>\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.3.0-dev.1fa5a51482/#/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
  {
@@ -835,7 +835,7 @@
835
835
  },
836
836
  {
837
837
  "name": "vaadin-grid",
838
- "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.3.0-alpha7/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/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`hasChildren` | Boolean | True if the item has children\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha7/#/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.3.0-alpha7/#/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.3.0-alpha7/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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.",
838
+ "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.3.0-dev.1fa5a51482/#/elements/vaadin-grid#property-items) property to visualize your data.\n\nUse the [`<vaadin-grid-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/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`hasChildren` | Boolean | True if the item has children\n\nThe following helper elements can be used for further customization:\n- [`<vaadin-grid-column-group>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-column-group)\n- [`<vaadin-grid-filter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-filter)\n- [`<vaadin-grid-sorter>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-sorter)\n- [`<vaadin-grid-selection-column>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/elements/vaadin-grid-selection-column)\n- [`<vaadin-grid-tree-toggle>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-dev.1fa5a51482/#/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.3.0-dev.1fa5a51482/#/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.3.0-dev.1fa5a51482/#/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`header-row` | Header row in the internal table\n`footer-row` | Footer 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`first-header-row` | The first header row\n`first-footer-row` | The first footer row\n`last-row` | The last body row\n`last-header-row` | The last header row\n`last-footer-row` | The last footer 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.",
839
839
  "extension": true,
840
840
  "attributes": [
841
841
  {