@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
|
@@ -30,6 +30,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
30
30
|
__extends(HorizontalViewList, _super);
|
|
31
31
|
function HorizontalViewList(props) {
|
|
32
32
|
var _this = _super.call(this, props) || this;
|
|
33
|
+
_this._element = null;
|
|
33
34
|
_this.isActive = false;
|
|
34
35
|
_this.focusActiveDate = function () {
|
|
35
36
|
if (!_this._element) {
|
|
@@ -72,7 +73,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
72
73
|
var args = {
|
|
73
74
|
syntheticEvent: event.syntheticEvent,
|
|
74
75
|
nativeEvent: event.nativeEvent,
|
|
75
|
-
value: kendo_date_math_1.cloneDate(event.value),
|
|
76
|
+
value: (0, kendo_date_math_1.cloneDate)(event.value),
|
|
76
77
|
target: _this,
|
|
77
78
|
isTodayClick: isTodayClick
|
|
78
79
|
};
|
|
@@ -123,7 +124,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
123
124
|
var selectionRange = this.props.allowReverse
|
|
124
125
|
? this.rotateSelectionRange(this.props.selectionRange)
|
|
125
126
|
: this.props.selectionRange;
|
|
126
|
-
var rootClassNames = kendo_react_common_1.classNames('k-calendar-view k-hstack k-align-items-start k-justify-content-center', {
|
|
127
|
+
var rootClassNames = (0, kendo_react_common_1.classNames)('k-calendar-view k-hstack k-align-items-start k-justify-content-center', {
|
|
127
128
|
'k-calendar-monthview': this.props.activeView === models_1.CalendarViewEnum.month,
|
|
128
129
|
'k-calendar-yearview': this.props.activeView === models_1.CalendarViewEnum.year,
|
|
129
130
|
'k-calendar-decadeview': this.props.activeView === models_1.CalendarViewEnum.decade,
|
|
@@ -62,14 +62,14 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
62
62
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
63
63
|
max: PropTypes.Requireable<Date>;
|
|
64
64
|
min: PropTypes.Requireable<Date>;
|
|
65
|
-
mode: PropTypes.Requireable<"
|
|
65
|
+
mode: PropTypes.Requireable<"multiple" | "range" | "single">;
|
|
66
66
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
67
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
69
69
|
tabIndex: PropTypes.Requireable<number>;
|
|
70
70
|
topView: PropTypes.Requireable<ActiveView>;
|
|
71
71
|
value: PropTypes.Requireable<any>;
|
|
72
|
-
views: (props:
|
|
72
|
+
views: (props: MultiViewCalendarProps, propName: keyof MultiViewCalendarProps<any>, componentName: string) => Error | null;
|
|
73
73
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
@@ -81,7 +81,7 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
81
81
|
max: Date;
|
|
82
82
|
navigation: boolean;
|
|
83
83
|
defaultActiveView: ActiveView;
|
|
84
|
-
defaultValue:
|
|
84
|
+
defaultValue: null;
|
|
85
85
|
topView: ActiveView;
|
|
86
86
|
tabIndex: number;
|
|
87
87
|
bottomView: ActiveView;
|
|
@@ -44,15 +44,15 @@ var TodayCommand_1 = require("./TodayCommand");
|
|
|
44
44
|
var extractDateFromValue = function (min, max, value) {
|
|
45
45
|
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
46
46
|
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
47
|
-
return value instanceof Date && !Array.isArray(value) && utils_1.isInRange(kendo_date_math_1.getDate(value), min, max)
|
|
48
|
-
? kendo_date_math_1.getDate(value)
|
|
47
|
+
return value instanceof Date && !Array.isArray(value) && (0, utils_1.isInRange)((0, kendo_date_math_1.getDate)(value), min, max)
|
|
48
|
+
? (0, kendo_date_math_1.getDate)(value)
|
|
49
49
|
: null;
|
|
50
50
|
};
|
|
51
51
|
var extractMultipleFromValue = function (min, max, value) {
|
|
52
52
|
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
53
53
|
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
54
54
|
return Array.isArray(value)
|
|
55
|
-
? value.filter(function (date) { return utils_1.isInRange(date, min, max); }).map(function (date) { return kendo_date_math_1.getDate(date); })
|
|
55
|
+
? value.filter(function (date) { return (0, utils_1.isInRange)(date, min, max); }).map(function (date) { return (0, kendo_date_math_1.getDate)(date); })
|
|
56
56
|
: null;
|
|
57
57
|
};
|
|
58
58
|
var extractRangeFromValue = function (value) {
|
|
@@ -75,12 +75,19 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
75
75
|
__extends(MultiViewCalendarWithoutContext, _super);
|
|
76
76
|
function MultiViewCalendarWithoutContext(props) {
|
|
77
77
|
var _this = _super.call(this, props) || this;
|
|
78
|
+
_this.dates = [];
|
|
78
79
|
_this.selectedDate = null;
|
|
79
80
|
_this.selectedMultiple = null;
|
|
80
81
|
_this.selectedRange = models_1.EMPTY_SELECTIONRANGE;
|
|
81
|
-
_this.
|
|
82
|
+
_this._focusedDate = new Date();
|
|
83
|
+
_this.cellUID = (0, kendo_react_common_1.guid)();
|
|
82
84
|
_this.activeRangeEnd = 'start';
|
|
83
|
-
_this.
|
|
85
|
+
_this._element = null;
|
|
86
|
+
_this.intl = null;
|
|
87
|
+
_this.localization = null;
|
|
88
|
+
_this.service = null;
|
|
89
|
+
_this.wrapperID = (0, kendo_react_common_1.guid)();
|
|
90
|
+
_this.calendarViewList = null;
|
|
84
91
|
_this.isActive = false;
|
|
85
92
|
_this.calculateFocusFromValue = true;
|
|
86
93
|
/**
|
|
@@ -130,7 +137,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
130
137
|
return _this.clampDate(_this.service.move(_this.focusedDate, action));
|
|
131
138
|
};
|
|
132
139
|
_this.clampDate = function (value) {
|
|
133
|
-
return utils_1.dateInRange(value, _this.min, _this.max);
|
|
140
|
+
return (0, utils_1.dateInRange)(value, _this.min, _this.max);
|
|
134
141
|
};
|
|
135
142
|
_this.shouldAutoCorrect = function (candidate, value) {
|
|
136
143
|
var end = value.end, start = value.start;
|
|
@@ -184,7 +191,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
184
191
|
if (!_this.todayIsInRange) {
|
|
185
192
|
return;
|
|
186
193
|
}
|
|
187
|
-
_this.handleDateChange
|
|
194
|
+
_this.handleDateChange(event);
|
|
188
195
|
};
|
|
189
196
|
_this.handlePrevButtonClick = function () {
|
|
190
197
|
_this.navigate(models_1.Action.PrevView);
|
|
@@ -201,11 +208,11 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
201
208
|
value: _this.focusedDate,
|
|
202
209
|
target: _this
|
|
203
210
|
};
|
|
204
|
-
_this.handleDateChange
|
|
211
|
+
_this.handleDateChange(args);
|
|
205
212
|
}
|
|
206
213
|
else {
|
|
207
|
-
var candidate = utils_1.dateInRange(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
|
|
208
|
-
if (kendo_date_math_1.isEqualDate(_this.focusedDate, candidate)) {
|
|
214
|
+
var candidate = (0, utils_1.dateInRange)(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
|
|
215
|
+
if ((0, kendo_date_math_1.isEqualDate)(_this.focusedDate, candidate)) {
|
|
209
216
|
return;
|
|
210
217
|
}
|
|
211
218
|
_this.calculateFocusFromValue = false;
|
|
@@ -219,7 +226,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
219
226
|
_this.setState({ activeView: view });
|
|
220
227
|
};
|
|
221
228
|
_this.handleDateChange = function (event) {
|
|
222
|
-
var focusedDate = kendo_date_math_1.cloneDate(event.value);
|
|
229
|
+
var focusedDate = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
223
230
|
var canNavigateDown = _this.bus.canMoveDown(_this.state.activeView);
|
|
224
231
|
if (_this.props.disabled) {
|
|
225
232
|
return;
|
|
@@ -238,28 +245,28 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
238
245
|
var value;
|
|
239
246
|
switch (_this.props.mode) {
|
|
240
247
|
case 'single':
|
|
241
|
-
value = kendo_date_math_1.cloneDate(event.value);
|
|
248
|
+
value = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
242
249
|
break;
|
|
243
250
|
case 'multiple':
|
|
244
251
|
if (Array.isArray(_this.selectedMultiple)) {
|
|
245
252
|
var result = _this.selectedMultiple.slice();
|
|
246
253
|
var index_1 = -1;
|
|
247
254
|
result.forEach(function (date, idx) {
|
|
248
|
-
if (kendo_date_math_1.isEqualDate(date, event.value)) {
|
|
255
|
+
if ((0, kendo_date_math_1.isEqualDate)(date, event.value)) {
|
|
249
256
|
index_1 = idx;
|
|
250
257
|
}
|
|
251
258
|
});
|
|
252
259
|
index_1 !== -1
|
|
253
260
|
? result.splice(index_1, 1)
|
|
254
|
-
: result.push(kendo_date_math_1.cloneDate(event.value));
|
|
261
|
+
: result.push((0, kendo_date_math_1.cloneDate)(event.value));
|
|
255
262
|
value = result.slice();
|
|
256
263
|
}
|
|
257
264
|
else {
|
|
258
265
|
if (_this.selectedDate) {
|
|
259
|
-
value = [kendo_date_math_1.cloneDate(_this.selectedDate), kendo_date_math_1.cloneDate(event.value)];
|
|
266
|
+
value = [(0, kendo_date_math_1.cloneDate)(_this.selectedDate), (0, kendo_date_math_1.cloneDate)(event.value)];
|
|
260
267
|
}
|
|
261
268
|
else {
|
|
262
|
-
value = [kendo_date_math_1.cloneDate(event.value)];
|
|
269
|
+
value = [(0, kendo_date_math_1.cloneDate)(event.value)];
|
|
263
270
|
}
|
|
264
271
|
}
|
|
265
272
|
break;
|
|
@@ -273,7 +280,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
273
280
|
_this.activeRangeEnd = _this.activeRange !== 'end' ? 'end' : 'start';
|
|
274
281
|
break;
|
|
275
282
|
default:
|
|
276
|
-
value = kendo_date_math_1.cloneDate(event.value);
|
|
283
|
+
value = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
277
284
|
break;
|
|
278
285
|
}
|
|
279
286
|
_this.valueDuringOnChange = value;
|
|
@@ -298,8 +305,8 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
298
305
|
var selectedMultiple = extractMultipleFromValue(_this.min, _this.max, value);
|
|
299
306
|
var selectedRange = extractRangeFromValue(value);
|
|
300
307
|
var calculatedFocus = extractFocusedDate(selectedDate, selectedMultiple, selectedRange);
|
|
301
|
-
var activeView = utils_1.viewInRange(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView);
|
|
302
|
-
var focusedDate = utils_1.dateInRange(props.focusedDate || calculatedFocus || utils_1.getToday(), _this.min, _this.max);
|
|
308
|
+
var activeView = (0, utils_1.viewInRange)(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView);
|
|
309
|
+
var focusedDate = (0, utils_1.dateInRange)(props.focusedDate || calculatedFocus || (0, utils_1.getToday)(), _this.min, _this.max);
|
|
303
310
|
_this.state = {
|
|
304
311
|
value: value,
|
|
305
312
|
activeView: activeView,
|
|
@@ -342,14 +349,14 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
342
349
|
* Gets the current focused date of the MultiViewCalendar.
|
|
343
350
|
*/
|
|
344
351
|
get: function () {
|
|
345
|
-
return kendo_date_math_1.cloneDate(this._focusedDate);
|
|
352
|
+
return (0, kendo_date_math_1.cloneDate)(this._focusedDate);
|
|
346
353
|
},
|
|
347
354
|
enumerable: false,
|
|
348
355
|
configurable: true
|
|
349
356
|
});
|
|
350
357
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "min", {
|
|
351
358
|
get: function () {
|
|
352
|
-
return kendo_date_math_1.getDate(this.props.min !== undefined
|
|
359
|
+
return (0, kendo_date_math_1.getDate)(this.props.min !== undefined
|
|
353
360
|
? this.props.min
|
|
354
361
|
: MultiViewCalendarWithoutContext.defaultProps.min);
|
|
355
362
|
},
|
|
@@ -358,7 +365,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
358
365
|
});
|
|
359
366
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "max", {
|
|
360
367
|
get: function () {
|
|
361
|
-
return kendo_date_math_1.getDate(this.props.max !== undefined
|
|
368
|
+
return (0, kendo_date_math_1.getDate)(this.props.max !== undefined
|
|
362
369
|
? this.props.max
|
|
363
370
|
: MultiViewCalendarWithoutContext.defaultProps.max);
|
|
364
371
|
},
|
|
@@ -394,7 +401,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
394
401
|
});
|
|
395
402
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "todayIsInRange", {
|
|
396
403
|
get: function () {
|
|
397
|
-
return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.min), kendo_date_math_1.getDate(this.max));
|
|
404
|
+
return (0, utils_1.isInRange)((0, utils_1.getToday)(), (0, kendo_date_math_1.getDate)(this.min), (0, kendo_date_math_1.getDate)(this.max));
|
|
398
405
|
},
|
|
399
406
|
enumerable: false,
|
|
400
407
|
configurable: true
|
|
@@ -427,19 +434,19 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
427
434
|
if (this.props._ref) {
|
|
428
435
|
this.props._ref(this);
|
|
429
436
|
}
|
|
430
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
431
|
-
this.localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
437
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
438
|
+
this.localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
432
439
|
this.bus.configure(this.bottomView, this.topView);
|
|
433
|
-
var activeView = utils_1.viewInRange(this.state.activeView, this.bottomView, this.topView);
|
|
440
|
+
var activeView = (0, utils_1.viewInRange)(this.state.activeView, this.bottomView, this.topView);
|
|
434
441
|
this.service = this.bus.service(activeView, this.intl);
|
|
435
442
|
this.selectedDate = extractDateFromValue(this.min, this.max, this.value);
|
|
436
443
|
this.selectedMultiple = extractMultipleFromValue(this.min, this.max, this.value);
|
|
437
444
|
this.selectedRange = extractRangeFromValue(this.value);
|
|
438
445
|
var calculatedFocus = extractFocusedDate(this.selectedDate, this.selectedMultiple, this.selectedRange);
|
|
439
|
-
this._focusedDate = utils_1.dateInRange(this.calculateFocusFromValue && calculatedFocus !== null
|
|
446
|
+
this._focusedDate = (0, utils_1.dateInRange)(this.calculateFocusFromValue && calculatedFocus !== null
|
|
440
447
|
? calculatedFocus
|
|
441
448
|
: this.state.focusedDate, this.min, this.max);
|
|
442
|
-
var wrapperClassName = kendo_react_common_1.classNames('k-widget k-calendar k-calendar-range', {
|
|
449
|
+
var wrapperClassName = (0, kendo_react_common_1.classNames)('k-widget k-calendar k-calendar-range', {
|
|
443
450
|
'k-disabled': this.props.disabled
|
|
444
451
|
}, this.props.className);
|
|
445
452
|
var visualizedRange = this.rangeWithFocused(this.selectedRange, this.focusedDate);
|
|
@@ -459,9 +466,9 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
459
466
|
if (!isDateInList || didViewChange || didViewsCountChange) {
|
|
460
467
|
this.dates = this.service.datesList(this.focusedDate, this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views);
|
|
461
468
|
}
|
|
462
|
-
var activeDate = kendo_date_math_1.cloneDate(this.dates && this.dates[0] ? this.dates[0] : utils_1.getToday());
|
|
469
|
+
var activeDate = (0, kendo_date_math_1.cloneDate)(this.dates && this.dates[0] ? this.dates[0] : (0, utils_1.getToday)());
|
|
463
470
|
return (React.createElement("div", __assign({ ref: function (el) { _this._element = el; }, className: wrapperClassName, id: this.props.id || this.wrapperID, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, role: 'grid', tabIndex: !this.props.disabled ? this.props.tabIndex : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, wrapperAria),
|
|
464
|
-
React.createElement(Header_1.Header, { key: ".kendo.calendar.header."
|
|
471
|
+
React.createElement(Header_1.Header, { key: ".kendo.calendar.header.".concat(activeDate.getTime()), activeView: activeView, currentDate: activeDate, min: this.min, max: this.max, rangeLength: this.props.views, bus: this.bus, service: this.service, headerTitle: this.props.headerTitle, commands: (React.createElement(React.Fragment, null,
|
|
465
472
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-prev", icon: "arrow-chevron-left", fillMode: "flat", title: prevViewTitle, disabled: isPrevDisabled, onClick: this.handlePrevButtonClick }, prevBtnAria)),
|
|
466
473
|
React.createElement(TodayCommand_1.TodayCommand, { min: this.min, max: this.max, onClick: this.handleTodayClick, disabled: !this.todayIsInRange }),
|
|
467
474
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-next", icon: "arrow-chevron-right", fillMode: "flat", title: nextViewTittle, disabled: isNextDisabled, onClick: this.handleNextButtonClick }, nextBtnAria)))) }),
|
|
@@ -481,11 +488,11 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
481
488
|
className: PropTypes.string,
|
|
482
489
|
defaultActiveView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
483
490
|
defaultValue: PropTypes.oneOfType([
|
|
484
|
-
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
491
|
+
(0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
485
492
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
486
493
|
PropTypes.shape({
|
|
487
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
488
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date))
|
|
494
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
495
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date))
|
|
489
496
|
})
|
|
490
497
|
]),
|
|
491
498
|
disabled: PropTypes.bool,
|
|
@@ -502,18 +509,18 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
502
509
|
tabIndex: PropTypes.number,
|
|
503
510
|
topView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
504
511
|
value: PropTypes.oneOfType([
|
|
505
|
-
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
512
|
+
(0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
506
513
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
507
514
|
PropTypes.shape({
|
|
508
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date).isRequired),
|
|
509
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date).isRequired)
|
|
515
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired),
|
|
516
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired)
|
|
510
517
|
})
|
|
511
518
|
]),
|
|
512
519
|
views: function (props, propName, componentName) {
|
|
513
520
|
var views = props[propName];
|
|
514
521
|
if (views !== undefined && views < 1) {
|
|
515
|
-
return new Error("Invalid prop '"
|
|
516
|
-
|
|
522
|
+
return new Error("Invalid prop '".concat(propName, "' supplied to") +
|
|
523
|
+
"'".concat(componentName, "'. The '").concat(propName, "' property cannot be less than 1'"));
|
|
517
524
|
}
|
|
518
525
|
return null;
|
|
519
526
|
},
|
|
@@ -544,7 +551,7 @@ exports.MultiViewCalendarWithoutContext = MultiViewCalendarWithoutContext;
|
|
|
544
551
|
*
|
|
545
552
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
546
553
|
*/
|
|
547
|
-
exports.MultiViewCalendarPropsContext = kendo_react_common_1.createPropsContext();
|
|
554
|
+
exports.MultiViewCalendarPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
548
555
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
549
556
|
/**
|
|
550
557
|
* Represents the KendoReact MultiViewCalendar Component.
|
|
@@ -552,7 +559,7 @@ exports.MultiViewCalendarPropsContext = kendo_react_common_1.createPropsContext(
|
|
|
552
559
|
* Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
|
|
553
560
|
* Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
|
|
554
561
|
*/
|
|
555
|
-
exports.MultiViewCalendar = kendo_react_common_1.withPropsContext(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
|
|
562
|
+
exports.MultiViewCalendar = (0, kendo_react_common_1.withPropsContext)(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
|
|
556
563
|
exports.MultiViewCalendar.displayName = 'KendoReactMultiViewCalendar';
|
|
557
|
-
kendo_react_intl_1.registerForIntl(MultiViewCalendarWithoutContext);
|
|
558
|
-
kendo_react_intl_1.registerForLocalization(MultiViewCalendarWithoutContext);
|
|
564
|
+
(0, kendo_react_intl_1.registerForIntl)(MultiViewCalendarWithoutContext);
|
|
565
|
+
(0, kendo_react_intl_1.registerForLocalization)(MultiViewCalendarWithoutContext);
|
|
@@ -65,7 +65,7 @@ export declare class Navigation extends React.Component<NavigationProps, Navigat
|
|
|
65
65
|
*/
|
|
66
66
|
componentDidUpdate(_prevProps: NavigationProps, _prevState: NavigationState): void;
|
|
67
67
|
render(): JSX.Element;
|
|
68
|
-
protected handleVirtualizationMount: (virtualization:
|
|
68
|
+
protected handleVirtualizationMount: (virtualization: Virtualization) => void;
|
|
69
69
|
protected buildNavigationItem: (date: Date) => React.ReactNode;
|
|
70
70
|
protected calculateHeights: () => void;
|
|
71
71
|
protected getTake(skip: number, total: number): number;
|
|
@@ -41,12 +41,17 @@ var Navigation = /** @class */ (function (_super) {
|
|
|
41
41
|
__extends(Navigation, _super);
|
|
42
42
|
function Navigation(props) {
|
|
43
43
|
var _this = _super.call(this, props) || this;
|
|
44
|
+
_this.virtualization = null;
|
|
45
|
+
_this.list = null;
|
|
46
|
+
_this.itemHeight = 0;
|
|
44
47
|
_this.topOffset = 0;
|
|
48
|
+
_this.maxViewHeight = 0;
|
|
49
|
+
_this.bottomOffset = 0;
|
|
45
50
|
_this.handleVirtualizationMount = function (virtualization) {
|
|
46
51
|
_this.virtualization = virtualization;
|
|
47
52
|
if (_this.virtualization && _this.list) {
|
|
48
|
-
_this.list.style.transform = "translateY("
|
|
49
|
-
var viewDate = utils_1.dateInRange(_this.props.focusedDate, _this.props.min, _this.props.max);
|
|
53
|
+
_this.list.style.transform = "translateY(".concat(_this.topOffset, "px)");
|
|
54
|
+
var viewDate = (0, utils_1.dateInRange)(_this.props.focusedDate, _this.props.min, _this.props.max);
|
|
50
55
|
var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
|
|
51
56
|
_this.virtualization.scrollToIndex(indexToScroll);
|
|
52
57
|
}
|
|
@@ -54,7 +59,7 @@ var Navigation = /** @class */ (function (_super) {
|
|
|
54
59
|
_this.buildNavigationItem = function (date) {
|
|
55
60
|
var text = _this.props.service.navigationTitle(date);
|
|
56
61
|
var isRangeStart = _this.props.service.isRangeStart(date);
|
|
57
|
-
var uniqueID = "kendo-react-calendar-nav-item-"
|
|
62
|
+
var uniqueID = "kendo-react-calendar-nav-item-".concat(date.getTime());
|
|
58
63
|
var navigationItemProps = {
|
|
59
64
|
text: text,
|
|
60
65
|
value: date,
|
|
@@ -75,9 +80,9 @@ var Navigation = /** @class */ (function (_super) {
|
|
|
75
80
|
};
|
|
76
81
|
_this.handleDateChange = function (value, event) {
|
|
77
82
|
var onChange = _this.props.onChange;
|
|
78
|
-
if (onChange) {
|
|
83
|
+
if (onChange && event) {
|
|
79
84
|
var args = {
|
|
80
|
-
value: kendo_date_math_1.cloneDate(value),
|
|
85
|
+
value: (0, kendo_date_math_1.cloneDate)(value),
|
|
81
86
|
target: _this,
|
|
82
87
|
nativeEvent: event && event.nativeEvent,
|
|
83
88
|
syntheticEvent: event
|
|
@@ -92,7 +97,7 @@ var Navigation = /** @class */ (function (_super) {
|
|
|
92
97
|
_this.setState({ skip: skip });
|
|
93
98
|
}
|
|
94
99
|
if (_this.list && scrollAction) {
|
|
95
|
-
var translate = "translateY("
|
|
100
|
+
var translate = "translateY(".concat(scrollAction.offset, "px)");
|
|
96
101
|
_this.list.style.transform = translate;
|
|
97
102
|
}
|
|
98
103
|
};
|
|
@@ -129,14 +134,14 @@ var Navigation = /** @class */ (function (_super) {
|
|
|
129
134
|
var _this = this;
|
|
130
135
|
this.calculateHeights();
|
|
131
136
|
var didViewChange = this.lastView !== this.props.activeView;
|
|
132
|
-
var focusedDate = utils_1.dateInRange(this.props.focusedDate, this.props.min, this.props.max);
|
|
137
|
+
var focusedDate = (0, utils_1.dateInRange)(this.props.focusedDate, this.props.min, this.props.max);
|
|
133
138
|
var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
|
|
134
139
|
var total = this.props.service.total(this.props.min, this.props.max);
|
|
135
140
|
var take = this.getTake(skip, total);
|
|
136
141
|
var viewDate = this.props.service.addToDate(this.props.min, skip);
|
|
137
142
|
var dates = this.props.service.datesList(viewDate, take);
|
|
138
143
|
if (this.props.activeView !== this.lastView
|
|
139
|
-
|| !kendo_date_math_1.isEqual(focusedDate, this.lastFocus)) {
|
|
144
|
+
|| !(0, kendo_date_math_1.isEqual)(focusedDate, this.lastFocus)) {
|
|
140
145
|
this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
|
|
141
146
|
}
|
|
142
147
|
var navigationBody = (React.createElement(Virtualization_1.Virtualization, { skip: skip, take: this.take, total: total, itemHeight: this.itemHeight, topOffset: this.topOffset, bottomOffset: this.bottomOffset, onScroll: this.props.onScroll, maxScrollDifference: this.maxViewHeight, onScrollAction: this.handleScrollAction, onMount: this.handleVirtualizationMount },
|
|
@@ -28,18 +28,20 @@ var TodayCommand = /** @class */ (function (_super) {
|
|
|
28
28
|
__extends(TodayCommand, _super);
|
|
29
29
|
function TodayCommand() {
|
|
30
30
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
+
_this.localization = null;
|
|
31
32
|
_this.handleClick = function (syntheticEvent) {
|
|
32
33
|
if (!_this.todayIsInRange) {
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
36
|
if (_this.props.onClick) {
|
|
36
|
-
|
|
37
|
+
var event_1 = {
|
|
37
38
|
syntheticEvent: syntheticEvent,
|
|
38
39
|
nativeEvent: syntheticEvent.nativeEvent,
|
|
39
|
-
value: utils_1.dateInRange(utils_1.getToday(), _this.min, _this.max),
|
|
40
|
+
value: (0, utils_1.dateInRange)((0, utils_1.getToday)(), _this.min, _this.max),
|
|
40
41
|
target: _this,
|
|
41
42
|
isTodayClick: true
|
|
42
|
-
}
|
|
43
|
+
};
|
|
44
|
+
_this.props.onClick.call(undefined, event_1);
|
|
43
45
|
}
|
|
44
46
|
};
|
|
45
47
|
return _this;
|
|
@@ -64,15 +66,15 @@ var TodayCommand = /** @class */ (function (_super) {
|
|
|
64
66
|
});
|
|
65
67
|
Object.defineProperty(TodayCommand.prototype, "todayIsInRange", {
|
|
66
68
|
get: function () {
|
|
67
|
-
return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.min), kendo_date_math_1.getDate(this.max));
|
|
69
|
+
return (0, utils_1.isInRange)((0, utils_1.getToday)(), (0, kendo_date_math_1.getDate)(this.min), (0, kendo_date_math_1.getDate)(this.max));
|
|
68
70
|
},
|
|
69
71
|
enumerable: false,
|
|
70
72
|
configurable: true
|
|
71
73
|
});
|
|
72
74
|
TodayCommand.prototype.render = function () {
|
|
73
|
-
this.localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
75
|
+
this.localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
74
76
|
var todayMessage = this.localization.toLanguageString(messages_1.today, messages_1.messages[messages_1.today]);
|
|
75
|
-
var todayClassNames = kendo_react_common_1.classNames('k-nav-today', {
|
|
77
|
+
var todayClassNames = (0, kendo_react_common_1.classNames)('k-nav-today', {
|
|
76
78
|
'k-disabled': this.props.disabled
|
|
77
79
|
});
|
|
78
80
|
return (React.createElement("span", { className: todayClassNames, onClick: this.handleClick }, todayMessage));
|
|
@@ -90,4 +92,4 @@ var TodayCommand = /** @class */ (function (_super) {
|
|
|
90
92
|
return TodayCommand;
|
|
91
93
|
}(React.Component));
|
|
92
94
|
exports.TodayCommand = TodayCommand;
|
|
93
|
-
kendo_react_intl_1.registerForLocalization(TodayCommand);
|
|
95
|
+
(0, kendo_react_intl_1.registerForLocalization)(TodayCommand);
|
|
@@ -34,7 +34,7 @@ export interface ViewProps {
|
|
|
34
34
|
max: Date;
|
|
35
35
|
min: Date;
|
|
36
36
|
cell?: React.ComponentType<CalendarCellProps>;
|
|
37
|
-
onCellEnter?: (date: Date
|
|
37
|
+
onCellEnter?: (date: Date) => void;
|
|
38
38
|
onCellLeave?: (date: Date | null) => void;
|
|
39
39
|
onChange?: (event: ViewEventArguments) => void;
|
|
40
40
|
selectedDate: Date | Date[] | null;
|
|
@@ -48,7 +48,7 @@ export interface ViewProps {
|
|
|
48
48
|
*/
|
|
49
49
|
export declare class View extends React.Component<ViewProps, {}> {
|
|
50
50
|
static propTypes: {
|
|
51
|
-
activeRangeEnd: PropTypes.Requireable<string>;
|
|
51
|
+
activeRangeEnd: PropTypes.Requireable<string | null>;
|
|
52
52
|
activeView: PropTypes.Validator<number>;
|
|
53
53
|
cellUID: PropTypes.Validator<string>;
|
|
54
54
|
direction: PropTypes.Requireable<string>;
|
|
@@ -56,7 +56,7 @@ export declare class View extends React.Component<ViewProps, {}> {
|
|
|
56
56
|
max: PropTypes.Validator<Date>;
|
|
57
57
|
min: PropTypes.Validator<Date>;
|
|
58
58
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
|
-
selectedDate: PropTypes.Requireable<Date | Date[]>;
|
|
59
|
+
selectedDate: PropTypes.Requireable<Date | (Date | null | undefined)[]>;
|
|
60
60
|
showWeekNumbers: PropTypes.Requireable<boolean>;
|
|
61
61
|
viewDate: PropTypes.Validator<Date>;
|
|
62
62
|
};
|
|
@@ -77,7 +77,7 @@ export declare class View extends React.Component<ViewProps, {}> {
|
|
|
77
77
|
protected buildWeekNumber: (row: any, idx: number) => JSX.Element;
|
|
78
78
|
protected buildRow: (row: any) => any;
|
|
79
79
|
protected getWeekNumber(date: Date): number | null;
|
|
80
|
-
protected firstDate: (row: any) => Date;
|
|
80
|
+
protected firstDate: (row: any) => Date | null;
|
|
81
81
|
protected firstWeekDateContext: (rowCtx: CellContext[]) => CellContext | null;
|
|
82
82
|
private handleClick;
|
|
83
83
|
private handleMouseEnter;
|
|
@@ -47,14 +47,16 @@ var View = /** @class */ (function (_super) {
|
|
|
47
47
|
__extends(View, _super);
|
|
48
48
|
function View() {
|
|
49
49
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
+
_this.intl = null;
|
|
51
|
+
_this.weekService = null;
|
|
50
52
|
_this.buildWeekNumber = function (row, idx) {
|
|
51
53
|
var firstDayOfWeek = _this.firstDate(row);
|
|
52
54
|
if (!firstDayOfWeek) {
|
|
53
|
-
return emptyCell("week-cell-"
|
|
55
|
+
return emptyCell("week-cell-".concat(idx));
|
|
54
56
|
}
|
|
55
57
|
var firstDate = _this.firstDate(row);
|
|
56
58
|
var weekCellValue = _this.getWeekNumber(firstDate);
|
|
57
|
-
var uniqueID = "kendo-react-calendar-week-cell-"
|
|
59
|
+
var uniqueID = "kendo-react-calendar-week-cell-".concat(weekCellValue);
|
|
58
60
|
var cellProps = {
|
|
59
61
|
className: 'k-alt',
|
|
60
62
|
value: weekCellValue,
|
|
@@ -70,7 +72,7 @@ var View = /** @class */ (function (_super) {
|
|
|
70
72
|
return emptyCell(idx);
|
|
71
73
|
}
|
|
72
74
|
var aria = { 'aria-selected': cell.isSelected };
|
|
73
|
-
var uniqueID = "kendo-react-calendar-cell-"
|
|
75
|
+
var uniqueID = "kendo-react-calendar-cell-".concat(cell.value.getTime());
|
|
74
76
|
var cellProps = __assign(__assign(__assign({}, aria), cell), { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
|
|
75
77
|
return _this.props.cell
|
|
76
78
|
? (React.createElement(_this.props.cell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue))
|
|
@@ -94,9 +96,9 @@ var View = /** @class */ (function (_super) {
|
|
|
94
96
|
};
|
|
95
97
|
_this.handleClick = function (value, event) {
|
|
96
98
|
var onChange = _this.props.onChange;
|
|
97
|
-
if (onChange) {
|
|
99
|
+
if (onChange && event) {
|
|
98
100
|
var args = {
|
|
99
|
-
value: kendo_date_math_1.cloneDate(value),
|
|
101
|
+
value: (0, kendo_date_math_1.cloneDate)(value),
|
|
100
102
|
target: _this,
|
|
101
103
|
nativeEvent: event && event.nativeEvent,
|
|
102
104
|
syntheticEvent: event
|
|
@@ -107,13 +109,13 @@ var View = /** @class */ (function (_super) {
|
|
|
107
109
|
_this.handleMouseEnter = function (value) {
|
|
108
110
|
var onCellEnter = _this.props.onCellEnter;
|
|
109
111
|
if (onCellEnter) {
|
|
110
|
-
onCellEnter.call(undefined, kendo_date_math_1.cloneDate(value));
|
|
112
|
+
onCellEnter.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
|
|
111
113
|
}
|
|
112
114
|
};
|
|
113
115
|
_this.handleMouseLeave = function (value) {
|
|
114
116
|
var onCellLeave = _this.props.onCellLeave;
|
|
115
117
|
if (onCellLeave) {
|
|
116
|
-
onCellLeave.call(undefined, kendo_date_math_1.cloneDate(value));
|
|
118
|
+
onCellLeave.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
return _this;
|
|
@@ -162,13 +164,13 @@ var View = /** @class */ (function (_super) {
|
|
|
162
164
|
});
|
|
163
165
|
View.prototype.render = function () {
|
|
164
166
|
var _this = this;
|
|
165
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
167
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
166
168
|
this.weekService = new services_1.WeekNamesService(this.intl);
|
|
167
169
|
var weekNames = this.weekService.getWeekNames(this.weekNumber);
|
|
168
170
|
var colSpan = this.props.service.rowLength(this.weekNumber);
|
|
169
171
|
var title = this.props.service.title(this.props.viewDate);
|
|
170
|
-
var time = utils_1.getToday();
|
|
171
|
-
var viewDate = utils_1.setTime(this.props.viewDate, time);
|
|
172
|
+
var time = (0, utils_1.getToday)();
|
|
173
|
+
var viewDate = (0, utils_1.setTime)(this.props.viewDate, time);
|
|
172
174
|
var data = this.props.service.data({
|
|
173
175
|
cellUID: this.props.cellUID,
|
|
174
176
|
min: this.min,
|
|
@@ -192,10 +194,10 @@ var View = /** @class */ (function (_super) {
|
|
|
192
194
|
}))));
|
|
193
195
|
};
|
|
194
196
|
View.prototype.getWeekNumber = function (date) {
|
|
195
|
-
if (!this.weekNumber) {
|
|
197
|
+
if (!this.weekNumber || !this.intl) {
|
|
196
198
|
return null;
|
|
197
199
|
}
|
|
198
|
-
return kendo_date_math_1.weekInYear(date, this.intl.firstDay());
|
|
200
|
+
return (0, kendo_date_math_1.weekInYear)(date, this.intl.firstDay());
|
|
199
201
|
};
|
|
200
202
|
View.propTypes = {
|
|
201
203
|
activeRangeEnd: PropTypes.oneOf(['start', 'end', null]),
|
|
@@ -212,10 +214,10 @@ var View = /** @class */ (function (_super) {
|
|
|
212
214
|
};
|
|
213
215
|
View.defaultProps = {
|
|
214
216
|
direction: 'vertical',
|
|
215
|
-
selectedDate: utils_1.getToday(),
|
|
217
|
+
selectedDate: (0, utils_1.getToday)(),
|
|
216
218
|
showWeekNumbers: false
|
|
217
219
|
};
|
|
218
220
|
return View;
|
|
219
221
|
}(React.Component));
|
|
220
222
|
exports.View = View;
|
|
221
|
-
kendo_react_intl_1.registerForIntl(View);
|
|
223
|
+
(0, kendo_react_intl_1.registerForIntl)(View);
|
|
@@ -98,9 +98,9 @@ export declare class ViewList extends React.Component<ViewListProps, ViewListSta
|
|
|
98
98
|
focusActiveDate: () => void;
|
|
99
99
|
blurActiveDate: () => void;
|
|
100
100
|
render(): JSX.Element;
|
|
101
|
-
protected handleVirtualizationMount: (virtualization:
|
|
102
|
-
protected buildMonthView: (cols: any, weekNames: any) => JSX.Element;
|
|
103
|
-
protected buildDates: (cols: any, dates: Date[]) => JSX.Element;
|
|
101
|
+
protected handleVirtualizationMount: (virtualization: Virtualization) => void;
|
|
102
|
+
protected buildMonthView: (cols: any[], weekNames: any[]) => JSX.Element;
|
|
103
|
+
protected buildDates: (cols: any[], dates: Date[]) => JSX.Element;
|
|
104
104
|
protected calculateHeights: () => void;
|
|
105
105
|
protected getTake: (skip: number, total: number) => number;
|
|
106
106
|
private handleScrollAction;
|