@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/fesm5/index.js
CHANGED
|
@@ -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,
|
|
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 @@ var 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
|
};
|
|
@@ -226,6 +226,10 @@ var getStylingClasses = function (componentType, stylingOption, previousValue, n
|
|
|
226
226
|
* @hidden
|
|
227
227
|
*/
|
|
228
228
|
var mapShapeToRounded = function (shape) { return SHAPE_TO_ROUNDED[shape] || null; };
|
|
229
|
+
/**
|
|
230
|
+
* @hidden
|
|
231
|
+
*/
|
|
232
|
+
var isNumber = function (value) { return typeof value === 'number' && isFinite(value); };
|
|
229
233
|
|
|
230
234
|
var focusableRegex = /^(?:a|input|select|option|textarea|button|object)$/i;
|
|
231
235
|
var toClassList = function (classNames) { return String(classNames).trim().split(' '); };
|
|
@@ -1683,144 +1687,424 @@ var SplitterService = /** @class */ (function () {
|
|
|
1683
1687
|
return SplitterService;
|
|
1684
1688
|
}());
|
|
1685
1689
|
|
|
1690
|
+
var stopPropagation = function (_a) {
|
|
1691
|
+
var event = _a.originalEvent;
|
|
1692
|
+
event.stopPropagation();
|
|
1693
|
+
event.preventDefault();
|
|
1694
|
+
};
|
|
1695
|
+
var preventOnDblClick = function (release) { return function (mouseDown) {
|
|
1696
|
+
return of(mouseDown).pipe(delay(150), takeUntil(release));
|
|
1697
|
+
}; };
|
|
1698
|
+
var classFromObject = function (classes) { return Object.keys(classes).filter(function (c) { return classes[c]; }).join(' '); };
|
|
1699
|
+
var createMoveStream = function (draggable) { return function (mouseDown) {
|
|
1700
|
+
return draggable.kendoDrag
|
|
1701
|
+
.pipe(takeUntil(draggable.kendoRelease), map(function (_a) {
|
|
1702
|
+
var pageX = _a.pageX, pageY = _a.pageY;
|
|
1703
|
+
return ({
|
|
1704
|
+
originalX: mouseDown.pageX,
|
|
1705
|
+
originalY: mouseDown.pageY,
|
|
1706
|
+
pageX: pageX,
|
|
1707
|
+
pageY: pageY
|
|
1708
|
+
});
|
|
1709
|
+
}));
|
|
1710
|
+
}; };
|
|
1686
1711
|
/**
|
|
1687
|
-
*
|
|
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
|
-
* ```
|
|
1712
|
+
* @hidden
|
|
1720
1713
|
*/
|
|
1721
|
-
var
|
|
1722
|
-
function
|
|
1714
|
+
var SplitterBarComponent = /** @class */ (function () {
|
|
1715
|
+
function SplitterBarComponent(draggable, element, splitter, localization) {
|
|
1716
|
+
this.draggable = draggable;
|
|
1723
1717
|
this.element = element;
|
|
1724
|
-
this.
|
|
1718
|
+
this.splitter = splitter;
|
|
1725
1719
|
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
1720
|
this.orientation = 'horizontal';
|
|
1733
|
-
this.
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
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);
|
|
1721
|
+
this.index = 0;
|
|
1722
|
+
this.ariaRole = 'separator';
|
|
1723
|
+
this.focused = false;
|
|
1724
|
+
this.subscriptions = new Subscription();
|
|
1742
1725
|
}
|
|
1743
|
-
Object.defineProperty(
|
|
1726
|
+
Object.defineProperty(SplitterBarComponent.prototype, "direction", {
|
|
1744
1727
|
get: function () {
|
|
1745
|
-
return
|
|
1728
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
1746
1729
|
},
|
|
1747
1730
|
enumerable: true,
|
|
1748
1731
|
configurable: true
|
|
1749
1732
|
});
|
|
1750
|
-
Object.defineProperty(
|
|
1733
|
+
Object.defineProperty(SplitterBarComponent.prototype, "tabIndex", {
|
|
1751
1734
|
get: function () {
|
|
1752
|
-
return this.
|
|
1735
|
+
return this.splitter.isStatic(this.index) ? -1 : 0;
|
|
1753
1736
|
},
|
|
1754
1737
|
enumerable: true,
|
|
1755
1738
|
configurable: true
|
|
1756
1739
|
});
|
|
1757
|
-
Object.defineProperty(
|
|
1740
|
+
Object.defineProperty(SplitterBarComponent.prototype, "hostClasses", {
|
|
1758
1741
|
get: function () {
|
|
1759
|
-
|
|
1742
|
+
var isHorizontal = this.orientation === 'horizontal';
|
|
1743
|
+
var isDraggable = this.splitter.isDraggable(this.index);
|
|
1744
|
+
var isStatic = this.splitter.isStatic(this.index);
|
|
1745
|
+
return classFromObject({
|
|
1746
|
+
'k-state-focused': this.focused,
|
|
1747
|
+
'k-splitbar': true,
|
|
1748
|
+
'k-splitbar-horizontal': isHorizontal,
|
|
1749
|
+
'k-splitbar-vertical': !isHorizontal,
|
|
1750
|
+
'k-splitbar-draggable-horizontal': isHorizontal && isDraggable,
|
|
1751
|
+
'k-splitbar-draggable-vertical': !isHorizontal && isDraggable,
|
|
1752
|
+
'k-splitbar-static-horizontal': isHorizontal && isStatic,
|
|
1753
|
+
'k-splitbar-static-vertical': !isHorizontal && isStatic,
|
|
1754
|
+
'k-touch-action-none': isDraggable
|
|
1755
|
+
});
|
|
1760
1756
|
},
|
|
1761
1757
|
enumerable: true,
|
|
1762
1758
|
configurable: true
|
|
1763
1759
|
});
|
|
1764
|
-
Object.defineProperty(
|
|
1760
|
+
Object.defineProperty(SplitterBarComponent.prototype, "order", {
|
|
1765
1761
|
get: function () {
|
|
1766
|
-
return this.
|
|
1762
|
+
return 2 * this.index + 1;
|
|
1767
1763
|
},
|
|
1768
1764
|
enumerable: true,
|
|
1769
1765
|
configurable: true
|
|
1770
1766
|
});
|
|
1771
|
-
|
|
1772
|
-
this.
|
|
1773
|
-
|
|
1774
|
-
SplitterComponent.prototype.ngOnChanges = function (changes) {
|
|
1775
|
-
if (changes.orientation && !changes.orientation.isFirstChange()) {
|
|
1776
|
-
this.reconfigure();
|
|
1767
|
+
SplitterBarComponent.prototype.collapseAny = function () {
|
|
1768
|
+
if (this.expandLast) {
|
|
1769
|
+
this.toggleNext();
|
|
1777
1770
|
}
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
if (this.enclosingPane) {
|
|
1781
|
-
this.enclosingPane.containsSplitter = false;
|
|
1771
|
+
else {
|
|
1772
|
+
this.tryToggleNearest();
|
|
1782
1773
|
}
|
|
1783
|
-
this.unsubscribeChanges();
|
|
1784
1774
|
};
|
|
1785
|
-
|
|
1786
|
-
this.
|
|
1787
|
-
this.configure();
|
|
1788
|
-
this.paneChangesSubscription = this.panes.changes.subscribe(this.configure);
|
|
1775
|
+
SplitterBarComponent.prototype.onFocusIn = function () {
|
|
1776
|
+
this.focused = true;
|
|
1789
1777
|
};
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
this.paneChangesSubscription.unsubscribe();
|
|
1793
|
-
this.paneChangesSubscription = null;
|
|
1794
|
-
}
|
|
1778
|
+
SplitterBarComponent.prototype.onFocusOut = function () {
|
|
1779
|
+
this.focused = false;
|
|
1795
1780
|
};
|
|
1796
|
-
|
|
1781
|
+
SplitterBarComponent.prototype.onKeyDown = function (event) {
|
|
1797
1782
|
var _this = this;
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1783
|
+
var keyCode = event && event.keyCode;
|
|
1784
|
+
var isHorizontal = this.orientation === 'horizontal';
|
|
1785
|
+
var resize = function (delta) {
|
|
1786
|
+
event.preventDefault();
|
|
1787
|
+
var state$$1 = _this.splitter.dragState(_this.index);
|
|
1788
|
+
_this.splitter.setSize(state$$1, delta);
|
|
1789
|
+
};
|
|
1790
|
+
if (keyCode === Keys.Enter) {
|
|
1791
|
+
event.preventDefault();
|
|
1792
|
+
this.collapseAny();
|
|
1793
|
+
}
|
|
1794
|
+
else if (isHorizontal && keyCode === Keys.ArrowLeft) {
|
|
1795
|
+
resize(-10);
|
|
1796
|
+
}
|
|
1797
|
+
else if (isHorizontal && keyCode === Keys.ArrowRight) {
|
|
1798
|
+
resize(10);
|
|
1799
|
+
}
|
|
1800
|
+
else if (!isHorizontal && keyCode === Keys.ArrowUp) {
|
|
1801
|
+
resize(-10);
|
|
1802
|
+
}
|
|
1803
|
+
else if (!isHorizontal && keyCode === Keys.ArrowDown) {
|
|
1804
|
+
resize(10);
|
|
1805
|
+
}
|
|
1810
1806
|
};
|
|
1811
|
-
Object.defineProperty(
|
|
1807
|
+
Object.defineProperty(SplitterBarComponent.prototype, "expandLast", {
|
|
1812
1808
|
get: function () {
|
|
1813
|
-
|
|
1809
|
+
var panes = this.splitter.panes;
|
|
1810
|
+
return panes.length === 2 && panes[1].collapsed;
|
|
1814
1811
|
},
|
|
1815
1812
|
enumerable: true,
|
|
1816
1813
|
configurable: true
|
|
1817
1814
|
});
|
|
1815
|
+
SplitterBarComponent.prototype.ngOnInit = function () {
|
|
1816
|
+
var _this = this;
|
|
1817
|
+
var state$$1;
|
|
1818
|
+
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) {
|
|
1819
|
+
var pageX = _a.pageX, pageY = _a.pageY, originalX = _a.originalX, originalY = _a.originalY;
|
|
1820
|
+
var delta;
|
|
1821
|
+
if (_this.orientation === 'vertical') {
|
|
1822
|
+
delta = pageY - originalY;
|
|
1823
|
+
}
|
|
1824
|
+
else if (_this.direction === 'rtl') {
|
|
1825
|
+
delta = originalX - pageX;
|
|
1826
|
+
}
|
|
1827
|
+
else {
|
|
1828
|
+
delta = pageX - originalX;
|
|
1829
|
+
}
|
|
1830
|
+
_this.splitter.setSize(state$$1, delta);
|
|
1831
|
+
});
|
|
1832
|
+
this.subscriptions.add(listener);
|
|
1833
|
+
this.subscriptions.add(this.draggable.kendoRelease.subscribe(function () { return _this.splitter.toggleContentOverlay(_this.index, false); }));
|
|
1834
|
+
};
|
|
1835
|
+
SplitterBarComponent.prototype.ngOnDestroy = function () {
|
|
1836
|
+
if (this.subscriptions) {
|
|
1837
|
+
this.subscriptions.unsubscribe();
|
|
1838
|
+
}
|
|
1839
|
+
};
|
|
1840
|
+
SplitterBarComponent.prototype.togglePrevious = function () {
|
|
1841
|
+
this.splitter.tryToggle(this.index);
|
|
1842
|
+
};
|
|
1843
|
+
SplitterBarComponent.prototype.toggleNext = function () {
|
|
1844
|
+
this.splitter.tryToggle(this.index + 1);
|
|
1845
|
+
};
|
|
1846
|
+
SplitterBarComponent.prototype.previousArrowClass = function () {
|
|
1847
|
+
var pane = this.splitter.pane(this.index);
|
|
1848
|
+
var nextPane = this.splitter.pane(this.index + 1);
|
|
1849
|
+
var isCollapsible = pane.collapsible;
|
|
1850
|
+
var isCollapsed = pane.collapsed;
|
|
1851
|
+
var isHorizontal = this.orientation === 'horizontal';
|
|
1852
|
+
return classFromObject({
|
|
1853
|
+
'k-icon': true,
|
|
1854
|
+
'k-hidden': !isCollapsible || nextPane.isHidden,
|
|
1855
|
+
'k-collapse-prev': isCollapsible,
|
|
1856
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && !isCollapsed,
|
|
1857
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && isCollapsed,
|
|
1858
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1859
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && isCollapsed
|
|
1860
|
+
});
|
|
1861
|
+
};
|
|
1862
|
+
SplitterBarComponent.prototype.nextArrowClass = function () {
|
|
1863
|
+
var pane = this.splitter.pane(this.index + 1);
|
|
1864
|
+
var prevPane = this.splitter.pane(this.index);
|
|
1865
|
+
var isCollapsible = pane.collapsible;
|
|
1866
|
+
var isCollapsed = pane.collapsed;
|
|
1867
|
+
var isHorizontal = this.orientation === 'horizontal';
|
|
1868
|
+
return classFromObject({
|
|
1869
|
+
'k-icon': true,
|
|
1870
|
+
'k-hidden': !isCollapsible || prevPane.isHidden,
|
|
1871
|
+
'k-collapse-next': isCollapsible,
|
|
1872
|
+
'k-i-arrow-60-right': isCollapsible && isHorizontal && !isCollapsed,
|
|
1873
|
+
'k-i-arrow-60-left': isCollapsible && isHorizontal && isCollapsed,
|
|
1874
|
+
'k-i-arrow-60-down': isCollapsible && !isHorizontal && !isCollapsed,
|
|
1875
|
+
'k-i-arrow-60-up': isCollapsible && !isHorizontal && isCollapsed
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1878
|
+
SplitterBarComponent.prototype.tryToggleNearest = function () {
|
|
1879
|
+
var prev = this.index;
|
|
1880
|
+
var next = this.index + 1;
|
|
1881
|
+
if (!this.splitter.tryToggle(prev)) {
|
|
1882
|
+
this.splitter.tryToggle(next);
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1818
1885
|
__decorate([
|
|
1819
1886
|
Input(),
|
|
1887
|
+
HostBinding('attr.aria-orientation'),
|
|
1820
1888
|
__metadata("design:type", String)
|
|
1821
|
-
],
|
|
1889
|
+
], SplitterBarComponent.prototype, "orientation", void 0);
|
|
1822
1890
|
__decorate([
|
|
1823
|
-
|
|
1891
|
+
Input(),
|
|
1892
|
+
__metadata("design:type", Number)
|
|
1893
|
+
], SplitterBarComponent.prototype, "index", void 0);
|
|
1894
|
+
__decorate([
|
|
1895
|
+
HostBinding('attr.role'),
|
|
1896
|
+
__metadata("design:type", String)
|
|
1897
|
+
], SplitterBarComponent.prototype, "ariaRole", void 0);
|
|
1898
|
+
__decorate([
|
|
1899
|
+
HostBinding('class.k-state-focused'),
|
|
1900
|
+
__metadata("design:type", Boolean)
|
|
1901
|
+
], SplitterBarComponent.prototype, "focused", void 0);
|
|
1902
|
+
__decorate([
|
|
1903
|
+
HostBinding('attr.tabindex'),
|
|
1904
|
+
__metadata("design:type", Number),
|
|
1905
|
+
__metadata("design:paramtypes", [])
|
|
1906
|
+
], SplitterBarComponent.prototype, "tabIndex", null);
|
|
1907
|
+
__decorate([
|
|
1908
|
+
HostBinding('class'),
|
|
1909
|
+
__metadata("design:type", String),
|
|
1910
|
+
__metadata("design:paramtypes", [])
|
|
1911
|
+
], SplitterBarComponent.prototype, "hostClasses", null);
|
|
1912
|
+
__decorate([
|
|
1913
|
+
HostBinding('style.-ms-flex-order'),
|
|
1914
|
+
HostBinding('style.order'),
|
|
1915
|
+
__metadata("design:type", Number),
|
|
1916
|
+
__metadata("design:paramtypes", [])
|
|
1917
|
+
], SplitterBarComponent.prototype, "order", null);
|
|
1918
|
+
__decorate([
|
|
1919
|
+
HostListener('dblclick'),
|
|
1920
|
+
__metadata("design:type", Function),
|
|
1921
|
+
__metadata("design:paramtypes", []),
|
|
1922
|
+
__metadata("design:returntype", void 0)
|
|
1923
|
+
], SplitterBarComponent.prototype, "collapseAny", null);
|
|
1924
|
+
__decorate([
|
|
1925
|
+
HostListener('focusin'),
|
|
1926
|
+
__metadata("design:type", Function),
|
|
1927
|
+
__metadata("design:paramtypes", []),
|
|
1928
|
+
__metadata("design:returntype", void 0)
|
|
1929
|
+
], SplitterBarComponent.prototype, "onFocusIn", null);
|
|
1930
|
+
__decorate([
|
|
1931
|
+
HostListener('focusout'),
|
|
1932
|
+
__metadata("design:type", Function),
|
|
1933
|
+
__metadata("design:paramtypes", []),
|
|
1934
|
+
__metadata("design:returntype", void 0)
|
|
1935
|
+
], SplitterBarComponent.prototype, "onFocusOut", null);
|
|
1936
|
+
__decorate([
|
|
1937
|
+
HostListener('keydown', ['$event']),
|
|
1938
|
+
__metadata("design:type", Function),
|
|
1939
|
+
__metadata("design:paramtypes", [Object]),
|
|
1940
|
+
__metadata("design:returntype", void 0)
|
|
1941
|
+
], SplitterBarComponent.prototype, "onKeyDown", null);
|
|
1942
|
+
SplitterBarComponent = __decorate([
|
|
1943
|
+
Component({
|
|
1944
|
+
selector: 'kendo-splitter-bar',
|
|
1945
|
+
template: "\n <div [class]=\"previousArrowClass()\" (click)=\"togglePrevious()\"></div>\n <div class=\"k-resize-handle\"></div>\n <div [class]=\"nextArrowClass()\" (click)=\"toggleNext()\"></div>\n "
|
|
1946
|
+
}),
|
|
1947
|
+
__param(0, Host()),
|
|
1948
|
+
__metadata("design:paramtypes", [DraggableDirective,
|
|
1949
|
+
ElementRef,
|
|
1950
|
+
SplitterService,
|
|
1951
|
+
LocalizationService])
|
|
1952
|
+
], SplitterBarComponent);
|
|
1953
|
+
return SplitterBarComponent;
|
|
1954
|
+
}());
|
|
1955
|
+
|
|
1956
|
+
/**
|
|
1957
|
+
* Represents the [Kendo UI Splitter component for Angular]({% slug overview_splitter %}).
|
|
1958
|
+
*
|
|
1959
|
+
* ```ts-preview
|
|
1960
|
+
*
|
|
1961
|
+
* @Component({
|
|
1962
|
+
* selector: 'my-app',
|
|
1963
|
+
* template: `
|
|
1964
|
+
* <kendo-splitter style="height: 280px;">
|
|
1965
|
+
*
|
|
1966
|
+
* <kendo-splitter-pane [collapsible]="true" size="30%">
|
|
1967
|
+
* <h3>Inner splitter / left pane</h3>
|
|
1968
|
+
* <p>Resizable and collapsible.</p>
|
|
1969
|
+
* </kendo-splitter-pane>
|
|
1970
|
+
*
|
|
1971
|
+
* <kendo-splitter-pane>
|
|
1972
|
+
* <h3>Inner splitter / center pane</h3>
|
|
1973
|
+
* <p>Resizable only.</p>
|
|
1974
|
+
* </kendo-splitter-pane>
|
|
1975
|
+
*
|
|
1976
|
+
* <kendo-splitter-pane [collapsible]="true" size="30%">
|
|
1977
|
+
* <h3>Inner splitter / right pane</h3>
|
|
1978
|
+
* <p>Resizable and collapsible.</p>
|
|
1979
|
+
* </kendo-splitter-pane>
|
|
1980
|
+
*
|
|
1981
|
+
* </kendo-splitter>
|
|
1982
|
+
* `,
|
|
1983
|
+
* styles: [ `
|
|
1984
|
+
* h3 { font-size: 1.2em; }
|
|
1985
|
+
* h3, p { margin: 10px; padding: 0; }
|
|
1986
|
+
* ` ]
|
|
1987
|
+
* })
|
|
1988
|
+
* class AppComponent {}
|
|
1989
|
+
* ```
|
|
1990
|
+
*/
|
|
1991
|
+
var SplitterComponent = /** @class */ (function () {
|
|
1992
|
+
function SplitterComponent(element, splitterService, localization, renderer, enclosingPane) {
|
|
1993
|
+
this.element = element;
|
|
1994
|
+
this.splitterService = splitterService;
|
|
1995
|
+
this.localization = localization;
|
|
1996
|
+
this.renderer = renderer;
|
|
1997
|
+
this.enclosingPane = enclosingPane;
|
|
1998
|
+
/**
|
|
1999
|
+
* Specifies the orientation of the panes within the Splitter.
|
|
2000
|
+
* Panes in a horizontal Splitter are placed horizontally.
|
|
2001
|
+
* Panes in a vertical Splitter are placed vertically.
|
|
2002
|
+
*/
|
|
2003
|
+
this.orientation = 'horizontal';
|
|
2004
|
+
this.ariaRole = 'splitter';
|
|
2005
|
+
validatePackage(packageMetadata);
|
|
2006
|
+
if (enclosingPane) {
|
|
2007
|
+
enclosingPane.containsSplitter = true;
|
|
2008
|
+
}
|
|
2009
|
+
// the handler only runs in NgZone if there are bound handlers
|
|
2010
|
+
// this line merges both streams
|
|
2011
|
+
this.layoutChange = this.splitterService.layoutChange;
|
|
2012
|
+
this.configure = this.configure.bind(this);
|
|
2013
|
+
}
|
|
2014
|
+
Object.defineProperty(SplitterComponent.prototype, "hostClasses", {
|
|
2015
|
+
get: function () {
|
|
2016
|
+
return true;
|
|
2017
|
+
},
|
|
2018
|
+
enumerable: true,
|
|
2019
|
+
configurable: true
|
|
2020
|
+
});
|
|
2021
|
+
Object.defineProperty(SplitterComponent.prototype, "horizontalHostClasses", {
|
|
2022
|
+
get: function () {
|
|
2023
|
+
return this.orientation === 'horizontal';
|
|
2024
|
+
},
|
|
2025
|
+
enumerable: true,
|
|
2026
|
+
configurable: true
|
|
2027
|
+
});
|
|
2028
|
+
Object.defineProperty(SplitterComponent.prototype, "verticalHostClasses", {
|
|
2029
|
+
get: function () {
|
|
2030
|
+
return this.orientation === 'vertical';
|
|
2031
|
+
},
|
|
2032
|
+
enumerable: true,
|
|
2033
|
+
configurable: true
|
|
2034
|
+
});
|
|
2035
|
+
Object.defineProperty(SplitterComponent.prototype, "dir", {
|
|
2036
|
+
get: function () {
|
|
2037
|
+
return this.direction;
|
|
2038
|
+
},
|
|
2039
|
+
enumerable: true,
|
|
2040
|
+
configurable: true
|
|
2041
|
+
});
|
|
2042
|
+
Object.defineProperty(SplitterComponent.prototype, "splitbars", {
|
|
2043
|
+
set: function (splitbars) {
|
|
2044
|
+
var _this = this;
|
|
2045
|
+
if (!isPresent(splitbars) || !isPresent(this.panes)) {
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
var components = this.panes.toArray().concat(splitbars.toArray()).sort(function (a, b) { return a.order - b.order; });
|
|
2049
|
+
var elements = components.map(function (component) { return component.element.nativeElement; });
|
|
2050
|
+
elements.forEach(function (element) { return _this.renderer.appendChild(_this.element.nativeElement, element); });
|
|
2051
|
+
},
|
|
2052
|
+
enumerable: true,
|
|
2053
|
+
configurable: true
|
|
2054
|
+
});
|
|
2055
|
+
SplitterComponent.prototype.ngAfterContentInit = function () {
|
|
2056
|
+
this.reconfigure();
|
|
2057
|
+
};
|
|
2058
|
+
SplitterComponent.prototype.ngOnChanges = function (changes) {
|
|
2059
|
+
if (changes.orientation && !changes.orientation.isFirstChange()) {
|
|
2060
|
+
this.reconfigure();
|
|
2061
|
+
}
|
|
2062
|
+
};
|
|
2063
|
+
SplitterComponent.prototype.ngOnDestroy = function () {
|
|
2064
|
+
if (this.enclosingPane) {
|
|
2065
|
+
this.enclosingPane.containsSplitter = false;
|
|
2066
|
+
}
|
|
2067
|
+
this.unsubscribeChanges();
|
|
2068
|
+
};
|
|
2069
|
+
SplitterComponent.prototype.reconfigure = function () {
|
|
2070
|
+
this.unsubscribeChanges();
|
|
2071
|
+
this.configure();
|
|
2072
|
+
this.paneChangesSubscription = this.panes.changes.subscribe(this.configure);
|
|
2073
|
+
};
|
|
2074
|
+
SplitterComponent.prototype.unsubscribeChanges = function () {
|
|
2075
|
+
if (this.paneChangesSubscription) {
|
|
2076
|
+
this.paneChangesSubscription.unsubscribe();
|
|
2077
|
+
this.paneChangesSubscription = null;
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
2080
|
+
SplitterComponent.prototype.configure = function () {
|
|
2081
|
+
var _this = this;
|
|
2082
|
+
this.splitterService.configure({
|
|
2083
|
+
panes: this.panes.toArray(),
|
|
2084
|
+
orientation: this.orientation,
|
|
2085
|
+
containerSize: function () {
|
|
2086
|
+
if (_this.orientation === 'vertical') {
|
|
2087
|
+
return _this.element.nativeElement.clientHeight;
|
|
2088
|
+
}
|
|
2089
|
+
else {
|
|
2090
|
+
return _this.element.nativeElement.clientWidth;
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
};
|
|
2095
|
+
Object.defineProperty(SplitterComponent.prototype, "direction", {
|
|
2096
|
+
get: function () {
|
|
2097
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
2098
|
+
},
|
|
2099
|
+
enumerable: true,
|
|
2100
|
+
configurable: true
|
|
2101
|
+
});
|
|
2102
|
+
__decorate([
|
|
2103
|
+
Input(),
|
|
2104
|
+
__metadata("design:type", String)
|
|
2105
|
+
], SplitterComponent.prototype, "orientation", void 0);
|
|
2106
|
+
__decorate([
|
|
2107
|
+
Output(),
|
|
1824
2108
|
__metadata("design:type", EventEmitter)
|
|
1825
2109
|
], SplitterComponent.prototype, "layoutChange", void 0);
|
|
1826
2110
|
__decorate([
|
|
@@ -1849,6 +2133,11 @@ var SplitterComponent = /** @class */ (function () {
|
|
|
1849
2133
|
HostBinding('attr.role'),
|
|
1850
2134
|
__metadata("design:type", String)
|
|
1851
2135
|
], SplitterComponent.prototype, "ariaRole", void 0);
|
|
2136
|
+
__decorate([
|
|
2137
|
+
ViewChildren(SplitterBarComponent),
|
|
2138
|
+
__metadata("design:type", QueryList),
|
|
2139
|
+
__metadata("design:paramtypes", [QueryList])
|
|
2140
|
+
], SplitterComponent.prototype, "splitbars", null);
|
|
1852
2141
|
__decorate([
|
|
1853
2142
|
ContentChildren(SplitterPaneComponent),
|
|
1854
2143
|
__metadata("design:type", QueryList)
|
|
@@ -1867,10 +2156,11 @@ var SplitterComponent = /** @class */ (function () {
|
|
|
1867
2156
|
],
|
|
1868
2157
|
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
2158
|
}),
|
|
1870
|
-
__param(
|
|
2159
|
+
__param(4, Optional()), __param(4, Host()), __param(4, Inject(SplitterPaneComponent)),
|
|
1871
2160
|
__metadata("design:paramtypes", [ElementRef,
|
|
1872
2161
|
SplitterService,
|
|
1873
2162
|
LocalizationService,
|
|
2163
|
+
Renderer2,
|
|
1874
2164
|
SplitterPaneComponent])
|
|
1875
2165
|
], SplitterComponent);
|
|
1876
2166
|
return SplitterComponent;
|
|
@@ -5756,6 +6046,7 @@ var ExpansionPanelComponent = /** @class */ (function () {
|
|
|
5756
6046
|
};
|
|
5757
6047
|
ExpansionPanelComponent.prototype.ngOnInit = function () {
|
|
5758
6048
|
var _this = this;
|
|
6049
|
+
this.renderer.removeAttribute(this.hostElement.nativeElement, 'title');
|
|
5759
6050
|
this.subscriptions = this.localizationService.changes.subscribe(function (_a) {
|
|
5760
6051
|
var rtl = _a.rtl;
|
|
5761
6052
|
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -7633,284 +7924,20 @@ var PanelBarModule = /** @class */ (function () {
|
|
|
7633
7924
|
return PanelBarModule;
|
|
7634
7925
|
}());
|
|
7635
7926
|
|
|
7636
|
-
var
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
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
|
-
}; };
|
|
7927
|
+
var exportedModules$5 = [
|
|
7928
|
+
SplitterComponent,
|
|
7929
|
+
SplitterPaneComponent
|
|
7930
|
+
];
|
|
7931
|
+
var declarations$5 = [
|
|
7932
|
+
SplitterBarComponent
|
|
7933
|
+
].concat(exportedModules$5);
|
|
7657
7934
|
/**
|
|
7658
|
-
*
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
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
|
-
var exportedModules$5 = [
|
|
7901
|
-
SplitterComponent,
|
|
7902
|
-
SplitterPaneComponent
|
|
7903
|
-
];
|
|
7904
|
-
var declarations$5 = [
|
|
7905
|
-
SplitterBarComponent
|
|
7906
|
-
].concat(exportedModules$5);
|
|
7907
|
-
/**
|
|
7908
|
-
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7909
|
-
* definition for the Splitter component.
|
|
7910
|
-
*
|
|
7911
|
-
* The module registers:
|
|
7912
|
-
* - `SplitterComponent`—The `Splitter` component class.
|
|
7913
|
-
* - `SplitterPaneComponent`—The `SplitterPane` component class.
|
|
7935
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7936
|
+
* definition for the Splitter component.
|
|
7937
|
+
*
|
|
7938
|
+
* The module registers:
|
|
7939
|
+
* - `SplitterComponent`—The `Splitter` component class.
|
|
7940
|
+
* - `SplitterPaneComponent`—The `SplitterPane` component class.
|
|
7914
7941
|
*/
|
|
7915
7942
|
var SplitterModule = /** @class */ (function () {
|
|
7916
7943
|
function SplitterModule() {
|
|
@@ -8601,6 +8628,476 @@ var TileLayoutModule = /** @class */ (function () {
|
|
|
8601
8628
|
return TileLayoutModule;
|
|
8602
8629
|
}());
|
|
8603
8630
|
|
|
8631
|
+
/**
|
|
8632
|
+
* @hidden
|
|
8633
|
+
*/
|
|
8634
|
+
var VERTICAL_SUFFIX = {
|
|
8635
|
+
top: 'start',
|
|
8636
|
+
middle: 'center',
|
|
8637
|
+
bottom: 'end',
|
|
8638
|
+
stretch: 'stretch'
|
|
8639
|
+
};
|
|
8640
|
+
/**
|
|
8641
|
+
* @hidden
|
|
8642
|
+
*/
|
|
8643
|
+
var JUSTIFY_PREFIX = "k-justify-content";
|
|
8644
|
+
/**
|
|
8645
|
+
* @hidden
|
|
8646
|
+
*/
|
|
8647
|
+
var GRID_JUSTIFY_PREFIX = "k-justify-items";
|
|
8648
|
+
/**
|
|
8649
|
+
* @hidden
|
|
8650
|
+
*/
|
|
8651
|
+
var ALIGN_PREFIX = "k-align-items";
|
|
8652
|
+
/**
|
|
8653
|
+
* @hidden
|
|
8654
|
+
*/
|
|
8655
|
+
var normalizeGap = function (gap) {
|
|
8656
|
+
if (typeof gap === 'number' || typeof gap === 'string') {
|
|
8657
|
+
return { cols: gap, rows: gap };
|
|
8658
|
+
}
|
|
8659
|
+
else {
|
|
8660
|
+
var parsedGap = {};
|
|
8661
|
+
parsedGap.rows = gap.rows ? gap.rows : 0;
|
|
8662
|
+
parsedGap.cols = gap.cols ? gap.cols : 0;
|
|
8663
|
+
return parsedGap;
|
|
8664
|
+
}
|
|
8665
|
+
};
|
|
8666
|
+
/**
|
|
8667
|
+
* @hidden
|
|
8668
|
+
*/
|
|
8669
|
+
var generateGapStyle = function (gap) {
|
|
8670
|
+
if (gap.rows === gap.cols) {
|
|
8671
|
+
return typeof gap.rows === 'number' ? gap.rows + "px" : gap.rows;
|
|
8672
|
+
}
|
|
8673
|
+
else {
|
|
8674
|
+
var rowStyle = "" + (typeof gap.rows === 'number' ? gap.rows + 'px' : gap.rows);
|
|
8675
|
+
var colStyle = "" + (typeof gap.cols === 'number' ? gap.cols + 'px' : gap.cols);
|
|
8676
|
+
return rowStyle + " " + colStyle;
|
|
8677
|
+
}
|
|
8678
|
+
};
|
|
8679
|
+
/**
|
|
8680
|
+
* @hidden
|
|
8681
|
+
*/
|
|
8682
|
+
var generateGridStyle = function (items, itemType) {
|
|
8683
|
+
var styling = [];
|
|
8684
|
+
items.forEach(function (item) {
|
|
8685
|
+
if (typeof item === 'number') {
|
|
8686
|
+
styling.push(item + "px");
|
|
8687
|
+
}
|
|
8688
|
+
else if (typeof item === 'string') {
|
|
8689
|
+
styling.push(item);
|
|
8690
|
+
}
|
|
8691
|
+
else {
|
|
8692
|
+
if (itemType === 'rows') {
|
|
8693
|
+
var rowHeight = item.height;
|
|
8694
|
+
if (rowHeight) {
|
|
8695
|
+
styling.push(typeof rowHeight === 'number' ? rowHeight + "px" : rowHeight);
|
|
8696
|
+
}
|
|
8697
|
+
else {
|
|
8698
|
+
styling.push('0px');
|
|
8699
|
+
}
|
|
8700
|
+
}
|
|
8701
|
+
else {
|
|
8702
|
+
var colWidth = item.width;
|
|
8703
|
+
if (colWidth) {
|
|
8704
|
+
styling.push(typeof colWidth === 'number' ? colWidth + "px" : colWidth);
|
|
8705
|
+
}
|
|
8706
|
+
else {
|
|
8707
|
+
styling.push('0px');
|
|
8708
|
+
}
|
|
8709
|
+
}
|
|
8710
|
+
}
|
|
8711
|
+
});
|
|
8712
|
+
return styling;
|
|
8713
|
+
};
|
|
8714
|
+
|
|
8715
|
+
/**
|
|
8716
|
+
* Represents the [Kendo UI StackLayout component for Angular]({% slug overview_stacklayout %}).
|
|
8717
|
+
*/
|
|
8718
|
+
var StackLayoutComponent = /** @class */ (function () {
|
|
8719
|
+
function StackLayoutComponent(renderer, element, localization) {
|
|
8720
|
+
this.renderer = renderer;
|
|
8721
|
+
this.element = element;
|
|
8722
|
+
this.localization = localization;
|
|
8723
|
+
this.hostClass = true;
|
|
8724
|
+
/**
|
|
8725
|
+
* Specifies the gap between the inner StackLayout elements. The default value is `0`
|
|
8726
|
+
* ([see example]({% slug layout_stacklayout %}#toc-gaps)).
|
|
8727
|
+
*/
|
|
8728
|
+
this.gap = 0;
|
|
8729
|
+
/**
|
|
8730
|
+
* Specifies the orientation of the StackLayout
|
|
8731
|
+
* ([see example]({% slug layout_stacklayout %}#toc-orientation)).
|
|
8732
|
+
*
|
|
8733
|
+
* The possible values are:
|
|
8734
|
+
* (Default) `horizontal`
|
|
8735
|
+
* `vertical`
|
|
8736
|
+
*/
|
|
8737
|
+
this.orientation = 'horizontal';
|
|
8738
|
+
this._align = {
|
|
8739
|
+
horizontal: 'stretch',
|
|
8740
|
+
vertical: 'stretch'
|
|
8741
|
+
};
|
|
8742
|
+
validatePackage(packageMetadata);
|
|
8743
|
+
}
|
|
8744
|
+
Object.defineProperty(StackLayoutComponent.prototype, "horizontalClass", {
|
|
8745
|
+
get: function () {
|
|
8746
|
+
return this.orientation === 'horizontal';
|
|
8747
|
+
},
|
|
8748
|
+
enumerable: true,
|
|
8749
|
+
configurable: true
|
|
8750
|
+
});
|
|
8751
|
+
Object.defineProperty(StackLayoutComponent.prototype, "verticalClass", {
|
|
8752
|
+
get: function () {
|
|
8753
|
+
return this.orientation === 'vertical';
|
|
8754
|
+
},
|
|
8755
|
+
enumerable: true,
|
|
8756
|
+
configurable: true
|
|
8757
|
+
});
|
|
8758
|
+
Object.defineProperty(StackLayoutComponent.prototype, "dir", {
|
|
8759
|
+
get: function () {
|
|
8760
|
+
return this.direction;
|
|
8761
|
+
},
|
|
8762
|
+
enumerable: true,
|
|
8763
|
+
configurable: true
|
|
8764
|
+
});
|
|
8765
|
+
Object.defineProperty(StackLayoutComponent.prototype, "align", {
|
|
8766
|
+
get: function () {
|
|
8767
|
+
return this._align;
|
|
8768
|
+
},
|
|
8769
|
+
/**
|
|
8770
|
+
* Specifies the horizontal and vertical alignment of the inner StackLayout elements
|
|
8771
|
+
* ([see example]({% slug layout_stacklayout %}#toc-alignment)).
|
|
8772
|
+
*/
|
|
8773
|
+
set: function (align) {
|
|
8774
|
+
this._align = Object.assign({}, this._align, align);
|
|
8775
|
+
this.handleAlignClasses();
|
|
8776
|
+
},
|
|
8777
|
+
enumerable: true,
|
|
8778
|
+
configurable: true
|
|
8779
|
+
});
|
|
8780
|
+
StackLayoutComponent.prototype.ngAfterViewInit = function () {
|
|
8781
|
+
this.handleAlignClasses();
|
|
8782
|
+
this.setGap();
|
|
8783
|
+
};
|
|
8784
|
+
StackLayoutComponent.prototype.ngOnChanges = function (changes) {
|
|
8785
|
+
if (isChanged('gap', changes)) {
|
|
8786
|
+
this.setGap();
|
|
8787
|
+
}
|
|
8788
|
+
if (isChanged('orientation', changes)) {
|
|
8789
|
+
this.handleAlignClasses();
|
|
8790
|
+
}
|
|
8791
|
+
};
|
|
8792
|
+
StackLayoutComponent.prototype.handleAlignClasses = function () {
|
|
8793
|
+
var elem = this.element.nativeElement;
|
|
8794
|
+
if (isPresent(this.justifyClass)) {
|
|
8795
|
+
this.renderer.removeClass(elem, this.justifyClass);
|
|
8796
|
+
}
|
|
8797
|
+
if (isPresent(this.alignClass)) {
|
|
8798
|
+
this.renderer.removeClass(elem, this.alignClass);
|
|
8799
|
+
}
|
|
8800
|
+
if (this.orientation === 'horizontal') {
|
|
8801
|
+
this.justifyClass = JUSTIFY_PREFIX + "-" + this.align.horizontal;
|
|
8802
|
+
this.alignClass = ALIGN_PREFIX + "-" + VERTICAL_SUFFIX[this.align.vertical];
|
|
8803
|
+
}
|
|
8804
|
+
else {
|
|
8805
|
+
this.justifyClass = JUSTIFY_PREFIX + "-" + VERTICAL_SUFFIX[this.align.vertical];
|
|
8806
|
+
this.alignClass = ALIGN_PREFIX + "-" + this.align.horizontal;
|
|
8807
|
+
}
|
|
8808
|
+
this.renderer.addClass(elem, this.justifyClass);
|
|
8809
|
+
this.renderer.addClass(elem, this.alignClass);
|
|
8810
|
+
};
|
|
8811
|
+
StackLayoutComponent.prototype.setGap = function () {
|
|
8812
|
+
var parsedGap = isNumber(this.gap) ? this.gap + "px" : this.gap;
|
|
8813
|
+
this.renderer.setStyle(this.element.nativeElement, 'gap', parsedGap);
|
|
8814
|
+
};
|
|
8815
|
+
Object.defineProperty(StackLayoutComponent.prototype, "direction", {
|
|
8816
|
+
get: function () {
|
|
8817
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
8818
|
+
},
|
|
8819
|
+
enumerable: true,
|
|
8820
|
+
configurable: true
|
|
8821
|
+
});
|
|
8822
|
+
__decorate([
|
|
8823
|
+
HostBinding('class.k-stack-layout'),
|
|
8824
|
+
__metadata("design:type", Boolean)
|
|
8825
|
+
], StackLayoutComponent.prototype, "hostClass", void 0);
|
|
8826
|
+
__decorate([
|
|
8827
|
+
HostBinding('class.k-hstack'),
|
|
8828
|
+
__metadata("design:type", Boolean),
|
|
8829
|
+
__metadata("design:paramtypes", [])
|
|
8830
|
+
], StackLayoutComponent.prototype, "horizontalClass", null);
|
|
8831
|
+
__decorate([
|
|
8832
|
+
HostBinding('class.k-vstack'),
|
|
8833
|
+
__metadata("design:type", Boolean),
|
|
8834
|
+
__metadata("design:paramtypes", [])
|
|
8835
|
+
], StackLayoutComponent.prototype, "verticalClass", null);
|
|
8836
|
+
__decorate([
|
|
8837
|
+
HostBinding('attr.dir'),
|
|
8838
|
+
__metadata("design:type", String),
|
|
8839
|
+
__metadata("design:paramtypes", [])
|
|
8840
|
+
], StackLayoutComponent.prototype, "dir", null);
|
|
8841
|
+
__decorate([
|
|
8842
|
+
Input(),
|
|
8843
|
+
__metadata("design:type", Object),
|
|
8844
|
+
__metadata("design:paramtypes", [Object])
|
|
8845
|
+
], StackLayoutComponent.prototype, "align", null);
|
|
8846
|
+
__decorate([
|
|
8847
|
+
Input(),
|
|
8848
|
+
__metadata("design:type", Object)
|
|
8849
|
+
], StackLayoutComponent.prototype, "gap", void 0);
|
|
8850
|
+
__decorate([
|
|
8851
|
+
Input(),
|
|
8852
|
+
__metadata("design:type", String)
|
|
8853
|
+
], StackLayoutComponent.prototype, "orientation", void 0);
|
|
8854
|
+
StackLayoutComponent = __decorate([
|
|
8855
|
+
Component({
|
|
8856
|
+
exportAs: 'kendoStackLayout',
|
|
8857
|
+
selector: 'kendo-stacklayout',
|
|
8858
|
+
providers: [
|
|
8859
|
+
LocalizationService,
|
|
8860
|
+
{
|
|
8861
|
+
provide: L10N_PREFIX,
|
|
8862
|
+
useValue: 'kendo.stacklayout'
|
|
8863
|
+
}
|
|
8864
|
+
],
|
|
8865
|
+
template: "\n <ng-content></ng-content>\n "
|
|
8866
|
+
}),
|
|
8867
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
8868
|
+
ElementRef,
|
|
8869
|
+
LocalizationService])
|
|
8870
|
+
], StackLayoutComponent);
|
|
8871
|
+
return StackLayoutComponent;
|
|
8872
|
+
}());
|
|
8873
|
+
|
|
8874
|
+
var exportedModules$9 = [
|
|
8875
|
+
StackLayoutComponent
|
|
8876
|
+
];
|
|
8877
|
+
var declarations$9 = exportedModules$9.slice();
|
|
8878
|
+
/**
|
|
8879
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
8880
|
+
* definition for the StackLayout component.
|
|
8881
|
+
*/
|
|
8882
|
+
var StackLayoutModule = /** @class */ (function () {
|
|
8883
|
+
function StackLayoutModule() {
|
|
8884
|
+
}
|
|
8885
|
+
StackLayoutModule = __decorate([
|
|
8886
|
+
NgModule({
|
|
8887
|
+
declarations: [declarations$9],
|
|
8888
|
+
exports: [exportedModules$9],
|
|
8889
|
+
imports: [CommonModule]
|
|
8890
|
+
})
|
|
8891
|
+
], StackLayoutModule);
|
|
8892
|
+
return StackLayoutModule;
|
|
8893
|
+
}());
|
|
8894
|
+
|
|
8895
|
+
/**
|
|
8896
|
+
* Represents the [Kendo UI GridLayout component for Angular]({% slug overview_gridlayout %}).
|
|
8897
|
+
*/
|
|
8898
|
+
var GridLayoutComponent = /** @class */ (function () {
|
|
8899
|
+
function GridLayoutComponent(renderer, element, localization) {
|
|
8900
|
+
this.renderer = renderer;
|
|
8901
|
+
this.element = element;
|
|
8902
|
+
this.localization = localization;
|
|
8903
|
+
this.hostClass = true;
|
|
8904
|
+
/**
|
|
8905
|
+
* Specifies the gaps between the elements. The default value is `0`
|
|
8906
|
+
* ([see example]({% slug layout_gridlayout %}#toc-gaps)).
|
|
8907
|
+
*/
|
|
8908
|
+
this.gap = 0;
|
|
8909
|
+
this._align = {
|
|
8910
|
+
horizontal: 'stretch',
|
|
8911
|
+
vertical: 'stretch'
|
|
8912
|
+
};
|
|
8913
|
+
validatePackage(packageMetadata);
|
|
8914
|
+
}
|
|
8915
|
+
Object.defineProperty(GridLayoutComponent.prototype, "dir", {
|
|
8916
|
+
get: function () {
|
|
8917
|
+
return this.direction;
|
|
8918
|
+
},
|
|
8919
|
+
enumerable: true,
|
|
8920
|
+
configurable: true
|
|
8921
|
+
});
|
|
8922
|
+
Object.defineProperty(GridLayoutComponent.prototype, "align", {
|
|
8923
|
+
get: function () {
|
|
8924
|
+
return this._align;
|
|
8925
|
+
},
|
|
8926
|
+
/**
|
|
8927
|
+
* Specifies the horizontal and vertical alignment of the inner GridLayout elements
|
|
8928
|
+
* ([see example]({% slug layout_gridlayout %}#toc-alignment)).
|
|
8929
|
+
*/
|
|
8930
|
+
set: function (align) {
|
|
8931
|
+
this._align = Object.assign({}, this._align, align);
|
|
8932
|
+
this.handleAlignClasses();
|
|
8933
|
+
},
|
|
8934
|
+
enumerable: true,
|
|
8935
|
+
configurable: true
|
|
8936
|
+
});
|
|
8937
|
+
GridLayoutComponent.prototype.ngAfterViewInit = function () {
|
|
8938
|
+
this.handleAlignClasses();
|
|
8939
|
+
this.handleGridTemplateStyling('rows');
|
|
8940
|
+
this.handleGridTemplateStyling('cols');
|
|
8941
|
+
this.setGap();
|
|
8942
|
+
};
|
|
8943
|
+
GridLayoutComponent.prototype.ngOnChanges = function (changes) {
|
|
8944
|
+
if (isChanged('gap', changes)) {
|
|
8945
|
+
this.setGap();
|
|
8946
|
+
}
|
|
8947
|
+
if (isChanged('rows', changes)) {
|
|
8948
|
+
this.handleGridTemplateStyling('rows');
|
|
8949
|
+
}
|
|
8950
|
+
if (isChanged('cols', changes)) {
|
|
8951
|
+
this.handleGridTemplateStyling('cols');
|
|
8952
|
+
}
|
|
8953
|
+
};
|
|
8954
|
+
GridLayoutComponent.prototype.handleAlignClasses = function () {
|
|
8955
|
+
var elem = this.element.nativeElement;
|
|
8956
|
+
if (isPresent(this.justifyClass)) {
|
|
8957
|
+
this.renderer.removeClass(elem, this.justifyClass);
|
|
8958
|
+
}
|
|
8959
|
+
if (isPresent(this.alignClass)) {
|
|
8960
|
+
this.renderer.removeClass(elem, this.alignClass);
|
|
8961
|
+
}
|
|
8962
|
+
this.justifyClass = GRID_JUSTIFY_PREFIX + "-" + this.align.horizontal;
|
|
8963
|
+
this.alignClass = ALIGN_PREFIX + "-" + VERTICAL_SUFFIX[this.align.vertical];
|
|
8964
|
+
this.renderer.addClass(elem, this.justifyClass);
|
|
8965
|
+
this.renderer.addClass(elem, this.alignClass);
|
|
8966
|
+
};
|
|
8967
|
+
GridLayoutComponent.prototype.setGap = function () {
|
|
8968
|
+
var parsedGap = normalizeGap(this.gap);
|
|
8969
|
+
var gapStyle = generateGapStyle(parsedGap);
|
|
8970
|
+
this.renderer.setStyle(this.element.nativeElement, 'gap', gapStyle);
|
|
8971
|
+
};
|
|
8972
|
+
GridLayoutComponent.prototype.handleGridTemplateStyling = function (type) {
|
|
8973
|
+
if (!isPresent(this[type])) {
|
|
8974
|
+
return;
|
|
8975
|
+
}
|
|
8976
|
+
var gridTemplateStyle = type === 'rows' ? 'grid-template-rows' : 'grid-template-columns';
|
|
8977
|
+
var gridStyle = generateGridStyle(this[type], type);
|
|
8978
|
+
this.renderer.setStyle(this.element.nativeElement, gridTemplateStyle, gridStyle.join(' '));
|
|
8979
|
+
};
|
|
8980
|
+
Object.defineProperty(GridLayoutComponent.prototype, "direction", {
|
|
8981
|
+
get: function () {
|
|
8982
|
+
return this.localization.rtl ? 'rtl' : 'ltr';
|
|
8983
|
+
},
|
|
8984
|
+
enumerable: true,
|
|
8985
|
+
configurable: true
|
|
8986
|
+
});
|
|
8987
|
+
__decorate([
|
|
8988
|
+
HostBinding('class.k-grid-layout'),
|
|
8989
|
+
__metadata("design:type", Boolean)
|
|
8990
|
+
], GridLayoutComponent.prototype, "hostClass", void 0);
|
|
8991
|
+
__decorate([
|
|
8992
|
+
HostBinding('attr.dir'),
|
|
8993
|
+
__metadata("design:type", String),
|
|
8994
|
+
__metadata("design:paramtypes", [])
|
|
8995
|
+
], GridLayoutComponent.prototype, "dir", null);
|
|
8996
|
+
__decorate([
|
|
8997
|
+
Input(),
|
|
8998
|
+
__metadata("design:type", Array)
|
|
8999
|
+
], GridLayoutComponent.prototype, "rows", void 0);
|
|
9000
|
+
__decorate([
|
|
9001
|
+
Input(),
|
|
9002
|
+
__metadata("design:type", Array)
|
|
9003
|
+
], GridLayoutComponent.prototype, "cols", void 0);
|
|
9004
|
+
__decorate([
|
|
9005
|
+
Input(),
|
|
9006
|
+
__metadata("design:type", Object)
|
|
9007
|
+
], GridLayoutComponent.prototype, "gap", void 0);
|
|
9008
|
+
__decorate([
|
|
9009
|
+
Input(),
|
|
9010
|
+
__metadata("design:type", Object),
|
|
9011
|
+
__metadata("design:paramtypes", [Object])
|
|
9012
|
+
], GridLayoutComponent.prototype, "align", null);
|
|
9013
|
+
GridLayoutComponent = __decorate([
|
|
9014
|
+
Component({
|
|
9015
|
+
exportAs: 'kendoGridLayout',
|
|
9016
|
+
selector: 'kendo-gridlayout',
|
|
9017
|
+
providers: [
|
|
9018
|
+
LocalizationService,
|
|
9019
|
+
{
|
|
9020
|
+
provide: L10N_PREFIX,
|
|
9021
|
+
useValue: 'kendo.gridlayout'
|
|
9022
|
+
}
|
|
9023
|
+
],
|
|
9024
|
+
template: "\n <ng-content></ng-content>\n "
|
|
9025
|
+
}),
|
|
9026
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
9027
|
+
ElementRef,
|
|
9028
|
+
LocalizationService])
|
|
9029
|
+
], GridLayoutComponent);
|
|
9030
|
+
return GridLayoutComponent;
|
|
9031
|
+
}());
|
|
9032
|
+
|
|
9033
|
+
var GridLayoutItemComponent = /** @class */ (function () {
|
|
9034
|
+
function GridLayoutItemComponent(renderer, element) {
|
|
9035
|
+
this.renderer = renderer;
|
|
9036
|
+
this.element = element;
|
|
9037
|
+
}
|
|
9038
|
+
GridLayoutItemComponent.prototype.ngOnInit = function () {
|
|
9039
|
+
this.setItemStyle();
|
|
9040
|
+
};
|
|
9041
|
+
GridLayoutItemComponent.prototype.ngOnChanges = function () {
|
|
9042
|
+
this.setItemStyle();
|
|
9043
|
+
};
|
|
9044
|
+
GridLayoutItemComponent.prototype.setItemStyle = function () {
|
|
9045
|
+
var row = this.row || 'auto';
|
|
9046
|
+
var col = this.col || 'auto';
|
|
9047
|
+
var rowSpan = this.rowSpan ? "span " + this.rowSpan : 'auto';
|
|
9048
|
+
var colSpan = this.colSpan ? "span " + this.colSpan : 'auto';
|
|
9049
|
+
var gridAreaStyle = row + " / " + col + " / " + rowSpan + " / " + colSpan;
|
|
9050
|
+
this.renderer.setStyle(this.element.nativeElement, 'grid-area', gridAreaStyle);
|
|
9051
|
+
};
|
|
9052
|
+
__decorate([
|
|
9053
|
+
Input(),
|
|
9054
|
+
__metadata("design:type", Number)
|
|
9055
|
+
], GridLayoutItemComponent.prototype, "row", void 0);
|
|
9056
|
+
__decorate([
|
|
9057
|
+
Input(),
|
|
9058
|
+
__metadata("design:type", Number)
|
|
9059
|
+
], GridLayoutItemComponent.prototype, "col", void 0);
|
|
9060
|
+
__decorate([
|
|
9061
|
+
Input(),
|
|
9062
|
+
__metadata("design:type", Number)
|
|
9063
|
+
], GridLayoutItemComponent.prototype, "rowSpan", void 0);
|
|
9064
|
+
__decorate([
|
|
9065
|
+
Input(),
|
|
9066
|
+
__metadata("design:type", Number)
|
|
9067
|
+
], GridLayoutItemComponent.prototype, "colSpan", void 0);
|
|
9068
|
+
GridLayoutItemComponent = __decorate([
|
|
9069
|
+
Component({
|
|
9070
|
+
selector: 'kendo-gridlayout-item',
|
|
9071
|
+
template: "\n <ng-content></ng-content>\n "
|
|
9072
|
+
}),
|
|
9073
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
9074
|
+
ElementRef])
|
|
9075
|
+
], GridLayoutItemComponent);
|
|
9076
|
+
return GridLayoutItemComponent;
|
|
9077
|
+
}());
|
|
9078
|
+
|
|
9079
|
+
var exportedModules$a = [
|
|
9080
|
+
GridLayoutComponent,
|
|
9081
|
+
GridLayoutItemComponent
|
|
9082
|
+
];
|
|
9083
|
+
var declarations$a = exportedModules$a.slice();
|
|
9084
|
+
/**
|
|
9085
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
9086
|
+
* definition for the GridLayout component.
|
|
9087
|
+
*/
|
|
9088
|
+
var GridLayoutModule = /** @class */ (function () {
|
|
9089
|
+
function GridLayoutModule() {
|
|
9090
|
+
}
|
|
9091
|
+
GridLayoutModule = __decorate([
|
|
9092
|
+
NgModule({
|
|
9093
|
+
declarations: [declarations$a],
|
|
9094
|
+
exports: [exportedModules$a],
|
|
9095
|
+
imports: [CommonModule]
|
|
9096
|
+
})
|
|
9097
|
+
], GridLayoutModule);
|
|
9098
|
+
return GridLayoutModule;
|
|
9099
|
+
}());
|
|
9100
|
+
|
|
8604
9101
|
/**
|
|
8605
9102
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
8606
9103
|
* definition for the Layout components.
|
|
@@ -8646,7 +9143,9 @@ var LayoutModule = /** @class */ (function () {
|
|
|
8646
9143
|
SplitterModule,
|
|
8647
9144
|
StepperModule,
|
|
8648
9145
|
TabStripModule,
|
|
8649
|
-
TileLayoutModule
|
|
9146
|
+
TileLayoutModule,
|
|
9147
|
+
StackLayoutModule,
|
|
9148
|
+
GridLayoutModule
|
|
8650
9149
|
]
|
|
8651
9150
|
})
|
|
8652
9151
|
], LayoutModule);
|
|
@@ -8657,4 +9156,4 @@ var LayoutModule = /** @class */ (function () {
|
|
|
8657
9156
|
* Generated bundle index. Do not edit.
|
|
8658
9157
|
*/
|
|
8659
9158
|
|
|
8660
|
-
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 };
|
|
9159
|
+
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 };
|