@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
|
@@ -51,9 +51,9 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
51
51
|
_this._calendar = null;
|
|
52
52
|
_this._startDateInput = React.createRef();
|
|
53
53
|
_this._endDateInput = React.createRef();
|
|
54
|
-
_this._popupId = kendo_react_common_1.guid();
|
|
55
|
-
_this._startInputId = kendo_react_common_1.guid();
|
|
56
|
-
_this._endInputId = kendo_react_common_1.guid();
|
|
54
|
+
_this._popupId = (0, kendo_react_common_1.guid)();
|
|
55
|
+
_this._startInputId = (0, kendo_react_common_1.guid)();
|
|
56
|
+
_this._endInputId = (0, kendo_react_common_1.guid)();
|
|
57
57
|
_this.shouldFocusDateInput = false;
|
|
58
58
|
_this.shouldFocusCalendar = false;
|
|
59
59
|
/**
|
|
@@ -131,13 +131,13 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
131
131
|
_this.handleEndChange = function (event) {
|
|
132
132
|
var value = {
|
|
133
133
|
start: _this.value.start,
|
|
134
|
-
end: kendo_date_math_1.cloneDate(event.value || undefined)
|
|
134
|
+
end: (0, kendo_date_math_1.cloneDate)(event.value || undefined)
|
|
135
135
|
};
|
|
136
136
|
_this.handleChange(value, event);
|
|
137
137
|
};
|
|
138
138
|
_this.handleStartChange = function (event) {
|
|
139
139
|
var value = {
|
|
140
|
-
start: kendo_date_math_1.cloneDate(event.value || undefined),
|
|
140
|
+
start: (0, kendo_date_math_1.cloneDate)(event.value || undefined),
|
|
141
141
|
end: _this.value.end
|
|
142
142
|
};
|
|
143
143
|
_this.handleChange(value, event);
|
|
@@ -196,7 +196,7 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
196
196
|
}
|
|
197
197
|
_this.valueDuringOnChange = undefined;
|
|
198
198
|
};
|
|
199
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
199
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
200
200
|
_this.state = {
|
|
201
201
|
show: _this.props.show || _this.props.defaultShow || DateRangePickerWithoutContext.defaultProps.defaultShow,
|
|
202
202
|
value: _this.props.value || _this.props.defaultValue || DateRangePickerWithoutContext.defaultProps.defaultValue
|
|
@@ -330,10 +330,10 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
330
330
|
var value = this.value || models_1.EMPTY_SELECTIONRANGE;
|
|
331
331
|
var startDateInputId = (this.props.startDateInputSettings || {}).id || this._startInputId;
|
|
332
332
|
var endDateInputId = (this.props.endDateInputSettings || {}).id || this._endInputId;
|
|
333
|
-
var rootClassName = kendo_react_common_1.classNames('k-daterangepicker', {
|
|
333
|
+
var rootClassName = (0, kendo_react_common_1.classNames)('k-daterangepicker', {
|
|
334
334
|
'k-disabled': this.props.disabled
|
|
335
335
|
}, this.props.className);
|
|
336
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
336
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
337
337
|
var startMessage = localizationService.toLanguageString(messages_1.start, messages_1.messages[messages_1.start]);
|
|
338
338
|
var endMessage = localizationService.toLanguageString(messages_1.end, messages_1.messages[messages_1.end]);
|
|
339
339
|
var separatorMessage = localizationService.toLanguageString(messages_1.separator, messages_1.messages[messages_1.separator]);
|
|
@@ -350,10 +350,10 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
350
350
|
var calendar = this.props.calendar
|
|
351
351
|
? React.createElement(this.props.calendar, __assign({}, calendarProps))
|
|
352
352
|
: React.createElement(MultiViewCalendar_1.MultiViewCalendar, __assign({}, calendarProps, { ref: this.setCalendarRef }));
|
|
353
|
-
var reverseButton = (React.createElement(kendo_react_buttons_1.Button, __assign({ className: "k-select", fillMode: "flat", title: kendo_react_intl_1.provideLocalizationService(this)
|
|
353
|
+
var reverseButton = (React.createElement(kendo_react_buttons_1.Button, __assign({ className: "k-select", fillMode: "flat", title: (0, kendo_react_intl_1.provideLocalizationService)(this)
|
|
354
354
|
.toLanguageString(messages_1.swapStartEnd, messages_1.messages[messages_1.swapStartEnd]), onMouseDown: this.handleReverseMouseDown, onClick: this.handleReverseClick }, {
|
|
355
355
|
'aria-controls': startDateInputId + ' ' + endDateInputId,
|
|
356
|
-
'aria-label': kendo_react_intl_1.provideLocalizationService(this)
|
|
356
|
+
'aria-label': (0, kendo_react_intl_1.provideLocalizationService)(this)
|
|
357
357
|
.toLanguageString(messages_1.swapStartEnd, messages_1.messages[messages_1.swapStartEnd])
|
|
358
358
|
}),
|
|
359
359
|
React.createElement("span", { style: { transform: 'rotate(90deg)' }, className: "k-icon k-i-arrows-swap" })));
|
|
@@ -414,8 +414,8 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
414
414
|
className: PropTypes.string,
|
|
415
415
|
defaultShow: PropTypes.bool,
|
|
416
416
|
defaultValue: PropTypes.shape({
|
|
417
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date).isRequired),
|
|
418
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date).isRequired)
|
|
417
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired),
|
|
418
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired)
|
|
419
419
|
}),
|
|
420
420
|
disabled: PropTypes.bool,
|
|
421
421
|
endDateInputSettings: PropTypes.shape(DateInput_1.DateInputWithoutContext.propTypes),
|
|
@@ -455,8 +455,8 @@ var DateRangePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
455
455
|
swapButton: PropTypes.any,
|
|
456
456
|
tabIndex: PropTypes.number,
|
|
457
457
|
value: PropTypes.shape({
|
|
458
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date).isRequired),
|
|
459
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date).isRequired)
|
|
458
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired),
|
|
459
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired)
|
|
460
460
|
})
|
|
461
461
|
};
|
|
462
462
|
/**
|
|
@@ -481,7 +481,7 @@ exports.DateRangePickerWithoutContext = DateRangePickerWithoutContext;
|
|
|
481
481
|
*
|
|
482
482
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
483
483
|
*/
|
|
484
|
-
exports.DateRangePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
484
|
+
exports.DateRangePickerPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
485
485
|
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
486
486
|
/**
|
|
487
487
|
* Represents the KendoReact DateRangePicker Component.
|
|
@@ -489,6 +489,6 @@ exports.DateRangePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
489
489
|
* Accepts properties of type [DateRangePickerProps]({% slug api_dateinputs_daterangepickerprops %}).
|
|
490
490
|
* Obtaining the `ref` returns an object of type [DateRangePickerHandle]({% slug api_dateinputs_daterangepickerhandle %}).
|
|
491
491
|
*/
|
|
492
|
-
exports.DateRangePicker = kendo_react_common_1.withPropsContext(exports.DateRangePickerPropsContext, DateRangePickerWithoutContext);
|
|
492
|
+
exports.DateRangePicker = (0, kendo_react_common_1.withPropsContext)(exports.DateRangePickerPropsContext, DateRangePickerWithoutContext);
|
|
493
493
|
exports.DateRangePicker.displayName = 'KendoReactDateRangePicker';
|
|
494
|
-
kendo_react_intl_1.registerForLocalization(DateRangePickerWithoutContext);
|
|
494
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateRangePickerWithoutContext);
|
|
@@ -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" | "
|
|
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:
|
|
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" | "
|
|
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
|
|
@@ -48,7 +48,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
48
48
|
__extends(DateTimePickerWithoutContext, _super);
|
|
49
49
|
function DateTimePickerWithoutContext(props) {
|
|
50
50
|
var _this = _super.call(this, props) || this;
|
|
51
|
-
_this._popupId = kendo_react_common_1.guid();
|
|
51
|
+
_this._popupId = (0, kendo_react_common_1.guid)();
|
|
52
52
|
_this._element = null;
|
|
53
53
|
_this._dateInput = React.createRef();
|
|
54
54
|
_this._dateTimeSelector = null;
|
|
@@ -69,7 +69,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
69
69
|
};
|
|
70
70
|
_this.handleValueChange = function (event) {
|
|
71
71
|
_this.setState({
|
|
72
|
-
value: kendo_date_math_1.cloneDate(event.value || undefined),
|
|
72
|
+
value: (0, kendo_date_math_1.cloneDate)(event.value || undefined),
|
|
73
73
|
show: false
|
|
74
74
|
});
|
|
75
75
|
_this.valueDuringOnChange = event.value;
|
|
@@ -123,7 +123,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
123
123
|
return (_this.dateInput && _this.dateInput.element) ||
|
|
124
124
|
(_this.element && _this.element.querySelector('.k-dateinput > input.k-input-inner'));
|
|
125
125
|
};
|
|
126
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
126
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
127
127
|
_this.state = {
|
|
128
128
|
value: _this.props.defaultValue || DateTimePickerWithoutContext.defaultProps.defaultValue,
|
|
129
129
|
show: _this.props.defaultShow || DateTimePickerWithoutContext.defaultProps.defaultShow,
|
|
@@ -161,7 +161,7 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
161
161
|
: this.props.value !== undefined
|
|
162
162
|
? this.props.value
|
|
163
163
|
: this.state.value;
|
|
164
|
-
return (value !== null) ? kendo_date_math_1.cloneDate(value) : null;
|
|
164
|
+
return (value !== null) ? (0, kendo_date_math_1.cloneDate)(value) : null;
|
|
165
165
|
},
|
|
166
166
|
enumerable: false,
|
|
167
167
|
configurable: true
|
|
@@ -213,8 +213,8 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
213
213
|
* Represents the validity state into which the DateTimePicker is set.
|
|
214
214
|
*/
|
|
215
215
|
get: function () {
|
|
216
|
-
var inRange = utils_1.isInDateRange(this.value, this.min, this.max)
|
|
217
|
-
&& utils_2.isInTimeRange(this.value, this.props.minTime || defaults_1.MIN_TIME, this.props.maxTime || utils_1.MAX_TIME);
|
|
216
|
+
var inRange = (0, utils_1.isInDateRange)(this.value, this.min, this.max)
|
|
217
|
+
&& (0, utils_2.isInTimeRange)(this.value, this.props.minTime || defaults_1.MIN_TIME, this.props.maxTime || utils_1.MAX_TIME);
|
|
218
218
|
var customError = this.props.validationMessage !== undefined;
|
|
219
219
|
var isValid = (!this.required || this.value !== null) && inRange;
|
|
220
220
|
var valid = this.props.valid !== undefined ? this.props.valid : isValid;
|
|
@@ -335,19 +335,19 @@ var DateTimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
335
335
|
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
336
336
|
return (React.createElement("div", { ref: function (div) {
|
|
337
337
|
_this._element = div;
|
|
338
|
-
}, className: kendo_react_common_1.classNames('k-input', 'k-datetimepicker', (_b = {},
|
|
339
|
-
_b["k-input-"
|
|
340
|
-
_b["k-rounded-"
|
|
341
|
-
_b["k-input-"
|
|
338
|
+
}, className: (0, kendo_react_common_1.classNames)('k-input', 'k-datetimepicker', (_b = {},
|
|
339
|
+
_b["k-input-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
340
|
+
_b["k-rounded-".concat(kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
341
|
+
_b["k-input-".concat(fillMode)] = fillMode,
|
|
342
342
|
_b['k-invalid'] = !isValid,
|
|
343
343
|
_b['k-required'] = _this.required,
|
|
344
344
|
_b['k-disabled'] = _this.props.disabled,
|
|
345
345
|
_b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
|
|
346
346
|
React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dataInputProps)),
|
|
347
|
-
React.createElement(kendo_react_buttons_1.Button, __assign({ tabIndex: -1, type: "button", icon: 'calendar', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: kendo_react_intl_1.provideLocalizationService(_this)
|
|
347
|
+
React.createElement(kendo_react_buttons_1.Button, __assign({ tabIndex: -1, type: "button", icon: 'calendar', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleDateIconClick, title: (0, kendo_react_intl_1.provideLocalizationService)(_this)
|
|
348
348
|
.toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector]), className: "k-input-button", rounded: null }, {
|
|
349
349
|
'aria-controls': _this._popupId,
|
|
350
|
-
'aria-label': kendo_react_intl_1.provideLocalizationService(_this)
|
|
350
|
+
'aria-label': (0, kendo_react_intl_1.provideLocalizationService)(_this)
|
|
351
351
|
.toLanguageString(messages_1.toggleDateTimeSelector, messages_1.messages[messages_1.toggleDateTimeSelector])
|
|
352
352
|
})),
|
|
353
353
|
React.createElement(PopupComponent, { show: _this.show, animate: _this.element !== null, anchor: _this.element, className: "k-datetime-container k-group k-reset", id: _this._popupId, anchorAlign: {
|
|
@@ -476,7 +476,7 @@ exports.DateTimePickerWithoutContext = DateTimePickerWithoutContext;
|
|
|
476
476
|
*
|
|
477
477
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
478
478
|
*/
|
|
479
|
-
exports.DateTimePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
479
|
+
exports.DateTimePickerPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
480
480
|
/* eslint-disable @typescript-eslint/no-redeclare */
|
|
481
481
|
/**
|
|
482
482
|
* Represents the KendoReact DateTimePicker Component.
|
|
@@ -484,6 +484,6 @@ exports.DateTimePickerPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
484
484
|
* Accepts properties of type [DateTimePickerProps]({% slug api_dateinputs_datetimepickerprops %}).
|
|
485
485
|
* Obtaining the `ref` returns an object of type [DateTimePickerHandle]({% slug api_dateinputs_datetimepickerhandle %}).
|
|
486
486
|
*/
|
|
487
|
-
exports.DateTimePicker = kendo_react_common_1.withPropsContext(exports.DateTimePickerPropsContext, DateTimePickerWithoutContext);
|
|
487
|
+
exports.DateTimePicker = (0, kendo_react_common_1.withPropsContext)(exports.DateTimePickerPropsContext, DateTimePickerWithoutContext);
|
|
488
488
|
exports.DateTimePicker.displayName = 'KendoReactDateTimePicker';
|
|
489
|
-
kendo_react_intl_1.registerForLocalization(DateTimePickerWithoutContext);
|
|
489
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateTimePickerWithoutContext);
|
|
@@ -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;
|
|
@@ -45,7 +45,12 @@ var DateTimeSelector = /** @class */ (function (_super) {
|
|
|
45
45
|
__extends(DateTimeSelector, _super);
|
|
46
46
|
function DateTimeSelector(props) {
|
|
47
47
|
var _this = _super.call(this, props) || this;
|
|
48
|
+
_this._calendar = null;
|
|
49
|
+
_this._timePart = null;
|
|
50
|
+
_this._cancelButton = null;
|
|
51
|
+
_this._acceptButton = null;
|
|
48
52
|
_this._calendarWrap = null;
|
|
53
|
+
_this.shouldFocusPart = false;
|
|
49
54
|
_this.focus = function (args) {
|
|
50
55
|
// Async to avoid stealing the focus from the DateInput on close
|
|
51
56
|
Promise.resolve().then(function () {
|
|
@@ -99,8 +104,8 @@ var DateTimeSelector = /** @class */ (function (_super) {
|
|
|
99
104
|
});
|
|
100
105
|
};
|
|
101
106
|
_this.handleNowClick = function (event) {
|
|
102
|
-
_this.setState({ timeValue: utils_2.getNow() });
|
|
103
|
-
_this.handleAccept(event, utils_2.getNow());
|
|
107
|
+
_this.setState({ timeValue: (0, utils_2.getNow)() });
|
|
108
|
+
_this.handleAccept(event, (0, utils_2.getNow)());
|
|
104
109
|
};
|
|
105
110
|
_this.handleCalendarValueChange = function (event) {
|
|
106
111
|
event.syntheticEvent.stopPropagation();
|
|
@@ -182,12 +187,12 @@ var DateTimeSelector = /** @class */ (function (_super) {
|
|
|
182
187
|
DateTimeSelector.prototype.render = function () {
|
|
183
188
|
var _this = this;
|
|
184
189
|
var _a = this.props, disabled = _a.disabled, cancelButton = _a.cancelButton, min = _a.min, max = _a.max, weekNumber = _a.weekNumber, focusedDate = _a.focusedDate, format = _a.format;
|
|
185
|
-
var rootClassName = kendo_react_common_1.classNames({
|
|
190
|
+
var rootClassName = (0, kendo_react_common_1.classNames)({
|
|
186
191
|
'k-date-tab': this.state.tab === 'date',
|
|
187
192
|
'k-time-tab': this.state.tab === 'time',
|
|
188
193
|
'k-disabled': disabled
|
|
189
194
|
}, 'k-datetime-wrap');
|
|
190
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
195
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
191
196
|
var dateMessage = localizationService.toLanguageString(messages_1.date, messages_1.messages[messages_1.date]);
|
|
192
197
|
var timeMessage = localizationService.toLanguageString(messages_1.time, messages_1.messages[messages_1.time]);
|
|
193
198
|
var cancelMessage = localizationService.toLanguageString(messages_1.dateTimePickerCancel, messages_1.messages[messages_1.dateTimePickerCancel]);
|
|
@@ -235,7 +240,7 @@ var DateTimeSelector = /** @class */ (function (_super) {
|
|
|
235
240
|
configurable: true
|
|
236
241
|
});
|
|
237
242
|
DateTimeSelector.prototype.normalizeRange = function (candidate, value) {
|
|
238
|
-
return kendo_date_math_1.isEqualDate(candidate, value || utils_1.getToday())
|
|
243
|
+
return (0, kendo_date_math_1.isEqualDate)(candidate, value || (0, utils_1.getToday)())
|
|
239
244
|
? candidate
|
|
240
245
|
: null;
|
|
241
246
|
};
|
|
@@ -247,12 +252,12 @@ var DateTimeSelector = /** @class */ (function (_super) {
|
|
|
247
252
|
|| (this._cancelButton && document.activeElement === this._cancelButton.element);
|
|
248
253
|
};
|
|
249
254
|
DateTimeSelector.prototype.mergeTime = function (current, candidate) {
|
|
250
|
-
return current && candidate ? utils_1.setTime(candidate, current) : candidate;
|
|
255
|
+
return current && candidate ? (0, utils_1.setTime)(candidate, current) : candidate;
|
|
251
256
|
};
|
|
252
257
|
DateTimeSelector.prototype.mergeDate = function (candidate, value) {
|
|
253
|
-
return candidate ? utils_1.setTime(candidate || utils_1.getToday(), value) : value;
|
|
258
|
+
return candidate ? (0, utils_1.setTime)(candidate || (0, utils_1.getToday)(), value) : value;
|
|
254
259
|
};
|
|
255
260
|
return DateTimeSelector;
|
|
256
261
|
}(React.Component));
|
|
257
262
|
exports.DateTimeSelector = DateTimeSelector;
|
|
258
|
-
kendo_react_intl_1.registerForLocalization(DateTimeSelector);
|
|
263
|
+
(0, kendo_react_intl_1.registerForLocalization)(DateTimeSelector);
|
|
@@ -34,7 +34,7 @@ exports.usePickerFloatingLabel = usePickerFloatingLabel;
|
|
|
34
34
|
* @hidden
|
|
35
35
|
*/
|
|
36
36
|
var PickerFloatingLabel = function (props) {
|
|
37
|
-
var floatingLabelProps = exports.usePickerFloatingLabel(props.dateInput);
|
|
37
|
+
var floatingLabelProps = (0, exports.usePickerFloatingLabel)(props.dateInput);
|
|
38
38
|
return (React.createElement(kendo_react_labels_1.FloatingLabel, __assign({}, props, floatingLabelProps)));
|
|
39
39
|
};
|
|
40
40
|
exports.PickerFloatingLabel = PickerFloatingLabel;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-dateinputs',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1654509015,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
|
@@ -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) =>
|
|
33
|
-
step: (props: TimeListProps, propName: string, componentName: string) =>
|
|
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;
|
|
@@ -48,6 +48,16 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
48
48
|
__extends(TimeList, _super);
|
|
49
49
|
function TimeList(props) {
|
|
50
50
|
var _this = _super.call(this, props) || this;
|
|
51
|
+
_this.intl = null;
|
|
52
|
+
_this._element = null;
|
|
53
|
+
_this.service = null;
|
|
54
|
+
_this.virtualization = null;
|
|
55
|
+
_this.topOffset = 0;
|
|
56
|
+
_this.bottomOffset = 0;
|
|
57
|
+
_this.itemHeight = 0;
|
|
58
|
+
_this.listHeight = 0;
|
|
59
|
+
_this.topThreshold = 0;
|
|
60
|
+
_this.bottomThreshold = 0;
|
|
51
61
|
_this.animateToIndex = false;
|
|
52
62
|
_this.focus = function (args) {
|
|
53
63
|
Promise.resolve().then(function () {
|
|
@@ -58,7 +68,7 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
58
68
|
});
|
|
59
69
|
};
|
|
60
70
|
_this.itemOffset = function (scrollTop) {
|
|
61
|
-
if (!_this.virtualization) {
|
|
71
|
+
if (!_this.virtualization || !_this.service) {
|
|
62
72
|
return -1;
|
|
63
73
|
}
|
|
64
74
|
var valueIndex = _this.service.selectedIndex(_this.props.value);
|
|
@@ -85,15 +95,17 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
85
95
|
};
|
|
86
96
|
_this.configureServices = function (_a) {
|
|
87
97
|
var _b = _a === void 0 ? _this.props : _a, min = _b.min, max = _b.max, value = _b.value;
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
if (_this.service) {
|
|
99
|
+
var _c = _this.service.limitRange(min || _this.min, max || _this.max, value || _this.props.value), newMin = _c[0], newMax = _c[1];
|
|
100
|
+
_this.service.configure(_this.serviceSettings({ min: newMin, max: newMax }));
|
|
101
|
+
}
|
|
90
102
|
};
|
|
91
103
|
_this.serviceSettings = function (settings) {
|
|
92
104
|
var defaults = {
|
|
93
105
|
boundRange: _this.props.boundRange || TimeList.defaultProps.boundRange,
|
|
94
106
|
insertUndividedMax: false,
|
|
95
|
-
min: kendo_date_math_1.cloneDate(_this.min),
|
|
96
|
-
max: kendo_date_math_1.cloneDate(_this.max),
|
|
107
|
+
min: (0, kendo_date_math_1.cloneDate)(_this.min),
|
|
108
|
+
max: (0, kendo_date_math_1.cloneDate)(_this.max),
|
|
97
109
|
part: _this.props.part,
|
|
98
110
|
step: _this.step
|
|
99
111
|
};
|
|
@@ -103,7 +115,7 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
103
115
|
};
|
|
104
116
|
_this.handleScrollAction = function (_a) {
|
|
105
117
|
var target = _a.target, animationInProgress = _a.animationInProgress;
|
|
106
|
-
if (!_this.virtualization) {
|
|
118
|
+
if (!_this.virtualization || !_this.service) {
|
|
107
119
|
return;
|
|
108
120
|
}
|
|
109
121
|
if (target && !animationInProgress) {
|
|
@@ -134,6 +146,9 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
134
146
|
}
|
|
135
147
|
};
|
|
136
148
|
_this.handleKeyDown = function (event) {
|
|
149
|
+
if (!_this.service) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
137
152
|
var keyCode = event.keyCode;
|
|
138
153
|
if (keyCode === kendo_react_common_1.Keys.down
|
|
139
154
|
|| keyCode === kendo_react_common_1.Keys.up
|
|
@@ -148,6 +163,9 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
148
163
|
}
|
|
149
164
|
};
|
|
150
165
|
_this.handleChange = function (dataItem) {
|
|
166
|
+
if (!_this.service) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
151
169
|
var candidate = _this.service.apply(_this.props.value, dataItem.value);
|
|
152
170
|
if (_this.props.value.getTime() === candidate.getTime()) {
|
|
153
171
|
return;
|
|
@@ -218,7 +236,7 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
218
236
|
* @hidden
|
|
219
237
|
*/
|
|
220
238
|
TimeList.prototype.componentDidUpdate = function () {
|
|
221
|
-
if (!this.virtualization) {
|
|
239
|
+
if (!this.virtualization || !this.service) {
|
|
222
240
|
return;
|
|
223
241
|
}
|
|
224
242
|
var index = this.service.selectedIndex(this.props.value);
|
|
@@ -234,7 +252,7 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
234
252
|
return;
|
|
235
253
|
}
|
|
236
254
|
this.calculateHeights();
|
|
237
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
255
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
238
256
|
this.service = new services[this.props.part.type](this.intl);
|
|
239
257
|
this.configureServices();
|
|
240
258
|
var data = this.service.data(this.props.value);
|
|
@@ -255,14 +273,14 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
255
273
|
part: function (props, propName, componentName) {
|
|
256
274
|
var prop = props[propName];
|
|
257
275
|
if (!prop || !services[prop.type]) {
|
|
258
|
-
throw new Error("\n Invalid prop '"
|
|
276
|
+
throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n Supported part types are hour|minute|second|dayperiod.\n "));
|
|
259
277
|
}
|
|
260
278
|
return null;
|
|
261
279
|
},
|
|
262
280
|
step: function (props, propName, componentName) {
|
|
263
281
|
var prop = props[propName];
|
|
264
282
|
if (prop !== undefined && prop <= 0) {
|
|
265
|
-
throw new Error("\n Invalid prop '"
|
|
283
|
+
throw new Error("\n Invalid prop '".concat(propName, "' supplied to ").concat(componentName, ".\n ").concat(propName, " cannot be less than 1.\n "));
|
|
266
284
|
}
|
|
267
285
|
return null;
|
|
268
286
|
},
|
|
@@ -280,4 +298,4 @@ var TimeList = /** @class */ (function (_super) {
|
|
|
280
298
|
return TimeList;
|
|
281
299
|
}(React.Component));
|
|
282
300
|
exports.TimeList = TimeList;
|
|
283
|
-
kendo_react_intl_1.registerForIntl(TimeList);
|
|
301
|
+
(0, kendo_react_intl_1.registerForIntl)(TimeList);
|
|
@@ -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:
|
|
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;
|
|
@@ -38,7 +38,7 @@ var utils_1 = require("../utils");
|
|
|
38
38
|
var TimePart_1 = require("./models/TimePart");
|
|
39
39
|
var utils_2 = require("./utils");
|
|
40
40
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
41
|
-
var formatRegExp = new RegExp(TimePart_1.TIME_PART.hour
|
|
41
|
+
var formatRegExp = new RegExp("".concat(TimePart_1.TIME_PART.hour, "|").concat(TimePart_1.TIME_PART.minute, "|").concat(TimePart_1.TIME_PART.second, "|").concat(TimePart_1.TIME_PART.dayperiod, "|literal"));
|
|
42
42
|
/**
|
|
43
43
|
* @hidden
|
|
44
44
|
*/
|
|
@@ -54,6 +54,9 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
54
54
|
__extends(TimePart, _super);
|
|
55
55
|
function TimePart(props) {
|
|
56
56
|
var _this = _super.call(this, props) || this;
|
|
57
|
+
_this._element = null;
|
|
58
|
+
_this._nowButton = null;
|
|
59
|
+
_this.dateFormatParts = [];
|
|
57
60
|
_this.timeLists = [];
|
|
58
61
|
_this.focus = function (args) {
|
|
59
62
|
Promise.resolve().then(function () {
|
|
@@ -95,7 +98,7 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
95
98
|
}];
|
|
96
99
|
};
|
|
97
100
|
_this.showNowButton = function () {
|
|
98
|
-
return !_this.hasSteps() && _this.props.nowButton && utils_2.isInTimeRange(utils_2.getNow(), _this.min, _this.max);
|
|
101
|
+
return !_this.hasSteps() && _this.props.nowButton && (0, utils_2.isInTimeRange)((0, utils_2.getNow)(), _this.min, _this.max);
|
|
99
102
|
};
|
|
100
103
|
_this.handleKeyDown = function (event) {
|
|
101
104
|
var keyCode = event.keyCode;
|
|
@@ -129,7 +132,7 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
129
132
|
onChange.call(undefined, candidate);
|
|
130
133
|
}
|
|
131
134
|
};
|
|
132
|
-
_this.snapTime = utils_2.snapTime(utils_2.generateSnappers(_this.props.steps, _this.props.min || TimePart.defaultProps.min));
|
|
135
|
+
_this.snapTime = (0, utils_2.snapTime)((0, utils_2.generateSnappers)(_this.props.steps, _this.props.min || TimePart.defaultProps.min));
|
|
133
136
|
_this.state = {
|
|
134
137
|
activeListIndex: -1
|
|
135
138
|
};
|
|
@@ -148,14 +151,14 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
148
151
|
});
|
|
149
152
|
Object.defineProperty(TimePart.prototype, "value", {
|
|
150
153
|
get: function () {
|
|
151
|
-
return utils_2.timeInRange(this.snapTime(kendo_date_math_1.cloneDate(this.props.value || utils_1.MIDNIGHT_DATE)), this.min, this.max);
|
|
154
|
+
return (0, utils_2.timeInRange)(this.snapTime((0, kendo_date_math_1.cloneDate)(this.props.value || utils_1.MIDNIGHT_DATE)), this.min, this.max);
|
|
152
155
|
},
|
|
153
156
|
enumerable: false,
|
|
154
157
|
configurable: true
|
|
155
158
|
});
|
|
156
159
|
Object.defineProperty(TimePart.prototype, "intl", {
|
|
157
160
|
get: function () {
|
|
158
|
-
return kendo_react_intl_1.provideIntlService(this);
|
|
161
|
+
return (0, kendo_react_intl_1.provideIntlService)(this);
|
|
159
162
|
},
|
|
160
163
|
enumerable: false,
|
|
161
164
|
configurable: true
|
|
@@ -208,15 +211,15 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
208
211
|
TimePart.prototype.render = function () {
|
|
209
212
|
var _this = this;
|
|
210
213
|
var _a = this.props, format = _a.format, smoothScroll = _a.smoothScroll, onNowClick = _a.onNowClick, className = _a.className, disabled = _a.disabled;
|
|
211
|
-
this.snapTime = utils_2.snapTime(utils_2.generateSnappers(this.steps, this.min));
|
|
214
|
+
this.snapTime = (0, utils_2.snapTime)((0, utils_2.generateSnappers)(this.steps, this.min));
|
|
212
215
|
this.dateFormatParts = this.intl
|
|
213
216
|
.splitDateFormat(format || TimePart.defaultProps.format)
|
|
214
217
|
.filter(this.timeFormatFilter);
|
|
215
|
-
var rootClassName = kendo_react_common_1.classNames({
|
|
218
|
+
var rootClassName = (0, kendo_react_common_1.classNames)({
|
|
216
219
|
'k-disabled': disabled
|
|
217
220
|
}, className, 'k-time-part');
|
|
218
221
|
this.timeLists = [];
|
|
219
|
-
var localizationService = kendo_react_intl_1.provideLocalizationService(this);
|
|
222
|
+
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
220
223
|
var selectNowMessage = localizationService.toLanguageString(messages_1.selectNow, messages_1.messages[messages_1.selectNow]);
|
|
221
224
|
return (React.createElement("div", { className: rootClassName },
|
|
222
225
|
React.createElement("div", { className: "k-time-header" },
|
|
@@ -227,7 +230,7 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
227
230
|
React.createElement("span", { className: "k-time-highlight" }),
|
|
228
231
|
this.dateFormatParts.map(function (part, idx) {
|
|
229
232
|
return (part.type !== 'literal'
|
|
230
|
-
? React.createElement("div", { key: idx, className: kendo_react_common_1.classNames('k-time-list-wrapper', {
|
|
233
|
+
? React.createElement("div", { key: idx, className: (0, kendo_react_common_1.classNames)('k-time-list-wrapper', {
|
|
231
234
|
'k-focus': idx === _this.state.activeListIndex
|
|
232
235
|
}), role: "presentation", tabIndex: -1 },
|
|
233
236
|
React.createElement("span", { className: "k-title", onMouseDown: function (e) { e.preventDefault(); } }, _this.intl.dateFieldName(part)),
|
|
@@ -301,5 +304,5 @@ var TimePart = /** @class */ (function (_super) {
|
|
|
301
304
|
return TimePart;
|
|
302
305
|
}(React.Component));
|
|
303
306
|
exports.TimePart = TimePart;
|
|
304
|
-
kendo_react_intl_1.registerForIntl(TimePart);
|
|
305
|
-
kendo_react_intl_1.registerForLocalization(TimePart);
|
|
307
|
+
(0, kendo_react_intl_1.registerForIntl)(TimePart);
|
|
308
|
+
(0, kendo_react_intl_1.registerForLocalization)(TimePart);
|
|
@@ -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" | "
|
|
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:
|
|
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" | "
|
|
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
|