UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

50 lines (49 loc) 1.88 kB
import { AfterContentInit, ApplicationRef, EmbeddedViewRef, OnChanges, OnDestroy, Renderer2, SimpleChanges } 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, OnChanges { 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; ngOnChanges(changes: SimpleChanges): 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>; }