@progress/kendo-angular-toolbar 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.
@@ -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,295 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
30
+ return (mod && mod.__esModule) ? mod : { "default": mod };
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.htmlAttributeValueTransformer = exports.htmlAttributeTransformer = exports.tsPropertyTransformer = exports.tsPropertyValueTransformer = exports.templateAttributeTransformer = exports.templateAttributeValueTransformer = void 0;
34
+ const node_html_parser_1 = __importDefault(require("node-html-parser"));
35
+ const fs = __importStar(require("fs"));
36
+ const templateAttributeValueTransformer = (root, tagName, attributeName, oldAttributeValue, newAttributeValue) => {
37
+ const elements = Array.from(root.getElementsByTagName(tagName)) || [];
38
+ for (const element of elements) {
39
+ // Handle bound attributes (e.g., [showText]="'overflow'")
40
+ const boundAttr = element.getAttribute(`[${attributeName}]`);
41
+ if (boundAttr === `'${oldAttributeValue}'`) {
42
+ // For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
43
+ element.setAttribute(`[${attributeName}]`, boundAttr.replace(oldAttributeValue, newAttributeValue));
44
+ }
45
+ // Handle static attributes like title="foo"
46
+ const staticAttrValue = element.getAttribute(attributeName);
47
+ if (staticAttrValue === oldAttributeValue) {
48
+ element.setAttribute(attributeName, newAttributeValue);
49
+ }
50
+ }
51
+ };
52
+ exports.templateAttributeValueTransformer = templateAttributeValueTransformer;
53
+ const templateAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
54
+ const elements = Array.from(root.getElementsByTagName(tagName)) || [];
55
+ for (const element of elements) {
56
+ // Handle bound attributes like [title]="foo" or [title]="'foo'"
57
+ const boundAttr = element.getAttribute(`[${attributeName}]`);
58
+ if (boundAttr) {
59
+ element.setAttribute(`[${newAttributeName}]`, boundAttr);
60
+ element.removeAttribute(`[${attributeName}]`);
61
+ }
62
+ // Handle static attributes like title="foo"
63
+ const staticAttr = element.getAttribute(attributeName);
64
+ if (staticAttr) {
65
+ element.setAttribute(newAttributeName, staticAttr);
66
+ element.removeAttribute(attributeName);
67
+ }
68
+ }
69
+ };
70
+ exports.templateAttributeTransformer = templateAttributeTransformer;
71
+ const tsPropertyValueTransformer = (root, j, typeName, oldValue, newValue) => {
72
+ // 1. Find all class properties with the specified type
73
+ root
74
+ .find(j.ClassProperty)
75
+ .filter(path => {
76
+ // Check if the property has a type annotation matching the specified type
77
+ if (path.node.typeAnnotation &&
78
+ path.node.typeAnnotation.typeAnnotation &&
79
+ path.node.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
80
+ path.node.typeAnnotation.typeAnnotation.typeName &&
81
+ path.node.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
82
+ path.node.typeAnnotation.typeAnnotation.typeName.name === typeName) {
83
+ return true;
84
+ }
85
+ return false;
86
+ })
87
+ .forEach(path => {
88
+ // Update the value if it matches the old value
89
+ if (path.node.value &&
90
+ path.node.value.type === 'StringLiteral' &&
91
+ path.node.value.value === oldValue) {
92
+ path.node.value.value = newValue;
93
+ }
94
+ });
95
+ // 2. Find all assignments to variables of the specified type
96
+ const variablesOfType = new Set();
97
+ // First, collect all variables with the specified type
98
+ root
99
+ .find(j.VariableDeclarator)
100
+ .filter(path => {
101
+ if (path.node.id.type === 'Identifier' &&
102
+ path.node.id.typeAnnotation &&
103
+ path.node.id.typeAnnotation.typeAnnotation &&
104
+ path.node.id.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
105
+ path.node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
106
+ path.node.id.typeAnnotation.typeAnnotation.typeName.name === typeName) {
107
+ return true;
108
+ }
109
+ return false;
110
+ })
111
+ .forEach(path => {
112
+ if (path.node.id.type === 'Identifier') {
113
+ variablesOfType.add(path.node.id.name);
114
+ // Also update the initial value if it matches
115
+ if (path.node.init &&
116
+ path.node.init.type === 'StringLiteral' &&
117
+ path.node.init.value === oldValue) {
118
+ path.node.init.value = newValue;
119
+ }
120
+ }
121
+ });
122
+ // 3. Update literals in assignment expressions
123
+ root
124
+ .find(j.AssignmentExpression)
125
+ .filter(path => {
126
+ // Only process string literals with the old value
127
+ return path.node.right.type === 'StringLiteral' &&
128
+ path.node.right.value === oldValue;
129
+ })
130
+ .forEach(path => {
131
+ // Update the value
132
+ path.node.right.value = newValue;
133
+ });
134
+ // 4. Also look for string literals in attributes within JSX elements
135
+ root
136
+ .find(j.JSXAttribute, {
137
+ value: {
138
+ type: 'StringLiteral',
139
+ value: oldValue
140
+ }
141
+ })
142
+ .forEach(path => {
143
+ if (path.node.value?.type === 'StringLiteral') {
144
+ path.node.value.value = newValue;
145
+ }
146
+ });
147
+ };
148
+ exports.tsPropertyValueTransformer = tsPropertyValueTransformer;
149
+ const tsPropertyTransformer = (root, j, componentType, propertyName, newPropertyName) => {
150
+ // Find all class properties that are of type DropDownListComponent
151
+ const properties = new Set();
152
+ // Find properties with type annotations
153
+ root
154
+ .find(j.ClassProperty, {
155
+ typeAnnotation: {
156
+ typeAnnotation: {
157
+ typeName: {
158
+ name: componentType
159
+ }
160
+ }
161
+ }
162
+ })
163
+ .forEach(path => {
164
+ if (path.node.key.type === 'Identifier') {
165
+ properties.add(path.node.key.name);
166
+ }
167
+ });
168
+ // Find function parameters of type componentType
169
+ const parameters = new Set();
170
+ root
171
+ .find(j.FunctionDeclaration)
172
+ .forEach(path => {
173
+ if (path.node.params) {
174
+ path.node.params.forEach(param => {
175
+ if (param.type === 'Identifier' &&
176
+ param.typeAnnotation &&
177
+ param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
178
+ param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
179
+ param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
180
+ parameters.add(param.name);
181
+ }
182
+ });
183
+ }
184
+ });
185
+ // Also check method declarations in classes
186
+ root
187
+ .find(j.ClassMethod)
188
+ .forEach(path => {
189
+ if (path.node.params) {
190
+ path.node.params.forEach(param => {
191
+ if (param.type === 'Identifier' &&
192
+ param.typeAnnotation &&
193
+ param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
194
+ param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
195
+ param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
196
+ parameters.add(param.name);
197
+ }
198
+ });
199
+ }
200
+ });
201
+ // Find all member expressions where title property is accessed on any componentType instance
202
+ root
203
+ .find(j.MemberExpression, {
204
+ property: {
205
+ type: 'Identifier',
206
+ name: propertyName
207
+ }
208
+ })
209
+ .filter(path => {
210
+ // Filter to only include accesses on properties that are componentType instances
211
+ if (path.node.object.type === 'MemberExpression' &&
212
+ path.node.object.property.type === 'Identifier') {
213
+ // handle properties of this
214
+ if (path.node.object.object.type === 'ThisExpression' &&
215
+ properties.has(path.node.object.property.name)) {
216
+ return true;
217
+ }
218
+ }
219
+ // Handle function parameters
220
+ if (path.node.object.type === 'Identifier' &&
221
+ parameters.has(path.node.object.name)) {
222
+ return true;
223
+ }
224
+ return false;
225
+ })
226
+ .forEach(path => {
227
+ // Replace old property name with new property name
228
+ if (path.node.property.type === 'Identifier') {
229
+ path.node.property.name = newPropertyName;
230
+ }
231
+ });
232
+ };
233
+ exports.tsPropertyTransformer = tsPropertyTransformer;
234
+ const htmlAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
235
+ const filePath = fileInfo.path;
236
+ const fileContent = fileInfo.source;
237
+ const root = (0, node_html_parser_1.default)(fileContent);
238
+ // Locate elements using [oldName] binding and update the old attribute to the new one
239
+ const elements = Array.from(root.querySelectorAll(tagName));
240
+ for (const element of elements) {
241
+ const boundTitleAttr = element.getAttribute(`[${oldName}]`);
242
+ if (boundTitleAttr) {
243
+ element.removeAttribute(`[${oldName}]`);
244
+ element.setAttribute(`[${newName}]`, boundTitleAttr);
245
+ }
246
+ const staticTitleAttr = element.getAttribute(oldName);
247
+ if (staticTitleAttr) {
248
+ element.removeAttribute(oldName);
249
+ element.setAttribute(newName, staticTitleAttr);
250
+ }
251
+ }
252
+ // Write the updated content back to the file
253
+ const updatedContent = root.toString();
254
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
255
+ return;
256
+ };
257
+ exports.htmlAttributeTransformer = htmlAttributeTransformer;
258
+ const htmlAttributeValueTransformer = (fileInfo, tagName, attributeName, oldValue, newValue) => {
259
+ // Read file content from fileInfo
260
+ const fileContent = fileInfo.source;
261
+ // Parse the HTML content
262
+ const root = (0, node_html_parser_1.default)(fileContent);
263
+ // Find all elements matching the tagName
264
+ const elements = root.querySelectorAll(tagName);
265
+ let modified = false;
266
+ // Process each element
267
+ for (const element of elements) {
268
+ // Handle static attributes (e.g., showText="overflow")
269
+ const staticAttr = element.getAttribute(attributeName);
270
+ if (staticAttr === oldValue) {
271
+ element.setAttribute(attributeName, newValue);
272
+ modified = true;
273
+ console.log(`Modified static attribute ${attributeName} from "${oldValue}" to "${newValue}" in element:`, element.toString().substring(0, 100));
274
+ }
275
+ // Handle bound attributes (e.g., [showText]="overflow")
276
+ const boundAttr = element.getAttribute(`[${attributeName}]`);
277
+ if (boundAttr) {
278
+ // For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
279
+ if (boundAttr === `'${oldValue}'` || boundAttr === `"${oldValue}"`) {
280
+ const updatedValue = boundAttr.replace(oldValue, newValue);
281
+ element.setAttribute(`[${attributeName}]`, updatedValue);
282
+ modified = true;
283
+ console.log(`Modified bound attribute [${attributeName}] from "${boundAttr}" to "${updatedValue}" in element:`, element.toString().substring(0, 100));
284
+ }
285
+ }
286
+ }
287
+ // Return modified content if changes were made
288
+ if (modified) {
289
+ const updatedContent = root.toString();
290
+ return updatedContent;
291
+ }
292
+ // Return original content if no changes were made or if there was an error
293
+ return fileContent;
294
+ };
295
+ exports.htmlAttributeValueTransformer = htmlAttributeValueTransformer;
@@ -0,0 +1,57 @@
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
+ if (filePath.endsWith('.html')) {
36
+ let updatedContent = fileInfo.source;
37
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
38
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'both', 'always');
39
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
40
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
41
+ // Only write to file once after all transformations
42
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
43
+ return;
44
+ }
45
+ const j = api.jscodeshift;
46
+ const rootSource = j(fileInfo.source);
47
+ (0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
48
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
49
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'both', 'always');
50
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
51
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
52
+ });
53
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'overflow', 'menu');
54
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'both', 'always');
55
+ return rootSource.toSource();
56
+ }
57
+ exports.default = default_1;
@@ -0,0 +1,53 @@
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
+ if (filePath.endsWith('.html')) {
36
+ let updatedContent = fileInfo.source;
37
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
38
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
39
+ // Only write to file once after all transformations
40
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
41
+ return;
42
+ }
43
+ const j = api.jscodeshift;
44
+ const rootSource = j(fileInfo.source);
45
+ (0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
46
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'overflow', 'menu');
47
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showIcon', 'both', 'always');
48
+ });
49
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'overflow', 'menu');
50
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'both', 'always');
51
+ return rootSource.toSource();
52
+ }
53
+ exports.default = default_1;
@@ -0,0 +1,53 @@
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
+ if (filePath.endsWith('.html')) {
36
+ let updatedContent = fileInfo.source;
37
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
38
+ updatedContent = (0, utils_1.htmlAttributeValueTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-toolbar-button', 'showText', 'both', 'always');
39
+ // Only write to file once after all transformations
40
+ fs.writeFileSync(filePath, updatedContent, 'utf-8');
41
+ return;
42
+ }
43
+ const j = api.jscodeshift;
44
+ const rootSource = j(fileInfo.source);
45
+ (0, template_transformer_1.templateTransformer)(rootSource, j, (root) => {
46
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'overflow', 'menu');
47
+ (0, utils_1.templateAttributeValueTransformer)(root, 'kendo-toolbar-button', 'showText', 'both', 'always');
48
+ });
49
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'overflow', 'menu');
50
+ (0, utils_1.tsPropertyValueTransformer)(rootSource, j, 'DisplayMode', 'both', 'always');
51
+ return rootSource.toSource();
52
+ }
53
+ 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: 1747417328,
14
- version: '19.0.0-develop.23',
13
+ publishDate: 1747671320,
14
+ version: '19.0.0-develop.25',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -26,8 +26,8 @@ const packageMetadata = {
26
26
  productName: 'Kendo UI for Angular',
27
27
  productCode: 'KENDOUIANGULAR',
28
28
  productCodes: ['KENDOUIANGULAR'],
29
- publishDate: 1747417328,
30
- version: '19.0.0-develop.23',
29
+ publishDate: 1747671320,
30
+ version: '19.0.0-develop.25',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
32
32
  };
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-toolbar",
3
- "version": "19.0.0-develop.23",
3
+ "version": "19.0.0-develop.25",
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",
@@ -22,10 +22,35 @@
22
22
  ],
23
23
  "@progress": {
24
24
  "friendlyName": "ToolBar",
25
+ "migrations": {
26
+ "options": {
27
+ "parser": "tsx",
28
+ "pattern": "*.{t,j}s"
29
+ },
30
+ "codemods": {
31
+ "19": [
32
+ {
33
+ "description": "Migrate all breaking changes for the toolbar package",
34
+ "file": "codemods/v19/index.js",
35
+ "prompt": "true"
36
+ },
37
+ {
38
+ "description": "Migrate showIcon's overflow value to menu and both value to always",
39
+ "file": "codemods/v19/toolbar-button-showicon.ts",
40
+ "prompt": "true"
41
+ },
42
+ {
43
+ "description": "Migrate showText's overflow value to menu and both value to always",
44
+ "file": "codemods/v19/toolbar-button-showtext.ts",
45
+ "prompt": "true"
46
+ }
47
+ ]
48
+ }
49
+ },
25
50
  "package": {
26
51
  "productName": "Kendo UI for Angular",
27
52
  "productCode": "KENDOUIANGULAR",
28
- "publishDate": 1747417328,
53
+ "publishDate": 1747671320,
29
54
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
30
55
  }
31
56
  },
@@ -35,16 +60,17 @@
35
60
  "@angular/core": "16 - 19",
36
61
  "@angular/platform-browser": "16 - 19",
37
62
  "@progress/kendo-licensing": "^1.5.0",
38
- "@progress/kendo-angular-buttons": "19.0.0-develop.23",
39
- "@progress/kendo-angular-common": "19.0.0-develop.23",
40
- "@progress/kendo-angular-l10n": "19.0.0-develop.23",
41
- "@progress/kendo-angular-icons": "19.0.0-develop.23",
42
- "@progress/kendo-angular-popup": "19.0.0-develop.23",
63
+ "@progress/kendo-angular-buttons": "19.0.0-develop.25",
64
+ "@progress/kendo-angular-common": "19.0.0-develop.25",
65
+ "@progress/kendo-angular-l10n": "19.0.0-develop.25",
66
+ "@progress/kendo-angular-icons": "19.0.0-develop.25",
67
+ "@progress/kendo-angular-indicators": "19.0.0-develop.25",
68
+ "@progress/kendo-angular-popup": "19.0.0-develop.25",
43
69
  "rxjs": "^6.5.3 || ^7.0.0"
44
70
  },
45
71
  "dependencies": {
46
72
  "tslib": "^2.3.1",
47
- "@progress/kendo-angular-schematics": "19.0.0-develop.23"
73
+ "@progress/kendo-angular-schematics": "19.0.0-develop.25"
48
74
  },
49
75
  "schematics": "./schematics/collection.json",
50
76
  "module": "fesm2022/progress-kendo-angular-toolbar.mjs",