@progress/kendo-angular-buttons 24.0.0-develop.37 → 24.0.0-develop.39

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,32 @@
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.aiInstructionsGroupReset = exports.aiInstructionsToggleButton = void 0;
8
+ exports.default = default_1;
9
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
10
+ exports.aiInstructionsToggleButton = `k-toggle-button — no longer applied in the Button component.
11
+ Remove any CSS rules or test assertions targeting .k-toggle-button on Button elements.`;
12
+ exports.aiInstructionsGroupReset = `k-group and k-reset — no longer applied for the popups of DropDownButton and SplitButton.
13
+ Remove any CSS rules or test assertions targeting .k-group or .k-reset in DropDownButton/SplitButton popup context.`;
14
+ exports.aiInstructions = `Review your stylesheets, test files, and any code that references these Button classes:
15
+
16
+ ${exports.aiInstructionsToggleButton}
17
+
18
+ ${exports.aiInstructionsGroupReset}`;
19
+ const patternToggleButton = (0, codemods_1.makePattern)(['k-toggle-button']);
20
+ const patternGroup = (0, codemods_1.makePattern)(['k-group']);
21
+ const patternReset = (0, codemods_1.makePattern)(['k-reset']);
22
+ function default_1(fileInfo) {
23
+ if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
24
+ if (patternToggleButton.test(fileInfo.source)) {
25
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsToggleButton, __filename, fileInfo.path);
26
+ }
27
+ if (patternGroup.test(fileInfo.source) || patternReset.test(fileInfo.source)) {
28
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsGroupReset, __filename, fileInfo.path);
29
+ }
30
+ }
31
+ return fileInfo.source;
32
+ }
@@ -0,0 +1,26 @@
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
+ const COMPETING_COMPONENTS = ['ButtonComponent', 'FloatingActionButtonComponent', 'SplitButtonComponent'];
10
+ function default_1(fileInfo, api) {
11
+ if (!(0, codemods_1.isApiChangeTarget)(fileInfo.path)) {
12
+ return fileInfo.source;
13
+ }
14
+ const j = api.jscodeshift;
15
+ const rootSource = j(fileInfo.source);
16
+ if (!(0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', 'DropDownButtonComponent')) {
17
+ return rootSource.toSource();
18
+ }
19
+ const hasAmbiguousUsage = COMPETING_COMPONENTS.some(comp => (0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', comp));
20
+ if (hasAmbiguousUsage) {
21
+ (0, codemods_1.writeInstructionMarker)('ButtonSize is used by multiple button components. Manually rename DropDownButton-related usages to DropDownButtonSize.', __filename, fileInfo.path);
22
+ return rootSource.toSource();
23
+ }
24
+ (0, codemods_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-buttons', 'ButtonSize', 'DropDownButtonSize');
25
+ return rootSource.toSource();
26
+ }
@@ -0,0 +1,26 @@
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
+ const COMPETING_COMPONENTS = ['ButtonComponent', 'DropDownButtonComponent', 'SplitButtonComponent'];
10
+ function default_1(fileInfo, api) {
11
+ if (!(0, codemods_1.isApiChangeTarget)(fileInfo.path)) {
12
+ return fileInfo.source;
13
+ }
14
+ const j = api.jscodeshift;
15
+ const rootSource = j(fileInfo.source);
16
+ if (!(0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', 'FloatingActionButtonComponent')) {
17
+ return rootSource.toSource();
18
+ }
19
+ const hasAmbiguousUsage = COMPETING_COMPONENTS.some(comp => (0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', comp));
20
+ if (hasAmbiguousUsage) {
21
+ (0, codemods_1.writeInstructionMarker)('ButtonSize is used by multiple button components. Manually rename FAB-related usages to FloatingActionButtonSize.', __filename, fileInfo.path);
22
+ return rootSource.toSource();
23
+ }
24
+ (0, codemods_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-buttons', 'ButtonSize', 'FloatingActionButtonSize');
25
+ return rootSource.toSource();
26
+ }
@@ -0,0 +1,26 @@
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
+ const COMPETING_COMPONENTS = ['ButtonComponent'];
10
+ function default_1(fileInfo, api) {
11
+ if (!(0, codemods_1.isApiChangeTarget)(fileInfo.path)) {
12
+ return fileInfo.source;
13
+ }
14
+ const j = api.jscodeshift;
15
+ const rootSource = j(fileInfo.source);
16
+ if (!(0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', 'FloatingActionButtonComponent')) {
17
+ return rootSource.toSource();
18
+ }
19
+ const hasAmbiguousUsage = COMPETING_COMPONENTS.some(comp => (0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', comp));
20
+ if (hasAmbiguousUsage) {
21
+ (0, codemods_1.writeInstructionMarker)('ButtonThemeColor is used by multiple button components. Manually rename FAB-related usages to FloatingActionButtonThemeColor.', __filename, fileInfo.path);
22
+ return rootSource.toSource();
23
+ }
24
+ (0, codemods_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-buttons', 'ButtonThemeColor', 'FloatingActionButtonThemeColor');
25
+ return rootSource.toSource();
26
+ }
@@ -0,0 +1,26 @@
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
+ const COMPETING_COMPONENTS = ['ButtonComponent', 'FloatingActionButtonComponent', 'DropDownButtonComponent'];
10
+ function default_1(fileInfo, api) {
11
+ if (!(0, codemods_1.isApiChangeTarget)(fileInfo.path)) {
12
+ return fileInfo.source;
13
+ }
14
+ const j = api.jscodeshift;
15
+ const rootSource = j(fileInfo.source);
16
+ if (!(0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', 'SplitButtonComponent')) {
17
+ return rootSource.toSource();
18
+ }
19
+ const hasAmbiguousUsage = COMPETING_COMPONENTS.some(comp => (0, codemods_1.isImportedFromPackage)(rootSource, j, '@progress/kendo-angular-buttons', comp));
20
+ if (hasAmbiguousUsage) {
21
+ (0, codemods_1.writeInstructionMarker)('ButtonSize is used by multiple button components. Manually rename SplitButton-related usages to SplitButtonSize.', __filename, fileInfo.path);
22
+ return rootSource.toSource();
23
+ }
24
+ (0, codemods_1.tsInterfaceTransformer)(fileInfo, rootSource, j, '@progress/kendo-angular-buttons', 'ButtonSize', 'SplitButtonSize');
25
+ return rootSource.toSource();
26
+ }
@@ -0,0 +1,53 @@
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 = `The 'light' and 'dark' values have been removed from ButtonThemeColor.
13
+ Replace them with a supported value: 'base', 'primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error', or 'inverse'.
14
+
15
+ Static usages (themeColor="light", [themeColor]="'dark'") 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
+ Furthermore, 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 values:
27
+ Before: [themeColor]="isDark ? 'dark' : 'light'"
28
+ After: [themeColor]="isDark ? 'inverse' : 'base'"
29
+
30
+ TypeScript assignment — update the assigned value:
31
+ Before: this.button.themeColor = 'light';
32
+ After: this.button.themeColor = 'base';
33
+ `;
34
+ const REMOVED_VALUES = ['light', 'dark'];
35
+ function default_1(fileInfo, api) {
36
+ const filePath = fileInfo.path;
37
+ if (!(0, codemods_1.isApiChangeTarget)(filePath)) {
38
+ return fileInfo.source;
39
+ }
40
+ const htmlResult = (0, codemods_1.htmlTransformer)(fileInfo, api, (templateContent) => {
41
+ let result = (0, codemods_1.attributeConditionalRemoval)(templateContent, 'kendo-button', 'themeColor', REMOVED_VALUES);
42
+ result = (0, codemods_1.attributeConditionalRemoval)(result, 'kendo-floatingactionbutton', 'themeColor', REMOVED_VALUES);
43
+ return result;
44
+ });
45
+ if (filePath.endsWith('.html')) {
46
+ if (htmlResult && htmlResult !== fileInfo.source) {
47
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
48
+ return htmlResult;
49
+ }
50
+ return fileInfo.source;
51
+ }
52
+ return htmlResult || fileInfo.source;
53
+ }