@commercetools-uikit/async-creatable-select-input 12.2.6 → 13.0.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
@@ -58,53 +58,66 @@ export default Example;
58
58
 
59
59
  ## Properties
60
60
 
61
- | Props | Type | Required | Default | Description |
62
- | --------------------------------- | -------------------------------------------------------------------------------------------------- | :------: | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
- | `horizontalConstraint` | `enum`<br/>Possible values:<br/>`3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input fields. |
64
- | `hasError` | `bool` | | | Indicates the input field has an error |
65
- | `hasWarning` | `bool` | | | Indicates the input field has a warning |
66
- | `isReadOnly` | `bool` | | | Is the select read-only |
67
- | `iconLeft` | `node` | | | Icon to display on the left of the placeholder text and selected value. Has no effect when isMulti is enabled. |
68
- | `aria-label` | `string` | | | Aria label (for assistive tech) |
69
- | `aria-labelledby` | `string` | | | HTML ID of an element that should be used as the label (for assistive tech) |
70
- | `isAutofocussed` | `bool` | | | Focus the control when it is mounted |
71
- | `backspaceRemovesValue` | `bool` | | | Remove the currently focused option when the user presses backspace |
72
- | `components` | `objectOf(func)` | | | Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components) |
73
- | `filterOption` | `func` | | | Custom method to filter whether an option should be displayed in the menu |
74
- | `id` | `string` | | | The id of the search input |
75
- | `inputValue` | `string` | | | |
76
- | `containerId` | `string` | | | The id to set on the SelectContainer component |
77
- | `isClearable` | `bool` | | | Is the select value clearable |
78
- | `isDisabled` | `bool` | | | Is the select disabled |
79
- | `isOptionDisabled` | `func` | | | Override the built-in logic to detect whether an option is disabled |
80
- | `isMulti` | `bool` | | | Support multiple selected options |
81
- | `isSearchable` | `bool` | | `true` | Whether to enable search functionality |
82
- | `maxMenuHeight` | `number` | | | Maximum height of the menu before scrolling |
83
- | `menuPortalTarget` | `SafeHTMLElement` | | | Dom element to portal the select menu to |
84
- | `menuPortalZIndex` | `number` | | `1` | z-index value for the menu portal |
85
- | `menuShouldBlockScroll` | `bool` | | | whether the menu should block scroll while open |
86
- | `name` | `string` | | | Name of the HTML Input (optional - without this, no input will be rendered) |
87
- | `noOptionsMessage` | `func` | | | Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with `{ inputValue: String }`. `inputValue` will be an empty string when no search text is present. |
88
- | `onBlur` | `func` | | | Handle blur events on the control |
89
- | `onChange` | `func` || | Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`. |
90
- | `onFocus` | `func` | | | Handle focus events on the control |
91
- | `onInputChange` | `func` | | | Handle change events on the input |
92
- | `placeholder` | `string` | | | Placeholder text for the select value |
93
- | `tabIndex` | `string` | | | Sets the tabIndex attribute on the input |
94
- | `tabSelectsValue` | `bool` | | | Select the currently focused option when the user presses tab |
95
- | `value` | `custom` | | `null` | The value of the select; reflected by the selected option |
96
- | `defaultOptions` | `<bool, arrayOf>` | | | The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded. |
97
- | `defaultOptions<arrayOf>` | `array` | | | |
98
- | `defaultOptions<arrayOf>[].value` | `string` | ✅ | | |
99
- | `loadOptions` | `func` || | Function that returns a promise, which is the set of options to be used once the promise resolves. |
100
- | `cacheOptions` | `any` | | | If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value. |
101
- | `allowCreateWhileLoading` | `bool` | | | Allow options to be created while the isLoading prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded. |
102
- | `formatCreateLabel` | `func` | | | Gets the label for the "create new ..." option in the menu. Is given the current input value. |
103
- | `isValidNewOption` | `func` | | | Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array. |
104
- | `getNewOptionData` | `func` | | | Returns the data for the new option when it is created. Used to display the value, and is passed to onChange. |
105
- | `onCreateOption` | `func` | | | If provided, this will be called with the input value when a new option is created, and onChange will not be called. Use this when you need more control over what happens when new options are created. |
106
- | `createOptionPosition` | `string` | | | Sets the position of the createOption element in your options list. |
107
- | `showOptionGroupDivider` | `bool` | | | Determines if option groups will be separated by a divider |
61
+ | Props | Type | Required | Default | Description |
62
+ | ------------------------- | ----------------------------------------------------------------------------------------------------- | :------: | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
+ | `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | Horizontal size limit of the input fields. |
64
+ | `hasError` | `boolean` | | | Indicates the input field has an error |
65
+ | `hasWarning` | `boolean` | | | Indicates the input field has a warning |
66
+ | `isReadOnly` | `boolean` | | | Is the select read-only |
67
+ | `iconLeft` | `ReactNode` | | | Icon to display on the left of the placeholder text and selected value. Has no effect when isMulti is enabled. |
68
+ | `aria-label` | `AsyncCreatableProps['aria-label']` | | | Aria label (for assistive tech)&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
69
+ | `aria-labelledby` | `AsyncCreatableProps['aria-labelledby']` | | | HTML ID of an element that should be used as the label (for assistive tech)&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
70
+ | `isAutofocussed` | `boolean` | | | Focus the control when it is mounted |
71
+ | `backspaceRemovesValue` | `AsyncCreatableProps['backspaceRemovesValue']` | | | Remove the currently focused option when the user presses backspace&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
72
+ | `components` | `AsyncCreatableProps['components']` | | | Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
73
+ | `filterOption` | `AsyncCreatableProps['filterOption']` | | | Custom method to filter whether an option should be displayed in the menu&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
74
+ | `id` | `AsyncCreatableProps['inputId']` | | | The id of the search input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
75
+ | `inputValue` | `AsyncCreatableProps['inputValue']` | | | The value of the search input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
76
+ | `containerId` | `AsyncCreatableProps['id']` | | | The id to set on the SelectContainer component&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
77
+ | `isClearable` | `AsyncCreatableProps['isClearable']` | | | Is the select value clearable&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
78
+ | `isDisabled` | `AsyncCreatableProps['isDisabled']` | | | Is the select disabled&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
79
+ | `isOptionDisabled` | `AsyncCreatableProps['isOptionDisabled']` | | | Override the built-in logic to detect whether an option is disabled&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
80
+ | `isMulti` | `AsyncCreatableProps['isMulti']` | | | Support multiple selected options&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
81
+ | `isSearchable` | `AsyncCreatableProps['isSearchable']` | | `true` | Whether to enable search functionality&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
82
+ | `maxMenuHeight` | `AsyncCreatableProps['maxMenuHeight']` | | | Maximum height of the menu before scrolling&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
83
+ | `menuPortalTarget` | `AsyncCreatableProps['menuPortalTarget']` | | | Dom element to portal the select menu to&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
84
+ | `menuPortalZIndex` | `number` | | `1` | z-index value for the menu portal |
85
+ | `menuShouldBlockScroll` | `AsyncCreatableProps['menuShouldBlockScroll']` | | | whether the menu should block scroll while open&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
86
+ | `closeMenuOnSelect` | `AsyncCreatableProps['closeMenuOnSelect']` | | | Whether the menu should close after a value is selected. Defaults to `true`.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
87
+ | `name` | `AsyncCreatableProps['name']` | | | Name of the HTML Input (optional - without this, no input will be rendered)&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
88
+ | `noOptionsMessage` | `AsyncCreatableProps['noOptionsMessage']` | | | Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with `{ inputValue: String }`. `inputValue` will be an empty string when no search text is present.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
89
+ | `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Handle blur events on the control |
90
+ | `onChange` | `Function`<br/>[See signature.](#signature-onChange) || | Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`. |
91
+ | `onFocus` | `AsyncCreatableProps['onFocus']` | | | Handle focus events on the control&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
92
+ | `onInputChange` | `AsyncCreatableProps['onInputChange']` | | | Handle change events on the input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
93
+ | `placeholder` | `AsyncCreatableProps['placeholder']` | | | Placeholder text for the select value&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
94
+ | `tabIndex` | `AsyncCreatableProps['tabIndex']` | | | Sets the tabIndex attribute on the input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
95
+ | `tabSelectsValue` | `AsyncCreatableProps['tabSelectsValue']` | | | Select the currently focused option when the user presses tab&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
96
+ | `value` | `AsyncCreatableProps['value']` | | `null` | The value of the select; reflected by the selected option&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
97
+ | `defaultOptions` | `AsyncCreatableProps['defaultOptions']` | | | The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
98
+ | `loadOptions` | `AsyncCreatableProps['loadOptions']` | ✅ | | Function that returns a promise, which is the set of options to be used once the promise resolves.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
99
+ | `cacheOptions` | `AsyncCreatableProps['cacheOptions']` | | | If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
100
+ | `allowCreateWhileLoading` | `AsyncCreatableProps['allowCreateWhileLoading']` | | | Allow options to be created while the isLoading prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
101
+ | `formatCreateLabel` | `AsyncCreatableProps['formatCreateLabel']` | | | Gets the label for the "create new ..." option in the menu. Is given the current input value.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
102
+ | `isValidNewOption` | `AsyncCreatableProps['isValidNewOption']` | | | Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
103
+ | `getNewOptionData` | `AsyncCreatableProps['getNewOptionData']` | | | Returns the data for the new option when it is created. Used to display the value, and is passed to onChange.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
104
+ | `onCreateOption` | `AsyncCreatableProps['onCreateOption']` | | | If provided, this will be called with the input value when a new option is created, and onChange will not be called. Use this when you need more control over what happens when new options are created.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
105
+ | `createOptionPosition` | `AsyncCreatableProps['createOptionPosition']` | | | Sets the position of the createOption element in your options list.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
106
+ | `showOptionGroupDivider` | `boolean` | | | Determines if option groups will be separated by a divider |
107
+
108
+ ## Signatures
109
+
110
+ ### Signature `onBlur`
111
+
112
+ ```ts
113
+ (event: TEvent) => void
114
+ ```
115
+
116
+ ### Signature `onChange`
117
+
118
+ ```ts
119
+ (event: TEvent, info: ActionMeta<unknown>) => void
120
+ ```
108
121
 
109
122
  This input is built on top of [`react-select`](https://github.com/JedWatson/react-select) v2.
110
123
  It supports mostly same properties as `react-select`. Behaviour for some props was changed, and support for others was dropped.
@@ -0,0 +1,2 @@
1
+ export * from "./declarations/src/index";
2
+ export { default } from "./declarations/src/index";
@@ -2,6 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
6
+ var _pt = require('prop-types');
7
+ var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
5
8
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
9
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
7
10
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -10,10 +13,8 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
10
13
  var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
11
14
  var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
12
15
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
13
- var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
14
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
15
- var PropTypes = require('prop-types');
16
16
  var reactIntl = require('react-intl');
17
+ var isEmpty = require('lodash/isEmpty');
17
18
  var react = require('@emotion/react');
18
19
  var reactSelect = require('react-select');
19
20
  var AsyncCreatableSelect = require('react-select/async-creatable');
@@ -25,6 +26,8 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
25
26
 
26
27
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
27
28
 
29
+ var _pt__default = /*#__PURE__*/_interopDefault(_pt);
30
+ var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
28
31
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
29
32
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
30
33
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -33,15 +36,14 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
33
36
  var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
34
37
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
35
38
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
36
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
37
- var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
39
+ var isEmpty__default = /*#__PURE__*/_interopDefault(isEmpty);
38
40
  var AsyncCreatableSelect__default = /*#__PURE__*/_interopDefault(AsyncCreatableSelect);
39
41
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
40
42
  var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
41
43
 
42
- 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; }
44
+ 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; }
43
45
 
44
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, 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 _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
46
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
45
47
 
46
48
  var LoadingIndicator = function LoadingIndicator() {
47
49
  return jsxRuntime.jsx(LoadingSpinner__default["default"], {
@@ -56,11 +58,23 @@ var customizedComponents = {
56
58
  LoadingIndicator: LoadingIndicator,
57
59
  MultiValueRemove: selectUtils.TagRemove
58
60
  };
61
+ var defaultProps = {
62
+ // Using "null" will ensure that the currently selected value disappears in
63
+ // case "undefined" gets passed as the next value
64
+ value: null,
65
+ isSearchable: true,
66
+ menuPortalZIndex: 1
67
+ };
59
68
 
60
69
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
61
70
  var intl = reactIntl.useIntl();
62
71
  var theme = react.useTheme();
63
72
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
73
+
74
+ if (props.isMulti) {
75
+ process.env.NODE_ENV !== "production" ? utils.warning(_Array$isArray__default["default"](props.value), 'AsyncCreatableSelectInput: `value` is expected to be an array when isMulti is true') : void 0;
76
+ }
77
+
64
78
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
65
79
  max: props.horizontalConstraint,
66
80
  children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
@@ -70,7 +84,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
70
84
  autoFocus: props.isAutofocussed,
71
85
  backspaceRemovesValue: props.isReadOnly ? false : props.backspaceRemovesValue,
72
86
  components: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, customizedComponents), props.iconLeft && !props.isMulti ? selectUtils.customComponentsWithIcons : {}), props.isReadOnly ? {
73
- // eslint-disable-next-line react/display-name
74
87
  Input: function Input(ownProps) {
75
88
  return jsxRuntime.jsx(reactSelect.components.Input, _objectSpread(_objectSpread({}, ownProps), {}, {
76
89
  readOnly: true
@@ -84,7 +97,10 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
84
97
  showOptionGroupDivider: props.showOptionGroupDivider,
85
98
  menuPortalZIndex: props.menuPortalZIndex,
86
99
  isDisabled: props.isDisabled,
87
- isReadOnly: props.isReadOnly
100
+ isReadOnly: props.isReadOnly,
101
+ iconLeft: props.iconLeft,
102
+ isMulti: props.isMulti,
103
+ hasValue: !isEmpty__default["default"](props.value)
88
104
  }, theme),
89
105
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
90
106
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -102,6 +118,7 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
102
118
  maxMenuHeight: props.maxMenuHeight,
103
119
  menuPortalTarget: props.menuPortalTarget,
104
120
  menuShouldBlockScroll: props.menuShouldBlockScroll,
121
+ closeMenuOnScroll: props.closeMenuOnSelect,
105
122
  name: props.name,
106
123
  noOptionsMessage: props.noOptionsMessage || function (_ref) {
107
124
  var inputValue = _ref.inputValue;
@@ -122,10 +139,9 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
122
139
  return "".concat(props.name, ".0");
123
140
  }()
124
141
  },
125
- // eslint-disable-next-line @typescript-eslint/no-empty-function
126
142
  persist: function persist() {}
127
143
  };
128
- props.onBlur(event);
144
+ props.onBlur && props.onBlur(event);
129
145
  } : undefined,
130
146
  onChange: function onChange(value, info) {
131
147
  // wrapping breaking changes made in react-select v3
@@ -140,7 +156,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
140
156
  name: props.name,
141
157
  value: newValue
142
158
  },
143
- // eslint-disable-next-line @typescript-eslint/no-empty-function
144
159
  persist: function persist() {}
145
160
  }, info);
146
161
  },
@@ -164,7 +179,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
164
179
  isValidNewOption: props.isValidNewOption,
165
180
  getNewOptionData: props.getNewOptionData,
166
181
  onCreateOption: props.onCreateOption,
167
- createOptionPosition: props.createOptionPosition,
182
+ createOptionPosition: props.createOptionPosition // @ts-ignore
183
+ ,
168
184
  iconLeft: props.iconLeft
169
185
  })
170
186
  }))
@@ -175,264 +191,32 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
175
191
  // a signal of the field having been touched.
176
192
 
177
193
 
194
+ AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
195
+ horizontalConstraint: _pt__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
196
+ hasError: _pt__default["default"].bool,
197
+ hasWarning: _pt__default["default"].bool,
198
+ isReadOnly: _pt__default["default"].bool,
199
+ iconLeft: _pt__default["default"].node,
200
+ isAutofocussed: _pt__default["default"].bool,
201
+ menuPortalZIndex: _pt__default["default"].number.isRequired,
202
+ onBlur: _pt__default["default"].func,
203
+ onChange: _pt__default["default"].func.isRequired,
204
+ showOptionGroupDivider: _pt__default["default"].bool
205
+ } : {};
206
+
178
207
  AsyncCreatableSelectInput.isTouched = function (touched) {
179
208
  return Boolean(touched);
180
209
  };
181
210
 
182
211
  AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
183
- AsyncCreatableSelectInput.defaultProps = {
184
- // Using "null" will ensure that the currently selected value disappears in
185
- // case "undefined" gets passed as the next value
186
- value: null,
187
- isSearchable: true,
188
- menuPortalZIndex: 1
189
- };
190
- AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
191
- /**
192
- * Horizontal size limit of the input fields.
193
- */
194
- horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
195
-
196
- /**
197
- * Indicates the input field has an error
198
- */
199
- hasError: PropTypes__default["default"].bool,
200
-
201
- /**
202
- * Indicates the input field has a warning
203
- */
204
- hasWarning: PropTypes__default["default"].bool,
205
-
206
- /**
207
- * Is the select read-only
208
- */
209
- isReadOnly: PropTypes__default["default"].bool,
210
-
211
- /**
212
- * Icon to display on the left of the placeholder text and selected value. Has no effect when isMulti is enabled.
213
- */
214
- iconLeft: PropTypes__default["default"].node,
215
- // react-select base props
216
- //
217
- // Currently unsupported props are commented out. In case you need one of
218
- // these props when using UI Kit, you can submit a PR and enable the
219
- // prop. Don't forget to add it to the story, docs and other select input
220
- // components as well!
221
- //
222
- // See https://react-select.com/props#select-props
223
-
224
- /**
225
- * Aria label (for assistive tech)
226
- */
227
- 'aria-label': PropTypes__default["default"].string,
228
-
229
- /**
230
- * HTML ID of an element that should be used as the label (for assistive tech)
231
- */
232
- 'aria-labelledby': PropTypes__default["default"].string,
233
-
234
- /**
235
- * Focus the control when it is mounted
236
- */
237
- isAutofocussed: PropTypes__default["default"].bool,
238
- // original: autoFocus
239
-
240
- /**
241
- * Remove the currently focused option when the user presses backspace
242
- */
243
- backspaceRemovesValue: PropTypes__default["default"].bool,
244
-
245
- /**
246
- * Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
247
- */
248
- components: PropTypes__default["default"].objectOf(PropTypes__default["default"].func),
249
-
250
- /**
251
- * Custom method to filter whether an option should be displayed in the menu
252
- */
253
- filterOption: PropTypes__default["default"].func,
254
- // This forwarded as react-select's "inputId"
255
-
256
- /**
257
- * The id of the search input
258
- */
259
- id: PropTypes__default["default"].string,
260
- // This is forwarded as react-select's "id"
261
- inputValue: PropTypes__default["default"].string,
262
-
263
- /**
264
- * The id to set on the SelectContainer component
265
- */
266
- containerId: PropTypes__default["default"].string,
267
-
268
- /**
269
- * Is the select value clearable
270
- */
271
- isClearable: PropTypes__default["default"].bool,
272
-
273
- /**
274
- * Is the select disabled
275
- */
276
- isDisabled: PropTypes__default["default"].bool,
277
-
278
- /**
279
- * Override the built-in logic to detect whether an option is disabled
280
- */
281
- isOptionDisabled: PropTypes__default["default"].func,
282
-
283
- /**
284
- * Support multiple selected options
285
- */
286
- isMulti: PropTypes__default["default"].bool,
287
-
288
- /**
289
- * Whether to enable search functionality
290
- */
291
- isSearchable: PropTypes__default["default"].bool,
292
-
293
- /**
294
- * Maximum height of the menu before scrolling
295
- */
296
- maxMenuHeight: PropTypes__default["default"].number,
297
-
298
- /**
299
- * Dom element to portal the select menu to
300
- */
301
- menuPortalTarget: PropTypes__default["default"].instanceOf(utils.SafeHTMLElement),
302
-
303
- /**
304
- * z-index value for the menu portal
305
- */
306
- menuPortalZIndex: PropTypes__default["default"].number.isRequired,
307
-
308
- /**
309
- * whether the menu should block scroll while open
310
- */
311
- menuShouldBlockScroll: PropTypes__default["default"].bool,
312
-
313
- /**
314
- * Name of the HTML Input (optional - without this, no input will be rendered)
315
- */
316
- name: PropTypes__default["default"].string,
317
-
318
- /**
319
- * Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with `{ inputValue: String }`. `inputValue` will be an empty string when no search text is present.
320
- */
321
- noOptionsMessage: PropTypes__default["default"].func,
322
-
323
- /**
324
- * Handle blur events on the control
325
- */
326
- onBlur: PropTypes__default["default"].func,
327
-
328
- /**
329
- * Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`.
330
- */
331
- onChange: PropTypes__default["default"].func.isRequired,
332
-
333
- /**
334
- * Handle focus events on the control
335
- */
336
- onFocus: PropTypes__default["default"].func,
337
-
338
- /**
339
- * Handle change events on the input
340
- */
341
- onInputChange: PropTypes__default["default"].func,
342
-
343
- /**
344
- * Placeholder text for the select value
345
- */
346
- placeholder: PropTypes__default["default"].string,
347
-
348
- /**
349
- * Sets the tabIndex attribute on the input
350
- */
351
- tabIndex: PropTypes__default["default"].string,
352
-
353
- /**
354
- * Select the currently focused option when the user presses tab
355
- */
356
- tabSelectsValue: PropTypes__default["default"].bool,
357
-
358
- /**
359
- * The value of the select; reflected by the selected option
360
- */
361
- value: function value(props) {
362
- var _context, _context2;
363
-
364
- for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
365
- rest[_key - 1] = arguments[_key];
366
- }
367
-
368
- return props.isMulti ? PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
369
- value: PropTypes__default["default"].string.isRequired
370
- })).apply(void 0, _concatInstanceProperty__default["default"](_context = [props]).call(_context, rest)) : PropTypes__default["default"].shape({
371
- value: PropTypes__default["default"].string.isRequired
372
- }).apply(void 0, _concatInstanceProperty__default["default"](_context2 = [props]).call(_context2, rest));
373
- },
374
- // Async props
375
-
376
- /**
377
- * The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
378
- */
379
- defaultOptions: PropTypes__default["default"].oneOfType([PropTypes__default["default"].bool, PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
380
- value: PropTypes__default["default"].string.isRequired
381
- }))]),
382
-
383
- /**
384
- * Function that returns a promise, which is the set of options to be used once the promise resolves.
385
- */
386
- loadOptions: PropTypes__default["default"].func.isRequired,
387
-
388
- /**
389
- * If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
390
- */
391
- cacheOptions: PropTypes__default["default"].any,
392
- // Creatable props
393
-
394
- /**
395
- * Allow options to be created while the isLoading prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded.
396
- */
397
- allowCreateWhileLoading: PropTypes__default["default"].bool,
398
-
399
- /**
400
- * Gets the label for the "create new ..." option in the menu. Is given the current input value.
401
- */
402
- formatCreateLabel: PropTypes__default["default"].func,
403
-
404
- /**
405
- * Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array.
406
- */
407
- isValidNewOption: PropTypes__default["default"].func,
408
-
409
- /**
410
- * Returns the data for the new option when it is created. Used to display the value, and is passed to onChange.
411
- */
412
- getNewOptionData: PropTypes__default["default"].func,
413
-
414
- /**
415
- * If provided, this will be called with the input value when a new option is created, and onChange will not be called. Use this when you need more control over what happens when new options are created.
416
- */
417
- onCreateOption: PropTypes__default["default"].func,
418
-
419
- /**
420
- * Sets the position of the createOption element in your options list.
421
- */
422
- createOptionPosition: PropTypes__default["default"].string,
423
-
424
- /**
425
- * Determines if option groups will be separated by a divider
426
- */
427
- showOptionGroupDivider: PropTypes__default["default"].bool
428
- } : {};
212
+ AsyncCreatableSelectInput.defaultProps = defaultProps;
429
213
  utils.addStaticFields(AsyncCreatableSelectInput, _objectSpread(_objectSpread(_objectSpread({}, reactSelect.components), customizedComponents), {}, {
430
214
  isTouched: AsyncCreatableSelectInput.isTouched
431
215
  }));
432
216
  var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
433
217
 
434
218
  // NOTE: This string will be replaced on build time with the package version.
435
- var version = "12.2.6";
219
+ var version = "13.0.1";
436
220
 
437
221
  exports["default"] = AsyncCreatableSelectInput$1;
438
222
  exports.version = version;
@@ -2,6 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
6
+ require('prop-types');
7
+ require('@babel/runtime-corejs3/core-js-stable/array/is-array');
5
8
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
6
9
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
7
10
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -10,10 +13,8 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
10
13
  var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
11
14
  var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
12
15
  var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
13
- var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
14
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
15
- require('prop-types');
16
16
  var reactIntl = require('react-intl');
17
+ var isEmpty = require('lodash/isEmpty');
17
18
  var react = require('@emotion/react');
18
19
  var reactSelect = require('react-select');
19
20
  var AsyncCreatableSelect = require('react-select/async-creatable');
@@ -33,13 +34,14 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
33
34
  var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
34
35
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
35
36
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
37
+ var isEmpty__default = /*#__PURE__*/_interopDefault(isEmpty);
36
38
  var AsyncCreatableSelect__default = /*#__PURE__*/_interopDefault(AsyncCreatableSelect);
37
39
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
38
40
  var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
39
41
 
40
- 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; }
42
+ 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; }
41
43
 
42
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, 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 _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
44
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
43
45
 
44
46
  var LoadingIndicator = function LoadingIndicator() {
45
47
  return jsxRuntime.jsx(LoadingSpinner__default["default"], {
@@ -54,11 +56,21 @@ var customizedComponents = {
54
56
  LoadingIndicator: LoadingIndicator,
55
57
  MultiValueRemove: selectUtils.TagRemove
56
58
  };
59
+ var defaultProps = {
60
+ // Using "null" will ensure that the currently selected value disappears in
61
+ // case "undefined" gets passed as the next value
62
+ value: null,
63
+ isSearchable: true,
64
+ menuPortalZIndex: 1
65
+ };
57
66
 
58
67
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
59
68
  var intl = reactIntl.useIntl();
60
69
  var theme = react.useTheme();
61
70
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
71
+
72
+ if (props.isMulti) ;
73
+
62
74
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
63
75
  max: props.horizontalConstraint,
64
76
  children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
@@ -68,7 +80,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
68
80
  autoFocus: props.isAutofocussed,
69
81
  backspaceRemovesValue: props.isReadOnly ? false : props.backspaceRemovesValue,
70
82
  components: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, customizedComponents), props.iconLeft && !props.isMulti ? selectUtils.customComponentsWithIcons : {}), props.isReadOnly ? {
71
- // eslint-disable-next-line react/display-name
72
83
  Input: function Input(ownProps) {
73
84
  return jsxRuntime.jsx(reactSelect.components.Input, _objectSpread(_objectSpread({}, ownProps), {}, {
74
85
  readOnly: true
@@ -82,7 +93,10 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
82
93
  showOptionGroupDivider: props.showOptionGroupDivider,
83
94
  menuPortalZIndex: props.menuPortalZIndex,
84
95
  isDisabled: props.isDisabled,
85
- isReadOnly: props.isReadOnly
96
+ isReadOnly: props.isReadOnly,
97
+ iconLeft: props.iconLeft,
98
+ isMulti: props.isMulti,
99
+ hasValue: !isEmpty__default["default"](props.value)
86
100
  }, theme),
87
101
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
88
102
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -100,6 +114,7 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
100
114
  maxMenuHeight: props.maxMenuHeight,
101
115
  menuPortalTarget: props.menuPortalTarget,
102
116
  menuShouldBlockScroll: props.menuShouldBlockScroll,
117
+ closeMenuOnScroll: props.closeMenuOnSelect,
103
118
  name: props.name,
104
119
  noOptionsMessage: props.noOptionsMessage || function (_ref) {
105
120
  var inputValue = _ref.inputValue;
@@ -120,10 +135,9 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
120
135
  return "".concat(props.name, ".0");
121
136
  }()
122
137
  },
123
- // eslint-disable-next-line @typescript-eslint/no-empty-function
124
138
  persist: function persist() {}
125
139
  };
126
- props.onBlur(event);
140
+ props.onBlur && props.onBlur(event);
127
141
  } : undefined,
128
142
  onChange: function onChange(value, info) {
129
143
  // wrapping breaking changes made in react-select v3
@@ -138,7 +152,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
138
152
  name: props.name,
139
153
  value: newValue
140
154
  },
141
- // eslint-disable-next-line @typescript-eslint/no-empty-function
142
155
  persist: function persist() {}
143
156
  }, info);
144
157
  },
@@ -162,7 +175,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
162
175
  isValidNewOption: props.isValidNewOption,
163
176
  getNewOptionData: props.getNewOptionData,
164
177
  onCreateOption: props.onCreateOption,
165
- createOptionPosition: props.createOptionPosition,
178
+ createOptionPosition: props.createOptionPosition // @ts-ignore
179
+ ,
166
180
  iconLeft: props.iconLeft
167
181
  })
168
182
  }))
@@ -173,26 +187,21 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
173
187
  // a signal of the field having been touched.
174
188
 
175
189
 
190
+ AsyncCreatableSelectInput.propTypes = {};
191
+
176
192
  AsyncCreatableSelectInput.isTouched = function (touched) {
177
193
  return Boolean(touched);
178
194
  };
179
195
 
180
196
  AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
181
- AsyncCreatableSelectInput.defaultProps = {
182
- // Using "null" will ensure that the currently selected value disappears in
183
- // case "undefined" gets passed as the next value
184
- value: null,
185
- isSearchable: true,
186
- menuPortalZIndex: 1
187
- };
188
- AsyncCreatableSelectInput.propTypes = {};
197
+ AsyncCreatableSelectInput.defaultProps = defaultProps;
189
198
  utils.addStaticFields(AsyncCreatableSelectInput, _objectSpread(_objectSpread(_objectSpread({}, reactSelect.components), customizedComponents), {}, {
190
199
  isTouched: AsyncCreatableSelectInput.isTouched
191
200
  }));
192
201
  var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
193
202
 
194
203
  // NOTE: This string will be replaced on build time with the package version.
195
- var version = "12.2.6";
204
+ var version = "13.0.1";
196
205
 
197
206
  exports["default"] = AsyncCreatableSelectInput$1;
198
207
  exports.version = version;
@@ -1,3 +1,6 @@
1
+ import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
2
+ import _pt from 'prop-types';
3
+ import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
1
4
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
2
5
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
3
6
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
@@ -6,22 +9,20 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
6
9
  import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
7
10
  import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
8
11
  import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
9
- import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
10
- import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
11
- import PropTypes from 'prop-types';
12
12
  import { useIntl } from 'react-intl';
13
+ import isEmpty from 'lodash/isEmpty';
13
14
  import { useTheme } from '@emotion/react';
14
15
  import { components } from 'react-select';
15
16
  import AsyncCreatableSelect from 'react-select/async-creatable';
16
17
  import Constraints from '@commercetools-uikit/constraints';
17
18
  import LoadingSpinner from '@commercetools-uikit/loading-spinner';
18
19
  import { messages, customComponentsWithIcons, createSelectStyles, DropdownIndicator, ClearIndicator, TagRemove } from '@commercetools-uikit/select-utils';
19
- import { filterDataAttributes, SafeHTMLElement, addStaticFields } from '@commercetools-uikit/utils';
20
+ import { warning, filterDataAttributes, addStaticFields } from '@commercetools-uikit/utils';
20
21
  import { jsx } from '@emotion/react/jsx-runtime';
21
22
 
22
- 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; }
23
+ 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; }
23
24
 
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty(_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context4; _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
25
26
 
26
27
  var LoadingIndicator = function LoadingIndicator() {
27
28
  return jsx(LoadingSpinner, {
@@ -36,11 +37,23 @@ var customizedComponents = {
36
37
  LoadingIndicator: LoadingIndicator,
37
38
  MultiValueRemove: TagRemove
38
39
  };
40
+ var defaultProps = {
41
+ // Using "null" will ensure that the currently selected value disappears in
42
+ // case "undefined" gets passed as the next value
43
+ value: null,
44
+ isSearchable: true,
45
+ menuPortalZIndex: 1
46
+ };
39
47
 
40
48
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
41
49
  var intl = useIntl();
42
50
  var theme = useTheme();
43
51
  var placeholder = props.placeholder || intl.formatMessage(messages.placeholder);
52
+
53
+ if (props.isMulti) {
54
+ process.env.NODE_ENV !== "production" ? warning(_Array$isArray(props.value), 'AsyncCreatableSelectInput: `value` is expected to be an array when isMulti is true') : void 0;
55
+ }
56
+
44
57
  return jsx(Constraints.Horizontal, {
45
58
  max: props.horizontalConstraint,
46
59
  children: jsx("div", _objectSpread(_objectSpread({}, filterDataAttributes(props)), {}, {
@@ -50,7 +63,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
50
63
  autoFocus: props.isAutofocussed,
51
64
  backspaceRemovesValue: props.isReadOnly ? false : props.backspaceRemovesValue,
52
65
  components: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, customizedComponents), props.iconLeft && !props.isMulti ? customComponentsWithIcons : {}), props.isReadOnly ? {
53
- // eslint-disable-next-line react/display-name
54
66
  Input: function Input(ownProps) {
55
67
  return jsx(components.Input, _objectSpread(_objectSpread({}, ownProps), {}, {
56
68
  readOnly: true
@@ -64,7 +76,10 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
64
76
  showOptionGroupDivider: props.showOptionGroupDivider,
65
77
  menuPortalZIndex: props.menuPortalZIndex,
66
78
  isDisabled: props.isDisabled,
67
- isReadOnly: props.isReadOnly
79
+ isReadOnly: props.isReadOnly,
80
+ iconLeft: props.iconLeft,
81
+ isMulti: props.isMulti,
82
+ hasValue: !isEmpty(props.value)
68
83
  }, theme),
69
84
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
70
85
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -82,6 +97,7 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
82
97
  maxMenuHeight: props.maxMenuHeight,
83
98
  menuPortalTarget: props.menuPortalTarget,
84
99
  menuShouldBlockScroll: props.menuShouldBlockScroll,
100
+ closeMenuOnScroll: props.closeMenuOnSelect,
85
101
  name: props.name,
86
102
  noOptionsMessage: props.noOptionsMessage || function (_ref) {
87
103
  var inputValue = _ref.inputValue;
@@ -102,10 +118,9 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
102
118
  return "".concat(props.name, ".0");
103
119
  }()
104
120
  },
105
- // eslint-disable-next-line @typescript-eslint/no-empty-function
106
121
  persist: function persist() {}
107
122
  };
108
- props.onBlur(event);
123
+ props.onBlur && props.onBlur(event);
109
124
  } : undefined,
110
125
  onChange: function onChange(value, info) {
111
126
  // wrapping breaking changes made in react-select v3
@@ -120,7 +135,6 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
120
135
  name: props.name,
121
136
  value: newValue
122
137
  },
123
- // eslint-disable-next-line @typescript-eslint/no-empty-function
124
138
  persist: function persist() {}
125
139
  }, info);
126
140
  },
@@ -144,7 +158,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
144
158
  isValidNewOption: props.isValidNewOption,
145
159
  getNewOptionData: props.getNewOptionData,
146
160
  onCreateOption: props.onCreateOption,
147
- createOptionPosition: props.createOptionPosition,
161
+ createOptionPosition: props.createOptionPosition // @ts-ignore
162
+ ,
148
163
  iconLeft: props.iconLeft
149
164
  })
150
165
  }))
@@ -155,263 +170,31 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
155
170
  // a signal of the field having been touched.
156
171
 
157
172
 
173
+ AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
174
+ horizontalConstraint: _pt.oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
175
+ hasError: _pt.bool,
176
+ hasWarning: _pt.bool,
177
+ isReadOnly: _pt.bool,
178
+ iconLeft: _pt.node,
179
+ isAutofocussed: _pt.bool,
180
+ menuPortalZIndex: _pt.number.isRequired,
181
+ onBlur: _pt.func,
182
+ onChange: _pt.func.isRequired,
183
+ showOptionGroupDivider: _pt.bool
184
+ } : {};
185
+
158
186
  AsyncCreatableSelectInput.isTouched = function (touched) {
159
187
  return Boolean(touched);
160
188
  };
161
189
 
162
190
  AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
163
- AsyncCreatableSelectInput.defaultProps = {
164
- // Using "null" will ensure that the currently selected value disappears in
165
- // case "undefined" gets passed as the next value
166
- value: null,
167
- isSearchable: true,
168
- menuPortalZIndex: 1
169
- };
170
- AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
171
- /**
172
- * Horizontal size limit of the input fields.
173
- */
174
- horizontalConstraint: PropTypes.oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
175
-
176
- /**
177
- * Indicates the input field has an error
178
- */
179
- hasError: PropTypes.bool,
180
-
181
- /**
182
- * Indicates the input field has a warning
183
- */
184
- hasWarning: PropTypes.bool,
185
-
186
- /**
187
- * Is the select read-only
188
- */
189
- isReadOnly: PropTypes.bool,
190
-
191
- /**
192
- * Icon to display on the left of the placeholder text and selected value. Has no effect when isMulti is enabled.
193
- */
194
- iconLeft: PropTypes.node,
195
- // react-select base props
196
- //
197
- // Currently unsupported props are commented out. In case you need one of
198
- // these props when using UI Kit, you can submit a PR and enable the
199
- // prop. Don't forget to add it to the story, docs and other select input
200
- // components as well!
201
- //
202
- // See https://react-select.com/props#select-props
203
-
204
- /**
205
- * Aria label (for assistive tech)
206
- */
207
- 'aria-label': PropTypes.string,
208
-
209
- /**
210
- * HTML ID of an element that should be used as the label (for assistive tech)
211
- */
212
- 'aria-labelledby': PropTypes.string,
213
-
214
- /**
215
- * Focus the control when it is mounted
216
- */
217
- isAutofocussed: PropTypes.bool,
218
- // original: autoFocus
219
-
220
- /**
221
- * Remove the currently focused option when the user presses backspace
222
- */
223
- backspaceRemovesValue: PropTypes.bool,
224
-
225
- /**
226
- * Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
227
- */
228
- components: PropTypes.objectOf(PropTypes.func),
229
-
230
- /**
231
- * Custom method to filter whether an option should be displayed in the menu
232
- */
233
- filterOption: PropTypes.func,
234
- // This forwarded as react-select's "inputId"
235
-
236
- /**
237
- * The id of the search input
238
- */
239
- id: PropTypes.string,
240
- // This is forwarded as react-select's "id"
241
- inputValue: PropTypes.string,
242
-
243
- /**
244
- * The id to set on the SelectContainer component
245
- */
246
- containerId: PropTypes.string,
247
-
248
- /**
249
- * Is the select value clearable
250
- */
251
- isClearable: PropTypes.bool,
252
-
253
- /**
254
- * Is the select disabled
255
- */
256
- isDisabled: PropTypes.bool,
257
-
258
- /**
259
- * Override the built-in logic to detect whether an option is disabled
260
- */
261
- isOptionDisabled: PropTypes.func,
262
-
263
- /**
264
- * Support multiple selected options
265
- */
266
- isMulti: PropTypes.bool,
267
-
268
- /**
269
- * Whether to enable search functionality
270
- */
271
- isSearchable: PropTypes.bool,
272
-
273
- /**
274
- * Maximum height of the menu before scrolling
275
- */
276
- maxMenuHeight: PropTypes.number,
277
-
278
- /**
279
- * Dom element to portal the select menu to
280
- */
281
- menuPortalTarget: PropTypes.instanceOf(SafeHTMLElement),
282
-
283
- /**
284
- * z-index value for the menu portal
285
- */
286
- menuPortalZIndex: PropTypes.number.isRequired,
287
-
288
- /**
289
- * whether the menu should block scroll while open
290
- */
291
- menuShouldBlockScroll: PropTypes.bool,
292
-
293
- /**
294
- * Name of the HTML Input (optional - without this, no input will be rendered)
295
- */
296
- name: PropTypes.string,
297
-
298
- /**
299
- * Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with `{ inputValue: String }`. `inputValue` will be an empty string when no search text is present.
300
- */
301
- noOptionsMessage: PropTypes.func,
302
-
303
- /**
304
- * Handle blur events on the control
305
- */
306
- onBlur: PropTypes.func,
307
-
308
- /**
309
- * Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`.
310
- */
311
- onChange: PropTypes.func.isRequired,
312
-
313
- /**
314
- * Handle focus events on the control
315
- */
316
- onFocus: PropTypes.func,
317
-
318
- /**
319
- * Handle change events on the input
320
- */
321
- onInputChange: PropTypes.func,
322
-
323
- /**
324
- * Placeholder text for the select value
325
- */
326
- placeholder: PropTypes.string,
327
-
328
- /**
329
- * Sets the tabIndex attribute on the input
330
- */
331
- tabIndex: PropTypes.string,
332
-
333
- /**
334
- * Select the currently focused option when the user presses tab
335
- */
336
- tabSelectsValue: PropTypes.bool,
337
-
338
- /**
339
- * The value of the select; reflected by the selected option
340
- */
341
- value: function value(props) {
342
- var _context, _context2;
343
-
344
- for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
345
- rest[_key - 1] = arguments[_key];
346
- }
347
-
348
- return props.isMulti ? PropTypes.arrayOf(PropTypes.shape({
349
- value: PropTypes.string.isRequired
350
- })).apply(void 0, _concatInstanceProperty(_context = [props]).call(_context, rest)) : PropTypes.shape({
351
- value: PropTypes.string.isRequired
352
- }).apply(void 0, _concatInstanceProperty(_context2 = [props]).call(_context2, rest));
353
- },
354
- // Async props
355
-
356
- /**
357
- * The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
358
- */
359
- defaultOptions: PropTypes.oneOfType([PropTypes.bool, PropTypes.arrayOf(PropTypes.shape({
360
- value: PropTypes.string.isRequired
361
- }))]),
362
-
363
- /**
364
- * Function that returns a promise, which is the set of options to be used once the promise resolves.
365
- */
366
- loadOptions: PropTypes.func.isRequired,
367
-
368
- /**
369
- * If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
370
- */
371
- cacheOptions: PropTypes.any,
372
- // Creatable props
373
-
374
- /**
375
- * Allow options to be created while the isLoading prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded.
376
- */
377
- allowCreateWhileLoading: PropTypes.bool,
378
-
379
- /**
380
- * Gets the label for the "create new ..." option in the menu. Is given the current input value.
381
- */
382
- formatCreateLabel: PropTypes.func,
383
-
384
- /**
385
- * Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array.
386
- */
387
- isValidNewOption: PropTypes.func,
388
-
389
- /**
390
- * Returns the data for the new option when it is created. Used to display the value, and is passed to onChange.
391
- */
392
- getNewOptionData: PropTypes.func,
393
-
394
- /**
395
- * If provided, this will be called with the input value when a new option is created, and onChange will not be called. Use this when you need more control over what happens when new options are created.
396
- */
397
- onCreateOption: PropTypes.func,
398
-
399
- /**
400
- * Sets the position of the createOption element in your options list.
401
- */
402
- createOptionPosition: PropTypes.string,
403
-
404
- /**
405
- * Determines if option groups will be separated by a divider
406
- */
407
- showOptionGroupDivider: PropTypes.bool
408
- } : {};
191
+ AsyncCreatableSelectInput.defaultProps = defaultProps;
409
192
  addStaticFields(AsyncCreatableSelectInput, _objectSpread(_objectSpread(_objectSpread({}, components), customizedComponents), {}, {
410
193
  isTouched: AsyncCreatableSelectInput.isTouched
411
194
  }));
412
195
  var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
413
196
 
414
197
  // NOTE: This string will be replaced on build time with the package version.
415
- var version = "12.2.6";
198
+ var version = "13.0.1";
416
199
 
417
200
  export { AsyncCreatableSelectInput$1 as default, version };
@@ -0,0 +1,64 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type ActionMeta, type GroupBase } from 'react-select';
3
+ import { type AsyncCreatableProps } from 'react-select/async-creatable';
4
+ declare type TEvent = {
5
+ target: {
6
+ name?: string;
7
+ value?: unknown;
8
+ };
9
+ persist: () => void;
10
+ };
11
+ declare type ReactSelectAsyncCreatableProps = AsyncCreatableProps<unknown, boolean, GroupBase<unknown>>;
12
+ declare type TAsyncCreatableSelectInputProps = {
13
+ horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
14
+ hasError?: boolean;
15
+ hasWarning?: boolean;
16
+ isReadOnly?: boolean;
17
+ iconLeft?: ReactNode;
18
+ 'aria-label'?: ReactSelectAsyncCreatableProps['aria-label'];
19
+ 'aria-labelledby'?: ReactSelectAsyncCreatableProps['aria-labelledby'];
20
+ isAutofocussed?: boolean;
21
+ backspaceRemovesValue?: ReactSelectAsyncCreatableProps['backspaceRemovesValue'];
22
+ components?: ReactSelectAsyncCreatableProps['components'];
23
+ filterOption?: ReactSelectAsyncCreatableProps['filterOption'];
24
+ id?: ReactSelectAsyncCreatableProps['inputId'];
25
+ inputValue?: ReactSelectAsyncCreatableProps['inputValue'];
26
+ containerId?: ReactSelectAsyncCreatableProps['id'];
27
+ isClearable?: ReactSelectAsyncCreatableProps['isClearable'];
28
+ isDisabled?: ReactSelectAsyncCreatableProps['isDisabled'];
29
+ isOptionDisabled?: ReactSelectAsyncCreatableProps['isOptionDisabled'];
30
+ isMulti?: ReactSelectAsyncCreatableProps['isMulti'];
31
+ isSearchable?: ReactSelectAsyncCreatableProps['isSearchable'];
32
+ maxMenuHeight?: ReactSelectAsyncCreatableProps['maxMenuHeight'];
33
+ menuPortalTarget?: ReactSelectAsyncCreatableProps['menuPortalTarget'];
34
+ menuPortalZIndex: number;
35
+ menuShouldBlockScroll?: ReactSelectAsyncCreatableProps['menuShouldBlockScroll'];
36
+ closeMenuOnSelect?: ReactSelectAsyncCreatableProps['closeMenuOnSelect'];
37
+ name?: ReactSelectAsyncCreatableProps['name'];
38
+ noOptionsMessage?: ReactSelectAsyncCreatableProps['noOptionsMessage'];
39
+ onBlur?: (event: TEvent) => void;
40
+ onChange: (event: TEvent, info: ActionMeta<unknown>) => void;
41
+ onFocus?: ReactSelectAsyncCreatableProps['onFocus'];
42
+ onInputChange?: ReactSelectAsyncCreatableProps['onInputChange'];
43
+ placeholder?: ReactSelectAsyncCreatableProps['placeholder'];
44
+ tabIndex?: ReactSelectAsyncCreatableProps['tabIndex'];
45
+ tabSelectsValue?: ReactSelectAsyncCreatableProps['tabSelectsValue'];
46
+ value?: ReactSelectAsyncCreatableProps['value'];
47
+ defaultOptions?: ReactSelectAsyncCreatableProps['defaultOptions'];
48
+ loadOptions: ReactSelectAsyncCreatableProps['loadOptions'];
49
+ cacheOptions?: ReactSelectAsyncCreatableProps['cacheOptions'];
50
+ allowCreateWhileLoading?: ReactSelectAsyncCreatableProps['allowCreateWhileLoading'];
51
+ formatCreateLabel?: ReactSelectAsyncCreatableProps['formatCreateLabel'];
52
+ isValidNewOption?: ReactSelectAsyncCreatableProps['isValidNewOption'];
53
+ getNewOptionData?: ReactSelectAsyncCreatableProps['getNewOptionData'];
54
+ onCreateOption?: ReactSelectAsyncCreatableProps['onCreateOption'];
55
+ createOptionPosition?: ReactSelectAsyncCreatableProps['createOptionPosition'];
56
+ showOptionGroupDivider?: boolean;
57
+ };
58
+ declare const AsyncCreatableSelectInput: {
59
+ (props: TAsyncCreatableSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
60
+ isTouched(touched: unknown): boolean;
61
+ displayName: string;
62
+ defaultProps: Pick<TAsyncCreatableSelectInputProps, "value" | "isSearchable" | "menuPortalZIndex">;
63
+ };
64
+ export default AsyncCreatableSelectInput;
@@ -0,0 +1,2 @@
1
+ export { default } from './async-creatable-select-input';
2
+ export { default as version } from './version';
@@ -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/async-creatable-select-input",
3
3
  "description": "An input component getting a selection from an asynchronously loaded list from the user, and where options can be created by the user.",
4
- "version": "12.2.6",
4
+ "version": "13.0.1",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,27 +19,27 @@
19
19
  "module": "dist/commercetools-uikit-async-creatable-select-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/constraints": "12.2.5",
25
- "@commercetools-uikit/design-system": "12.2.5",
26
- "@commercetools-uikit/icons": "12.2.6",
27
- "@commercetools-uikit/loading-spinner": "12.2.5",
28
- "@commercetools-uikit/select-utils": "12.2.6",
29
- "@commercetools-uikit/spacings": "12.2.5",
30
- "@commercetools-uikit/text": "12.2.5",
31
- "@commercetools-uikit/utils": "12.2.5",
22
+ "@babel/runtime": "7.17.2",
23
+ "@babel/runtime-corejs3": "7.17.2",
24
+ "@commercetools-uikit/constraints": "13.0.0",
25
+ "@commercetools-uikit/design-system": "13.0.0",
26
+ "@commercetools-uikit/icons": "13.0.0",
27
+ "@commercetools-uikit/loading-spinner": "13.0.0",
28
+ "@commercetools-uikit/select-utils": "13.0.1",
29
+ "@commercetools-uikit/spacings": "13.0.1",
30
+ "@commercetools-uikit/text": "13.0.0",
31
+ "@commercetools-uikit/utils": "12.2.9",
32
32
  "@emotion/is-prop-valid": "1.1.1",
33
33
  "@emotion/react": "^11.4.0",
34
34
  "@emotion/styled": "^11.3.0",
35
35
  "lodash": "4.17.21",
36
- "prop-types": "15.7.2",
37
- "react-select": "4.3.1"
36
+ "prop-types": "15.8.1",
37
+ "react-select": "5.2.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "react": "17.0.2",
41
41
  "react-dom": "17.0.2",
42
- "react-intl": "5.21.2"
42
+ "react-intl": "5.24.6"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "17.x",