@dotglitch/ngx-ctx-menu
Version:
Angular context menu that works with templates
53 lines (52 loc) • 1.79 kB
TypeScript
import { TemplateRef, Type, ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import * as i0 from "@angular/core";
export type NgxTooltipOptions = Partial<{
/**
* Position relative to the element the menu pops-up at
*/
position: "top" | "right" | "bottom" | "left";
/**
* How the popup is aligned relative to the element
*/
alignment: "center" | "beforestart" | "start" | "end" | "afterend";
/**
* @hidden
* WIP:
* Show an error from the dialog pointing to the element
*/
showArrow: boolean;
/**
* @hidden
* WIP:
* Size of the arrow.
*/
arrowSize: number;
/**
* How much padding to add near the edges of the screen.
*/
edgePadding: number;
customClass: string[];
}>;
export declare class NgxTooltipDirective {
private dialog;
private viewContainer;
/**
*/
template: TemplateRef<any> | Type<any>;
/**
* Configuration for opening the app menu
*/
config: NgxTooltipOptions;
/**
* Arbitrary data to pass into the template
*/
data: any;
constructor(dialog: MatDialog, viewContainer: ViewContainerRef);
ngOnInit(): void;
private dialogInstance;
onPointerEnter(evt: PointerEvent): Promise<void>;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxTooltipDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxTooltipDirective, "[ngxTooltip],[ngx-tooltip]", never, { "template": "ngx-tooltip"; "config": "ngx-tooltip-config"; "data": "ngx-tooltip-context"; }, {}, never, never, true, never>;
}
export declare const openTooltip: (dialog: MatDialog, template: TemplateRef<any> | Type<any>, data: any, el: HTMLElement, config?: NgxTooltipOptions) => Promise<any>;