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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
  2. package/dist/es/PopupSettings.js +1 -0
  3. package/dist/es/calendar/components/Calendar.d.ts +10 -10
  4. package/dist/es/calendar/components/Calendar.js +26 -12
  5. package/dist/es/calendar/components/CalendarCell.js +7 -3
  6. package/dist/es/calendar/components/CalendarHeaderTitle.js +7 -3
  7. package/dist/es/calendar/components/CalendarNavigationItem.js +7 -3
  8. package/dist/es/calendar/components/CalendarWeekCell.js +7 -3
  9. package/dist/es/calendar/components/Header.d.ts +5 -4
  10. package/dist/es/calendar/components/Header.js +8 -6
  11. package/dist/es/calendar/components/HorizontalViewList.d.ts +4 -4
  12. package/dist/es/calendar/components/HorizontalViewList.js +8 -5
  13. package/dist/es/calendar/components/MultiViewCalendar.d.ts +13 -13
  14. package/dist/es/calendar/components/MultiViewCalendar.js +24 -15
  15. package/dist/es/calendar/components/Navigation.d.ts +1 -1
  16. package/dist/es/calendar/components/Navigation.js +13 -6
  17. package/dist/es/calendar/components/TodayCommand.d.ts +3 -3
  18. package/dist/es/calendar/components/TodayCommand.js +10 -6
  19. package/dist/es/calendar/components/View.d.ts +11 -11
  20. package/dist/es/calendar/components/View.js +17 -13
  21. package/dist/es/calendar/components/ViewList.d.ts +6 -6
  22. package/dist/es/calendar/components/ViewList.js +19 -9
  23. package/dist/es/calendar/models/ActiveView.js +1 -0
  24. package/dist/es/calendar/models/CalendarSettings.js +1 -0
  25. package/dist/es/calendar/models/CellContext.js +1 -0
  26. package/dist/es/calendar/models/MultiViewCalendarMode.js +1 -0
  27. package/dist/es/calendar/models/MultiViewCalendarSettings.js +1 -0
  28. package/dist/es/calendar/models/SelectionRangeEnd.js +1 -0
  29. package/dist/es/calendar/models/ViewService.js +1 -0
  30. package/dist/es/calendar/services/BusViewService.js +1 -1
  31. package/dist/es/calendar/services/CenturyViewService.js +2 -2
  32. package/dist/es/calendar/services/DOMService.js +24 -6
  33. package/dist/es/calendar/services/DecadeViewService.js +2 -2
  34. package/dist/es/calendar/services/MonthViewService.js +2 -2
  35. package/dist/es/calendar/services/NavigationService.js +1 -1
  36. package/dist/es/calendar/services/ScrollSyncService.js +5 -1
  37. package/dist/es/calendar/services/YearViewService.js +2 -2
  38. package/dist/es/dateinput/DateInput.d.ts +24 -20
  39. package/dist/es/dateinput/DateInput.js +32 -19
  40. package/dist/es/dateinput/models/DateInputSettings.js +1 -0
  41. package/dist/es/dateinput/models/format-placeholder.js +1 -0
  42. package/dist/es/dateinput/models/incremental-steps.js +1 -0
  43. package/dist/es/dateinput/models/kendo-date.d.ts +2 -2
  44. package/dist/es/dateinput/models/kendo-date.js +2 -2
  45. package/dist/es/dateinput/models/mask.js +1 -0
  46. package/dist/es/dateinput/models/selection.js +1 -0
  47. package/dist/es/dateinput/utils.d.ts +1 -1
  48. package/dist/es/datepicker/DatePicker.d.ts +25 -25
  49. package/dist/es/datepicker/DatePicker.js +28 -23
  50. package/dist/es/datepicker/models/DatePickerSettings.js +1 -0
  51. package/dist/es/datepicker/models/index.js +1 -0
  52. package/dist/es/daterangepicker/DateRangePicker.d.ts +12 -12
  53. package/dist/es/daterangepicker/DateRangePicker.js +16 -14
  54. package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +1 -0
  55. package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +1 -0
  56. package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +1 -0
  57. package/dist/es/daterangepicker/models/DateRangePickerSettings.js +1 -0
  58. package/dist/es/daterangepicker/models/index.js +1 -0
  59. package/dist/es/datetimepicker/DateTimePicker.d.ts +19 -19
  60. package/dist/es/datetimepicker/DateTimePicker.js +33 -18
  61. package/dist/es/datetimepicker/DateTimeSelector.d.ts +7 -7
  62. package/dist/es/datetimepicker/DateTimeSelector.js +17 -7
  63. package/dist/es/datetimepicker/models/DateTimePickerSettings.js +1 -0
  64. package/dist/es/datetimepicker/models/index.js +1 -0
  65. package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
  66. package/dist/es/messages/index.d.ts +21 -21
  67. package/dist/es/package-metadata.js +1 -1
  68. package/dist/es/timepicker/TimeList.d.ts +8 -8
  69. package/dist/es/timepicker/TimeList.js +33 -13
  70. package/dist/es/timepicker/TimePart.d.ts +10 -10
  71. package/dist/es/timepicker/TimePart.js +14 -9
  72. package/dist/es/timepicker/TimePicker.d.ts +22 -22
  73. package/dist/es/timepicker/TimePicker.js +27 -22
  74. package/dist/es/timepicker/TimeSelector.d.ts +6 -6
  75. package/dist/es/timepicker/TimeSelector.js +11 -5
  76. package/dist/es/timepicker/models/IncrementalSteps.js +1 -0
  77. package/dist/es/timepicker/models/ListItem.js +1 -0
  78. package/dist/es/timepicker/models/ListService.js +1 -0
  79. package/dist/es/timepicker/models/ListServiceSettings.js +1 -0
  80. package/dist/es/timepicker/models/TimePickerSettings.js +1 -0
  81. package/dist/es/timepicker/services/DOMService.js +2 -0
  82. package/dist/es/timepicker/services/DayPeriodService.js +9 -3
  83. package/dist/es/timepicker/services/HoursService.js +14 -5
  84. package/dist/es/timepicker/services/MinutesService.js +12 -6
  85. package/dist/es/timepicker/services/SecondsService.js +12 -6
  86. package/dist/es/timepicker/utils.d.ts +4 -4
  87. package/dist/es/utils.d.ts +1 -1
  88. package/dist/es/utils.js +10 -1
  89. package/dist/es/virtualization/Virtualization.d.ts +8 -7
  90. package/dist/es/virtualization/Virtualization.js +22 -12
  91. package/dist/es/virtualization/services/RowHeightService.js +10 -1
  92. package/dist/es/virtualization/services/ScrollerService.js +9 -3
  93. package/dist/npm/calendar/components/Calendar.d.ts +10 -10
  94. package/dist/npm/calendar/components/Calendar.js +53 -38
  95. package/dist/npm/calendar/components/CalendarCell.js +9 -4
  96. package/dist/npm/calendar/components/CalendarHeaderTitle.js +8 -3
  97. package/dist/npm/calendar/components/CalendarNavigationItem.js +9 -4
  98. package/dist/npm/calendar/components/CalendarWeekCell.js +9 -4
  99. package/dist/npm/calendar/components/Header.d.ts +5 -4
  100. package/dist/npm/calendar/components/Header.js +11 -8
  101. package/dist/npm/calendar/components/HorizontalViewList.d.ts +4 -4
  102. package/dist/npm/calendar/components/HorizontalViewList.js +11 -7
  103. package/dist/npm/calendar/components/MultiViewCalendar.d.ts +13 -13
  104. package/dist/npm/calendar/components/MultiViewCalendar.js +62 -52
  105. package/dist/npm/calendar/components/Navigation.d.ts +1 -1
  106. package/dist/npm/calendar/components/Navigation.js +18 -10
  107. package/dist/npm/calendar/components/TodayCommand.d.ts +3 -3
  108. package/dist/npm/calendar/components/TodayCommand.js +16 -11
  109. package/dist/npm/calendar/components/View.d.ts +11 -11
  110. package/dist/npm/calendar/components/View.js +27 -22
  111. package/dist/npm/calendar/components/ViewList.d.ts +6 -6
  112. package/dist/npm/calendar/components/ViewList.js +29 -18
  113. package/dist/npm/calendar/models/CalendarViewEnum.js +1 -0
  114. package/dist/npm/calendar/models/NavigationAction.js +1 -0
  115. package/dist/npm/calendar/models/SelectionRange.js +1 -0
  116. package/dist/npm/calendar/models/index.js +4 -3
  117. package/dist/npm/calendar/services/BusViewService.js +3 -2
  118. package/dist/npm/calendar/services/CenturyViewService.js +40 -39
  119. package/dist/npm/calendar/services/DOMService.js +34 -15
  120. package/dist/npm/calendar/services/DecadeViewService.js +34 -33
  121. package/dist/npm/calendar/services/MonthViewService.js +38 -37
  122. package/dist/npm/calendar/services/NavigationService.js +2 -1
  123. package/dist/npm/calendar/services/ScrollSyncService.js +6 -1
  124. package/dist/npm/calendar/services/WeekNamesService.js +2 -1
  125. package/dist/npm/calendar/services/YearViewService.js +35 -34
  126. package/dist/npm/calendar/services/index.js +10 -9
  127. package/dist/npm/common/PickerWrap.js +2 -1
  128. package/dist/npm/dateinput/DateInput.d.ts +24 -20
  129. package/dist/npm/dateinput/DateInput.js +51 -37
  130. package/dist/npm/dateinput/models/index.js +3 -2
  131. package/dist/npm/dateinput/models/kendo-date.d.ts +2 -2
  132. package/dist/npm/dateinput/models/kendo-date.js +14 -13
  133. package/dist/npm/dateinput/models/mask.js +2 -0
  134. package/dist/npm/dateinput/utils.d.ts +1 -1
  135. package/dist/npm/dateinput/utils.js +9 -4
  136. package/dist/npm/datepicker/DatePicker.d.ts +25 -25
  137. package/dist/npm/datepicker/DatePicker.js +42 -36
  138. package/dist/npm/datepicker/ToggleButton.js +1 -0
  139. package/dist/npm/daterangepicker/DateRangePicker.d.ts +12 -12
  140. package/dist/npm/daterangepicker/DateRangePicker.js +34 -31
  141. package/dist/npm/datetimepicker/DateTimePicker.d.ts +19 -19
  142. package/dist/npm/datetimepicker/DateTimePicker.js +46 -30
  143. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +7 -7
  144. package/dist/npm/datetimepicker/DateTimeSelector.js +26 -15
  145. package/dist/npm/defaults.js +1 -0
  146. package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
  147. package/dist/npm/hooks/usePickerFloatingLabel.js +6 -3
  148. package/dist/npm/main.js +22 -21
  149. package/dist/npm/messages/index.d.ts +21 -21
  150. package/dist/npm/messages/index.js +2 -1
  151. package/dist/npm/package-metadata.js +2 -1
  152. package/dist/npm/timepicker/TimeList.d.ts +8 -8
  153. package/dist/npm/timepicker/TimeList.js +39 -18
  154. package/dist/npm/timepicker/TimePart.d.ts +10 -10
  155. package/dist/npm/timepicker/TimePart.js +25 -19
  156. package/dist/npm/timepicker/TimePicker.d.ts +22 -22
  157. package/dist/npm/timepicker/TimePicker.js +43 -37
  158. package/dist/npm/timepicker/TimeSelector.d.ts +6 -6
  159. package/dist/npm/timepicker/TimeSelector.js +22 -15
  160. package/dist/npm/timepicker/models/TimePart.js +1 -0
  161. package/dist/npm/timepicker/models/index.js +2 -1
  162. package/dist/npm/timepicker/services/DOMService.js +7 -4
  163. package/dist/npm/timepicker/services/DayPeriodService.js +11 -4
  164. package/dist/npm/timepicker/services/HoursService.js +21 -11
  165. package/dist/npm/timepicker/services/MinutesService.js +17 -10
  166. package/dist/npm/timepicker/services/SecondsService.js +17 -10
  167. package/dist/npm/timepicker/services/index.js +6 -5
  168. package/dist/npm/timepicker/utils.d.ts +4 -4
  169. package/dist/npm/timepicker/utils.js +30 -20
  170. package/dist/npm/utils.d.ts +1 -1
  171. package/dist/npm/utils.js +43 -20
  172. package/dist/npm/virtualization/Virtualization.d.ts +8 -7
  173. package/dist/npm/virtualization/Virtualization.js +26 -15
  174. package/dist/npm/virtualization/services/RowHeightService.js +11 -1
  175. package/dist/npm/virtualization/services/ScrollerService.js +10 -3
  176. package/dist/npm/virtualization/services/index.js +5 -4
  177. package/dist/systemjs/kendo-react-dateinputs.js +1 -1
  178. package/package.json +13 -13
@@ -6,7 +6,25 @@ import { canUseDOM } from '@progress/kendo-react-common';
6
6
  */
7
7
  var DOMService = /** @class */ (function () {
8
8
  function DOMService() {
9
+ // heights
10
+ this.calendarHeight = 0;
11
+ this.headerHeight = 0;
12
+ this.monthViewHeight = 0;
13
+ this.yearViewHeight = 0;
14
+ this.decadeViewHeight = 0;
15
+ this.centuryViewHeight = 0;
16
+ this.navigationItemHeight = 0;
17
+ this.scrollableContentHeight = 0;
18
+ this.scrollableYearContentHeight = 0;
19
+ // widths
20
+ this.calendarWidth = 0;
21
+ this.monthViewWidth = 0;
22
+ this.yearViewWidth = 0;
23
+ this.decadeViewWidth = 0;
24
+ this.centuryViewWidth = 0;
25
+ this.scrollableContentWidth = 0;
9
26
  this.didCalculate = false;
27
+ this.hostContainer = null;
10
28
  }
11
29
  DOMService.prototype.ensureHeights = function () {
12
30
  if (this.calendarHeight !== undefined) {
@@ -38,7 +56,7 @@ var DOMService = /** @class */ (function () {
38
56
  var content = function (rows, cells) {
39
57
  if (cells === void 0) { cells = 1; }
40
58
  return (table([
41
- tbody([tr([td('1', 'k-calendar-td k-alt')])].concat(repeat(rows, function () { return tr(repeat(cells, function (c) { return td("<span class=\"k-link\">" + c + "</span>", 'k-calendar-td'); }), 'k-calendar-tr'); })), 'k-calendar-tbody')
59
+ tbody([tr([td('1', 'k-calendar-td k-alt')])].concat(repeat(rows, function () { return tr(repeat(cells, function (c) { return td("<span class=\"k-link\">".concat(c, "</span>"), 'k-calendar-td'); }), 'k-calendar-tr'); })), 'k-calendar-tbody')
42
60
  ], 'k-calendar-table'));
43
61
  };
44
62
  var scrollable = function (children) { return div(children, 'k-content k-calendar-content k-scrollable'); };
@@ -80,7 +98,7 @@ var DOMService = /** @class */ (function () {
80
98
  var getScrollable = function (element) { return element.querySelector('.k-scrollable'); };
81
99
  var horizontal = function (element) {
82
100
  var scrollableElement = getScrollable(element);
83
- scrollableElement.className = scrollableElement.className + " k-scrollable-horizontal";
101
+ scrollableElement.className = "".concat(scrollableElement.className, " k-scrollable-horizontal");
84
102
  return element;
85
103
  };
86
104
  var monthView = viewFactory({ cells: 7, rows: 6 }, 'k-calendar-view k-calendar-monthview k-vstack', true);
@@ -144,13 +162,13 @@ var DOMService = /** @class */ (function () {
144
162
  var viewProp = dimension === 'height' ? 'ViewHeight' : 'ViewWidth';
145
163
  switch (viewType) {
146
164
  case CalendarViewEnum.month:
147
- return this["month" + viewProp];
165
+ return this["month".concat(viewProp)];
148
166
  case CalendarViewEnum.year:
149
- return this["year" + viewProp];
167
+ return this["year".concat(viewProp)];
150
168
  case CalendarViewEnum.decade:
151
- return this["decade" + viewProp];
169
+ return this["decade".concat(viewProp)];
152
170
  case CalendarViewEnum.century:
153
- return this["century" + viewProp];
171
+ return this["century".concat(viewProp)];
154
172
  default:
155
173
  return 1;
156
174
  }
@@ -51,7 +51,7 @@ var DecadeViewService = /** @class */ (function () {
51
51
  : _this.isSelectedFromArray(cellDate, selectedDate, min, max));
52
52
  return intersects(cellDate, firstDate, lastDate) ? ({
53
53
  formattedValue: _this.value(cellDate),
54
- id: "" + cellUID + cellDate.getTime(),
54
+ id: "".concat(cellUID).concat(cellDate.getTime()),
55
55
  isFocused: _this.isEqual(cellDate, focusedDate),
56
56
  isSelected: isSelected,
57
57
  isWeekend: false,
@@ -120,7 +120,7 @@ var DecadeViewService = /** @class */ (function () {
120
120
  if (!value) {
121
121
  return '';
122
122
  }
123
- return firstYearOfDecade(value).getFullYear() + " - " + lastYearOfDecade(value).getFullYear();
123
+ return "".concat(firstYearOfDecade(value).getFullYear(), " - ").concat(lastYearOfDecade(value).getFullYear());
124
124
  };
125
125
  DecadeViewService.prototype.rowLength = function (_) {
126
126
  return CELLS_LENGTH;
@@ -60,7 +60,7 @@ var MonthViewService = /** @class */ (function () {
60
60
  : _this.isSelectedFromArray(cellDate, selectedDate, min, max));
61
61
  var cell = {
62
62
  formattedValue: _this.value(cellDate),
63
- id: "" + cellUID + cellDate.getTime(),
63
+ id: "".concat(cellUID).concat(cellDate.getTime()),
64
64
  isFocused: _this.isEqual(cellDate, focusedDate),
65
65
  isSelected: isSelected,
66
66
  isInRange: isInRange(cellDate, min, max),
@@ -126,7 +126,7 @@ var MonthViewService = /** @class */ (function () {
126
126
  return this.isRangeStart(value) ? value.getFullYear().toString() : this.abbrMonthNames()[value.getMonth()];
127
127
  };
128
128
  MonthViewService.prototype.title = function (current) {
129
- return this.wideMonthNames()[current.getMonth()] + " " + current.getFullYear();
129
+ return "".concat(this.wideMonthNames()[current.getMonth()], " ").concat(current.getFullYear());
130
130
  };
131
131
  MonthViewService.prototype.rowLength = function (prependCell) {
132
132
  return CELLS_LENGTH + (prependCell ? 1 : 0);
@@ -19,7 +19,7 @@ var NavigationService = /** @class */ (function () {
19
19
  this.bus = bus;
20
20
  }
21
21
  NavigationService.prototype.action = function (event) {
22
- var action = "" + (event.ctrlKey || event.metaKey ? 'meta+' : '') + event.keyCode;
22
+ var action = "".concat(event.ctrlKey || event.metaKey ? 'meta+' : '').concat(event.keyCode);
23
23
  return KEY_TO_ACTION[action];
24
24
  };
25
25
  NavigationService.prototype.move = function (value, action, activeView, service, event) {
@@ -6,6 +6,10 @@ var powerByMagnitude = function (magnitude) { return function (x) { return x * m
6
6
  var ScrollSyncService = /** @class */ (function () {
7
7
  function ScrollSyncService(dom) {
8
8
  this.dom = dom;
9
+ this.divideByMagnitude = null;
10
+ this.powerByMagnitude = null;
11
+ this.navigator = null;
12
+ this.view = null;
9
13
  this.monthScrolled = false;
10
14
  this.navScrolled = false;
11
15
  }
@@ -47,7 +51,7 @@ var ScrollSyncService = /** @class */ (function () {
47
51
  };
48
52
  ScrollSyncService.prototype.calculateScroll = function (component, scrollTop) {
49
53
  var modifier = component === this.navigator ? this.divideByMagnitude : this.powerByMagnitude;
50
- return modifier(scrollTop);
54
+ return modifier ? modifier(scrollTop) : 0;
51
55
  };
52
56
  return ScrollSyncService;
53
57
  }());
@@ -77,7 +77,7 @@ var YearViewService = /** @class */ (function () {
77
77
  : _this.isSelectedFromArray(cellDate, selectedDate, min, max));
78
78
  return {
79
79
  formattedValue: months[cellDate.getMonth()],
80
- id: "" + cellUID + cellDate.getTime(),
80
+ id: "".concat(cellUID).concat(cellDate.getTime()),
81
81
  isFocused: _this.isEqual(cellDate, focusedDate),
82
82
  isSelected: isSelected,
83
83
  isInRange: isInRange(cellDate, min, max),
@@ -138,7 +138,7 @@ var YearViewService = /** @class */ (function () {
138
138
  return modifier(value);
139
139
  };
140
140
  YearViewService.prototype.cellTitle = function (value) {
141
- return value.getFullYear() + " " + this.value(value);
141
+ return "".concat(value.getFullYear(), " ").concat(this.value(value));
142
142
  };
143
143
  YearViewService.prototype.navigationTitle = function (value) {
144
144
  return this.title(value);
@@ -18,6 +18,10 @@ export interface DateInputChangeEvent<T = DateInput> {
18
18
  export interface DateInputProps<T extends DateInput = any> extends FormComponentProps, DateInputSettings {
19
19
  /** @hidden */
20
20
  _ref?: React.MutableRefObject<DateInput | null>;
21
+ /**
22
+ * @hidden
23
+ */
24
+ children?: React.ReactNode;
21
25
  /**
22
26
  * Sets a class of the DateInput DOM element.
23
27
  */
@@ -110,7 +114,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
110
114
  second: PropTypes.Requireable<string>;
111
115
  timeZoneName: PropTypes.Requireable<string>;
112
116
  }>>;
113
- formatPlaceholder: PropTypes.Requireable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
117
+ formatPlaceholder: PropTypes.Requireable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
114
118
  year: PropTypes.Requireable<string>;
115
119
  month: PropTypes.Requireable<string>;
116
120
  day: PropTypes.Requireable<string>;
@@ -146,18 +150,18 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
146
150
  required: PropTypes.Requireable<boolean>;
147
151
  validate: PropTypes.Requireable<boolean>;
148
152
  valid: PropTypes.Requireable<boolean>;
149
- size: PropTypes.Requireable<"small" | "medium" | "large">;
150
- rounded: PropTypes.Requireable<"small" | "medium" | "large" | "full">;
151
- fillMode: PropTypes.Requireable<"solid" | "flat" | "outline">;
153
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
154
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
155
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
152
156
  };
153
157
  /**
154
158
  * @hidden
155
159
  */
156
160
  static defaultProps: {
157
161
  format: string;
158
- size: "small" | "medium" | "large";
159
- rounded: "small" | "medium" | "large" | "full";
160
- fillMode: "solid" | "flat" | "outline";
162
+ size: "small" | "medium" | "large" | null | undefined;
163
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
164
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
161
165
  formatPlaceholder: DateInputFormatPlaceholder;
162
166
  spinners: boolean;
163
167
  disabled: boolean;
@@ -168,7 +172,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
168
172
  required: boolean;
169
173
  validityStyles: boolean;
170
174
  validationMessage: string;
171
- placeholder: any;
175
+ placeholder: null;
172
176
  };
173
177
  private kendoDate;
174
178
  private currentFormat;
@@ -198,21 +202,21 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
198
202
  /**
199
203
  * Gets the value of the DateInput.
200
204
  */
201
- readonly value: Date | null;
205
+ get value(): Date | null;
202
206
  /**
203
207
  * Gets the `name` property of the DateInput.
204
208
  */
205
- readonly name: string | undefined;
206
- protected readonly min: Date;
207
- protected readonly max: Date;
209
+ get name(): string | undefined;
210
+ protected get min(): Date;
211
+ protected get max(): Date;
208
212
  /**
209
213
  * @hidden
210
214
  */
211
- readonly text: string;
215
+ get text(): string;
212
216
  /**
213
217
  * Represents the validity state into which the DateInput is set.
214
218
  */
215
- readonly validity: FormComponentValidity;
219
+ get validity(): FormComponentValidity;
216
220
  /**
217
221
  * Gets the element of the DateInput.
218
222
  *
@@ -244,7 +248,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
244
248
  * );
245
249
  * ```
246
250
  */
247
- readonly element: HTMLInputElement | null;
251
+ get element(): HTMLInputElement | null;
248
252
  /**
249
253
  * @hidden
250
254
  */
@@ -252,15 +256,15 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
252
256
  /**
253
257
  * @hidden
254
258
  */
255
- protected readonly validityStyles: boolean;
259
+ protected get validityStyles(): boolean;
256
260
  /**
257
261
  * @hidden
258
262
  */
259
- protected readonly required: boolean;
263
+ protected get required(): boolean;
260
264
  /**
261
265
  * @hidden
262
266
  */
263
- protected readonly wrapper: HTMLSpanElement | null;
267
+ protected get wrapper(): HTMLSpanElement | null;
264
268
  /**
265
269
  * @hidden
266
270
  */
@@ -269,7 +273,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
269
273
  * @hidden
270
274
  */
271
275
  protected setValidity: () => void;
272
- protected updateOnPaste: (event: React.SyntheticEvent<HTMLInputElement, Event>) => void;
276
+ protected updateOnPaste: (event: React.SyntheticEvent<HTMLInputElement>) => void;
273
277
  private spinnersMouseDown;
274
278
  private handlePaste;
275
279
  private elementChange;
@@ -281,7 +285,7 @@ export declare class DateInputWithoutContext extends React.Component<DateInputPr
281
285
  private elementKeyDown;
282
286
  private elementOnFocus;
283
287
  private elementOnBlur;
284
- private readonly selection;
288
+ private get selection();
285
289
  private setSelection;
286
290
  private triggerChange;
287
291
  private selectionBySymbol;
@@ -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 __());
@@ -22,6 +24,15 @@ var __assign = (this && this.__assign) || function () {
22
24
  };
23
25
  return __assign.apply(this, arguments);
24
26
  };
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));
35
+ };
25
36
  import * as React from 'react';
26
37
  import * as PropTypes from 'prop-types';
27
38
  import { isEqual, cloneDate } from '@progress/kendo-date-math';
@@ -45,10 +56,12 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
45
56
  function DateInputWithoutContext(props) {
46
57
  var _this = _super.call(this, props) || this;
47
58
  _this.kendoDate = null;
59
+ _this.currentFormat = '';
48
60
  _this.paste = false;
49
61
  _this._element = null;
50
62
  _this._wrapper = null;
51
63
  _this._inputId = guid();
64
+ _this._lastSelectedSymbol = '';
52
65
  /**
53
66
  * @hidden
54
67
  */
@@ -238,7 +251,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
238
251
  this.props._ref.current = this;
239
252
  }
240
253
  var localizationService = provideLocalizationService(this);
241
- var props = __assign({}, DateInputWithoutContext.defaultProps, this.props);
254
+ var props = __assign(__assign({}, DateInputWithoutContext.defaultProps), this.props);
242
255
  var min = props.min, max = props.max, name = props.name, label = props.label, id = props.id;
243
256
  var currentText = this.text;
244
257
  var text = currentText === this.props.placeholder ? '' : currentText;
@@ -253,19 +266,19 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
253
266
  if (this.value !== null) {
254
267
  ariaProps['aria-valuenow'] = this.value.getTime();
255
268
  }
256
- var wrapperClassesInstance = wrapperClasses.slice();
269
+ var wrapperClassesInstance = __spreadArray([], wrapperClasses, true);
257
270
  if (this.props.className) {
258
271
  wrapperClassesInstance.push(this.props.className);
259
272
  }
260
273
  var dateinput = (React.createElement(AsyncFocusBlur, { onFocus: this.elementOnFocus, onBlur: this.elementOnBlur }, function (_a) {
261
- var onFocus = _a.onFocus, onBlur = _a.onBlur;
262
274
  var _b;
275
+ var onFocus = _a.onFocus, onBlur = _a.onBlur;
263
276
  return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
264
277
  ? { width: _this.props.width }
265
278
  : undefined, dir: _this.props.dir, className: classNames('k-dateinput', 'k-input', (_b = {},
266
- _b["k-input-" + (kendoThemeMaps.sizeMap[size] || size)] = size,
267
- _b["k-input-" + fillMode] = fillMode,
268
- _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,
269
282
  _b['k-invalid'] = !isValid,
270
283
  _b['k-required'] = _this.required,
271
284
  _b['k-disabled'] = _this.props.disabled,
@@ -291,7 +304,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
291
304
  }
292
305
  return this.kendoDate && this.kendoDate.getDateObject();
293
306
  },
294
- enumerable: true,
307
+ enumerable: false,
295
308
  configurable: true
296
309
  });
297
310
  Object.defineProperty(DateInputWithoutContext.prototype, "name", {
@@ -301,7 +314,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
301
314
  get: function () {
302
315
  return this.props.name;
303
316
  },
304
- enumerable: true,
317
+ enumerable: false,
305
318
  configurable: true
306
319
  });
307
320
  Object.defineProperty(DateInputWithoutContext.prototype, "min", {
@@ -310,7 +323,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
310
323
  ? this.props.min
311
324
  : DateInputWithoutContext.defaultProps.min;
312
325
  },
313
- enumerable: true,
326
+ enumerable: false,
314
327
  configurable: true
315
328
  });
316
329
  Object.defineProperty(DateInputWithoutContext.prototype, "max", {
@@ -319,7 +332,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
319
332
  ? this.props.max
320
333
  : DateInputWithoutContext.defaultProps.max;
321
334
  },
322
- enumerable: true,
335
+ enumerable: false,
323
336
  configurable: true
324
337
  });
325
338
  Object.defineProperty(DateInputWithoutContext.prototype, "text", {
@@ -327,7 +340,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
327
340
  * @hidden
328
341
  */
329
342
  get: function () {
330
- var props = __assign({}, DateInput.defaultProps, this.props);
343
+ var props = __assign(__assign({}, DateInput.defaultProps), this.props);
331
344
  var _a = props.formatPlaceholder, formatPlaceholder = _a === void 0 ? DateInputWithoutContext.defaultProps.formatPlaceholder : _a, _b = props.format, format = _b === void 0 ? DateInputWithoutContext.defaultProps.format : _b, value = props.value, defaultValue = props.defaultValue;
332
345
  if (this.kendoDate === null) {
333
346
  this.kendoDate = new KendoDate(this.intl.bind(this), formatPlaceholder, format);
@@ -348,7 +361,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
348
361
  ? props.placeholder
349
362
  : currentText;
350
363
  },
351
- enumerable: true,
364
+ enumerable: false,
352
365
  configurable: true
353
366
  });
354
367
  Object.defineProperty(DateInputWithoutContext.prototype, "validity", {
@@ -369,7 +382,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
369
382
  valueMissing: this.value === null
370
383
  };
371
384
  },
372
- enumerable: true,
385
+ enumerable: false,
373
386
  configurable: true
374
387
  });
375
388
  Object.defineProperty(DateInputWithoutContext.prototype, "element", {
@@ -407,7 +420,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
407
420
  get: function () {
408
421
  return this._element;
409
422
  },
410
- enumerable: true,
423
+ enumerable: false,
411
424
  configurable: true
412
425
  });
413
426
  Object.defineProperty(DateInputWithoutContext.prototype, "validityStyles", {
@@ -419,7 +432,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
419
432
  ? this.props.validityStyles
420
433
  : DateInputWithoutContext.defaultProps.validityStyles;
421
434
  },
422
- enumerable: true,
435
+ enumerable: false,
423
436
  configurable: true
424
437
  });
425
438
  Object.defineProperty(DateInputWithoutContext.prototype, "required", {
@@ -431,7 +444,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
431
444
  ? this.props.required
432
445
  : DateInputWithoutContext.defaultProps.required;
433
446
  },
434
- enumerable: true,
447
+ enumerable: false,
435
448
  configurable: true
436
449
  });
437
450
  Object.defineProperty(DateInputWithoutContext.prototype, "wrapper", {
@@ -441,7 +454,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
441
454
  get: function () {
442
455
  return this._wrapper;
443
456
  },
444
- enumerable: true,
457
+ enumerable: false,
445
458
  configurable: true
446
459
  });
447
460
  /**
@@ -459,7 +472,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
459
472
  }
460
473
  return returnValue;
461
474
  },
462
- enumerable: true,
475
+ enumerable: false,
463
476
  configurable: true
464
477
  });
465
478
  DateInputWithoutContext.prototype.setSelection = function (selection) {
@@ -1 +1,2 @@
1
+ export {};
1
2
  // tslint:enable:max-line-length
@@ -1 +1,2 @@
1
+ export {};
1
2
  // tslint:enable:max-line-length
@@ -0,0 +1 @@
1
+ export {};
@@ -25,9 +25,9 @@ export declare class KendoDate {
25
25
  private knownParts;
26
26
  private symbols;
27
27
  private intlProvider;
28
- readonly intl: IntlService;
28
+ get intl(): IntlService;
29
29
  private _value;
30
- readonly value: Date;
30
+ get value(): Date;
31
31
  constructor(intlProvider: () => IntlService, formatPlaceholder: DateInputFormatPlaceholder, format: string | DateFormatOptions);
32
32
  setValue(value: Date | null): void;
33
33
  hasValue(): boolean;
@@ -37,14 +37,14 @@ var KendoDate = /** @class */ (function () {
37
37
  get: function () {
38
38
  return this.intlProvider();
39
39
  },
40
- enumerable: true,
40
+ enumerable: false,
41
41
  configurable: true
42
42
  });
43
43
  Object.defineProperty(KendoDate.prototype, "value", {
44
44
  get: function () {
45
45
  return this._value;
46
46
  },
47
- enumerable: true,
47
+ enumerable: false,
48
48
  configurable: true
49
49
  });
50
50
  KendoDate.prototype.setValue = function (value) {
@@ -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
  }());
@@ -0,0 +1 @@
1
+ export {};
@@ -21,7 +21,7 @@ export declare const dateSymbolMap: (map: any, part: any) => Function;
21
21
  /**
22
22
  * @hidden
23
23
  */
24
- export declare const isInRange: (candidate: Date, min: Date, max: Date) => boolean;
24
+ export declare const isInRange: (candidate: Date | null, min: Date, max: Date) => boolean;
25
25
  /**
26
26
  * @hidden
27
27
  */
@@ -113,7 +113,7 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
113
113
  second: PropTypes.Requireable<string>;
114
114
  timeZoneName: PropTypes.Requireable<string>;
115
115
  }>>;
116
- formatPlaceholder: PropTypes.Requireable<"narrow" | "short" | "wide" | "formatPattern" | PropTypes.InferProps<{
116
+ formatPlaceholder: PropTypes.Requireable<"short" | "narrow" | "wide" | "formatPattern" | PropTypes.InferProps<{
117
117
  year: PropTypes.Requireable<string>;
118
118
  month: PropTypes.Requireable<string>;
119
119
  day: PropTypes.Requireable<string>;
@@ -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" | "large" | "full">;
148
- fillMode: PropTypes.Requireable<"solid" | "flat" | "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" | "large" | "full";
172
- fillMode: "solid" | "flat" | "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
@@ -188,46 +188,46 @@ export declare class DatePickerWithoutContext extends React.Component<DatePicker
188
188
  /**
189
189
  * Gets the wrapping element of the DatePickerWithoutContext.
190
190
  */
191
- readonly element: HTMLSpanElement | null;
191
+ get element(): HTMLSpanElement | null;
192
192
  /**
193
193
  * Gets the DateInput component inside the DatePicker component.
194
194
  */
195
- readonly dateInput: DateInput | null;
195
+ get dateInput(): DateInput | null;
196
196
  /**
197
197
  * Gets the Calendar component inside the DatePicker component.
198
198
  */
199
- readonly calendar: Calendar | null;
199
+ get calendar(): Calendar | null;
200
200
  /**
201
201
  * Gets the value of the DatePickerWithoutContext.
202
202
  */
203
- readonly value: Date | null;
203
+ get value(): Date | null;
204
204
  /**
205
205
  * Gets the popup state of the DatePickerWithoutContext.
206
206
  */
207
- readonly show: boolean;
207
+ get show(): boolean;
208
208
  /**
209
209
  * Gets the `name` property of the DatePickerWithoutContext.
210
210
  */
211
- readonly name: string | undefined;
212
- protected readonly min: Date;
213
- protected readonly max: Date;
214
- protected readonly dateInputComp: React.ComponentType<DateInputProps<any>>;
215
- protected readonly toggleButtonComp: React.ComponentType<ToggleButtonProps>;
216
- protected readonly calendarComp: React.ComponentType<CalendarProps<any>>;
217
- protected readonly popupComp: React.ComponentType<PopupProps>;
218
- protected readonly pickerWrapComp: React.ComponentType<PickerWrapProps>;
211
+ get name(): string | undefined;
212
+ protected get min(): Date;
213
+ protected get max(): Date;
214
+ protected get dateInputComp(): React.ComponentType<DateInputProps<any>>;
215
+ protected get toggleButtonComp(): React.ComponentType<ToggleButtonProps>;
216
+ protected get calendarComp(): React.ComponentType<CalendarProps<any>>;
217
+ protected get popupComp(): React.ComponentType<PopupProps>;
218
+ protected get pickerWrapComp(): React.ComponentType<PickerWrapProps>;
219
219
  /**
220
220
  * Represents the validity state into which the DatePicker is set.
221
221
  */
222
- readonly validity: FormComponentValidity;
222
+ get validity(): FormComponentValidity;
223
223
  /**
224
224
  * @hidden
225
225
  */
226
- protected readonly validityStyles: boolean;
226
+ protected get validityStyles(): boolean;
227
227
  /**
228
228
  * @hidden
229
229
  */
230
- protected readonly required: boolean;
230
+ protected get required(): boolean;
231
231
  /**
232
232
  * @hidden
233
233
  */
@@ -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;