@vaadin/grid-pro 23.3.0-alpha3 → 23.3.0-alpha5

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-alpha3",
3
+ "version": "23.3.0-alpha5",
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-alpha3",
43
- "@vaadin/component-base": "23.3.0-alpha3",
44
- "@vaadin/grid": "23.3.0-alpha3",
45
- "@vaadin/item": "23.3.0-alpha3",
46
- "@vaadin/list-box": "23.3.0-alpha3",
47
- "@vaadin/lit-renderer": "23.3.0-alpha3",
48
- "@vaadin/select": "23.3.0-alpha3",
49
- "@vaadin/text-field": "23.3.0-alpha3",
50
- "@vaadin/vaadin-lumo-styles": "23.3.0-alpha3",
51
- "@vaadin/vaadin-material-styles": "23.3.0-alpha3",
52
- "@vaadin/vaadin-themable-mixin": "23.3.0-alpha3"
42
+ "@vaadin/checkbox": "23.3.0-alpha5",
43
+ "@vaadin/component-base": "23.3.0-alpha5",
44
+ "@vaadin/grid": "23.3.0-alpha5",
45
+ "@vaadin/item": "23.3.0-alpha5",
46
+ "@vaadin/list-box": "23.3.0-alpha5",
47
+ "@vaadin/lit-renderer": "23.3.0-alpha5",
48
+ "@vaadin/select": "23.3.0-alpha5",
49
+ "@vaadin/text-field": "23.3.0-alpha5",
50
+ "@vaadin/vaadin-lumo-styles": "23.3.0-alpha5",
51
+ "@vaadin/vaadin-material-styles": "23.3.0-alpha5",
52
+ "@vaadin/vaadin-themable-mixin": "23.3.0-alpha5"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@esm-bundle/chai": "^4.3.4",
56
- "@vaadin/polymer-legacy-adapter": "23.3.0-alpha3",
56
+ "@vaadin/polymer-legacy-adapter": "23.3.0-alpha5",
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": "e86cd2abf3e28bade37711291331415d92c454ec"
66
+ "gitHead": "0b6fdcf444683e97e3efb433d603e1274d5bcd66"
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-alpha3",
4
+ "version": "23.3.0-alpha5",
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-alpha3/#/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-alpha3/#/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-alpha3/#/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-alpha3/#/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/23.3.0-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/elements/vaadin-select).",
332
332
  "attributes": [
333
333
  {
334
334
  "name": "size",
@@ -390,6 +390,15 @@
390
390
  ]
391
391
  }
392
392
  },
393
+ {
394
+ "name": "multi-sort-on-shift-click",
395
+ "description": "When `true`, Shift-clicking an unsorted column's sorter adds it to the multi-sort.\nShift + Space does the same action via keyboard. This property has precedence over the\n`multiSort` property. If `multiSortOnShiftClick` is true, the multiSort property is effectively ignored.",
396
+ "value": {
397
+ "type": [
398
+ "boolean"
399
+ ]
400
+ }
401
+ },
393
402
  {
394
403
  "name": "column-reordering-allowed",
395
404
  "description": "Set to true to allow column reordering.",
@@ -605,6 +614,15 @@
605
614
  ]
606
615
  }
607
616
  },
617
+ {
618
+ "name": "multiSortOnShiftClick",
619
+ "description": "When `true`, Shift-clicking an unsorted column's sorter adds it to the multi-sort.\nShift + Space does the same action via keyboard. This property has precedence over the\n`multiSort` property. If `multiSortOnShiftClick` is true, the multiSort property is effectively ignored.",
620
+ "value": {
621
+ "type": [
622
+ "boolean"
623
+ ]
624
+ }
625
+ },
608
626
  {
609
627
  "name": "columnReorderingAllowed",
610
628
  "description": "Set to true to allow column reordering.",
@@ -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-alpha3",
4
+ "version": "23.3.0-alpha5",
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-alpha3/#/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-alpha3/#/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-alpha3/#/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-alpha3/#/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/23.3.0-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/elements/vaadin-select).",
153
153
  "extension": true,
154
154
  "attributes": [
155
155
  {
@@ -159,6 +159,13 @@
159
159
  "kind": "expression"
160
160
  }
161
161
  },
162
+ {
163
+ "name": "?multiSortOnShiftClick",
164
+ "description": "When `true`, Shift-clicking an unsorted column's sorter adds it to the multi-sort.\nShift + Space does the same action via keyboard. This property has precedence over the\n`multiSort` property. If `multiSortOnShiftClick` is true, the multiSort property is effectively ignored.",
165
+ "value": {
166
+ "kind": "expression"
167
+ }
168
+ },
162
169
  {
163
170
  "name": "?columnReorderingAllowed",
164
171
  "description": "Set to true to allow column reordering.",