contextMenu.component.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
  2. import { ContextMenuItemDirective } from './contextMenu.item.directive';
  3. import { IContextMenuOptions } from './contextMenu.options';
  4. import { ContextMenuService, IContextMenuClickEvent, CloseContextMenuEvent } from './contextMenu.service';
  5. export interface ILinkConfig {
  6. click: (item: any, $event?: MouseEvent) => void;
  7. enabled?: (item: any) => boolean;
  8. html: (item: any) => string;
  9. }
  10. export interface MouseLocation {
  11. left?: string;
  12. marginLeft?: string;
  13. marginTop?: string;
  14. top?: string;
  15. }
  16. export declare class ContextMenuComponent implements OnDestroy {
  17. private _contextMenuService;
  18. private changeDetector;
  19. private elementRef;
  20. private options;
  21. menuClass: string;
  22. autoFocus: boolean;
  23. useBootstrap4: boolean;
  24. disabled: boolean;
  25. close: EventEmitter<CloseContextMenuEvent>;
  26. open: EventEmitter<IContextMenuClickEvent>;
  27. menuItems: QueryList<ContextMenuItemDirective>;
  28. menuElement: ElementRef;
  29. visibleMenuItems: ContextMenuItemDirective[];
  30. links: ILinkConfig[];
  31. item: any;
  32. event: MouseEvent | KeyboardEvent;
  33. private subscription;
  34. constructor(_contextMenuService: ContextMenuService, changeDetector: ChangeDetectorRef, elementRef: ElementRef, options: IContextMenuOptions);
  35. ngOnDestroy(): void;
  36. onMenuEvent(menuEvent: IContextMenuClickEvent): void;
  37. isMenuItemVisible(menuItem: ContextMenuItemDirective): boolean;
  38. setVisibleMenuItems(): void;
  39. evaluateIfFunction(value: any): any;
  40. }