@progress/kendo-angular-dropdowns 21.2.0-develop.1 → 21.2.0-develop.11

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.
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'AutoCompleteComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'AutoCompleteComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-autocomplete', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-autocomplete', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-autocomplete', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'AutoCompleteComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'AutoCompleteComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'ComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'ComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,26 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
36
- // Check if the file is an HTML file
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-combobox', 'title', 'adaptiveTitle'));
37
37
  if (filePath.endsWith('.html')) {
38
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
39
- let updatedContent = fileInfo.source;
40
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-combobox', 'title', 'adaptiveTitle');
41
- // Only write to file once after all transformations
42
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
43
41
  }
44
- return;
42
+ return fileInfo.source; // Return original source if no changes
45
43
  }
44
+ // Handle TypeScript property transformations
46
45
  const j = api.jscodeshift;
47
- const rootSource = j(fileInfo.source);
48
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
49
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-combobox', 'title', 'adaptiveTitle');
50
- });
51
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'ComboBoxComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'ComboBoxComponent', 'title', 'adaptiveTitle');
52
48
  return rootSource.toSource();
53
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DropDownListComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'DropDownListComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,26 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-dropdownlist', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdownlist', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- // Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
49
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdownlist', 'title', 'adaptiveTitle');
50
- });
51
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DropDownListComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'DropDownListComponent', 'title', 'adaptiveTitle');
52
48
  return rootSource.toSource();
53
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DropDownTreeComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'DropDownTreeComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-dropdowntree', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-dropdowntree', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-dropdowntree', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DropDownTreeComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'DropDownTreeComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiColumnComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiColumnComboBoxComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multicolumncombobox', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiColumnComboBoxComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiColumnComboBoxComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiSelectComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiSelectComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multiselect', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselect', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselect', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiSelectComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiSelectComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiSelectTreeComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiSelectTreeComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -28,25 +28,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
- const index_1 = require("../template-transformer/index");
32
- const utils_1 = require("../utils");
33
31
  const fs = __importStar(require("fs"));
32
+ const utils_1 = require("../utils");
34
33
  function default_1(fileInfo, api) {
35
34
  const filePath = fileInfo.path;
35
+ // Handle HTML files and inline templates
36
+ const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameUpdate)(templateContent, 'kendo-multiselecttree', 'title', 'adaptiveTitle'));
36
37
  if (filePath.endsWith('.html')) {
37
- if ((0, utils_1.hasKendoInTemplate)(fileInfo.source)) {
38
- let updatedContent = fileInfo.source;
39
- updatedContent = (0, utils_1.htmlAttributeTransformer)({ ...fileInfo, source: updatedContent }, 'kendo-multiselecttree', 'title', 'adaptiveTitle');
40
- // Only write to file once after all transformations
41
- fs.writeFileSync(filePath, updatedContent, 'utf-8');
38
+ if (htmlResult && htmlResult !== fileInfo.source) {
39
+ fs.writeFileSync(filePath, htmlResult, 'utf-8');
40
+ return htmlResult;
42
41
  }
43
- return;
42
+ return fileInfo.source; // Return original source if no changes
44
43
  }
44
+ // Handle TypeScript property transformations
45
45
  const j = api.jscodeshift;
46
- const rootSource = j(fileInfo.source);
47
- (0, index_1.templateTransformer)(rootSource, j, (root) => {
48
- (0, utils_1.templateAttributeTransformer)(root, 'kendo-multiselecttree', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'MultiSelectTreeComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dropdowns', 'MultiSelectTreeComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, Renderer2, forwardRef, ElementRef, Input, Output, EventEmitter, ContentChild, ViewChild, ViewContainerRef, TemplateRef, HostBinding, isDevMode, ChangeDetectorRef, NgZone, Injector } from '@angular/core';
6
- import { isDocumentAvailable, KendoInput, hasObservers, SuffixTemplateDirective, PrefixTemplateDirective, isControlRequired, SeparatorComponent, ResizeSensorComponent, TemplateContextDirective, guid, normalizeNumpadKeys } from '@progress/kendo-angular-common';
6
+ import { isDocumentAvailable, KendoInput, hasObservers, SuffixTemplateDirective, PrefixTemplateDirective, isControlRequired, SeparatorComponent, ResizeSensorComponent, TemplateContextDirective, guid, normalizeKeys } from '@progress/kendo-angular-common';
7
7
  import { AdaptiveService } from '@progress/kendo-angular-utils';
8
8
  import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
@@ -988,7 +988,7 @@ export class AutoCompleteComponent {
988
988
  this.subs.add(merge(this.navigationService.pagedown, this.navigationService.pageup).subscribe((event) => {
989
989
  if (this.isOpen) {
990
990
  event.originalEvent.preventDefault();
991
- const code = normalizeNumpadKeys(event.originalEvent);
991
+ const code = normalizeKeys(event.originalEvent);
992
992
  this.optionsList.scrollWithOnePage(NavigationAction[code]);
993
993
  }
994
994
  }));
@@ -18,7 +18,7 @@ import { NavigationService } from '../common/navigation/navigation.service';
18
18
  import { DisabledItemsService } from '../common/disabled-items/disabled-items.service';
19
19
  import { merge, of, Subject, Subscription } from 'rxjs';
20
20
  import { catchError, filter, map, partition, tap, throttleTime } from 'rxjs/operators';
21
- import { isChanged, isDocumentAvailable, KendoInput, hasObservers, anyChanged, SuffixTemplateDirective, PrefixTemplateDirective, isControlRequired, MultiTabStop, SeparatorComponent, EventsOutsideAngularDirective, ResizeSensorComponent, Keys, TemplateContextDirective, guid, normalizeNumpadKeys } from '@progress/kendo-angular-common';
21
+ import { isChanged, isDocumentAvailable, KendoInput, hasObservers, anyChanged, SuffixTemplateDirective, PrefixTemplateDirective, isControlRequired, MultiTabStop, SeparatorComponent, EventsOutsideAngularDirective, ResizeSensorComponent, Keys, TemplateContextDirective, guid, normalizeKeys } from '@progress/kendo-angular-common';
22
22
  import { AdaptiveService } from '@progress/kendo-angular-utils';
23
23
  import { isPresent, getter, isEmptyString, isUntouched, inDropDown, getSizeClass, getRoundedClass, getFillModeClass, isTruthy, setListBoxAriaLabelledBy, setActionSheetTitle, animationDuration } from '../common/util';
24
24
  import { NavigationAction } from '../common/navigation/navigation-action';
@@ -798,7 +798,7 @@ export class ComboBoxComponent extends MultiTabStop {
798
798
  this.subs.add(merge(this.navigationService.pagedown, this.navigationService.pageup).subscribe((event) => {
799
799
  if (this.isOpen) {
800
800
  event.originalEvent.preventDefault();
801
- const code = normalizeNumpadKeys(event.originalEvent);
801
+ const code = normalizeKeys(event.originalEvent);
802
802
  this.optionsList.scrollWithOnePage(NavigationAction[code]);
803
803
  }
804
804
  }));
@@ -1149,7 +1149,7 @@ export class ComboBoxComponent extends MultiTabStop {
1149
1149
  return;
1150
1150
  }
1151
1151
  // on some keyboards, Home and End keys are mapped to Numpad keys
1152
- const code = normalizeNumpadKeys(event);
1152
+ const code = normalizeKeys(event);
1153
1153
  const isHomeKey = code === Keys.Home;
1154
1154
  const isEndKey = code === Keys.End;
1155
1155
  if (isHomeKey || isEndKey) {
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Injectable, EventEmitter } from '@angular/core';
6
6
  import { isPresent } from '../util';
7
- import { Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
7
+ import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
8
8
  import { NavigationAction } from './navigation-action';
9
9
  import { DisabledItemsService } from '../disabled-items/disabled-items.service';
10
10
  import { SelectionService } from '../selection/selection.service';
@@ -58,7 +58,7 @@ export class NavigationService {
58
58
  }
59
59
  process(args) {
60
60
  // on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
61
- const keyCode = normalizeNumpadKeys(args.originalEvent);
61
+ const keyCode = normalizeKeys(args.originalEvent);
62
62
  const altKey = args.originalEvent.altKey;
63
63
  const shiftKey = args.originalEvent.shiftKey;
64
64
  const ctrlKey = args.originalEvent.ctrlKey || args.originalEvent.metaKey;
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, Renderer2, Input, Output, EventEmitter, ElementRef, HostBinding, Injector, NgZone } from '@angular/core';
6
- import { isDocumentAvailable, isObjectPresent, isSafari, removeHTMLAttributes, setHTMLAttributes, Keys, parseAttributes, normalizeNumpadKeys } from '@progress/kendo-angular-common';
6
+ import { isDocumentAvailable, isObjectPresent, isSafari, removeHTMLAttributes, setHTMLAttributes, Keys, parseAttributes, normalizeKeys } from '@progress/kendo-angular-common';
7
7
  import { combineStr, isJapanese } from './util';
8
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
9
9
  import { Subscription } from 'rxjs';
@@ -270,7 +270,7 @@ export class SearchBarComponent {
270
270
  }
271
271
  handleKeydown(event) {
272
272
  // on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
273
- const keyCode = normalizeNumpadKeys(event);
273
+ const keyCode = normalizeKeys(event);
274
274
  const keys = [Keys.ArrowUp, Keys.ArrowDown, Keys.ArrowLeft, Keys.ArrowRight, Keys.Enter,
275
275
  Keys.Escape, Keys.Delete, Keys.Backspace, Keys.Home, Keys.End, Keys.PageDown, Keys.PageUp];
276
276
  if (keys.indexOf(keyCode) > -1) {