@progress/kendo-react-dateinputs 4.14.1-dev.202201181415 → 5.0.1-dev.202201200659
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/CalendarHeaderTitle.js +1 -1
- package/dist/es/calendar/components/MultiViewCalendar.js +2 -2
- package/dist/es/calendar/services/DOMService.js +1 -1
- package/dist/es/common/PickerWrap.d.ts +4 -2
- package/dist/es/common/PickerWrap.js +2 -1
- package/dist/es/dateinput/DateInput.d.ts +43 -0
- package/dist/es/dateinput/DateInput.js +26 -20
- package/dist/es/datepicker/DatePicker.d.ts +43 -1
- package/dist/es/datepicker/DatePicker.js +30 -21
- package/dist/es/datepicker/ToggleButton.d.ts +3 -13
- package/dist/es/datepicker/ToggleButton.js +2 -6
- package/dist/es/datepicker/models/DatePickerSettings.d.ts +1 -2
- package/dist/es/daterangepicker/DateRangePicker.d.ts +6 -1
- package/dist/es/daterangepicker/DateRangePicker.js +1 -1
- package/dist/es/datetimepicker/DateTimePicker.d.ts +43 -1
- package/dist/es/datetimepicker/DateTimePicker.js +34 -26
- package/dist/es/datetimepicker/DateTimeSelector.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimePart.js +1 -1
- package/dist/es/timepicker/TimePicker.d.ts +43 -7
- package/dist/es/timepicker/TimePicker.js +32 -35
- package/dist/es/timepicker/TimeSelector.js +1 -1
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +1 -1
- package/dist/npm/calendar/components/MultiViewCalendar.js +2 -2
- package/dist/npm/calendar/services/DOMService.js +1 -1
- package/dist/npm/common/PickerWrap.d.ts +4 -2
- package/dist/npm/common/PickerWrap.js +2 -1
- package/dist/npm/dateinput/DateInput.d.ts +43 -0
- package/dist/npm/dateinput/DateInput.js +25 -19
- package/dist/npm/datepicker/DatePicker.d.ts +43 -1
- package/dist/npm/datepicker/DatePicker.js +30 -21
- package/dist/npm/datepicker/ToggleButton.d.ts +3 -13
- package/dist/npm/datepicker/ToggleButton.js +2 -6
- package/dist/npm/datepicker/models/DatePickerSettings.d.ts +1 -2
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +6 -1
- package/dist/npm/daterangepicker/DateRangePicker.js +1 -1
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +43 -1
- package/dist/npm/datetimepicker/DateTimePicker.js +33 -25
- package/dist/npm/datetimepicker/DateTimeSelector.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimePart.js +1 -1
- package/dist/npm/timepicker/TimePicker.d.ts +43 -7
- package/dist/npm/timepicker/TimePicker.js +31 -34
- package/dist/npm/timepicker/TimeSelector.js +1 -1
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +13 -13
|
@@ -47,6 +47,7 @@ var TimeSelector_1 = require("./TimeSelector");
|
|
|
47
47
|
var utils_1 = require("../utils");
|
|
48
48
|
var utils_2 = require("./utils");
|
|
49
49
|
var usePickerFloatingLabel_1 = require("../hooks/usePickerFloatingLabel");
|
|
50
|
+
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
50
51
|
/** @hidden */
|
|
51
52
|
var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
52
53
|
__extends(TimePickerWithoutContext, _super);
|
|
@@ -54,7 +55,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
54
55
|
var _this = _super.call(this, props) || this;
|
|
55
56
|
_this._popupId = kendo_react_common_1.guid();
|
|
56
57
|
_this._element = null;
|
|
57
|
-
_this._wrapper = null;
|
|
58
58
|
_this._dateInput = React.createRef();
|
|
59
59
|
_this._timeSelector = null;
|
|
60
60
|
_this.shouldFocusDateInput = false;
|
|
@@ -146,7 +146,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
146
146
|
};
|
|
147
147
|
_this.normalizeTime = _this.normalizeTime.bind(_this);
|
|
148
148
|
_this.setShow = _this.setShow.bind(_this);
|
|
149
|
-
_this.nextTick = _this.nextTick.bind(_this);
|
|
150
149
|
_this.mergeTime = _this.mergeTime.bind(_this);
|
|
151
150
|
return _this;
|
|
152
151
|
}
|
|
@@ -303,12 +302,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
303
302
|
this.forceUpdate();
|
|
304
303
|
}
|
|
305
304
|
};
|
|
306
|
-
/**
|
|
307
|
-
* @hidden
|
|
308
|
-
*/
|
|
309
|
-
TimePickerWithoutContext.prototype.componentWillUnmount = function () {
|
|
310
|
-
clearTimeout(this.nextTickId);
|
|
311
|
-
};
|
|
312
305
|
/**
|
|
313
306
|
* @hidden
|
|
314
307
|
*/
|
|
@@ -330,15 +323,9 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
330
323
|
*/
|
|
331
324
|
TimePickerWithoutContext.prototype.render = function () {
|
|
332
325
|
var _this = this;
|
|
333
|
-
var _a = this.props, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, className = _a.className, format = _a.format, formatPlaceholder = _a.formatPlaceholder, smoothScroll = _a.smoothScroll, width = _a.width, name = _a.name, steps = _a.steps, cancelButton = _a.cancelButton, nowButton = _a.nowButton, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
|
|
334
|
-
var
|
|
326
|
+
var _a = this.props, _b = _a.size, size = _b === void 0 ? TimePickerWithoutContext.defaultProps.size : _b, _c = _a.rounded, rounded = _c === void 0 ? TimePickerWithoutContext.defaultProps.rounded : _c, _d = _a.fillMode, fillMode = _d === void 0 ? TimePickerWithoutContext.defaultProps.fillMode : _d, disabled = _a.disabled, tabIndex = _a.tabIndex, title = _a.title, id = _a.id, className = _a.className, format = _a.format, formatPlaceholder = _a.formatPlaceholder, smoothScroll = _a.smoothScroll, width = _a.width, name = _a.name, steps = _a.steps, cancelButton = _a.cancelButton, nowButton = _a.nowButton, validationMessage = _a.validationMessage, required = _a.required, validityStyles = _a.validityStyles, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
|
|
327
|
+
var _e = this.popupSettings, popupClass = _e.popupClass, otherPopupSettings = __rest(_e, ["popupClass"]);
|
|
335
328
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
336
|
-
var rootClassName = kendo_react_common_1.classNames('k-widget k-timepicker', className);
|
|
337
|
-
var wrapperClassNames = kendo_react_common_1.classNames('k-picker-wrap', {
|
|
338
|
-
'k-state-invalid': !isValid,
|
|
339
|
-
'k-state-disabled': disabled,
|
|
340
|
-
'k-state-focused': this.state.focused
|
|
341
|
-
});
|
|
342
329
|
var popupClassNames = kendo_react_common_1.classNames('k-group k-reset', popupClass);
|
|
343
330
|
var dateInputProps = {
|
|
344
331
|
disabled: disabled,
|
|
@@ -362,9 +349,12 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
362
349
|
label: undefined,
|
|
363
350
|
placeholder: !this.state.focused ? this.props.placeholder : null,
|
|
364
351
|
ariaHasPopup: true,
|
|
365
|
-
ariaExpanded: this.show
|
|
352
|
+
ariaExpanded: this.show,
|
|
353
|
+
size: null,
|
|
354
|
+
fillMode: null,
|
|
355
|
+
rounded: null
|
|
366
356
|
};
|
|
367
|
-
var popupProps = __assign({ show: this.show, animate: this.
|
|
357
|
+
var popupProps = __assign({ show: this.show, animate: this.element !== null, anchor: this.element, className: popupClassNames, id: this._popupId, anchorAlign: {
|
|
368
358
|
horizontal: 'left',
|
|
369
359
|
vertical: 'bottom'
|
|
370
360
|
}, popupAlign: {
|
|
@@ -378,14 +368,21 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
378
368
|
.toLanguageString(messages_1.toggleTimeSelector, messages_1.messages[messages_1.toggleTimeSelector]);
|
|
379
369
|
var timepicker = (React.createElement(kendo_react_common_1.AsyncFocusBlur, { onFocus: this.handleFocus, onBlur: this.handleBlur, onSyncBlur: this.props.onBlur, onSyncFocus: this.props.onFocus }, function (_a) {
|
|
380
370
|
var onFocus = _a.onFocus, onBlur = _a.onBlur;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
371
|
+
var _b;
|
|
372
|
+
return (React.createElement("div", { ref: function (span) { _this._element = span; }, className: kendo_react_common_1.classNames('k-input', 'k-timepicker', (_b = {},
|
|
373
|
+
_b["k-input-" + (kendo_react_common_1.kendoThemeMaps.sizeMap[size] || size)] = size,
|
|
374
|
+
_b["k-rounded-" + (kendo_react_common_1.kendoThemeMaps.roundedMap[rounded] || rounded)] = rounded,
|
|
375
|
+
_b["k-input-" + fillMode] = fillMode,
|
|
376
|
+
_b['k-valid'] = isValid,
|
|
377
|
+
_b['k-invalid'] = !isValid,
|
|
378
|
+
_b['k-required'] = _this.required,
|
|
379
|
+
_b['k-disabled'] = _this.props.disabled,
|
|
380
|
+
_b), className), onKeyDown: _this.handleKeyDown, style: { width: width }, onFocus: onFocus, onBlur: onBlur },
|
|
381
|
+
React.createElement(_this.dateInputComp, __assign({ _ref: _this._dateInput }, dateInputProps)),
|
|
382
|
+
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", icon: 'clock', onMouseDown: _this.handleIconMouseDown, onClick: _this.handleIconClick, title: toggleTimeMessage, "aria-label": toggleTimeMessage, className: "k-input-button" }, {
|
|
383
|
+
'aria-controls': _this._popupId,
|
|
384
|
+
'aria-label': toggleClockMessage
|
|
385
|
+
})),
|
|
389
386
|
_this.props.popup
|
|
390
387
|
? React.createElement(_this.props.popup, __assign({}, popupProps), timeSelector)
|
|
391
388
|
: React.createElement(kendo_react_popup_1.Popup, __assign({}, popupProps), timeSelector)));
|
|
@@ -403,12 +400,6 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
403
400
|
}
|
|
404
401
|
this.setState({ show: show });
|
|
405
402
|
};
|
|
406
|
-
TimePickerWithoutContext.prototype.nextTick = function (f) {
|
|
407
|
-
// XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
|
|
408
|
-
// XXX: https://github.com/facebook/react/issues/3751
|
|
409
|
-
clearTimeout(this.nextTickId);
|
|
410
|
-
this.nextTickId = window.setTimeout(function () { return f(); });
|
|
411
|
-
};
|
|
412
403
|
TimePickerWithoutContext.prototype.mergeTime = function (value) {
|
|
413
404
|
return this.value && value ? utils_1.setTime(this.value, value) : value;
|
|
414
405
|
};
|
|
@@ -482,7 +473,10 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
482
473
|
validationMessage: PropTypes.string,
|
|
483
474
|
required: PropTypes.bool,
|
|
484
475
|
validate: PropTypes.bool,
|
|
485
|
-
valid: PropTypes.bool
|
|
476
|
+
valid: PropTypes.bool,
|
|
477
|
+
size: PropTypes.oneOf([null, 'small', 'medium', 'large']),
|
|
478
|
+
rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']),
|
|
479
|
+
fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline'])
|
|
486
480
|
};
|
|
487
481
|
/**
|
|
488
482
|
* @hidden
|
|
@@ -499,7 +493,10 @@ var TimePickerWithoutContext = /** @class */ (function (_super) {
|
|
|
499
493
|
steps: {},
|
|
500
494
|
required: false,
|
|
501
495
|
validityStyles: true,
|
|
502
|
-
dateInput: DateInput_1.DateInput
|
|
496
|
+
dateInput: DateInput_1.DateInput,
|
|
497
|
+
size: 'medium',
|
|
498
|
+
rounded: 'medium',
|
|
499
|
+
fillMode: 'solid'
|
|
503
500
|
};
|
|
504
501
|
return TimePickerWithoutContext;
|
|
505
502
|
}(React.Component));
|
|
@@ -181,7 +181,7 @@ var TimeSelector = /** @class */ (function (_super) {
|
|
|
181
181
|
React.createElement("div", { className: "k-time-footer k-actions k-hstack k-justify-content-stretch" },
|
|
182
182
|
cancelButton &&
|
|
183
183
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._cancelButton = btn; }, className: "k-time-cancel", onClick: this.handleReject, title: cancelMessage }, { 'aria-label': cancelMessage }), cancelMessage),
|
|
184
|
-
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept",
|
|
184
|
+
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", ref: function (btn) { _this._acceptButton = btn; }, className: "k-time-accept", themeColor: 'primary', onClick: this.handleAccept, title: setMessage }, { 'aria-label': setMessage }), setMessage))));
|
|
185
185
|
};
|
|
186
186
|
TimeSelector.prototype.nextTick = function (f) {
|
|
187
187
|
// XXX: use window.setTimeout due to async focus/blur events in IE, and missing relatedTarget prop.
|