@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.
Files changed (61) hide show
  1. package/common/actions-layout.d.ts +4 -1
  2. package/common/animation-types.d.ts +3 -0
  3. package/common/dialog-animation-direction.d.ts +3 -0
  4. package/common/preventable-event.d.ts +4 -0
  5. package/dialog/dialog-actions.component.d.ts +5 -4
  6. package/dialog/dialog-container.directive.d.ts +3 -4
  7. package/dialog/dialog-content-base.d.ts +3 -2
  8. package/dialog/dialog-titlebar.component.d.ts +3 -2
  9. package/dialog/dialog.component.d.ts +56 -33
  10. package/dialog/dialog.service.d.ts +15 -36
  11. package/dialog/models/dialog-action-divider.d.ts +4 -1
  12. package/dialog/models/dialog-action.d.ts +10 -9
  13. package/dialog/models/dialog-animation.d.ts +7 -4
  14. package/dialog/models/dialog-close-result.d.ts +4 -3
  15. package/dialog/models/dialog-ref.d.ts +8 -16
  16. package/dialog/models/dialog-result.d.ts +5 -5
  17. package/dialog/models/dialog-settings.d.ts +33 -44
  18. package/dialog/models/theme-color.d.ts +6 -5
  19. package/dialog.module.d.ts +6 -8
  20. package/dialogs.module.d.ts +5 -9
  21. package/directives.d.ts +54 -6
  22. package/esm2022/common/preventable-event.mjs +4 -0
  23. package/esm2022/dialog/dialog-actions.component.mjs +5 -4
  24. package/esm2022/dialog/dialog-container.directive.mjs +3 -4
  25. package/esm2022/dialog/dialog-content-base.mjs +3 -2
  26. package/esm2022/dialog/dialog-titlebar.component.mjs +3 -2
  27. package/esm2022/dialog/dialog.component.mjs +56 -33
  28. package/esm2022/dialog/dialog.service.mjs +15 -36
  29. package/esm2022/dialog/models/dialog-action.mjs +10 -9
  30. package/esm2022/dialog/models/dialog-close-result.mjs +4 -3
  31. package/esm2022/dialog/models/dialog-ref.mjs +8 -16
  32. package/esm2022/dialog/models/dialog-settings.mjs +33 -44
  33. package/esm2022/dialog.module.mjs +6 -8
  34. package/esm2022/dialogs.module.mjs +5 -9
  35. package/esm2022/directives.mjs +54 -6
  36. package/esm2022/localization/custom-messages.component.mjs +23 -2
  37. package/esm2022/localization/messages.mjs +4 -4
  38. package/esm2022/package-metadata.mjs +2 -2
  39. package/esm2022/window/models/window-close-result.mjs +2 -1
  40. package/esm2022/window/models/window-ref.mjs +5 -16
  41. package/esm2022/window/models/window-settings.mjs +20 -29
  42. package/esm2022/window/window-container.directive.mjs +3 -4
  43. package/esm2022/window/window-titlebar.component.mjs +4 -0
  44. package/esm2022/window/window.component.mjs +29 -46
  45. package/esm2022/window/window.service.mjs +11 -31
  46. package/esm2022/window.module.mjs +6 -8
  47. package/fesm2022/progress-kendo-angular-dialog.mjs +318 -319
  48. package/localization/custom-messages.component.d.ts +23 -2
  49. package/localization/messages.d.ts +4 -4
  50. package/package.json +7 -7
  51. package/schematics/ngAdd/index.js +1 -1
  52. package/window/models/theme-color.d.ts +1 -1
  53. package/window/models/window-close-result.d.ts +2 -1
  54. package/window/models/window-messages.d.ts +2 -2
  55. package/window/models/window-ref.d.ts +5 -16
  56. package/window/models/window-settings.d.ts +20 -29
  57. package/window/window-container.directive.d.ts +3 -4
  58. package/window/window-titlebar.component.d.ts +4 -0
  59. package/window/window.component.d.ts +29 -46
  60. package/window/window.service.d.ts +11 -31
  61. package/window.module.d.ts +6 -8
@@ -9,106 +9,95 @@ import { DialogRef } from "./dialog-ref";
9
9
  import { DialogResult } from "./dialog-result";
10
10
  import { DialogThemeColor } from "./theme-color";
11
11
  /**
12
- * The settings that can be used when the Dialog is opened through `DialogService`.
13
- * ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
12
+ * Represents the settings for opening a Dialog through the `DialogService`.
13
+ * ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
14
+ *
14
15
  */
15
16
  export declare class DialogSettings {
16
17
  /**
17
- * Defines a predicate that verifies if the pressed dialog action should be prevented. Returning true from the predicate prevents the dialog from closing.
18
- * If the **Close** button of the title bar is clicked, `DialogResult` is a `DialogCloseResult` instance.
19
- * 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))
20
- * @param {DialogResult} ev
21
- * @param {DialogRef} [dialogRef] - provided only when the dialog is created using a component.
22
- * @returns
18
+ * Use the `preventAction` callback to check if the pressed Dialog action should be prevented. If `true`, the Dialog does not close.
19
+ * If the **Close** button in the title bar is clicked, `DialogResult` is a `DialogCloseResult` instance.
20
+ * 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))
21
+ * @param {DialogResult} ev The Dialog result.
22
+ * @param {DialogRef} [dialogRef] The Dialog reference, provided only when you create the Dialog using a component.
23
+ * @returns Returns `true` to prevent closing the Dialog.
23
24
  */
24
25
  preventAction?: (ev: DialogResult, dialogRef?: DialogRef) => boolean;
25
26
  /**
26
- * Sets the title of the Dialog. If `title` is omitted,
27
- * the Dialog will not render a **Close** button.
27
+ * Sets the Dialog `title`. If you omit `title`, the Dialog does not render a **Close** button.
28
28
  */
29
29
  title?: string;
30
30
  /**
31
- * Sets the CSS classes that will be rendered on the Dialog wrapper element.
32
- * Supports the union type of values that NgClass accepts [ngClass](link:site.data.urls.angular['ngclassapi']).
31
+ * Sets the CSS classes for the Dialog wrapper element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
33
32
  */
34
33
  cssClass?: any;
35
34
  /**
36
- * Configures the Dialog opening animation ([see example]({% slug animations_dialog %})).
37
- * By default the animation type is set to `translate` and its duration is `300ms`.
35
+ * Configures the Dialog opening `animation` ([see example]({% slug animations_dialog %})).
36
+ * @default { type: 'translate', duration: 300 }
38
37
  */
39
38
  animation?: boolean | DialogAnimation;
40
39
  /**
41
- * Sets the HTML attributes of the Dialog wrapper element.
42
- * The property accepts string key-value based pairs.
40
+ * Sets the HTML attributes for the Dialog wrapper element. Accepts string key-value pairs.
43
41
  */
44
42
  htmlAttributes?: {
45
43
  [key: string]: string;
46
44
  };
47
45
  /**
48
- * Defines the content of the Dialog.
49
- * ([see example](slug:service_dialog#toc-rendering-the-content-area)).
46
+ * Defines the Dialog `content`. ([See example.](slug:service_dialog#toc-rendering-the-content-area))
50
47
  */
51
48
  content?: string | TemplateRef<any> | Function;
52
49
  /**
53
- * Specifies the width of the Dialog.
54
- * A numeric value sets the width in pixels.
55
- * A string value sets the width in arbitrary units&mdash;for example, `50%`.
50
+ * Sets the width of the Dialog.
51
+ * Use a number for pixels or a string for other units, for example, `50%`.
56
52
  */
57
53
  width?: number | string;
58
54
  /**
59
- * Specifies the minimum width of the Dialog.
60
- * A numeric value sets the minimum width in pixels.
61
- * A string value sets the minimum width in arbitrary units&mdash;for example, `50%`.
55
+ * Sets the minimum width of the Dialog.
56
+ * Use a number for pixels or a string for other units, for example, `50%`.
62
57
  */
63
58
  minWidth?: number | string;
64
59
  /**
65
- * Specifies the maximum width of the Dialog.
66
- * A numeric value sets the maximum width in pixels.
67
- * A string value sets the maximum width in arbitrary units&mdash;for example, `50%`.
60
+ * Sets the maximum width of the Dialog.
61
+ * Use a number for pixels or a string for other units, for example, `50%`.
68
62
  */
69
63
  maxWidth?: number | string;
70
64
  /**
71
- * Specifies the height of the Dialog.
72
- * A numeric value sets the height in pixels.
73
- * A string value sets the height in arbitrary units&mdash;for example, `50%`.
65
+ * Sets the height of the Dialog.
66
+ * Use a number for pixels or a string for other units, for example, `50%`.
74
67
  */
75
68
  height?: number | string;
76
69
  /**
77
- * Specifies the minimum height of the Dialog.
78
- * A numeric value sets the minimum height in pixels.
79
- * A string value sets the minimum height in arbitrary units&mdash;for example, `50%`.
70
+ * Sets the minimum height of the Dialog.
71
+ * Use a number for pixels or a string for other units, for example, `50%`.
80
72
  */
81
73
  minHeight?: number | string;
82
74
  /**
83
- * Specifies the maximum height of the Dialog.
84
- * A numeric value sets the maximum height in pixels.
85
- * A string value sets the maximum height in arbitrary units&mdash;for example, `50%`.
75
+ * Sets the maximum height of the Dialog.
76
+ * Use a number for pixels or a string for other units, for example, `50%`.
86
77
  */
87
78
  maxHeight?: number | string;
88
79
  /**
89
- * Defines the container in which the Dialog will be inserted.
90
- * Specifying this option changes the place in the page hierarchy where the Dialog will be inserted.
91
- * The styling of the component will remain the same.
80
+ * 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.
92
81
  */
93
82
  appendTo?: ViewContainerRef;
94
83
  /**
95
- * Specifies the title of the close button.
84
+ * Sets the `closeTitle` for the **Close** button.
96
85
  */
97
86
  closeTitle?: string;
98
87
  /**
99
- * Sets the action buttons of the Dialog.
88
+ * Sets the Dialog `actions` buttons.
100
89
  */
101
90
  actions?: any[] | TemplateRef<any>;
102
91
  /**
103
- * Specifies the layout of the action buttons in the Dialog.
92
+ * Sets the layout of the Dialog action buttons with `actionsLayout`.
104
93
  */
105
94
  actionsLayout?: ActionsLayout;
106
95
  /**
107
- * Sets the focused element query selector.
96
+ * Sets the query selector for the element to focus automatically with `autoFocusedElement`.
108
97
  */
109
98
  autoFocusedElement?: string;
110
99
  /**
111
- * Specifies the theme color of the Dialog.
100
+ * Sets the theme color of the Dialog.
112
101
  */
113
102
  themeColor?: DialogThemeColor;
114
103
  }
@@ -3,11 +3,12 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * Specifies the possible theme colors of the Dialog.
6
+ * Represents the possible theme colors for the Dialog.
7
+ *
8
+ * Use the `DialogThemeColor` type to set the color theme for Dialog components. The possible values are:
9
+ * - `primary` &mdash;Applies coloring based on the `primary` theme color.
10
+ * - `light`&mdash; Applies coloring based on the `light` theme color.
11
+ * - `dark`&mdash; Applies coloring based on the `dark` theme color.
7
12
  *
8
- * The possible values are:
9
- * * `primary` &mdash;Applies coloring based on the `primary` theme color.
10
- * * `light`&mdash; Applies coloring based on the `light` theme color.
11
- * * `dark`&mdash; Applies coloring based on the `dark` theme color.
12
13
  */
13
14
  export type DialogThemeColor = 'primary' | 'light' | 'dark';
@@ -9,25 +9,23 @@ import * as i3 from "./dialog/dialog-container.directive";
9
9
  import * as i4 from "./dialog/dialog-actions.component";
10
10
  import * as i5 from "./localization/custom-messages.component";
11
11
  /**
12
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
13
- * definition for the Dialog component that includes all Dialog components and directives.
14
- * Imports `DialogModule` into the [root module](link:site.data.urls.angular['ngmodules']#angular-modularity)
15
- * of your application or into any other sub-module that will use the Dialog component.
12
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Dialog component.
13
+ *
14
+ * Use the `DialogModule` to include all Dialog components and directives in your application.
16
15
  *
17
16
  * @example
18
- * ```ts-no-run
17
+ * ```typescript
19
18
  * import { NgModule } from '@angular/core';
20
19
  * import { BrowserModule } from '@angular/platform-browser';
21
20
  * import { DialogModule } from '@progress/kendo-angular-dialog';
22
21
  * import { AppComponent } from './app.component';
23
22
  *
24
- * _@NgModule({
23
+ * @NgModule({
25
24
  * bootstrap: [AppComponent],
26
25
  * declarations: [AppComponent],
27
26
  * imports: [BrowserModule, DialogModule]
28
27
  * })
29
- * export class AppModule {
30
- * }
28
+ * export class AppModule {}
31
29
  * ```
32
30
  */
33
31
  export declare class DialogModule {
@@ -16,28 +16,24 @@ import * as i10 from "./window/actions/window-restore-action.directive";
16
16
  import * as i11 from "./window/window-titlebar.component";
17
17
  import * as i12 from "./window/window-container.directive";
18
18
  /**
19
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
20
- * definition for the Dialogs components.
19
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Dialogs components.
21
20
  *
22
- * @example
21
+ * Use the `DialogsModule` to include all Dialog and Window components and services in your application.
23
22
  *
24
- * ```ts
23
+ * @example
24
+ * ```typescript
25
25
  * import { DialogsModule } from '@progress/kendo-angular-dialog';
26
- *
27
26
  * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
28
27
  * import { NgModule } from '@angular/core';
29
- *
30
28
  * import { AppComponent } from './app.component';
31
29
  *
32
- * _@NgModule({
30
+ * @NgModule({
33
31
  * declarations: [AppComponent],
34
32
  * imports: [BrowserModule, DialogsModule],
35
33
  * bootstrap: [AppComponent]
36
34
  * })
37
35
  * export class AppModule {}
38
36
  *
39
- * platformBrowserDynamic().bootstrapModule(AppModule);
40
- *
41
37
  * ```
42
38
  */
43
39
  export declare class DialogsModule {
package/directives.d.ts CHANGED
@@ -15,14 +15,62 @@ import { WindowContainerDirective } from "./window/window-container.directive";
15
15
  import { WindowTitleBarComponent } from "./window/window-titlebar.component";
16
16
  import { WindowComponent } from "./window/window.component";
17
17
  /**
18
- * Utility array that contains all `Dialog` related components and directives.
19
- */
18
+ * Represents the utility array that that contains all `Dialog`-related components and directives.
19
+ *
20
+ * Use `KENDO_DIALOG` to import all Dialog components and directives at once.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * import { Component } from '@angular/core';
25
+ * import { KENDO_DIALOG } from '@progress/kendo-angular-dialog';
26
+ *
27
+ * @Component({
28
+ * selector: 'my-dialog-app',
29
+ * standalone: true,
30
+ * imports: [KENDO_DIALOG],
31
+ * template: `...`
32
+ * })
33
+ * export class DialogAppComponent {}
34
+ * ```
35
+ */
20
36
  export declare const KENDO_DIALOG: readonly [typeof DialogComponent, typeof DialogTitleBarComponent, typeof DialogContainerDirective, typeof DialogActionsComponent, typeof CustomMessagesComponent];
21
37
  /**
22
- * Utility array that contains all `Window` related components and directives.
23
- */
38
+ * Represents the utility array that contains all `Window`-related components and directives.
39
+ *
40
+ * Use `KENDO_WINDOW` to import all Window components and directives at once.
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * import { Component } from '@angular/core';
45
+ * import { KENDO_WINDOW } from '@progress/kendo-angular-dialog';
46
+ *
47
+ * @Component({
48
+ * selector: 'my-window-app',
49
+ * standalone: true,
50
+ * imports: [KENDO_WINDOW],
51
+ * template: `...`
52
+ * })
53
+ * export class WindowAppComponent {}
54
+ * ```
55
+ */
24
56
  export declare const KENDO_WINDOW: readonly [typeof WindowComponent, typeof WindowCloseActionDirective, typeof WindowMinimizeActionDirective, typeof WindowMaximizeActionDirective, typeof WindowRestoreActionDirective, typeof WindowTitleBarComponent, typeof WindowContainerDirective, typeof DialogActionsComponent, typeof CustomMessagesComponent];
25
57
  /**
26
- * Utility array that contains all `@progress/kendo-angular-dialog` related components and directives.
27
- */
58
+ * Represents the utility array that contains all `@progress/kendo-angular-dialog`-related components and directives.
59
+ *
60
+ * Use `KENDO_DIALOGS` to import all Dialog and Window components and directives at once.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * import { Component } from '@angular/core';
65
+ * import { KENDO_DIALOGS } from '@progress/kendo-angular-dialog';
66
+ *
67
+ * @Component({
68
+ * selector: 'my-app',
69
+ * standalone: true,
70
+ * imports: [KENDO_DIALOGS],
71
+ * template: `...`
72
+ * })
73
+ * export class AppComponent {}
74
+ * ```
75
+ */
28
76
  export declare const KENDO_DIALOGS: readonly [typeof DialogComponent, typeof DialogTitleBarComponent, typeof DialogContainerDirective, typeof DialogActionsComponent, typeof CustomMessagesComponent, typeof WindowComponent, typeof WindowCloseActionDirective, typeof WindowMinimizeActionDirective, typeof WindowMaximizeActionDirective, typeof WindowRestoreActionDirective, typeof WindowTitleBarComponent, typeof WindowContainerDirective, typeof DialogActionsComponent, typeof CustomMessagesComponent];
@@ -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 class PreventableEvent {
6
10
  prevented = false;
7
11
  /**
@@ -8,13 +8,14 @@ import { KENDO_BUTTON } from '@progress/kendo-angular-buttons';
8
8
  import * as i0 from "@angular/core";
9
9
  import * as i1 from "@progress/kendo-angular-buttons";
10
10
  /**
11
- * Specifies the action buttons of the Dialog
12
- * ([see example]({% slug actionbuttons_dialog %})).
11
+ * Represents the action buttons of the Dialog.
12
+ * ([See example.]({% slug actionbuttons_dialog %}))
13
+ *
13
14
  */
14
15
  export class DialogActionsComponent {
15
16
  el;
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) {
20
21
  if (value instanceof TemplateRef) {
@@ -36,7 +37,7 @@ export class DialogActionsComponent {
36
37
  */
37
38
  actionsTemplate;
38
39
  /**
39
- * Specifies the possible layout of the action buttons.
40
+ * Sets the possible layout of the action buttons.
40
41
  * @default 'stretched'
41
42
  */
42
43
  layout = 'stretched';
@@ -7,12 +7,11 @@ import { DialogContainerService } from './dialog-container.service';
7
7
  import * as i0 from "@angular/core";
8
8
  import * as i1 from "./dialog-container.service";
9
9
  /**
10
- * Provides an insertion point for the Dialogs which are created through the
11
- * Dialog service ([see example]({% slug api_dialog_dialogservice %}#toc-open)).
12
- * Created Dialogs will be mounted after that element.
10
+ * Represents an insertion point for Dialogs created through the Dialog service.
11
+ * The created Dialogs mount after this element. ([See example.]({% slug api_dialog_dialogservice %}#toc-open))
13
12
  *
14
13
  * @example
15
- * ```html-no-run
14
+ * ```html
16
15
  * <div kendoDialogContainer></div>
17
16
  * ```
18
17
  */
@@ -10,8 +10,9 @@ import { filter } from 'rxjs/operators';
10
10
  import * as i0 from "@angular/core";
11
11
  import * as i1 from "./models/dialog-ref";
12
12
  /**
13
- * The base class which will be extended by a component that is provided as content through `content`
14
- * ([see example](slug:service_dialog#toc-single-component-rendering)).
13
+ * Serves as the base class for a component provided as Dialog content through the `content` property.
14
+ * ([See example.](slug:service_dialog#toc-single-component-rendering)).
15
+ *
15
16
  */
16
17
  export class DialogContentBase {
17
18
  dialog;
@@ -15,14 +15,15 @@ import * as i1 from "@progress/kendo-angular-l10n";
15
15
  /**
16
16
  * Represents the [Kendo UI DialogTitleBar component for Angular]({% slug api_dialog_dialogtitlebarcomponent %}).
17
17
  *
18
- * It is used as part of the Dialog content when the component is created dynamically by using an [Angular service]({% slug service_dialog %}).
18
+ * Use this component as part of the Dialog content when you create the Dialog dynamically with an [Angular service]({% slug service_dialog %}).
19
+ *
19
20
  */
20
21
  export class DialogTitleBarComponent {
21
22
  zone;
22
23
  hostElement;
23
24
  localizationService;
24
25
  /**
25
- * Fires when the close button of the title-bar is clicked.
26
+ * Fires when the close button in the title bar is clicked.
26
27
  */
27
28
  close = new EventEmitter();
28
29
  /**
@@ -25,6 +25,23 @@ import * as i2 from "@angular/animations";
25
25
  const DEFAULT_ANIMATION_CONFIG = { duration: 300, type: 'translate' };
26
26
  /**
27
27
  * Represents the [Kendo UI Dialog component for Angular]({% slug overview_dialog_dialogs %}).
28
+ *
29
+ * Use this component to display modal dialog windows in your application.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * import { Component } from '@angular/core';
34
+ *
35
+ * @Component({
36
+ * selector: 'my-app',
37
+ * template: `
38
+ * <kendo-dialog title="Example Dialog">
39
+ * <p>Dialog content goes here.</p>
40
+ * </kendo-dialog>
41
+ * `
42
+ * })
43
+ * export class AppComponent {}
44
+ * ```
28
45
  */
29
46
  export class DialogComponent {
30
47
  wrapper;
@@ -33,75 +50,78 @@ export class DialogComponent {
33
50
  ngZone;
34
51
  builder;
35
52
  /**
36
- * Specifies the action buttons that will be rendered.
53
+ * Specifies the action buttons to render in the Dialog.
54
+ *
55
+ * @type {DialogAction[]}
37
56
  */
38
57
  actions;
39
58
  /**
40
- * Specifies the layout of the action buttons in the Dialog.
41
- * This option is only applicable if the action buttons are specified through the `actions` options.
59
+ * Sets the layout of the action buttons in the Dialog. Applies only if you specify action buttons through the `actions` option.
42
60
  *
61
+ * @type {ActionsLayout}
43
62
  * @default 'stretched'
44
63
  */
45
64
  actionsLayout = 'stretched';
46
65
  /**
47
- * Specifies the query selector used to set the initial focus ([see examples]({% slug initial_focus_dialog %})).
66
+ * Sets the query selector for the element to receive initial focus. ([See examples.]({% slug initial_focus_dialog %}))
67
+ *
68
+ * @type {string}
48
69
  */
49
70
  autoFocusedElement;
50
71
  /**
51
- * Specifies the text that is rendered in the title bar.
72
+ * Sets the text in the Dialog title bar.
73
+ *
74
+ * @type {string}
52
75
  */
53
76
  title;
54
77
  /**
55
- * Specifies the width of the Dialog.
56
- * A numeric value sets the width in pixels.
57
- * A string value sets the width in arbitrary units&mdash;for example, `50%`.
78
+ * Sets the width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
79
+ *
80
+ * @type {number | string}
58
81
  */
59
82
  width;
60
83
  /**
61
- * Specifies the minimum width of the Dialog.
62
- * A numeric value sets the minimum width in pixels.
63
- * A string value sets the minimum width in arbitrary units&mdash;for example, `50%`.
84
+ * Sets the minimum width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
85
+ *
86
+ * @type {number | string}
64
87
  */
65
88
  minWidth;
66
89
  /**
67
- * Specifies the maximum width of the Dialog.
68
- * A numeric value sets the maximum width in pixels.
69
- * A string value sets the maximum width in arbitrary units&mdash;for example, `50%`.
90
+ * Sets the maximum width of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
91
+ *
92
+ * @type {number | string}
70
93
  */
71
94
  maxWidth;
72
95
  /**
73
- * Specifies the height of the Dialog.
74
- * A numeric value sets the height in pixels.
75
- * A string value sets the height in arbitrary units&mdash;for example, `50%`.
96
+ * Sets the height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
97
+ *
98
+ * @type {number | string}
76
99
  */
77
100
  height;
78
101
  /**
79
- * Specifies the minimum height of the Dialog.
80
- * A numeric value sets the minimum height in pixels.
81
- * A string value sets the minimum height in arbitrary units&mdash;for example, `50%`.
102
+ * Sets the minimum height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
103
+ *
104
+ * @type {number | string}
82
105
  */
83
106
  minHeight;
84
107
  /**
85
- * Specifies the maximum height of the Dialog.
86
- * A numeric value sets the maximum height in pixels.
87
- * A string value sets the maximum height in arbitrary units&mdash;for example, `50%`.
108
+ * Sets the maximum height of the Dialog. Use a number for pixels or a string for units (for example, `50%`).
109
+ *
110
+ * @type {number | string}
88
111
  */
89
112
  maxHeight;
90
113
  /**
91
114
  * Configures the Dialog opening animation ([see example]({% slug animations_dialog %})).
92
- * By default the animation type is set to `translate` and its duration is `300ms`.
115
+ * The default animation type is `translate` and the duration is `300ms`.
93
116
  *
117
+ * @type {boolean | DialogAnimation}
94
118
  * @default true
95
119
  */
96
120
  animation = true;
97
121
  /**
98
- * The Dialog allows you to specify predefined theme colors.
99
- * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
122
+ * Sets a predefined theme color for the Dialog. The color applies to the title bar background and border, and updates the text color.
100
123
  *
101
- * The possible values are:
102
- * * `primary`
103
- * * `dark`
104
- * * `light`
124
+ * @type {DialogThemeColor}
105
125
  */
106
126
  set themeColor(themeColor) {
107
127
  this.handleThemeColorClass(this.themeColor, themeColor);
@@ -160,12 +180,15 @@ export class DialogComponent {
160
180
  */
161
181
  showLicenseWatermark = false;
162
182
  /**
163
- * Fires when the user clicks an action button of the Dialog.
164
- * The event is fired only when the action buttons are specified through the `actions` options.
183
+ * Emits when the user clicks an action button in the Dialog. Fires only if you specify action buttons through the `actions` option.
184
+ *
185
+ * @type {EventEmitter<DialogAction>}
165
186
  */
166
187
  action = new EventEmitter();
167
188
  /**
168
- * Fires when the user clicks the **Close** button of the Dialog or the **ESC** key.
189
+ * Emits when the user clicks the **Close** button or presses the `ESC` key.
190
+ *
191
+ * @type {EventEmitter<any>}
169
192
  */
170
193
  close = new EventEmitter();
171
194
  get dir() {
@@ -31,8 +31,7 @@ class DialogInjector {
31
31
  }
32
32
  }
33
33
  /**
34
- * A service for opening Dialog windows dynamically
35
- * ([see example]({% slug service_dialog %})).
34
+ * Provides a service for opening Dialog windows dynamically ([see example]({% slug service_dialog %})).
36
35
  */
37
36
  export class DialogService {
38
37
  resolver;
@@ -48,45 +47,25 @@ export class DialogService {
48
47
  /**
49
48
  * Opens a Dialog window. Requires an element in the application that uses the
50
49
  * [`kendoDialogContainer`]({% slug api_dialog_dialogcontainerdirective %}) directive.
51
- * Created Dialogs will be mounted in the DOM directly after that element.
50
+ * The created Dialog mounts in the DOM directly after that element.
52
51
  *
53
52
  * @param {DialogAction} options - The options that define the Dialog.
54
- * @returns {DialogRef} - A reference to the Dialog object and the convenience properties.
53
+ * @returns {DialogRef} - A reference to the Dialog object and its convenience properties.
55
54
  *
56
55
  * @example
57
- *
58
- * ```ts-no-run
59
- * _@Component({
60
- * selector: 'my-app',
61
- * template: `
62
- * <button kendoButton (click)="open()">Harmless button</button>
63
- * <div kendoDialogContainer></div>
64
- * `
65
- * })
66
- * export class AppComponent {
67
- * constructor( private dialogService: DialogService ) {}
68
- *
69
- * public open() {
70
- * var dialog = this.dialogService.open({
71
- * title: "Please confirm",
72
- * content: "Are you sure?",
73
- * actions: [
74
- * { text: "No" },
75
- * { text: "Yes", themeColor: 'primary' }
76
- * ]
77
- * });
78
- *
79
- * dialog.result.subscribe((result) => {
80
- * if (result instanceof DialogCloseResult) {
81
- * console.log("close");
82
- * } else {
83
- * console.log("action", result);
84
- * }
85
- * });
86
- * }
87
- * }
56
+ * ```typescript
57
+ * const dialog = this.dialogService.open({
58
+ * title: 'Confirm',
59
+ * content: 'Are you sure?',
60
+ * actions: [
61
+ * { text: 'No' },
62
+ * { text: 'Yes', themeColor: 'primary' }
63
+ * ]
64
+ * });
65
+ * dialog.result.subscribe(result => {
66
+ * // handle result
67
+ * });
88
68
  * ```
89
- *
90
69
  */
91
70
  open(options) {
92
71
  const factory = this.resolver.resolveComponentFactory(DialogComponent);