source: trip-planner-front/node_modules/@angular/material/tabs/tab-group.d.ts.__ivy_ngcc_bak

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 7.8 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
9import { AfterContentChecked, AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
10import { FocusOrigin } from '@angular/cdk/a11y';
11import { CanColor, CanDisableRipple, ThemePalette } from '@angular/material/core';
12import { MatTab } from './tab';
13import { MatTabsConfig } from './tab-config';
14/** A simple change event emitted on focus or selection changes. */
15export declare class MatTabChangeEvent {
16 /** Index of the currently-selected tab. */
17 index: number;
18 /** Reference to the currently-selected tab. */
19 tab: MatTab;
20}
21/** Possible positions for the tab header. */
22export declare type MatTabHeaderPosition = 'above' | 'below';
23/** @docs-private */
24declare const _MatTabGroupMixinBase: import("@angular/material/core/common-behaviors/constructor").Constructor<CanColor> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanColor> & import("@angular/material/core/common-behaviors/constructor").Constructor<CanDisableRipple> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanDisableRipple> & {
25 new (_elementRef: ElementRef): {
26 _elementRef: ElementRef;
27 };
28};
29interface MatTabGroupBaseHeader {
30 _alignInkBarToSelectedTab: () => void;
31 focusIndex: number;
32}
33/**
34 * Base class with all of the `MatTabGroupBase` functionality.
35 * @docs-private
36 */
37export declare abstract class _MatTabGroupBase extends _MatTabGroupMixinBase implements AfterContentInit, AfterContentChecked, OnDestroy, CanColor, CanDisableRipple {
38 protected _changeDetectorRef: ChangeDetectorRef;
39 _animationMode?: string | undefined;
40 /**
41 * All tabs inside the tab group. This includes tabs that belong to groups that are nested
42 * inside the current one. We filter out only the tabs that belong to this group in `_tabs`.
43 */
44 abstract _allTabs: QueryList<MatTab>;
45 abstract _tabBodyWrapper: ElementRef;
46 abstract _tabHeader: MatTabGroupBaseHeader;
47 /** All of the tabs that belong to the group. */
48 _tabs: QueryList<MatTab>;
49 /** The tab index that should be selected after the content has been checked. */
50 private _indexToSelect;
51 /** Snapshot of the height of the tab body wrapper before another tab is activated. */
52 private _tabBodyWrapperHeight;
53 /** Subscription to tabs being added/removed. */
54 private _tabsSubscription;
55 /** Subscription to changes in the tab labels. */
56 private _tabLabelSubscription;
57 /** Whether the tab group should grow to the size of the active tab. */
58 get dynamicHeight(): boolean;
59 set dynamicHeight(value: boolean);
60 private _dynamicHeight;
61 /** The index of the active tab. */
62 get selectedIndex(): number | null;
63 set selectedIndex(value: number | null);
64 private _selectedIndex;
65 /** Position of the tab header. */
66 headerPosition: MatTabHeaderPosition;
67 /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */
68 get animationDuration(): string;
69 set animationDuration(value: string);
70 private _animationDuration;
71 /**
72 * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved
73 * accessibility when the tab does not have focusable elements or if it has scrollable content.
74 * The `tabindex` will be removed automatically for inactive tabs.
75 * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html
76 */
77 get contentTabIndex(): number | null;
78 set contentTabIndex(value: number | null);
79 private _contentTabIndex;
80 /**
81 * Whether pagination should be disabled. This can be used to avoid unnecessary
82 * layout recalculations if it's known that pagination won't be required.
83 */
84 disablePagination: boolean;
85 /** Background color of the tab group. */
86 get backgroundColor(): ThemePalette;
87 set backgroundColor(value: ThemePalette);
88 private _backgroundColor;
89 /** Output to enable support for two-way binding on `[(selectedIndex)]` */
90 readonly selectedIndexChange: EventEmitter<number>;
91 /** Event emitted when focus has changed within a tab group. */
92 readonly focusChange: EventEmitter<MatTabChangeEvent>;
93 /** Event emitted when the body animation has completed */
94 readonly animationDone: EventEmitter<void>;
95 /** Event emitted when the tab selection has changed. */
96 readonly selectedTabChange: EventEmitter<MatTabChangeEvent>;
97 private _groupId;
98 constructor(elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, defaultConfig?: MatTabsConfig, _animationMode?: string | undefined);
99 /**
100 * After the content is checked, this component knows what tabs have been defined
101 * and what the selected index should be. This is where we can know exactly what position
102 * each tab should be in according to the new selected index, and additionally we know how
103 * a new selected tab should transition in (from the left or right).
104 */
105 ngAfterContentChecked(): void;
106 ngAfterContentInit(): void;
107 /** Listens to changes in all of the tabs. */
108 private _subscribeToAllTabChanges;
109 ngOnDestroy(): void;
110 /** Re-aligns the ink bar to the selected tab element. */
111 realignInkBar(): void;
112 /**
113 * Sets focus to a particular tab.
114 * @param index Index of the tab to be focused.
115 */
116 focusTab(index: number): void;
117 _focusChanged(index: number): void;
118 private _createChangeEvent;
119 /**
120 * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
121 * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
122 * binding to be updated, we need to subscribe to changes in it and trigger change detection
123 * manually.
124 */
125 private _subscribeToTabLabels;
126 /** Clamps the given index to the bounds of 0 and the tabs length. */
127 private _clampTabIndex;
128 /** Returns a unique id for each tab label element */
129 _getTabLabelId(i: number): string;
130 /** Returns a unique id for each tab content element */
131 _getTabContentId(i: number): string;
132 /**
133 * Sets the height of the body wrapper to the height of the activating tab if dynamic
134 * height property is true.
135 */
136 _setTabBodyWrapperHeight(tabHeight: number): void;
137 /** Removes the height of the tab body wrapper. */
138 _removeTabBodyWrapperHeight(): void;
139 /** Handle click events, setting new selected index if appropriate. */
140 _handleClick(tab: MatTab, tabHeader: MatTabGroupBaseHeader, index: number): void;
141 /** Retrieves the tabindex for the tab. */
142 _getTabIndex(tab: MatTab, idx: number): number | null;
143 /** Callback for when the focused state of a tab has changed. */
144 _tabFocusChanged(focusOrigin: FocusOrigin, index: number): void;
145 static ngAcceptInputType_dynamicHeight: BooleanInput;
146 static ngAcceptInputType_animationDuration: NumberInput;
147 static ngAcceptInputType_selectedIndex: NumberInput;
148 static ngAcceptInputType_disableRipple: BooleanInput;
149 static ngAcceptInputType_contentTabIndex: NumberInput;
150}
151/**
152 * Material design tab-group component. Supports basic tab pairs (label + content) and includes
153 * animated ink-bar, keyboard navigation, and screen reader.
154 * See: https://material.io/design/components/tabs.html
155 */
156export declare class MatTabGroup extends _MatTabGroupBase {
157 _allTabs: QueryList<MatTab>;
158 _tabBodyWrapper: ElementRef;
159 _tabHeader: MatTabGroupBaseHeader;
160 constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, defaultConfig?: MatTabsConfig, animationMode?: string);
161}
162export {};
Note: See TracBrowser for help on using the repository browser.