@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.
- package/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/dist/es/calendar/components/Calendar.d.ts +4 -4
- package/dist/es/calendar/components/Calendar.js +17 -5
- package/dist/es/calendar/components/Header.d.ts +1 -0
- package/dist/es/calendar/components/Header.js +1 -1
- package/dist/es/calendar/components/HorizontalViewList.js +1 -0
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +3 -3
- package/dist/es/calendar/components/MultiViewCalendar.js +12 -5
- package/dist/es/calendar/components/Navigation.js +9 -4
- package/dist/es/calendar/components/TodayCommand.js +4 -2
- package/dist/es/calendar/components/View.d.ts +4 -4
- package/dist/es/calendar/components/View.js +7 -5
- package/dist/es/calendar/components/ViewList.js +10 -2
- package/dist/es/calendar/services/BusViewService.js +1 -1
- package/dist/es/calendar/services/CenturyViewService.js +2 -2
- package/dist/es/calendar/services/DOMService.js +24 -6
- package/dist/es/calendar/services/DecadeViewService.js +2 -2
- package/dist/es/calendar/services/MonthViewService.js +2 -2
- package/dist/es/calendar/services/NavigationService.js +1 -1
- package/dist/es/calendar/services/ScrollSyncService.js +5 -1
- package/dist/es/calendar/services/YearViewService.js +2 -2
- package/dist/es/dateinput/DateInput.d.ts +11 -7
- package/dist/es/dateinput/DateInput.js +14 -8
- package/dist/es/dateinput/models/mask.js +1 -0
- package/dist/es/datepicker/DatePicker.d.ts +8 -8
- package/dist/es/datepicker/DatePicker.js +4 -3
- package/dist/es/daterangepicker/DateRangePicker.d.ts +3 -3
- package/dist/es/datetimepicker/DateTimePicker.d.ts +7 -7
- package/dist/es/datetimepicker/DateTimePicker.js +3 -3
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +1 -1
- package/dist/es/datetimepicker/DateTimeSelector.js +5 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +3 -3
- package/dist/es/timepicker/TimeList.js +25 -7
- package/dist/es/timepicker/TimePart.d.ts +3 -3
- package/dist/es/timepicker/TimePart.js +4 -1
- package/dist/es/timepicker/TimePicker.d.ts +7 -7
- package/dist/es/timepicker/TimePicker.js +4 -3
- package/dist/es/timepicker/TimeSelector.d.ts +2 -2
- package/dist/es/timepicker/TimeSelector.js +4 -0
- package/dist/es/timepicker/services/DOMService.js +2 -0
- package/dist/es/timepicker/services/DayPeriodService.js +9 -3
- package/dist/es/timepicker/services/HoursService.js +14 -5
- package/dist/es/timepicker/services/MinutesService.js +12 -6
- package/dist/es/timepicker/services/SecondsService.js +12 -6
- package/dist/es/utils.js +9 -5
- package/dist/es/virtualization/Virtualization.d.ts +1 -0
- package/dist/es/virtualization/Virtualization.js +13 -5
- package/dist/es/virtualization/services/RowHeightService.js +9 -5
- package/dist/es/virtualization/services/ScrollerService.js +9 -3
- package/dist/npm/calendar/components/Calendar.d.ts +4 -4
- package/dist/npm/calendar/components/Calendar.js +43 -31
- package/dist/npm/calendar/components/CalendarCell.js +1 -1
- package/dist/npm/calendar/components/CalendarNavigationItem.js +1 -1
- package/dist/npm/calendar/components/CalendarWeekCell.js +1 -1
- package/dist/npm/calendar/components/Header.d.ts +1 -0
- package/dist/npm/calendar/components/Header.js +3 -3
- package/dist/npm/calendar/components/HorizontalViewList.js +3 -2
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +3 -3
- package/dist/npm/calendar/components/MultiViewCalendar.js +49 -42
- package/dist/npm/calendar/components/Navigation.js +13 -8
- package/dist/npm/calendar/components/TodayCommand.js +9 -7
- package/dist/npm/calendar/components/View.d.ts +4 -4
- package/dist/npm/calendar/components/View.js +16 -14
- package/dist/npm/calendar/components/ViewList.js +19 -11
- package/dist/npm/calendar/services/BusViewService.js +1 -1
- package/dist/npm/calendar/services/CenturyViewService.js +38 -38
- package/dist/npm/calendar/services/DOMService.js +33 -15
- package/dist/npm/calendar/services/DecadeViewService.js +32 -32
- package/dist/npm/calendar/services/MonthViewService.js +36 -36
- package/dist/npm/calendar/services/NavigationService.js +1 -1
- package/dist/npm/calendar/services/ScrollSyncService.js +5 -1
- package/dist/npm/calendar/services/WeekNamesService.js +1 -1
- package/dist/npm/calendar/services/YearViewService.js +33 -33
- package/dist/npm/common/PickerWrap.js +1 -1
- package/dist/npm/dateinput/DateInput.d.ts +11 -7
- package/dist/npm/dateinput/DateInput.js +32 -26
- package/dist/npm/dateinput/models/kendo-date.js +11 -11
- package/dist/npm/dateinput/models/mask.js +1 -0
- package/dist/npm/datepicker/DatePicker.d.ts +8 -8
- package/dist/npm/datepicker/DatePicker.js +17 -16
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +3 -3
- package/dist/npm/daterangepicker/DateRangePicker.js +17 -17
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +7 -7
- package/dist/npm/datetimepicker/DateTimePicker.js +15 -15
- package/dist/npm/datetimepicker/DateTimeSelector.d.ts +1 -1
- package/dist/npm/datetimepicker/DateTimeSelector.js +13 -8
- package/dist/npm/hooks/usePickerFloatingLabel.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimeList.d.ts +3 -3
- package/dist/npm/timepicker/TimeList.js +29 -11
- package/dist/npm/timepicker/TimePart.d.ts +3 -3
- package/dist/npm/timepicker/TimePart.js +14 -11
- package/dist/npm/timepicker/TimePicker.d.ts +7 -7
- package/dist/npm/timepicker/TimePicker.js +19 -18
- package/dist/npm/timepicker/TimeSelector.d.ts +2 -2
- package/dist/npm/timepicker/TimeSelector.js +14 -10
- package/dist/npm/timepicker/services/DOMService.js +6 -4
- package/dist/npm/timepicker/services/DayPeriodService.js +10 -4
- package/dist/npm/timepicker/services/HoursService.js +20 -11
- package/dist/npm/timepicker/services/MinutesService.js +16 -10
- package/dist/npm/timepicker/services/SecondsService.js +16 -10
- package/dist/npm/timepicker/utils.js +11 -11
- package/dist/npm/utils.js +16 -12
- package/dist/npm/virtualization/Virtualization.d.ts +1 -0
- package/dist/npm/virtualization/Virtualization.js +15 -7
- package/dist/npm/virtualization/services/RowHeightService.js +9 -5
- package/dist/npm/virtualization/services/ScrollerService.js +9 -3
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +13 -13
|
@@ -29,14 +29,14 @@ var downStep = function (month) {
|
|
|
29
29
|
return 2;
|
|
30
30
|
};
|
|
31
31
|
var ACTIONS = (_a = {},
|
|
32
|
-
_a[NavigationAction_1.Action.Left] = function (date) { return kendo_date_math_1.addMonths(date, -1); },
|
|
33
|
-
_a[NavigationAction_1.Action.Up] = function (date) { return kendo_date_math_1.addMonths(date, upStep(date.getMonth())); },
|
|
34
|
-
_a[NavigationAction_1.Action.Right] = function (date) { return kendo_date_math_1.addMonths(date, 1); },
|
|
35
|
-
_a[NavigationAction_1.Action.Down] = function (date) { return kendo_date_math_1.addMonths(date, downStep(date.getMonth())); },
|
|
36
|
-
_a[NavigationAction_1.Action.PrevView] = function (date) { return kendo_date_math_1.addYears(date, -1); },
|
|
37
|
-
_a[NavigationAction_1.Action.NextView] = function (date) { return kendo_date_math_1.addYears(date, 1); },
|
|
38
|
-
_a[NavigationAction_1.Action.FirstInView] = function (date) { return kendo_date_math_1.firstMonthOfYear(date); },
|
|
39
|
-
_a[NavigationAction_1.Action.LastInView] = function (date) { return kendo_date_math_1.lastMonthOfYear(date); },
|
|
32
|
+
_a[NavigationAction_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addMonths)(date, -1); },
|
|
33
|
+
_a[NavigationAction_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addMonths)(date, upStep(date.getMonth())); },
|
|
34
|
+
_a[NavigationAction_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addMonths)(date, 1); },
|
|
35
|
+
_a[NavigationAction_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addMonths)(date, downStep(date.getMonth())); },
|
|
36
|
+
_a[NavigationAction_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addYears)(date, -1); },
|
|
37
|
+
_a[NavigationAction_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addYears)(date, 1); },
|
|
38
|
+
_a[NavigationAction_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstMonthOfYear)(date); },
|
|
39
|
+
_a[NavigationAction_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastMonthOfYear)(date); },
|
|
40
40
|
_a);
|
|
41
41
|
/**
|
|
42
42
|
* @hidden
|
|
@@ -46,10 +46,10 @@ var YearViewService = /** @class */ (function () {
|
|
|
46
46
|
this._intl = intl;
|
|
47
47
|
}
|
|
48
48
|
YearViewService.prototype.addToDate = function (min, skip) {
|
|
49
|
-
return kendo_date_math_1.addYears(min, skip);
|
|
49
|
+
return (0, kendo_date_math_1.addYears)(min, skip);
|
|
50
50
|
};
|
|
51
51
|
YearViewService.prototype.datesList = function (start, count) {
|
|
52
|
-
return utils_1.range(0, count).map(function (i) { return kendo_date_math_1.addYears(start, i); });
|
|
52
|
+
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addYears)(start, i); });
|
|
53
53
|
};
|
|
54
54
|
YearViewService.prototype.data = function (options) {
|
|
55
55
|
var _this = this;
|
|
@@ -58,15 +58,15 @@ var YearViewService = /** @class */ (function () {
|
|
|
58
58
|
return EMPTY_DATA;
|
|
59
59
|
}
|
|
60
60
|
var months = this.abbrMonthNames();
|
|
61
|
-
var firstDate = kendo_date_math_1.firstMonthOfYear(viewDate);
|
|
62
|
-
var lastDate = kendo_date_math_1.lastMonthOfYear(viewDate);
|
|
61
|
+
var firstDate = (0, kendo_date_math_1.firstMonthOfYear)(viewDate);
|
|
62
|
+
var lastDate = (0, kendo_date_math_1.lastMonthOfYear)(viewDate);
|
|
63
63
|
var currentYear = firstDate.getFullYear();
|
|
64
|
-
var cells = utils_1.range(0, CELLS_LENGTH);
|
|
65
|
-
var today = utils_1.getToday();
|
|
66
|
-
return utils_1.range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
67
|
-
var baseDate = kendo_date_math_1.addMonths(firstDate, rowOffset * CELLS_LENGTH);
|
|
64
|
+
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
65
|
+
var today = (0, utils_1.getToday)();
|
|
66
|
+
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
67
|
+
var baseDate = (0, kendo_date_math_1.addMonths)(firstDate, rowOffset * CELLS_LENGTH);
|
|
68
68
|
return cells.map(function (cellOffset) {
|
|
69
|
-
var cellDate = _this.normalize(kendo_date_math_1.addMonths(baseDate, cellOffset), min, max);
|
|
69
|
+
var cellDate = _this.normalize((0, kendo_date_math_1.addMonths)(baseDate, cellOffset), min, max);
|
|
70
70
|
var changedYear = currentYear < cellDate.getFullYear();
|
|
71
71
|
if (changedYear) {
|
|
72
72
|
return null;
|
|
@@ -74,16 +74,16 @@ var YearViewService = /** @class */ (function () {
|
|
|
74
74
|
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
75
75
|
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
76
76
|
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
77
|
-
var isRangeMid = isInMiddle && utils_1.isInSelectionRange(cellDate, selectionRange);
|
|
77
|
+
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
78
78
|
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
79
|
-
? utils_1.isInRange(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
79
|
+
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
80
80
|
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
81
81
|
return {
|
|
82
82
|
formattedValue: months[cellDate.getMonth()],
|
|
83
|
-
id: ""
|
|
83
|
+
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
84
84
|
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
85
85
|
isSelected: isSelected,
|
|
86
|
-
isInRange: utils_1.isInRange(cellDate, min, max),
|
|
86
|
+
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
87
87
|
isWeekend: false,
|
|
88
88
|
isRangeStart: isRangeStart,
|
|
89
89
|
isRangeMid: isRangeMid,
|
|
@@ -101,7 +101,7 @@ var YearViewService = /** @class */ (function () {
|
|
|
101
101
|
var _this = this;
|
|
102
102
|
var result = false;
|
|
103
103
|
dates.forEach(function (date) {
|
|
104
|
-
if (utils_1.isInRange(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
104
|
+
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
105
105
|
result = true;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
@@ -122,13 +122,13 @@ var YearViewService = /** @class */ (function () {
|
|
|
122
122
|
return dates[0].getFullYear() <= year && year <= dates[dates.length - 1].getFullYear();
|
|
123
123
|
};
|
|
124
124
|
YearViewService.prototype.isInRange = function (candidate, min, max) {
|
|
125
|
-
var candidateValue = kendo_date_math_1.createDate(candidate.getFullYear(), candidate.getMonth(), 1);
|
|
126
|
-
var aboveMin = !min || kendo_date_math_1.createDate(min.getFullYear(), min.getMonth(), 1) <= candidateValue;
|
|
127
|
-
var belowMax = !max || candidateValue <= kendo_date_math_1.createDate(max.getFullYear(), max.getMonth(), 1);
|
|
125
|
+
var candidateValue = (0, kendo_date_math_1.createDate)(candidate.getFullYear(), candidate.getMonth(), 1);
|
|
126
|
+
var aboveMin = !min || (0, kendo_date_math_1.createDate)(min.getFullYear(), min.getMonth(), 1) <= candidateValue;
|
|
127
|
+
var belowMax = !max || candidateValue <= (0, kendo_date_math_1.createDate)(max.getFullYear(), max.getMonth(), 1);
|
|
128
128
|
return aboveMin && belowMax;
|
|
129
129
|
};
|
|
130
130
|
YearViewService.prototype.isInSameView = function (candidate, value) {
|
|
131
|
-
return kendo_date_math_1.durationInYears(candidate, value) === 0;
|
|
131
|
+
return (0, kendo_date_math_1.durationInYears)(candidate, value) === 0;
|
|
132
132
|
};
|
|
133
133
|
YearViewService.prototype.isRangeStart = function (value) {
|
|
134
134
|
return value.getFullYear() % 10 === 0;
|
|
@@ -141,7 +141,7 @@ var YearViewService = /** @class */ (function () {
|
|
|
141
141
|
return modifier(value);
|
|
142
142
|
};
|
|
143
143
|
YearViewService.prototype.cellTitle = function (value) {
|
|
144
|
-
return value.getFullYear()
|
|
144
|
+
return "".concat(value.getFullYear(), " ").concat(this.value(value));
|
|
145
145
|
};
|
|
146
146
|
YearViewService.prototype.navigationTitle = function (value) {
|
|
147
147
|
return this.title(value);
|
|
@@ -153,28 +153,28 @@ var YearViewService = /** @class */ (function () {
|
|
|
153
153
|
return CELLS_LENGTH;
|
|
154
154
|
};
|
|
155
155
|
YearViewService.prototype.skip = function (value, min) {
|
|
156
|
-
return kendo_date_math_1.durationInYears(min, value);
|
|
156
|
+
return (0, kendo_date_math_1.durationInYears)(min, value);
|
|
157
157
|
};
|
|
158
158
|
YearViewService.prototype.total = function (min, max) {
|
|
159
|
-
return kendo_date_math_1.durationInYears(min, max) + 1;
|
|
159
|
+
return (0, kendo_date_math_1.durationInYears)(min, max) + 1;
|
|
160
160
|
};
|
|
161
161
|
YearViewService.prototype.value = function (current) {
|
|
162
162
|
return current ? this.abbrMonthNames()[current.getMonth()] : '';
|
|
163
163
|
};
|
|
164
164
|
YearViewService.prototype.viewDate = function (date, max, border) {
|
|
165
165
|
if (border === void 0) { border = 1; }
|
|
166
|
-
var renderTwoViews = kendo_date_math_1.durationInYears(date, max) < border;
|
|
167
|
-
return renderTwoViews ? kendo_date_math_1.addYears(date, -1) : date;
|
|
166
|
+
var renderTwoViews = (0, kendo_date_math_1.durationInYears)(date, max) < border;
|
|
167
|
+
return renderTwoViews ? (0, kendo_date_math_1.addYears)(date, -1) : date;
|
|
168
168
|
};
|
|
169
169
|
YearViewService.prototype.abbrMonthNames = function () {
|
|
170
170
|
return this._intl.dateFormatNames({ nameType: 'abbreviated', type: 'months' });
|
|
171
171
|
};
|
|
172
172
|
YearViewService.prototype.normalize = function (cellDate, min, max) {
|
|
173
173
|
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
174
|
-
return kendo_date_math_2.cloneDate(min);
|
|
174
|
+
return (0, kendo_date_math_2.cloneDate)(min);
|
|
175
175
|
}
|
|
176
176
|
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
177
|
-
return kendo_date_math_2.cloneDate(max);
|
|
177
|
+
return (0, kendo_date_math_2.cloneDate)(max);
|
|
178
178
|
}
|
|
179
179
|
return cellDate;
|
|
180
180
|
};
|
|
@@ -12,6 +12,6 @@ exports.PickerWrap = React.forwardRef(function (props, ref) {
|
|
|
12
12
|
var element = React.useRef(null);
|
|
13
13
|
React.useImperativeHandle(ref, function () { return element.current; });
|
|
14
14
|
React.useImperativeHandle(_ref, function () { return element.current; });
|
|
15
|
-
var className = React.useMemo(function () { return kendo_react_common_1.classNames(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
15
|
+
var className = React.useMemo(function () { return (0, kendo_react_common_1.classNames)(props.className, 'k-picker-wrap'); }, [props.className]);
|
|
16
16
|
return (React.createElement("span", { ref: element, id: props.id, style: props.style, className: className, tabIndex: props.tabIndex }, props.children));
|
|
17
17
|
});
|
|
@@ -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
|
*/
|
|
@@ -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" | "full" | "large">;
|
|
151
|
-
fillMode: PropTypes.Requireable<"flat" | "
|
|
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" | "full" | "large";
|
|
160
|
-
fillMode: "flat" | "
|
|
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:
|
|
175
|
+
placeholder: null;
|
|
172
176
|
};
|
|
173
177
|
private kendoDate;
|
|
174
178
|
private currentFormat;
|
|
@@ -25,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
29
|
-
for (var i = 0,
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
36
|
};
|
|
33
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
38
|
exports.DateInput = exports.DateInputPropsContext = exports.DateInputWithoutContext = void 0;
|
|
@@ -55,10 +59,12 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
55
59
|
function DateInputWithoutContext(props) {
|
|
56
60
|
var _this = _super.call(this, props) || this;
|
|
57
61
|
_this.kendoDate = null;
|
|
62
|
+
_this.currentFormat = '';
|
|
58
63
|
_this.paste = false;
|
|
59
64
|
_this._element = null;
|
|
60
65
|
_this._wrapper = null;
|
|
61
|
-
_this._inputId = kendo_react_common_1.guid();
|
|
66
|
+
_this._inputId = (0, kendo_react_common_1.guid)();
|
|
67
|
+
_this._lastSelectedSymbol = '';
|
|
62
68
|
/**
|
|
63
69
|
* @hidden
|
|
64
70
|
*/
|
|
@@ -81,7 +87,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
81
87
|
if (!_this.element || !_this.kendoDate) {
|
|
82
88
|
return;
|
|
83
89
|
}
|
|
84
|
-
var value = kendo_react_intl_1.provideIntlService(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
90
|
+
var value = (0, kendo_react_intl_1.provideIntlService)(_this).parseDate(_this.element.value, _this.props.format) || _this.value;
|
|
85
91
|
var oldValue = _this.value;
|
|
86
92
|
_this.kendoDate.setValue(value);
|
|
87
93
|
_this.triggerChange(event, oldValue);
|
|
@@ -110,7 +116,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
110
116
|
var _a = _this.kendoDate.getTextAndFormat(), text = _a.text, currentFormat = _a.format;
|
|
111
117
|
_this.currentFormat = currentFormat;
|
|
112
118
|
var dateBeforeChange = _this.value;
|
|
113
|
-
var diff = utils_1.approximateStringMatching(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
119
|
+
var diff = (0, utils_1.approximateStringMatching)(text, _this.currentFormat, _this.element.value, _this.selection.start);
|
|
114
120
|
var navigationOnly = (diff.length === 1 && diff[0][1] === '_');
|
|
115
121
|
if (!navigationOnly) {
|
|
116
122
|
for (var i = 0; i < diff.length; i++) {
|
|
@@ -203,7 +209,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
203
209
|
}
|
|
204
210
|
_this.setState({ focused: false });
|
|
205
211
|
};
|
|
206
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
212
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
207
213
|
_this.state = {
|
|
208
214
|
focused: false
|
|
209
215
|
};
|
|
@@ -247,7 +253,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
247
253
|
if (this.props._ref) {
|
|
248
254
|
this.props._ref.current = this;
|
|
249
255
|
}
|
|
250
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
256
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
251
257
|
var props = __assign(__assign({}, DateInputWithoutContext.defaultProps), this.props);
|
|
252
258
|
var min = props.min, max = props.max, name = props.name, label = props.label, id = props.id;
|
|
253
259
|
var currentText = this.text;
|
|
@@ -263,7 +269,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
263
269
|
if (this.value !== null) {
|
|
264
270
|
ariaProps['aria-valuenow'] = this.value.getTime();
|
|
265
271
|
}
|
|
266
|
-
var wrapperClassesInstance = __spreadArray([], utils_1.wrapperClasses);
|
|
272
|
+
var wrapperClassesInstance = __spreadArray([], utils_1.wrapperClasses, true);
|
|
267
273
|
if (this.props.className) {
|
|
268
274
|
wrapperClassesInstance.push(this.props.className);
|
|
269
275
|
}
|
|
@@ -272,10 +278,10 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
272
278
|
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
273
279
|
return (React.createElement("span", { ref: function (span) { _this._wrapper = span; }, style: !label
|
|
274
280
|
? { width: _this.props.width }
|
|
275
|
-
: undefined, dir: _this.props.dir, className: kendo_react_common_1.classNames('k-dateinput', 'k-input', (_b = {},
|
|
276
|
-
_b["k-input-"
|
|
277
|
-
_b["k-input-"
|
|
278
|
-
_b["k-rounded-"
|
|
281
|
+
: undefined, dir: _this.props.dir, className: (0, kendo_react_common_1.classNames)('k-dateinput', 'k-input', (_b = {},
|
|
282
|
+
_b["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
283
|
+
_b["k-input-".concat(fillMode)] = fillMode,
|
|
284
|
+
_b["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
279
285
|
_b['k-invalid'] = !isValid,
|
|
280
286
|
_b['k-required'] = _this.required,
|
|
281
287
|
_b['k-disabled'] = _this.props.disabled,
|
|
@@ -366,8 +372,8 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
366
372
|
* Represents the validity state into which the DateInput is set.
|
|
367
373
|
*/
|
|
368
374
|
get: function () {
|
|
369
|
-
var inRange = utils_1.isInRange(this.value, this.min, this.max)
|
|
370
|
-
&& utils_3.isInTimeRange(this.value, this.props.minTime, this.props.maxTime);
|
|
375
|
+
var inRange = (0, utils_1.isInRange)(this.value, this.min, this.max)
|
|
376
|
+
&& (0, utils_3.isInTimeRange)(this.value, this.props.minTime, this.props.maxTime);
|
|
371
377
|
var customError = this.props.validationMessage !== undefined;
|
|
372
378
|
var isValid = (!this.required || this.value !== null) && inRange;
|
|
373
379
|
var valid = this.props.valid !== undefined ? this.props.valid : isValid;
|
|
@@ -458,7 +464,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
458
464
|
* @hidden
|
|
459
465
|
*/
|
|
460
466
|
DateInputWithoutContext.prototype.intl = function () {
|
|
461
|
-
return kendo_react_intl_1.provideIntlService(this);
|
|
467
|
+
return (0, kendo_react_intl_1.provideIntlService)(this);
|
|
462
468
|
};
|
|
463
469
|
Object.defineProperty(DateInputWithoutContext.prototype, "selection", {
|
|
464
470
|
/* end handlers */
|
|
@@ -485,7 +491,7 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
485
491
|
this.valueDuringOnChange = this.value;
|
|
486
492
|
this.forceUpdate();
|
|
487
493
|
if (this.props.onChange
|
|
488
|
-
&& !kendo_date_math_1.isEqual(oldValue, this.value)) {
|
|
494
|
+
&& !(0, kendo_date_math_1.isEqual)(oldValue, this.value)) {
|
|
489
495
|
// isEqual works with null
|
|
490
496
|
this.props.onChange.call(undefined, {
|
|
491
497
|
syntheticEvent: event,
|
|
@@ -661,10 +667,10 @@ var DateInputWithoutContext = /** @class */ (function (_super) {
|
|
|
661
667
|
// defaultValue: null as Date | null,
|
|
662
668
|
spinners: false,
|
|
663
669
|
disabled: false,
|
|
664
|
-
max: kendo_date_math_1.cloneDate(utils_2.MAX_DATE),
|
|
665
|
-
min: kendo_date_math_1.cloneDate(utils_2.MIN_DATE),
|
|
666
|
-
minTime: kendo_date_math_1.cloneDate(defaults_1.MIN_TIME),
|
|
667
|
-
maxTime: kendo_date_math_1.cloneDate(defaults_1.MAX_TIME),
|
|
670
|
+
max: (0, kendo_date_math_1.cloneDate)(utils_2.MAX_DATE),
|
|
671
|
+
min: (0, kendo_date_math_1.cloneDate)(utils_2.MIN_DATE),
|
|
672
|
+
minTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MIN_TIME),
|
|
673
|
+
maxTime: (0, kendo_date_math_1.cloneDate)(defaults_1.MAX_TIME),
|
|
668
674
|
required: false,
|
|
669
675
|
validityStyles: true,
|
|
670
676
|
validationMessage: VALIDATION_MESSAGE,
|
|
@@ -680,7 +686,7 @@ exports.DateInputWithoutContext = DateInputWithoutContext;
|
|
|
680
686
|
*
|
|
681
687
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
682
688
|
*/
|
|
683
|
-
exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
689
|
+
exports.DateInputPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
684
690
|
;
|
|
685
691
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
686
692
|
/**
|
|
@@ -689,7 +695,7 @@ exports.DateInputPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
689
695
|
* Accepts properties of type [DateInputProps]({% slug api_dateinputs_dateinputprops %}).
|
|
690
696
|
* Obtaining the `ref` returns an object of type [DateInputHandle]({% slug api_dateinputs_dateinputhandle %}).
|
|
691
697
|
*/
|
|
692
|
-
exports.DateInput = kendo_react_common_1.withPropsContext(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
698
|
+
exports.DateInput = (0, kendo_react_common_1.withPropsContext)(exports.DateInputPropsContext, DateInputWithoutContext);
|
|
693
699
|
exports.DateInput.displayName = 'KendoReactDateInput';
|
|
694
|
-
kendo_react_intl_1.registerForIntl(DateInputWithoutContext);
|
|
695
|
-
kendo_react_intl_1.registerForLocalization(DateInputWithoutContext);
|
|
700
|
+
(0, kendo_react_intl_1.registerForIntl)(DateInputWithoutContext);
|
|
701
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateInputWithoutContext);
|
|
@@ -30,7 +30,7 @@ var KendoDate = /** @class */ (function () {
|
|
|
30
30
|
's': 's',
|
|
31
31
|
'y': 'y'
|
|
32
32
|
};
|
|
33
|
-
this._value = kendo_date_math_1.getDate(new Date());
|
|
33
|
+
this._value = (0, kendo_date_math_1.getDate)(new Date());
|
|
34
34
|
this.intlProvider = intlProvider;
|
|
35
35
|
this.formatPlaceholder = formatPlaceholder;
|
|
36
36
|
this.format = format;
|
|
@@ -52,11 +52,11 @@ var KendoDate = /** @class */ (function () {
|
|
|
52
52
|
});
|
|
53
53
|
KendoDate.prototype.setValue = function (value) {
|
|
54
54
|
if (!value) {
|
|
55
|
-
this._value = kendo_date_math_1.getDate(new Date());
|
|
55
|
+
this._value = (0, kendo_date_math_1.getDate)(new Date());
|
|
56
56
|
this.modifyExisting(false);
|
|
57
57
|
}
|
|
58
|
-
else if (!kendo_date_math_1.isEqual(value, this._value)) {
|
|
59
|
-
this._value = kendo_date_math_1.cloneDate(value);
|
|
58
|
+
else if (!(0, kendo_date_math_1.isEqual)(value, this._value)) {
|
|
59
|
+
this._value = (0, kendo_date_math_1.cloneDate)(value);
|
|
60
60
|
this.modifyExisting(true);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
@@ -71,7 +71,7 @@ var KendoDate = /** @class */ (function () {
|
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return kendo_date_math_1.cloneDate(this.value);
|
|
74
|
+
return (0, kendo_date_math_1.cloneDate)(this.value);
|
|
75
75
|
};
|
|
76
76
|
KendoDate.prototype.getTextAndFormat = function () {
|
|
77
77
|
return this.merge(this.intl.formatDate(this.value, this.format), this.dateFormatString(this.value, this.format));
|
|
@@ -129,13 +129,13 @@ var KendoDate = /** @class */ (function () {
|
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
KendoDate.prototype.modifyPart = function (symbol, offset) {
|
|
132
|
-
var newValue = kendo_date_math_1.cloneDate(this.value);
|
|
132
|
+
var newValue = (0, kendo_date_math_1.cloneDate)(this.value);
|
|
133
133
|
switch (symbol) {
|
|
134
134
|
case 'y':
|
|
135
135
|
newValue.setFullYear(newValue.getFullYear() + offset);
|
|
136
136
|
break;
|
|
137
137
|
case 'M':
|
|
138
|
-
newValue = kendo_date_math_1.addMonths(this.value, offset);
|
|
138
|
+
newValue = (0, kendo_date_math_1.addMonths)(this.value, offset);
|
|
139
139
|
break;
|
|
140
140
|
case 'd':
|
|
141
141
|
case 'E':
|
|
@@ -201,17 +201,17 @@ var KendoDate = /** @class */ (function () {
|
|
|
201
201
|
if (symbol === 'M' && !month) {
|
|
202
202
|
var monthNumber = middleNumber - 1;
|
|
203
203
|
if (monthNumber > -1 && monthNumber < 12) {
|
|
204
|
-
parsedDate = kendo_date_math_1.cloneDate(this.value);
|
|
204
|
+
parsedDate = (0, kendo_date_math_1.cloneDate)(this.value);
|
|
205
205
|
parsedDate.setMonth(monthNumber);
|
|
206
206
|
if (parsedDate.getMonth() !== monthNumber) {
|
|
207
|
-
parsedDate = kendo_date_math_1.lastDayOfMonth(kendo_date_math_1.addMonths(parsedDate, -1));
|
|
207
|
+
parsedDate = (0, kendo_date_math_1.lastDayOfMonth)((0, kendo_date_math_1.addMonths)(parsedDate, -1));
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
if (symbol === 'y') {
|
|
212
|
-
parsedDate = kendo_date_math_1.createDate(parseInt(middle, 10), this.month ? this.value.getMonth() : 0, this.date ? this.value.getDate() : 1, this.hours ? this.value.getHours() : 0, this.minutes ? this.value.getMinutes() : 0, this.seconds ? this.value.getSeconds() : 0, this.milliseconds ? this.value.getMilliseconds() : 0);
|
|
212
|
+
parsedDate = (0, kendo_date_math_1.createDate)(parseInt(middle, 10), this.month ? this.value.getMonth() : 0, this.date ? this.value.getDate() : 1, this.hours ? this.value.getHours() : 0, this.minutes ? this.value.getMinutes() : 0, this.seconds ? this.value.getSeconds() : 0, this.milliseconds ? this.value.getMilliseconds() : 0);
|
|
213
213
|
if (this.date && parsedDate.getDate() !== this.value.getDate()) {
|
|
214
|
-
parsedDate = kendo_date_math_1.lastDayOfMonth(kendo_date_math_1.addMonths(parsedDate, -1));
|
|
214
|
+
parsedDate = (0, kendo_date_math_1.lastDayOfMonth)((0, kendo_date_math_1.addMonths)(parsedDate, -1));
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -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" | "
|
|
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:
|
|
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" | "
|
|
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;
|
|
@@ -58,11 +58,12 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
58
58
|
__extends(DatePickerWithoutContext, _super);
|
|
59
59
|
function DatePickerWithoutContext(props) {
|
|
60
60
|
var _this = _super.call(this, props) || this;
|
|
61
|
-
_this._popupId = kendo_react_common_1.guid();
|
|
61
|
+
_this._popupId = (0, kendo_react_common_1.guid)();
|
|
62
62
|
_this._element = null;
|
|
63
63
|
_this._dateInput = React.createRef();
|
|
64
64
|
_this._calendar = null;
|
|
65
65
|
_this.shouldFocusDateInput = false;
|
|
66
|
+
_this.prevShow = false;
|
|
66
67
|
/**
|
|
67
68
|
* @hidden
|
|
68
69
|
*/
|
|
@@ -93,7 +94,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
93
94
|
};
|
|
94
95
|
_this.handleValueChange = function (value, event) {
|
|
95
96
|
_this.setState({
|
|
96
|
-
value: kendo_date_math_1.cloneDate(value || undefined),
|
|
97
|
+
value: (0, kendo_date_math_1.cloneDate)(value || undefined),
|
|
97
98
|
show: false
|
|
98
99
|
});
|
|
99
100
|
_this.valueDuringOnChange = value;
|
|
@@ -143,7 +144,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
143
144
|
_this.setShow(keyCode === kendo_react_common_1.Keys.down);
|
|
144
145
|
}
|
|
145
146
|
};
|
|
146
|
-
kendo_react_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
147
|
+
(0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
147
148
|
_this.state = {
|
|
148
149
|
value: _this.props.defaultValue || DatePickerWithoutContext.defaultProps.defaultValue,
|
|
149
150
|
show: _this.props.defaultShow || DatePickerWithoutContext.defaultProps.defaultShow,
|
|
@@ -191,7 +192,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
191
192
|
: this.props.value !== undefined
|
|
192
193
|
? this.props.value
|
|
193
194
|
: this.state.value;
|
|
194
|
-
return (value !== null) ? kendo_date_math_1.cloneDate(value) : null;
|
|
195
|
+
return (value !== null) ? (0, kendo_date_math_1.cloneDate)(value) : null;
|
|
195
196
|
},
|
|
196
197
|
enumerable: false,
|
|
197
198
|
configurable: true
|
|
@@ -278,7 +279,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
278
279
|
* Represents the validity state into which the DatePicker is set.
|
|
279
280
|
*/
|
|
280
281
|
get: function () {
|
|
281
|
-
var inRange = utils_2.isInDateRange(this.value, this.min, this.max);
|
|
282
|
+
var inRange = (0, utils_2.isInDateRange)(this.value, this.min, this.max);
|
|
282
283
|
var customError = this.props.validationMessage !== undefined;
|
|
283
284
|
var isValid = (!this.required || this.value !== null) && inRange;
|
|
284
285
|
var valid = this.props.valid !== undefined ? this.props.valid : isValid;
|
|
@@ -357,9 +358,9 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
357
358
|
var _e = this.props.popupSettings, popupClass = _e.popupClass, otherPopupSettings = __rest(_e, ["popupClass"]);
|
|
358
359
|
var show = this.show;
|
|
359
360
|
var value = this.value;
|
|
360
|
-
var sanitizedValue = value && kendo_date_math_1.getDate(value);
|
|
361
|
+
var sanitizedValue = value && (0, kendo_date_math_1.getDate)(value);
|
|
361
362
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
362
|
-
var popupClassNames = kendo_react_common_1.classNames('k-calendar-container k-group k-reset', popupClass);
|
|
363
|
+
var popupClassNames = (0, kendo_react_common_1.classNames)('k-calendar-container k-group k-reset', popupClass);
|
|
363
364
|
var dateInputProps = {
|
|
364
365
|
disabled: disabled,
|
|
365
366
|
format: format,
|
|
@@ -403,15 +404,15 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
403
404
|
focusedDate: focusedDate,
|
|
404
405
|
onChange: this.handleCalendarValueChange
|
|
405
406
|
};
|
|
406
|
-
var toggleButtonTitle = kendo_react_intl_1.provideLocalizationService(this)
|
|
407
|
+
var toggleButtonTitle = (0, kendo_react_intl_1.provideLocalizationService)(this)
|
|
407
408
|
.toLanguageString(messages_1.toggleCalendar, messages_1.messages[messages_1.toggleCalendar]);
|
|
408
409
|
var datepicker = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncBlur: this.props.onBlur, onSyncFocus: this.props.onFocus }, function (_a) {
|
|
409
410
|
var _b;
|
|
410
411
|
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
411
|
-
return (React.createElement("span", { role: "group", "aria-expanded": _this.show, ref: function (span) { _this._element = span; }, className: kendo_react_common_1.classNames('k-input', 'k-datepicker', (_b = {},
|
|
412
|
-
_b["k-input-"
|
|
413
|
-
_b["k-rounded-"
|
|
414
|
-
_b["k-input-"
|
|
412
|
+
return (React.createElement("span", { role: "group", "aria-expanded": _this.show, ref: function (span) { _this._element = span; }, className: (0, kendo_react_common_1.classNames)('k-input', 'k-datepicker', (_b = {},
|
|
413
|
+
_b["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
414
|
+
_b["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
415
|
+
_b["k-input-".concat(fillMode)] = fillMode,
|
|
415
416
|
_b['k-invalid'] = !isValid,
|
|
416
417
|
_b['k-required'] = _this.required,
|
|
417
418
|
_b['k-disabled'] = _this.props.disabled,
|
|
@@ -432,7 +433,7 @@ var DatePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
432
433
|
this.setState({ show: show });
|
|
433
434
|
};
|
|
434
435
|
DatePickerWithoutContext.prototype.mergeTime = function (value) {
|
|
435
|
-
return this.value && value ? utils_1.setTime(value, this.value) : value;
|
|
436
|
+
return this.value && value ? (0, utils_1.setTime)(value, this.value) : value;
|
|
436
437
|
};
|
|
437
438
|
DatePickerWithoutContext.prototype.nextTick = function (f) {
|
|
438
439
|
// XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
|
|
@@ -544,7 +545,7 @@ exports.DatePickerWithoutContext = DatePickerWithoutContext;
|
|
|
544
545
|
*
|
|
545
546
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
546
547
|
*/
|
|
547
|
-
exports.DatePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
548
|
+
exports.DatePickerPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
548
549
|
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
549
550
|
/**
|
|
550
551
|
* Represents the KendoReact DatePicker Component.
|
|
@@ -552,6 +553,6 @@ exports.DatePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
552
553
|
* Accepts properties of type [DatePickerProps]({% slug api_dateinputs_datepickerprops %}).
|
|
553
554
|
* Obtaining the `ref` returns an object of type [DatePickerHandle]({% slug api_dateinputs_datepickerhandle %}).
|
|
554
555
|
*/
|
|
555
|
-
exports.DatePicker = kendo_react_common_1.withPropsContext(exports.DatePickerPropsContext, DatePickerWithoutContext);
|
|
556
|
+
exports.DatePicker = (0, kendo_react_common_1.withPropsContext)(exports.DatePickerPropsContext, DatePickerWithoutContext);
|
|
556
557
|
exports.DatePicker.displayName = 'KendoReactDatePicker';
|
|
557
|
-
kendo_react_intl_1.registerForLocalization(DatePickerWithoutContext);
|
|
558
|
+
(0, kendo_react_intl_1.registerForLocalization)(DatePickerWithoutContext);
|
|
@@ -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" | "
|
|
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<{
|