@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
49 lines (48 loc) • 1.79 kB
TypeScript
import { AfterContentInit, ApplicationRef, EmbeddedViewRef, OnDestroy, Renderer2 } from '@angular/core';
import { DokuTabContent } from './tab-content.directive';
import { DokuTabLabel } from './tab-label.directive';
import { DokuTabs } from './tabs.component';
import * as i0 from "@angular/core";
export declare class DokuTab implements OnDestroy, AfterContentInit {
private appRef;
private renderer;
private tabs?;
/**
* Unique id of the tab.
* Default value is auto-generated.
*
* @default 'd-tab-[nextId]''
*/
id: string;
/**
* Whether the tab is disabled.
*
* The tab content is not going to be loaded on disabled tab.
*
* @default false
*/
disabled: boolean;
/**
* Whether the tab content is lazy loaded which means
* the content will be loaded when the tab is active and
* destroyed when away from the tab.
*
* @default false
*/
lazyLoad: boolean;
protected labelElement?: HTMLDivElement;
protected labelViewRef?: EmbeddedViewRef<any>;
protected contentElement?: HTMLDivElement;
protected contentViewRef?: EmbeddedViewRef<any>;
protected labelTemplate?: DokuTabLabel;
protected contentTemplate?: DokuTabContent;
private destroy$;
constructor(appRef: ApplicationRef, renderer: Renderer2, tabs?: DokuTabs | undefined);
ngAfterContentInit(): void;
ngOnDestroy(): void;
private handleActiveState;
private handleDisabledState;
private handleLazyLoaded;
static ɵfac: i0.ɵɵFactoryDeclaration<DokuTab, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DokuTab, "doku-tab", ["dokuTab"], { "id": "id"; "disabled": "disabled"; "lazyLoad": "lazyLoad"; }, {}, ["labelTemplate", "contentTemplate"], never, true>;
}