@vaadin/split-layout 23.0.0-alpha2 → 23.0.0-beta1
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/split-layout",
|
|
3
|
-
"version": "23.0.0-
|
|
3
|
+
"version": "23.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"main": "vaadin-split-layout.js",
|
|
20
20
|
"module": "vaadin-split-layout.js",
|
|
21
|
+
"type": "module",
|
|
21
22
|
"files": [
|
|
22
23
|
"src",
|
|
23
24
|
"theme",
|
|
@@ -32,17 +33,16 @@
|
|
|
32
33
|
"polymer"
|
|
33
34
|
],
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "23.0.0-
|
|
38
|
-
"@vaadin/vaadin-lumo-styles": "23.0.0-
|
|
39
|
-
"@vaadin/vaadin-material-styles": "23.0.0-
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "23.0.0-
|
|
37
|
+
"@vaadin/component-base": "23.0.0-beta1",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-beta1",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "23.0.0-beta1",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-beta1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@esm-bundle/chai": "^4.3.4",
|
|
44
44
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
45
45
|
"sinon": "^9.2.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "467244b76021176c109df675799b07029b293e58"
|
|
48
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2016 - 2022 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 { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
@@ -137,13 +137,6 @@ export interface SplitLayoutEventMap extends HTMLElementEventMap, SplitLayoutCus
|
|
|
137
137
|
* </vaadin-split-layout>
|
|
138
138
|
* ```
|
|
139
139
|
*
|
|
140
|
-
* ### Resize Notification
|
|
141
|
-
*
|
|
142
|
-
* This element implements `IronResizableBehavior` to notify the nested resizables
|
|
143
|
-
* when the splitter is dragged. In order to define a resizable and receive that
|
|
144
|
-
* notification in a nested element, include `IronResizableBehavior` and listen
|
|
145
|
-
* for the `iron-resize` event.
|
|
146
|
-
*
|
|
147
140
|
* ### Styling
|
|
148
141
|
*
|
|
149
142
|
* The following shadow DOM parts are available for styling:
|
|
@@ -164,8 +157,8 @@ declare class SplitLayout extends ElementMixin(ThemableMixin(HTMLElement)) {
|
|
|
164
157
|
orientation: 'horizontal' | 'vertical';
|
|
165
158
|
|
|
166
159
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
160
|
+
* @deprecated Since Vaadin 23, `notifyResize()` is deprecated. The component uses a
|
|
161
|
+
* ResizeObserver internally and doesn't need to be explicitly notified of resizes.
|
|
169
162
|
*/
|
|
170
163
|
notifyResize(): void;
|
|
171
164
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { IronResizableBehavior } from '@polymer/iron-resizable-behavior/iron-resizable-behavior.js';
|
|
7
|
-
import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class.js';
|
|
8
6
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
9
7
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
10
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
@@ -153,7 +151,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
153
151
|
* @mixes ElementMixin
|
|
154
152
|
* @mixes ThemableMixin
|
|
155
153
|
*/
|
|
156
|
-
class SplitLayout extends ElementMixin(ThemableMixin(
|
|
154
|
+
class SplitLayout extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
157
155
|
static get template() {
|
|
158
156
|
return html`
|
|
159
157
|
<style>
|
|
@@ -248,7 +246,7 @@ class SplitLayout extends ElementMixin(ThemableMixin(mixinBehaviors([IronResizab
|
|
|
248
246
|
|
|
249
247
|
/** @private */
|
|
250
248
|
_processChildren() {
|
|
251
|
-
this.
|
|
249
|
+
[...this.children].forEach((child, i) => {
|
|
252
250
|
if (i === 0) {
|
|
253
251
|
this._primaryChild = child;
|
|
254
252
|
child.setAttribute('slot', 'primary');
|
|
@@ -317,8 +315,6 @@ class SplitLayout extends ElementMixin(ThemableMixin(mixinBehaviors([IronResizab
|
|
|
317
315
|
this._setFlexBasis(this._primaryChild, this._startSize.primary + dirDistance, this._startSize.container);
|
|
318
316
|
this._setFlexBasis(this._secondaryChild, this._startSize.secondary - dirDistance, this._startSize.container);
|
|
319
317
|
|
|
320
|
-
this.notifyResize();
|
|
321
|
-
|
|
322
318
|
if (event.detail.state === 'end') {
|
|
323
319
|
this.dispatchEvent(new CustomEvent('splitter-dragend'));
|
|
324
320
|
|
|
@@ -327,23 +323,15 @@ class SplitLayout extends ElementMixin(ThemableMixin(mixinBehaviors([IronResizab
|
|
|
327
323
|
}
|
|
328
324
|
|
|
329
325
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
326
|
+
* @deprecated Since Vaadin 23, `notifyResize()` is deprecated. The component uses a
|
|
327
|
+
* ResizeObserver internally and doesn't need to be explicitly notified of resizes.
|
|
332
328
|
*/
|
|
333
329
|
notifyResize() {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
330
|
+
console.warn(
|
|
331
|
+
`WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`
|
|
332
|
+
);
|
|
337
333
|
}
|
|
338
334
|
|
|
339
|
-
/**
|
|
340
|
-
* Fired when the splitter is dragged. Non-bubbling. Fired for the splitter
|
|
341
|
-
* element and any nested elements with `IronResizableBehavior`.
|
|
342
|
-
*
|
|
343
|
-
* DEPRECATED: This event will be dropped in one of the future Vaadin versions. Use a ResizeObserver instead.
|
|
344
|
-
* @event iron-resize
|
|
345
|
-
*/
|
|
346
|
-
|
|
347
335
|
/**
|
|
348
336
|
* Fired after dragging the splitter have ended.
|
|
349
337
|
*
|