@progress/kendo-angular-dialog 11.0.0-develop.99 → 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
@@ -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 {
@@ -508,20 +520,20 @@ DialogTitleBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
508
520
  i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
509
521
  closeTitle="Close"
510
522
  >
511
- <div class="k-window-title k-dialog-title">
523
+ <span class="k-window-title k-dialog-title">
512
524
  <ng-content></ng-content>
513
- </div>
525
+ </span>
514
526
 
515
- <div class="k-window-actions k-dialog-actions">
527
+ <div class="k-window-titlebar-actions k-dialog-titlebar-actions">
516
528
  <button
517
529
  kendoButton
518
530
  fillMode="flat"
519
531
  role="button"
520
532
  [attr.title]="closeButtonTitle"
521
533
  [attr.aria-label]="closeButtonTitle"
522
- icon="x"
534
+ icon="close"
523
535
  [svgIcon]="xIcon"
524
- class="k-window-action k-dialog-action"
536
+ class="k-window-titlebar-action k-dialog-titlebar-action"
525
537
  (click)="onCloseClick($event)"
526
538
  >
527
539
  </button>
@@ -549,20 +561,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
549
561
  i18n-closeTitle="kendo.dialog.closeTitle|The title of the close button"
550
562
  closeTitle="Close"
551
563
  >
552
- <div class="k-window-title k-dialog-title">
564
+ <span class="k-window-title k-dialog-title">
553
565
  <ng-content></ng-content>
554
- </div>
566
+ </span>
555
567
 
556
- <div class="k-window-actions k-dialog-actions">
568
+ <div class="k-window-titlebar-actions k-dialog-titlebar-actions">
557
569
  <button
558
570
  kendoButton
559
571
  fillMode="flat"
560
572
  role="button"
561
573
  [attr.title]="closeButtonTitle"
562
574
  [attr.aria-label]="closeButtonTitle"
563
- icon="x"
575
+ icon="close"
564
576
  [svgIcon]="xIcon"
565
- class="k-window-action k-dialog-action"
577
+ class="k-window-titlebar-action k-dialog-titlebar-action"
566
578
  (click)="onCloseClick($event)"
567
579
  >
568
580
  </button>
@@ -593,8 +605,8 @@ const packageMetadata = {
593
605
  name: '@progress/kendo-angular-dialog',
594
606
  productName: 'Kendo UI for Angular',
595
607
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
596
- publishDate: 1673466837,
597
- version: '',
608
+ publishDate: 1674032329,
609
+ version: '11.0.0',
598
610
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
599
611
  };
600
612
 
@@ -747,6 +759,7 @@ class DialogComponent {
747
759
  */
748
760
  this.close = new EventEmitter();
749
761
  this.tabIndex = 0;
762
+ this._themeColor = null;
750
763
  this.subscriptions = [];
751
764
  this.domSubs = new Subscription();
752
765
  validatePackage(packageMetadata);
@@ -755,6 +768,22 @@ class DialogComponent {
755
768
  this.titleId = this.generateTitleId();
756
769
  this.contentId = this.generateContentId();
757
770
  }
771
+ /**
772
+ * The Dialog allows you to specify predefined theme colors.
773
+ * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
774
+ *
775
+ * The possible values are:
776
+ * * `primary`
777
+ * * `dark`
778
+ * * `light`
779
+ */
780
+ set themeColor(themeColor) {
781
+ this.handleThemeColorClass(this.themeColor, themeColor);
782
+ this._themeColor = themeColor;
783
+ }
784
+ get themeColor() {
785
+ return this._themeColor;
786
+ }
758
787
  /**
759
788
  * @hidden
760
789
  */
@@ -828,6 +857,7 @@ class DialogComponent {
828
857
  }));
829
858
  }
830
859
  this.initDomEvents();
860
+ this.handleThemeColorClass(null, this.themeColor);
831
861
  }
832
862
  ngOnInit() {
833
863
  if (this.animation) {
@@ -1024,9 +1054,20 @@ class DialogComponent {
1024
1054
  this.subscriptions.push(s);
1025
1055
  }
1026
1056
  }
1057
+ handleThemeColorClass(previousValue, currentValue) {
1058
+ const dialog = this.dialog.nativeElement;
1059
+ if (previousValue) {
1060
+ const classToRemove = `k-dialog-${previousValue}`;
1061
+ this.renderer.removeClass(dialog, classToRemove);
1062
+ }
1063
+ if (currentValue) {
1064
+ const classToAdd = `k-dialog-${currentValue}`;
1065
+ this.renderer.addClass(dialog, classToAdd);
1066
+ }
1067
+ }
1027
1068
  }
1028
1069
  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 });
1029
- 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: [
1070
+ 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: [
1030
1071
  LocalizationService,
1031
1072
  {
1032
1073
  provide: DIALOG_LOCALIZATION_SERVICE,
@@ -1048,7 +1089,7 @@ DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
1048
1089
  <kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
1049
1090
  <ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
1050
1091
 
1051
- <div [id]="contentId" class="k-content k-window-content k-dialog-content">
1092
+ <div [id]="contentId" class="k-window-content k-dialog-content">
1052
1093
  <ng-content *ngIf="!contentTemplate"></ng-content>
1053
1094
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
1054
1095
  </div>
@@ -1097,7 +1138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1097
1138
  <kendo-dialog-titlebar *ngIf="title" [closeTitle]="closeTitle" [id]="titleId">{{ title }}</kendo-dialog-titlebar>
1098
1139
  <ng-content select="kendo-dialog-titlebar" *ngIf="!title"></ng-content>
1099
1140
 
1100
- <div [id]="contentId" class="k-content k-window-content k-dialog-content">
1141
+ <div [id]="contentId" class="k-window-content k-dialog-content">
1101
1142
  <ng-content *ngIf="!contentTemplate"></ng-content>
1102
1143
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
1103
1144
  </div>
@@ -1130,6 +1171,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1130
1171
  type: Input
1131
1172
  }], animation: [{
1132
1173
  type: Input
1174
+ }], themeColor: [{
1175
+ type: Input
1133
1176
  }], action: [{
1134
1177
  type: Output
1135
1178
  }], close: [{
@@ -1917,7 +1960,7 @@ class WindowTitleBarComponent {
1917
1960
  }
1918
1961
  }
1919
1962
  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 });
1920
- 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: `
1963
+ 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: `
1921
1964
  <ng-content *ngIf="!template"></ng-content>
1922
1965
  <ng-template
1923
1966
  [ngTemplateOutlet]="template"
@@ -1943,9 +1986,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1943
1986
  }], className: [{
1944
1987
  type: HostBinding,
1945
1988
  args: ['class.k-window-titlebar']
1946
- }, {
1947
- type: HostBinding,
1948
- args: ['class.k-dialog-titlebar']
1949
1989
  }], touchAction: [{
1950
1990
  type: HostBinding,
1951
1991
  args: ['style.touch-action']
@@ -2124,7 +2164,7 @@ class WindowMinimizeActionDirective extends Button {
2124
2164
  }
2125
2165
  }
2126
2166
  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 });
2127
- 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: [
2167
+ 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: [
2128
2168
  LocalizationService,
2129
2169
  {
2130
2170
  provide: L10N_PREFIX,
@@ -2178,7 +2218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2178
2218
  args: ['attr.type']
2179
2219
  }], buttonClass: [{
2180
2220
  type: HostBinding,
2181
- args: ['class.k-window-action']
2221
+ args: ['class.k-window-titlebar-action']
2182
2222
  }], onClick: [{
2183
2223
  type: HostListener,
2184
2224
  args: ['click']
@@ -2213,7 +2253,7 @@ class WindowMaximizeActionDirective extends Button {
2213
2253
  }
2214
2254
  }
2215
2255
  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 });
2216
- 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: [
2256
+ 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: [
2217
2257
  LocalizationService,
2218
2258
  {
2219
2259
  provide: L10N_PREFIX,
@@ -2267,7 +2307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2267
2307
  args: ['attr.type']
2268
2308
  }], buttonClass: [{
2269
2309
  type: HostBinding,
2270
- args: ['class.k-window-action']
2310
+ args: ['class.k-window-titlebar-action']
2271
2311
  }], onClick: [{
2272
2312
  type: HostListener,
2273
2313
  args: ['click']
@@ -2302,7 +2342,7 @@ class WindowRestoreActionDirective extends Button {
2302
2342
  }
2303
2343
  }
2304
2344
  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 });
2305
- 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: [
2345
+ 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: [
2306
2346
  LocalizationService,
2307
2347
  {
2308
2348
  provide: L10N_PREFIX,
@@ -2356,7 +2396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2356
2396
  args: ['attr.type']
2357
2397
  }], buttonClass: [{
2358
2398
  type: HostBinding,
2359
- args: ['class.k-window-action']
2399
+ args: ['class.k-window-titlebar-action']
2360
2400
  }], onClick: [{
2361
2401
  type: HostListener,
2362
2402
  args: ['click']
@@ -2388,7 +2428,7 @@ class WindowCloseActionDirective extends Button {
2388
2428
  }
2389
2429
  }
2390
2430
  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 });
2391
- 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: [
2431
+ 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: [
2392
2432
  LocalizationService,
2393
2433
  {
2394
2434
  provide: L10N_PREFIX,
@@ -2398,7 +2438,7 @@ WindowCloseActionDirective.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
2398
2438
  <kendo-icon-wrapper
2399
2439
  *ngIf="!imageUrl && !iconClass"
2400
2440
  innerCssClass="k-button-icon"
2401
- name="x"
2441
+ name="close"
2402
2442
  [svgIcon]="xIcon">
2403
2443
  </kendo-icon-wrapper>
2404
2444
  <span *ngIf="imageUrl" class="k-button-icon k-icon">
@@ -2423,7 +2463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2423
2463
  <kendo-icon-wrapper
2424
2464
  *ngIf="!imageUrl && !iconClass"
2425
2465
  innerCssClass="k-button-icon"
2426
- name="x"
2466
+ name="close"
2427
2467
  [svgIcon]="xIcon">
2428
2468
  </kendo-icon-wrapper>
2429
2469
  <span *ngIf="imageUrl" class="k-button-icon k-icon">
@@ -2442,7 +2482,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2442
2482
  args: ['attr.type']
2443
2483
  }], buttonClass: [{
2444
2484
  type: HostBinding,
2445
- args: ['class.k-window-action']
2485
+ args: ['class.k-window-titlebar-action']
2446
2486
  }], onClick: [{
2447
2487
  type: HostListener,
2448
2488
  args: ['click']
@@ -2515,10 +2555,12 @@ class WindowComponent {
2515
2555
  this.messages = {};
2516
2556
  this.tabIndex = 0;
2517
2557
  this.role = 'dialog';
2558
+ this.hostClass = true;
2518
2559
  /**
2519
2560
  * @hidden
2520
2561
  */
2521
2562
  this.titleId = null;
2563
+ this._themeColor = null;
2522
2564
  this.draged = false;
2523
2565
  this.resized = false;
2524
2566
  this.windowSubscription = new Subscription();
@@ -2551,6 +2593,22 @@ class WindowComponent {
2551
2593
  get resizable() {
2552
2594
  return this.options.resizable;
2553
2595
  }
2596
+ /**
2597
+ * The Window allows you to specify predefined theme colors.
2598
+ * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
2599
+ *
2600
+ * The possible values are:
2601
+ * * `primary`
2602
+ * * `dark`
2603
+ * * `light`
2604
+ */
2605
+ set themeColor(themeColor) {
2606
+ this.handleThemeColorClass(this.themeColor, themeColor);
2607
+ this._themeColor = themeColor;
2608
+ }
2609
+ get themeColor() {
2610
+ return this._themeColor;
2611
+ }
2554
2612
  /**
2555
2613
  * @hidden
2556
2614
  */
@@ -2681,9 +2739,6 @@ class WindowComponent {
2681
2739
  }
2682
2740
  return this.localization.get('minimizeTitle');
2683
2741
  }
2684
- get hostClasses() {
2685
- return true;
2686
- }
2687
2742
  get dir() {
2688
2743
  return this.direction;
2689
2744
  }
@@ -2698,6 +2753,7 @@ class WindowComponent {
2698
2753
  if (this.titleBarView || this.titleBarContent) {
2699
2754
  this.renderer.setAttribute(this.el.nativeElement, 'aria-labelledby', this.titleId);
2700
2755
  }
2756
+ this.handleThemeColorClass(null, this.themeColor);
2701
2757
  }
2702
2758
  ngOnInit() {
2703
2759
  this.renderer.removeAttribute(this.el.nativeElement, 'title');
@@ -2964,9 +3020,20 @@ class WindowComponent {
2964
3020
  generateTitleId() {
2965
3021
  return 'kendo-window-title-' + Math.ceil(Math.random() * 1000000).toString();
2966
3022
  }
3023
+ handleThemeColorClass(previousValue, currentValue) {
3024
+ const wrapper = this.el.nativeElement;
3025
+ if (previousValue) {
3026
+ const classToRemove = `k-window-${previousValue}`;
3027
+ this.renderer.removeClass(wrapper, classToRemove);
3028
+ }
3029
+ if (currentValue) {
3030
+ const classToAdd = `k-window-${currentValue}`;
3031
+ this.renderer.addClass(wrapper, classToAdd);
3032
+ }
3033
+ }
2967
3034
  }
2968
3035
  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 });
2969
- 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: [
3036
+ 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: [
2970
3037
  DragResizeService,
2971
3038
  NavigationService,
2972
3039
  LocalizationService,
@@ -2991,8 +3058,8 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
2991
3058
  <ng-container>
2992
3059
 
2993
3060
  <kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
2994
- <div class="k-window-title">{{ title }}</div>
2995
- <div class="k-window-actions">
3061
+ <span class="k-window-title">{{ title }}</span>
3062
+ <div class="k-window-titlebar-actions">
2996
3063
  <button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
2997
3064
  <button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
2998
3065
  <button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
@@ -3003,7 +3070,7 @@ WindowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
3003
3070
 
3004
3071
  <div *ngIf="state !== 'minimized' || keepContent"
3005
3072
  [hidden]="state === 'minimized' && keepContent"
3006
- class="k-content k-window-content"
3073
+ class="k-window-content"
3007
3074
  >
3008
3075
  <ng-content *ngIf="!contentTemplate"></ng-content>
3009
3076
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
@@ -3048,8 +3115,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3048
3115
  <ng-container>
3049
3116
 
3050
3117
  <kendo-window-titlebar *ngIf="showDefaultTitleBar" [template]="titleBarTemplate" [id]="titleId">
3051
- <div class="k-window-title">{{ title }}</div>
3052
- <div class="k-window-actions">
3118
+ <span class="k-window-title">{{ title }}</span>
3119
+ <div class="k-window-titlebar-actions">
3053
3120
  <button kendoWindowMinimizeAction [attr.title]="minimizeButtonTitle" [attr.aria-label]="minimizeButtonTitle"></button>
3054
3121
  <button kendoWindowMaximizeAction [attr.title]="maximizeButtonTitle" [attr.aria-label]="maximizeButtonTitle"></button>
3055
3122
  <button kendoWindowRestoreAction [attr.title]="restoreButtonTitle" [attr.aria-label]="restoreButtonTitle"></button>
@@ -3060,7 +3127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3060
3127
 
3061
3128
  <div *ngIf="state !== 'minimized' || keepContent"
3062
3129
  [hidden]="state === 'minimized' && keepContent"
3063
- class="k-content k-window-content"
3130
+ class="k-window-content"
3064
3131
  >
3065
3132
  <ng-content *ngIf="!contentTemplate"></ng-content>
3066
3133
  <ng-template [ngTemplateOutlet]="contentTemplate" *ngIf="contentTemplate"></ng-template>
@@ -3083,6 +3150,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3083
3150
  type: Input
3084
3151
  }], resizable: [{
3085
3152
  type: Input
3153
+ }], themeColor: [{
3154
+ type: Input
3086
3155
  }], keepContent: [{
3087
3156
  type: Input
3088
3157
  }], state: [{
@@ -3125,7 +3194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3125
3194
  }], role: [{
3126
3195
  type: HostBinding,
3127
3196
  args: ['attr.role']
3128
- }], hostClasses: [{
3197
+ }], hostClass: [{
3129
3198
  type: HostBinding,
3130
3199
  args: ['class.k-window']
3131
3200
  }], dir: [{
package/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { DialogContentBase } from './dialog/dialog-content-base';
8
8
  export { DialogActionsComponent } from './dialog/dialog-actions.component';
9
9
  export { DialogService } from './dialog/dialog.service';
10
10
  export { DialogContainerService } from './dialog/dialog-container.service';
11
- export { DialogCloseResult, DialogRef, DialogSettings, DialogAction, DialogResult, DialogAnimation } from './dialog/models/';
11
+ export { DialogCloseResult, DialogRef, DialogSettings, DialogAction, DialogResult, DialogAnimation, DialogThemeColor } from './dialog/models/';
12
12
  export { ActionsLayout } from './common/actions-layout';
13
13
  export { DialogAnimationType } from './common/animation-types';
14
14
  export { AnimationDirection } from './common/dialog-animation-direction';
@@ -18,7 +18,7 @@ export { WindowMaximizeActionDirective } from './window/actions/window-maximize-
18
18
  export { WindowMinimizeActionDirective } from './window/actions/window-minimize-action.directive';
19
19
  export { WindowCloseActionDirective } from './window/actions/window-close-action.directive';
20
20
  export { WindowRestoreActionDirective } from './window/actions/window-restore-action.directive';
21
- export { WindowState, WindowSettings, WindowDimensionSetting, WindowRef, WindowCloseResult } from './window/models';
21
+ export { WindowState, WindowSettings, WindowDimensionSetting, WindowRef, WindowCloseResult, WindowThemeColor } from './window/models';
22
22
  export { WindowService } from './window/window.service';
23
23
  export { DragResizeService } from './window/drag-resize.service';
24
24
  export { DialogModule } from './dialog.module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-dialog",
3
- "version": "11.0.0-develop.99",
3
+ "version": "11.0.0",
4
4
  "description": "Dialog Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -27,16 +27,16 @@
27
27
  "@angular/core": "13 - 15",
28
28
  "@angular/platform-browser": "13 - 15",
29
29
  "@progress/kendo-licensing": "^1.0.2",
30
- "@progress/kendo-popup-common": "^1.7.0",
31
- "@progress/kendo-angular-buttons": "11.0.0-develop.99",
32
- "@progress/kendo-angular-common": "11.0.0-develop.99",
33
- "@progress/kendo-angular-icons": "11.0.0-develop.99",
34
- "@progress/kendo-angular-l10n": "11.0.0-develop.99",
35
- "@progress/kendo-angular-schematics": "11.0.0-develop.99",
30
+ "@progress/kendo-angular-buttons": "11.0.0",
31
+ "@progress/kendo-angular-common": "11.0.0",
32
+ "@progress/kendo-angular-icons": "11.0.0",
33
+ "@progress/kendo-angular-l10n": "11.0.0",
36
34
  "rxjs": "^6.5.3 || ^7.0.0"
37
35
  },
38
36
  "dependencies": {
39
- "tslib": "^2.3.1"
37
+ "tslib": "^2.3.1",
38
+ "@progress/kendo-angular-schematics": "11.0.0",
39
+ "@progress/kendo-popup-common": "^1.7.0"
40
40
  },
41
41
  "schematics": "./schematics/collection.json",
42
42
  "module": "fesm2015/progress-kendo-angular-dialog.mjs",
@@ -4,9 +4,9 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'DialogsModule', package: 'dialog', peerDependencies: {
6
6
  // Peer dependency of buttons
7
- "@progress/kendo-angular-popup": "^5.0.0",
7
+ '@progress/kendo-angular-popup': '11.0.0',
8
8
  // Peer dependency of icons
9
- "@progress/kendo-svg-icons": "^1.0.0"
9
+ '@progress/kendo-svg-icons': '^1.0.0'
10
10
  } });
11
11
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
12
12
  }
@@ -8,3 +8,4 @@ export * from './window-options';
8
8
  export * from './window-ref';
9
9
  export * from './window-settings';
10
10
  export * from './window-types';
11
+ export * from './theme-color';
@@ -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 Window.
7
+ *
8
+ * The possible values are:
9
+ * * `primary` &mdash;Applies coloring based on the `primary` theme color.
10
+ * * `light`&mdash; Applies coloring based on the `light` theme color.
11
+ * * `dark`&mdash; Applies coloring based on the `dark` theme color.
12
+ */
13
+ export declare type WindowThemeColor = 'primary' | 'light' | 'dark';
@@ -10,6 +10,7 @@ import { WindowTitleBarComponent } from './window-titlebar.component';
10
10
  import { NavigationService } from './navigation.service';
11
11
  import { WindowDimensionSetting, WindowOffsetSetting, WindowState } from './models/window-types';
12
12
  import { WindowMessages } from './models/window-messages';
13
+ import { WindowThemeColor } from './models';
13
14
  import * as i0 from "@angular/core";
14
15
  /**
15
16
  * Represents the [Kendo UI Window component for Angular]({% slug overview_window_dialogs %}).
@@ -41,6 +42,17 @@ export declare class WindowComponent implements OnInit, OnDestroy, OnChanges, Af
41
42
  */
42
43
  set resizable(value: boolean);
43
44
  get resizable(): boolean;
45
+ /**
46
+ * The Window allows you to specify predefined theme colors.
47
+ * The theme color will be applied as a background and border color to the titlebar while also amending the text color accordingly.
48
+ *
49
+ * The possible values are:
50
+ * * `primary`
51
+ * * `dark`
52
+ * * `light`
53
+ */
54
+ set themeColor(themeColor: WindowThemeColor);
55
+ get themeColor(): WindowThemeColor;
44
56
  /**
45
57
  * @hidden
46
58
  */
@@ -172,7 +184,7 @@ export declare class WindowComponent implements OnInit, OnDestroy, OnChanges, Af
172
184
  messages: WindowMessages;
173
185
  tabIndex: number;
174
186
  role: string;
175
- get hostClasses(): boolean;
187
+ hostClass: boolean;
176
188
  get dir(): string;
177
189
  titleBarView: WindowTitleBarComponent;
178
190
  titleBarContent: WindowTitleBarComponent;
@@ -184,6 +196,7 @@ export declare class WindowComponent implements OnInit, OnDestroy, OnChanges, Af
184
196
  titleId: string;
185
197
  private _htmlAttributes;
186
198
  private _cssClass;
199
+ private _themeColor;
187
200
  private direction;
188
201
  private draged;
189
202
  private resized;
@@ -255,6 +268,7 @@ export declare class WindowComponent implements OnInit, OnDestroy, OnChanges, Af
255
268
  * @hidden
256
269
  */
257
270
  private generateTitleId;
271
+ private handleThemeColorClass;
258
272
  static ɵfac: i0.ɵɵFactoryDeclaration<WindowComponent, never>;
259
- static ɵcmp: i0.ɵɵComponentDeclaration<WindowComponent, "kendo-window", ["kendoWindow"], { "autoFocusedElement": "autoFocusedElement"; "title": "title"; "draggable": "draggable"; "resizable": "resizable"; "keepContent": "keepContent"; "state": "state"; "minWidth": "minWidth"; "minHeight": "minHeight"; "width": "width"; "height": "height"; "top": "top"; "left": "left"; }, { "dragStart": "dragStart"; "dragEnd": "dragEnd"; "resizeStart": "resizeStart"; "resizeEnd": "resizeEnd"; "close": "close"; "widthChange": "widthChange"; "heightChange": "heightChange"; "topChange": "topChange"; "leftChange": "leftChange"; "stateChange": "stateChange"; }, ["titleBarContent"], ["kendo-window-titlebar", "*"]>;
273
+ static ɵcmp: i0.ɵɵComponentDeclaration<WindowComponent, "kendo-window", ["kendoWindow"], { "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"; }, { "dragStart": "dragStart"; "dragEnd": "dragEnd"; "resizeStart": "resizeStart"; "resizeEnd": "resizeEnd"; "close": "close"; "widthChange": "widthChange"; "heightChange": "heightChange"; "topChange": "topChange"; "leftChange": "leftChange"; "stateChange": "stateChange"; }, ["titleBarContent"], ["kendo-window-titlebar", "*"]>;
260
274
  }