@commercetools-uikit/date-time-input 12.2.3 → 12.2.7
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.
|
@@ -71,12 +71,12 @@ var DateCalendarTimeInput = function DateCalendarTimeInput(props) {
|
|
|
71
71
|
|
|
72
72
|
DateCalendarTimeInput.displayName = 'DateCalendarTimeInput';
|
|
73
73
|
DateCalendarTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
74
|
-
isDisabled: PropTypes__default[
|
|
75
|
-
timeInputRef: PropTypes__default[
|
|
76
|
-
onKeyDown: PropTypes__default[
|
|
77
|
-
onChange: PropTypes__default[
|
|
78
|
-
value: PropTypes__default[
|
|
79
|
-
placeholder: PropTypes__default[
|
|
74
|
+
isDisabled: PropTypes__default["default"].bool.isRequired,
|
|
75
|
+
timeInputRef: PropTypes__default["default"].object.isRequired,
|
|
76
|
+
onKeyDown: PropTypes__default["default"].func.isRequired,
|
|
77
|
+
onChange: PropTypes__default["default"].func.isRequired,
|
|
78
|
+
value: PropTypes__default["default"].string.isRequired,
|
|
79
|
+
placeholder: PropTypes__default["default"].string
|
|
80
80
|
} : {};
|
|
81
81
|
var TimeInput = DateCalendarTimeInput;
|
|
82
82
|
|
|
@@ -93,14 +93,14 @@ var messages = reactIntl.defineMessages({
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
96
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
97
97
|
|
|
98
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default[
|
|
98
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source), true)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
99
99
|
|
|
100
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
100
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
101
101
|
|
|
102
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
103
|
-
var activationTypes = [Downshift__default[
|
|
102
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
103
|
+
var activationTypes = [Downshift__default["default"].stateChangeTypes.keyDownEnter, Downshift__default["default"].stateChangeTypes.clickItem];
|
|
104
104
|
|
|
105
105
|
var preventDownshiftDefault = function preventDownshiftDefault(event) {
|
|
106
106
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -135,7 +135,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
args[_key] = arguments[_key];
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
138
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context = [this]).call(_context, args));
|
|
139
139
|
_this.inputRef = /*#__PURE__*/react$1.createRef();
|
|
140
140
|
_this.timeInputRef = /*#__PURE__*/react$1.createRef();
|
|
141
141
|
_this.state = {
|
|
@@ -218,9 +218,9 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
218
218
|
var _context2,
|
|
219
219
|
_this2 = this;
|
|
220
220
|
|
|
221
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
221
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
222
222
|
max: this.props.horizontalConstraint,
|
|
223
|
-
children: jsxRuntime.jsx(Downshift__default[
|
|
223
|
+
children: jsxRuntime.jsx(Downshift__default["default"] // Setting the key to the timeZone conveniently forces a rerender
|
|
224
224
|
// when the time-zone changes. Otherwise we'd need to make
|
|
225
225
|
// inputValue a controlled property so that we can update
|
|
226
226
|
// the displayed value as downshift seems to ignore an updated
|
|
@@ -232,7 +232,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
232
232
|
highlightedIndex: this.state.highlightedIndex,
|
|
233
233
|
onChange: this.emit,
|
|
234
234
|
stateReducer: function stateReducer(state, changes) {
|
|
235
|
-
if (_includesInstanceProperty__default[
|
|
235
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
236
236
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
237
237
|
isOpen: true
|
|
238
238
|
});
|
|
@@ -243,7 +243,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
243
243
|
onStateChange: function onStateChange(changes) {
|
|
244
244
|
/* eslint-disable no-prototype-builtins */
|
|
245
245
|
_this2.setState(function (prevState) {
|
|
246
|
-
if (_includesInstanceProperty__default[
|
|
246
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
247
247
|
return {
|
|
248
248
|
startDate: changes.isOpen ? prevState.startDate : null,
|
|
249
249
|
inputValue: changes.inputValue || prevState.inputValue,
|
|
@@ -279,7 +279,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
279
279
|
|
|
280
280
|
return null;
|
|
281
281
|
}, function () {
|
|
282
|
-
if (_includesInstanceProperty__default[
|
|
282
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
283
283
|
_this2.timeInputRef.current.focus();
|
|
284
284
|
|
|
285
285
|
_this2.timeInputRef.current.setSelectionRange(0, _this2.state.timeString.length);
|
|
@@ -307,7 +307,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
307
307
|
var calendarItems = calendarTimeUtils.createCalendarItems(_this2.state.calendarDate, _this2.state.timeString, _this2.props.intl, _this2.props.timeZone);
|
|
308
308
|
var paddingDayCount = calendarTimeUtils.getPaddingDayCount(_this2.state.calendarDate, _this2.props.intl.locale, _this2.props.timeZone);
|
|
309
309
|
|
|
310
|
-
var paddingDays = _fillInstanceProperty__default[
|
|
310
|
+
var paddingDays = _fillInstanceProperty__default["default"](_context3 = Array(paddingDayCount)).call(_context3);
|
|
311
311
|
|
|
312
312
|
var weekdays = calendarTimeUtils.getWeekdayNames(_this2.props.intl.locale);
|
|
313
313
|
var today = calendarTimeUtils.getToday();
|
|
@@ -429,16 +429,16 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
429
429
|
return _this2.jumpMonths(12);
|
|
430
430
|
}
|
|
431
431
|
}), jsxRuntime.jsxs(calendarUtils.CalendarContent, {
|
|
432
|
-
children: [_mapInstanceProperty__default[
|
|
432
|
+
children: [_mapInstanceProperty__default["default"](weekdays).call(weekdays, function (weekday) {
|
|
433
433
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, {
|
|
434
434
|
type: "heading",
|
|
435
435
|
children: weekday
|
|
436
436
|
}, weekday);
|
|
437
|
-
}), _mapInstanceProperty__default[
|
|
437
|
+
}), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (day, index) {
|
|
438
438
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, {
|
|
439
439
|
type: "spacing"
|
|
440
440
|
}, index);
|
|
441
|
-
}), _mapInstanceProperty__default[
|
|
441
|
+
}), _mapInstanceProperty__default["default"](calendarItems).call(calendarItems, function (item, index) {
|
|
442
442
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, _objectSpread(_objectSpread({
|
|
443
443
|
isToday: calendarTimeUtils.isSameDay(today, item)
|
|
444
444
|
}, getItemProps({
|
|
@@ -482,7 +482,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
482
482
|
}))]
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
}, _concatInstanceProperty__default[
|
|
485
|
+
}, _concatInstanceProperty__default["default"](_context2 = "".concat(this.props.timeZone, ":")).call(_context2, this.props.intl.locale))
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
}]);
|
|
@@ -492,82 +492,82 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
492
492
|
|
|
493
493
|
DateTimeInput.displayName = 'DateTimeInput';
|
|
494
494
|
DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
495
|
-
intl: PropTypes__default[
|
|
496
|
-
locale: PropTypes__default[
|
|
497
|
-
formatMessage: PropTypes__default[
|
|
495
|
+
intl: PropTypes__default["default"].shape({
|
|
496
|
+
locale: PropTypes__default["default"].string.isRequired,
|
|
497
|
+
formatMessage: PropTypes__default["default"].func.isRequired
|
|
498
498
|
}).isRequired,
|
|
499
499
|
|
|
500
500
|
/**
|
|
501
501
|
* Horizontal size limit of the input field.
|
|
502
502
|
*/
|
|
503
|
-
horizontalConstraint: PropTypes__default[
|
|
503
|
+
horizontalConstraint: PropTypes__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
504
504
|
|
|
505
505
|
/**
|
|
506
506
|
* The selected date, must either be an empty string or a date formatted in ISO 8601 (e.g. "2018-10-04T09:00:00.000Z").
|
|
507
507
|
*/
|
|
508
|
-
value: PropTypes__default[
|
|
508
|
+
value: PropTypes__default["default"].string.isRequired,
|
|
509
509
|
|
|
510
510
|
/**
|
|
511
511
|
* Called when the date changes. Called with an event containing an empty string (no value) or a string in this format: "YYYY-MM-DD".
|
|
512
512
|
* <br />
|
|
513
513
|
* Signature: `(event) => void`
|
|
514
514
|
*/
|
|
515
|
-
onChange: PropTypes__default[
|
|
515
|
+
onChange: PropTypes__default["default"].func.isRequired,
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
518
|
* Called when the date input gains focus.
|
|
519
519
|
*/
|
|
520
|
-
onFocus: PropTypes__default[
|
|
520
|
+
onFocus: PropTypes__default["default"].func,
|
|
521
521
|
|
|
522
522
|
/**
|
|
523
523
|
* Called when the date input loses focus.
|
|
524
524
|
*/
|
|
525
|
-
onBlur: PropTypes__default[
|
|
525
|
+
onBlur: PropTypes__default["default"].func,
|
|
526
526
|
|
|
527
527
|
/**
|
|
528
528
|
* Specifies the time zone in which the calendar and selected values are shown. It also influences how entered dates and times are parsed.
|
|
529
529
|
*/
|
|
530
|
-
timeZone: PropTypes__default[
|
|
530
|
+
timeZone: PropTypes__default["default"].string.isRequired,
|
|
531
531
|
|
|
532
532
|
/**
|
|
533
533
|
* Used as the HTML `id` attribute.
|
|
534
534
|
*/
|
|
535
|
-
id: PropTypes__default[
|
|
535
|
+
id: PropTypes__default["default"].string,
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Used as the HTML `name` attribute.
|
|
539
539
|
*/
|
|
540
|
-
name: PropTypes__default[
|
|
540
|
+
name: PropTypes__default["default"].string,
|
|
541
541
|
|
|
542
542
|
/**
|
|
543
543
|
* Placeholder value to show in the input field
|
|
544
544
|
*/
|
|
545
|
-
placeholder: PropTypes__default[
|
|
545
|
+
placeholder: PropTypes__default["default"].string,
|
|
546
546
|
|
|
547
547
|
/**
|
|
548
548
|
* Disables the date picker
|
|
549
549
|
*/
|
|
550
|
-
isDisabled: PropTypes__default[
|
|
550
|
+
isDisabled: PropTypes__default["default"].bool,
|
|
551
551
|
|
|
552
552
|
/**
|
|
553
553
|
* Disables the date picker menu and sets the input field as read-only
|
|
554
554
|
*/
|
|
555
|
-
isReadOnly: PropTypes__default[
|
|
555
|
+
isReadOnly: PropTypes__default["default"].bool,
|
|
556
556
|
|
|
557
557
|
/**
|
|
558
558
|
* Indicates the input field has an error
|
|
559
559
|
*/
|
|
560
|
-
hasError: PropTypes__default[
|
|
560
|
+
hasError: PropTypes__default["default"].bool,
|
|
561
561
|
|
|
562
562
|
/**
|
|
563
563
|
* Indicates the input field has a warning
|
|
564
564
|
*/
|
|
565
|
-
hasWarning: PropTypes__default[
|
|
565
|
+
hasWarning: PropTypes__default["default"].bool
|
|
566
566
|
} : {};
|
|
567
567
|
var dateTimeInput = reactIntl.injectIntl(DateTimeInput);
|
|
568
568
|
|
|
569
|
-
// NOTE: This string will be replaced
|
|
570
|
-
var version =
|
|
569
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
570
|
+
var version = "12.2.7";
|
|
571
571
|
|
|
572
|
-
exports[
|
|
572
|
+
exports["default"] = dateTimeInput;
|
|
573
573
|
exports.version = version;
|
|
@@ -85,14 +85,14 @@ var messages = reactIntl.defineMessages({
|
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
88
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
89
89
|
|
|
90
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default[
|
|
90
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source), true)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
91
91
|
|
|
92
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
92
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
93
93
|
|
|
94
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
95
|
-
var activationTypes = [Downshift__default[
|
|
94
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
95
|
+
var activationTypes = [Downshift__default["default"].stateChangeTypes.keyDownEnter, Downshift__default["default"].stateChangeTypes.clickItem];
|
|
96
96
|
|
|
97
97
|
var preventDownshiftDefault = function preventDownshiftDefault(event) {
|
|
98
98
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -127,7 +127,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
127
127
|
args[_key] = arguments[_key];
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
_this = _super.call.apply(_super, _concatInstanceProperty__default[
|
|
130
|
+
_this = _super.call.apply(_super, _concatInstanceProperty__default["default"](_context = [this]).call(_context, args));
|
|
131
131
|
_this.inputRef = /*#__PURE__*/react$1.createRef();
|
|
132
132
|
_this.timeInputRef = /*#__PURE__*/react$1.createRef();
|
|
133
133
|
_this.state = {
|
|
@@ -210,9 +210,9 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
210
210
|
var _context2,
|
|
211
211
|
_this2 = this;
|
|
212
212
|
|
|
213
|
-
return jsxRuntime.jsx(Constraints__default[
|
|
213
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
214
214
|
max: this.props.horizontalConstraint,
|
|
215
|
-
children: jsxRuntime.jsx(Downshift__default[
|
|
215
|
+
children: jsxRuntime.jsx(Downshift__default["default"] // Setting the key to the timeZone conveniently forces a rerender
|
|
216
216
|
// when the time-zone changes. Otherwise we'd need to make
|
|
217
217
|
// inputValue a controlled property so that we can update
|
|
218
218
|
// the displayed value as downshift seems to ignore an updated
|
|
@@ -224,7 +224,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
224
224
|
highlightedIndex: this.state.highlightedIndex,
|
|
225
225
|
onChange: this.emit,
|
|
226
226
|
stateReducer: function stateReducer(state, changes) {
|
|
227
|
-
if (_includesInstanceProperty__default[
|
|
227
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
228
228
|
return _objectSpread(_objectSpread({}, changes), {}, {
|
|
229
229
|
isOpen: true
|
|
230
230
|
});
|
|
@@ -235,7 +235,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
235
235
|
onStateChange: function onStateChange(changes) {
|
|
236
236
|
/* eslint-disable no-prototype-builtins */
|
|
237
237
|
_this2.setState(function (prevState) {
|
|
238
|
-
if (_includesInstanceProperty__default[
|
|
238
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
239
239
|
return {
|
|
240
240
|
startDate: changes.isOpen ? prevState.startDate : null,
|
|
241
241
|
inputValue: changes.inputValue || prevState.inputValue,
|
|
@@ -271,7 +271,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
271
271
|
|
|
272
272
|
return null;
|
|
273
273
|
}, function () {
|
|
274
|
-
if (_includesInstanceProperty__default[
|
|
274
|
+
if (_includesInstanceProperty__default["default"](activationTypes).call(activationTypes, changes.type)) {
|
|
275
275
|
_this2.timeInputRef.current.focus();
|
|
276
276
|
|
|
277
277
|
_this2.timeInputRef.current.setSelectionRange(0, _this2.state.timeString.length);
|
|
@@ -299,7 +299,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
299
299
|
var calendarItems = calendarTimeUtils.createCalendarItems(_this2.state.calendarDate, _this2.state.timeString, _this2.props.intl, _this2.props.timeZone);
|
|
300
300
|
var paddingDayCount = calendarTimeUtils.getPaddingDayCount(_this2.state.calendarDate, _this2.props.intl.locale, _this2.props.timeZone);
|
|
301
301
|
|
|
302
|
-
var paddingDays = _fillInstanceProperty__default[
|
|
302
|
+
var paddingDays = _fillInstanceProperty__default["default"](_context3 = Array(paddingDayCount)).call(_context3);
|
|
303
303
|
|
|
304
304
|
var weekdays = calendarTimeUtils.getWeekdayNames(_this2.props.intl.locale);
|
|
305
305
|
var today = calendarTimeUtils.getToday();
|
|
@@ -421,16 +421,16 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
421
421
|
return _this2.jumpMonths(12);
|
|
422
422
|
}
|
|
423
423
|
}), jsxRuntime.jsxs(calendarUtils.CalendarContent, {
|
|
424
|
-
children: [_mapInstanceProperty__default[
|
|
424
|
+
children: [_mapInstanceProperty__default["default"](weekdays).call(weekdays, function (weekday) {
|
|
425
425
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, {
|
|
426
426
|
type: "heading",
|
|
427
427
|
children: weekday
|
|
428
428
|
}, weekday);
|
|
429
|
-
}), _mapInstanceProperty__default[
|
|
429
|
+
}), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (day, index) {
|
|
430
430
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, {
|
|
431
431
|
type: "spacing"
|
|
432
432
|
}, index);
|
|
433
|
-
}), _mapInstanceProperty__default[
|
|
433
|
+
}), _mapInstanceProperty__default["default"](calendarItems).call(calendarItems, function (item, index) {
|
|
434
434
|
return jsxRuntime.jsx(calendarUtils.CalendarDay, _objectSpread(_objectSpread({
|
|
435
435
|
isToday: calendarTimeUtils.isSameDay(today, item)
|
|
436
436
|
}, getItemProps({
|
|
@@ -474,7 +474,7 @@ var DateTimeInput = /*#__PURE__*/function (_Component) {
|
|
|
474
474
|
}))]
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
-
}, _concatInstanceProperty__default[
|
|
477
|
+
}, _concatInstanceProperty__default["default"](_context2 = "".concat(this.props.timeZone, ":")).call(_context2, this.props.intl.locale))
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}]);
|
|
@@ -486,8 +486,8 @@ DateTimeInput.displayName = 'DateTimeInput';
|
|
|
486
486
|
DateTimeInput.propTypes = {};
|
|
487
487
|
var dateTimeInput = reactIntl.injectIntl(DateTimeInput);
|
|
488
488
|
|
|
489
|
-
// NOTE: This string will be replaced
|
|
490
|
-
var version =
|
|
489
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
490
|
+
var version = "12.2.7";
|
|
491
491
|
|
|
492
|
-
exports[
|
|
492
|
+
exports["default"] = dateTimeInput;
|
|
493
493
|
exports.version = version;
|
|
@@ -543,7 +543,7 @@ DateTimeInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
543
543
|
} : {};
|
|
544
544
|
var dateTimeInput = injectIntl(DateTimeInput);
|
|
545
545
|
|
|
546
|
-
// NOTE: This string will be replaced
|
|
547
|
-
var version =
|
|
546
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
547
|
+
var version = "12.2.7";
|
|
548
548
|
|
|
549
549
|
export { dateTimeInput as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-time-input",
|
|
3
3
|
"description": "The `DateTimeInput` component allows the user to select a date. This component also supports multiple date selection.",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.7",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
12
|
"keywords": ["javascript", "design system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -19,28 +18,25 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-date-time-input.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-date-time-input.esm.js",
|
|
21
20
|
"files": ["dist"],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prepare": "../../../../scripts/version.js replace"
|
|
24
|
-
},
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "7.
|
|
27
|
-
"@babel/runtime-corejs3": "7.
|
|
28
|
-
"@commercetools-uikit/accessible-button": "12.2.
|
|
29
|
-
"@commercetools-uikit/calendar-time-utils": "12.2.
|
|
30
|
-
"@commercetools-uikit/calendar-utils": "12.2.
|
|
31
|
-
"@commercetools-uikit/constraints": "12.2.
|
|
32
|
-
"@commercetools-uikit/design-system": "12.2.
|
|
33
|
-
"@commercetools-uikit/hooks": "12.2.
|
|
34
|
-
"@commercetools-uikit/icons": "12.2.
|
|
35
|
-
"@commercetools-uikit/secondary-icon-button": "12.2.
|
|
36
|
-
"@commercetools-uikit/select-utils": "12.2.
|
|
37
|
-
"@commercetools-uikit/spacings-inline": "12.2.
|
|
38
|
-
"@commercetools-uikit/text": "12.2.
|
|
39
|
-
"@commercetools-uikit/tooltip": "12.2.
|
|
40
|
-
"@commercetools-uikit/utils": "12.2.
|
|
22
|
+
"@babel/runtime": "7.16.3",
|
|
23
|
+
"@babel/runtime-corejs3": "7.16.3",
|
|
24
|
+
"@commercetools-uikit/accessible-button": "12.2.5",
|
|
25
|
+
"@commercetools-uikit/calendar-time-utils": "12.2.5",
|
|
26
|
+
"@commercetools-uikit/calendar-utils": "12.2.7",
|
|
27
|
+
"@commercetools-uikit/constraints": "12.2.5",
|
|
28
|
+
"@commercetools-uikit/design-system": "12.2.5",
|
|
29
|
+
"@commercetools-uikit/hooks": "12.2.5",
|
|
30
|
+
"@commercetools-uikit/icons": "12.2.7",
|
|
31
|
+
"@commercetools-uikit/secondary-icon-button": "12.2.5",
|
|
32
|
+
"@commercetools-uikit/select-utils": "12.2.7",
|
|
33
|
+
"@commercetools-uikit/spacings-inline": "12.2.5",
|
|
34
|
+
"@commercetools-uikit/text": "12.2.5",
|
|
35
|
+
"@commercetools-uikit/tooltip": "12.2.5",
|
|
36
|
+
"@commercetools-uikit/utils": "12.2.5",
|
|
41
37
|
"@emotion/react": "^11.4.0",
|
|
42
38
|
"@emotion/styled": "^11.3.0",
|
|
43
|
-
"common-tags": "1.8.
|
|
39
|
+
"common-tags": "1.8.2",
|
|
44
40
|
"downshift": "6.1.7",
|
|
45
41
|
"prop-types": "15.7.2",
|
|
46
42
|
"react-is": "17.0.2",
|
|
@@ -50,7 +46,7 @@
|
|
|
50
46
|
"devDependencies": {
|
|
51
47
|
"moment": "2.29.1",
|
|
52
48
|
"react": "17.0.2",
|
|
53
|
-
"react-intl": "5.
|
|
49
|
+
"react-intl": "5.21.2"
|
|
54
50
|
},
|
|
55
51
|
"peerDependencies": {
|
|
56
52
|
"moment": "2.x",
|