@progress/kendo-angular-layout 17.0.0-develop.1 → 17.0.0-develop.11
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/README.md +42 -27
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/splitter/splitter-bar.component.mjs +35 -2
- package/esm2020/splitter/splitter-pane.component.mjs +25 -9
- package/esm2020/splitter/splitter.component.mjs +12 -7
- package/esm2020/splitter/splitter.service.mjs +16 -0
- package/esm2020/tabstrip/rendering/tab.component.mjs +10 -9
- package/esm2020/tabstrip/tabstrip.component.mjs +30 -41
- package/esm2020/timeline/timeline-card.component.mjs +1 -1
- package/esm2020/timeline/timeline-horizontal.component.mjs +1 -1
- package/fesm2015/progress-kendo-angular-layout.mjs +316 -258
- package/fesm2020/progress-kendo-angular-layout.mjs +316 -258
- package/package.json +8 -8
- package/splitter/splitter-bar.component.d.ts +13 -1
- package/splitter/splitter-pane.component.d.ts +19 -4
- package/splitter/splitter.component.d.ts +6 -1
- package/splitter/splitter.service.d.ts +4 -0
- package/tabstrip/models/tab-alignment.d.ts +1 -1
- package/tabstrip/tabstrip.component.d.ts +2 -12
|
@@ -7,7 +7,7 @@ import { Injectable, Directive, Optional, isDevMode, Component, SkipSelf, Host,
|
|
|
7
7
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import * as i1$1 from '@progress/kendo-angular-common';
|
|
10
|
-
import { Keys, shouldShowValidationUI, WatermarkOverlayComponent, isDocumentAvailable, DraggableDirective, PreventableEvent as PreventableEvent$1, guid, ResizeSensorComponent, hasObservers, isPresent as isPresent$1, focusableSelector, isChanged } from '@progress/kendo-angular-common';
|
|
10
|
+
import { Keys, shouldShowValidationUI, WatermarkOverlayComponent, isObjectPresent, removeHTMLAttributes, parseAttributes, setHTMLAttributes, isDocumentAvailable, DraggableDirective, PreventableEvent as PreventableEvent$1, guid, ResizeSensorComponent, hasObservers, isPresent as isPresent$1, focusableSelector, isChanged } from '@progress/kendo-angular-common';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import * as i1$2 from '@angular/animations';
|
|
13
13
|
import { trigger, state, style, transition, animate, AUTO_STYLE } from '@angular/animations';
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-layout',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '17.0.0-develop.
|
|
31
|
+
publishDate: 1729238832,
|
|
32
|
+
version: '17.0.0-develop.11',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1592,18 +1592,218 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1592
1592
|
args: ['keydown', ['$event']]
|
|
1593
1593
|
}] } });
|
|
1594
1594
|
|
|
1595
|
+
/**
|
|
1596
|
+
* @hidden
|
|
1597
|
+
*/
|
|
1598
|
+
const shouldTogglePrev = (keyCode, prev, next) => {
|
|
1599
|
+
const leftArrow = keyCode === Keys.ArrowLeft;
|
|
1600
|
+
const upArrow = keyCode === Keys.ArrowUp;
|
|
1601
|
+
const collapsePrev = !prev.collapsed && !next.collapsed && (leftArrow || upArrow);
|
|
1602
|
+
const expandPrev = prev.collapsed && !(leftArrow || upArrow);
|
|
1603
|
+
return collapsePrev || expandPrev;
|
|
1604
|
+
};
|
|
1605
|
+
/**
|
|
1606
|
+
* @hidden
|
|
1607
|
+
*/
|
|
1608
|
+
const shouldToggleNext = (keyCode, prev, next) => {
|
|
1609
|
+
const leftArrow = keyCode === Keys.ArrowLeft;
|
|
1610
|
+
const upArrow = keyCode === Keys.ArrowUp;
|
|
1611
|
+
const collapseNext = !next.collapsed && !prev.collapsed && !(leftArrow || upArrow);
|
|
1612
|
+
const expandNext = next.collapsed && (leftArrow || upArrow);
|
|
1613
|
+
return collapseNext || expandNext;
|
|
1614
|
+
};
|
|
1615
|
+
/**
|
|
1616
|
+
* @hidden
|
|
1617
|
+
*/
|
|
1618
|
+
const shouldToggleOrResize = (keyCode, orientation) => {
|
|
1619
|
+
const isHorizontal = orientation === 'horizontal';
|
|
1620
|
+
const isHorizontalChange = isHorizontal && (keyCode === Keys.ArrowLeft || keyCode === Keys.ArrowRight);
|
|
1621
|
+
const isVerticalChange = !isHorizontal && (keyCode === Keys.ArrowUp || keyCode === Keys.ArrowDown);
|
|
1622
|
+
return isHorizontalChange || isVerticalChange;
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
|
|
1626
|
+
/**
|
|
1627
|
+
* @hidden
|
|
1628
|
+
*/
|
|
1629
|
+
class SplitterService {
|
|
1630
|
+
constructor(zone) {
|
|
1631
|
+
this.zone = zone;
|
|
1632
|
+
this.layoutChange = new EventEmitter();
|
|
1633
|
+
this.resizeStep = 10;
|
|
1634
|
+
this.containerSize = () => { };
|
|
1635
|
+
}
|
|
1636
|
+
tryToggle(paneIndex) {
|
|
1637
|
+
const pane = this.pane(paneIndex);
|
|
1638
|
+
if (pane.collapsible) {
|
|
1639
|
+
pane.collapsed = !pane.collapsed;
|
|
1640
|
+
pane.collapsedChange.emit(pane.collapsed);
|
|
1641
|
+
this.emit(this.layoutChange, {});
|
|
1642
|
+
if (pane.collapsed) {
|
|
1643
|
+
pane.detectChanges();
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
const notCollapsed = this.panes.filter(p => !p.collapsed);
|
|
1647
|
+
const allHaveFixedSize = notCollapsed.every(p => p.fixedSize);
|
|
1648
|
+
notCollapsed.filter(p => p.fixedSize).forEach(pane => {
|
|
1649
|
+
pane.forceExpand = allHaveFixedSize ? true : false;
|
|
1650
|
+
});
|
|
1651
|
+
return pane.collapsible;
|
|
1652
|
+
}
|
|
1653
|
+
togglePane(keyCode, index) {
|
|
1654
|
+
const prev = this.pane(index);
|
|
1655
|
+
const next = this.pane(index + 1);
|
|
1656
|
+
if (shouldTogglePrev(keyCode, prev, next)) {
|
|
1657
|
+
this.tryToggle(index);
|
|
1658
|
+
}
|
|
1659
|
+
else if (shouldToggleNext(keyCode, prev, next)) {
|
|
1660
|
+
this.tryToggle(index + 1);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
resizePane(keyCode, index) {
|
|
1664
|
+
const state = this.dragState(index);
|
|
1665
|
+
const direction = keyCode === Keys.ArrowLeft || keyCode === (this.rtl ? Keys.ArrowDown : Keys.ArrowUp);
|
|
1666
|
+
let step = direction ? (-this.resizeStep) : this.resizeStep;
|
|
1667
|
+
if (this.rtl) {
|
|
1668
|
+
step = -step;
|
|
1669
|
+
}
|
|
1670
|
+
this.setSize(state, step);
|
|
1671
|
+
}
|
|
1672
|
+
toggleContentOverlay(index, show) {
|
|
1673
|
+
this.pane(index).toggleOverlay(show);
|
|
1674
|
+
this.pane(index + 1).toggleOverlay(show);
|
|
1675
|
+
}
|
|
1676
|
+
dragState(splitbarIndex) {
|
|
1677
|
+
const prev = this.pane(splitbarIndex);
|
|
1678
|
+
const next = this.pane(splitbarIndex + 1);
|
|
1679
|
+
const total = prev.computedSize + next.computedSize;
|
|
1680
|
+
const px = s => this.toPixels(s);
|
|
1681
|
+
return {
|
|
1682
|
+
prev: {
|
|
1683
|
+
index: splitbarIndex,
|
|
1684
|
+
initialSize: prev.computedSize,
|
|
1685
|
+
min: px(prev.min) || total - px(next.max) || 0,
|
|
1686
|
+
max: px(prev.max) || total - px(next.min) || total
|
|
1687
|
+
},
|
|
1688
|
+
next: {
|
|
1689
|
+
index: splitbarIndex + 1,
|
|
1690
|
+
initialSize: next.computedSize,
|
|
1691
|
+
min: px(next.min) || total - px(prev.max) || 0,
|
|
1692
|
+
max: px(next.max) || total - px(prev.min) || total
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
setSize(state, delta) {
|
|
1697
|
+
const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
|
|
1698
|
+
const resize = (paneState, change) => {
|
|
1699
|
+
const pane = this.pane(paneState.index);
|
|
1700
|
+
const splitterSize = this.containerSize();
|
|
1701
|
+
const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
|
|
1702
|
+
let size = "";
|
|
1703
|
+
if (this.isPercent(pane.size)) {
|
|
1704
|
+
size = (100 * newSize / splitterSize) + "%";
|
|
1705
|
+
}
|
|
1706
|
+
else {
|
|
1707
|
+
size = newSize + "px";
|
|
1708
|
+
}
|
|
1709
|
+
pane.size = size;
|
|
1710
|
+
pane.isResized = true;
|
|
1711
|
+
this.emit(pane.sizeChange, size);
|
|
1712
|
+
};
|
|
1713
|
+
// resizing both panes
|
|
1714
|
+
resize(state.prev, delta);
|
|
1715
|
+
resize(state.next, -delta);
|
|
1716
|
+
this.emit(this.layoutChange, {});
|
|
1717
|
+
}
|
|
1718
|
+
isDraggable(splitBarIndex) {
|
|
1719
|
+
const prev = this.pane(splitBarIndex);
|
|
1720
|
+
const next = this.pane(splitBarIndex + 1);
|
|
1721
|
+
const betweenResizablePanes = prev.resizable && next.resizable;
|
|
1722
|
+
const nearCollapsedPane = prev.collapsed || next.collapsed;
|
|
1723
|
+
return betweenResizablePanes && !nearCollapsedPane;
|
|
1724
|
+
}
|
|
1725
|
+
isStatic(splitBarIndex) {
|
|
1726
|
+
const prev = this.pane(splitBarIndex);
|
|
1727
|
+
const next = this.pane(splitBarIndex + 1);
|
|
1728
|
+
const betweenResizablePanes = prev.resizable && next.resizable;
|
|
1729
|
+
const nearCollapsiblePane = prev.collapsible || next.collapsible;
|
|
1730
|
+
return !betweenResizablePanes && !nearCollapsiblePane;
|
|
1731
|
+
}
|
|
1732
|
+
pane(index) {
|
|
1733
|
+
if (!this.panes) {
|
|
1734
|
+
throw new Error("Panes not initialized");
|
|
1735
|
+
}
|
|
1736
|
+
if (index < 0 || index >= this.panes.length) {
|
|
1737
|
+
throw new Error("Index out of range");
|
|
1738
|
+
}
|
|
1739
|
+
return this.panes[index];
|
|
1740
|
+
}
|
|
1741
|
+
paneByIndex(pane) {
|
|
1742
|
+
if (!this.panes) {
|
|
1743
|
+
return -1;
|
|
1744
|
+
}
|
|
1745
|
+
return this.panes.findIndex(splitterPane => splitterPane === pane);
|
|
1746
|
+
}
|
|
1747
|
+
getPaneSplitterBar(pane) {
|
|
1748
|
+
if (!this.splitterBars) {
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
const paneIndex = this.paneByIndex(pane);
|
|
1752
|
+
if (paneIndex < 0 || paneIndex >= this.splitterBars.length) {
|
|
1753
|
+
return null;
|
|
1754
|
+
}
|
|
1755
|
+
return this.splitterBars[paneIndex];
|
|
1756
|
+
}
|
|
1757
|
+
configure({ panes, orientation, containerSize, direction }) {
|
|
1758
|
+
this.panes = panes;
|
|
1759
|
+
this.panes.forEach((pane, index) => {
|
|
1760
|
+
pane.order = index * 2;
|
|
1761
|
+
pane.orientation = orientation;
|
|
1762
|
+
});
|
|
1763
|
+
if (isDevMode()) {
|
|
1764
|
+
const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
|
|
1765
|
+
const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
|
|
1766
|
+
if (allPanesWithSize && !hasResizedPane) {
|
|
1767
|
+
throw new Error(`
|
|
1768
|
+
The Splitter should have at least one pane without a set size.
|
|
1769
|
+
See ${SIZING_DOC_LINK} for more information.
|
|
1770
|
+
`);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
this.containerSize = containerSize;
|
|
1774
|
+
this.rtl = direction === 'rtl';
|
|
1775
|
+
}
|
|
1776
|
+
isPercent(size) {
|
|
1777
|
+
return /%$/.test(size);
|
|
1778
|
+
}
|
|
1779
|
+
toPixels(size) {
|
|
1780
|
+
let result = parseFloat(size);
|
|
1781
|
+
if (this.isPercent(size)) {
|
|
1782
|
+
result = (this.containerSize() * result / 100);
|
|
1783
|
+
}
|
|
1784
|
+
return result;
|
|
1785
|
+
}
|
|
1786
|
+
emit(emitter, args) {
|
|
1787
|
+
if (emitter.observers.length) {
|
|
1788
|
+
this.zone.run(() => emitter.emit(args));
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
SplitterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1793
|
+
SplitterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService });
|
|
1794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, decorators: [{
|
|
1795
|
+
type: Injectable
|
|
1796
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
1797
|
+
|
|
1595
1798
|
/**
|
|
1596
1799
|
* Represents the pane component of the Splitter.
|
|
1597
1800
|
*/
|
|
1598
1801
|
class SplitterPaneComponent {
|
|
1599
|
-
constructor(element, renderer, cdr) {
|
|
1802
|
+
constructor(element, renderer, cdr, splitterService) {
|
|
1600
1803
|
this.element = element;
|
|
1601
1804
|
this.renderer = renderer;
|
|
1602
1805
|
this.cdr = cdr;
|
|
1603
|
-
|
|
1604
|
-
* The value of the aria-label attribute of the auxiliary separator.
|
|
1605
|
-
*/
|
|
1606
|
-
this.separatorLabel = 'Splitter pane';
|
|
1806
|
+
this.splitterService = splitterService;
|
|
1607
1807
|
/**
|
|
1608
1808
|
* Specifies if the user is allowed to resize the pane and provide space for other panes.
|
|
1609
1809
|
*/
|
|
@@ -1681,6 +1881,21 @@ class SplitterPaneComponent {
|
|
|
1681
1881
|
get size() {
|
|
1682
1882
|
return this._size;
|
|
1683
1883
|
}
|
|
1884
|
+
/**
|
|
1885
|
+
* Sets the HTML attributes of the splitter bar.
|
|
1886
|
+
* The property accepts string key-value based pairs.
|
|
1887
|
+
* Attributes which are essential for certain functionalities cannot be changed.
|
|
1888
|
+
*/
|
|
1889
|
+
set splitterBarAttributes(attributes) {
|
|
1890
|
+
this._splitterBarAttributes = attributes;
|
|
1891
|
+
const splitterBar = this.splitterService.getPaneSplitterBar(this);
|
|
1892
|
+
if (splitterBar) {
|
|
1893
|
+
splitterBar.htmlAttributes = attributes;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
get splitterBarAttributes() {
|
|
1897
|
+
return this._splitterBarAttributes;
|
|
1898
|
+
}
|
|
1684
1899
|
/**
|
|
1685
1900
|
* @hidden
|
|
1686
1901
|
*/
|
|
@@ -1749,8 +1964,8 @@ class SplitterPaneComponent {
|
|
|
1749
1964
|
this.renderer.setStyle(element, 'order', this.order);
|
|
1750
1965
|
}
|
|
1751
1966
|
}
|
|
1752
|
-
SplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1753
|
-
SplitterPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterPaneComponent, isStandalone: true, selector: "kendo-splitter-pane", inputs: { order: "order", size: "size",
|
|
1967
|
+
SplitterPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterPaneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: SplitterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1968
|
+
SplitterPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterPaneComponent, isStandalone: true, selector: "kendo-splitter-pane", inputs: { order: "order", size: "size", splitterBarAttributes: "splitterBarAttributes", splitterBarClass: "splitterBarClass", min: "min", max: "max", resizable: "resizable", collapsible: "collapsible", scrollable: "scrollable", collapsed: "collapsed", orientation: "orientation", containsSplitter: "containsSplitter", overlayContent: "overlayContent" }, outputs: { sizeChange: "sizeChange", collapsedChange: "collapsedChange" }, host: { properties: { "attr.role": "this.ariaRole", "class.k-pane": "this.hostClass", "class.k-pane-static": "this.staticPaneClass", "class.k-scrollable": "this.scrollablePaneClass" } }, exportAs: ["kendoSplitterPane"], ngImport: i0, template: `
|
|
1754
1969
|
<ng-container *ngIf="!collapsed"><ng-content></ng-content></ng-container>
|
|
1755
1970
|
<div *ngIf="overlayContent" class="k-splitter-overlay k-overlay"></div>
|
|
1756
1971
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
@@ -1766,11 +1981,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1766
1981
|
standalone: true,
|
|
1767
1982
|
imports: [NgIf]
|
|
1768
1983
|
}]
|
|
1769
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { order: [{
|
|
1984
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: SplitterService }]; }, propDecorators: { order: [{
|
|
1770
1985
|
type: Input
|
|
1771
1986
|
}], size: [{
|
|
1772
1987
|
type: Input
|
|
1773
|
-
}],
|
|
1988
|
+
}], splitterBarAttributes: [{
|
|
1989
|
+
type: Input
|
|
1990
|
+
}], splitterBarClass: [{
|
|
1774
1991
|
type: Input
|
|
1775
1992
|
}], min: [{
|
|
1776
1993
|
type: Input
|
|
@@ -1808,193 +2025,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1808
2025
|
args: ['class.k-scrollable']
|
|
1809
2026
|
}] } });
|
|
1810
2027
|
|
|
1811
|
-
/**
|
|
1812
|
-
* @hidden
|
|
1813
|
-
*/
|
|
1814
|
-
const shouldTogglePrev = (keyCode, prev, next) => {
|
|
1815
|
-
const leftArrow = keyCode === Keys.ArrowLeft;
|
|
1816
|
-
const upArrow = keyCode === Keys.ArrowUp;
|
|
1817
|
-
const collapsePrev = !prev.collapsed && !next.collapsed && (leftArrow || upArrow);
|
|
1818
|
-
const expandPrev = prev.collapsed && !(leftArrow || upArrow);
|
|
1819
|
-
return collapsePrev || expandPrev;
|
|
1820
|
-
};
|
|
1821
|
-
/**
|
|
1822
|
-
* @hidden
|
|
1823
|
-
*/
|
|
1824
|
-
const shouldToggleNext = (keyCode, prev, next) => {
|
|
1825
|
-
const leftArrow = keyCode === Keys.ArrowLeft;
|
|
1826
|
-
const upArrow = keyCode === Keys.ArrowUp;
|
|
1827
|
-
const collapseNext = !next.collapsed && !prev.collapsed && !(leftArrow || upArrow);
|
|
1828
|
-
const expandNext = next.collapsed && (leftArrow || upArrow);
|
|
1829
|
-
return collapseNext || expandNext;
|
|
1830
|
-
};
|
|
1831
|
-
/**
|
|
1832
|
-
* @hidden
|
|
1833
|
-
*/
|
|
1834
|
-
const shouldToggleOrResize = (keyCode, orientation) => {
|
|
1835
|
-
const isHorizontal = orientation === 'horizontal';
|
|
1836
|
-
const isHorizontalChange = isHorizontal && (keyCode === Keys.ArrowLeft || keyCode === Keys.ArrowRight);
|
|
1837
|
-
const isVerticalChange = !isHorizontal && (keyCode === Keys.ArrowUp || keyCode === Keys.ArrowDown);
|
|
1838
|
-
return isHorizontalChange || isVerticalChange;
|
|
1839
|
-
};
|
|
1840
|
-
|
|
1841
|
-
const SIZING_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/layout/splitter/panes/#toc-size';
|
|
1842
|
-
/**
|
|
1843
|
-
* @hidden
|
|
1844
|
-
*/
|
|
1845
|
-
class SplitterService {
|
|
1846
|
-
constructor(zone) {
|
|
1847
|
-
this.zone = zone;
|
|
1848
|
-
this.layoutChange = new EventEmitter();
|
|
1849
|
-
this.resizeStep = 10;
|
|
1850
|
-
this.containerSize = () => { };
|
|
1851
|
-
}
|
|
1852
|
-
tryToggle(paneIndex) {
|
|
1853
|
-
const pane = this.pane(paneIndex);
|
|
1854
|
-
if (pane.collapsible) {
|
|
1855
|
-
pane.collapsed = !pane.collapsed;
|
|
1856
|
-
pane.collapsedChange.emit(pane.collapsed);
|
|
1857
|
-
this.emit(this.layoutChange, {});
|
|
1858
|
-
if (pane.collapsed) {
|
|
1859
|
-
pane.detectChanges();
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
const notCollapsed = this.panes.filter(p => !p.collapsed);
|
|
1863
|
-
const allHaveFixedSize = notCollapsed.every(p => p.fixedSize);
|
|
1864
|
-
notCollapsed.filter(p => p.fixedSize).forEach(pane => {
|
|
1865
|
-
pane.forceExpand = allHaveFixedSize ? true : false;
|
|
1866
|
-
});
|
|
1867
|
-
return pane.collapsible;
|
|
1868
|
-
}
|
|
1869
|
-
togglePane(keyCode, index) {
|
|
1870
|
-
const prev = this.pane(index);
|
|
1871
|
-
const next = this.pane(index + 1);
|
|
1872
|
-
if (shouldTogglePrev(keyCode, prev, next)) {
|
|
1873
|
-
this.tryToggle(index);
|
|
1874
|
-
}
|
|
1875
|
-
else if (shouldToggleNext(keyCode, prev, next)) {
|
|
1876
|
-
this.tryToggle(index + 1);
|
|
1877
|
-
}
|
|
1878
|
-
}
|
|
1879
|
-
resizePane(keyCode, index) {
|
|
1880
|
-
const state = this.dragState(index);
|
|
1881
|
-
const direction = keyCode === Keys.ArrowLeft || keyCode === (this.rtl ? Keys.ArrowDown : Keys.ArrowUp);
|
|
1882
|
-
let step = direction ? (-this.resizeStep) : this.resizeStep;
|
|
1883
|
-
if (this.rtl) {
|
|
1884
|
-
step = -step;
|
|
1885
|
-
}
|
|
1886
|
-
this.setSize(state, step);
|
|
1887
|
-
}
|
|
1888
|
-
toggleContentOverlay(index, show) {
|
|
1889
|
-
this.pane(index).toggleOverlay(show);
|
|
1890
|
-
this.pane(index + 1).toggleOverlay(show);
|
|
1891
|
-
}
|
|
1892
|
-
dragState(splitbarIndex) {
|
|
1893
|
-
const prev = this.pane(splitbarIndex);
|
|
1894
|
-
const next = this.pane(splitbarIndex + 1);
|
|
1895
|
-
const total = prev.computedSize + next.computedSize;
|
|
1896
|
-
const px = s => this.toPixels(s);
|
|
1897
|
-
return {
|
|
1898
|
-
prev: {
|
|
1899
|
-
index: splitbarIndex,
|
|
1900
|
-
initialSize: prev.computedSize,
|
|
1901
|
-
min: px(prev.min) || total - px(next.max) || 0,
|
|
1902
|
-
max: px(prev.max) || total - px(next.min) || total
|
|
1903
|
-
},
|
|
1904
|
-
next: {
|
|
1905
|
-
index: splitbarIndex + 1,
|
|
1906
|
-
initialSize: next.computedSize,
|
|
1907
|
-
min: px(next.min) || total - px(prev.max) || 0,
|
|
1908
|
-
max: px(next.max) || total - px(prev.min) || total
|
|
1909
|
-
}
|
|
1910
|
-
};
|
|
1911
|
-
}
|
|
1912
|
-
setSize(state, delta) {
|
|
1913
|
-
const clamp = (min, max, v) => Math.min(max, Math.max(min, v));
|
|
1914
|
-
const resize = (paneState, change) => {
|
|
1915
|
-
const pane = this.pane(paneState.index);
|
|
1916
|
-
const splitterSize = this.containerSize();
|
|
1917
|
-
const newSize = clamp(paneState.min, paneState.max, paneState.initialSize + change);
|
|
1918
|
-
let size = "";
|
|
1919
|
-
if (this.isPercent(pane.size)) {
|
|
1920
|
-
size = (100 * newSize / splitterSize) + "%";
|
|
1921
|
-
}
|
|
1922
|
-
else {
|
|
1923
|
-
size = newSize + "px";
|
|
1924
|
-
}
|
|
1925
|
-
pane.size = size;
|
|
1926
|
-
pane.isResized = true;
|
|
1927
|
-
this.emit(pane.sizeChange, size);
|
|
1928
|
-
};
|
|
1929
|
-
// resizing both panes
|
|
1930
|
-
resize(state.prev, delta);
|
|
1931
|
-
resize(state.next, -delta);
|
|
1932
|
-
this.emit(this.layoutChange, {});
|
|
1933
|
-
}
|
|
1934
|
-
isDraggable(splitBarIndex) {
|
|
1935
|
-
const prev = this.pane(splitBarIndex);
|
|
1936
|
-
const next = this.pane(splitBarIndex + 1);
|
|
1937
|
-
const betweenResizablePanes = prev.resizable && next.resizable;
|
|
1938
|
-
const nearCollapsedPane = prev.collapsed || next.collapsed;
|
|
1939
|
-
return betweenResizablePanes && !nearCollapsedPane;
|
|
1940
|
-
}
|
|
1941
|
-
isStatic(splitBarIndex) {
|
|
1942
|
-
const prev = this.pane(splitBarIndex);
|
|
1943
|
-
const next = this.pane(splitBarIndex + 1);
|
|
1944
|
-
const betweenResizablePanes = prev.resizable && next.resizable;
|
|
1945
|
-
const nearCollapsiblePane = prev.collapsible || next.collapsible;
|
|
1946
|
-
return !betweenResizablePanes && !nearCollapsiblePane;
|
|
1947
|
-
}
|
|
1948
|
-
pane(index) {
|
|
1949
|
-
if (!this.panes) {
|
|
1950
|
-
throw new Error("Panes not initialized");
|
|
1951
|
-
}
|
|
1952
|
-
if (index < 0 || index >= this.panes.length) {
|
|
1953
|
-
throw new Error("Index out of range");
|
|
1954
|
-
}
|
|
1955
|
-
return this.panes[index];
|
|
1956
|
-
}
|
|
1957
|
-
configure({ panes, orientation, containerSize, direction }) {
|
|
1958
|
-
this.panes = panes;
|
|
1959
|
-
this.panes.forEach((pane, index) => {
|
|
1960
|
-
pane.order = index * 2;
|
|
1961
|
-
pane.orientation = orientation;
|
|
1962
|
-
});
|
|
1963
|
-
if (isDevMode()) {
|
|
1964
|
-
const allPanesWithSize = panes.length && !panes.some(pane => !pane.fixedSize);
|
|
1965
|
-
const hasResizedPane = panes.length && panes.some(pane => pane.isResized);
|
|
1966
|
-
if (allPanesWithSize && !hasResizedPane) {
|
|
1967
|
-
throw new Error(`
|
|
1968
|
-
The Splitter should have at least one pane without a set size.
|
|
1969
|
-
See ${SIZING_DOC_LINK} for more information.
|
|
1970
|
-
`);
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
this.containerSize = containerSize;
|
|
1974
|
-
this.rtl = direction === 'rtl';
|
|
1975
|
-
}
|
|
1976
|
-
isPercent(size) {
|
|
1977
|
-
return /%$/.test(size);
|
|
1978
|
-
}
|
|
1979
|
-
toPixels(size) {
|
|
1980
|
-
let result = parseFloat(size);
|
|
1981
|
-
if (this.isPercent(size)) {
|
|
1982
|
-
result = (this.containerSize() * result / 100);
|
|
1983
|
-
}
|
|
1984
|
-
return result;
|
|
1985
|
-
}
|
|
1986
|
-
emit(emitter, args) {
|
|
1987
|
-
if (emitter.observers.length) {
|
|
1988
|
-
this.zone.run(() => emitter.emit(args));
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
SplitterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1993
|
-
SplitterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService });
|
|
1994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterService, decorators: [{
|
|
1995
|
-
type: Injectable
|
|
1996
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
1997
|
-
|
|
1998
2028
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1999
2029
|
const stopPropagation = ({ originalEvent: event }) => {
|
|
2000
2030
|
event.stopPropagation();
|
|
@@ -2021,10 +2051,12 @@ class SplitterBarComponent {
|
|
|
2021
2051
|
this.renderer = renderer;
|
|
2022
2052
|
this.cdr = cdr;
|
|
2023
2053
|
this.ariaRole = 'separator';
|
|
2054
|
+
this.ariaLabel = 'Splitter pane';
|
|
2024
2055
|
this.focused = false;
|
|
2025
2056
|
this.orientation = 'horizontal';
|
|
2026
2057
|
this.index = 0;
|
|
2027
2058
|
this.subscriptions = new Subscription();
|
|
2059
|
+
this.parsedAttributes = {};
|
|
2028
2060
|
}
|
|
2029
2061
|
get hostOrientation() {
|
|
2030
2062
|
return this.orientation === 'horizontal' ? 'vertical' : 'horizontal';
|
|
@@ -2051,6 +2083,28 @@ class SplitterBarComponent {
|
|
|
2051
2083
|
get order() {
|
|
2052
2084
|
return 2 * this.index + 1;
|
|
2053
2085
|
}
|
|
2086
|
+
set htmlAttributes(attributes) {
|
|
2087
|
+
if (isObjectPresent(this.parsedAttributes)) {
|
|
2088
|
+
removeHTMLAttributes(this.parsedAttributes, this.renderer, this.element.nativeElement);
|
|
2089
|
+
}
|
|
2090
|
+
this._htmlAttributes = attributes;
|
|
2091
|
+
this.parsedAttributes = this.htmlAttributes ?
|
|
2092
|
+
parseAttributes(this.htmlAttributes, this.defaultAttributes) :
|
|
2093
|
+
this.htmlAttributes;
|
|
2094
|
+
this.setHtmlAttributes();
|
|
2095
|
+
}
|
|
2096
|
+
get htmlAttributes() {
|
|
2097
|
+
return this._htmlAttributes;
|
|
2098
|
+
}
|
|
2099
|
+
get defaultAttributes() {
|
|
2100
|
+
return {
|
|
2101
|
+
'aria-orientation': this.hostOrientation,
|
|
2102
|
+
role: this.ariaRole
|
|
2103
|
+
};
|
|
2104
|
+
}
|
|
2105
|
+
get mutableAttributes() {
|
|
2106
|
+
return { 'tabindex': this.tabIndex };
|
|
2107
|
+
}
|
|
2054
2108
|
ngOnInit() {
|
|
2055
2109
|
let state;
|
|
2056
2110
|
const listener = this.draggable.kendoPress.pipe(tap(stopPropagation), filter(() => this.splitterService.isDraggable(this.index)), tap(() => state = this.splitterService.dragState(this.index)), tap(() => this.splitterService.toggleContentOverlay(this.index, true)), switchMap(preventOnDblClick(this.draggable.kendoRelease)), switchMap(createMoveStream(this.draggable))).subscribe(({ pageX, pageY, originalX, originalY }) => {
|
|
@@ -2197,9 +2251,13 @@ class SplitterBarComponent {
|
|
|
2197
2251
|
this.splitterService.tryToggle(next);
|
|
2198
2252
|
}
|
|
2199
2253
|
}
|
|
2254
|
+
setHtmlAttributes() {
|
|
2255
|
+
const attributesToRender = { ...this.mutableAttributes, ...this.parsedAttributes };
|
|
2256
|
+
setHTMLAttributes(attributesToRender, this.renderer, this.element.nativeElement);
|
|
2257
|
+
}
|
|
2200
2258
|
}
|
|
2201
2259
|
SplitterBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterBarComponent, deps: [{ token: i1$1.DraggableDirective, host: true }, { token: i1.LocalizationService }, { token: SplitterService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2202
|
-
SplitterBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterBarComponent, isStandalone: true, selector: "kendo-splitter-bar", inputs: { orientation: "orientation", index: "index" }, host: { properties: { "attr.role": "this.ariaRole", "class.k-focus": "this.focused", "attr.aria-orientation": "this.hostOrientation", "attr.tabindex": "this.tabIndex", "class": "this.hostClasses", "style.-ms-flex-order": "this.order", "style.order": "this.order" } }, ngImport: i0, template: `
|
|
2260
|
+
SplitterBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterBarComponent, isStandalone: true, selector: "kendo-splitter-bar", inputs: { orientation: "orientation", index: "index", htmlAttributes: "htmlAttributes" }, host: { properties: { "attr.role": "this.ariaRole", "attr.aria-label": "this.ariaLabel", "class.k-focus": "this.focused", "attr.aria-orientation": "this.hostOrientation", "attr.tabindex": "this.tabIndex", "class": "this.hostClasses", "style.-ms-flex-order": "this.order", "style.order": "this.order" } }, ngImport: i0, template: `
|
|
2203
2261
|
<div *ngIf="shouldShowIcon('prev')" class="k-collapse-prev" (click)="togglePrevious()">
|
|
2204
2262
|
<kendo-icon-wrapper
|
|
2205
2263
|
size="xsmall"
|
|
@@ -2245,6 +2303,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2245
2303
|
}] }, { type: i1.LocalizationService }, { type: SplitterService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { ariaRole: [{
|
|
2246
2304
|
type: HostBinding,
|
|
2247
2305
|
args: ['attr.role']
|
|
2306
|
+
}], ariaLabel: [{
|
|
2307
|
+
type: HostBinding,
|
|
2308
|
+
args: ['attr.aria-label']
|
|
2248
2309
|
}], focused: [{
|
|
2249
2310
|
type: HostBinding,
|
|
2250
2311
|
args: ['class.k-focus']
|
|
@@ -2267,6 +2328,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2267
2328
|
type: Input
|
|
2268
2329
|
}], index: [{
|
|
2269
2330
|
type: Input
|
|
2331
|
+
}], htmlAttributes: [{
|
|
2332
|
+
type: Input
|
|
2270
2333
|
}] } });
|
|
2271
2334
|
|
|
2272
2335
|
/**
|
|
@@ -2349,6 +2412,7 @@ class SplitterComponent {
|
|
|
2349
2412
|
return this.direction;
|
|
2350
2413
|
}
|
|
2351
2414
|
set splitbars(splitbars) {
|
|
2415
|
+
this.splitterService.splitterBars = splitbars ? splitbars.toArray() : [];
|
|
2352
2416
|
if (!isPresent(splitbars) || !isPresent(this.panes)) {
|
|
2353
2417
|
return;
|
|
2354
2418
|
}
|
|
@@ -2361,9 +2425,9 @@ class SplitterComponent {
|
|
|
2361
2425
|
.sort((a, b) => a.order - b.order);
|
|
2362
2426
|
const elements = components.map(component => component.element.nativeElement);
|
|
2363
2427
|
panesArray.forEach((pane, i) => {
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2428
|
+
const splitbar = splitBarsArray[i];
|
|
2429
|
+
if (splitbar && pane.splitterBarAttributes) {
|
|
2430
|
+
splitbar.htmlAttributes = pane.splitterBarAttributes;
|
|
2367
2431
|
}
|
|
2368
2432
|
});
|
|
2369
2433
|
elements.forEach(element => this.renderer.appendChild(this.element.nativeElement, element));
|
|
@@ -2413,7 +2477,7 @@ class SplitterComponent {
|
|
|
2413
2477
|
}
|
|
2414
2478
|
}
|
|
2415
2479
|
SplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, deps: [{ token: i0.ElementRef }, { token: SplitterService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: SplitterPaneComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2416
|
-
SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2480
|
+
SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SplitterComponent, isStandalone: true, selector: "kendo-splitter", inputs: { orientation: "orientation", splitbarWidth: "splitbarWidth", resizeStep: "resizeStep", splitterBarClass: "splitterBarClass" }, outputs: { layoutChange: "layoutChange" }, host: { properties: { "class.k-splitter": "this.hostClasses", "class.k-splitter-flex": "this.hostClasses", "class.k-splitter-horizontal": "this.horizontalHostClasses", "class.k-splitter-vertical": "this.verticalHostClasses", "attr.dir": "this.dir" } }, providers: [
|
|
2417
2481
|
SplitterService,
|
|
2418
2482
|
LocalizationService,
|
|
2419
2483
|
{
|
|
@@ -2432,13 +2496,14 @@ SplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
2432
2496
|
*ngIf="!last"
|
|
2433
2497
|
[index]="index"
|
|
2434
2498
|
[orientation]="orientation"
|
|
2499
|
+
[ngClass]="pane.splitterBarClass || splitterBarClass"
|
|
2435
2500
|
[ngStyle]="{
|
|
2436
2501
|
width: orientation === 'horizontal' ? splitbarWidth + 'px' : undefined,
|
|
2437
2502
|
height: orientation === 'vertical' ? splitbarWidth + 'px' : undefined
|
|
2438
2503
|
}">
|
|
2439
2504
|
</kendo-splitter-bar>
|
|
2440
2505
|
</ng-container>
|
|
2441
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SplitterBarComponent, selector: "kendo-splitter-bar", inputs: ["orientation", "index"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
2506
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SplitterBarComponent, selector: "kendo-splitter-bar", inputs: ["orientation", "index", "htmlAttributes"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2442
2507
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitterComponent, decorators: [{
|
|
2443
2508
|
type: Component,
|
|
2444
2509
|
args: [{
|
|
@@ -2464,6 +2529,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2464
2529
|
*ngIf="!last"
|
|
2465
2530
|
[index]="index"
|
|
2466
2531
|
[orientation]="orientation"
|
|
2532
|
+
[ngClass]="pane.splitterBarClass || splitterBarClass"
|
|
2467
2533
|
[ngStyle]="{
|
|
2468
2534
|
width: orientation === 'horizontal' ? splitbarWidth + 'px' : undefined,
|
|
2469
2535
|
height: orientation === 'vertical' ? splitbarWidth + 'px' : undefined
|
|
@@ -2472,7 +2538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2472
2538
|
</ng-container>
|
|
2473
2539
|
`,
|
|
2474
2540
|
standalone: true,
|
|
2475
|
-
imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle]
|
|
2541
|
+
imports: [NgFor, NgIf, SplitterBarComponent, DraggableDirective, NgStyle, NgClass]
|
|
2476
2542
|
}]
|
|
2477
2543
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SplitterService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: SplitterPaneComponent, decorators: [{
|
|
2478
2544
|
type: Optional
|
|
@@ -2487,6 +2553,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2487
2553
|
type: Input
|
|
2488
2554
|
}], resizeStep: [{
|
|
2489
2555
|
type: Input
|
|
2556
|
+
}], splitterBarClass: [{
|
|
2557
|
+
type: Input
|
|
2490
2558
|
}], layoutChange: [{
|
|
2491
2559
|
type: Output
|
|
2492
2560
|
}], hostClasses: [{
|
|
@@ -3441,11 +3509,13 @@ class TabComponent {
|
|
|
3441
3509
|
}
|
|
3442
3510
|
}
|
|
3443
3511
|
TabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TabComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3444
|
-
TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TabComponent, isStandalone: true, selector: "[kendoTabStripTab]", inputs: { tab: "tab", index: "index", tabStripClosable: "tabStripClosable", tabStripCloseIcon: "tabStripCloseIcon", customTabstripCloseIcon: "customTabstripCloseIcon", closeSVGIcon: "closeSVGIcon" }, outputs: { tabClose: "tabClose" }, host: { properties: { "class.k-item": "this.hostClasses", "
|
|
3512
|
+
TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TabComponent, isStandalone: true, selector: "[kendoTabStripTab]", inputs: { tab: "tab", index: "index", tabStripClosable: "tabStripClosable", tabStripCloseIcon: "tabStripCloseIcon", customTabstripCloseIcon: "customTabstripCloseIcon", closeSVGIcon: "closeSVGIcon" }, outputs: { tabClose: "tabClose" }, host: { properties: { "class.k-item": "this.hostClasses", "attr.aria-selected": "this.activeClass", "class.k-active": "this.activeClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-focus": "this.focusedClass", "attr.tabindex": "this.tabIndex" } }, ngImport: i0, template: `
|
|
3445
3513
|
<ng-container *ngIf="!tab.tabTemplate; else tabTemplate">
|
|
3446
|
-
<span class="k-link" *ngIf="!tab.tabTitle">
|
|
3514
|
+
<span class="k-link" *ngIf="!tab.tabTitle">
|
|
3515
|
+
<span class="k-link-text">{{ tab.title }}</span>
|
|
3516
|
+
</span>
|
|
3447
3517
|
<span class="k-link" *ngIf="tab.tabTitle">
|
|
3448
|
-
<ng-template [ngTemplateOutlet]="tab.tabTitle
|
|
3518
|
+
<ng-template [ngTemplateOutlet]="tab.tabTitle.templateRef">
|
|
3449
3519
|
</ng-template>
|
|
3450
3520
|
</span>
|
|
3451
3521
|
</ng-container>
|
|
@@ -3467,7 +3537,7 @@ TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
3467
3537
|
(click)="closeTab(index)"
|
|
3468
3538
|
class="k-remove-tab k-icon-button"
|
|
3469
3539
|
></button>
|
|
3470
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
3540
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
3471
3541
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TabComponent, decorators: [{
|
|
3472
3542
|
type: Component,
|
|
3473
3543
|
args: [{
|
|
@@ -3475,9 +3545,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3475
3545
|
selector: '[kendoTabStripTab]',
|
|
3476
3546
|
template: `
|
|
3477
3547
|
<ng-container *ngIf="!tab.tabTemplate; else tabTemplate">
|
|
3478
|
-
<span class="k-link" *ngIf="!tab.tabTitle">
|
|
3548
|
+
<span class="k-link" *ngIf="!tab.tabTitle">
|
|
3549
|
+
<span class="k-link-text">{{ tab.title }}</span>
|
|
3550
|
+
</span>
|
|
3479
3551
|
<span class="k-link" *ngIf="tab.tabTitle">
|
|
3480
|
-
<ng-template [ngTemplateOutlet]="tab.tabTitle
|
|
3552
|
+
<ng-template [ngTemplateOutlet]="tab.tabTitle.templateRef">
|
|
3481
3553
|
</ng-template>
|
|
3482
3554
|
</span>
|
|
3483
3555
|
</ng-container>
|
|
@@ -3520,9 +3592,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3520
3592
|
}], hostClasses: [{
|
|
3521
3593
|
type: HostBinding,
|
|
3522
3594
|
args: ['class.k-item']
|
|
3523
|
-
}, {
|
|
3524
|
-
type: HostBinding,
|
|
3525
|
-
args: ['class.k-tabstrip-item']
|
|
3526
3595
|
}], activeClass: [{
|
|
3527
3596
|
type: HostBinding,
|
|
3528
3597
|
args: ['attr.aria-selected']
|
|
@@ -3611,6 +3680,12 @@ class TabStripComponent {
|
|
|
3611
3680
|
* @default true
|
|
3612
3681
|
*/
|
|
3613
3682
|
this.animate = true;
|
|
3683
|
+
/**
|
|
3684
|
+
* Sets the alignment of the tabs.
|
|
3685
|
+
*
|
|
3686
|
+
* @default: 'start'
|
|
3687
|
+
*/
|
|
3688
|
+
this.tabAlignment = 'start';
|
|
3614
3689
|
/**
|
|
3615
3690
|
* Sets the position of the tabs. Defaults to `top`.
|
|
3616
3691
|
*
|
|
@@ -3799,35 +3874,6 @@ class TabStripComponent {
|
|
|
3799
3874
|
this.activeStateChangeSub.unsubscribe();
|
|
3800
3875
|
}
|
|
3801
3876
|
}
|
|
3802
|
-
/**
|
|
3803
|
-
* @hidden
|
|
3804
|
-
*/
|
|
3805
|
-
get tabsAlignmentStyles() {
|
|
3806
|
-
return {
|
|
3807
|
-
start: 'flex-start',
|
|
3808
|
-
end: 'flex-end',
|
|
3809
|
-
center: 'center',
|
|
3810
|
-
justify: 'space-between'
|
|
3811
|
-
}[this.tabAlignment];
|
|
3812
|
-
}
|
|
3813
|
-
/**
|
|
3814
|
-
* @hidden
|
|
3815
|
-
*/
|
|
3816
|
-
get tabListWidth() {
|
|
3817
|
-
if (this.tabPosition === 'top' || this.tabPosition === 'bottom') {
|
|
3818
|
-
return '100%';
|
|
3819
|
-
}
|
|
3820
|
-
return null;
|
|
3821
|
-
}
|
|
3822
|
-
/**
|
|
3823
|
-
* @hidden
|
|
3824
|
-
*/
|
|
3825
|
-
get tabListHeight() {
|
|
3826
|
-
if (this.tabPosition === 'left' || this.tabPosition === 'right') {
|
|
3827
|
-
return '100%';
|
|
3828
|
-
}
|
|
3829
|
-
return null;
|
|
3830
|
-
}
|
|
3831
3877
|
/**
|
|
3832
3878
|
* @hidden
|
|
3833
3879
|
*/
|
|
@@ -3979,7 +4025,7 @@ class TabStripComponent {
|
|
|
3979
4025
|
}
|
|
3980
4026
|
}
|
|
3981
4027
|
TabStripComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TabStripComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: TabStripService }, { token: ScrollService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3982
|
-
TabStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TabStripComponent, isStandalone: true, selector: "kendo-tabstrip", inputs: { height: "height", animate: "animate", tabAlignment: "tabAlignment", tabPosition: "tabPosition", keepTabContent: "keepTabContent", closable: "closable", scrollable: "scrollable", closeIcon: "closeIcon", closeIconClass: "closeIconClass", closeSVGIcon: "closeSVGIcon", showContentArea: "showContentArea" }, outputs: { tabSelect: "tabSelect", tabClose: "tabClose", tabScroll: "tabScroll" }, host: { properties: { "class.k-tabstrip": "this.hostClasses", "class.k-
|
|
4028
|
+
TabStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TabStripComponent, isStandalone: true, selector: "kendo-tabstrip", inputs: { height: "height", animate: "animate", tabAlignment: "tabAlignment", tabPosition: "tabPosition", keepTabContent: "keepTabContent", closable: "closable", scrollable: "scrollable", closeIcon: "closeIcon", closeIconClass: "closeIconClass", closeSVGIcon: "closeSVGIcon", showContentArea: "showContentArea" }, outputs: { tabSelect: "tabSelect", tabClose: "tabClose", tabScroll: "tabScroll" }, host: { properties: { "class.k-tabstrip": "this.hostClasses", "class.k-header": "this.hostClasses", "class.k-tabstrip-top": "this.tabsAtTop", "class.k-tabstrip-right": "this.tabsAtRight", "class.k-tabstrip-bottom": "this.tabsAtBottom", "class.k-tabstrip-left": "this.tabsAtLeft", "attr.dir": "this.dir", "class.k-tabstrip-scrollable": "this.tabStripScrollable" } }, providers: [
|
|
3983
4029
|
TabStripService,
|
|
3984
4030
|
ScrollService,
|
|
3985
4031
|
LocalizationService,
|
|
@@ -4024,20 +4070,26 @@ TabStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
4024
4070
|
[prev]="true"
|
|
4025
4071
|
[title]="localization.get('previousTabButton')"
|
|
4026
4072
|
(tabScroll)="tabScroll.emit($event)"
|
|
4027
|
-
class="k-icon-button k-button k-button-md k-
|
|
4073
|
+
class="k-icon-button k-button k-button-md k-button-flat k-button-flat-base"
|
|
4028
4074
|
(onClick)="onScrollButtonClick($event)">
|
|
4029
4075
|
</span>
|
|
4030
4076
|
<ul role="tablist" #tablist
|
|
4031
4077
|
class="k-reset k-tabstrip-items"
|
|
4032
|
-
[
|
|
4033
|
-
|
|
4034
|
-
|
|
4078
|
+
[ngClass]="{
|
|
4079
|
+
'k-tabstrip-items-start': tabAlignment === 'start',
|
|
4080
|
+
'k-tabstrip-items-center': tabAlignment === 'center',
|
|
4081
|
+
'k-tabstrip-items-end': tabAlignment === 'end',
|
|
4082
|
+
'k-tabstrip-items-stretched': tabAlignment === 'stretched',
|
|
4083
|
+
'k-tabstrip-items-justify': tabAlignment === 'justify'
|
|
4084
|
+
}"
|
|
4035
4085
|
[attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
|
|
4036
4086
|
>
|
|
4037
4087
|
<ng-container *ngFor="let tab of tabs; let i = index;">
|
|
4038
4088
|
<li
|
|
4039
4089
|
#tabHeaderContainer
|
|
4040
4090
|
kendoTabStripTab
|
|
4091
|
+
[class.k-first]="i === 0"
|
|
4092
|
+
[class.k-last]="i === tabs.length - 1"
|
|
4041
4093
|
[ngClass]="tab.cssClass"
|
|
4042
4094
|
[ngStyle]="tab.cssStyle"
|
|
4043
4095
|
[tab]="tab"
|
|
@@ -4063,7 +4115,7 @@ TabStripComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
4063
4115
|
[prev]="false"
|
|
4064
4116
|
[title]="localization.get('nextTabButton')"
|
|
4065
4117
|
(tabScroll)="tabScroll.emit($event)"
|
|
4066
|
-
class="k-icon-button k-button k-button-md k-
|
|
4118
|
+
class="k-icon-button k-button k-button-md k-button-flat k-button-flat-base"
|
|
4067
4119
|
(onClick)="onScrollButtonClick($event)"></span>
|
|
4068
4120
|
</div>
|
|
4069
4121
|
</ng-template>
|
|
@@ -4156,20 +4208,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4156
4208
|
[prev]="true"
|
|
4157
4209
|
[title]="localization.get('previousTabButton')"
|
|
4158
4210
|
(tabScroll)="tabScroll.emit($event)"
|
|
4159
|
-
class="k-icon-button k-button k-button-md k-
|
|
4211
|
+
class="k-icon-button k-button k-button-md k-button-flat k-button-flat-base"
|
|
4160
4212
|
(onClick)="onScrollButtonClick($event)">
|
|
4161
4213
|
</span>
|
|
4162
4214
|
<ul role="tablist" #tablist
|
|
4163
4215
|
class="k-reset k-tabstrip-items"
|
|
4164
|
-
[
|
|
4165
|
-
|
|
4166
|
-
|
|
4216
|
+
[ngClass]="{
|
|
4217
|
+
'k-tabstrip-items-start': tabAlignment === 'start',
|
|
4218
|
+
'k-tabstrip-items-center': tabAlignment === 'center',
|
|
4219
|
+
'k-tabstrip-items-end': tabAlignment === 'end',
|
|
4220
|
+
'k-tabstrip-items-stretched': tabAlignment === 'stretched',
|
|
4221
|
+
'k-tabstrip-items-justify': tabAlignment === 'justify'
|
|
4222
|
+
}"
|
|
4167
4223
|
[attr.aria-orientation]="tabPosition === 'left' || tabPosition === 'right' ? 'vertical' : 'horizontal'"
|
|
4168
4224
|
>
|
|
4169
4225
|
<ng-container *ngFor="let tab of tabs; let i = index;">
|
|
4170
4226
|
<li
|
|
4171
4227
|
#tabHeaderContainer
|
|
4172
4228
|
kendoTabStripTab
|
|
4229
|
+
[class.k-first]="i === 0"
|
|
4230
|
+
[class.k-last]="i === tabs.length - 1"
|
|
4173
4231
|
[ngClass]="tab.cssClass"
|
|
4174
4232
|
[ngStyle]="tab.cssStyle"
|
|
4175
4233
|
[tab]="tab"
|
|
@@ -4195,7 +4253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4195
4253
|
[prev]="false"
|
|
4196
4254
|
[title]="localization.get('nextTabButton')"
|
|
4197
4255
|
(tabScroll)="tabScroll.emit($event)"
|
|
4198
|
-
class="k-icon-button k-button k-button-md k-
|
|
4256
|
+
class="k-icon-button k-button k-button-md k-button-flat k-button-flat-base"
|
|
4199
4257
|
(onClick)="onScrollButtonClick($event)"></span>
|
|
4200
4258
|
</div>
|
|
4201
4259
|
</ng-template>
|
|
@@ -4256,7 +4314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4256
4314
|
args: ['class.k-tabstrip']
|
|
4257
4315
|
}, {
|
|
4258
4316
|
type: HostBinding,
|
|
4259
|
-
args: ['class.k-
|
|
4317
|
+
args: ['class.k-header']
|
|
4260
4318
|
}], tabsAtTop: [{
|
|
4261
4319
|
type: HostBinding,
|
|
4262
4320
|
args: ['class.k-tabstrip-top']
|
|
@@ -10420,7 +10478,7 @@ TimelineCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
10420
10478
|
</kendo-card-actions>
|
|
10421
10479
|
</div>
|
|
10422
10480
|
</kendo-card>
|
|
10423
|
-
`, isInline: true, dependencies: [{ kind: "component", type: CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CardHeaderComponent, selector: "kendo-card-header" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CardTitleDirective, selector: "[kendoCardTitle]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
10481
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CardHeaderComponent, selector: "kendo-card-header" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CardTitleDirective, selector: "[kendoCardTitle]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: CardSubtitleDirective, selector: "[kendoCardSubtitle]" }, { kind: "component", type: CardBodyComponent, selector: "kendo-card-body" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CardMediaDirective, selector: "[kendoCardMedia]" }, { kind: "component", type: CardActionsComponent, selector: "kendo-card-actions", inputs: ["orientation", "layout", "actions"], outputs: ["action"] }], animations: [
|
|
10424
10482
|
trigger('toggle', [
|
|
10425
10483
|
state('collapsed', style({
|
|
10426
10484
|
height: '0',
|
|
@@ -11133,7 +11191,7 @@ TimelineHorizontalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
|
11133
11191
|
</li>
|
|
11134
11192
|
</ul>
|
|
11135
11193
|
</div>
|
|
11136
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
11194
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TimelineCardComponent, selector: "kendo-timeline-card", inputs: ["event", "expanded", "collapsible", "reversed", "orientation", "navigable", "tabIndex", "animationDuration", "index", "eventWidth", "eventHeight", "headerTemplate", "bodyTemplate", "actionsTemplate", "calloutStyle"], exportAs: ["kendoTimelineCard"] }, { kind: "pipe", type: DatePipe, name: "kendoDate" }], animations: [
|
|
11137
11195
|
trigger('trackSlide', [
|
|
11138
11196
|
state('left', style({
|
|
11139
11197
|
transform: `translateX({{transformValue}}%)`,
|