UNPKG

@dotglitch/ngx-common

Version:

Angular components and utilities that are commonly used.

45 lines (44 loc) 2.22 kB
import { TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; import { MenuItem } from '@dotglitch/ngx-common/core'; import { TooltipOptions } from './types'; import * as i0 from "@angular/core"; export declare class TooltipDirective { private dialog; private viewContainer; /** */ template: TemplateRef<any> | Type<any> | MenuItem[]; /** * Configuration for opening the app menu */ config: TooltipOptions; /** * Arbitrary data to pass into the template */ data: any; private isCursorOverTarget; private dialogIsOpen; constructor(dialog: MatDialog, viewContainer: ViewContainerRef); ngAfterViewInit(): void; open(): Promise<void>; onPointerEnter(evt: PointerEvent): Promise<void>; onPointerLeave(evt: PointerEvent): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[ngx-tooltip]", never, { "template": { "alias": "ngx-tooltip"; "required": false; }; "config": { "alias": "ngx-tooltip-config"; "required": false; }; "data": { "alias": "ngx-tooltip-context"; "required": false; }; }, {}, never, never, true, never>; } export declare const openTooltip: (dialog: MatDialog, template: TemplateRef<any> | Type<any> | MenuItem[], data: any, el: HTMLElement, config?: TooltipOptions, focusTrap?: boolean, matPopupOptions?: MatDialogConfig<any>) => Promise<any>; export declare class DropdownDirective extends TooltipDirective { /** * The items that will be bound to the menu that pops * up when the user clicks the element. */ template: TemplateRef<any> | Type<any> | MenuItem[]; /** * Configuration for opening the app menu */ _config: TooltipOptions; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<DropdownDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownDirective, "[ngx-dropdown],[ngx-dropdown-config]", never, { "template": { "alias": "ngx-dropdown"; "required": false; }; "_config": { "alias": "ngx-dropdown-config"; "required": false; }; }, {}, never, never, true, never>; }