UNPKG

design-angular-kit

Version:

Un toolkit Angular conforme alle linee guida di design per i servizi web della PA

100 lines (99 loc) 3.83 kB
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { ElementPlacement } from '../../../interfaces/core'; import * as i0 from "@angular/core"; import * as i1 from "../../../utils/coercion"; export declare class ItPopoverDirective implements AfterViewInit, OnDestroy { private readonly _elementRef; /** * Define the popover content * @param content the popover content */ set content(content: string); /** * Define the popover title * @param title the popover title */ set popoverTitle(title: string | undefined); /** * Define the popover placement * @param placement */ set popoverPlacement(placement: ElementPlacement); /** * Appends the popover to a specific element. * @param container */ set popoverContainer(container: 'body' | string | undefined); /** * Indicates whether the title contains html * @param html true if contain html */ set popoverHtml(html: boolean); /** * How popover is triggered * - 'hover': To open the Popover on hover of the mouse over the element * - 'focus': To ignore popovers on the user's next click of an element other than the toggle element. * @param trigger */ set popoverTrigger(trigger: 'click' | 'hover' | 'focus' | 'manual' | undefined); /** * This event fires immediately when the show method is called. */ showEvent: EventEmitter<Event>; /** * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete). */ shownEvent: EventEmitter<Event>; /** * This event fires immediately when the hide method is called. */ hideEvent: EventEmitter<Event>; /** * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete). */ hiddenEvent: EventEmitter<Event>; /** * This event fires after the show event when the tooltip template has been added to the DOM. */ insertedEvent: EventEmitter<Event>; private readonly element; private popover?; constructor(_elementRef: ElementRef); ngAfterViewInit(): void; ngOnDestroy(): void; /** * Shows the popover of an item. */ show(): void; /** * Hide the popover of an element. */ hide(): void; /** * Activate / Deactivate the popover of an element */ toggle(): void; /** * Hides and destroys the popover of an element. */ dispose(): void; /** * Gives the popover of an element a chance to be shown. */ enable(): void; /** * Removes the ability to show the popover of an element. */ disable(): void; /** * Toggles the possibility that the popover of an element is shown or hidden. */ toggleEnabled(): void; /** * Updates the position of an element's popover. */ update(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ItPopoverDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ItPopoverDirective, "[itPopover]", ["itPopover"], { "content": { "alias": "itPopover"; "required": false; }; "popoverTitle": { "alias": "popoverTitle"; "required": false; }; "popoverPlacement": { "alias": "popoverPlacement"; "required": false; }; "popoverContainer": { "alias": "popoverContainer"; "required": false; }; "popoverHtml": { "alias": "popoverHtml"; "required": false; }; "popoverTrigger": { "alias": "popoverTrigger"; "required": false; }; }, { "showEvent": "showEvent"; "shownEvent": "shownEvent"; "hideEvent": "hideEvent"; "hiddenEvent": "hiddenEvent"; "insertedEvent": "insertedEvent"; }, never, never, true, never>; static ngAcceptInputType_popoverHtml: i1.BooleanInput; }