UNPKG

@doku-dev/doku-fragment

Version:

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

39 lines (38 loc) 1.6 kB
import { AfterViewInit, ElementRef, NgZone, OnDestroy, Renderer2 } from '@angular/core'; import { DokuDropdownPlacement } from './dropdown.interface'; import * as i0 from "@angular/core"; export declare class DokuDropdown implements OnDestroy, AfterViewInit { protected elementRef: ElementRef; private renderer; private ngZone; private document; /** * The position of the dropdown menu while opened based on the toggler/anchor element. * @default 'bottom-start' */ placement: DokuDropdownPlacement; private dropdownToggle?; private dropdownMenu?; private bodyContainer?; private originalDropdownMenu?; private destroy$; constructor(elementRef: ElementRef, renderer: Renderer2, ngZone: NgZone, document: Document); private get dropdownToggleElement(); private get dropdownMenuElement(); ngAfterViewInit(): void; ngOnDestroy(): void; toggleDropdownMenu(): void; showDropdownMenu(): void; hideDropdownMenu(): void; /** * It will create a container for dropdown and append it to the body element. */ protected applyContainer(): void; /** * Remove body container when dropdown closed and add back the dropdown menu to its original element position. */ protected resetContainer(): void; private closeDropdownMenuEventHandler; static ɵfac: i0.ɵɵFactoryDeclaration<DokuDropdown, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DokuDropdown, "[doku-dropdown]", ["dokuDropdown"], { "placement": "placement"; }, {}, ["dropdownToggle", "dropdownMenu"], never, true>; }