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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  2. package/dist/es/calendar/components/Calendar.d.ts +4 -4
  3. package/dist/es/calendar/components/Calendar.js +17 -5
  4. package/dist/es/calendar/components/Header.d.ts +1 -0
  5. package/dist/es/calendar/components/Header.js +1 -1
  6. package/dist/es/calendar/components/HorizontalViewList.js +1 -0
  7. package/dist/es/calendar/components/MultiViewCalendar.d.ts +3 -3
  8. package/dist/es/calendar/components/MultiViewCalendar.js +12 -5
  9. package/dist/es/calendar/components/Navigation.js +9 -4
  10. package/dist/es/calendar/components/TodayCommand.js +4 -2
  11. package/dist/es/calendar/components/View.d.ts +4 -4
  12. package/dist/es/calendar/components/View.js +7 -5
  13. package/dist/es/calendar/components/ViewList.js +10 -2
  14. package/dist/es/calendar/services/BusViewService.js +1 -1
  15. package/dist/es/calendar/services/CenturyViewService.js +2 -2
  16. package/dist/es/calendar/services/DOMService.js +24 -6
  17. package/dist/es/calendar/services/DecadeViewService.js +2 -2
  18. package/dist/es/calendar/services/MonthViewService.js +2 -2
  19. package/dist/es/calendar/services/NavigationService.js +1 -1
  20. package/dist/es/calendar/services/ScrollSyncService.js +5 -1
  21. package/dist/es/calendar/services/YearViewService.js +2 -2
  22. package/dist/es/dateinput/DateInput.d.ts +11 -7
  23. package/dist/es/dateinput/DateInput.js +14 -8
  24. package/dist/es/dateinput/models/mask.js +1 -0
  25. package/dist/es/datepicker/DatePicker.d.ts +8 -8
  26. package/dist/es/datepicker/DatePicker.js +4 -3
  27. package/dist/es/daterangepicker/DateRangePicker.d.ts +3 -3
  28. package/dist/es/datetimepicker/DateTimePicker.d.ts +7 -7
  29. package/dist/es/datetimepicker/DateTimePicker.js +3 -3
  30. package/dist/es/datetimepicker/DateTimeSelector.d.ts +1 -1
  31. package/dist/es/datetimepicker/DateTimeSelector.js +5 -0
  32. package/dist/es/package-metadata.js +1 -1
  33. package/dist/es/timepicker/TimeList.d.ts +3 -3
  34. package/dist/es/timepicker/TimeList.js +25 -7
  35. package/dist/es/timepicker/TimePart.d.ts +3 -3
  36. package/dist/es/timepicker/TimePart.js +4 -1
  37. package/dist/es/timepicker/TimePicker.d.ts +7 -7
  38. package/dist/es/timepicker/TimePicker.js +4 -3
  39. package/dist/es/timepicker/TimeSelector.d.ts +2 -2
  40. package/dist/es/timepicker/TimeSelector.js +4 -0
  41. package/dist/es/timepicker/services/DOMService.js +2 -0
  42. package/dist/es/timepicker/services/DayPeriodService.js +9 -3
  43. package/dist/es/timepicker/services/HoursService.js +14 -5
  44. package/dist/es/timepicker/services/MinutesService.js +12 -6
  45. package/dist/es/timepicker/services/SecondsService.js +12 -6
  46. package/dist/es/utils.js +9 -5
  47. package/dist/es/virtualization/Virtualization.d.ts +1 -0
  48. package/dist/es/virtualization/Virtualization.js +13 -5
  49. package/dist/es/virtualization/services/RowHeightService.js +9 -5
  50. package/dist/es/virtualization/services/ScrollerService.js +9 -3
  51. package/dist/npm/calendar/components/Calendar.d.ts +4 -4
  52. package/dist/npm/calendar/components/Calendar.js +43 -31
  53. package/dist/npm/calendar/components/CalendarCell.js +1 -1
  54. package/dist/npm/calendar/components/CalendarNavigationItem.js +1 -1
  55. package/dist/npm/calendar/components/CalendarWeekCell.js +1 -1
  56. package/dist/npm/calendar/components/Header.d.ts +1 -0
  57. package/dist/npm/calendar/components/Header.js +3 -3
  58. package/dist/npm/calendar/components/HorizontalViewList.js +3 -2
  59. package/dist/npm/calendar/components/MultiViewCalendar.d.ts +3 -3
  60. package/dist/npm/calendar/components/MultiViewCalendar.js +49 -42
  61. package/dist/npm/calendar/components/Navigation.js +13 -8
  62. package/dist/npm/calendar/components/TodayCommand.js +9 -7
  63. package/dist/npm/calendar/components/View.d.ts +4 -4
  64. package/dist/npm/calendar/components/View.js +16 -14
  65. package/dist/npm/calendar/components/ViewList.js +19 -11
  66. package/dist/npm/calendar/services/BusViewService.js +1 -1
  67. package/dist/npm/calendar/services/CenturyViewService.js +38 -38
  68. package/dist/npm/calendar/services/DOMService.js +33 -15
  69. package/dist/npm/calendar/services/DecadeViewService.js +32 -32
  70. package/dist/npm/calendar/services/MonthViewService.js +36 -36
  71. package/dist/npm/calendar/services/NavigationService.js +1 -1
  72. package/dist/npm/calendar/services/ScrollSyncService.js +5 -1
  73. package/dist/npm/calendar/services/WeekNamesService.js +1 -1
  74. package/dist/npm/calendar/services/YearViewService.js +33 -33
  75. package/dist/npm/common/PickerWrap.js +1 -1
  76. package/dist/npm/dateinput/DateInput.d.ts +11 -7
  77. package/dist/npm/dateinput/DateInput.js +32 -26
  78. package/dist/npm/dateinput/models/kendo-date.js +11 -11
  79. package/dist/npm/dateinput/models/mask.js +1 -0
  80. package/dist/npm/datepicker/DatePicker.d.ts +8 -8
  81. package/dist/npm/datepicker/DatePicker.js +17 -16
  82. package/dist/npm/daterangepicker/DateRangePicker.d.ts +3 -3
  83. package/dist/npm/daterangepicker/DateRangePicker.js +17 -17
  84. package/dist/npm/datetimepicker/DateTimePicker.d.ts +7 -7
  85. package/dist/npm/datetimepicker/DateTimePicker.js +15 -15
  86. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +1 -1
  87. package/dist/npm/datetimepicker/DateTimeSelector.js +13 -8
  88. package/dist/npm/hooks/usePickerFloatingLabel.js +1 -1
  89. package/dist/npm/package-metadata.js +1 -1
  90. package/dist/npm/timepicker/TimeList.d.ts +3 -3
  91. package/dist/npm/timepicker/TimeList.js +29 -11
  92. package/dist/npm/timepicker/TimePart.d.ts +3 -3
  93. package/dist/npm/timepicker/TimePart.js +14 -11
  94. package/dist/npm/timepicker/TimePicker.d.ts +7 -7
  95. package/dist/npm/timepicker/TimePicker.js +19 -18
  96. package/dist/npm/timepicker/TimeSelector.d.ts +2 -2
  97. package/dist/npm/timepicker/TimeSelector.js +14 -10
  98. package/dist/npm/timepicker/services/DOMService.js +6 -4
  99. package/dist/npm/timepicker/services/DayPeriodService.js +10 -4
  100. package/dist/npm/timepicker/services/HoursService.js +20 -11
  101. package/dist/npm/timepicker/services/MinutesService.js +16 -10
  102. package/dist/npm/timepicker/services/SecondsService.js +16 -10
  103. package/dist/npm/timepicker/utils.js +11 -11
  104. package/dist/npm/utils.js +16 -12
  105. package/dist/npm/virtualization/Virtualization.d.ts +1 -0
  106. package/dist/npm/virtualization/Virtualization.js +15 -7
  107. package/dist/npm/virtualization/services/RowHeightService.js +9 -5
  108. package/dist/npm/virtualization/services/ScrollerService.js +9 -3
  109. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  110. package/package.json +13 -13
@@ -24,10 +24,14 @@ var __assign = (this && this.__assign) || function () {
24
24
  };
25
25
  return __assign.apply(this, arguments);
26
26
  };
27
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
28
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
29
- to[j] = from[i];
30
- return to;
27
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
28
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
29
+ if (ar || !(i in from)) {
30
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
31
+ ar[i] = from[i];
32
+ }
33
+ }
34
+ return to.concat(ar || Array.prototype.slice.call(from));
31
35
  };
32
36
  import * as React from 'react';
33
37
  import * as PropTypes from 'prop-types';
@@ -52,10 +56,12 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
52
56
  function DateInputWithoutContext(props) {
53
57
  var _this = _super.call(this, props) || this;
54
58
  _this.kendoDate = null;
59
+ _this.currentFormat = '';
55
60
  _this.paste = false;
56
61
  _this._element = null;
57
62
  _this._wrapper = null;
58
63
  _this._inputId = guid();
64
+ _this._lastSelectedSymbol = '';
59
65
  /**
60
66
  * @hidden
61
67
  */
@@ -260,7 +266,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
260
266
  if (this.value !== null) {
261
267
  ariaProps['aria-valuenow'] = this.value.getTime();
262
268
  }
263
- var wrapperClassesInstance = __spreadArray([], wrapperClasses);
269
+ var wrapperClassesInstance = __spreadArray([], wrapperClasses, true);
264
270
  if (this.props.className) {
265
271
  wrapperClassesInstance.push(this.props.className);
266
272
  }
@@ -270,9 +276,9 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
270
276
  return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
271
277
  ? { width: _this.props.width }
272
278
  : undefined, dir: _this.props.dir, className: classNames('k-dateinput', 'k-input', (_b = {},
273
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
274
- _b["k-input-" + fillMode] = fillMode,
275
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
279
+ _b["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
280
+ _b["k-input-".concat(fillMode)] = fillMode,
281
+ _b["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
276
282
  _b['k-invalid'] = !isValid,
277
283
  _b['k-required'] = _this.required,
278
284
  _b['k-disabled'] = _this.props.disabled,
@@ -4,6 +4,7 @@
4
4
  var Mask = /** @class */ (function () {
5
5
  function Mask() {
6
6
  this.symbols = '';
7
+ this.partMap = [];
7
8
  }
8
9
  return Mask;
9
10
  }());
@@ -143,16 +143,16 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
143
143
  required: PropTypes.Requireable<boolean>;
144
144
  validate: PropTypes.Requireable<boolean>;
145
145
  valid: PropTypes.Requireable<boolean>;
146
- size: PropTypes.Requireable<"small" | "medium" | "large">;
147
- rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
148
- fillMode: PropTypes.Requireable<"flat" | "solid" | "outline">;
146
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
147
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
148
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
149
149
  };
150
150
  /**
151
151
  * @hidden
152
152
  */
153
153
  static defaultProps: {
154
154
  defaultShow: boolean;
155
- defaultValue: any;
155
+ defaultValue: null;
156
156
  dateInput: React.ComponentType<DateInputProps<any>>;
157
157
  calendar: React.ComponentType<CalendarProps<any>>;
158
158
  toggleButton: React.ComponentType<ToggleButtonProps>;
@@ -167,9 +167,9 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
167
167
  weekNumber: boolean;
168
168
  required: boolean;
169
169
  validityStyles: boolean;
170
- size: "small" | "medium" | "large";
171
- rounded: "small" | "medium" | "full" | "large";
172
- fillMode: "flat" | "solid" | "outline";
170
+ size: "small" | "medium" | "large" | null | undefined;
171
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
172
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
173
173
  };
174
174
  /**
175
175
  * @hidden
@@ -249,7 +249,7 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
249
249
  */
250
250
  render(): JSX.Element;
251
251
  protected setCalendarRef: (calendar: any) => void;
252
- protected nextValue: (nextProps: DatePickerProps, nextState: DatePickerState) => Date;
252
+ protected nextValue: (nextProps: DatePickerProps, nextState: DatePickerState) => Date | null;
253
253
  protected nextShow: (nextProps: DatePickerProps, nextState: DatePickerState) => boolean;
254
254
  protected setShow(show: boolean): void;
255
255
  protected mergeTime(value: Date | null): Date | null;
@@ -60,6 +60,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
60
60
  _this._dateInput = React.createRef();
61
61
  _this._calendar = null;
62
62
  _this.shouldFocusDateInput = false;
63
+ _this.prevShow = false;
63
64
  /**
64
65
  * @hidden
65
66
  */
@@ -406,9 +407,9 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
406
407
  var _b;
407
408
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
408
409
  return (React.createElement("span", { role: "group", "aria-expanded": _this.show, ref: function (span) { _this._element = span; }, className: classNames('k-input', 'k-datepicker', (_b = {},
409
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
410
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
411
- _b["k-input-" + fillMode] = fillMode,
410
+ _b["k-input-".concat(kendoThemeMaps.sizeMap[size] || size)] = size,
411
+ _b["k-rounded-".concat(kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
412
+ _b["k-input-".concat(fillMode)] = fillMode,
412
413
  _b['k-invalid'] = !isValid,
413
414
  _b['k-required'] = _this.required,
414
415
  _b['k-disabled'] = _this.props.disabled,
@@ -125,9 +125,9 @@ export declare class DateRangePickerWithoutContext extends React.Component<DateR
125
125
  required: PropTypes.Requireable<boolean>;
126
126
  validate: PropTypes.Requireable<boolean>;
127
127
  valid: PropTypes.Requireable<boolean>;
128
- size: PropTypes.Requireable<"small" | "medium" | "large">;
129
- rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
130
- fillMode: PropTypes.Requireable<"flat" | "solid" | "outline">;
128
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
129
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
130
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
131
131
  }>>;
132
132
  focusedDate: PropTypes.Requireable<Date>;
133
133
  format: PropTypes.Requireable<string | PropTypes.InferProps<{
@@ -145,16 +145,16 @@ export declare class DateTimePickerWithoutContext extends React.Component<DateTi
145
145
  validate: PropTypes.Requireable<boolean>;
146
146
  valid: PropTypes.Requireable<boolean>;
147
147
  cancelButton: PropTypes.Requireable<boolean>;
148
- size: PropTypes.Requireable<"small" | "medium" | "large">;
149
- rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
150
- fillMode: PropTypes.Requireable<"flat" | "solid" | "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;
@@ -166,9 +166,9 @@ export declare class DateTimePickerWithoutContext extends React.Component<DateTi
166
166
  validityStyles: boolean;
167
167
  cancelButton: boolean;
168
168
  dateInput: React.ComponentType<DateInputProps<any>>;
169
- size: "small" | "medium" | "large";
170
- rounded: "small" | "medium" | "full" | "large";
171
- fillMode: "flat" | "solid" | "outline";
169
+ size: "small" | "medium" | "large" | null | undefined;
170
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
171
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
172
172
  };
173
173
  /**
174
174
  * @hidden
@@ -333,9 +333,9 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
333
333
  return (React.createElement("div", { ref: function (div) {
334
334
  _this._element = div;
335
335
  }, className: classNames('k-input', 'k-datetimepicker', (_b = {},
336
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
337
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
338
- _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,
339
339
  _b['k-invalid'] = !isValid,
340
340
  _b['k-required'] = _this.required,
341
341
  _b['k-disabled'] = _this.props.disabled,
@@ -71,7 +71,7 @@ export declare class DateTimeSelector extends React.Component<DateTimeSelectorPr
71
71
  protected get minTime(): Date | null;
72
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
77
  protected move: (direction: 'left' | 'right') => void;
@@ -42,7 +42,12 @@ var DateTimeSelector = /** @class */ (function (_super) {
42
42
  __extends(DateTimeSelector, _super);
43
43
  function DateTimeSelector(props) {
44
44
  var _this = _super.call(this, props) || this;
45
+ _this._calendar = null;
46
+ _this._timePart = null;
47
+ _this._cancelButton = null;
48
+ _this._acceptButton = null;
45
49
  _this._calendarWrap = null;
50
+ _this.shouldFocusPart = false;
46
51
  _this.focus = function (args) {
47
52
  // Async to avoid stealing the focus from the DateInput on close
48
53
  Promise.resolve().then(function () {
@@ -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: 1653648109,
8
+ publishDate: 1654509015,
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>;
@@ -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;
@@ -45,6 +45,16 @@ var TimeList = /** @class */ (function (_super) {
45
45
  __extends(TimeList, _super);
46
46
  function TimeList(props) {
47
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;
48
58
  _this.animateToIndex = false;
49
59
  _this.focus = function (args) {
50
60
  Promise.resolve().then(function () {
@@ -55,7 +65,7 @@ var TimeList = /** @class */ (function (_super) {
55
65
  });
56
66
  };
57
67
  _this.itemOffset = function (scrollTop) {
58
- if (!_this.virtualization) {
68
+ if (!_this.virtualization || !_this.service) {
59
69
  return -1;
60
70
  }
61
71
  var valueIndex = _this.service.selectedIndex(_this.props.value);
@@ -82,8 +92,10 @@ var TimeList = /** @class */ (function (_super) {
82
92
  };
83
93
  _this.configureServices = function (_a) {
84
94
  var _b = _a === void 0 ? _this.props : _a, min = _b.min, max = _b.max, value = _b.value;
85
- var _c = _this.service.limitRange(min || _this.min, max || _this.max, value || _this.props.value), newMin = _c[0], newMax = _c[1];
86
- _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
+ }
87
99
  };
88
100
  _this.serviceSettings = function (settings) {
89
101
  var defaults = {
@@ -100,7 +112,7 @@ var TimeList = /** @class */ (function (_super) {
100
112
  };
101
113
  _this.handleScrollAction = function (_a) {
102
114
  var target = _a.target, animationInProgress = _a.animationInProgress;
103
- if (!_this.virtualization) {
115
+ if (!_this.virtualization || !_this.service) {
104
116
  return;
105
117
  }
106
118
  if (target && !animationInProgress) {
@@ -131,6 +143,9 @@ var TimeList = /** @class */ (function (_super) {
131
143
  }
132
144
  };
133
145
  _this.handleKeyDown = function (event) {
146
+ if (!_this.service) {
147
+ return;
148
+ }
134
149
  var keyCode = event.keyCode;
135
150
  if (keyCode === Keys.down
136
151
  || keyCode === Keys.up
@@ -145,6 +160,9 @@ var TimeList = /** @class */ (function (_super) {
145
160
  }
146
161
  };
147
162
  _this.handleChange = function (dataItem) {
163
+ if (!_this.service) {
164
+ return;
165
+ }
148
166
  var candidate = _this.service.apply(_this.props.value, dataItem.value);
149
167
  if (_this.props.value.getTime() === candidate.getTime()) {
150
168
  return;
@@ -215,7 +233,7 @@ var TimeList = /** @class */ (function (_super) {
215
233
  * @hidden
216
234
  */
217
235
  TimeList.prototype.componentDidUpdate = function () {
218
- if (!this.virtualization) {
236
+ if (!this.virtualization || !this.service) {
219
237
  return;
220
238
  }
221
239
  var index = this.service.selectedIndex(this.props.value);
@@ -252,14 +270,14 @@ var TimeList = /** @class */ (function (_super) {
252
270
  part: function (props, propName, componentName) {
253
271
  var prop = props[propName];
254
272
  if (!prop || !services[prop.type]) {
255
- 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 "));
256
274
  }
257
275
  return null;
258
276
  },
259
277
  step: function (props, propName, componentName) {
260
278
  var prop = props[propName];
261
279
  if (prop !== undefined && prop <= 0) {
262
- 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 "));
263
281
  }
264
282
  return null;
265
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;
@@ -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
128
  protected listReducer: (state: any, list: any, idx: any, all: any) => any;
129
- protected showNowButton: () => boolean;
129
+ protected showNowButton: () => boolean | undefined;
130
130
  protected hasSteps(): boolean;
131
131
  private handleKeyDown;
132
132
  private handleListBlur;
@@ -35,7 +35,7 @@ import { MIDNIGHT_DATE, MIN_TIME, MAX_TIME } from '../utils';
35
35
  import { TIME_PART } from './models/TimePart';
36
36
  import { generateSnappers, getNow, isInTimeRange, snapTime, timeInRange } from './utils';
37
37
  import { Button } from '@progress/kendo-react-buttons';
38
- 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"));
39
39
  /**
40
40
  * @hidden
41
41
  */
@@ -51,6 +51,9 @@ var TimePart = /** @class */ (function (_super) {
51
51
  __extends(TimePart, _super);
52
52
  function TimePart(props) {
53
53
  var _this = _super.call(this, props) || this;
54
+ _this._element = null;
55
+ _this._nowButton = null;
56
+ _this.dateFormatParts = [];
54
57
  _this.timeLists = [];
55
58
  _this.focus = function (args) {
56
59
  Promise.resolve().then(function () {
@@ -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" | "full" | "large">;
150
- fillMode: PropTypes.Requireable<"flat" | "solid" | "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" | "full" | "large";
170
- fillMode: "flat" | "solid" | "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
@@ -60,6 +60,7 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
60
60
  _this._dateInput = React.createRef();
61
61
  _this._timeSelector = null;
62
62
  _this.shouldFocusDateInput = false;
63
+ _this.prevShow = false;
63
64
  /**
64
65
  * @hidden
65
66
  */
@@ -372,9 +373,9 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
372
373
  var _b;
373
374
  var onFocus = _a.onFocus, onBlur = _a.onBlur;
374
375
  return (React.createElement("div", { ref: function (span) { _this._element = span; }, className: classNames('k-input', 'k-timepicker', (_b = {},
375
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
376
- _b["k-rounded-" + (kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
377
- _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,
378
379
  _b['k-invalid'] = !isValid,
379
380
  _b['k-required'] = _this.required,
380
381
  _b['k-disabled'] = _this.props.disabled,
@@ -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;
@@ -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;
@@ -49,6 +49,10 @@ var TimeSelector = /** @class */ (function (_super) {
49
49
  __extends(TimeSelector, _super);
50
50
  function TimeSelector(props) {
51
51
  var _this = _super.call(this, props) || this;
52
+ _this._element = null;
53
+ _this._cancelButton = null;
54
+ _this._acceptButton = null;
55
+ _this.timePart = null;
52
56
  _this.focusActiveList = function () {
53
57
  if (!_this.timePart) {
54
58
  return;
@@ -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;