@vaadin/grid-pro 24.4.0-dev.b3e1d14600 → 24.5.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.
Files changed (52) hide show
  1. package/LICENSE +3 -1141
  2. package/README.md +0 -1
  3. package/package.json +11 -11
  4. package/src/lit/column-renderer-directives.d.ts +1 -1
  5. package/src/lit/column-renderer-directives.js +1 -1
  6. package/src/vaadin-grid-pro-edit-checkbox.js +1 -1
  7. package/src/vaadin-grid-pro-edit-column-mixin.d.ts +19 -1
  8. package/src/vaadin-grid-pro-edit-column-mixin.js +33 -10
  9. package/src/vaadin-grid-pro-edit-column.d.ts +1 -1
  10. package/src/vaadin-grid-pro-edit-column.js +1 -1
  11. package/src/vaadin-grid-pro-edit-select-mixin.js +1 -1
  12. package/src/vaadin-grid-pro-edit-select.js +1 -1
  13. package/src/vaadin-grid-pro-edit-text-field.js +1 -1
  14. package/src/vaadin-grid-pro-inline-editing-mixin.d.ts +1 -1
  15. package/src/vaadin-grid-pro-inline-editing-mixin.js +115 -57
  16. package/src/vaadin-grid-pro.d.ts +1 -1
  17. package/src/vaadin-grid-pro.js +1 -1
  18. package/src/vaadin-lit-grid-pro-edit-checkbox.js +2 -2
  19. package/src/vaadin-lit-grid-pro-edit-column.js +2 -2
  20. package/src/vaadin-lit-grid-pro-edit-select.js +2 -2
  21. package/src/vaadin-lit-grid-pro-edit-text-field.js +2 -2
  22. package/src/vaadin-lit-grid-pro.js +2 -2
  23. package/theme/lumo/vaadin-grid-pro-edit-checkbox.d.ts +2 -0
  24. package/theme/lumo/vaadin-grid-pro-edit-column.d.ts +4 -0
  25. package/theme/lumo/vaadin-grid-pro-edit-select-styles.d.ts +2 -0
  26. package/theme/lumo/vaadin-grid-pro-edit-select.d.ts +3 -0
  27. package/theme/lumo/vaadin-grid-pro-edit-text-field-styles.d.ts +1 -0
  28. package/theme/lumo/vaadin-grid-pro-edit-text-field.d.ts +3 -0
  29. package/theme/lumo/vaadin-grid-pro-editor-styles.d.ts +5 -0
  30. package/theme/lumo/vaadin-grid-pro-styles.d.ts +2 -0
  31. package/theme/lumo/vaadin-grid-pro.d.ts +3 -0
  32. package/theme/lumo/vaadin-lit-grid-pro-edit-checkbox.d.ts +2 -0
  33. package/theme/lumo/vaadin-lit-grid-pro-edit-column.d.ts +4 -0
  34. package/theme/lumo/vaadin-lit-grid-pro-edit-select.d.ts +3 -0
  35. package/theme/lumo/vaadin-lit-grid-pro-edit-text-field.d.ts +3 -0
  36. package/theme/lumo/vaadin-lit-grid-pro.d.ts +3 -0
  37. package/theme/material/vaadin-grid-pro-edit-checkbox.d.ts +2 -0
  38. package/theme/material/vaadin-grid-pro-edit-column.d.ts +4 -0
  39. package/theme/material/vaadin-grid-pro-edit-select-styles.d.ts +1 -0
  40. package/theme/material/vaadin-grid-pro-edit-select.d.ts +3 -0
  41. package/theme/material/vaadin-grid-pro-edit-text-field-styles.d.ts +1 -0
  42. package/theme/material/vaadin-grid-pro-edit-text-field.d.ts +3 -0
  43. package/theme/material/vaadin-grid-pro-editor-styles.d.ts +2 -0
  44. package/theme/material/vaadin-grid-pro-styles.d.ts +2 -0
  45. package/theme/material/vaadin-grid-pro.d.ts +3 -0
  46. package/theme/material/vaadin-lit-grid-pro-edit-checkbox.d.ts +2 -0
  47. package/theme/material/vaadin-lit-grid-pro-edit-column.d.ts +4 -0
  48. package/theme/material/vaadin-lit-grid-pro-edit-select.d.ts +3 -0
  49. package/theme/material/vaadin-lit-grid-pro-edit-text-field.d.ts +3 -0
  50. package/theme/material/vaadin-lit-grid-pro.d.ts +3 -0
  51. package/web-types.json +910 -0
  52. package/web-types.lit.json +489 -0
package/README.md CHANGED
@@ -7,7 +7,6 @@ An extension of the `vaadin-grid` component that provides inline editing with fu
7
7
  [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/grid-pro)
8
8
 
9
9
  [![npm version](https://badgen.net/npm/v/@vaadin/grid-pro)](https://www.npmjs.com/package/@vaadin/grid-pro)
10
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
11
10
 
12
11
  ```html
13
12
  <vaadin-grid-pro>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid-pro",
3
- "version": "24.4.0-dev.b3e1d14600",
3
+ "version": "24.5.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,15 +39,15 @@
39
39
  "dependencies": {
40
40
  "@open-wc/dedupe-mixin": "^1.3.0",
41
41
  "@polymer/polymer": "^3.0.0",
42
- "@vaadin/checkbox": "24.4.0-dev.b3e1d14600",
43
- "@vaadin/component-base": "24.4.0-dev.b3e1d14600",
44
- "@vaadin/grid": "24.4.0-dev.b3e1d14600",
45
- "@vaadin/lit-renderer": "24.4.0-dev.b3e1d14600",
46
- "@vaadin/select": "24.4.0-dev.b3e1d14600",
47
- "@vaadin/text-field": "24.4.0-dev.b3e1d14600",
48
- "@vaadin/vaadin-lumo-styles": "24.4.0-dev.b3e1d14600",
49
- "@vaadin/vaadin-material-styles": "24.4.0-dev.b3e1d14600",
50
- "@vaadin/vaadin-themable-mixin": "24.4.0-dev.b3e1d14600",
42
+ "@vaadin/checkbox": "24.5.0-alpha1",
43
+ "@vaadin/component-base": "24.5.0-alpha1",
44
+ "@vaadin/grid": "24.5.0-alpha1",
45
+ "@vaadin/lit-renderer": "24.5.0-alpha1",
46
+ "@vaadin/select": "24.5.0-alpha1",
47
+ "@vaadin/text-field": "24.5.0-alpha1",
48
+ "@vaadin/vaadin-lumo-styles": "24.5.0-alpha1",
49
+ "@vaadin/vaadin-material-styles": "24.5.0-alpha1",
50
+ "@vaadin/vaadin-themable-mixin": "24.5.0-alpha1",
51
51
  "lit": "^3.0.0"
52
52
  },
53
53
  "devDependencies": {
@@ -60,5 +60,5 @@
60
60
  "web-types.json",
61
61
  "web-types.lit.json"
62
62
  ],
63
- "gitHead": "502d4f5b03f770a83d270d98078cde230254dd0e"
63
+ "gitHead": "57806caac5468532a3b4e3dbdda730cd0fca193a"
64
64
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -58,6 +58,24 @@ export declare class GridProEditColumnMixinClass<TItem> {
58
58
  */
59
59
  editorValuePath: string;
60
60
 
61
+ /**
62
+ * A function to check whether a specific cell of this column can be
63
+ * edited. This allows to disable editing of individual rows or cells,
64
+ * based on the item.
65
+ *
66
+ * Receives a `model` object containing the item for an individual row,
67
+ * and should return a boolean indicating whether the column's cell in
68
+ * that row is editable.
69
+ *
70
+ * The `model` object contains:
71
+ * - `model.index` The index of the item.
72
+ * - `model.item` The item.
73
+ * - `model.expanded` Sublevel toggle state.
74
+ * - `model.level` Level of the tree represented with a horizontal offset of the toggle button.
75
+ * - `model.selected` Selected state.
76
+ */
77
+ isCellEditable: (model: GridItemModel<TItem>) => boolean;
78
+
61
79
  protected _getEditorComponent(cell: HTMLElement): HTMLElement | null;
62
80
 
63
81
  protected _getEditorValue(editor: HTMLElement): unknown | null;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -8,7 +8,6 @@
8
8
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
9
  * license.
10
10
  */
11
- import { addValueToAttribute } from '@vaadin/component-base/src/dom-utils.js';
12
11
  import { get, set } from '@vaadin/component-base/src/path-utils.js';
13
12
 
14
13
  /**
@@ -84,13 +83,36 @@ export const GridProEditColumnMixin = (superClass) =>
84
83
  sync: true,
85
84
  },
86
85
 
86
+ /**
87
+ * A function to check whether a specific cell of this column can be
88
+ * edited. This allows to disable editing of individual rows or cells,
89
+ * based on the item.
90
+ *
91
+ * Receives a `model` object containing the item for an individual row,
92
+ * and should return a boolean indicating whether the column's cell in
93
+ * that row is editable.
94
+ *
95
+ * The `model` object contains:
96
+ * - `model.index` The index of the item.
97
+ * - `model.item` The item.
98
+ * - `model.expanded` Sublevel toggle state.
99
+ * - `model.level` Level of the tree represented with a horizontal offset of the toggle button.
100
+ * - `model.selected` Selected state.
101
+ *
102
+ * @type {(model: GridItemModel) => boolean}
103
+ */
104
+ isCellEditable: {
105
+ type: Function,
106
+ observer: '_isCellEditableChanged',
107
+ },
108
+
87
109
  /** @private */
88
110
  _oldRenderer: Function,
89
111
  };
90
112
  }
91
113
 
92
114
  static get observers() {
93
- return ['_editModeRendererChanged(editModeRenderer, __initialized)', '_cellsChanged(_cells)'];
115
+ return ['_editModeRendererChanged(editModeRenderer, __initialized)'];
94
116
  }
95
117
 
96
118
  constructor() {
@@ -121,11 +143,9 @@ export const GridProEditColumnMixin = (superClass) =>
121
143
  }
122
144
 
123
145
  /** @private */
124
- _cellsChanged() {
125
- this._cells.forEach((cell) => {
126
- const target = cell._focusButton || cell;
127
- addValueToAttribute(target, 'part', 'editable-cell');
128
- });
146
+ _isCellEditableChanged(newValue, oldValue) {
147
+ // Re-render grid to update editable-cell part names
148
+ this._grid.requestContentUpdate();
129
149
  }
130
150
 
131
151
  /** @private */
@@ -267,8 +287,11 @@ export const GridProEditColumnMixin = (superClass) =>
267
287
  this._setEditorValue(editor, get(this.path, model.item));
268
288
  editor._grid = this._grid;
269
289
 
270
- this._focusEditor(editor);
271
- requestAnimationFrame(() => this._focusEditor(editor));
290
+ if (editor.updateComplete) {
291
+ editor.updateComplete.then(() => this._focusEditor(editor));
292
+ } else {
293
+ this._focusEditor(editor);
294
+ }
272
295
  }
273
296
 
274
297
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -11,6 +11,7 @@
11
11
  import { animationFrame } from '@vaadin/component-base/src/async.js';
12
12
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
13
13
  import { get, set } from '@vaadin/component-base/src/path-utils.js';
14
+ import { iterateRowCells, updatePart } from '@vaadin/grid/src/vaadin-grid-helpers.js';
14
15
 
15
16
  /**
16
17
  * @polymerMixin
@@ -119,15 +120,6 @@ export const InlineEditingMixin = (superClass) =>
119
120
  this.$.table.addEventListener('click', (e) => {
120
121
  const column = this.getEventContext(e).column;
121
122
  if (column && this._isEditColumn(column)) {
122
- if (e.target.matches(':not([type=checkbox])')) {
123
- // Prevents the `click` event from a column's cell in order to prevent making the cell's parent row active.
124
- // Note, it should not prevent the `click` event from checkboxes. Otherwise, they will not respond to user interactions.
125
- // Read more: https://github.com/vaadin/web-components/pull/2539#discussion_r712076433.
126
- // TODO: Using `preventDefault()` for any other purpose than preventing the default browser's behavior is bad practice
127
- // and therefore it would be great to refactor this part someday.
128
- e.preventDefault();
129
- }
130
-
131
123
  if (this.editOnClick) {
132
124
  this._enterEditFromEvent(e);
133
125
  }
@@ -165,6 +157,20 @@ export const InlineEditingMixin = (superClass) =>
165
157
  }
166
158
  }
167
159
 
160
+ /**
161
+ * Prevents making an edit column cell's parent row active on click.
162
+ *
163
+ * @override
164
+ * @protected
165
+ */
166
+ _shouldPreventCellActivationOnClick(e) {
167
+ return (
168
+ super._shouldPreventCellActivationOnClick(e) ||
169
+ // The clicked cell is editable
170
+ this._isEditColumn(this.getEventContext(e).column)
171
+ );
172
+ }
173
+
168
174
  /**
169
175
  * Override an observer from `DisabledMixin` to stop
170
176
  * editing when grid element becomes disabled.
@@ -207,8 +213,7 @@ export const InlineEditingMixin = (superClass) =>
207
213
  const edited = this.__edited;
208
214
 
209
215
  if (context.item && this._isEditColumn(column)) {
210
- const path = e.composedPath();
211
- const cell = path[path.indexOf(this.$.table) - 3];
216
+ const { cell } = this._getGridEventLocation(e);
212
217
 
213
218
  if (!cell || cell.getAttribute('part').indexOf('details-cell') > -1) {
214
219
  return;
@@ -218,6 +223,10 @@ export const InlineEditingMixin = (superClass) =>
218
223
  return;
219
224
  }
220
225
 
226
+ if (!this._isCellEditable(cell)) {
227
+ return;
228
+ }
229
+
221
230
  callback(e);
222
231
  }
223
232
  });
@@ -273,8 +282,7 @@ export const InlineEditingMixin = (superClass) =>
273
282
  const edited = this.__edited;
274
283
 
275
284
  if (context.item && this._isEditColumn(column)) {
276
- const path = e.composedPath();
277
- const cell = path[path.indexOf(this.$.table) - 3];
285
+ const { cell } = this._getGridEventLocation(e);
278
286
 
279
287
  if (!cell || cell.getAttribute('part').indexOf('details-cell') > -1) {
280
288
  return;
@@ -325,8 +333,10 @@ export const InlineEditingMixin = (superClass) =>
325
333
 
326
334
  /** @private */
327
335
  _startEdit(cell, column) {
336
+ const isCellEditable = this._isCellEditable(cell);
337
+
328
338
  // TODO: remove `_editingDisabled` after Flow counterpart is updated.
329
- if (this.disabled || this._editingDisabled) {
339
+ if (this.disabled || this._editingDisabled || !isCellEditable) {
330
340
  return;
331
341
  }
332
342
  // Cancel debouncer enqueued on focusout
@@ -421,59 +431,67 @@ export const InlineEditingMixin = (superClass) =>
421
431
 
422
432
  this._cancelStopEdit();
423
433
 
424
- const cols = this._getEditColumns();
425
-
434
+ const editableColumns = this._getEditColumns();
426
435
  const { cell, column, model } = this.__edited;
427
- const colIndex = cols.indexOf(column);
428
- const { index } = model;
429
-
430
- let nextCol = null;
431
- let nextIdx = index;
432
436
 
433
- // Enter key
434
- if (e.keyCode === 13) {
435
- nextCol = column;
436
-
437
- // Move up / down
438
- if (this.enterNextRow) {
439
- nextIdx = e.shiftKey ? index - 1 : index + 1;
440
- }
437
+ this._stopEdit();
438
+ e.preventDefault();
439
+ // Prevent vaadin-grid handler from being called
440
+ e.stopImmediatePropagation();
441
+
442
+ // Try to find the next editable cell
443
+ let nextIndex = model.index;
444
+ let nextColumn = column;
445
+ let nextCell = cell;
446
+ let directionX = 0;
447
+ let directionY = 0;
448
+
449
+ // Enter key: move up / down
450
+ if (e.keyCode === 13 && this.enterNextRow) {
451
+ directionY = e.shiftKey ? -1 : 1;
441
452
  }
442
453
 
443
454
  // Tab: move right / left
444
455
  if (e.keyCode === 9) {
445
- if (e.shiftKey) {
446
- if (cols[colIndex - 1]) {
447
- nextCol = cols[colIndex - 1];
448
- } else if (index > 0) {
449
- nextIdx = index - 1;
450
- nextCol = cols[cols.length - 1];
456
+ directionX = e.shiftKey ? -1 : 1;
457
+ }
458
+
459
+ if (directionX || directionY) {
460
+ while (nextCell) {
461
+ if (directionX) {
462
+ // Move horizontally
463
+ nextColumn = editableColumns[editableColumns.indexOf(nextColumn) + directionX];
464
+ if (!nextColumn) {
465
+ // Wrap to the next or previous row
466
+ nextIndex += directionX;
467
+ nextColumn = editableColumns[directionX > 0 ? 0 : editableColumns.length - 1];
468
+ }
469
+ }
470
+ // Move vertically
471
+ if (directionY) {
472
+ nextIndex += directionY;
473
+ }
474
+ // Stop looking if the next cell is editable
475
+ const nextRow = this._getRowByIndex(nextIndex);
476
+ // eslint-disable-next-line @typescript-eslint/no-loop-func
477
+ nextCell = nextRow && Array.from(nextRow.children).find((cell) => cell._column === nextColumn);
478
+ if (nextCell && this._isCellEditable(nextCell)) {
479
+ break;
451
480
  }
452
- } else if (cols[colIndex + 1]) {
453
- nextCol = cols[colIndex + 1];
454
- } else {
455
- nextIdx = index + 1;
456
- nextCol = cols[0];
457
481
  }
458
482
  }
459
483
 
460
- const nextRow = nextIdx === index ? cell.parentNode : this._getRowByIndex(nextIdx) || null;
461
-
462
- this._stopEdit();
463
-
464
- if (nextRow && nextCol) {
465
- const nextCell = Array.from(nextRow.children).find((cell) => cell._column === nextCol);
466
- e.preventDefault();
467
-
468
- // Prevent vaadin-grid handler from being called
469
- e.stopImmediatePropagation();
484
+ // Focus current cell as fallback
485
+ if (!nextCell) {
486
+ nextCell = cell;
487
+ nextIndex = model.index;
488
+ }
470
489
 
471
- if (!this.singleCellEdit && nextCell !== cell) {
472
- this._startEdit(nextCell, nextCol);
473
- } else {
474
- this._ensureScrolledToIndex(nextIdx);
475
- nextCell.focus();
476
- }
490
+ if (!this.singleCellEdit && nextCell !== cell) {
491
+ this._startEdit(nextCell, nextColumn);
492
+ } else {
493
+ this._ensureScrolledToIndex(nextIndex);
494
+ nextCell.focus();
477
495
  }
478
496
  }
479
497
 
@@ -492,6 +510,46 @@ export const InlineEditingMixin = (superClass) =>
492
510
  super._updateItem(row, item);
493
511
  }
494
512
 
513
+ /**
514
+ * Override method from `StylingMixin` to apply `editable-cell` part to the
515
+ * cells of edit columns.
516
+ *
517
+ * @override
518
+ */
519
+ _generateCellPartNames(row, model) {
520
+ super._generateCellPartNames(row, model);
521
+
522
+ iterateRowCells(row, (cell) => {
523
+ const isEditable = this._isCellEditable(cell);
524
+ const target = cell._focusButton || cell;
525
+ updatePart(target, isEditable, 'editable-cell');
526
+ });
527
+ }
528
+
529
+ /** @private */
530
+ _isCellEditable(cell) {
531
+ const column = cell._column;
532
+ // Not editable if the column is not an edit column
533
+ if (!this._isEditColumn(column)) {
534
+ return false;
535
+ }
536
+ // Cell is editable by default if isCellEditable is not configured
537
+ if (!column.isCellEditable) {
538
+ return true;
539
+ }
540
+ // Otherwise, check isCellEditable function
541
+ const model = this.__getRowModel(cell.parentElement);
542
+ const isEditable = column.isCellEditable(model);
543
+
544
+ // Cancel editing if the cell is currently edited one and becomes no longer editable
545
+ // TODO: should be moved to `_updateItem` when Grid connector is updated to use it.
546
+ if (this.__edited && this.__edited.cell === cell && !isEditable) {
547
+ this._stopEdit(true, true);
548
+ }
549
+
550
+ return isEditable;
551
+ }
552
+
495
553
  /**
496
554
  * Fired before exiting the cell edit mode, if the value has been changed.
497
555
  * If the default is prevented, value change would not be applied.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -16,7 +16,7 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
16
16
  *
17
17
  * ## Disclaimer
18
18
  *
19
- * This component is an experiment not intended for publishing to npm.
19
+ * This component is an experiment and not yet a part of Vaadin platform.
20
20
  * There is no ETA regarding specific Vaadin version where it'll land.
21
21
  */
22
22
  class GridProEditCheckbox extends Checkbox {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -20,7 +20,7 @@ import { GridProEditColumnMixin } from './vaadin-grid-pro-edit-column-mixin.js';
20
20
  *
21
21
  * ## Disclaimer
22
22
  *
23
- * This component is an experiment not intended for publishing to npm.
23
+ * This component is an experiment and not yet a part of Vaadin platform.
24
24
  * There is no ETA regarding specific Vaadin version where it'll land.
25
25
  */
26
26
  class GridProEditColumn extends GridProEditColumnMixin(GridColumn) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -17,7 +17,7 @@ import { GridProEditSelectMixin } from './vaadin-grid-pro-edit-select-mixin.js';
17
17
  *
18
18
  * ## Disclaimer
19
19
  *
20
- * This component is an experiment not intended for publishing to npm.
20
+ * This component is an experiment and not yet a part of Vaadin platform.
21
21
  * There is no ETA regarding specific Vaadin version where it'll land.
22
22
  */
23
23
  class GridProEditSelect extends GridProEditSelectMixin(Select) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -16,7 +16,7 @@ import { TextField } from '@vaadin/text-field/src/vaadin-lit-text-field.js';
16
16
  *
17
17
  * ## Disclaimer
18
18
  *
19
- * This component is an experiment not intended for publishing to npm.
19
+ * This component is an experiment and not yet a part of Vaadin platform.
20
20
  * There is no ETA regarding specific Vaadin version where it'll land.
21
21
  */
22
22
  class GridProEditText extends TextField {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -17,7 +17,7 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
17
17
  *
18
18
  * ## Disclaimer
19
19
  *
20
- * This component is an experiment not intended for publishing to npm.
20
+ * This component is an experiment and not yet a part of Vaadin platform.
21
21
  * There is no ETA regarding specific Vaadin version where it'll land.
22
22
  */
23
23
  class GridPro extends InlineEditingMixin(Grid) {
@@ -0,0 +1,2 @@
1
+ import '@vaadin/checkbox/theme/lumo/vaadin-checkbox.js';
2
+ import '../../src/vaadin-grid-pro-edit-checkbox.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-grid-pro-edit-checkbox.js';
2
+ import './vaadin-grid-pro-edit-select.js';
3
+ import './vaadin-grid-pro-edit-text-field.js';
4
+ import '../../src/vaadin-grid-pro-edit-column.js';
@@ -0,0 +1,2 @@
1
+ import '@vaadin/vaadin-lumo-styles/spacing.js';
2
+ import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/select/theme/lumo/vaadin-select.js';
2
+ import './vaadin-grid-pro-edit-select-styles.js';
3
+ import '../../src/vaadin-grid-pro-edit-select.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
2
+ import './vaadin-grid-pro-edit-text-field-styles.js';
3
+ import '../../src/vaadin-grid-pro-edit-text-field.js';
@@ -0,0 +1,5 @@
1
+ import '@vaadin/vaadin-lumo-styles/color.js';
2
+ import '@vaadin/vaadin-lumo-styles/spacing.js';
3
+ import '@vaadin/vaadin-lumo-styles/typography.js';
4
+ declare const gridProEditor: import("lit").CSSResult;
5
+ export { gridProEditor };
@@ -0,0 +1,2 @@
1
+ import '@vaadin/vaadin-lumo-styles/color.js';
2
+ import '@vaadin/vaadin-lumo-styles/style.js';
@@ -0,0 +1,3 @@
1
+ import '@vaadin/grid/theme/lumo/vaadin-grid-styles.js';
2
+ import './vaadin-grid-pro-styles.js';
3
+ import '../../src/vaadin-grid-pro.js';
@@ -0,0 +1,2 @@
1
+ import '@vaadin/checkbox/theme/lumo/vaadin-checkbox-styles.js';
2
+ import '../../src/vaadin-lit-grid-pro-edit-checkbox.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-lit-grid-pro-edit-checkbox.js';
2
+ import './vaadin-lit-grid-pro-edit-select.js';
3
+ import './vaadin-lit-grid-pro-edit-text-field.js';
4
+ import '../../src/vaadin-lit-grid-pro-edit-column.js';