@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
@@ -10,6 +10,10 @@ import { of } from 'rxjs';
10
10
  import { hasClasses, isFocusable, isPresent } from '../common/util';
11
11
  import * as i0 from "@angular/core";
12
12
  import * as i1 from "./drag-resize.service";
13
+ /**
14
+ * Represents the title bar of the Window component.
15
+ *
16
+ */
13
17
  export class WindowTitleBarComponent {
14
18
  el;
15
19
  ngZone;
@@ -28,6 +28,12 @@ import * as i2 from "./navigation.service";
28
28
  import * as i3 from "@progress/kendo-angular-l10n";
29
29
  /**
30
30
  * Represents the [Kendo UI Window component for Angular]({% slug overview_window_dialogs %}).
31
+ *
32
+ * @example
33
+ * ```html
34
+ * <kendo-window title="My Window" [width]="400" [height]="300">
35
+ * </kendo-window>
36
+ * ```
31
37
  */
32
38
  export class WindowComponent {
33
39
  el;
@@ -41,11 +47,11 @@ export class WindowComponent {
41
47
  */
42
48
  autoFocusedElement;
43
49
  /**
44
- * Specifies the text that is rendered in the title bar.
50
+ * Sets the text in the title bar.
45
51
  */
46
52
  title;
47
53
  /**
48
- * Specifies whether the user will be able to drag the component.
54
+ * Specifies if the user can drag the component.
49
55
  * @default true
50
56
  */
51
57
  set draggable(value) {
@@ -55,7 +61,7 @@ export class WindowComponent {
55
61
  return this.options.draggable;
56
62
  }
57
63
  /**
58
- * Specifies whether the user will be able to resize the component.
64
+ * Specifies if the user can resize the component.
59
65
  * @default true
60
66
  */
61
67
  set resizable(value) {
@@ -65,13 +71,7 @@ export class WindowComponent {
65
71
  return this.options.resizable;
66
72
  }
67
73
  /**
68
- * The Window allows you to specify predefined theme colors.
69
- * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
70
- *
71
- * The possible values are:
72
- * * `primary`
73
- * * `dark`
74
- * * `light`
74
+ * Sets the predefined theme color for the Window. The color applies to the title bar background and border, and updates the text color.
75
75
  */
76
76
  set themeColor(themeColor) {
77
77
  this.handleThemeColorClass(this.themeColor, themeColor);
@@ -110,18 +110,12 @@ export class WindowComponent {
110
110
  return this._htmlAttributes;
111
111
  }
112
112
  /**
113
- * Specifies if the content of the component is persisted in the DOM when minimized.
113
+ * Specifies if the content stays in the DOM when minimized.
114
114
  * @default false
115
115
  */
116
116
  keepContent = false;
117
117
  /**
118
- * Specifies the initial state of the component.
119
- * If not specified, the value is set to `default`.
120
- *
121
- * The possible values are:
122
- * * `minimized`
123
- * * `maximized`
124
- * * `default`
118
+ * Sets the initial state of the Window.
125
119
  */
126
120
  set state(value) {
127
121
  this.options.state = value;
@@ -130,8 +124,7 @@ export class WindowComponent {
130
124
  return this.options.state;
131
125
  }
132
126
  /**
133
- * Specifies the minimum width of the component.
134
- * The `minWidth` property has to be set in pixels.
127
+ * Sets the minimum width in pixels.
135
128
  * @default 120
136
129
  */
137
130
  set minWidth(value) {
@@ -141,8 +134,7 @@ export class WindowComponent {
141
134
  return this.options.minWidth;
142
135
  }
143
136
  /**
144
- * Specifies the minimum height of the Window.
145
- * The `minHeight` property has to be set in pixels.
137
+ * Sets the minimum height in pixels.
146
138
  * @default 100
147
139
  */
148
140
  set minHeight(value) {
@@ -152,8 +144,7 @@ export class WindowComponent {
152
144
  return this.options.minHeight;
153
145
  }
154
146
  /**
155
- * Specifies the width of the Window.
156
- * The `width` property has to be set in pixels.
147
+ * Sets the width in pixels.
157
148
  */
158
149
  set width(value) {
159
150
  this.setOption('width', value);
@@ -162,8 +153,7 @@ export class WindowComponent {
162
153
  return this.options.width;
163
154
  }
164
155
  /**
165
- * Specifies the height of the Window.
166
- * The `height` property has to be set in pixels.
156
+ * Sets the height in pixels.
167
157
  */
168
158
  set height(value) {
169
159
  this.setOption('height', value);
@@ -172,8 +162,7 @@ export class WindowComponent {
172
162
  return this.options.height;
173
163
  }
174
164
  /**
175
- * Specifies the initial top offset of the Window.
176
- * The `top` property has to be set in pixels.
165
+ * Sets the initial top offset in pixels.
177
166
  */
178
167
  set top(value) {
179
168
  this.setOption('top', value);
@@ -182,8 +171,7 @@ export class WindowComponent {
182
171
  return this.options.top;
183
172
  }
184
173
  /**
185
- * Specifies the initial left offset of the Window.
186
- * Numeric values are treated as pixels.
174
+ * Sets the initial left offset in pixels.
187
175
  */
188
176
  set left(value) {
189
177
  this.setOption('left', value);
@@ -220,7 +208,7 @@ export class WindowComponent {
220
208
  */
221
209
  dragStart = new EventEmitter();
222
210
  /**
223
- * Fires when the Window was moved by the user.
211
+ * Fires after the Window has been moved by the user.
224
212
  */
225
213
  dragEnd = new EventEmitter();
226
214
  /**
@@ -228,7 +216,7 @@ export class WindowComponent {
228
216
  */
229
217
  resizeStart = new EventEmitter();
230
218
  /**
231
- * Fires when the Window was resized by the user.
219
+ * Fires after the Window has been resized by the user.
232
220
  */
233
221
  resizeEnd = new EventEmitter();
234
222
  /**
@@ -236,28 +224,23 @@ export class WindowComponent {
236
224
  */
237
225
  close = new EventEmitter();
238
226
  /**
239
- * Fires when the `width` property of the component was updated. The event is triggered only after the resizing
240
- * has ended. The event data contains the new width. Allows a two-way binding of the `width` property.
227
+ * Fires when the `width` property is updated after resizing. The event data contains the new width. Allows two-way binding of the `width` property.
241
228
  */
242
229
  widthChange = new EventEmitter();
243
230
  /**
244
- * Fires when the `height` property of the component was updated. The event is triggered only after the resizing
245
- * has ended. The event data contains the new height. Allows a two-way binding of the `height` property.
231
+ * Fires when the `height` property is updated after resizing. The event data contains the new height. Allows two-way binding of the `height` property.
246
232
  */
247
233
  heightChange = new EventEmitter();
248
234
  /**
249
- * Fires when the `top` property of the component was updated. The event is triggered only after the dragging
250
- * and resizing have ended. The event data contains the new top offset. Allows a two-way binding of the `top` property.
235
+ * Fires when the `top` property is updated after dragging or resizing. The event data contains the new top offset. Allows two-way binding of the `top` property.
251
236
  */
252
237
  topChange = new EventEmitter();
253
238
  /**
254
- * Fires when the `left` property of the component was updated. The event is triggered only after the dragging
255
- * and resizing have ended. The event data contains the new left offset. Allows a two-way binding of the `left` property.
239
+ * Fires when the `left` property is updated after dragging or resizing. The event data contains the new left offset. Allows two-way binding of the `left` property.
256
240
  */
257
241
  leftChange = new EventEmitter();
258
242
  /**
259
- * Fires when the `state` property of the component was updated. The event data contains the new state. Allows a
260
- * two-way binding of the `state` property.
243
+ * Fires when the `state` property is updated. The event data contains the new state. Allows two-way binding of the `state` property.
261
244
  */
262
245
  stateChange = new EventEmitter();
263
246
  /**
@@ -389,8 +372,8 @@ export class WindowComponent {
389
372
  * corresponding property of the component instance will be updated.
390
373
  * This method is intended to be used for sizing dynamically created components using the
391
374
  * [`WindowService`]({% slug api_dialog_windowservice %})
392
- * @param {WindowDimensionSetting} dimension - The option that will be updated
393
- * @param {number} value - The value set in pixels
375
+ * @param dimension The option to update.
376
+ * @param value The value in pixels.
394
377
  */
395
378
  setDimension(dimension, value) {
396
379
  this.setOption(dimension, value);
@@ -402,8 +385,8 @@ export class WindowComponent {
402
385
  * corresponding property of the component instance will be updated.
403
386
  * This method is intended to be used for positioning dynamically created components using the
404
387
  * [`WindowService`]({% slug api_dialog_windowservice %})
405
- * @param {WindowOffsetSetting} offset - The option that will be updated
406
- * @param {number} value - The value set in pixels
388
+ * @param offset The option to update.
389
+ * @param value The value in pixels.
407
390
  */
408
391
  setOffset(offset, value) {
409
392
  this.setOption(offset, value);
@@ -28,8 +28,9 @@ class WindowInjector {
28
28
  }
29
29
  }
30
30
  /**
31
- * A service for opening Windows dynamically
32
- * ([see example]({% slug service_window %})).
31
+ * Provides methods for opening Windows dynamically.
32
+ *
33
+ * Use this service to open a Window component and manage its lifecycle. ([See example.]({% slug service_window %}))
33
34
  */
34
35
  export class WindowService {
35
36
  resolver;
@@ -43,39 +44,18 @@ export class WindowService {
43
44
  this.containerService = containerService;
44
45
  }
45
46
  /**
46
- * Opens a Window component.
47
+ * Opens a Window component with the specified settings.
47
48
  *
48
- * @param {WindowSettings} settings - The settings that define the Window.
49
- * @returns {WindowRef} - A reference to the Window object.
49
+ * @param settings The settings that configure the Window.
50
+ * @returns A `WindowRef` instance for controlling the Window.
50
51
  *
51
52
  * @example
52
- *
53
- * ```ts-no-run
54
- * _@Component({
55
- * selector: 'my-app',
56
- * template: `
57
- * <button kendoButton (click)="open()">Open window</button>
58
- * <div kendoWindowContainer></div>
59
- * `
60
- * })
61
- * export class AppComponent {
62
- * constructor( private windowService: WindowService ) {}
63
- *
64
- * public open() {
65
- * var window = this.windowService.open({
66
- * title: "My window",
67
- * content: "My content!"
68
- * });
69
- *
70
- * window.result.subscribe((result) => {
71
- * if (result instanceof WindowCloseResult) {
72
- * console.log("Window was closed");
73
- * }
74
- * });
75
- * }
76
- * }
53
+ * ```ts
54
+ * const window = windowService.open({
55
+ * title: 'My window',
56
+ * content: 'My content!'
57
+ * });
77
58
  * ```
78
- *
79
59
  */
80
60
  open(settings) {
81
61
  const factory = this.resolver.resolveComponentFactory(WindowComponent);
@@ -19,25 +19,23 @@ import * as i8 from "./dialog/dialog-actions.component";
19
19
  import * as i9 from "./localization/custom-messages.component";
20
20
  //IMPORTANT: NgModule export kept for backwards compatibility
21
21
  /**
22
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
23
- * definition for the Window component. Imports `WindowModule` into the
24
- * [root module](link:site.data.urls.angular['ngmodules']#angular-modularity)
25
- * of your application or into any other sub-module that will use the Window component.
22
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Window component.
23
+ *
24
+ * Use the `WindowModule` to include all Window components and directives in your application.
26
25
  *
27
26
  * @example
28
- * ```ts-no-run
27
+ * ```typescript
29
28
  * import { NgModule } from '@angular/core';
30
29
  * import { BrowserModule } from '@angular/platform-browser';
31
30
  * import { WindowModule } from '@progress/kendo-angular-window';
32
31
  * import { AppComponent } from './app.component';
33
32
  *
34
- * _@NgModule({
33
+ * @NgModule({
35
34
  * bootstrap: [AppComponent],
36
35
  * declarations: [AppComponent],
37
36
  * imports: [BrowserModule, WindowModule]
38
37
  * })
39
- * export class AppModule {
40
- * }
38
+ * export class AppModule {}
41
39
  * ```
42
40
  */
43
41
  export class WindowModule {