UNPKG

@progress/kendo-angular-dialog

Version:
107 lines (106 loc) 4.09 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * The settings that can be used when the Dialog is opened through `DialogService`. * ([see example]({% slug api_dialog_dialogservice %}#toc-open)). */ export class DialogSettings { /** * Defines a predicate that verifies if the pressed dialog action should be prevented. Returning true from the predicate prevents the dialog from closing. * If the **Close** button of the title bar is clicked, `DialogResult` is a `DialogCloseResult` instance. * If the Dialog is closed through the action buttons, `DialogResult` contains the object that was passed when the Dialog was opened. ([see example](slug:service_dialog#toc-dialog-close-prevention)) * @param {DialogResult} ev * @param {DialogRef} [dialogRef] - provided only when the dialog is created using a component. * @returns */ preventAction; /** * Sets the title of the Dialog. If `title` is omitted, * the Dialog will not render a **Close** button. */ title; /** * Sets the CSS classes that will be rendered on the Dialog wrapper element. * Supports the union type of values that NgClass accepts [ngClass](link:site.data.urls.angular['ngclassapi']). */ cssClass; /** * Configures the Dialog opening animation ([see example]({% slug animations_dialog %})). * By default the animation type is set to `translate` and its duration is `300ms`. */ animation; /** * Sets the HTML attributes of the Dialog wrapper element. * The property accepts string key-value based pairs. */ htmlAttributes; /** * Defines the content of the Dialog. * ([see example](slug:service_dialog#toc-rendering-the-content-area)). */ content; /** * 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; /** * 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; /** * 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; /** * 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; /** * 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; /** * 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; /** * Defines the container in which the Dialog will be inserted. * Specifying this option changes the place in the page hierarchy where the Dialog will be inserted. * The styling of the component will remain the same. */ appendTo; /** * Specifies the title of the close button. */ closeTitle; /** * Sets the action buttons of the Dialog. */ actions; /** * Specifies the layout of the action buttons in the Dialog. */ actionsLayout; /** * Sets the focused element query selector. */ autoFocusedElement; /** * Specifies the theme color of the Dialog. */ themeColor; }