blob: 04c6d9fc4b6abe0fcec6866f496f377d0d1141c7 [file] [log] [blame]
{"version":3,"file":"tabs.es5.js","sources":["../../../src/material/tabs/tabs-module.ts","../../../src/material/tabs/tab-nav-bar/tab-nav-bar.ts","../../../src/material/tabs/tab-group.ts","../../../src/material/tabs/tab-header.ts","../../../src/material/tabs/paginated-tab-header.ts","../../../src/material/tabs/tab-label-wrapper.ts","../../../src/material/tabs/tab-body.ts","../../../src/material/tabs/tabs-animations.ts","../../../src/material/tabs/tab.ts","../../../src/material/tabs/tab-label.ts","../../../src/material/tabs/tab-content.ts","../../../src/material/tabs/ink-bar.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatInkBar} from './ink-bar';\nimport {MatTab} from './tab';\nimport {MatTabBody, MatTabBodyPortal} from './tab-body';\nimport {MatTabContent} from './tab-content';\nimport {MatTabGroup} from './tab-group';\nimport {MatTabHeader} from './tab-header';\nimport {MatTabLabel} from './tab-label';\nimport {MatTabLabelWrapper} from './tab-label-wrapper';\nimport {MatTabLink, MatTabNav} from './tab-nav-bar/tab-nav-bar';\nimport {A11yModule} from '@angular/cdk/a11y';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatCommonModule,\n PortalModule,\n MatRippleModule,\n ObserversModule,\n A11yModule,\n ],\n // Don't export all components because some are only to be used internally.\n exports: [\n MatCommonModule,\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatTabNav,\n MatTabLink,\n MatTabContent,\n ],\n declarations: [\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatInkBar,\n MatTabLabelWrapper,\n MatTabNav,\n MatTabLink,\n MatTabBody,\n MatTabBodyPortal,\n MatTabHeader,\n MatTabContent,\n ],\n})\nexport class MatTabsModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Platform} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n AfterContentChecked,\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n CanDisable, CanDisableCtor,\n CanDisableRipple, CanDisableRippleCtor,\n HasTabIndex, HasTabIndexCtor,\n MAT_RIPPLE_GLOBAL_OPTIONS,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex, RippleConfig,\n RippleGlobalOptions,\n RippleRenderer,\n RippleTarget,\n ThemePalette,\n} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {FocusMonitor, FocusableOption} from '@angular/cdk/a11y';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {MatInkBar} from '../ink-bar';\nimport {MatPaginatedTabHeader} from '../paginated-tab-header';\n\n\n/**\n * Navigation component matching the styles of the tab group header.\n * Provides anchored navigation with animated ink bar.\n */\n@Component({\n moduleId: module.id,\n selector: '[mat-tab-nav-bar]',\n exportAs: 'matTabNavBar, matTabNav',\n inputs: ['color'],\n templateUrl: 'tab-nav-bar.html',\n styleUrls: ['tab-nav-bar.css'],\n host: {\n 'class': 'mat-tab-nav-bar mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n '[class.mat-primary]': 'color !== \"warn\" && color !== \"accent\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatTabNav extends MatPaginatedTabHeader implements AfterContentChecked,\n AfterContentInit, OnDestroy {\n\n /** Query list of all tab links of the tab navigation. */\n @ContentChildren(forwardRef(() => MatTabLink), {descendants: true}) _items: QueryList<MatTabLink>;\n @ViewChild(MatInkBar, {static: true}) _inkBar: MatInkBar;\n @ViewChild('tabListContainer', {static: true}) _tabListContainer: ElementRef;\n @ViewChild('tabList', {static: true}) _tabList: ElementRef;\n @ViewChild('nextPaginator', {static: false}) _nextPaginator: ElementRef<HTMLElement>;\n @ViewChild('previousPaginator', {static: false}) _previousPaginator: ElementRef<HTMLElement>;\n\n /** Background color of the tab nav. */\n @Input()\n get backgroundColor(): ThemePalette { return this._backgroundColor; }\n set backgroundColor(value: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-background-${this.backgroundColor}`);\n\n if (value) {\n classList.add(`mat-background-${value}`);\n }\n\n this._backgroundColor = value;\n }\n private _backgroundColor: ThemePalette;\n\n /** Whether the ripple effect is disabled or not. */\n @Input()\n get disableRipple() { return this._disableRipple; }\n set disableRipple(value: any) { this._disableRipple = coerceBooleanProperty(value); }\n private _disableRipple: boolean = false;\n\n /** Theme color of the nav bar. */\n @Input() color: ThemePalette = 'primary';\n\n constructor(elementRef: ElementRef,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n /**\n * @deprecated @breaking-change 9.0.0 `platform` parameter to become required.\n */\n @Optional() platform?: Platform,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n\n protected _itemSelected() {\n // noop\n }\n\n ngAfterContentInit() {\n this.updateActiveLink();\n super.ngAfterContentInit();\n }\n\n /**\n * Notifies the component that the active link has been changed.\n * @breaking-change 8.0.0 `element` parameter to be removed.\n */\n updateActiveLink(_element?: ElementRef) {\n if (!this._items) {\n return;\n }\n\n const items = this._items.toArray();\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n return;\n }\n }\n\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }\n}\n\n\n// Boilerplate for applying mixins to MatTabLink.\nclass MatTabLinkBase {}\nconst _MatTabLinkMixinBase:\n HasTabIndexCtor & CanDisableRippleCtor & CanDisableCtor & typeof MatTabLinkBase =\n mixinTabIndex(mixinDisableRipple(mixinDisabled(MatTabLinkBase)));\n\n/**\n * Link inside of a `mat-tab-nav-bar`.\n */\n@Directive({\n selector: '[mat-tab-link], [matTabLink]',\n exportAs: 'matTabLink',\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n host: {\n 'class': 'mat-tab-link',\n '[attr.aria-current]': 'active',\n '[attr.aria-disabled]': 'disabled',\n '[attr.tabIndex]': 'tabIndex',\n '[class.mat-tab-disabled]': 'disabled',\n '[class.mat-tab-label-active]': 'active',\n }\n})\nexport class MatTabLink extends _MatTabLinkMixinBase implements OnDestroy, CanDisable,\n CanDisableRipple, HasTabIndex, RippleTarget, FocusableOption {\n\n /** Whether the tab link is active or not. */\n protected _isActive: boolean = false;\n\n /** Reference to the RippleRenderer for the tab-link. */\n protected _tabLinkRipple: RippleRenderer;\n\n /** Whether the link is active. */\n @Input()\n get active(): boolean { return this._isActive; }\n set active(value: boolean) {\n if (value !== this._isActive) {\n this._isActive = value;\n this._tabNavBar.updateActiveLink(this.elementRef);\n }\n }\n\n /**\n * Ripple configuration for ripples that are launched on pointer down. The ripple config\n * is set to the global ripple options since we don't have any configurable options for\n * the tab link ripples.\n * @docs-private\n */\n rippleConfig: RippleConfig & RippleGlobalOptions;\n\n /**\n * Whether ripples are disabled on interaction.\n * @docs-private\n */\n get rippleDisabled(): boolean {\n return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||\n !!this.rippleConfig.disabled;\n }\n\n constructor(\n private _tabNavBar: MatTabNav, public elementRef: ElementRef, ngZone: NgZone,\n platform: Platform,\n @Optional() @Inject(MAT_RIPPLE_GLOBAL_OPTIONS) globalRippleOptions: RippleGlobalOptions|null,\n @Attribute('tabindex') tabIndex: string, private _focusMonitor: FocusMonitor,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super();\n\n this._tabLinkRipple = new RippleRenderer(this, ngZone, elementRef, platform);\n this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);\n this.rippleConfig = globalRippleOptions || {};\n this.tabIndex = parseInt(tabIndex) || 0;\n\n if (animationMode === 'NoopAnimations') {\n this.rippleConfig.animation = {enterDuration: 0, exitDuration: 0};\n }\n\n _focusMonitor.monitor(elementRef);\n }\n\n focus() {\n this.elementRef.nativeElement.focus();\n }\n\n ngOnDestroy() {\n this._tabLinkRipple._removeTriggerEvents();\n this._focusMonitor.stopMonitoring(this.elementRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n Optional,\n Inject,\n InjectionToken,\n} from '@angular/core';\nimport {\n CanColor,\n CanColorCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n mixinColor,\n mixinDisableRipple,\n ThemePalette,\n} from '@angular/material/core';\nimport {merge, Subscription} from 'rxjs';\nimport {MatTab} from './tab';\nimport {MatTabHeader} from './tab-header';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n/** Used to generate unique ID's for each tab component */\nlet nextId = 0;\n\n/** A simple change event emitted on focus or selection changes. */\nexport class MatTabChangeEvent {\n /** Index of the currently-selected tab. */\n index: number;\n /** Reference to the currently-selected tab. */\n tab: MatTab;\n}\n\n/** Possible positions for the tab header. */\nexport type MatTabHeaderPosition = 'above' | 'below';\n\n/** Object that can be used to configure the default options for the tabs module. */\nexport interface MatTabsConfig {\n /** Duration for the tab animation. Must be a valid CSS value (e.g. 600ms). */\n animationDuration?: string;\n}\n\n/** Injection token that can be used to provide the default options the tabs module. */\nexport const MAT_TABS_CONFIG = new InjectionToken('MAT_TABS_CONFIG');\n\n// Boilerplate for applying mixins to MatTabGroup.\n/** @docs-private */\nclass MatTabGroupBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatTabGroupMixinBase: CanColorCtor & CanDisableRippleCtor & typeof MatTabGroupBase =\n mixinColor(mixinDisableRipple(MatTabGroupBase), 'primary');\n\n/**\n * Material design tab-group component. Supports basic tab pairs (label + content) and includes\n * animated ink-bar, keyboard navigation, and screen reader.\n * See: https://material.io/design/components/tabs.html\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tab-group',\n exportAs: 'matTabGroup',\n templateUrl: 'tab-group.html',\n styleUrls: ['tab-group.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color', 'disableRipple'],\n host: {\n 'class': 'mat-tab-group',\n '[class.mat-tab-group-dynamic-height]': 'dynamicHeight',\n '[class.mat-tab-group-inverted-header]': 'headerPosition === \"below\"',\n },\n})\nexport class MatTabGroup extends _MatTabGroupMixinBase implements AfterContentInit,\n AfterContentChecked, OnDestroy, CanColor, CanDisableRipple {\n\n @ContentChildren(MatTab) _tabs: QueryList<MatTab>;\n\n @ViewChild('tabBodyWrapper', {static: false}) _tabBodyWrapper: ElementRef;\n\n @ViewChild('tabHeader', {static: false}) _tabHeader: MatTabHeader;\n\n /** The tab index that should be selected after the content has been checked. */\n private _indexToSelect: number | null = 0;\n\n /** Snapshot of the height of the tab body wrapper before another tab is activated. */\n private _tabBodyWrapperHeight: number = 0;\n\n /** Subscription to tabs being added/removed. */\n private _tabsSubscription = Subscription.EMPTY;\n\n /** Subscription to changes in the tab labels. */\n private _tabLabelSubscription = Subscription.EMPTY;\n\n /** Whether the tab group should grow to the size of the active tab. */\n @Input()\n get dynamicHeight(): boolean { return this._dynamicHeight; }\n set dynamicHeight(value: boolean) { this._dynamicHeight = coerceBooleanProperty(value); }\n private _dynamicHeight: boolean = false;\n\n /** The index of the active tab. */\n @Input()\n get selectedIndex(): number | null { return this._selectedIndex; }\n set selectedIndex(value: number | null) {\n this._indexToSelect = coerceNumberProperty(value, null);\n }\n private _selectedIndex: number | null = null;\n\n /** Position of the tab header. */\n @Input() headerPosition: MatTabHeaderPosition = 'above';\n\n /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */\n @Input()\n get animationDuration(): string { return this._animationDuration; }\n set animationDuration(value: string) {\n this._animationDuration = /^\\d+$/.test(value) ? value + 'ms' : value;\n }\n private _animationDuration: string;\n\n /** Background color of the tab group. */\n @Input()\n get backgroundColor(): ThemePalette { return this._backgroundColor; }\n set backgroundColor(value: ThemePalette) {\n const nativeElement: HTMLElement = this._elementRef.nativeElement;\n\n nativeElement.classList.remove(`mat-background-${this.backgroundColor}`);\n\n if (value) {\n nativeElement.classList.add(`mat-background-${value}`);\n }\n\n this._backgroundColor = value;\n }\n private _backgroundColor: ThemePalette;\n\n /** Output to enable support for two-way binding on `[(selectedIndex)]` */\n @Output() readonly selectedIndexChange: EventEmitter<number> = new EventEmitter<number>();\n\n /** Event emitted when focus has changed within a tab group. */\n @Output() readonly focusChange: EventEmitter<MatTabChangeEvent> =\n new EventEmitter<MatTabChangeEvent>();\n\n /** Event emitted when the body animation has completed */\n @Output() readonly animationDone: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event emitted when the tab selection has changed. */\n @Output() readonly selectedTabChange: EventEmitter<MatTabChangeEvent> =\n new EventEmitter<MatTabChangeEvent>(true);\n\n private _groupId: number;\n\n constructor(elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(MAT_TABS_CONFIG) @Optional() defaultConfig?: MatTabsConfig,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) {\n super(elementRef);\n this._groupId = nextId++;\n this.animationDuration = defaultConfig && defaultConfig.animationDuration ?\n defaultConfig.animationDuration : '500ms';\n }\n\n /**\n * After the content is checked, this component knows what tabs have been defined\n * and what the selected index should be. This is where we can know exactly what position\n * each tab should be in according to the new selected index, and additionally we know how\n * a new selected tab should transition in (from the left or right).\n */\n ngAfterContentChecked() {\n // Don't clamp the `indexToSelect` immediately in the setter because it can happen that\n // the amount of tabs changes before the actual change detection runs.\n const indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);\n\n // If there is a change in selected index, emit a change event. Should not trigger if\n // the selected index has not yet been initialized.\n if (this._selectedIndex != indexToSelect) {\n const isFirstRun = this._selectedIndex == null;\n\n if (!isFirstRun) {\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n }\n\n // Changing these values after change detection has run\n // since the checked content may contain references to them.\n Promise.resolve().then(() => {\n this._tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);\n\n if (!isFirstRun) {\n this.selectedIndexChange.emit(indexToSelect);\n }\n });\n }\n\n // Setup the position for each tab and optionally setup an origin on the next selected tab.\n this._tabs.forEach((tab: MatTab, index: number) => {\n tab.position = index - indexToSelect;\n\n // If there is already a selected tab, then set up an origin for the next selected tab\n // if it doesn't have one already.\n if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {\n tab.origin = indexToSelect - this._selectedIndex;\n }\n });\n\n if (this._selectedIndex !== indexToSelect) {\n this._selectedIndex = indexToSelect;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngAfterContentInit() {\n this._subscribeToTabLabels();\n\n // Subscribe to changes in the amount of tabs, in order to be\n // able to re-render the content as new tabs are added or removed.\n this._tabsSubscription = this._tabs.changes.subscribe(() => {\n const indexToSelect = this._clampTabIndex(this._indexToSelect);\n\n // Maintain the previously-selected tab if a new tab is added or removed and there is no\n // explicit change that selects a different tab.\n if (indexToSelect === this._selectedIndex) {\n const tabs = this._tabs.toArray();\n\n for (let i = 0; i < tabs.length; i++) {\n if (tabs[i].isActive) {\n // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed\n // event, otherwise the consumer may end up in an infinite loop in some edge cases like\n // adding a tab within the `selectedIndexChange` event.\n this._indexToSelect = this._selectedIndex = i;\n break;\n }\n }\n }\n\n this._subscribeToTabLabels();\n this._changeDetectorRef.markForCheck();\n });\n }\n\n ngOnDestroy() {\n this._tabsSubscription.unsubscribe();\n this._tabLabelSubscription.unsubscribe();\n }\n\n /** Re-aligns the ink bar to the selected tab element. */\n realignInkBar() {\n if (this._tabHeader) {\n this._tabHeader._alignInkBarToSelectedTab();\n }\n }\n\n _focusChanged(index: number) {\n this.focusChange.emit(this._createChangeEvent(index));\n }\n\n private _createChangeEvent(index: number): MatTabChangeEvent {\n const event = new MatTabChangeEvent;\n event.index = index;\n if (this._tabs && this._tabs.length) {\n event.tab = this._tabs.toArray()[index];\n }\n return event;\n }\n\n /**\n * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is\n * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the\n * binding to be updated, we need to subscribe to changes in it and trigger change detection\n * manually.\n */\n private _subscribeToTabLabels() {\n if (this._tabLabelSubscription) {\n this._tabLabelSubscription.unsubscribe();\n }\n\n this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n /** Clamps the given index to the bounds of 0 and the tabs length. */\n private _clampTabIndex(index: number | null): number {\n // Note the `|| 0`, which ensures that values like NaN can't get through\n // and which would otherwise throw the component into an infinite loop\n // (since Math.max(NaN, 0) === NaN).\n return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));\n }\n\n /** Returns a unique id for each tab label element */\n _getTabLabelId(i: number): string {\n return `mat-tab-label-${this._groupId}-${i}`;\n }\n\n /** Returns a unique id for each tab content element */\n _getTabContentId(i: number): string {\n return `mat-tab-content-${this._groupId}-${i}`;\n }\n\n /**\n * Sets the height of the body wrapper to the height of the activating tab if dynamic\n * height property is true.\n */\n _setTabBodyWrapperHeight(tabHeight: number): void {\n if (!this._dynamicHeight || !this._tabBodyWrapperHeight) { return; }\n\n const wrapper: HTMLElement = this._tabBodyWrapper.nativeElement;\n\n wrapper.style.height = this._tabBodyWrapperHeight + 'px';\n\n // This conditional forces the browser to paint the height so that\n // the animation to the new height can have an origin.\n if (this._tabBodyWrapper.nativeElement.offsetHeight) {\n wrapper.style.height = tabHeight + 'px';\n }\n }\n\n /** Removes the height of the tab body wrapper. */\n _removeTabBodyWrapperHeight(): void {\n const wrapper = this._tabBodyWrapper.nativeElement;\n this._tabBodyWrapperHeight = wrapper.clientHeight;\n wrapper.style.height = '';\n this.animationDone.emit();\n }\n\n /** Handle click events, setting new selected index if appropriate. */\n _handleClick(tab: MatTab, tabHeader: MatTabHeader, index: number) {\n if (!tab.disabled) {\n this.selectedIndex = tabHeader.focusIndex = index;\n }\n }\n\n /** Retrieves the tabindex for the tab. */\n _getTabIndex(tab: MatTab, idx: number): number | null {\n if (tab.disabled) {\n return null;\n }\n return this.selectedIndex === idx ? 0 : -1;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n NgZone,\n OnDestroy,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n Input,\n Inject,\n} from '@angular/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatInkBar} from './ink-bar';\nimport {MatTabLabelWrapper} from './tab-label-wrapper';\nimport {Platform} from '@angular/cdk/platform';\nimport {MatPaginatedTabHeader} from './paginated-tab-header';\n\n/**\n * The header of the tab group which displays a list of all the tabs in the tab group. Includes\n * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the\n * width of the header container, then arrows will be displayed to allow the user to scroll\n * left and right across the header.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tab-header',\n templateUrl: 'tab-header.html',\n styleUrls: ['tab-header.css'],\n inputs: ['selectedIndex'],\n outputs: ['selectFocusedIndex', 'indexFocused'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n },\n})\nexport class MatTabHeader extends MatPaginatedTabHeader implements AfterContentChecked,\n AfterContentInit, AfterViewInit, OnDestroy {\n\n @ContentChildren(MatTabLabelWrapper) _items: QueryList<MatTabLabelWrapper>;\n @ViewChild(MatInkBar, {static: true}) _inkBar: MatInkBar;\n @ViewChild('tabListContainer', {static: true}) _tabListContainer: ElementRef;\n @ViewChild('tabList', {static: true}) _tabList: ElementRef;\n @ViewChild('nextPaginator', {static: false}) _nextPaginator: ElementRef<HTMLElement>;\n @ViewChild('previousPaginator', {static: false}) _previousPaginator: ElementRef<HTMLElement>;\n\n /** Whether the ripple effect is disabled or not. */\n @Input()\n get disableRipple() { return this._disableRipple; }\n set disableRipple(value: any) { this._disableRipple = coerceBooleanProperty(value); }\n private _disableRipple: boolean = false;\n\n constructor(elementRef: ElementRef,\n changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n @Optional() dir: Directionality,\n ngZone: NgZone,\n platform: Platform,\n // @breaking-change 9.0.0 `_animationMode` parameter to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n\n protected _itemSelected(event: KeyboardEvent) {\n event.preventDefault();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectorRef,\n ElementRef,\n NgZone,\n Optional,\n QueryList,\n EventEmitter,\n AfterContentChecked,\n AfterContentInit,\n AfterViewInit,\n OnDestroy,\n} from '@angular/core';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {FocusKeyManager, FocusableOption} from '@angular/cdk/a11y';\nimport {END, ENTER, HOME, SPACE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {merge, of as observableOf, Subject, timer, fromEvent} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {MatInkBar} from './ink-bar';\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\n\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions =\n normalizePassiveListenerOptions({passive: true}) as EventListenerOptions;\n\n/**\n * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'\n * will scroll the header towards the end of the tabs list and 'before' will scroll towards the\n * beginning of the list.\n */\nexport type ScrollDirection = 'after' | 'before';\n\n/**\n * The distance in pixels that will be overshot when scrolling a tab label into view. This helps\n * provide a small affordance to the label next to it.\n */\nconst EXAGGERATED_OVERSCROLL = 60;\n\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n\n/** Item inside a paginated tab header. */\ntype MatPaginatedTabHeaderItem = FocusableOption & {elementRef: ElementRef};\n\n/**\n * Base class for a tab header that supported pagination.\n */\nexport abstract class MatPaginatedTabHeader implements AfterContentChecked, AfterContentInit,\n AfterViewInit, OnDestroy {\n abstract _items: QueryList<MatPaginatedTabHeaderItem>;\n abstract _inkBar: MatInkBar;\n abstract _tabListContainer: ElementRef<HTMLElement>;\n abstract _tabList: ElementRef<HTMLElement>;\n abstract _nextPaginator: ElementRef<HTMLElement>;\n abstract _previousPaginator: ElementRef<HTMLElement>;\n\n /** The distance in pixels that the tab labels should be translated to the left. */\n private _scrollDistance = 0;\n\n /** Whether the header should scroll to the selected index after the view has been checked. */\n private _selectedIndexChanged = false;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** Whether the controls for pagination should be displayed */\n _showPaginationControls = false;\n\n /** Whether the tab list can be scrolled more towards the end of the tab label list. */\n _disableScrollAfter = true;\n\n /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n _disableScrollBefore = true;\n\n /**\n * The number of tab labels that are displayed on the header. When this changes, the header\n * should re-evaluate the scroll position.\n */\n private _tabLabelCount: number;\n\n /** Whether the scroll distance has changed and should be applied after the view is checked. */\n private _scrollDistanceChanged: boolean;\n\n /** Used to manage focus between the tabs. */\n private _keyManager: FocusKeyManager<MatPaginatedTabHeaderItem>;\n\n /** Cached text content of the header. */\n private _currentTextContent: string;\n\n /** Stream that will stop the automated scrolling. */\n private _stopScrolling = new Subject<void>();\n\n /** The index of the active tab. */\n get selectedIndex(): number { return this._selectedIndex; }\n set selectedIndex(value: number) {\n value = coerceNumberProperty(value);\n\n if (this._selectedIndex != value) {\n this._selectedIndexChanged = true;\n this._selectedIndex = value;\n\n if (this._keyManager) {\n this._keyManager.updateActiveItemIndex(value);\n }\n }\n }\n private _selectedIndex: number = 0;\n\n /** Event emitted when the option is selected. */\n readonly selectFocusedIndex: EventEmitter<number> = new EventEmitter<number>();\n\n /** Event emitted when a label is focused. */\n readonly indexFocused: EventEmitter<number> = new EventEmitter<number>();\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _changeDetectorRef: ChangeDetectorRef,\n private _viewportRuler: ViewportRuler,\n @Optional() private _dir: Directionality,\n private _ngZone: NgZone,\n /**\n * @deprecated @breaking-change 9.0.0 `_platform` and `_animationMode`\n * parameters to become required.\n */\n private _platform?: Platform,\n public _animationMode?: string) {\n\n // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n _ngZone.runOutsideAngular(() => {\n fromEvent(_elementRef.nativeElement, 'mouseleave')\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._stopInterval();\n });\n });\n }\n\n /** Called when the user has selected an item via the keyboard. */\n protected abstract _itemSelected(event: KeyboardEvent): void;\n\n ngAfterViewInit() {\n // We need to handle these events manually, because we want to bind passive event listeners.\n fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._handlePaginatorPress('before');\n });\n\n fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._handlePaginatorPress('after');\n });\n }\n\n ngAfterContentInit() {\n const dirChange = this._dir ? this._dir.change : observableOf(null);\n const resize = this._viewportRuler.change(150);\n const realign = () => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n };\n\n this._keyManager = new FocusKeyManager<MatPaginatedTabHeaderItem>(this._items)\n .withHorizontalOrientation(this._getLayoutDirection())\n .withWrap();\n\n this._keyManager.updateActiveItem(0);\n\n // Defer the first call in order to allow for slower browsers to lay out the elements.\n // This helps in cases where the user lands directly on a page with paginated tabs.\n typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame(realign) : realign();\n\n // On dir change or window resize, realign the ink bar and update the orientation of\n // the key manager if the direction has changed.\n merge(dirChange, resize, this._items.changes).pipe(takeUntil(this._destroyed)).subscribe(() => {\n realign();\n this._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n });\n\n // If there is a change in the focus key manager we need to emit the `indexFocused`\n // event in order to provide a public event that notifies about focus changes. Also we realign\n // the tabs container by scrolling the new focused tab into the visible section.\n this._keyManager.change.pipe(takeUntil(this._destroyed)).subscribe(newFocusIndex => {\n this.indexFocused.emit(newFocusIndex);\n this._setTabFocus(newFocusIndex);\n });\n }\n\n ngAfterContentChecked(): void {\n // If the number of tab labels have changed, check if scrolling should be enabled\n if (this._tabLabelCount != this._items.length) {\n this.updatePagination();\n this._tabLabelCount = this._items.length;\n this._changeDetectorRef.markForCheck();\n }\n\n // If the selected index has changed, scroll to the label and check if the scrolling controls\n // should be disabled.\n if (this._selectedIndexChanged) {\n this._scrollToLabel(this._selectedIndex);\n this._checkScrollingControls();\n this._alignInkBarToSelectedTab();\n this._selectedIndexChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n\n // If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n // then translate the header to reflect this.\n if (this._scrollDistanceChanged) {\n this._updateTabScrollPosition();\n this._scrollDistanceChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n this._stopScrolling.complete();\n }\n\n /** Handles keyboard events on the header. */\n _handleKeydown(event: KeyboardEvent) {\n // We don't handle any key bindings with a modifier key.\n if (hasModifierKey(event)) {\n return;\n }\n\n switch (event.keyCode) {\n case HOME:\n this._keyManager.setFirstItemActive();\n event.preventDefault();\n break;\n case END:\n this._keyManager.setLastItemActive();\n event.preventDefault();\n break;\n case ENTER:\n case SPACE:\n this.selectFocusedIndex.emit(this.focusIndex);\n this._itemSelected(event);\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n }\n\n /**\n * Callback for when the MutationObserver detects that the content has changed.\n */\n _onContentChanges() {\n const textContent = this._elementRef.nativeElement.textContent;\n\n // We need to diff the text content of the header, because the MutationObserver callback\n // will fire even if the text content didn't change which is inefficient and is prone\n // to infinite loops if a poorly constructed expression is passed in (see #14249).\n if (textContent !== this._currentTextContent) {\n this._currentTextContent = textContent || '';\n\n // The content observer runs outside the `NgZone` by default, which\n // means that we need to bring the callback back in ourselves.\n this._ngZone.run(() => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n /**\n * Updates the view whether pagination should be enabled or not.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n this._checkPaginationEnabled();\n this._checkScrollingControls();\n this._updateTabScrollPosition();\n }\n\n /** Tracks which element has focus; used for keyboard navigation */\n get focusIndex(): number {\n return this._keyManager ? this._keyManager.activeItemIndex! : 0;\n }\n\n /** When the focus index is set, we must manually send focus to the correct label */\n set focusIndex(value: number) {\n if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n return;\n }\n\n this._keyManager.setActiveItem(value);\n }\n\n /**\n * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n * providing a valid index and return true.\n */\n _isValidIndex(index: number): boolean {\n if (!this._items) { return true; }\n\n const tab = this._items ? this._items.toArray()[index] : null;\n return !!tab && !tab.disabled;\n }\n\n /**\n * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n * scrolling is enabled.\n */\n _setTabFocus(tabIndex: number) {\n if (this._showPaginationControls) {\n this._scrollToLabel(tabIndex);\n }\n\n if (this._items && this._items.length) {\n this._items.toArray()[tabIndex].focus();\n\n // Do not let the browser manage scrolling to focus the element, this will be handled\n // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n // should be the full width minus the offset width.\n const containerEl = this._tabListContainer.nativeElement;\n const dir = this._getLayoutDirection();\n\n if (dir == 'ltr') {\n containerEl.scrollLeft = 0;\n } else {\n containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n }\n }\n }\n\n /** The layout direction of the containing app. */\n _getLayoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n _updateTabScrollPosition() {\n const scrollDistance = this.scrollDistance;\n const platform = this._platform;\n const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n\n // Don't use `translate3d` here because we don't want to create a new layer. A new layer\n // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n // and ripples will exceed the boundaries of the visible tab bar.\n // See: https://github.com/angular/components/issues/10276\n // We round the `transform` here, because transforms with sub-pixel precision cause some\n // browsers to blur the content of the element.\n this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n\n // Setting the `transform` on IE will change the scroll offset of the parent, causing the\n // position to be thrown off in some cases. We have to reset it ourselves to ensure that\n // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n // @breaking-change 9.0.0 Remove null check for `platform` after it can no longer be undefined.\n if (platform && (platform.TRIDENT || platform.EDGE)) {\n this._tabListContainer.nativeElement.scrollLeft = 0;\n }\n }\n\n /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n get scrollDistance(): number { return this._scrollDistance; }\n set scrollDistance(value: number) {\n this._scrollTo(value);\n }\n\n /**\n * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n * the end of the list, respectively). The distance to scroll is computed to be a third of the\n * length of the tab list view window.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollHeader(direction: ScrollDirection) {\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n\n // Move the scroll distance one-third the length of the tab list's viewport.\n const scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;\n\n return this._scrollTo(this._scrollDistance + scrollAmount);\n }\n\n /** Handles click events on the pagination arrows. */\n _handlePaginatorClick(direction: ScrollDirection) {\n this._stopInterval();\n this._scrollHeader(direction);\n }\n\n /**\n * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollToLabel(labelIndex: number) {\n const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;\n\n if (!selectedLabel) { return; }\n\n // The view length is the visible width of the tab labels.\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n const {offsetLeft, offsetWidth} = selectedLabel.elementRef.nativeElement;\n\n let labelBeforePos: number, labelAfterPos: number;\n if (this._getLayoutDirection() == 'ltr') {\n labelBeforePos = offsetLeft;\n labelAfterPos = labelBeforePos + offsetWidth;\n } else {\n labelAfterPos = this._tabList.nativeElement.offsetWidth - offsetLeft;\n labelBeforePos = labelAfterPos - offsetWidth;\n }\n\n const beforeVisiblePos = this.scrollDistance;\n const afterVisiblePos = this.scrollDistance + viewLength;\n\n if (labelBeforePos < beforeVisiblePos) {\n // Scroll header to move label to the before direction\n this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;\n } else if (labelAfterPos > afterVisiblePos) {\n // Scroll header to move label to the after direction\n this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;\n }\n }\n\n /**\n * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n * tab list is wider than the size of the header container, then the pagination controls should\n * be shown.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkPaginationEnabled() {\n const isEnabled =\n this._tabList.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n\n if (!isEnabled) {\n this.scrollDistance = 0;\n }\n\n if (isEnabled !== this._showPaginationControls) {\n this._changeDetectorRef.markForCheck();\n }\n\n this._showPaginationControls = isEnabled;\n }\n\n /**\n * Evaluate whether the before and after controls should be enabled or disabled.\n * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n * before button. If the header is at the end of the list (scroll distance is equal to the\n * maximum distance we can scroll), then disable the after button.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkScrollingControls() {\n // Check if the pagination arrows should be activated.\n this._disableScrollBefore = this.scrollDistance == 0;\n this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n * is equal to the difference in width between the tab list container and tab header container.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _getMaxScrollDistance(): number {\n const lengthOfTabList = this._tabList.nativeElement.scrollWidth;\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n return (lengthOfTabList - viewLength) || 0;\n }\n\n /** Tells the ink-bar to align itself to the current label wrapper */\n _alignInkBarToSelectedTab(): void {\n const selectedItem = this._items && this._items.length ?\n this._items.toArray()[this.selectedIndex] : null;\n const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;\n\n if (selectedLabelWrapper) {\n this._inkBar.alignToElement(selectedLabelWrapper);\n } else {\n this._inkBar.hide();\n }\n }\n\n /** Stops the currently-running paginator interval. */\n _stopInterval() {\n this._stopScrolling.next();\n }\n\n /**\n * Handles the user pressing down on one of the paginators.\n * Starts scrolling the header after a certain amount of time.\n * @param direction In which direction the paginator should be scrolled.\n */\n _handlePaginatorPress(direction: ScrollDirection) {\n // Avoid overlapping timers.\n this._stopInterval();\n\n // Start a timer after the delay and keep firing based on the interval.\n timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n // Keep the timer going until something tells it to stop or the component is destroyed.\n .pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))\n .subscribe(() => {\n const {maxScrollDistance, distance} = this._scrollHeader(direction);\n\n // Stop the timer if we've reached the start or the end.\n if (distance === 0 || distance >= maxScrollDistance) {\n this._stopInterval();\n }\n });\n }\n\n /**\n * Scrolls the header to a given position.\n * @param position Position to which to scroll.\n * @returns Information on the current scroll distance and the maximum.\n */\n private _scrollTo(position: number) {\n const maxScrollDistance = this._getMaxScrollDistance();\n this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n\n // Mark that the scroll distance has changed so that after the view is checked, the CSS\n // transformation can move the header.\n this._scrollDistanceChanged = true;\n this._checkScrollingControls();\n\n return {maxScrollDistance, distance: this._scrollDistance};\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef} from '@angular/core';\nimport {CanDisable, CanDisableCtor, mixinDisabled} from '@angular/material/core';\n\n\n// Boilerplate for applying mixins to MatTabLabelWrapper.\n/** @docs-private */\nclass MatTabLabelWrapperBase {}\nconst _MatTabLabelWrapperMixinBase: CanDisableCtor & typeof MatTabLabelWrapperBase =\n mixinDisabled(MatTabLabelWrapperBase);\n\n/**\n * Used in the `mat-tab-group` view to display tab labels.\n * @docs-private\n */\n@Directive({\n selector: '[matTabLabelWrapper]',\n inputs: ['disabled'],\n host: {\n '[class.mat-tab-disabled]': 'disabled',\n '[attr.aria-disabled]': '!!disabled',\n }\n})\nexport class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase implements CanDisable {\n constructor(public elementRef: ElementRef) {\n super();\n }\n\n /** Sets focus on the wrapper element */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n getOffsetLeft(): number {\n return this.elementRef.nativeElement.offsetLeft;\n }\n\n getOffsetWidth(): number {\n return this.elementRef.nativeElement.offsetWidth;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Component,\n ChangeDetectorRef,\n Input,\n Inject,\n Output,\n EventEmitter,\n OnDestroy,\n OnInit,\n ElementRef,\n Directive,\n Optional,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ComponentFactoryResolver,\n ViewContainerRef,\n forwardRef,\n ViewChild,\n} from '@angular/core';\nimport {AnimationEvent} from '@angular/animations';\nimport {TemplatePortal, CdkPortalOutlet, PortalHostDirective} from '@angular/cdk/portal';\nimport {Directionality, Direction} from '@angular/cdk/bidi';\nimport {Subscription, Subject} from 'rxjs';\nimport {matTabsAnimations} from './tabs-animations';\nimport {startWith, distinctUntilChanged} from 'rxjs/operators';\n\n/**\n * These position states are used internally as animation states for the tab body. Setting the\n * position state to left, right, or center will transition the tab body from its current\n * position to its respective state. If there is not current position (void, in the case of a new\n * tab body), then there will be no transition animation to its state.\n *\n * In the case of a new tab body that should immediately be centered with an animating transition,\n * then left-origin-center or right-origin-center can be used, which will use left or right as its\n * psuedo-prior state.\n */\nexport type MatTabBodyPositionState =\n 'left' | 'center' | 'right' | 'left-origin-center' | 'right-origin-center';\n\n/**\n * The origin state is an internally used state that is set on a new tab body indicating if it\n * began to the left or right of the prior selected index. For example, if the selected index was\n * set to 1, and a new tab is created and selected at index 2, then the tab body would have an\n * origin of right because its index was greater than the prior selected index.\n */\nexport type MatTabBodyOriginState = 'left' | 'right';\n\n/**\n * The portal host directive for the contents of the tab.\n * @docs-private\n */\n@Directive({\n selector: '[matTabBodyHost]'\n})\nexport class MatTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy {\n /** Subscription to events for when the tab body begins centering. */\n private _centeringSub = Subscription.EMPTY;\n /** Subscription to events for when the tab body finishes leaving from center position. */\n private _leavingSub = Subscription.EMPTY;\n\n constructor(\n componentFactoryResolver: ComponentFactoryResolver,\n viewContainerRef: ViewContainerRef,\n @Inject(forwardRef(() => MatTabBody)) private _host: MatTabBody) {\n super(componentFactoryResolver, viewContainerRef);\n }\n\n /** Set initial visibility or set up subscription for changing visibility. */\n ngOnInit(): void {\n super.ngOnInit();\n\n this._centeringSub = this._host._beforeCentering\n .pipe(startWith(this._host._isCenterPosition(this._host._position)))\n .subscribe((isCentering: boolean) => {\n if (isCentering && !this.hasAttached()) {\n this.attach(this._host._content);\n }\n });\n\n this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {\n this.detach();\n });\n }\n\n /** Clean up centering subscription. */\n ngOnDestroy(): void {\n super.ngOnDestroy();\n this._centeringSub.unsubscribe();\n this._leavingSub.unsubscribe();\n }\n}\n\n/**\n * Wrapper for the contents of a tab.\n * @docs-private\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-tab-body',\n templateUrl: 'tab-body.html',\n styleUrls: ['tab-body.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [matTabsAnimations.translateTab],\n host: {\n 'class': 'mat-tab-body',\n },\n})\nexport class MatTabBody implements OnInit, OnDestroy {\n\n /** Current position of the tab-body in the tab-group. Zero means that the tab is visible. */\n private _positionIndex: number;\n\n /** Subscription to the directionality change observable. */\n private _dirChangeSubscription = Subscription.EMPTY;\n\n /** Tab body position state. Used by the animation trigger for the current state. */\n _position: MatTabBodyPositionState;\n\n /** Emits when an animation on the tab is complete. */\n _translateTabComplete = new Subject<AnimationEvent>();\n\n /** Event emitted when the tab begins to animate towards the center as the active tab. */\n @Output() readonly _onCentering: EventEmitter<number> = new EventEmitter<number>();\n\n /** Event emitted before the centering of the tab begins. */\n @Output() readonly _beforeCentering: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Event emitted before the centering of the tab begins. */\n @Output() readonly _afterLeavingCenter: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** Event emitted when the tab completes its animation towards the center. */\n @Output() readonly _onCentered: EventEmitter<void> = new EventEmitter<void>(true);\n\n /** The portal host inside of this container into which the tab body content will be loaded. */\n @ViewChild(PortalHostDirective, {static: false}) _portalHost: PortalHostDirective;\n\n /** The tab body content to display. */\n @Input('content') _content: TemplatePortal;\n\n /** Position that will be used when the tab is immediately becoming visible after creation. */\n @Input() origin: number;\n\n // Note that the default value will always be overwritten by `MatTabBody`, but we need one\n // anyway to prevent the animations module from throwing an error if the body is used on its own.\n /** Duration for the tab's animation. */\n @Input() animationDuration: string = '500ms';\n\n /** The shifted index position of the tab body, where zero represents the active center tab. */\n @Input()\n set position(position: number) {\n this._positionIndex = position;\n this._computePositionAnimationState();\n }\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality,\n changeDetectorRef: ChangeDetectorRef) {\n\n if (_dir) {\n this._dirChangeSubscription = _dir.change.subscribe((dir: Direction) => {\n this._computePositionAnimationState(dir);\n changeDetectorRef.markForCheck();\n });\n }\n\n // Ensure that we get unique animation events, because the `.done` callback can get\n // invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.\n this._translateTabComplete.pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n })).subscribe(event => {\n // If the transition to the center is complete, emit an event.\n if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {\n this._onCentered.emit();\n }\n\n if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {\n this._afterLeavingCenter.emit();\n }\n });\n }\n\n /**\n * After initialized, check if the content is centered and has an origin. If so, set the\n * special position states that transition the tab from the left or right before centering.\n */\n ngOnInit() {\n if (this._position == 'center' && this.origin != null) {\n this._position = this._computePositionFromOrigin();\n }\n }\n\n ngOnDestroy() {\n this._dirChangeSubscription.unsubscribe();\n this._translateTabComplete.complete();\n }\n\n _onTranslateTabStarted(event: AnimationEvent): void {\n const isCentering = this._isCenterPosition(event.toState);\n this._beforeCentering.emit(isCentering);\n if (isCentering) {\n this._onCentering.emit(this._elementRef.nativeElement.clientHeight);\n }\n }\n\n /** The text direction of the containing app. */\n _getLayoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Whether the provided position state is considered center, regardless of origin. */\n _isCenterPosition(position: MatTabBodyPositionState|string): boolean {\n return position == 'center' ||\n position == 'left-origin-center' ||\n position == 'right-origin-center';\n }\n\n /** Computes the position state that will be used for the tab-body animation trigger. */\n private _computePositionAnimationState(dir: Direction = this._getLayoutDirection()) {\n if (this._positionIndex < 0) {\n this._position = dir == 'ltr' ? 'left' : 'right';\n } else if (this._positionIndex > 0) {\n this._position = dir == 'ltr' ? 'right' : 'left';\n } else {\n this._position = 'center';\n }\n }\n\n /**\n * Computes the position state based on the specified origin position. This is used if the\n * tab is becoming visible immediately after creation.\n */\n private _computePositionFromOrigin(): MatTabBodyPositionState {\n const dir = this._getLayoutDirection();\n\n if ((dir == 'ltr' && this.origin <= 0) || (dir == 'rtl' && this.origin > 0)) {\n return 'left-origin-center';\n }\n\n return 'right-origin-center';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the Material tabs.\n * @docs-private\n */\nexport const matTabsAnimations: {\n readonly translateTab: AnimationTriggerMetadata;\n} = {\n /** Animation translates a tab along the X axis. */\n translateTab: trigger('translateTab', [\n // Note: transitions to `none` instead of 0, because some browsers might blur the content.\n state('center, void, left-origin-center, right-origin-center', style({transform: 'none'})),\n\n // If the tab is either on the left or right, we additionally add a `min-height` of 1px\n // in order to ensure that the element has a height before its state changes. This is\n // necessary because Chrome does seem to skip the transition in RTL mode if the element does\n // not have a static height and is not rendered. See related issue: #9465\n state('left', style({transform: 'translate3d(-100%, 0, 0)', minHeight: '1px'})),\n state('right', style({transform: 'translate3d(100%, 0, 0)', minHeight: '1px'})),\n\n transition('* => left, * => right, left => center, right => center',\n animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),\n transition('void => left-origin-center', [\n style({transform: 'translate3d(-100%, 0, 0)'}),\n animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')\n ]),\n transition('void => right-origin-center', [\n style({transform: 'translate3d(100%, 0, 0)'}),\n animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')\n ])\n ])\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanDisable, CanDisableCtor, mixinDisabled} from '@angular/material/core';\nimport {Subject} from 'rxjs';\nimport {MatTabContent} from './tab-content';\nimport {MatTabLabel} from './tab-label';\n\n\n// Boilerplate for applying mixins to MatTab.\n/** @docs-private */\nclass MatTabBase {}\nconst _MatTabMixinBase: CanDisableCtor & typeof MatTabBase =\n mixinDisabled(MatTabBase);\n\n@Component({\n moduleId: module.id,\n selector: 'mat-tab',\n templateUrl: 'tab.html',\n inputs: ['disabled'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matTab',\n})\nexport class MatTab extends _MatTabMixinBase implements OnInit, CanDisable, OnChanges, OnDestroy {\n /** Content for the tab label given by `<ng-template mat-tab-label>`. */\n @ContentChild(MatTabLabel, {static: false}) templateLabel: MatTabLabel;\n\n /**\n * Template provided in the tab content that will be used if present, used to enable lazy-loading\n */\n @ContentChild(MatTabContent, {read: TemplateRef, static: true})\n _explicitContent: TemplateRef<any>;\n\n /** Template inside the MatTab view that contains an `<ng-content>`. */\n @ViewChild(TemplateRef, {static: true}) _implicitContent: TemplateRef<any>;\n\n /** Plain text label for the tab, used when there is no template label. */\n @Input('label') textLabel: string = '';\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Portal that will be the hosted content of the tab */\n private _contentPortal: TemplatePortal | null = null;\n\n /** @docs-private */\n get content(): TemplatePortal | null {\n return this._contentPortal;\n }\n\n /** Emits whenever the internal state of the tab changes. */\n readonly _stateChanges = new Subject<void>();\n\n /**\n * The relatively indexed position where 0 represents the center, negative is left, and positive\n * represents the right.\n */\n position: number | null = null;\n\n /**\n * The initial relatively index origin of the tab if it was created and selected after there\n * was already a selected tab. Provides context of what position the tab should originate from.\n */\n origin: number | null = null;\n\n /**\n * Whether the tab is currently active.\n */\n isActive = false;\n\n constructor(private _viewContainerRef: ViewContainerRef) {\n super();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {\n this._stateChanges.next();\n }\n }\n\n ngOnDestroy(): void {\n this._stateChanges.complete();\n }\n\n ngOnInit(): void {\n this._contentPortal = new TemplatePortal(\n this._explicitContent || this._implicitContent, this._viewContainerRef);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\nimport {CdkPortal} from '@angular/cdk/portal';\n\n/** Used to flag tab labels for use with the portal directive */\n@Directive({\n selector: '[mat-tab-label], [matTabLabel]',\n})\nexport class MatTabLabel extends CdkPortal {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n/** Decorates the `ng-template` tags and reads out the template from it. */\n@Directive({selector: '[matTabContent]'})\nexport class MatTabContent {\n constructor(public template: TemplateRef<any>) { }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Inject, InjectionToken, NgZone, Optional} from '@angular/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n/**\n * Interface for a a MatInkBar positioner method, defining the positioning and width of the ink\n * bar in a set of tabs.\n */\n// tslint:disable-next-line class-name Using leading underscore to denote internal interface.\nexport interface _MatInkBarPositioner {\n (element: HTMLElement): { left: string, width: string };\n}\n\n/** Injection token for the MatInkBar's Positioner. */\nexport const _MAT_INK_BAR_POSITIONER =\n new InjectionToken<_MatInkBarPositioner>('MatInkBarPositioner', {\n providedIn: 'root',\n factory: _MAT_INK_BAR_POSITIONER_FACTORY\n });\n\n/**\n * The default positioner function for the MatInkBar.\n * @docs-private\n */\nexport function _MAT_INK_BAR_POSITIONER_FACTORY(): _MatInkBarPositioner {\n const method = (element: HTMLElement) => ({\n left: element ? (element.offsetLeft || 0) + 'px' : '0',\n width: element ? (element.offsetWidth || 0) + 'px' : '0',\n });\n\n return method;\n}\n\n/**\n * The ink-bar is used to display and animate the line underneath the current active tab label.\n * @docs-private\n */\n@Directive({\n selector: 'mat-ink-bar',\n host: {\n 'class': 'mat-ink-bar',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n})\nexport class MatInkBar {\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _ngZone: NgZone,\n @Inject(_MAT_INK_BAR_POSITIONER) private _inkBarPositioner: _MatInkBarPositioner,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) { }\n\n /**\n * Calculates the styles from the provided element in order to align the ink-bar to that element.\n * Shows the ink bar if previously set as hidden.\n * @param element\n */\n alignToElement(element: HTMLElement) {\n this.show();\n\n if (typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this._setStyles(element));\n });\n } else {\n this._setStyles(element);\n }\n }\n\n /** Shows the ink bar. */\n show(): void {\n this._elementRef.nativeElement.style.visibility = 'visible';\n }\n\n /** Hides the ink bar. */\n hide(): void {\n this._elementRef.nativeElement.style.visibility = 'hidden';\n }\n\n /**\n * Sets the proper styles to the ink bar element.\n * @param element\n */\n private _setStyles(element: HTMLElement) {\n const positions = this._inkBarPositioner(element);\n const inkBar: HTMLElement = this._elementRef.nativeElement;\n\n inkBar.style.left = positions.left;\n inkBar.style.width = positions.width;\n }\n}\n"],"names":["tslib_1.__extends","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AWsBA,AAAA,IAAa,uBAAuB,GAClC,IAAI,cAAc,CAAuB,qBAAqB,EAAE;IAC9D,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,+BAA+B;CACzC,CAAC,CAAJ;;;;;;AAMA,AAAA,SAAgB,+BAA+B,GAA/C;;IACA,IAAQ,MAAM;;;;IAAG,UAAC,OAAoB,EAAtC,EAA2C,QAAC;QACxC,IAAI,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG;QACtD,KAAK,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG;KACzD,EAAH,EAAI,CAAA,CAAJ;IAEE,OAAO,MAAM,CAAC;CACf;;;;;AAMD,AAAA,IAAA,SAAA,kBAAA,YAAA;IAQE,SAAF,SAAA,CACY,WAAoC,EACpC,OAAe,EACkB,iBAAuC,EAC9B,cAAuB,EAJ7E;QACY,IAAZ,CAAA,WAAuB,GAAX,WAAW,CAAyB;QACpC,IAAZ,CAAA,OAAmB,GAAP,OAAO,CAAQ;QACkB,IAA7C,CAAA,iBAA8D,GAAjB,iBAAiB,CAAsB;QAC9B,IAAtD,CAAA,cAAoE,GAAd,cAAc,CAAS;KAAK;;;;;;;;;;;;IAOhF,SAAF,CAAA,SAAA,CAAA,cAAgB;;;;;;IAAd,UAAe,OAAoB,EAArC;QAAE,IAAF,KAAA,GAAA,IAAA,CAUG;QATC,IAAI,CAAC,IAAI,EAAE,CAAC;QAEZ,IAAI,OAAO,qBAAqB,KAAK,WAAW,EAAE;YAChD,IAAI,CAAC,OAAO,CAAC,iBAAiB;;;Y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