@progress/kendo-angular-layout 6.4.1 → 6.5.0-dev.202202091626
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/common/util.js +4 -0
- package/dist/es/expansionpanel/expansionpanel.component.js +1 -0
- package/dist/es/gridlayout.module.js +31 -0
- package/dist/es/layout.module.js +5 -1
- package/dist/es/layouts/grid-layout.component.js +150 -0
- package/dist/es/layouts/gridlayout-item.component.js +52 -0
- package/dist/es/layouts/models/gridlayout-gap-settings.js +4 -0
- package/dist/es/layouts/models/gridlayout-row-col-size.js +4 -0
- package/dist/es/layouts/models/layout-align-settings.js +4 -0
- package/dist/es/layouts/models/layout-horizontal-align.js +4 -0
- package/dist/es/layouts/models/layout-vertical-align.js +4 -0
- package/dist/es/layouts/models.js +4 -0
- package/dist/es/layouts/stack-layout.component.js +171 -0
- package/dist/es/layouts/util.js +87 -0
- package/dist/es/main.js +7 -0
- 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/es/stacklayout.module.js +29 -0
- package/dist/es2015/common/orientation.d.ts +1 -1
- package/dist/es2015/common/util.d.ts +4 -0
- package/dist/es2015/common/util.js +4 -0
- package/dist/es2015/expansionpanel/expansionpanel.component.js +1 -0
- package/dist/es2015/gridlayout.module.d.ts +10 -0
- package/dist/es2015/gridlayout.module.js +30 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/layout.module.js +5 -1
- package/dist/es2015/layouts/grid-layout.component.d.ts +47 -0
- package/dist/es2015/layouts/grid-layout.component.js +139 -0
- package/dist/es2015/layouts/gridlayout-item.component.d.ts +33 -0
- package/dist/es2015/layouts/gridlayout-item.component.js +53 -0
- package/dist/es2015/layouts/models/gridlayout-gap-settings.d.ts +17 -0
- package/dist/es2015/layouts/models/gridlayout-gap-settings.js +4 -0
- package/dist/es2015/layouts/models/gridlayout-row-col-size.d.ts +22 -0
- package/dist/es2015/layouts/models/gridlayout-row-col-size.js +4 -0
- package/dist/es2015/layouts/models/layout-align-settings.d.ts +18 -0
- package/dist/es2015/layouts/models/layout-align-settings.js +4 -0
- package/dist/es2015/layouts/models/layout-horizontal-align.d.ts +8 -0
- package/dist/es2015/layouts/models/layout-horizontal-align.js +4 -0
- package/dist/es2015/layouts/models/layout-vertical-align.d.ts +8 -0
- package/dist/es2015/layouts/models/layout-vertical-align.js +4 -0
- package/dist/es2015/layouts/models.d.ts +10 -0
- package/dist/es2015/layouts/models.js +4 -0
- package/dist/es2015/layouts/stack-layout.component.d.ts +47 -0
- package/dist/es2015/layouts/stack-layout.component.js +152 -0
- package/dist/es2015/layouts/util.d.ts +38 -0
- package/dist/es2015/layouts/util.js +87 -0
- package/dist/es2015/main.d.ts +7 -0
- package/dist/es2015/main.js +7 -0
- 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/es2015/stacklayout.module.d.ts +10 -0
- package/dist/es2015/stacklayout.module.js +28 -0
- package/dist/fesm2015/index.js +707 -243
- package/dist/fesm5/index.js +878 -379
- package/dist/npm/common/util.js +4 -0
- package/dist/npm/expansionpanel/expansionpanel.component.js +1 -0
- package/dist/npm/gridlayout.module.js +33 -0
- package/dist/npm/layout.module.js +5 -1
- package/dist/npm/layouts/grid-layout.component.js +152 -0
- package/dist/npm/layouts/gridlayout-item.component.js +54 -0
- package/dist/npm/layouts/models/gridlayout-gap-settings.js +6 -0
- package/dist/npm/layouts/models/gridlayout-row-col-size.js +6 -0
- package/dist/npm/layouts/models/layout-align-settings.js +6 -0
- package/dist/npm/layouts/models/layout-horizontal-align.js +6 -0
- package/dist/npm/layouts/models/layout-vertical-align.js +6 -0
- package/dist/npm/layouts/models.js +6 -0
- package/dist/npm/layouts/stack-layout.component.js +173 -0
- package/dist/npm/layouts/util.js +89 -0
- package/dist/npm/main.js +12 -0
- 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/npm/stacklayout.module.js +31 -0
- package/dist/systemjs/kendo-angular-layout.js +1 -1
- package/package.json +10 -8
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, isChanged } 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: 1644423873,
|
|
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
|
};
|
|
@@ -219,6 +219,10 @@ const getStylingClasses = (componentType, stylingOption, previousValue, newValue
|
|
|
219
219
|
* @hidden
|
|
220
220
|
*/
|
|
221
221
|
const mapShapeToRounded = (shape) => SHAPE_TO_ROUNDED[shape] || null;
|
|
222
|
+
/**
|
|
223
|
+
* @hidden
|
|
224
|
+
*/
|
|
225
|
+
const isNumber = (value) => typeof value === 'number' && isFinite(value);
|
|
222
226
|
|
|
223
227
|
const focusableRegex = /^(?:a|input|select|option|textarea|button|object)$/i;
|
|
224
228
|
const toClassList = (classNames) => String(classNames).trim().split(' ');
|
|
@@ -1657,6 +1661,244 @@ SplitterService = __decorate([
|
|
|
1657
1661
|
__metadata("design:paramtypes", [NgZone])
|
|
1658
1662
|
], SplitterService);
|
|
1659
1663
|
|
|
1664
|
+
const stopPropagation = ({ originalEvent: event }) => {
|
|
1665
|
+
event.stopPropagation();
|
|
1666
|
+
event.preventDefault();
|
|
1667
|
+
};
|
|
1668
|
+
const preventOnDblClick = release => mouseDown => of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
1669
|
+
const classFromObject = classes => Object.keys(classes).filter(c => classes[c]).join(' ');
|
|
1670
|
+
const createMoveStream = (draggable) => mouseDown => draggable.kendoDrag
|
|
1671
|
+
.pipe(takeUntil(draggable.kendoRelease), map(({ pageX, pageY }) => ({
|
|
1672
|
+
originalX: mouseDown.pageX,
|
|
1673
|
+
originalY: mouseDown.pageY,
|
|
1674
|
+
pageX,
|
|
1675
|
+
pageY
|
|
1676
|
+
})));
|
|
1677
|
+
/**
|
|
1678
|
+
* @hidden
|
|
1679
|
+
*/
|
|
1680
|
+
let SplitterBarComponent = class SplitterBarComponent {
|
|
1681
|
+
constructor(draggable, element, splitter, localization) {
|
|
1682
|
+
this.draggable = draggable;
|
|
1683
|
+
this.element = element;
|
|
1684
|
+
this.splitter = splitter;
|
|
1685
|
+
this.localization = localization;
|
|
1686
|
+
this.orientation = 'horizontal';
|
|
1687
|
+
this.index = 0;
|
|
1688
|
+
this.ariaRole = 'separator';
|
|
1689
|
+
this.focused = false;
|
|
1690
|
+
this.subscriptions = new Subscription();
|
|
1691
|
+
}
|
|
1692
|
+
get direction() {
|
|
1693
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
1694
|
+
}
|
|
1695
|
+
get tabIndex() {
|
|
1696
|
+
return this.splitter.isStatic(this.index) ? -1 : 0;
|
|
1697
|
+
}
|
|
1698
|
+
get hostClasses() {
|
|
1699
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1700
|
+
const isDraggable = this.splitter.isDraggable(this.index);
|
|
1701
|
+
const isStatic = this.splitter.isStatic(this.index);
|
|
1702
|
+
return classFromObject({
|
|
1703
|
+
'k-state-focused': this.focused,
|
|
1704
|
+
'k-splitbar': true,
|
|
1705
|
+
'k-splitbar-horizontal': isHorizontal,
|
|
1706
|
+
'k-splitbar-vertical': !isHorizontal,
|
|
1707
|
+
'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
|
|
1708
|
+
'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
|
|
1709
|
+
'k-splitbar-static-horizontal': isHorizontal && isStatic,
|
|
1710
|
+
'k-splitbar-static-vertical': !isHorizontal && isStatic,
|
|
1711
|
+
'k-touch-action-none': isDraggable
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
get order() {
|
|
1715
|
+
return 2 * this.index + 1;
|
|
1716
|
+
}
|
|
1717
|
+
collapseAny() {
|
|
1718
|
+
if (this.expandLast) {
|
|
1719
|
+
this.toggleNext();
|
|
1720
|
+
}
|
|
1721
|
+
else {
|
|
1722
|
+
this.tryToggleNearest();
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
onFocusIn() {
|
|
1726
|
+
this.focused = true;
|
|
1727
|
+
}
|
|
1728
|
+
onFocusOut() {
|
|
1729
|
+
this.focused = false;
|
|
1730
|
+
}
|
|
1731
|
+
onKeyDown(event) {
|
|
1732
|
+
const keyCode = event && event.keyCode;
|
|
1733
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1734
|
+
const resize = delta => {
|
|
1735
|
+
event.preventDefault();
|
|
1736
|
+
const state$$1 = this.splitter.dragState(this.index);
|
|
1737
|
+
this.splitter.setSize(state$$1, delta);
|
|
1738
|
+
};
|
|
1739
|
+
if (keyCode === Keys.Enter) {
|
|
1740
|
+
event.preventDefault();
|
|
1741
|
+
this.collapseAny();
|
|
1742
|
+
}
|
|
1743
|
+
else if (isHorizontal && keyCode === Keys.ArrowLeft) {
|
|
1744
|
+
resize(-10);
|
|
1745
|
+
}
|
|
1746
|
+
else if (isHorizontal && keyCode === Keys.ArrowRight) {
|
|
1747
|
+
resize(10);
|
|
1748
|
+
}
|
|
1749
|
+
else if (!isHorizontal && keyCode === Keys.ArrowUp) {
|
|
1750
|
+
resize(-10);
|
|
1751
|
+
}
|
|
1752
|
+
else if (!isHorizontal && keyCode === Keys.ArrowDown) {
|
|
1753
|
+
resize(10);
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
get expandLast() {
|
|
1757
|
+
const panes = this.splitter.panes;
|
|
1758
|
+
return panes.length === 2 && panes[1].collapsed;
|
|
1759
|
+
}
|
|
1760
|
+
ngOnInit() {
|
|
1761
|
+
let state$$1;
|
|
1762
|
+
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 }) => {
|
|
1763
|
+
let delta;
|
|
1764
|
+
if (this.orientation === 'vertical') {
|
|
1765
|
+
delta = pageY - originalY;
|
|
1766
|
+
}
|
|
1767
|
+
else if (this.direction === 'rtl') {
|
|
1768
|
+
delta = originalX - pageX;
|
|
1769
|
+
}
|
|
1770
|
+
else {
|
|
1771
|
+
delta = pageX - originalX;
|
|
1772
|
+
}
|
|
1773
|
+
this.splitter.setSize(state$$1, delta);
|
|
1774
|
+
});
|
|
1775
|
+
this.subscriptions.add(listener);
|
|
1776
|
+
this.subscriptions.add(this.draggable.kendoRelease.subscribe(() => this.splitter.toggleContentOverlay(this.index, false)));
|
|
1777
|
+
}
|
|
1778
|
+
ngOnDestroy() {
|
|
1779
|
+
if (this.subscriptions) {
|
|
1780
|
+
this.subscriptions.unsubscribe();
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
togglePrevious() {
|
|
1784
|
+
this.splitter.tryToggle(this.index);
|
|
1785
|
+
}
|
|
1786
|
+
toggleNext() {
|
|
1787
|
+
this.splitter.tryToggle(this.index + 1);
|
|
1788
|
+
}
|
|
1789
|
+
previousArrowClass() {
|
|
1790
|
+
const pane = this.splitter.pane(this.index);
|
|
1791
|
+
const nextPane = this.splitter.pane(this.index + 1);
|
|
1792
|
+
const isCollapsible = pane.collapsible;
|
|
1793
|
+
const isCollapsed = pane.collapsed;
|
|
1794
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1795
|
+
return classFromObject({
|
|
1796
|
+
'k-icon': true,
|
|
1797
|
+
'k-hidden': !isCollapsible || nextPane.isHidden,
|
|
1798
|
+
'k-collapse-prev': isCollapsible,
|
|
1799
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
|
|
1800
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
|
|
1801
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1802
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
nextArrowClass() {
|
|
1806
|
+
const pane = this.splitter.pane(this.index + 1);
|
|
1807
|
+
const prevPane = this.splitter.pane(this.index);
|
|
1808
|
+
const isCollapsible = pane.collapsible;
|
|
1809
|
+
const isCollapsed = pane.collapsed;
|
|
1810
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
1811
|
+
return classFromObject({
|
|
1812
|
+
'k-icon': true,
|
|
1813
|
+
'k-hidden': !isCollapsible || prevPane.isHidden,
|
|
1814
|
+
'k-collapse-next': isCollapsible,
|
|
1815
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
|
|
1816
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
|
|
1817
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1818
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
tryToggleNearest() {
|
|
1822
|
+
const prev = this.index;
|
|
1823
|
+
const next = this.index + 1;
|
|
1824
|
+
if (!this.splitter.tryToggle(prev)) {
|
|
1825
|
+
this.splitter.tryToggle(next);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
__decorate([
|
|
1830
|
+
Input(),
|
|
1831
|
+
HostBinding('attr.aria-orientation'),
|
|
1832
|
+
__metadata("design:type", String)
|
|
1833
|
+
], SplitterBarComponent.prototype, "orientation", void 0);
|
|
1834
|
+
__decorate([
|
|
1835
|
+
Input(),
|
|
1836
|
+
__metadata("design:type", Number)
|
|
1837
|
+
], SplitterBarComponent.prototype, "index", void 0);
|
|
1838
|
+
__decorate([
|
|
1839
|
+
HostBinding('attr.role'),
|
|
1840
|
+
__metadata("design:type", String)
|
|
1841
|
+
], SplitterBarComponent.prototype, "ariaRole", void 0);
|
|
1842
|
+
__decorate([
|
|
1843
|
+
HostBinding('class.k-state-focused'),
|
|
1844
|
+
__metadata("design:type", Boolean)
|
|
1845
|
+
], SplitterBarComponent.prototype, "focused", void 0);
|
|
1846
|
+
__decorate([
|
|
1847
|
+
HostBinding('attr.tabindex'),
|
|
1848
|
+
__metadata("design:type", Number),
|
|
1849
|
+
__metadata("design:paramtypes", [])
|
|
1850
|
+
], SplitterBarComponent.prototype, "tabIndex", null);
|
|
1851
|
+
__decorate([
|
|
1852
|
+
HostBinding('class'),
|
|
1853
|
+
__metadata("design:type", String),
|
|
1854
|
+
__metadata("design:paramtypes", [])
|
|
1855
|
+
], SplitterBarComponent.prototype, "hostClasses", null);
|
|
1856
|
+
__decorate([
|
|
1857
|
+
HostBinding('style.-ms-flex-order'),
|
|
1858
|
+
HostBinding('style.order'),
|
|
1859
|
+
__metadata("design:type", Number),
|
|
1860
|
+
__metadata("design:paramtypes", [])
|
|
1861
|
+
], SplitterBarComponent.prototype, "order", null);
|
|
1862
|
+
__decorate([
|
|
1863
|
+
HostListener('dblclick'),
|
|
1864
|
+
__metadata("design:type", Function),
|
|
1865
|
+
__metadata("design:paramtypes", []),
|
|
1866
|
+
__metadata("design:returntype", void 0)
|
|
1867
|
+
], SplitterBarComponent.prototype, "collapseAny", null);
|
|
1868
|
+
__decorate([
|
|
1869
|
+
HostListener('focusin'),
|
|
1870
|
+
__metadata("design:type", Function),
|
|
1871
|
+
__metadata("design:paramtypes", []),
|
|
1872
|
+
__metadata("design:returntype", void 0)
|
|
1873
|
+
], SplitterBarComponent.prototype, "onFocusIn", null);
|
|
1874
|
+
__decorate([
|
|
1875
|
+
HostListener('focusout'),
|
|
1876
|
+
__metadata("design:type", Function),
|
|
1877
|
+
__metadata("design:paramtypes", []),
|
|
1878
|
+
__metadata("design:returntype", void 0)
|
|
1879
|
+
], SplitterBarComponent.prototype, "onFocusOut", null);
|
|
1880
|
+
__decorate([
|
|
1881
|
+
HostListener('keydown', ['$event']),
|
|
1882
|
+
__metadata("design:type", Function),
|
|
1883
|
+
__metadata("design:paramtypes", [Object]),
|
|
1884
|
+
__metadata("design:returntype", void 0)
|
|
1885
|
+
], SplitterBarComponent.prototype, "onKeyDown", null);
|
|
1886
|
+
SplitterBarComponent = __decorate([
|
|
1887
|
+
Component({
|
|
1888
|
+
selector: 'kendo-splitter-bar',
|
|
1889
|
+
template: `
|
|
1890
|
+
<div [class]="previousArrowClass()" (click)="togglePrevious()"></div>
|
|
1891
|
+
<div class="k-resize-handle"></div>
|
|
1892
|
+
<div [class]="nextArrowClass()" (click)="toggleNext()"></div>
|
|
1893
|
+
`
|
|
1894
|
+
}),
|
|
1895
|
+
__param(0, Host()),
|
|
1896
|
+
__metadata("design:paramtypes", [DraggableDirective,
|
|
1897
|
+
ElementRef,
|
|
1898
|
+
SplitterService,
|
|
1899
|
+
LocalizationService])
|
|
1900
|
+
], SplitterBarComponent);
|
|
1901
|
+
|
|
1660
1902
|
/**
|
|
1661
1903
|
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
1662
1904
|
*
|
|
@@ -1693,10 +1935,11 @@ SplitterService = __decorate([
|
|
|
1693
1935
|
* ```
|
|
1694
1936
|
*/
|
|
1695
1937
|
let SplitterComponent = class SplitterComponent {
|
|
1696
|
-
constructor(element, splitterService, localization, enclosingPane) {
|
|
1938
|
+
constructor(element, splitterService, localization, renderer, enclosingPane) {
|
|
1697
1939
|
this.element = element;
|
|
1698
1940
|
this.splitterService = splitterService;
|
|
1699
1941
|
this.localization = localization;
|
|
1942
|
+
this.renderer = renderer;
|
|
1700
1943
|
this.enclosingPane = enclosingPane;
|
|
1701
1944
|
/**
|
|
1702
1945
|
* Specifies the orientation of the panes within the Splitter.
|
|
@@ -1726,6 +1969,15 @@ let SplitterComponent = class SplitterComponent {
|
|
|
1726
1969
|
get dir() {
|
|
1727
1970
|
return this.direction;
|
|
1728
1971
|
}
|
|
1972
|
+
set splitbars(splitbars) {
|
|
1973
|
+
if (!isPresent(splitbars) || !isPresent(this.panes)) {
|
|
1974
|
+
return;
|
|
1975
|
+
}
|
|
1976
|
+
const components = [...this.panes.toArray(), ...splitbars.toArray()]
|
|
1977
|
+
.sort((a, b) => a.order - b.order);
|
|
1978
|
+
const elements = components.map(component => component.element.nativeElement);
|
|
1979
|
+
elements.forEach(element => this.renderer.appendChild(this.element.nativeElement, element));
|
|
1980
|
+
}
|
|
1729
1981
|
ngAfterContentInit() {
|
|
1730
1982
|
this.reconfigure();
|
|
1731
1983
|
}
|
|
@@ -1803,6 +2055,11 @@ __decorate([
|
|
|
1803
2055
|
HostBinding('attr.role'),
|
|
1804
2056
|
__metadata("design:type", String)
|
|
1805
2057
|
], SplitterComponent.prototype, "ariaRole", void 0);
|
|
2058
|
+
__decorate([
|
|
2059
|
+
ViewChildren(SplitterBarComponent),
|
|
2060
|
+
__metadata("design:type", QueryList),
|
|
2061
|
+
__metadata("design:paramtypes", [QueryList])
|
|
2062
|
+
], SplitterComponent.prototype, "splitbars", null);
|
|
1806
2063
|
__decorate([
|
|
1807
2064
|
ContentChildren(SplitterPaneComponent),
|
|
1808
2065
|
__metadata("design:type", QueryList)
|
|
@@ -1835,10 +2092,11 @@ SplitterComponent = __decorate([
|
|
|
1835
2092
|
</ng-container>
|
|
1836
2093
|
`
|
|
1837
2094
|
}),
|
|
1838
|
-
__param(
|
|
2095
|
+
__param(4, Optional()), __param(4, Host()), __param(4, Inject(SplitterPaneComponent)),
|
|
1839
2096
|
__metadata("design:paramtypes", [ElementRef,
|
|
1840
2097
|
SplitterService,
|
|
1841
2098
|
LocalizationService,
|
|
2099
|
+
Renderer2,
|
|
1842
2100
|
SplitterPaneComponent])
|
|
1843
2101
|
], SplitterComponent);
|
|
1844
2102
|
|
|
@@ -5500,6 +5758,7 @@ let ExpansionPanelComponent = class ExpansionPanelComponent {
|
|
|
5500
5758
|
}
|
|
5501
5759
|
}
|
|
5502
5760
|
ngOnInit() {
|
|
5761
|
+
this.renderer.removeAttribute(this.hostElement.nativeElement, 'title');
|
|
5503
5762
|
this.subscriptions = this.localizationService.changes.subscribe(({ rtl }) => { this.direction = rtl ? 'rtl' : 'ltr'; });
|
|
5504
5763
|
}
|
|
5505
5764
|
ngAfterViewInit() {
|
|
@@ -7326,242 +7585,6 @@ PanelBarModule = __decorate([
|
|
|
7326
7585
|
})
|
|
7327
7586
|
], PanelBarModule);
|
|
7328
7587
|
|
|
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
7588
|
const exportedModules$5 = [
|
|
7566
7589
|
SplitterComponent,
|
|
7567
7590
|
SplitterPaneComponent
|
|
@@ -8250,6 +8273,445 @@ TileLayoutModule = __decorate([
|
|
|
8250
8273
|
})
|
|
8251
8274
|
], TileLayoutModule);
|
|
8252
8275
|
|
|
8276
|
+
/**
|
|
8277
|
+
* @hidden
|
|
8278
|
+
*/
|
|
8279
|
+
const VERTICAL_SUFFIX = {
|
|
8280
|
+
top: 'start',
|
|
8281
|
+
middle: 'center',
|
|
8282
|
+
bottom: 'end',
|
|
8283
|
+
stretch: 'stretch'
|
|
8284
|
+
};
|
|
8285
|
+
/**
|
|
8286
|
+
* @hidden
|
|
8287
|
+
*/
|
|
8288
|
+
const JUSTIFY_PREFIX = `k-justify-content`;
|
|
8289
|
+
/**
|
|
8290
|
+
* @hidden
|
|
8291
|
+
*/
|
|
8292
|
+
const GRID_JUSTIFY_PREFIX = `k-justify-items`;
|
|
8293
|
+
/**
|
|
8294
|
+
* @hidden
|
|
8295
|
+
*/
|
|
8296
|
+
const ALIGN_PREFIX = `k-align-items`;
|
|
8297
|
+
/**
|
|
8298
|
+
* @hidden
|
|
8299
|
+
*/
|
|
8300
|
+
const normalizeGap = (gap) => {
|
|
8301
|
+
if (typeof gap === 'number' || typeof gap === 'string') {
|
|
8302
|
+
return { cols: gap, rows: gap };
|
|
8303
|
+
}
|
|
8304
|
+
else {
|
|
8305
|
+
let parsedGap = {};
|
|
8306
|
+
parsedGap.rows = gap.rows ? gap.rows : 0;
|
|
8307
|
+
parsedGap.cols = gap.cols ? gap.cols : 0;
|
|
8308
|
+
return parsedGap;
|
|
8309
|
+
}
|
|
8310
|
+
};
|
|
8311
|
+
/**
|
|
8312
|
+
* @hidden
|
|
8313
|
+
*/
|
|
8314
|
+
const generateGapStyle = (gap) => {
|
|
8315
|
+
if (gap.rows === gap.cols) {
|
|
8316
|
+
return typeof gap.rows === 'number' ? `${gap.rows}px` : gap.rows;
|
|
8317
|
+
}
|
|
8318
|
+
else {
|
|
8319
|
+
let rowStyle = `${typeof gap.rows === 'number' ? gap.rows + 'px' : gap.rows}`;
|
|
8320
|
+
let colStyle = `${typeof gap.cols === 'number' ? gap.cols + 'px' : gap.cols}`;
|
|
8321
|
+
return `${rowStyle} ${colStyle}`;
|
|
8322
|
+
}
|
|
8323
|
+
};
|
|
8324
|
+
/**
|
|
8325
|
+
* @hidden
|
|
8326
|
+
*/
|
|
8327
|
+
const generateGridStyle = (items, itemType) => {
|
|
8328
|
+
let styling = [];
|
|
8329
|
+
items.forEach((item) => {
|
|
8330
|
+
if (typeof item === 'number') {
|
|
8331
|
+
styling.push(`${item}px`);
|
|
8332
|
+
}
|
|
8333
|
+
else if (typeof item === 'string') {
|
|
8334
|
+
styling.push(item);
|
|
8335
|
+
}
|
|
8336
|
+
else {
|
|
8337
|
+
if (itemType === 'rows') {
|
|
8338
|
+
const rowHeight = item.height;
|
|
8339
|
+
if (rowHeight) {
|
|
8340
|
+
styling.push(typeof rowHeight === 'number' ? `${rowHeight}px` : rowHeight);
|
|
8341
|
+
}
|
|
8342
|
+
else {
|
|
8343
|
+
styling.push('0px');
|
|
8344
|
+
}
|
|
8345
|
+
}
|
|
8346
|
+
else {
|
|
8347
|
+
const colWidth = item.width;
|
|
8348
|
+
if (colWidth) {
|
|
8349
|
+
styling.push(typeof colWidth === 'number' ? `${colWidth}px` : colWidth);
|
|
8350
|
+
}
|
|
8351
|
+
else {
|
|
8352
|
+
styling.push('0px');
|
|
8353
|
+
}
|
|
8354
|
+
}
|
|
8355
|
+
}
|
|
8356
|
+
});
|
|
8357
|
+
return styling;
|
|
8358
|
+
};
|
|
8359
|
+
|
|
8360
|
+
/**
|
|
8361
|
+
* Represents the [Kendo UI StackLayout component for Angular]({% slug overview_stacklayout %}).
|
|
8362
|
+
*/
|
|
8363
|
+
let StackLayoutComponent = class StackLayoutComponent {
|
|
8364
|
+
constructor(renderer, element, localization) {
|
|
8365
|
+
this.renderer = renderer;
|
|
8366
|
+
this.element = element;
|
|
8367
|
+
this.localization = localization;
|
|
8368
|
+
this.hostClass = true;
|
|
8369
|
+
/**
|
|
8370
|
+
* Specifies the gap between the inner StackLayout elements. The default value is `0`
|
|
8371
|
+
* ([see example]({% slug layout_stacklayout %}#toc-gaps)).
|
|
8372
|
+
*/
|
|
8373
|
+
this.gap = 0;
|
|
8374
|
+
/**
|
|
8375
|
+
* Specifies the orientation of the StackLayout
|
|
8376
|
+
* ([see example]({% slug layout_stacklayout %}#toc-orientation)).
|
|
8377
|
+
*
|
|
8378
|
+
* The possible values are:
|
|
8379
|
+
* (Default) `horizontal`
|
|
8380
|
+
* `vertical`
|
|
8381
|
+
*/
|
|
8382
|
+
this.orientation = 'horizontal';
|
|
8383
|
+
this._align = {
|
|
8384
|
+
horizontal: 'stretch',
|
|
8385
|
+
vertical: 'stretch'
|
|
8386
|
+
};
|
|
8387
|
+
validatePackage(packageMetadata);
|
|
8388
|
+
}
|
|
8389
|
+
get horizontalClass() {
|
|
8390
|
+
return this.orientation === 'horizontal';
|
|
8391
|
+
}
|
|
8392
|
+
get verticalClass() {
|
|
8393
|
+
return this.orientation === 'vertical';
|
|
8394
|
+
}
|
|
8395
|
+
get dir() {
|
|
8396
|
+
return this.direction;
|
|
8397
|
+
}
|
|
8398
|
+
/**
|
|
8399
|
+
* Specifies the horizontal and vertical alignment of the inner StackLayout elements
|
|
8400
|
+
* ([see example]({% slug layout_stacklayout %}#toc-alignment)).
|
|
8401
|
+
*/
|
|
8402
|
+
set align(align) {
|
|
8403
|
+
this._align = Object.assign({}, this._align, align);
|
|
8404
|
+
this.handleAlignClasses();
|
|
8405
|
+
}
|
|
8406
|
+
get align() {
|
|
8407
|
+
return this._align;
|
|
8408
|
+
}
|
|
8409
|
+
ngAfterViewInit() {
|
|
8410
|
+
this.handleAlignClasses();
|
|
8411
|
+
this.setGap();
|
|
8412
|
+
}
|
|
8413
|
+
ngOnChanges(changes) {
|
|
8414
|
+
if (isChanged('gap', changes)) {
|
|
8415
|
+
this.setGap();
|
|
8416
|
+
}
|
|
8417
|
+
if (isChanged('orientation', changes)) {
|
|
8418
|
+
this.handleAlignClasses();
|
|
8419
|
+
}
|
|
8420
|
+
}
|
|
8421
|
+
handleAlignClasses() {
|
|
8422
|
+
const elem = this.element.nativeElement;
|
|
8423
|
+
if (isPresent(this.justifyClass)) {
|
|
8424
|
+
this.renderer.removeClass(elem, this.justifyClass);
|
|
8425
|
+
}
|
|
8426
|
+
if (isPresent(this.alignClass)) {
|
|
8427
|
+
this.renderer.removeClass(elem, this.alignClass);
|
|
8428
|
+
}
|
|
8429
|
+
if (this.orientation === 'horizontal') {
|
|
8430
|
+
this.justifyClass = `${JUSTIFY_PREFIX}-${this.align.horizontal}`;
|
|
8431
|
+
this.alignClass = `${ALIGN_PREFIX}-${VERTICAL_SUFFIX[this.align.vertical]}`;
|
|
8432
|
+
}
|
|
8433
|
+
else {
|
|
8434
|
+
this.justifyClass = `${JUSTIFY_PREFIX}-${VERTICAL_SUFFIX[this.align.vertical]}`;
|
|
8435
|
+
this.alignClass = `${ALIGN_PREFIX}-${this.align.horizontal}`;
|
|
8436
|
+
}
|
|
8437
|
+
this.renderer.addClass(elem, this.justifyClass);
|
|
8438
|
+
this.renderer.addClass(elem, this.alignClass);
|
|
8439
|
+
}
|
|
8440
|
+
setGap() {
|
|
8441
|
+
const parsedGap = isNumber(this.gap) ? `${this.gap}px` : this.gap;
|
|
8442
|
+
this.renderer.setStyle(this.element.nativeElement, 'gap', parsedGap);
|
|
8443
|
+
}
|
|
8444
|
+
get direction() {
|
|
8445
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
8446
|
+
}
|
|
8447
|
+
};
|
|
8448
|
+
__decorate([
|
|
8449
|
+
HostBinding('class.k-stack-layout'),
|
|
8450
|
+
__metadata("design:type", Boolean)
|
|
8451
|
+
], StackLayoutComponent.prototype, "hostClass", void 0);
|
|
8452
|
+
__decorate([
|
|
8453
|
+
HostBinding('class.k-hstack'),
|
|
8454
|
+
__metadata("design:type", Boolean),
|
|
8455
|
+
__metadata("design:paramtypes", [])
|
|
8456
|
+
], StackLayoutComponent.prototype, "horizontalClass", null);
|
|
8457
|
+
__decorate([
|
|
8458
|
+
HostBinding('class.k-vstack'),
|
|
8459
|
+
__metadata("design:type", Boolean),
|
|
8460
|
+
__metadata("design:paramtypes", [])
|
|
8461
|
+
], StackLayoutComponent.prototype, "verticalClass", null);
|
|
8462
|
+
__decorate([
|
|
8463
|
+
HostBinding('attr.dir'),
|
|
8464
|
+
__metadata("design:type", String),
|
|
8465
|
+
__metadata("design:paramtypes", [])
|
|
8466
|
+
], StackLayoutComponent.prototype, "dir", null);
|
|
8467
|
+
__decorate([
|
|
8468
|
+
Input(),
|
|
8469
|
+
__metadata("design:type", Object),
|
|
8470
|
+
__metadata("design:paramtypes", [Object])
|
|
8471
|
+
], StackLayoutComponent.prototype, "align", null);
|
|
8472
|
+
__decorate([
|
|
8473
|
+
Input(),
|
|
8474
|
+
__metadata("design:type", Object)
|
|
8475
|
+
], StackLayoutComponent.prototype, "gap", void 0);
|
|
8476
|
+
__decorate([
|
|
8477
|
+
Input(),
|
|
8478
|
+
__metadata("design:type", String)
|
|
8479
|
+
], StackLayoutComponent.prototype, "orientation", void 0);
|
|
8480
|
+
StackLayoutComponent = __decorate([
|
|
8481
|
+
Component({
|
|
8482
|
+
exportAs: 'kendoStackLayout',
|
|
8483
|
+
selector: 'kendo-stacklayout',
|
|
8484
|
+
providers: [
|
|
8485
|
+
LocalizationService,
|
|
8486
|
+
{
|
|
8487
|
+
provide: L10N_PREFIX,
|
|
8488
|
+
useValue: 'kendo.stacklayout'
|
|
8489
|
+
}
|
|
8490
|
+
],
|
|
8491
|
+
template: `
|
|
8492
|
+
<ng-content></ng-content>
|
|
8493
|
+
`
|
|
8494
|
+
}),
|
|
8495
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
8496
|
+
ElementRef,
|
|
8497
|
+
LocalizationService])
|
|
8498
|
+
], StackLayoutComponent);
|
|
8499
|
+
|
|
8500
|
+
const exportedModules$9 = [
|
|
8501
|
+
StackLayoutComponent
|
|
8502
|
+
];
|
|
8503
|
+
const declarations$9 = [
|
|
8504
|
+
...exportedModules$9
|
|
8505
|
+
];
|
|
8506
|
+
/**
|
|
8507
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
8508
|
+
* definition for the StackLayout component.
|
|
8509
|
+
*/
|
|
8510
|
+
let StackLayoutModule = class StackLayoutModule {
|
|
8511
|
+
};
|
|
8512
|
+
StackLayoutModule = __decorate([
|
|
8513
|
+
NgModule({
|
|
8514
|
+
declarations: [declarations$9],
|
|
8515
|
+
exports: [exportedModules$9],
|
|
8516
|
+
imports: [CommonModule]
|
|
8517
|
+
})
|
|
8518
|
+
], StackLayoutModule);
|
|
8519
|
+
|
|
8520
|
+
/**
|
|
8521
|
+
* Represents the [Kendo UI GridLayout component for Angular]({% slug overview_gridlayout %}).
|
|
8522
|
+
*/
|
|
8523
|
+
let GridLayoutComponent = class GridLayoutComponent {
|
|
8524
|
+
constructor(renderer, element, localization) {
|
|
8525
|
+
this.renderer = renderer;
|
|
8526
|
+
this.element = element;
|
|
8527
|
+
this.localization = localization;
|
|
8528
|
+
this.hostClass = true;
|
|
8529
|
+
/**
|
|
8530
|
+
* Specifies the gaps between the elements. The default value is `0`
|
|
8531
|
+
* ([see example]({% slug layout_gridlayout %}#toc-gaps)).
|
|
8532
|
+
*/
|
|
8533
|
+
this.gap = 0;
|
|
8534
|
+
this._align = {
|
|
8535
|
+
horizontal: 'stretch',
|
|
8536
|
+
vertical: 'stretch'
|
|
8537
|
+
};
|
|
8538
|
+
validatePackage(packageMetadata);
|
|
8539
|
+
}
|
|
8540
|
+
get dir() {
|
|
8541
|
+
return this.direction;
|
|
8542
|
+
}
|
|
8543
|
+
/**
|
|
8544
|
+
* Specifies the horizontal and vertical alignment of the inner GridLayout elements
|
|
8545
|
+
* ([see example]({% slug layout_gridlayout %}#toc-alignment)).
|
|
8546
|
+
*/
|
|
8547
|
+
set align(align) {
|
|
8548
|
+
this._align = Object.assign({}, this._align, align);
|
|
8549
|
+
this.handleAlignClasses();
|
|
8550
|
+
}
|
|
8551
|
+
get align() {
|
|
8552
|
+
return this._align;
|
|
8553
|
+
}
|
|
8554
|
+
ngAfterViewInit() {
|
|
8555
|
+
this.handleAlignClasses();
|
|
8556
|
+
this.handleGridTemplateStyling('rows');
|
|
8557
|
+
this.handleGridTemplateStyling('cols');
|
|
8558
|
+
this.setGap();
|
|
8559
|
+
}
|
|
8560
|
+
ngOnChanges(changes) {
|
|
8561
|
+
if (isChanged('gap', changes)) {
|
|
8562
|
+
this.setGap();
|
|
8563
|
+
}
|
|
8564
|
+
if (isChanged('rows', changes)) {
|
|
8565
|
+
this.handleGridTemplateStyling('rows');
|
|
8566
|
+
}
|
|
8567
|
+
if (isChanged('cols', changes)) {
|
|
8568
|
+
this.handleGridTemplateStyling('cols');
|
|
8569
|
+
}
|
|
8570
|
+
}
|
|
8571
|
+
handleAlignClasses() {
|
|
8572
|
+
const elem = this.element.nativeElement;
|
|
8573
|
+
if (isPresent(this.justifyClass)) {
|
|
8574
|
+
this.renderer.removeClass(elem, this.justifyClass);
|
|
8575
|
+
}
|
|
8576
|
+
if (isPresent(this.alignClass)) {
|
|
8577
|
+
this.renderer.removeClass(elem, this.alignClass);
|
|
8578
|
+
}
|
|
8579
|
+
this.justifyClass = `${GRID_JUSTIFY_PREFIX}-${this.align.horizontal}`;
|
|
8580
|
+
this.alignClass = `${ALIGN_PREFIX}-${VERTICAL_SUFFIX[this.align.vertical]}`;
|
|
8581
|
+
this.renderer.addClass(elem, this.justifyClass);
|
|
8582
|
+
this.renderer.addClass(elem, this.alignClass);
|
|
8583
|
+
}
|
|
8584
|
+
setGap() {
|
|
8585
|
+
let parsedGap = normalizeGap(this.gap);
|
|
8586
|
+
let gapStyle = generateGapStyle(parsedGap);
|
|
8587
|
+
this.renderer.setStyle(this.element.nativeElement, 'gap', gapStyle);
|
|
8588
|
+
}
|
|
8589
|
+
handleGridTemplateStyling(type) {
|
|
8590
|
+
if (!isPresent(this[type])) {
|
|
8591
|
+
return;
|
|
8592
|
+
}
|
|
8593
|
+
const gridTemplateStyle = type === 'rows' ? 'grid-template-rows' : 'grid-template-columns';
|
|
8594
|
+
const gridStyle = generateGridStyle(this[type], type);
|
|
8595
|
+
this.renderer.setStyle(this.element.nativeElement, gridTemplateStyle, gridStyle.join(' '));
|
|
8596
|
+
}
|
|
8597
|
+
get direction() {
|
|
8598
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
8599
|
+
}
|
|
8600
|
+
};
|
|
8601
|
+
__decorate([
|
|
8602
|
+
HostBinding('class.k-grid-layout'),
|
|
8603
|
+
__metadata("design:type", Boolean)
|
|
8604
|
+
], GridLayoutComponent.prototype, "hostClass", void 0);
|
|
8605
|
+
__decorate([
|
|
8606
|
+
HostBinding('attr.dir'),
|
|
8607
|
+
__metadata("design:type", String),
|
|
8608
|
+
__metadata("design:paramtypes", [])
|
|
8609
|
+
], GridLayoutComponent.prototype, "dir", null);
|
|
8610
|
+
__decorate([
|
|
8611
|
+
Input(),
|
|
8612
|
+
__metadata("design:type", Array)
|
|
8613
|
+
], GridLayoutComponent.prototype, "rows", void 0);
|
|
8614
|
+
__decorate([
|
|
8615
|
+
Input(),
|
|
8616
|
+
__metadata("design:type", Array)
|
|
8617
|
+
], GridLayoutComponent.prototype, "cols", void 0);
|
|
8618
|
+
__decorate([
|
|
8619
|
+
Input(),
|
|
8620
|
+
__metadata("design:type", Object)
|
|
8621
|
+
], GridLayoutComponent.prototype, "gap", void 0);
|
|
8622
|
+
__decorate([
|
|
8623
|
+
Input(),
|
|
8624
|
+
__metadata("design:type", Object),
|
|
8625
|
+
__metadata("design:paramtypes", [Object])
|
|
8626
|
+
], GridLayoutComponent.prototype, "align", null);
|
|
8627
|
+
GridLayoutComponent = __decorate([
|
|
8628
|
+
Component({
|
|
8629
|
+
exportAs: 'kendoGridLayout',
|
|
8630
|
+
selector: 'kendo-gridlayout',
|
|
8631
|
+
providers: [
|
|
8632
|
+
LocalizationService,
|
|
8633
|
+
{
|
|
8634
|
+
provide: L10N_PREFIX,
|
|
8635
|
+
useValue: 'kendo.gridlayout'
|
|
8636
|
+
}
|
|
8637
|
+
],
|
|
8638
|
+
template: `
|
|
8639
|
+
<ng-content></ng-content>
|
|
8640
|
+
`
|
|
8641
|
+
}),
|
|
8642
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
8643
|
+
ElementRef,
|
|
8644
|
+
LocalizationService])
|
|
8645
|
+
], GridLayoutComponent);
|
|
8646
|
+
|
|
8647
|
+
let GridLayoutItemComponent = class GridLayoutItemComponent {
|
|
8648
|
+
constructor(renderer, element) {
|
|
8649
|
+
this.renderer = renderer;
|
|
8650
|
+
this.element = element;
|
|
8651
|
+
}
|
|
8652
|
+
ngOnInit() {
|
|
8653
|
+
this.setItemStyle();
|
|
8654
|
+
}
|
|
8655
|
+
ngOnChanges() {
|
|
8656
|
+
this.setItemStyle();
|
|
8657
|
+
}
|
|
8658
|
+
setItemStyle() {
|
|
8659
|
+
const row = this.row || 'auto';
|
|
8660
|
+
const col = this.col || 'auto';
|
|
8661
|
+
const rowSpan = this.rowSpan ? `span ${this.rowSpan}` : 'auto';
|
|
8662
|
+
const colSpan = this.colSpan ? `span ${this.colSpan}` : 'auto';
|
|
8663
|
+
const gridAreaStyle = `${row} / ${col} / ${rowSpan} / ${colSpan}`;
|
|
8664
|
+
this.renderer.setStyle(this.element.nativeElement, 'grid-area', gridAreaStyle);
|
|
8665
|
+
}
|
|
8666
|
+
};
|
|
8667
|
+
__decorate([
|
|
8668
|
+
Input(),
|
|
8669
|
+
__metadata("design:type", Number)
|
|
8670
|
+
], GridLayoutItemComponent.prototype, "row", void 0);
|
|
8671
|
+
__decorate([
|
|
8672
|
+
Input(),
|
|
8673
|
+
__metadata("design:type", Number)
|
|
8674
|
+
], GridLayoutItemComponent.prototype, "col", void 0);
|
|
8675
|
+
__decorate([
|
|
8676
|
+
Input(),
|
|
8677
|
+
__metadata("design:type", Number)
|
|
8678
|
+
], GridLayoutItemComponent.prototype, "rowSpan", void 0);
|
|
8679
|
+
__decorate([
|
|
8680
|
+
Input(),
|
|
8681
|
+
__metadata("design:type", Number)
|
|
8682
|
+
], GridLayoutItemComponent.prototype, "colSpan", void 0);
|
|
8683
|
+
GridLayoutItemComponent = __decorate([
|
|
8684
|
+
Component({
|
|
8685
|
+
selector: 'kendo-gridlayout-item',
|
|
8686
|
+
template: `
|
|
8687
|
+
<ng-content></ng-content>
|
|
8688
|
+
`
|
|
8689
|
+
}),
|
|
8690
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
8691
|
+
ElementRef])
|
|
8692
|
+
], GridLayoutItemComponent);
|
|
8693
|
+
|
|
8694
|
+
const exportedModules$a = [
|
|
8695
|
+
GridLayoutComponent,
|
|
8696
|
+
GridLayoutItemComponent
|
|
8697
|
+
];
|
|
8698
|
+
const declarations$a = [
|
|
8699
|
+
...exportedModules$a
|
|
8700
|
+
];
|
|
8701
|
+
/**
|
|
8702
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
8703
|
+
* definition for the GridLayout component.
|
|
8704
|
+
*/
|
|
8705
|
+
let GridLayoutModule = class GridLayoutModule {
|
|
8706
|
+
};
|
|
8707
|
+
GridLayoutModule = __decorate([
|
|
8708
|
+
NgModule({
|
|
8709
|
+
declarations: [declarations$a],
|
|
8710
|
+
exports: [exportedModules$a],
|
|
8711
|
+
imports: [CommonModule]
|
|
8712
|
+
})
|
|
8713
|
+
], GridLayoutModule);
|
|
8714
|
+
|
|
8253
8715
|
/**
|
|
8254
8716
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
8255
8717
|
* definition for the Layout components.
|
|
@@ -8294,7 +8756,9 @@ LayoutModule = __decorate([
|
|
|
8294
8756
|
SplitterModule,
|
|
8295
8757
|
StepperModule,
|
|
8296
8758
|
TabStripModule,
|
|
8297
|
-
TileLayoutModule
|
|
8759
|
+
TileLayoutModule,
|
|
8760
|
+
StackLayoutModule,
|
|
8761
|
+
GridLayoutModule
|
|
8298
8762
|
]
|
|
8299
8763
|
})
|
|
8300
8764
|
], LayoutModule);
|
|
@@ -8303,4 +8767,4 @@ LayoutModule = __decorate([
|
|
|
8303
8767
|
* Generated bundle index. Do not edit.
|
|
8304
8768
|
*/
|
|
8305
8769
|
|
|
8306
|
-
export { PreventableEvent$1 as PreventableEvent, DrawerService, DrawerItemComponent, DrawerListComponent, DRAWER_ITEM_INDEX, PanelBarService, SplitterBarComponent, SplitterService, StepperListComponent, StepperMessages, STEPPER_STEP_INDEX, StepperStepComponent, StepperService, TabStripMessages, TabComponent, TabStripScrollableButtonComponent, ScrollService, TabStripService, TileLayoutDraggingService, PreventableEvent$2 as PreventableEvent$1, TileLayoutResizeHandleDirective, PanelBarComponent, PanelBarItemComponent, PanelBarContentDirective, PanelBarItemTemplateDirective, PanelBarItemTitleDirective, PanelBarExpandMode, SplitterComponent, SplitterPaneComponent, TabStripComponent, TabStripTabComponent, TabContentDirective, TabTitleDirective, LocalizedTabStripMessagesDirective, TabStripCustomMessagesComponent, DrawerComponent, DrawerContainerComponent, DrawerContentComponent, DrawerSelectEvent, StepperComponent, StepperActivateEvent, StepperCustomMessagesComponent, LocalizedStepperMessagesDirective, AvatarComponent, CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CardActionsComponent, CardSeparatorDirective, CardTitleDirective, CardSubtitleDirective, CardMediaDirective, CardAction, ExpansionPanelComponent, ExpansionPanelTitleDirective, ExpansionPanelActionEvent, TileLayoutComponent, TileLayoutItemComponent, TileLayoutItemBodyComponent, TileLayoutItemHeaderComponent, TileLayoutReorderEvent, TileLayoutResizeEvent, AvatarModule, CardModule, DrawerModule, LayoutModule, PanelBarModule, SplitterModule, StepperModule, TabStripModule, ExpansionPanelModule, TileLayoutModule, TabCloseEvent, SelectEvent, DrawerTemplateDirective, DrawerItemTemplateDirective, DrawerHeaderTemplateDirective, DrawerFooterTemplateDirective, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperStepTemplateDirective };
|
|
8770
|
+
export { PreventableEvent$1 as PreventableEvent, DrawerService, DrawerItemComponent, DrawerListComponent, DRAWER_ITEM_INDEX, PanelBarService, SplitterBarComponent, SplitterService, StepperListComponent, StepperMessages, STEPPER_STEP_INDEX, StepperStepComponent, StepperService, TabStripMessages, TabComponent, TabStripScrollableButtonComponent, ScrollService, TabStripService, TileLayoutDraggingService, PreventableEvent$2 as PreventableEvent$1, TileLayoutResizeHandleDirective, PanelBarComponent, PanelBarItemComponent, PanelBarContentDirective, PanelBarItemTemplateDirective, PanelBarItemTitleDirective, PanelBarExpandMode, SplitterComponent, SplitterPaneComponent, TabStripComponent, TabStripTabComponent, TabContentDirective, TabTitleDirective, LocalizedTabStripMessagesDirective, TabStripCustomMessagesComponent, DrawerComponent, DrawerContainerComponent, DrawerContentComponent, DrawerSelectEvent, StepperComponent, StepperActivateEvent, StepperCustomMessagesComponent, LocalizedStepperMessagesDirective, AvatarComponent, CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CardActionsComponent, CardSeparatorDirective, CardTitleDirective, CardSubtitleDirective, CardMediaDirective, CardAction, ExpansionPanelComponent, ExpansionPanelTitleDirective, ExpansionPanelActionEvent, TileLayoutComponent, TileLayoutItemComponent, TileLayoutItemBodyComponent, TileLayoutItemHeaderComponent, TileLayoutReorderEvent, TileLayoutResizeEvent, AvatarModule, CardModule, DrawerModule, LayoutModule, PanelBarModule, SplitterModule, StepperModule, TabStripModule, ExpansionPanelModule, TileLayoutModule, StackLayoutModule, GridLayoutModule, StackLayoutComponent, GridLayoutComponent, GridLayoutItemComponent, TabCloseEvent, SelectEvent, DrawerTemplateDirective, DrawerItemTemplateDirective, DrawerHeaderTemplateDirective, DrawerFooterTemplateDirective, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperStepTemplateDirective };
|