@vaadin/grid-pro 25.2.0-alpha1 → 25.2.0-alpha3
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 +14 -14
- package/src/vaadin-grid-pro-inline-editing-mixin.js +20 -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.2.0-
|
|
3
|
+
"version": "25.2.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
41
|
-
"@vaadin/checkbox": "25.2.0-
|
|
42
|
-
"@vaadin/component-base": "25.2.0-
|
|
43
|
-
"@vaadin/grid": "25.2.0-
|
|
44
|
-
"@vaadin/lit-renderer": "25.2.0-
|
|
45
|
-
"@vaadin/select": "25.2.0-
|
|
46
|
-
"@vaadin/text-field": "25.2.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.2.0-alpha3",
|
|
41
|
+
"@vaadin/checkbox": "25.2.0-alpha3",
|
|
42
|
+
"@vaadin/component-base": "25.2.0-alpha3",
|
|
43
|
+
"@vaadin/grid": "25.2.0-alpha3",
|
|
44
|
+
"@vaadin/lit-renderer": "25.2.0-alpha3",
|
|
45
|
+
"@vaadin/select": "25.2.0-alpha3",
|
|
46
|
+
"@vaadin/text-field": "25.2.0-alpha3",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha3",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/aura": "25.2.0-
|
|
52
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
53
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
51
|
+
"@vaadin/aura": "25.2.0-alpha3",
|
|
52
|
+
"@vaadin/chai-plugins": "25.2.0-alpha3",
|
|
53
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha3",
|
|
54
54
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
55
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
55
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha3",
|
|
56
56
|
"sinon": "^21.0.2"
|
|
57
57
|
},
|
|
58
58
|
"cvdlName": "vaadin-grid-pro",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "6ba3d66b9eeb541945dc071e72e05dac2d4c3e0b"
|
|
65
65
|
}
|
|
@@ -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,11 @@ 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.scrollToColumn(column);
|
|
361
376
|
|
|
362
|
-
const model = this.__getRowModel(cell.
|
|
377
|
+
const model = this.__getRowModel(cell.__parentRow);
|
|
363
378
|
this.__edited = { cell, column, model };
|
|
364
379
|
column._startCellEdit(cell, model);
|
|
365
380
|
|
|
@@ -505,7 +520,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
505
520
|
// Stop looking if the next cell is editable
|
|
506
521
|
const nextRow = this._getRowByIndex(nextIndex);
|
|
507
522
|
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
|
508
|
-
nextCell = nextRow && Array.from(nextRow.
|
|
523
|
+
nextCell = nextRow && Array.from(nextRow.__cells).find((cell) => cell._column === nextColumn);
|
|
509
524
|
if (nextCell && this._isCellEditable(nextCell)) {
|
|
510
525
|
break;
|
|
511
526
|
}
|
|
@@ -537,7 +552,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
537
552
|
if (!this._isCellEditable(cell)) {
|
|
538
553
|
// Cell is no longer editable, cancel edit
|
|
539
554
|
this._stopEdit(true, true);
|
|
540
|
-
} else if (cell.
|
|
555
|
+
} else if (cell.__parentRow === row && item && this.getItemId(model.item) !== this.getItemId(item)) {
|
|
541
556
|
// Edited item identity has changed, stop edit
|
|
542
557
|
this._stopEdit();
|
|
543
558
|
}
|
|
@@ -573,7 +588,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
573
588
|
return true;
|
|
574
589
|
}
|
|
575
590
|
// Otherwise, check isCellEditable function
|
|
576
|
-
const model = this.__getRowModel(cell.
|
|
591
|
+
const model = this.__getRowModel(cell.__parentRow);
|
|
577
592
|
return column.isCellEditable(model);
|
|
578
593
|
}
|
|
579
594
|
|
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.2.0-
|
|
4
|
+
"version": "25.2.0-alpha3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -429,7 +429,7 @@
|
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
431
|
"name": "vaadin-grid-pro",
|
|
432
|
-
"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.2.0-
|
|
432
|
+
"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.2.0-alpha3/#/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.2.0-alpha3/#/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.2.0-alpha3/#/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.2.0-alpha3/#/elements/vaadin-select).",
|
|
433
433
|
"attributes": [
|
|
434
434
|
{
|
|
435
435
|
"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.2.0-
|
|
4
|
+
"version": "25.2.0-alpha3",
|
|
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.2.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.2.0-alpha3/#/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.2.0-alpha3/#/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.2.0-alpha3/#/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.2.0-alpha3/#/elements/vaadin-select).",
|
|
181
181
|
"extension": true,
|
|
182
182
|
"attributes": [
|
|
183
183
|
{
|