@vaadin/split-layout 23.0.0-alpha2 → 23.0.0-alpha3

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-alpha2",
3
+ "version": "23.0.0-alpha3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,17 +32,16 @@
32
32
  "polymer"
33
33
  ],
34
34
  "dependencies": {
35
- "@polymer/iron-resizable-behavior": "^3.0.0",
36
35
  "@polymer/polymer": "^3.0.0",
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"
36
+ "@vaadin/component-base": "23.0.0-alpha3",
37
+ "@vaadin/vaadin-lumo-styles": "23.0.0-alpha3",
38
+ "@vaadin/vaadin-material-styles": "23.0.0-alpha3",
39
+ "@vaadin/vaadin-themable-mixin": "23.0.0-alpha3"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@esm-bundle/chai": "^4.3.4",
44
43
  "@vaadin/testing-helpers": "^0.3.2",
45
44
  "sinon": "^9.2.1"
46
45
  },
47
- "gitHead": "070f586dead02ca41b66717820c647f48bf1665f"
46
+ "gitHead": "490037919a9e054cc002c1b3be0c94a1603e1a44"
48
47
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
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
- * Can be called to manually notify a resizable and its descendant
168
- * resizables of a resize change.
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) 2021 Vaadin Ltd.
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(mixinBehaviors([IronResizableBehavior], PolymerElement))) {
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.getEffectiveChildren().forEach((child, i) => {
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
- * Can be called to manually notify a resizable and its descendant
331
- * resizables of a resize change.
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
- // NOTE: we have this method here to include it to the API docs,
335
- // as we do not use `IronResizableBehavior` in type definitions.
336
- super.notifyResize();
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
  *