@vaadin/vaadin-overlay 23.2.0 → 23.3.0-alpha1
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/vaadin-overlay",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
40
|
-
"@vaadin/vaadin-material-styles": "
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
38
|
+
"@vaadin/component-base": "23.3.0-alpha1",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha1",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
45
|
"@polymer/iron-overlay-behavior": "^3.0.0",
|
|
46
|
-
"@vaadin/button": "
|
|
47
|
-
"@vaadin/radio-group": "
|
|
46
|
+
"@vaadin/button": "23.3.0-alpha1",
|
|
47
|
+
"@vaadin/radio-group": "23.3.0-alpha1",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
|
-
"@vaadin/text-field": "
|
|
49
|
+
"@vaadin/text-field": "23.3.0-alpha1",
|
|
50
50
|
"lit": "^2.0.0",
|
|
51
51
|
"sinon": "^13.0.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "beabc527d4b1274eb798ff701d406fed45cfe638"
|
|
54
54
|
}
|
|
@@ -15,6 +15,16 @@ const PROP_NAMES_HORIZONTAL = {
|
|
|
15
15
|
end: 'right',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
const targetResizeObserver = new ResizeObserver((entries) => {
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
entries.forEach((entry) => {
|
|
21
|
+
if (entry.target.__overlay) {
|
|
22
|
+
entry.target.__overlay._updatePosition();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* @polymerMixin
|
|
20
30
|
*/
|
|
@@ -132,8 +142,15 @@ export const PositionMixin = (superClass) =>
|
|
|
132
142
|
__overlayOpenedChanged(opened, positionTarget) {
|
|
133
143
|
this.__removeUpdatePositionEventListeners();
|
|
134
144
|
|
|
135
|
-
if (
|
|
136
|
-
|
|
145
|
+
if (positionTarget) {
|
|
146
|
+
positionTarget.__overlay = null;
|
|
147
|
+
targetResizeObserver.unobserve(positionTarget);
|
|
148
|
+
|
|
149
|
+
if (opened) {
|
|
150
|
+
this.__addUpdatePositionEventListeners();
|
|
151
|
+
positionTarget.__overlay = this;
|
|
152
|
+
targetResizeObserver.observe(positionTarget);
|
|
153
|
+
}
|
|
137
154
|
}
|
|
138
155
|
|
|
139
156
|
if (opened) {
|
package/src/vaadin-overlay.js
CHANGED
|
@@ -404,7 +404,7 @@ class OverlayElement extends ThemableMixin(DirMixin(ControllerMixin(PolymerEleme
|
|
|
404
404
|
* @protected
|
|
405
405
|
*/
|
|
406
406
|
_setTemplateFromNodes(nodes) {
|
|
407
|
-
this.template = nodes.
|
|
407
|
+
this.template = nodes.find((node) => node.localName && node.localName === 'template') || this.template;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
/**
|