UNPKG

@progress/kendo-angular-dialog

Version:
54 lines (53 loc) 2.04 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ComponentFactoryResolver } from '@angular/core'; import { DialogContainerService } from './dialog-container.service'; import { DialogRef } from './models/dialog-ref'; import { DialogSettings } from './models'; import * as i0 from "@angular/core"; /** * Provides a service for opening Dialog windows dynamically ([see example]({% slug service_dialog %})). */ export declare class DialogService { /** * @hidden */ private resolver; private containerService; constructor( /** * @hidden */ resolver: ComponentFactoryResolver, containerService: DialogContainerService); /** * Opens a Dialog window. Requires an element in the application that uses the * [`kendoDialogContainer`]({% slug api_dialog_dialogcontainerdirective %}) directive. * The created Dialog mounts in the DOM directly after that element. * * @param {DialogAction} options - The options that define the Dialog. * @returns {DialogRef} - A reference to the Dialog object and its convenience properties. * * @example * ```typescript * const dialog = this.dialogService.open({ * title: 'Confirm', * content: 'Are you sure?', * actions: [ * { text: 'No' }, * { text: 'Yes', themeColor: 'primary' } * ] * }); * dialog.result.subscribe(result => { * // handle result * }); * ``` */ open(options: DialogSettings): DialogRef; private initializeDialog; private applyOptions; private contentFrom; static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>; }