@vaadin/grid-pro 25.2.0-alpha9 → 25.2.0-beta1
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/custom-elements.json +29 -8
- package/package.json +14 -14
- package/src/vaadin-grid-pro-edit-column-mixin.js +0 -5
- package/src/vaadin-grid-pro-edit-column.d.ts +3 -1
- package/src/vaadin-grid-pro-edit-column.js +0 -2
- package/src/vaadin-grid-pro-edit-select-mixin.js +2 -6
- package/src/vaadin-grid-pro-edit-select.js +0 -2
- package/src/vaadin-grid-pro-inline-editing-mixin.js +4 -32
- package/src/vaadin-grid-pro.d.ts +1 -1
- package/src/vaadin-grid-pro.js +1 -4
- package/web-types.json +93 -216
- package/web-types.lit.json +95 -109
package/custom-elements.json
CHANGED
|
@@ -890,7 +890,7 @@
|
|
|
890
890
|
"declarations": [
|
|
891
891
|
{
|
|
892
892
|
"kind": "class",
|
|
893
|
-
"description": "
|
|
893
|
+
"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>`](#/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>`](#/elements/vaadin-checkbox).\n- `<vaadin-grid-pro-edit-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).\n- `<vaadin-grid-pro-edit-select>` - has the same API as [`<vaadin-select>`](#/elements/vaadin-select).",
|
|
894
894
|
"name": "GridPro",
|
|
895
895
|
"members": [
|
|
896
896
|
{
|
|
@@ -1066,6 +1066,20 @@
|
|
|
1066
1066
|
"package": "@vaadin/grid/src/vaadin-grid.js"
|
|
1067
1067
|
}
|
|
1068
1068
|
},
|
|
1069
|
+
{
|
|
1070
|
+
"kind": "field",
|
|
1071
|
+
"name": "disabled",
|
|
1072
|
+
"privacy": "public",
|
|
1073
|
+
"type": {
|
|
1074
|
+
"text": "boolean"
|
|
1075
|
+
},
|
|
1076
|
+
"description": "If true, the user cannot interact with this element.",
|
|
1077
|
+
"attribute": "disabled",
|
|
1078
|
+
"inheritedFrom": {
|
|
1079
|
+
"name": "DisabledMixin",
|
|
1080
|
+
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1069
1083
|
{
|
|
1070
1084
|
"kind": "field",
|
|
1071
1085
|
"name": "dragFilter",
|
|
@@ -1532,11 +1546,6 @@
|
|
|
1532
1546
|
"name": "Grid",
|
|
1533
1547
|
"package": "@vaadin/grid/src/vaadin-grid.js"
|
|
1534
1548
|
}
|
|
1535
|
-
},
|
|
1536
|
-
{
|
|
1537
|
-
"kind": "field",
|
|
1538
|
-
"name": "slotStyles",
|
|
1539
|
-
"readonly": true
|
|
1540
1549
|
}
|
|
1541
1550
|
],
|
|
1542
1551
|
"events": [
|
|
@@ -1577,7 +1586,7 @@
|
|
|
1577
1586
|
"type": {
|
|
1578
1587
|
"text": "CustomEvent"
|
|
1579
1588
|
},
|
|
1580
|
-
"description": "Fired when a cell is focused with click or keyboard navigation.",
|
|
1589
|
+
"description": "Fired when a cell is focused with click or keyboard navigation. Use the `context` property to read event details.",
|
|
1581
1590
|
"name": "cell-focus",
|
|
1582
1591
|
"inheritedFrom": {
|
|
1583
1592
|
"name": "Grid",
|
|
@@ -1666,7 +1675,7 @@
|
|
|
1666
1675
|
"type": {
|
|
1667
1676
|
"text": "CustomEvent"
|
|
1668
1677
|
},
|
|
1669
|
-
"description": "Fired before exiting
|
|
1678
|
+
"description": "Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.",
|
|
1670
1679
|
"inheritedFrom": {
|
|
1671
1680
|
"name": "InlineEditingMixin",
|
|
1672
1681
|
"module": "src/vaadin-grid-pro-inline-editing-mixin.js"
|
|
@@ -1818,6 +1827,18 @@
|
|
|
1818
1827
|
"package": "@vaadin/grid/src/vaadin-grid.js"
|
|
1819
1828
|
}
|
|
1820
1829
|
},
|
|
1830
|
+
{
|
|
1831
|
+
"name": "disabled",
|
|
1832
|
+
"type": {
|
|
1833
|
+
"text": "boolean"
|
|
1834
|
+
},
|
|
1835
|
+
"description": "If true, the user cannot interact with this element.",
|
|
1836
|
+
"fieldName": "disabled",
|
|
1837
|
+
"inheritedFrom": {
|
|
1838
|
+
"name": "DisabledMixin",
|
|
1839
|
+
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1821
1842
|
{
|
|
1822
1843
|
"name": "drag-filter",
|
|
1823
1844
|
"type": {
|
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-beta1",
|
|
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-beta1",
|
|
41
|
+
"@vaadin/checkbox": "25.2.0-beta1",
|
|
42
|
+
"@vaadin/component-base": "25.2.0-beta1",
|
|
43
|
+
"@vaadin/grid": "25.2.0-beta1",
|
|
44
|
+
"@vaadin/lit-renderer": "25.2.0-beta1",
|
|
45
|
+
"@vaadin/select": "25.2.0-beta1",
|
|
46
|
+
"@vaadin/text-field": "25.2.0-beta1",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
|
|
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-beta1",
|
|
52
|
+
"@vaadin/chai-plugins": "25.2.0-beta1",
|
|
53
|
+
"@vaadin/test-runner-commands": "25.2.0-beta1",
|
|
54
54
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
55
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
55
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
|
|
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": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
|
|
65
65
|
}
|
|
@@ -4,16 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
11
10
|
import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
12
11
|
import { get, set } from '@vaadin/component-base/src/path-utils.js';
|
|
13
12
|
|
|
14
|
-
/**
|
|
15
|
-
* @polymerMixin
|
|
16
|
-
*/
|
|
17
13
|
export const GridProEditColumnMixin = (superClass) =>
|
|
18
14
|
class extends superClass {
|
|
19
15
|
static get properties() {
|
|
@@ -60,7 +56,6 @@ export const GridProEditColumnMixin = (superClass) =>
|
|
|
60
56
|
*/
|
|
61
57
|
editorType: {
|
|
62
58
|
type: String,
|
|
63
|
-
notify: true, // FIXME(web-padawan): needed by Flow counterpart
|
|
64
59
|
value: 'text',
|
|
65
60
|
},
|
|
66
61
|
|
|
@@ -29,7 +29,9 @@ export * from './vaadin-grid-pro-edit-column-mixin.js';
|
|
|
29
29
|
* ...
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
declare class GridProEditColumn<TItem = GridDefaultItem> extends HTMLElement {
|
|
32
|
+
declare class GridProEditColumn<TItem = GridDefaultItem> extends HTMLElement {
|
|
33
|
+
hidden: boolean;
|
|
34
|
+
}
|
|
33
35
|
|
|
34
36
|
interface GridProEditColumn<TItem = GridDefaultItem>
|
|
35
37
|
extends GridProEditColumnMixinClass<TItem>, GridColumnMixin<TItem, GridColumn<TItem>>, GridColumn<TItem> {}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -32,7 +31,6 @@ import { GridProEditColumnMixin } from './vaadin-grid-pro-edit-column-mixin.js';
|
|
|
32
31
|
*
|
|
33
32
|
* @customElement vaadin-grid-pro-edit-column
|
|
34
33
|
* @extends GridColumn
|
|
35
|
-
* @mixes GridProEditColumnMixin
|
|
36
34
|
*/
|
|
37
35
|
class GridProEditColumn extends GridProEditColumnMixin(GridColumn) {
|
|
38
36
|
static get is() {
|
|
@@ -4,14 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
|
-
/**
|
|
13
|
-
* @polymerMixin
|
|
14
|
-
*/
|
|
15
11
|
export const GridProEditSelectMixin = (superClass) =>
|
|
16
12
|
class extends superClass {
|
|
17
13
|
static get properties() {
|
|
@@ -96,13 +92,13 @@ export const GridProEditSelectMixin = (superClass) =>
|
|
|
96
92
|
}
|
|
97
93
|
|
|
98
94
|
_optionsChanged(options) {
|
|
99
|
-
if (options
|
|
95
|
+
if (options?.length) {
|
|
100
96
|
this.items = options.map((option) => ({
|
|
101
97
|
label: option,
|
|
102
98
|
value: option,
|
|
103
99
|
}));
|
|
104
100
|
|
|
105
|
-
this._overlayElement
|
|
101
|
+
this._overlayElement ||= this.shadowRoot.querySelector('vaadin-select-overlay');
|
|
106
102
|
this._overlayElement.addEventListener('vaadin-overlay-outside-click', () => {
|
|
107
103
|
this._grid._stopEdit();
|
|
108
104
|
});
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -17,7 +16,6 @@ import { GridProEditSelectMixin } from './vaadin-grid-pro-edit-select-mixin.js';
|
|
|
17
16
|
*
|
|
18
17
|
* @customElement vaadin-grid-pro-edit-select
|
|
19
18
|
* @extends Select
|
|
20
|
-
* @mixes GridProEditSelectMixin
|
|
21
19
|
* @private
|
|
22
20
|
*/
|
|
23
21
|
class GridProEditSelect extends GridProEditSelectMixin(Select) {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -13,9 +12,6 @@ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
|
13
12
|
import { get, set } from '@vaadin/component-base/src/path-utils.js';
|
|
14
13
|
import { iterateRowCells, updatePart } from '@vaadin/grid/src/vaadin-grid-helpers.js';
|
|
15
14
|
|
|
16
|
-
/**
|
|
17
|
-
* @polymerMixin
|
|
18
|
-
*/
|
|
19
15
|
export const InlineEditingMixin = (superClass) =>
|
|
20
16
|
class InlineEditingMixin extends superClass {
|
|
21
17
|
static get properties() {
|
|
@@ -28,7 +24,6 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
28
24
|
*/
|
|
29
25
|
enterNextRow: {
|
|
30
26
|
type: Boolean,
|
|
31
|
-
notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
|
|
32
27
|
},
|
|
33
28
|
|
|
34
29
|
/**
|
|
@@ -41,7 +36,6 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
41
36
|
*/
|
|
42
37
|
singleCellEdit: {
|
|
43
38
|
type: Boolean,
|
|
44
|
-
notify: true, // FIXME(yuriy-fix): needed by Flow counterpart
|
|
45
39
|
},
|
|
46
40
|
|
|
47
41
|
/**
|
|
@@ -230,7 +224,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
230
224
|
return;
|
|
231
225
|
}
|
|
232
226
|
|
|
233
|
-
if (edited
|
|
227
|
+
if (edited?.cell === cell) {
|
|
234
228
|
return;
|
|
235
229
|
}
|
|
236
230
|
|
|
@@ -257,7 +251,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
257
251
|
|
|
258
252
|
/** @private */
|
|
259
253
|
_isEditColumn(column) {
|
|
260
|
-
return column
|
|
254
|
+
return column?.localName.toLowerCase() === 'vaadin-grid-pro-edit-column';
|
|
261
255
|
}
|
|
262
256
|
|
|
263
257
|
/** @private */
|
|
@@ -303,7 +297,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
303
297
|
return;
|
|
304
298
|
}
|
|
305
299
|
|
|
306
|
-
if (edited
|
|
300
|
+
if (edited?.cell === cell && column._getEditorComponent(cell).contains(e.target)) {
|
|
307
301
|
return;
|
|
308
302
|
}
|
|
309
303
|
|
|
@@ -463,7 +457,7 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
463
457
|
|
|
464
458
|
// Do not prevent Tab to allow native input blur and wait for it,
|
|
465
459
|
// unless the keydown event is from the edit cell select overlay.
|
|
466
|
-
if (e.key === 'Tab' && editor
|
|
460
|
+
if (e.key === 'Tab' && editor?.contains(e.target)) {
|
|
467
461
|
const ignore = await new Promise((resolve) => {
|
|
468
462
|
editor.addEventListener(
|
|
469
463
|
'focusout',
|
|
@@ -591,26 +585,4 @@ export const InlineEditingMixin = (superClass) =>
|
|
|
591
585
|
const model = this.__getRowModel(cell.__parentRow);
|
|
592
586
|
return column.isCellEditable(model);
|
|
593
587
|
}
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Fired before exiting the cell edit mode, if the value has been changed.
|
|
597
|
-
* If the default is prevented, value change would not be applied.
|
|
598
|
-
*
|
|
599
|
-
* @event item-property-changed
|
|
600
|
-
* @param {Object} detail
|
|
601
|
-
* @param {Object} detail.index the row index of the edited cell
|
|
602
|
-
* @param {Object} detail.item the grid item rendered to the row of the edited cell
|
|
603
|
-
* @param {Object} detail.path the column path of the edited cell
|
|
604
|
-
* @param {Object} detail.value the new value of the edited cell
|
|
605
|
-
*/
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Fired when the user starts editing a grid cell.
|
|
609
|
-
*
|
|
610
|
-
* @event cell-edit-started
|
|
611
|
-
* @param {Object} detail
|
|
612
|
-
* @param {Object} detail.index the row index of the edited cell
|
|
613
|
-
* @param {Object} detail.item the grid item rendered to the row of the edited cell
|
|
614
|
-
* @param {Object} detail.path the column path of the edited cell
|
|
615
|
-
*/
|
|
616
588
|
};
|
package/src/vaadin-grid-pro.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface GridProEventMap<TItem>
|
|
|
69
69
|
* @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
|
|
70
70
|
* @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
|
|
71
71
|
* @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
|
|
72
|
-
* @fires {CustomEvent} item-property-changed - Fired before exiting
|
|
72
|
+
* @fires {CustomEvent} item-property-changed - Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.
|
|
73
73
|
* @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
|
|
74
74
|
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
|
|
75
75
|
*/
|
package/src/vaadin-grid-pro.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -15,7 +14,6 @@ import { gridProStyles } from './styles/vaadin-grid-pro-base-styles.js';
|
|
|
15
14
|
import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
19
17
|
* `<vaadin-grid-pro>` is a high quality data grid / data table Web Component with extended functionality.
|
|
20
18
|
* It extends `<vaadin-grid>` and adds extra features on top of the basic ones.
|
|
21
19
|
*
|
|
@@ -43,13 +41,12 @@ import { InlineEditingMixin } from './vaadin-grid-pro-inline-editing-mixin.js';
|
|
|
43
41
|
* @fires {CustomEvent} grid-dragstart - Fired when starting to drag grid rows.
|
|
44
42
|
* @fires {CustomEvent} grid-dragend - Fired when the dragging of the rows ends.
|
|
45
43
|
* @fires {CustomEvent} grid-drop - Fired when a drop occurs on top of the grid.
|
|
46
|
-
* @fires {CustomEvent} item-property-changed - Fired before exiting
|
|
44
|
+
* @fires {CustomEvent} item-property-changed - Fired before exiting cell edit mode if the value has been changed. If the default is prevented, the value change is not applied.
|
|
47
45
|
* @fires {CustomEvent} loading-changed - Fired when the `loading` property changes.
|
|
48
46
|
* @fires {CustomEvent} selected-items-changed - Fired when the `selectedItems` property changes.
|
|
49
47
|
*
|
|
50
48
|
* @customElement vaadin-grid-pro
|
|
51
49
|
* @extends Grid
|
|
52
|
-
* @mixes InlineEditingMixin
|
|
53
50
|
*/
|
|
54
51
|
class GridPro extends SlotStylesMixin(InlineEditingMixin(Grid)) {
|
|
55
52
|
static get is() {
|