@vaadin/grid-pro 23.5.6 → 23.5.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-pro",
3
- "version": "23.5.6",
3
+ "version": "23.5.7",
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.5.6",
43
- "@vaadin/component-base": "~23.5.6",
44
- "@vaadin/grid": "~23.5.6",
45
- "@vaadin/item": "~23.5.6",
46
- "@vaadin/list-box": "~23.5.6",
47
- "@vaadin/lit-renderer": "~23.5.6",
48
- "@vaadin/select": "~23.5.6",
49
- "@vaadin/text-field": "~23.5.6",
50
- "@vaadin/vaadin-lumo-styles": "~23.5.6",
51
- "@vaadin/vaadin-material-styles": "~23.5.6",
52
- "@vaadin/vaadin-themable-mixin": "~23.5.6"
42
+ "@vaadin/checkbox": "~23.5.7",
43
+ "@vaadin/component-base": "~23.5.7",
44
+ "@vaadin/grid": "~23.5.7",
45
+ "@vaadin/item": "~23.5.7",
46
+ "@vaadin/list-box": "~23.5.7",
47
+ "@vaadin/lit-renderer": "~23.5.7",
48
+ "@vaadin/select": "~23.5.7",
49
+ "@vaadin/text-field": "~23.5.7",
50
+ "@vaadin/vaadin-lumo-styles": "~23.5.7",
51
+ "@vaadin/vaadin-material-styles": "~23.5.7",
52
+ "@vaadin/vaadin-themable-mixin": "~23.5.7"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@esm-bundle/chai": "^4.3.4",
56
- "@vaadin/polymer-legacy-adapter": "~23.5.6",
56
+ "@vaadin/polymer-legacy-adapter": "~23.5.7",
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": "8017ec1c49880fcea0819ef306c4fa3c711b0087"
66
+ "gitHead": "19efa292d13bc1052f0d2c15b19ebc2ebd3dc156"
67
67
  }
@@ -297,6 +297,10 @@ export const InlineEditingMixin = (superClass) =>
297
297
 
298
298
  /** @private */
299
299
  _onEditorFocusOut() {
300
+ // Ignore focusout from internal tab event
301
+ if (this.__cancelCellSwitch) {
302
+ return;
303
+ }
300
304
  // Schedule stop on editor component focusout
301
305
  this._debouncerStopEdit = Debouncer.debounce(this._debouncerStopEdit, animationFrame, this._stopEdit.bind(this));
302
306
  }
@@ -413,7 +417,7 @@ export const InlineEditingMixin = (superClass) =>
413
417
  * @param {!KeyboardEvent} e
414
418
  * @protected
415
419
  */
416
- _switchEditCell(e) {
420
+ async _switchEditCell(e) {
417
421
  if (this.__cancelCellSwitch || (e.defaultPrevented && e.keyCode === 9)) {
418
422
  return;
419
423
  }
@@ -423,6 +427,22 @@ export const InlineEditingMixin = (superClass) =>
423
427
  const cols = this._getEditColumns();
424
428
 
425
429
  const { cell, column, model } = this.__edited;
430
+
431
+ // Prevent vaadin-grid handler from being called
432
+ e.stopImmediatePropagation();
433
+
434
+ const editor = column._getEditorComponent(cell);
435
+
436
+ // Do not prevent Tab to allow native input blur and wait for it,
437
+ // unless the keydown event is from the edit cell select overlay.
438
+ if (e.key === 'Tab' && editor && editor.contains(e.target)) {
439
+ await new Promise((resolve) => {
440
+ editor.addEventListener('focusout', () => resolve(), { once: true });
441
+ });
442
+ } else {
443
+ e.preventDefault();
444
+ }
445
+
426
446
  const colIndex = cols.indexOf(column);
427
447
  const { index } = model;
428
448
 
@@ -462,10 +482,6 @@ export const InlineEditingMixin = (superClass) =>
462
482
 
463
483
  if (nextRow && nextCol) {
464
484
  const nextCell = Array.from(nextRow.children).find((cell) => cell._column === nextCol);
465
- e.preventDefault();
466
-
467
- // Prevent vaadin-grid handler from being called
468
- e.stopImmediatePropagation();
469
485
 
470
486
  if (!this.singleCellEdit && nextCell !== cell) {
471
487
  this._startEdit(nextCell, nextCol);
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.5.6",
4
+ "version": "23.5.7",
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.5.6/#/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.5.6/#/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.5.6/#/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.5.6/#/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.5.7/#/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.5.7/#/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.5.7/#/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.5.7/#/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.5.6",
4
+ "version": "23.5.7",
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.5.6/#/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.5.6/#/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.5.6/#/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.5.6/#/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.5.7/#/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.5.7/#/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.5.7/#/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.5.7/#/elements/vaadin-select).",
153
153
  "extension": true,
154
154
  "attributes": [
155
155
  {