devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
517 lines (394 loc) • 22.3 kB
TypeScript
/*!
* devextreme-angular
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
import { AnimationConfig, PositionConfig } from 'devextreme/common/core/animation';
import { event } from 'devextreme/events/events.types';
import { ContentReadyEvent, DisposingEvent, HiddenEvent, HidingEvent, InitializedEvent, OptionChangedEvent, ShowingEvent, ShownEvent, TitleRenderedEvent } from 'devextreme/ui/popover';
import { Position } from 'devextreme/common';
import { dxPopupToolbarItem } from 'devextreme/ui/popup';
import DxPopover from 'devextreme/ui/popover';
import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core';
import { DxiPopoverToolbarItemComponent } from 'devextreme-angular/ui/popover/nested';
import type * as DxPopoverTypes from "devextreme/ui/popover_types";
import * as i0 from "@angular/core";
import * as i1 from "devextreme-angular/ui/nested";
import * as i2 from "devextreme-angular/ui/popover/nested";
import * as i3 from "devextreme-angular/core";
/**
* The Popover is a UI component that shows notifications within a box with an arrow pointing to a specified UI element.
*/
export declare class DxPopoverComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
private _watcherHelper;
private _idh;
instance: DxPopover;
/**
* Configures UI component visibility animations. This object contains two fields: show and hide.
*/
get animation(): {
hide?: AnimationConfig;
show?: AnimationConfig;
};
set animation(value: {
hide?: AnimationConfig;
show?: AnimationConfig;
});
/**
* Specifies whether to close the UI component if a user clicks outside the popover window or outside the target element.
* @deprecated Use the hideOnOutsideClick option instead.
*/
get closeOnOutsideClick(): boolean | ((event: event) => boolean);
set closeOnOutsideClick(value: boolean | ((event: event) => boolean));
/**
* Specifies the container in which to render the UI component.
*/
get container(): any | string | undefined;
set container(value: any | string | undefined);
/**
* Specifies a custom template for the UI component content.
*/
get contentTemplate(): any;
set contentTemplate(value: any);
/**
* Specifies whether to render the UI component's content when it is displayed. If false, the content is rendered immediately.
*/
get deferRendering(): boolean;
set deferRendering(value: boolean);
/**
* Specifies whether the UI component responds to user interaction.
*/
get disabled(): boolean;
set disabled(value: boolean);
/**
* Specifies whether to enable page scrolling when the UI component is visible.
*/
get enableBodyScroll(): boolean;
set enableBodyScroll(value: boolean);
/**
* Specifies the UI component's height.
*/
get height(): (() => number | string) | number | string;
set height(value: (() => number | string) | number | string);
/**
* Specifies properties of popover hiding. Ignored if the shading property is set to true.
*/
get hideEvent(): string | undefined | {
delay?: number | undefined;
name?: string | undefined;
};
set hideEvent(value: string | undefined | {
delay?: number | undefined;
name?: string | undefined;
});
/**
* Specifies whether to hide the UI component if a user clicks outside the popover window or outside the target element.
*/
get hideOnOutsideClick(): boolean | ((event: event) => boolean);
set hideOnOutsideClick(value: boolean | ((event: event) => boolean));
/**
* Specifies whether to hide the widget when users scroll one of its parent elements.
*/
get hideOnParentScroll(): boolean;
set hideOnParentScroll(value: boolean);
/**
* Specifies text for a hint that appears when a user pauses on the UI component.
*/
get hint(): string | undefined;
set hint(value: string | undefined);
/**
* Specifies whether the UI component changes its state when a user pauses on it.
*/
get hoverStateEnabled(): boolean;
set hoverStateEnabled(value: boolean);
/**
* Specifies the maximum height the UI component can reach while resizing.
*/
get maxHeight(): (() => number | string) | number | string;
set maxHeight(value: (() => number | string) | number | string);
/**
* Specifies the maximum width the UI component can reach while resizing.
*/
get maxWidth(): (() => number | string) | number | string;
set maxWidth(value: (() => number | string) | number | string);
/**
* Specifies the minimum height the UI component can reach while resizing.
*/
get minHeight(): (() => number | string) | number | string;
set minHeight(value: (() => number | string) | number | string);
/**
* Specifies the minimum width the UI component can reach while resizing.
*/
get minWidth(): (() => number | string) | number | string;
set minWidth(value: (() => number | string) | number | string);
/**
* An object defining UI component positioning properties.
*/
get position(): Position | PositionConfig;
set position(value: Position | PositionConfig);
/**
* Switches the UI component to a right-to-left representation.
*/
get rtlEnabled(): boolean;
set rtlEnabled(value: boolean);
/**
* Specifies whether to shade the background when the UI component is active.
*/
get shading(): boolean;
set shading(value: boolean);
/**
* Specifies the shading color. Applies only if shading is enabled.
*/
get shadingColor(): string;
set shadingColor(value: string);
/**
* Specifies whether or not the UI component displays the Close button.
*/
get showCloseButton(): boolean;
set showCloseButton(value: boolean);
/**
* Specifies properties for displaying the UI component.
*/
get showEvent(): string | undefined | {
delay?: number | undefined;
name?: string | undefined;
};
set showEvent(value: string | undefined | {
delay?: number | undefined;
name?: string | undefined;
});
/**
* A Boolean value specifying whether or not to display the title in the overlay window.
*/
get showTitle(): boolean;
set showTitle(value: boolean);
/**
* Specifies the element against which to position the widget.
*/
get target(): any | string | undefined;
set target(value: any | string | undefined);
/**
* The title in the overlay window.
*/
get title(): string;
set title(value: string);
/**
* Specifies a custom template for the UI component title. Does not apply if the title is defined.
*/
get titleTemplate(): any;
set titleTemplate(value: any);
/**
* Configures toolbar items.
*/
get toolbarItems(): Array<dxPopupToolbarItem>;
set toolbarItems(value: Array<dxPopupToolbarItem>);
/**
* A Boolean value specifying whether or not the UI component is visible.
*/
get visible(): boolean;
set visible(value: boolean);
/**
* Specifies the UI component's width.
*/
get width(): (() => number | string) | number | string;
set width(value: (() => number | string) | number | string);
/**
* Specifies the global attributes for the UI component's wrapper element.
*/
get wrapperAttr(): any;
set wrapperAttr(value: any);
/**
* A function that is executed when the UI component is rendered and each time the component is repainted.
*/
onContentReady: EventEmitter<ContentReadyEvent>;
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<DisposingEvent>;
/**
* A function that is executed after the UI component is hidden.
*/
onHidden: EventEmitter<HiddenEvent>;
/**
* A function that is executed before the UI component is hidden.
*/
onHiding: EventEmitter<HidingEvent>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<InitializedEvent>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<OptionChangedEvent>;
/**
* A function that is executed before the UI component is displayed.
*/
onShowing: EventEmitter<ShowingEvent>;
/**
* A function that is executed after the UI component is displayed.
*/
onShown: EventEmitter<ShownEvent>;
/**
* A function that is executed when the UI component's title is rendered.
*/
onTitleRendered: EventEmitter<TitleRenderedEvent>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
animationChange: EventEmitter<{
hide?: AnimationConfig;
show?: AnimationConfig;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
closeOnOutsideClickChange: EventEmitter<boolean | ((event: event) => boolean)>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
containerChange: EventEmitter<any | string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
contentTemplateChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
deferRenderingChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
disabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
enableBodyScrollChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
heightChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hideEventChange: EventEmitter<string | undefined | {
delay?: number | undefined;
name?: string | undefined;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hideOnOutsideClickChange: EventEmitter<boolean | ((event: event) => boolean)>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hideOnParentScrollChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hintChange: EventEmitter<string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hoverStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
maxHeightChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
maxWidthChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
minHeightChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
minWidthChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
positionChange: EventEmitter<Position | PositionConfig>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
rtlEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
shadingChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
shadingColorChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showCloseButtonChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showEventChange: EventEmitter<string | undefined | {
delay?: number | undefined;
name?: string | undefined;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showTitleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
targetChange: EventEmitter<any | string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
titleChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
titleTemplateChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
toolbarItemsChange: EventEmitter<Array<dxPopupToolbarItem>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
visibleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
widthChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
wrapperAttrChange: EventEmitter<any>;
get toolbarItemsChildren(): QueryList<DxiPopoverToolbarItemComponent>;
set toolbarItemsChildren(value: QueryList<DxiPopoverToolbarItemComponent>);
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
protected _createInstance(element: any, options: any): DxPopover<any>;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
setupChanges(prop: string, changes: SimpleChanges): void;
ngDoCheck(): void;
_setOption(name: string, value: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DxPopoverComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DxPopoverComponent, "dx-popover", never, { "animation": { "alias": "animation"; "required": false; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; }; "container": { "alias": "container"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "deferRendering": { "alias": "deferRendering"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "enableBodyScroll": { "alias": "enableBodyScroll"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hideEvent": { "alias": "hideEvent"; "required": false; }; "hideOnOutsideClick": { "alias": "hideOnOutsideClick"; "required": false; }; "hideOnParentScroll": { "alias": "hideOnParentScroll"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "position": { "alias": "position"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "shading": { "alias": "shading"; "required": false; }; "shadingColor": { "alias": "shadingColor"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "showEvent": { "alias": "showEvent"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "target": { "alias": "target"; "required": false; }; "title": { "alias": "title"; "required": false; }; "titleTemplate": { "alias": "titleTemplate"; "required": false; }; "toolbarItems": { "alias": "toolbarItems"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; "wrapperAttr": { "alias": "wrapperAttr"; "required": false; }; }, { "onContentReady": "onContentReady"; "onDisposing": "onDisposing"; "onHidden": "onHidden"; "onHiding": "onHiding"; "onInitialized": "onInitialized"; "onOptionChanged": "onOptionChanged"; "onShowing": "onShowing"; "onShown": "onShown"; "onTitleRendered": "onTitleRendered"; "animationChange": "animationChange"; "closeOnOutsideClickChange": "closeOnOutsideClickChange"; "containerChange": "containerChange"; "contentTemplateChange": "contentTemplateChange"; "deferRenderingChange": "deferRenderingChange"; "disabledChange": "disabledChange"; "enableBodyScrollChange": "enableBodyScrollChange"; "heightChange": "heightChange"; "hideEventChange": "hideEventChange"; "hideOnOutsideClickChange": "hideOnOutsideClickChange"; "hideOnParentScrollChange": "hideOnParentScrollChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "maxHeightChange": "maxHeightChange"; "maxWidthChange": "maxWidthChange"; "minHeightChange": "minHeightChange"; "minWidthChange": "minWidthChange"; "positionChange": "positionChange"; "rtlEnabledChange": "rtlEnabledChange"; "shadingChange": "shadingChange"; "shadingColorChange": "shadingColorChange"; "showCloseButtonChange": "showCloseButtonChange"; "showEventChange": "showEventChange"; "showTitleChange": "showTitleChange"; "targetChange": "targetChange"; "titleChange": "titleChange"; "titleTemplateChange": "titleTemplateChange"; "toolbarItemsChange": "toolbarItemsChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; "wrapperAttrChange": "wrapperAttrChange"; }, ["toolbarItemsChildren"], ["*"], false, never>;
}
export declare class DxPopoverModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DxPopoverModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DxPopoverModule, [typeof DxPopoverComponent], [typeof i1.DxoAnimationModule, typeof i1.DxoHideModule, typeof i1.DxoFromModule, typeof i1.DxoPositionModule, typeof i1.DxoAtModule, typeof i1.DxoBoundaryOffsetModule, typeof i1.DxoCollisionModule, typeof i1.DxoMyModule, typeof i1.DxoOffsetModule, typeof i1.DxoToModule, typeof i1.DxoShowModule, typeof i1.DxoHideEventModule, typeof i1.DxoShowEventModule, typeof i2.DxoPopoverAnimationModule, typeof i2.DxoPopoverAtModule, typeof i2.DxoPopoverBoundaryOffsetModule, typeof i2.DxoPopoverCollisionModule, typeof i2.DxoPopoverFromModule, typeof i2.DxoPopoverHideModule, typeof i2.DxoPopoverHideEventModule, typeof i2.DxoPopoverMyModule, typeof i2.DxoPopoverOffsetModule, typeof i2.DxoPopoverPositionModule, typeof i2.DxoPopoverShowModule, typeof i2.DxoPopoverShowEventModule, typeof i2.DxoPopoverToModule, typeof i2.DxiPopoverToolbarItemModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxPopoverComponent, typeof i1.DxoAnimationModule, typeof i1.DxoHideModule, typeof i1.DxoFromModule, typeof i1.DxoPositionModule, typeof i1.DxoAtModule, typeof i1.DxoBoundaryOffsetModule, typeof i1.DxoCollisionModule, typeof i1.DxoMyModule, typeof i1.DxoOffsetModule, typeof i1.DxoToModule, typeof i1.DxoShowModule, typeof i1.DxoHideEventModule, typeof i1.DxoShowEventModule, typeof i2.DxoPopoverAnimationModule, typeof i2.DxoPopoverAtModule, typeof i2.DxoPopoverBoundaryOffsetModule, typeof i2.DxoPopoverCollisionModule, typeof i2.DxoPopoverFromModule, typeof i2.DxoPopoverHideModule, typeof i2.DxoPopoverHideEventModule, typeof i2.DxoPopoverMyModule, typeof i2.DxoPopoverOffsetModule, typeof i2.DxoPopoverPositionModule, typeof i2.DxoPopoverShowModule, typeof i2.DxoPopoverShowEventModule, typeof i2.DxoPopoverToModule, typeof i2.DxiPopoverToolbarItemModule, typeof i3.DxTemplateModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DxPopoverModule>;
}
export { DxPopoverTypes };