@progress/kendo-angular-dateinputs 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.
- package/codemods/utils.js +805 -394
- package/codemods/v19/datepicker-subtitle.js +9 -12
- package/codemods/v19/datepicker-title.js +9 -12
- package/codemods/v19/daterange-popup-subtitle.js +9 -12
- package/codemods/v19/daterange-popup-title.js +9 -12
- package/codemods/v19/datetimepicker-subtitle.js +9 -12
- package/codemods/v19/datetimepicker-title.js +9 -12
- package/codemods/v19/timepicker-subtitle.js +9 -12
- package/codemods/v19/timepicker-title.js +9 -12
- package/esm2022/calendar/calendar.component.mjs +2 -2
- package/esm2022/calendar/multiview-calendar.component.mjs +2 -2
- package/esm2022/calendar/services/navigation.service.mjs +2 -2
- package/esm2022/common/utils.mjs +2 -2
- package/esm2022/datepicker/datepicker.component.mjs +2 -2
- package/esm2022/daterange/date-range-input.mjs +2 -2
- package/esm2022/daterange/date-range-popup.component.mjs +2 -2
- package/esm2022/daterange/date-range.component.mjs +2 -2
- package/esm2022/datetimepicker/datetimepicker.component.mjs +2 -2
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/timepicker/timelist.component.mjs +2 -2
- package/esm2022/timepicker/timepicker.component.mjs +2 -2
- package/esm2022/timepicker/timeselector.component.mjs +2 -2
- package/fesm2022/progress-kendo-angular-dateinputs.mjs +15 -15
- package/package.json +12 -13
- package/codemods/template-transformer/index.js +0 -96
|
@@ -9,7 +9,7 @@ import * as i1$1 from '@progress/kendo-angular-l10n';
|
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { cloneDate, MS_PER_HOUR, MS_PER_MINUTE, addDays, getDate, isEqual, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, lastYearOfDecade, firstYearOfDecade, createDate, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
|
|
11
11
|
import * as i19 from '@progress/kendo-angular-common';
|
|
12
|
-
import {
|
|
12
|
+
import { normalizeKeys, Keys, isDocumentAvailable, EventsOutsideAngularDirective, guid, hasObservers, isObject, KendoInput, ResizeSensorComponent, isObjectPresent, removeHTMLAttributes, parseAttributes, anyChanged, isControlRequired, setHTMLAttributes, MultiTabStop, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
|
|
13
13
|
export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
|
|
14
14
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
15
15
|
import * as i1 from '@progress/kendo-angular-intl';
|
|
@@ -36,8 +36,8 @@ const packageMetadata = {
|
|
|
36
36
|
productName: 'Kendo UI for Angular',
|
|
37
37
|
productCode: 'KENDOUIANGULAR',
|
|
38
38
|
productCodes: ['KENDOUIANGULAR'],
|
|
39
|
-
publishDate:
|
|
40
|
-
version: '21.2.0-develop.
|
|
39
|
+
publishDate: 1764685002,
|
|
40
|
+
version: '21.2.0-develop.11',
|
|
41
41
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -129,7 +129,7 @@ const isDateArray = (value) => Array.isArray(value) && value.length > 0 && value
|
|
|
129
129
|
* @hidden
|
|
130
130
|
*/
|
|
131
131
|
const isArrowWithShiftPressed = (args) => {
|
|
132
|
-
const code =
|
|
132
|
+
const code = normalizeKeys(args);
|
|
133
133
|
return args.shiftKey && (code === Keys.ArrowRight || code === Keys.ArrowLeft || code === Keys.ArrowDown || code === Keys.ArrowUp);
|
|
134
134
|
};
|
|
135
135
|
/**
|
|
@@ -3411,7 +3411,7 @@ class NavigationService {
|
|
|
3411
3411
|
}
|
|
3412
3412
|
action(event) {
|
|
3413
3413
|
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
3414
|
-
const code =
|
|
3414
|
+
const code = normalizeKeys(event);
|
|
3415
3415
|
const action = `${event.ctrlKey || event.metaKey ? 'meta+' : ''}${code}`;
|
|
3416
3416
|
return KEY_TO_ACTION[action];
|
|
3417
3417
|
}
|
|
@@ -4311,7 +4311,7 @@ class MultiViewCalendarComponent {
|
|
|
4311
4311
|
* @hidden
|
|
4312
4312
|
*/
|
|
4313
4313
|
keydown(event) {
|
|
4314
|
-
const code =
|
|
4314
|
+
const code = normalizeKeys(event);
|
|
4315
4315
|
const arrowUpOrDownKeyPressed = [Keys.ArrowUp, Keys.ArrowDown].indexOf(code) !== -1;
|
|
4316
4316
|
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
4317
4317
|
const onArrowRightAndControl = code === Keys.ArrowRight && ctrlKey;
|
|
@@ -7875,7 +7875,7 @@ class CalendarComponent {
|
|
|
7875
7875
|
if (this.type === 'infinite') {
|
|
7876
7876
|
// reserve the alt + arrow key commands for the picker
|
|
7877
7877
|
const ctrlKey = args.ctrlKey || args.metaKey;
|
|
7878
|
-
const code =
|
|
7878
|
+
const code = normalizeKeys(args);
|
|
7879
7879
|
const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(code) !== -1;
|
|
7880
7880
|
const reserveKeyCommandsForPicker = isPresent(this.pickerService) && arrowKeyPressed && args.altKey;
|
|
7881
7881
|
if (reserveKeyCommandsForPicker) {
|
|
@@ -10811,7 +10811,7 @@ class DatePickerComponent extends MultiTabStop {
|
|
|
10811
10811
|
*/
|
|
10812
10812
|
handleKeydown(e) {
|
|
10813
10813
|
const { altKey, shiftKey, target } = e;
|
|
10814
|
-
const code =
|
|
10814
|
+
const code = normalizeKeys(e);
|
|
10815
10815
|
if (code === Keys.Escape) {
|
|
10816
10816
|
this.dateInput.focus();
|
|
10817
10817
|
this.show = false;
|
|
@@ -12595,7 +12595,7 @@ class TimeListComponent {
|
|
|
12595
12595
|
return oldData && newData && oldData.text !== newData.text;
|
|
12596
12596
|
}
|
|
12597
12597
|
handleKeyDown(e) {
|
|
12598
|
-
const code =
|
|
12598
|
+
const code = normalizeKeys(e);
|
|
12599
12599
|
if (code === Keys.Tab && !e.shiftKey && this.isLast) {
|
|
12600
12600
|
e.preventDefault();
|
|
12601
12601
|
this.tabOutLastPart.emit();
|
|
@@ -13281,7 +13281,7 @@ class TimeSelectorComponent {
|
|
|
13281
13281
|
}
|
|
13282
13282
|
handleKeydown(args) {
|
|
13283
13283
|
const { altKey } = args;
|
|
13284
|
-
const code =
|
|
13284
|
+
const code = normalizeKeys(args);
|
|
13285
13285
|
// reserve the alt + arrow key commands for the picker
|
|
13286
13286
|
const arrowKeyPressed = [Keys.ArrowLeft, Keys.ArrowRight].indexOf(code) !== -1;
|
|
13287
13287
|
if (isPresent(this.pickerService) && arrowKeyPressed && altKey) {
|
|
@@ -14230,7 +14230,7 @@ class TimePickerComponent extends MultiTabStop {
|
|
|
14230
14230
|
*/
|
|
14231
14231
|
handleKeydown(event) {
|
|
14232
14232
|
const { altKey } = event;
|
|
14233
|
-
const code =
|
|
14233
|
+
const code = normalizeKeys(event);
|
|
14234
14234
|
if (code === Keys.Escape) {
|
|
14235
14235
|
this.focusInput();
|
|
14236
14236
|
this.show = false;
|
|
@@ -16511,7 +16511,7 @@ class DateTimePickerComponent extends MultiTabStop {
|
|
|
16511
16511
|
return;
|
|
16512
16512
|
}
|
|
16513
16513
|
const { altKey } = event;
|
|
16514
|
-
const code =
|
|
16514
|
+
const code = normalizeKeys(event);
|
|
16515
16515
|
switch (code) {
|
|
16516
16516
|
case altKey && Keys.ArrowUp:
|
|
16517
16517
|
case Keys.Escape:
|
|
@@ -18965,7 +18965,7 @@ class DateRangePopupComponent {
|
|
|
18965
18965
|
}
|
|
18966
18966
|
handleKeydown(event) {
|
|
18967
18967
|
const { altKey } = event;
|
|
18968
|
-
const code =
|
|
18968
|
+
const code = normalizeKeys(event);
|
|
18969
18969
|
if (code === Keys.Escape || (altKey && code === Keys.ArrowUp)) {
|
|
18970
18970
|
this.zone.run(() => this.cancelPopup());
|
|
18971
18971
|
}
|
|
@@ -19505,7 +19505,7 @@ class DateRangeComponent {
|
|
|
19505
19505
|
* @hidden
|
|
19506
19506
|
*/
|
|
19507
19507
|
keydown(event) {
|
|
19508
|
-
const code =
|
|
19508
|
+
const code = normalizeKeys(event);
|
|
19509
19509
|
const shouldOpenPopup = code === Keys.ArrowDown && event.altKey;
|
|
19510
19510
|
if (shouldOpenPopup) {
|
|
19511
19511
|
this.dateRangeService.activatePopup();
|
|
@@ -19669,7 +19669,7 @@ class DateRangeInput {
|
|
|
19669
19669
|
}
|
|
19670
19670
|
}
|
|
19671
19671
|
togglePopup(e) {
|
|
19672
|
-
const code =
|
|
19672
|
+
const code = normalizeKeys(e);
|
|
19673
19673
|
const altKey = e.altKey;
|
|
19674
19674
|
if (code === Keys.Escape) {
|
|
19675
19675
|
this.dateRangeService.cancelPopup();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-dateinputs",
|
|
3
|
-
"version": "21.2.0-develop.
|
|
3
|
+
"version": "21.2.0-develop.11",
|
|
4
4
|
"description": "Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"package": {
|
|
80
80
|
"productName": "Kendo UI for Angular",
|
|
81
81
|
"productCode": "KENDOUIANGULAR",
|
|
82
|
-
"publishDate":
|
|
82
|
+
"publishDate": 1764685002,
|
|
83
83
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
84
84
|
}
|
|
85
85
|
},
|
|
@@ -90,23 +90,22 @@
|
|
|
90
90
|
"@angular/forms": "18 - 21",
|
|
91
91
|
"@angular/platform-browser": "18 - 21",
|
|
92
92
|
"@progress/kendo-licensing": "^1.7.0",
|
|
93
|
-
"@progress/kendo-angular-buttons": "21.2.0-develop.
|
|
94
|
-
"@progress/kendo-angular-common": "21.2.0-develop.
|
|
95
|
-
"@progress/kendo-angular-utils": "21.2.0-develop.
|
|
96
|
-
"@progress/kendo-angular-intl": "21.2.0-develop.
|
|
97
|
-
"@progress/kendo-angular-l10n": "21.2.0-develop.
|
|
98
|
-
"@progress/kendo-angular-icons": "21.2.0-develop.
|
|
99
|
-
"@progress/kendo-angular-popup": "21.2.0-develop.
|
|
100
|
-
"@progress/kendo-angular-navigation": "21.2.0-develop.
|
|
93
|
+
"@progress/kendo-angular-buttons": "21.2.0-develop.11",
|
|
94
|
+
"@progress/kendo-angular-common": "21.2.0-develop.11",
|
|
95
|
+
"@progress/kendo-angular-utils": "21.2.0-develop.11",
|
|
96
|
+
"@progress/kendo-angular-intl": "21.2.0-develop.11",
|
|
97
|
+
"@progress/kendo-angular-l10n": "21.2.0-develop.11",
|
|
98
|
+
"@progress/kendo-angular-icons": "21.2.0-develop.11",
|
|
99
|
+
"@progress/kendo-angular-popup": "21.2.0-develop.11",
|
|
100
|
+
"@progress/kendo-angular-navigation": "21.2.0-develop.11",
|
|
101
101
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"tslib": "^2.3.1",
|
|
105
|
-
"@progress/kendo-angular-schematics": "21.2.0-develop.
|
|
105
|
+
"@progress/kendo-angular-schematics": "21.2.0-develop.11",
|
|
106
106
|
"@progress/kendo-common": "^1.0.1",
|
|
107
107
|
"@progress/kendo-date-math": "^1.1.0",
|
|
108
|
-
"@progress/kendo-dateinputs-common": "^0.4.7"
|
|
109
|
-
"node-html-parser": "^7.0.1"
|
|
108
|
+
"@progress/kendo-dateinputs-common": "^0.4.7"
|
|
110
109
|
},
|
|
111
110
|
"schematics": "./schematics/collection.json",
|
|
112
111
|
"module": "fesm2022/progress-kendo-angular-dateinputs.mjs",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.templateTransformer = templateTransformer;
|
|
8
|
-
const node_html_parser_1 = require("node-html-parser");
|
|
9
|
-
const utils_1 = require("../utils");
|
|
10
|
-
function templateTransformer(root, j, ...processFns) {
|
|
11
|
-
root
|
|
12
|
-
.find(j.ClassDeclaration)
|
|
13
|
-
.forEach(classPath => {
|
|
14
|
-
// Skip if no decorators
|
|
15
|
-
const classNode = classPath.node;
|
|
16
|
-
if (!classNode.decorators || !classNode.decorators.length)
|
|
17
|
-
return;
|
|
18
|
-
// Find Component decorator
|
|
19
|
-
const componentDecorator = classNode.decorators.find((decorator) => {
|
|
20
|
-
if (decorator.expression && decorator.expression.type === 'CallExpression') {
|
|
21
|
-
const callee = decorator.expression.callee;
|
|
22
|
-
// Handle direct Component identifier
|
|
23
|
-
if (callee.type === 'Identifier' && callee.name === 'Component') {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
// Handle angular.core.Component or similar
|
|
27
|
-
if (callee.type === 'MemberExpression' &&
|
|
28
|
-
callee.property &&
|
|
29
|
-
callee.property.type === 'Identifier' &&
|
|
30
|
-
callee.property.name === 'Component') {
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
});
|
|
36
|
-
if (!componentDecorator || !componentDecorator.expression)
|
|
37
|
-
return;
|
|
38
|
-
const expression = componentDecorator.expression;
|
|
39
|
-
if (expression.type !== 'CallExpression' || !expression.arguments.length)
|
|
40
|
-
return;
|
|
41
|
-
const componentOptions = expression.arguments[0];
|
|
42
|
-
if (componentOptions.type !== 'ObjectExpression')
|
|
43
|
-
return;
|
|
44
|
-
// Find template and templateUrl properties
|
|
45
|
-
const props = componentOptions.properties || [];
|
|
46
|
-
const templateProp = props.find((prop) => (prop.key.type === 'Identifier' && prop.key.name === 'template') ||
|
|
47
|
-
(prop.key.type === 'StringLiteral' && prop.key.value === 'template'));
|
|
48
|
-
// const templateUrlProp = props.find((prop: any) =>
|
|
49
|
-
// (prop.key.type === 'Identifier' && prop.key.name === 'templateUrl') ||
|
|
50
|
-
// (prop.key.type === 'StringLiteral' && prop.key.value === 'templateUrl')
|
|
51
|
-
// );
|
|
52
|
-
// Process inline template
|
|
53
|
-
if (templateProp) {
|
|
54
|
-
// Extract template based on node type
|
|
55
|
-
let originalTemplate;
|
|
56
|
-
if (templateProp.value.type === 'StringLiteral' || templateProp.value.type === 'Literal') {
|
|
57
|
-
originalTemplate = templateProp.value.value;
|
|
58
|
-
}
|
|
59
|
-
else if (templateProp.value.type === 'TemplateLiteral') {
|
|
60
|
-
// For template literals, join quasis
|
|
61
|
-
if (templateProp.value.quasis && templateProp.value.quasis.length) {
|
|
62
|
-
originalTemplate = templateProp.value.quasis
|
|
63
|
-
.map((q) => q.value.cooked || q.value.raw)
|
|
64
|
-
.join('');
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
console.warn('Could not process TemplateLiteral properly');
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
console.warn(`Unsupported template type: ${templateProp.value.type}`);
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if ((0, utils_1.hasKendoInTemplate)(originalTemplate)) {
|
|
76
|
-
const root = (0, node_html_parser_1.parse)(originalTemplate, { comment: true, blockTextElements: utils_1.blockTextElements });
|
|
77
|
-
processFns.forEach(fn => {
|
|
78
|
-
fn(root);
|
|
79
|
-
});
|
|
80
|
-
// Transform template using Angular compiler
|
|
81
|
-
const transformedTemplate = root.toString();
|
|
82
|
-
if (transformedTemplate !== originalTemplate) {
|
|
83
|
-
// Update template property
|
|
84
|
-
if (templateProp.value.type === 'TemplateLiteral') {
|
|
85
|
-
// For template literals, create a new template literal
|
|
86
|
-
templateProp.value = j.templateLiteral([j.templateElement({ cooked: transformedTemplate, raw: transformedTemplate }, true)], []);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
// For string literals, update the value
|
|
90
|
-
templateProp.value.value = transformedTemplate;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|