@vaadin/component-base 22.0.13 → 22.0.16
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 +2 -2
- package/src/active-mixin.d.ts +1 -1
- package/src/async.js +5 -5
- package/src/controller-mixin.d.ts +1 -1
- package/src/controller-mixin.js +1 -1
- package/src/dir-helper.d.ts +1 -1
- package/src/dir-mixin.js +2 -2
- package/src/disabled-mixin.js +3 -3
- package/src/element-mixin.d.ts +1 -1
- package/src/element-mixin.js +2 -2
- package/src/focus-mixin.js +3 -3
- package/src/iron-list-core.js +6 -6
- package/src/keyboard-mixin.js +1 -1
- package/src/slot-controller.d.ts +1 -1
- package/src/slot-mixin.js +1 -1
- package/src/tabindex-mixin.d.ts +1 -1
- package/src/tabindex-mixin.js +3 -3
- package/src/templates.js +1 -1
- package/src/virtualizer-iron-list-adapter.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
42
42
|
"sinon": "^9.2.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "dac6f243594ea700bb796d3b41d7b17736d90be8"
|
|
45
45
|
}
|
package/src/active-mixin.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { KeyboardMixinClass } from './keyboard-mixin.js';
|
|
|
17
17
|
* by the pointer or by releasing the activation key.
|
|
18
18
|
*/
|
|
19
19
|
export declare function ActiveMixin<T extends Constructor<HTMLElement>>(
|
|
20
|
-
base: T
|
|
20
|
+
base: T,
|
|
21
21
|
): T & Constructor<ActiveMixinClass> & Constructor<DisabledMixinClass> & Constructor<KeyboardMixinClass>;
|
|
22
22
|
|
|
23
23
|
export declare class ActiveMixinClass {
|
package/src/async.js
CHANGED
|
@@ -70,7 +70,7 @@ const timeOut = {
|
|
|
70
70
|
},
|
|
71
71
|
cancel(handle) {
|
|
72
72
|
window.clearTimeout(handle);
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
74
|
};
|
|
75
75
|
},
|
|
76
76
|
/**
|
|
@@ -93,7 +93,7 @@ const timeOut = {
|
|
|
93
93
|
*/
|
|
94
94
|
cancel(handle) {
|
|
95
95
|
window.clearTimeout(handle);
|
|
96
|
-
}
|
|
96
|
+
},
|
|
97
97
|
};
|
|
98
98
|
export { timeOut };
|
|
99
99
|
|
|
@@ -123,7 +123,7 @@ const animationFrame = {
|
|
|
123
123
|
*/
|
|
124
124
|
cancel(handle) {
|
|
125
125
|
window.cancelAnimationFrame(handle);
|
|
126
|
-
}
|
|
126
|
+
},
|
|
127
127
|
};
|
|
128
128
|
export { animationFrame };
|
|
129
129
|
|
|
@@ -154,7 +154,7 @@ const idlePeriod = {
|
|
|
154
154
|
*/
|
|
155
155
|
cancel(handle) {
|
|
156
156
|
window.cancelIdleCallback ? window.cancelIdleCallback(handle) : window.clearTimeout(handle);
|
|
157
|
-
}
|
|
157
|
+
},
|
|
158
158
|
};
|
|
159
159
|
export { idlePeriod };
|
|
160
160
|
|
|
@@ -203,6 +203,6 @@ const microTask = {
|
|
|
203
203
|
}
|
|
204
204
|
microtaskCallbacks[idx] = null;
|
|
205
205
|
}
|
|
206
|
-
}
|
|
206
|
+
},
|
|
207
207
|
};
|
|
208
208
|
export { microTask };
|
|
@@ -10,7 +10,7 @@ import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
|
10
10
|
* A mixin for connecting controllers to the element.
|
|
11
11
|
*/
|
|
12
12
|
export declare function ControllerMixin<T extends Constructor<HTMLElement>>(
|
|
13
|
-
superclass: T
|
|
13
|
+
superclass: T,
|
|
14
14
|
): T & Constructor<ControllerMixinClass>;
|
|
15
15
|
|
|
16
16
|
export declare class ControllerMixinClass
|
package/src/controller-mixin.js
CHANGED
package/src/dir-helper.d.ts
CHANGED
package/src/dir-mixin.js
CHANGED
package/src/disabled-mixin.js
CHANGED
|
@@ -22,8 +22,8 @@ export const DisabledMixin = dedupingMixin(
|
|
|
22
22
|
type: Boolean,
|
|
23
23
|
value: false,
|
|
24
24
|
observer: '_disabledChanged',
|
|
25
|
-
reflectToAttribute: true
|
|
26
|
-
}
|
|
25
|
+
reflectToAttribute: true,
|
|
26
|
+
},
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -58,5 +58,5 @@ export const DisabledMixin = dedupingMixin(
|
|
|
58
58
|
super.click();
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
},
|
|
62
62
|
);
|
package/src/element-mixin.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { DirMixinClass } from './dir-mixin.js';
|
|
|
12
12
|
* A mixin providing common logic for Vaadin components.
|
|
13
13
|
*/
|
|
14
14
|
export declare function ElementMixin<T extends Constructor<HTMLElement>>(
|
|
15
|
-
superclass: T
|
|
15
|
+
superclass: T,
|
|
16
16
|
): T & Constructor<DirMixinClass> & Constructor<ElementMixinClass>;
|
|
17
17
|
|
|
18
18
|
export declare class ElementMixinClass {
|
package/src/element-mixin.js
CHANGED
|
@@ -32,7 +32,7 @@ const registered = new Set();
|
|
|
32
32
|
export const ElementMixin = (superClass) =>
|
|
33
33
|
class VaadinElementMixin extends DirMixin(superClass) {
|
|
34
34
|
static get version() {
|
|
35
|
-
return '22.0.
|
|
35
|
+
return '22.0.16';
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/** @protected */
|
|
@@ -60,7 +60,7 @@ export const ElementMixin = (superClass) =>
|
|
|
60
60
|
|
|
61
61
|
if (document.doctype === null) {
|
|
62
62
|
console.warn(
|
|
63
|
-
'Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.'
|
|
63
|
+
'Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.',
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/focus-mixin.js
CHANGED
|
@@ -16,7 +16,7 @@ window.addEventListener(
|
|
|
16
16
|
() => {
|
|
17
17
|
keyboardActive = true;
|
|
18
18
|
},
|
|
19
|
-
{ capture: true }
|
|
19
|
+
{ capture: true },
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
window.addEventListener(
|
|
@@ -24,7 +24,7 @@ window.addEventListener(
|
|
|
24
24
|
() => {
|
|
25
25
|
keyboardActive = false;
|
|
26
26
|
},
|
|
27
|
-
{ capture: true }
|
|
27
|
+
{ capture: true },
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -110,5 +110,5 @@ export const FocusMixin = dedupingMixin(
|
|
|
110
110
|
_shouldRemoveFocus(_event) {
|
|
111
111
|
return true;
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
},
|
|
114
114
|
);
|
package/src/iron-list-core.js
CHANGED
|
@@ -346,7 +346,7 @@ export const ironList = {
|
|
|
346
346
|
// _increasePoolIfNeeded to run away creating items to try to fill it.
|
|
347
347
|
this._physicalTop = Math.min(
|
|
348
348
|
Math.floor(this._virtualStart / this._itemsPerRow) * this._physicalAverage,
|
|
349
|
-
this._scrollPosition
|
|
349
|
+
this._scrollPosition,
|
|
350
350
|
);
|
|
351
351
|
this._update();
|
|
352
352
|
} else if (this._physicalCount > 0) {
|
|
@@ -467,7 +467,7 @@ export const ironList = {
|
|
|
467
467
|
var nextPhysicalCount = this._clamp(
|
|
468
468
|
this._physicalCount + count,
|
|
469
469
|
DEFAULT_PHYSICAL_COUNT,
|
|
470
|
-
this._virtualCount - this._virtualStart
|
|
470
|
+
this._virtualCount - this._virtualStart,
|
|
471
471
|
);
|
|
472
472
|
nextPhysicalCount = this._convertIndexToCompleteRow(nextPhysicalCount);
|
|
473
473
|
if (this.grid) {
|
|
@@ -520,7 +520,7 @@ export const ironList = {
|
|
|
520
520
|
this._debounce(
|
|
521
521
|
'_increasePoolIfNeeded',
|
|
522
522
|
this._increasePoolIfNeeded.bind(this, this._clamp(Math.round(50 / this._templateCost), 1, nextIncrease)),
|
|
523
|
-
idlePeriod
|
|
523
|
+
idlePeriod,
|
|
524
524
|
);
|
|
525
525
|
}
|
|
526
526
|
},
|
|
@@ -687,7 +687,7 @@ export const ironList = {
|
|
|
687
687
|
// Update the average if it measured something.
|
|
688
688
|
if (this._physicalAverageCount !== prevAvgCount) {
|
|
689
689
|
this._physicalAverage = Math.round(
|
|
690
|
-
(prevPhysicalAvg * prevAvgCount + newPhysicalSize) / this._physicalAverageCount
|
|
690
|
+
(prevPhysicalAvg * prevAvgCount + newPhysicalSize) / this._physicalAverageCount,
|
|
691
691
|
);
|
|
692
692
|
}
|
|
693
693
|
},
|
|
@@ -888,7 +888,7 @@ export const ironList = {
|
|
|
888
888
|
this.toggleScrollListener(false);
|
|
889
889
|
}
|
|
890
890
|
},
|
|
891
|
-
animationFrame
|
|
891
|
+
animationFrame,
|
|
892
892
|
);
|
|
893
893
|
},
|
|
894
894
|
|
|
@@ -947,5 +947,5 @@ export const ironList = {
|
|
|
947
947
|
this._debouncers = this._debouncers || {};
|
|
948
948
|
this._debouncers[name] = Debouncer.debounce(this._debouncers[name], asyncModule, cb.bind(this));
|
|
949
949
|
enqueueDebouncer(this._debouncers[name]);
|
|
950
|
-
}
|
|
950
|
+
},
|
|
951
951
|
};
|
package/src/keyboard-mixin.js
CHANGED
package/src/slot-controller.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export class SlotController extends EventTarget implements ReactiveController {
|
|
|
10
10
|
host: HTMLElement,
|
|
11
11
|
slotName: string,
|
|
12
12
|
slotFactory?: () => HTMLElement,
|
|
13
|
-
slotInitializer?: (host: HTMLElement, node: HTMLElement) => void
|
|
13
|
+
slotInitializer?: (host: HTMLElement, node: HTMLElement) => void,
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
hostConnected(): void;
|
package/src/slot-mixin.js
CHANGED
package/src/tabindex-mixin.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { DisabledMixinClass } from './disabled-mixin.js';
|
|
|
13
13
|
* and restored with the last known value once the element is enabled.
|
|
14
14
|
*/
|
|
15
15
|
export declare function TabindexMixin<T extends Constructor<HTMLElement>>(
|
|
16
|
-
base: T
|
|
16
|
+
base: T,
|
|
17
17
|
): T & Constructor<DisabledMixinClass> & Constructor<TabindexMixinClass>;
|
|
18
18
|
|
|
19
19
|
export declare class TabindexMixinClass {
|
package/src/tabindex-mixin.js
CHANGED
|
@@ -26,7 +26,7 @@ export const TabindexMixin = (superclass) =>
|
|
|
26
26
|
tabindex: {
|
|
27
27
|
type: Number,
|
|
28
28
|
reflectToAttribute: true,
|
|
29
|
-
observer: '_tabindexChanged'
|
|
29
|
+
observer: '_tabindexChanged',
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -35,8 +35,8 @@ export const TabindexMixin = (superclass) =>
|
|
|
35
35
|
* @protected
|
|
36
36
|
*/
|
|
37
37
|
_lastTabIndex: {
|
|
38
|
-
type: Number
|
|
39
|
-
}
|
|
38
|
+
type: Number,
|
|
39
|
+
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
package/src/templates.js
CHANGED
|
@@ -18,7 +18,7 @@ export function processTemplates(component) {
|
|
|
18
18
|
|
|
19
19
|
if (component.querySelector('template')) {
|
|
20
20
|
console.warn(
|
|
21
|
-
`WARNING: <template> inside <${component.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility
|
|
21
|
+
`WARNING: <template> inside <${component.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`,
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ export class IronListAdapter {
|
|
|
28
28
|
|
|
29
29
|
this.timeouts = {
|
|
30
30
|
SCROLL_REORDER: 500,
|
|
31
|
-
IGNORE_WHEEL: 500
|
|
31
|
+
IGNORE_WHEEL: 500,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
this.__resizeObserver = new ResizeObserver(() => this._resizeHandler());
|
|
@@ -179,7 +179,7 @@ export class IronListAdapter {
|
|
|
179
179
|
flush();
|
|
180
180
|
|
|
181
181
|
this._itemsChanged({
|
|
182
|
-
path: 'items'
|
|
182
|
+
path: 'items',
|
|
183
183
|
});
|
|
184
184
|
flush();
|
|
185
185
|
|
|
@@ -221,7 +221,7 @@ export class IronListAdapter {
|
|
|
221
221
|
/** @private */
|
|
222
222
|
get items() {
|
|
223
223
|
return {
|
|
224
|
-
length: Math.min(this.size, MAX_VIRTUAL_COUNT)
|
|
224
|
+
length: Math.min(this.size, MAX_VIRTUAL_COUNT),
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -233,7 +233,7 @@ export class IronListAdapter {
|
|
|
233
233
|
/** @private */
|
|
234
234
|
get $() {
|
|
235
235
|
return {
|
|
236
|
-
items: this.scrollContainer
|
|
236
|
+
items: this.scrollContainer,
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -302,7 +302,7 @@ export class IronListAdapter {
|
|
|
302
302
|
this.__scrollReorderDebouncer = Debouncer.debounce(
|
|
303
303
|
this.__scrollReorderDebouncer,
|
|
304
304
|
timeOut.after(this.timeouts.SCROLL_REORDER),
|
|
305
|
-
() => this.__reorderElements()
|
|
305
|
+
() => this.__reorderElements(),
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -340,7 +340,7 @@ export class IronListAdapter {
|
|
|
340
340
|
this.__debouncerWheelAnimationFrame = Debouncer.debounce(
|
|
341
341
|
this.__debouncerWheelAnimationFrame,
|
|
342
342
|
animationFrame,
|
|
343
|
-
() => (this._wheelAnimationFrame = false)
|
|
343
|
+
() => (this._wheelAnimationFrame = false),
|
|
344
344
|
);
|
|
345
345
|
|
|
346
346
|
const momentum = Math.abs(e.deltaX) + Math.abs(deltaY);
|
|
@@ -356,7 +356,7 @@ export class IronListAdapter {
|
|
|
356
356
|
this._debouncerIgnoreNewWheel = Debouncer.debounce(
|
|
357
357
|
this._debouncerIgnoreNewWheel,
|
|
358
358
|
timeOut.after(this.timeouts.IGNORE_WHEEL),
|
|
359
|
-
() => (this._ignoreNewWheel = false)
|
|
359
|
+
() => (this._ignoreNewWheel = false),
|
|
360
360
|
);
|
|
361
361
|
} else if ((this._hasResidualMomentum && momentum <= this._previousMomentum) || this._ignoreNewWheel) {
|
|
362
362
|
e.preventDefault();
|
|
@@ -427,7 +427,7 @@ export class IronListAdapter {
|
|
|
427
427
|
const elementWithFocus = visibleElements.find(
|
|
428
428
|
(element) =>
|
|
429
429
|
element.contains(this.elementsContainer.getRootNode().activeElement) ||
|
|
430
|
-
element.contains(this.scrollTarget.getRootNode().activeElement)
|
|
430
|
+
element.contains(this.scrollTarget.getRootNode().activeElement),
|
|
431
431
|
);
|
|
432
432
|
const targetElement = elementWithFocus || visibleElements[0];
|
|
433
433
|
if (!targetElement) {
|