@progress/kendo-angular-dialog 11.0.0-develop.100 → 11.0.0-develop.102
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 +1 -1
- package/common/util.d.ts +2 -2
- package/dialog/dialog-actions.component.d.ts +3 -2
- package/dialog/dialog.component.d.ts +15 -1
- package/dialog/models/index.d.ts +1 -0
- package/dialog/models/theme-color.d.ts +13 -0
- package/esm2020/common/util.mjs +2 -2
- package/esm2020/dialog/dialog-actions.component.mjs +19 -7
- package/esm2020/dialog/dialog-titlebar.component.mjs +10 -10
- package/esm2020/dialog/dialog.component.mjs +34 -3
- package/esm2020/dialog/models/index.mjs +1 -0
- package/esm2020/dialog/models/theme-color.mjs +5 -0
- package/esm2020/package-metadata.mjs +1 -1
- package/esm2020/window/actions/window-close-action.directive.mjs +4 -4
- package/esm2020/window/actions/window-maximize-action.directive.mjs +2 -2
- package/esm2020/window/actions/window-minimize-action.directive.mjs +2 -2
- package/esm2020/window/actions/window-restore-action.directive.mjs +2 -2
- package/esm2020/window/models/index.mjs +1 -0
- package/esm2020/window/models/theme-color.mjs +5 -0
- package/esm2020/window/window-titlebar.component.mjs +1 -4
- package/esm2020/window/window.component.mjs +40 -11
- package/fesm2015/progress-kendo-angular-dialog.mjs +117 -48
- package/fesm2020/progress-kendo-angular-dialog.mjs +117 -48
- package/index.d.ts +2 -2
- package/package.json +6 -6
- package/window/models/index.d.ts +1 -0
- package/window/models/theme-color.d.ts +13 -0
- package/window/window.component.d.ts +16 -2
package/common/util.d.ts
CHANGED
|
@@ -30,11 +30,11 @@ export declare enum Keys {
|
|
|
30
30
|
/**
|
|
31
31
|
* @hidden
|
|
32
32
|
*/
|
|
33
|
-
export declare const DIALOG_ELEMENTS_HANDLING_ESC_KEY = "k-dialog-wrapper k-
|
|
33
|
+
export declare const DIALOG_ELEMENTS_HANDLING_ESC_KEY = "k-dialog-wrapper k-actions k-dialog-titlebar-action";
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
37
|
-
export declare const DIALOG_ELEMENTS_HANDLING_ARROWS = "k-
|
|
37
|
+
export declare const DIALOG_ELEMENTS_HANDLING_ARROWS = "k-actions";
|
|
38
38
|
/**
|
|
39
39
|
* @hidden
|
|
40
40
|
*/
|
|
@@ -32,8 +32,9 @@ export declare class DialogActionsComponent {
|
|
|
32
32
|
* Fires when the user clicks an action button.
|
|
33
33
|
*/
|
|
34
34
|
action: EventEmitter<DialogAction>;
|
|
35
|
-
|
|
36
|
-
get
|
|
35
|
+
hostClasses: boolean;
|
|
36
|
+
get stretchedClassName(): boolean;
|
|
37
|
+
get endClassName(): boolean;
|
|
37
38
|
constructor(el: ElementRef);
|
|
38
39
|
/**
|
|
39
40
|
* @hidden
|
|
@@ -10,6 +10,7 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
10
10
|
import { ActionsLayout } from '../common/actions-layout';
|
|
11
11
|
import { DialogAction } from './models/dialog-action';
|
|
12
12
|
import { DialogAnimation } from './models/dialog-animation';
|
|
13
|
+
import { DialogThemeColor } from './models';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
/**
|
|
15
16
|
* Represents the [Kendo UI Dialog component for Angular]({% slug overview_dialog_dialogs %}).
|
|
@@ -82,6 +83,17 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
|
|
|
82
83
|
* @default true
|
|
83
84
|
*/
|
|
84
85
|
animation: boolean | DialogAnimation;
|
|
86
|
+
/**
|
|
87
|
+
* The Dialog allows you to specify predefined theme colors.
|
|
88
|
+
* The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
|
|
89
|
+
*
|
|
90
|
+
* The possible values are:
|
|
91
|
+
* * `primary`
|
|
92
|
+
* * `dark`
|
|
93
|
+
* * `light`
|
|
94
|
+
*/
|
|
95
|
+
set themeColor(themeColor: DialogThemeColor);
|
|
96
|
+
get themeColor(): DialogThemeColor;
|
|
85
97
|
/**
|
|
86
98
|
* @hidden
|
|
87
99
|
*/
|
|
@@ -129,6 +141,7 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
|
|
|
129
141
|
dialog: ElementRef;
|
|
130
142
|
private _htmlAttributes;
|
|
131
143
|
private _cssClass;
|
|
144
|
+
private _themeColor;
|
|
132
145
|
private direction;
|
|
133
146
|
private subscriptions;
|
|
134
147
|
private domSubs;
|
|
@@ -183,6 +196,7 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
|
|
|
183
196
|
get wrapperClass(): boolean;
|
|
184
197
|
get styles(): any;
|
|
185
198
|
private bubble;
|
|
199
|
+
private handleThemeColorClass;
|
|
186
200
|
static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
|
|
187
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "kendo-dialog", ["kendoDialog"], { "actions": "actions"; "actionsLayout": "actionsLayout"; "autoFocusedElement": "autoFocusedElement"; "title": "title"; "width": "width"; "minWidth": "minWidth"; "maxWidth": "maxWidth"; "height": "height"; "minHeight": "minHeight"; "maxHeight": "maxHeight"; "animation": "animation"; }, { "action": "action"; "close": "close"; }, ["titlebarContent"], ["kendo-dialog-titlebar", "*", "kendo-dialog-actions"]>;
|
|
201
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "kendo-dialog", ["kendoDialog"], { "actions": "actions"; "actionsLayout": "actionsLayout"; "autoFocusedElement": "autoFocusedElement"; "title": "title"; "width": "width"; "minWidth": "minWidth"; "maxWidth": "maxWidth"; "height": "height"; "minHeight": "minHeight"; "maxHeight": "maxHeight"; "animation": "animation"; "themeColor": "themeColor"; }, { "action": "action"; "close": "close"; }, ["titlebarContent"], ["kendo-dialog-titlebar", "*", "kendo-dialog-actions"]>;
|
|
188
202
|
}
|
package/dialog/models/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the possible theme colors of the Dialog.
|
|
7
|
+
*
|
|
8
|
+
* The possible values are:
|
|
9
|
+
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
10
|
+
* * `light`— Applies coloring based on the `light` theme color.
|
|
11
|
+
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
12
|
+
*/
|
|
13
|
+
export declare type DialogThemeColor = 'primary' | 'light' | 'dark';
|
package/esm2020/common/util.mjs
CHANGED
|
@@ -33,11 +33,11 @@ export var Keys;
|
|
|
33
33
|
/**
|
|
34
34
|
* @hidden
|
|
35
35
|
*/
|
|
36
|
-
export const DIALOG_ELEMENTS_HANDLING_ESC_KEY = 'k-dialog-wrapper k-
|
|
36
|
+
export const DIALOG_ELEMENTS_HANDLING_ESC_KEY = 'k-dialog-wrapper k-actions k-dialog-titlebar-action';
|
|
37
37
|
/**
|
|
38
38
|
* @hidden
|
|
39
39
|
*/
|
|
40
|
-
export const DIALOG_ELEMENTS_HANDLING_ARROWS = 'k-
|
|
40
|
+
export const DIALOG_ELEMENTS_HANDLING_ARROWS = 'k-actions';
|
|
41
41
|
/**
|
|
42
42
|
* @hidden
|
|
43
43
|
*/
|
|
@@ -21,7 +21,7 @@ export class DialogActionsComponent {
|
|
|
21
21
|
* Fires when the user clicks an action button.
|
|
22
22
|
*/
|
|
23
23
|
this.action = new EventEmitter();
|
|
24
|
-
this.
|
|
24
|
+
this.hostClasses = true;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Allows the declarative specification of the actions.
|
|
@@ -37,9 +37,12 @@ export class DialogActionsComponent {
|
|
|
37
37
|
throw new Error('"actions" must be either TemplateRef or DialogAction[] instance.');
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
get
|
|
40
|
+
get stretchedClassName() {
|
|
41
41
|
return this.layout === 'stretched';
|
|
42
42
|
}
|
|
43
|
+
get endClassName() {
|
|
44
|
+
return this.layout === 'end';
|
|
45
|
+
}
|
|
43
46
|
/**
|
|
44
47
|
* @hidden
|
|
45
48
|
*/
|
|
@@ -62,7 +65,7 @@ export class DialogActionsComponent {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
DialogActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DialogActionsComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
DialogActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: { actions: "actions", layout: "layout" }, outputs: { action: "action" }, host: { properties: { "class.k-
|
|
68
|
+
DialogActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: { actions: "actions", layout: "layout" }, outputs: { action: "action" }, host: { properties: { "class.k-actions": "this.hostClasses", "class.k-actions-horizontal": "this.hostClasses", "class.k-window-actions": "this.hostClasses", "class.k-dialog-actions": "this.hostClasses", "class.k-actions-stretched": "this.stretchedClassName", "class.k-actions-end": "this.endClassName" } }, ngImport: i0, template: `
|
|
66
69
|
<ng-content *ngIf="!actions"></ng-content>
|
|
67
70
|
<ng-container *ngIf="actionsArray; else actionTemplate">
|
|
68
71
|
<button
|
|
@@ -103,13 +106,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
103
106
|
type: Input
|
|
104
107
|
}], action: [{
|
|
105
108
|
type: Output
|
|
106
|
-
}],
|
|
109
|
+
}], hostClasses: [{
|
|
107
110
|
type: HostBinding,
|
|
108
|
-
args: ['class.k-
|
|
111
|
+
args: ['class.k-actions']
|
|
109
112
|
}, {
|
|
110
113
|
type: HostBinding,
|
|
111
|
-
args: ['class.k-actions']
|
|
112
|
-
}
|
|
114
|
+
args: ['class.k-actions-horizontal']
|
|
115
|
+
}, {
|
|
116
|
+
type: HostBinding,
|
|
117
|
+
args: ['class.k-window-actions']
|
|
118
|
+
}, {
|
|
119
|
+
type: HostBinding,
|
|
120
|
+
args: ['class.k-dialog-actions']
|
|
121
|
+
}], stretchedClassName: [{
|
|
113
122
|
type: HostBinding,
|
|
114
123
|
args: ['class.k-actions-stretched']
|
|
124
|
+
}], endClassName: [{
|
|
125
|
+
type: HostBinding,
|
|
126
|
+
args: ['class.k-actions-end']
|
|
115
127
|
}] } });
|
|
@@ -69,20 +69,20 @@ DialogTitleBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
69
69
|
i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
|
|
70
70
|
closeTitle="Close"
|
|
71
71
|
>
|
|
72
|
-
<
|
|
72
|
+
<span class="k-window-title k-dialog-title">
|
|
73
73
|
<ng-content></ng-content>
|
|
74
|
-
</
|
|
74
|
+
</span>
|
|
75
75
|
|
|
76
|
-
<div class="k-window-actions k-dialog-actions">
|
|
76
|
+
<div class="k-window-titlebar-actions k-dialog-titlebar-actions">
|
|
77
77
|
<button
|
|
78
78
|
kendoButton
|
|
79
79
|
fillMode="flat"
|
|
80
80
|
role="button"
|
|
81
81
|
[attr.title]="closeButtonTitle"
|
|
82
82
|
[attr.aria-label]="closeButtonTitle"
|
|
83
|
-
icon="
|
|
83
|
+
icon="close"
|
|
84
84
|
[svgIcon]="xIcon"
|
|
85
|
-
class="k-window-action k-dialog-action"
|
|
85
|
+
class="k-window-titlebar-action k-dialog-titlebar-action"
|
|
86
86
|
(click)="onCloseClick($event)"
|
|
87
87
|
>
|
|
88
88
|
</button>
|
|
@@ -110,20 +110,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
110
110
|
i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
|
|
111
111
|
closeTitle="Close"
|
|
112
112
|
>
|
|
113
|
-
<
|
|
113
|
+
<span class="k-window-title k-dialog-title">
|
|
114
114
|
<ng-content></ng-content>
|
|
115
|
-
</
|
|
115
|
+
</span>
|
|
116
116
|
|
|
117
|
-
<div class="k-window-actions k-dialog-actions">
|
|
117
|
+
<div class="k-window-titlebar-actions k-dialog-titlebar-actions">
|
|
118
118
|
<button
|
|
119
119
|
kendoButton
|
|
120
120
|
fillMode="flat"
|
|
121
121
|
role="button"
|
|
122
122
|
[attr.title]="closeButtonTitle"
|
|
123
123
|
[attr.aria-label]="closeButtonTitle"
|
|
124
|
-
icon="
|
|
124
|
+
icon="close"
|
|
125
125
|
[svgIcon]="xIcon"
|
|
126
|
-
class="k-window-action k-dialog-action"
|
|
126
|
+
class="k-window-titlebar-action k-dialog-titlebar-action"
|
|
127
127
|
(click)="onCloseClick($event)"
|
|
128
128
|
>
|
|
129
129
|
</button>
|
|
@@ -66,6 +66,7 @@ export class DialogComponent {
|
|
|
66
66
|
*/
|
|
67
67
|
this.close = new EventEmitter();
|
|
68
68
|
this.tabIndex = 0;
|
|
69
|
+
this._themeColor = null;
|
|
69
70
|
this.subscriptions = [];
|
|
70
71
|
this.domSubs = new Subscription();
|
|
71
72
|
validatePackage(packageMetadata);
|
|
@@ -74,6 +75,22 @@ export class DialogComponent {
|
|
|
74
75
|
this.titleId = this.generateTitleId();
|
|
75
76
|
this.contentId = this.generateContentId();
|
|
76
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* The Dialog allows you to specify predefined theme colors.
|
|
80
|
+
* The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
|
|
81
|
+
*
|
|
82
|
+
* The possible values are:
|
|
83
|
+
* * `primary`
|
|
84
|
+
* * `dark`
|
|
85
|
+
* * `light`
|
|
86
|
+
*/
|
|
87
|
+
set themeColor(themeColor) {
|
|
88
|
+
this.handleThemeColorClass(this.themeColor, themeColor);
|
|
89
|
+
this._themeColor = themeColor;
|
|
90
|
+
}
|
|
91
|
+
get themeColor() {
|
|
92
|
+
return this._themeColor;
|
|
93
|
+
}
|
|
77
94
|
/**
|
|
78
95
|
* @hidden
|
|
79
96
|
*/
|
|
@@ -147,6 +164,7 @@ export class DialogComponent {
|
|
|
147
164
|
}));
|
|
148
165
|
}
|
|
149
166
|
this.initDomEvents();
|
|
167
|
+
this.handleThemeColorClass(null, this.themeColor);
|
|
150
168
|
}
|
|
151
169
|
ngOnInit() {
|
|
152
170
|
if (this.animation) {
|
|
@@ -343,9 +361,20 @@ export class DialogComponent {
|
|
|
343
361
|
this.subscriptions.push(s);
|
|
344
362
|
}
|
|
345
363
|
}
|
|
364
|
+
handleThemeColorClass(previousValue, currentValue) {
|
|
365
|
+
const dialog = this.dialog.nativeElement;
|
|
366
|
+
if (previousValue) {
|
|
367
|
+
const classToRemove = `k-dialog-${previousValue}`;
|
|
368
|
+
this.renderer.removeClass(dialog, classToRemove);
|
|
369
|
+
}
|
|
370
|
+
if (currentValue) {
|
|
371
|
+
const classToAdd = `k-dialog-${currentValue}`;
|
|
372
|
+
this.renderer.addClass(dialog, classToAdd);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
346
375
|
}
|
|
347
376
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
348
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DialogComponent, selector: "kendo-dialog", inputs: { actions: "actions", actionsLayout: "actionsLayout", autoFocusedElement: "autoFocusedElement", title: "title", width: "width", minWidth: "minWidth", maxWidth: "maxWidth", height: "height", minHeight: "minHeight", maxHeight: "maxHeight", animation: "animation" }, outputs: { action: "action", close: "close" }, host: { properties: { "attr.dir": "this.dir", "attr.tabIndex": "this.tabIndex", "class.k-dialog-wrapper": "this.wrapperClass" } }, providers: [
|
|
377
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DialogComponent, selector: "kendo-dialog", inputs: { actions: "actions", actionsLayout: "actionsLayout", autoFocusedElement: "autoFocusedElement", title: "title", width: "width", minWidth: "minWidth", maxWidth: "maxWidth", height: "height", minHeight: "minHeight", maxHeight: "maxHeight", animation: "animation", themeColor: "themeColor" }, outputs: { action: "action", close: "close" }, host: { properties: { "attr.dir": "this.dir", "attr.tabIndex": "this.tabIndex", "class.k-dialog-wrapper": "this.wrapperClass" } }, providers: [
|
|
349
378
|
LocalizationService,
|
|
350
379
|
{
|
|
351
380
|
provide: DIALOG_LOCALIZATION_SERVICE,
|
|
@@ -367,7 +396,7 @@ DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
367
396
|
<kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
|
|
368
397
|
<ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
|
|
369
398
|
|
|
370
|
-
<div [id]="contentId" class="k-
|
|
399
|
+
<div [id]="contentId" class="k-window-content k-dialog-content">
|
|
371
400
|
<ng-content *ngIf="!contentTemplate"></ng-content>
|
|
372
401
|
<ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
|
|
373
402
|
</div>
|
|
@@ -416,7 +445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
416
445
|
<kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
|
|
417
446
|
<ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
|
|
418
447
|
|
|
419
|
-
<div [id]="contentId" class="k-
|
|
448
|
+
<div [id]="contentId" class="k-window-content k-dialog-content">
|
|
420
449
|
<ng-content *ngIf="!contentTemplate"></ng-content>
|
|
421
450
|
<ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
|
|
422
451
|
</div>
|
|
@@ -449,6 +478,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
449
478
|
type: Input
|
|
450
479
|
}], animation: [{
|
|
451
480
|
type: Input
|
|
481
|
+
}], themeColor: [{
|
|
482
|
+
type: Input
|
|
452
483
|
}], action: [{
|
|
453
484
|
type: Output
|
|
454
485
|
}], close: [{
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dialog',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1673519154,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -35,7 +35,7 @@ export class WindowCloseActionDirective extends Button {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
WindowCloseActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DragResizeService, optional: true }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
WindowCloseActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowCloseActionDirective, selector: "button[kendoWindowCloseAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-action": "this.buttonClass" } }, providers: [
|
|
38
|
+
WindowCloseActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowCloseActionDirective, selector: "button[kendoWindowCloseAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-titlebar-action": "this.buttonClass" } }, providers: [
|
|
39
39
|
LocalizationService,
|
|
40
40
|
{
|
|
41
41
|
provide: L10N_PREFIX,
|
|
@@ -45,7 +45,7 @@ WindowCloseActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
45
45
|
<kendo-icon-wrapper
|
|
46
46
|
*ngIf="!imageUrl && !iconClass"
|
|
47
47
|
innerCssClass="k-button-icon"
|
|
48
|
-
name="
|
|
48
|
+
name="close"
|
|
49
49
|
[svgIcon]="xIcon">
|
|
50
50
|
</kendo-icon-wrapper>
|
|
51
51
|
<span *ngIf="imageUrl" class="k-button-icon k-icon">
|
|
@@ -70,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
70
70
|
<kendo-icon-wrapper
|
|
71
71
|
*ngIf="!imageUrl && !iconClass"
|
|
72
72
|
innerCssClass="k-button-icon"
|
|
73
|
-
name="
|
|
73
|
+
name="close"
|
|
74
74
|
[svgIcon]="xIcon">
|
|
75
75
|
</kendo-icon-wrapper>
|
|
76
76
|
<span *ngIf="imageUrl" class="k-button-icon k-icon">
|
|
@@ -89,7 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
89
89
|
args: ['attr.type']
|
|
90
90
|
}], buttonClass: [{
|
|
91
91
|
type: HostBinding,
|
|
92
|
-
args: ['class.k-window-action']
|
|
92
|
+
args: ['class.k-window-titlebar-action']
|
|
93
93
|
}], onClick: [{
|
|
94
94
|
type: HostListener,
|
|
95
95
|
args: ['click']
|
|
@@ -38,7 +38,7 @@ export class WindowMaximizeActionDirective extends Button {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
WindowMaximizeActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMaximizeActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DragResizeService, optional: true }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
WindowMaximizeActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMaximizeActionDirective, selector: "button[kendoWindowMaximizeAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
41
|
+
WindowMaximizeActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMaximizeActionDirective, selector: "button[kendoWindowMaximizeAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-titlebar-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
42
42
|
LocalizationService,
|
|
43
43
|
{
|
|
44
44
|
provide: L10N_PREFIX,
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
92
92
|
args: ['attr.type']
|
|
93
93
|
}], buttonClass: [{
|
|
94
94
|
type: HostBinding,
|
|
95
|
-
args: ['class.k-window-action']
|
|
95
|
+
args: ['class.k-window-titlebar-action']
|
|
96
96
|
}], onClick: [{
|
|
97
97
|
type: HostListener,
|
|
98
98
|
args: ['click']
|
|
@@ -38,7 +38,7 @@ export class WindowMinimizeActionDirective extends Button {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
WindowMinimizeActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DragResizeService, optional: true }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
WindowMinimizeActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMinimizeActionDirective, selector: "button[kendoWindowMinimizeAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
41
|
+
WindowMinimizeActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMinimizeActionDirective, selector: "button[kendoWindowMinimizeAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-titlebar-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
42
42
|
LocalizationService,
|
|
43
43
|
{
|
|
44
44
|
provide: L10N_PREFIX,
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
92
92
|
args: ['attr.type']
|
|
93
93
|
}], buttonClass: [{
|
|
94
94
|
type: HostBinding,
|
|
95
|
-
args: ['class.k-window-action']
|
|
95
|
+
args: ['class.k-window-titlebar-action']
|
|
96
96
|
}], onClick: [{
|
|
97
97
|
type: HostListener,
|
|
98
98
|
args: ['click']
|
|
@@ -38,7 +38,7 @@ export class WindowRestoreActionDirective extends Button {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
WindowRestoreActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowRestoreActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DragResizeService, optional: true }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
WindowRestoreActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowRestoreActionDirective, selector: "button[kendoWindowRestoreAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
41
|
+
WindowRestoreActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowRestoreActionDirective, selector: "button[kendoWindowRestoreAction]", inputs: { window: "window" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.type": "this.buttonType", "class.k-window-titlebar-action": "this.buttonClass", "style.display": "this.visible" } }, providers: [
|
|
42
42
|
LocalizationService,
|
|
43
43
|
{
|
|
44
44
|
provide: L10N_PREFIX,
|
|
@@ -92,7 +92,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
92
92
|
args: ['attr.type']
|
|
93
93
|
}], buttonClass: [{
|
|
94
94
|
type: HostBinding,
|
|
95
|
-
args: ['class.k-window-action']
|
|
95
|
+
args: ['class.k-window-titlebar-action']
|
|
96
96
|
}], onClick: [{
|
|
97
97
|
type: HostListener,
|
|
98
98
|
args: ['click']
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -107,7 +107,7 @@ export class WindowTitleBarComponent {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
WindowTitleBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowTitleBarComponent, deps: [{ token: i0.ElementRef }, { token: i1.DragResizeService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
-
WindowTitleBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowTitleBarComponent, selector: "kendo-window-titlebar", inputs: { template: "template", id: "id" }, host: { listeners: { "dblclick": "handle($event)" }, properties: { "class.k-window-titlebar": "this.className", "
|
|
110
|
+
WindowTitleBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowTitleBarComponent, selector: "kendo-window-titlebar", inputs: { template: "template", id: "id" }, host: { listeners: { "dblclick": "handle($event)" }, properties: { "class.k-window-titlebar": "this.className", "style.touch-action": "this.touchAction" } }, ngImport: i0, template: `
|
|
111
111
|
<ng-content *ngIf="!template"></ng-content>
|
|
112
112
|
<ng-template
|
|
113
113
|
[ngTemplateOutlet]="template"
|
|
@@ -133,9 +133,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
133
133
|
}], className: [{
|
|
134
134
|
type: HostBinding,
|
|
135
135
|
args: ['class.k-window-titlebar']
|
|
136
|
-
}, {
|
|
137
|
-
type: HostBinding,
|
|
138
|
-
args: ['class.k-dialog-titlebar']
|
|
139
136
|
}], touchAction: [{
|
|
140
137
|
type: HostBinding,
|
|
141
138
|
args: ['style.touch-action']
|
|
@@ -94,10 +94,12 @@ export class WindowComponent {
|
|
|
94
94
|
this.messages = {};
|
|
95
95
|
this.tabIndex = 0;
|
|
96
96
|
this.role = 'dialog';
|
|
97
|
+
this.hostClass = true;
|
|
97
98
|
/**
|
|
98
99
|
* @hidden
|
|
99
100
|
*/
|
|
100
101
|
this.titleId = null;
|
|
102
|
+
this._themeColor = null;
|
|
101
103
|
this.draged = false;
|
|
102
104
|
this.resized = false;
|
|
103
105
|
this.windowSubscription = new Subscription();
|
|
@@ -130,6 +132,22 @@ export class WindowComponent {
|
|
|
130
132
|
get resizable() {
|
|
131
133
|
return this.options.resizable;
|
|
132
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* The Window allows you to specify predefined theme colors.
|
|
137
|
+
* The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
|
|
138
|
+
*
|
|
139
|
+
* The possible values are:
|
|
140
|
+
* * `primary`
|
|
141
|
+
* * `dark`
|
|
142
|
+
* * `light`
|
|
143
|
+
*/
|
|
144
|
+
set themeColor(themeColor) {
|
|
145
|
+
this.handleThemeColorClass(this.themeColor, themeColor);
|
|
146
|
+
this._themeColor = themeColor;
|
|
147
|
+
}
|
|
148
|
+
get themeColor() {
|
|
149
|
+
return this._themeColor;
|
|
150
|
+
}
|
|
133
151
|
/**
|
|
134
152
|
* @hidden
|
|
135
153
|
*/
|
|
@@ -260,9 +278,6 @@ export class WindowComponent {
|
|
|
260
278
|
}
|
|
261
279
|
return this.localization.get('minimizeTitle');
|
|
262
280
|
}
|
|
263
|
-
get hostClasses() {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
281
|
get dir() {
|
|
267
282
|
return this.direction;
|
|
268
283
|
}
|
|
@@ -277,6 +292,7 @@ export class WindowComponent {
|
|
|
277
292
|
if (this.titleBarView || this.titleBarContent) {
|
|
278
293
|
this.renderer.setAttribute(this.el.nativeElement, 'aria-labelledby', this.titleId);
|
|
279
294
|
}
|
|
295
|
+
this.handleThemeColorClass(null, this.themeColor);
|
|
280
296
|
}
|
|
281
297
|
ngOnInit() {
|
|
282
298
|
this.renderer.removeAttribute(this.el.nativeElement, 'title');
|
|
@@ -543,9 +559,20 @@ export class WindowComponent {
|
|
|
543
559
|
generateTitleId() {
|
|
544
560
|
return 'kendo-window-title-' + Math.ceil(Math.random() * 1000000).toString();
|
|
545
561
|
}
|
|
562
|
+
handleThemeColorClass(previousValue, currentValue) {
|
|
563
|
+
const wrapper = this.el.nativeElement;
|
|
564
|
+
if (previousValue) {
|
|
565
|
+
const classToRemove = `k-window-${previousValue}`;
|
|
566
|
+
this.renderer.removeClass(wrapper, classToRemove);
|
|
567
|
+
}
|
|
568
|
+
if (currentValue) {
|
|
569
|
+
const classToAdd = `k-window-${currentValue}`;
|
|
570
|
+
this.renderer.addClass(wrapper, classToAdd);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
546
573
|
}
|
|
547
574
|
WindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DragResizeService }, { token: i2.NavigationService }, { token: i0.NgZone }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
548
|
-
WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowComponent, selector: "kendo-window", inputs: { autoFocusedElement: "autoFocusedElement", title: "title", draggable: "draggable", resizable: "resizable", keepContent: "keepContent", state: "state", minWidth: "minWidth", minHeight: "minHeight", width: "width", height: "height", top: "top", left: "left" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", resizeStart: "resizeStart", resizeEnd: "resizeEnd", close: "close", widthChange: "widthChange", heightChange: "heightChange", topChange: "topChange", leftChange: "leftChange", stateChange: "stateChange" }, host: { listeners: { "focus": "onComponentFocus()", "blur": "onComponentBlur()" }, properties: { "attr.tabIndex": "this.tabIndex", "attr.role": "this.role", "class.k-window": "this.
|
|
575
|
+
WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowComponent, selector: "kendo-window", inputs: { autoFocusedElement: "autoFocusedElement", title: "title", draggable: "draggable", resizable: "resizable", themeColor: "themeColor", keepContent: "keepContent", state: "state", minWidth: "minWidth", minHeight: "minHeight", width: "width", height: "height", top: "top", left: "left" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", resizeStart: "resizeStart", resizeEnd: "resizeEnd", close: "close", widthChange: "widthChange", heightChange: "heightChange", topChange: "topChange", leftChange: "leftChange", stateChange: "stateChange" }, host: { listeners: { "focus": "onComponentFocus()", "blur": "onComponentBlur()" }, properties: { "attr.tabIndex": "this.tabIndex", "attr.role": "this.role", "class.k-window": "this.hostClass", "attr.dir": "this.dir", "style.minWidth": "this.styleMinWidth", "style.minHeight": "this.styleMinHeight", "style.position": "this.stylePosition", "class.k-window-maximized": "this.wrapperMaximizedClass", "class.k-window-minimized": "this.wrapperMinimizedClass" } }, providers: [
|
|
549
576
|
DragResizeService,
|
|
550
577
|
NavigationService,
|
|
551
578
|
LocalizationService,
|
|
@@ -570,8 +597,8 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
570
597
|
<ng-container>
|
|
571
598
|
|
|
572
599
|
<kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
|
|
573
|
-
<
|
|
574
|
-
<div class="k-window-actions">
|
|
600
|
+
<span class="k-window-title">{{ title }}</span>
|
|
601
|
+
<div class="k-window-titlebar-actions">
|
|
575
602
|
<button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
|
|
576
603
|
<button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
|
|
577
604
|
<button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
|
|
@@ -582,7 +609,7 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
582
609
|
|
|
583
610
|
<div *ngIf="state !== 'minimized' || keepContent"
|
|
584
611
|
[hidden]="state === 'minimized' && keepContent"
|
|
585
|
-
class="k-
|
|
612
|
+
class="k-window-content"
|
|
586
613
|
>
|
|
587
614
|
<ng-content *ngIf="!contentTemplate"></ng-content>
|
|
588
615
|
<ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
|
|
@@ -627,8 +654,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
627
654
|
<ng-container>
|
|
628
655
|
|
|
629
656
|
<kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
|
|
630
|
-
<
|
|
631
|
-
<div class="k-window-actions">
|
|
657
|
+
<span class="k-window-title">{{ title }}</span>
|
|
658
|
+
<div class="k-window-titlebar-actions">
|
|
632
659
|
<button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
|
|
633
660
|
<button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
|
|
634
661
|
<button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
|
|
@@ -639,7 +666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
639
666
|
|
|
640
667
|
<div *ngIf="state !== 'minimized' || keepContent"
|
|
641
668
|
[hidden]="state === 'minimized' && keepContent"
|
|
642
|
-
class="k-
|
|
669
|
+
class="k-window-content"
|
|
643
670
|
>
|
|
644
671
|
<ng-content *ngIf="!contentTemplate"></ng-content>
|
|
645
672
|
<ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
|
|
@@ -662,6 +689,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
662
689
|
type: Input
|
|
663
690
|
}], resizable: [{
|
|
664
691
|
type: Input
|
|
692
|
+
}], themeColor: [{
|
|
693
|
+
type: Input
|
|
665
694
|
}], keepContent: [{
|
|
666
695
|
type: Input
|
|
667
696
|
}], state: [{
|
|
@@ -704,7 +733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
704
733
|
}], role: [{
|
|
705
734
|
type: HostBinding,
|
|
706
735
|
args: ['attr.role']
|
|
707
|
-
}],
|
|
736
|
+
}], hostClass: [{
|
|
708
737
|
type: HostBinding,
|
|
709
738
|
args: ['class.k-window']
|
|
710
739
|
}], dir: [{
|