@progress/kendo-angular-layout 6.4.1 → 6.4.2-dev.202201251524

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.
@@ -5,11 +5,11 @@
5
5
  import { __decorate, __metadata, __param, __extends, __assign } from 'tslib';
6
6
  import { Injectable, Directive, TemplateRef, Optional, isDevMode, Input, ViewChild, ElementRef, HostBinding, ViewChildren, QueryList, ContentChildren, Component, SkipSelf, Host, Renderer2, Output, EventEmitter, ContentChild, HostListener, ChangeDetectorRef, NgZone, Inject, forwardRef, ViewEncapsulation, NgModule } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
8
- import { Keys, PreventableEvent, isDocumentAvailable, hasObservers, EventsModule, DraggableDirective, DraggableModule, ResizeSensorModule } from '@progress/kendo-angular-common';
8
+ import { Keys, DraggableDirective, PreventableEvent, isDocumentAvailable, hasObservers, EventsModule, DraggableModule, ResizeSensorModule } from '@progress/kendo-angular-common';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { trigger, state, style, transition, animate, AUTO_STYLE, AnimationBuilder } from '@angular/animations';
11
11
  import { Subject, BehaviorSubject, Subscription, of } from 'rxjs';
12
- import { take, tap, filter, switchMap, delay, takeUntil, map } from 'rxjs/operators';
12
+ import { tap, filter, switchMap, delay, takeUntil, map, take } from 'rxjs/operators';
13
13
  import Draggable from '@telerik/kendo-draggable';
14
14
  import { CommonModule } from '@angular/common';
15
15
  import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
@@ -21,7 +21,7 @@ var packageMetadata = {
21
21
  name: '@progress/kendo-angular-layout',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1643117691,
24
+ publishDate: 1643124181,
25
25
  version: '',
26
26
  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'
27
27
  };
@@ -1683,146 +1683,426 @@ var SplitterService = /** @class */ (function () {
1683
1683
  return SplitterService;
1684
1684
  }());
1685
1685
 
1686
+ var stopPropagation = function (_a) {
1687
+ var event = _a.originalEvent;
1688
+ event.stopPropagation();
1689
+ event.preventDefault();
1690
+ };
1691
+ var preventOnDblClick = function (release) { return function (mouseDown) {
1692
+ return of(mouseDown).pipe(delay(150), takeUntil(release));
1693
+ }; };
1694
+ var classFromObject = function (classes) { return Object.keys(classes).filter(function (c) { return classes[c]; }).join(' '); };
1695
+ var createMoveStream = function (draggable) { return function (mouseDown) {
1696
+ return draggable.kendoDrag
1697
+ .pipe(takeUntil(draggable.kendoRelease), map(function (_a) {
1698
+ var pageX = _a.pageX, pageY = _a.pageY;
1699
+ return ({
1700
+ originalX: mouseDown.pageX,
1701
+ originalY: mouseDown.pageY,
1702
+ pageX: pageX,
1703
+ pageY: pageY
1704
+ });
1705
+ }));
1706
+ }; };
1686
1707
  /**
1687
- * Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
1688
- *
1689
- * ```ts-preview
1690
- *
1691
- * @Component({
1692
- * selector: 'my-app',
1693
- * template: `
1694
- * <kendo-splitter style="height: 280px;">
1695
- *
1696
- * <kendo-splitter-pane [collapsible]="true" size="30%">
1697
- * <h3>Inner splitter / left pane</h3>
1698
- * <p>Resizable and collapsible.</p>
1699
- * </kendo-splitter-pane>
1700
- *
1701
- * <kendo-splitter-pane>
1702
- * <h3>Inner splitter / center pane</h3>
1703
- * <p>Resizable only.</p>
1704
- * </kendo-splitter-pane>
1705
- *
1706
- * <kendo-splitter-pane [collapsible]="true" size="30%">
1707
- * <h3>Inner splitter / right pane</h3>
1708
- * <p>Resizable and collapsible.</p>
1709
- * </kendo-splitter-pane>
1710
- *
1711
- * </kendo-splitter>
1712
- * `,
1713
- * styles: [ `
1714
- * h3 { font-size: 1.2em; }
1715
- * h3, p { margin: 10px; padding: 0; }
1716
- * ` ]
1717
- * })
1718
- * class AppComponent {}
1719
- * ```
1708
+ * @hidden
1720
1709
  */
1721
- var SplitterComponent = /** @class */ (function () {
1722
- function SplitterComponent(element, splitterService, localization, enclosingPane) {
1710
+ var SplitterBarComponent = /** @class */ (function () {
1711
+ function SplitterBarComponent(draggable, element, splitter, localization) {
1712
+ this.draggable = draggable;
1723
1713
  this.element = element;
1724
- this.splitterService = splitterService;
1714
+ this.splitter = splitter;
1725
1715
  this.localization = localization;
1726
- this.enclosingPane = enclosingPane;
1727
- /**
1728
- * Specifies the orientation of the panes within the Splitter.
1729
- * Panes in a horizontal Splitter are placed horizontally.
1730
- * Panes in a vertical Splitter are placed vertically.
1731
- */
1732
1716
  this.orientation = 'horizontal';
1733
- this.ariaRole = 'splitter';
1734
- validatePackage(packageMetadata);
1735
- if (enclosingPane) {
1736
- enclosingPane.containsSplitter = true;
1737
- }
1738
- // the handler only runs in NgZone if there are bound handlers
1739
- // this line merges both streams
1740
- this.layoutChange = this.splitterService.layoutChange;
1741
- this.configure = this.configure.bind(this);
1717
+ this.index = 0;
1718
+ this.ariaRole = 'separator';
1719
+ this.focused = false;
1720
+ this.subscriptions = new Subscription();
1742
1721
  }
1743
- Object.defineProperty(SplitterComponent.prototype, "hostClasses", {
1722
+ Object.defineProperty(SplitterBarComponent.prototype, "direction", {
1744
1723
  get: function () {
1745
- return true;
1724
+ return this.localization.rtl ? 'rtl' : 'ltr';
1746
1725
  },
1747
1726
  enumerable: true,
1748
1727
  configurable: true
1749
1728
  });
1750
- Object.defineProperty(SplitterComponent.prototype, "horizontalHostClasses", {
1729
+ Object.defineProperty(SplitterBarComponent.prototype, "tabIndex", {
1751
1730
  get: function () {
1752
- return this.orientation === 'horizontal';
1731
+ return this.splitter.isStatic(this.index) ? -1 : 0;
1753
1732
  },
1754
1733
  enumerable: true,
1755
1734
  configurable: true
1756
1735
  });
1757
- Object.defineProperty(SplitterComponent.prototype, "verticalHostClasses", {
1736
+ Object.defineProperty(SplitterBarComponent.prototype, "hostClasses", {
1758
1737
  get: function () {
1759
- return this.orientation === 'vertical';
1738
+ var isHorizontal = this.orientation === 'horizontal';
1739
+ var isDraggable = this.splitter.isDraggable(this.index);
1740
+ var isStatic = this.splitter.isStatic(this.index);
1741
+ return classFromObject({
1742
+ 'k-state-focused': this.focused,
1743
+ 'k-splitbar': true,
1744
+ 'k-splitbar-horizontal': isHorizontal,
1745
+ 'k-splitbar-vertical': !isHorizontal,
1746
+ 'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
1747
+ 'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
1748
+ 'k-splitbar-static-horizontal': isHorizontal && isStatic,
1749
+ 'k-splitbar-static-vertical': !isHorizontal && isStatic,
1750
+ 'k-touch-action-none': isDraggable
1751
+ });
1760
1752
  },
1761
1753
  enumerable: true,
1762
1754
  configurable: true
1763
1755
  });
1764
- Object.defineProperty(SplitterComponent.prototype, "dir", {
1756
+ Object.defineProperty(SplitterBarComponent.prototype, "order", {
1765
1757
  get: function () {
1766
- return this.direction;
1758
+ return 2 * this.index + 1;
1767
1759
  },
1768
1760
  enumerable: true,
1769
1761
  configurable: true
1770
1762
  });
1771
- SplitterComponent.prototype.ngAfterContentInit = function () {
1772
- this.reconfigure();
1773
- };
1774
- SplitterComponent.prototype.ngOnChanges = function (changes) {
1775
- if (changes.orientation && !changes.orientation.isFirstChange()) {
1776
- this.reconfigure();
1763
+ SplitterBarComponent.prototype.collapseAny = function () {
1764
+ if (this.expandLast) {
1765
+ this.toggleNext();
1777
1766
  }
1778
- };
1779
- SplitterComponent.prototype.ngOnDestroy = function () {
1780
- if (this.enclosingPane) {
1781
- this.enclosingPane.containsSplitter = false;
1767
+ else {
1768
+ this.tryToggleNearest();
1782
1769
  }
1783
- this.unsubscribeChanges();
1784
1770
  };
1785
- SplitterComponent.prototype.reconfigure = function () {
1786
- this.unsubscribeChanges();
1787
- this.configure();
1788
- this.paneChangesSubscription = this.panes.changes.subscribe(this.configure);
1771
+ SplitterBarComponent.prototype.onFocusIn = function () {
1772
+ this.focused = true;
1789
1773
  };
1790
- SplitterComponent.prototype.unsubscribeChanges = function () {
1791
- if (this.paneChangesSubscription) {
1792
- this.paneChangesSubscription.unsubscribe();
1793
- this.paneChangesSubscription = null;
1794
- }
1774
+ SplitterBarComponent.prototype.onFocusOut = function () {
1775
+ this.focused = false;
1795
1776
  };
1796
- SplitterComponent.prototype.configure = function () {
1777
+ SplitterBarComponent.prototype.onKeyDown = function (event) {
1797
1778
  var _this = this;
1798
- this.splitterService.configure({
1799
- panes: this.panes.toArray(),
1800
- orientation: this.orientation,
1801
- containerSize: function () {
1802
- if (_this.orientation === 'vertical') {
1803
- return _this.element.nativeElement.clientHeight;
1804
- }
1805
- else {
1806
- return _this.element.nativeElement.clientWidth;
1807
- }
1808
- }
1809
- });
1779
+ var keyCode = event && event.keyCode;
1780
+ var isHorizontal = this.orientation === 'horizontal';
1781
+ var resize = function (delta) {
1782
+ event.preventDefault();
1783
+ var state$$1 = _this.splitter.dragState(_this.index);
1784
+ _this.splitter.setSize(state$$1, delta);
1785
+ };
1786
+ if (keyCode === Keys.Enter) {
1787
+ event.preventDefault();
1788
+ this.collapseAny();
1789
+ }
1790
+ else if (isHorizontal && keyCode === Keys.ArrowLeft) {
1791
+ resize(-10);
1792
+ }
1793
+ else if (isHorizontal && keyCode === Keys.ArrowRight) {
1794
+ resize(10);
1795
+ }
1796
+ else if (!isHorizontal && keyCode === Keys.ArrowUp) {
1797
+ resize(-10);
1798
+ }
1799
+ else if (!isHorizontal && keyCode === Keys.ArrowDown) {
1800
+ resize(10);
1801
+ }
1810
1802
  };
1811
- Object.defineProperty(SplitterComponent.prototype, "direction", {
1803
+ Object.defineProperty(SplitterBarComponent.prototype, "expandLast", {
1812
1804
  get: function () {
1813
- return this.localization.rtl ? 'rtl' : 'ltr';
1805
+ var panes = this.splitter.panes;
1806
+ return panes.length === 2 && panes[1].collapsed;
1814
1807
  },
1815
1808
  enumerable: true,
1816
1809
  configurable: true
1817
1810
  });
1811
+ SplitterBarComponent.prototype.ngOnInit = function () {
1812
+ var _this = this;
1813
+ var state$$1;
1814
+ var listener = this.draggable.kendoPress.pipe(tap(stopPropagation), filter(function () { return _this.splitter.isDraggable(_this.index); }), tap(function () { return state$$1 = _this.splitter.dragState(_this.index); }), tap(function () { return _this.splitter.toggleContentOverlay(_this.index, true); }), switchMap(preventOnDblClick(this.draggable.kendoRelease)), switchMap(createMoveStream(this.draggable))).subscribe(function (_a) {
1815
+ var pageX = _a.pageX, pageY = _a.pageY, originalX = _a.originalX, originalY = _a.originalY;
1816
+ var delta;
1817
+ if (_this.orientation === 'vertical') {
1818
+ delta = pageY - originalY;
1819
+ }
1820
+ else if (_this.direction === 'rtl') {
1821
+ delta = originalX - pageX;
1822
+ }
1823
+ else {
1824
+ delta = pageX - originalX;
1825
+ }
1826
+ _this.splitter.setSize(state$$1, delta);
1827
+ });
1828
+ this.subscriptions.add(listener);
1829
+ this.subscriptions.add(this.draggable.kendoRelease.subscribe(function () { return _this.splitter.toggleContentOverlay(_this.index, false); }));
1830
+ };
1831
+ SplitterBarComponent.prototype.ngOnDestroy = function () {
1832
+ if (this.subscriptions) {
1833
+ this.subscriptions.unsubscribe();
1834
+ }
1835
+ };
1836
+ SplitterBarComponent.prototype.togglePrevious = function () {
1837
+ this.splitter.tryToggle(this.index);
1838
+ };
1839
+ SplitterBarComponent.prototype.toggleNext = function () {
1840
+ this.splitter.tryToggle(this.index + 1);
1841
+ };
1842
+ SplitterBarComponent.prototype.previousArrowClass = function () {
1843
+ var pane = this.splitter.pane(this.index);
1844
+ var nextPane = this.splitter.pane(this.index + 1);
1845
+ var isCollapsible = pane.collapsible;
1846
+ var isCollapsed = pane.collapsed;
1847
+ var isHorizontal = this.orientation === 'horizontal';
1848
+ return classFromObject({
1849
+ 'k-icon': true,
1850
+ 'k-hidden': !isCollapsible || nextPane.isHidden,
1851
+ 'k-collapse-prev': isCollapsible,
1852
+ 'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
1853
+ 'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
1854
+ 'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
1855
+ 'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
1856
+ });
1857
+ };
1858
+ SplitterBarComponent.prototype.nextArrowClass = function () {
1859
+ var pane = this.splitter.pane(this.index + 1);
1860
+ var prevPane = this.splitter.pane(this.index);
1861
+ var isCollapsible = pane.collapsible;
1862
+ var isCollapsed = pane.collapsed;
1863
+ var isHorizontal = this.orientation === 'horizontal';
1864
+ return classFromObject({
1865
+ 'k-icon': true,
1866
+ 'k-hidden': !isCollapsible || prevPane.isHidden,
1867
+ 'k-collapse-next': isCollapsible,
1868
+ 'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
1869
+ 'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
1870
+ 'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
1871
+ 'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
1872
+ });
1873
+ };
1874
+ SplitterBarComponent.prototype.tryToggleNearest = function () {
1875
+ var prev = this.index;
1876
+ var next = this.index + 1;
1877
+ if (!this.splitter.tryToggle(prev)) {
1878
+ this.splitter.tryToggle(next);
1879
+ }
1880
+ };
1818
1881
  __decorate([
1819
1882
  Input(),
1883
+ HostBinding('attr.aria-orientation'),
1820
1884
  __metadata("design:type", String)
1821
- ], SplitterComponent.prototype, "orientation", void 0);
1822
- __decorate([
1823
- Output(),
1824
- __metadata("design:type", EventEmitter)
1825
- ], SplitterComponent.prototype, "layoutChange", void 0);
1885
+ ], SplitterBarComponent.prototype, "orientation", void 0);
1886
+ __decorate([
1887
+ Input(),
1888
+ __metadata("design:type", Number)
1889
+ ], SplitterBarComponent.prototype, "index", void 0);
1890
+ __decorate([
1891
+ HostBinding('attr.role'),
1892
+ __metadata("design:type", String)
1893
+ ], SplitterBarComponent.prototype, "ariaRole", void 0);
1894
+ __decorate([
1895
+ HostBinding('class.k-state-focused'),
1896
+ __metadata("design:type", Boolean)
1897
+ ], SplitterBarComponent.prototype, "focused", void 0);
1898
+ __decorate([
1899
+ HostBinding('attr.tabindex'),
1900
+ __metadata("design:type", Number),
1901
+ __metadata("design:paramtypes", [])
1902
+ ], SplitterBarComponent.prototype, "tabIndex", null);
1903
+ __decorate([
1904
+ HostBinding('class'),
1905
+ __metadata("design:type", String),
1906
+ __metadata("design:paramtypes", [])
1907
+ ], SplitterBarComponent.prototype, "hostClasses", null);
1908
+ __decorate([
1909
+ HostBinding('style.-ms-flex-order'),
1910
+ HostBinding('style.order'),
1911
+ __metadata("design:type", Number),
1912
+ __metadata("design:paramtypes", [])
1913
+ ], SplitterBarComponent.prototype, "order", null);
1914
+ __decorate([
1915
+ HostListener('dblclick'),
1916
+ __metadata("design:type", Function),
1917
+ __metadata("design:paramtypes", []),
1918
+ __metadata("design:returntype", void 0)
1919
+ ], SplitterBarComponent.prototype, "collapseAny", null);
1920
+ __decorate([
1921
+ HostListener('focusin'),
1922
+ __metadata("design:type", Function),
1923
+ __metadata("design:paramtypes", []),
1924
+ __metadata("design:returntype", void 0)
1925
+ ], SplitterBarComponent.prototype, "onFocusIn", null);
1926
+ __decorate([
1927
+ HostListener('focusout'),
1928
+ __metadata("design:type", Function),
1929
+ __metadata("design:paramtypes", []),
1930
+ __metadata("design:returntype", void 0)
1931
+ ], SplitterBarComponent.prototype, "onFocusOut", null);
1932
+ __decorate([
1933
+ HostListener('keydown', ['$event']),
1934
+ __metadata("design:type", Function),
1935
+ __metadata("design:paramtypes", [Object]),
1936
+ __metadata("design:returntype", void 0)
1937
+ ], SplitterBarComponent.prototype, "onKeyDown", null);
1938
+ SplitterBarComponent = __decorate([
1939
+ Component({
1940
+ selector: 'kendo-splitter-bar',
1941
+ template: "\n <div [class]=\"previousArrowClass()\" (click)=\"togglePrevious()\"></div>\n <div class=\"k-resize-handle\"></div>\n <div [class]=\"nextArrowClass()\" (click)=\"toggleNext()\"></div>\n "
1942
+ }),
1943
+ __param(0, Host()),
1944
+ __metadata("design:paramtypes", [DraggableDirective,
1945
+ ElementRef,
1946
+ SplitterService,
1947
+ LocalizationService])
1948
+ ], SplitterBarComponent);
1949
+ return SplitterBarComponent;
1950
+ }());
1951
+
1952
+ /**
1953
+ * Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
1954
+ *
1955
+ * ```ts-preview
1956
+ *
1957
+ * @Component({
1958
+ * selector: 'my-app',
1959
+ * template: `
1960
+ * <kendo-splitter style="height: 280px;">
1961
+ *
1962
+ * <kendo-splitter-pane [collapsible]="true" size="30%">
1963
+ * <h3>Inner splitter / left pane</h3>
1964
+ * <p>Resizable and collapsible.</p>
1965
+ * </kendo-splitter-pane>
1966
+ *
1967
+ * <kendo-splitter-pane>
1968
+ * <h3>Inner splitter / center pane</h3>
1969
+ * <p>Resizable only.</p>
1970
+ * </kendo-splitter-pane>
1971
+ *
1972
+ * <kendo-splitter-pane [collapsible]="true" size="30%">
1973
+ * <h3>Inner splitter / right pane</h3>
1974
+ * <p>Resizable and collapsible.</p>
1975
+ * </kendo-splitter-pane>
1976
+ *
1977
+ * </kendo-splitter>
1978
+ * `,
1979
+ * styles: [ `
1980
+ * h3 { font-size: 1.2em; }
1981
+ * h3, p { margin: 10px; padding: 0; }
1982
+ * ` ]
1983
+ * })
1984
+ * class AppComponent {}
1985
+ * ```
1986
+ */
1987
+ var SplitterComponent = /** @class */ (function () {
1988
+ function SplitterComponent(element, splitterService, localization, renderer, enclosingPane) {
1989
+ this.element = element;
1990
+ this.splitterService = splitterService;
1991
+ this.localization = localization;
1992
+ this.renderer = renderer;
1993
+ this.enclosingPane = enclosingPane;
1994
+ /**
1995
+ * Specifies the orientation of the panes within the Splitter.
1996
+ * Panes in a horizontal Splitter are placed horizontally.
1997
+ * Panes in a vertical Splitter are placed vertically.
1998
+ */
1999
+ this.orientation = 'horizontal';
2000
+ this.ariaRole = 'splitter';
2001
+ validatePackage(packageMetadata);
2002
+ if (enclosingPane) {
2003
+ enclosingPane.containsSplitter = true;
2004
+ }
2005
+ // the handler only runs in NgZone if there are bound handlers
2006
+ // this line merges both streams
2007
+ this.layoutChange = this.splitterService.layoutChange;
2008
+ this.configure = this.configure.bind(this);
2009
+ }
2010
+ Object.defineProperty(SplitterComponent.prototype, "hostClasses", {
2011
+ get: function () {
2012
+ return true;
2013
+ },
2014
+ enumerable: true,
2015
+ configurable: true
2016
+ });
2017
+ Object.defineProperty(SplitterComponent.prototype, "horizontalHostClasses", {
2018
+ get: function () {
2019
+ return this.orientation === 'horizontal';
2020
+ },
2021
+ enumerable: true,
2022
+ configurable: true
2023
+ });
2024
+ Object.defineProperty(SplitterComponent.prototype, "verticalHostClasses", {
2025
+ get: function () {
2026
+ return this.orientation === 'vertical';
2027
+ },
2028
+ enumerable: true,
2029
+ configurable: true
2030
+ });
2031
+ Object.defineProperty(SplitterComponent.prototype, "dir", {
2032
+ get: function () {
2033
+ return this.direction;
2034
+ },
2035
+ enumerable: true,
2036
+ configurable: true
2037
+ });
2038
+ Object.defineProperty(SplitterComponent.prototype, "splitbars", {
2039
+ set: function (splitbars) {
2040
+ var _this = this;
2041
+ if (!isPresent(splitbars) || !isPresent(this.panes)) {
2042
+ return;
2043
+ }
2044
+ var components = this.panes.toArray().concat(splitbars.toArray()).sort(function (a, b) { return a.order - b.order; });
2045
+ var elements = components.map(function (component) { return component.element.nativeElement; });
2046
+ elements.forEach(function (element) { return _this.renderer.appendChild(_this.element.nativeElement, element); });
2047
+ },
2048
+ enumerable: true,
2049
+ configurable: true
2050
+ });
2051
+ SplitterComponent.prototype.ngAfterContentInit = function () {
2052
+ this.reconfigure();
2053
+ };
2054
+ SplitterComponent.prototype.ngOnChanges = function (changes) {
2055
+ if (changes.orientation && !changes.orientation.isFirstChange()) {
2056
+ this.reconfigure();
2057
+ }
2058
+ };
2059
+ SplitterComponent.prototype.ngOnDestroy = function () {
2060
+ if (this.enclosingPane) {
2061
+ this.enclosingPane.containsSplitter = false;
2062
+ }
2063
+ this.unsubscribeChanges();
2064
+ };
2065
+ SplitterComponent.prototype.reconfigure = function () {
2066
+ this.unsubscribeChanges();
2067
+ this.configure();
2068
+ this.paneChangesSubscription = this.panes.changes.subscribe(this.configure);
2069
+ };
2070
+ SplitterComponent.prototype.unsubscribeChanges = function () {
2071
+ if (this.paneChangesSubscription) {
2072
+ this.paneChangesSubscription.unsubscribe();
2073
+ this.paneChangesSubscription = null;
2074
+ }
2075
+ };
2076
+ SplitterComponent.prototype.configure = function () {
2077
+ var _this = this;
2078
+ this.splitterService.configure({
2079
+ panes: this.panes.toArray(),
2080
+ orientation: this.orientation,
2081
+ containerSize: function () {
2082
+ if (_this.orientation === 'vertical') {
2083
+ return _this.element.nativeElement.clientHeight;
2084
+ }
2085
+ else {
2086
+ return _this.element.nativeElement.clientWidth;
2087
+ }
2088
+ }
2089
+ });
2090
+ };
2091
+ Object.defineProperty(SplitterComponent.prototype, "direction", {
2092
+ get: function () {
2093
+ return this.localization.rtl ? 'rtl' : 'ltr';
2094
+ },
2095
+ enumerable: true,
2096
+ configurable: true
2097
+ });
2098
+ __decorate([
2099
+ Input(),
2100
+ __metadata("design:type", String)
2101
+ ], SplitterComponent.prototype, "orientation", void 0);
2102
+ __decorate([
2103
+ Output(),
2104
+ __metadata("design:type", EventEmitter)
2105
+ ], SplitterComponent.prototype, "layoutChange", void 0);
1826
2106
  __decorate([
1827
2107
  HostBinding('class.k-widget'),
1828
2108
  HostBinding('class.k-splitter'),
@@ -1849,6 +2129,11 @@ var SplitterComponent = /** @class */ (function () {
1849
2129
  HostBinding('attr.role'),
1850
2130
  __metadata("design:type", String)
1851
2131
  ], SplitterComponent.prototype, "ariaRole", void 0);
2132
+ __decorate([
2133
+ ViewChildren(SplitterBarComponent),
2134
+ __metadata("design:type", QueryList),
2135
+ __metadata("design:paramtypes", [QueryList])
2136
+ ], SplitterComponent.prototype, "splitbars", null);
1852
2137
  __decorate([
1853
2138
  ContentChildren(SplitterPaneComponent),
1854
2139
  __metadata("design:type", QueryList)
@@ -1867,10 +2152,11 @@ var SplitterComponent = /** @class */ (function () {
1867
2152
  ],
1868
2153
  template: "\n <ng-content select=\"kendo-splitter-pane\"></ng-content>\n <ng-container *ngFor=\"\n let pane of panes;\n let index = index;\n let last = last;\n \">\n <kendo-splitter-bar\n kendoDraggable\n *ngIf=\"!last\"\n [index]=\"index\"\n [orientation]=\"orientation\">\n </kendo-splitter-bar>\n </ng-container>\n "
1869
2154
  }),
1870
- __param(3, Optional()), __param(3, Host()), __param(3, Inject(SplitterPaneComponent)),
2155
+ __param(4, Optional()), __param(4, Host()), __param(4, Inject(SplitterPaneComponent)),
1871
2156
  __metadata("design:paramtypes", [ElementRef,
1872
2157
  SplitterService,
1873
2158
  LocalizationService,
2159
+ Renderer2,
1874
2160
  SplitterPaneComponent])
1875
2161
  ], SplitterComponent);
1876
2162
  return SplitterComponent;
@@ -7633,270 +7919,6 @@ var PanelBarModule = /** @class */ (function () {
7633
7919
  return PanelBarModule;
7634
7920
  }());
7635
7921
 
7636
- var stopPropagation = function (_a) {
7637
- var event = _a.originalEvent;
7638
- event.stopPropagation();
7639
- event.preventDefault();
7640
- };
7641
- var preventOnDblClick = function (release) { return function (mouseDown) {
7642
- return of(mouseDown).pipe(delay(150), takeUntil(release));
7643
- }; };
7644
- var classFromObject = function (classes) { return Object.keys(classes).filter(function (c) { return classes[c]; }).join(' '); };
7645
- var createMoveStream = function (draggable) { return function (mouseDown) {
7646
- return draggable.kendoDrag
7647
- .pipe(takeUntil(draggable.kendoRelease), map(function (_a) {
7648
- var pageX = _a.pageX, pageY = _a.pageY;
7649
- return ({
7650
- originalX: mouseDown.pageX,
7651
- originalY: mouseDown.pageY,
7652
- pageX: pageX,
7653
- pageY: pageY
7654
- });
7655
- }));
7656
- }; };
7657
- /**
7658
- * @hidden
7659
- */
7660
- var SplitterBarComponent = /** @class */ (function () {
7661
- function SplitterBarComponent(draggable, splitter, localization) {
7662
- this.draggable = draggable;
7663
- this.splitter = splitter;
7664
- this.localization = localization;
7665
- this.orientation = 'horizontal';
7666
- this.index = 0;
7667
- this.ariaRole = 'separator';
7668
- this.focused = false;
7669
- this.subscriptions = new Subscription();
7670
- }
7671
- Object.defineProperty(SplitterBarComponent.prototype, "direction", {
7672
- get: function () {
7673
- return this.localization.rtl ? 'rtl' : 'ltr';
7674
- },
7675
- enumerable: true,
7676
- configurable: true
7677
- });
7678
- Object.defineProperty(SplitterBarComponent.prototype, "tabIndex", {
7679
- get: function () {
7680
- return this.splitter.isStatic(this.index) ? -1 : 0;
7681
- },
7682
- enumerable: true,
7683
- configurable: true
7684
- });
7685
- Object.defineProperty(SplitterBarComponent.prototype, "hostClasses", {
7686
- get: function () {
7687
- var isHorizontal = this.orientation === 'horizontal';
7688
- var isDraggable = this.splitter.isDraggable(this.index);
7689
- var isStatic = this.splitter.isStatic(this.index);
7690
- return classFromObject({
7691
- 'k-state-focused': this.focused,
7692
- 'k-splitbar': true,
7693
- 'k-splitbar-horizontal': isHorizontal,
7694
- 'k-splitbar-vertical': !isHorizontal,
7695
- 'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
7696
- 'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
7697
- 'k-splitbar-static-horizontal': isHorizontal && isStatic,
7698
- 'k-splitbar-static-vertical': !isHorizontal && isStatic,
7699
- 'k-touch-action-none': isDraggable
7700
- });
7701
- },
7702
- enumerable: true,
7703
- configurable: true
7704
- });
7705
- Object.defineProperty(SplitterBarComponent.prototype, "order", {
7706
- get: function () {
7707
- return 2 * this.index + 1;
7708
- },
7709
- enumerable: true,
7710
- configurable: true
7711
- });
7712
- SplitterBarComponent.prototype.collapseAny = function () {
7713
- if (this.expandLast) {
7714
- this.toggleNext();
7715
- }
7716
- else {
7717
- this.tryToggleNearest();
7718
- }
7719
- };
7720
- SplitterBarComponent.prototype.onFocusIn = function () {
7721
- this.focused = true;
7722
- };
7723
- SplitterBarComponent.prototype.onFocusOut = function () {
7724
- this.focused = false;
7725
- };
7726
- SplitterBarComponent.prototype.onKeyDown = function (event) {
7727
- var _this = this;
7728
- var keyCode = event && event.keyCode;
7729
- var isHorizontal = this.orientation === 'horizontal';
7730
- var resize = function (delta) {
7731
- event.preventDefault();
7732
- var state$$1 = _this.splitter.dragState(_this.index);
7733
- _this.splitter.setSize(state$$1, delta);
7734
- };
7735
- if (keyCode === Keys.Enter) {
7736
- event.preventDefault();
7737
- this.collapseAny();
7738
- }
7739
- else if (isHorizontal && keyCode === Keys.ArrowLeft) {
7740
- resize(-10);
7741
- }
7742
- else if (isHorizontal && keyCode === Keys.ArrowRight) {
7743
- resize(10);
7744
- }
7745
- else if (!isHorizontal && keyCode === Keys.ArrowUp) {
7746
- resize(-10);
7747
- }
7748
- else if (!isHorizontal && keyCode === Keys.ArrowDown) {
7749
- resize(10);
7750
- }
7751
- };
7752
- Object.defineProperty(SplitterBarComponent.prototype, "expandLast", {
7753
- get: function () {
7754
- var panes = this.splitter.panes;
7755
- return panes.length === 2 && panes[1].collapsed;
7756
- },
7757
- enumerable: true,
7758
- configurable: true
7759
- });
7760
- SplitterBarComponent.prototype.ngOnInit = function () {
7761
- var _this = this;
7762
- var state$$1;
7763
- var listener = this.draggable.kendoPress.pipe(tap(stopPropagation), filter(function () { return _this.splitter.isDraggable(_this.index); }), tap(function () { return state$$1 = _this.splitter.dragState(_this.index); }), tap(function () { return _this.splitter.toggleContentOverlay(_this.index, true); }), switchMap(preventOnDblClick(this.draggable.kendoRelease)), switchMap(createMoveStream(this.draggable))).subscribe(function (_a) {
7764
- var pageX = _a.pageX, pageY = _a.pageY, originalX = _a.originalX, originalY = _a.originalY;
7765
- var delta;
7766
- if (_this.orientation === 'vertical') {
7767
- delta = pageY - originalY;
7768
- }
7769
- else if (_this.direction === 'rtl') {
7770
- delta = originalX - pageX;
7771
- }
7772
- else {
7773
- delta = pageX - originalX;
7774
- }
7775
- _this.splitter.setSize(state$$1, delta);
7776
- });
7777
- this.subscriptions.add(listener);
7778
- this.subscriptions.add(this.draggable.kendoRelease.subscribe(function () { return _this.splitter.toggleContentOverlay(_this.index, false); }));
7779
- };
7780
- SplitterBarComponent.prototype.ngOnDestroy = function () {
7781
- if (this.subscriptions) {
7782
- this.subscriptions.unsubscribe();
7783
- }
7784
- };
7785
- SplitterBarComponent.prototype.togglePrevious = function () {
7786
- this.splitter.tryToggle(this.index);
7787
- };
7788
- SplitterBarComponent.prototype.toggleNext = function () {
7789
- this.splitter.tryToggle(this.index + 1);
7790
- };
7791
- SplitterBarComponent.prototype.previousArrowClass = function () {
7792
- var pane = this.splitter.pane(this.index);
7793
- var nextPane = this.splitter.pane(this.index + 1);
7794
- var isCollapsible = pane.collapsible;
7795
- var isCollapsed = pane.collapsed;
7796
- var isHorizontal = this.orientation === 'horizontal';
7797
- return classFromObject({
7798
- 'k-icon': true,
7799
- 'k-hidden': !isCollapsible || nextPane.isHidden,
7800
- 'k-collapse-prev': isCollapsible,
7801
- 'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
7802
- 'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
7803
- 'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
7804
- 'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
7805
- });
7806
- };
7807
- SplitterBarComponent.prototype.nextArrowClass = function () {
7808
- var pane = this.splitter.pane(this.index + 1);
7809
- var prevPane = this.splitter.pane(this.index);
7810
- var isCollapsible = pane.collapsible;
7811
- var isCollapsed = pane.collapsed;
7812
- var isHorizontal = this.orientation === 'horizontal';
7813
- return classFromObject({
7814
- 'k-icon': true,
7815
- 'k-hidden': !isCollapsible || prevPane.isHidden,
7816
- 'k-collapse-next': isCollapsible,
7817
- 'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
7818
- 'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
7819
- 'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
7820
- 'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
7821
- });
7822
- };
7823
- SplitterBarComponent.prototype.tryToggleNearest = function () {
7824
- var prev = this.index;
7825
- var next = this.index + 1;
7826
- if (!this.splitter.tryToggle(prev)) {
7827
- this.splitter.tryToggle(next);
7828
- }
7829
- };
7830
- __decorate([
7831
- Input(),
7832
- HostBinding('attr.aria-orientation'),
7833
- __metadata("design:type", String)
7834
- ], SplitterBarComponent.prototype, "orientation", void 0);
7835
- __decorate([
7836
- Input(),
7837
- __metadata("design:type", Number)
7838
- ], SplitterBarComponent.prototype, "index", void 0);
7839
- __decorate([
7840
- HostBinding('attr.role'),
7841
- __metadata("design:type", String)
7842
- ], SplitterBarComponent.prototype, "ariaRole", void 0);
7843
- __decorate([
7844
- HostBinding('class.k-state-focused'),
7845
- __metadata("design:type", Boolean)
7846
- ], SplitterBarComponent.prototype, "focused", void 0);
7847
- __decorate([
7848
- HostBinding('attr.tabindex'),
7849
- __metadata("design:type", Number),
7850
- __metadata("design:paramtypes", [])
7851
- ], SplitterBarComponent.prototype, "tabIndex", null);
7852
- __decorate([
7853
- HostBinding('class'),
7854
- __metadata("design:type", String),
7855
- __metadata("design:paramtypes", [])
7856
- ], SplitterBarComponent.prototype, "hostClasses", null);
7857
- __decorate([
7858
- HostBinding('style.-ms-flex-order'),
7859
- HostBinding('style.order'),
7860
- __metadata("design:type", Number),
7861
- __metadata("design:paramtypes", [])
7862
- ], SplitterBarComponent.prototype, "order", null);
7863
- __decorate([
7864
- HostListener('dblclick'),
7865
- __metadata("design:type", Function),
7866
- __metadata("design:paramtypes", []),
7867
- __metadata("design:returntype", void 0)
7868
- ], SplitterBarComponent.prototype, "collapseAny", null);
7869
- __decorate([
7870
- HostListener('focusin'),
7871
- __metadata("design:type", Function),
7872
- __metadata("design:paramtypes", []),
7873
- __metadata("design:returntype", void 0)
7874
- ], SplitterBarComponent.prototype, "onFocusIn", null);
7875
- __decorate([
7876
- HostListener('focusout'),
7877
- __metadata("design:type", Function),
7878
- __metadata("design:paramtypes", []),
7879
- __metadata("design:returntype", void 0)
7880
- ], SplitterBarComponent.prototype, "onFocusOut", null);
7881
- __decorate([
7882
- HostListener('keydown', ['$event']),
7883
- __metadata("design:type", Function),
7884
- __metadata("design:paramtypes", [Object]),
7885
- __metadata("design:returntype", void 0)
7886
- ], SplitterBarComponent.prototype, "onKeyDown", null);
7887
- SplitterBarComponent = __decorate([
7888
- Component({
7889
- selector: 'kendo-splitter-bar',
7890
- template: "\n <div [class]=\"previousArrowClass()\" (click)=\"togglePrevious()\"></div>\n <div class=\"k-resize-handle\"></div>\n <div [class]=\"nextArrowClass()\" (click)=\"toggleNext()\"></div>\n "
7891
- }),
7892
- __param(0, Host()),
7893
- __metadata("design:paramtypes", [DraggableDirective,
7894
- SplitterService,
7895
- LocalizationService])
7896
- ], SplitterBarComponent);
7897
- return SplitterBarComponent;
7898
- }());
7899
-
7900
7922
  var exportedModules$5 = [
7901
7923
  SplitterComponent,
7902
7924
  SplitterPaneComponent