UNPKG

@alauda/ui

Version:

Angular UI components by Alauda Frontend Team.

49 lines (48 loc) 2.59 kB
import { TemplatePortal } from '@angular/cdk/portal'; import { AfterContentInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core'; import { Subject } from 'rxjs'; import { TabLabelDirective } from './tab-body.component'; import { TabContextService } from './tab-context.service'; import * as i0 from "@angular/core"; export declare class TabComponent implements AfterContentInit, OnDestroy, OnChanges { private readonly _viewContainerRef; readonly tabContext: TabContextService; name: string; /** Plain text label for the tab, used when there is no template label. */ textLabel: string; /** Whether or not to show the close button in the header */ closeable: boolean; /** Whether or not the tab is disabled */ disabled: boolean; close: EventEmitter<void>; /** Content for the tab label given by `<ng-template [auiTabLabel]>`. */ templateLabel: TabLabelDirective; /** * Template provided in the tab content that will be used if present, used to enable lazy-loading */ _explicitContent: TemplateRef<any>; /** Template inside the AuiTab view that contains an `<ng-content>`. */ _implicitContent: TemplateRef<any>; get content(): TemplatePortal | null; /** * The relatively indexed position where 0 represents the center, negative is left, and positive * represents the right. */ position: number | null; /** * The initial relatively index origin of the tab if it was created and selected after there * was already a selected tab. Provides context of what position the tab should originate from. */ origin: number | null; /** Emits whenever the internal state of the tab changes. */ readonly _stateChanges: Subject<void>; /** Portal that will be the hosted content of the tab */ private _contentPortal; constructor(_viewContainerRef: ViewContainerRef, tabContext: TabContextService); ngAfterContentInit(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "aui-tab", ["auiTab"], { "name": { "alias": "name"; "required": false; }; "textLabel": { "alias": "label"; "required": false; }; "closeable": { "alias": "closeable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "close": "close"; }, ["templateLabel", "_explicitContent"], ["*"], true, never>; static ngAcceptInputType_disabled: unknown; }