@vaadin/grid-pro 23.3.0-alpha2 → 24.0.0-alpha1

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-pro",
3
- "version": "23.3.0-alpha2",
3
+ "version": "24.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,21 +39,21 @@
39
39
  "dependencies": {
40
40
  "@open-wc/dedupe-mixin": "^1.3.0",
41
41
  "@polymer/polymer": "^3.0.0",
42
- "@vaadin/checkbox": "23.3.0-alpha2",
43
- "@vaadin/component-base": "23.3.0-alpha2",
44
- "@vaadin/grid": "23.3.0-alpha2",
45
- "@vaadin/item": "23.3.0-alpha2",
46
- "@vaadin/list-box": "23.3.0-alpha2",
47
- "@vaadin/lit-renderer": "23.3.0-alpha2",
48
- "@vaadin/select": "23.3.0-alpha2",
49
- "@vaadin/text-field": "23.3.0-alpha2",
50
- "@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
51
- "@vaadin/vaadin-material-styles": "23.3.0-alpha2",
52
- "@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
42
+ "@vaadin/checkbox": "24.0.0-alpha1",
43
+ "@vaadin/component-base": "24.0.0-alpha1",
44
+ "@vaadin/grid": "24.0.0-alpha1",
45
+ "@vaadin/item": "24.0.0-alpha1",
46
+ "@vaadin/list-box": "24.0.0-alpha1",
47
+ "@vaadin/lit-renderer": "24.0.0-alpha1",
48
+ "@vaadin/select": "24.0.0-alpha1",
49
+ "@vaadin/text-field": "24.0.0-alpha1",
50
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
51
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha1",
52
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@esm-bundle/chai": "^4.3.4",
56
- "@vaadin/polymer-legacy-adapter": "23.3.0-alpha2",
56
+ "@vaadin/polymer-legacy-adapter": "24.0.0-alpha1",
57
57
  "@vaadin/testing-helpers": "^0.3.2",
58
58
  "lit": "^2.0.0",
59
59
  "sinon": "^13.0.2"
@@ -63,5 +63,5 @@
63
63
  "web-types.json",
64
64
  "web-types.lit.json"
65
65
  ],
66
- "gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
66
+ "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
67
67
  }
@@ -7,6 +7,7 @@ import './vaadin-grid-pro-edit-checkbox.js';
7
7
  import './vaadin-grid-pro-edit-select.js';
8
8
  import './vaadin-grid-pro-edit-text-field.js';
9
9
  import { get, set } from '@polymer/polymer/lib/utils/path.js';
10
+ import { addValueToAttribute } from '@vaadin/component-base/src/dom-utils.js';
10
11
  import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js';
11
12
 
12
13
  /**
@@ -107,6 +108,11 @@ class GridProEditColumn extends GridColumn {
107
108
  constructor() {
108
109
  super();
109
110
 
111
+ // Enable focus button mode for Mac OS to ensure focused
112
+ // editable cell stays in sync with the VoiceOver cursor
113
+ // https://github.com/vaadin/web-components/issues/3820
114
+ this._focusButtonMode = navigator.platform.includes('Mac');
115
+
110
116
  this.__editModeRenderer = function (root, column) {
111
117
  const cell = root.assignedSlot.parentNode;
112
118
 
@@ -129,10 +135,8 @@ class GridProEditColumn extends GridColumn {
129
135
  /** @private */
130
136
  _cellsChanged() {
131
137
  this._cells.forEach((cell) => {
132
- const part = cell.getAttribute('part');
133
- if (part.indexOf('editable-cell') < 0) {
134
- cell.setAttribute('part', `${part} editable-cell`);
135
- }
138
+ const target = cell._focusButton || cell;
139
+ addValueToAttribute(target, 'part', 'editable-cell');
136
140
  });
137
141
  }
138
142
 
@@ -212,6 +216,11 @@ class GridProEditColumn extends GridColumn {
212
216
  cell.__savedRenderer = this._renderer || cell._renderer;
213
217
  cell._renderer = this.editModeRenderer || this.__editModeRenderer;
214
218
 
219
+ // Remove role to avoid announcing button while editing
220
+ if (cell._focusButton) {
221
+ cell._focusButton.removeAttribute('role');
222
+ }
223
+
215
224
  this._clearCellContent(cell);
216
225
  this._runRenderer(cell._renderer, cell, model);
217
226
  }
@@ -227,6 +236,11 @@ class GridProEditColumn extends GridColumn {
227
236
 
228
237
  this._clearCellContent(cell);
229
238
 
239
+ // Restore previously removed role attribute
240
+ if (cell._focusButton) {
241
+ cell._focusButton.setAttribute('role', 'button');
242
+ }
243
+
230
244
  const row = cell.parentElement;
231
245
  this._grid._updateItem(row, row._item);
232
246
  }
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-pro",
4
- "version": "23.3.0-alpha2",
4
+ "version": "24.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -328,7 +328,7 @@
328
328
  },
329
329
  {
330
330
  "name": "vaadin-grid-pro",
331
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-select).",
331
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-select).",
332
332
  "attributes": [
333
333
  {
334
334
  "name": "size",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "23.3.0-alpha2",
4
+ "version": "24.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -149,7 +149,7 @@
149
149
  },
150
150
  {
151
151
  "name": "vaadin-grid-pro",
152
- "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-select).",
152
+ "description": "`<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.\nIt extends `<vaadin-grid>` and adds extra features on top of the basic ones.\n\nSee [`<vaadin-grid>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-grid) documentation for details.\n\n```\n<vaadin-grid-pro></vaadin-grid-pro>\n```\n\n### Internal components\n\nIn addition to `<vaadin-grid-pro>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-grid-pro-edit-checkbox>` - has the same API as [`<vaadin-checkbox>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha1/#/elements/vaadin-select).",
153
153
  "extension": true,
154
154
  "attributes": [
155
155
  {