@vaadin/grid 24.0.0-alpha6 → 24.0.0-alpha8
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 +10 -10
- package/src/all-imports.js +1 -1
- package/src/array-data-provider.js +1 -1
- package/src/lit/column-renderer-directives.d.ts +1 -1
- package/src/lit/column-renderer-directives.js +1 -1
- package/src/lit/renderer-directives.d.ts +1 -1
- package/src/lit/renderer-directives.js +1 -1
- package/src/vaadin-grid-a11y-mixin.js +1 -1
- package/src/vaadin-grid-active-item-mixin.d.ts +1 -1
- package/src/vaadin-grid-active-item-mixin.js +1 -1
- package/src/vaadin-grid-array-data-provider-mixin.d.ts +1 -1
- package/src/vaadin-grid-array-data-provider-mixin.js +1 -1
- package/src/vaadin-grid-column-group.d.ts +1 -1
- package/src/vaadin-grid-column-group.js +17 -17
- package/src/vaadin-grid-column-reordering-mixin.d.ts +1 -1
- package/src/vaadin-grid-column-reordering-mixin.js +4 -6
- package/src/vaadin-grid-column-resizing-mixin.js +1 -1
- package/src/vaadin-grid-column.d.ts +1 -1
- package/src/vaadin-grid-column.js +11 -11
- package/src/vaadin-grid-data-provider-mixin.d.ts +1 -1
- package/src/vaadin-grid-data-provider-mixin.js +1 -1
- package/src/vaadin-grid-drag-and-drop-mixin.d.ts +1 -1
- package/src/vaadin-grid-drag-and-drop-mixin.js +2 -2
- package/src/vaadin-grid-dynamic-columns-mixin.js +2 -2
- package/src/vaadin-grid-event-context-mixin.d.ts +1 -1
- package/src/vaadin-grid-event-context-mixin.js +1 -1
- package/src/vaadin-grid-filter-column.d.ts +1 -1
- package/src/vaadin-grid-filter-column.js +1 -1
- package/src/vaadin-grid-filter-mixin.js +1 -1
- package/src/vaadin-grid-filter.d.ts +1 -1
- package/src/vaadin-grid-filter.js +1 -1
- package/src/vaadin-grid-helpers.js +1 -1
- package/src/vaadin-grid-keyboard-navigation-mixin.js +3 -3
- package/src/vaadin-grid-row-details-mixin.d.ts +1 -1
- package/src/vaadin-grid-row-details-mixin.js +1 -1
- package/src/vaadin-grid-scroll-mixin.d.ts +1 -1
- package/src/vaadin-grid-scroll-mixin.js +13 -5
- package/src/vaadin-grid-selection-column.d.ts +1 -1
- package/src/vaadin-grid-selection-column.js +1 -1
- package/src/vaadin-grid-selection-mixin.d.ts +1 -1
- package/src/vaadin-grid-selection-mixin.js +1 -1
- package/src/vaadin-grid-sort-column.d.ts +1 -1
- package/src/vaadin-grid-sort-column.js +1 -1
- package/src/vaadin-grid-sort-mixin.d.ts +1 -1
- package/src/vaadin-grid-sort-mixin.js +1 -1
- package/src/vaadin-grid-sorter.d.ts +1 -1
- package/src/vaadin-grid-sorter.js +1 -1
- package/src/vaadin-grid-styles.js +1 -1
- package/src/vaadin-grid-styling-mixin.d.ts +1 -1
- package/src/vaadin-grid-styling-mixin.js +1 -1
- package/src/vaadin-grid-tree-column.d.ts +1 -1
- package/src/vaadin-grid-tree-column.js +1 -1
- package/src/vaadin-grid-tree-toggle.d.ts +1 -1
- package/src/vaadin-grid-tree-toggle.js +1 -1
- package/src/vaadin-grid.d.ts +1 -1
- package/src/vaadin-grid.js +59 -14
- package/theme/lumo/vaadin-grid-styles.js +5 -5
- package/theme/material/vaadin-grid-styles.js +1 -1
- package/web-types.json +4 -4
- package/web-types.lit.json +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
48
|
"@polymer/polymer": "^3.0.0",
|
|
49
|
-
"@vaadin/checkbox": "24.0.0-
|
|
50
|
-
"@vaadin/component-base": "24.0.0-
|
|
51
|
-
"@vaadin/lit-renderer": "24.0.0-
|
|
52
|
-
"@vaadin/text-field": "24.0.0-
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
54
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
55
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
49
|
+
"@vaadin/checkbox": "24.0.0-alpha8",
|
|
50
|
+
"@vaadin/component-base": "24.0.0-alpha8",
|
|
51
|
+
"@vaadin/lit-renderer": "24.0.0-alpha8",
|
|
52
|
+
"@vaadin/text-field": "24.0.0-alpha8",
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha8",
|
|
54
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha8",
|
|
55
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha8"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@esm-bundle/chai": "^4.3.4",
|
|
59
|
-
"@vaadin/polymer-legacy-adapter": "24.0.0-
|
|
59
|
+
"@vaadin/polymer-legacy-adapter": "24.0.0-alpha8",
|
|
60
60
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
61
61
|
"lit": "^2.0.0",
|
|
62
62
|
"sinon": "^13.0.2"
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"web-types.json",
|
|
66
66
|
"web-types.lit.json"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "476752249bb12295c500980d98a3256ad3b22b73"
|
|
69
69
|
}
|
package/src/all-imports.js
CHANGED
|
@@ -28,7 +28,7 @@ function checkPaths(arrayToCheck, action, items) {
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const parentProperty = path.replace(/\.[^.]
|
|
31
|
+
const parentProperty = path.replace(/\.[^.]*$/u, ''); // A.b.c -> a.b
|
|
32
32
|
if (get(parentProperty, items[0]) === undefined) {
|
|
33
33
|
console.warn(`Path "${path}" used for ${action} does not exist in all of the items, ${action} is disabled.`);
|
|
34
34
|
result = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { iterateChildren } from './vaadin-grid-helpers.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { createArrayDataProvider } from './array-data-provider.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { GridDefaultItem } from './vaadin-grid.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
@@ -126,28 +126,28 @@ class GridColumnGroup extends ColumnBaseMixin(PolymerElement) {
|
|
|
126
126
|
this._preventHiddenSynchronization = false;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
if (/flexGrow|width|hidden|_childColumns
|
|
129
|
+
if (/flexGrow|width|hidden|_childColumns/u.test(path)) {
|
|
130
130
|
this._updateFlexAndWidth();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
this.frozen =
|
|
133
|
+
// Don’t unfreeze the frozen group because of a non-frozen child
|
|
134
|
+
if (path === 'frozen' && !this.frozen) {
|
|
135
|
+
this.frozen = value;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this._lastFrozen =
|
|
138
|
+
// Don’t unfreeze the frozen group because of a non-frozen child
|
|
139
|
+
if (path === 'lastFrozen' && !this._lastFrozen) {
|
|
140
|
+
this._lastFrozen = value;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
this.frozenToEnd =
|
|
143
|
+
// Don’t unfreeze the frozen group because of a non-frozen child
|
|
144
|
+
if (path === 'frozenToEnd' && !this.frozenToEnd) {
|
|
145
|
+
this.frozenToEnd = value;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
this._firstFrozenToEnd =
|
|
148
|
+
// Don’t unfreeze the frozen group because of a non-frozen child
|
|
149
|
+
if (path === 'firstFrozenToEnd' && !this._firstFrozenToEnd) {
|
|
150
|
+
this._firstFrozenToEnd = value;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -169,7 +169,7 @@ class GridColumnGroup extends ColumnBaseMixin(PolymerElement) {
|
|
|
169
169
|
// [1110] | [1120] | [1210] | [1220]
|
|
170
170
|
|
|
171
171
|
// Trailing zeros are counted so we know the level on which we're working on.
|
|
172
|
-
const trailingZeros = /(0+)
|
|
172
|
+
const trailingZeros = /(0+)$/u.exec(order).pop().length;
|
|
173
173
|
|
|
174
174
|
// In an unlikely situation where a group has more than 9 child columns,
|
|
175
175
|
// the child scope must have 1 digit less...
|
|
@@ -247,7 +247,7 @@ class GridColumnGroup extends ColumnBaseMixin(PolymerElement) {
|
|
|
247
247
|
__scheduleAutoFreezeWarning(columns, frozenProp) {
|
|
248
248
|
if (this._grid) {
|
|
249
249
|
// Derive the attribute name from the property name
|
|
250
|
-
const frozenAttr = frozenProp.replace(/([A-Z])/
|
|
250
|
+
const frozenAttr = frozenProp.replace(/([A-Z])/gu, '-$1').toLowerCase();
|
|
251
251
|
|
|
252
252
|
// Check if all the columns have the same frozen value
|
|
253
253
|
const firstColumnFrozen = columns[0][frozenProp] || columns[0].hasAttribute(frozenAttr);
|
|
@@ -394,7 +394,7 @@ class GridColumnGroup extends ColumnBaseMixin(PolymerElement) {
|
|
|
394
394
|
* @protected
|
|
395
395
|
*/
|
|
396
396
|
_isColumnElement(node) {
|
|
397
|
-
return node.nodeType === Node.ELEMENT_NODE && /\bcolumn\b
|
|
397
|
+
return node.nodeType === Node.ELEMENT_NODE && /\bcolumn\b/u.test(node.localName);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addListener } from '@vaadin/component-base/src/gestures.js';
|
|
@@ -224,9 +224,7 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
224
224
|
* @return {HTMLElement | undefined}
|
|
225
225
|
* @protected
|
|
226
226
|
*/
|
|
227
|
-
_cellFromPoint(x, y) {
|
|
228
|
-
x = x || 0;
|
|
229
|
-
y = y || 0;
|
|
227
|
+
_cellFromPoint(x = 0, y = 0) {
|
|
230
228
|
if (!this._draggedColumn) {
|
|
231
229
|
this.$.scroller.toggleAttribute('no-content-pointer-events', true);
|
|
232
230
|
}
|
|
@@ -305,7 +303,7 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
305
303
|
*/
|
|
306
304
|
_setSiblingsReorderStatus(column, status) {
|
|
307
305
|
iterateChildren(column.parentNode, (sibling) => {
|
|
308
|
-
if (/column
|
|
306
|
+
if (/column/u.test(sibling.localName) && this._isSwapAllowed(sibling, column)) {
|
|
309
307
|
sibling._reorderStatus = status;
|
|
310
308
|
}
|
|
311
309
|
});
|
|
@@ -374,7 +372,7 @@ export const ColumnReorderingMixin = (superClass) =>
|
|
|
374
372
|
*/
|
|
375
373
|
_swapColumnOrders(column1, column2) {
|
|
376
374
|
[column1._order, column2._order] = [column2._order, column1._order];
|
|
377
|
-
this.
|
|
375
|
+
this._debounceUpdateFrozenColumn();
|
|
378
376
|
this._updateFirstAndLastColumn();
|
|
379
377
|
}
|
|
380
378
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addListener } from '@vaadin/component-base/src/gestures.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -271,7 +271,7 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
271
271
|
// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
|
|
272
272
|
let el = this;
|
|
273
273
|
// Custom elements extending grid must have a specific localName
|
|
274
|
-
while (el && !/^vaadin.*grid(-pro)
|
|
274
|
+
while (el && !/^vaadin.*grid(-pro)?$/u.test(el.localName)) {
|
|
275
275
|
el = el.assignedSlot ? el.assignedSlot.parentNode : el.parentNode;
|
|
276
276
|
}
|
|
277
277
|
return el || undefined;
|
|
@@ -406,10 +406,10 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
406
406
|
_generateHeader(path) {
|
|
407
407
|
return path
|
|
408
408
|
.substr(path.lastIndexOf('.') + 1)
|
|
409
|
-
.replace(/([A-Z])/
|
|
409
|
+
.replace(/([A-Z])/gu, '-$1')
|
|
410
410
|
.toLowerCase()
|
|
411
|
-
.replace(/-/
|
|
412
|
-
.replace(
|
|
411
|
+
.replace(/-/gu, ' ')
|
|
412
|
+
.replace(/^./u, (match) => match.toUpperCase());
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
/** @private */
|
|
@@ -504,8 +504,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
504
504
|
},
|
|
505
505
|
);
|
|
506
506
|
|
|
507
|
-
if (this._grid.
|
|
508
|
-
this._grid.
|
|
507
|
+
if (this._grid._debounceUpdateFrozenColumn) {
|
|
508
|
+
this._grid._debounceUpdateFrozenColumn();
|
|
509
509
|
}
|
|
510
510
|
|
|
511
511
|
if (this._grid._resetKeyboardNavigation) {
|
|
@@ -585,8 +585,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
this.__renderCellsContent(headerRenderer, [headerCell]);
|
|
588
|
-
if (this._grid) {
|
|
589
|
-
this._grid.
|
|
588
|
+
if (this._grid && headerCell.parentElement) {
|
|
589
|
+
this._grid.__debounceUpdateHeaderFooterRowVisibility(headerCell.parentElement);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
|
|
@@ -626,8 +626,8 @@ export const ColumnBaseMixin = (superClass) =>
|
|
|
626
626
|
}
|
|
627
627
|
|
|
628
628
|
this.__renderCellsContent(footerRenderer, [footerCell]);
|
|
629
|
-
if (this._grid) {
|
|
630
|
-
this._grid.
|
|
629
|
+
if (this._grid && footerCell.parentElement) {
|
|
630
|
+
this._grid.__debounceUpdateHeaderFooterRowVisibility(footerCell.parentElement);
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { timeOut } from '@vaadin/component-base/src/async.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { iterateChildren, updateRowStates } from './vaadin-grid-helpers.js';
|
|
@@ -128,7 +128,7 @@ export const DragAndDropMixin = (superClass) =>
|
|
|
128
128
|
// Safari doesn't position drag images from transformed
|
|
129
129
|
// elements properly so we need to switch to use top temporarily
|
|
130
130
|
const transform = row.style.transform;
|
|
131
|
-
row.style.top = /translateY\((.*)\)
|
|
131
|
+
row.style.top = /translateY\((.*)\)/u.exec(transform)[1];
|
|
132
132
|
row.style.transform = 'none';
|
|
133
133
|
requestAnimationFrame(() => {
|
|
134
134
|
row.style.top = '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
@@ -172,6 +172,6 @@ export const DynamicColumnsMixin = (superClass) =>
|
|
|
172
172
|
* @protected
|
|
173
173
|
*/
|
|
174
174
|
_isColumnElement(node) {
|
|
175
|
-
return node.nodeType === Node.ELEMENT_NODE && /\bcolumn\b
|
|
175
|
+
return node.nodeType === Node.ELEMENT_NODE && /\bcolumn\b/u.test(node.localName);
|
|
176
176
|
}
|
|
177
177
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { GridDefaultItem } from './vaadin-grid.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addValueToAttribute, removeValueFromAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { addValueToAttribute, removeValueFromAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
@@ -586,7 +586,7 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
586
586
|
const localTarget = e.composedPath()[0];
|
|
587
587
|
const localTargetIsTextInput =
|
|
588
588
|
localTarget.localName === 'input' &&
|
|
589
|
-
!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/
|
|
589
|
+
!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/iu.test(localTarget.type);
|
|
590
590
|
|
|
591
591
|
let wantInteracting;
|
|
592
592
|
switch (key) {
|
|
@@ -724,7 +724,7 @@ export const KeyboardNavigationMixin = (superClass) =>
|
|
|
724
724
|
|
|
725
725
|
/** @private */
|
|
726
726
|
_onKeyUp(e) {
|
|
727
|
-
if (!/^( |SpaceBar)
|
|
727
|
+
if (!/^( |SpaceBar)$/u.test(e.key) || this.interacting) {
|
|
728
728
|
return;
|
|
729
729
|
}
|
|
730
730
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { iterateChildren } from './vaadin-grid-helpers.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { animationFrame, microTask, timeOut } from '@vaadin/component-base/src/async.js';
|
|
7
7
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
8
|
+
import { getNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';
|
|
8
9
|
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
9
10
|
|
|
10
11
|
const timeouts = {
|
|
@@ -157,7 +158,7 @@ export const ScrollMixin = (superClass) =>
|
|
|
157
158
|
overflow += ' top';
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
const scrollLeft = this.
|
|
161
|
+
const scrollLeft = getNormalizedScrollLeft(table, this.getAttribute('dir'));
|
|
161
162
|
if (scrollLeft > 0) {
|
|
162
163
|
overflow += ' start';
|
|
163
164
|
}
|
|
@@ -167,7 +168,7 @@ export const ScrollMixin = (superClass) =>
|
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
if (this.__isRTL) {
|
|
170
|
-
overflow = overflow.replace(/start|end/
|
|
171
|
+
overflow = overflow.replace(/start|end/giu, (matched) => {
|
|
171
172
|
return matched === 'start' ? 'end' : 'start';
|
|
172
173
|
});
|
|
173
174
|
}
|
|
@@ -201,10 +202,17 @@ export const ScrollMixin = (superClass) =>
|
|
|
201
202
|
this._frozenToEndCells = Array.prototype.slice.call(this.$.table.querySelectorAll('[frozen-to-end]'));
|
|
202
203
|
this.__updateHorizontalScrollPosition();
|
|
203
204
|
});
|
|
204
|
-
this.
|
|
205
|
+
this._debounceUpdateFrozenColumn();
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
/** @protected */
|
|
209
|
+
_debounceUpdateFrozenColumn() {
|
|
210
|
+
this.__debounceUpdateFrozenColumn = Debouncer.debounce(this.__debounceUpdateFrozenColumn, microTask, () =>
|
|
211
|
+
this._updateFrozenColumn(),
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** @private */
|
|
208
216
|
_updateFrozenColumn() {
|
|
209
217
|
if (!this._columnTree) {
|
|
210
218
|
return;
|
|
@@ -248,7 +256,7 @@ export const ScrollMixin = (superClass) =>
|
|
|
248
256
|
const scrollWidth = this.$.table.scrollWidth;
|
|
249
257
|
const clientWidth = this.$.table.clientWidth;
|
|
250
258
|
const scrollLeft = Math.max(0, this.$.table.scrollLeft);
|
|
251
|
-
const normalizedScrollLeft =
|
|
259
|
+
const normalizedScrollLeft = getNormalizedScrollLeft(this.$.table, this.getAttribute('dir'));
|
|
252
260
|
|
|
253
261
|
// Position header, footer and items container
|
|
254
262
|
const transform = `translate(${-scrollLeft}px, 0)`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { GridDefaultItem } from './vaadin-grid.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2016 -
|
|
3
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import type { Constructor } from '@open-wc/dedupe-mixin';
|