import { ChangeDetectorRef, ComponentFactoryResolver, NgZone, OnDestroy, OnInit } from '@angular/core'; import { LKContextMenuService } from './service'; import { ContextElementDirective } from './element'; export declare class LKContextMenuComponent implements OnInit, OnDestroy { private _componentFactoryResolver; private _detectorRef; private _service; private _ngZone; private _wrapper; private _curtain; contextElement: ContextElementDirective; private _arrow; componentRef: any; position: { top: string; left: string; width: string; 'max-height'?: string; }; arrowPosition: { left: string; top: string; transform?: string; }; arrow: boolean; cross: boolean; curtain: boolean; closed: boolean; opened: boolean; triggerElement: HTMLElement; isLoading: boolean; private _cursorPosition; private _disallowClose; private _openingSubscription; private _closingSubscription; private _loadingSubscription; constructor(_componentFactoryResolver: ComponentFactoryResolver, _detectorRef: ChangeDetectorRef, _service: LKContextMenuService, _ngZone: NgZone); ngOnInit(): void; ngOnDestroy(): void; private escape(e); private clickOutside(e); /** * Listen to scroll events on page and close the contextmenu if a scroll event happens outside of * the component */ private listenScroll(e); /** * Return the absolute position of the trigger element in page */ private readonly _triggerBoundingRect; /** * Return the HTML element of the context menu */ private readonly _cMenuEl; /** * Close the menu */ close(e?: MouseEvent): void; private load(e); /** * Position the context menu and show it */ private openContextMenu(e); /** * Call the right positioning method depending of the value set */ private forcePosition(width, height, position, isLoading?); /** * Position the context-menu relatively to its trigger element */ private positionRelative(); /** * Position the context-menu to top */ private positionTop(); /** * Position the context-menu to bottom */ private positionBottom(); /** * Position the context-menu to left */ private positionLeft(); /** * Position the context-menu to right */ private positionRight(); /** * Set the position of the menu */ private setPosition(width, height); /** * Set a number to string of this format : '${num]px' */ private static toPixels(num); }