@dotglitch/ngx-ctx-menu
Version:
Angular context menu that works with templates
27 lines (26 loc) • 1.23 kB
TypeScript
import { ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ContextMenuItem } from './types';
import { NgxAppMenuOptions } from './appmenu.directive';
import * as i0 from "@angular/core";
export declare class NgxContextMenuDirective {
private dialog;
private viewContainer;
/**
* The data representing the item the context-menu was opened for.
*/
data: any;
/**
* The items that will be bound to the context menu.
*/
menuItems: ContextMenuItem[];
/**
* Configuration for opening the app menu
*/
config: NgxAppMenuOptions;
constructor(dialog: MatDialog, viewContainer: ViewContainerRef);
onContextMenu(evt: PointerEvent): Promise<any>;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxContextMenuDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxContextMenuDirective, "[ngx-ctx-menu]", never, { "data": "ngx-ctx-menu-context"; "menuItems": "ngx-ctx-menu"; "config": "ngx-ctx-menu-config"; }, {}, never, never, true, never>;
}
export declare const openContextMenu: (dialog: MatDialog, menuItems: ContextMenuItem[], data: any, evt: PointerEvent, config?: NgxAppMenuOptions) => Promise<any>;