@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
@@ -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 __());
@@ -133,7 +135,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
133
135
  get: function () {
134
136
  return this._element;
135
137
  },
136
- enumerable: true,
138
+ enumerable: false,
137
139
  configurable: true
138
140
  });
139
141
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "dateInput", {
@@ -143,7 +145,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
143
145
  get: function () {
144
146
  return this._dateInput.current;
145
147
  },
146
- enumerable: true,
148
+ enumerable: false,
147
149
  configurable: true
148
150
  });
149
151
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "value", {
@@ -158,7 +160,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
158
160
  : this.state.value;
159
161
  return (value !== null) ? cloneDate(value) : null;
160
162
  },
161
- enumerable: true,
163
+ enumerable: false,
162
164
  configurable: true
163
165
  });
164
166
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "show", {
@@ -172,7 +174,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
172
174
  ? this.props.show
173
175
  : this.state.show;
174
176
  },
175
- enumerable: true,
177
+ enumerable: false,
176
178
  configurable: true
177
179
  });
178
180
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "name", {
@@ -182,7 +184,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
182
184
  get: function () {
183
185
  return this.props.name;
184
186
  },
185
- enumerable: true,
187
+ enumerable: false,
186
188
  configurable: true
187
189
  });
188
190
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "min", {
@@ -191,7 +193,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
191
193
  ? this.props.min
192
194
  : DateTimePickerWithoutContext.defaultProps.min;
193
195
  },
194
- enumerable: true,
196
+ enumerable: false,
195
197
  configurable: true
196
198
  });
197
199
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "max", {
@@ -200,7 +202,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
200
202
  ? this.props.max
201
203
  : DateTimePickerWithoutContext.defaultProps.max;
202
204
  },
203
- enumerable: true,
205
+ enumerable: false,
204
206
  configurable: true
205
207
  });
206
208
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "validity", {
@@ -221,7 +223,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
221
223
  valueMissing: this.value === null
222
224
  };
223
225
  },
224
- enumerable: true,
226
+ enumerable: false,
225
227
  configurable: true
226
228
  });
227
229
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "validityStyles", {
@@ -233,7 +235,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
233
235
  ? this.props.validityStyles
234
236
  : DateTimePickerWithoutContext.defaultProps.validityStyles;
235
237
  },
236
- enumerable: true,
238
+ enumerable: false,
237
239
  configurable: true
238
240
  });
239
241
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "required", {
@@ -245,7 +247,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
245
247
  ? this.props.required
246
248
  : DateTimePickerWithoutContext.defaultProps.required;
247
249
  },
248
- enumerable: true,
250
+ enumerable: false,
249
251
  configurable: true
250
252
  });
251
253
  Object.defineProperty(DateTimePickerWithoutContext.prototype, "dateInputComp", {
@@ -255,7 +257,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
255
257
  get: function () {
256
258
  return this.props.dateInput || DateTimePickerWithoutContext.defaultProps.dateInput;
257
259
  },
258
- enumerable: true,
260
+ enumerable: false,
259
261
  configurable: true
260
262
  });
261
263
  /**
@@ -297,8 +299,21 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
297
299
  var _a = this.props, _b = _a.size, size = _b === void 0 ? DateTimePickerWithoutContext.defaultProps.size : _b, _c = _a.rounded, rounded = _c === void 0 ? DateTimePickerWithoutContext.defaultProps.rounded : _c, _d = _a.fillMode, fillMode = _d === void 0 ? DateTimePickerWithoutContext.defaultProps.fillMode : _d, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, format = _a.format, formatPlaceholder = _a.formatPlaceholder, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, className = _a.className, width = _a.width, name = _a.name, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, cancelButton = _a.cancelButton, minTime = _a.minTime, maxTime = _a.maxTime, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, _e = _a.popup, PopupComponent = _e === void 0 ? Popup : _e, calendar = _a.calendar;
298
300
  var isValid = !this.validityStyles || this.validity.valid;
299
301
  var dataInputProps = {
300
- id: id, ariaLabelledBy: ariaLabelledBy, ariaDescribedBy: ariaDescribedBy, format: format, formatPlaceholder: formatPlaceholder, disabled: disabled,
301
- title: title, validityStyles: validityStyles, validationMessage: validationMessage, required: required, min: min, max: max, minTime: minTime, maxTime: maxTime, name: name,
302
+ id: id,
303
+ ariaLabelledBy: ariaLabelledBy,
304
+ ariaDescribedBy: ariaDescribedBy,
305
+ format: format,
306
+ formatPlaceholder: formatPlaceholder,
307
+ disabled: disabled,
308
+ title: title,
309
+ validityStyles: validityStyles,
310
+ validationMessage: validationMessage,
311
+ required: required,
312
+ min: min,
313
+ max: max,
314
+ minTime: minTime,
315
+ maxTime: maxTime,
316
+ name: name,
302
317
  tabIndex: !this.show ? tabIndex : -1,
303
318
  valid: this.validity.valid,
304
319
  value: this.value,
@@ -313,14 +328,14 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
313
328
  rounded: null
314
329
  };
315
330
  var dateTimePicker = (React.createElement(AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncFocus: this.props.onFocus, onSyncBlur: this.props.onBlur }, function (_a) {
316
- var onFocus = _a.onFocus, onBlur = _a.onBlur;
317
331
  var _b;
332
+ var onFocus = _a.onFocus, onBlur = _a.onBlur;
318
333
  return (React.createElement("div", { ref: function (div) {
319
334
  _this._element = div;
320
335
  }, className: classNames('k-input', 'k-datetimepicker', (_b = {},
321
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
322
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
323
- _b["k-input-" + fillMode] = fillMode,
336
+ _b["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
337
+ _b["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
338
+ _b["k-input-".concat(fillMode)] = fillMode,
324
339
  _b['k-invalid'] = !isValid,
325
340
  _b['k-required'] = _this.required,
326
341
  _b['k-disabled'] = _this.props.disabled,
@@ -60,21 +60,21 @@ export declare class DateTimeSelector extends React.Component<DateTimeSelectorPr
60
60
  private _acceptButton;
61
61
  private _calendarWrap;
62
62
  private shouldFocusPart;
63
- readonly calendar: Calendar | null;
64
- readonly timePart: TimePart | null;
65
- protected readonly hasDateValue: boolean;
63
+ get calendar(): Calendar | null;
64
+ get timePart(): TimePart | null;
65
+ protected get hasDateValue(): boolean;
66
66
  constructor(props: DateTimeSelectorProps);
67
67
  componentDidUpdate(): void;
68
68
  render(): JSX.Element;
69
69
  focus: (args?: any) => void;
70
70
  private calendarElement;
71
- protected readonly minTime: Date | null;
72
- protected readonly maxTime: Date | null;
71
+ protected get minTime(): Date | null;
72
+ protected get maxTime(): Date | null;
73
73
  protected normalizeRange(candidate: Date, value: Date | null): Date | null;
74
- protected hasActiveButton(): boolean;
74
+ protected hasActiveButton(): boolean | null;
75
75
  protected mergeTime(current: Date | null, candidate: Date | null): Date | null;
76
76
  protected mergeDate(candidate: Date | null, value: Date): Date | null;
77
- protected move: (direction: "left" | "right") => void;
77
+ protected move: (direction: 'left' | 'right') => void;
78
78
  private handleReject;
79
79
  private handleAccept;
80
80
  private handleNowClick;
@@ -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 __());
@@ -40,7 +42,12 @@ var DateTimeSelector = /** @class */ (function (_super) {
40
42
  __extends(DateTimeSelector, _super);
41
43
  function DateTimeSelector(props) {
42
44
  var _this = _super.call(this, props) || this;
45
+ _this._calendar = null;
46
+ _this._timePart = null;
47
+ _this._cancelButton = null;
48
+ _this._acceptButton = null;
43
49
  _this._calendarWrap = null;
50
+ _this.shouldFocusPart = false;
44
51
  _this.focus = function (args) {
45
52
  // Async to avoid stealing the focus from the DateInput on close
46
53
  Promise.resolve().then(function () {
@@ -151,21 +158,21 @@ var DateTimeSelector = /** @class */ (function (_super) {
151
158
  get: function () {
152
159
  return this._calendar;
153
160
  },
154
- enumerable: true,
161
+ enumerable: false,
155
162
  configurable: true
156
163
  });
157
164
  Object.defineProperty(DateTimeSelector.prototype, "timePart", {
158
165
  get: function () {
159
166
  return this._timePart;
160
167
  },
161
- enumerable: true,
168
+ enumerable: false,
162
169
  configurable: true
163
170
  });
164
171
  Object.defineProperty(DateTimeSelector.prototype, "hasDateValue", {
165
172
  get: function () {
166
173
  return this.state.dateValue !== null;
167
174
  },
168
- enumerable: true,
175
+ enumerable: false,
169
176
  configurable: true
170
177
  });
171
178
  DateTimeSelector.prototype.componentDidUpdate = function () {
@@ -188,7 +195,10 @@ var DateTimeSelector = /** @class */ (function (_super) {
188
195
  var cancelMessage = localizationService.toLanguageString(cancel, messages[cancel]);
189
196
  var setMessage = localizationService.toLanguageString(set, messages[set]);
190
197
  var calendarProps = {
191
- min: min, max: max, weekNumber: weekNumber, focusedDate: focusedDate,
198
+ min: min,
199
+ max: max,
200
+ weekNumber: weekNumber,
201
+ focusedDate: focusedDate,
192
202
  disabled: disabled || this.state.tab !== 'date',
193
203
  value: this.state.dateValue,
194
204
  onChange: this.handleCalendarValueChange,
@@ -214,7 +224,7 @@ var DateTimeSelector = /** @class */ (function (_super) {
214
224
  ? this.props.minTime
215
225
  : this.normalizeRange(this.props.min, this.state.dateValue);
216
226
  },
217
- enumerable: true,
227
+ enumerable: false,
218
228
  configurable: true
219
229
  });
220
230
  Object.defineProperty(DateTimeSelector.prototype, "maxTime", {
@@ -223,7 +233,7 @@ var DateTimeSelector = /** @class */ (function (_super) {
223
233
  ? this.props.maxTime
224
234
  : this.normalizeRange(this.props.max, this.state.dateValue);
225
235
  },
226
- enumerable: true,
236
+ enumerable: false,
227
237
  configurable: true
228
238
  });
229
239
  DateTimeSelector.prototype.normalizeRange = function (candidate, value) {
@@ -0,0 +1 @@
1
+ export {};
@@ -11,7 +11,7 @@ export declare type PickerFloatingLabelProps = FloatingLabelProps & {
11
11
  /**
12
12
  * @hidden
13
13
  */
14
- export declare const usePickerFloatingLabel: (dateInput: React.RefObject<import("../dateinput/DateInput").DateInputHandle>) => {
14
+ export declare const usePickerFloatingLabel: (dateInput: React.RefObject<DateInput>) => {
15
15
  editorValue: boolean;
16
16
  };
17
17
  /**
@@ -86,25 +86,25 @@ export declare const dateTimePickerSet = "datetimepicker.set";
86
86
  * @hidden
87
87
  */
88
88
  export declare const messages: {
89
- [today]: string;
90
- [now]: string;
91
- [timePickerSet]: string;
92
- [timePickerCancel]: string;
93
- [date]: string;
94
- [time]: string;
95
- [dateTimePickerCancel]: string;
96
- [dateTimePickerSet]: string;
97
- [start]: string;
98
- [end]: string;
99
- [separator]: string;
100
- [selectNow]: string;
101
- [toggleTimeSelector]: string;
102
- [toggleClock]: string;
103
- [increaseValue]: string;
104
- [decreaseValue]: string;
105
- [toggleCalendar]: string;
106
- [prevView]: string;
107
- [nextView]: string;
108
- [swapStartEnd]: string;
109
- [toggleDateTimeSelector]: string;
89
+ "calendar.today": string;
90
+ "timepicker.now": string;
91
+ "timepicker.set": string;
92
+ "timepicker.cancel": string;
93
+ "datetimepicker.date": string;
94
+ "datetimepicker.time": string;
95
+ "datetimepicker.cancel": string;
96
+ "datetimepicker.set": string;
97
+ "daterangepicker.start": string;
98
+ "daterangepicker.end": string;
99
+ "daterangepicker.separator": string;
100
+ "timepicker.selectNow": string;
101
+ "timepicker.toggleTimeSelector": string;
102
+ "timepicker.toggleClock": string;
103
+ "dateinput.increment": string;
104
+ "dateinput.decrement": string;
105
+ "datepicker.toggleCalendar": string;
106
+ "multiviewcalendar.prevView": string;
107
+ "multiviewcalendar.nextView": string;
108
+ "daterangepicker.swapStartEnd": string;
109
+ "datetimepicker.toggleDateTimeSelector": string;
110
110
  };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-dateinputs',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1653456690,
8
+ publishDate: 1654690230,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -29,8 +29,8 @@ export declare class TimeList extends React.Component<TimeListProps, {}> {
29
29
  id: PropTypes.Requireable<number>;
30
30
  max: PropTypes.Requireable<Date>;
31
31
  min: PropTypes.Requireable<Date>;
32
- part: (props: TimeListProps, propName: string, componentName: string) => any;
33
- step: (props: TimeListProps, propName: string, componentName: string) => any;
32
+ part: (props: TimeListProps, propName: string, componentName: string) => null;
33
+ step: (props: TimeListProps, propName: string, componentName: string) => null;
34
34
  value: PropTypes.Requireable<Date>;
35
35
  smoothScroll: PropTypes.Requireable<boolean>;
36
36
  show: PropTypes.Requireable<boolean>;
@@ -55,11 +55,11 @@ export declare class TimeList extends React.Component<TimeListProps, {}> {
55
55
  private bottomThreshold;
56
56
  private animateToIndex;
57
57
  constructor(props: TimeListProps);
58
- readonly element: HTMLDivElement | null;
59
- protected readonly animate: boolean;
60
- private readonly min;
61
- private readonly max;
62
- private readonly step;
58
+ get element(): HTMLDivElement | null;
59
+ protected get animate(): boolean;
60
+ private get min();
61
+ private get max();
62
+ private get step();
63
63
  /**
64
64
  * @hidden
65
65
  */
@@ -71,7 +71,7 @@ export declare class TimeList extends React.Component<TimeListProps, {}> {
71
71
  /**
72
72
  * @hidden
73
73
  */
74
- render(): JSX.Element;
74
+ render(): JSX.Element | undefined;
75
75
  focus: (args?: any) => void;
76
76
  protected itemOffset: (scrollTop: number) => number;
77
77
  protected calculateHeights: () => 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 __());
@@ -43,6 +45,16 @@ var TimeList = /** @class */ (function (_super) {
43
45
  __extends(TimeList, _super);
44
46
  function TimeList(props) {
45
47
  var _this = _super.call(this, props) || this;
48
+ _this.intl = null;
49
+ _this._element = null;
50
+ _this.service = null;
51
+ _this.virtualization = null;
52
+ _this.topOffset = 0;
53
+ _this.bottomOffset = 0;
54
+ _this.itemHeight = 0;
55
+ _this.listHeight = 0;
56
+ _this.topThreshold = 0;
57
+ _this.bottomThreshold = 0;
46
58
  _this.animateToIndex = false;
47
59
  _this.focus = function (args) {
48
60
  Promise.resolve().then(function () {
@@ -53,7 +65,7 @@ var TimeList = /** @class */ (function (_super) {
53
65
  });
54
66
  };
55
67
  _this.itemOffset = function (scrollTop) {
56
- if (!_this.virtualization) {
68
+ if (!_this.virtualization || !_this.service) {
57
69
  return -1;
58
70
  }
59
71
  var valueIndex = _this.service.selectedIndex(_this.props.value);
@@ -80,8 +92,10 @@ var TimeList = /** @class */ (function (_super) {
80
92
  };
81
93
  _this.configureServices = function (_a) {
82
94
  var _b = _a === void 0 ? _this.props : _a, min = _b.min, max = _b.max, value = _b.value;
83
- var _c = _this.service.limitRange(min || _this.min, max || _this.max, value || _this.props.value), newMin = _c[0], newMax = _c[1];
84
- _this.service.configure(_this.serviceSettings({ min: newMin, max: newMax }));
95
+ if (_this.service) {
96
+ var _c = _this.service.limitRange(min || _this.min, max || _this.max, value || _this.props.value), newMin = _c[0], newMax = _c[1];
97
+ _this.service.configure(_this.serviceSettings({ min: newMin, max: newMax }));
98
+ }
85
99
  };
86
100
  _this.serviceSettings = function (settings) {
87
101
  var defaults = {
@@ -98,7 +112,7 @@ var TimeList = /** @class */ (function (_super) {
98
112
  };
99
113
  _this.handleScrollAction = function (_a) {
100
114
  var target = _a.target, animationInProgress = _a.animationInProgress;
101
- if (!_this.virtualization) {
115
+ if (!_this.virtualization || !_this.service) {
102
116
  return;
103
117
  }
104
118
  if (target && !animationInProgress) {
@@ -129,6 +143,9 @@ var TimeList = /** @class */ (function (_super) {
129
143
  }
130
144
  };
131
145
  _this.handleKeyDown = function (event) {
146
+ if (!_this.service) {
147
+ return;
148
+ }
132
149
  var keyCode = event.keyCode;
133
150
  if (keyCode === Keys.down
134
151
  || keyCode === Keys.up
@@ -143,6 +160,9 @@ var TimeList = /** @class */ (function (_super) {
143
160
  }
144
161
  };
145
162
  _this.handleChange = function (dataItem) {
163
+ if (!_this.service) {
164
+ return;
165
+ }
146
166
  var candidate = _this.service.apply(_this.props.value, dataItem.value);
147
167
  if (_this.props.value.getTime() === candidate.getTime()) {
148
168
  return;
@@ -162,28 +182,28 @@ var TimeList = /** @class */ (function (_super) {
162
182
  get: function () {
163
183
  return this._element;
164
184
  },
165
- enumerable: true,
185
+ enumerable: false,
166
186
  configurable: true
167
187
  });
168
188
  Object.defineProperty(TimeList.prototype, "animate", {
169
189
  get: function () {
170
190
  return Boolean(this.props.smoothScroll && this.animateToIndex);
171
191
  },
172
- enumerable: true,
192
+ enumerable: false,
173
193
  configurable: true
174
194
  });
175
195
  Object.defineProperty(TimeList.prototype, "min", {
176
196
  get: function () {
177
197
  return this.props.min || TimeList.defaultProps.min;
178
198
  },
179
- enumerable: true,
199
+ enumerable: false,
180
200
  configurable: true
181
201
  });
182
202
  Object.defineProperty(TimeList.prototype, "max", {
183
203
  get: function () {
184
204
  return this.props.max || TimeList.defaultProps.max;
185
205
  },
186
- enumerable: true,
206
+ enumerable: false,
187
207
  configurable: true
188
208
  });
189
209
  Object.defineProperty(TimeList.prototype, "step", {
@@ -192,7 +212,7 @@ var TimeList = /** @class */ (function (_super) {
192
212
  ? Math.floor(this.props.step)
193
213
  : TimeList.defaultProps.step;
194
214
  },
195
- enumerable: true,
215
+ enumerable: false,
196
216
  configurable: true
197
217
  });
198
218
  /**
@@ -213,7 +233,7 @@ var TimeList = /** @class */ (function (_super) {
213
233
  * @hidden
214
234
  */
215
235
  TimeList.prototype.componentDidUpdate = function () {
216
- if (!this.virtualization) {
236
+ if (!this.virtualization || !this.service) {
217
237
  return;
218
238
  }
219
239
  var index = this.service.selectedIndex(this.props.value);
@@ -250,14 +270,14 @@ var TimeList = /** @class */ (function (_super) {
250
270
  part: function (props, propName, componentName) {
251
271
  var prop = props[propName];
252
272
  if (!prop || !services[prop.type]) {
253
- throw new Error("\n Invalid prop '" + propName + "' supplied to " + componentName + ".\n Supported part types are hour|minute|second|dayperiod.\n ");
273
+ throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n Supported part types are hour|minute|second|dayperiod.\n "));
254
274
  }
255
275
  return null;
256
276
  },
257
277
  step: function (props, propName, componentName) {
258
278
  var prop = props[propName];
259
279
  if (prop !== undefined && prop <= 0) {
260
- throw new Error("\n Invalid prop '" + propName + "' supplied to " + componentName + ".\n " + propName + " cannot be less than 1.\n ");
280
+ throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n ").concat(propName, " cannot be less than 1.\n "));
261
281
  }
262
282
  return null;
263
283
  },
@@ -82,7 +82,7 @@ export declare class TimePart extends React.Component<TimePartProps, TimePartSta
82
82
  show: PropTypes.Requireable<boolean>;
83
83
  };
84
84
  static defaultProps: {
85
- value: any;
85
+ value: null;
86
86
  disabled: boolean;
87
87
  nowButton: boolean;
88
88
  cancelButton: boolean;
@@ -103,13 +103,13 @@ export declare class TimePart extends React.Component<TimePartProps, TimePartSta
103
103
  /**
104
104
  * @hidden
105
105
  */
106
- readonly element: HTMLSpanElement | null;
107
- readonly value: Date;
108
- protected readonly intl: IntlService;
109
- private readonly min;
110
- private readonly max;
111
- private readonly steps;
112
- protected readonly boundRange: boolean;
106
+ get element(): HTMLSpanElement | null;
107
+ get value(): Date;
108
+ protected get intl(): IntlService;
109
+ private get min();
110
+ private get max();
111
+ private get steps();
112
+ protected get boundRange(): boolean;
113
113
  /**
114
114
  * @hidden
115
115
  */
@@ -123,10 +123,10 @@ export declare class TimePart extends React.Component<TimePartProps, TimePartSta
123
123
  protected timeFormatReducer: (acc: string, current: DateFormatPart) => string;
124
124
  protected timeFormatFilter: (part: DateFormatPart, index: number, all: DateFormatPart[]) => boolean;
125
125
  protected nextTick(f: () => any): void;
126
- protected hasActiveButton(): boolean;
126
+ protected hasActiveButton(): boolean | null;
127
127
  protected focusList: (dir: Direction) => void;
128
- protected listReducer: (state: any, list: any, idx: any, all: any) => any;
129
- protected showNowButton: () => boolean;
128
+ protected listReducer: (state: any, list: any, idx: number, all: any) => any;
129
+ protected showNowButton: () => boolean | undefined;
130
130
  protected hasSteps(): boolean;
131
131
  private handleKeyDown;
132
132
  private handleListBlur;
@@ -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 __());
@@ -33,7 +35,7 @@ import { MIDNIGHT_DATE, MIN_TIME, MAX_TIME } from '../utils';
33
35
  import { TIME_PART } from './models/TimePart';
34
36
  import { generateSnappers, getNow, isInTimeRange, snapTime, timeInRange } from './utils';
35
37
  import { Button } from '@progress/kendo-react-buttons';
36
- var formatRegExp = new RegExp(TIME_PART.hour + "|" + TIME_PART.minute + "|" + TIME_PART.second + "|" + TIME_PART.dayperiod + "|literal");
38
+ var formatRegExp = new RegExp("".concat(TIME_PART.hour, "|").concat(TIME_PART.minute, "|").concat(TIME_PART.second, "|").concat(TIME_PART.dayperiod, "|literal"));
37
39
  /**
38
40
  * @hidden
39
41
  */
@@ -49,6 +51,9 @@ var TimePart = /** @class */ (function (_super) {
49
51
  __extends(TimePart, _super);
50
52
  function TimePart(props) {
51
53
  var _this = _super.call(this, props) || this;
54
+ _this._element = null;
55
+ _this._nowButton = null;
56
+ _this.dateFormatParts = [];
52
57
  _this.timeLists = [];
53
58
  _this.focus = function (args) {
54
59
  Promise.resolve().then(function () {
@@ -138,42 +143,42 @@ var TimePart = /** @class */ (function (_super) {
138
143
  get: function () {
139
144
  return this._element;
140
145
  },
141
- enumerable: true,
146
+ enumerable: false,
142
147
  configurable: true
143
148
  });
144
149
  Object.defineProperty(TimePart.prototype, "value", {
145
150
  get: function () {
146
151
  return timeInRange(this.snapTime(cloneDate(this.props.value || MIDNIGHT_DATE)), this.min, this.max);
147
152
  },
148
- enumerable: true,
153
+ enumerable: false,
149
154
  configurable: true
150
155
  });
151
156
  Object.defineProperty(TimePart.prototype, "intl", {
152
157
  get: function () {
153
158
  return provideIntlService(this);
154
159
  },
155
- enumerable: true,
160
+ enumerable: false,
156
161
  configurable: true
157
162
  });
158
163
  Object.defineProperty(TimePart.prototype, "min", {
159
164
  get: function () {
160
165
  return this.snapTime(this.props.min || TimePart.defaultProps.min);
161
166
  },
162
- enumerable: true,
167
+ enumerable: false,
163
168
  configurable: true
164
169
  });
165
170
  Object.defineProperty(TimePart.prototype, "max", {
166
171
  get: function () {
167
172
  return this.snapTime(this.props.max || TimePart.defaultProps.max);
168
173
  },
169
- enumerable: true,
174
+ enumerable: false,
170
175
  configurable: true
171
176
  });
172
177
  Object.defineProperty(TimePart.prototype, "steps", {
173
178
  get: function () {
174
179
  return this.props.steps || TimePart.defaultProps.steps;
175
180
  },
176
- enumerable: true,
181
+ enumerable: false,
177
182
  configurable: true
178
183
  });
179
184
  Object.defineProperty(TimePart.prototype, "boundRange", {
@@ -182,7 +187,7 @@ var TimePart = /** @class */ (function (_super) {
182
187
  ? this.props.boundRange
183
188
  : TimePart.defaultProps.boundRange;
184
189
  },
185
- enumerable: true,
190
+ enumerable: false,
186
191
  configurable: true
187
192
  });
188
193
  /**