@progress/kendo-angular-dialog 11.0.0-develop.98 → 11.0.0

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 (30) hide show
  1. package/NOTICE.txt +17 -17
  2. package/common/actions-layout.d.ts +1 -1
  3. package/common/util.d.ts +2 -2
  4. package/dialog/dialog-actions.component.d.ts +3 -2
  5. package/dialog/dialog.component.d.ts +15 -1
  6. package/dialog/models/index.d.ts +1 -0
  7. package/dialog/models/theme-color.d.ts +13 -0
  8. package/esm2020/common/util.mjs +2 -2
  9. package/esm2020/dialog/dialog-actions.component.mjs +19 -7
  10. package/esm2020/dialog/dialog-titlebar.component.mjs +10 -10
  11. package/esm2020/dialog/dialog.component.mjs +34 -3
  12. package/esm2020/dialog/models/index.mjs +1 -0
  13. package/esm2020/dialog/models/theme-color.mjs +5 -0
  14. package/esm2020/package-metadata.mjs +2 -2
  15. package/esm2020/window/actions/window-close-action.directive.mjs +4 -4
  16. package/esm2020/window/actions/window-maximize-action.directive.mjs +2 -2
  17. package/esm2020/window/actions/window-minimize-action.directive.mjs +2 -2
  18. package/esm2020/window/actions/window-restore-action.directive.mjs +2 -2
  19. package/esm2020/window/models/index.mjs +1 -0
  20. package/esm2020/window/models/theme-color.mjs +5 -0
  21. package/esm2020/window/window-titlebar.component.mjs +1 -4
  22. package/esm2020/window/window.component.mjs +40 -11
  23. package/fesm2015/progress-kendo-angular-dialog.mjs +118 -49
  24. package/fesm2020/progress-kendo-angular-dialog.mjs +118 -49
  25. package/index.d.ts +2 -2
  26. package/package.json +8 -8
  27. package/schematics/ngAdd/index.js +2 -2
  28. package/window/models/index.d.ts +1 -0
  29. package/window/models/theme-color.d.ts +13 -0
  30. package/window/window.component.d.ts +16 -2
@@ -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.hostClasses", "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: [
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
- <div class="k-window-title">{{ title }}</div>
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-content k-window-content"
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
- <div class="k-window-title">{{ title }}</div>
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-content k-window-content"
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
- }], hostClasses: [{
736
+ }], hostClass: [{
708
737
  type: HostBinding,
709
738
  args: ['class.k-window']
710
739
  }], dir: [{
@@ -51,11 +51,11 @@ var Keys;
51
51
  /**
52
52
  * @hidden
53
53
  */
54
- const DIALOG_ELEMENTS_HANDLING_ESC_KEY = 'k-dialog-wrapper k-dialog-buttongroup k-dialog-action';
54
+ const DIALOG_ELEMENTS_HANDLING_ESC_KEY = 'k-dialog-wrapper k-actions k-dialog-titlebar-action';
55
55
  /**
56
56
  * @hidden
57
57
  */
58
- const DIALOG_ELEMENTS_HANDLING_ARROWS = 'k-dialog-buttongroup';
58
+ const DIALOG_ELEMENTS_HANDLING_ARROWS = 'k-actions';
59
59
  /**
60
60
  * @hidden
61
61
  */
@@ -237,7 +237,7 @@ class DialogActionsComponent {
237
237
  * Fires when the user clicks an action button.
238
238
  */
239
239
  this.action = new EventEmitter();
240
- this.buttonGroupClassName = true;
240
+ this.hostClasses = true;
241
241
  }
242
242
  /**
243
243
  * Allows the declarative specification of the actions.
@@ -253,9 +253,12 @@ class DialogActionsComponent {
253
253
  throw new Error('"actions" must be either TemplateRef or DialogAction[] instance.');
254
254
  }
255
255
  }
256
- get className() {
256
+ get stretchedClassName() {
257
257
  return this.layout === 'stretched';
258
258
  }
259
+ get endClassName() {
260
+ return this.layout === 'end';
261
+ }
259
262
  /**
260
263
  * @hidden
261
264
  */
@@ -278,7 +281,7 @@ class DialogActionsComponent {
278
281
  }
279
282
  }
280
283
  DialogActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DialogActionsComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
281
- 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-dialog-buttongroup": "this.buttonGroupClassName", "class.k-actions": "this.buttonGroupClassName", "class.k-actions-stretched": "this.className" } }, ngImport: i0, template: `
284
+ 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: `
282
285
  <ng-content *ngIf="!actions"></ng-content>
283
286
  <ng-container *ngIf="actionsArray; else actionTemplate">
284
287
  <button
@@ -319,15 +322,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
319
322
  type: Input
320
323
  }], action: [{
321
324
  type: Output
322
- }], buttonGroupClassName: [{
325
+ }], hostClasses: [{
323
326
  type: HostBinding,
324
- args: ['class.k-dialog-buttongroup']
327
+ args: ['class.k-actions']
325
328
  }, {
326
329
  type: HostBinding,
327
- args: ['class.k-actions']
328
- }], className: [{
330
+ args: ['class.k-actions-horizontal']
331
+ }, {
332
+ type: HostBinding,
333
+ args: ['class.k-window-actions']
334
+ }, {
335
+ type: HostBinding,
336
+ args: ['class.k-dialog-actions']
337
+ }], stretchedClassName: [{
329
338
  type: HostBinding,
330
339
  args: ['class.k-actions-stretched']
340
+ }], endClassName: [{
341
+ type: HostBinding,
342
+ args: ['class.k-actions-end']
331
343
  }] } });
332
344
 
333
345
  class PreventableEvent {
@@ -510,20 +522,20 @@ DialogTitleBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
510
522
  i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
511
523
  closeTitle="Close"
512
524
  >
513
- <div class="k-window-title k-dialog-title">
525
+ <span class="k-window-title k-dialog-title">
514
526
  <ng-content></ng-content>
515
- </div>
527
+ </span>
516
528
 
517
- <div class="k-window-actions k-dialog-actions">
529
+ <div class="k-window-titlebar-actions k-dialog-titlebar-actions">
518
530
  <button
519
531
  kendoButton
520
532
  fillMode="flat"
521
533
  role="button"
522
534
  [attr.title]="closeButtonTitle"
523
535
  [attr.aria-label]="closeButtonTitle"
524
- icon="x"
536
+ icon="close"
525
537
  [svgIcon]="xIcon"
526
- class="k-window-action k-dialog-action"
538
+ class="k-window-titlebar-action k-dialog-titlebar-action"
527
539
  (click)="onCloseClick($event)"
528
540
  >
529
541
  </button>
@@ -551,20 +563,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
551
563
  i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
552
564
  closeTitle="Close"
553
565
  >
554
- <div class="k-window-title k-dialog-title">
566
+ <span class="k-window-title k-dialog-title">
555
567
  <ng-content></ng-content>
556
- </div>
568
+ </span>
557
569
 
558
- <div class="k-window-actions k-dialog-actions">
570
+ <div class="k-window-titlebar-actions k-dialog-titlebar-actions">
559
571
  <button
560
572
  kendoButton
561
573
  fillMode="flat"
562
574
  role="button"
563
575
  [attr.title]="closeButtonTitle"
564
576
  [attr.aria-label]="closeButtonTitle"
565
- icon="x"
577
+ icon="close"
566
578
  [svgIcon]="xIcon"
567
- class="k-window-action k-dialog-action"
579
+ class="k-window-titlebar-action k-dialog-titlebar-action"
568
580
  (click)="onCloseClick($event)"
569
581
  >
570
582
  </button>
@@ -597,8 +609,8 @@ const packageMetadata = {
597
609
  name: '@progress/kendo-angular-dialog',
598
610
  productName: 'Kendo UI for Angular',
599
611
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
600
- publishDate: 1673460759,
601
- version: '',
612
+ publishDate: 1674032329,
613
+ version: '11.0.0',
602
614
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
603
615
  };
604
616
 
@@ -751,6 +763,7 @@ class DialogComponent {
751
763
  */
752
764
  this.close = new EventEmitter();
753
765
  this.tabIndex = 0;
766
+ this._themeColor = null;
754
767
  this.subscriptions = [];
755
768
  this.domSubs = new Subscription();
756
769
  validatePackage(packageMetadata);
@@ -759,6 +772,22 @@ class DialogComponent {
759
772
  this.titleId = this.generateTitleId();
760
773
  this.contentId = this.generateContentId();
761
774
  }
775
+ /**
776
+ * The Dialog allows you to specify predefined theme colors.
777
+ * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
778
+ *
779
+ * The possible values are:
780
+ * * `primary`
781
+ * * `dark`
782
+ * * `light`
783
+ */
784
+ set themeColor(themeColor) {
785
+ this.handleThemeColorClass(this.themeColor, themeColor);
786
+ this._themeColor = themeColor;
787
+ }
788
+ get themeColor() {
789
+ return this._themeColor;
790
+ }
762
791
  /**
763
792
  * @hidden
764
793
  */
@@ -832,6 +861,7 @@ class DialogComponent {
832
861
  }));
833
862
  }
834
863
  this.initDomEvents();
864
+ this.handleThemeColorClass(null, this.themeColor);
835
865
  }
836
866
  ngOnInit() {
837
867
  if (this.animation) {
@@ -1028,9 +1058,20 @@ class DialogComponent {
1028
1058
  this.subscriptions.push(s);
1029
1059
  }
1030
1060
  }
1061
+ handleThemeColorClass(previousValue, currentValue) {
1062
+ const dialog = this.dialog.nativeElement;
1063
+ if (previousValue) {
1064
+ const classToRemove = `k-dialog-${previousValue}`;
1065
+ this.renderer.removeClass(dialog, classToRemove);
1066
+ }
1067
+ if (currentValue) {
1068
+ const classToAdd = `k-dialog-${currentValue}`;
1069
+ this.renderer.addClass(dialog, classToAdd);
1070
+ }
1071
+ }
1031
1072
  }
1032
1073
  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$1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Component });
1033
- 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: [
1074
+ 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: [
1034
1075
  LocalizationService,
1035
1076
  {
1036
1077
  provide: DIALOG_LOCALIZATION_SERVICE,
@@ -1052,7 +1093,7 @@ DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
1052
1093
  <kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
1053
1094
  <ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
1054
1095
 
1055
- <div [id]="contentId" class="k-content k-window-content k-dialog-content">
1096
+ <div [id]="contentId" class="k-window-content k-dialog-content">
1056
1097
  <ng-content *ngIf="!contentTemplate"></ng-content>
1057
1098
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
1058
1099
  </div>
@@ -1101,7 +1142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1101
1142
  <kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
1102
1143
  <ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
1103
1144
 
1104
- <div [id]="contentId" class="k-content k-window-content k-dialog-content">
1145
+ <div [id]="contentId" class="k-window-content k-dialog-content">
1105
1146
  <ng-content *ngIf="!contentTemplate"></ng-content>
1106
1147
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
1107
1148
  </div>
@@ -1134,6 +1175,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1134
1175
  type: Input
1135
1176
  }], animation: [{
1136
1177
  type: Input
1178
+ }], themeColor: [{
1179
+ type: Input
1137
1180
  }], action: [{
1138
1181
  type: Output
1139
1182
  }], close: [{
@@ -1925,7 +1968,7 @@ class WindowTitleBarComponent {
1925
1968
  }
1926
1969
  }
1927
1970
  WindowTitleBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowTitleBarComponent, deps: [{ token: i0.ElementRef }, { token: DragResizeService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1928
- 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", "class.k-dialog-titlebar": "this.className", "style.touch-action": "this.touchAction" } }, ngImport: i0, template: `
1971
+ 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: `
1929
1972
  <ng-content *ngIf="!template"></ng-content>
1930
1973
  <ng-template
1931
1974
  [ngTemplateOutlet]="template"
@@ -1951,9 +1994,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1951
1994
  }], className: [{
1952
1995
  type: HostBinding,
1953
1996
  args: ['class.k-window-titlebar']
1954
- }, {
1955
- type: HostBinding,
1956
- args: ['class.k-dialog-titlebar']
1957
1997
  }], touchAction: [{
1958
1998
  type: HostBinding,
1959
1999
  args: ['style.touch-action']
@@ -2132,7 +2172,7 @@ class WindowMinimizeActionDirective extends Button {
2132
2172
  }
2133
2173
  }
2134
2174
  WindowMinimizeActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2135
- 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: [
2175
+ 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: [
2136
2176
  LocalizationService,
2137
2177
  {
2138
2178
  provide: L10N_PREFIX,
@@ -2188,7 +2228,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2188
2228
  args: ['attr.type']
2189
2229
  }], buttonClass: [{
2190
2230
  type: HostBinding,
2191
- args: ['class.k-window-action']
2231
+ args: ['class.k-window-titlebar-action']
2192
2232
  }], onClick: [{
2193
2233
  type: HostListener,
2194
2234
  args: ['click']
@@ -2223,7 +2263,7 @@ class WindowMaximizeActionDirective extends Button {
2223
2263
  }
2224
2264
  }
2225
2265
  WindowMaximizeActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMaximizeActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2226
- 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: [
2266
+ 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: [
2227
2267
  LocalizationService,
2228
2268
  {
2229
2269
  provide: L10N_PREFIX,
@@ -2279,7 +2319,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2279
2319
  args: ['attr.type']
2280
2320
  }], buttonClass: [{
2281
2321
  type: HostBinding,
2282
- args: ['class.k-window-action']
2322
+ args: ['class.k-window-titlebar-action']
2283
2323
  }], onClick: [{
2284
2324
  type: HostListener,
2285
2325
  args: ['click']
@@ -2314,7 +2354,7 @@ class WindowRestoreActionDirective extends Button {
2314
2354
  }
2315
2355
  }
2316
2356
  WindowRestoreActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowRestoreActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2317
- 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: [
2357
+ 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: [
2318
2358
  LocalizationService,
2319
2359
  {
2320
2360
  provide: L10N_PREFIX,
@@ -2370,7 +2410,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2370
2410
  args: ['attr.type']
2371
2411
  }], buttonClass: [{
2372
2412
  type: HostBinding,
2373
- args: ['class.k-window-action']
2413
+ args: ['class.k-window-titlebar-action']
2374
2414
  }], onClick: [{
2375
2415
  type: HostListener,
2376
2416
  args: ['click']
@@ -2402,7 +2442,7 @@ class WindowCloseActionDirective extends Button {
2402
2442
  }
2403
2443
  }
2404
2444
  WindowCloseActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseActionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService, optional: true }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2405
- 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: [
2445
+ 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: [
2406
2446
  LocalizationService,
2407
2447
  {
2408
2448
  provide: L10N_PREFIX,
@@ -2412,7 +2452,7 @@ WindowCloseActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
2412
2452
  <kendo-icon-wrapper
2413
2453
  *ngIf="!imageUrl && !iconClass"
2414
2454
  innerCssClass="k-button-icon"
2415
- name="x"
2455
+ name="close"
2416
2456
  [svgIcon]="xIcon">
2417
2457
  </kendo-icon-wrapper>
2418
2458
  <span *ngIf="imageUrl" class="k-button-icon k-icon">
@@ -2437,7 +2477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2437
2477
  <kendo-icon-wrapper
2438
2478
  *ngIf="!imageUrl && !iconClass"
2439
2479
  innerCssClass="k-button-icon"
2440
- name="x"
2480
+ name="close"
2441
2481
  [svgIcon]="xIcon">
2442
2482
  </kendo-icon-wrapper>
2443
2483
  <span *ngIf="imageUrl" class="k-button-icon k-icon">
@@ -2458,7 +2498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2458
2498
  args: ['attr.type']
2459
2499
  }], buttonClass: [{
2460
2500
  type: HostBinding,
2461
- args: ['class.k-window-action']
2501
+ args: ['class.k-window-titlebar-action']
2462
2502
  }], onClick: [{
2463
2503
  type: HostListener,
2464
2504
  args: ['click']
@@ -2531,10 +2571,12 @@ class WindowComponent {
2531
2571
  this.messages = {};
2532
2572
  this.tabIndex = 0;
2533
2573
  this.role = 'dialog';
2574
+ this.hostClass = true;
2534
2575
  /**
2535
2576
  * @hidden
2536
2577
  */
2537
2578
  this.titleId = null;
2579
+ this._themeColor = null;
2538
2580
  this.draged = false;
2539
2581
  this.resized = false;
2540
2582
  this.windowSubscription = new Subscription();
@@ -2567,6 +2609,22 @@ class WindowComponent {
2567
2609
  get resizable() {
2568
2610
  return this.options.resizable;
2569
2611
  }
2612
+ /**
2613
+ * The Window allows you to specify predefined theme colors.
2614
+ * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
2615
+ *
2616
+ * The possible values are:
2617
+ * * `primary`
2618
+ * * `dark`
2619
+ * * `light`
2620
+ */
2621
+ set themeColor(themeColor) {
2622
+ this.handleThemeColorClass(this.themeColor, themeColor);
2623
+ this._themeColor = themeColor;
2624
+ }
2625
+ get themeColor() {
2626
+ return this._themeColor;
2627
+ }
2570
2628
  /**
2571
2629
  * @hidden
2572
2630
  */
@@ -2697,9 +2755,6 @@ class WindowComponent {
2697
2755
  }
2698
2756
  return this.localization.get('minimizeTitle');
2699
2757
  }
2700
- get hostClasses() {
2701
- return true;
2702
- }
2703
2758
  get dir() {
2704
2759
  return this.direction;
2705
2760
  }
@@ -2714,6 +2769,7 @@ class WindowComponent {
2714
2769
  if (this.titleBarView || this.titleBarContent) {
2715
2770
  this.renderer.setAttribute(this.el.nativeElement, 'aria-labelledby', this.titleId);
2716
2771
  }
2772
+ this.handleThemeColorClass(null, this.themeColor);
2717
2773
  }
2718
2774
  ngOnInit() {
2719
2775
  this.renderer.removeAttribute(this.el.nativeElement, 'title');
@@ -2980,9 +3036,20 @@ class WindowComponent {
2980
3036
  generateTitleId() {
2981
3037
  return 'kendo-window-title-' + Math.ceil(Math.random() * 1000000).toString();
2982
3038
  }
3039
+ handleThemeColorClass(previousValue, currentValue) {
3040
+ const wrapper = this.el.nativeElement;
3041
+ if (previousValue) {
3042
+ const classToRemove = `k-window-${previousValue}`;
3043
+ this.renderer.removeClass(wrapper, classToRemove);
3044
+ }
3045
+ if (currentValue) {
3046
+ const classToAdd = `k-window-${currentValue}`;
3047
+ this.renderer.addClass(wrapper, classToAdd);
3048
+ }
3049
+ }
2983
3050
  }
2984
3051
  WindowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService }, { token: NavigationService }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2985
- 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.hostClasses", "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: [
3052
+ 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: [
2986
3053
  DragResizeService,
2987
3054
  NavigationService,
2988
3055
  LocalizationService,
@@ -3007,8 +3074,8 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
3007
3074
  <ng-container>
3008
3075
 
3009
3076
  <kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
3010
- <div class="k-window-title">{{ title }}</div>
3011
- <div class="k-window-actions">
3077
+ <span class="k-window-title">{{ title }}</span>
3078
+ <div class="k-window-titlebar-actions">
3012
3079
  <button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
3013
3080
  <button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
3014
3081
  <button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
@@ -3019,7 +3086,7 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
3019
3086
 
3020
3087
  <div *ngIf="state !== 'minimized' || keepContent"
3021
3088
  [hidden]="state === 'minimized' && keepContent"
3022
- class="k-content k-window-content"
3089
+ class="k-window-content"
3023
3090
  >
3024
3091
  <ng-content *ngIf="!contentTemplate"></ng-content>
3025
3092
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
@@ -3064,8 +3131,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3064
3131
  <ng-container>
3065
3132
 
3066
3133
  <kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
3067
- <div class="k-window-title">{{ title }}</div>
3068
- <div class="k-window-actions">
3134
+ <span class="k-window-title">{{ title }}</span>
3135
+ <div class="k-window-titlebar-actions">
3069
3136
  <button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
3070
3137
  <button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
3071
3138
  <button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
@@ -3076,7 +3143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3076
3143
 
3077
3144
  <div *ngIf="state !== 'minimized' || keepContent"
3078
3145
  [hidden]="state === 'minimized' && keepContent"
3079
- class="k-content k-window-content"
3146
+ class="k-window-content"
3080
3147
  >
3081
3148
  <ng-content *ngIf="!contentTemplate"></ng-content>
3082
3149
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
@@ -3099,6 +3166,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3099
3166
  type: Input
3100
3167
  }], resizable: [{
3101
3168
  type: Input
3169
+ }], themeColor: [{
3170
+ type: Input
3102
3171
  }], keepContent: [{
3103
3172
  type: Input
3104
3173
  }], state: [{
@@ -3141,7 +3210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3141
3210
  }], role: [{
3142
3211
  type: HostBinding,
3143
3212
  args: ['attr.role']
3144
- }], hostClasses: [{
3213
+ }], hostClass: [{
3145
3214
  type: HostBinding,
3146
3215
  args: ['class.k-window']
3147
3216
  }], dir: [{