@progress/kendo-react-dateinputs 5.4.0-dev.202205200719 → 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 (178) hide show
  1. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  2. package/dist/es/PopupSettings.js +1 -0
  3. package/dist/es/calendar/components/Calendar.d.ts +10 -10
  4. package/dist/es/calendar/components/Calendar.js +26 -12
  5. package/dist/es/calendar/components/CalendarCell.js +7 -3
  6. package/dist/es/calendar/components/CalendarHeaderTitle.js +7 -3
  7. package/dist/es/calendar/components/CalendarNavigationItem.js +7 -3
  8. package/dist/es/calendar/components/CalendarWeekCell.js +7 -3
  9. package/dist/es/calendar/components/Header.d.ts +5 -4
  10. package/dist/es/calendar/components/Header.js +8 -6
  11. package/dist/es/calendar/components/HorizontalViewList.d.ts +4 -4
  12. package/dist/es/calendar/components/HorizontalViewList.js +8 -5
  13. package/dist/es/calendar/components/MultiViewCalendar.d.ts +13 -13
  14. package/dist/es/calendar/components/MultiViewCalendar.js +24 -15
  15. package/dist/es/calendar/components/Navigation.d.ts +1 -1
  16. package/dist/es/calendar/components/Navigation.js +13 -6
  17. package/dist/es/calendar/components/TodayCommand.d.ts +3 -3
  18. package/dist/es/calendar/components/TodayCommand.js +10 -6
  19. package/dist/es/calendar/components/View.d.ts +11 -11
  20. package/dist/es/calendar/components/View.js +17 -13
  21. package/dist/es/calendar/components/ViewList.d.ts +6 -6
  22. package/dist/es/calendar/components/ViewList.js +19 -9
  23. package/dist/es/calendar/models/ActiveView.js +1 -0
  24. package/dist/es/calendar/models/CalendarSettings.js +1 -0
  25. package/dist/es/calendar/models/CellContext.js +1 -0
  26. package/dist/es/calendar/models/MultiViewCalendarMode.js +1 -0
  27. package/dist/es/calendar/models/MultiViewCalendarSettings.js +1 -0
  28. package/dist/es/calendar/models/SelectionRangeEnd.js +1 -0
  29. package/dist/es/calendar/models/ViewService.js +1 -0
  30. package/dist/es/calendar/services/BusViewService.js +1 -1
  31. package/dist/es/calendar/services/CenturyViewService.js +2 -2
  32. package/dist/es/calendar/services/DOMService.js +24 -6
  33. package/dist/es/calendar/services/DecadeViewService.js +2 -2
  34. package/dist/es/calendar/services/MonthViewService.js +2 -2
  35. package/dist/es/calendar/services/NavigationService.js +1 -1
  36. package/dist/es/calendar/services/ScrollSyncService.js +5 -1
  37. package/dist/es/calendar/services/YearViewService.js +2 -2
  38. package/dist/es/dateinput/DateInput.d.ts +24 -20
  39. package/dist/es/dateinput/DateInput.js +32 -19
  40. package/dist/es/dateinput/models/DateInputSettings.js +1 -0
  41. package/dist/es/dateinput/models/format-placeholder.js +1 -0
  42. package/dist/es/dateinput/models/incremental-steps.js +1 -0
  43. package/dist/es/dateinput/models/kendo-date.d.ts +2 -2
  44. package/dist/es/dateinput/models/kendo-date.js +2 -2
  45. package/dist/es/dateinput/models/mask.js +1 -0
  46. package/dist/es/dateinput/models/selection.js +1 -0
  47. package/dist/es/dateinput/utils.d.ts +1 -1
  48. package/dist/es/datepicker/DatePicker.d.ts +25 -25
  49. package/dist/es/datepicker/DatePicker.js +28 -23
  50. package/dist/es/datepicker/models/DatePickerSettings.js +1 -0
  51. package/dist/es/datepicker/models/index.js +1 -0
  52. package/dist/es/daterangepicker/DateRangePicker.d.ts +12 -12
  53. package/dist/es/daterangepicker/DateRangePicker.js +16 -14
  54. package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +1 -0
  55. package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +1 -0
  56. package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +1 -0
  57. package/dist/es/daterangepicker/models/DateRangePickerSettings.js +1 -0
  58. package/dist/es/daterangepicker/models/index.js +1 -0
  59. package/dist/es/datetimepicker/DateTimePicker.d.ts +19 -19
  60. package/dist/es/datetimepicker/DateTimePicker.js +33 -18
  61. package/dist/es/datetimepicker/DateTimeSelector.d.ts +7 -7
  62. package/dist/es/datetimepicker/DateTimeSelector.js +17 -7
  63. package/dist/es/datetimepicker/models/DateTimePickerSettings.js +1 -0
  64. package/dist/es/datetimepicker/models/index.js +1 -0
  65. package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
  66. package/dist/es/messages/index.d.ts +21 -21
  67. package/dist/es/package-metadata.js +1 -1
  68. package/dist/es/timepicker/TimeList.d.ts +8 -8
  69. package/dist/es/timepicker/TimeList.js +33 -13
  70. package/dist/es/timepicker/TimePart.d.ts +10 -10
  71. package/dist/es/timepicker/TimePart.js +14 -9
  72. package/dist/es/timepicker/TimePicker.d.ts +22 -22
  73. package/dist/es/timepicker/TimePicker.js +27 -22
  74. package/dist/es/timepicker/TimeSelector.d.ts +6 -6
  75. package/dist/es/timepicker/TimeSelector.js +11 -5
  76. package/dist/es/timepicker/models/IncrementalSteps.js +1 -0
  77. package/dist/es/timepicker/models/ListItem.js +1 -0
  78. package/dist/es/timepicker/models/ListService.js +1 -0
  79. package/dist/es/timepicker/models/ListServiceSettings.js +1 -0
  80. package/dist/es/timepicker/models/TimePickerSettings.js +1 -0
  81. package/dist/es/timepicker/services/DOMService.js +2 -0
  82. package/dist/es/timepicker/services/DayPeriodService.js +9 -3
  83. package/dist/es/timepicker/services/HoursService.js +14 -5
  84. package/dist/es/timepicker/services/MinutesService.js +12 -6
  85. package/dist/es/timepicker/services/SecondsService.js +12 -6
  86. package/dist/es/timepicker/utils.d.ts +4 -4
  87. package/dist/es/utils.d.ts +1 -1
  88. package/dist/es/utils.js +10 -1
  89. package/dist/es/virtualization/Virtualization.d.ts +8 -7
  90. package/dist/es/virtualization/Virtualization.js +22 -12
  91. package/dist/es/virtualization/services/RowHeightService.js +10 -1
  92. package/dist/es/virtualization/services/ScrollerService.js +9 -3
  93. package/dist/npm/calendar/components/Calendar.d.ts +10 -10
  94. package/dist/npm/calendar/components/Calendar.js +53 -38
  95. package/dist/npm/calendar/components/CalendarCell.js +9 -4
  96. package/dist/npm/calendar/components/CalendarHeaderTitle.js +8 -3
  97. package/dist/npm/calendar/components/CalendarNavigationItem.js +9 -4
  98. package/dist/npm/calendar/components/CalendarWeekCell.js +9 -4
  99. package/dist/npm/calendar/components/Header.d.ts +5 -4
  100. package/dist/npm/calendar/components/Header.js +11 -8
  101. package/dist/npm/calendar/components/HorizontalViewList.d.ts +4 -4
  102. package/dist/npm/calendar/components/HorizontalViewList.js +11 -7
  103. package/dist/npm/calendar/components/MultiViewCalendar.d.ts +13 -13
  104. package/dist/npm/calendar/components/MultiViewCalendar.js +62 -52
  105. package/dist/npm/calendar/components/Navigation.d.ts +1 -1
  106. package/dist/npm/calendar/components/Navigation.js +18 -10
  107. package/dist/npm/calendar/components/TodayCommand.d.ts +3 -3
  108. package/dist/npm/calendar/components/TodayCommand.js +16 -11
  109. package/dist/npm/calendar/components/View.d.ts +11 -11
  110. package/dist/npm/calendar/components/View.js +27 -22
  111. package/dist/npm/calendar/components/ViewList.d.ts +6 -6
  112. package/dist/npm/calendar/components/ViewList.js +29 -18
  113. package/dist/npm/calendar/models/CalendarViewEnum.js +1 -0
  114. package/dist/npm/calendar/models/NavigationAction.js +1 -0
  115. package/dist/npm/calendar/models/SelectionRange.js +1 -0
  116. package/dist/npm/calendar/models/index.js +4 -3
  117. package/dist/npm/calendar/services/BusViewService.js +3 -2
  118. package/dist/npm/calendar/services/CenturyViewService.js +40 -39
  119. package/dist/npm/calendar/services/DOMService.js +34 -15
  120. package/dist/npm/calendar/services/DecadeViewService.js +34 -33
  121. package/dist/npm/calendar/services/MonthViewService.js +38 -37
  122. package/dist/npm/calendar/services/NavigationService.js +2 -1
  123. package/dist/npm/calendar/services/ScrollSyncService.js +6 -1
  124. package/dist/npm/calendar/services/WeekNamesService.js +2 -1
  125. package/dist/npm/calendar/services/YearViewService.js +35 -34
  126. package/dist/npm/calendar/services/index.js +10 -9
  127. package/dist/npm/common/PickerWrap.js +2 -1
  128. package/dist/npm/dateinput/DateInput.d.ts +24 -20
  129. package/dist/npm/dateinput/DateInput.js +51 -37
  130. package/dist/npm/dateinput/models/index.js +3 -2
  131. package/dist/npm/dateinput/models/kendo-date.d.ts +2 -2
  132. package/dist/npm/dateinput/models/kendo-date.js +14 -13
  133. package/dist/npm/dateinput/models/mask.js +2 -0
  134. package/dist/npm/dateinput/utils.d.ts +1 -1
  135. package/dist/npm/dateinput/utils.js +9 -4
  136. package/dist/npm/datepicker/DatePicker.d.ts +25 -25
  137. package/dist/npm/datepicker/DatePicker.js +42 -36
  138. package/dist/npm/datepicker/ToggleButton.js +1 -0
  139. package/dist/npm/daterangepicker/DateRangePicker.d.ts +12 -12
  140. package/dist/npm/daterangepicker/DateRangePicker.js +34 -31
  141. package/dist/npm/datetimepicker/DateTimePicker.d.ts +19 -19
  142. package/dist/npm/datetimepicker/DateTimePicker.js +46 -30
  143. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +7 -7
  144. package/dist/npm/datetimepicker/DateTimeSelector.js +26 -15
  145. package/dist/npm/defaults.js +1 -0
  146. package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
  147. package/dist/npm/hooks/usePickerFloatingLabel.js +6 -3
  148. package/dist/npm/main.js +22 -21
  149. package/dist/npm/messages/index.d.ts +21 -21
  150. package/dist/npm/messages/index.js +2 -1
  151. package/dist/npm/package-metadata.js +2 -1
  152. package/dist/npm/timepicker/TimeList.d.ts +8 -8
  153. package/dist/npm/timepicker/TimeList.js +39 -18
  154. package/dist/npm/timepicker/TimePart.d.ts +10 -10
  155. package/dist/npm/timepicker/TimePart.js +25 -19
  156. package/dist/npm/timepicker/TimePicker.d.ts +22 -22
  157. package/dist/npm/timepicker/TimePicker.js +43 -37
  158. package/dist/npm/timepicker/TimeSelector.d.ts +6 -6
  159. package/dist/npm/timepicker/TimeSelector.js +22 -15
  160. package/dist/npm/timepicker/models/TimePart.js +1 -0
  161. package/dist/npm/timepicker/models/index.js +2 -1
  162. package/dist/npm/timepicker/services/DOMService.js +7 -4
  163. package/dist/npm/timepicker/services/DayPeriodService.js +11 -4
  164. package/dist/npm/timepicker/services/HoursService.js +21 -11
  165. package/dist/npm/timepicker/services/MinutesService.js +17 -10
  166. package/dist/npm/timepicker/services/SecondsService.js +17 -10
  167. package/dist/npm/timepicker/services/index.js +6 -5
  168. package/dist/npm/timepicker/utils.d.ts +4 -4
  169. package/dist/npm/timepicker/utils.js +30 -20
  170. package/dist/npm/utils.d.ts +1 -1
  171. package/dist/npm/utils.js +43 -20
  172. package/dist/npm/virtualization/Virtualization.d.ts +8 -7
  173. package/dist/npm/virtualization/Virtualization.js +26 -15
  174. package/dist/npm/virtualization/services/RowHeightService.js +11 -1
  175. package/dist/npm/virtualization/services/ScrollerService.js +10 -3
  176. package/dist/npm/virtualization/services/index.js +5 -4
  177. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  178. package/package.json +13 -13
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
24
26
  return __assign.apply(this, arguments);
25
27
  };
26
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Navigation = void 0;
27
30
  var React = require("react");
28
31
  var PropTypes = require("prop-types");
29
32
  var kendo_date_math_1 = require("@progress/kendo-date-math");
@@ -38,12 +41,17 @@ var Navigation = /** @class */ (function (_super) {
38
41
  __extends(Navigation, _super);
39
42
  function Navigation(props) {
40
43
  var _this = _super.call(this, props) || this;
44
+ _this.virtualization = null;
45
+ _this.list = null;
46
+ _this.itemHeight = 0;
41
47
  _this.topOffset = 0;
48
+ _this.maxViewHeight = 0;
49
+ _this.bottomOffset = 0;
42
50
  _this.handleVirtualizationMount = function (virtualization) {
43
51
  _this.virtualization = virtualization;
44
52
  if (_this.virtualization && _this.list) {
45
- _this.list.style.transform = "translateY(" + _this.topOffset + "px)";
46
- 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);
47
55
  var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
48
56
  _this.virtualization.scrollToIndex(indexToScroll);
49
57
  }
@@ -51,7 +59,7 @@ var Navigation = /** @class */ (function (_super) {
51
59
  _this.buildNavigationItem = function (date) {
52
60
  var text = _this.props.service.navigationTitle(date);
53
61
  var isRangeStart = _this.props.service.isRangeStart(date);
54
- var uniqueID = "kendo-react-calendar-nav-item-" + date.getTime();
62
+ var uniqueID = "kendo-react-calendar-nav-item-".concat(date.getTime());
55
63
  var navigationItemProps = {
56
64
  text: text,
57
65
  value: date,
@@ -72,9 +80,9 @@ var Navigation = /** @class */ (function (_super) {
72
80
  };
73
81
  _this.handleDateChange = function (value, event) {
74
82
  var onChange = _this.props.onChange;
75
- if (onChange) {
83
+ if (onChange && event) {
76
84
  var args = {
77
- value: kendo_date_math_1.cloneDate(value),
85
+ value: (0, kendo_date_math_1.cloneDate)(value),
78
86
  target: _this,
79
87
  nativeEvent: event && event.nativeEvent,
80
88
  syntheticEvent: event
@@ -89,7 +97,7 @@ var Navigation = /** @class */ (function (_super) {
89
97
  _this.setState({ skip: skip });
90
98
  }
91
99
  if (_this.list && scrollAction) {
92
- var translate = "translateY(" + scrollAction.offset + "px)";
100
+ var translate = "translateY(".concat(scrollAction.offset, "px)");
93
101
  _this.list.style.transform = translate;
94
102
  }
95
103
  };
@@ -108,7 +116,7 @@ var Navigation = /** @class */ (function (_super) {
108
116
  ? this.props.take
109
117
  : Navigation.defaultProps.take;
110
118
  },
111
- enumerable: true,
119
+ enumerable: false,
112
120
  configurable: true
113
121
  });
114
122
  /**
@@ -126,14 +134,14 @@ var Navigation = /** @class */ (function (_super) {
126
134
  var _this = this;
127
135
  this.calculateHeights();
128
136
  var didViewChange = this.lastView !== this.props.activeView;
129
- 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);
130
138
  var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
131
139
  var total = this.props.service.total(this.props.min, this.props.max);
132
140
  var take = this.getTake(skip, total);
133
141
  var viewDate = this.props.service.addToDate(this.props.min, skip);
134
142
  var dates = this.props.service.datesList(viewDate, take);
135
143
  if (this.props.activeView !== this.lastView
136
- || !kendo_date_math_1.isEqual(focusedDate, this.lastFocus)) {
144
+ || !(0, kendo_date_math_1.isEqual)(focusedDate, this.lastFocus)) {
137
145
  this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
138
146
  }
139
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 },
@@ -21,10 +21,10 @@ export declare class TodayCommand extends React.Component<TodayCommandProps> {
21
21
  min: Date;
22
22
  max: Date;
23
23
  };
24
- protected readonly min: Date;
25
- protected readonly max: Date;
24
+ protected get min(): Date;
25
+ protected get max(): Date;
26
26
  private localization;
27
- protected readonly todayIsInRange: boolean;
27
+ protected get todayIsInRange(): boolean;
28
28
  private handleClick;
29
29
  render(): JSX.Element;
30
30
  }
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
15
  };
14
16
  })();
15
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TodayCommand = void 0;
16
19
  var React = require("react");
17
20
  var PropTypes = require("prop-types");
18
21
  var kendo_react_intl_1 = require("@progress/kendo-react-intl");
@@ -25,18 +28,20 @@ var TodayCommand = /** @class */ (function (_super) {
25
28
  __extends(TodayCommand, _super);
26
29
  function TodayCommand() {
27
30
  var _this = _super !== null && _super.apply(this, arguments) || this;
31
+ _this.localization = null;
28
32
  _this.handleClick = function (syntheticEvent) {
29
33
  if (!_this.todayIsInRange) {
30
34
  return;
31
35
  }
32
36
  if (_this.props.onClick) {
33
- _this.props.onClick.call(undefined, {
37
+ var event_1 = {
34
38
  syntheticEvent: syntheticEvent,
35
39
  nativeEvent: syntheticEvent.nativeEvent,
36
- 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),
37
41
  target: _this,
38
42
  isTodayClick: true
39
- });
43
+ };
44
+ _this.props.onClick.call(undefined, event_1);
40
45
  }
41
46
  };
42
47
  return _this;
@@ -47,7 +52,7 @@ var TodayCommand = /** @class */ (function (_super) {
47
52
  ? this.props.min
48
53
  : TodayCommand.defaultProps.min;
49
54
  },
50
- enumerable: true,
55
+ enumerable: false,
51
56
  configurable: true
52
57
  });
53
58
  Object.defineProperty(TodayCommand.prototype, "max", {
@@ -56,20 +61,20 @@ var TodayCommand = /** @class */ (function (_super) {
56
61
  ? this.props.max
57
62
  : TodayCommand.defaultProps.max;
58
63
  },
59
- enumerable: true,
64
+ enumerable: false,
60
65
  configurable: true
61
66
  });
62
67
  Object.defineProperty(TodayCommand.prototype, "todayIsInRange", {
63
68
  get: function () {
64
- 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));
65
70
  },
66
- enumerable: true,
71
+ enumerable: false,
67
72
  configurable: true
68
73
  });
69
74
  TodayCommand.prototype.render = function () {
70
- this.localization = kendo_react_intl_1.provideLocalizationService(this);
75
+ this.localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
71
76
  var todayMessage = this.localization.toLanguageString(messages_1.today, messages_1.messages[messages_1.today]);
72
- var todayClassNames = kendo_react_common_1.classNames('k-nav-today', {
77
+ var todayClassNames = (0, kendo_react_common_1.classNames)('k-nav-today', {
73
78
  'k-disabled': this.props.disabled
74
79
  });
75
80
  return (React.createElement("span", { className: todayClassNames, onClick: this.handleClick }, todayMessage));
@@ -87,4 +92,4 @@ var TodayCommand = /** @class */ (function (_super) {
87
92
  return TodayCommand;
88
93
  }(React.Component));
89
94
  exports.TodayCommand = TodayCommand;
90
- 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
  };
@@ -67,18 +67,18 @@ export declare class View extends React.Component<ViewProps, {}> {
67
67
  };
68
68
  private intl;
69
69
  private weekService;
70
- protected readonly min: Date;
71
- protected readonly max: Date;
72
- protected readonly isHorizontal: boolean;
73
- protected readonly isMonthView: boolean;
74
- protected readonly weekNumber: boolean;
75
- protected readonly selectedDate: Date | Date[] | null;
70
+ protected get min(): Date;
71
+ protected get max(): Date;
72
+ protected get isHorizontal(): boolean;
73
+ protected get isMonthView(): boolean;
74
+ protected get weekNumber(): boolean;
75
+ protected get selectedDate(): Date | Date[] | null;
76
76
  render(): JSX.Element;
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;
81
- protected firstWeekDateContext: (rowCtx: CellContext[]) => CellContext;
80
+ protected firstDate: (row: any) => Date | null;
81
+ protected firstWeekDateContext: (rowCtx: CellContext[]) => CellContext | null;
82
82
  private handleClick;
83
83
  private handleMouseEnter;
84
84
  private handleMouseLeave;
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
24
26
  return __assign.apply(this, arguments);
25
27
  };
26
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.View = void 0;
27
30
  var React = require("react");
28
31
  var PropTypes = require("prop-types");
29
32
  var kendo_date_math_1 = require("@progress/kendo-date-math");
@@ -44,14 +47,16 @@ var View = /** @class */ (function (_super) {
44
47
  __extends(View, _super);
45
48
  function View() {
46
49
  var _this = _super !== null && _super.apply(this, arguments) || this;
50
+ _this.intl = null;
51
+ _this.weekService = null;
47
52
  _this.buildWeekNumber = function (row, idx) {
48
53
  var firstDayOfWeek = _this.firstDate(row);
49
54
  if (!firstDayOfWeek) {
50
- return emptyCell("week-cell-" + idx);
55
+ return emptyCell("week-cell-".concat(idx));
51
56
  }
52
57
  var firstDate = _this.firstDate(row);
53
58
  var weekCellValue = _this.getWeekNumber(firstDate);
54
- var uniqueID = "kendo-react-calendar-week-cell-" + weekCellValue;
59
+ var uniqueID = "kendo-react-calendar-week-cell-".concat(weekCellValue);
55
60
  var cellProps = {
56
61
  className: 'k-alt',
57
62
  value: weekCellValue,
@@ -67,8 +72,8 @@ var View = /** @class */ (function (_super) {
67
72
  return emptyCell(idx);
68
73
  }
69
74
  var aria = { 'aria-selected': cell.isSelected };
70
- var uniqueID = "kendo-react-calendar-cell-" + cell.value.getTime();
71
- var cellProps = __assign({}, aria, cell, { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
75
+ var uniqueID = "kendo-react-calendar-cell-".concat(cell.value.getTime());
76
+ var cellProps = __assign(__assign(__assign({}, aria), cell), { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
72
77
  return _this.props.cell
73
78
  ? (React.createElement(_this.props.cell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue))
74
79
  : (React.createElement(CalendarCell_1.CalendarCell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue));
@@ -91,9 +96,9 @@ var View = /** @class */ (function (_super) {
91
96
  };
92
97
  _this.handleClick = function (value, event) {
93
98
  var onChange = _this.props.onChange;
94
- if (onChange) {
99
+ if (onChange && event) {
95
100
  var args = {
96
- value: kendo_date_math_1.cloneDate(value),
101
+ value: (0, kendo_date_math_1.cloneDate)(value),
97
102
  target: _this,
98
103
  nativeEvent: event && event.nativeEvent,
99
104
  syntheticEvent: event
@@ -104,13 +109,13 @@ var View = /** @class */ (function (_super) {
104
109
  _this.handleMouseEnter = function (value) {
105
110
  var onCellEnter = _this.props.onCellEnter;
106
111
  if (onCellEnter) {
107
- onCellEnter.call(undefined, kendo_date_math_1.cloneDate(value));
112
+ onCellEnter.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
108
113
  }
109
114
  };
110
115
  _this.handleMouseLeave = function (value) {
111
116
  var onCellLeave = _this.props.onCellLeave;
112
117
  if (onCellLeave) {
113
- onCellLeave.call(undefined, kendo_date_math_1.cloneDate(value));
118
+ onCellLeave.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
114
119
  }
115
120
  };
116
121
  return _this;
@@ -119,53 +124,53 @@ var View = /** @class */ (function (_super) {
119
124
  get: function () {
120
125
  return this.props.min;
121
126
  },
122
- enumerable: true,
127
+ enumerable: false,
123
128
  configurable: true
124
129
  });
125
130
  Object.defineProperty(View.prototype, "max", {
126
131
  get: function () {
127
132
  return this.props.max;
128
133
  },
129
- enumerable: true,
134
+ enumerable: false,
130
135
  configurable: true
131
136
  });
132
137
  Object.defineProperty(View.prototype, "isHorizontal", {
133
138
  get: function () {
134
139
  return this.props.direction === 'horizontal';
135
140
  },
136
- enumerable: true,
141
+ enumerable: false,
137
142
  configurable: true
138
143
  });
139
144
  Object.defineProperty(View.prototype, "isMonthView", {
140
145
  get: function () {
141
146
  return this.props.activeView === models_1.CalendarViewEnum.month;
142
147
  },
143
- enumerable: true,
148
+ enumerable: false,
144
149
  configurable: true
145
150
  });
146
151
  Object.defineProperty(View.prototype, "weekNumber", {
147
152
  get: function () {
148
153
  return Boolean(this.props.showWeekNumbers && this.props.activeView === models_1.CalendarViewEnum.month);
149
154
  },
150
- enumerable: true,
155
+ enumerable: false,
151
156
  configurable: true
152
157
  });
153
158
  Object.defineProperty(View.prototype, "selectedDate", {
154
159
  get: function () {
155
160
  return this.props.selectedDate !== undefined ? this.props.selectedDate : View.defaultProps.selectedDate;
156
161
  },
157
- enumerable: true,
162
+ enumerable: false,
158
163
  configurable: true
159
164
  });
160
165
  View.prototype.render = function () {
161
166
  var _this = this;
162
- this.intl = kendo_react_intl_1.provideIntlService(this);
167
+ this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
163
168
  this.weekService = new services_1.WeekNamesService(this.intl);
164
169
  var weekNames = this.weekService.getWeekNames(this.weekNumber);
165
170
  var colSpan = this.props.service.rowLength(this.weekNumber);
166
171
  var title = this.props.service.title(this.props.viewDate);
167
- var time = utils_1.getToday();
168
- 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);
169
174
  var data = this.props.service.data({
170
175
  cellUID: this.props.cellUID,
171
176
  min: this.min,
@@ -189,10 +194,10 @@ var View = /** @class */ (function (_super) {
189
194
  }))));
190
195
  };
191
196
  View.prototype.getWeekNumber = function (date) {
192
- if (!this.weekNumber) {
197
+ if (!this.weekNumber || !this.intl) {
193
198
  return null;
194
199
  }
195
- return kendo_date_math_1.weekInYear(date, this.intl.firstDay());
200
+ return (0, kendo_date_math_1.weekInYear)(date, this.intl.firstDay());
196
201
  };
197
202
  View.propTypes = {
198
203
  activeRangeEnd: PropTypes.oneOf(['start', 'end', null]),
@@ -209,10 +214,10 @@ var View = /** @class */ (function (_super) {
209
214
  };
210
215
  View.defaultProps = {
211
216
  direction: 'vertical',
212
- selectedDate: utils_1.getToday(),
217
+ selectedDate: (0, utils_1.getToday)(),
213
218
  showWeekNumbers: false
214
219
  };
215
220
  return View;
216
221
  }(React.Component));
217
222
  exports.View = View;
218
- kendo_react_intl_1.registerForIntl(View);
223
+ (0, kendo_react_intl_1.registerForIntl)(View);
@@ -87,12 +87,12 @@ export declare class ViewList extends React.Component<ViewListProps, ViewListSta
87
87
  private shouldScroll;
88
88
  private indexToScroll?;
89
89
  private lastFocus;
90
- readonly element: HTMLDivElement | null;
91
- protected readonly weekNames: string[];
92
- protected readonly weekNumber: boolean;
93
- protected readonly take: number;
94
- protected readonly animate: boolean;
95
- protected readonly todayIsInRange: boolean;
90
+ get element(): HTMLDivElement | null;
91
+ protected get weekNames(): string[];
92
+ protected get weekNumber(): boolean;
93
+ protected get take(): number;
94
+ protected get animate(): boolean;
95
+ protected get todayIsInRange(): boolean;
96
96
  constructor(props: ViewListProps);
97
97
  componentDidUpdate(_prevProps: ViewListProps, _prevState: ViewListState): void;
98
98
  focusActiveDate: () => void;
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
15
  };
14
16
  })();
15
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ViewList = void 0;
16
19
  var React = require("react");
17
20
  var PropTypes = require("prop-types");
18
21
  var kendo_react_common_1 = require("@progress/kendo-react-common");
@@ -32,6 +35,14 @@ var ViewList = /** @class */ (function (_super) {
32
35
  __extends(ViewList, _super);
33
36
  function ViewList(props) {
34
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;
35
46
  _this.isActive = false;
36
47
  _this.animateToIndex = true;
37
48
  _this.shouldScroll = false;
@@ -62,8 +73,8 @@ var ViewList = /** @class */ (function (_super) {
62
73
  _this.handleVirtualizationMount = function (virtualization) {
63
74
  _this.virtualization = virtualization;
64
75
  if (_this.virtualization && _this.table) {
65
- _this.table.style.transform = "translateY(" + _this.viewOffset + "px)";
66
- 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);
67
78
  var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
68
79
  _this.virtualization.scrollToIndex(indexToScroll);
69
80
  }
@@ -103,7 +114,7 @@ var ViewList = /** @class */ (function (_super) {
103
114
  _this.setState({ index: index, skip: skip });
104
115
  }
105
116
  if (_this.table && scrollAction) {
106
- var translate = "translateY(" + scrollAction.offset + "px)";
117
+ var translate = "translateY(".concat(scrollAction.offset, "px)");
107
118
  _this.table.style.transform = translate;
108
119
  }
109
120
  };
@@ -118,7 +129,7 @@ var ViewList = /** @class */ (function (_super) {
118
129
  var args = {
119
130
  syntheticEvent: event.syntheticEvent,
120
131
  nativeEvent: event.nativeEvent,
121
- value: kendo_date_math_1.cloneDate(event.value),
132
+ value: (0, kendo_date_math_1.cloneDate)(event.value),
122
133
  target: _this,
123
134
  isTodayClick: isTodayClick
124
135
  };
@@ -137,44 +148,44 @@ var ViewList = /** @class */ (function (_super) {
137
148
  get: function () {
138
149
  return this._element;
139
150
  },
140
- enumerable: true,
151
+ enumerable: false,
141
152
  configurable: true
142
153
  });
143
154
  Object.defineProperty(ViewList.prototype, "weekNames", {
144
155
  get: function () {
145
- this.intl = kendo_react_intl_1.provideIntlService(this);
146
- 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());
147
158
  return this.weekNumber ? [''].concat(weekNames) : weekNames;
148
159
  },
149
- enumerable: true,
160
+ enumerable: false,
150
161
  configurable: true
151
162
  });
152
163
  Object.defineProperty(ViewList.prototype, "weekNumber", {
153
164
  get: function () {
154
165
  return Boolean(this.props.showWeekNumbers && this.props.activeView === models_1.CalendarViewEnum.month);
155
166
  },
156
- enumerable: true,
167
+ enumerable: false,
157
168
  configurable: true
158
169
  });
159
170
  Object.defineProperty(ViewList.prototype, "take", {
160
171
  get: function () {
161
172
  return this.props.take !== undefined ? this.props.take : ViewList.defaultProps.take;
162
173
  },
163
- enumerable: true,
174
+ enumerable: false,
164
175
  configurable: true
165
176
  });
166
177
  Object.defineProperty(ViewList.prototype, "animate", {
167
178
  get: function () {
168
179
  return Boolean(this.props.smoothScroll && this.animateToIndex);
169
180
  },
170
- enumerable: true,
181
+ enumerable: false,
171
182
  configurable: true
172
183
  });
173
184
  Object.defineProperty(ViewList.prototype, "todayIsInRange", {
174
185
  get: function () {
175
- 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));
176
187
  },
177
- enumerable: true,
188
+ enumerable: false,
178
189
  configurable: true
179
190
  });
180
191
  ViewList.prototype.componentDidUpdate = function (_prevProps, _prevState) {
@@ -193,7 +204,7 @@ var ViewList = /** @class */ (function (_super) {
193
204
  var _this = this;
194
205
  this.calculateHeights();
195
206
  var didViewChange = this.lastView !== this.props.activeView;
196
- 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);
197
208
  var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
198
209
  var total = this.props.service.total(this.props.min, this.props.max);
199
210
  var take = this.getTake(skip, total);
@@ -203,13 +214,13 @@ var ViewList = /** @class */ (function (_super) {
203
214
  var didViewChanged = this.props.activeView !== this.lastView;
204
215
  this.animateToIndex = !didViewChanged;
205
216
  if (didViewChanged
206
- || !kendo_date_math_1.isEqualDate(this.lastFocus, focusedDate)
217
+ || !(0, kendo_date_math_1.isEqualDate)(this.lastFocus, focusedDate)
207
218
  || this.shouldScroll
208
219
  || (!this.props.shouldScroll || this.props.shouldScroll())) {
209
220
  this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
210
221
  }
211
222
  this.lastFocus = focusedDate;
212
- 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', {
213
224
  'k-calendar-monthview': this.props.activeView === models_1.CalendarViewEnum.month,
214
225
  'k-calendar-yearview': this.props.activeView === models_1.CalendarViewEnum.year,
215
226
  'k-calendar-decadeview': this.props.activeView === models_1.CalendarViewEnum.decade,
@@ -246,4 +257,4 @@ var ViewList = /** @class */ (function (_super) {
246
257
  return ViewList;
247
258
  }(React.Component));
248
259
  exports.ViewList = ViewList;
249
- kendo_react_intl_1.registerForIntl(ViewList);
260
+ (0, kendo_react_intl_1.registerForIntl)(ViewList);
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CalendarViewEnum = void 0;
3
4
  /**
4
5
  * The Enum which defines all possible Calendar view types.
5
6
  */
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Action = void 0;
3
4
  /**
4
5
  * @hidden
5
6
  */
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMPTY_SELECTIONRANGE = void 0;
3
4
  /**
4
5
  * @hidden
5
6
  */
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMPTY_SELECTIONRANGE = exports.CalendarViewEnum = exports.Action = void 0;
3
4
  var NavigationAction_1 = require("./NavigationAction");
4
- exports.Action = NavigationAction_1.Action;
5
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return NavigationAction_1.Action; } });
5
6
  var CalendarViewEnum_1 = require("./CalendarViewEnum");
6
- exports.CalendarViewEnum = CalendarViewEnum_1.CalendarViewEnum;
7
+ Object.defineProperty(exports, "CalendarViewEnum", { enumerable: true, get: function () { return CalendarViewEnum_1.CalendarViewEnum; } });
7
8
  var SelectionRange_1 = require("./SelectionRange");
8
- exports.EMPTY_SELECTIONRANGE = SelectionRange_1.EMPTY_SELECTIONRANGE;
9
+ Object.defineProperty(exports, "EMPTY_SELECTIONRANGE", { enumerable: true, get: function () { return SelectionRange_1.EMPTY_SELECTIONRANGE; } });
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BusViewService = void 0;
4
5
  var CenturyViewService_1 = require("./CenturyViewService");
5
6
  var DecadeViewService_1 = require("./DecadeViewService");
6
7
  var MonthViewService_1 = require("./MonthViewService");
@@ -30,7 +31,7 @@ var BusViewService = /** @class */ (function () {
30
31
  this.top = top;
31
32
  };
32
33
  BusViewService.prototype.service = function (view, intl) {
33
- return new services["" + view](intl);
34
+ return new services["".concat(view)](intl);
34
35
  };
35
36
  BusViewService.prototype.moveDown = function (view, event) {
36
37
  this.move(view, -1, event);