@progress/kendo-angular-dialog 24.0.0-develop.9 → 24.0.1-develop.1

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.
@@ -0,0 +1,30 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = default_1;
8
+ const tslib_1 = require("tslib");
9
+ const fs = tslib_1.__importStar(require("fs"));
10
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
11
+ function default_1(fileInfo, api) {
12
+ const filePath = fileInfo.path;
13
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
14
+ return fileInfo.source;
15
+ }
16
+ // Handle HTML files and inline templates
17
+ const htmlResult = (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, codemods_1.attributeRemoval)(templateContent, 'kendo-dialog', 'themeColor'));
18
+ if (filePath.endsWith('.html')) {
19
+ if (htmlResult && htmlResult !== fileInfo.source) {
20
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
21
+ return htmlResult;
22
+ }
23
+ return fileInfo.source;
24
+ }
25
+ // Handle TypeScript property transformations
26
+ const j = api.jscodeshift;
27
+ const rootSource = j(htmlResult || fileInfo.source);
28
+ (0, codemods_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dialog', 'DialogComponent', 'themeColor');
29
+ return rootSource.toSource();
30
+ }
@@ -0,0 +1,22 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = default_1;
8
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
9
+ function default_1(fileInfo, api) {
10
+ const filePath = fileInfo.path;
11
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
12
+ return fileInfo.source;
13
+ }
14
+ if (filePath.endsWith('.html')) {
15
+ return fileInfo.source;
16
+ }
17
+ const j = api.jscodeshift;
18
+ const rootSource = j(fileInfo.source);
19
+ (0, codemods_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dialog', 'DialogSettings', 'themeColor');
20
+ (0, codemods_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dialog', 'WindowSettings', 'themeColor');
21
+ return rootSource.toSource();
22
+ }
@@ -0,0 +1,30 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = default_1;
8
+ const tslib_1 = require("tslib");
9
+ const fs = tslib_1.__importStar(require("fs"));
10
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
11
+ function default_1(fileInfo, api) {
12
+ const filePath = fileInfo.path;
13
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
14
+ return fileInfo.source;
15
+ }
16
+ // Handle HTML files and inline templates
17
+ const htmlResult = (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, codemods_1.attributeRemoval)(templateContent, 'kendo-window', 'themeColor'));
18
+ if (filePath.endsWith('.html')) {
19
+ if (htmlResult && htmlResult !== fileInfo.source) {
20
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
21
+ return htmlResult;
22
+ }
23
+ return fileInfo.source;
24
+ }
25
+ // Handle TypeScript property transformations
26
+ const j = api.jscodeshift;
27
+ const rootSource = j(htmlResult || fileInfo.source);
28
+ (0, codemods_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dialog', 'WindowComponent', 'themeColor');
29
+ return rootSource.toSource();
30
+ }
@@ -11,7 +11,6 @@ import { LicenseMessage } from '@progress/kendo-licensing';
11
11
  import { ActionsLayout } from '../common/actions-layout';
12
12
  import { DialogAction } from './models/dialog-action';
13
13
  import { DialogAnimation } from './models/dialog-animation';
14
- import { DialogThemeColor } from './models';
15
14
  import * as i0 from "@angular/core";
16
15
  /**
17
16
  * Represents the [Kendo UI Dialog component for Angular](https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog).
@@ -122,13 +121,6 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
122
121
  * @default true
123
122
  */
124
123
  animation: boolean | DialogAnimation;
125
- /**
126
- * Sets a predefined theme color for the Dialog. The color applies to the title bar background and border, and updates the text color.
127
- *
128
- * @type {DialogThemeColor}
129
- */
130
- set themeColor(themeColor: DialogThemeColor);
131
- get themeColor(): DialogThemeColor;
132
124
  /**
133
125
  * @hidden
134
126
  */
@@ -187,7 +179,6 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
187
179
  dialog: ElementRef;
188
180
  private _htmlAttributes;
189
181
  private _cssClass;
190
- private _themeColor;
191
182
  private _closable;
192
183
  private direction;
193
184
  private subscriptions;
@@ -243,7 +234,6 @@ export declare class DialogComponent implements AfterContentInit, AfterViewInit,
243
234
  get wrapperClass(): boolean;
244
235
  get styles(): any;
245
236
  private bubble;
246
- private handleThemeColorClass;
247
237
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
248
- static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "kendo-dialog", ["kendoDialog"], { "actions": { "alias": "actions"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; "autoFocusedElement": { "alias": "autoFocusedElement"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "themeColor": { "alias": "themeColor"; "required": false; }; }, { "action": "action"; "close": "close"; }, ["titlebarContent"], ["kendo-dialog-titlebar", "*", "kendo-dialog-actions"], true, never>;
238
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "kendo-dialog", ["kendoDialog"], { "actions": { "alias": "actions"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; "autoFocusedElement": { "alias": "autoFocusedElement"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; }, { "action": "action"; "close": "close"; }, ["titlebarContent"], ["kendo-dialog-titlebar", "*", "kendo-dialog-actions"], true, never>;
249
239
  }
@@ -7,7 +7,6 @@ import { ActionsLayout } from "./../../common/actions-layout";
7
7
  import { DialogAnimation } from "./dialog-animation";
8
8
  import { DialogRef } from "./dialog-ref";
9
9
  import { DialogResult } from "./dialog-result";
10
- import { DialogThemeColor } from "./theme-color";
11
10
  /**
12
11
  * Represents the settings for opening a Dialog through the `DialogService`.
13
12
  * ([See example.](https://www.telerik.com/kendo-angular-ui/components/dialogs/api/dialogservice#open))
@@ -104,8 +103,4 @@ export declare class DialogSettings {
104
103
  * Sets the query selector for the element to focus automatically with `autoFocusedElement`.
105
104
  */
106
105
  autoFocusedElement?: string;
107
- /**
108
- * Sets the theme color of the Dialog.
109
- */
110
- themeColor?: DialogThemeColor;
111
106
  }
@@ -8,5 +8,4 @@ export * from './dialog-ref';
8
8
  export * from './dialog-result';
9
9
  export * from './dialog-settings';
10
10
  export * from './dialog-animation';
11
- export * from './theme-color';
12
11
  export * from './dialog-action-divider';
@@ -16,8 +16,8 @@ import { xIcon, windowRestoreIcon, windowIcon, windowMinimizeIcon } from '@progr
16
16
  import { validatePackage } from '@progress/kendo-licensing';
17
17
  import { of, Subscription, Subject, merge } from 'rxjs';
18
18
  import * as i1$2 from '@progress/kendo-angular-common';
19
- import { setHTMLAttributes, getLicenseMessage, shouldShowValidationUI, isDocumentAvailable, normalizeKeys, Keys, focusableSelector, WatermarkOverlayComponent, DraggableDirective, isChanged } from '@progress/kendo-angular-common';
20
- import { offset, scrollPosition, positionWithScroll, getDocumentElement, getWindowViewPort } from '@progress/kendo-popup-common';
19
+ import { setHTMLAttributes, getLicenseMessage, shouldShowValidationUI, isDocumentAvailable, normalizeKeys, Keys, focusableSelector, WatermarkOverlayComponent, KENDO_WEBMCP_HOST, DraggableDirective, isChanged } from '@progress/kendo-angular-common';
20
+ import { offset, getWindowViewPort } from '@progress/kendo-popup-common';
21
21
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
22
22
 
23
23
  /**
@@ -124,7 +124,7 @@ class DialogActionsComponent {
124
124
  } @else {
125
125
  <ng-container [ngTemplateOutlet]="actionsTemplate"></ng-container>
126
126
  }
127
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
127
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
128
128
  }
129
129
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogActionsComponent, decorators: [{
130
130
  type: Component,
@@ -429,6 +429,7 @@ class DialogTitleBarComponent {
429
429
  [attr.title]="closeButtonTitle"
430
430
  [attr.aria-label]="closeButtonTitle"
431
431
  icon="close"
432
+ size="xsmall"
432
433
  [svgIcon]="xIcon"
433
434
  class="k-window-titlebar-action k-dialog-titlebar-action"
434
435
  (click)="onCloseClick($event)"
@@ -437,7 +438,7 @@ class DialogTitleBarComponent {
437
438
  </div>
438
439
  }
439
440
  </ng-container>
440
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoDialogLocalizedMessages],\n [kendoWindowLocalizedMessages],\n [kendoDialogTitleBarLocalizedMessages]\n " }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
441
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoDialogLocalizedMessages],\n [kendoWindowLocalizedMessages],\n [kendoDialogTitleBarLocalizedMessages]\n " }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
441
442
  }
442
443
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogTitleBarComponent, decorators: [{
443
444
  type: Component,
@@ -473,6 +474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
473
474
  [attr.title]="closeButtonTitle"
474
475
  [attr.aria-label]="closeButtonTitle"
475
476
  icon="close"
477
+ size="xsmall"
476
478
  [svgIcon]="xIcon"
477
479
  class="k-window-titlebar-action k-dialog-titlebar-action"
478
480
  (click)="onCloseClick($event)"
@@ -511,8 +513,8 @@ const packageMetadata = {
511
513
  productName: 'Kendo UI for Angular',
512
514
  productCode: 'KENDOUIANGULAR',
513
515
  productCodes: ['KENDOUIANGULAR'],
514
- publishDate: 1777365173,
515
- version: '24.0.0-develop.9',
516
+ publishDate: 1779368457,
517
+ version: '24.0.1-develop.1',
516
518
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
517
519
  };
518
520
 
@@ -901,18 +903,6 @@ class DialogComponent {
901
903
  * @default true
902
904
  */
903
905
  animation = true;
904
- /**
905
- * Sets a predefined theme color for the Dialog. The color applies to the title bar background and border, and updates the text color.
906
- *
907
- * @type {DialogThemeColor}
908
- */
909
- set themeColor(themeColor) {
910
- this.handleThemeColorClass(this.themeColor, themeColor);
911
- this._themeColor = themeColor;
912
- }
913
- get themeColor() {
914
- return this._themeColor;
915
- }
916
906
  /**
917
907
  * @hidden
918
908
  */
@@ -988,7 +978,6 @@ class DialogComponent {
988
978
  dialog;
989
979
  _htmlAttributes;
990
980
  _cssClass;
991
- _themeColor = undefined;
992
981
  _closable = true;
993
982
  direction;
994
983
  subscriptions = [];
@@ -1052,7 +1041,6 @@ class DialogComponent {
1052
1041
  }));
1053
1042
  }
1054
1043
  this.initDomEvents();
1055
- this.handleThemeColorClass(null, this.themeColor);
1056
1044
  }
1057
1045
  ngOnInit() {
1058
1046
  if (this.animation) {
@@ -1250,21 +1238,8 @@ class DialogComponent {
1250
1238
  this.subscriptions.push(s);
1251
1239
  }
1252
1240
  }
1253
- handleThemeColorClass(previousValue, currentValue) {
1254
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
1255
- const dialog = this.dialog.nativeElement;
1256
- if (previousValue) {
1257
- const classToRemove = `k-dialog-${previousValue}`;
1258
- this.renderer.removeClass(dialog, classToRemove);
1259
- }
1260
- if (currentValue) {
1261
- const classToAdd = `k-dialog-${currentValue}`;
1262
- this.renderer.addClass(dialog, classToAdd);
1263
- }
1264
- });
1265
- }
1266
1241
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Component });
1267
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DialogComponent, isStandalone: true, selector: "kendo-dialog", inputs: { actions: "actions", actionsLayout: "actionsLayout", autoFocusedElement: "autoFocusedElement", closable: "closable", 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: [
1242
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DialogComponent, isStandalone: true, selector: "kendo-dialog", inputs: { actions: "actions", actionsLayout: "actionsLayout", autoFocusedElement: "autoFocusedElement", closable: "closable", 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: [
1268
1243
  LocalizationService,
1269
1244
  {
1270
1245
  provide: DIALOG_LOCALIZATION_SERVICE,
@@ -1273,7 +1248,8 @@ class DialogComponent {
1273
1248
  {
1274
1249
  provide: L10N_PREFIX,
1275
1250
  useValue: 'kendo.dialog'
1276
- }
1251
+ },
1252
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => DialogComponent) }
1277
1253
  ], queries: [{ propertyName: "titlebarContent", predicate: DialogTitleBarComponent }], viewQueries: [{ propertyName: "actionsView", first: true, predicate: DialogActionsComponent, descendants: true }, { propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, static: true }, { propertyName: "titlebarView", predicate: DialogTitleBarComponent, descendants: true }], exportAs: ["kendoDialog"], ngImport: i0, template: `
1278
1254
  <ng-container
1279
1255
  kendoDialogLocalizedMessages
@@ -1337,7 +1313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1337
1313
  {
1338
1314
  provide: L10N_PREFIX,
1339
1315
  useValue: 'kendo.dialog'
1340
- }
1316
+ },
1317
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => DialogComponent) }
1341
1318
  ],
1342
1319
  selector: 'kendo-dialog',
1343
1320
  template: `
@@ -1405,8 +1382,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1405
1382
  type: Input
1406
1383
  }], animation: [{
1407
1384
  type: Input
1408
- }], themeColor: [{
1409
- type: Input
1410
1385
  }], action: [{
1411
1386
  type: Output
1412
1387
  }], close: [{
@@ -1669,10 +1644,6 @@ class DialogSettings {
1669
1644
  * Sets the query selector for the element to focus automatically with `autoFocusedElement`.
1670
1645
  */
1671
1646
  autoFocusedElement;
1672
- /**
1673
- * Sets the theme color of the Dialog.
1674
- */
1675
- themeColor;
1676
1647
  }
1677
1648
 
1678
1649
  // eslint-disable max-line-length
@@ -1820,7 +1791,6 @@ See https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog/service/.
1820
1791
  instance.minHeight = options.minHeight;
1821
1792
  instance.maxHeight = options.maxHeight;
1822
1793
  instance.autoFocusedElement = options.autoFocusedElement;
1823
- instance.themeColor = options.themeColor != undefined ? options.themeColor : null;
1824
1794
  instance.closeTitle = options.closeTitle;
1825
1795
  instance.closable = options.closable !== undefined ? options.closable : true;
1826
1796
  instance.cssClass = options.cssClass;
@@ -1936,13 +1906,9 @@ class DragResizeService {
1936
1906
  const state = this.options.state;
1937
1907
  const options = this.options;
1938
1908
  this.window = el;
1939
- if (state !== 'default') {
1909
+ if (state !== 'default' && !isPresent(this.restoreOptions)) {
1940
1910
  this.restoreOptions = Object.assign({}, options);
1941
1911
  }
1942
- if (state === 'minimized') {
1943
- options.height = 0;
1944
- options.minHeight = 0;
1945
- }
1946
1912
  if (state === 'maximized') {
1947
1913
  options.position = 'fixed';
1948
1914
  }
@@ -2090,7 +2056,7 @@ class DragResizeService {
2090
2056
  this.storeOptions();
2091
2057
  this.options = Object.assign({}, this.options, {
2092
2058
  height: null,
2093
- minHeight: 0,
2059
+ position: 'absolute',
2094
2060
  state: 'minimized'
2095
2061
  });
2096
2062
  this.stateChange.emit('minimized');
@@ -2099,18 +2065,19 @@ class DragResizeService {
2099
2065
  * Handles manual changes of the 'state' property.
2100
2066
  * Required to distinguish them from action clicks.
2101
2067
  */
2102
- applyManualState() {
2068
+ applyManualState(previousState) {
2103
2069
  const state = this.options.state;
2104
2070
  switch (state) {
2105
2071
  case 'default':
2106
- this.clearHeight();
2107
2072
  this.defaultState();
2108
2073
  break;
2109
2074
  case 'maximized':
2110
- this.clearHeight();
2111
2075
  this.maximizeState();
2112
2076
  break;
2113
2077
  case 'minimized':
2078
+ if (previousState) {
2079
+ this.options.state = previousState;
2080
+ }
2114
2081
  this.minimizeState();
2115
2082
  break;
2116
2083
  default:
@@ -2127,28 +2094,22 @@ class DragResizeService {
2127
2094
  this.change.emit({ width: windowOffset.width });
2128
2095
  }
2129
2096
  }
2130
- clearHeight() {
2131
- if (this.options.height === 0) {
2132
- delete this.options.height;
2133
- }
2134
- if (this.options.minHeight === 0) {
2135
- delete this.options.minHeight;
2136
- }
2137
- }
2138
2097
  center() {
2139
2098
  if (this.options.state === 'maximized') {
2140
2099
  return;
2141
2100
  }
2142
- const scroll = scrollPosition(this.window.nativeElement);
2143
2101
  const wnd = this.windowViewPort;
2144
2102
  const wrapper = offset(this.window.nativeElement);
2103
+ const el = this.window.nativeElement;
2145
2104
  const ev = {};
2146
2105
  if (!isPresent(this.options.left)) {
2147
- this.options.left = scroll.x + Math.max(0, (wnd.width - wrapper.width) / 2);
2106
+ const targetX = Math.max(0, (wnd.width - wrapper.width) / 2);
2107
+ this.options.left = el.offsetLeft + targetX - wrapper.left;
2148
2108
  ev.left = this.options.left;
2149
2109
  }
2150
2110
  if (!isPresent(this.options.top)) {
2151
- this.options.top = scroll.y + Math.max(0, (wnd.height - wrapper.height) / 2);
2111
+ const targetY = Math.max(0, (wnd.height - wrapper.height) / 2);
2112
+ this.options.top = el.offsetTop + targetY - wrapper.top;
2152
2113
  ev.top = this.options.top;
2153
2114
  }
2154
2115
  this.change.emit(ev);
@@ -2163,7 +2124,7 @@ class DragResizeService {
2163
2124
  }
2164
2125
  currentPosition() {
2165
2126
  const o = this.options;
2166
- if (!o.top || !o.left) {
2127
+ if (!isPresent(o.top) || !isPresent(o.left)) {
2167
2128
  this.setPosition();
2168
2129
  }
2169
2130
  return {
@@ -2172,9 +2133,8 @@ class DragResizeService {
2172
2133
  };
2173
2134
  }
2174
2135
  setPosition() {
2175
- const wrapper = positionWithScroll(this.window.nativeElement, getDocumentElement(this.window.nativeElement));
2176
- this.options.left = wrapper.left;
2177
- this.options.top = wrapper.top;
2136
+ this.options.left = this.window.nativeElement.offsetLeft;
2137
+ this.options.top = this.window.nativeElement.offsetTop;
2178
2138
  }
2179
2139
  setRestoreOption(style, value) {
2180
2140
  if (isPresent(this.restoreOptions)) {
@@ -2596,6 +2556,7 @@ class WindowCloseActionDirective extends Button {
2596
2556
  super(el, renderer, null, localization, ngZone);
2597
2557
  this.window = _service;
2598
2558
  this.fillMode = 'flat';
2559
+ this.size = 'xsmall';
2599
2560
  this.icon = 'x';
2600
2561
  }
2601
2562
  /**
@@ -2702,6 +2663,7 @@ class WindowRestoreActionDirective extends Button {
2702
2663
  super(el, renderer, null, localization, ngZone);
2703
2664
  this.window = _service;
2704
2665
  this.fillMode = 'flat';
2666
+ this.size = 'xsmall';
2705
2667
  this.icon = 'window-restore';
2706
2668
  }
2707
2669
  /**
@@ -2814,6 +2776,7 @@ class WindowMaximizeActionDirective extends Button {
2814
2776
  super(el, renderer, null, localization, ngZone);
2815
2777
  this.window = _service;
2816
2778
  this.fillMode = 'flat';
2779
+ this.size = 'xsmall';
2817
2780
  this.icon = 'window';
2818
2781
  }
2819
2782
  /**
@@ -2926,6 +2889,7 @@ class WindowMinimizeActionDirective extends Button {
2926
2889
  super(el, renderer, null, localization, ngZone);
2927
2890
  this.window = _service;
2928
2891
  this.fillMode = 'flat';
2892
+ this.size = 'xsmall';
2929
2893
  this.icon = 'window-minimize';
2930
2894
  }
2931
2895
  /**
@@ -3066,16 +3030,6 @@ class WindowComponent {
3066
3030
  get resizable() {
3067
3031
  return this.options.resizable;
3068
3032
  }
3069
- /**
3070
- * Sets the predefined theme color for the Window. The color applies to the title bar background and border, and updates the text color.
3071
- */
3072
- set themeColor(themeColor) {
3073
- this.handleThemeColorClass(this.themeColor, themeColor);
3074
- this._themeColor = themeColor;
3075
- }
3076
- get themeColor() {
3077
- return this._themeColor;
3078
- }
3079
3033
  /**
3080
3034
  * @hidden
3081
3035
  */
@@ -3275,13 +3229,13 @@ class WindowComponent {
3275
3229
  titleId = null;
3276
3230
  _htmlAttributes;
3277
3231
  _cssClass;
3278
- _themeColor = undefined;
3279
3232
  direction;
3280
3233
  draged = false;
3281
3234
  resized = false;
3282
3235
  windowSubscription = new Subscription();
3283
3236
  domSubs = new Subscription();
3284
3237
  localizationChangeSubscription;
3238
+ stateAppliedByAction = null;
3285
3239
  constructor(el, renderer, service, navigation, ngZone, localization) {
3286
3240
  this.el = el;
3287
3241
  this.renderer = renderer;
@@ -3312,7 +3266,6 @@ class WindowComponent {
3312
3266
  if (this.titleBarView || this.titleBarContent) {
3313
3267
  this.renderer.setAttribute(this.el.nativeElement, 'aria-labelledby', this.titleId);
3314
3268
  }
3315
- this.handleThemeColorClass(null, this.themeColor);
3316
3269
  }
3317
3270
  ngOnInit() {
3318
3271
  this.renderer.removeAttribute(this.el.nativeElement, 'title');
@@ -3334,11 +3287,10 @@ class WindowComponent {
3334
3287
  }
3335
3288
  }
3336
3289
  if (isChanged('state', changes)) {
3337
- if (isPresent(this.service.lastAction)) {
3338
- this.service.lastAction = null;
3339
- }
3340
- else {
3341
- this.service.applyManualState();
3290
+ const appliedByAction = this.stateAppliedByAction === changes['state'].currentValue;
3291
+ this.stateAppliedByAction = null;
3292
+ if (!appliedByAction) {
3293
+ this.service.applyManualState(changes['state'].previousValue);
3342
3294
  this.updateAllOffset();
3343
3295
  }
3344
3296
  }
@@ -3400,7 +3352,10 @@ class WindowComponent {
3400
3352
  return this.minWidth + 'px';
3401
3353
  }
3402
3354
  get styleMinHeight() {
3403
- return this.minHeight + 'px';
3355
+ if (this.state === 'minimized') {
3356
+ return null;
3357
+ }
3358
+ return isPresent(this.minHeight) ? this.minHeight + 'px' : null;
3404
3359
  }
3405
3360
  get stylePosition() {
3406
3361
  return this.options.position;
@@ -3429,7 +3384,7 @@ class WindowComponent {
3429
3384
  return;
3430
3385
  }
3431
3386
  this.windowSubscription.add(this.service.focus.subscribe(() => {
3432
- this.el.nativeElement.focus();
3387
+ this.el.nativeElement.focus({ preventScroll: true });
3433
3388
  }));
3434
3389
  this.windowSubscription.add(this.service.dragStart.subscribe(() => {
3435
3390
  this.draged = true;
@@ -3480,6 +3435,8 @@ class WindowComponent {
3480
3435
  this.windowSubscription.add(this.service.stateChange.subscribe((state) => {
3481
3436
  if (isPresent(this.service.lastAction)) {
3482
3437
  this.updateAllOffset();
3438
+ this.service.lastAction = null;
3439
+ this.stateAppliedByAction = state;
3483
3440
  this.stateChange.emit(state);
3484
3441
  }
3485
3442
  }));
@@ -3577,26 +3534,16 @@ class WindowComponent {
3577
3534
  generateTitleId() {
3578
3535
  return 'kendo-window-title-' + Math.ceil(Math.random() * 1000000).toString();
3579
3536
  }
3580
- handleThemeColorClass(previousValue, currentValue) {
3581
- const wrapper = this.el.nativeElement;
3582
- if (previousValue) {
3583
- const classToRemove = `k-window-${previousValue}`;
3584
- this.renderer.removeClass(wrapper, classToRemove);
3585
- }
3586
- if (currentValue) {
3587
- const classToAdd = `k-window-${currentValue}`;
3588
- this.renderer.addClass(wrapper, classToAdd);
3589
- }
3590
- }
3591
3537
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WindowComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DragResizeService }, { token: NavigationService }, { token: i0.NgZone }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3592
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WindowComponent, isStandalone: true, 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: [
3538
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: WindowComponent, isStandalone: true, 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.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: [
3593
3539
  DragResizeService,
3594
3540
  NavigationService,
3595
3541
  LocalizationService,
3596
3542
  {
3597
3543
  provide: L10N_PREFIX,
3598
3544
  useValue: 'kendo.window'
3599
- }
3545
+ },
3546
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => WindowComponent) }
3600
3547
  ], queries: [{ propertyName: "titleBarContent", first: true, predicate: WindowTitleBarComponent, descendants: true }], viewQueries: [{ propertyName: "titleBarView", first: true, predicate: WindowTitleBarComponent, descendants: true }, { propertyName: "resizeHandles", predicate: ResizeHandleDirective, descendants: true }], exportAs: ["kendoWindow"], usesOnChanges: true, ngImport: i0, template: `
3601
3548
  <ng-container kendoWindowLocalizedMessages
3602
3549
  i18n-closeTitle="kendo.window.closeTitle|The title of the close button"
@@ -3668,7 +3615,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3668
3615
  {
3669
3616
  provide: L10N_PREFIX,
3670
3617
  useValue: 'kendo.window'
3671
- }
3618
+ },
3619
+ { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => WindowComponent) }
3672
3620
  ],
3673
3621
  selector: 'kendo-window',
3674
3622
  template: `
@@ -3741,8 +3689,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3741
3689
  type: Input
3742
3690
  }], resizable: [{
3743
3691
  type: Input
3744
- }], themeColor: [{
3745
- type: Input
3746
3692
  }], keepContent: [{
3747
3693
  type: Input
3748
3694
  }], state: [{
@@ -3938,10 +3884,6 @@ class WindowSettings {
3938
3884
  * Sets the query selector for the element to focus automatically.
3939
3885
  */
3940
3886
  autoFocusedElement;
3941
- /**
3942
- * Sets the theme color of the Window.
3943
- */
3944
- themeColor;
3945
3887
  }
3946
3888
 
3947
3889
  /**
@@ -4113,9 +4055,6 @@ class WindowService {
4113
4055
  instance.keepContent = true;
4114
4056
  }
4115
4057
  }
4116
- if (isPresent(options.themeColor)) {
4117
- instance.themeColor = options.themeColor;
4118
- }
4119
4058
  if (options.content instanceof TemplateRef) {
4120
4059
  instance.contentTemplate = options.content;
4121
4060
  }
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, DialogThemeColor, DialogActionDivider } from './dialog/models/';
11
+ export { DialogCloseResult, DialogRef, DialogSettings, DialogAction, DialogResult, DialogAnimation, DialogActionDivider } 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, WindowThemeColor } from './window/models';
21
+ export { WindowState, WindowSettings, WindowDimensionSetting, WindowRef, WindowCloseResult } from './window/models';
22
22
  export { WindowService } from './window/window.service';
23
23
  export { WindowContainerService } from './window/window-container.service';
24
24
  export { DragResizeService } from './window/drag-resize.service';
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1777365173,
11
- "version": "24.0.0-develop.9",
10
+ "publishDate": 1779368457,
11
+ "version": "24.0.1-develop.1",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };