@progress/kendo-angular-toolbar 23.4.0-develop.2 → 23.4.0-develop.3
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.
package/codemods/utils.js
CHANGED
|
@@ -3,11 +3,40 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
"use strict";
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
30
|
exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
|
|
8
31
|
exports.hasKendoInTemplate = hasKendoInTemplate;
|
|
9
32
|
exports.isImportedFromPackage = isImportedFromPackage;
|
|
10
33
|
exports.tsPropertyRemoval = tsPropertyRemoval;
|
|
34
|
+
exports.makePattern = makePattern;
|
|
35
|
+
exports.writeInstructionMarker = writeInstructionMarker;
|
|
36
|
+
exports.isApiChangeTarget = isApiChangeTarget;
|
|
37
|
+
exports.isRenderingChangeTarget = isRenderingChangeTarget;
|
|
38
|
+
const fs = __importStar(require("node:fs"));
|
|
39
|
+
const path = __importStar(require("node:path"));
|
|
11
40
|
exports.blockTextElements = {
|
|
12
41
|
script: true,
|
|
13
42
|
noscript: true,
|
|
@@ -575,7 +604,7 @@ const tsComponentPropertyRemoval = (source, root, j, packageName, componentType,
|
|
|
575
604
|
localVariables.add(path.node.id.name);
|
|
576
605
|
}
|
|
577
606
|
});
|
|
578
|
-
// Find array variables of type componentType[]
|
|
607
|
+
// Find array variables of type componentType[]
|
|
579
608
|
// This handles cases like: const arr: ChatComponent[] = [...]; arr[0].property = value;
|
|
580
609
|
const arrayVariables = new Set();
|
|
581
610
|
root.find(j.VariableDeclarator).forEach((path) => {
|
|
@@ -1366,3 +1395,36 @@ function isComponentTypeMatch(root, j, node, componentType) {
|
|
|
1366
1395
|
}
|
|
1367
1396
|
return false;
|
|
1368
1397
|
}
|
|
1398
|
+
// Matches CSS class names in CSS selectors (.foo) and as whitespace/quote-delimited
|
|
1399
|
+
// tokens within attribute values, covering both single-class ("foo") and multi-class ("foo bar") cases.
|
|
1400
|
+
function makePattern(classes) {
|
|
1401
|
+
return new RegExp(classes.map(c => String.raw `\.${c}\b|(?<=["'\s])${c}(?=["'\s])`).join('|'));
|
|
1402
|
+
}
|
|
1403
|
+
function writeInstructionMarker(instruction, codemodFilename, affectedFile) {
|
|
1404
|
+
// Write to node_modules/.kendo/migration/<basename(codemodFilename)>
|
|
1405
|
+
// kendo-cli reads the marker by looking up basename(codemod.file) in that directory
|
|
1406
|
+
const markerDir = path.join(process.cwd(), 'node_modules', '.kendo', 'migration');
|
|
1407
|
+
const markerPath = path.join(markerDir, path.basename(codemodFilename));
|
|
1408
|
+
try {
|
|
1409
|
+
fs.mkdirSync(markerDir, { recursive: true });
|
|
1410
|
+
const existing = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, 'utf8') : '';
|
|
1411
|
+
let content = existing;
|
|
1412
|
+
if (!existing.includes(instruction)) {
|
|
1413
|
+
content += instruction + '\n';
|
|
1414
|
+
}
|
|
1415
|
+
const fileLine = ` - ${path.relative(process.cwd(), affectedFile)}`;
|
|
1416
|
+
if (!content.includes(fileLine)) {
|
|
1417
|
+
content += fileLine + '\n';
|
|
1418
|
+
}
|
|
1419
|
+
fs.writeFileSync(markerPath, content);
|
|
1420
|
+
}
|
|
1421
|
+
catch { /* suppress error */ }
|
|
1422
|
+
}
|
|
1423
|
+
function isApiChangeTarget(filePath) {
|
|
1424
|
+
const ext = path.extname(filePath);
|
|
1425
|
+
return ext === '.ts' || ext === '.html';
|
|
1426
|
+
}
|
|
1427
|
+
function isRenderingChangeTarget(filePath) {
|
|
1428
|
+
const ext = path.extname(filePath);
|
|
1429
|
+
return ext === '.ts' || ext === '.html' || ext === '.css' || ext === '.scss' || ext === '.sass' || ext === '.less';
|
|
1430
|
+
}
|
|
@@ -27,6 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.aiInstructions = void 0;
|
|
30
31
|
exports.default = default_1;
|
|
31
32
|
const utils_1 = require("../utils");
|
|
32
33
|
const fs = __importStar(require("fs"));
|
|
@@ -52,3 +53,16 @@ function default_1(fileInfo, api) {
|
|
|
52
53
|
(0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'both', 'always');
|
|
53
54
|
return rootSource.toSource({ quote: 'single' });
|
|
54
55
|
}
|
|
56
|
+
exports.aiInstructions = `The 'showIcon' property on 'kendo-toolbar-button' has changed accepted values: 'overflow' is now 'menu', and 'both' is now 'always'.
|
|
57
|
+
|
|
58
|
+
The codemod handles typed 'DisplayMode' variables, direct string attribute values, and assignment right-hand sides. The following cases require manual updates:
|
|
59
|
+
|
|
60
|
+
1. Ternary or computed expressions:
|
|
61
|
+
Before: this.showIcon = condition ? 'overflow' : 'both';
|
|
62
|
+
After: this.showIcon = condition ? 'menu' : 'always';
|
|
63
|
+
|
|
64
|
+
2. Untyped variables that hold a DisplayMode value:
|
|
65
|
+
Before: const mode = 'overflow'; // no type annotation
|
|
66
|
+
After: const mode = 'menu';
|
|
67
|
+
|
|
68
|
+
Action: Search for remaining 'overflow' and 'both' string values used with 'showIcon' on toolbar buttons and update them manually.`;
|
|
@@ -27,6 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.aiInstructions = void 0;
|
|
30
31
|
exports.default = default_1;
|
|
31
32
|
const utils_1 = require("../utils");
|
|
32
33
|
const fs = __importStar(require("fs"));
|
|
@@ -52,3 +53,16 @@ function default_1(fileInfo, api) {
|
|
|
52
53
|
(0, utils_1.tsPropertyValueTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-toolbar', 'DisplayMode', 'both', 'always');
|
|
53
54
|
return rootSource.toSource({ quote: 'single' });
|
|
54
55
|
}
|
|
56
|
+
exports.aiInstructions = `The 'showText' property on 'kendo-toolbar-button' has changed accepted values: 'overflow' is now 'menu', and 'both' is now 'always'.
|
|
57
|
+
|
|
58
|
+
The codemod handles typed 'DisplayMode' variables, direct string attribute values, and assignment right-hand sides. The following cases require manual updates:
|
|
59
|
+
|
|
60
|
+
1. Ternary or computed expressions:
|
|
61
|
+
Before: this.showText = condition ? 'overflow' : 'both';
|
|
62
|
+
After: this.showText = condition ? 'menu' : 'always';
|
|
63
|
+
|
|
64
|
+
2. Untyped variables that hold a DisplayMode value:
|
|
65
|
+
Before: const mode = 'overflow'; // no type annotation
|
|
66
|
+
After: const mode = 'menu';
|
|
67
|
+
|
|
68
|
+
Action: Search for remaining 'overflow' and 'both' string values used with 'showText' on toolbar buttons and update them manually.`;
|
|
@@ -26,8 +26,8 @@ const packageMetadata = {
|
|
|
26
26
|
productName: 'Kendo UI for Angular',
|
|
27
27
|
productCode: 'KENDOUIANGULAR',
|
|
28
28
|
productCodes: ['KENDOUIANGULAR'],
|
|
29
|
-
publishDate:
|
|
30
|
-
version: '23.4.0-develop.
|
|
29
|
+
publishDate: 1776175399,
|
|
30
|
+
version: '23.4.0-develop.3',
|
|
31
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
32
32
|
};
|
|
33
33
|
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "23.4.0-develop.
|
|
10
|
+
"publishDate": 1776175399,
|
|
11
|
+
"version": "23.4.0-develop.3",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-toolbar",
|
|
3
|
-
"version": "23.4.0-develop.
|
|
3
|
+
"version": "23.4.0-develop.3",
|
|
4
4
|
"description": "Kendo UI Angular Toolbar component - a single UI element that organizes buttons and other navigation elements",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"migrations": {
|
|
26
26
|
"options": {
|
|
27
27
|
"parser": "tsx",
|
|
28
|
-
"pattern": "*.{ts,html}"
|
|
28
|
+
"pattern": "*.{ts,html,css,scss,sass,less}"
|
|
29
29
|
},
|
|
30
30
|
"codemods": {
|
|
31
31
|
"19": [
|
|
32
32
|
{
|
|
33
33
|
"description": "Migrate showIcon's overflow value to menu and both value to always",
|
|
34
34
|
"file": "codemods/v19/toolbar-button-showicon.js",
|
|
35
|
-
"prompt": "
|
|
35
|
+
"prompt": "false"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"description": "Migrate showText's overflow value to menu and both value to always",
|
|
39
39
|
"file": "codemods/v19/toolbar-button-showtext.js",
|
|
40
|
-
"prompt": "
|
|
40
|
+
"prompt": "false"
|
|
41
41
|
}
|
|
42
42
|
]
|
|
43
43
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package": {
|
|
46
46
|
"productName": "Kendo UI for Angular",
|
|
47
47
|
"productCode": "KENDOUIANGULAR",
|
|
48
|
-
"publishDate":
|
|
48
|
+
"publishDate": 1776175399,
|
|
49
49
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"@angular/core": "19 - 21",
|
|
56
56
|
"@angular/platform-browser": "19 - 21",
|
|
57
57
|
"@progress/kendo-licensing": "^1.10.0",
|
|
58
|
-
"@progress/kendo-angular-buttons": "23.4.0-develop.
|
|
59
|
-
"@progress/kendo-angular-common": "23.4.0-develop.
|
|
60
|
-
"@progress/kendo-angular-l10n": "23.4.0-develop.
|
|
61
|
-
"@progress/kendo-angular-icons": "23.4.0-develop.
|
|
62
|
-
"@progress/kendo-angular-indicators": "23.4.0-develop.
|
|
63
|
-
"@progress/kendo-angular-popup": "23.4.0-develop.
|
|
58
|
+
"@progress/kendo-angular-buttons": "23.4.0-develop.3",
|
|
59
|
+
"@progress/kendo-angular-common": "23.4.0-develop.3",
|
|
60
|
+
"@progress/kendo-angular-l10n": "23.4.0-develop.3",
|
|
61
|
+
"@progress/kendo-angular-icons": "23.4.0-develop.3",
|
|
62
|
+
"@progress/kendo-angular-indicators": "23.4.0-develop.3",
|
|
63
|
+
"@progress/kendo-angular-popup": "23.4.0-develop.3",
|
|
64
64
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"tslib": "^2.3.1",
|
|
68
|
-
"@progress/kendo-angular-schematics": "23.4.0-develop.
|
|
68
|
+
"@progress/kendo-angular-schematics": "23.4.0-develop.3"
|
|
69
69
|
},
|
|
70
70
|
"schematics": "./schematics/collection.json",
|
|
71
71
|
"module": "fesm2022/progress-kendo-angular-toolbar.mjs",
|