@vaadin/grid-pro 25.0.0 → 25.0.1

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",
3
+ "version": "25.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,20 +36,20 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/checkbox": "~25.0.0",
40
- "@vaadin/component-base": "~25.0.0",
41
- "@vaadin/grid": "~25.0.0",
42
- "@vaadin/lit-renderer": "~25.0.0",
43
- "@vaadin/select": "~25.0.0",
44
- "@vaadin/text-field": "~25.0.0",
45
- "@vaadin/vaadin-themable-mixin": "~25.0.0",
39
+ "@vaadin/checkbox": "~25.0.1",
40
+ "@vaadin/component-base": "~25.0.1",
41
+ "@vaadin/grid": "~25.0.1",
42
+ "@vaadin/lit-renderer": "~25.0.1",
43
+ "@vaadin/select": "~25.0.1",
44
+ "@vaadin/text-field": "~25.0.1",
45
+ "@vaadin/vaadin-themable-mixin": "~25.0.1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "~25.0.0",
50
- "@vaadin/test-runner-commands": "~25.0.0",
49
+ "@vaadin/chai-plugins": "~25.0.1",
50
+ "@vaadin/test-runner-commands": "~25.0.1",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "~25.0.0",
52
+ "@vaadin/vaadin-lumo-styles": "~25.0.1",
53
53
  "sinon": "^21.0.0"
54
54
  },
55
55
  "cvdlName": "vaadin-grid-pro",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "c979f7ca278b6412095176ada230eb07eb4456bf"
60
+ "gitHead": "ced28c07a8abee586510349b312452c8a555fd10"
61
61
  }
@@ -32,9 +32,7 @@ export * from './vaadin-grid-pro-edit-column-mixin.js';
32
32
  declare class GridProEditColumn<TItem = GridDefaultItem> extends HTMLElement {}
33
33
 
34
34
  interface GridProEditColumn<TItem = GridDefaultItem>
35
- extends GridProEditColumnMixinClass<TItem>,
36
- GridColumnMixin<TItem, GridColumn<TItem>>,
37
- GridColumn<TItem> {}
35
+ extends GridProEditColumnMixinClass<TItem>, GridColumnMixin<TItem, GridColumn<TItem>>, GridColumn<TItem> {}
38
36
 
39
37
  declare global {
40
38
  interface HTMLElementTagNameMap {
@@ -534,7 +534,11 @@ export const InlineEditingMixin = (superClass) =>
534
534
  const item = this.__getRowItem(row);
535
535
  if (this.__edited) {
536
536
  const { cell, model } = this.__edited;
537
- if (cell.parentNode === row && this.getItemId(model.item) !== this.getItemId(item)) {
537
+ if (!this._isCellEditable(cell)) {
538
+ // Cell is no longer editable, cancel edit
539
+ this._stopEdit(true, true);
540
+ } else if (cell.parentNode === row && item && this.getItemId(model.item) !== this.getItemId(item)) {
541
+ // Edited item identity has changed, stop edit
538
542
  this._stopEdit();
539
543
  }
540
544
  }
@@ -570,15 +574,7 @@ export const InlineEditingMixin = (superClass) =>
570
574
  }
571
575
  // Otherwise, check isCellEditable function
572
576
  const model = this.__getRowModel(cell.parentElement);
573
- const isEditable = column.isCellEditable(model);
574
-
575
- // Cancel editing if the cell is currently edited one and becomes no longer editable
576
- // TODO: should be moved to `__updateRow` when Grid connector is updated to use it.
577
- if (this.__edited && this.__edited.cell === cell && !isEditable) {
578
- this._stopEdit(true, true);
579
- }
580
-
581
- return isEditable;
577
+ return column.isCellEditable(model);
582
578
  }
583
579
 
584
580
  /**
@@ -39,9 +39,7 @@ export interface GridProCustomEventMap<TItem> {
39
39
  }
40
40
 
41
41
  export interface GridProEventMap<TItem>
42
- extends HTMLElementEventMap,
43
- GridProCustomEventMap<TItem>,
44
- GridCustomEventMap<TItem> {}
42
+ extends HTMLElementEventMap, GridProCustomEventMap<TItem>, GridCustomEventMap<TItem> {}
45
43
 
46
44
  /**
47
45
  * `<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.
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",
4
+ "version": "25.0.1",
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/#/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/#/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/#/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/#/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.1/#/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.1/#/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.1/#/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.1/#/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",
4
+ "version": "25.0.1",
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/#/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/#/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/#/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/#/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.1/#/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.1/#/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.1/#/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.1/#/elements/vaadin-select).",
181
181
  "extension": true,
182
182
  "attributes": [
183
183
  {