import * as i0 from '@angular/core'; import { OnInit, OnDestroy, AfterContentInit, EventEmitter } from '@angular/core'; import { Subject } from 'rxjs'; import { IToggleView, PositionSettings, IBaseEventArgs, CancelableEventArgs, OverlaySettings } from 'igniteui-angular/core'; import { IgxToggleDirective, IgxButtonType } from 'igniteui-angular/directives'; /** * **Ignite UI for Angular Dialog Window** - * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/dialog.html) * * The Ignite UI Dialog Window presents a dialog window to the user which can simply display messages or display * more complicated visuals such as a user sign-in form. It also provides a right and left button * which can be used for custom actions. * * Example: * ```html * * *
* * * * *
*
* * * * *
*
* ``` */ declare class IgxDialogComponent implements IToggleView, OnInit, OnDestroy, AfterContentInit { private elementRef; private navService; private static NEXT_ID; private static readonly DIALOG_CLASS; toggleRef: IgxToggleDirective; /** * Sets the value of the `id` attribute. If not provided it will be automatically generated. * ```html * * * ``` */ id: string; /** * Controls whether the dialog should be shown as modal. Defaults to `true` * ```html * * ``` */ get isModal(): boolean; set isModal(val: boolean); /** * Controls whether the dialog should close when `Esc` key is pressed. Defaults to `true` * ```html * * ``` */ get closeOnEscape(): boolean; set closeOnEscape(val: boolean); /** * Set whether the Tab key focus is trapped within the dialog when opened. * Defaults to `true`. * ```html * * ``` */ focusTrap: boolean; /** * Sets the title of the dialog. * ```html * * ``` */ title: string; /** * Sets the message text of the dialog. * ```html * * ``` */ message: string; /** * Sets the `label` of the left button of the dialog. * ```html * * ``` */ leftButtonLabel: string; /** * Sets the left button `type`. The types are `flat`, `contained` and `fab`. * The `flat` type button is a rectangle and doesn't have a shadow.
* The `contained` type button is also a rectangle but has a shadow.
* The `fab` type button is a circle with a shadow.
* The default value is `flat`. * ```html * * ``` */ leftButtonType: IgxButtonType; /** * Sets the left button `ripple`. The `ripple` animates a click/tap to a component as a series of fading waves. * The property accepts all valid CSS color property values. * ```html * * ``` */ leftButtonRipple: string; /** * Sets the `label` of the right button of the dialog. * ```html * * ``` */ rightButtonLabel: string; /** * Sets the right button `type`. The types are `flat`, `contained` and `fab`. * The `flat` type button is a rectangle and doesn't have a shadow.
* The `contained` type button is also a rectangle but has a shadow.
* The `fab` type button is a circle with a shadow.
* The default value is `flat`. * ```html * * ``` */ rightButtonType: IgxButtonType; /** * Sets the right button `ripple`. * ```html * * ``` */ rightButtonRipple: string; /** * Gets/Sets whether the dialog should close on click outside the component. By default it's false. * ```html * * * ``` */ get closeOnOutsideSelect(): boolean; set closeOnOutsideSelect(val: boolean); /** * Get the position and animation settings used by the dialog. * ```typescript * @ViewChild('alert', { static: true }) public alert: IgxDialogComponent; * let currentPosition: PositionSettings = this.alert.positionSettings * ``` */ get positionSettings(): PositionSettings; /** * Set the position and animation settings used by the dialog. * ```typescript * import { slideInLeft, slideOutRight } from 'igniteui-angular'; * ... * @ViewChild('alert', { static: true }) public alert: IgxDialogComponent; * public newPositionSettings: PositionSettings = { * openAnimation: useAnimation(slideInTop, { params: { duration: '2000ms' } }), * closeAnimation: useAnimation(slideOutBottom, { params: { duration: '2000ms'} }), * horizontalDirection: HorizontalAlignment.Left, * verticalDirection: VerticalAlignment.Middle, * horizontalStartPoint: HorizontalAlignment.Left, * verticalStartPoint: VerticalAlignment.Middle, * minSize: { height: 100, width: 100 } * }; * this.alert.positionSettings = this.newPositionSettings; * ``` */ set positionSettings(settings: PositionSettings); /** * The default `tabindex` attribute for the component * * @hidden */ tabindex: number; /** * An event that is emitted before the dialog is opened. * ```html * * * ``` */ opening: EventEmitter; /** * An event that is emitted after the dialog is opened. * ```html * * * ``` */ opened: EventEmitter; /** * An event that is emitted before the dialog is closed. * ```html * * * ``` */ closing: EventEmitter; /** * An event that is emitted after the dialog is closed. * ```html * * * ``` */ closed: EventEmitter; /** * An event that is emitted when the left button is clicked. * ```html * * * ``` */ leftButtonSelect: EventEmitter; /** * An event that is emitted when the right button is clicked. * ```html * * * ``` */ rightButtonSelect: EventEmitter; /** * @hidden */ isOpenChange: EventEmitter; /** * @hidden */ get element(): any; /** * Returns the value of state. Possible state values are "open" or "close". * ```typescript * @ViewChild("MyDialog") * public dialog: IgxDialogComponent; * ngAfterViewInit() { * let dialogState = this.dialog.state; * } * ``` */ get state(): string; /** * State of the dialog. * * ```typescript * // get * let dialogIsOpen = this.dialog.isOpen; * ``` * * ```html * * * ``` * * Two-way data binding. * ```html * * * ``` */ get isOpen(): boolean; set isOpen(value: boolean); get isCollapsed(): boolean; /** * Returns the value of the role of the dialog. The valid values are `dialog`, `alertdialog`, `alert`. * ```typescript * @ViewChild("MyDialog") * public dialog: IgxDialogComponent; * ngAfterViewInit() { * let dialogRole = this.dialog.role; * } * ``` */ get role(): "dialog" | "alertdialog" | "alert"; /** * Returns the value of the title id. * ```typescript * @ViewChild("MyDialog") * public dialog: IgxDialogComponent; * ngAfterViewInit() { * let dialogTitle = this.dialog.titleId; * } * ``` */ get titleId(): string; protected destroy$: Subject; private _positionSettings; private _overlayDefaultSettings; private _closeOnOutsideSelect; private _closeOnEscape; private _isModal; private _titleId; constructor(); ngAfterContentInit(): void; /** * A method that opens the dialog. * * @memberOf {@link IgxDialogComponent} * ```html * * * ``` */ open(overlaySettings?: OverlaySettings): void; /** * A method that that closes the dialog. * * @memberOf {@link IgxDialogComponent} * ```html * * * ``` */ close(): void; /** * A method that opens/closes the dialog. * * @memberOf {@link IgxDialogComponent} * ```html * * * ``` */ toggle(): void; /** * @hidden */ onDialogSelected(event: any): void; /** * @hidden */ onInternalLeftButtonSelect(event: any): void; /** * @hidden */ onInternalRightButtonSelect(event: any): void; /** * @hidden */ ngOnInit(): void; /** * @hidden */ ngOnDestroy(): void; private emitCloseFromDialog; private emitClosedFromDialog; private emitOpenedFromDialog; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isModal: unknown; static ngAcceptInputType_closeOnEscape: unknown; static ngAcceptInputType_focusTrap: unknown; static ngAcceptInputType_closeOnOutsideSelect: unknown; static ngAcceptInputType_isOpen: unknown; } interface IDialogEventArgs extends IBaseEventArgs { dialog: IgxDialogComponent; event: Event; } interface IDialogCancellableEventArgs extends IDialogEventArgs, CancelableEventArgs { } /** * @hidden */ declare class IgxDialogTitleDirective { defaultStyle: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @hidden */ declare class IgxDialogActionsDirective { defaultClass: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const IGX_DIALOG_DIRECTIVES: readonly [typeof IgxDialogComponent, typeof IgxDialogTitleDirective, typeof IgxDialogActionsDirective]; /** * @hidden * IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components */ declare class IgxDialogModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { IGX_DIALOG_DIRECTIVES, IgxDialogActionsDirective, IgxDialogComponent, IgxDialogModule, IgxDialogTitleDirective }; export type { IDialogCancellableEventArgs, IDialogEventArgs };