@skyux/tabs 8.9.0 → 8.10.0

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.
@@ -1,12 +1,12 @@
1
1
  import * as i4 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { NgModule, Injectable, Component, ChangeDetectionStrategy, Optional, Input, ViewChild, HostListener, ContentChildren, EventEmitter, Output, ViewEncapsulation, inject, HostBinding, Pipe } from '@angular/core';
4
+ import { NgModule, Injectable, Component, ChangeDetectionStrategy, Optional, Input, ViewChild, HostListener, ContentChildren, EventEmitter, Output, ViewEncapsulation, HostBinding, Pipe, inject } from '@angular/core';
5
5
  import { SkyCheckboxModule } from '@skyux/forms';
6
6
  import * as i7 from '@skyux/theme';
7
7
  import { SkyThemeModule } from '@skyux/theme';
8
8
  import * as i1 from '@skyux/core';
9
- import { SkyMediaBreakpoints, SkyMediaQueryService, SkyIdModule, SkyResizeObserverMediaQueryService, SkyLayoutHostService } from '@skyux/core';
9
+ import { SkyMediaBreakpoints, SkyMediaQueryService, SkyIdModule, SkyLayoutHostService } from '@skyux/core';
10
10
  import * as i6 from '@skyux/indicators';
11
11
  import { SkyIconModule, SkyExpansionIndicatorModule, SkyStatusIndicatorModule } from '@skyux/indicators';
12
12
  import * as i3 from '@skyux/i18n';
@@ -1666,7 +1666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1666
1666
  type: Injectable
1667
1667
  }], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }, { type: i4.Location }, { type: i1$1.Router }]; } });
1668
1668
 
1669
- var _SkyTabComponent_instances, _SkyTabComponent__active, _SkyTabComponent_activeChange, _SkyTabComponent__permalinkValue, _SkyTabComponent_stateChange, _SkyTabComponent__tabHeading, _SkyTabComponent__tabIndex, _SkyTabComponent__layout, _SkyTabComponent__tabElement, _SkyTabComponent_tabIndexChange, _SkyTabComponent_observingTab, _SkyTabComponent_changeDetector, _SkyTabComponent_permalinkService, _SkyTabComponent_tabsetService, _SkyTabComponent_mediaQueryService, _SkyTabComponent_setPermalinkValueOrDefault, _SkyTabComponent_observeTabResize;
1669
+ var _SkyTabComponent_instances, _SkyTabComponent__active, _SkyTabComponent_activeChange, _SkyTabComponent__permalinkValue, _SkyTabComponent_stateChange, _SkyTabComponent__tabHeading, _SkyTabComponent__tabIndex, _SkyTabComponent__layout, _SkyTabComponent_tabIndexChange, _SkyTabComponent_changeDetector, _SkyTabComponent_permalinkService, _SkyTabComponent_tabsetService, _SkyTabComponent_setPermalinkValueOrDefault;
1670
1670
  const LAYOUT_CLASS_PREFIX = 'sky-layout-host-';
1671
1671
  const LAYOUT_DEFAULT = 'none';
1672
1672
  let nextId = 0;
@@ -1745,7 +1745,6 @@ class SkyTabComponent {
1745
1745
  const layout = value || LAYOUT_DEFAULT;
1746
1746
  __classPrivateFieldSet(this, _SkyTabComponent__layout, layout, "f");
1747
1747
  this.cssClass = `${LAYOUT_CLASS_PREFIX}${layout}`;
1748
- __classPrivateFieldGet(this, _SkyTabComponent_instances, "m", _SkyTabComponent_observeTabResize).call(this);
1749
1748
  if (this.active) {
1750
1749
  __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").updateActiveTabLayout(layout);
1751
1750
  }
@@ -1762,13 +1761,6 @@ class SkyTabComponent {
1762
1761
  get tabIndexChange() {
1763
1762
  return __classPrivateFieldGet(this, _SkyTabComponent_tabIndexChange, "f");
1764
1763
  }
1765
- set tabContentWrapper(tabContentWrapper) {
1766
- __classPrivateFieldSet(this, _SkyTabComponent__tabElement, tabContentWrapper, "f");
1767
- __classPrivateFieldGet(this, _SkyTabComponent_instances, "m", _SkyTabComponent_observeTabResize).call(this);
1768
- }
1769
- get tabContentWrapper() {
1770
- return __classPrivateFieldGet(this, _SkyTabComponent__tabElement, "f");
1771
- }
1772
1764
  constructor(changeDetector, permalinkService, tabsetService) {
1773
1765
  _SkyTabComponent_instances.add(this);
1774
1766
  this.cssClass = `${LAYOUT_CLASS_PREFIX}${LAYOUT_DEFAULT}`;
@@ -1787,13 +1779,10 @@ class SkyTabComponent {
1787
1779
  _SkyTabComponent__tabHeading.set(this, void 0);
1788
1780
  _SkyTabComponent__tabIndex.set(this, void 0);
1789
1781
  _SkyTabComponent__layout.set(this, LAYOUT_DEFAULT);
1790
- _SkyTabComponent__tabElement.set(this, void 0);
1791
1782
  _SkyTabComponent_tabIndexChange.set(this, void 0);
1792
- _SkyTabComponent_observingTab.set(this, false);
1793
1783
  _SkyTabComponent_changeDetector.set(this, void 0);
1794
1784
  _SkyTabComponent_permalinkService.set(this, void 0);
1795
1785
  _SkyTabComponent_tabsetService.set(this, void 0);
1796
- _SkyTabComponent_mediaQueryService.set(this, inject(SkyResizeObserverMediaQueryService));
1797
1786
  __classPrivateFieldSet(this, _SkyTabComponent_changeDetector, changeDetector, "f");
1798
1787
  __classPrivateFieldSet(this, _SkyTabComponent_permalinkService, permalinkService, "f");
1799
1788
  __classPrivateFieldSet(this, _SkyTabComponent_tabsetService, tabsetService, "f");
@@ -1812,9 +1801,6 @@ class SkyTabComponent {
1812
1801
  (changes['permalinkValue'] && !changes['permalinkValue'].firstChange)) {
1813
1802
  __classPrivateFieldGet(this, _SkyTabComponent_stateChange, "f").next();
1814
1803
  }
1815
- if (changes['layout'] && changes['layout'].currentValue === 'none') {
1816
- __classPrivateFieldGet(this, _SkyTabComponent_mediaQueryService, "f").unobserve();
1817
- }
1818
1804
  }
1819
1805
  ngOnDestroy() {
1820
1806
  __classPrivateFieldGet(this, _SkyTabComponent_activeChange, "f").complete();
@@ -1823,8 +1809,6 @@ class SkyTabComponent {
1823
1809
  if (this.tabIndex !== undefined) {
1824
1810
  __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").unregisterTab(this.tabIndex);
1825
1811
  }
1826
- __classPrivateFieldGet(this, _SkyTabComponent_mediaQueryService, "f").unobserve();
1827
- __classPrivateFieldSet(this, _SkyTabComponent_observingTab, false, "f");
1828
1812
  }
1829
1813
  init() {
1830
1814
  __classPrivateFieldSet(this, _SkyTabComponent__tabIndex, __classPrivateFieldGet(this, _SkyTabComponent_tabsetService, "f").registerTab(this.tabIndex), "f");
@@ -1843,41 +1827,16 @@ class SkyTabComponent {
1843
1827
  return this.close.observers.length > 0;
1844
1828
  }
1845
1829
  }
1846
- _SkyTabComponent__active = new WeakMap(), _SkyTabComponent_activeChange = new WeakMap(), _SkyTabComponent__permalinkValue = new WeakMap(), _SkyTabComponent_stateChange = new WeakMap(), _SkyTabComponent__tabHeading = new WeakMap(), _SkyTabComponent__tabIndex = new WeakMap(), _SkyTabComponent__layout = new WeakMap(), _SkyTabComponent__tabElement = new WeakMap(), _SkyTabComponent_tabIndexChange = new WeakMap(), _SkyTabComponent_observingTab = new WeakMap(), _SkyTabComponent_changeDetector = new WeakMap(), _SkyTabComponent_permalinkService = new WeakMap(), _SkyTabComponent_tabsetService = new WeakMap(), _SkyTabComponent_mediaQueryService = new WeakMap(), _SkyTabComponent_instances = new WeakSet(), _SkyTabComponent_setPermalinkValueOrDefault = function _SkyTabComponent_setPermalinkValueOrDefault() {
1830
+ _SkyTabComponent__active = new WeakMap(), _SkyTabComponent_activeChange = new WeakMap(), _SkyTabComponent__permalinkValue = new WeakMap(), _SkyTabComponent_stateChange = new WeakMap(), _SkyTabComponent__tabHeading = new WeakMap(), _SkyTabComponent__tabIndex = new WeakMap(), _SkyTabComponent__layout = new WeakMap(), _SkyTabComponent_tabIndexChange = new WeakMap(), _SkyTabComponent_changeDetector = new WeakMap(), _SkyTabComponent_permalinkService = new WeakMap(), _SkyTabComponent_tabsetService = new WeakMap(), _SkyTabComponent_instances = new WeakSet(), _SkyTabComponent_setPermalinkValueOrDefault = function _SkyTabComponent_setPermalinkValueOrDefault() {
1847
1831
  this.permalinkValueOrDefault =
1848
1832
  __classPrivateFieldGet(this, _SkyTabComponent_permalinkService, "f").urlify(this.permalinkValue) ||
1849
1833
  __classPrivateFieldGet(this, _SkyTabComponent_permalinkService, "f").urlify(this.tabHeading);
1850
- }, _SkyTabComponent_observeTabResize = function _SkyTabComponent_observeTabResize() {
1851
- if (this.tabContentWrapper) {
1852
- if (this.layout !== 'none' && !__classPrivateFieldGet(this, _SkyTabComponent_observingTab, "f")) {
1853
- __classPrivateFieldSet(this, _SkyTabComponent_observingTab, true, "f");
1854
- __classPrivateFieldGet(this, _SkyTabComponent_mediaQueryService, "f").observe(this.tabContentWrapper, {
1855
- updateResponsiveClasses: true,
1856
- });
1857
- }
1858
- else if (this.layout === 'none' && __classPrivateFieldGet(this, _SkyTabComponent_observingTab, "f")) {
1859
- __classPrivateFieldSet(this, _SkyTabComponent_observingTab, false, "f");
1860
- __classPrivateFieldGet(this, _SkyTabComponent_mediaQueryService, "f").unobserve();
1861
- }
1862
- }
1863
1834
  };
1864
1835
  SkyTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyTabComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyTabsetPermalinkService }, { token: SkyTabsetService }], target: i0.ɵɵFactoryTarget.Component });
1865
- SkyTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SkyTabComponent, selector: "sky-tab", inputs: { active: "active", disabled: "disabled", permalinkValue: "permalinkValue", tabHeaderCount: "tabHeaderCount", tabHeading: "tabHeading", tabIndex: "tabIndex", layout: "layout" }, outputs: { close: "close" }, host: { properties: { "class": "this.cssClass" } }, providers: [
1866
- SkyResizeObserverMediaQueryService,
1867
- {
1868
- provide: SkyMediaQueryService,
1869
- useExisting: SkyResizeObserverMediaQueryService,
1870
- },
1871
- ], viewQueries: [{ propertyName: "tabContentWrapper", first: true, predicate: ["tabContentWrapper"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"sky-tab\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tabButtonId\"\n [hidden]=\"!showContent\"\n [id]=\"tabPanelId\"\n #tabContentWrapper\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host.sky-layout-host-fit{display:flex;flex-grow:1;position:static}:host.sky-layout-host-fit .sky-tab{flex-grow:1;position:relative}.sky-tab{flex-grow:var(--sky-layout-host-content-flex-grow, 0);overflow:var(--sky-layout-host-content-overflow, visible);padding:var(--sky-layout-host-content-spacing, 0);position:var(--sky-layout-host-content-position, static)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1836
+ SkyTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: SkyTabComponent, selector: "sky-tab", inputs: { active: "active", disabled: "disabled", permalinkValue: "permalinkValue", tabHeaderCount: "tabHeaderCount", tabHeading: "tabHeading", tabIndex: "tabIndex", layout: "layout" }, outputs: { close: "close" }, host: { properties: { "class": "this.cssClass" } }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"sky-tab\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tabButtonId\"\n [hidden]=\"!showContent\"\n [id]=\"tabPanelId\"\n #tabContentWrapper\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host.sky-layout-host-fit{display:flex;flex-grow:1;position:static}:host.sky-layout-host-fit .sky-tab{flex-grow:1;position:relative}.sky-tab{flex-grow:var(--sky-layout-host-content-flex-grow, 0);overflow:var(--sky-layout-host-content-overflow, visible);padding:var(--sky-layout-host-content-spacing, 0);position:var(--sky-layout-host-content-position, static)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1872
1837
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SkyTabComponent, decorators: [{
1873
1838
  type: Component,
1874
- args: [{ selector: 'sky-tab', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1875
- SkyResizeObserverMediaQueryService,
1876
- {
1877
- provide: SkyMediaQueryService,
1878
- useExisting: SkyResizeObserverMediaQueryService,
1879
- },
1880
- ], template: "<div\n class=\"sky-tab\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tabButtonId\"\n [hidden]=\"!showContent\"\n [id]=\"tabPanelId\"\n #tabContentWrapper\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host.sky-layout-host-fit{display:flex;flex-grow:1;position:static}:host.sky-layout-host-fit .sky-tab{flex-grow:1;position:relative}.sky-tab{flex-grow:var(--sky-layout-host-content-flex-grow, 0);overflow:var(--sky-layout-host-content-overflow, visible);padding:var(--sky-layout-host-content-spacing, 0);position:var(--sky-layout-host-content-position, static)}\n"] }]
1839
+ args: [{ selector: 'sky-tab', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"sky-tab\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tabButtonId\"\n [hidden]=\"!showContent\"\n [id]=\"tabPanelId\"\n #tabContentWrapper\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host.sky-layout-host-fit{display:flex;flex-grow:1;position:static}:host.sky-layout-host-fit .sky-tab{flex-grow:1;position:relative}.sky-tab{flex-grow:var(--sky-layout-host-content-flex-grow, 0);overflow:var(--sky-layout-host-content-overflow, visible);padding:var(--sky-layout-host-content-spacing, 0);position:var(--sky-layout-host-content-position, static)}\n"] }]
1881
1840
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkyTabsetPermalinkService }, { type: SkyTabsetService }]; }, propDecorators: { active: [{
1882
1841
  type: Input
1883
1842
  }], disabled: [{
@@ -1897,9 +1856,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1897
1856
  args: ['class']
1898
1857
  }], close: [{
1899
1858
  type: Output
1900
- }], tabContentWrapper: [{
1901
- type: ViewChild,
1902
- args: ['tabContentWrapper']
1903
1859
  }] } });
1904
1860
 
1905
1861
  class SkyTabsetNavButtonDisabledPipe {