@progress/kendo-angular-dropdowns 19.0.0-develop.27 → 19.0.0-develop.29
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 +428 -18
- package/codemods/v19/autocomplete-subtitle.js +2 -2
- package/codemods/v19/autocomplete-title.js +2 -2
- package/codemods/v19/combobox-subtitle.js +2 -2
- package/codemods/v19/combobox-title.js +2 -2
- package/codemods/v19/dropdownlist-subtitle.js +2 -2
- package/codemods/v19/dropdownlist-title.js +2 -2
- package/codemods/v19/dropdowntree-subtitle.js +2 -2
- package/codemods/v19/dropdowntree-title.js +2 -2
- package/codemods/v19/multicolumncombobox-subtitle.js +2 -2
- package/codemods/v19/multicolumncombobox-title.js +2 -2
- package/codemods/v19/multiselect-subtitle.js +2 -2
- package/codemods/v19/multiselect-title.js +2 -2
- package/codemods/v19/multiselecttree-subtitle.js +2 -2
- package/codemods/v19/multiselecttree-title.js +2 -2
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-dropdowns.mjs +2 -2
- package/package.json +25 -30
- package/schematics/ngAdd/index.js +2 -2
- package/codemods/v19/index.js +0 -91
package/codemods/utils.js
CHANGED
|
@@ -7,17 +7,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.htmlAttributeTransformer = exports.tsPropertyTransformer = exports.templateAttributeTransformer = void 0;
|
|
10
|
+
exports.tsComponentPropertyRemoval = exports.tsPropertyRemoval = exports.templateAttributeRemoval = exports.htmlAttributeRemoval = exports.htmlAttributeValueTransformer = exports.tsPropertyValueTransformer = exports.templateAttributeValueTransformer = exports.htmlAttributeTransformer = exports.htmlBoundAttributeTransformer = exports.htmlStaticAttributeTransformer = exports.tsPropertyTransformer = exports.templateAttributeTransformer = exports.templateBoundAttributeTransformer = exports.templateStaticAttributeTransformer = void 0;
|
|
11
11
|
const node_html_parser_1 = __importDefault(require("node-html-parser"));
|
|
12
|
-
const
|
|
12
|
+
const templateStaticAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
|
13
13
|
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
|
14
14
|
for (const element of elements) {
|
|
15
|
-
// Handle bound attributes like [title]="foo" or [title]="'foo'"
|
|
16
|
-
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
17
|
-
if (boundAttr) {
|
|
18
|
-
element.setAttribute(`[${newAttributeName}]`, boundAttr);
|
|
19
|
-
element.removeAttribute(`[${attributeName}]`);
|
|
20
|
-
}
|
|
21
15
|
// Handle static attributes like title="foo"
|
|
22
16
|
const staticAttr = element.getAttribute(attributeName);
|
|
23
17
|
if (staticAttr) {
|
|
@@ -26,6 +20,23 @@ const templateAttributeTransformer = (root, tagName, attributeName, newAttribute
|
|
|
26
20
|
}
|
|
27
21
|
}
|
|
28
22
|
};
|
|
23
|
+
exports.templateStaticAttributeTransformer = templateStaticAttributeTransformer;
|
|
24
|
+
const templateBoundAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
|
25
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
|
26
|
+
for (const element of elements) {
|
|
27
|
+
// Handle bound attributes like [title]="foo" or [title]="'foo'"
|
|
28
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
29
|
+
if (boundAttr) {
|
|
30
|
+
element.setAttribute(`[${newAttributeName}]`, boundAttr);
|
|
31
|
+
element.removeAttribute(`[${attributeName}]`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.templateBoundAttributeTransformer = templateBoundAttributeTransformer;
|
|
36
|
+
const templateAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
|
37
|
+
(0, exports.templateBoundAttributeTransformer)(root, tagName, attributeName, newAttributeName);
|
|
38
|
+
(0, exports.templateStaticAttributeTransformer)(root, tagName, attributeName, newAttributeName);
|
|
39
|
+
};
|
|
29
40
|
exports.templateAttributeTransformer = templateAttributeTransformer;
|
|
30
41
|
const tsPropertyTransformer = (root, j, componentType, propertyName, newPropertyName) => {
|
|
31
42
|
// Find all class properties that are of type DropDownListComponent
|
|
@@ -112,24 +123,170 @@ const tsPropertyTransformer = (root, j, componentType, propertyName, newProperty
|
|
|
112
123
|
});
|
|
113
124
|
};
|
|
114
125
|
exports.tsPropertyTransformer = tsPropertyTransformer;
|
|
115
|
-
const
|
|
126
|
+
const htmlStaticAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
|
116
127
|
const fileContent = fileInfo.source;
|
|
117
128
|
const root = (0, node_html_parser_1.default)(fileContent);
|
|
118
129
|
let modified = false;
|
|
119
|
-
// Locate elements using [oldName] binding and update the old attribute to the new one
|
|
120
130
|
const elements = Array.from(root.querySelectorAll(tagName));
|
|
121
131
|
for (const element of elements) {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
132
|
+
const staticAttr = element.getAttribute(oldName);
|
|
133
|
+
if (staticAttr) {
|
|
134
|
+
element.removeAttribute(oldName);
|
|
135
|
+
element.setAttribute(newName, staticAttr);
|
|
136
|
+
modified = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (modified) {
|
|
140
|
+
return root.toString();
|
|
141
|
+
}
|
|
142
|
+
return fileContent;
|
|
143
|
+
};
|
|
144
|
+
exports.htmlStaticAttributeTransformer = htmlStaticAttributeTransformer;
|
|
145
|
+
const htmlBoundAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
|
146
|
+
const fileContent = fileInfo.source;
|
|
147
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
|
148
|
+
let modified = false;
|
|
149
|
+
const elements = Array.from(root.querySelectorAll(tagName));
|
|
150
|
+
for (const element of elements) {
|
|
151
|
+
const boundAttr = element.getAttribute(`[${oldName}]`);
|
|
152
|
+
if (boundAttr) {
|
|
124
153
|
element.removeAttribute(`[${oldName}]`);
|
|
125
|
-
element.setAttribute(`[${newName}]`,
|
|
154
|
+
element.setAttribute(`[${newName}]`, boundAttr);
|
|
126
155
|
modified = true;
|
|
127
156
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
157
|
+
}
|
|
158
|
+
if (modified) {
|
|
159
|
+
return root.toString();
|
|
160
|
+
}
|
|
161
|
+
return fileContent;
|
|
162
|
+
};
|
|
163
|
+
exports.htmlBoundAttributeTransformer = htmlBoundAttributeTransformer;
|
|
164
|
+
const htmlAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
|
165
|
+
let content = (0, exports.htmlBoundAttributeTransformer)(fileInfo, tagName, oldName, newName);
|
|
166
|
+
content = (0, exports.htmlStaticAttributeTransformer)({ path: fileInfo.path, source: content }, tagName, oldName, newName);
|
|
167
|
+
return content;
|
|
168
|
+
};
|
|
169
|
+
exports.htmlAttributeTransformer = htmlAttributeTransformer;
|
|
170
|
+
const templateAttributeValueTransformer = (root, tagName, attributeName, oldAttributeValue, newAttributeValue) => {
|
|
171
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
|
172
|
+
for (const element of elements) {
|
|
173
|
+
// Handle bound attributes (e.g., [showText]="'overflow'")
|
|
174
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
175
|
+
if (boundAttr === `'${oldAttributeValue}'`) {
|
|
176
|
+
// For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
|
|
177
|
+
element.setAttribute(`[${attributeName}]`, boundAttr.replace(oldAttributeValue, newAttributeValue));
|
|
178
|
+
}
|
|
179
|
+
// Handle static attributes like title="foo"
|
|
180
|
+
const staticAttrValue = element.getAttribute(attributeName);
|
|
181
|
+
if (staticAttrValue === oldAttributeValue) {
|
|
182
|
+
element.setAttribute(attributeName, newAttributeValue);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
exports.templateAttributeValueTransformer = templateAttributeValueTransformer;
|
|
187
|
+
const tsPropertyValueTransformer = (root, j, typeName, oldValue, newValue) => {
|
|
188
|
+
// 1. Find all class properties with the specified type
|
|
189
|
+
root
|
|
190
|
+
.find(j.ClassProperty)
|
|
191
|
+
.filter(path => {
|
|
192
|
+
// Check if the property has a type annotation matching the specified type
|
|
193
|
+
if (path.node.typeAnnotation?.typeAnnotation &&
|
|
194
|
+
path.node.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
|
|
195
|
+
path.node.typeAnnotation.typeAnnotation.typeName &&
|
|
196
|
+
path.node.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
|
197
|
+
path.node.typeAnnotation.typeAnnotation.typeName.name === typeName) {
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
return false;
|
|
201
|
+
})
|
|
202
|
+
.forEach(path => {
|
|
203
|
+
// Update the value if it matches the old value
|
|
204
|
+
if (path.node.value &&
|
|
205
|
+
path.node.value.type === 'StringLiteral' &&
|
|
206
|
+
path.node.value.value === oldValue) {
|
|
207
|
+
path.node.value.value = newValue;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
// 2. Find all assignments to variables of the specified type
|
|
211
|
+
const variablesOfType = new Set();
|
|
212
|
+
// First, collect all variables with the specified type
|
|
213
|
+
root
|
|
214
|
+
.find(j.VariableDeclarator)
|
|
215
|
+
.filter(path => {
|
|
216
|
+
if (path.node.id.type === 'Identifier' &&
|
|
217
|
+
path.node.id.typeAnnotation?.typeAnnotation &&
|
|
218
|
+
path.node.id.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
|
|
219
|
+
path.node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
|
220
|
+
path.node.id.typeAnnotation.typeAnnotation.typeName.name === typeName) {
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
return false;
|
|
224
|
+
})
|
|
225
|
+
.forEach(path => {
|
|
226
|
+
if (path.node.id.type === 'Identifier') {
|
|
227
|
+
variablesOfType.add(path.node.id.name);
|
|
228
|
+
// Also update the initial value if it matches
|
|
229
|
+
if (path.node.init &&
|
|
230
|
+
path.node.init.type === 'StringLiteral' &&
|
|
231
|
+
path.node.init.value === oldValue) {
|
|
232
|
+
path.node.init.value = newValue;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
// 3. Update literals in assignment expressions
|
|
237
|
+
root
|
|
238
|
+
.find(j.AssignmentExpression)
|
|
239
|
+
.filter(path => {
|
|
240
|
+
// Only process string literals with the old value
|
|
241
|
+
return path.node.right.type === 'StringLiteral' &&
|
|
242
|
+
path.node.right.value === oldValue;
|
|
243
|
+
})
|
|
244
|
+
.forEach(path => {
|
|
245
|
+
// Update the value
|
|
246
|
+
path.node.right.value = newValue;
|
|
247
|
+
});
|
|
248
|
+
// 4. Also look for string literals in attributes within JSX elements
|
|
249
|
+
root
|
|
250
|
+
.find(j.JSXAttribute, {
|
|
251
|
+
value: {
|
|
252
|
+
type: 'StringLiteral',
|
|
253
|
+
value: oldValue
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
.forEach(path => {
|
|
257
|
+
if (path.node.value?.type === 'StringLiteral') {
|
|
258
|
+
path.node.value.value = newValue;
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
exports.tsPropertyValueTransformer = tsPropertyValueTransformer;
|
|
263
|
+
const htmlAttributeValueTransformer = (fileInfo, tagName, attributeName, oldValue, newValue) => {
|
|
264
|
+
// Read file content from fileInfo
|
|
265
|
+
const fileContent = fileInfo.source;
|
|
266
|
+
// Parse the HTML content
|
|
267
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
|
268
|
+
// Find all elements matching the tagName
|
|
269
|
+
const elements = root.querySelectorAll(tagName);
|
|
270
|
+
let modified = false;
|
|
271
|
+
// Process each element
|
|
272
|
+
for (const element of elements) {
|
|
273
|
+
// Handle static attributes (e.g., showText="overflow")
|
|
274
|
+
const staticAttr = element.getAttribute(attributeName);
|
|
275
|
+
if (staticAttr === oldValue) {
|
|
276
|
+
element.setAttribute(attributeName, newValue);
|
|
132
277
|
modified = true;
|
|
278
|
+
console.log(`Modified static attribute ${attributeName} from "${oldValue}" to "${newValue}" in element:`, element.toString().substring(0, 100));
|
|
279
|
+
}
|
|
280
|
+
// Handle bound attributes (e.g., [showText]="overflow")
|
|
281
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
282
|
+
if (boundAttr) {
|
|
283
|
+
// For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
|
|
284
|
+
if (boundAttr === `'${oldValue}'` || boundAttr === `"${oldValue}"`) {
|
|
285
|
+
const updatedValue = boundAttr.replace(oldValue, newValue);
|
|
286
|
+
element.setAttribute(`[${attributeName}]`, updatedValue);
|
|
287
|
+
modified = true;
|
|
288
|
+
console.log(`Modified bound attribute [${attributeName}] from "${boundAttr}" to "${updatedValue}" in element:`, element.toString().substring(0, 100));
|
|
289
|
+
}
|
|
133
290
|
}
|
|
134
291
|
}
|
|
135
292
|
// Return modified content if changes were made
|
|
@@ -140,4 +297,257 @@ const htmlAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
|
|
140
297
|
// Return original content if no changes were made or if there was an error
|
|
141
298
|
return fileContent;
|
|
142
299
|
};
|
|
143
|
-
exports.
|
|
300
|
+
exports.htmlAttributeValueTransformer = htmlAttributeValueTransformer;
|
|
301
|
+
const htmlAttributeRemoval = (fileInfo, tagName, attributeName, propertyToRemove) => {
|
|
302
|
+
const filePath = fileInfo.path;
|
|
303
|
+
const fileContent = fileInfo.source;
|
|
304
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
|
305
|
+
// Use the same logic as templateAttributeRemoval
|
|
306
|
+
const elements = root.querySelectorAll(tagName);
|
|
307
|
+
for (const element of elements) {
|
|
308
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
|
309
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
310
|
+
if (boundAttr) {
|
|
311
|
+
// Check if it's an object literal
|
|
312
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
|
313
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
|
314
|
+
const objectLiteral = boundAttr.trim();
|
|
315
|
+
// Build a regex that matches the property and its value
|
|
316
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
|
317
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
|
318
|
+
// Remove the property and any trailing comma
|
|
319
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
|
320
|
+
// Fix syntax if we removed the last property with trailing comma
|
|
321
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
|
322
|
+
// If the object is now empty, remove the attribute completely
|
|
323
|
+
if (newObjectLiteral === '{}') {
|
|
324
|
+
element.removeAttribute(`[${attributeName}]`);
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// Check if it's a variable reference to an object
|
|
331
|
+
else {
|
|
332
|
+
// For variable references, we can't modify them in the template
|
|
333
|
+
// We should warn the user or handle this case specially
|
|
334
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr} in file ${filePath}`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
// Return the modified HTML content
|
|
339
|
+
return root.toString();
|
|
340
|
+
};
|
|
341
|
+
exports.htmlAttributeRemoval = htmlAttributeRemoval;
|
|
342
|
+
/**
|
|
343
|
+
* Removes a specified property from an object binding in HTML templates
|
|
344
|
+
*
|
|
345
|
+
* @param root - The HTML root element
|
|
346
|
+
* @param tagName - The tag to search for (e.g., 'kendo-tabstrip')
|
|
347
|
+
* @param attributeName - The attribute containing the object binding (e.g., 'scrollable')
|
|
348
|
+
* @param propertyToRemove - The property to remove from the object (e.g., 'mouseScrollSpeed')
|
|
349
|
+
*/
|
|
350
|
+
const templateAttributeRemoval = (root, tagName, attributeName, propertyToRemove) => {
|
|
351
|
+
const elements = root.querySelectorAll(tagName);
|
|
352
|
+
for (const element of elements) {
|
|
353
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
|
354
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
|
355
|
+
if (boundAttr) {
|
|
356
|
+
// Check if it's an object literal
|
|
357
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
|
358
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
|
359
|
+
const objectLiteral = boundAttr.trim();
|
|
360
|
+
// Build a regex that matches the property and its value
|
|
361
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
|
362
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
|
363
|
+
// Remove the property and any trailing comma
|
|
364
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
|
365
|
+
// Fix syntax if we removed the last property with trailing comma
|
|
366
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
|
367
|
+
// If the object is now empty, remove the attribute completely
|
|
368
|
+
if (newObjectLiteral === '{}') {
|
|
369
|
+
element.removeAttribute(`[${attributeName}]`);
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
// Check if it's a variable reference to an object
|
|
376
|
+
else {
|
|
377
|
+
// For variable references, we can't modify them in the template
|
|
378
|
+
// We should warn the user or handle this case specially
|
|
379
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
exports.templateAttributeRemoval = templateAttributeRemoval;
|
|
385
|
+
/**
|
|
386
|
+
* Removes a property from object literals of a specified type
|
|
387
|
+
*
|
|
388
|
+
* @param root - The AST root
|
|
389
|
+
* @param j - The JSCodeshift instance
|
|
390
|
+
* @param typeName - The type to target (e.g., 'TabStripScrollableSettings')
|
|
391
|
+
* @param propertyToRemove - The property to remove (e.g., 'mouseScrollSpeed')
|
|
392
|
+
*/
|
|
393
|
+
function tsPropertyRemoval(rootSource, j, typeName, propertyName) {
|
|
394
|
+
// Find class properties that have the specified type
|
|
395
|
+
rootSource
|
|
396
|
+
.find(j.ClassProperty, {
|
|
397
|
+
typeAnnotation: {
|
|
398
|
+
typeAnnotation: {
|
|
399
|
+
typeName: {
|
|
400
|
+
name: typeName
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
})
|
|
405
|
+
.forEach(path => {
|
|
406
|
+
// Check if there's an object literal initializer
|
|
407
|
+
if (path.node.value && path.node.value.type === 'ObjectExpression') {
|
|
408
|
+
const properties = path.node.value.properties;
|
|
409
|
+
// Find the property we want to remove - safely handle different property types
|
|
410
|
+
const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
|
|
411
|
+
p.key &&
|
|
412
|
+
p.key.type === 'Identifier' &&
|
|
413
|
+
p.key.name === propertyName);
|
|
414
|
+
if (propIndex !== -1) {
|
|
415
|
+
// If property exists, remove it
|
|
416
|
+
// Case 1: If it's the only property, remove the entire class property
|
|
417
|
+
if (properties.length === 1) {
|
|
418
|
+
j(path).remove();
|
|
419
|
+
}
|
|
420
|
+
// Case 2: If there are other properties, just remove this one property
|
|
421
|
+
else {
|
|
422
|
+
properties.splice(propIndex, 1);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
// Also handle property assignments (e.g., in methods like ngOnInit)
|
|
428
|
+
rootSource
|
|
429
|
+
.find(j.AssignmentExpression, {
|
|
430
|
+
left: {
|
|
431
|
+
type: 'MemberExpression',
|
|
432
|
+
object: {
|
|
433
|
+
type: 'MemberExpression'
|
|
434
|
+
},
|
|
435
|
+
property: {
|
|
436
|
+
name: propertyName
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
})
|
|
440
|
+
.forEach(path => {
|
|
441
|
+
j(path).remove();
|
|
442
|
+
});
|
|
443
|
+
return rootSource;
|
|
444
|
+
}
|
|
445
|
+
exports.tsPropertyRemoval = tsPropertyRemoval;
|
|
446
|
+
/**
|
|
447
|
+
* Removes assignments to a specific nested property of a component
|
|
448
|
+
*
|
|
449
|
+
* @param root - The AST root
|
|
450
|
+
* @param j - The JSCodeshift instance
|
|
451
|
+
* @param componentType - The component type to target (e.g., 'TabStripComponent')
|
|
452
|
+
* @param componentProperty - The component property (e.g., 'scrollable')
|
|
453
|
+
* @param propertyToRemove - The nested property to remove assignments to (e.g., 'mouseScrollSpeed')
|
|
454
|
+
*/
|
|
455
|
+
const tsComponentPropertyRemoval = (root, j, componentType, componentProperty, propertyToRemove) => {
|
|
456
|
+
// CASE 1: Handle direct property assignments like: foo.scrollable.mouseScrollSpeed = 3000;
|
|
457
|
+
root
|
|
458
|
+
.find(j.AssignmentExpression)
|
|
459
|
+
.filter((path) => {
|
|
460
|
+
const { left } = path.value;
|
|
461
|
+
// Check if this is a member expression assignment
|
|
462
|
+
if (left && left.type === 'MemberExpression') {
|
|
463
|
+
// Check if we're accessing the property to remove
|
|
464
|
+
if (left.property && left.property.name === propertyToRemove) {
|
|
465
|
+
// Check if we're accessing it from component.componentProperty
|
|
466
|
+
const obj = left.object;
|
|
467
|
+
if (obj && obj.type === 'MemberExpression' &&
|
|
468
|
+
obj.property && obj.property.name === componentProperty) {
|
|
469
|
+
// Now check if the base object is our component type
|
|
470
|
+
return isComponentTypeMatch(root, j, obj.object, componentType);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
return false;
|
|
475
|
+
})
|
|
476
|
+
.forEach((path) => {
|
|
477
|
+
// Remove the entire statement
|
|
478
|
+
j(path).closest(j.ExpressionStatement).remove();
|
|
479
|
+
});
|
|
480
|
+
// CASE 2 & 3: Handle object assignments like: foo.scrollable = { mouseScrollSpeed: 3000, ... };
|
|
481
|
+
root
|
|
482
|
+
.find(j.AssignmentExpression)
|
|
483
|
+
.filter((path) => {
|
|
484
|
+
const { left, right } = path.value;
|
|
485
|
+
// Check if this assigns to component.componentProperty
|
|
486
|
+
if (left && left.type === 'MemberExpression' &&
|
|
487
|
+
left.property && left.property.name === componentProperty &&
|
|
488
|
+
right && right.type === 'ObjectExpression') {
|
|
489
|
+
// Check if the base object is our component type
|
|
490
|
+
return isComponentTypeMatch(root, j, left.object, componentType);
|
|
491
|
+
}
|
|
492
|
+
return false;
|
|
493
|
+
})
|
|
494
|
+
.forEach((path) => {
|
|
495
|
+
const properties = path.value.right.properties;
|
|
496
|
+
// Find the property we want to remove
|
|
497
|
+
const propIndex = properties.findIndex((p) => p && p.type === 'ObjectProperty' &&
|
|
498
|
+
p.key && p.key.type === 'Identifier' &&
|
|
499
|
+
p.key.name === propertyToRemove);
|
|
500
|
+
if (propIndex !== -1) {
|
|
501
|
+
// Case 2: If it's the only property, remove the entire statement
|
|
502
|
+
if (properties.length === 1) {
|
|
503
|
+
j(path).closest(j.ExpressionStatement).remove();
|
|
504
|
+
}
|
|
505
|
+
// Case 3: If there are other properties, just remove this one property
|
|
506
|
+
else {
|
|
507
|
+
properties.splice(propIndex, 1);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
return root;
|
|
512
|
+
};
|
|
513
|
+
exports.tsComponentPropertyRemoval = tsComponentPropertyRemoval;
|
|
514
|
+
// Helper function to check if a node is a component of the specified type
|
|
515
|
+
function isComponentTypeMatch(root, j, node, componentType) {
|
|
516
|
+
if (!node)
|
|
517
|
+
return false;
|
|
518
|
+
// Case 1: Direct match for 'this.propertyName'
|
|
519
|
+
if (node.type === 'ThisExpression') {
|
|
520
|
+
return true; // Assuming 'this' refers to the component class
|
|
521
|
+
}
|
|
522
|
+
// Case 2: Function parameter
|
|
523
|
+
if (node.type === 'Identifier') {
|
|
524
|
+
const paramName = node.name;
|
|
525
|
+
// Check function parameters
|
|
526
|
+
return root
|
|
527
|
+
.find(j.Function)
|
|
528
|
+
.some(path => {
|
|
529
|
+
return path.node.params && path.node.params.some((param) => param.type === 'Identifier' &&
|
|
530
|
+
param.name === paramName &&
|
|
531
|
+
param.typeAnnotation?.typeAnnotation?.typeName?.name === componentType);
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
// Case 3: Member expression (obj.prop)
|
|
535
|
+
if (node.type === 'MemberExpression') {
|
|
536
|
+
// This would need more complex logic to determine if the object is of the right type
|
|
537
|
+
// For now, we can check if it's a property that has been declared with the right type
|
|
538
|
+
if (node.object.type === 'ThisExpression' && node.property.type === 'Identifier') {
|
|
539
|
+
const propName = node.property.name;
|
|
540
|
+
return root
|
|
541
|
+
.find(j.ClassProperty, {
|
|
542
|
+
key: { name: propName },
|
|
543
|
+
typeAnnotation: {
|
|
544
|
+
typeAnnotation: {
|
|
545
|
+
typeName: { name: componentType }
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
})
|
|
549
|
+
.size() > 0;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle');
|
|
46
46
|
});
|
|
47
47
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'AutoCompleteComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle');
|
|
46
46
|
});
|
|
47
47
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'ComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -42,7 +42,7 @@ function default_1(fileInfo, api) {
|
|
|
42
42
|
}
|
|
43
43
|
const j = api.jscodeshift;
|
|
44
44
|
const rootSource = j(fileInfo.source);
|
|
45
|
-
(0,
|
|
45
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
46
46
|
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
47
47
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'title', 'adaptiveTitle');
|
|
48
48
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -40,7 +40,7 @@ function default_1(fileInfo, api) {
|
|
|
40
40
|
}
|
|
41
41
|
const j = api.jscodeshift;
|
|
42
42
|
const rootSource = j(fileInfo.source);
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
44
44
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle');
|
|
45
45
|
});
|
|
46
46
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownListComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -40,7 +40,7 @@ function default_1(fileInfo, api) {
|
|
|
40
40
|
}
|
|
41
41
|
const j = api.jscodeshift;
|
|
42
42
|
const rootSource = j(fileInfo.source);
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
44
44
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle');
|
|
45
45
|
});
|
|
46
46
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownTreeComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -40,7 +40,7 @@ function default_1(fileInfo, api) {
|
|
|
40
40
|
}
|
|
41
41
|
const j = api.jscodeshift;
|
|
42
42
|
const rootSource = j(fileInfo.source);
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
44
44
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle');
|
|
45
45
|
});
|
|
46
46
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiColumnComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -40,7 +40,7 @@ function default_1(fileInfo, api) {
|
|
|
40
40
|
}
|
|
41
41
|
const j = api.jscodeshift;
|
|
42
42
|
const rootSource = j(fileInfo.source);
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
44
44
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle');
|
|
45
45
|
});
|
|
46
46
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -40,7 +40,7 @@ function default_1(fileInfo, api) {
|
|
|
40
40
|
}
|
|
41
41
|
const j = api.jscodeshift;
|
|
42
42
|
const rootSource = j(fileInfo.source);
|
|
43
|
-
(0,
|
|
43
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
44
44
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle');
|
|
45
45
|
});
|
|
46
46
|
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectTreeComponent', 'subtitle', 'adaptiveSubtitle');
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const
|
|
30
|
+
const index_1 = require("../template-transformer/index");
|
|
31
31
|
const utils_1 = require("../utils");
|
|
32
32
|
const fs = __importStar(require("fs"));
|
|
33
33
|
function default_1(fileInfo, api) {
|
|
@@ -41,7 +41,7 @@ function default_1(fileInfo, api) {
|
|
|
41
41
|
}
|
|
42
42
|
const j = api.jscodeshift;
|
|
43
43
|
const rootSource = j(fileInfo.source);
|
|
44
|
-
(0,
|
|
44
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
|
45
45
|
// Using node-html-parser to parse and manipulate the template
|
|
46
46
|
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'title', 'adaptiveTitle');
|
|
47
47
|
});
|
|
@@ -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: 1747810691,
|
|
14
|
+
version: '19.0.0-develop.29',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -37,8 +37,8 @@ const packageMetadata = {
|
|
|
37
37
|
productName: 'Kendo UI for Angular',
|
|
38
38
|
productCode: 'KENDOUIANGULAR',
|
|
39
39
|
productCodes: ['KENDOUIANGULAR'],
|
|
40
|
-
publishDate:
|
|
41
|
-
version: '19.0.0-develop.
|
|
40
|
+
publishDate: 1747810691,
|
|
41
|
+
version: '19.0.0-develop.29',
|
|
42
42
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
43
43
|
};
|
|
44
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-dropdowns",
|
|
3
|
-
"version": "19.0.0-develop.
|
|
3
|
+
"version": "19.0.0-develop.29",
|
|
4
4
|
"description": "A wide variety of native Angular dropdown components including AutoComplete, ComboBox, DropDownList, DropDownTree, MultiColumnComboBox, MultiSelect, and MultiSelectTree ",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -20,83 +20,78 @@
|
|
|
20
20
|
"migrations": {
|
|
21
21
|
"options": {
|
|
22
22
|
"parser": "tsx",
|
|
23
|
-
"pattern": "*.{
|
|
23
|
+
"pattern": "*.{ts,html}"
|
|
24
24
|
},
|
|
25
25
|
"codemods": {
|
|
26
26
|
"19": [
|
|
27
|
-
{
|
|
28
|
-
"description": "Migrate all breaking changes for the dropdowns package",
|
|
29
|
-
"file": "codemods/v19/index.js",
|
|
30
|
-
"prompt": "true"
|
|
31
|
-
},
|
|
32
27
|
{
|
|
33
28
|
"description": "Migrate subtitle to adaptiveSubtitle for autocomplete",
|
|
34
|
-
"file": "codemods/v19/autocomplete-subtitle.
|
|
29
|
+
"file": "codemods/v19/autocomplete-subtitle.js",
|
|
35
30
|
"prompt": "true"
|
|
36
31
|
},
|
|
37
32
|
{
|
|
38
33
|
"description": "Migrate title to adaptiveTitle for autocomplete",
|
|
39
|
-
"file": "codemods/v19/autocomplete-title.
|
|
34
|
+
"file": "codemods/v19/autocomplete-title.js",
|
|
40
35
|
"prompt": "true"
|
|
41
36
|
},
|
|
42
37
|
{
|
|
43
38
|
"description": "Migrate subtitle to adaptiveSubtitle for combobox",
|
|
44
|
-
"file": "codemods/v19/combobox-subtitle.
|
|
39
|
+
"file": "codemods/v19/combobox-subtitle.js",
|
|
45
40
|
"prompt": "true"
|
|
46
41
|
},
|
|
47
42
|
{
|
|
48
43
|
"description": "Migrate title to adaptiveTitle for combobox",
|
|
49
|
-
"file": "codemods/v19/combobox-title.
|
|
44
|
+
"file": "codemods/v19/combobox-title.js",
|
|
50
45
|
"prompt": "true"
|
|
51
46
|
},
|
|
52
47
|
{
|
|
53
48
|
"description": "Migrate subtitle to adaptiveSubtitle for dropdownlist",
|
|
54
|
-
"file": "codemods/v19/dropdownlist-subtitle.
|
|
49
|
+
"file": "codemods/v19/dropdownlist-subtitle.js",
|
|
55
50
|
"prompt": "true"
|
|
56
51
|
},
|
|
57
52
|
{
|
|
58
53
|
"description": "Migrate title to adaptiveTitle for dropdownlist",
|
|
59
|
-
"file": "codemods/v19/dropdownlist-title.
|
|
54
|
+
"file": "codemods/v19/dropdownlist-title.js",
|
|
60
55
|
"prompt": "true"
|
|
61
56
|
},
|
|
62
57
|
{
|
|
63
58
|
"description": "Migrate subtitle to adaptiveSubtitle for dropdowntree",
|
|
64
|
-
"file": "codemods/v19/dropdowntree-subtitle.
|
|
59
|
+
"file": "codemods/v19/dropdowntree-subtitle.js",
|
|
65
60
|
"prompt": "true"
|
|
66
61
|
},
|
|
67
62
|
{
|
|
68
63
|
"description": "Migrate title to adaptiveTitle for dropdowntree",
|
|
69
|
-
"file": "codemods/v19/dropdowntree-title.
|
|
64
|
+
"file": "codemods/v19/dropdowntree-title.js",
|
|
70
65
|
"prompt": "true"
|
|
71
66
|
},
|
|
72
67
|
{
|
|
73
68
|
"description": "Migrate subtitle to adaptiveSubtitle for multicolumncombobox",
|
|
74
|
-
"file": "codemods/v19/multicolumncombobox-subtitle.
|
|
69
|
+
"file": "codemods/v19/multicolumncombobox-subtitle.js",
|
|
75
70
|
"prompt": "true"
|
|
76
71
|
},
|
|
77
72
|
{
|
|
78
73
|
"description": "Migrate title to adaptiveTitle for multicolumncombobox",
|
|
79
|
-
"file": "codemods/v19/multicolumncombobox-title.
|
|
74
|
+
"file": "codemods/v19/multicolumncombobox-title.js",
|
|
80
75
|
"prompt": "true"
|
|
81
76
|
},
|
|
82
77
|
{
|
|
83
78
|
"description": "Migrate subtitle to adaptiveSubtitle for multiselect",
|
|
84
|
-
"file": "codemods/v19/multiselect-subtitle.
|
|
79
|
+
"file": "codemods/v19/multiselect-subtitle.js",
|
|
85
80
|
"prompt": "true"
|
|
86
81
|
},
|
|
87
82
|
{
|
|
88
83
|
"description": "Migrate title to adaptiveTitle for multiselect",
|
|
89
|
-
"file": "codemods/v19/multiselect-title.
|
|
84
|
+
"file": "codemods/v19/multiselect-title.js",
|
|
90
85
|
"prompt": "true"
|
|
91
86
|
},
|
|
92
87
|
{
|
|
93
88
|
"description": "Migrate subtitle to adaptiveSubtitle for multiselecttree",
|
|
94
|
-
"file": "codemods/v19/multiselecttree-subtitle.
|
|
89
|
+
"file": "codemods/v19/multiselecttree-subtitle.js",
|
|
95
90
|
"prompt": "true"
|
|
96
91
|
},
|
|
97
92
|
{
|
|
98
93
|
"description": "Migrate title to adaptiveTitle for multiselecttree",
|
|
99
|
-
"file": "codemods/v19/multiselecttree-title.
|
|
94
|
+
"file": "codemods/v19/multiselecttree-title.js",
|
|
100
95
|
"prompt": "true"
|
|
101
96
|
}
|
|
102
97
|
]
|
|
@@ -105,7 +100,7 @@
|
|
|
105
100
|
"package": {
|
|
106
101
|
"productName": "Kendo UI for Angular",
|
|
107
102
|
"productCode": "KENDOUIANGULAR",
|
|
108
|
-
"publishDate":
|
|
103
|
+
"publishDate": 1747810691,
|
|
109
104
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
110
105
|
}
|
|
111
106
|
},
|
|
@@ -116,18 +111,18 @@
|
|
|
116
111
|
"@angular/forms": "16 - 19",
|
|
117
112
|
"@angular/platform-browser": "16 - 19",
|
|
118
113
|
"@progress/kendo-licensing": "^1.5.0",
|
|
119
|
-
"@progress/kendo-angular-common": "19.0.0-develop.
|
|
120
|
-
"@progress/kendo-angular-utils": "19.0.0-develop.
|
|
121
|
-
"@progress/kendo-angular-l10n": "19.0.0-develop.
|
|
122
|
-
"@progress/kendo-angular-navigation": "19.0.0-develop.
|
|
123
|
-
"@progress/kendo-angular-popup": "19.0.0-develop.
|
|
124
|
-
"@progress/kendo-angular-icons": "19.0.0-develop.
|
|
125
|
-
"@progress/kendo-angular-treeview": "19.0.0-develop.
|
|
114
|
+
"@progress/kendo-angular-common": "19.0.0-develop.29",
|
|
115
|
+
"@progress/kendo-angular-utils": "19.0.0-develop.29",
|
|
116
|
+
"@progress/kendo-angular-l10n": "19.0.0-develop.29",
|
|
117
|
+
"@progress/kendo-angular-navigation": "19.0.0-develop.29",
|
|
118
|
+
"@progress/kendo-angular-popup": "19.0.0-develop.29",
|
|
119
|
+
"@progress/kendo-angular-icons": "19.0.0-develop.29",
|
|
120
|
+
"@progress/kendo-angular-treeview": "19.0.0-develop.29",
|
|
126
121
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
127
122
|
},
|
|
128
123
|
"dependencies": {
|
|
129
124
|
"tslib": "^2.3.1",
|
|
130
|
-
"@progress/kendo-angular-schematics": "19.0.0-develop.
|
|
125
|
+
"@progress/kendo-angular-schematics": "19.0.0-develop.29",
|
|
131
126
|
"@progress/kendo-common": "^1.0.1"
|
|
132
127
|
},
|
|
133
128
|
"schematics": "./schematics/collection.json",
|
|
@@ -4,9 +4,9 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'DropDownsModule', package: 'dropdowns', peerDependencies: {
|
|
6
6
|
// peers of the treeview
|
|
7
|
-
'@progress/kendo-angular-inputs': '19.0.0-develop.
|
|
7
|
+
'@progress/kendo-angular-inputs': '19.0.0-develop.29',
|
|
8
8
|
// peers of inputs
|
|
9
|
-
'@progress/kendo-angular-intl': '19.0.0-develop.
|
|
9
|
+
'@progress/kendo-angular-intl': '19.0.0-develop.29',
|
|
10
10
|
'@progress/kendo-drawing': '^1.17.2',
|
|
11
11
|
// Peer dependency of icons
|
|
12
12
|
'@progress/kendo-svg-icons': '^4.0.0'
|
package/codemods/v19/index.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
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
|
-
let updatedContent = fileInfo.source;
|
|
38
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdownlist', 'title', 'adaptiveTitle');
|
|
39
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-combobox', 'title', 'adaptiveTitle');
|
|
40
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-autocomplete', 'title', 'adaptiveTitle');
|
|
41
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselect', 'title', 'adaptiveTitle');
|
|
42
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle');
|
|
43
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdowntree', 'title', 'adaptiveTitle');
|
|
44
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselecttree', 'title', 'adaptiveTitle');
|
|
45
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle');
|
|
46
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle');
|
|
47
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle');
|
|
48
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle');
|
|
49
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle');
|
|
50
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle');
|
|
51
|
-
updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle');
|
|
52
|
-
// Only write to file once after all transformations
|
|
53
|
-
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const j = api.jscodeshift;
|
|
57
|
-
const rootSource = j(fileInfo.source);
|
|
58
|
-
(0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
|
|
59
|
-
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
|
60
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'title', 'adaptiveTitle');
|
|
61
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'title', 'adaptiveTitle');
|
|
62
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'title', 'adaptiveTitle');
|
|
63
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'title', 'adaptiveTitle');
|
|
64
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle');
|
|
65
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'title', 'adaptiveTitle');
|
|
66
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'title', 'adaptiveTitle');
|
|
67
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle');
|
|
68
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle');
|
|
69
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle');
|
|
70
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle');
|
|
71
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle');
|
|
72
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle');
|
|
73
|
-
(0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle');
|
|
74
|
-
});
|
|
75
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownListComponent', 'title', 'adaptiveTitle');
|
|
76
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'ComboBoxComponent', 'title', 'adaptiveTitle');
|
|
77
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'AutoCompleteComponent', 'title', 'adaptiveTitle');
|
|
78
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectComponent', 'title', 'adaptiveTitle');
|
|
79
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiColumnComboBoxComponent', 'title', 'adaptiveTitle');
|
|
80
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownTreeComponent', 'title', 'adaptiveTitle');
|
|
81
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectTreeComponent', 'title', 'adaptiveTitle');
|
|
82
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownListComponent', 'subtitle', 'adaptiveSubtitle');
|
|
83
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'ComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
|
|
84
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'AutoCompleteComponent', 'subtitle', 'adaptiveSubtitle');
|
|
85
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectComponent', 'subtitle', 'adaptiveSubtitle');
|
|
86
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiColumnComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
|
|
87
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'DropDownTreeComponent', 'subtitle', 'adaptiveSubtitle');
|
|
88
|
-
(0, utils_1.tsPropertyTransformer)(rootSource, j, 'MultiSelectTreeComponent', 'subtitle', 'adaptiveSubtitle');
|
|
89
|
-
return rootSource.toSource();
|
|
90
|
-
}
|
|
91
|
-
exports.default = default_1;
|