@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
179 lines (178 loc) • 6.6 kB
TypeScript
import { AfterContentChecked, AfterContentInit, ElementRef, EventEmitter, Injector, QueryList } from '@angular/core';
import { Strings } from '../../generated/strings';
import { Layout } from '../common/layout';
import { SpacerBaseDirective } from '../common/spacer-base.component';
import { PivotTabType } from './pivot-tab-type';
import { PivotTabComponent } from './pivot-tab.component';
import * as i0 from "@angular/core";
/**
* @smeDoc {@label Pivot @id sme-pivot-component}
*
* @overview
* @file {@filepath ./examples/overview.md}
*
* @example {@label Static Tab @id static-tab}
* @file {@filename component.html @filepath ./examples/static-tab.component.html}
*
* @example {@label Routed Tab @id routed-tab}
* @file {@filename component.html @filepath ./examples/routed-tab.component.html}
*/
export declare class PivotComponent extends SpacerBaseDirective implements AfterContentChecked, AfterContentInit, Layout {
visibleTabs: PivotTabComponent[];
trayTabs: any[];
moreTabsDisplay: string;
/**
* Localized set of strings.
*/
strings: Strings;
/**
* The source name to use for logging
*/
protected get logSourceName(): string;
/**
* The selected tab
*/
selection: PivotTabComponent;
/**
* It indicates whether to show/hide or load/unload the tabs to do tab switching
*/
switchTabByShowHide: boolean;
/**
* Text for a header to show with the pivot tabs. Displayed as h4 with tabs on the right.
*/
headerText: string;
/**
* @deprecated since 08/30/19. Please use alignTabs instead
*/
set alignHeader(value: 'right' | 'left');
/**
* Where to align tabs, left or right
*/
alignTabs: 'right' | 'left';
/**
* The selected tab changed event
*/
selectionChange: EventEmitter<PivotTabComponent>;
/**
* The selected tab changed event triggered by click or keyboard navigation.
*/
selectionChangeByClick: EventEmitter<PivotTabComponent>;
/**
* Implementation of the Layout interface
*/
layoutChanged: EventEmitter<void>;
/**
* Implementation of the Layout interface
*/
windowBreakpointChanged: EventEmitter<void>;
/**
* The Tabs of the Pivot
*/
tabs: QueryList<PivotTabComponent>;
visibleTabsQL: QueryList<PivotTabComponent>;
/**
* Bindable property for tab types
*/
pivotTabType: typeof PivotTabType;
/**
* Indicates if this pivot is disabled
*/
disabled: boolean;
/**
* Indicates that routed tabs have been provided
*/
get hasRoutedTabs(): boolean;
/**
* Indicates that static tabs have been provided
*/
get hasStaticTabs(): boolean;
get visiTabs(): PivotTabComponent[];
/**
* Indicates that static tabs have been provided
*/
get selectionIsRouted(): boolean;
private changeDetectorRef;
/**
* This dropdown element that contains pivotTabs only if the screen size doesn't allow.
*/
private dropDownButtonElement;
pivotContents: QueryList<ElementRef>;
private pivotResponsiveWindowManager;
/**
* Initializes a new instance of the @see PivotComponent class.
* @param injector The angular injection service. required by @SmeInjectableBase() decorator in the base @see BaseComponent class
*/
constructor(injector: Injector, layout: Layout);
ngAfterContentInit(): void;
ngAfterContentChecked(): void;
/**
* Indicates of a given tab is selected
* @param tab The tab to compare with
*/
isSelected(tab: PivotTabComponent): boolean;
/**
* Force refresh for the pivot tabs.
*/
refresh(shouldEmit?: boolean, byWindowSize?: boolean): void;
/**
* Selects a tab by clicking or keyboard navigation.
* @param tab The tab to select by clicking or keyboard navigation.
*/
onClick(tab: PivotTabComponent): void;
/**
* Selects a tab
* @param tab The tab to select
*/
select(tab: PivotTabComponent): void;
/**
* The on window breakpoint changed handler.
* Adding yield for component to get ElementRef after initialization.
*/
onWindowBreakpointChanged(): void;
/**
* Emits the layout changed event to notify children about layout changed.
*/
private emitLayoutChanged;
/**
* On layout changed event handler, occurs every time the layout has been changed.
*/
private onLayoutChanged;
/**
* The deferred layout changed handler.
*/
private deferredOnLayoutChanged;
/**
* It gets the label from the pivot tab component.
* @returns array of labels representing the pivot tabs.
*/
getLabels(): string[];
/**
* It handles the selection of pivot tab by label.
* @param label the label for pivot tab to be selected.
* @returns void.
*/
selectTabByLabel(label: string): void;
/**
* Creates the idBag used by this component to store unique element ids.
* id values will be assigned by the @see BaseComponent super class.
*/
protected createIdBag(): MsftSme.StringMap<string>;
/**
* Gets the initial host classes to be applied to this element
*/
protected getInitialHostClasses(): string[];
/**
* Gets the pivot tab component by pivot tab label.
* @param label the label string.
* @returns the pivot tab component with the specific label.
*/
private getPivotTabComponentByLabel;
/**
* Main rendering functionality for the pivot tab
* @param shouldEmit It indicates whether the layout changed event should be fired.
* @param byWindowSize It indicates whether to use the window width when the hostElement width is 0.
*/
private updatePivotTabs;
static ɵfac: i0.ɵɵFactoryDeclaration<PivotComponent, [null, { optional: true; skipSelf: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<PivotComponent, "sme-pivot", never, { "selection": "selection"; "switchTabByShowHide": "switchTabByShowHide"; "headerText": "headerText"; "alignHeader": "alignHeader"; "alignTabs": "alignTabs"; "disabled": "disabled"; }, { "selectionChange": "selectionChange"; "selectionChangeByClick": "selectionChangeByClick"; "layoutChanged": "layoutChanged"; "windowBreakpointChanged": "windowBreakpointChanged"; }, ["tabs", "visibleTabsQL"], never, false, never>;
}