@progress/kendo-react-dateinputs 5.4.0-dev.202205271059 → 5.4.0-dev.202206090823
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/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/dist/es/calendar/components/Calendar.d.ts +4 -4
- package/dist/es/calendar/components/Calendar.js +17 -5
- package/dist/es/calendar/components/Header.d.ts +1 -0
- package/dist/es/calendar/components/Header.js +1 -1
- package/dist/es/calendar/components/HorizontalViewList.js +1 -0
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +3 -3
- package/dist/es/calendar/components/MultiViewCalendar.js +12 -5
- package/dist/es/calendar/components/Navigation.d.ts +1 -1
- package/dist/es/calendar/components/Navigation.js +9 -4
- package/dist/es/calendar/components/TodayCommand.js +4 -2
- package/dist/es/calendar/components/View.d.ts +4 -4
- package/dist/es/calendar/components/View.js +7 -5
- package/dist/es/calendar/components/ViewList.d.ts +3 -3
- package/dist/es/calendar/components/ViewList.js +10 -2
- package/dist/es/calendar/services/BusViewService.js +1 -1
- package/dist/es/calendar/services/CenturyViewService.js +2 -2
- package/dist/es/calendar/services/DOMService.js +24 -6
- package/dist/es/calendar/services/DecadeViewService.js +2 -2
- package/dist/es/calendar/services/MonthViewService.js +2 -2
- package/dist/es/calendar/services/NavigationService.js +1 -1
- package/dist/es/calendar/services/ScrollSyncService.js +5 -1
- package/dist/es/calendar/services/YearViewService.js +2 -2
- package/dist/es/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/es/calendar/utils/ScrollSync.js +2 -0
- package/dist/es/dateinput/DateInput.d.ts +11 -7
- package/dist/es/dateinput/DateInput.js +14 -8
- package/dist/es/dateinput/models/kendo-date.js +1 -1
- package/dist/es/dateinput/models/mask.js +1 -0
- package/dist/es/dateinput/utils.d.ts +1 -1
- package/dist/es/datepicker/DatePicker.d.ts +8 -8
- package/dist/es/datepicker/DatePicker.js +4 -3
- package/dist/es/daterangepicker/DateRangePicker.d.ts +7 -5
- package/dist/es/datetimepicker/DateTimePicker.d.ts +7 -7
- package/dist/es/datetimepicker/DateTimePicker.js +3 -3
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +1 -1
- package/dist/es/datetimepicker/DateTimeSelector.js +5 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +3 -3
- package/dist/es/timepicker/TimeList.js +25 -7
- package/dist/es/timepicker/TimePart.d.ts +4 -4
- package/dist/es/timepicker/TimePart.js +4 -1
- package/dist/es/timepicker/TimePicker.d.ts +8 -8
- package/dist/es/timepicker/TimePicker.js +4 -3
- package/dist/es/timepicker/TimeSelector.d.ts +2 -2
- package/dist/es/timepicker/TimeSelector.js +4 -0
- package/dist/es/timepicker/services/DOMService.js +2 -0
- package/dist/es/timepicker/services/DayPeriodService.js +9 -3
- package/dist/es/timepicker/services/HoursService.js +14 -5
- package/dist/es/timepicker/services/MinutesService.js +12 -6
- package/dist/es/timepicker/services/SecondsService.js +12 -6
- package/dist/es/utils.js +9 -5
- package/dist/es/virtualization/Virtualization.d.ts +2 -1
- package/dist/es/virtualization/Virtualization.js +14 -6
- package/dist/es/virtualization/services/RowHeightService.js +9 -5
- package/dist/es/virtualization/services/ScrollerService.js +9 -3
- package/dist/npm/calendar/components/Calendar.d.ts +4 -4
- package/dist/npm/calendar/components/Calendar.js +43 -31
- package/dist/npm/calendar/components/CalendarCell.js +1 -1
- package/dist/npm/calendar/components/CalendarNavigationItem.js +1 -1
- package/dist/npm/calendar/components/CalendarWeekCell.js +1 -1
- package/dist/npm/calendar/components/Header.d.ts +1 -0
- package/dist/npm/calendar/components/Header.js +3 -3
- package/dist/npm/calendar/components/HorizontalViewList.js +3 -2
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +3 -3
- package/dist/npm/calendar/components/MultiViewCalendar.js +49 -42
- package/dist/npm/calendar/components/Navigation.d.ts +1 -1
- package/dist/npm/calendar/components/Navigation.js +13 -8
- package/dist/npm/calendar/components/TodayCommand.js +9 -7
- package/dist/npm/calendar/components/View.d.ts +4 -4
- package/dist/npm/calendar/components/View.js +16 -14
- package/dist/npm/calendar/components/ViewList.d.ts +3 -3
- package/dist/npm/calendar/components/ViewList.js +19 -11
- package/dist/npm/calendar/services/BusViewService.js +1 -1
- package/dist/npm/calendar/services/CenturyViewService.js +38 -38
- package/dist/npm/calendar/services/DOMService.js +33 -15
- package/dist/npm/calendar/services/DecadeViewService.js +32 -32
- package/dist/npm/calendar/services/MonthViewService.js +36 -36
- package/dist/npm/calendar/services/NavigationService.js +1 -1
- package/dist/npm/calendar/services/ScrollSyncService.js +5 -1
- package/dist/npm/calendar/services/WeekNamesService.js +1 -1
- package/dist/npm/calendar/services/YearViewService.js +33 -33
- package/dist/npm/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/npm/calendar/utils/ScrollSync.js +2 -0
- package/dist/npm/common/PickerWrap.js +1 -1
- package/dist/npm/dateinput/DateInput.d.ts +11 -7
- package/dist/npm/dateinput/DateInput.js +32 -26
- package/dist/npm/dateinput/models/kendo-date.js +12 -12
- package/dist/npm/dateinput/models/mask.js +1 -0
- package/dist/npm/dateinput/utils.d.ts +1 -1
- package/dist/npm/datepicker/DatePicker.d.ts +8 -8
- package/dist/npm/datepicker/DatePicker.js +17 -16
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +7 -5
- package/dist/npm/daterangepicker/DateRangePicker.js +17 -17
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +7 -7
- package/dist/npm/datetimepicker/DateTimePicker.js +15 -15
- package/dist/npm/datetimepicker/DateTimeSelector.d.ts +1 -1
- package/dist/npm/datetimepicker/DateTimeSelector.js +13 -8
- package/dist/npm/hooks/usePickerFloatingLabel.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimeList.d.ts +3 -3
- package/dist/npm/timepicker/TimeList.js +29 -11
- package/dist/npm/timepicker/TimePart.d.ts +4 -4
- package/dist/npm/timepicker/TimePart.js +14 -11
- package/dist/npm/timepicker/TimePicker.d.ts +8 -8
- package/dist/npm/timepicker/TimePicker.js +19 -18
- package/dist/npm/timepicker/TimeSelector.d.ts +2 -2
- package/dist/npm/timepicker/TimeSelector.js +14 -10
- package/dist/npm/timepicker/services/DOMService.js +6 -4
- package/dist/npm/timepicker/services/DayPeriodService.js +10 -4
- package/dist/npm/timepicker/services/HoursService.js +20 -11
- package/dist/npm/timepicker/services/MinutesService.js +16 -10
- package/dist/npm/timepicker/services/SecondsService.js +16 -10
- package/dist/npm/timepicker/utils.js +11 -11
- package/dist/npm/utils.js +16 -12
- package/dist/npm/virtualization/Virtualization.d.ts +2 -1
- package/dist/npm/virtualization/Virtualization.js +16 -8
- package/dist/npm/virtualization/services/RowHeightService.js +9 -5
- package/dist/npm/virtualization/services/ScrollerService.js +9 -3
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +13 -13
|
@@ -12,14 +12,14 @@ var ROWS_LENGTH = 6;
|
|
|
12
12
|
var SATURDAY = 6;
|
|
13
13
|
var SUNDAY = 0;
|
|
14
14
|
var ACTIONS = (_a = {},
|
|
15
|
-
_a[NavigationAction_1.Action.Left] = function (date) { return kendo_date_math_1.addDays(date, -1); },
|
|
16
|
-
_a[NavigationAction_1.Action.Up] = function (date) { return kendo_date_math_1.addWeeks(date, -1); },
|
|
17
|
-
_a[NavigationAction_1.Action.Right] = function (date) { return kendo_date_math_1.addDays(date, 1); },
|
|
18
|
-
_a[NavigationAction_1.Action.Down] = function (date) { return kendo_date_math_1.addWeeks(date, 1); },
|
|
19
|
-
_a[NavigationAction_1.Action.PrevView] = function (date) { return kendo_date_math_1.addMonths(date, -1); },
|
|
20
|
-
_a[NavigationAction_1.Action.NextView] = function (date) { return kendo_date_math_1.addMonths(date, 1); },
|
|
21
|
-
_a[NavigationAction_1.Action.FirstInView] = function (date) { return kendo_date_math_1.firstDayOfMonth(date); },
|
|
22
|
-
_a[NavigationAction_1.Action.LastInView] = function (date) { return kendo_date_math_1.lastDayOfMonth(date); },
|
|
15
|
+
_a[NavigationAction_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addDays)(date, -1); },
|
|
16
|
+
_a[NavigationAction_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addWeeks)(date, -1); },
|
|
17
|
+
_a[NavigationAction_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addDays)(date, 1); },
|
|
18
|
+
_a[NavigationAction_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addWeeks)(date, 1); },
|
|
19
|
+
_a[NavigationAction_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addMonths)(date, -1); },
|
|
20
|
+
_a[NavigationAction_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addMonths)(date, 1); },
|
|
21
|
+
_a[NavigationAction_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstDayOfMonth)(date); },
|
|
22
|
+
_a[NavigationAction_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastDayOfMonth)(date); },
|
|
23
23
|
_a);
|
|
24
24
|
/**
|
|
25
25
|
* @hidden
|
|
@@ -29,10 +29,10 @@ var MonthViewService = /** @class */ (function () {
|
|
|
29
29
|
this.intl = intl;
|
|
30
30
|
}
|
|
31
31
|
MonthViewService.prototype.addToDate = function (min, skip) {
|
|
32
|
-
return kendo_date_math_1.addMonths(min, skip);
|
|
32
|
+
return (0, kendo_date_math_1.addMonths)(min, skip);
|
|
33
33
|
};
|
|
34
34
|
MonthViewService.prototype.datesList = function (start, count) {
|
|
35
|
-
return utils_1.range(0, count).map(function (i) { return kendo_date_math_1.addMonths(start, i); });
|
|
35
|
+
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addMonths)(start, i); });
|
|
36
36
|
};
|
|
37
37
|
MonthViewService.prototype.data = function (options) {
|
|
38
38
|
var _this = this;
|
|
@@ -40,16 +40,16 @@ var MonthViewService = /** @class */ (function () {
|
|
|
40
40
|
if (!viewDate) {
|
|
41
41
|
return EMPTY_DATA;
|
|
42
42
|
}
|
|
43
|
-
var firstMonthDate = kendo_date_math_1.firstDayOfMonth(viewDate);
|
|
44
|
-
var lastMonthDate = kendo_date_math_1.lastDayOfMonth(viewDate);
|
|
43
|
+
var firstMonthDate = (0, kendo_date_math_1.firstDayOfMonth)(viewDate);
|
|
44
|
+
var lastMonthDate = (0, kendo_date_math_1.lastDayOfMonth)(viewDate);
|
|
45
45
|
var backward = -1;
|
|
46
|
-
var date = kendo_date_math_1.dayOfWeek(firstMonthDate, this.intl.firstDay(), backward);
|
|
47
|
-
var cells = utils_1.range(0, CELLS_LENGTH);
|
|
48
|
-
var today = utils_1.getToday();
|
|
49
|
-
return utils_1.range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
50
|
-
var baseDate = kendo_date_math_1.addDays(date, rowOffset * CELLS_LENGTH);
|
|
46
|
+
var date = (0, kendo_date_math_1.dayOfWeek)(firstMonthDate, this.intl.firstDay(), backward);
|
|
47
|
+
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
48
|
+
var today = (0, utils_1.getToday)();
|
|
49
|
+
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
50
|
+
var baseDate = (0, kendo_date_math_1.addDays)(date, rowOffset * CELLS_LENGTH);
|
|
51
51
|
return cells.map(function (cellOffset) {
|
|
52
|
-
var cellDate = _this.normalize(kendo_date_math_1.addDays(baseDate, cellOffset), min, max);
|
|
52
|
+
var cellDate = _this.normalize((0, kendo_date_math_1.addDays)(baseDate, cellOffset), min, max);
|
|
53
53
|
var otherMonth = cellDate < firstMonthDate || cellDate > lastMonthDate;
|
|
54
54
|
if (otherMonth) {
|
|
55
55
|
return null;
|
|
@@ -57,16 +57,16 @@ var MonthViewService = /** @class */ (function () {
|
|
|
57
57
|
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
58
58
|
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
59
59
|
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
60
|
-
var isRangeMid = isInMiddle && utils_1.isInSelectionRange(cellDate, selectionRange);
|
|
60
|
+
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
61
61
|
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
62
|
-
? utils_1.isInRange(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
62
|
+
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
63
63
|
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
64
64
|
var cell = {
|
|
65
65
|
formattedValue: _this.value(cellDate),
|
|
66
|
-
id: ""
|
|
66
|
+
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
67
67
|
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
68
68
|
isSelected: isSelected,
|
|
69
|
-
isInRange: utils_1.isInRange(cellDate, min, max),
|
|
69
|
+
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
70
70
|
isWeekend: _this.isWeekend(cellDate),
|
|
71
71
|
isRangeStart: isRangeStart,
|
|
72
72
|
isRangeMid: isRangeMid,
|
|
@@ -85,29 +85,29 @@ var MonthViewService = /** @class */ (function () {
|
|
|
85
85
|
if (!candidate || !expected) {
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
|
-
return kendo_date_math_1.getDate(candidate).getTime() === kendo_date_math_1.getDate(expected).getTime();
|
|
88
|
+
return (0, kendo_date_math_1.getDate)(candidate).getTime() === (0, kendo_date_math_1.getDate)(expected).getTime();
|
|
89
89
|
};
|
|
90
90
|
MonthViewService.prototype.isSelectedFromArray = function (candidate, dates, min, max) {
|
|
91
91
|
var _this = this;
|
|
92
92
|
var result = false;
|
|
93
93
|
dates.forEach(function (date) {
|
|
94
|
-
if (utils_1.isInRange(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
94
|
+
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
95
95
|
result = true;
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
return result;
|
|
99
99
|
};
|
|
100
100
|
MonthViewService.prototype.isInArray = function (date, dates) {
|
|
101
|
-
return !!dates.length && kendo_date_math_1.firstDayOfMonth(dates[0]) <= date && date <= kendo_date_math_1.lastDayOfMonth(dates[dates.length - 1]);
|
|
101
|
+
return !!dates.length && (0, kendo_date_math_1.firstDayOfMonth)(dates[0]) <= date && date <= (0, kendo_date_math_1.lastDayOfMonth)(dates[dates.length - 1]);
|
|
102
102
|
};
|
|
103
103
|
MonthViewService.prototype.isInRange = function (candidate, min, max) {
|
|
104
|
-
var value = kendo_date_math_1.getDate(candidate);
|
|
105
|
-
var aboveMin = !min || kendo_date_math_1.getDate(min) <= value;
|
|
106
|
-
var belowMax = !max || value <= kendo_date_math_1.getDate(max);
|
|
104
|
+
var value = (0, kendo_date_math_1.getDate)(candidate);
|
|
105
|
+
var aboveMin = !min || (0, kendo_date_math_1.getDate)(min) <= value;
|
|
106
|
+
var belowMax = !max || value <= (0, kendo_date_math_1.getDate)(max);
|
|
107
107
|
return aboveMin && belowMax;
|
|
108
108
|
};
|
|
109
109
|
MonthViewService.prototype.isInSameView = function (candidate, value) {
|
|
110
|
-
return kendo_date_math_1.durationInMonths(candidate, value) === 0;
|
|
110
|
+
return (0, kendo_date_math_1.durationInMonths)(candidate, value) === 0;
|
|
111
111
|
};
|
|
112
112
|
MonthViewService.prototype.isRangeStart = function (value) {
|
|
113
113
|
return !value.getMonth();
|
|
@@ -129,24 +129,24 @@ var MonthViewService = /** @class */ (function () {
|
|
|
129
129
|
return this.isRangeStart(value) ? value.getFullYear().toString() : this.abbrMonthNames()[value.getMonth()];
|
|
130
130
|
};
|
|
131
131
|
MonthViewService.prototype.title = function (current) {
|
|
132
|
-
return this.wideMonthNames()[current.getMonth()]
|
|
132
|
+
return "".concat(this.wideMonthNames()[current.getMonth()], " ").concat(current.getFullYear());
|
|
133
133
|
};
|
|
134
134
|
MonthViewService.prototype.rowLength = function (prependCell) {
|
|
135
135
|
return CELLS_LENGTH + (prependCell ? 1 : 0);
|
|
136
136
|
};
|
|
137
137
|
MonthViewService.prototype.skip = function (value, min) {
|
|
138
|
-
return kendo_date_math_1.durationInMonths(min, value);
|
|
138
|
+
return (0, kendo_date_math_1.durationInMonths)(min, value);
|
|
139
139
|
};
|
|
140
140
|
MonthViewService.prototype.total = function (min, max) {
|
|
141
|
-
return kendo_date_math_1.durationInMonths(min, max) + 1;
|
|
141
|
+
return (0, kendo_date_math_1.durationInMonths)(min, max) + 1;
|
|
142
142
|
};
|
|
143
143
|
MonthViewService.prototype.value = function (current) {
|
|
144
144
|
return current ? current.getDate().toString() : '';
|
|
145
145
|
};
|
|
146
146
|
MonthViewService.prototype.viewDate = function (date, max, border) {
|
|
147
147
|
if (border === void 0) { border = 1; }
|
|
148
|
-
var renderTwoViews = kendo_date_math_1.durationInMonths(date, max) < border;
|
|
149
|
-
return renderTwoViews ? kendo_date_math_1.addMonths(date, -1) : date;
|
|
148
|
+
var renderTwoViews = (0, kendo_date_math_1.durationInMonths)(date, max) < border;
|
|
149
|
+
return renderTwoViews ? (0, kendo_date_math_1.addMonths)(date, -1) : date;
|
|
150
150
|
};
|
|
151
151
|
MonthViewService.prototype.isWeekend = function (date) {
|
|
152
152
|
var day = date.getDay();
|
|
@@ -157,10 +157,10 @@ var MonthViewService = /** @class */ (function () {
|
|
|
157
157
|
};
|
|
158
158
|
MonthViewService.prototype.normalize = function (cellDate, min, max) {
|
|
159
159
|
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
160
|
-
return kendo_date_math_1.getDate(min);
|
|
160
|
+
return (0, kendo_date_math_1.getDate)(min);
|
|
161
161
|
}
|
|
162
162
|
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
163
|
-
return kendo_date_math_1.getDate(max);
|
|
163
|
+
return (0, kendo_date_math_1.getDate)(max);
|
|
164
164
|
}
|
|
165
165
|
return cellDate;
|
|
166
166
|
};
|
|
@@ -22,7 +22,7 @@ var NavigationService = /** @class */ (function () {
|
|
|
22
22
|
this.bus = bus;
|
|
23
23
|
}
|
|
24
24
|
NavigationService.prototype.action = function (event) {
|
|
25
|
-
var action = ""
|
|
25
|
+
var action = "".concat(event.ctrlKey || event.metaKey ? 'meta+' : '').concat(event.keyCode);
|
|
26
26
|
return KEY_TO_ACTION[action];
|
|
27
27
|
};
|
|
28
28
|
NavigationService.prototype.move = function (value, action, activeView, service, event) {
|
|
@@ -9,6 +9,10 @@ var powerByMagnitude = function (magnitude) { return function (x) { return x * m
|
|
|
9
9
|
var ScrollSyncService = /** @class */ (function () {
|
|
10
10
|
function ScrollSyncService(dom) {
|
|
11
11
|
this.dom = dom;
|
|
12
|
+
this.divideByMagnitude = null;
|
|
13
|
+
this.powerByMagnitude = null;
|
|
14
|
+
this.navigator = null;
|
|
15
|
+
this.view = null;
|
|
12
16
|
this.monthScrolled = false;
|
|
13
17
|
this.navScrolled = false;
|
|
14
18
|
}
|
|
@@ -50,7 +54,7 @@ var ScrollSyncService = /** @class */ (function () {
|
|
|
50
54
|
};
|
|
51
55
|
ScrollSyncService.prototype.calculateScroll = function (component, scrollTop) {
|
|
52
56
|
var modifier = component === this.navigator ? this.divideByMagnitude : this.powerByMagnitude;
|
|
53
|
-
return modifier(scrollTop);
|
|
57
|
+
return modifier ? modifier(scrollTop) : 0;
|
|
54
58
|
};
|
|
55
59
|
return ScrollSyncService;
|
|
56
60
|
}());
|
|
@@ -11,7 +11,7 @@ var WeekNamesService = /** @class */ (function () {
|
|
|
11
11
|
}
|
|
12
12
|
WeekNamesService.prototype.getWeekNames = function (includeWeekNumber) {
|
|
13
13
|
if (includeWeekNumber === void 0) { includeWeekNumber = false; }
|
|
14
|
-
var weekNames = utils_1.shiftWeekNames(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
|
|
14
|
+
var weekNames = (0, utils_1.shiftWeekNames)(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
|
|
15
15
|
return includeWeekNumber ? [''].concat(weekNames) : weekNames;
|
|
16
16
|
};
|
|
17
17
|
return WeekNamesService;
|
|
@@ -29,14 +29,14 @@ var downStep = function (month) {
|
|
|
29
29
|
return 2;
|
|
30
30
|
};
|
|
31
31
|
var ACTIONS = (_a = {},
|
|
32
|
-
_a[NavigationAction_1.Action.Left] = function (date) { return kendo_date_math_1.addMonths(date, -1); },
|
|
33
|
-
_a[NavigationAction_1.Action.Up] = function (date) { return kendo_date_math_1.addMonths(date, upStep(date.getMonth())); },
|
|
34
|
-
_a[NavigationAction_1.Action.Right] = function (date) { return kendo_date_math_1.addMonths(date, 1); },
|
|
35
|
-
_a[NavigationAction_1.Action.Down] = function (date) { return kendo_date_math_1.addMonths(date, downStep(date.getMonth())); },
|
|
36
|
-
_a[NavigationAction_1.Action.PrevView] = function (date) { return kendo_date_math_1.addYears(date, -1); },
|
|
37
|
-
_a[NavigationAction_1.Action.NextView] = function (date) { return kendo_date_math_1.addYears(date, 1); },
|
|
38
|
-
_a[NavigationAction_1.Action.FirstInView] = function (date) { return kendo_date_math_1.firstMonthOfYear(date); },
|
|
39
|
-
_a[NavigationAction_1.Action.LastInView] = function (date) { return kendo_date_math_1.lastMonthOfYear(date); },
|
|
32
|
+
_a[NavigationAction_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addMonths)(date, -1); },
|
|
33
|
+
_a[NavigationAction_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addMonths)(date, upStep(date.getMonth())); },
|
|
34
|
+
_a[NavigationAction_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addMonths)(date, 1); },
|
|
35
|
+
_a[NavigationAction_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addMonths)(date, downStep(date.getMonth())); },
|
|
36
|
+
_a[NavigationAction_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addYears)(date, -1); },
|
|
37
|
+
_a[NavigationAction_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addYears)(date, 1); },
|
|
38
|
+
_a[NavigationAction_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstMonthOfYear)(date); },
|
|
39
|
+
_a[NavigationAction_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastMonthOfYear)(date); },
|
|
40
40
|
_a);
|
|
41
41
|
/**
|
|
42
42
|
* @hidden
|
|
@@ -46,10 +46,10 @@ var YearViewService = /** @class */ (function () {
|
|
|
46
46
|
this._intl = intl;
|
|
47
47
|
}
|
|
48
48
|
YearViewService.prototype.addToDate = function (min, skip) {
|
|
49
|
-
return kendo_date_math_1.addYears(min, skip);
|
|
49
|
+
return (0, kendo_date_math_1.addYears)(min, skip);
|
|
50
50
|
};
|
|
51
51
|
YearViewService.prototype.datesList = function (start, count) {
|
|
52
|
-
return utils_1.range(0, count).map(function (i) { return kendo_date_math_1.addYears(start, i); });
|
|
52
|
+
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addYears)(start, i); });
|
|
53
53
|
};
|
|
54
54
|
YearViewService.prototype.data = function (options) {
|
|
55
55
|
var _this = this;
|
|
@@ -58,15 +58,15 @@ var YearViewService = /** @class */ (function () {
|
|
|
58
58
|
return EMPTY_DATA;
|
|
59
59
|
}
|
|
60
60
|
var months = this.abbrMonthNames();
|
|
61
|
-
var firstDate = kendo_date_math_1.firstMonthOfYear(viewDate);
|
|
62
|
-
var lastDate = kendo_date_math_1.lastMonthOfYear(viewDate);
|
|
61
|
+
var firstDate = (0, kendo_date_math_1.firstMonthOfYear)(viewDate);
|
|
62
|
+
var lastDate = (0, kendo_date_math_1.lastMonthOfYear)(viewDate);
|
|
63
63
|
var currentYear = firstDate.getFullYear();
|
|
64
|
-
var cells = utils_1.range(0, CELLS_LENGTH);
|
|
65
|
-
var today = utils_1.getToday();
|
|
66
|
-
return utils_1.range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
67
|
-
var baseDate = kendo_date_math_1.addMonths(firstDate, rowOffset * CELLS_LENGTH);
|
|
64
|
+
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
65
|
+
var today = (0, utils_1.getToday)();
|
|
66
|
+
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
67
|
+
var baseDate = (0, kendo_date_math_1.addMonths)(firstDate, rowOffset * CELLS_LENGTH);
|
|
68
68
|
return cells.map(function (cellOffset) {
|
|
69
|
-
var cellDate = _this.normalize(kendo_date_math_1.addMonths(baseDate, cellOffset), min, max);
|
|
69
|
+
var cellDate = _this.normalize((0, kendo_date_math_1.addMonths)(baseDate, cellOffset), min, max);
|
|
70
70
|
var changedYear = currentYear < cellDate.getFullYear();
|
|
71
71
|
if (changedYear) {
|
|
72
72
|
return null;
|
|
@@ -74,16 +74,16 @@ var YearViewService = /** @class */ (function () {
|
|
|
74
74
|
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
75
75
|
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
76
76
|
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
77
|
-
var isRangeMid = isInMiddle && utils_1.isInSelectionRange(cellDate, selectionRange);
|
|
77
|
+
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
78
78
|
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
79
|
-
? utils_1.isInRange(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
79
|
+
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
80
80
|
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
81
81
|
return {
|
|
82
82
|
formattedValue: months[cellDate.getMonth()],
|
|
83
|
-
id: ""
|
|
83
|
+
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
84
84
|
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
85
85
|
isSelected: isSelected,
|
|
86
|
-
isInRange: utils_1.isInRange(cellDate, min, max),
|
|
86
|
+
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
87
87
|
isWeekend: false,
|
|
88
88
|
isRangeStart: isRangeStart,
|
|
89
89
|
isRangeMid: isRangeMid,
|
|
@@ -101,7 +101,7 @@ var YearViewService = /** @class */ (function () {
|
|
|
101
101
|
var _this = this;
|
|
102
102
|
var result = false;
|
|
103
103
|
dates.forEach(function (date) {
|
|
104
|
-
if (utils_1.isInRange(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
104
|
+
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
105
105
|
result = true;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
@@ -122,13 +122,13 @@ var YearViewService = /** @class */ (function () {
|
|
|
122
122
|
return dates[0].getFullYear() <= year && year <= dates[dates.length - 1].getFullYear();
|
|
123
123
|
};
|
|
124
124
|
YearViewService.prototype.isInRange = function (candidate, min, max) {
|
|
125
|
-
var candidateValue = kendo_date_math_1.createDate(candidate.getFullYear(), candidate.getMonth(), 1);
|
|
126
|
-
var aboveMin = !min || kendo_date_math_1.createDate(min.getFullYear(), min.getMonth(), 1) <= candidateValue;
|
|
127
|
-
var belowMax = !max || candidateValue <= kendo_date_math_1.createDate(max.getFullYear(), max.getMonth(), 1);
|
|
125
|
+
var candidateValue = (0, kendo_date_math_1.createDate)(candidate.getFullYear(), candidate.getMonth(), 1);
|
|
126
|
+
var aboveMin = !min || (0, kendo_date_math_1.createDate)(min.getFullYear(), min.getMonth(), 1) <= candidateValue;
|
|
127
|
+
var belowMax = !max || candidateValue <= (0, kendo_date_math_1.createDate)(max.getFullYear(), max.getMonth(), 1);
|
|
128
128
|
return aboveMin && belowMax;
|
|
129
129
|
};
|
|
130
130
|
YearViewService.prototype.isInSameView = function (candidate, value) {
|
|
131
|
-
return kendo_date_math_1.durationInYears(candidate, value) === 0;
|
|
131
|
+
return (0, kendo_date_math_1.durationInYears)(candidate, value) === 0;
|
|
132
132
|
};
|
|
133
133
|
YearViewService.prototype.isRangeStart = function (value) {
|
|
134
134
|
return value.getFullYear() % 10 === 0;
|
|
@@ -141,7 +141,7 @@ var YearViewService = /** @class */ (function () {
|
|
|
141
141
|
return modifier(value);
|
|
142
142
|
};
|
|
143
143
|
YearViewService.prototype.cellTitle = function (value) {
|
|
144
|
-
return value.getFullYear()
|
|
144
|
+
return "".concat(value.getFullYear(), " ").concat(this.value(value));
|
|
145
145
|
};
|
|
146
146
|
YearViewService.prototype.navigationTitle = function (value) {
|
|
147
147
|
return this.title(value);
|
|
@@ -153,28 +153,28 @@ var YearViewService = /** @class */ (function () {
|
|
|
153
153
|
return CELLS_LENGTH;
|
|
154
154
|
};
|
|
155
155
|
YearViewService.prototype.skip = function (value, min) {
|
|
156
|
-
return kendo_date_math_1.durationInYears(min, value);
|
|
156
|
+
return (0, kendo_date_math_1.durationInYears)(min, value);
|
|
157
157
|
};
|
|
158
158
|
YearViewService.prototype.total = function (min, max) {
|
|
159
|
-
return kendo_date_math_1.durationInYears(min, max) + 1;
|
|
159
|
+
return (0, kendo_date_math_1.durationInYears)(min, max) + 1;
|
|
160
160
|
};
|
|
161
161
|
YearViewService.prototype.value = function (current) {
|
|
162
162
|
return current ? this.abbrMonthNames()[current.getMonth()] : '';
|
|
163
163
|
};
|
|
164
164
|
YearViewService.prototype.viewDate = function (date, max, border) {
|
|
165
165
|
if (border === void 0) { border = 1; }
|
|
166
|
-
var renderTwoViews = kendo_date_math_1.durationInYears(date, max) < border;
|
|
167
|
-
return renderTwoViews ? kendo_date_math_1.addYears(date, -1) : date;
|
|
166
|
+
var renderTwoViews = (0, kendo_date_math_1.durationInYears)(date, max) < border;
|
|
167
|
+
return renderTwoViews ? (0, kendo_date_math_1.addYears)(date, -1) : date;
|
|
168
168
|
};
|
|
169
169
|
YearViewService.prototype.abbrMonthNames = function () {
|
|
170
170
|
return this._intl.dateFormatNames({ nameType: 'abbreviated', type: 'months' });
|
|
171
171
|
};
|
|
172
172
|
YearViewService.prototype.normalize = function (cellDate, min, max) {
|
|
173
173
|
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
174
|
-
return kendo_date_math_2.cloneDate(min);
|
|
174
|
+
return (0, kendo_date_math_2.cloneDate)(min);
|
|
175
175
|
}
|
|
176
176
|
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
177
|
-
return kendo_date_math_2.cloneDate(max);
|
|
177
|
+
return (0, kendo_date_math_2.cloneDate)(max);
|
|
178
178
|
}
|
|
179
179
|
return cellDate;
|
|
180
180
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
export default class ScrollSync {
|
|
5
5
|
private scrollDetails;
|
|
6
6
|
private scrollNavigation;
|
|
7
|
-
areDetailsSynced:
|
|
8
|
-
isNavigationSynced:
|
|
9
|
-
magnitude:
|
|
7
|
+
areDetailsSynced: boolean;
|
|
8
|
+
isNavigationSynced: boolean;
|
|
9
|
+
magnitude: number;
|
|
10
10
|
constructor(detailsMonthHeight: number, navigationMonthHeight: number, scrollDetails: (scrollTo: number) => void, scrollNavigation: (scrollTo: number) => void);
|
|
11
11
|
syncDetails(navigationScrollTop: number): void;
|
|
12
12
|
syncNavigation(detailsScrollTop: number): void;
|
|
@@ -7,6 +7,8 @@ var ScrollSync = /** @class */ (function () {
|
|
|
7
7
|
function ScrollSync(detailsMonthHeight, navigationMonthHeight, scrollDetails, scrollNavigation) {
|
|
8
8
|
this.scrollDetails = scrollDetails;
|
|
9
9
|
this.scrollNavigation = scrollNavigation;
|
|
10
|
+
this.areDetailsSynced = false;
|
|
11
|
+
this.isNavigationSynced = false;
|
|
10
12
|
this.magnitude = Math.max(detailsMonthHeight / navigationMonthHeight, 1);
|
|
11
13
|
}
|
|
12
14
|
ScrollSync.prototype.syncDetails = function (navigationScrollTop) {
|
|
@@ -12,6 +12,6 @@ exports.PickerWrap = React.forwardRef(function (props, ref) {
|
|
|
12
12
|
var element = React.useRef(null);
|
|
13
13
|
React.useImperativeHandle(ref, function () { return element.current; });
|
|
14
14
|
React.useImperativeHandle(_ref, function () { return element.current; });
|
|
15
|
-
var className = React.useMemo(function () { return kendo_react_common_1.classNames(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
15
|
+
var className = React.useMemo(function () { return (0, kendo_react_common_1.classNames)(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
16
16
|
return (React.createElement("span", { ref: element, id: props.id, style: props.style, className: className, tabIndex: props.tabIndex }, props.children));
|
|
17
17
|
});
|
|
@@ -18,6 +18,10 @@ export interface DateInputChangeEvent<T = DateInput> {
|
|
|
18
18
|
export interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
|
|
19
19
|
/** @hidden */
|
|
20
20
|
_ref?: React.MutableRefObject<DateInput | null>;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
21
25
|
/**
|
|
22
26
|
* Sets a class of the DateInput DOM element.
|
|
23
27
|
*/
|
|
@@ -146,18 +150,18 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
146
150
|
required: PropTypes.Requireable<boolean>;
|
|
147
151
|
validate: PropTypes.Requireable<boolean>;
|
|
148
152
|
valid: PropTypes.Requireable<boolean>;
|
|
149
|
-
size: PropTypes.Requireable<"small" | "medium" | "large">;
|
|
150
|
-
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
|
|
151
|
-
fillMode: PropTypes.Requireable<"flat" | "
|
|
153
|
+
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
154
|
+
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
|
|
155
|
+
fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
|
|
152
156
|
};
|
|
153
157
|
/**
|
|
154
158
|
* @hidden
|
|
155
159
|
*/
|
|
156
160
|
static defaultProps: {
|
|
157
161
|
format: string;
|
|
158
|
-
size: "small" | "medium" | "large";
|
|
159
|
-
rounded: "small" | "medium" | "full" | "large";
|
|
160
|
-
fillMode: "flat" | "
|
|
162
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
163
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
164
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
161
165
|
formatPlaceholder: DateInputFormatPlaceholder;
|
|
162
166
|
spinners: boolean;
|
|
163
167
|
disabled: boolean;
|
|
@@ -168,7 +172,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
|
|
|
168
172
|
required: boolean;
|
|
169
173
|
validityStyles: boolean;
|
|
170
174
|
validationMessage: string;
|
|
171
|
-
placeholder:
|
|
175
|
+
placeholder: null;
|
|
172
176
|
};
|
|
173
177
|
private kendoDate;
|
|
174
178
|
private currentFormat;
|
|
@@ -25,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
29
|
-
for (var i = 0,
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
36
|
};
|
|
33
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
38
|
exports.DateInput = exports.DateInputPropsContext = exports.DateInputWithoutContext = void 0;
|
|
@@ -55,10 +59,12 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
55
59
|
function DateInputWithoutContext(props) {
|
|
56
60
|
var _this = _super.call(this, props) || this;
|
|
57
61
|
_this.kendoDate = null;
|
|
62
|
+
_this.currentFormat = '';
|
|
58
63
|
_this.paste = false;
|
|
59
64
|
_this._element = null;
|
|
60
65
|
_this._wrapper = null;
|
|
61
|
-
_this._inputId = kendo_react_common_1.guid();
|
|
66
|
+
_this._inputId = (0, kendo_react_common_1.guid)();
|
|
67
|
+
_this._lastSelectedSymbol = '';
|
|
62
68
|
/**
|
|
63
69
|
* @hidden
|
|
64
70
|
*/
|
|
@@ -81,7 +87,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
81
87
|
if (!_this.element || !_this.kendoDate) {
|
|
82
88
|
return;
|
|
83
89
|
}
|
|
84
|
-
var value = kendo_react_intl_1.provideIntlService(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
90
|
+
var value = (0, kendo_react_intl_1.provideIntlService)(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
85
91
|
var oldValue = _this.value;
|
|
86
92
|
_this.kendoDate.setValue(value);
|
|
87
93
|
_this.triggerChange(event, oldValue);
|
|
@@ -110,7 +116,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
110
116
|
var _a = _this.kendoDate.getTextAndFormat(), text = _a.text, currentFormat = _a.format;
|
|
111
117
|
_this.currentFormat = currentFormat;
|
|
112
118
|
var dateBeforeChange = _this.value;
|
|
113
|
-
var diff = utils_1.approximateStringMatching(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
119
|
+
var diff = (0, utils_1.approximateStringMatching)(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
114
120
|
var navigationOnly = (diff.length === 1 && diff[0][1] === '_');
|
|
115
121
|
if (!navigationOnly) {
|
|
116
122
|
for (var i = 0; i < diff.length; i++) {
|
|
@@ -203,7 +209,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
203
209
|
}
|
|
204
210
|
_this.setState({ focused: false });
|
|
205
211
|
};
|
|
206
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
212
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
207
213
|
_this.state = {
|
|
208
214
|
focused: false
|
|
209
215
|
};
|
|
@@ -247,7 +253,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
247
253
|
if (this.props._ref) {
|
|
248
254
|
this.props._ref.current = this;
|
|
249
255
|
}
|
|
250
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
256
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
251
257
|
var props = __assign(__assign({}, DateInputWithoutContext.defaultProps), this.props);
|
|
252
258
|
var min = props.min, max = props.max, name = props.name, label = props.label, id = props.id;
|
|
253
259
|
var currentText = this.text;
|
|
@@ -263,7 +269,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
263
269
|
if (this.value !== null) {
|
|
264
270
|
ariaProps['aria-valuenow'] = this.value.getTime();
|
|
265
271
|
}
|
|
266
|
-
var wrapperClassesInstance = __spreadArray([], utils_1.wrapperClasses);
|
|
272
|
+
var wrapperClassesInstance = __spreadArray([], utils_1.wrapperClasses, true);
|
|
267
273
|
if (this.props.className) {
|
|
268
274
|
wrapperClassesInstance.push(this.props.className);
|
|
269
275
|
}
|
|
@@ -272,10 +278,10 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
272
278
|
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
273
279
|
return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
|
|
274
280
|
? { width: _this.props.width }
|
|
275
|
-
: undefined, dir: _this.props.dir, className: kendo_react_common_1.classNames('k-dateinput', 'k-input', (_b = {},
|
|
276
|
-
_b["k-input-"
|
|
277
|
-
_b["k-input-"
|
|
278
|
-
_b["k-rounded-"
|
|
281
|
+
: undefined, dir: _this.props.dir, className: (0, kendo_react_common_1.classNames)('k-dateinput', 'k-input', (_b = {},
|
|
282
|
+
_b["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
283
|
+
_b["k-input-".concat(fillMode)] = fillMode,
|
|
284
|
+
_b["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
279
285
|
_b['k-invalid'] = !isValid,
|
|
280
286
|
_b['k-required'] = _this.required,
|
|
281
287
|
_b['k-disabled'] = _this.props.disabled,
|
|
@@ -366,8 +372,8 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
366
372
|
* Represents the validity state into which the DateInput is set.
|
|
367
373
|
*/
|
|
368
374
|
get: function () {
|
|
369
|
-
var inRange = utils_1.isInRange(this.value, this.min, this.max)
|
|
370
|
-
&& utils_3.isInTimeRange(this.value, this.props.minTime, this.props.maxTime);
|
|
375
|
+
var inRange = (0, utils_1.isInRange)(this.value, this.min, this.max)
|
|
376
|
+
&& (0, utils_3.isInTimeRange)(this.value, this.props.minTime, this.props.maxTime);
|
|
371
377
|
var customError = this.props.validationMessage !== undefined;
|
|
372
378
|
var isValid = (!this.required || this.value !== null) && inRange;
|
|
373
379
|
var valid = this.props.valid !== undefined ? this.props.valid : isValid;
|
|
@@ -458,7 +464,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
458
464
|
* @hidden
|
|
459
465
|
*/
|
|
460
466
|
DateInputWithoutContext.prototype.intl = function () {
|
|
461
|
-
return kendo_react_intl_1.provideIntlService(this);
|
|
467
|
+
return (0, kendo_react_intl_1.provideIntlService)(this);
|
|
462
468
|
};
|
|
463
469
|
Object.defineProperty(DateInputWithoutContext.prototype, "selection", {
|
|
464
470
|
/* end handlers */
|
|
@@ -485,7 +491,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
485
491
|
this.valueDuringOnChange = this.value;
|
|
486
492
|
this.forceUpdate();
|
|
487
493
|
if (this.props.onChange
|
|
488
|
-
&& !kendo_date_math_1.isEqual(oldValue, this.value)) {
|
|
494
|
+
&& !(0, kendo_date_math_1.isEqual)(oldValue, this.value)) {
|
|
489
495
|
// isEqual works with null
|
|
490
496
|
this.props.onChange.call(undefined, {
|
|
491
497
|
syntheticEvent: event,
|
|
@@ -661,10 +667,10 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
661
667
|
// defaultValue: null as Date | null,
|
|
662
668
|
spinners: false,
|
|
663
669
|
disabled: false,
|
|
664
|
-
max: kendo_date_math_1.cloneDate(utils_2.MAX_DATE),
|
|
665
|
-
min: kendo_date_math_1.cloneDate(utils_2.MIN_DATE),
|
|
666
|
-
minTime: kendo_date_math_1.cloneDate(defaults_1.MIN_TIME),
|
|
667
|
-
maxTime: kendo_date_math_1.cloneDate(defaults_1.MAX_TIME),
|
|
670
|
+
max: (0, kendo_date_math_1.cloneDate)(utils_2.MAX_DATE),
|
|
671
|
+
min: (0, kendo_date_math_1.cloneDate)(utils_2.MIN_DATE),
|
|
672
|
+
minTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MIN_TIME),
|
|
673
|
+
maxTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MAX_TIME),
|
|
668
674
|
required: false,
|
|
669
675
|
validityStyles: true,
|
|
670
676
|
validationMessage: VALIDATION_MESSAGE,
|
|
@@ -680,7 +686,7 @@ exports.DateInputWithoutContext = DateInputWithoutContext;
|
|
|
680
686
|
*
|
|
681
687
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
682
688
|
*/
|
|
683
|
-
exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
689
|
+
exports.DateInputPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
684
690
|
;
|
|
685
691
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
686
692
|
/**
|
|
@@ -689,7 +695,7 @@ exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
689
695
|
* Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
|
|
690
696
|
* Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
|
|
691
697
|
*/
|
|
692
|
-
exports.DateInput = kendo_react_common_1.withPropsContext(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
698
|
+
exports.DateInput = (0, kendo_react_common_1.withPropsContext)(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
693
699
|
exports.DateInput.displayName = 'KendoReactDateInput';
|
|
694
|
-
kendo_react_intl_1.registerForIntl(DateInputWithoutContext);
|
|
695
|
-
kendo_react_intl_1.registerForLocalization(DateInputWithoutContext);
|
|
700
|
+
(0, kendo_react_intl_1.registerForIntl)(DateInputWithoutContext);
|
|
701
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateInputWithoutContext);
|