@progress/kendo-angular-layout 17.0.0-develop.11 → 17.0.0-develop.12
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/esm2020/package-metadata.mjs +2 -2
- package/esm2020/splitter/splitter-pane.component.mjs +20 -18
- package/esm2020/splitter/splitter.component.mjs +27 -4
- package/esm2020/splitter/splitter.service.mjs +34 -17
- package/fesm2015/progress-kendo-angular-layout.mjs +81 -39
- package/fesm2020/progress-kendo-angular-layout.mjs +81 -39
- package/package.json +8 -8
- package/splitter/splitter-pane.component.d.ts +4 -0
- package/splitter/splitter.component.d.ts +6 -3
- package/splitter/splitter.service.d.ts +1 -0
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-layout',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '17.0.0-develop.
|
|
12
|
+
publishDate: 1729256670,
|
|
13
|
+
version: '17.0.0-develop.12',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -80,14 +80,13 @@ export class SplitterPaneComponent {
|
|
|
80
80
|
*/
|
|
81
81
|
set size(newSize) {
|
|
82
82
|
this._size = newSize;
|
|
83
|
-
|
|
84
|
-
this.renderer.setStyle(
|
|
85
|
-
this.renderer.setStyle(element, 'flex-basis', newSize);
|
|
83
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-preferred-size', newSize);
|
|
84
|
+
this.renderer.setStyle(this.nativeElement, 'flex-basis', newSize);
|
|
86
85
|
if (this.staticPaneClass) {
|
|
87
|
-
this.renderer.addClass(
|
|
86
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-static');
|
|
88
87
|
}
|
|
89
88
|
else {
|
|
90
|
-
this.renderer.removeClass(
|
|
89
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-static');
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
get size() {
|
|
@@ -112,12 +111,11 @@ export class SplitterPaneComponent {
|
|
|
112
111
|
* @hidden
|
|
113
112
|
*/
|
|
114
113
|
set containsSplitter(value) {
|
|
115
|
-
const element = this.element.nativeElement;
|
|
116
114
|
if (value) {
|
|
117
|
-
this.renderer.addClass(
|
|
115
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-flex');
|
|
118
116
|
}
|
|
119
117
|
else {
|
|
120
|
-
this.renderer.removeClass(
|
|
118
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-flex');
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
get isHidden() {
|
|
@@ -136,14 +134,13 @@ export class SplitterPaneComponent {
|
|
|
136
134
|
return this.size && this.size.length > 0;
|
|
137
135
|
}
|
|
138
136
|
ngAfterViewChecked() {
|
|
139
|
-
const element = this.element.nativeElement;
|
|
140
137
|
if (this.isHidden) {
|
|
141
|
-
this.renderer.addClass(
|
|
142
|
-
this.renderer.addClass(
|
|
138
|
+
this.renderer.addClass(this.nativeElement, 'k-hidden');
|
|
139
|
+
this.renderer.addClass(this.nativeElement, 'hidden');
|
|
143
140
|
}
|
|
144
141
|
else {
|
|
145
|
-
this.renderer.removeClass(
|
|
146
|
-
this.renderer.removeClass(
|
|
142
|
+
this.renderer.removeClass(this.nativeElement, 'k-hidden');
|
|
143
|
+
this.renderer.removeClass(this.nativeElement, 'hidden');
|
|
147
144
|
}
|
|
148
145
|
}
|
|
149
146
|
/**
|
|
@@ -151,12 +148,18 @@ export class SplitterPaneComponent {
|
|
|
151
148
|
*/
|
|
152
149
|
get computedSize() {
|
|
153
150
|
if (this.orientation === 'vertical') {
|
|
154
|
-
return this.
|
|
151
|
+
return this.nativeElement.offsetHeight;
|
|
155
152
|
}
|
|
156
153
|
else {
|
|
157
|
-
return this.
|
|
154
|
+
return this.nativeElement.offsetWidth;
|
|
158
155
|
}
|
|
159
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* @hidden
|
|
159
|
+
*/
|
|
160
|
+
get nativeElement() {
|
|
161
|
+
return this.element.nativeElement;
|
|
162
|
+
}
|
|
160
163
|
/**
|
|
161
164
|
* @hidden
|
|
162
165
|
*/
|
|
@@ -171,9 +174,8 @@ export class SplitterPaneComponent {
|
|
|
171
174
|
this.cdr.detectChanges();
|
|
172
175
|
}
|
|
173
176
|
setOrderStyles() {
|
|
174
|
-
|
|
175
|
-
this.renderer.setStyle(
|
|
176
|
-
this.renderer.setStyle(element, 'order', this.order);
|
|
177
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-order', this.order);
|
|
178
|
+
this.renderer.setStyle(this.nativeElement, 'order', this.order);
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
SplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.SplitterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, EventEmitter, ContentChildren, Host, HostBinding, Inject, Input, Optional, Output, QueryList, ViewChildren, Renderer2 } from '@angular/core';
|
|
5
|
+
import { Component, ElementRef, EventEmitter, ContentChildren, Host, HostBinding, Inject, Input, Optional, Output, QueryList, ViewChildren, Renderer2, NgZone, isDevMode } from '@angular/core';
|
|
6
6
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
@@ -17,6 +17,7 @@ import * as i0 from "@angular/core";
|
|
|
17
17
|
import * as i1 from "./splitter.service";
|
|
18
18
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
19
19
|
import * as i3 from "./splitter-pane.component";
|
|
20
|
+
const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
|
|
20
21
|
/**
|
|
21
22
|
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
22
23
|
*
|
|
@@ -53,11 +54,12 @@ import * as i3 from "./splitter-pane.component";
|
|
|
53
54
|
* ```
|
|
54
55
|
*/
|
|
55
56
|
export class SplitterComponent {
|
|
56
|
-
constructor(element, splitterService, localization, renderer, enclosingPane) {
|
|
57
|
+
constructor(element, splitterService, localization, renderer, ngZone, enclosingPane) {
|
|
57
58
|
this.element = element;
|
|
58
59
|
this.splitterService = splitterService;
|
|
59
60
|
this.localization = localization;
|
|
60
61
|
this.renderer = renderer;
|
|
62
|
+
this.ngZone = ngZone;
|
|
61
63
|
this.enclosingPane = enclosingPane;
|
|
62
64
|
/**
|
|
63
65
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -119,6 +121,20 @@ export class SplitterComponent {
|
|
|
119
121
|
}
|
|
120
122
|
ngAfterContentInit() {
|
|
121
123
|
this.reconfigure();
|
|
124
|
+
this.setFixedHeight();
|
|
125
|
+
const allHaveFixedSize = this.panes.length && Array.from(this.panes).every(p => p.fixedSize);
|
|
126
|
+
if (allHaveFixedSize && isDevMode()) {
|
|
127
|
+
throw new Error(`
|
|
128
|
+
The Splitter should have at least one pane without a set size.
|
|
129
|
+
See ${SIZING_DOC_LINK} for more information.
|
|
130
|
+
`);
|
|
131
|
+
}
|
|
132
|
+
this._styleObserver = new MutationObserver(() => {
|
|
133
|
+
this.ngZone.runOutsideAngular(() => {
|
|
134
|
+
this.setFixedHeight();
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
this._styleObserver.observe(this.element.nativeElement, { attributeFilter: ['style'] });
|
|
122
138
|
}
|
|
123
139
|
ngOnChanges(changes) {
|
|
124
140
|
if (changes.orientation && !changes.orientation.isFirstChange()) {
|
|
@@ -129,6 +145,10 @@ export class SplitterComponent {
|
|
|
129
145
|
if (this.enclosingPane) {
|
|
130
146
|
this.enclosingPane.containsSplitter = false;
|
|
131
147
|
}
|
|
148
|
+
if (this._styleObserver) {
|
|
149
|
+
this._styleObserver.disconnect();
|
|
150
|
+
this._styleObserver = null;
|
|
151
|
+
}
|
|
132
152
|
this.unsubscribeChanges();
|
|
133
153
|
}
|
|
134
154
|
reconfigure() {
|
|
@@ -160,8 +180,11 @@ export class SplitterComponent {
|
|
|
160
180
|
get direction() {
|
|
161
181
|
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
162
182
|
}
|
|
183
|
+
setFixedHeight() {
|
|
184
|
+
this.splitterService.fixedHeight = getComputedStyle(this.element.nativeElement).getPropertyValue('height') !== 'auto';
|
|
185
|
+
}
|
|
163
186
|
}
|
|
164
|
-
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: i1.SplitterService }, { token: i2.LocalizationService }, { token: i0.Renderer2 }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
187
|
+
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: i1.SplitterService }, { token: i2.LocalizationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
165
188
|
SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep", splitterBarClass: "splitterBarClass" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
166
189
|
SplitterService,
|
|
167
190
|
LocalizationService,
|
|
@@ -225,7 +248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
225
248
|
standalone: true,
|
|
226
249
|
imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle, NgClass]
|
|
227
250
|
}]
|
|
228
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.SplitterService }, { type: i2.LocalizationService }, { type: i0.Renderer2 }, { type: i3.SplitterPaneComponent, decorators: [{
|
|
251
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.SplitterService }, { type: i2.LocalizationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.SplitterPaneComponent, decorators: [{
|
|
229
252
|
type: Optional
|
|
230
253
|
}, {
|
|
231
254
|
type: Host
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
5
|
+
import { EventEmitter, NgZone, Injectable } from '@angular/core';
|
|
6
6
|
import { Keys } from '@progress/kendo-angular-common';
|
|
7
7
|
import { shouldTogglePrev, shouldToggleNext } from './util';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
const
|
|
9
|
+
const MAX_PANE_HEIGHT = 33554400;
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
@@ -79,10 +79,10 @@ export class SplitterService {
|
|
|
79
79
|
}
|
|
80
80
|
setSize(state, delta) {
|
|
81
81
|
const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
|
|
82
|
-
const resize = (paneState, change) => {
|
|
82
|
+
const resize = (paneState, change, modifyMax = false) => {
|
|
83
83
|
const pane = this.pane(paneState.index);
|
|
84
84
|
const splitterSize = this.containerSize();
|
|
85
|
-
const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
|
|
85
|
+
const newSize = clamp(paneState.min, modifyMax ? MAX_PANE_HEIGHT : paneState.max, paneState.initialSize + change);
|
|
86
86
|
let size = "";
|
|
87
87
|
if (this.isPercent(pane.size)) {
|
|
88
88
|
size = (100 * newSize / splitterSize) + "%";
|
|
@@ -94,9 +94,36 @@ export class SplitterService {
|
|
|
94
94
|
pane.isResized = true;
|
|
95
95
|
this.emit(pane.sizeChange, size);
|
|
96
96
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const prevPane = this.pane(state.prev.index);
|
|
98
|
+
const nextPane = this.pane(state.next.index);
|
|
99
|
+
const canResizeBothPanes = this.panes.length > 2;
|
|
100
|
+
const modifyPrevMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !prevPane.max;
|
|
101
|
+
const modifyNextMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !nextPane.max;
|
|
102
|
+
if (prevPane.fixedSize && nextPane.fixedSize || canResizeBothPanes) {
|
|
103
|
+
const bothVertical = prevPane.orientation === 'vertical' && nextPane.orientation === 'vertical';
|
|
104
|
+
if (bothVertical) {
|
|
105
|
+
if (modifyNextMax) {
|
|
106
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
107
|
+
}
|
|
108
|
+
else if (modifyPrevMax) {
|
|
109
|
+
resize(state.next, -delta, modifyNextMax);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
resize(state.prev, delta, modifyNextMax);
|
|
113
|
+
resize(state.next, -delta, modifyPrevMax);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
resize(state.prev, delta);
|
|
118
|
+
resize(state.next, -delta);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else if (nextPane.fixedSize || nextPane.collapsible) {
|
|
122
|
+
resize(state.next, -delta, modifyNextMax);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
126
|
+
}
|
|
100
127
|
this.emit(this.layoutChange, {});
|
|
101
128
|
}
|
|
102
129
|
isDraggable(splitBarIndex) {
|
|
@@ -144,16 +171,6 @@ export class SplitterService {
|
|
|
144
171
|
pane.order = index * 2;
|
|
145
172
|
pane.orientation = orientation;
|
|
146
173
|
});
|
|
147
|
-
if (isDevMode()) {
|
|
148
|
-
const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
|
|
149
|
-
const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
|
|
150
|
-
if (allPanesWithSize && !hasResizedPane) {
|
|
151
|
-
throw new Error(`
|
|
152
|
-
The Splitter should have at least one pane without a set size.
|
|
153
|
-
See ${SIZING_DOC_LINK} for more information.
|
|
154
|
-
`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
174
|
this.containerSize = containerSize;
|
|
158
175
|
this.rtl = direction === 'rtl';
|
|
159
176
|
}
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-layout',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '17.0.0-develop.
|
|
31
|
+
publishDate: 1729256670,
|
|
32
|
+
version: '17.0.0-develop.12',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1628,7 +1628,7 @@ const shouldToggleOrResize = (keyCode, orientation) => {
|
|
|
1628
1628
|
return isHorizontalChange || isVerticalChange;
|
|
1629
1629
|
};
|
|
1630
1630
|
|
|
1631
|
-
const
|
|
1631
|
+
const MAX_PANE_HEIGHT = 33554400;
|
|
1632
1632
|
/**
|
|
1633
1633
|
* @hidden
|
|
1634
1634
|
*/
|
|
@@ -1701,10 +1701,10 @@ class SplitterService {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
setSize(state, delta) {
|
|
1703
1703
|
const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
|
|
1704
|
-
const resize = (paneState, change) => {
|
|
1704
|
+
const resize = (paneState, change, modifyMax = false) => {
|
|
1705
1705
|
const pane = this.pane(paneState.index);
|
|
1706
1706
|
const splitterSize = this.containerSize();
|
|
1707
|
-
const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
|
|
1707
|
+
const newSize = clamp(paneState.min, modifyMax ? MAX_PANE_HEIGHT : paneState.max, paneState.initialSize + change);
|
|
1708
1708
|
let size = "";
|
|
1709
1709
|
if (this.isPercent(pane.size)) {
|
|
1710
1710
|
size = (100 * newSize / splitterSize) + "%";
|
|
@@ -1716,9 +1716,36 @@ class SplitterService {
|
|
|
1716
1716
|
pane.isResized = true;
|
|
1717
1717
|
this.emit(pane.sizeChange, size);
|
|
1718
1718
|
};
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1719
|
+
const prevPane = this.pane(state.prev.index);
|
|
1720
|
+
const nextPane = this.pane(state.next.index);
|
|
1721
|
+
const canResizeBothPanes = this.panes.length > 2;
|
|
1722
|
+
const modifyPrevMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !prevPane.max;
|
|
1723
|
+
const modifyNextMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !nextPane.max;
|
|
1724
|
+
if (prevPane.fixedSize && nextPane.fixedSize || canResizeBothPanes) {
|
|
1725
|
+
const bothVertical = prevPane.orientation === 'vertical' && nextPane.orientation === 'vertical';
|
|
1726
|
+
if (bothVertical) {
|
|
1727
|
+
if (modifyNextMax) {
|
|
1728
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
1729
|
+
}
|
|
1730
|
+
else if (modifyPrevMax) {
|
|
1731
|
+
resize(state.next, -delta, modifyNextMax);
|
|
1732
|
+
}
|
|
1733
|
+
else {
|
|
1734
|
+
resize(state.prev, delta, modifyNextMax);
|
|
1735
|
+
resize(state.next, -delta, modifyPrevMax);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
else {
|
|
1739
|
+
resize(state.prev, delta);
|
|
1740
|
+
resize(state.next, -delta);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
else if (nextPane.fixedSize || nextPane.collapsible) {
|
|
1744
|
+
resize(state.next, -delta, modifyNextMax);
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
1748
|
+
}
|
|
1722
1749
|
this.emit(this.layoutChange, {});
|
|
1723
1750
|
}
|
|
1724
1751
|
isDraggable(splitBarIndex) {
|
|
@@ -1766,16 +1793,6 @@ class SplitterService {
|
|
|
1766
1793
|
pane.order = index * 2;
|
|
1767
1794
|
pane.orientation = orientation;
|
|
1768
1795
|
});
|
|
1769
|
-
if (isDevMode()) {
|
|
1770
|
-
const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
|
|
1771
|
-
const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
|
|
1772
|
-
if (allPanesWithSize && !hasResizedPane) {
|
|
1773
|
-
throw new Error(`
|
|
1774
|
-
The Splitter should have at least one pane without a set size.
|
|
1775
|
-
See ${SIZING_DOC_LINK} for more information.
|
|
1776
|
-
`);
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
1796
|
this.containerSize = containerSize;
|
|
1780
1797
|
this.rtl = direction === 'rtl';
|
|
1781
1798
|
}
|
|
@@ -1874,14 +1891,13 @@ class SplitterPaneComponent {
|
|
|
1874
1891
|
*/
|
|
1875
1892
|
set size(newSize) {
|
|
1876
1893
|
this._size = newSize;
|
|
1877
|
-
|
|
1878
|
-
this.renderer.setStyle(
|
|
1879
|
-
this.renderer.setStyle(element, 'flex-basis', newSize);
|
|
1894
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-preferred-size', newSize);
|
|
1895
|
+
this.renderer.setStyle(this.nativeElement, 'flex-basis', newSize);
|
|
1880
1896
|
if (this.staticPaneClass) {
|
|
1881
|
-
this.renderer.addClass(
|
|
1897
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-static');
|
|
1882
1898
|
}
|
|
1883
1899
|
else {
|
|
1884
|
-
this.renderer.removeClass(
|
|
1900
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-static');
|
|
1885
1901
|
}
|
|
1886
1902
|
}
|
|
1887
1903
|
get size() {
|
|
@@ -1906,12 +1922,11 @@ class SplitterPaneComponent {
|
|
|
1906
1922
|
* @hidden
|
|
1907
1923
|
*/
|
|
1908
1924
|
set containsSplitter(value) {
|
|
1909
|
-
const element = this.element.nativeElement;
|
|
1910
1925
|
if (value) {
|
|
1911
|
-
this.renderer.addClass(
|
|
1926
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-flex');
|
|
1912
1927
|
}
|
|
1913
1928
|
else {
|
|
1914
|
-
this.renderer.removeClass(
|
|
1929
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-flex');
|
|
1915
1930
|
}
|
|
1916
1931
|
}
|
|
1917
1932
|
get isHidden() {
|
|
@@ -1930,14 +1945,13 @@ class SplitterPaneComponent {
|
|
|
1930
1945
|
return this.size && this.size.length > 0;
|
|
1931
1946
|
}
|
|
1932
1947
|
ngAfterViewChecked() {
|
|
1933
|
-
const element = this.element.nativeElement;
|
|
1934
1948
|
if (this.isHidden) {
|
|
1935
|
-
this.renderer.addClass(
|
|
1936
|
-
this.renderer.addClass(
|
|
1949
|
+
this.renderer.addClass(this.nativeElement, 'k-hidden');
|
|
1950
|
+
this.renderer.addClass(this.nativeElement, 'hidden');
|
|
1937
1951
|
}
|
|
1938
1952
|
else {
|
|
1939
|
-
this.renderer.removeClass(
|
|
1940
|
-
this.renderer.removeClass(
|
|
1953
|
+
this.renderer.removeClass(this.nativeElement, 'k-hidden');
|
|
1954
|
+
this.renderer.removeClass(this.nativeElement, 'hidden');
|
|
1941
1955
|
}
|
|
1942
1956
|
}
|
|
1943
1957
|
/**
|
|
@@ -1945,12 +1959,18 @@ class SplitterPaneComponent {
|
|
|
1945
1959
|
*/
|
|
1946
1960
|
get computedSize() {
|
|
1947
1961
|
if (this.orientation === 'vertical') {
|
|
1948
|
-
return this.
|
|
1962
|
+
return this.nativeElement.offsetHeight;
|
|
1949
1963
|
}
|
|
1950
1964
|
else {
|
|
1951
|
-
return this.
|
|
1965
|
+
return this.nativeElement.offsetWidth;
|
|
1952
1966
|
}
|
|
1953
1967
|
}
|
|
1968
|
+
/**
|
|
1969
|
+
* @hidden
|
|
1970
|
+
*/
|
|
1971
|
+
get nativeElement() {
|
|
1972
|
+
return this.element.nativeElement;
|
|
1973
|
+
}
|
|
1954
1974
|
/**
|
|
1955
1975
|
* @hidden
|
|
1956
1976
|
*/
|
|
@@ -1965,9 +1985,8 @@ class SplitterPaneComponent {
|
|
|
1965
1985
|
this.cdr.detectChanges();
|
|
1966
1986
|
}
|
|
1967
1987
|
setOrderStyles() {
|
|
1968
|
-
|
|
1969
|
-
this.renderer.setStyle(
|
|
1970
|
-
this.renderer.setStyle(element, 'order', this.order);
|
|
1988
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-order', this.order);
|
|
1989
|
+
this.renderer.setStyle(this.nativeElement, 'order', this.order);
|
|
1971
1990
|
}
|
|
1972
1991
|
}
|
|
1973
1992
|
SplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: SplitterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2340,6 +2359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2340
2359
|
type: Input
|
|
2341
2360
|
}] } });
|
|
2342
2361
|
|
|
2362
|
+
const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
|
|
2343
2363
|
/**
|
|
2344
2364
|
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
2345
2365
|
*
|
|
@@ -2376,11 +2396,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2376
2396
|
* ```
|
|
2377
2397
|
*/
|
|
2378
2398
|
class SplitterComponent {
|
|
2379
|
-
constructor(element, splitterService, localization, renderer, enclosingPane) {
|
|
2399
|
+
constructor(element, splitterService, localization, renderer, ngZone, enclosingPane) {
|
|
2380
2400
|
this.element = element;
|
|
2381
2401
|
this.splitterService = splitterService;
|
|
2382
2402
|
this.localization = localization;
|
|
2383
2403
|
this.renderer = renderer;
|
|
2404
|
+
this.ngZone = ngZone;
|
|
2384
2405
|
this.enclosingPane = enclosingPane;
|
|
2385
2406
|
/**
|
|
2386
2407
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -2442,6 +2463,20 @@ class SplitterComponent {
|
|
|
2442
2463
|
}
|
|
2443
2464
|
ngAfterContentInit() {
|
|
2444
2465
|
this.reconfigure();
|
|
2466
|
+
this.setFixedHeight();
|
|
2467
|
+
const allHaveFixedSize = this.panes.length && Array.from(this.panes).every(p => p.fixedSize);
|
|
2468
|
+
if (allHaveFixedSize && isDevMode()) {
|
|
2469
|
+
throw new Error(`
|
|
2470
|
+
The Splitter should have at least one pane without a set size.
|
|
2471
|
+
See ${SIZING_DOC_LINK} for more information.
|
|
2472
|
+
`);
|
|
2473
|
+
}
|
|
2474
|
+
this._styleObserver = new MutationObserver(() => {
|
|
2475
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2476
|
+
this.setFixedHeight();
|
|
2477
|
+
});
|
|
2478
|
+
});
|
|
2479
|
+
this._styleObserver.observe(this.element.nativeElement, { attributeFilter: ['style'] });
|
|
2445
2480
|
}
|
|
2446
2481
|
ngOnChanges(changes) {
|
|
2447
2482
|
if (changes.orientation && !changes.orientation.isFirstChange()) {
|
|
@@ -2452,6 +2487,10 @@ class SplitterComponent {
|
|
|
2452
2487
|
if (this.enclosingPane) {
|
|
2453
2488
|
this.enclosingPane.containsSplitter = false;
|
|
2454
2489
|
}
|
|
2490
|
+
if (this._styleObserver) {
|
|
2491
|
+
this._styleObserver.disconnect();
|
|
2492
|
+
this._styleObserver = null;
|
|
2493
|
+
}
|
|
2455
2494
|
this.unsubscribeChanges();
|
|
2456
2495
|
}
|
|
2457
2496
|
reconfigure() {
|
|
@@ -2483,8 +2522,11 @@ class SplitterComponent {
|
|
|
2483
2522
|
get direction() {
|
|
2484
2523
|
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
2485
2524
|
}
|
|
2525
|
+
setFixedHeight() {
|
|
2526
|
+
this.splitterService.fixedHeight = getComputedStyle(this.element.nativeElement).getPropertyValue('height') !== 'auto';
|
|
2527
|
+
}
|
|
2486
2528
|
}
|
|
2487
|
-
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: SplitterService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2529
|
+
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: SplitterService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2488
2530
|
SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep", splitterBarClass: "splitterBarClass" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2489
2531
|
SplitterService,
|
|
2490
2532
|
LocalizationService,
|
|
@@ -2549,7 +2591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2549
2591
|
imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle, NgClass]
|
|
2550
2592
|
}]
|
|
2551
2593
|
}], ctorParameters: function () {
|
|
2552
|
-
return [{ type: i0.ElementRef }, { type: SplitterService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: SplitterPaneComponent, decorators: [{
|
|
2594
|
+
return [{ type: i0.ElementRef }, { type: SplitterService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: SplitterPaneComponent, decorators: [{
|
|
2553
2595
|
type: Optional
|
|
2554
2596
|
}, {
|
|
2555
2597
|
type: Host
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-layout',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '17.0.0-develop.
|
|
31
|
+
publishDate: 1729256670,
|
|
32
|
+
version: '17.0.0-develop.12',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1622,7 +1622,7 @@ const shouldToggleOrResize = (keyCode, orientation) => {
|
|
|
1622
1622
|
return isHorizontalChange || isVerticalChange;
|
|
1623
1623
|
};
|
|
1624
1624
|
|
|
1625
|
-
const
|
|
1625
|
+
const MAX_PANE_HEIGHT = 33554400;
|
|
1626
1626
|
/**
|
|
1627
1627
|
* @hidden
|
|
1628
1628
|
*/
|
|
@@ -1695,10 +1695,10 @@ class SplitterService {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
setSize(state, delta) {
|
|
1697
1697
|
const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
|
|
1698
|
-
const resize = (paneState, change) => {
|
|
1698
|
+
const resize = (paneState, change, modifyMax = false) => {
|
|
1699
1699
|
const pane = this.pane(paneState.index);
|
|
1700
1700
|
const splitterSize = this.containerSize();
|
|
1701
|
-
const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
|
|
1701
|
+
const newSize = clamp(paneState.min, modifyMax ? MAX_PANE_HEIGHT : paneState.max, paneState.initialSize + change);
|
|
1702
1702
|
let size = "";
|
|
1703
1703
|
if (this.isPercent(pane.size)) {
|
|
1704
1704
|
size = (100 * newSize / splitterSize) + "%";
|
|
@@ -1710,9 +1710,36 @@ class SplitterService {
|
|
|
1710
1710
|
pane.isResized = true;
|
|
1711
1711
|
this.emit(pane.sizeChange, size);
|
|
1712
1712
|
};
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1713
|
+
const prevPane = this.pane(state.prev.index);
|
|
1714
|
+
const nextPane = this.pane(state.next.index);
|
|
1715
|
+
const canResizeBothPanes = this.panes.length > 2;
|
|
1716
|
+
const modifyPrevMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !prevPane.max;
|
|
1717
|
+
const modifyNextMax = prevPane.orientation === 'vertical' && !this.fixedHeight && !nextPane.max;
|
|
1718
|
+
if (prevPane.fixedSize && nextPane.fixedSize || canResizeBothPanes) {
|
|
1719
|
+
const bothVertical = prevPane.orientation === 'vertical' && nextPane.orientation === 'vertical';
|
|
1720
|
+
if (bothVertical) {
|
|
1721
|
+
if (modifyNextMax) {
|
|
1722
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
1723
|
+
}
|
|
1724
|
+
else if (modifyPrevMax) {
|
|
1725
|
+
resize(state.next, -delta, modifyNextMax);
|
|
1726
|
+
}
|
|
1727
|
+
else {
|
|
1728
|
+
resize(state.prev, delta, modifyNextMax);
|
|
1729
|
+
resize(state.next, -delta, modifyPrevMax);
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
else {
|
|
1733
|
+
resize(state.prev, delta);
|
|
1734
|
+
resize(state.next, -delta);
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
else if (nextPane.fixedSize || nextPane.collapsible) {
|
|
1738
|
+
resize(state.next, -delta, modifyNextMax);
|
|
1739
|
+
}
|
|
1740
|
+
else {
|
|
1741
|
+
resize(state.prev, delta, modifyPrevMax);
|
|
1742
|
+
}
|
|
1716
1743
|
this.emit(this.layoutChange, {});
|
|
1717
1744
|
}
|
|
1718
1745
|
isDraggable(splitBarIndex) {
|
|
@@ -1760,16 +1787,6 @@ class SplitterService {
|
|
|
1760
1787
|
pane.order = index * 2;
|
|
1761
1788
|
pane.orientation = orientation;
|
|
1762
1789
|
});
|
|
1763
|
-
if (isDevMode()) {
|
|
1764
|
-
const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
|
|
1765
|
-
const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
|
|
1766
|
-
if (allPanesWithSize && !hasResizedPane) {
|
|
1767
|
-
throw new Error(`
|
|
1768
|
-
The Splitter should have at least one pane without a set size.
|
|
1769
|
-
See ${SIZING_DOC_LINK} for more information.
|
|
1770
|
-
`);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
1790
|
this.containerSize = containerSize;
|
|
1774
1791
|
this.rtl = direction === 'rtl';
|
|
1775
1792
|
}
|
|
@@ -1868,14 +1885,13 @@ class SplitterPaneComponent {
|
|
|
1868
1885
|
*/
|
|
1869
1886
|
set size(newSize) {
|
|
1870
1887
|
this._size = newSize;
|
|
1871
|
-
|
|
1872
|
-
this.renderer.setStyle(
|
|
1873
|
-
this.renderer.setStyle(element, 'flex-basis', newSize);
|
|
1888
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-preferred-size', newSize);
|
|
1889
|
+
this.renderer.setStyle(this.nativeElement, 'flex-basis', newSize);
|
|
1874
1890
|
if (this.staticPaneClass) {
|
|
1875
|
-
this.renderer.addClass(
|
|
1891
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-static');
|
|
1876
1892
|
}
|
|
1877
1893
|
else {
|
|
1878
|
-
this.renderer.removeClass(
|
|
1894
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-static');
|
|
1879
1895
|
}
|
|
1880
1896
|
}
|
|
1881
1897
|
get size() {
|
|
@@ -1900,12 +1916,11 @@ class SplitterPaneComponent {
|
|
|
1900
1916
|
* @hidden
|
|
1901
1917
|
*/
|
|
1902
1918
|
set containsSplitter(value) {
|
|
1903
|
-
const element = this.element.nativeElement;
|
|
1904
1919
|
if (value) {
|
|
1905
|
-
this.renderer.addClass(
|
|
1920
|
+
this.renderer.addClass(this.nativeElement, 'k-pane-flex');
|
|
1906
1921
|
}
|
|
1907
1922
|
else {
|
|
1908
|
-
this.renderer.removeClass(
|
|
1923
|
+
this.renderer.removeClass(this.nativeElement, 'k-pane-flex');
|
|
1909
1924
|
}
|
|
1910
1925
|
}
|
|
1911
1926
|
get isHidden() {
|
|
@@ -1924,14 +1939,13 @@ class SplitterPaneComponent {
|
|
|
1924
1939
|
return this.size && this.size.length > 0;
|
|
1925
1940
|
}
|
|
1926
1941
|
ngAfterViewChecked() {
|
|
1927
|
-
const element = this.element.nativeElement;
|
|
1928
1942
|
if (this.isHidden) {
|
|
1929
|
-
this.renderer.addClass(
|
|
1930
|
-
this.renderer.addClass(
|
|
1943
|
+
this.renderer.addClass(this.nativeElement, 'k-hidden');
|
|
1944
|
+
this.renderer.addClass(this.nativeElement, 'hidden');
|
|
1931
1945
|
}
|
|
1932
1946
|
else {
|
|
1933
|
-
this.renderer.removeClass(
|
|
1934
|
-
this.renderer.removeClass(
|
|
1947
|
+
this.renderer.removeClass(this.nativeElement, 'k-hidden');
|
|
1948
|
+
this.renderer.removeClass(this.nativeElement, 'hidden');
|
|
1935
1949
|
}
|
|
1936
1950
|
}
|
|
1937
1951
|
/**
|
|
@@ -1939,12 +1953,18 @@ class SplitterPaneComponent {
|
|
|
1939
1953
|
*/
|
|
1940
1954
|
get computedSize() {
|
|
1941
1955
|
if (this.orientation === 'vertical') {
|
|
1942
|
-
return this.
|
|
1956
|
+
return this.nativeElement.offsetHeight;
|
|
1943
1957
|
}
|
|
1944
1958
|
else {
|
|
1945
|
-
return this.
|
|
1959
|
+
return this.nativeElement.offsetWidth;
|
|
1946
1960
|
}
|
|
1947
1961
|
}
|
|
1962
|
+
/**
|
|
1963
|
+
* @hidden
|
|
1964
|
+
*/
|
|
1965
|
+
get nativeElement() {
|
|
1966
|
+
return this.element.nativeElement;
|
|
1967
|
+
}
|
|
1948
1968
|
/**
|
|
1949
1969
|
* @hidden
|
|
1950
1970
|
*/
|
|
@@ -1959,9 +1979,8 @@ class SplitterPaneComponent {
|
|
|
1959
1979
|
this.cdr.detectChanges();
|
|
1960
1980
|
}
|
|
1961
1981
|
setOrderStyles() {
|
|
1962
|
-
|
|
1963
|
-
this.renderer.setStyle(
|
|
1964
|
-
this.renderer.setStyle(element, 'order', this.order);
|
|
1982
|
+
this.renderer.setStyle(this.nativeElement, '-ms-flex-order', this.order);
|
|
1983
|
+
this.renderer.setStyle(this.nativeElement, 'order', this.order);
|
|
1965
1984
|
}
|
|
1966
1985
|
}
|
|
1967
1986
|
SplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: SplitterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2332,6 +2351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2332
2351
|
type: Input
|
|
2333
2352
|
}] } });
|
|
2334
2353
|
|
|
2354
|
+
const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
|
|
2335
2355
|
/**
|
|
2336
2356
|
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
2337
2357
|
*
|
|
@@ -2368,11 +2388,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2368
2388
|
* ```
|
|
2369
2389
|
*/
|
|
2370
2390
|
class SplitterComponent {
|
|
2371
|
-
constructor(element, splitterService, localization, renderer, enclosingPane) {
|
|
2391
|
+
constructor(element, splitterService, localization, renderer, ngZone, enclosingPane) {
|
|
2372
2392
|
this.element = element;
|
|
2373
2393
|
this.splitterService = splitterService;
|
|
2374
2394
|
this.localization = localization;
|
|
2375
2395
|
this.renderer = renderer;
|
|
2396
|
+
this.ngZone = ngZone;
|
|
2376
2397
|
this.enclosingPane = enclosingPane;
|
|
2377
2398
|
/**
|
|
2378
2399
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -2434,6 +2455,20 @@ class SplitterComponent {
|
|
|
2434
2455
|
}
|
|
2435
2456
|
ngAfterContentInit() {
|
|
2436
2457
|
this.reconfigure();
|
|
2458
|
+
this.setFixedHeight();
|
|
2459
|
+
const allHaveFixedSize = this.panes.length && Array.from(this.panes).every(p => p.fixedSize);
|
|
2460
|
+
if (allHaveFixedSize && isDevMode()) {
|
|
2461
|
+
throw new Error(`
|
|
2462
|
+
The Splitter should have at least one pane without a set size.
|
|
2463
|
+
See ${SIZING_DOC_LINK} for more information.
|
|
2464
|
+
`);
|
|
2465
|
+
}
|
|
2466
|
+
this._styleObserver = new MutationObserver(() => {
|
|
2467
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2468
|
+
this.setFixedHeight();
|
|
2469
|
+
});
|
|
2470
|
+
});
|
|
2471
|
+
this._styleObserver.observe(this.element.nativeElement, { attributeFilter: ['style'] });
|
|
2437
2472
|
}
|
|
2438
2473
|
ngOnChanges(changes) {
|
|
2439
2474
|
if (changes.orientation && !changes.orientation.isFirstChange()) {
|
|
@@ -2444,6 +2479,10 @@ class SplitterComponent {
|
|
|
2444
2479
|
if (this.enclosingPane) {
|
|
2445
2480
|
this.enclosingPane.containsSplitter = false;
|
|
2446
2481
|
}
|
|
2482
|
+
if (this._styleObserver) {
|
|
2483
|
+
this._styleObserver.disconnect();
|
|
2484
|
+
this._styleObserver = null;
|
|
2485
|
+
}
|
|
2447
2486
|
this.unsubscribeChanges();
|
|
2448
2487
|
}
|
|
2449
2488
|
reconfigure() {
|
|
@@ -2475,8 +2514,11 @@ class SplitterComponent {
|
|
|
2475
2514
|
get direction() {
|
|
2476
2515
|
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
2477
2516
|
}
|
|
2517
|
+
setFixedHeight() {
|
|
2518
|
+
this.splitterService.fixedHeight = getComputedStyle(this.element.nativeElement).getPropertyValue('height') !== 'auto';
|
|
2519
|
+
}
|
|
2478
2520
|
}
|
|
2479
|
-
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: SplitterService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2521
|
+
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: SplitterService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2480
2522
|
SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep", splitterBarClass: "splitterBarClass" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2481
2523
|
SplitterService,
|
|
2482
2524
|
LocalizationService,
|
|
@@ -2540,7 +2582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2540
2582
|
standalone: true,
|
|
2541
2583
|
imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle, NgClass]
|
|
2542
2584
|
}]
|
|
2543
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SplitterService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: SplitterPaneComponent, decorators: [{
|
|
2585
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SplitterService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: SplitterPaneComponent, decorators: [{
|
|
2544
2586
|
type: Optional
|
|
2545
2587
|
}, {
|
|
2546
2588
|
type: Host
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
|
3
|
-
"version": "17.0.0-develop.
|
|
3
|
+
"version": "17.0.0-develop.12",
|
|
4
4
|
"description": "Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"@angular/core": "15 - 18",
|
|
40
40
|
"@angular/platform-browser": "15 - 18",
|
|
41
41
|
"@progress/kendo-licensing": "^1.0.2",
|
|
42
|
-
"@progress/kendo-angular-common": "17.0.0-develop.
|
|
43
|
-
"@progress/kendo-angular-l10n": "17.0.0-develop.
|
|
44
|
-
"@progress/kendo-angular-progressbar": "17.0.0-develop.
|
|
45
|
-
"@progress/kendo-angular-icons": "17.0.0-develop.
|
|
46
|
-
"@progress/kendo-angular-buttons": "17.0.0-develop.
|
|
47
|
-
"@progress/kendo-angular-intl": "17.0.0-develop.
|
|
42
|
+
"@progress/kendo-angular-common": "17.0.0-develop.12",
|
|
43
|
+
"@progress/kendo-angular-l10n": "17.0.0-develop.12",
|
|
44
|
+
"@progress/kendo-angular-progressbar": "17.0.0-develop.12",
|
|
45
|
+
"@progress/kendo-angular-icons": "17.0.0-develop.12",
|
|
46
|
+
"@progress/kendo-angular-buttons": "17.0.0-develop.12",
|
|
47
|
+
"@progress/kendo-angular-intl": "17.0.0-develop.12",
|
|
48
48
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"tslib": "^2.3.1",
|
|
52
|
-
"@progress/kendo-angular-schematics": "17.0.0-develop.
|
|
52
|
+
"@progress/kendo-angular-schematics": "17.0.0-develop.12",
|
|
53
53
|
"@progress/kendo-draggable": "^3.0.2"
|
|
54
54
|
},
|
|
55
55
|
"schematics": "./schematics/collection.json",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ElementRef, EventEmitter, AfterContentInit, QueryList, Renderer2 } from '@angular/core';
|
|
5
|
+
import { ElementRef, EventEmitter, AfterContentInit, QueryList, Renderer2, NgZone } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { Orientation } from '../common/orientation';
|
|
8
8
|
import { SplitterPaneComponent } from './splitter-pane.component';
|
|
@@ -49,6 +49,7 @@ export declare class SplitterComponent implements AfterContentInit {
|
|
|
49
49
|
protected splitterService: SplitterService;
|
|
50
50
|
private localization;
|
|
51
51
|
private renderer;
|
|
52
|
+
private ngZone;
|
|
52
53
|
private enclosingPane?;
|
|
53
54
|
/**
|
|
54
55
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -87,7 +88,8 @@ export declare class SplitterComponent implements AfterContentInit {
|
|
|
87
88
|
*/
|
|
88
89
|
panes: QueryList<SplitterPaneComponent>;
|
|
89
90
|
private paneChangesSubscription;
|
|
90
|
-
|
|
91
|
+
private _styleObserver;
|
|
92
|
+
constructor(element: ElementRef<HTMLElement>, splitterService: SplitterService, localization: LocalizationService, renderer: Renderer2, ngZone: NgZone, enclosingPane?: SplitterPaneComponent);
|
|
91
93
|
ngAfterContentInit(): void;
|
|
92
94
|
ngOnChanges(changes: any): void;
|
|
93
95
|
ngOnDestroy(): void;
|
|
@@ -95,6 +97,7 @@ export declare class SplitterComponent implements AfterContentInit {
|
|
|
95
97
|
private unsubscribeChanges;
|
|
96
98
|
private configure;
|
|
97
99
|
private get direction();
|
|
98
|
-
|
|
100
|
+
private setFixedHeight;
|
|
101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SplitterComponent, [null, null, null, null, null, { optional: true; host: true; }]>;
|
|
99
102
|
static ɵcmp: i0.ɵɵComponentDeclaration<SplitterComponent, "kendo-splitter", ["kendoSplitter"], { "orientation": "orientation"; "splitbarWidth": "splitbarWidth"; "resizeStep": "resizeStep"; "splitterBarClass": "splitterBarClass"; }, { "layoutChange": "layoutChange"; }, ["panes"], ["kendo-splitter-pane"], true, never>;
|
|
100
103
|
}
|
|
@@ -43,6 +43,7 @@ export declare class SplitterService {
|
|
|
43
43
|
splitterBars: Array<SplitterBarComponent>;
|
|
44
44
|
layoutChange: EventEmitter<any>;
|
|
45
45
|
resizeStep: number;
|
|
46
|
+
fixedHeight: boolean;
|
|
46
47
|
constructor(zone: NgZone);
|
|
47
48
|
tryToggle(paneIndex: number): boolean;
|
|
48
49
|
togglePane(keyCode: number, index: number): void;
|