@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.
- package/dist/cdn/js/kendo-angular-layout.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/splitter/splitter-bar.component.js +4 -2
- package/dist/es/splitter/splitter.component.js +25 -3
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/splitter/splitter-bar.component.d.ts +3 -2
- package/dist/es2015/splitter/splitter-bar.component.js +4 -2
- package/dist/es2015/splitter/splitter-pane.component.d.ts +2 -2
- package/dist/es2015/splitter/splitter.component.d.ts +6 -3
- package/dist/es2015/splitter/splitter.component.js +21 -3
- package/dist/fesm2015/index.js +259 -241
- package/dist/fesm5/index.js +389 -367
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/splitter/splitter-bar.component.js +3 -1
- package/dist/npm/splitter/splitter.component.js +24 -2
- package/dist/systemjs/kendo-angular-layout.js +1 -1
- package/package.json +1 -1
package/dist/fesm2015/index.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
6
6
|
import { Injectable, Directive, TemplateRef, Optional, isDevMode, Input, ViewChild, ElementRef, HostBinding, ViewChildren, QueryList, ContentChildren, Component, SkipSelf, Host, Renderer2, EventEmitter, Output, 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,
|
|
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 {
|
|
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 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-layout',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
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
|
};
|
|
@@ -1657,6 +1657,244 @@ SplitterService = __decorate([
|
|
|
1657
1657
|
__metadata("design:paramtypes", [NgZone])
|
|
1658
1658
|
], SplitterService);
|
|
1659
1659
|
|
|
1660
|
+
const stopPropagation = ({ originalEvent: event }) => {
|
|
1661
|
+
event.stopPropagation();
|
|
1662
|
+
event.preventDefault();
|
|
1663
|
+
};
|
|
1664
|
+
const preventOnDblClick = release => mouseDown => of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
1665
|
+
const classFromObject = classes => Object.keys(classes).filter(c => classes[c]).join(' ');
|
|
1666
|
+
const createMoveStream = (draggable) => mouseDown => draggable.kendoDrag
|
|
1667
|
+
.pipe(takeUntil(draggable.kendoRelease), map(({ pageX, pageY }) => ({
|
|
1668
|
+
originalX: mouseDown.pageX,
|
|
1669
|
+
originalY: mouseDown.pageY,
|
|
1670
|
+
pageX,
|
|
1671
|
+
pageY
|
|
1672
|
+
})));
|
|
1673
|
+
/**
|
|
1674
|
+
* @hidden
|
|
1675
|
+
*/
|
|
1676
|
+
let SplitterBarComponent = class SplitterBarComponent {
|
|
1677
|
+
constructor(draggable, element, splitter, localization) {
|
|
1678
|
+
this.draggable = draggable;
|
|
1679
|
+
this.element = element;
|
|
1680
|
+
this.splitter = splitter;
|
|
1681
|
+
this.localization = localization;
|
|
1682
|
+
this.orientation = 'horizontal';
|
|
1683
|
+
this.index = 0;
|
|
1684
|
+
this.ariaRole = 'separator';
|
|
1685
|
+
this.focused = false;
|
|
1686
|
+
this.subscriptions = new Subscription();
|
|
1687
|
+
}
|
|
1688
|
+
get direction() {
|
|
1689
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
1690
|
+
}
|
|
1691
|
+
get tabIndex() {
|
|
1692
|
+
return this.splitter.isStatic(this.index) ? -1 : 0;
|
|
1693
|
+
}
|
|
1694
|
+
get hostClasses() {
|
|
1695
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1696
|
+
const isDraggable = this.splitter.isDraggable(this.index);
|
|
1697
|
+
const isStatic = this.splitter.isStatic(this.index);
|
|
1698
|
+
return classFromObject({
|
|
1699
|
+
'k-state-focused': this.focused,
|
|
1700
|
+
'k-splitbar': true,
|
|
1701
|
+
'k-splitbar-horizontal': isHorizontal,
|
|
1702
|
+
'k-splitbar-vertical': !isHorizontal,
|
|
1703
|
+
'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
|
|
1704
|
+
'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
|
|
1705
|
+
'k-splitbar-static-horizontal': isHorizontal && isStatic,
|
|
1706
|
+
'k-splitbar-static-vertical': !isHorizontal && isStatic,
|
|
1707
|
+
'k-touch-action-none': isDraggable
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
get order() {
|
|
1711
|
+
return 2 * this.index + 1;
|
|
1712
|
+
}
|
|
1713
|
+
collapseAny() {
|
|
1714
|
+
if (this.expandLast) {
|
|
1715
|
+
this.toggleNext();
|
|
1716
|
+
}
|
|
1717
|
+
else {
|
|
1718
|
+
this.tryToggleNearest();
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
onFocusIn() {
|
|
1722
|
+
this.focused = true;
|
|
1723
|
+
}
|
|
1724
|
+
onFocusOut() {
|
|
1725
|
+
this.focused = false;
|
|
1726
|
+
}
|
|
1727
|
+
onKeyDown(event) {
|
|
1728
|
+
const keyCode = event && event.keyCode;
|
|
1729
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1730
|
+
const resize = delta => {
|
|
1731
|
+
event.preventDefault();
|
|
1732
|
+
const state$$1 = this.splitter.dragState(this.index);
|
|
1733
|
+
this.splitter.setSize(state$$1, delta);
|
|
1734
|
+
};
|
|
1735
|
+
if (keyCode === Keys.Enter) {
|
|
1736
|
+
event.preventDefault();
|
|
1737
|
+
this.collapseAny();
|
|
1738
|
+
}
|
|
1739
|
+
else if (isHorizontal && keyCode === Keys.ArrowLeft) {
|
|
1740
|
+
resize(-10);
|
|
1741
|
+
}
|
|
1742
|
+
else if (isHorizontal && keyCode === Keys.ArrowRight) {
|
|
1743
|
+
resize(10);
|
|
1744
|
+
}
|
|
1745
|
+
else if (!isHorizontal && keyCode === Keys.ArrowUp) {
|
|
1746
|
+
resize(-10);
|
|
1747
|
+
}
|
|
1748
|
+
else if (!isHorizontal && keyCode === Keys.ArrowDown) {
|
|
1749
|
+
resize(10);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
get expandLast() {
|
|
1753
|
+
const panes = this.splitter.panes;
|
|
1754
|
+
return panes.length === 2 && panes[1].collapsed;
|
|
1755
|
+
}
|
|
1756
|
+
ngOnInit() {
|
|
1757
|
+
let state$$1;
|
|
1758
|
+
const listener = this.draggable.kendoPress.pipe(tap(stopPropagation), filter(() => this.splitter.isDraggable(this.index)), tap(() => state$$1 = this.splitter.dragState(this.index)), tap(() => this.splitter.toggleContentOverlay(this.index, true)), switchMap(preventOnDblClick(this.draggable.kendoRelease)), switchMap(createMoveStream(this.draggable))).subscribe(({ pageX, pageY, originalX, originalY }) => {
|
|
1759
|
+
let delta;
|
|
1760
|
+
if (this.orientation === 'vertical') {
|
|
1761
|
+
delta = pageY - originalY;
|
|
1762
|
+
}
|
|
1763
|
+
else if (this.direction === 'rtl') {
|
|
1764
|
+
delta = originalX - pageX;
|
|
1765
|
+
}
|
|
1766
|
+
else {
|
|
1767
|
+
delta = pageX - originalX;
|
|
1768
|
+
}
|
|
1769
|
+
this.splitter.setSize(state$$1, delta);
|
|
1770
|
+
});
|
|
1771
|
+
this.subscriptions.add(listener);
|
|
1772
|
+
this.subscriptions.add(this.draggable.kendoRelease.subscribe(() => this.splitter.toggleContentOverlay(this.index, false)));
|
|
1773
|
+
}
|
|
1774
|
+
ngOnDestroy() {
|
|
1775
|
+
if (this.subscriptions) {
|
|
1776
|
+
this.subscriptions.unsubscribe();
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
togglePrevious() {
|
|
1780
|
+
this.splitter.tryToggle(this.index);
|
|
1781
|
+
}
|
|
1782
|
+
toggleNext() {
|
|
1783
|
+
this.splitter.tryToggle(this.index + 1);
|
|
1784
|
+
}
|
|
1785
|
+
previousArrowClass() {
|
|
1786
|
+
const pane = this.splitter.pane(this.index);
|
|
1787
|
+
const nextPane = this.splitter.pane(this.index + 1);
|
|
1788
|
+
const isCollapsible = pane.collapsible;
|
|
1789
|
+
const isCollapsed = pane.collapsed;
|
|
1790
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1791
|
+
return classFromObject({
|
|
1792
|
+
'k-icon': true,
|
|
1793
|
+
'k-hidden': !isCollapsible || nextPane.isHidden,
|
|
1794
|
+
'k-collapse-prev': isCollapsible,
|
|
1795
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
|
|
1796
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
|
|
1797
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1798
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
nextArrowClass() {
|
|
1802
|
+
const pane = this.splitter.pane(this.index + 1);
|
|
1803
|
+
const prevPane = this.splitter.pane(this.index);
|
|
1804
|
+
const isCollapsible = pane.collapsible;
|
|
1805
|
+
const isCollapsed = pane.collapsed;
|
|
1806
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1807
|
+
return classFromObject({
|
|
1808
|
+
'k-icon': true,
|
|
1809
|
+
'k-hidden': !isCollapsible || prevPane.isHidden,
|
|
1810
|
+
'k-collapse-next': isCollapsible,
|
|
1811
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
|
|
1812
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
|
|
1813
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1814
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
tryToggleNearest() {
|
|
1818
|
+
const prev = this.index;
|
|
1819
|
+
const next = this.index + 1;
|
|
1820
|
+
if (!this.splitter.tryToggle(prev)) {
|
|
1821
|
+
this.splitter.tryToggle(next);
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
};
|
|
1825
|
+
__decorate([
|
|
1826
|
+
Input(),
|
|
1827
|
+
HostBinding('attr.aria-orientation'),
|
|
1828
|
+
__metadata("design:type", String)
|
|
1829
|
+
], SplitterBarComponent.prototype, "orientation", void 0);
|
|
1830
|
+
__decorate([
|
|
1831
|
+
Input(),
|
|
1832
|
+
__metadata("design:type", Number)
|
|
1833
|
+
], SplitterBarComponent.prototype, "index", void 0);
|
|
1834
|
+
__decorate([
|
|
1835
|
+
HostBinding('attr.role'),
|
|
1836
|
+
__metadata("design:type", String)
|
|
1837
|
+
], SplitterBarComponent.prototype, "ariaRole", void 0);
|
|
1838
|
+
__decorate([
|
|
1839
|
+
HostBinding('class.k-state-focused'),
|
|
1840
|
+
__metadata("design:type", Boolean)
|
|
1841
|
+
], SplitterBarComponent.prototype, "focused", void 0);
|
|
1842
|
+
__decorate([
|
|
1843
|
+
HostBinding('attr.tabindex'),
|
|
1844
|
+
__metadata("design:type", Number),
|
|
1845
|
+
__metadata("design:paramtypes", [])
|
|
1846
|
+
], SplitterBarComponent.prototype, "tabIndex", null);
|
|
1847
|
+
__decorate([
|
|
1848
|
+
HostBinding('class'),
|
|
1849
|
+
__metadata("design:type", String),
|
|
1850
|
+
__metadata("design:paramtypes", [])
|
|
1851
|
+
], SplitterBarComponent.prototype, "hostClasses", null);
|
|
1852
|
+
__decorate([
|
|
1853
|
+
HostBinding('style.-ms-flex-order'),
|
|
1854
|
+
HostBinding('style.order'),
|
|
1855
|
+
__metadata("design:type", Number),
|
|
1856
|
+
__metadata("design:paramtypes", [])
|
|
1857
|
+
], SplitterBarComponent.prototype, "order", null);
|
|
1858
|
+
__decorate([
|
|
1859
|
+
HostListener('dblclick'),
|
|
1860
|
+
__metadata("design:type", Function),
|
|
1861
|
+
__metadata("design:paramtypes", []),
|
|
1862
|
+
__metadata("design:returntype", void 0)
|
|
1863
|
+
], SplitterBarComponent.prototype, "collapseAny", null);
|
|
1864
|
+
__decorate([
|
|
1865
|
+
HostListener('focusin'),
|
|
1866
|
+
__metadata("design:type", Function),
|
|
1867
|
+
__metadata("design:paramtypes", []),
|
|
1868
|
+
__metadata("design:returntype", void 0)
|
|
1869
|
+
], SplitterBarComponent.prototype, "onFocusIn", null);
|
|
1870
|
+
__decorate([
|
|
1871
|
+
HostListener('focusout'),
|
|
1872
|
+
__metadata("design:type", Function),
|
|
1873
|
+
__metadata("design:paramtypes", []),
|
|
1874
|
+
__metadata("design:returntype", void 0)
|
|
1875
|
+
], SplitterBarComponent.prototype, "onFocusOut", null);
|
|
1876
|
+
__decorate([
|
|
1877
|
+
HostListener('keydown', ['$event']),
|
|
1878
|
+
__metadata("design:type", Function),
|
|
1879
|
+
__metadata("design:paramtypes", [Object]),
|
|
1880
|
+
__metadata("design:returntype", void 0)
|
|
1881
|
+
], SplitterBarComponent.prototype, "onKeyDown", null);
|
|
1882
|
+
SplitterBarComponent = __decorate([
|
|
1883
|
+
Component({
|
|
1884
|
+
selector: 'kendo-splitter-bar',
|
|
1885
|
+
template: `
|
|
1886
|
+
<div [class]="previousArrowClass()" (click)="togglePrevious()"></div>
|
|
1887
|
+
<div class="k-resize-handle"></div>
|
|
1888
|
+
<div [class]="nextArrowClass()" (click)="toggleNext()"></div>
|
|
1889
|
+
`
|
|
1890
|
+
}),
|
|
1891
|
+
__param(0, Host()),
|
|
1892
|
+
__metadata("design:paramtypes", [DraggableDirective,
|
|
1893
|
+
ElementRef,
|
|
1894
|
+
SplitterService,
|
|
1895
|
+
LocalizationService])
|
|
1896
|
+
], SplitterBarComponent);
|
|
1897
|
+
|
|
1660
1898
|
/**
|
|
1661
1899
|
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
1662
1900
|
*
|
|
@@ -1693,10 +1931,11 @@ SplitterService = __decorate([
|
|
|
1693
1931
|
* ```
|
|
1694
1932
|
*/
|
|
1695
1933
|
let SplitterComponent = class SplitterComponent {
|
|
1696
|
-
constructor(element, splitterService, localization, enclosingPane) {
|
|
1934
|
+
constructor(element, splitterService, localization, renderer, enclosingPane) {
|
|
1697
1935
|
this.element = element;
|
|
1698
1936
|
this.splitterService = splitterService;
|
|
1699
1937
|
this.localization = localization;
|
|
1938
|
+
this.renderer = renderer;
|
|
1700
1939
|
this.enclosingPane = enclosingPane;
|
|
1701
1940
|
/**
|
|
1702
1941
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -1726,6 +1965,15 @@ let SplitterComponent = class SplitterComponent {
|
|
|
1726
1965
|
get dir() {
|
|
1727
1966
|
return this.direction;
|
|
1728
1967
|
}
|
|
1968
|
+
set splitbars(splitbars) {
|
|
1969
|
+
if (!isPresent(splitbars) || !isPresent(this.panes)) {
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
const components = [...this.panes.toArray(), ...splitbars.toArray()]
|
|
1973
|
+
.sort((a, b) => a.order - b.order);
|
|
1974
|
+
const elements = components.map(component => component.element.nativeElement);
|
|
1975
|
+
elements.forEach(element => this.renderer.appendChild(this.element.nativeElement, element));
|
|
1976
|
+
}
|
|
1729
1977
|
ngAfterContentInit() {
|
|
1730
1978
|
this.reconfigure();
|
|
1731
1979
|
}
|
|
@@ -1803,6 +2051,11 @@ __decorate([
|
|
|
1803
2051
|
HostBinding('attr.role'),
|
|
1804
2052
|
__metadata("design:type", String)
|
|
1805
2053
|
], SplitterComponent.prototype, "ariaRole", void 0);
|
|
2054
|
+
__decorate([
|
|
2055
|
+
ViewChildren(SplitterBarComponent),
|
|
2056
|
+
__metadata("design:type", QueryList),
|
|
2057
|
+
__metadata("design:paramtypes", [QueryList])
|
|
2058
|
+
], SplitterComponent.prototype, "splitbars", null);
|
|
1806
2059
|
__decorate([
|
|
1807
2060
|
ContentChildren(SplitterPaneComponent),
|
|
1808
2061
|
__metadata("design:type", QueryList)
|
|
@@ -1835,10 +2088,11 @@ SplitterComponent = __decorate([
|
|
|
1835
2088
|
</ng-container>
|
|
1836
2089
|
`
|
|
1837
2090
|
}),
|
|
1838
|
-
__param(
|
|
2091
|
+
__param(4, Optional()), __param(4, Host()), __param(4, Inject(SplitterPaneComponent)),
|
|
1839
2092
|
__metadata("design:paramtypes", [ElementRef,
|
|
1840
2093
|
SplitterService,
|
|
1841
2094
|
LocalizationService,
|
|
2095
|
+
Renderer2,
|
|
1842
2096
|
SplitterPaneComponent])
|
|
1843
2097
|
], SplitterComponent);
|
|
1844
2098
|
|
|
@@ -7326,242 +7580,6 @@ PanelBarModule = __decorate([
|
|
|
7326
7580
|
})
|
|
7327
7581
|
], PanelBarModule);
|
|
7328
7582
|
|
|
7329
|
-
const stopPropagation = ({ originalEvent: event }) => {
|
|
7330
|
-
event.stopPropagation();
|
|
7331
|
-
event.preventDefault();
|
|
7332
|
-
};
|
|
7333
|
-
const preventOnDblClick = release => mouseDown => of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
7334
|
-
const classFromObject = classes => Object.keys(classes).filter(c => classes[c]).join(' ');
|
|
7335
|
-
const createMoveStream = (draggable) => mouseDown => draggable.kendoDrag
|
|
7336
|
-
.pipe(takeUntil(draggable.kendoRelease), map(({ pageX, pageY }) => ({
|
|
7337
|
-
originalX: mouseDown.pageX,
|
|
7338
|
-
originalY: mouseDown.pageY,
|
|
7339
|
-
pageX,
|
|
7340
|
-
pageY
|
|
7341
|
-
})));
|
|
7342
|
-
/**
|
|
7343
|
-
* @hidden
|
|
7344
|
-
*/
|
|
7345
|
-
let SplitterBarComponent = class SplitterBarComponent {
|
|
7346
|
-
constructor(draggable, splitter, localization) {
|
|
7347
|
-
this.draggable = draggable;
|
|
7348
|
-
this.splitter = splitter;
|
|
7349
|
-
this.localization = localization;
|
|
7350
|
-
this.orientation = 'horizontal';
|
|
7351
|
-
this.index = 0;
|
|
7352
|
-
this.ariaRole = 'separator';
|
|
7353
|
-
this.focused = false;
|
|
7354
|
-
this.subscriptions = new Subscription();
|
|
7355
|
-
}
|
|
7356
|
-
get direction() {
|
|
7357
|
-
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
7358
|
-
}
|
|
7359
|
-
get tabIndex() {
|
|
7360
|
-
return this.splitter.isStatic(this.index) ? -1 : 0;
|
|
7361
|
-
}
|
|
7362
|
-
get hostClasses() {
|
|
7363
|
-
const isHorizontal = this.orientation === 'horizontal';
|
|
7364
|
-
const isDraggable = this.splitter.isDraggable(this.index);
|
|
7365
|
-
const isStatic = this.splitter.isStatic(this.index);
|
|
7366
|
-
return classFromObject({
|
|
7367
|
-
'k-state-focused': this.focused,
|
|
7368
|
-
'k-splitbar': true,
|
|
7369
|
-
'k-splitbar-horizontal': isHorizontal,
|
|
7370
|
-
'k-splitbar-vertical': !isHorizontal,
|
|
7371
|
-
'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
|
|
7372
|
-
'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
|
|
7373
|
-
'k-splitbar-static-horizontal': isHorizontal && isStatic,
|
|
7374
|
-
'k-splitbar-static-vertical': !isHorizontal && isStatic,
|
|
7375
|
-
'k-touch-action-none': isDraggable
|
|
7376
|
-
});
|
|
7377
|
-
}
|
|
7378
|
-
get order() {
|
|
7379
|
-
return 2 * this.index + 1;
|
|
7380
|
-
}
|
|
7381
|
-
collapseAny() {
|
|
7382
|
-
if (this.expandLast) {
|
|
7383
|
-
this.toggleNext();
|
|
7384
|
-
}
|
|
7385
|
-
else {
|
|
7386
|
-
this.tryToggleNearest();
|
|
7387
|
-
}
|
|
7388
|
-
}
|
|
7389
|
-
onFocusIn() {
|
|
7390
|
-
this.focused = true;
|
|
7391
|
-
}
|
|
7392
|
-
onFocusOut() {
|
|
7393
|
-
this.focused = false;
|
|
7394
|
-
}
|
|
7395
|
-
onKeyDown(event) {
|
|
7396
|
-
const keyCode = event && event.keyCode;
|
|
7397
|
-
const isHorizontal = this.orientation === 'horizontal';
|
|
7398
|
-
const resize = delta => {
|
|
7399
|
-
event.preventDefault();
|
|
7400
|
-
const state$$1 = this.splitter.dragState(this.index);
|
|
7401
|
-
this.splitter.setSize(state$$1, delta);
|
|
7402
|
-
};
|
|
7403
|
-
if (keyCode === Keys.Enter) {
|
|
7404
|
-
event.preventDefault();
|
|
7405
|
-
this.collapseAny();
|
|
7406
|
-
}
|
|
7407
|
-
else if (isHorizontal && keyCode === Keys.ArrowLeft) {
|
|
7408
|
-
resize(-10);
|
|
7409
|
-
}
|
|
7410
|
-
else if (isHorizontal && keyCode === Keys.ArrowRight) {
|
|
7411
|
-
resize(10);
|
|
7412
|
-
}
|
|
7413
|
-
else if (!isHorizontal && keyCode === Keys.ArrowUp) {
|
|
7414
|
-
resize(-10);
|
|
7415
|
-
}
|
|
7416
|
-
else if (!isHorizontal && keyCode === Keys.ArrowDown) {
|
|
7417
|
-
resize(10);
|
|
7418
|
-
}
|
|
7419
|
-
}
|
|
7420
|
-
get expandLast() {
|
|
7421
|
-
const panes = this.splitter.panes;
|
|
7422
|
-
return panes.length === 2 && panes[1].collapsed;
|
|
7423
|
-
}
|
|
7424
|
-
ngOnInit() {
|
|
7425
|
-
let state$$1;
|
|
7426
|
-
const listener = this.draggable.kendoPress.pipe(tap(stopPropagation), filter(() => this.splitter.isDraggable(this.index)), tap(() => state$$1 = this.splitter.dragState(this.index)), tap(() => this.splitter.toggleContentOverlay(this.index, true)), switchMap(preventOnDblClick(this.draggable.kendoRelease)), switchMap(createMoveStream(this.draggable))).subscribe(({ pageX, pageY, originalX, originalY }) => {
|
|
7427
|
-
let delta;
|
|
7428
|
-
if (this.orientation === 'vertical') {
|
|
7429
|
-
delta = pageY - originalY;
|
|
7430
|
-
}
|
|
7431
|
-
else if (this.direction === 'rtl') {
|
|
7432
|
-
delta = originalX - pageX;
|
|
7433
|
-
}
|
|
7434
|
-
else {
|
|
7435
|
-
delta = pageX - originalX;
|
|
7436
|
-
}
|
|
7437
|
-
this.splitter.setSize(state$$1, delta);
|
|
7438
|
-
});
|
|
7439
|
-
this.subscriptions.add(listener);
|
|
7440
|
-
this.subscriptions.add(this.draggable.kendoRelease.subscribe(() => this.splitter.toggleContentOverlay(this.index, false)));
|
|
7441
|
-
}
|
|
7442
|
-
ngOnDestroy() {
|
|
7443
|
-
if (this.subscriptions) {
|
|
7444
|
-
this.subscriptions.unsubscribe();
|
|
7445
|
-
}
|
|
7446
|
-
}
|
|
7447
|
-
togglePrevious() {
|
|
7448
|
-
this.splitter.tryToggle(this.index);
|
|
7449
|
-
}
|
|
7450
|
-
toggleNext() {
|
|
7451
|
-
this.splitter.tryToggle(this.index + 1);
|
|
7452
|
-
}
|
|
7453
|
-
previousArrowClass() {
|
|
7454
|
-
const pane = this.splitter.pane(this.index);
|
|
7455
|
-
const nextPane = this.splitter.pane(this.index + 1);
|
|
7456
|
-
const isCollapsible = pane.collapsible;
|
|
7457
|
-
const isCollapsed = pane.collapsed;
|
|
7458
|
-
const isHorizontal = this.orientation === 'horizontal';
|
|
7459
|
-
return classFromObject({
|
|
7460
|
-
'k-icon': true,
|
|
7461
|
-
'k-hidden': !isCollapsible || nextPane.isHidden,
|
|
7462
|
-
'k-collapse-prev': isCollapsible,
|
|
7463
|
-
'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
|
|
7464
|
-
'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
|
|
7465
|
-
'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
|
|
7466
|
-
'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
|
|
7467
|
-
});
|
|
7468
|
-
}
|
|
7469
|
-
nextArrowClass() {
|
|
7470
|
-
const pane = this.splitter.pane(this.index + 1);
|
|
7471
|
-
const prevPane = this.splitter.pane(this.index);
|
|
7472
|
-
const isCollapsible = pane.collapsible;
|
|
7473
|
-
const isCollapsed = pane.collapsed;
|
|
7474
|
-
const isHorizontal = this.orientation === 'horizontal';
|
|
7475
|
-
return classFromObject({
|
|
7476
|
-
'k-icon': true,
|
|
7477
|
-
'k-hidden': !isCollapsible || prevPane.isHidden,
|
|
7478
|
-
'k-collapse-next': isCollapsible,
|
|
7479
|
-
'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
|
|
7480
|
-
'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
|
|
7481
|
-
'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
|
|
7482
|
-
'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
|
|
7483
|
-
});
|
|
7484
|
-
}
|
|
7485
|
-
tryToggleNearest() {
|
|
7486
|
-
const prev = this.index;
|
|
7487
|
-
const next = this.index + 1;
|
|
7488
|
-
if (!this.splitter.tryToggle(prev)) {
|
|
7489
|
-
this.splitter.tryToggle(next);
|
|
7490
|
-
}
|
|
7491
|
-
}
|
|
7492
|
-
};
|
|
7493
|
-
__decorate([
|
|
7494
|
-
Input(),
|
|
7495
|
-
HostBinding('attr.aria-orientation'),
|
|
7496
|
-
__metadata("design:type", String)
|
|
7497
|
-
], SplitterBarComponent.prototype, "orientation", void 0);
|
|
7498
|
-
__decorate([
|
|
7499
|
-
Input(),
|
|
7500
|
-
__metadata("design:type", Number)
|
|
7501
|
-
], SplitterBarComponent.prototype, "index", void 0);
|
|
7502
|
-
__decorate([
|
|
7503
|
-
HostBinding('attr.role'),
|
|
7504
|
-
__metadata("design:type", String)
|
|
7505
|
-
], SplitterBarComponent.prototype, "ariaRole", void 0);
|
|
7506
|
-
__decorate([
|
|
7507
|
-
HostBinding('class.k-state-focused'),
|
|
7508
|
-
__metadata("design:type", Boolean)
|
|
7509
|
-
], SplitterBarComponent.prototype, "focused", void 0);
|
|
7510
|
-
__decorate([
|
|
7511
|
-
HostBinding('attr.tabindex'),
|
|
7512
|
-
__metadata("design:type", Number),
|
|
7513
|
-
__metadata("design:paramtypes", [])
|
|
7514
|
-
], SplitterBarComponent.prototype, "tabIndex", null);
|
|
7515
|
-
__decorate([
|
|
7516
|
-
HostBinding('class'),
|
|
7517
|
-
__metadata("design:type", String),
|
|
7518
|
-
__metadata("design:paramtypes", [])
|
|
7519
|
-
], SplitterBarComponent.prototype, "hostClasses", null);
|
|
7520
|
-
__decorate([
|
|
7521
|
-
HostBinding('style.-ms-flex-order'),
|
|
7522
|
-
HostBinding('style.order'),
|
|
7523
|
-
__metadata("design:type", Number),
|
|
7524
|
-
__metadata("design:paramtypes", [])
|
|
7525
|
-
], SplitterBarComponent.prototype, "order", null);
|
|
7526
|
-
__decorate([
|
|
7527
|
-
HostListener('dblclick'),
|
|
7528
|
-
__metadata("design:type", Function),
|
|
7529
|
-
__metadata("design:paramtypes", []),
|
|
7530
|
-
__metadata("design:returntype", void 0)
|
|
7531
|
-
], SplitterBarComponent.prototype, "collapseAny", null);
|
|
7532
|
-
__decorate([
|
|
7533
|
-
HostListener('focusin'),
|
|
7534
|
-
__metadata("design:type", Function),
|
|
7535
|
-
__metadata("design:paramtypes", []),
|
|
7536
|
-
__metadata("design:returntype", void 0)
|
|
7537
|
-
], SplitterBarComponent.prototype, "onFocusIn", null);
|
|
7538
|
-
__decorate([
|
|
7539
|
-
HostListener('focusout'),
|
|
7540
|
-
__metadata("design:type", Function),
|
|
7541
|
-
__metadata("design:paramtypes", []),
|
|
7542
|
-
__metadata("design:returntype", void 0)
|
|
7543
|
-
], SplitterBarComponent.prototype, "onFocusOut", null);
|
|
7544
|
-
__decorate([
|
|
7545
|
-
HostListener('keydown', ['$event']),
|
|
7546
|
-
__metadata("design:type", Function),
|
|
7547
|
-
__metadata("design:paramtypes", [Object]),
|
|
7548
|
-
__metadata("design:returntype", void 0)
|
|
7549
|
-
], SplitterBarComponent.prototype, "onKeyDown", null);
|
|
7550
|
-
SplitterBarComponent = __decorate([
|
|
7551
|
-
Component({
|
|
7552
|
-
selector: 'kendo-splitter-bar',
|
|
7553
|
-
template: `
|
|
7554
|
-
<div [class]="previousArrowClass()" (click)="togglePrevious()"></div>
|
|
7555
|
-
<div class="k-resize-handle"></div>
|
|
7556
|
-
<div [class]="nextArrowClass()" (click)="toggleNext()"></div>
|
|
7557
|
-
`
|
|
7558
|
-
}),
|
|
7559
|
-
__param(0, Host()),
|
|
7560
|
-
__metadata("design:paramtypes", [DraggableDirective,
|
|
7561
|
-
SplitterService,
|
|
7562
|
-
LocalizationService])
|
|
7563
|
-
], SplitterBarComponent);
|
|
7564
|
-
|
|
7565
7583
|
const exportedModules$5 = [
|
|
7566
7584
|
SplitterComponent,
|
|
7567
7585
|
SplitterPaneComponent
|