@progress/kendo-angular-layout 19.0.0-develop.23 → 19.0.0-develop.25
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/template-transformer/index.js +94 -0
- package/codemods/utils.js +364 -0
- package/codemods/v19/index.js +56 -0
- package/codemods/v19/tabstrip-mousescrollspeed.js +56 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-layout.mjs +2 -2
- package/package.json +29 -9
@@ -0,0 +1,94 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 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.templateTransformer = void 0;
|
8
|
+
const node_html_parser_1 = require("node-html-parser");
|
9
|
+
function templateTransformer(root, j, ...processFns) {
|
10
|
+
root
|
11
|
+
.find(j.ClassDeclaration)
|
12
|
+
.forEach(classPath => {
|
13
|
+
// Skip if no decorators
|
14
|
+
const classNode = classPath.node;
|
15
|
+
if (!classNode.decorators || !classNode.decorators.length)
|
16
|
+
return;
|
17
|
+
// Find Component decorator
|
18
|
+
const componentDecorator = classNode.decorators.find((decorator) => {
|
19
|
+
if (decorator.expression && decorator.expression.type === 'CallExpression') {
|
20
|
+
const callee = decorator.expression.callee;
|
21
|
+
// Handle direct Component identifier
|
22
|
+
if (callee.type === 'Identifier' && callee.name === 'Component') {
|
23
|
+
return true;
|
24
|
+
}
|
25
|
+
// Handle angular.core.Component or similar
|
26
|
+
if (callee.type === 'MemberExpression' &&
|
27
|
+
callee.property &&
|
28
|
+
callee.property.type === 'Identifier' &&
|
29
|
+
callee.property.name === 'Component') {
|
30
|
+
return true;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
return false;
|
34
|
+
});
|
35
|
+
if (!componentDecorator || !componentDecorator.expression)
|
36
|
+
return;
|
37
|
+
const expression = componentDecorator.expression;
|
38
|
+
if (expression.type !== 'CallExpression' || !expression.arguments.length)
|
39
|
+
return;
|
40
|
+
const componentOptions = expression.arguments[0];
|
41
|
+
if (componentOptions.type !== 'ObjectExpression')
|
42
|
+
return;
|
43
|
+
// Find template and templateUrl properties
|
44
|
+
const props = componentOptions.properties || [];
|
45
|
+
const templateProp = props.find((prop) => (prop.key.type === 'Identifier' && prop.key.name === 'template') ||
|
46
|
+
(prop.key.type === 'StringLiteral' && prop.key.value === 'template'));
|
47
|
+
// const templateUrlProp = props.find((prop: any) =>
|
48
|
+
// (prop.key.type === 'Identifier' && prop.key.name === 'templateUrl') ||
|
49
|
+
// (prop.key.type === 'StringLiteral' && prop.key.value === 'templateUrl')
|
50
|
+
// );
|
51
|
+
// Process inline template
|
52
|
+
if (templateProp) {
|
53
|
+
// Extract template based on node type
|
54
|
+
let originalTemplate;
|
55
|
+
if (templateProp.value.type === 'StringLiteral' || templateProp.value.type === 'Literal') {
|
56
|
+
originalTemplate = templateProp.value.value;
|
57
|
+
}
|
58
|
+
else if (templateProp.value.type === 'TemplateLiteral') {
|
59
|
+
// For template literals, join quasis
|
60
|
+
if (templateProp.value.quasis && templateProp.value.quasis.length) {
|
61
|
+
originalTemplate = templateProp.value.quasis
|
62
|
+
.map((q) => q.value.cooked || q.value.raw)
|
63
|
+
.join('');
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
console.warn('Could not process TemplateLiteral properly');
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
else {
|
71
|
+
console.warn(`Unsupported template type: ${templateProp.value.type}`);
|
72
|
+
return;
|
73
|
+
}
|
74
|
+
const root = (0, node_html_parser_1.parse)(originalTemplate);
|
75
|
+
processFns.forEach(fn => {
|
76
|
+
fn(root);
|
77
|
+
});
|
78
|
+
// Transform template using Angular compiler
|
79
|
+
const transformedTemplate = root.toString();
|
80
|
+
if (transformedTemplate !== originalTemplate) {
|
81
|
+
// Update template property
|
82
|
+
if (templateProp.value.type === 'TemplateLiteral') {
|
83
|
+
// For template literals, create a new template literal
|
84
|
+
templateProp.value = j.templateLiteral([j.templateElement({ cooked: transformedTemplate, raw: transformedTemplate }, true)], []);
|
85
|
+
}
|
86
|
+
else {
|
87
|
+
// For string literals, update the value
|
88
|
+
templateProp.value.value = transformedTemplate;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
});
|
93
|
+
}
|
94
|
+
exports.templateTransformer = templateTransformer;
|
@@ -0,0 +1,364 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 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.tsPropertyRemoval = exports.tsComponentPropertyRemoval = exports.tsPropertyTransformer = exports.templateAttributeTransformer = exports.templateAttributeRemoval = exports.htmlAttributeRemoval = void 0;
|
8
|
+
const node_html_parser_1 = require("node-html-parser");
|
9
|
+
const htmlAttributeRemoval = (fileInfo, tagName, attributeName, propertyToRemove) => {
|
10
|
+
const filePath = fileInfo.path;
|
11
|
+
const fileContent = fileInfo.source;
|
12
|
+
const root = (0, node_html_parser_1.parse)(fileContent);
|
13
|
+
// Use the same logic as templateAttributeRemoval
|
14
|
+
const elements = root.querySelectorAll(tagName);
|
15
|
+
for (const element of elements) {
|
16
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
17
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
18
|
+
if (boundAttr) {
|
19
|
+
// Check if it's an object literal
|
20
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
21
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
22
|
+
const objectLiteral = boundAttr.trim();
|
23
|
+
// Build a regex that matches the property and its value
|
24
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
25
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
26
|
+
// Remove the property and any trailing comma
|
27
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
28
|
+
// Fix syntax if we removed the last property with trailing comma
|
29
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
30
|
+
// If the object is now empty, remove the attribute completely
|
31
|
+
if (newObjectLiteral === '{}') {
|
32
|
+
element.removeAttribute(`[${attributeName}]`);
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
// Check if it's a variable reference to an object
|
39
|
+
else {
|
40
|
+
// For variable references, we can't modify them in the template
|
41
|
+
// We should warn the user or handle this case specially
|
42
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr} in file ${filePath}`);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
// Return the modified HTML content
|
47
|
+
return root.toString();
|
48
|
+
};
|
49
|
+
exports.htmlAttributeRemoval = htmlAttributeRemoval;
|
50
|
+
/**
|
51
|
+
* Removes a specified property from an object binding in HTML templates
|
52
|
+
*
|
53
|
+
* @param root - The HTML root element
|
54
|
+
* @param tagName - The tag to search for (e.g., 'kendo-tabstrip')
|
55
|
+
* @param attributeName - The attribute containing the object binding (e.g., 'scrollable')
|
56
|
+
* @param propertyToRemove - The property to remove from the object (e.g., 'mouseScrollSpeed')
|
57
|
+
*/
|
58
|
+
const templateAttributeRemoval = (root, tagName, attributeName, propertyToRemove) => {
|
59
|
+
const elements = root.querySelectorAll(tagName);
|
60
|
+
for (const element of elements) {
|
61
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
62
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
63
|
+
if (boundAttr) {
|
64
|
+
// Check if it's an object literal
|
65
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
66
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
67
|
+
const objectLiteral = boundAttr.trim();
|
68
|
+
// Build a regex that matches the property and its value
|
69
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
70
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
71
|
+
// Remove the property and any trailing comma
|
72
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
73
|
+
// Fix syntax if we removed the last property with trailing comma
|
74
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
75
|
+
// If the object is now empty, remove the attribute completely
|
76
|
+
if (newObjectLiteral === '{}') {
|
77
|
+
element.removeAttribute(`[${attributeName}]`);
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
// Check if it's a variable reference to an object
|
84
|
+
else {
|
85
|
+
// For variable references, we can't modify them in the template
|
86
|
+
// We should warn the user or handle this case specially
|
87
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr}`);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
};
|
92
|
+
exports.templateAttributeRemoval = templateAttributeRemoval;
|
93
|
+
const templateAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
94
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
95
|
+
for (const element of elements) {
|
96
|
+
// Handle bound attributes like [title]="foo" or [title]="'foo'"
|
97
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
98
|
+
if (boundAttr) {
|
99
|
+
element.setAttribute(`[${newAttributeName}]`, boundAttr);
|
100
|
+
element.removeAttribute(`[${attributeName}]`);
|
101
|
+
}
|
102
|
+
// Handle static attributes like title="foo"
|
103
|
+
const staticAttr = element.getAttribute(attributeName);
|
104
|
+
if (staticAttr) {
|
105
|
+
element.setAttribute(newAttributeName, staticAttr);
|
106
|
+
element.removeAttribute(attributeName);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
};
|
110
|
+
exports.templateAttributeTransformer = templateAttributeTransformer;
|
111
|
+
const tsPropertyTransformer = (root, j, componentType, propertyName, newPropertyName) => {
|
112
|
+
// Find all class properties that are of type DropDownListComponent
|
113
|
+
const properties = new Set();
|
114
|
+
// Find properties with type annotations
|
115
|
+
root
|
116
|
+
.find(j.ClassProperty, {
|
117
|
+
typeAnnotation: {
|
118
|
+
typeAnnotation: {
|
119
|
+
typeName: {
|
120
|
+
name: componentType
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
})
|
125
|
+
.forEach(path => {
|
126
|
+
if (path.node.key.type === 'Identifier') {
|
127
|
+
properties.add(path.node.key.name);
|
128
|
+
}
|
129
|
+
});
|
130
|
+
// Find function parameters of type componentType
|
131
|
+
const parameters = new Set();
|
132
|
+
root
|
133
|
+
.find(j.FunctionDeclaration)
|
134
|
+
.forEach(path => {
|
135
|
+
if (path.node.params) {
|
136
|
+
path.node.params.forEach(param => {
|
137
|
+
if (param.type === 'Identifier' &&
|
138
|
+
param.typeAnnotation &&
|
139
|
+
param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
|
140
|
+
param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
141
|
+
param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
|
142
|
+
parameters.add(param.name);
|
143
|
+
}
|
144
|
+
});
|
145
|
+
}
|
146
|
+
});
|
147
|
+
// Also check method declarations in classes
|
148
|
+
root
|
149
|
+
.find(j.ClassMethod)
|
150
|
+
.forEach(path => {
|
151
|
+
if (path.node.params) {
|
152
|
+
path.node.params.forEach(param => {
|
153
|
+
if (param.type === 'Identifier' &&
|
154
|
+
param.typeAnnotation &&
|
155
|
+
param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
|
156
|
+
param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
157
|
+
param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
|
158
|
+
parameters.add(param.name);
|
159
|
+
}
|
160
|
+
});
|
161
|
+
}
|
162
|
+
});
|
163
|
+
// Find all member expressions where title property is accessed on any componentType instance
|
164
|
+
root
|
165
|
+
.find(j.MemberExpression, {
|
166
|
+
property: {
|
167
|
+
type: 'Identifier',
|
168
|
+
name: propertyName
|
169
|
+
}
|
170
|
+
})
|
171
|
+
.filter(path => {
|
172
|
+
// Filter to only include accesses on properties that are componentType instances
|
173
|
+
if (path.node.object.type === 'MemberExpression' &&
|
174
|
+
path.node.object.property.type === 'Identifier') {
|
175
|
+
// handle properties of this
|
176
|
+
if (path.node.object.object.type === 'ThisExpression' &&
|
177
|
+
properties.has(path.node.object.property.name)) {
|
178
|
+
return true;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
// Handle function parameters
|
182
|
+
if (path.node.object.type === 'Identifier' &&
|
183
|
+
parameters.has(path.node.object.name)) {
|
184
|
+
return true;
|
185
|
+
}
|
186
|
+
return false;
|
187
|
+
})
|
188
|
+
.forEach(path => {
|
189
|
+
// Replace old property name with new property name
|
190
|
+
if (path.node.property.type === 'Identifier') {
|
191
|
+
path.node.property.name = newPropertyName;
|
192
|
+
}
|
193
|
+
});
|
194
|
+
};
|
195
|
+
exports.tsPropertyTransformer = tsPropertyTransformer;
|
196
|
+
/**
|
197
|
+
* Removes assignments to a specific nested property of a component
|
198
|
+
*
|
199
|
+
* @param root - The AST root
|
200
|
+
* @param j - The JSCodeshift instance
|
201
|
+
* @param componentType - The component type to target (e.g., 'TabStripComponent')
|
202
|
+
* @param componentProperty - The component property (e.g., 'scrollable')
|
203
|
+
* @param propertyToRemove - The nested property to remove assignments to (e.g., 'mouseScrollSpeed')
|
204
|
+
*/
|
205
|
+
const tsComponentPropertyRemoval = (root, j, componentType, componentProperty, propertyToRemove) => {
|
206
|
+
// CASE 1: Handle direct property assignments like: foo.scrollable.mouseScrollSpeed = 3000;
|
207
|
+
root
|
208
|
+
.find(j.AssignmentExpression)
|
209
|
+
.filter((path) => {
|
210
|
+
const { left } = path.value;
|
211
|
+
// Check if this is a member expression assignment
|
212
|
+
if (left && left.type === 'MemberExpression') {
|
213
|
+
// Check if we're accessing the property to remove
|
214
|
+
if (left.property && left.property.name === propertyToRemove) {
|
215
|
+
// Check if we're accessing it from component.componentProperty
|
216
|
+
const obj = left.object;
|
217
|
+
if (obj && obj.type === 'MemberExpression' &&
|
218
|
+
obj.property && obj.property.name === componentProperty) {
|
219
|
+
// Now check if the base object is our component type
|
220
|
+
return isComponentTypeMatch(root, j, obj.object, componentType);
|
221
|
+
}
|
222
|
+
}
|
223
|
+
}
|
224
|
+
return false;
|
225
|
+
})
|
226
|
+
.forEach((path) => {
|
227
|
+
// Remove the entire statement
|
228
|
+
j(path).closest(j.ExpressionStatement).remove();
|
229
|
+
});
|
230
|
+
// CASE 2 & 3: Handle object assignments like: foo.scrollable = { mouseScrollSpeed: 3000, ... };
|
231
|
+
root
|
232
|
+
.find(j.AssignmentExpression)
|
233
|
+
.filter((path) => {
|
234
|
+
const { left, right } = path.value;
|
235
|
+
// Check if this assigns to component.componentProperty
|
236
|
+
if (left && left.type === 'MemberExpression' &&
|
237
|
+
left.property && left.property.name === componentProperty &&
|
238
|
+
right && right.type === 'ObjectExpression') {
|
239
|
+
// Check if the base object is our component type
|
240
|
+
return isComponentTypeMatch(root, j, left.object, componentType);
|
241
|
+
}
|
242
|
+
return false;
|
243
|
+
})
|
244
|
+
.forEach((path) => {
|
245
|
+
const properties = path.value.right.properties;
|
246
|
+
// Find the property we want to remove
|
247
|
+
const propIndex = properties.findIndex((p) => p && p.type === 'ObjectProperty' &&
|
248
|
+
p.key && p.key.type === 'Identifier' &&
|
249
|
+
p.key.name === propertyToRemove);
|
250
|
+
if (propIndex !== -1) {
|
251
|
+
// Case 2: If it's the only property, remove the entire statement
|
252
|
+
if (properties.length === 1) {
|
253
|
+
j(path).closest(j.ExpressionStatement).remove();
|
254
|
+
}
|
255
|
+
// Case 3: If there are other properties, just remove this one property
|
256
|
+
else {
|
257
|
+
properties.splice(propIndex, 1);
|
258
|
+
}
|
259
|
+
}
|
260
|
+
});
|
261
|
+
return root;
|
262
|
+
};
|
263
|
+
exports.tsComponentPropertyRemoval = tsComponentPropertyRemoval;
|
264
|
+
// Helper function to check if a node is a component of the specified type
|
265
|
+
function isComponentTypeMatch(root, j, node, componentType) {
|
266
|
+
if (!node)
|
267
|
+
return false;
|
268
|
+
// Case 1: Direct match for 'this.propertyName'
|
269
|
+
if (node.type === 'ThisExpression') {
|
270
|
+
return true; // Assuming 'this' refers to the component class
|
271
|
+
}
|
272
|
+
// Case 2: Function parameter
|
273
|
+
if (node.type === 'Identifier') {
|
274
|
+
const paramName = node.name;
|
275
|
+
// Check function parameters
|
276
|
+
return root
|
277
|
+
.find(j.Function)
|
278
|
+
.some(path => {
|
279
|
+
return path.node.params && path.node.params.some((param) => param.type === 'Identifier' &&
|
280
|
+
param.name === paramName &&
|
281
|
+
param.typeAnnotation?.typeAnnotation?.typeName?.name === componentType);
|
282
|
+
});
|
283
|
+
}
|
284
|
+
// Case 3: Member expression (obj.prop)
|
285
|
+
if (node.type === 'MemberExpression') {
|
286
|
+
// This would need more complex logic to determine if the object is of the right type
|
287
|
+
// For now, we can check if it's a property that has been declared with the right type
|
288
|
+
if (node.object.type === 'ThisExpression' && node.property.type === 'Identifier') {
|
289
|
+
const propName = node.property.name;
|
290
|
+
return root
|
291
|
+
.find(j.ClassProperty, {
|
292
|
+
key: { name: propName },
|
293
|
+
typeAnnotation: {
|
294
|
+
typeAnnotation: {
|
295
|
+
typeName: { name: componentType }
|
296
|
+
}
|
297
|
+
}
|
298
|
+
})
|
299
|
+
.size() > 0;
|
300
|
+
}
|
301
|
+
}
|
302
|
+
return false;
|
303
|
+
}
|
304
|
+
/**
|
305
|
+
* Removes a property from object literals of a specified type
|
306
|
+
*
|
307
|
+
* @param root - The AST root
|
308
|
+
* @param j - The JSCodeshift instance
|
309
|
+
* @param typeName - The type to target (e.g., 'TabStripScrollableSettings')
|
310
|
+
* @param propertyToRemove - The property to remove (e.g., 'mouseScrollSpeed')
|
311
|
+
*/
|
312
|
+
function tsPropertyRemoval(rootSource, j, typeName, propertyName) {
|
313
|
+
// Find class properties that have the specified type
|
314
|
+
rootSource
|
315
|
+
.find(j.ClassProperty, {
|
316
|
+
typeAnnotation: {
|
317
|
+
typeAnnotation: {
|
318
|
+
typeName: {
|
319
|
+
name: typeName
|
320
|
+
}
|
321
|
+
}
|
322
|
+
}
|
323
|
+
})
|
324
|
+
.forEach(path => {
|
325
|
+
// Check if there's an object literal initializer
|
326
|
+
if (path.node.value && path.node.value.type === 'ObjectExpression') {
|
327
|
+
const properties = path.node.value.properties;
|
328
|
+
// Find the property we want to remove - safely handle different property types
|
329
|
+
const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
|
330
|
+
p.key &&
|
331
|
+
p.key.type === 'Identifier' &&
|
332
|
+
p.key.name === propertyName);
|
333
|
+
if (propIndex !== -1) {
|
334
|
+
// If property exists, remove it
|
335
|
+
// Case 1: If it's the only property, remove the entire class property
|
336
|
+
if (properties.length === 1) {
|
337
|
+
j(path).remove();
|
338
|
+
}
|
339
|
+
// Case 2: If there are other properties, just remove this one property
|
340
|
+
else {
|
341
|
+
properties.splice(propIndex, 1);
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
});
|
346
|
+
// Also handle property assignments (e.g., in methods like ngOnInit)
|
347
|
+
rootSource
|
348
|
+
.find(j.AssignmentExpression, {
|
349
|
+
left: {
|
350
|
+
type: 'MemberExpression',
|
351
|
+
object: {
|
352
|
+
type: 'MemberExpression'
|
353
|
+
},
|
354
|
+
property: {
|
355
|
+
name: propertyName
|
356
|
+
}
|
357
|
+
}
|
358
|
+
})
|
359
|
+
.forEach(path => {
|
360
|
+
j(path).remove();
|
361
|
+
});
|
362
|
+
return rootSource;
|
363
|
+
}
|
364
|
+
exports.tsPropertyRemoval = tsPropertyRemoval;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 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
|
+
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
|
+
};
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
+
const template_transformer_1 = require("../template-transformer");
|
31
|
+
const fs = __importStar(require("fs"));
|
32
|
+
const utils_1 = require("../utils");
|
33
|
+
function default_1(fileInfo, api) {
|
34
|
+
const filePath = fileInfo.path;
|
35
|
+
// Check if the file is an HTML file
|
36
|
+
if (filePath.endsWith('.html')) {
|
37
|
+
const filePath = fileInfo.path;
|
38
|
+
let updatedContent = fileInfo.source;
|
39
|
+
updatedContent = (0, utils_1.htmlAttributeRemoval)({ ...fileInfo, source: updatedContent }, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
40
|
+
// Only write to file once after all transformations
|
41
|
+
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
const j = api.jscodeshift;
|
45
|
+
const rootSource = j(fileInfo.source);
|
46
|
+
(0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
|
47
|
+
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
48
|
+
(0, utils_1.templateAttributeRemoval)(root, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
49
|
+
});
|
50
|
+
// Remove mouseScrollSpeed property from TabStripScrollableSettings type
|
51
|
+
(0, utils_1.tsPropertyRemoval)(rootSource, j, 'TabStripScrollableSettings', 'mouseScrollSpeed');
|
52
|
+
// Remove assignments to tabstrip.scrollable.mouseScrollSpeed
|
53
|
+
(0, utils_1.tsComponentPropertyRemoval)(rootSource, j, 'TabStripComponent', 'scrollable', 'mouseScrollSpeed');
|
54
|
+
return rootSource.toSource();
|
55
|
+
}
|
56
|
+
exports.default = default_1;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 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
|
+
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
|
+
};
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
+
const template_transformer_1 = require("../template-transformer");
|
31
|
+
const utils_1 = require("../utils");
|
32
|
+
const fs = __importStar(require("fs"));
|
33
|
+
function default_1(fileInfo, api) {
|
34
|
+
const filePath = fileInfo.path;
|
35
|
+
// Check if the file is an HTML file
|
36
|
+
if (filePath.endsWith('.html')) {
|
37
|
+
const filePath = fileInfo.path;
|
38
|
+
let updatedContent = fileInfo.source;
|
39
|
+
updatedContent = (0, utils_1.htmlAttributeRemoval)({ ...fileInfo, source: updatedContent }, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
40
|
+
// Only write to file once after all transformations
|
41
|
+
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
const j = api.jscodeshift;
|
45
|
+
const rootSource = j(fileInfo.source);
|
46
|
+
(0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
|
47
|
+
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
48
|
+
(0, utils_1.templateAttributeRemoval)(root, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
49
|
+
});
|
50
|
+
// Remove mouseScrollSpeed property from TabStripScrollableSettings type
|
51
|
+
(0, utils_1.tsPropertyRemoval)(rootSource, j, 'TabStripScrollableSettings', 'mouseScrollSpeed');
|
52
|
+
// Remove assignments to tabstrip.scrollable.mouseScrollSpeed
|
53
|
+
(0, utils_1.tsComponentPropertyRemoval)(rootSource, j, 'TabStripComponent', 'scrollable', 'mouseScrollSpeed');
|
54
|
+
return rootSource.toSource();
|
55
|
+
}
|
56
|
+
exports.default = default_1;
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
13
|
-
publishDate:
|
14
|
-
version: '19.0.0-develop.
|
13
|
+
publishDate: 1747671249,
|
14
|
+
version: '19.0.0-develop.25',
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
16
16
|
};
|
@@ -29,8 +29,8 @@ const packageMetadata = {
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
30
30
|
productCode: 'KENDOUIANGULAR',
|
31
31
|
productCodes: ['KENDOUIANGULAR'],
|
32
|
-
publishDate:
|
33
|
-
version: '19.0.0-develop.
|
32
|
+
publishDate: 1747671249,
|
33
|
+
version: '19.0.0-develop.25',
|
34
34
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
35
35
|
};
|
36
36
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
3
|
-
"version": "19.0.0-develop.
|
3
|
+
"version": "19.0.0-develop.25",
|
4
4
|
"description": "Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "Progress",
|
@@ -32,10 +32,30 @@
|
|
32
32
|
],
|
33
33
|
"@progress": {
|
34
34
|
"friendlyName": "Layout",
|
35
|
+
"migrations": {
|
36
|
+
"options": {
|
37
|
+
"parser": "tsx",
|
38
|
+
"pattern": "*.{t,j}s"
|
39
|
+
},
|
40
|
+
"codemods": {
|
41
|
+
"19": [
|
42
|
+
{
|
43
|
+
"description": "Migrate all breaking changes for the layout package",
|
44
|
+
"file": "codemods/v19/index.js",
|
45
|
+
"prompt": "true"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"description": "mousescrollspeed of TabStripScrollableSettings is deprecated",
|
49
|
+
"file": "codemods/v19/tabstrip-mousescrollspeed.ts",
|
50
|
+
"prompt": "true"
|
51
|
+
}
|
52
|
+
]
|
53
|
+
}
|
54
|
+
},
|
35
55
|
"package": {
|
36
56
|
"productName": "Kendo UI for Angular",
|
37
57
|
"productCode": "KENDOUIANGULAR",
|
38
|
-
"publishDate":
|
58
|
+
"publishDate": 1747671249,
|
39
59
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"
|
40
60
|
}
|
41
61
|
},
|
@@ -45,17 +65,17 @@
|
|
45
65
|
"@angular/core": "16 - 19",
|
46
66
|
"@angular/platform-browser": "16 - 19",
|
47
67
|
"@progress/kendo-licensing": "^1.5.0",
|
48
|
-
"@progress/kendo-angular-common": "19.0.0-develop.
|
49
|
-
"@progress/kendo-angular-l10n": "19.0.0-develop.
|
50
|
-
"@progress/kendo-angular-progressbar": "19.0.0-develop.
|
51
|
-
"@progress/kendo-angular-icons": "19.0.0-develop.
|
52
|
-
"@progress/kendo-angular-buttons": "19.0.0-develop.
|
53
|
-
"@progress/kendo-angular-intl": "19.0.0-develop.
|
68
|
+
"@progress/kendo-angular-common": "19.0.0-develop.25",
|
69
|
+
"@progress/kendo-angular-l10n": "19.0.0-develop.25",
|
70
|
+
"@progress/kendo-angular-progressbar": "19.0.0-develop.25",
|
71
|
+
"@progress/kendo-angular-icons": "19.0.0-develop.25",
|
72
|
+
"@progress/kendo-angular-buttons": "19.0.0-develop.25",
|
73
|
+
"@progress/kendo-angular-intl": "19.0.0-develop.25",
|
54
74
|
"rxjs": "^6.5.3 || ^7.0.0"
|
55
75
|
},
|
56
76
|
"dependencies": {
|
57
77
|
"tslib": "^2.3.1",
|
58
|
-
"@progress/kendo-angular-schematics": "19.0.0-develop.
|
78
|
+
"@progress/kendo-angular-schematics": "19.0.0-develop.25",
|
59
79
|
"@progress/kendo-draggable": "^3.0.2"
|
60
80
|
},
|
61
81
|
"schematics": "./schematics/collection.json",
|