UNPKG

@progress/kendo-angular-dialog

Version:
100 lines (99 loc) 3.53 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { TemplateRef, ViewContainerRef } from '@angular/core'; import { WindowMessages } from './window-messages'; import { WindowRef } from './window-ref'; import { WindowState } from './window-types'; import { WindowThemeColor } from './theme-color'; /** * Represents the settings for the Window actions when you open a Window through `WindowService`. ([See example.]({% slug api_dialog_windowservice %}#toc-open)) */ export declare class WindowSettings { /** * Use the `preventClose` predicate to check if closing the Window should be prevented. Applies to clicking the **Close** button, pressing **Esc**, or calling the `close` method. Return `true` to prevent closing. If the **Close** button or **Esc** is used, a [`WindowCloseResult`]({% slug api_dialog_windowcloseresult %}) instance is passed. * @param {any} ev The event argument. * @param {WindowRef} [windowRef] - The window reference, provided only when you create the window using a component. * @returns Returns `true` to prevent closing the window. */ preventClose?: (ev: any, windowRef?: WindowRef) => boolean; /** * Sets the Window `title`. */ title?: string; /** * Defines the Window `content`. */ content?: string | TemplateRef<any> | Function; /** * Defines the content of the title bar. */ titleBarContent?: TemplateRef<any>; /** * Sets the text of the labels shown in the Window. Use for localization. */ messages?: WindowMessages; /** * Set to `true` to persist the Window content in the DOM when minimized. */ keepContent?: boolean; /** * Sets the width of the Window in pixels. */ width?: number; /** * Sets the minimum width of the Window in pixels. */ minWidth?: number; /** * Sets the height of the Window in pixels. */ height?: number; /** * Sets the minimum height of the Window in pixels. */ minHeight?: number; /** * Sets the left offset of the Window in pixels. */ left?: number; /** * Sets the top offset of the Window in pixels. */ top?: number; /** * Specifies is the Window is draggable. */ draggable?: boolean; /** * Sets custom CSS classes for the Window wrapper element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']). */ cssClass?: any; /** * Sets HTML attributes for the Window wrapper element. Accepts string key-value pairs. */ htmlAttributes?: { [key: string]: string; }; /** * Specifies if the Window is resizable. */ resizable?: boolean; /** * Sets the initial state of the Window. */ state?: WindowState; /** * Defines the container where the Window is inserted. This changes the place in the page hierarchy where the Window appears. */ appendTo?: ViewContainerRef; /** * Sets the query selector for the element to focus automatically. */ autoFocusedElement?: string; /** * Sets the theme color of the Window. */ themeColor?: WindowThemeColor; }