@progress/kendo-angular-dialog
Version:
Dialog Package for Angular
207 lines (206 loc) • 7.48 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { AfterContentInit, AfterViewInit, EventEmitter, OnInit, OnDestroy, ElementRef, TemplateRef, Renderer2, ChangeDetectorRef, NgZone, QueryList } from '@angular/core';
import { AnimationBuilder } from '@angular/animations';
import { DialogActionsComponent } from './dialog-actions.component';
import { DialogTitleBarComponent } from './dialog-titlebar.component';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { ActionsLayout } from '../common/actions-layout';
import { DialogAction } from './models/dialog-action';
import { DialogAnimation } from './models/dialog-animation';
import { DialogThemeColor } from './models';
import * as i0 from "@angular/core";
/**
* Represents the [Kendo UI Dialog component for Angular]({% slug overview_dialog_dialogs %}).
*/
export declare class DialogComponent implements AfterContentInit, AfterViewInit, OnInit, OnDestroy {
private wrapper;
private renderer;
private cdr;
private ngZone;
private builder;
/**
* Specifies the action buttons that will be rendered.
*/
actions: DialogAction[];
/**
* Specifies the layout of the action buttons in the Dialog.
* This option is only applicable if the action buttons are specified through the `actions` options.
*
* @default 'stretched'
*/
actionsLayout: ActionsLayout;
/**
* Specifies the query selector used to set the initial focus ([see examples]({% slug initial_focus_dialog %})).
*/
autoFocusedElement: string;
/**
* Specifies the text that is rendered in the title bar.
*/
title: string;
/**
* Specifies the width of the Dialog.
* A numeric value sets the width in pixels.
* A string value sets the width in arbitrary units—for example, `50%`.
*/
width: number | string;
/**
* Specifies the minimum width of the Dialog.
* A numeric value sets the minimum width in pixels.
* A string value sets the minimum width in arbitrary units—for example, `50%`.
*/
minWidth: number | string;
/**
* Specifies the maximum width of the Dialog.
* A numeric value sets the maximum width in pixels.
* A string value sets the maximum width in arbitrary units—for example, `50%`.
*/
maxWidth: number | string;
/**
* Specifies the height of the Dialog.
* A numeric value sets the height in pixels.
* A string value sets the height in arbitrary units—for example, `50%`.
*/
height: number | string;
/**
* Specifies the minimum height of the Dialog.
* A numeric value sets the minimum height in pixels.
* A string value sets the minimum height in arbitrary units—for example, `50%`.
*/
minHeight: number | string;
/**
* Specifies the maximum height of the Dialog.
* A numeric value sets the maximum height in pixels.
* A string value sets the maximum height in arbitrary units—for example, `50%`.
*/
maxHeight: number | string;
/**
* Configures the Dialog opening animation ([see example]({% slug animations_dialog %})).
* By default the animation type is set to `translate` and its duration is `300ms`.
*
* @default true
*/
animation: boolean | DialogAnimation;
/**
* The Dialog allows you to specify predefined theme colors.
* The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
*
* The possible values are:
* * `primary`
* * `dark`
* * `light`
*/
set themeColor(themeColor: DialogThemeColor);
get themeColor(): DialogThemeColor;
/**
* @hidden
*/
set htmlAttributes(attributes: {
[key: string]: string;
});
get htmlAttributes(): {
[key: string]: string;
};
/**
* @hidden
*/
set cssClass(classes: any);
get cssClass(): any;
/**
* @hidden
*/
contentTemplate: TemplateRef<any>;
/**
* @hidden
*/
titleId: string;
/**
* @hidden
*/
contentId: string;
/**
* @hidden
*/
closeTitle: string;
/**
* @hidden
*/
showLicenseWatermark: boolean;
/**
* Fires when the user clicks an action button of the Dialog.
* The event is fired only when the action buttons are specified through the `actions` options.
*/
action: EventEmitter<DialogAction>;
/**
* Fires when the user clicks the **Close** button of the Dialog or the **ESC** key.
*/
close: EventEmitter<any>;
get dir(): string;
tabIndex: number;
titlebarContent: QueryList<DialogTitleBarComponent>;
titlebarView: QueryList<DialogTitleBarComponent>;
actionsView: DialogActionsComponent;
dialog: ElementRef;
private _htmlAttributes;
private _cssClass;
private _themeColor;
private direction;
private subscriptions;
private domSubs;
constructor(wrapper: ElementRef, renderer: Renderer2, localization: LocalizationService, cdr: ChangeDetectorRef, ngZone: NgZone, builder: AnimationBuilder);
ngAfterContentInit(): void;
ngAfterViewInit(): void;
ngOnInit(): void;
ngOnDestroy(): void;
/**
* Focuses the wrapper of the Dialog component.
*/
focus(): void;
private initDomEvents;
private onKeyDown;
private setServiceClasses;
/**
* @hidden
*/
private handleInitialFocus;
/**
* @hidden
*/
private findPrimary;
/**
* @hidden
*/
private handleActionButtonFocus;
/**
* @hidden
*/
private keepFocusWithinComponent;
/**
* @hidden
*/
private shouldFocusPrimary;
/**
* @hidden
*/
private getAllFocusableChildren;
/**
* @hidden
*/
private getFirstAndLastFocusable;
/**
* @hidden
*/
private generateTitleId;
/**
* @hidden
*/
private generateContentId;
get wrapperClass(): boolean;
get styles(): any;
private bubble;
private handleThemeColorClass;
static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "kendo-dialog", ["kendoDialog"], { "actions": { "alias": "actions"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; "autoFocusedElement": { "alias": "autoFocusedElement"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "themeColor": { "alias": "themeColor"; "required": false; }; }, { "action": "action"; "close": "close"; }, ["titlebarContent"], ["kendo-dialog-titlebar", "*", "kendo-dialog-actions"], true, never>;
}