@vaadin/grid-pro 25.0.7 → 25.0.9
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 +22 -5
- 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": "25.0.
|
|
3
|
+
"version": "25.0.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
|
-
"@vaadin/checkbox": "~25.0.
|
|
40
|
-
"@vaadin/component-base": "~25.0.
|
|
41
|
-
"@vaadin/grid": "~25.0.
|
|
42
|
-
"@vaadin/lit-renderer": "~25.0.
|
|
43
|
-
"@vaadin/select": "~25.0.
|
|
44
|
-
"@vaadin/text-field": "~25.0.
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "~25.0.
|
|
39
|
+
"@vaadin/checkbox": "~25.0.9",
|
|
40
|
+
"@vaadin/component-base": "~25.0.9",
|
|
41
|
+
"@vaadin/grid": "~25.0.9",
|
|
42
|
+
"@vaadin/lit-renderer": "~25.0.9",
|
|
43
|
+
"@vaadin/select": "~25.0.9",
|
|
44
|
+
"@vaadin/text-field": "~25.0.9",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "~25.0.9",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "~25.0.
|
|
50
|
-
"@vaadin/chai-plugins": "~25.0.
|
|
51
|
-
"@vaadin/test-runner-commands": "~25.0.
|
|
49
|
+
"@vaadin/aura": "~25.0.9",
|
|
50
|
+
"@vaadin/chai-plugins": "~25.0.9",
|
|
51
|
+
"@vaadin/test-runner-commands": "~25.0.9",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "~25.0.
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "~25.0.9",
|
|
54
54
|
"sinon": "^21.0.0"
|
|
55
55
|
},
|
|
56
56
|
"cvdlName": "vaadin-grid-pro",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "fbda8755bc46b099a6771ecef08731f452d0ac21"
|
|
62
62
|
}
|
|
@@ -325,6 +325,19 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
325
325
|
this._debouncerStopEdit = Debouncer.debounce(this._debouncerStopEdit, animationFrame, this._stopEdit.bind(this));
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Override method from ScrollMixin to stop editing if the edited cell
|
|
330
|
+
* is scrolled out of the view and removed from the DOM.
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
__updateColumnsBodyContentHidden() {
|
|
334
|
+
super.__updateColumnsBodyContentHidden();
|
|
335
|
+
|
|
336
|
+
if (this.__edited && !this.__edited.cell.isConnected) {
|
|
337
|
+
this._stopEdit(true, false);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
328
341
|
/** @private */
|
|
329
342
|
__shouldIgnoreFocusOut(event) {
|
|
330
343
|
const edited = this.__edited;
|
|
@@ -357,9 +370,13 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
357
370
|
// Cancel debouncer enqueued on focusout
|
|
358
371
|
this._cancelStopEdit();
|
|
359
372
|
|
|
360
|
-
|
|
373
|
+
// Scroll column into view synchronously, which also triggers lazy column
|
|
374
|
+
// rendering to ensure cells for that column are in the DOM.
|
|
375
|
+
this._scrollHorizontallyToCell(column._headerCell);
|
|
376
|
+
this.__updateHorizontalScrollPosition();
|
|
377
|
+
this.__updateColumnsBodyContentHidden();
|
|
361
378
|
|
|
362
|
-
const model = this.__getRowModel(cell.
|
|
379
|
+
const model = this.__getRowModel(cell.__parentRow);
|
|
363
380
|
this.__edited = { cell, column, model };
|
|
364
381
|
column._startCellEdit(cell, model);
|
|
365
382
|
|
|
@@ -505,7 +522,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
505
522
|
// Stop looking if the next cell is editable
|
|
506
523
|
const nextRow = this._getRowByIndex(nextIndex);
|
|
507
524
|
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
|
508
|
-
nextCell = nextRow && Array.from(nextRow.
|
|
525
|
+
nextCell = nextRow && Array.from(nextRow.__cells).find((cell) => cell._column === nextColumn);
|
|
509
526
|
if (nextCell && this._isCellEditable(nextCell)) {
|
|
510
527
|
break;
|
|
511
528
|
}
|
|
@@ -537,7 +554,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
537
554
|
if (!this._isCellEditable(cell)) {
|
|
538
555
|
// Cell is no longer editable, cancel edit
|
|
539
556
|
this._stopEdit(true, true);
|
|
540
|
-
} else if (cell.
|
|
557
|
+
} else if (cell.__parentRow === row && item && this.getItemId(model.item) !== this.getItemId(item)) {
|
|
541
558
|
// Edited item identity has changed, stop edit
|
|
542
559
|
this._stopEdit();
|
|
543
560
|
}
|
|
@@ -573,7 +590,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
573
590
|
return true;
|
|
574
591
|
}
|
|
575
592
|
// Otherwise, check isCellEditable function
|
|
576
|
-
const model = this.__getRowModel(cell.
|
|
593
|
+
const model = this.__getRowModel(cell.__parentRow);
|
|
577
594
|
return column.isCellEditable(model);
|
|
578
595
|
}
|
|
579
596
|
|
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.
|
|
4
|
+
"version": "25.0.9",
|
|
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.
|
|
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.9/#/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.9/#/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.9/#/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.9/#/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": "25.0.
|
|
4
|
+
"version": "25.0.9",
|
|
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.
|
|
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.9/#/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.9/#/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.9/#/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.9/#/elements/vaadin-select).",
|
|
181
181
|
"extension": true,
|
|
182
182
|
"attributes": [
|
|
183
183
|
{
|