@progress/kendo-react-dateinputs 5.4.0-dev.202205271059 → 5.4.0-dev.202206061009

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  2. package/dist/es/calendar/components/Calendar.d.ts +4 -4
  3. package/dist/es/calendar/components/Calendar.js +17 -5
  4. package/dist/es/calendar/components/Header.d.ts +1 -0
  5. package/dist/es/calendar/components/Header.js +1 -1
  6. package/dist/es/calendar/components/HorizontalViewList.js +1 -0
  7. package/dist/es/calendar/components/MultiViewCalendar.d.ts +3 -3
  8. package/dist/es/calendar/components/MultiViewCalendar.js +12 -5
  9. package/dist/es/calendar/components/Navigation.js +9 -4
  10. package/dist/es/calendar/components/TodayCommand.js +4 -2
  11. package/dist/es/calendar/components/View.d.ts +4 -4
  12. package/dist/es/calendar/components/View.js +7 -5
  13. package/dist/es/calendar/components/ViewList.js +10 -2
  14. package/dist/es/calendar/services/BusViewService.js +1 -1
  15. package/dist/es/calendar/services/CenturyViewService.js +2 -2
  16. package/dist/es/calendar/services/DOMService.js +24 -6
  17. package/dist/es/calendar/services/DecadeViewService.js +2 -2
  18. package/dist/es/calendar/services/MonthViewService.js +2 -2
  19. package/dist/es/calendar/services/NavigationService.js +1 -1
  20. package/dist/es/calendar/services/ScrollSyncService.js +5 -1
  21. package/dist/es/calendar/services/YearViewService.js +2 -2
  22. package/dist/es/dateinput/DateInput.d.ts +11 -7
  23. package/dist/es/dateinput/DateInput.js +14 -8
  24. package/dist/es/dateinput/models/mask.js +1 -0
  25. package/dist/es/datepicker/DatePicker.d.ts +8 -8
  26. package/dist/es/datepicker/DatePicker.js +4 -3
  27. package/dist/es/daterangepicker/DateRangePicker.d.ts +3 -3
  28. package/dist/es/datetimepicker/DateTimePicker.d.ts +7 -7
  29. package/dist/es/datetimepicker/DateTimePicker.js +3 -3
  30. package/dist/es/datetimepicker/DateTimeSelector.d.ts +1 -1
  31. package/dist/es/datetimepicker/DateTimeSelector.js +5 -0
  32. package/dist/es/package-metadata.js +1 -1
  33. package/dist/es/timepicker/TimeList.d.ts +3 -3
  34. package/dist/es/timepicker/TimeList.js +25 -7
  35. package/dist/es/timepicker/TimePart.d.ts +3 -3
  36. package/dist/es/timepicker/TimePart.js +4 -1
  37. package/dist/es/timepicker/TimePicker.d.ts +7 -7
  38. package/dist/es/timepicker/TimePicker.js +4 -3
  39. package/dist/es/timepicker/TimeSelector.d.ts +2 -2
  40. package/dist/es/timepicker/TimeSelector.js +4 -0
  41. package/dist/es/timepicker/services/DOMService.js +2 -0
  42. package/dist/es/timepicker/services/DayPeriodService.js +9 -3
  43. package/dist/es/timepicker/services/HoursService.js +14 -5
  44. package/dist/es/timepicker/services/MinutesService.js +12 -6
  45. package/dist/es/timepicker/services/SecondsService.js +12 -6
  46. package/dist/es/utils.js +9 -5
  47. package/dist/es/virtualization/Virtualization.d.ts +1 -0
  48. package/dist/es/virtualization/Virtualization.js +13 -5
  49. package/dist/es/virtualization/services/RowHeightService.js +9 -5
  50. package/dist/es/virtualization/services/ScrollerService.js +9 -3
  51. package/dist/npm/calendar/components/Calendar.d.ts +4 -4
  52. package/dist/npm/calendar/components/Calendar.js +43 -31
  53. package/dist/npm/calendar/components/CalendarCell.js +1 -1
  54. package/dist/npm/calendar/components/CalendarNavigationItem.js +1 -1
  55. package/dist/npm/calendar/components/CalendarWeekCell.js +1 -1
  56. package/dist/npm/calendar/components/Header.d.ts +1 -0
  57. package/dist/npm/calendar/components/Header.js +3 -3
  58. package/dist/npm/calendar/components/HorizontalViewList.js +3 -2
  59. package/dist/npm/calendar/components/MultiViewCalendar.d.ts +3 -3
  60. package/dist/npm/calendar/components/MultiViewCalendar.js +49 -42
  61. package/dist/npm/calendar/components/Navigation.js +13 -8
  62. package/dist/npm/calendar/components/TodayCommand.js +9 -7
  63. package/dist/npm/calendar/components/View.d.ts +4 -4
  64. package/dist/npm/calendar/components/View.js +16 -14
  65. package/dist/npm/calendar/components/ViewList.js +19 -11
  66. package/dist/npm/calendar/services/BusViewService.js +1 -1
  67. package/dist/npm/calendar/services/CenturyViewService.js +38 -38
  68. package/dist/npm/calendar/services/DOMService.js +33 -15
  69. package/dist/npm/calendar/services/DecadeViewService.js +32 -32
  70. package/dist/npm/calendar/services/MonthViewService.js +36 -36
  71. package/dist/npm/calendar/services/NavigationService.js +1 -1
  72. package/dist/npm/calendar/services/ScrollSyncService.js +5 -1
  73. package/dist/npm/calendar/services/WeekNamesService.js +1 -1
  74. package/dist/npm/calendar/services/YearViewService.js +33 -33
  75. package/dist/npm/common/PickerWrap.js +1 -1
  76. package/dist/npm/dateinput/DateInput.d.ts +11 -7
  77. package/dist/npm/dateinput/DateInput.js +32 -26
  78. package/dist/npm/dateinput/models/kendo-date.js +11 -11
  79. package/dist/npm/dateinput/models/mask.js +1 -0
  80. package/dist/npm/datepicker/DatePicker.d.ts +8 -8
  81. package/dist/npm/datepicker/DatePicker.js +17 -16
  82. package/dist/npm/daterangepicker/DateRangePicker.d.ts +3 -3
  83. package/dist/npm/daterangepicker/DateRangePicker.js +17 -17
  84. package/dist/npm/datetimepicker/DateTimePicker.d.ts +7 -7
  85. package/dist/npm/datetimepicker/DateTimePicker.js +15 -15
  86. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +1 -1
  87. package/dist/npm/datetimepicker/DateTimeSelector.js +13 -8
  88. package/dist/npm/hooks/usePickerFloatingLabel.js +1 -1
  89. package/dist/npm/package-metadata.js +1 -1
  90. package/dist/npm/timepicker/TimeList.d.ts +3 -3
  91. package/dist/npm/timepicker/TimeList.js +29 -11
  92. package/dist/npm/timepicker/TimePart.d.ts +3 -3
  93. package/dist/npm/timepicker/TimePart.js +14 -11
  94. package/dist/npm/timepicker/TimePicker.d.ts +7 -7
  95. package/dist/npm/timepicker/TimePicker.js +19 -18
  96. package/dist/npm/timepicker/TimeSelector.d.ts +2 -2
  97. package/dist/npm/timepicker/TimeSelector.js +14 -10
  98. package/dist/npm/timepicker/services/DOMService.js +6 -4
  99. package/dist/npm/timepicker/services/DayPeriodService.js +10 -4
  100. package/dist/npm/timepicker/services/HoursService.js +20 -11
  101. package/dist/npm/timepicker/services/MinutesService.js +16 -10
  102. package/dist/npm/timepicker/services/SecondsService.js +16 -10
  103. package/dist/npm/timepicker/utils.js +11 -11
  104. package/dist/npm/utils.js +16 -12
  105. package/dist/npm/virtualization/Virtualization.d.ts +1 -0
  106. package/dist/npm/virtualization/Virtualization.js +15 -7
  107. package/dist/npm/virtualization/services/RowHeightService.js +9 -5
  108. package/dist/npm/virtualization/services/ScrollerService.js +9 -3
  109. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  110. package/package.json +13 -13
@@ -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.cellUID = kendo_react_common_1.guid();
82
+ _this._focusedDate = new Date();
83
+ _this.cellUID = (0, kendo_react_common_1.guid)();
82
84
  _this.activeRangeEnd = 'start';
83
- _this.wrapperID = kendo_react_common_1.guid();
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.call(undefined, event, true);
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.call(undefined, args);
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." + 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,
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 '" + propName + "' supplied to" +
516
- ("'" + componentName + "'. The '" + propName + "' property cannot be less than 1'"));
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);
@@ -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(" + _this.topOffset + "px)";
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-" + date.getTime();
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(" + scrollAction.offset + "px)";
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
- _this.props.onClick.call(undefined, {
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 | null) => void;
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)[]>;
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-" + idx);
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-" + weekCellValue;
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-" + cell.value.getTime();
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);
@@ -35,6 +35,14 @@ var ViewList = /** @class */ (function (_super) {
35
35
  __extends(ViewList, _super);
36
36
  function ViewList(props) {
37
37
  var _this = _super.call(this, props) || this;
38
+ _this.virtualization = null;
39
+ _this.calendarView = null;
40
+ _this.table = null;
41
+ _this.intl = null;
42
+ _this.bottomOffset = 0;
43
+ _this.viewOffset = 0;
44
+ _this.viewHeight = 0;
45
+ _this._element = null;
38
46
  _this.isActive = false;
39
47
  _this.animateToIndex = true;
40
48
  _this.shouldScroll = false;
@@ -65,8 +73,8 @@ var ViewList = /** @class */ (function (_super) {
65
73
  _this.handleVirtualizationMount = function (virtualization) {
66
74
  _this.virtualization = virtualization;
67
75
  if (_this.virtualization && _this.table) {
68
- _this.table.style.transform = "translateY(" + _this.viewOffset + "px)";
69
- var viewDate = utils_1.dateInRange(_this.props.focusedDate, _this.props.min, _this.props.max);
76
+ _this.table.style.transform = "translateY(".concat(_this.viewOffset, "px)");
77
+ var viewDate = (0, utils_1.dateInRange)(_this.props.focusedDate, _this.props.min, _this.props.max);
70
78
  var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
71
79
  _this.virtualization.scrollToIndex(indexToScroll);
72
80
  }
@@ -106,7 +114,7 @@ var ViewList = /** @class */ (function (_super) {
106
114
  _this.setState({ index: index, skip: skip });
107
115
  }
108
116
  if (_this.table && scrollAction) {
109
- var translate = "translateY(" + scrollAction.offset + "px)";
117
+ var translate = "translateY(".concat(scrollAction.offset, "px)");
110
118
  _this.table.style.transform = translate;
111
119
  }
112
120
  };
@@ -121,7 +129,7 @@ var ViewList = /** @class */ (function (_super) {
121
129
  var args = {
122
130
  syntheticEvent: event.syntheticEvent,
123
131
  nativeEvent: event.nativeEvent,
124
- value: kendo_date_math_1.cloneDate(event.value),
132
+ value: (0, kendo_date_math_1.cloneDate)(event.value),
125
133
  target: _this,
126
134
  isTodayClick: isTodayClick
127
135
  };
@@ -145,8 +153,8 @@ var ViewList = /** @class */ (function (_super) {
145
153
  });
146
154
  Object.defineProperty(ViewList.prototype, "weekNames", {
147
155
  get: function () {
148
- this.intl = kendo_react_intl_1.provideIntlService(this);
149
- var weekNames = utils_1.shiftWeekNames(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
156
+ this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
157
+ var weekNames = (0, utils_1.shiftWeekNames)(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
150
158
  return this.weekNumber ? [''].concat(weekNames) : weekNames;
151
159
  },
152
160
  enumerable: false,
@@ -175,7 +183,7 @@ var ViewList = /** @class */ (function (_super) {
175
183
  });
176
184
  Object.defineProperty(ViewList.prototype, "todayIsInRange", {
177
185
  get: function () {
178
- return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.props.min), kendo_date_math_1.getDate(this.props.max));
186
+ return (0, utils_1.isInRange)((0, utils_1.getToday)(), (0, kendo_date_math_1.getDate)(this.props.min), (0, kendo_date_math_1.getDate)(this.props.max));
179
187
  },
180
188
  enumerable: false,
181
189
  configurable: true
@@ -196,7 +204,7 @@ var ViewList = /** @class */ (function (_super) {
196
204
  var _this = this;
197
205
  this.calculateHeights();
198
206
  var didViewChange = this.lastView !== this.props.activeView;
199
- var focusedDate = utils_1.dateInRange(this.props.focusedDate, this.props.min, this.props.max);
207
+ var focusedDate = (0, utils_1.dateInRange)(this.props.focusedDate, this.props.min, this.props.max);
200
208
  var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
201
209
  var total = this.props.service.total(this.props.min, this.props.max);
202
210
  var take = this.getTake(skip, total);
@@ -206,13 +214,13 @@ var ViewList = /** @class */ (function (_super) {
206
214
  var didViewChanged = this.props.activeView !== this.lastView;
207
215
  this.animateToIndex = !didViewChanged;
208
216
  if (didViewChanged
209
- || !kendo_date_math_1.isEqualDate(this.lastFocus, focusedDate)
217
+ || !(0, kendo_date_math_1.isEqualDate)(this.lastFocus, focusedDate)
210
218
  || this.shouldScroll
211
219
  || (!this.props.shouldScroll || this.props.shouldScroll())) {
212
220
  this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
213
221
  }
214
222
  this.lastFocus = focusedDate;
215
- var rootClassNames = kendo_react_common_1.classNames('k-calendar-view k-vstack', {
223
+ var rootClassNames = (0, kendo_react_common_1.classNames)('k-calendar-view k-vstack', {
216
224
  'k-calendar-monthview': this.props.activeView === models_1.CalendarViewEnum.month,
217
225
  'k-calendar-yearview': this.props.activeView === models_1.CalendarViewEnum.year,
218
226
  'k-calendar-decadeview': this.props.activeView === models_1.CalendarViewEnum.decade,
@@ -249,4 +257,4 @@ var ViewList = /** @class */ (function (_super) {
249
257
  return ViewList;
250
258
  }(React.Component));
251
259
  exports.ViewList = ViewList;
252
- kendo_react_intl_1.registerForIntl(ViewList);
260
+ (0, kendo_react_intl_1.registerForIntl)(ViewList);
@@ -31,7 +31,7 @@ var BusViewService = /** @class */ (function () {
31
31
  this.top = top;
32
32
  };
33
33
  BusViewService.prototype.service = function (view, intl) {
34
- return new services["" + view](intl);
34
+ return new services["".concat(view)](intl);
35
35
  };
36
36
  BusViewService.prototype.moveDown = function (view, event) {
37
37
  this.move(view, -1, event);