@commercetools-uikit/date-range-input 12.2.8 → 13.0.2

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
@@ -45,24 +45,41 @@ export default Example;
45
45
 
46
46
  ## Properties
47
47
 
48
- | Props | Type | Required | Default | Description |
49
- | ---------------------- | ----------------------------------------------------------------------------------------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50
- | `intl` | `object` || | |
51
- | `intl.locale` | `string` | ✅ | | |
52
- | `intl.formatMessage` | `func` | ✅ | | |
53
- | `horizontalConstraint` | `enum`<br/>Possible values:<br/>`6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input field. |
54
- | `value` | Array of `string` || | The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD". |
55
- | `onChange` | `func` || | Called when the date range changes. Called with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".&#xA;<br />&#xA;Signature: `(event) => void` |
56
- | `isClearable` | `bool` | | `true` | Allows the range to be cleared |
57
- | `onFocus` | `func` | | | Called when the date input gains focus. |
58
- | `onBlur` | `func` | | | Called when the date input loses focus. |
59
- | `id` | `string` | | | Used as the HTML `id` attribute. |
60
- | `name` | `string` | | | Used as the HTML `name` attribute. |
61
- | `placeholder` | `string` | | | Placeholder value to show in the input field |
62
- | `isDisabled` | `bool` | | | Disables the date picker |
63
- | `isReadOnly` | `bool` | | | Disables the date picker menu and makes input field read-only |
64
- | `hasError` | `bool` | | | Indicates the input field has an error |
65
- | `hasWarning` | `bool` | | | Indicates the input field has warning |
48
+ | Props | Type | Required | Default | Description |
49
+ | ---------------------- | -------------------------------------------------------------------------------------------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50
+ | `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input field. |
51
+ | `value` | `Array: MomentInput[]` | ✅ | | The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD". |
52
+ | `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called when the date range changes. Called with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".&#xA;<br />&#xA;Signature: `(event) => void` |
53
+ | `isClearable` | `boolean` | | `true` | Allows the range to be cleared |
54
+ | `onFocus` | `Function`<br/>[See signature.](#signature-onFocus) | | | Called when the date input gains focus. |
55
+ | `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Called when the date input loses focus. |
56
+ | `id` | `string` | | | Used as the HTML `id` attribute. |
57
+ | `name` | `string` | | | Used as the HTML `name` attribute. |
58
+ | `placeholder` | `string` | | | Placeholder value to show in the input field |
59
+ | `isDisabled` | `boolean` | | | Disables the date picker |
60
+ | `isReadOnly` | `boolean` | | | Disables the date picker menu and makes input field read-only |
61
+ | `hasError` | `boolean` | | | Indicates the input field has an error |
62
+ | `hasWarning` | `boolean` | | | Indicates the input field has warning |
63
+
64
+ ## Signatures
65
+
66
+ ### Signature `onChange`
67
+
68
+ ```ts
69
+ (event: TEvent) => void
70
+ ```
71
+
72
+ ### Signature `onFocus`
73
+
74
+ ```ts
75
+ (event: TEvent) => void
76
+ ```
77
+
78
+ ### Signature `onBlur`
79
+
80
+ ```ts
81
+ (event: TEvent) => void
82
+ ```
66
83
 
67
84
  ## `data-*` props
68
85
 
@@ -0,0 +1,2 @@
1
+ export * from "./declarations/src/index";
2
+ export { default } from "./declarations/src/index";
@@ -17,6 +17,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
17
17
  var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
18
18
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
19
19
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
20
+ var _pt = require('prop-types');
20
21
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
21
22
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
22
23
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
@@ -24,7 +25,6 @@ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
24
25
  var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
25
26
  var _fillInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/fill');
26
27
  var react = require('react');
27
- var PropTypes = require('prop-types');
28
28
  var Downshift = require('downshift');
29
29
  var reactIntl = require('react-intl');
30
30
  var Constraints = require('@commercetools-uikit/constraints');
@@ -42,13 +42,13 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
42
42
  var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
43
43
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
44
44
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
45
+ var _pt__default = /*#__PURE__*/_interopDefault(_pt);
45
46
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
46
47
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
47
48
  var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
48
49
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
49
50
  var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
50
51
  var _fillInstanceProperty__default = /*#__PURE__*/_interopDefault(_fillInstanceProperty);
51
- var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
52
52
  var Downshift__default = /*#__PURE__*/_interopDefault(Downshift);
53
53
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
54
54
 
@@ -60,16 +60,15 @@ var messages = reactIntl.defineMessages({
60
60
  }
61
61
  });
62
62
 
63
- 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; }
63
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); 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; }
64
64
 
65
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context6; _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), true)).call(_context6, 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 _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
65
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
66
66
 
67
67
  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); }; }
68
68
 
69
69
  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; } }
70
70
 
71
71
  var preventDownshiftDefault = function preventDownshiftDefault(event) {
72
- // eslint-disable-next-line no-param-reassign
73
72
  event.nativeEvent.preventDownshiftDefault = true;
74
73
  };
75
74
 
@@ -181,7 +180,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
181
180
  highlightedIndex: prevState.suggestedItems.length + calendarUtils.getDateInMonth(today) - 1
182
181
  };
183
182
  }, function () {
184
- return _this.inputRef.current.focus();
183
+ var _this$inputRef$curren;
184
+
185
+ return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
185
186
  });
186
187
  };
187
188
 
@@ -223,6 +224,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
223
224
  onInputValueChange: function onInputValueChange(inputValue, changes) {
224
225
  // only attempt to parse input when the user typed into the input
225
226
  // field
227
+ // @ts-ignore
226
228
  if (changes.type !== Downshift__default["default"].stateChangeTypes.changeInput) return;
227
229
 
228
230
  _this2.setState(function () {
@@ -260,9 +262,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
260
262
  });
261
263
  },
262
264
  onStateChange: function onStateChange(changes) {
263
- /* eslint-disable no-prototype-builtins */
264
265
  _this2.setState(function (prevState) {
265
- // ensure input value matches prop value when menu is closed
266
266
  if (changes.type === Downshift__default["default"].stateChangeTypes.mouseUp || changes.type === Downshift__default["default"].stateChangeTypes.blurInput) {
267
267
  return {
268
268
  highlightedIndex: null,
@@ -314,8 +314,6 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
314
314
 
315
315
  return null;
316
316
  });
317
- /* eslint-enable no-prototype-builtins */
318
-
319
317
  },
320
318
  onChange: function onChange(selectedItem) {
321
319
  if (_this2.state.startDate && selectedItem) {
@@ -338,13 +336,13 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
338
336
  setHighlightedIndex = _ref2.setHighlightedIndex,
339
337
  isOpen = _ref2.isOpen,
340
338
  inputValue = _ref2.inputValue;
341
- var calendarItems = calendarUtils.createCalendarItems(_this2.state.calendarDate, _this2.props.intl);
339
+ var calendarItems = calendarUtils.createCalendarItems(_this2.state.calendarDate);
342
340
 
343
341
  var allItems = _concatInstanceProperty__default["default"](_context4 = []).call(_context4, _toConsumableArray(_this2.state.suggestedItems), _toConsumableArray(calendarItems));
344
342
 
345
343
  var paddingDayCount = calendarUtils.getPaddingDayCount(_this2.state.calendarDate, _this2.props.intl.locale);
346
344
 
347
- var paddingDays = _fillInstanceProperty__default["default"](_context5 = Array(paddingDayCount)).call(_context5);
345
+ var paddingDays = _fillInstanceProperty__default["default"](_context5 = Array(paddingDayCount)).call(_context5, undefined);
348
346
 
349
347
  var weekdays = calendarUtils.getWeekdayNames(_this2.props.intl.locale);
350
348
  var today = calendarUtils.getToday();
@@ -362,6 +360,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
362
360
  onMouseEnter: function onMouseEnter() {
363
361
  // we remove the highlight so that the user can use the
364
362
  // arrow keys to move the cursor when hovering
363
+ // @ts-ignore
365
364
  if (isOpen) setHighlightedIndex(null);
366
365
  },
367
366
  onKeyDown: function onKeyDown(event) {
@@ -370,7 +369,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
370
369
  return;
371
370
  }
372
371
 
373
- if (event.key === 'Enter' && _trimInstanceProperty__default["default"](inputValue).call(inputValue) === '' && // do not clear value when user presses Enter to
372
+ if (event.key === 'Enter' && (inputValue === null || inputValue === void 0 ? void 0 : _trimInstanceProperty__default["default"](inputValue).call(inputValue)) === '' && // do not clear value when user presses Enter to
374
373
  // select the end date (so only clear when there is no
375
374
  // startDate)
376
375
  !_this2.state.startDate && _this2.props.isClearable) {
@@ -450,7 +449,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
450
449
  type: "heading",
451
450
  children: weekday
452
451
  }, weekday);
453
- }), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (day, index) {
452
+ }), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (_, index) {
454
453
  return jsxRuntime.jsx(calendarUtils.CalendarDay, {
455
454
  type: "spacing"
456
455
  }, index);
@@ -461,7 +460,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
461
460
  item: item,
462
461
  value: _this2.props.value,
463
462
  startDate: _this2.state.startDate,
464
- highlightedItem: allItems[_this2.state.highlightedIndex]
463
+ highlightedItem: allItems[_this2.state.highlightedIndex || 0]
465
464
  }),
466
465
  isRangeStart = _getRange.isRangeStart,
467
466
  isRangeBetween = _getRange.isRangeBetween,
@@ -473,6 +472,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
473
472
  disabled: _this2.props.isDisabled,
474
473
  item: item,
475
474
  onMouseOut: function onMouseOut() {
475
+ // @ts-ignore
476
476
  setHighlightedIndex(null);
477
477
  }
478
478
  })), {}, {
@@ -521,82 +521,24 @@ DateRangeCalendar.isEmpty = function (range) {
521
521
  };
522
522
 
523
523
  DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
524
- intl: PropTypes__default["default"].shape({
525
- locale: PropTypes__default["default"].string.isRequired,
526
- formatMessage: PropTypes__default["default"].func.isRequired
527
- }).isRequired,
528
-
529
- /**
530
- * Horizontal size limit of the input field.
531
- */
532
- horizontalConstraint: PropTypes__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
533
-
534
- /**
535
- * The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD".
536
- */
537
- value: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string).isRequired,
538
-
539
- /**
540
- * Called when the date range changes. Called with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".
541
- * <br />
542
- * Signature: `(event) => void`
543
- */
544
- onChange: PropTypes__default["default"].func.isRequired,
545
-
546
- /**
547
- * Allows the range to be cleared
548
- */
549
- isClearable: PropTypes__default["default"].bool,
550
-
551
- /**
552
- * Called when the date input gains focus.
553
- */
554
- onFocus: PropTypes__default["default"].func,
555
-
556
- /**
557
- * Called when the date input loses focus.
558
- */
559
- onBlur: PropTypes__default["default"].func,
560
-
561
- /**
562
- * Used as the HTML `id` attribute.
563
- */
564
- id: PropTypes__default["default"].string,
565
-
566
- /**
567
- * Used as the HTML `name` attribute.
568
- */
569
- name: PropTypes__default["default"].string,
570
-
571
- /**
572
- * Placeholder value to show in the input field
573
- */
574
- placeholder: PropTypes__default["default"].string,
575
-
576
- /**
577
- * Disables the date picker
578
- */
579
- isDisabled: PropTypes__default["default"].bool,
580
-
581
- /**
582
- * Disables the date picker menu and makes input field read-only
583
- */
584
- isReadOnly: PropTypes__default["default"].bool,
585
-
586
- /**
587
- * Indicates the input field has an error
588
- */
589
- hasError: PropTypes__default["default"].bool,
590
-
591
- /**
592
- * Indicates the input field has warning
593
- */
594
- hasWarning: PropTypes__default["default"].bool
524
+ horizontalConstraint: _pt__default["default"].oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
525
+ value: _pt__default["default"].arrayOf(_pt__default["default"].any).isRequired,
526
+ onChange: _pt__default["default"].func.isRequired,
527
+ isClearable: _pt__default["default"].bool,
528
+ onFocus: _pt__default["default"].func,
529
+ onBlur: _pt__default["default"].func,
530
+ id: _pt__default["default"].string,
531
+ name: _pt__default["default"].string,
532
+ placeholder: _pt__default["default"].string,
533
+ isDisabled: _pt__default["default"].bool,
534
+ isReadOnly: _pt__default["default"].bool,
535
+ hasError: _pt__default["default"].bool,
536
+ hasWarning: _pt__default["default"].bool
595
537
  } : {};
596
538
  var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
597
539
 
598
540
  // NOTE: This string will be replaced on build time with the package version.
599
- var version = "12.2.8";
541
+ var version = "13.0.2";
600
542
 
601
543
  exports["default"] = dateRangeInput;
602
544
  exports.version = version;
@@ -17,6 +17,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
17
17
  var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
18
18
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
19
19
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
20
+ require('prop-types');
20
21
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
21
22
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
22
23
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
@@ -24,7 +25,6 @@ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
24
25
  var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
25
26
  var _fillInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/fill');
26
27
  var react = require('react');
27
- require('prop-types');
28
28
  var Downshift = require('downshift');
29
29
  var reactIntl = require('react-intl');
30
30
  var Constraints = require('@commercetools-uikit/constraints');
@@ -59,16 +59,15 @@ var messages = reactIntl.defineMessages({
59
59
  }
60
60
  });
61
61
 
62
- 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; }
62
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); 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; }
63
63
 
64
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context6; _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), true)).call(_context6, 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 _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
64
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
65
65
 
66
66
  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); }; }
67
67
 
68
68
  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; } }
69
69
 
70
70
  var preventDownshiftDefault = function preventDownshiftDefault(event) {
71
- // eslint-disable-next-line no-param-reassign
72
71
  event.nativeEvent.preventDownshiftDefault = true;
73
72
  };
74
73
 
@@ -180,7 +179,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
180
179
  highlightedIndex: prevState.suggestedItems.length + calendarUtils.getDateInMonth(today) - 1
181
180
  };
182
181
  }, function () {
183
- return _this.inputRef.current.focus();
182
+ var _this$inputRef$curren;
183
+
184
+ return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
184
185
  });
185
186
  };
186
187
 
@@ -222,6 +223,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
222
223
  onInputValueChange: function onInputValueChange(inputValue, changes) {
223
224
  // only attempt to parse input when the user typed into the input
224
225
  // field
226
+ // @ts-ignore
225
227
  if (changes.type !== Downshift__default["default"].stateChangeTypes.changeInput) return;
226
228
 
227
229
  _this2.setState(function () {
@@ -259,9 +261,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
259
261
  });
260
262
  },
261
263
  onStateChange: function onStateChange(changes) {
262
- /* eslint-disable no-prototype-builtins */
263
264
  _this2.setState(function (prevState) {
264
- // ensure input value matches prop value when menu is closed
265
265
  if (changes.type === Downshift__default["default"].stateChangeTypes.mouseUp || changes.type === Downshift__default["default"].stateChangeTypes.blurInput) {
266
266
  return {
267
267
  highlightedIndex: null,
@@ -313,8 +313,6 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
313
313
 
314
314
  return null;
315
315
  });
316
- /* eslint-enable no-prototype-builtins */
317
-
318
316
  },
319
317
  onChange: function onChange(selectedItem) {
320
318
  if (_this2.state.startDate && selectedItem) {
@@ -337,13 +335,13 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
337
335
  setHighlightedIndex = _ref2.setHighlightedIndex,
338
336
  isOpen = _ref2.isOpen,
339
337
  inputValue = _ref2.inputValue;
340
- var calendarItems = calendarUtils.createCalendarItems(_this2.state.calendarDate, _this2.props.intl);
338
+ var calendarItems = calendarUtils.createCalendarItems(_this2.state.calendarDate);
341
339
 
342
340
  var allItems = _concatInstanceProperty__default["default"](_context4 = []).call(_context4, _toConsumableArray(_this2.state.suggestedItems), _toConsumableArray(calendarItems));
343
341
 
344
342
  var paddingDayCount = calendarUtils.getPaddingDayCount(_this2.state.calendarDate, _this2.props.intl.locale);
345
343
 
346
- var paddingDays = _fillInstanceProperty__default["default"](_context5 = Array(paddingDayCount)).call(_context5);
344
+ var paddingDays = _fillInstanceProperty__default["default"](_context5 = Array(paddingDayCount)).call(_context5, undefined);
347
345
 
348
346
  var weekdays = calendarUtils.getWeekdayNames(_this2.props.intl.locale);
349
347
  var today = calendarUtils.getToday();
@@ -361,6 +359,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
361
359
  onMouseEnter: function onMouseEnter() {
362
360
  // we remove the highlight so that the user can use the
363
361
  // arrow keys to move the cursor when hovering
362
+ // @ts-ignore
364
363
  if (isOpen) setHighlightedIndex(null);
365
364
  },
366
365
  onKeyDown: function onKeyDown(event) {
@@ -369,7 +368,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
369
368
  return;
370
369
  }
371
370
 
372
- if (event.key === 'Enter' && _trimInstanceProperty__default["default"](inputValue).call(inputValue) === '' && // do not clear value when user presses Enter to
371
+ if (event.key === 'Enter' && (inputValue === null || inputValue === void 0 ? void 0 : _trimInstanceProperty__default["default"](inputValue).call(inputValue)) === '' && // do not clear value when user presses Enter to
373
372
  // select the end date (so only clear when there is no
374
373
  // startDate)
375
374
  !_this2.state.startDate && _this2.props.isClearable) {
@@ -449,7 +448,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
449
448
  type: "heading",
450
449
  children: weekday
451
450
  }, weekday);
452
- }), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (day, index) {
451
+ }), _mapInstanceProperty__default["default"](paddingDays).call(paddingDays, function (_, index) {
453
452
  return jsxRuntime.jsx(calendarUtils.CalendarDay, {
454
453
  type: "spacing"
455
454
  }, index);
@@ -460,7 +459,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
460
459
  item: item,
461
460
  value: _this2.props.value,
462
461
  startDate: _this2.state.startDate,
463
- highlightedItem: allItems[_this2.state.highlightedIndex]
462
+ highlightedItem: allItems[_this2.state.highlightedIndex || 0]
464
463
  }),
465
464
  isRangeStart = _getRange.isRangeStart,
466
465
  isRangeBetween = _getRange.isRangeBetween,
@@ -472,6 +471,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
472
471
  disabled: _this2.props.isDisabled,
473
472
  item: item,
474
473
  onMouseOut: function onMouseOut() {
474
+ // @ts-ignore
475
475
  setHighlightedIndex(null);
476
476
  }
477
477
  })), {}, {
@@ -523,7 +523,7 @@ DateRangeCalendar.propTypes = {};
523
523
  var dateRangeInput = reactIntl.injectIntl(DateRangeCalendar);
524
524
 
525
525
  // NOTE: This string will be replaced on build time with the package version.
526
- var version = "12.2.8";
526
+ var version = "13.0.2";
527
527
 
528
528
  exports["default"] = dateRangeInput;
529
529
  exports.version = version;
@@ -13,6 +13,7 @@ import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
13
13
  import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
14
14
  import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
15
15
  import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
16
+ import _pt from 'prop-types';
16
17
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
17
18
  import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
18
19
  import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
@@ -20,7 +21,6 @@ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
20
21
  import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
21
22
  import _fillInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/fill';
22
23
  import { createRef, Component } from 'react';
23
- import PropTypes from 'prop-types';
24
24
  import Downshift from 'downshift';
25
25
  import { defineMessages, injectIntl } from 'react-intl';
26
26
  import Constraints from '@commercetools-uikit/constraints';
@@ -36,16 +36,15 @@ var messages = defineMessages({
36
36
  }
37
37
  });
38
38
 
39
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
39
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
40
40
 
41
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context6; _forEachInstanceProperty(_context6 = ownKeys(Object(source), true)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context7; _forEachInstanceProperty(_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
41
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
42
42
 
43
43
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
44
44
 
45
45
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
46
46
 
47
47
  var preventDownshiftDefault = function preventDownshiftDefault(event) {
48
- // eslint-disable-next-line no-param-reassign
49
48
  event.nativeEvent.preventDownshiftDefault = true;
50
49
  };
51
50
 
@@ -157,7 +156,9 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
157
156
  highlightedIndex: prevState.suggestedItems.length + getDateInMonth(today) - 1
158
157
  };
159
158
  }, function () {
160
- return _this.inputRef.current.focus();
159
+ var _this$inputRef$curren;
160
+
161
+ return (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
161
162
  });
162
163
  };
163
164
 
@@ -199,6 +200,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
199
200
  onInputValueChange: function onInputValueChange(inputValue, changes) {
200
201
  // only attempt to parse input when the user typed into the input
201
202
  // field
203
+ // @ts-ignore
202
204
  if (changes.type !== Downshift.stateChangeTypes.changeInput) return;
203
205
 
204
206
  _this2.setState(function () {
@@ -236,9 +238,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
236
238
  });
237
239
  },
238
240
  onStateChange: function onStateChange(changes) {
239
- /* eslint-disable no-prototype-builtins */
240
241
  _this2.setState(function (prevState) {
241
- // ensure input value matches prop value when menu is closed
242
242
  if (changes.type === Downshift.stateChangeTypes.mouseUp || changes.type === Downshift.stateChangeTypes.blurInput) {
243
243
  return {
244
244
  highlightedIndex: null,
@@ -290,8 +290,6 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
290
290
 
291
291
  return null;
292
292
  });
293
- /* eslint-enable no-prototype-builtins */
294
-
295
293
  },
296
294
  onChange: function onChange(selectedItem) {
297
295
  if (_this2.state.startDate && selectedItem) {
@@ -314,13 +312,13 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
314
312
  setHighlightedIndex = _ref2.setHighlightedIndex,
315
313
  isOpen = _ref2.isOpen,
316
314
  inputValue = _ref2.inputValue;
317
- var calendarItems = createCalendarItems(_this2.state.calendarDate, _this2.props.intl);
315
+ var calendarItems = createCalendarItems(_this2.state.calendarDate);
318
316
 
319
317
  var allItems = _concatInstanceProperty(_context4 = []).call(_context4, _toConsumableArray(_this2.state.suggestedItems), _toConsumableArray(calendarItems));
320
318
 
321
319
  var paddingDayCount = getPaddingDayCount(_this2.state.calendarDate, _this2.props.intl.locale);
322
320
 
323
- var paddingDays = _fillInstanceProperty(_context5 = Array(paddingDayCount)).call(_context5);
321
+ var paddingDays = _fillInstanceProperty(_context5 = Array(paddingDayCount)).call(_context5, undefined);
324
322
 
325
323
  var weekdays = getWeekdayNames(_this2.props.intl.locale);
326
324
  var today = getToday();
@@ -338,6 +336,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
338
336
  onMouseEnter: function onMouseEnter() {
339
337
  // we remove the highlight so that the user can use the
340
338
  // arrow keys to move the cursor when hovering
339
+ // @ts-ignore
341
340
  if (isOpen) setHighlightedIndex(null);
342
341
  },
343
342
  onKeyDown: function onKeyDown(event) {
@@ -346,7 +345,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
346
345
  return;
347
346
  }
348
347
 
349
- if (event.key === 'Enter' && _trimInstanceProperty(inputValue).call(inputValue) === '' && // do not clear value when user presses Enter to
348
+ if (event.key === 'Enter' && (inputValue === null || inputValue === void 0 ? void 0 : _trimInstanceProperty(inputValue).call(inputValue)) === '' && // do not clear value when user presses Enter to
350
349
  // select the end date (so only clear when there is no
351
350
  // startDate)
352
351
  !_this2.state.startDate && _this2.props.isClearable) {
@@ -426,7 +425,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
426
425
  type: "heading",
427
426
  children: weekday
428
427
  }, weekday);
429
- }), _mapInstanceProperty(paddingDays).call(paddingDays, function (day, index) {
428
+ }), _mapInstanceProperty(paddingDays).call(paddingDays, function (_, index) {
430
429
  return jsx(CalendarDay, {
431
430
  type: "spacing"
432
431
  }, index);
@@ -437,7 +436,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
437
436
  item: item,
438
437
  value: _this2.props.value,
439
438
  startDate: _this2.state.startDate,
440
- highlightedItem: allItems[_this2.state.highlightedIndex]
439
+ highlightedItem: allItems[_this2.state.highlightedIndex || 0]
441
440
  }),
442
441
  isRangeStart = _getRange.isRangeStart,
443
442
  isRangeBetween = _getRange.isRangeBetween,
@@ -449,6 +448,7 @@ var DateRangeCalendar = /*#__PURE__*/function (_Component) {
449
448
  disabled: _this2.props.isDisabled,
450
449
  item: item,
451
450
  onMouseOut: function onMouseOut() {
451
+ // @ts-ignore
452
452
  setHighlightedIndex(null);
453
453
  }
454
454
  })), {}, {
@@ -497,81 +497,23 @@ DateRangeCalendar.isEmpty = function (range) {
497
497
  };
498
498
 
499
499
  DateRangeCalendar.propTypes = process.env.NODE_ENV !== "production" ? {
500
- intl: PropTypes.shape({
501
- locale: PropTypes.string.isRequired,
502
- formatMessage: PropTypes.func.isRequired
503
- }).isRequired,
504
-
505
- /**
506
- * Horizontal size limit of the input field.
507
- */
508
- horizontalConstraint: PropTypes.oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
509
-
510
- /**
511
- * The selected date range, must either be an empty array or an array of two strings holding dates formatted as "YYYY-MM-DD".
512
- */
513
- value: PropTypes.arrayOf(PropTypes.string).isRequired,
514
-
515
- /**
516
- * Called when the date range changes. Called with an event containing either an empty array (no value) or an array holding two string in this format: "YYYY-MM-DD".
517
- * <br />
518
- * Signature: `(event) => void`
519
- */
520
- onChange: PropTypes.func.isRequired,
521
-
522
- /**
523
- * Allows the range to be cleared
524
- */
525
- isClearable: PropTypes.bool,
526
-
527
- /**
528
- * Called when the date input gains focus.
529
- */
530
- onFocus: PropTypes.func,
531
-
532
- /**
533
- * Called when the date input loses focus.
534
- */
535
- onBlur: PropTypes.func,
536
-
537
- /**
538
- * Used as the HTML `id` attribute.
539
- */
540
- id: PropTypes.string,
541
-
542
- /**
543
- * Used as the HTML `name` attribute.
544
- */
545
- name: PropTypes.string,
546
-
547
- /**
548
- * Placeholder value to show in the input field
549
- */
550
- placeholder: PropTypes.string,
551
-
552
- /**
553
- * Disables the date picker
554
- */
555
- isDisabled: PropTypes.bool,
556
-
557
- /**
558
- * Disables the date picker menu and makes input field read-only
559
- */
560
- isReadOnly: PropTypes.bool,
561
-
562
- /**
563
- * Indicates the input field has an error
564
- */
565
- hasError: PropTypes.bool,
566
-
567
- /**
568
- * Indicates the input field has warning
569
- */
570
- hasWarning: PropTypes.bool
500
+ horizontalConstraint: _pt.oneOf([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
501
+ value: _pt.arrayOf(_pt.any).isRequired,
502
+ onChange: _pt.func.isRequired,
503
+ isClearable: _pt.bool,
504
+ onFocus: _pt.func,
505
+ onBlur: _pt.func,
506
+ id: _pt.string,
507
+ name: _pt.string,
508
+ placeholder: _pt.string,
509
+ isDisabled: _pt.bool,
510
+ isReadOnly: _pt.bool,
511
+ hasError: _pt.bool,
512
+ hasWarning: _pt.bool
571
513
  } : {};
572
514
  var dateRangeInput = injectIntl(DateRangeCalendar);
573
515
 
574
516
  // NOTE: This string will be replaced on build time with the package version.
575
- var version = "12.2.8";
517
+ var version = "13.0.2";
576
518
 
577
519
  export { dateRangeInput as default, version };
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { type WrappedComponentProps } from 'react-intl';
3
+ import type { MomentInput } from 'moment';
4
+ declare type TEvent = {
5
+ target: {
6
+ id?: string;
7
+ name?: string;
8
+ value?: MomentInput[];
9
+ };
10
+ };
11
+ declare type TDateRangeCalendarProps = {
12
+ horizontalConstraint?: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
13
+ value: MomentInput[];
14
+ onChange: (event: TEvent) => void;
15
+ isClearable?: boolean;
16
+ onFocus?: (event: TEvent) => void;
17
+ onBlur?: (event: TEvent) => void;
18
+ id?: string;
19
+ name?: string;
20
+ placeholder?: string;
21
+ isDisabled?: boolean;
22
+ isReadOnly?: boolean;
23
+ hasError?: boolean;
24
+ hasWarning?: boolean;
25
+ } & WrappedComponentProps;
26
+ declare const _default: import("react").FC<import("react-intl").WithIntlProps<TDateRangeCalendarProps>> & {
27
+ WrappedComponent: import("react").ComponentType<TDateRangeCalendarProps>;
28
+ };
29
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default } from './date-range-input';
2
+ export { default as version } from './version';
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ placeholder: {
3
+ id: string;
4
+ description: string;
5
+ defaultMessage: string;
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: "__@UI_KIT_PACKAGE/VERSION_OF_RELEASE__";
2
+ export default _default;
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": "12.2.8",
4
+ "version": "13.0.2",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,25 +19,25 @@
19
19
  "module": "dist/commercetools-uikit-date-range-input.esm.js",
20
20
  "files": ["dist"],
21
21
  "dependencies": {
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-utils": "12.2.8",
26
- "@commercetools-uikit/constraints": "12.2.5",
27
- "@commercetools-uikit/design-system": "12.2.5",
28
- "@commercetools-uikit/hooks": "12.2.5",
29
- "@commercetools-uikit/icons": "12.2.7",
30
- "@commercetools-uikit/secondary-icon-button": "12.2.5",
31
- "@commercetools-uikit/select-utils": "12.2.7",
32
- "@commercetools-uikit/spacings-inline": "12.2.5",
33
- "@commercetools-uikit/text": "12.2.5",
34
- "@commercetools-uikit/tooltip": "12.2.5",
35
- "@commercetools-uikit/utils": "12.2.5",
22
+ "@babel/runtime": "7.17.2",
23
+ "@babel/runtime-corejs3": "7.17.2",
24
+ "@commercetools-uikit/accessible-button": "13.0.2",
25
+ "@commercetools-uikit/calendar-utils": "13.0.2",
26
+ "@commercetools-uikit/constraints": "13.0.2",
27
+ "@commercetools-uikit/design-system": "13.0.0",
28
+ "@commercetools-uikit/hooks": "13.0.2",
29
+ "@commercetools-uikit/icons": "13.0.2",
30
+ "@commercetools-uikit/secondary-icon-button": "13.0.2",
31
+ "@commercetools-uikit/select-utils": "13.0.2",
32
+ "@commercetools-uikit/spacings-inline": "13.0.2",
33
+ "@commercetools-uikit/text": "13.0.2",
34
+ "@commercetools-uikit/tooltip": "13.0.2",
35
+ "@commercetools-uikit/utils": "13.0.2",
36
36
  "@emotion/react": "^11.4.0",
37
37
  "@emotion/styled": "^11.3.0",
38
38
  "common-tags": "1.8.2",
39
39
  "downshift": "6.1.7",
40
- "prop-types": "15.7.2",
40
+ "prop-types": "15.8.1",
41
41
  "react-is": "17.0.2",
42
42
  "react-required-if": "1.0.3",
43
43
  "warning": "4.0.3"
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "moment": "2.29.1",
47
47
  "react": "17.0.2",
48
- "react-intl": "5.21.2"
48
+ "react-intl": "5.24.6"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "moment": "2.x",