@commercetools-uikit/date-range-input 20.5.0 → 20.6.1
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/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->
|
|
2
|
-
<!-- This file is created by the `
|
|
2
|
+
<!-- This file is created by the `pnpm generate-readme` script. -->
|
|
3
3
|
|
|
4
4
|
# DateRangeInput
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ The `DateRangeInput` component allows the user to select a date range.
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
|
|
13
|
+
pnpm add @commercetools-uikit/date-range-input
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
```
|
|
@@ -20,7 +20,7 @@ npm --save install @commercetools-uikit/date-range-input
|
|
|
20
20
|
Additionally install the peer dependencies (if not present)
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
|
|
23
|
+
pnpm add moment react react-intl
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
```
|
|
@@ -63,6 +63,7 @@ export default Example;
|
|
|
63
63
|
| `isReadOnly` | `boolean` | | | Disables the date picker menu and makes input field read-only |
|
|
64
64
|
| `hasError` | `boolean` | | | Indicates the input field has an error |
|
|
65
65
|
| `hasWarning` | `boolean` | | | Indicates the input field has warning |
|
|
66
|
+
| `appearance` | `union`<br/>Possible values:<br/>`'default' , 'filter'` | | | Indicates the appearance of the input.
Filter appearance removes borders and box shadows, and calendar is always open. |
|
|
66
67
|
|
|
67
68
|
## Signatures
|
|
68
69
|
|
|
@@ -21,7 +21,7 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
|
|
|
21
21
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
22
22
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
23
23
|
var _fillInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/fill');
|
|
24
|
-
var
|
|
24
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
25
25
|
var react = require('react');
|
|
26
26
|
var Downshift = require('downshift');
|
|
27
27
|
var reactIntl = require('react-intl');
|
|
@@ -46,12 +46,12 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
46
46
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
47
47
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
48
48
|
var _fillInstanceProperty__default = /*#__PURE__*/_interopDefault(_fillInstanceProperty);
|
|
49
|
-
var
|
|
49
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
50
50
|
var Downshift__default = /*#__PURE__*/_interopDefault(Downshift);
|
|
51
51
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
52
52
|
|
|
53
53
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
54
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
54
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
55
55
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
56
56
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
57
57
|
const preventDownshiftDefault = event => {
|
|
@@ -138,10 +138,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
_this.setState(prevState => ({
|
|
139
139
|
calendarDate: today,
|
|
140
140
|
highlightedIndex: prevState.suggestedItems.length + calendarUtils.getDateInMonth(today) - 1
|
|
141
|
-
}), () =>
|
|
142
|
-
var _this$inputRef$curren;
|
|
143
|
-
return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
|
|
144
|
-
});
|
|
141
|
+
}), () => _this.inputRef.current?.focus());
|
|
145
142
|
};
|
|
146
143
|
_this.handleBlur = () => {
|
|
147
144
|
if (_this.props.onBlur) _this.props.onBlur({
|
|
@@ -152,8 +149,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
152
149
|
});
|
|
153
150
|
};
|
|
154
151
|
_this.emit = unsortedRange => {
|
|
155
|
-
|
|
156
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
152
|
+
_this.props.onChange?.({
|
|
157
153
|
target: {
|
|
158
154
|
id: _this.props.id,
|
|
159
155
|
name: _this.props.name,
|
|
@@ -269,7 +265,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
269
265
|
},
|
|
270
266
|
isOpen: this.state.isOpen,
|
|
271
267
|
children: _ref2 => {
|
|
272
|
-
var _context3
|
|
268
|
+
var _context3;
|
|
273
269
|
let getInputProps = _ref2.getInputProps,
|
|
274
270
|
getMenuProps = _ref2.getMenuProps,
|
|
275
271
|
getItemProps = _ref2.getItemProps,
|
|
@@ -300,7 +296,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
300
296
|
// between the <label for> and the <input id>.
|
|
301
297
|
'aria-labelledby': undefined,
|
|
302
298
|
name: this.props.name,
|
|
303
|
-
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder :
|
|
299
|
+
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder : `${calendarTimeUtils.getLocalizedDateTimeFormatPattern(this.props.intl.locale)} - ${calendarTimeUtils.getLocalizedDateTimeFormatPattern(this.props.intl.locale)}`,
|
|
304
300
|
onMouseEnter: () => {
|
|
305
301
|
// we remove the highlight so that the user can use the
|
|
306
302
|
// arrow keys to move the cursor when hovering
|
|
@@ -308,11 +304,12 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
308
304
|
if (isOpen) setHighlightedIndex(null);
|
|
309
305
|
},
|
|
310
306
|
onKeyDown: event => {
|
|
307
|
+
var _context4, _context5;
|
|
311
308
|
if (this.props.isReadOnly) {
|
|
312
309
|
preventDownshiftDefault(event);
|
|
313
310
|
return;
|
|
314
311
|
}
|
|
315
|
-
if (event.key === 'Enter' && (
|
|
312
|
+
if (event.key === 'Enter' && ((_context4 = inputValue) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _trimInstanceProperty__default["default"](_context4), _context4))?.() === '' &&
|
|
316
313
|
// do not clear value when user presses Enter to
|
|
317
314
|
// select the end date (so only clear when there is no
|
|
318
315
|
// startDate)
|
|
@@ -442,7 +439,7 @@ DateRangeInput.isEmpty = range => range.length === 0;
|
|
|
442
439
|
var dateRangeInput = reactIntl.injectIntl(DateRangeInput);
|
|
443
440
|
|
|
444
441
|
// NOTE: This string will be replaced on build time with the package version.
|
|
445
|
-
var version = "20.
|
|
442
|
+
var version = "20.6.1";
|
|
446
443
|
|
|
447
444
|
exports["default"] = dateRangeInput;
|
|
448
445
|
exports.version = version;
|
|
@@ -21,7 +21,7 @@ var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instan
|
|
|
21
21
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
22
22
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
23
23
|
var _fillInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/fill');
|
|
24
|
-
var
|
|
24
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
25
25
|
var react = require('react');
|
|
26
26
|
var Downshift = require('downshift');
|
|
27
27
|
var reactIntl = require('react-intl');
|
|
@@ -46,12 +46,12 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
46
46
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
47
47
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
48
48
|
var _fillInstanceProperty__default = /*#__PURE__*/_interopDefault(_fillInstanceProperty);
|
|
49
|
-
var
|
|
49
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
50
50
|
var Downshift__default = /*#__PURE__*/_interopDefault(Downshift);
|
|
51
51
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
52
52
|
|
|
53
53
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
54
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
54
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
55
55
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
56
56
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
57
57
|
const preventDownshiftDefault = event => {
|
|
@@ -138,10 +138,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
_this.setState(prevState => ({
|
|
139
139
|
calendarDate: today,
|
|
140
140
|
highlightedIndex: prevState.suggestedItems.length + calendarUtils.getDateInMonth(today) - 1
|
|
141
|
-
}), () =>
|
|
142
|
-
var _this$inputRef$curren;
|
|
143
|
-
return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
|
|
144
|
-
});
|
|
141
|
+
}), () => _this.inputRef.current?.focus());
|
|
145
142
|
};
|
|
146
143
|
_this.handleBlur = () => {
|
|
147
144
|
if (_this.props.onBlur) _this.props.onBlur({
|
|
@@ -152,8 +149,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
152
149
|
});
|
|
153
150
|
};
|
|
154
151
|
_this.emit = unsortedRange => {
|
|
155
|
-
|
|
156
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
152
|
+
_this.props.onChange?.({
|
|
157
153
|
target: {
|
|
158
154
|
id: _this.props.id,
|
|
159
155
|
name: _this.props.name,
|
|
@@ -269,7 +265,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
269
265
|
},
|
|
270
266
|
isOpen: this.state.isOpen,
|
|
271
267
|
children: _ref2 => {
|
|
272
|
-
var _context3
|
|
268
|
+
var _context3;
|
|
273
269
|
let getInputProps = _ref2.getInputProps,
|
|
274
270
|
getMenuProps = _ref2.getMenuProps,
|
|
275
271
|
getItemProps = _ref2.getItemProps,
|
|
@@ -300,7 +296,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
300
296
|
// between the <label for> and the <input id>.
|
|
301
297
|
'aria-labelledby': undefined,
|
|
302
298
|
name: this.props.name,
|
|
303
|
-
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder :
|
|
299
|
+
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder : `${calendarTimeUtils.getLocalizedDateTimeFormatPattern(this.props.intl.locale)} - ${calendarTimeUtils.getLocalizedDateTimeFormatPattern(this.props.intl.locale)}`,
|
|
304
300
|
onMouseEnter: () => {
|
|
305
301
|
// we remove the highlight so that the user can use the
|
|
306
302
|
// arrow keys to move the cursor when hovering
|
|
@@ -308,11 +304,12 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
308
304
|
if (isOpen) setHighlightedIndex(null);
|
|
309
305
|
},
|
|
310
306
|
onKeyDown: event => {
|
|
307
|
+
var _context4, _context5;
|
|
311
308
|
if (this.props.isReadOnly) {
|
|
312
309
|
preventDownshiftDefault(event);
|
|
313
310
|
return;
|
|
314
311
|
}
|
|
315
|
-
if (event.key === 'Enter' && (
|
|
312
|
+
if (event.key === 'Enter' && ((_context4 = inputValue) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _trimInstanceProperty__default["default"](_context4), _context4))?.() === '' &&
|
|
316
313
|
// do not clear value when user presses Enter to
|
|
317
314
|
// select the end date (so only clear when there is no
|
|
318
315
|
// startDate)
|
|
@@ -442,7 +439,7 @@ DateRangeInput.isEmpty = range => range.length === 0;
|
|
|
442
439
|
var dateRangeInput = reactIntl.injectIntl(DateRangeInput);
|
|
443
440
|
|
|
444
441
|
// NOTE: This string will be replaced on build time with the package version.
|
|
445
|
-
var version = "20.
|
|
442
|
+
var version = "20.6.1";
|
|
446
443
|
|
|
447
444
|
exports["default"] = dateRangeInput;
|
|
448
445
|
exports.version = version;
|
|
@@ -17,7 +17,7 @@ import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance
|
|
|
17
17
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
18
18
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
19
19
|
import _fillInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/fill';
|
|
20
|
-
import
|
|
20
|
+
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
21
21
|
import { Component, createRef } from 'react';
|
|
22
22
|
import Downshift from 'downshift';
|
|
23
23
|
import { injectIntl } from 'react-intl';
|
|
@@ -28,7 +28,7 @@ import { getLocalizedDateTimeFormatPattern } from '@commercetools-uikit/calendar
|
|
|
28
28
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
29
29
|
|
|
30
30
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
31
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
32
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
33
33
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
34
34
|
const preventDownshiftDefault = event => {
|
|
@@ -115,10 +115,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
115
115
|
_this.setState(prevState => ({
|
|
116
116
|
calendarDate: today,
|
|
117
117
|
highlightedIndex: prevState.suggestedItems.length + getDateInMonth(today) - 1
|
|
118
|
-
}), () =>
|
|
119
|
-
var _this$inputRef$curren;
|
|
120
|
-
return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
|
|
121
|
-
});
|
|
118
|
+
}), () => _this.inputRef.current?.focus());
|
|
122
119
|
};
|
|
123
120
|
_this.handleBlur = () => {
|
|
124
121
|
if (_this.props.onBlur) _this.props.onBlur({
|
|
@@ -129,8 +126,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
129
126
|
});
|
|
130
127
|
};
|
|
131
128
|
_this.emit = unsortedRange => {
|
|
132
|
-
|
|
133
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
129
|
+
_this.props.onChange?.({
|
|
134
130
|
target: {
|
|
135
131
|
id: _this.props.id,
|
|
136
132
|
name: _this.props.name,
|
|
@@ -246,7 +242,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
246
242
|
},
|
|
247
243
|
isOpen: this.state.isOpen,
|
|
248
244
|
children: _ref2 => {
|
|
249
|
-
var _context3
|
|
245
|
+
var _context3;
|
|
250
246
|
let getInputProps = _ref2.getInputProps,
|
|
251
247
|
getMenuProps = _ref2.getMenuProps,
|
|
252
248
|
getItemProps = _ref2.getItemProps,
|
|
@@ -277,7 +273,7 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
277
273
|
// between the <label for> and the <input id>.
|
|
278
274
|
'aria-labelledby': undefined,
|
|
279
275
|
name: this.props.name,
|
|
280
|
-
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder :
|
|
276
|
+
placeholder: typeof this.props.placeholder === 'string' ? this.props.placeholder : `${getLocalizedDateTimeFormatPattern(this.props.intl.locale)} - ${getLocalizedDateTimeFormatPattern(this.props.intl.locale)}`,
|
|
281
277
|
onMouseEnter: () => {
|
|
282
278
|
// we remove the highlight so that the user can use the
|
|
283
279
|
// arrow keys to move the cursor when hovering
|
|
@@ -285,11 +281,12 @@ let DateRangeInput = /*#__PURE__*/function (_Component) {
|
|
|
285
281
|
if (isOpen) setHighlightedIndex(null);
|
|
286
282
|
},
|
|
287
283
|
onKeyDown: event => {
|
|
284
|
+
var _context4, _context5;
|
|
288
285
|
if (this.props.isReadOnly) {
|
|
289
286
|
preventDownshiftDefault(event);
|
|
290
287
|
return;
|
|
291
288
|
}
|
|
292
|
-
if (event.key === 'Enter' && (
|
|
289
|
+
if (event.key === 'Enter' && ((_context4 = inputValue) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _trimInstanceProperty(_context4), _context4))?.() === '' &&
|
|
293
290
|
// do not clear value when user presses Enter to
|
|
294
291
|
// select the end date (so only clear when there is no
|
|
295
292
|
// startDate)
|
|
@@ -419,6 +416,6 @@ DateRangeInput.isEmpty = range => range.length === 0;
|
|
|
419
416
|
var dateRangeInput = injectIntl(DateRangeInput);
|
|
420
417
|
|
|
421
418
|
// NOTE: This string will be replaced on build time with the package version.
|
|
422
|
-
var version = "20.
|
|
419
|
+
var version = "20.6.1";
|
|
423
420
|
|
|
424
421
|
export { dateRangeInput as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-range-input",
|
|
3
3
|
"description": "The `DateRangeInput` component allows the user to select a date range.",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.6.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
"directory": "packages/components/inputs/date-range-input"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"javascript",
|
|
14
|
+
"typescript",
|
|
15
|
+
"design-system",
|
|
16
|
+
"react",
|
|
17
|
+
"uikit"
|
|
18
|
+
],
|
|
13
19
|
"license": "MIT",
|
|
14
20
|
"publishConfig": {
|
|
15
21
|
"access": "public"
|
|
@@ -17,32 +23,35 @@
|
|
|
17
23
|
"sideEffects": false,
|
|
18
24
|
"main": "dist/commercetools-uikit-date-range-input.cjs.js",
|
|
19
25
|
"module": "dist/commercetools-uikit-date-range-input.esm.js",
|
|
20
|
-
"files": [
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
21
29
|
"dependencies": {
|
|
22
30
|
"@babel/runtime": "^7.20.13",
|
|
23
31
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "20.5.0",
|
|
25
|
-
"@commercetools-uikit/calendar-time-utils": "20.5.0",
|
|
26
|
-
"@commercetools-uikit/calendar-utils": "20.5.0",
|
|
27
|
-
"@commercetools-uikit/constraints": "20.5.0",
|
|
28
|
-
"@commercetools-uikit/design-system": "20.5.0",
|
|
29
|
-
"@commercetools-uikit/hooks": "20.5.0",
|
|
30
|
-
"@commercetools-uikit/icons": "20.5.0",
|
|
31
|
-
"@commercetools-uikit/secondary-icon-button": "20.5.0",
|
|
32
|
-
"@commercetools-uikit/select-utils": "20.5.0",
|
|
33
|
-
"@commercetools-uikit/spacings-inline": "20.5.0",
|
|
34
|
-
"@commercetools-uikit/text": "20.5.0",
|
|
35
|
-
"@commercetools-uikit/tooltip": "20.5.0",
|
|
36
|
-
"@commercetools-uikit/utils": "20.5.0",
|
|
37
32
|
"@emotion/react": "^11.10.5",
|
|
38
33
|
"@emotion/styled": "^11.10.5",
|
|
39
|
-
"downshift": "9.
|
|
40
|
-
"react-is": "19.2.
|
|
41
|
-
"warning": "4.0.3"
|
|
34
|
+
"downshift": "9.3.3",
|
|
35
|
+
"react-is": "19.2.6",
|
|
36
|
+
"warning": "4.0.3",
|
|
37
|
+
"@commercetools-uikit/accessible-button": "^20.6.1",
|
|
38
|
+
"@commercetools-uikit/calendar-time-utils": "^20.6.1",
|
|
39
|
+
"@commercetools-uikit/calendar-utils": "^20.6.1",
|
|
40
|
+
"@commercetools-uikit/constraints": "^20.6.1",
|
|
41
|
+
"@commercetools-uikit/design-system": "^20.6.1",
|
|
42
|
+
"@commercetools-uikit/hooks": "^20.6.1",
|
|
43
|
+
"@commercetools-uikit/icons": "^20.6.1",
|
|
44
|
+
"@commercetools-uikit/secondary-icon-button": "^20.6.1",
|
|
45
|
+
"@commercetools-uikit/select-utils": "^20.6.1",
|
|
46
|
+
"@commercetools-uikit/spacings-inline": "^20.6.1",
|
|
47
|
+
"@commercetools-uikit/text": "^20.6.1",
|
|
48
|
+
"@commercetools-uikit/tooltip": "^20.6.1",
|
|
49
|
+
"@commercetools-uikit/utils": "^20.6.1"
|
|
42
50
|
},
|
|
43
51
|
"devDependencies": {
|
|
44
52
|
"moment": "2.30.1",
|
|
45
|
-
"
|
|
53
|
+
"prop-types": "^15.8.1",
|
|
54
|
+
"react": "19.2.6",
|
|
46
55
|
"react-intl": "^7.1.4"
|
|
47
56
|
},
|
|
48
57
|
"peerDependencies": {
|
|
@@ -50,4 +59,4 @@
|
|
|
50
59
|
"react": "19.x",
|
|
51
60
|
"react-intl": "7.x"
|
|
52
61
|
}
|
|
53
|
-
}
|
|
62
|
+
}
|