UNPKG

@dotglitch/ngx-common

Version:

Angular components and utilities that are commonly used.

45 lines (44 loc) 2.05 kB
import { TemplateRef, Type, ViewContainerRef } from '@angular/core'; import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog'; import { TooltipOptions } from '../../types/tooltip'; import { MenuItem } from '../../types/menu'; import * as i0 from "@angular/core"; export declare const calcTooltipBounds: (template: TemplateRef<any> | Type<any>, data: any, matDialogConfig: MatDialogConfig) => Promise<DOMRect>; export declare class TooltipComponent { viewContainer: ViewContainerRef; private _data; dialog: MatDialog; dialogRef: MatDialogRef<any>; data: any; config: TooltipOptions; ownerCords: DOMRect; selfCords: any; template: TemplateRef<any> | Type<any> | MenuItem[]; isTemplate: boolean; isMenu: boolean; hasBootstrapped: boolean; pointerIsOnVoid: boolean; isLockedOpen: boolean; clientWidth: number; clientHeight: number; coverRectCords: { top: number; left: number; height: number; width: number; }; constructor(viewContainer: ViewContainerRef, _data: any, dialog: MatDialog, // optional only for the purpose of estimating dimensions dialogRef: MatDialogRef<any>); ngOnInit(): void; ngAfterViewInit(): void; onKeyDown(evt: KeyboardEvent): void; onVoidPointerDown(evt: PointerEvent): void; onWheel(evt: WheelEvent): void; /** * Close the tooltip if these actions occur */ private onClose; closeOnVoid(force?: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, [null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "ngx-tooltip", never, { "data": { "alias": "data"; "required": false; }; "config": { "alias": "config"; "required": false; }; "ownerCords": { "alias": "ownerCords"; "required": false; }; "selfCords": { "alias": "selfCords"; "required": false; }; "template": { "alias": "template"; "required": false; }; }, {}, never, never, true, never>; }