@progress/kendo-angular-layout 24.0.0-develop.8 → 24.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.
@@ -4,5 +4,11 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
6
  * Defines the possible theme colors of the Avatar ([see example](https://www.telerik.com/kendo-angular-ui/components/layout/avatar/appearance#theme-color)).
7
+ *
8
+ * The possible values are:
9
+ * * `base`—Applies base coloring value.
10
+ * * `primary`—Applies primary coloring value.
11
+ * * `secondary`—Applies secondary coloring value.
12
+ * * `tertiary`—Applies tertiary coloring value.
7
13
  */
8
- export type AvatarThemeColor = 'primary' | 'secondary' | 'tertiary' | 'base' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
14
+ export type AvatarThemeColor = 'primary' | 'secondary' | 'tertiary' | 'base';
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
7
+ exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeConditionalRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
8
8
  exports.hasKendoInTemplate = hasKendoInTemplate;
9
9
  exports.isImportedFromPackage = isImportedFromPackage;
10
10
  exports.tsPropertyRemoval = tsPropertyRemoval;
@@ -345,6 +345,34 @@ const attributeRemoval = (templateContent, tagName, attributeName, propertyToRem
345
345
  });
346
346
  };
347
347
  exports.attributeRemoval = attributeRemoval;
348
+ /**
349
+ * Removes an attribute from a tag only when its value matches one of the specified values.
350
+ * Handles both static (`attr="value"`) and bound (`[attr]="'value'"`) forms.
351
+ *
352
+ * @param templateContent - The template string content to transform
353
+ * @param tagName - The HTML tag name to target (e.g., 'kendo-button')
354
+ * @param attributeName - The attribute name to conditionally remove
355
+ * @param values - The attribute values that trigger removal
356
+ * @returns The transformed template content
357
+ */
358
+ const attributeConditionalRemoval = (templateContent, tagName, attributeName, values) => {
359
+ const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
360
+ const escapedTag = escapeRegex(tagName);
361
+ const escapedAttr = escapeRegex(attributeName);
362
+ // Remove bound attributes [attribute]="value"
363
+ const boundAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+\\[${escapedAttr}\\]\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
364
+ // Remove static attributes attribute="value"
365
+ const staticAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+${escapedAttr}\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
366
+ // Strip outer and inner quotes to extract the raw value for comparison
367
+ const matchesValue = (raw) => {
368
+ const inner = raw.replace(/^["']|["']$/g, '').replace(/^['"]|['"]$/g, '');
369
+ return values.includes(inner);
370
+ };
371
+ let result = templateContent.replace(boundAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
372
+ result = result.replace(staticAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
373
+ return result;
374
+ };
375
+ exports.attributeConditionalRemoval = attributeConditionalRemoval;
348
376
  function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propertyName) {
349
377
  if (source.includes(typeName)) {
350
378
  if (!isImportedFromPackage(rootSource, j, packageName, typeName)) {
@@ -441,8 +469,31 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
441
469
  }
442
470
  }
443
471
  });
444
- // Handle return statements with object literals
472
+ // Handle return statements with object literals, but only when the enclosing
473
+ // function's declared return type matches typeName. This prevents removing
474
+ // unrelated propertyName keys from object literals returned in other functions.
475
+ const enclosingFunctionReturnsType = (nodePath) => {
476
+ let current = nodePath.parent;
477
+ while (current) {
478
+ const node = current.node;
479
+ if (node.type === 'FunctionDeclaration' ||
480
+ node.type === 'FunctionExpression' ||
481
+ node.type === 'ArrowFunctionExpression' ||
482
+ node.type === 'ClassMethod' ||
483
+ node.type === 'ObjectMethod') {
484
+ return !!(node.returnType &&
485
+ node.returnType.typeAnnotation?.type === 'TSTypeReference' &&
486
+ node.returnType.typeAnnotation.typeName?.type === 'Identifier' &&
487
+ node.returnType.typeAnnotation.typeName.name === typeName);
488
+ }
489
+ current = current.parent;
490
+ }
491
+ return false;
492
+ };
445
493
  rootSource.find(j.ReturnStatement).forEach((path) => {
494
+ if (!enclosingFunctionReturnsType(path)) {
495
+ return;
496
+ }
446
497
  if (path.node.argument && path.node.argument.type === 'ObjectExpression') {
447
498
  const properties = path.node.argument.properties;
448
499
  const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
@@ -491,22 +542,6 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
491
542
  statement.remove();
492
543
  }
493
544
  });
494
- // Handle nested member expressions like chatConfig.chat.modelFields.pinnedByField
495
- rootSource
496
- .find(j.AssignmentExpression, {
497
- left: {
498
- type: 'MemberExpression',
499
- object: {
500
- type: 'MemberExpression',
501
- },
502
- property: {
503
- name: propertyName,
504
- },
505
- },
506
- })
507
- .forEach((path) => {
508
- j(path).closest(j.ExpressionStatement).remove();
509
- });
510
545
  return rootSource;
511
546
  }
512
547
  }
@@ -0,0 +1,50 @@
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.aiInstructions = void 0;
8
+ exports.default = default_1;
9
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
10
+ // Detects on `mini`, not `miniWidth`, because the default removal only matters
11
+ // when mini mode is active. Without `[mini]`, `miniWidth` has no visible effect.
12
+ const drawerMiniPattern = /<kendo-drawer[^>]*\bmini\b(?!Width)/;
13
+ function default_1(fileInfo, api) {
14
+ const filePath = fileInfo.path;
15
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
16
+ return fileInfo.source;
17
+ }
18
+ if (filePath.endsWith('.html')) {
19
+ if (drawerMiniPattern.test(fileInfo.source)) {
20
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructions, __filename, fileInfo.path);
21
+ }
22
+ return fileInfo.source;
23
+ }
24
+ let patternDetected = false;
25
+ (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => {
26
+ if (drawerMiniPattern.test(templateContent)) {
27
+ patternDetected = true;
28
+ }
29
+ return templateContent;
30
+ });
31
+ const j = api.jscodeshift;
32
+ const rootSource = j(fileInfo.source);
33
+ const hasDrawerImport = (0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-layout', 'DrawerComponent');
34
+ if (patternDetected || hasDrawerImport) {
35
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructions, __filename, fileInfo.path);
36
+ }
37
+ return fileInfo.source;
38
+ }
39
+ exports.aiInstructions = `The DrawerComponent's 'miniWidth' property no longer defaults to 50.
40
+ The mini view width is now determined by the used Kendo Theme.
41
+
42
+ If you relied on the default value of 50 and want to preserve the old behavior, explicitly set 'miniWidth':
43
+
44
+ Before (implicit width of 50 when mini is enabled):
45
+ <kendo-drawer [mini]="true" ...></kendo-drawer>
46
+
47
+ After (explicit width to preserve old behavior):
48
+ <kendo-drawer [mini]="true" [miniWidth]="50" ...></kendo-drawer>
49
+
50
+ Alternatively, remove any explicit miniWidth binding to let the active Kendo Theme control the mini view width.`;
@@ -0,0 +1,46 @@
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.aiInstructions = exports.aiInstructionsChipAvatar = exports.aiInstructionsChipListSelection = exports.aiInstructionsTimelineButton = exports.aiInstructionsHbox = void 0;
8
+ exports.default = default_1;
9
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
10
+ exports.aiInstructionsHbox = `k-hbox — no longer applied in the ActionSheet.
11
+ Remove any CSS rules or test assertions targeting .k-hbox in ActionSheet context.`;
12
+ exports.aiInstructionsTimelineButton = `Timeline collapse/expand button — now rendered as <button> elements instead of <a> elements.
13
+ Update any CSS selectors or test assertions targeting a.k-button or anchor elements for Timeline collapse/expand buttons to use button elements instead.`;
14
+ exports.aiInstructionsChipListSelection = `k-selection-single and k-selection-multiple — no longer applied in the ChipList.
15
+ Remove any CSS rules or test assertions targeting .k-selection-single or .k-selection-multiple on ChipList elements.`;
16
+ exports.aiInstructionsChipAvatar = `k-avatar-sm, k-avatar-solid, k-avatar-solid-primary, k-rounded-full — no longer applied for the avatar of the Chip component.
17
+ Remove any CSS rules or test assertions targeting these classes in the Chip avatar context.`;
18
+ exports.aiInstructions = `Review your stylesheets, test files, and any code that references these Layout classes:
19
+
20
+ ${exports.aiInstructionsHbox}
21
+
22
+ ${exports.aiInstructionsTimelineButton}
23
+
24
+ ${exports.aiInstructionsChipListSelection}
25
+
26
+ ${exports.aiInstructionsChipAvatar}`;
27
+ const patternHbox = (0, codemods_1.makePattern)(['k-hbox']);
28
+ const patternSelectionSingle = (0, codemods_1.makePattern)(['k-selection-single']);
29
+ const patternSelectionMultiple = (0, codemods_1.makePattern)(['k-selection-multiple']);
30
+ const patternAvatarSm = (0, codemods_1.makePattern)(['k-avatar-sm']);
31
+ const patternAvatarSolid = (0, codemods_1.makePattern)(['k-avatar-solid']);
32
+ const patternRoundedFull = (0, codemods_1.makePattern)(['k-rounded-full']);
33
+ function default_1(fileInfo) {
34
+ if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
35
+ if (patternHbox.test(fileInfo.source)) {
36
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsHbox, __filename, fileInfo.path);
37
+ }
38
+ if (patternSelectionSingle.test(fileInfo.source) || patternSelectionMultiple.test(fileInfo.source)) {
39
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsChipListSelection, __filename, fileInfo.path);
40
+ }
41
+ if (patternAvatarSm.test(fileInfo.source) || patternAvatarSolid.test(fileInfo.source) || patternRoundedFull.test(fileInfo.source)) {
42
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsChipAvatar, __filename, fileInfo.path);
43
+ }
44
+ }
45
+ return fileInfo.source;
46
+ }
@@ -0,0 +1,50 @@
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.aiInstructions = void 0;
8
+ exports.default = default_1;
9
+ const tslib_1 = require("tslib");
10
+ const fs = tslib_1.__importStar(require("fs"));
11
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
12
+ exports.aiInstructions = `AvatarThemeColor no longer accepts 'light', 'dark', 'success', 'warning', 'error', 'info', 'inverse'.
13
+ Replace any use of the unsupported values with a supported value: 'base', 'primary', 'secondary', 'tertiary'.
14
+
15
+ Static template bindings were removed automatically, which means the component now uses its default themeColor.
16
+ If you want to explicitly set a new value, re-add the attribute with a supported one:
17
+ Before: (removed by codemod — no themeColor attribute)
18
+ After: themeColor="base"
19
+
20
+ The following patterns could not be migrated automatically and require an additional update:
21
+
22
+ Dynamic binding:
23
+ Before: [themeColor]="color" (where color may be 'light' or 'dark')
24
+ After: [themeColor]="color" (ensure color is a supported value)
25
+
26
+ Conditional expression — replace both branch values:
27
+ Before: [themeColor]="isDark ? 'dark' : 'light'"
28
+ After: [themeColor]="isDark ? 'tertiary' : 'base'"
29
+
30
+ TypeScript assignment — update the assigned value:
31
+ Before: this.avatar.themeColor = 'light';
32
+ After: this.avatar.themeColor = 'base';`;
33
+ const REMOVED_VALUES = ['light', 'dark', 'success', 'warning', 'error', 'info', 'inverse'];
34
+ function default_1(fileInfo, api) {
35
+ const filePath = fileInfo.path;
36
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
37
+ return fileInfo.source;
38
+ }
39
+ const htmlResult = (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => {
40
+ return (0, codemods_1.attributeConditionalRemoval)(templateContent, 'kendo-avatar', 'themeColor', REMOVED_VALUES);
41
+ });
42
+ if (filePath.endsWith('.html')) {
43
+ if (htmlResult && htmlResult !== fileInfo.source) {
44
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
45
+ return htmlResult;
46
+ }
47
+ return fileInfo.source;
48
+ }
49
+ return htmlResult || fileInfo.source;
50
+ }
@@ -2,13 +2,12 @@
2
2
  * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ElementRef, EventEmitter, OnDestroy, SimpleChange } from '@angular/core';
5
+ import { EventEmitter, OnDestroy, SimpleChange } from '@angular/core';
6
6
  import { LicenseMessage } from '@progress/kendo-licensing';
7
7
  import { DrawerMode, DrawerPosition, DrawerAnimation } from './types';
8
8
  import { DrawerTemplateDirective, DrawerItemTemplateDirective, DrawerHeaderTemplateDirective, DrawerFooterTemplateDirective } from './template-directives';
9
9
  import { DrawerService } from './drawer.service';
10
10
  import { DrawerSelectEvent } from './events/select-event';
11
- import { AnimationBuilder } from '@angular/animations';
12
11
  import { LocalizationService } from '@progress/kendo-angular-l10n';
13
12
  import { DrawerListSelectEvent } from './events/drawer-list-select.event';
14
13
  import { DrawerViewItem } from './models/drawer-view-item.interface';
@@ -45,16 +44,11 @@ import * as i0 from "@angular/core";
45
44
  * ```
46
45
  */
47
46
  export declare class DrawerComponent implements OnDestroy {
48
- private element;
49
- private builder;
50
47
  private localizationService;
51
48
  private drawerService;
52
49
  hostClasses: boolean;
53
50
  get startPositionClass(): boolean;
54
51
  get endPositionClass(): boolean;
55
- get overlayMarginLeft(): string;
56
- get overlayMarginRight(): string;
57
- get flexStyles(): number;
58
52
  /**
59
53
  * Specifies the mode in which the Drawer displays.
60
54
  *
@@ -89,8 +83,7 @@ export declare class DrawerComponent implements OnDestroy {
89
83
  width: number;
90
84
  /**
91
85
  * Defines the width of the Drawer when the mini view is enabled and the component is collapsed.
92
- *
93
- * @default 50
86
+ * By default, the mini view width is determined by the used Kendo Theme.
94
87
  */
95
88
  miniWidth: number;
96
89
  /**
@@ -165,12 +158,17 @@ export declare class DrawerComponent implements OnDestroy {
165
158
  */
166
159
  licenseMessage?: LicenseMessage;
167
160
  viewItems: DrawerViewItem[];
168
- private animationEnd;
161
+ private pendingToggle;
162
+ private animatingViaToggle;
169
163
  private dynamicRTLSubscription;
170
164
  private rtl;
171
- constructor(element: ElementRef, builder: AnimationBuilder, localizationService: LocalizationService, drawerService: DrawerService);
165
+ constructor(localizationService: LocalizationService, drawerService: DrawerService);
172
166
  ngOnChanges(changes: SimpleChange): void;
173
167
  ngOnDestroy(): void;
168
+ /**
169
+ * @hidden
170
+ */
171
+ get listExpanded(): boolean;
174
172
  /**
175
173
  * @hidden
176
174
  */
@@ -179,6 +177,12 @@ export declare class DrawerComponent implements OnDestroy {
179
177
  * @hidden
180
178
  */
181
179
  get drawerWidth(): number;
180
+ /**
181
+ * @hidden
182
+ */
183
+ get drawerWrapperStyle(): {
184
+ [key: string]: string;
185
+ };
182
186
  /**
183
187
  * Toggles the visibility of the Drawer.
184
188
  * If the `expanded` parameter is not provided, the Drawer will toggle between expanded and collapsed states.
@@ -190,11 +194,11 @@ export declare class DrawerComponent implements OnDestroy {
190
194
  * @hidden
191
195
  */
192
196
  onSelect(e: DrawerListSelectEvent): void;
193
- private onAnimationEnd;
197
+ /**
198
+ * @hidden
199
+ */
200
+ onTransitionEnd(event: TransitionEvent): void;
194
201
  private setExpanded;
195
- private shouldApplyOverlayMargin;
196
- private animate;
197
- private createPlayer;
198
202
  static ɵfac: i0.ɵɵFactoryDeclaration<DrawerComponent, never>;
199
203
  static ɵcmp: i0.ɵɵComponentDeclaration<DrawerComponent, "kendo-drawer", ["kendoDrawer"], { "mode": { "alias": "mode"; "required": false; }; "position": { "alias": "position"; "required": false; }; "mini": { "alias": "mini"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "width": { "alias": "width"; "required": false; }; "miniWidth": { "alias": "miniWidth"; "required": false; }; "autoCollapse": { "alias": "autoCollapse"; "required": false; }; "items": { "alias": "items"; "required": false; }; "isItemExpanded": { "alias": "isItemExpanded"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; }, { "expand": "expand"; "collapse": "collapse"; "select": "select"; "expandedChange": "expandedChange"; }, ["drawerTemplate", "footerTemplate", "headerTemplate", "itemTemplate"], never, true, never>;
200
204
  }
@@ -111,6 +111,7 @@ export declare class ExpansionPanelComponent implements OnInit, AfterViewInit, O
111
111
  header: ElementRef;
112
112
  hostClass: boolean;
113
113
  get expandedClass(): boolean;
114
+ get disabledClass(): boolean;
114
115
  direction: string;
115
116
  /**
116
117
  * @hidden