@progress/kendo-angular-dateinputs 21.1.1-develop.2 → 21.2.0-develop.10

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.
Files changed (32) hide show
  1. package/codemods/utils.js +805 -394
  2. package/codemods/v19/datepicker-subtitle.js +9 -12
  3. package/codemods/v19/datepicker-title.js +9 -12
  4. package/codemods/v19/daterange-popup-subtitle.js +9 -12
  5. package/codemods/v19/daterange-popup-title.js +9 -12
  6. package/codemods/v19/datetimepicker-subtitle.js +9 -12
  7. package/codemods/v19/datetimepicker-title.js +9 -12
  8. package/codemods/v19/timepicker-subtitle.js +9 -12
  9. package/codemods/v19/timepicker-title.js +9 -12
  10. package/esm2022/calendar/calendar.component.mjs +224 -223
  11. package/esm2022/calendar/footer.component.mjs +31 -29
  12. package/esm2022/calendar/header.component.mjs +157 -145
  13. package/esm2022/calendar/horizontal-view-list.component.mjs +139 -123
  14. package/esm2022/calendar/multiview-calendar.component.mjs +112 -109
  15. package/esm2022/calendar/navigation.component.mjs +55 -49
  16. package/esm2022/calendar/services/navigation.service.mjs +2 -2
  17. package/esm2022/calendar/view-list.component.mjs +148 -135
  18. package/esm2022/calendar/view.component.mjs +107 -89
  19. package/esm2022/common/utils.mjs +2 -2
  20. package/esm2022/dateinput/dateinput.component.mjs +142 -137
  21. package/esm2022/datepicker/datepicker.component.mjs +317 -305
  22. package/esm2022/daterange/date-range-input.mjs +2 -2
  23. package/esm2022/daterange/date-range-popup.component.mjs +266 -255
  24. package/esm2022/daterange/date-range.component.mjs +12 -9
  25. package/esm2022/datetimepicker/datetimepicker.component.mjs +679 -659
  26. package/esm2022/package-metadata.mjs +2 -2
  27. package/esm2022/timepicker/timelist.component.mjs +57 -53
  28. package/esm2022/timepicker/timepicker.component.mjs +381 -369
  29. package/esm2022/timepicker/timeselector.component.mjs +140 -125
  30. package/fesm2022/progress-kendo-angular-dateinputs.mjs +2956 -2796
  31. package/package.json +12 -13
  32. package/codemods/template-transformer/index.js +0 -96
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-datepicker', 'title', '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-datepicker', '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-datepicker', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DatePickerComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DatePickerComponent', 'title', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-datepicker', '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-datepicker', '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-datepicker', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DatePickerComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DatePickerComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-daterange-popup', '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-daterange-popup', '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-daterange-popup', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DateRangePopupComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DateRangePopupComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-daterange-popup', '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-daterange-popup', '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-daterange-popup', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DateRangePopupComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DateRangePopupComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-datetimepicker', '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-datetimepicker', '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-datetimepicker', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DateTimePickerComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DateTimePickerComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-datetimepicker', '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-datetimepicker', '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-datetimepicker', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'DateTimePickerComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'DateTimePickerComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-timepicker', '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-timepicker', '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-timepicker', 'subtitle', 'adaptiveSubtitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'TimePickerComponent', 'subtitle', 'adaptiveSubtitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'TimePickerComponent', 'subtitle', 'adaptiveSubtitle');
51
48
  return rootSource.toSource();
52
49
  }
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.default = default_1;
31
31
  const fs = __importStar(require("fs"));
32
- const index_1 = require("../template-transformer/index");
33
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-timepicker', '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-timepicker', '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-timepicker', 'title', 'adaptiveTitle');
49
- });
50
- (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'TimePickerComponent', 'title', 'adaptiveTitle');
46
+ const rootSource = j(htmlResult || fileInfo.source);
47
+ (0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-dateinputs', 'TimePickerComponent', 'title', 'adaptiveTitle');
51
48
  return rootSource.toSource();
52
49
  }