@progress/kendo-react-dateinputs 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230

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 (182) 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 +2 -2
  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 +9 -9
  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/calendar/utils/ScrollSync.d.ts +3 -3
  39. package/dist/es/calendar/utils/ScrollSync.js +2 -0
  40. package/dist/es/dateinput/DateInput.d.ts +24 -20
  41. package/dist/es/dateinput/DateInput.js +32 -19
  42. package/dist/es/dateinput/models/DateInputSettings.js +1 -0
  43. package/dist/es/dateinput/models/format-placeholder.js +1 -0
  44. package/dist/es/dateinput/models/incremental-steps.js +1 -0
  45. package/dist/es/dateinput/models/kendo-date.d.ts +2 -2
  46. package/dist/es/dateinput/models/kendo-date.js +3 -3
  47. package/dist/es/dateinput/models/mask.js +1 -0
  48. package/dist/es/dateinput/models/selection.js +1 -0
  49. package/dist/es/dateinput/utils.d.ts +2 -2
  50. package/dist/es/datepicker/DatePicker.d.ts +25 -25
  51. package/dist/es/datepicker/DatePicker.js +28 -23
  52. package/dist/es/datepicker/models/DatePickerSettings.js +1 -0
  53. package/dist/es/datepicker/models/index.js +1 -0
  54. package/dist/es/daterangepicker/DateRangePicker.d.ts +16 -14
  55. package/dist/es/daterangepicker/DateRangePicker.js +16 -14
  56. package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +1 -0
  57. package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +1 -0
  58. package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +1 -0
  59. package/dist/es/daterangepicker/models/DateRangePickerSettings.js +1 -0
  60. package/dist/es/daterangepicker/models/index.js +1 -0
  61. package/dist/es/datetimepicker/DateTimePicker.d.ts +19 -19
  62. package/dist/es/datetimepicker/DateTimePicker.js +33 -18
  63. package/dist/es/datetimepicker/DateTimeSelector.d.ts +7 -7
  64. package/dist/es/datetimepicker/DateTimeSelector.js +17 -7
  65. package/dist/es/datetimepicker/models/DateTimePickerSettings.js +1 -0
  66. package/dist/es/datetimepicker/models/index.js +1 -0
  67. package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
  68. package/dist/es/messages/index.d.ts +21 -21
  69. package/dist/es/package-metadata.js +1 -1
  70. package/dist/es/timepicker/TimeList.d.ts +8 -8
  71. package/dist/es/timepicker/TimeList.js +33 -13
  72. package/dist/es/timepicker/TimePart.d.ts +11 -11
  73. package/dist/es/timepicker/TimePart.js +14 -9
  74. package/dist/es/timepicker/TimePicker.d.ts +23 -23
  75. package/dist/es/timepicker/TimePicker.js +27 -22
  76. package/dist/es/timepicker/TimeSelector.d.ts +6 -6
  77. package/dist/es/timepicker/TimeSelector.js +11 -5
  78. package/dist/es/timepicker/models/IncrementalSteps.js +1 -0
  79. package/dist/es/timepicker/models/ListItem.js +1 -0
  80. package/dist/es/timepicker/models/ListService.js +1 -0
  81. package/dist/es/timepicker/models/ListServiceSettings.js +1 -0
  82. package/dist/es/timepicker/models/TimePickerSettings.js +1 -0
  83. package/dist/es/timepicker/services/DOMService.js +2 -0
  84. package/dist/es/timepicker/services/DayPeriodService.js +9 -3
  85. package/dist/es/timepicker/services/HoursService.js +14 -5
  86. package/dist/es/timepicker/services/MinutesService.js +12 -6
  87. package/dist/es/timepicker/services/SecondsService.js +12 -6
  88. package/dist/es/timepicker/utils.d.ts +4 -4
  89. package/dist/es/utils.d.ts +1 -1
  90. package/dist/es/utils.js +10 -1
  91. package/dist/es/virtualization/Virtualization.d.ts +9 -8
  92. package/dist/es/virtualization/Virtualization.js +23 -13
  93. package/dist/es/virtualization/services/RowHeightService.js +10 -1
  94. package/dist/es/virtualization/services/ScrollerService.js +9 -3
  95. package/dist/npm/calendar/components/Calendar.d.ts +10 -10
  96. package/dist/npm/calendar/components/Calendar.js +53 -38
  97. package/dist/npm/calendar/components/CalendarCell.js +9 -4
  98. package/dist/npm/calendar/components/CalendarHeaderTitle.js +8 -3
  99. package/dist/npm/calendar/components/CalendarNavigationItem.js +9 -4
  100. package/dist/npm/calendar/components/CalendarWeekCell.js +9 -4
  101. package/dist/npm/calendar/components/Header.d.ts +5 -4
  102. package/dist/npm/calendar/components/Header.js +11 -8
  103. package/dist/npm/calendar/components/HorizontalViewList.d.ts +4 -4
  104. package/dist/npm/calendar/components/HorizontalViewList.js +11 -7
  105. package/dist/npm/calendar/components/MultiViewCalendar.d.ts +13 -13
  106. package/dist/npm/calendar/components/MultiViewCalendar.js +62 -52
  107. package/dist/npm/calendar/components/Navigation.d.ts +2 -2
  108. package/dist/npm/calendar/components/Navigation.js +18 -10
  109. package/dist/npm/calendar/components/TodayCommand.d.ts +3 -3
  110. package/dist/npm/calendar/components/TodayCommand.js +16 -11
  111. package/dist/npm/calendar/components/View.d.ts +11 -11
  112. package/dist/npm/calendar/components/View.js +27 -22
  113. package/dist/npm/calendar/components/ViewList.d.ts +9 -9
  114. package/dist/npm/calendar/components/ViewList.js +29 -18
  115. package/dist/npm/calendar/models/CalendarViewEnum.js +1 -0
  116. package/dist/npm/calendar/models/NavigationAction.js +1 -0
  117. package/dist/npm/calendar/models/SelectionRange.js +1 -0
  118. package/dist/npm/calendar/models/index.js +4 -3
  119. package/dist/npm/calendar/services/BusViewService.js +3 -2
  120. package/dist/npm/calendar/services/CenturyViewService.js +40 -39
  121. package/dist/npm/calendar/services/DOMService.js +34 -15
  122. package/dist/npm/calendar/services/DecadeViewService.js +34 -33
  123. package/dist/npm/calendar/services/MonthViewService.js +38 -37
  124. package/dist/npm/calendar/services/NavigationService.js +2 -1
  125. package/dist/npm/calendar/services/ScrollSyncService.js +6 -1
  126. package/dist/npm/calendar/services/WeekNamesService.js +2 -1
  127. package/dist/npm/calendar/services/YearViewService.js +35 -34
  128. package/dist/npm/calendar/services/index.js +10 -9
  129. package/dist/npm/calendar/utils/ScrollSync.d.ts +3 -3
  130. package/dist/npm/calendar/utils/ScrollSync.js +2 -0
  131. package/dist/npm/common/PickerWrap.js +2 -1
  132. package/dist/npm/dateinput/DateInput.d.ts +24 -20
  133. package/dist/npm/dateinput/DateInput.js +51 -37
  134. package/dist/npm/dateinput/models/index.js +3 -2
  135. package/dist/npm/dateinput/models/kendo-date.d.ts +2 -2
  136. package/dist/npm/dateinput/models/kendo-date.js +15 -14
  137. package/dist/npm/dateinput/models/mask.js +2 -0
  138. package/dist/npm/dateinput/utils.d.ts +2 -2
  139. package/dist/npm/dateinput/utils.js +9 -4
  140. package/dist/npm/datepicker/DatePicker.d.ts +25 -25
  141. package/dist/npm/datepicker/DatePicker.js +42 -36
  142. package/dist/npm/datepicker/ToggleButton.js +1 -0
  143. package/dist/npm/daterangepicker/DateRangePicker.d.ts +16 -14
  144. package/dist/npm/daterangepicker/DateRangePicker.js +34 -31
  145. package/dist/npm/datetimepicker/DateTimePicker.d.ts +19 -19
  146. package/dist/npm/datetimepicker/DateTimePicker.js +46 -30
  147. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +7 -7
  148. package/dist/npm/datetimepicker/DateTimeSelector.js +26 -15
  149. package/dist/npm/defaults.js +1 -0
  150. package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
  151. package/dist/npm/hooks/usePickerFloatingLabel.js +6 -3
  152. package/dist/npm/main.js +22 -21
  153. package/dist/npm/messages/index.d.ts +21 -21
  154. package/dist/npm/messages/index.js +2 -1
  155. package/dist/npm/package-metadata.js +2 -1
  156. package/dist/npm/timepicker/TimeList.d.ts +8 -8
  157. package/dist/npm/timepicker/TimeList.js +39 -18
  158. package/dist/npm/timepicker/TimePart.d.ts +11 -11
  159. package/dist/npm/timepicker/TimePart.js +25 -19
  160. package/dist/npm/timepicker/TimePicker.d.ts +23 -23
  161. package/dist/npm/timepicker/TimePicker.js +43 -37
  162. package/dist/npm/timepicker/TimeSelector.d.ts +6 -6
  163. package/dist/npm/timepicker/TimeSelector.js +22 -15
  164. package/dist/npm/timepicker/models/TimePart.js +1 -0
  165. package/dist/npm/timepicker/models/index.js +2 -1
  166. package/dist/npm/timepicker/services/DOMService.js +7 -4
  167. package/dist/npm/timepicker/services/DayPeriodService.js +11 -4
  168. package/dist/npm/timepicker/services/HoursService.js +21 -11
  169. package/dist/npm/timepicker/services/MinutesService.js +17 -10
  170. package/dist/npm/timepicker/services/SecondsService.js +17 -10
  171. package/dist/npm/timepicker/services/index.js +6 -5
  172. package/dist/npm/timepicker/utils.d.ts +4 -4
  173. package/dist/npm/timepicker/utils.js +30 -20
  174. package/dist/npm/utils.d.ts +1 -1
  175. package/dist/npm/utils.js +43 -20
  176. package/dist/npm/virtualization/Virtualization.d.ts +9 -8
  177. package/dist/npm/virtualization/Virtualization.js +27 -16
  178. package/dist/npm/virtualization/services/RowHeightService.js +11 -1
  179. package/dist/npm/virtualization/services/ScrollerService.js +10 -3
  180. package/dist/npm/virtualization/services/index.js +5 -4
  181. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  182. package/package.json +13 -13
@@ -111,7 +111,7 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
111
111
  second: PropTypes.Requireable<string>;
112
112
  timeZoneName: PropTypes.Requireable<string>;
113
113
  }>>;
114
- formatPlaceholder: PropTypes.Requireable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
114
+ formatPlaceholder: PropTypes.Requireable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
115
115
  year: PropTypes.Requireable<string>;
116
116
  month: PropTypes.Requireable<string>;
117
117
  day: PropTypes.Requireable<string>;
@@ -145,16 +145,16 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
145
145
  required: PropTypes.Requireable<boolean>;
146
146
  validate: PropTypes.Requireable<boolean>;
147
147
  valid: PropTypes.Requireable<boolean>;
148
- size: PropTypes.Requireable<"small" | "medium" | "large">;
149
- rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
150
- fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
148
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
149
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
150
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
151
151
  };
152
152
  /**
153
153
  * @hidden
154
154
  */
155
155
  static defaultProps: {
156
156
  defaultShow: boolean;
157
- defaultValue: any;
157
+ defaultValue: null;
158
158
  disabled: boolean;
159
159
  format: string;
160
160
  max: Date;
@@ -165,9 +165,9 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
165
165
  required: boolean;
166
166
  validityStyles: boolean;
167
167
  dateInput: React.ComponentType<DateInputProps<any>>;
168
- size: "small" | "medium" | "large";
169
- rounded: "small" | "medium" | "large" | "full";
170
- fillMode: "solid" | "flat" | "outline";
168
+ size: "small" | "medium" | "large" | null | undefined;
169
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
170
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
171
171
  };
172
172
  /**
173
173
  * @hidden
@@ -185,43 +185,43 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
185
185
  /**
186
186
  * Gets the wrapping element of the TimePicker.
187
187
  */
188
- readonly element: HTMLSpanElement | null;
188
+ get element(): HTMLSpanElement | null;
189
189
  /**
190
190
  * Gets the DateInput component inside the TimePicker component.
191
191
  */
192
- readonly dateInput: DateInput | null;
192
+ get dateInput(): DateInput | null;
193
193
  /**
194
194
  * Gets the TimeSelector component inside the TimePicker component.
195
195
  */
196
- readonly timeSelector: TimeSelector | null;
196
+ get timeSelector(): TimeSelector | null;
197
197
  /**
198
198
  * Gets the value of the TimePicker.
199
199
  */
200
- readonly value: Date | null;
200
+ get value(): Date | null;
201
201
  /**
202
202
  * Gets the popup state of the TimeSelector.
203
203
  */
204
- readonly show: boolean;
204
+ get show(): boolean;
205
205
  /**
206
206
  * Gets the `name` property of the TimePicker.
207
207
  */
208
- readonly name: string | undefined;
208
+ get name(): string | undefined;
209
209
  /**
210
210
  * Represents the validity state into which the TimePicker is set.
211
211
  */
212
- readonly validity: FormComponentValidity;
212
+ get validity(): FormComponentValidity;
213
213
  /**
214
214
  * @hidden
215
215
  */
216
- protected readonly validityStyles: boolean;
216
+ protected get validityStyles(): boolean;
217
217
  /**
218
218
  * @hidden
219
219
  */
220
- protected readonly required: boolean;
221
- private readonly popupSettings;
222
- private readonly min;
223
- private readonly max;
224
- protected readonly dateInputComp: React.ComponentType<DateInputProps<any>>;
220
+ protected get required(): boolean;
221
+ private get popupSettings();
222
+ private get min();
223
+ private get max();
224
+ protected get dateInputComp(): React.ComponentType<DateInputProps<any>>;
225
225
  /**
226
226
  * @hidden
227
227
  */
@@ -238,8 +238,8 @@ export declare class TimePickerWithoutContext extends React.Component<TimePicker
238
238
  * @hidden
239
239
  */
240
240
  render(): JSX.Element;
241
- protected setTimeSelectorRef: (timeSelector: any) => void;
242
- protected nextValue: (nextProps: TimePickerProps, nextState: TimePickerState) => Date;
241
+ protected setTimeSelectorRef: (timeSelector: TimeSelector | null) => void;
242
+ protected nextValue: (nextProps: TimePickerProps, nextState: TimePickerState) => Date | null;
243
243
  protected nextShow: (nextProps: TimePickerProps, nextState: TimePickerState) => boolean;
244
244
  protected normalizeTime(date: Date): Date;
245
245
  protected setShow(show: boolean): void;
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -27,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) {
27
29
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
30
  t[p] = s[p];
29
31
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
31
- t[p[i]] = s[p[i]];
32
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
+ t[p[i]] = s[p[i]];
35
+ }
32
36
  return t;
33
37
  };
34
38
  import * as React from 'react';
@@ -56,6 +60,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
56
60
  _this._dateInput = React.createRef();
57
61
  _this._timeSelector = null;
58
62
  _this.shouldFocusDateInput = false;
63
+ _this.prevShow = false;
59
64
  /**
60
65
  * @hidden
61
66
  */
@@ -79,7 +84,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
79
84
  };
80
85
  _this.handleInputValueChange = function (event) {
81
86
  var value = _this.mergeTime(event.value);
82
- _this.handleValueChange(__assign({}, event, { value: value }));
87
+ _this.handleValueChange(__assign(__assign({}, event), { value: value }));
83
88
  };
84
89
  _this.handleValueChange = function (event) {
85
90
  _this.setState({
@@ -154,7 +159,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
154
159
  get: function () {
155
160
  return this._element;
156
161
  },
157
- enumerable: true,
162
+ enumerable: false,
158
163
  configurable: true
159
164
  });
160
165
  Object.defineProperty(TimePickerWithoutContext.prototype, "dateInput", {
@@ -164,7 +169,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
164
169
  get: function () {
165
170
  return this._dateInput.current;
166
171
  },
167
- enumerable: true,
172
+ enumerable: false,
168
173
  configurable: true
169
174
  });
170
175
  Object.defineProperty(TimePickerWithoutContext.prototype, "timeSelector", {
@@ -174,7 +179,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
174
179
  get: function () {
175
180
  return this._timeSelector;
176
181
  },
177
- enumerable: true,
182
+ enumerable: false,
178
183
  configurable: true
179
184
  });
180
185
  Object.defineProperty(TimePickerWithoutContext.prototype, "value", {
@@ -189,7 +194,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
189
194
  : this.state.value;
190
195
  return (value !== null) ? cloneDate(value) : null;
191
196
  },
192
- enumerable: true,
197
+ enumerable: false,
193
198
  configurable: true
194
199
  });
195
200
  Object.defineProperty(TimePickerWithoutContext.prototype, "show", {
@@ -203,7 +208,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
203
208
  ? this.props.show
204
209
  : this.state.show;
205
210
  },
206
- enumerable: true,
211
+ enumerable: false,
207
212
  configurable: true
208
213
  });
209
214
  Object.defineProperty(TimePickerWithoutContext.prototype, "name", {
@@ -213,7 +218,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
213
218
  get: function () {
214
219
  return this.props.name;
215
220
  },
216
- enumerable: true,
221
+ enumerable: false,
217
222
  configurable: true
218
223
  });
219
224
  Object.defineProperty(TimePickerWithoutContext.prototype, "validity", {
@@ -236,7 +241,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
236
241
  valueMissing: this.value === null
237
242
  };
238
243
  },
239
- enumerable: true,
244
+ enumerable: false,
240
245
  configurable: true
241
246
  });
242
247
  Object.defineProperty(TimePickerWithoutContext.prototype, "validityStyles", {
@@ -248,7 +253,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
248
253
  ? this.props.validityStyles
249
254
  : TimePickerWithoutContext.defaultProps.validityStyles;
250
255
  },
251
- enumerable: true,
256
+ enumerable: false,
252
257
  configurable: true
253
258
  });
254
259
  Object.defineProperty(TimePickerWithoutContext.prototype, "required", {
@@ -260,35 +265,35 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
260
265
  ? this.props.required
261
266
  : TimePickerWithoutContext.defaultProps.required;
262
267
  },
263
- enumerable: true,
268
+ enumerable: false,
264
269
  configurable: true
265
270
  });
266
271
  Object.defineProperty(TimePickerWithoutContext.prototype, "popupSettings", {
267
272
  get: function () {
268
273
  return this.props.popupSettings || TimePickerWithoutContext.defaultProps.popupSettings;
269
274
  },
270
- enumerable: true,
275
+ enumerable: false,
271
276
  configurable: true
272
277
  });
273
278
  Object.defineProperty(TimePickerWithoutContext.prototype, "min", {
274
279
  get: function () {
275
280
  return this.props.min !== undefined ? this.props.min : TimePickerWithoutContext.defaultProps.min;
276
281
  },
277
- enumerable: true,
282
+ enumerable: false,
278
283
  configurable: true
279
284
  });
280
285
  Object.defineProperty(TimePickerWithoutContext.prototype, "max", {
281
286
  get: function () {
282
287
  return this.props.max !== undefined ? this.props.max : TimePickerWithoutContext.defaultProps.max;
283
288
  },
284
- enumerable: true,
289
+ enumerable: false,
285
290
  configurable: true
286
291
  });
287
292
  Object.defineProperty(TimePickerWithoutContext.prototype, "dateInputComp", {
288
293
  get: function () {
289
294
  return this.props.dateInput || TimePickerWithoutContext.defaultProps.dateInput;
290
295
  },
291
- enumerable: true,
296
+ enumerable: false,
292
297
  configurable: true
293
298
  });
294
299
  /**
@@ -365,18 +370,18 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
365
370
  var toggleTimeMessage = localizationService
366
371
  .toLanguageString(toggleTimeSelector, messages[toggleTimeSelector]);
367
372
  var timepicker = (React.createElement(AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncBlur: this.props.onBlur, onSyncFocus: this.props.onFocus }, function (_a) {
368
- var onFocus = _a.onFocus, onBlur = _a.onBlur;
369
373
  var _b;
374
+ var onFocus = _a.onFocus, onBlur = _a.onBlur;
370
375
  return (React.createElement("div", { ref: function (span) { _this._element = span; }, className: classNames('k-input', 'k-timepicker', (_b = {},
371
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
372
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
373
- _b["k-input-" + fillMode] = fillMode,
376
+ _b["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
377
+ _b["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
378
+ _b["k-input-".concat(fillMode)] = fillMode,
374
379
  _b['k-invalid'] = !isValid,
375
380
  _b['k-required'] = _this.required,
376
381
  _b['k-disabled'] = _this.props.disabled,
377
382
  _b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
378
383
  React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
379
- React.createElement(Button, __assign({ tabIndex: -1, type: "button", icon: 'clock', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: toggleTimeMessage, "aria-label": toggleTimeMessage, className: "k-input-button", rounded: null }, {
384
+ React.createElement(Button, __assign({ tabIndex: -1, type: "button", icon: 'clock', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: toggleTimeMessage, className: "k-input-button", rounded: null }, {
380
385
  'aria-controls': _this._popupId,
381
386
  'aria-label': toggleClockMessage
382
387
  })),
@@ -84,7 +84,7 @@ export declare class TimeSelector extends React.Component<TimeSelectorProps, Tim
84
84
  show: PropTypes.Requireable<boolean>;
85
85
  };
86
86
  static defaultProps: {
87
- value: any;
87
+ value: null;
88
88
  disabled: boolean;
89
89
  cancelButton: boolean;
90
90
  format: string;
@@ -105,10 +105,10 @@ export declare class TimeSelector extends React.Component<TimeSelectorProps, Tim
105
105
  /**
106
106
  * @hidden
107
107
  */
108
- readonly element: HTMLSpanElement | null;
109
- readonly value: Date | null;
110
- protected readonly intl: IntlService;
111
- private readonly current;
108
+ get element(): HTMLSpanElement | null;
109
+ get value(): Date | null;
110
+ protected get intl(): IntlService;
111
+ private get current();
112
112
  /**
113
113
  * @hidden
114
114
  */
@@ -119,7 +119,7 @@ export declare class TimeSelector extends React.Component<TimeSelectorProps, Tim
119
119
  render(): JSX.Element;
120
120
  focusActiveList: () => void;
121
121
  protected nextTick(f: () => any): void;
122
- protected hasActiveButton(): boolean;
122
+ protected hasActiveButton(): boolean | null;
123
123
  private handleKeyDown;
124
124
  private handleAccept;
125
125
  private handleReject;
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
2
2
  var extendStatics = function (d, b) {
3
3
  extendStatics = Object.setPrototypeOf ||
4
4
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
6
  return extendStatics(d, b);
7
7
  };
8
8
  return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
9
11
  extendStatics(d, b);
10
12
  function __() { this.constructor = d; }
11
13
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -47,6 +49,10 @@ var TimeSelector = /** @class */ (function (_super) {
47
49
  __extends(TimeSelector, _super);
48
50
  function TimeSelector(props) {
49
51
  var _this = _super.call(this, props) || this;
52
+ _this._element = null;
53
+ _this._cancelButton = null;
54
+ _this._acceptButton = null;
55
+ _this.timePart = null;
50
56
  _this.focusActiveList = function () {
51
57
  if (!_this.timePart) {
52
58
  return;
@@ -124,7 +130,7 @@ var TimeSelector = /** @class */ (function (_super) {
124
130
  get: function () {
125
131
  return this._element;
126
132
  },
127
- enumerable: true,
133
+ enumerable: false,
128
134
  configurable: true
129
135
  });
130
136
  Object.defineProperty(TimeSelector.prototype, "value", {
@@ -138,14 +144,14 @@ var TimeSelector = /** @class */ (function (_super) {
138
144
  ? cloneDate(value)
139
145
  : null;
140
146
  },
141
- enumerable: true,
147
+ enumerable: false,
142
148
  configurable: true
143
149
  });
144
150
  Object.defineProperty(TimeSelector.prototype, "intl", {
145
151
  get: function () {
146
152
  return provideIntlService(this);
147
153
  },
148
- enumerable: true,
154
+ enumerable: false,
149
155
  configurable: true
150
156
  });
151
157
  Object.defineProperty(TimeSelector.prototype, "current", {
@@ -154,7 +160,7 @@ var TimeSelector = /** @class */ (function (_super) {
154
160
  ? cloneDate(this.state.current)
155
161
  : null;
156
162
  },
157
- enumerable: true,
163
+ enumerable: false,
158
164
  configurable: true
159
165
  });
160
166
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,2 @@
1
+ export {};
1
2
  // tslint:enable:max-line-length
@@ -5,6 +5,8 @@ import { canUseDOM } from '@progress/kendo-react-common';
5
5
  */
6
6
  var DOMService = /** @class */ (function () {
7
7
  function DOMService() {
8
+ this.itemHeight = 0;
9
+ this.timeListHeight = 0;
8
10
  this.didCalculate = false;
9
11
  }
10
12
  DOMService.prototype.ensureHeights = function () {
@@ -14,6 +14,9 @@ var inReverseRange = function (value, min, max) { return ((!min && !max) || valu
14
14
  var DayPeriodService = /** @class */ (function () {
15
15
  function DayPeriodService(intl) {
16
16
  this.intl = intl;
17
+ this.min = null;
18
+ this.max = null;
19
+ this.part = null;
17
20
  }
18
21
  /**
19
22
  * @hidden
@@ -42,8 +45,8 @@ var DayPeriodService = /** @class */ (function () {
42
45
  * @hidden
43
46
  */
44
47
  DayPeriodService.prototype.data = function (_) {
45
- var names = this.part.names;
46
- if (!names) {
48
+ var names = this.part && this.part.names;
49
+ if (!names || !this.min) {
47
50
  return [];
48
51
  }
49
52
  var data = [];
@@ -86,7 +89,7 @@ var DayPeriodService = /** @class */ (function () {
86
89
  * @hidden
87
90
  */
88
91
  DayPeriodService.prototype.selectedIndex = function (value) {
89
- if (!this.valueInList(value)) {
92
+ if (!this.valueInList(value) || !this.min) {
90
93
  return -1;
91
94
  }
92
95
  var index = Math.floor(value.getHours() / 12);
@@ -96,6 +99,9 @@ var DayPeriodService = /** @class */ (function () {
96
99
  * @hidden
97
100
  */
98
101
  DayPeriodService.prototype.valueInList = function (value) {
102
+ if (!this.min || !this.max) {
103
+ return false;
104
+ }
99
105
  var reverse = this.min.getHours() !== this.normalizedRange()[0];
100
106
  var isInRange = reverse ? inReverseRange : inRange;
101
107
  return isInRange(value.getHours(), this.min.getHours(), this.max.getHours());
@@ -20,6 +20,10 @@ var HoursService = /** @class */ (function () {
20
20
  this.intl = intl;
21
21
  this.boundRange = false;
22
22
  this.insertUndividedMax = false;
23
+ this.min = null;
24
+ this.max = null;
25
+ this.step = 0;
26
+ this.toListItem = null;
23
27
  }
24
28
  HoursService.prototype.apply = function (value, candidate) {
25
29
  return setHours(value, candidate.getHours());
@@ -44,7 +48,7 @@ var HoursService = /** @class */ (function () {
44
48
  var _this = this;
45
49
  var min = this.range(selectedValue)[0];
46
50
  var getHour = stepper(min, this.step);
47
- var convertToItem = function (idx) { return (_this.toListItem(getHour(idx))); };
51
+ var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getHour(idx))); };
48
52
  var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
49
53
  this.addLast(data);
50
54
  if (selectedValue) {
@@ -53,6 +57,9 @@ var HoursService = /** @class */ (function () {
53
57
  return data;
54
58
  };
55
59
  HoursService.prototype.isRangeChanged = function (min, max) {
60
+ if (!this.min || !this.max) {
61
+ return false;
62
+ }
56
63
  return !isEqual(this.min, min) || !isEqual(this.max, max);
57
64
  };
58
65
  HoursService.prototype.limitRange = function (min, max, value) {
@@ -74,7 +81,7 @@ var HoursService = /** @class */ (function () {
74
81
  return matchMax || !this.isMissing(value);
75
82
  };
76
83
  HoursService.prototype.addLast = function (data, value) {
77
- if (this.insertUndividedMax && this.isLastMissing(value)) {
84
+ if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
78
85
  data.push(this.toListItem(this.lastHour(value)));
79
86
  }
80
87
  return data;
@@ -83,8 +90,10 @@ var HoursService = /** @class */ (function () {
83
90
  if (this.valueInList(value)) {
84
91
  return data;
85
92
  }
86
- var missingItem = this.toListItem(value.getHours());
87
- data.splice(this.selectedIndex(value), 0, missingItem);
93
+ if (this.toListItem) {
94
+ var missingItem = this.toListItem(value.getHours());
95
+ data.splice(this.selectedIndex(value), 0, missingItem);
96
+ }
88
97
  return data;
89
98
  };
90
99
  HoursService.prototype.countFromMin = function (value) {
@@ -98,7 +107,7 @@ var HoursService = /** @class */ (function () {
98
107
  return this.selectedIndex(value) !== this.divideByStep(value);
99
108
  };
100
109
  HoursService.prototype.isLastMissing = function (value) {
101
- return this.isMissing(setHours(this.max, this.lastHour(value)));
110
+ return this.max !== null && this.isMissing(setHours(this.max, this.lastHour(value)));
102
111
  };
103
112
  HoursService.prototype.divideByStep = function (value) {
104
113
  return distanceFromMin(value.getHours(), this.min.getHours()) / this.step;
@@ -18,6 +18,10 @@ var limitUp = limit(MINUTES_IN_HOUR - 1);
18
18
  var MinutesService = /** @class */ (function () {
19
19
  function MinutesService(intl) {
20
20
  this.intl = intl;
21
+ this.toListItem = null;
22
+ this.min = null;
23
+ this.max = null;
24
+ this.step = 0;
21
25
  this.insertUndividedMax = false;
22
26
  }
23
27
  MinutesService.prototype.apply = function (value, candidate) {
@@ -42,7 +46,7 @@ var MinutesService = /** @class */ (function () {
42
46
  var _this = this;
43
47
  var min = this.range(selectedValue)[0];
44
48
  var getMinute = stepper(min, this.step);
45
- var convertToItem = function (idx) { return (_this.toListItem(getMinute(idx))); };
49
+ var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getMinute(idx))); };
46
50
  var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
47
51
  this.addLast(data);
48
52
  if (selectedValue) {
@@ -51,7 +55,7 @@ var MinutesService = /** @class */ (function () {
51
55
  return data;
52
56
  };
53
57
  MinutesService.prototype.isRangeChanged = function (min, max) {
54
- return !isEqual(this.min, min) || !isEqual(this.max, max);
58
+ return (this.min !== null && this.max !== null) && (!isEqual(this.min, min) || !isEqual(this.max, max));
55
59
  };
56
60
  MinutesService.prototype.limitRange = function (min, max, value) {
57
61
  return [limitDown(min, value), limitUp(max, value)];
@@ -72,7 +76,7 @@ var MinutesService = /** @class */ (function () {
72
76
  return matchMax || !this.isMissing(value);
73
77
  };
74
78
  MinutesService.prototype.addLast = function (data, value) {
75
- if (this.insertUndividedMax && this.isLastMissing(value)) {
79
+ if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
76
80
  data.push(this.toListItem(this.lastMinute(value)));
77
81
  }
78
82
  return data;
@@ -81,8 +85,10 @@ var MinutesService = /** @class */ (function () {
81
85
  if (this.valueInList(value)) {
82
86
  return data;
83
87
  }
84
- var missingItem = this.toListItem(value.getMinutes());
85
- data.splice(this.selectedIndex(value), 0, missingItem);
88
+ if (this.toListItem) {
89
+ var missingItem = this.toListItem(value.getMinutes());
90
+ data.splice(this.selectedIndex(value), 0, missingItem);
91
+ }
86
92
  return data;
87
93
  };
88
94
  MinutesService.prototype.countFromMin = function (value) {
@@ -96,7 +102,7 @@ var MinutesService = /** @class */ (function () {
96
102
  return this.selectedIndex(value) !== this.divideByStep(value);
97
103
  };
98
104
  MinutesService.prototype.isLastMissing = function (value) {
99
- return this.isMissing(setMinutes(this.max, this.lastMinute(value)));
105
+ return this.max !== null && this.isMissing(setMinutes(this.max, this.lastMinute(value)));
100
106
  };
101
107
  MinutesService.prototype.divideByStep = function (value) {
102
108
  return distanceFromMin(value.getMinutes(), this.min.getMinutes()) / this.step;
@@ -19,6 +19,10 @@ var limitUp = limit(SECONDS_IN_HOUR - 1);
19
19
  var SecondsService = /** @class */ (function () {
20
20
  function SecondsService(intl) {
21
21
  this.intl = intl;
22
+ this.toListItem = null;
23
+ this.min = null;
24
+ this.max = null;
25
+ this.step = 0;
22
26
  this.insertUndividedMax = false;
23
27
  }
24
28
  SecondsService.prototype.apply = function (value, candidate) {
@@ -43,7 +47,7 @@ var SecondsService = /** @class */ (function () {
43
47
  var _this = this;
44
48
  var min = this.range(selectedValue)[0];
45
49
  var getSecond = stepper(min, this.step);
46
- var convertToItem = function (idx) { return (_this.toListItem(getSecond(idx))); };
50
+ var convertToItem = function (idx) { return (_this.toListItem && _this.toListItem(getSecond(idx))); };
47
51
  var data = range(0, this.countFromMin(selectedValue)).map(convertToItem);
48
52
  this.addLast(data);
49
53
  if (selectedValue) {
@@ -52,7 +56,7 @@ var SecondsService = /** @class */ (function () {
52
56
  return data;
53
57
  };
54
58
  SecondsService.prototype.isRangeChanged = function (min, max) {
55
- return !isEqual(this.min, min) || !isEqual(this.max, max);
59
+ return this.min !== null && this.max !== null && (!isEqual(this.min, min) || !isEqual(this.max, max));
56
60
  };
57
61
  SecondsService.prototype.limitRange = function (min, max, value) {
58
62
  return [limitDown(min, value), limitUp(max, value)];
@@ -76,7 +80,7 @@ var SecondsService = /** @class */ (function () {
76
80
  return distanceFromMin(value.getSeconds(), this.min.getSeconds()) / this.step;
77
81
  };
78
82
  SecondsService.prototype.addLast = function (data, value) {
79
- if (this.insertUndividedMax && this.isLastMissing(value)) {
83
+ if (this.insertUndividedMax && this.isLastMissing(value) && this.toListItem) {
80
84
  data.push(this.toListItem(this.lastSecond(value)));
81
85
  }
82
86
  return data;
@@ -85,8 +89,10 @@ var SecondsService = /** @class */ (function () {
85
89
  if (this.valueInList(value)) {
86
90
  return data;
87
91
  }
88
- var missingItem = this.toListItem(value.getSeconds());
89
- data.splice(this.selectedIndex(value), 0, missingItem);
92
+ if (this.toListItem) {
93
+ var missingItem = this.toListItem(value.getSeconds());
94
+ data.splice(this.selectedIndex(value), 0, missingItem);
95
+ }
90
96
  return data;
91
97
  };
92
98
  SecondsService.prototype.countFromMin = function (value) {
@@ -100,7 +106,7 @@ var SecondsService = /** @class */ (function () {
100
106
  return this.selectedIndex(value) !== this.divideByStep(value);
101
107
  };
102
108
  SecondsService.prototype.isLastMissing = function (value) {
103
- return this.isMissing(setSeconds(this.max, this.lastSecond(value)));
109
+ return this.max !== null && this.isMissing(setSeconds(this.max, this.lastSecond(value)));
104
110
  };
105
111
  SecondsService.prototype.lastSecond = function (value) {
106
112
  return this.range(value)[1];
@@ -41,16 +41,16 @@ export declare const timeInRange: (candidate: Date, min: Date, max: Date) => Dat
41
41
  /**
42
42
  * @hidden
43
43
  */
44
- export declare const isInTimeRange: (candidate: Date, min?: Date, max?: Date) => boolean;
44
+ export declare const isInTimeRange: (candidate: Date | null, min?: Date, max?: Date) => boolean;
45
45
  /**
46
46
  * @hidden
47
47
  */
48
- export declare const isInRange: (candidate: Date, min: Date, max: Date) => boolean;
48
+ export declare const isInRange: (candidate: Date | null, min: Date, max: Date) => boolean;
49
49
  /**
50
50
  * @hidden
51
51
  */
52
- export declare const isSmallerThanMin: (val: Date, min: Date) => boolean;
52
+ export declare const isSmallerThanMin: (val: Date | null, min: Date | null) => boolean;
53
53
  /**
54
54
  * @hidden
55
55
  */
56
- export declare const isBiggerThanMax: (val: Date, max: Date) => boolean;
56
+ export declare const isBiggerThanMax: (val: Date | null, max: Date | null) => boolean;
@@ -51,7 +51,7 @@ export declare const isInRange: (candidate: Date, min: Date, max: Date) => boole
51
51
  /**
52
52
  * @hidden
53
53
  */
54
- export declare const isInDateRange: (candidate: Date, min: Date, max: Date) => boolean;
54
+ export declare const isInDateRange: (candidate: Date | null, min: Date, max: Date) => boolean;
55
55
  /**
56
56
  * @hidden
57
57
  */