@vaadin/grid-pro 25.0.0-alpha7 → 25.0.0-alpha8

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": "25.0.0-alpha7",
3
+ "version": "25.0.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/checkbox": "25.0.0-alpha7",
41
- "@vaadin/component-base": "25.0.0-alpha7",
42
- "@vaadin/grid": "25.0.0-alpha7",
43
- "@vaadin/lit-renderer": "25.0.0-alpha7",
44
- "@vaadin/select": "25.0.0-alpha7",
45
- "@vaadin/text-field": "25.0.0-alpha7",
46
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
47
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
40
+ "@vaadin/checkbox": "25.0.0-alpha8",
41
+ "@vaadin/component-base": "25.0.0-alpha8",
42
+ "@vaadin/grid": "25.0.0-alpha8",
43
+ "@vaadin/lit-renderer": "25.0.0-alpha8",
44
+ "@vaadin/select": "25.0.0-alpha8",
45
+ "@vaadin/text-field": "25.0.0-alpha8",
46
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
47
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/chai-plugins": "25.0.0-alpha7",
52
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
51
+ "@vaadin/chai-plugins": "25.0.0-alpha8",
52
+ "@vaadin/test-runner-commands": "25.0.0-alpha8",
53
53
  "@vaadin/testing-helpers": "^2.0.0",
54
54
  "sinon": "^18.0.0"
55
55
  },
@@ -58,5 +58,5 @@
58
58
  "web-types.json",
59
59
  "web-types.lit.json"
60
60
  ],
61
- "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
61
+ "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
62
62
  }
@@ -8,6 +8,7 @@
8
8
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
9
  * license.
10
10
  */
11
+ import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
11
12
  import { get, set } from '@vaadin/component-base/src/path-utils.js';
12
13
 
13
14
  /**
@@ -290,6 +291,16 @@ export const GridProEditColumnMixin = (superClass) =>
290
291
  } else {
291
292
  this._focusEditor(editor);
292
293
  }
294
+
295
+ if (this.editorType === 'custom') {
296
+ editor.addEventListener('opened-changed', (event) => {
297
+ const element = event.target;
298
+ const activeElement = getDeepActiveElement();
299
+ if (!element.opened && !element.contains(activeElement)) {
300
+ this._grid._stopEdit();
301
+ }
302
+ });
303
+ }
293
304
  }
294
305
 
295
306
  /**
@@ -543,17 +543,17 @@ export const InlineEditingMixin = (superClass) =>
543
543
 
544
544
  /**
545
545
  * @param {!HTMLElement} row
546
- * @param {GridItem} item
547
- * @protected
546
+ * @private
548
547
  */
549
- _updateItem(row, item) {
548
+ __updateRow(row) {
549
+ const item = this.__getRowItem(row);
550
550
  if (this.__edited) {
551
551
  const { cell, model } = this.__edited;
552
552
  if (cell.parentNode === row && model.item !== item) {
553
553
  this._stopEdit();
554
554
  }
555
555
  }
556
- super._updateItem(row, item);
556
+ super.__updateRow(row, item);
557
557
  }
558
558
 
559
559
  /**
@@ -588,7 +588,7 @@ export const InlineEditingMixin = (superClass) =>
588
588
  const isEditable = column.isCellEditable(model);
589
589
 
590
590
  // Cancel editing if the cell is currently edited one and becomes no longer editable
591
- // TODO: should be moved to `_updateItem` when Grid connector is updated to use it.
591
+ // TODO: should be moved to `__updateRow` when Grid connector is updated to use it.
592
592
  if (this.__edited && this.__edited.cell === cell && !isEditable) {
593
593
  this._stopEdit(true, true);
594
594
  }
@@ -49,7 +49,7 @@ export interface GridProEventMap<TItem>
49
49
  *
50
50
  * See [`<vaadin-grid>`](#/elements/vaadin-grid) documentation for details.
51
51
  *
52
- * ```
52
+ * ```html
53
53
  * <vaadin-grid-pro></vaadin-grid-pro>
54
54
  * ```
55
55
  *
@@ -19,7 +19,7 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
19
19
  *
20
20
  * See [`<vaadin-grid>`](#/elements/vaadin-grid) documentation for details.
21
21
  *
22
- * ```
22
+ * ```html
23
23
  * <vaadin-grid-pro></vaadin-grid-pro>
24
24
  * ```
25
25
  *
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": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -401,7 +401,7 @@
401
401
  },
402
402
  {
403
403
  "name": "vaadin-grid-pro",
404
- "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/25.0.0-alpha7/#/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/25.0.0-alpha7/#/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/25.0.0-alpha7/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-select).",
404
+ "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/25.0.0-alpha8/#/elements/vaadin-grid) documentation for details.\n\n```html\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/25.0.0-alpha8/#/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/25.0.0-alpha8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-select).",
405
405
  "attributes": [
406
406
  {
407
407
  "name": "accessible-name",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/grid-pro",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "name": "vaadin-grid-pro",
180
- "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/25.0.0-alpha7/#/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/25.0.0-alpha7/#/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/25.0.0-alpha7/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-select).",
180
+ "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/25.0.0-alpha8/#/elements/vaadin-grid) documentation for details.\n\n```html\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/25.0.0-alpha8/#/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/25.0.0-alpha8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-select).",
181
181
  "extension": true,
182
182
  "attributes": [
183
183
  {