@vaadin/component-base 24.5.0-alpha6 → 24.5.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-alpha8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"lit": "^3.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@vaadin/testing-helpers": "^0.
|
|
43
|
-
"sinon": "^
|
|
41
|
+
"@vaadin/chai-plugins": "24.5.0-alpha8",
|
|
42
|
+
"@vaadin/testing-helpers": "^1.0.0",
|
|
43
|
+
"sinon": "^18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1e227aaa55df3f5dae3d477b9afb5fce4f5ece33"
|
|
46
46
|
}
|
package/src/browser-utils.js
CHANGED
package/src/define.js
CHANGED
package/src/gestures.js
CHANGED
|
@@ -45,7 +45,7 @@ const MOUSE_WHICH_TO_BUTTONS = [0, 1, 4, 2];
|
|
|
45
45
|
const MOUSE_HAS_BUTTONS = (function () {
|
|
46
46
|
try {
|
|
47
47
|
return new MouseEvent('test', { buttons: 1 }).buttons === 1;
|
|
48
|
-
} catch (
|
|
48
|
+
} catch (_) {
|
|
49
49
|
return false;
|
|
50
50
|
}
|
|
51
51
|
})();
|
|
@@ -71,7 +71,7 @@ let supportsPassive = false;
|
|
|
71
71
|
});
|
|
72
72
|
window.addEventListener('test', null, opts);
|
|
73
73
|
window.removeEventListener('test', null, opts);
|
|
74
|
-
} catch (
|
|
74
|
+
} catch (_) {}
|
|
75
75
|
})();
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -48,7 +48,7 @@ export class OverflowController {
|
|
|
48
48
|
observe() {
|
|
49
49
|
const { host } = this;
|
|
50
50
|
|
|
51
|
-
this.__resizeObserver = new ResizeObserver((
|
|
51
|
+
this.__resizeObserver = new ResizeObserver(() => {
|
|
52
52
|
this.__debounceOverflow = Debouncer.debounce(this.__debounceOverflow, animationFrame, () => {
|
|
53
53
|
this.__updateOverflow();
|
|
54
54
|
});
|
package/src/slot-controller.d.ts
CHANGED
package/src/slot-controller.js
CHANGED
|
@@ -19,15 +19,14 @@ export class SlotController extends EventTarget {
|
|
|
19
19
|
* @return {string}
|
|
20
20
|
* @protected
|
|
21
21
|
*/
|
|
22
|
-
static generateId(host,
|
|
23
|
-
const prefix = slotName || 'default';
|
|
22
|
+
static generateId(host, prefix = 'default') {
|
|
24
23
|
return `${prefix}-${host.localName}-${generateUniqueId()}`;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
constructor(host, slotName, tagName, config = {}) {
|
|
28
27
|
super();
|
|
29
28
|
|
|
30
|
-
const { initializer, multiple, observe, useUniqueId } = config;
|
|
29
|
+
const { initializer, multiple, observe, useUniqueId, uniqueIdPrefix } = config;
|
|
31
30
|
|
|
32
31
|
this.host = host;
|
|
33
32
|
this.slotName = slotName;
|
|
@@ -42,7 +41,7 @@ export class SlotController extends EventTarget {
|
|
|
42
41
|
|
|
43
42
|
// Only generate the default ID if requested by the controller.
|
|
44
43
|
if (useUniqueId) {
|
|
45
|
-
this.defaultId = this.constructor.generateId(host, slotName);
|
|
44
|
+
this.defaultId = this.constructor.generateId(host, uniqueIdPrefix || slotName);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -56,7 +56,7 @@ export class IronListAdapter {
|
|
|
56
56
|
this.scrollTarget.addEventListener('wheel', (e) => this.__onWheel(e));
|
|
57
57
|
|
|
58
58
|
this.scrollTarget.addEventListener('virtualizer-element-focused', (e) => this.__onElementFocused(e));
|
|
59
|
-
this.elementsContainer.addEventListener('focusin', (
|
|
59
|
+
this.elementsContainer.addEventListener('focusin', () => {
|
|
60
60
|
this.scrollTarget.dispatchEvent(
|
|
61
61
|
new CustomEvent('virtualizer-element-focused', { detail: { element: this.__getFocusedElement() } }),
|
|
62
62
|
);
|