UNPKG

@progress/kendo-angular-dialog

Version:
96 lines (95 loc) 3.59 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Represents the settings for opening a Dialog through the `DialogService`. * ([See example.]({% slug api_dialog_dialogservice %}#toc-open)) * */ export class DialogSettings { /** * Use the `preventAction` callback to check if the pressed Dialog action should be prevented. If `true`, the Dialog does not close. * If the **Close** button in the title bar is clicked, `DialogResult` is a `DialogCloseResult` instance. * If the action buttons are used to close the Dialog, `DialogResult` contains the object passed when opening the Dialog. ([See example.](slug:service_dialog#toc-dialog-close-prevention)) * @param {DialogResult} ev The Dialog result. * @param {DialogRef} [dialogRef] The Dialog reference, provided only when you create the Dialog using a component. * @returns Returns `true` to prevent closing the Dialog. */ preventAction; /** * Sets the Dialog `title`. If you omit `title`, the Dialog does not render a **Close** button. */ title; /** * Sets the CSS classes for the Dialog wrapper element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']). */ cssClass; /** * Configures the Dialog opening `animation` ([see example]({% slug animations_dialog %})). * @default { type: 'translate', duration: 300 } */ animation; /** * Sets the HTML attributes for the Dialog wrapper element. Accepts string key-value pairs. */ htmlAttributes; /** * Defines the Dialog `content`. ([See example.](slug:service_dialog#toc-rendering-the-content-area)) */ content; /** * Sets the width of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ width; /** * Sets the minimum width of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ minWidth; /** * Sets the maximum width of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ maxWidth; /** * Sets the height of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ height; /** * Sets the minimum height of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ minHeight; /** * Sets the maximum height of the Dialog. * Use a number for pixels or a string for other units, for example, `50%`. */ maxHeight; /** * Defines the container where the Dialog is inserted. This changes the place in the page hierarchy where the Dialog appears. The component styling stays the same. */ appendTo; /** * Sets the `closeTitle` for the **Close** button. */ closeTitle; /** * Sets the Dialog `actions` buttons. */ actions; /** * Sets the layout of the Dialog action buttons with `actionsLayout`. */ actionsLayout; /** * Sets the query selector for the element to focus automatically with `autoFocusedElement`. */ autoFocusedElement; /** * Sets the theme color of the Dialog. */ themeColor; }