@vaadin/split-layout 22.0.0-rc1 → 23.0.0-alpha2
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": "
|
|
3
|
+
"version": "23.0.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "
|
|
38
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
39
|
-
"@vaadin/vaadin-material-styles": "
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
37
|
+
"@vaadin/component-base": "23.0.0-alpha2",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-alpha2",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "23.0.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-alpha2"
|
|
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": "070f586dead02ca41b66717820c647f48bf1665f"
|
|
48
48
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
|
|
7
6
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
7
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
8
|
|
|
@@ -158,7 +157,7 @@ export interface SplitLayoutEventMap extends HTMLElementEventMap, SplitLayoutCus
|
|
|
158
157
|
*
|
|
159
158
|
* @fires {Event} splitter-dragend - Fired after dragging the splitter have ended.
|
|
160
159
|
*/
|
|
161
|
-
declare class SplitLayout extends ElementMixin(ThemableMixin(
|
|
160
|
+
declare class SplitLayout extends ElementMixin(ThemableMixin(HTMLElement)) {
|
|
162
161
|
/**
|
|
163
162
|
* The split layout's orientation. Possible values are: `horizontal|vertical`.
|
|
164
163
|
*/
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { IronResizableBehavior } from '@polymer/iron-resizable-behavior/iron-resizable-behavior.js';
|
|
7
7
|
import { mixinBehaviors } from '@polymer/polymer/lib/legacy/class.js';
|
|
8
|
-
import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
|
|
9
8
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
10
9
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
11
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
+
import { addListener } from '@vaadin/component-base/src/gestures.js';
|
|
12
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -152,11 +152,8 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
152
152
|
* @extends HTMLElement
|
|
153
153
|
* @mixes ElementMixin
|
|
154
154
|
* @mixes ThemableMixin
|
|
155
|
-
* @mixes GestureEventListeners
|
|
156
155
|
*/
|
|
157
|
-
class SplitLayout extends ElementMixin(
|
|
158
|
-
ThemableMixin(GestureEventListeners(mixinBehaviors([IronResizableBehavior], PolymerElement)))
|
|
159
|
-
) {
|
|
156
|
+
class SplitLayout extends ElementMixin(ThemableMixin(mixinBehaviors([IronResizableBehavior], PolymerElement))) {
|
|
160
157
|
static get template() {
|
|
161
158
|
return html`
|
|
162
159
|
<style>
|
|
@@ -207,13 +204,7 @@ class SplitLayout extends ElementMixin(
|
|
|
207
204
|
}
|
|
208
205
|
</style>
|
|
209
206
|
<slot id="primary" name="primary"></slot>
|
|
210
|
-
<div
|
|
211
|
-
part="splitter"
|
|
212
|
-
id="splitter"
|
|
213
|
-
on-track="_onHandleTrack"
|
|
214
|
-
on-down="_setPointerEventsNone"
|
|
215
|
-
on-up="_restorePointerEvents"
|
|
216
|
-
>
|
|
207
|
+
<div part="splitter" id="splitter">
|
|
217
208
|
<div part="handle"></div>
|
|
218
209
|
</div>
|
|
219
210
|
<slot id="secondary" name="secondary"></slot>
|
|
@@ -248,6 +239,11 @@ class SplitLayout extends ElementMixin(
|
|
|
248
239
|
ready() {
|
|
249
240
|
super.ready();
|
|
250
241
|
this.__observer = new FlattenedNodesObserver(this, this._processChildren);
|
|
242
|
+
|
|
243
|
+
const splitter = this.$.splitter;
|
|
244
|
+
addListener(splitter, 'track', this._onHandleTrack.bind(this));
|
|
245
|
+
addListener(splitter, 'down', this._setPointerEventsNone.bind(this));
|
|
246
|
+
addListener(splitter, 'up', this._restorePointerEvents.bind(this));
|
|
251
247
|
}
|
|
252
248
|
|
|
253
249
|
/** @private */
|