@progress/kendo-angular-dialog 19.1.2-develop.2 → 19.1.2-develop.3
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
@@ -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
|
-
*
|
50
|
+
* Sets the text in the title bar.
|
45
51
|
*/
|
46
52
|
title;
|
47
53
|
/**
|
48
|
-
* Specifies
|
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
|
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
|
-
*
|
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
|
113
|
+
* Specifies if the content stays in the DOM when minimized.
|
114
114
|
* @default false
|
115
115
|
*/
|
116
116
|
keepContent = false;
|
117
117
|
/**
|
118
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
-
*
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
393
|
-
* @param
|
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
|
406
|
-
* @param
|
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
|
-
*
|
32
|
-
*
|
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
|
49
|
-
* @returns
|
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
|
-
*
|
54
|
-
*
|
55
|
-
*
|
56
|
-
*
|
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
|
-
*
|
24
|
-
*
|
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
|
-
* ```
|
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
|
-
*
|
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 {
|