@progress/kendo-angular-layout 6.4.0 → 6.4.2-dev.202201271101

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