@vaadin/grid 22.0.4 → 22.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid",
3
- "version": "22.0.4",
3
+ "version": "22.0.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -40,19 +40,19 @@
40
40
  "dependencies": {
41
41
  "@open-wc/dedupe-mixin": "^1.3.0",
42
42
  "@polymer/polymer": "^3.0.0",
43
- "@vaadin/checkbox": "^22.0.4",
44
- "@vaadin/component-base": "^22.0.4",
45
- "@vaadin/text-field": "^22.0.4",
46
- "@vaadin/vaadin-lumo-styles": "^22.0.4",
47
- "@vaadin/vaadin-material-styles": "^22.0.4",
48
- "@vaadin/vaadin-themable-mixin": "^22.0.4"
43
+ "@vaadin/checkbox": "^22.0.7",
44
+ "@vaadin/component-base": "^22.0.7",
45
+ "@vaadin/text-field": "^22.0.7",
46
+ "@vaadin/vaadin-lumo-styles": "^22.0.7",
47
+ "@vaadin/vaadin-material-styles": "^22.0.7",
48
+ "@vaadin/vaadin-themable-mixin": "^22.0.7"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@esm-bundle/chai": "^4.3.4",
52
- "@vaadin/polymer-legacy-adapter": "^22.0.4",
52
+ "@vaadin/polymer-legacy-adapter": "^22.0.7",
53
53
  "@vaadin/testing-helpers": "^0.3.2",
54
54
  "lit": "^2.0.0",
55
55
  "sinon": "^9.2.0"
56
56
  },
57
- "gitHead": "55891f68d4da41e846e06dfe51dceba1665e41ce"
57
+ "gitHead": "947d74491296ca746b360ecb5f5a8efd55ab2866"
58
58
  }
@@ -94,24 +94,12 @@ export const A11yMixin = (superClass) =>
94
94
  * @protected
95
95
  */
96
96
  _a11yUpdateRowLevel(row, level) {
97
- row.setAttribute('aria-level', level + 1);
98
- }
99
-
100
- /**
101
- * @param {!HTMLElement} row
102
- * @param {boolean} detailsOpened
103
- * @protected
104
- */
105
- _a11yUpdateRowDetailsOpened(row, detailsOpened) {
106
- const detailsCell = row.querySelector('[part~=details-cell]');
107
-
108
- Array.from(row.children).forEach((cell) => {
109
- if (detailsCell) {
110
- cell.setAttribute('aria-expanded', detailsOpened);
111
- } else {
112
- cell.removeAttribute('aria-expanded');
113
- }
114
- });
97
+ // Set level for the expandable rows itself, and all the nested rows.
98
+ if (level > 0 || this.__isRowCollapsible(row) || this.__isRowExpandable(row)) {
99
+ row.setAttribute('aria-level', level + 1);
100
+ } else {
101
+ row.removeAttribute('aria-level');
102
+ }
115
103
  }
116
104
 
117
105
  /**
@@ -617,6 +617,9 @@ export const KeyboardNavigationMixin = (superClass) =>
617
617
  _onTabKeyDown(e) {
618
618
  const focusTarget = this._predictFocusStepTarget(e.composedPath()[0], e.shiftKey ? -1 : 1);
619
619
 
620
+ // Prevent focus-trap logic from intercepting the event.
621
+ e.stopPropagation();
622
+
620
623
  if (focusTarget === this.$.table) {
621
624
  // The focus is about to exit the grid to the top.
622
625
  this.$.table.focus();
@@ -84,7 +84,6 @@ export const RowDetailsMixin = (superClass) =>
84
84
  if (!row.querySelector('[part~=details-cell]')) {
85
85
  this._updateRow(row, this._columnTree[this._columnTree.length - 1]);
86
86
  const isDetailsOpened = this._isDetailsOpened(row._item);
87
- this._a11yUpdateRowDetailsOpened(row, isDetailsOpened);
88
87
  this._toggleDetailsCell(row, isDetailsOpened);
89
88
  }
90
89
  });
@@ -908,7 +908,6 @@ class Grid extends ElementMixin(
908
908
 
909
909
  this._a11yUpdateRowLevel(row, model.level);
910
910
  this._a11yUpdateRowSelected(row, model.selected);
911
- this._a11yUpdateRowDetailsOpened(row, model.detailsOpened);
912
911
 
913
912
  row.toggleAttribute('expanded', model.expanded);
914
913
  row.toggleAttribute('selected', model.selected);