@vaadin/grid-pro 24.10.6 → 24.10.8
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 +13 -13
- package/src/vaadin-grid-pro-inline-editing-mixin.js +53 -34
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid-pro",
|
|
3
|
-
"version": "24.10.
|
|
3
|
+
"version": "24.10.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/checkbox": "~24.10.
|
|
43
|
-
"@vaadin/component-base": "~24.10.
|
|
44
|
-
"@vaadin/grid": "~24.10.
|
|
45
|
-
"@vaadin/lit-renderer": "~24.10.
|
|
46
|
-
"@vaadin/select": "~24.10.
|
|
47
|
-
"@vaadin/text-field": "~24.10.
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "~24.10.
|
|
49
|
-
"@vaadin/vaadin-material-styles": "~24.10.
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "~24.10.
|
|
42
|
+
"@vaadin/checkbox": "~24.10.8",
|
|
43
|
+
"@vaadin/component-base": "~24.10.8",
|
|
44
|
+
"@vaadin/grid": "~24.10.8",
|
|
45
|
+
"@vaadin/lit-renderer": "~24.10.8",
|
|
46
|
+
"@vaadin/select": "~24.10.8",
|
|
47
|
+
"@vaadin/text-field": "~24.10.8",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "~24.10.8",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "~24.10.8",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "~24.10.8",
|
|
51
51
|
"lit": "^3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@vaadin/chai-plugins": "~24.10.
|
|
55
|
-
"@vaadin/test-runner-commands": "~24.10.
|
|
54
|
+
"@vaadin/chai-plugins": "~24.10.8",
|
|
55
|
+
"@vaadin/test-runner-commands": "~24.10.8",
|
|
56
56
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
57
57
|
"sinon": "^18.0.0"
|
|
58
58
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "0b3fa9c6c4b44a68b2ae557f15bf11e748e01ccb"
|
|
65
65
|
}
|
|
@@ -363,15 +363,27 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
363
363
|
|
|
364
364
|
/** @private */
|
|
365
365
|
_startEdit(cell, column) {
|
|
366
|
-
const isCellEditable = this._isCellEditable(cell);
|
|
367
|
-
|
|
368
366
|
// TODO: remove `_editingDisabled` after Flow counterpart is updated.
|
|
369
|
-
if (this.disabled || this._editingDisabled || !
|
|
367
|
+
if (this.disabled || this._editingDisabled || !this._isCellEditable(cell)) {
|
|
370
368
|
return;
|
|
371
369
|
}
|
|
372
|
-
|
|
370
|
+
|
|
371
|
+
// Unfocusable editors never fire focusout, so no stop was scheduled.
|
|
372
|
+
// Stop the previous edit here.
|
|
373
|
+
if (this.__edited && this.__edited.cell !== cell) {
|
|
374
|
+
this._stopEdit();
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Cancel debouncer enqueued on focusout, including one enqueued by the
|
|
378
|
+
// blur() in the stop above
|
|
373
379
|
this._cancelStopEdit();
|
|
374
380
|
|
|
381
|
+
// Stopping the previous edit runs listeners that may have made this cell
|
|
382
|
+
// non-editable
|
|
383
|
+
if (!this._isCellEditable(cell)) {
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
|
|
375
387
|
this._scrollHorizontallyToCell(cell);
|
|
376
388
|
|
|
377
389
|
const model = this.__getRowModel(cell.parentElement);
|
|
@@ -400,42 +412,49 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
400
412
|
if (!this.__edited) {
|
|
401
413
|
return;
|
|
402
414
|
}
|
|
415
|
+
if (this.__stoppingEdit) {
|
|
416
|
+
// `item-property-changed` listeners may re-render and re-enter here
|
|
417
|
+
// before `__edited` is cleared, so ignore nested calls, including cancels
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
403
420
|
const { cell, column, model } = this.__edited;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
if (editor) {
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
421
|
+
this.__stoppingEdit = true;
|
|
422
|
+
|
|
423
|
+
try {
|
|
424
|
+
if (!shouldCancel && !this.hasAttribute('loading-editor')) {
|
|
425
|
+
const editor = column._getEditorComponent(cell);
|
|
426
|
+
if (editor) {
|
|
427
|
+
const value = column._getEditorValue(editor);
|
|
428
|
+
if (value !== get(column.path, model.item)) {
|
|
429
|
+
// Some browsers skip the change event when the editor is
|
|
430
|
+
// removed from the DOM, so blur to dispatch it.
|
|
431
|
+
editor.blur();
|
|
432
|
+
|
|
433
|
+
this.dispatchEvent(
|
|
434
|
+
new CustomEvent('item-property-changed', {
|
|
435
|
+
detail: {
|
|
436
|
+
index: model.index,
|
|
437
|
+
item: model.item,
|
|
438
|
+
path: column.path,
|
|
439
|
+
value,
|
|
440
|
+
},
|
|
441
|
+
bubbles: true,
|
|
442
|
+
cancelable: true,
|
|
443
|
+
composed: true,
|
|
444
|
+
}),
|
|
445
|
+
);
|
|
446
|
+
}
|
|
430
447
|
}
|
|
431
448
|
}
|
|
432
|
-
}
|
|
433
449
|
|
|
434
|
-
|
|
450
|
+
column._stopCellEdit(cell, model);
|
|
435
451
|
|
|
436
|
-
|
|
452
|
+
this.__edited = null;
|
|
437
453
|
|
|
438
|
-
|
|
454
|
+
this.removeEventListener('item-property-changed', this.__boundItemPropertyChanged);
|
|
455
|
+
} finally {
|
|
456
|
+
this.__stoppingEdit = false;
|
|
457
|
+
}
|
|
439
458
|
|
|
440
459
|
if (shouldRestoreFocus) {
|
|
441
460
|
cell.focus();
|
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": "24.10.
|
|
4
|
+
"version": "24.10.8",
|
|
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/24.10.
|
|
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/24.10.8/#/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/24.10.8/#/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/24.10.8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.10.8/#/elements/vaadin-select).",
|
|
405
405
|
"attributes": [
|
|
406
406
|
{
|
|
407
407
|
"name": "accessible-name",
|
package/web-types.lit.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": "24.10.
|
|
4
|
+
"version": "24.10.8",
|
|
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/24.10.
|
|
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/24.10.8/#/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/24.10.8/#/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/24.10.8/#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](https://cdn.vaadin.com/vaadin-web-components/24.10.8/#/elements/vaadin-select).",
|
|
181
181
|
"extension": true,
|
|
182
182
|
"attributes": [
|
|
183
183
|
{
|