@progress/kendo-angular-grid 19.0.0-develop.22 → 19.0.0-develop.24

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,131 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.htmlAttributeTransformer = exports.tsPropertyTransformer = exports.templateAttributeTransformer = void 0;
11
+ const node_html_parser_1 = __importDefault(require("node-html-parser"));
12
+ const templateAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
13
+ const elements = Array.from(root.getElementsByTagName(tagName)) || [];
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
+ }
22
+ };
23
+ exports.templateAttributeTransformer = templateAttributeTransformer;
24
+ const tsPropertyTransformer = (root, j, componentType, propertyName, newPropertyName) => {
25
+ // Find all class properties that are of type DropDownListComponent
26
+ const properties = new Set();
27
+ // Find properties with type annotations
28
+ root
29
+ .find(j.ClassProperty, {
30
+ typeAnnotation: {
31
+ typeAnnotation: {
32
+ typeName: {
33
+ name: componentType
34
+ }
35
+ }
36
+ }
37
+ })
38
+ .forEach(path => {
39
+ if (path.node.key.type === 'Identifier') {
40
+ properties.add(path.node.key.name);
41
+ }
42
+ });
43
+ // Find function parameters of type componentType
44
+ const parameters = new Set();
45
+ root
46
+ .find(j.FunctionDeclaration)
47
+ .forEach(path => {
48
+ if (path.node.params) {
49
+ path.node.params.forEach(param => {
50
+ if (param.type === 'Identifier' &&
51
+ param.typeAnnotation &&
52
+ param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
53
+ param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
54
+ param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
55
+ parameters.add(param.name);
56
+ }
57
+ });
58
+ }
59
+ });
60
+ // Also check method declarations in classes
61
+ root
62
+ .find(j.ClassMethod)
63
+ .forEach(path => {
64
+ if (path.node.params) {
65
+ path.node.params.forEach(param => {
66
+ if (param.type === 'Identifier' &&
67
+ param.typeAnnotation &&
68
+ param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
69
+ param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
70
+ param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
71
+ parameters.add(param.name);
72
+ }
73
+ });
74
+ }
75
+ });
76
+ // Find all member expressions where title property is accessed on any componentType instance
77
+ root
78
+ .find(j.MemberExpression, {
79
+ property: {
80
+ type: 'Identifier',
81
+ name: propertyName
82
+ }
83
+ })
84
+ .filter(path => {
85
+ // Filter to only include accesses on properties that are componentType instances
86
+ if (path.node.object.type === 'MemberExpression' &&
87
+ path.node.object.property.type === 'Identifier') {
88
+ // handle properties of this
89
+ if (path.node.object.object.type === 'ThisExpression' &&
90
+ properties.has(path.node.object.property.name)) {
91
+ return true;
92
+ }
93
+ }
94
+ // Handle function parameters
95
+ if (path.node.object.type === 'Identifier' &&
96
+ parameters.has(path.node.object.name)) {
97
+ return true;
98
+ }
99
+ return false;
100
+ })
101
+ .forEach(path => {
102
+ // Replace old property name with new property name
103
+ if (path.node.property.type === 'Identifier') {
104
+ path.node.property.name = newPropertyName;
105
+ }
106
+ });
107
+ };
108
+ exports.tsPropertyTransformer = tsPropertyTransformer;
109
+ const htmlAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
110
+ const fileContent = fileInfo.source;
111
+ const root = (0, node_html_parser_1.default)(fileContent);
112
+ let modified = false;
113
+ // Locate elements using [oldName] binding and update the old attribute to the new one
114
+ const elements = Array.from(root.querySelectorAll(tagName));
115
+ for (const element of elements) {
116
+ const boundTitleAttr = element.getAttribute(`[${oldName}]`);
117
+ if (boundTitleAttr) {
118
+ element.removeAttribute(`[${oldName}]`);
119
+ element.setAttribute(`[${newName}]`, boundTitleAttr);
120
+ modified = true;
121
+ }
122
+ }
123
+ // Return modified content if changes were made
124
+ if (modified) {
125
+ const updatedContent = root.toString();
126
+ return updatedContent;
127
+ }
128
+ // Return original content if no changes were made or if there was an error
129
+ return fileContent;
130
+ };
131
+ exports.htmlAttributeTransformer = htmlAttributeTransformer;
@@ -0,0 +1,51 @@
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
+ let updatedContent = fileInfo.source;
38
+ updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
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
+ // Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
47
+ (0, utils_1.templateAttributeTransformer)(root, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
48
+ });
49
+ return rootSource.toSource();
50
+ }
51
+ exports.default = default_1;
@@ -0,0 +1,51 @@
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
+ let updatedContent = fileInfo.source;
38
+ updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
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
+ // Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
47
+ (0, utils_1.templateAttributeTransformer)(root, 'kendo-grid', 'kendoGridGroupBinding', 'kendoGridBinding');
48
+ });
49
+ return rootSource.toSource();
50
+ }
51
+ 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: 1747414852,
14
- version: '19.0.0-develop.22',
13
+ publishDate: 1747666920,
14
+ version: '19.0.0-develop.24',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -20421,8 +20421,8 @@ const packageMetadata = {
20421
20421
  productName: 'Kendo UI for Angular',
20422
20422
  productCode: 'KENDOUIANGULAR',
20423
20423
  productCodes: ['KENDOUIANGULAR'],
20424
- publishDate: 1747414852,
20425
- version: '19.0.0-develop.22',
20424
+ publishDate: 1747666920,
20425
+ version: '19.0.0-develop.24',
20426
20426
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
20427
20427
  };
20428
20428
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "19.0.0-develop.22",
3
+ "version": "19.0.0-develop.24",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,10 +23,30 @@
23
23
  ],
24
24
  "@progress": {
25
25
  "friendlyName": "Grid",
26
+ "migrations": {
27
+ "options": {
28
+ "parser": "tsx",
29
+ "pattern": "*.{t,j}s"
30
+ },
31
+ "codemods": {
32
+ "19": [
33
+ {
34
+ "description": "Migrate all breaking changes for the grid package",
35
+ "file": "codemods/v19/index.js",
36
+ "prompt": "true"
37
+ },
38
+ {
39
+ "description": "The Grid's kendoGridGroupBinding directive is deprecated",
40
+ "file": "codemods/v19/grid-kendogridgroupbinding.js",
41
+ "prompt": "true"
42
+ }
43
+ ]
44
+ }
45
+ },
26
46
  "package": {
27
47
  "productName": "Kendo UI for Angular",
28
48
  "productCode": "KENDOUIANGULAR",
29
- "publishDate": 1747414852,
49
+ "publishDate": 1747666920,
30
50
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
31
51
  }
32
52
  },
@@ -39,29 +59,29 @@
39
59
  "@progress/kendo-data-query": "^1.0.0",
40
60
  "@progress/kendo-drawing": "^1.21.0",
41
61
  "@progress/kendo-licensing": "^1.5.0",
42
- "@progress/kendo-angular-buttons": "19.0.0-develop.22",
43
- "@progress/kendo-angular-common": "19.0.0-develop.22",
44
- "@progress/kendo-angular-dateinputs": "19.0.0-develop.22",
45
- "@progress/kendo-angular-layout": "19.0.0-develop.22",
46
- "@progress/kendo-angular-navigation": "19.0.0-develop.22",
47
- "@progress/kendo-angular-dropdowns": "19.0.0-develop.22",
48
- "@progress/kendo-angular-excel-export": "19.0.0-develop.22",
49
- "@progress/kendo-angular-icons": "19.0.0-develop.22",
50
- "@progress/kendo-angular-inputs": "19.0.0-develop.22",
51
- "@progress/kendo-angular-indicators": "19.0.0-develop.22",
52
- "@progress/kendo-angular-intl": "19.0.0-develop.22",
53
- "@progress/kendo-angular-l10n": "19.0.0-develop.22",
54
- "@progress/kendo-angular-label": "19.0.0-develop.22",
55
- "@progress/kendo-angular-pager": "19.0.0-develop.22",
56
- "@progress/kendo-angular-pdf-export": "19.0.0-develop.22",
57
- "@progress/kendo-angular-popup": "19.0.0-develop.22",
58
- "@progress/kendo-angular-toolbar": "19.0.0-develop.22",
59
- "@progress/kendo-angular-utils": "19.0.0-develop.22",
62
+ "@progress/kendo-angular-buttons": "19.0.0-develop.24",
63
+ "@progress/kendo-angular-common": "19.0.0-develop.24",
64
+ "@progress/kendo-angular-dateinputs": "19.0.0-develop.24",
65
+ "@progress/kendo-angular-layout": "19.0.0-develop.24",
66
+ "@progress/kendo-angular-navigation": "19.0.0-develop.24",
67
+ "@progress/kendo-angular-dropdowns": "19.0.0-develop.24",
68
+ "@progress/kendo-angular-excel-export": "19.0.0-develop.24",
69
+ "@progress/kendo-angular-icons": "19.0.0-develop.24",
70
+ "@progress/kendo-angular-inputs": "19.0.0-develop.24",
71
+ "@progress/kendo-angular-indicators": "19.0.0-develop.24",
72
+ "@progress/kendo-angular-intl": "19.0.0-develop.24",
73
+ "@progress/kendo-angular-l10n": "19.0.0-develop.24",
74
+ "@progress/kendo-angular-label": "19.0.0-develop.24",
75
+ "@progress/kendo-angular-pager": "19.0.0-develop.24",
76
+ "@progress/kendo-angular-pdf-export": "19.0.0-develop.24",
77
+ "@progress/kendo-angular-popup": "19.0.0-develop.24",
78
+ "@progress/kendo-angular-toolbar": "19.0.0-develop.24",
79
+ "@progress/kendo-angular-utils": "19.0.0-develop.24",
60
80
  "rxjs": "^6.5.3 || ^7.0.0"
61
81
  },
62
82
  "dependencies": {
63
83
  "tslib": "^2.3.1",
64
- "@progress/kendo-angular-schematics": "19.0.0-develop.22",
84
+ "@progress/kendo-angular-schematics": "19.0.0-develop.24",
65
85
  "@progress/kendo-common": "^1.0.1",
66
86
  "@progress/kendo-file-saver": "^1.0.0"
67
87
  },
@@ -4,14 +4,14 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
6
6
  // peer deps of the dropdowns
7
- '@progress/kendo-angular-treeview': '19.0.0-develop.22',
8
- '@progress/kendo-angular-navigation': '19.0.0-develop.22',
7
+ '@progress/kendo-angular-treeview': '19.0.0-develop.24',
8
+ '@progress/kendo-angular-navigation': '19.0.0-develop.24',
9
9
  // peer dependency of kendo-angular-inputs
10
- '@progress/kendo-angular-dialog': '19.0.0-develop.22',
10
+ '@progress/kendo-angular-dialog': '19.0.0-develop.24',
11
11
  // peer dependency of kendo-angular-icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0',
13
13
  // peer dependency of kendo-angular-layout
14
- '@progress/kendo-angular-progressbar': '19.0.0-develop.22'
14
+ '@progress/kendo-angular-progressbar': '19.0.0-develop.24'
15
15
  } });
16
16
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
17
17
  }