@vaadin/grid 24.4.0-alpha1 → 24.4.0-dev.223e39f050
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 +11 -11
- package/src/vaadin-grid-array-data-provider-mixin.js +13 -2
- package/src/vaadin-grid-selection-column-base-mixin.d.ts +0 -2
- package/src/vaadin-grid-selection-column-mixin.js +1 -0
- package/src/vaadin-grid-sort-mixin.js +6 -31
- package/src/vaadin-grid-styling-mixin.d.ts +1 -1
- package/theme/lumo/vaadin-grid-styles.js +5 -0
- package/web-types.json +0 -2516
- package/web-types.lit.json +0 -1063
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "24.4.0-
|
|
3
|
+
"version": "24.4.0-dev.223e39f050",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,24 +46,24 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
48
|
"@polymer/polymer": "^3.0.0",
|
|
49
|
-
"@vaadin/a11y-base": "24.4.0-
|
|
50
|
-
"@vaadin/checkbox": "24.4.0-
|
|
51
|
-
"@vaadin/component-base": "24.4.0-
|
|
52
|
-
"@vaadin/lit-renderer": "24.4.0-
|
|
53
|
-
"@vaadin/text-field": "24.4.0-
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "24.4.0-
|
|
55
|
-
"@vaadin/vaadin-material-styles": "24.4.0-
|
|
56
|
-
"@vaadin/vaadin-themable-mixin": "24.4.0-
|
|
49
|
+
"@vaadin/a11y-base": "24.4.0-dev.223e39f050",
|
|
50
|
+
"@vaadin/checkbox": "24.4.0-dev.223e39f050",
|
|
51
|
+
"@vaadin/component-base": "24.4.0-dev.223e39f050",
|
|
52
|
+
"@vaadin/lit-renderer": "24.4.0-dev.223e39f050",
|
|
53
|
+
"@vaadin/text-field": "24.4.0-dev.223e39f050",
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "24.4.0-dev.223e39f050",
|
|
55
|
+
"@vaadin/vaadin-material-styles": "24.4.0-dev.223e39f050",
|
|
56
|
+
"@vaadin/vaadin-themable-mixin": "24.4.0-dev.223e39f050",
|
|
57
|
+
"lit": "^3.0.0"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@esm-bundle/chai": "^4.3.4",
|
|
60
61
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
61
|
-
"lit": "^3.0.0",
|
|
62
62
|
"sinon": "^13.0.2"
|
|
63
63
|
},
|
|
64
64
|
"web-types": [
|
|
65
65
|
"web-types.json",
|
|
66
66
|
"web-types.lit.json"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5e2e3bfc811c95aed9354235fab93fdbf43eb354"
|
|
69
69
|
}
|
|
@@ -25,7 +25,7 @@ export const ArrayDataProviderMixin = (superClass) =>
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
static get observers() {
|
|
28
|
-
return ['__dataProviderOrItemsChanged(dataProvider, items, isAttached,
|
|
28
|
+
return ['__dataProviderOrItemsChanged(dataProvider, items, isAttached, items.*)'];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/** @private */
|
|
@@ -37,6 +37,18 @@ export const ArrayDataProviderMixin = (superClass) =>
|
|
|
37
37
|
this.dataProvider = arrayDataProvider;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @override
|
|
42
|
+
* @protected
|
|
43
|
+
*/
|
|
44
|
+
_onDataProviderPageReceived() {
|
|
45
|
+
super._onDataProviderPageReceived();
|
|
46
|
+
|
|
47
|
+
if (this._arrayDataProvider) {
|
|
48
|
+
this.size = this._flatSize;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
/** @private */
|
|
41
53
|
__dataProviderOrItemsChanged(dataProvider, items, isAttached) {
|
|
42
54
|
if (!isAttached) {
|
|
@@ -59,7 +71,6 @@ export const ArrayDataProviderMixin = (superClass) =>
|
|
|
59
71
|
} else if (this._arrayDataProvider.__items === items) {
|
|
60
72
|
// The items array was modified
|
|
61
73
|
this.clearCache();
|
|
62
|
-
this.size = this._flatSize;
|
|
63
74
|
} else {
|
|
64
75
|
// The items array was replaced
|
|
65
76
|
this.__setArrayDataProvider(items);
|
|
@@ -19,8 +19,6 @@ export declare function GridSelectionColumnBaseMixin<TItem, T extends Constructo
|
|
|
19
19
|
* Web component-specific selection state updates must be implemented in the
|
|
20
20
|
* `<vaadin-grid-selection-column>` itself, by overriding the protected methods
|
|
21
21
|
* provided by this mixin.
|
|
22
|
-
*
|
|
23
|
-
* @polymerMixin
|
|
24
22
|
*/
|
|
25
23
|
export declare class GridSelectionColumnBaseMixinClass<TItem> {
|
|
26
24
|
/**
|
|
@@ -7,6 +7,7 @@ import { GridSelectionColumnBaseMixin } from './vaadin-grid-selection-column-bas
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @polymerMixin
|
|
10
|
+
* @mixes GridSelectionColumnBaseMixin
|
|
10
11
|
*/
|
|
11
12
|
export const GridSelectionColumnMixin = (superClass) =>
|
|
12
13
|
class extends GridSelectionColumnBaseMixin(superClass) {
|
|
@@ -104,7 +104,7 @@ export const SortMixin = (superClass) =>
|
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
this._sorters = this._sorters.filter((sorter) => sortersToRemove.
|
|
107
|
+
this._sorters = this._sorters.filter((sorter) => !sortersToRemove.includes(sorter));
|
|
108
108
|
this.__applySorters();
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -122,44 +122,27 @@ export const SortMixin = (superClass) =>
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
/** @private */
|
|
126
|
-
__appendSorter(sorter) {
|
|
127
|
-
if (!sorter.direction) {
|
|
128
|
-
this._removeArrayItem(this._sorters, sorter);
|
|
129
|
-
} else if (!this._sorters.includes(sorter)) {
|
|
130
|
-
this._sorters.push(sorter);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/** @private */
|
|
135
|
-
__prependSorter(sorter) {
|
|
136
|
-
this._removeArrayItem(this._sorters, sorter);
|
|
137
|
-
if (sorter.direction) {
|
|
138
|
-
this._sorters.unshift(sorter);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
125
|
/** @private */
|
|
143
126
|
__updateSorter(sorter, shiftClick, fromSorterClick) {
|
|
144
|
-
if (!sorter.direction && this._sorters.
|
|
127
|
+
if (!sorter.direction && !this._sorters.includes(sorter)) {
|
|
145
128
|
return;
|
|
146
129
|
}
|
|
147
130
|
|
|
148
131
|
sorter._order = null;
|
|
149
132
|
|
|
133
|
+
const restSorters = this._sorters.filter((s) => s !== sorter);
|
|
150
134
|
if (
|
|
151
135
|
(this.multiSort && (!this.multiSortOnShiftClick || !fromSorterClick)) ||
|
|
152
136
|
(this.multiSortOnShiftClick && shiftClick)
|
|
153
137
|
) {
|
|
154
138
|
if (this.multiSortPriority === 'append') {
|
|
155
|
-
this.
|
|
139
|
+
this._sorters = [...restSorters, sorter];
|
|
156
140
|
} else {
|
|
157
|
-
this.
|
|
141
|
+
this._sorters = [sorter, ...restSorters];
|
|
158
142
|
}
|
|
159
143
|
} else if (sorter.direction || this.multiSortOnShiftClick) {
|
|
160
|
-
const otherSorters = this._sorters.filter((s) => s !== sorter);
|
|
161
144
|
this._sorters = sorter.direction ? [sorter] : [];
|
|
162
|
-
|
|
145
|
+
restSorters.forEach((sorter) => {
|
|
163
146
|
sorter._order = null;
|
|
164
147
|
sorter.direction = null;
|
|
165
148
|
});
|
|
@@ -204,12 +187,4 @@ export const SortMixin = (superClass) =>
|
|
|
204
187
|
};
|
|
205
188
|
});
|
|
206
189
|
}
|
|
207
|
-
|
|
208
|
-
/** @private */
|
|
209
|
-
_removeArrayItem(array, item) {
|
|
210
|
-
const index = array.indexOf(item);
|
|
211
|
-
if (index > -1) {
|
|
212
|
-
array.splice(index, 1);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
190
|
};
|
|
@@ -10,7 +10,7 @@ import type { GridColumn } from './vaadin-grid-column.js';
|
|
|
10
10
|
export type GridCellPartNameGenerator<TItem> = (column: GridColumn<TItem>, model: GridItemModel<TItem>) => string;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @deprecated Use `
|
|
13
|
+
* @deprecated Use `GridCellPartNameGenerator` type and `cellPartNameGenerator` API instead.
|
|
14
14
|
*/
|
|
15
15
|
export type GridCellClassNameGenerator<TItem> = GridCellPartNameGenerator<TItem>;
|
|
16
16
|
|
|
@@ -213,6 +213,11 @@ registerStyles(
|
|
|
213
213
|
border-top: 0;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
/* Hide header row top border if previous row is hidden */
|
|
217
|
+
[part~='row'][hidden] + [part~='row'] [part~='header-cell'] {
|
|
218
|
+
border-top: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
216
221
|
[part~='row']:last-child [part~='header-cell'] {
|
|
217
222
|
border-bottom: var(--_lumo-grid-border-width) solid transparent;
|
|
218
223
|
}
|