/** Angular2 */ import * as ng from "@angular/core"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; /** * Popover placement enum */ export declare enum PopOverPlacement { TopRight = "topright", BottomRight = "bottomright", TopLeft = "topleft", BottomLeft = "bottomleft", Auto = "auto" } /** * @whatItDoes * PopOver Component. It will stretch to the parent width and height and the inner content of this component will be rendered as a widget * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `string` : **iconClass** - Icon Class of popover widget header (by default is _icon-core-st-sm-info_) ; * `string` : **dataClass** - DataClass applied to the popover body element in the dom main container * `string` : **mainTitle** - Popover widget title (by default is _null_) ; * `string` : **trigger** - PopOver widget trigger events (click, hover, focus - To pass multiple values, separate them with a space) ; * `string | PopOverPlacement` : **placement** - PopOver placement, relative to parent (top, bottom, left, right, auto) or a combination, * such as "top rigth". A PopoverPlacement enum can also be used * `boolean` : **hideOnClickOutside** - In some cases (executionView, wizard) we need to disable the click outside behavior . * `boolean` : **controlBodyHover** - In some cases (when anchor element is not set) we need to force hiding popOver when mouse leaves the popOver body. * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * (...) * * * (...) * * * ``` * */ export declare class PopOver extends CoreComponent implements ng.OnInit, ng.OnDestroy, ng.AfterViewInit, ng.AfterContentInit, ng.OnChanges { private _element; private _ngZone; private _renderer; /** * Used to hide the element when we click outside */ _popOverId: string; /** * PopOver left position */ _leftPosition: number; /** * Popover top position */ _topPosition: number; /** * Controls the visibility of the popover body */ _visible: boolean; /** * Anchor element with attached popover */ private _anchor; /** * Popover element */ private _popover; /** * Stores the element query */ private _elementQuery; /** * In some cases (executionView, wizard) we need to disable the click outside behavior */ hideOnClickOutside: boolean; /** * DataClass applied to the popover body element in the dom main container */ dataClass: string; /** * Icon Class of popover widget header. Default is "icon-core-st-sm-info". */ iconClass: string; /** * Deprecated title input */ title: string; /** * Popover widget title. Default is null. */ mainTitle: string; /** * PopOver widget trigger events. * Possible values 'click', 'hover', 'focus', 'manual'. * To pass multiple values, separate them with a space * Default is 'click'. */ trigger: string; /** * PopOver widget placement, relative to parent. * Possible values are: 'top', 'bottom', 'left', 'right', 'auto'. Multiple values are supported. */ placement: string | PopOverPlacement; /** * Popover placement */ private _placementRotation; /** * Class applied to the popover arrow considering vertical positioning */ _arrowTop: string; /** * Class applied to the popover arrow considering horizontal positioning */ _arrowLeft: string; /** * Anchor triggers that we subscribed to open the popover */ private _subscribedAnchorTriggers; /** * Array of unbind functions for the events anchor events */ private _anchorTriggersSubscriptions; /** * If the popOver body content is hovered. */ isBodyHovered: boolean; /** * Control whether it is to force hiding popOver when mouse leaves the popOver body. */ controlBodyHover: boolean; /** * Constructor */ constructor(_element: ng.ElementRef, _ngZone: ng.NgZone, _renderer: ng.Renderer); /** * Click outside popover event */ private clickOutsideEvent; /** * On init, subscribe the outside events that could close the popover */ ngOnInit(): void; /** * When the popover placement changes, update its positioning */ ngOnChanges(changes: ng.SimpleChanges): void; /** * After view init, subscribe the element query size change to update the popover positoning * and setup anchor popover visibility triggers */ ngAfterViewInit(): void; /** * After component content is initiated set the popover-body on the body */ ngAfterContentInit(): void; /** * Update the popover left and top position */ updatePosition: () => void; /** * Setup the events that trigger the popover on the anchor */ private setupAnchorListeners; /** * Removes the anchor event listeners */ private removeAnchorListeners; /** * Toggle the popover visibility using the anchor */ anchorToggle: () => void; /** * On destroy */ ngOnDestroy(): void; /** * Update popover content html and force update on position */ contentUpdated(): void; /** * Show popup * @param blink hide and show popover on refresh state */ show: (blink?: boolean) => void; /** * Show popover with no blinking effect if it is visible */ showNoBlink: () => void; /** * Show popover for milliseconds * @param milliseconds Number of milliseconds before hide popover */ showFor(milliseconds: number): void; /** * Hide popover */ hide: (hideIfBodyHovered?: boolean) => void; /** * Toggle popover */ toggle(): void; /** * Update the popover placement rotation based on the placement string * @param placement String that to extract the rotation from */ private updatePlacementRotation; /** * Match the placemnt enum with the input placement string * @param placement Placement string to check * @param popOverPlacement Placement enum to match * @returns true if the placement string matches the popover placement type */ private placementMatch; /** * On Mouse Leave */ onMouseLeave(): void; } export declare class PopOverModule { }