@vaadin/grid 24.0.0-alpha7 → 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.
Files changed (60) hide show
  1. package/package.json +10 -10
  2. package/src/all-imports.js +1 -1
  3. package/src/array-data-provider.js +1 -1
  4. package/src/lit/column-renderer-directives.d.ts +1 -1
  5. package/src/lit/column-renderer-directives.js +1 -1
  6. package/src/lit/renderer-directives.d.ts +1 -1
  7. package/src/lit/renderer-directives.js +1 -1
  8. package/src/vaadin-grid-a11y-mixin.js +1 -1
  9. package/src/vaadin-grid-active-item-mixin.d.ts +1 -1
  10. package/src/vaadin-grid-active-item-mixin.js +1 -1
  11. package/src/vaadin-grid-array-data-provider-mixin.d.ts +1 -1
  12. package/src/vaadin-grid-array-data-provider-mixin.js +1 -1
  13. package/src/vaadin-grid-column-group.d.ts +1 -1
  14. package/src/vaadin-grid-column-group.js +17 -17
  15. package/src/vaadin-grid-column-reordering-mixin.d.ts +1 -1
  16. package/src/vaadin-grid-column-reordering-mixin.js +3 -5
  17. package/src/vaadin-grid-column-resizing-mixin.js +1 -1
  18. package/src/vaadin-grid-column.d.ts +1 -1
  19. package/src/vaadin-grid-column.js +5 -5
  20. package/src/vaadin-grid-data-provider-mixin.d.ts +1 -1
  21. package/src/vaadin-grid-data-provider-mixin.js +1 -1
  22. package/src/vaadin-grid-drag-and-drop-mixin.d.ts +1 -1
  23. package/src/vaadin-grid-drag-and-drop-mixin.js +2 -2
  24. package/src/vaadin-grid-dynamic-columns-mixin.js +2 -2
  25. package/src/vaadin-grid-event-context-mixin.d.ts +1 -1
  26. package/src/vaadin-grid-event-context-mixin.js +1 -1
  27. package/src/vaadin-grid-filter-column.d.ts +1 -1
  28. package/src/vaadin-grid-filter-column.js +1 -1
  29. package/src/vaadin-grid-filter-mixin.js +1 -1
  30. package/src/vaadin-grid-filter.d.ts +1 -1
  31. package/src/vaadin-grid-filter.js +1 -1
  32. package/src/vaadin-grid-helpers.js +1 -1
  33. package/src/vaadin-grid-keyboard-navigation-mixin.js +3 -3
  34. package/src/vaadin-grid-row-details-mixin.d.ts +1 -1
  35. package/src/vaadin-grid-row-details-mixin.js +1 -1
  36. package/src/vaadin-grid-scroll-mixin.d.ts +1 -1
  37. package/src/vaadin-grid-scroll-mixin.js +5 -4
  38. package/src/vaadin-grid-selection-column.d.ts +1 -1
  39. package/src/vaadin-grid-selection-column.js +1 -1
  40. package/src/vaadin-grid-selection-mixin.d.ts +1 -1
  41. package/src/vaadin-grid-selection-mixin.js +1 -1
  42. package/src/vaadin-grid-sort-column.d.ts +1 -1
  43. package/src/vaadin-grid-sort-column.js +1 -1
  44. package/src/vaadin-grid-sort-mixin.d.ts +1 -1
  45. package/src/vaadin-grid-sort-mixin.js +1 -1
  46. package/src/vaadin-grid-sorter.d.ts +1 -1
  47. package/src/vaadin-grid-sorter.js +1 -1
  48. package/src/vaadin-grid-styles.js +1 -1
  49. package/src/vaadin-grid-styling-mixin.d.ts +1 -1
  50. package/src/vaadin-grid-styling-mixin.js +1 -1
  51. package/src/vaadin-grid-tree-column.d.ts +1 -1
  52. package/src/vaadin-grid-tree-column.js +1 -1
  53. package/src/vaadin-grid-tree-toggle.d.ts +1 -1
  54. package/src/vaadin-grid-tree-toggle.js +1 -1
  55. package/src/vaadin-grid.d.ts +1 -1
  56. package/src/vaadin-grid.js +22 -13
  57. package/theme/lumo/vaadin-grid-styles.js +5 -5
  58. package/theme/material/vaadin-grid-styles.js +1 -1
  59. package/web-types.json +576 -3
  60. package/web-types.lit.json +318 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/grid",
3
- "version": "24.0.0-alpha7",
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-alpha7",
50
- "@vaadin/component-base": "24.0.0-alpha7",
51
- "@vaadin/lit-renderer": "24.0.0-alpha7",
52
- "@vaadin/text-field": "24.0.0-alpha7",
53
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha7",
54
- "@vaadin/vaadin-material-styles": "24.0.0-alpha7",
55
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha7"
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-alpha7",
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": "aeb4535336813636736759e0a5de148b26bfc3b6"
68
+ "gitHead": "476752249bb12295c500980d98a3256ad3b22b73"
69
69
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 './vaadin-grid.js';
@@ -28,7 +28,7 @@ function checkPaths(arrayToCheck, action, items) {
28
28
  return;
29
29
  }
30
30
 
31
- const parentProperty = path.replace(/\.[^.]*$/, ''); // A.b.c -> a.b
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) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 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
  /* eslint-disable max-classes-per-file */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 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
  /* eslint-disable max-classes-per-file */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 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 { TemplateResult } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 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 { directive } from 'lit/directive.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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/.test(path)) {
129
+ if (/flexGrow|width|hidden|_childColumns/u.test(path)) {
130
130
  this._updateFlexAndWidth();
131
131
  }
132
132
 
133
- if (path === 'frozen') {
134
- // Don’t unfreeze the frozen group because of a non-frozen child
135
- this.frozen ||= value;
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
- if (path === 'lastFrozen') {
139
- // Don’t unfreeze the frozen group because of a non-frozen child
140
- this._lastFrozen ||= value;
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
- if (path === 'frozenToEnd') {
144
- // Don’t unfreeze the frozen group because of a non-frozen child
145
- this.frozenToEnd ||= value;
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
- if (path === 'firstFrozenToEnd') {
149
- // Don’t unfreeze the frozen group because of a non-frozen child
150
- this._firstFrozenToEnd ||= value;
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+)$/.exec(order).pop().length;
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])/g, '-$1').toLowerCase();
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/.test(node.localName);
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 ||= 0;
229
- 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/.test(sibling.localName) && this._isSwapAllowed(sibling, column)) {
306
+ if (/column/u.test(sibling.localName) && this._isSwapAllowed(sibling, column)) {
309
307
  sibling._reorderStatus = status;
310
308
  }
311
309
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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)?$/.test(el.localName)) {
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])/g, '-$1')
409
+ .replace(/([A-Z])/gu, '-$1')
410
410
  .toLowerCase()
411
- .replace(/-/g, ' ')
412
- .replace(/^./, (match) => match.toUpperCase());
411
+ .replace(/-/gu, ' ')
412
+ .replace(/^./u, (match) => match.toUpperCase());
413
413
  }
414
414
 
415
415
  /** @private */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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\((.*)\)/.exec(transform)[1];
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 - 2022 Vaadin Ltd.
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/.test(node.localName);
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 './vaadin-grid-filter.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 '@vaadin/text-field/src/vaadin-text-field.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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)$/i.test(localTarget.type);
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)$/.test(e.key) || this.interacting) {
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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.__getNormalizedScrollLeft(table);
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/gi, (matched) => {
171
+ overflow = overflow.replace(/start|end/giu, (matched) => {
171
172
  return matched === 'start' ? 'end' : 'start';
172
173
  });
173
174
  }
@@ -255,7 +256,7 @@ export const ScrollMixin = (superClass) =>
255
256
  const scrollWidth = this.$.table.scrollWidth;
256
257
  const clientWidth = this.$.table.clientWidth;
257
258
  const scrollLeft = Math.max(0, this.$.table.scrollLeft);
258
- const normalizedScrollLeft = this.__getNormalizedScrollLeft(this.$.table);
259
+ const normalizedScrollLeft = getNormalizedScrollLeft(this.$.table, this.getAttribute('dir'));
259
260
 
260
261
  // Position header, footer and items container
261
262
  const transform = `translate(${-scrollLeft}px, 0)`;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 '@vaadin/checkbox/src/vaadin-checkbox.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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 './vaadin-grid-sorter.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 - 2022 Vaadin Ltd.
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
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2016 - 2022 Vaadin Ltd.
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 { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';