@progress/kendo-angular-dialog 19.1.2-develop.2 → 19.1.2-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/actions-layout.d.ts +4 -1
- package/common/animation-types.d.ts +3 -0
- package/common/dialog-animation-direction.d.ts +3 -0
- package/common/preventable-event.d.ts +4 -0
- package/dialog/dialog-actions.component.d.ts +5 -4
- package/dialog/dialog-container.directive.d.ts +3 -4
- package/dialog/dialog-content-base.d.ts +3 -2
- package/dialog/dialog-titlebar.component.d.ts +3 -2
- package/dialog/dialog.component.d.ts +56 -33
- package/dialog/dialog.service.d.ts +15 -36
- package/dialog/models/dialog-action-divider.d.ts +4 -1
- package/dialog/models/dialog-action.d.ts +10 -9
- package/dialog/models/dialog-animation.d.ts +7 -4
- package/dialog/models/dialog-close-result.d.ts +4 -3
- package/dialog/models/dialog-ref.d.ts +8 -16
- package/dialog/models/dialog-result.d.ts +5 -5
- package/dialog/models/dialog-settings.d.ts +33 -44
- package/dialog/models/theme-color.d.ts +6 -5
- package/dialog.module.d.ts +6 -8
- package/dialogs.module.d.ts +5 -9
- package/directives.d.ts +54 -6
- package/esm2022/common/preventable-event.mjs +4 -0
- package/esm2022/dialog/dialog-actions.component.mjs +5 -4
- package/esm2022/dialog/dialog-container.directive.mjs +3 -4
- package/esm2022/dialog/dialog-content-base.mjs +3 -2
- package/esm2022/dialog/dialog-titlebar.component.mjs +3 -2
- package/esm2022/dialog/dialog.component.mjs +56 -33
- package/esm2022/dialog/dialog.service.mjs +15 -36
- package/esm2022/dialog/models/dialog-action.mjs +10 -9
- package/esm2022/dialog/models/dialog-close-result.mjs +4 -3
- package/esm2022/dialog/models/dialog-ref.mjs +8 -16
- package/esm2022/dialog/models/dialog-settings.mjs +33 -44
- package/esm2022/dialog.module.mjs +6 -8
- package/esm2022/dialogs.module.mjs +5 -9
- package/esm2022/directives.mjs +54 -6
- package/esm2022/localization/custom-messages.component.mjs +23 -2
- package/esm2022/localization/messages.mjs +4 -4
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/window/models/window-close-result.mjs +2 -1
- package/esm2022/window/models/window-ref.mjs +5 -16
- package/esm2022/window/models/window-settings.mjs +20 -29
- package/esm2022/window/window-container.directive.mjs +3 -4
- package/esm2022/window/window-titlebar.component.mjs +4 -0
- package/esm2022/window/window.component.mjs +29 -46
- package/esm2022/window/window.service.mjs +11 -31
- package/esm2022/window.module.mjs +6 -8
- package/fesm2022/progress-kendo-angular-dialog.mjs +318 -319
- package/localization/custom-messages.component.d.ts +23 -2
- package/localization/messages.d.ts +4 -4
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +1 -1
- package/window/models/theme-color.d.ts +1 -1
- package/window/models/window-close-result.d.ts +2 -1
- package/window/models/window-messages.d.ts +2 -2
- package/window/models/window-ref.d.ts +5 -16
- package/window/models/window-settings.d.ts +20 -29
- package/window/window-container.directive.d.ts +3 -4
- package/window/window-titlebar.component.d.ts +4 -0
- package/window/window.component.d.ts +29 -46
- package/window/window.service.d.ts +11 -31
- package/window.module.d.ts +6 -8
@@ -3,6 +3,9 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* Represents the layout for the Dialog action buttons.
|
7
|
+
*
|
8
|
+
* Use the `ActionsLayout` type to set the alignment of action buttons in the Dialog.
|
9
|
+
*
|
7
10
|
*/
|
8
11
|
export type ActionsLayout = 'start' | 'center' | 'end' | 'stretched';
|
@@ -4,5 +4,8 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
6
|
* Represents the available Dialog animation types.
|
7
|
+
*
|
8
|
+
* Use the `DialogAnimationType` type to specify the animation for Dialog transitions.
|
9
|
+
*
|
7
10
|
*/
|
8
11
|
export type DialogAnimationType = 'translate' | 'slide' | 'fade' | 'expand' | 'zoom';
|
@@ -4,5 +4,8 @@
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
6
|
* Represents the available directions for the Dialog opening animation.
|
7
|
+
*
|
8
|
+
* Use the `AnimationDirection` type to set the direction for Dialog animations.
|
9
|
+
*
|
7
10
|
*/
|
8
11
|
export type AnimationDirection = 'up' | 'down' | 'right' | 'left';
|
@@ -2,6 +2,10 @@
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
|
+
/**
|
6
|
+
* Represents a preventable event in Dialog and Window components.
|
7
|
+
*
|
8
|
+
*/
|
5
9
|
export declare class PreventableEvent {
|
6
10
|
private prevented;
|
7
11
|
/**
|
@@ -8,13 +8,14 @@ import { ActionsLayout } from '../common/actions-layout';
|
|
8
8
|
import { DialogActionDivider } from './models/dialog-action-divider';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
/**
|
11
|
-
*
|
12
|
-
* ([
|
11
|
+
* Represents the action buttons of the Dialog.
|
12
|
+
* ([See example.]({% slug actionbuttons_dialog %}))
|
13
|
+
*
|
13
14
|
*/
|
14
15
|
export declare class DialogActionsComponent {
|
15
16
|
el: ElementRef;
|
16
17
|
/**
|
17
|
-
* Allows the declarative specification of the actions
|
18
|
+
* Allows the declarative specification of the Dialog `actions`.
|
18
19
|
*/
|
19
20
|
set actions(value: DialogAction[] | TemplateRef<any>);
|
20
21
|
/**
|
@@ -26,7 +27,7 @@ export declare class DialogActionsComponent {
|
|
26
27
|
*/
|
27
28
|
actionsTemplate: TemplateRef<any>;
|
28
29
|
/**
|
29
|
-
*
|
30
|
+
* Sets the possible layout of the action buttons.
|
30
31
|
* @default 'stretched'
|
31
32
|
*/
|
32
33
|
layout: ActionsLayout;
|
@@ -6,12 +6,11 @@ import { ViewContainerRef } from '@angular/core';
|
|
6
6
|
import { DialogContainerService } from './dialog-container.service';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
/**
|
9
|
-
*
|
10
|
-
*
|
11
|
-
* Created Dialogs will be mounted after that element.
|
9
|
+
* Represents an insertion point for Dialogs created through the Dialog service.
|
10
|
+
* The created Dialogs mount after this element. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
|
12
11
|
*
|
13
12
|
* @example
|
14
|
-
* ```html
|
13
|
+
* ```html
|
15
14
|
* <div kendoDialogContainer></div>
|
16
15
|
* ```
|
17
16
|
*/
|
@@ -7,8 +7,9 @@ import { DialogActionsComponent } from './dialog-actions.component';
|
|
7
7
|
import { DialogTitleBarComponent } from './dialog-titlebar.component';
|
8
8
|
import * as i0 from "@angular/core";
|
9
9
|
/**
|
10
|
-
*
|
11
|
-
* ([
|
10
|
+
* Serves as the base class for a component provided as Dialog content through the `content` property.
|
11
|
+
* ([See example.](slug:service_dialog#toc-single-component-rendering)).
|
12
|
+
*
|
12
13
|
*/
|
13
14
|
export declare class DialogContentBase {
|
14
15
|
dialog: DialogRef;
|
@@ -10,14 +10,15 @@ import * as i0 from "@angular/core";
|
|
10
10
|
/**
|
11
11
|
* Represents the [Kendo UI DialogTitleBar component for Angular]({% slug api_dialog_dialogtitlebarcomponent %}).
|
12
12
|
*
|
13
|
-
*
|
13
|
+
* Use this component as part of the Dialog content when you create the Dialog dynamically with an [Angular service]({% slug service_dialog %}).
|
14
|
+
*
|
14
15
|
*/
|
15
16
|
export declare class DialogTitleBarComponent implements AfterViewInit {
|
16
17
|
private zone;
|
17
18
|
private hostElement;
|
18
19
|
private localizationService;
|
19
20
|
/**
|
20
|
-
* Fires when the close button
|
21
|
+
* Fires when the close button in the title bar is clicked.
|
21
22
|
*/
|
22
23
|
close: EventEmitter<PreventableEvent>;
|
23
24
|
/**
|
@@ -14,6 +14,23 @@ import { DialogThemeColor } from './models';
|
|
14
14
|
import * as i0 from "@angular/core";
|
15
15
|
/**
|
16
16
|
* Represents the [Kendo UI Dialog component for Angular]({% slug overview_dialog_dialogs %}).
|
17
|
+
*
|
18
|
+
* Use this component to display modal dialog windows in your application.
|
19
|
+
*
|
20
|
+
* @example
|
21
|
+
* ```ts
|
22
|
+
* import { Component } from '@angular/core';
|
23
|
+
*
|
24
|
+
* @Component({
|
25
|
+
* selector: 'my-app',
|
26
|
+
* template: `
|
27
|
+
* <kendo-dialog title="Example Dialog">
|
28
|
+
* <p>Dialog content goes here.</p>
|
29
|
+
* </kendo-dialog>
|
30
|
+
* `
|
31
|
+
* })
|
32
|
+
* export class AppComponent {}
|
33
|
+
* ```
|
17
34
|
*/
|
18
35
|
export declare class DialogComponent implements AfterContentInit, AfterViewInit, OnInit, OnDestroy {
|
19
36
|
private wrapper;
|
@@ -22,75 +39,78 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
|
|
22
39
|
private ngZone;
|
23
40
|
private builder;
|
24
41
|
/**
|
25
|
-
* Specifies the action buttons
|
42
|
+
* Specifies the action buttons to render in the Dialog.
|
43
|
+
*
|
44
|
+
* @type {DialogAction[]}
|
26
45
|
*/
|
27
46
|
actions: DialogAction[];
|
28
47
|
/**
|
29
|
-
*
|
30
|
-
* This option is only applicable if the action buttons are specified through the `actions` options.
|
48
|
+
* Sets the layout of the action buttons in the Dialog. Applies only if you specify action buttons through the `actions` option.
|
31
49
|
*
|
50
|
+
* @type {ActionsLayout}
|
32
51
|
* @default 'stretched'
|
33
52
|
*/
|
34
53
|
actionsLayout: ActionsLayout;
|
35
54
|
/**
|
36
|
-
*
|
55
|
+
* Sets the query selector for the element to receive initial focus. ([See examples.]({% slug initial_focus_dialog %}))
|
56
|
+
*
|
57
|
+
* @type {string}
|
37
58
|
*/
|
38
59
|
autoFocusedElement: string;
|
39
60
|
/**
|
40
|
-
*
|
61
|
+
* Sets the text in the Dialog title bar.
|
62
|
+
*
|
63
|
+
* @type {string}
|
41
64
|
*/
|
42
65
|
title: string;
|
43
66
|
/**
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
67
|
+
* Sets the width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
68
|
+
*
|
69
|
+
* @type {number | string}
|
47
70
|
*/
|
48
71
|
width: number | string;
|
49
72
|
/**
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
73
|
+
* Sets the minimum width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
74
|
+
*
|
75
|
+
* @type {number | string}
|
53
76
|
*/
|
54
77
|
minWidth: number | string;
|
55
78
|
/**
|
56
|
-
*
|
57
|
-
*
|
58
|
-
*
|
79
|
+
* Sets the maximum width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
80
|
+
*
|
81
|
+
* @type {number | string}
|
59
82
|
*/
|
60
83
|
maxWidth: number | string;
|
61
84
|
/**
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
85
|
+
* Sets the height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
86
|
+
*
|
87
|
+
* @type {number | string}
|
65
88
|
*/
|
66
89
|
height: number | string;
|
67
90
|
/**
|
68
|
-
*
|
69
|
-
*
|
70
|
-
*
|
91
|
+
* Sets the minimum height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
92
|
+
*
|
93
|
+
* @type {number | string}
|
71
94
|
*/
|
72
95
|
minHeight: number | string;
|
73
96
|
/**
|
74
|
-
*
|
75
|
-
*
|
76
|
-
*
|
97
|
+
* Sets the maximum height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
|
98
|
+
*
|
99
|
+
* @type {number | string}
|
77
100
|
*/
|
78
101
|
maxHeight: number | string;
|
79
102
|
/**
|
80
103
|
* Configures the Dialog opening animation ([see example]({% slug animations_dialog %})).
|
81
|
-
*
|
104
|
+
* The default animation type is `translate` and the duration is `300ms`.
|
82
105
|
*
|
106
|
+
* @type {boolean | DialogAnimation}
|
83
107
|
* @default true
|
84
108
|
*/
|
85
109
|
animation: boolean | DialogAnimation;
|
86
110
|
/**
|
87
|
-
*
|
88
|
-
* The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
|
111
|
+
* Sets a predefined theme color for the Dialog. The color applies to the title bar background and border, and updates the text color.
|
89
112
|
*
|
90
|
-
*
|
91
|
-
* * `primary`
|
92
|
-
* * `dark`
|
93
|
-
* * `light`
|
113
|
+
* @type {DialogThemeColor}
|
94
114
|
*/
|
95
115
|
set themeColor(themeColor: DialogThemeColor);
|
96
116
|
get themeColor(): DialogThemeColor;
|
@@ -129,12 +149,15 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
|
|
129
149
|
*/
|
130
150
|
showLicenseWatermark: boolean;
|
131
151
|
/**
|
132
|
-
*
|
133
|
-
*
|
152
|
+
* Emits when the user clicks an action button in the Dialog. Fires only if you specify action buttons through the `actions` option.
|
153
|
+
*
|
154
|
+
* @type {EventEmitter<DialogAction>}
|
134
155
|
*/
|
135
156
|
action: EventEmitter<DialogAction>;
|
136
157
|
/**
|
137
|
-
*
|
158
|
+
* Emits when the user clicks the **Close** button or presses the `ESC` key.
|
159
|
+
*
|
160
|
+
* @type {EventEmitter<any>}
|
138
161
|
*/
|
139
162
|
close: EventEmitter<any>;
|
140
163
|
get dir(): string;
|
@@ -8,8 +8,7 @@ import { DialogRef } from './models/dialog-ref';
|
|
8
8
|
import { DialogSettings } from './models';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
/**
|
11
|
-
*
|
12
|
-
* ([see example]({% slug service_dialog %})).
|
11
|
+
* Provides a service for opening Dialog windows dynamically ([see example]({% slug service_dialog %})).
|
13
12
|
*/
|
14
13
|
export declare class DialogService {
|
15
14
|
/**
|
@@ -25,45 +24,25 @@ export declare class DialogService {
|
|
25
24
|
/**
|
26
25
|
* Opens a Dialog window. Requires an element in the application that uses the
|
27
26
|
* [`kendoDialogContainer`]({% slug api_dialog_dialogcontainerdirective %}) directive.
|
28
|
-
*
|
27
|
+
* The created Dialog mounts in the DOM directly after that element.
|
29
28
|
*
|
30
29
|
* @param {DialogAction} options - The options that define the Dialog.
|
31
|
-
* @returns {DialogRef} - A reference to the Dialog object and
|
30
|
+
* @returns {DialogRef} - A reference to the Dialog object and its convenience properties.
|
32
31
|
*
|
33
32
|
* @example
|
34
|
-
*
|
35
|
-
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
* })
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
* public open() {
|
47
|
-
* var dialog = this.dialogService.open({
|
48
|
-
* title: "Please confirm",
|
49
|
-
* content: "Are you sure?",
|
50
|
-
* actions: [
|
51
|
-
* { text: "No" },
|
52
|
-
* { text: "Yes", themeColor: 'primary' }
|
53
|
-
* ]
|
54
|
-
* });
|
55
|
-
*
|
56
|
-
* dialog.result.subscribe((result) => {
|
57
|
-
* if (result instanceof DialogCloseResult) {
|
58
|
-
* console.log("close");
|
59
|
-
* } else {
|
60
|
-
* console.log("action", result);
|
61
|
-
* }
|
62
|
-
* });
|
63
|
-
* }
|
64
|
-
* }
|
33
|
+
* ```typescript
|
34
|
+
* const dialog = this.dialogService.open({
|
35
|
+
* title: 'Confirm',
|
36
|
+
* content: 'Are you sure?',
|
37
|
+
* actions: [
|
38
|
+
* { text: 'No' },
|
39
|
+
* { text: 'Yes', themeColor: 'primary' }
|
40
|
+
* ]
|
41
|
+
* });
|
42
|
+
* dialog.result.subscribe(result => {
|
43
|
+
* // handle result
|
44
|
+
* });
|
65
45
|
* ```
|
66
|
-
*
|
67
46
|
*/
|
68
47
|
open(options: DialogSettings): DialogRef;
|
69
48
|
private initializeDialog;
|
@@ -3,6 +3,9 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* Represents a Dialog action used as a divider between action buttons.
|
7
|
+
*
|
8
|
+
* Use the `DialogActionDivider` type to add a visual spacer in the Dialog actions area.
|
9
|
+
*
|
7
10
|
*/
|
8
11
|
export type DialogActionDivider = 'spacer';
|
@@ -5,33 +5,34 @@
|
|
5
5
|
import { ButtonFillMode, ButtonThemeColor } from "@progress/kendo-angular-buttons";
|
6
6
|
import { SVGIcon } from "@progress/kendo-svg-icons";
|
7
7
|
/**
|
8
|
-
*
|
9
|
-
*
|
8
|
+
* Represents the settings for Dialog actions when you open a Dialog through `DialogService`.
|
9
|
+
*
|
10
|
+
* Use the `DialogAction` class to configure action buttons in the Dialog. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
|
11
|
+
*
|
10
12
|
*/
|
11
13
|
export declare class DialogAction {
|
12
14
|
/**
|
13
|
-
*
|
15
|
+
* Sets the text of the action button.
|
14
16
|
*/
|
15
17
|
text: string;
|
16
18
|
/**
|
17
|
-
*
|
19
|
+
* Sets the theme color of the action button. The theme color applies to the background, border, and text.
|
18
20
|
*/
|
19
21
|
themeColor?: ButtonThemeColor;
|
20
22
|
/**
|
21
|
-
*
|
23
|
+
* Sets the background and border styles of the action button.
|
22
24
|
*/
|
23
25
|
fillMode?: ButtonFillMode;
|
24
26
|
/**
|
25
|
-
* Sets the CSS classes
|
26
|
-
* Supports the union type of values that [ngClass](link:site.data.urls.angular['ngclassapi']) accepts.
|
27
|
+
* Sets the CSS classes for the action button. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
27
28
|
*/
|
28
29
|
cssClass?: any;
|
29
30
|
/**
|
30
|
-
*
|
31
|
+
* Sets the [SVG icon](slug:svgicon_list) to display in the action button.
|
31
32
|
*/
|
32
33
|
svgIcon?: SVGIcon;
|
33
34
|
/**
|
34
|
-
*
|
35
|
+
* Sets the name of the [font icon](slug:icon_list) to display in the action button.
|
35
36
|
*/
|
36
37
|
icon?: string;
|
37
38
|
/**
|
@@ -5,19 +5,22 @@
|
|
5
5
|
import { DialogAnimationType } from "../../common/animation-types";
|
6
6
|
import { AnimationDirection } from '../../common/dialog-animation-direction';
|
7
7
|
/**
|
8
|
-
*
|
8
|
+
* Represents the settings for Dialog animations when you open the Dialog component.
|
9
|
+
*
|
10
|
+
* Use the `DialogAnimation` interface to configure animation duration, type, and direction. ([See example.]({% slug animations_dialog %}))
|
11
|
+
*
|
9
12
|
*/
|
10
13
|
export interface DialogAnimation {
|
11
14
|
/**
|
12
|
-
*
|
15
|
+
* Sets the duration of the Dialog opening animation in milliseconds.
|
13
16
|
*/
|
14
17
|
duration?: number;
|
15
18
|
/**
|
16
|
-
*
|
19
|
+
* Sets the Dialog opening animation type.
|
17
20
|
*/
|
18
21
|
type?: DialogAnimationType;
|
19
22
|
/**
|
20
|
-
*
|
23
|
+
* Sets the direction of the Dialog opening animation. Applies to the `slide` and `expand` animation types.
|
21
24
|
*/
|
22
25
|
direction?: AnimationDirection;
|
23
26
|
}
|
@@ -3,9 +3,10 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
/**
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* ([
|
6
|
+
* Represents the result when the **Close** button is clicked in a Dialog opened through `DialogService`.
|
7
|
+
*
|
8
|
+
* Used when the results from the Dialogs that are opened through `DialogService` are filtered. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
|
9
|
+
*
|
9
10
|
*/
|
10
11
|
export declare class DialogCloseResult {
|
11
12
|
}
|
@@ -7,16 +7,14 @@ import { Observable } from 'rxjs';
|
|
7
7
|
import { DialogComponent } from '../dialog.component';
|
8
8
|
import { DialogResult } from './dialog-result';
|
9
9
|
/**
|
10
|
-
* Holds references to the
|
11
|
-
*
|
12
|
-
* ([
|
10
|
+
* Holds references to the Dialog instance and published events when you open a Dialog through the `DialogService`.
|
11
|
+
*
|
12
|
+
* Use the `DialogRef` class to control and interact with Dialogs opened programmatically. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
|
13
|
+
*
|
13
14
|
*/
|
14
15
|
export declare class DialogRef {
|
15
16
|
/**
|
16
|
-
* Emits events when the Dialog is closed either through the **Close** button of the title bar or through the action buttons.
|
17
|
-
* If the **Close** button of the title bar is clicked, `DialogResult` is a `DialogCloseResult` instance.
|
18
|
-
* If the Dialog is closed through the action buttons, `DialogResult` contains the object that was passed when the Dialog was opened.
|
19
|
-
* When `close` is called with an argument, the result is the passed argument.
|
17
|
+
* Emits events when the Dialog is closed either through the **Close** button of the title bar or through the action buttons. 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. When `close` is called with an argument, the result is the passed argument.
|
20
18
|
*/
|
21
19
|
result: Observable<DialogResult>;
|
22
20
|
/**
|
@@ -24,19 +22,13 @@ export declare class DialogRef {
|
|
24
22
|
*/
|
25
23
|
dialog: ComponentRef<DialogComponent>;
|
26
24
|
/**
|
27
|
-
* A reference to the child component of the Dialog.
|
28
|
-
* Available when the Dialog is opened with [component content](slug:service_dialog#toc-rendering-the-content-area).
|
25
|
+
* A reference to the child component of the Dialog. Available when the Dialog is opened with [component content](slug:service_dialog#toc-rendering-the-content-area).
|
29
26
|
*/
|
30
27
|
content: ComponentRef<any>;
|
31
28
|
/**
|
32
|
-
* Closes the Dialog programmatically.
|
29
|
+
* Closes the Dialog programmatically. When called without a value, the resulting Observable emits an empty `DialogCloseResult` object. When called with a value, the resulting Observable emits the provided value.
|
33
30
|
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
* When called with a value, the result Observable emits the provided value.
|
37
|
-
*
|
38
|
-
* Usage Examples:
|
39
|
-
* ```typescript
|
31
|
+
* ```ts
|
40
32
|
* // Close without arguments: Returns an empty `DialogCloseResult` object.
|
41
33
|
* dialogRef.close();
|
42
34
|
*
|
@@ -5,10 +5,10 @@
|
|
5
5
|
import { DialogAction } from "./dialog-action";
|
6
6
|
import { DialogCloseResult } from "./dialog-close-result";
|
7
7
|
/**
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
* ([
|
12
|
-
*
|
8
|
+
* Represents the possible result types of the Dialog.
|
9
|
+
*
|
10
|
+
* Use the `DialogResult` type to handle the result when a Dialog closes. If the result is a [`DialogCloseResult`]({% slug api_dialog_dialogcloseresult %}), the **Close** button was clicked.
|
11
|
+
* Otherwise, the value is the configuration of the action button that was clicked. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
|
12
|
+
*
|
13
13
|
*/
|
14
14
|
export type DialogResult = DialogCloseResult | DialogAction;
|