@commercetools-uikit/async-creatable-select-input 19.20.0 → 19.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-uikit-async-creatable-select-input.cjs.dev.js +25 -20
- package/dist/commercetools-uikit-async-creatable-select-input.cjs.prod.js +23 -18
- package/dist/commercetools-uikit-async-creatable-select-input.esm.js +25 -20
- package/dist/declarations/src/async-creatable-select-input.d.ts +3 -10
- package/package.json +9 -9
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
6
7
|
var _pt = require('prop-types');
|
|
7
8
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
8
9
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -40,6 +41,7 @@ var AsyncCreatableSelect__default = /*#__PURE__*/_interopDefault(AsyncCreatableS
|
|
|
40
41
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
41
42
|
var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
|
|
42
43
|
|
|
44
|
+
const _excluded = ["value", "isSearchable", "menuPortalZIndex"];
|
|
43
45
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
44
46
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
45
47
|
const LoadingIndicator = () => jsxRuntime.jsx(LoadingSpinner__default["default"], {
|
|
@@ -52,30 +54,34 @@ const customizedComponents = {
|
|
|
52
54
|
LoadingIndicator,
|
|
53
55
|
MultiValueRemove: selectUtils.TagRemove
|
|
54
56
|
};
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
const AsyncCreatableSelectInput = _ref => {
|
|
58
|
+
let _ref$value = _ref.value,
|
|
59
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
60
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
61
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable,
|
|
62
|
+
_ref$menuPortalZIndex = _ref.menuPortalZIndex,
|
|
63
|
+
menuPortalZIndex = _ref$menuPortalZIndex === void 0 ? 1 : _ref$menuPortalZIndex,
|
|
64
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
63
65
|
const intl = reactIntl.useIntl();
|
|
64
66
|
const placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
|
|
65
67
|
if (!props.isReadOnly) {
|
|
66
68
|
process.env.NODE_ENV !== "production" ? utils.warning(typeof props.onChange === 'function', 'AsyncCreatableSelectInput: `onChange` is required when input is not read only.') : void 0;
|
|
67
69
|
}
|
|
68
70
|
if (props.isMulti) {
|
|
69
|
-
process.env.NODE_ENV !== "production" ? utils.warning(_Array$isArray__default["default"](
|
|
71
|
+
process.env.NODE_ENV !== "production" ? utils.warning(_Array$isArray__default["default"](value), 'AsyncCreatableSelectInput: `value` is expected to be an array when isMulti is true') : void 0;
|
|
70
72
|
}
|
|
71
73
|
selectUtils.warnIfMenuPortalPropsAreMissing({
|
|
72
|
-
menuPortalZIndex:
|
|
74
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
73
75
|
menuPortalTarget: props.menuPortalTarget,
|
|
74
76
|
componentName: 'AsyncCreatableSelectInput'
|
|
75
77
|
});
|
|
76
78
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
77
79
|
max: props.horizontalConstraint,
|
|
78
|
-
children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(
|
|
80
|
+
children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(_objectSpread({
|
|
81
|
+
value,
|
|
82
|
+
isSearchable,
|
|
83
|
+
menuPortalZIndex
|
|
84
|
+
}, props))), {}, {
|
|
79
85
|
children: jsxRuntime.jsx(AsyncCreatableSelect__default["default"], {
|
|
80
86
|
"aria-label": props['aria-label'],
|
|
81
87
|
"aria-labelledby": props['aria-labelledby'],
|
|
@@ -93,13 +99,13 @@ const AsyncCreatableSelectInput = props => {
|
|
|
93
99
|
hasWarning: props.hasWarning,
|
|
94
100
|
hasError: props.hasError,
|
|
95
101
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
96
|
-
menuPortalZIndex:
|
|
102
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
97
103
|
isCondensed: props.isCondensed,
|
|
98
104
|
isDisabled: props.isDisabled,
|
|
99
105
|
isReadOnly: props.isReadOnly,
|
|
100
106
|
iconLeft: props.iconLeft,
|
|
101
107
|
isMulti: props.isMulti,
|
|
102
|
-
hasValue: !isEmpty__default["default"](
|
|
108
|
+
hasValue: !isEmpty__default["default"](value),
|
|
103
109
|
horizontalConstraint: props.horizontalConstraint
|
|
104
110
|
}),
|
|
105
111
|
filterOption: props.filterOption
|
|
@@ -115,14 +121,14 @@ const AsyncCreatableSelectInput = props => {
|
|
|
115
121
|
isDisabled: props.isDisabled,
|
|
116
122
|
isOptionDisabled: props.isOptionDisabled,
|
|
117
123
|
isMulti: props.isMulti,
|
|
118
|
-
isSearchable:
|
|
124
|
+
isSearchable: isSearchable,
|
|
119
125
|
maxMenuHeight: props.maxMenuHeight,
|
|
120
126
|
menuPortalTarget: props.menuPortalTarget,
|
|
121
127
|
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
122
128
|
closeMenuOnScroll: props.closeMenuOnSelect,
|
|
123
129
|
name: props.name,
|
|
124
|
-
noOptionsMessage: props.noOptionsMessage || (
|
|
125
|
-
let inputValue =
|
|
130
|
+
noOptionsMessage: props.noOptionsMessage || (_ref2 => {
|
|
131
|
+
let inputValue = _ref2.inputValue;
|
|
126
132
|
return inputValue === '' ? intl.formatMessage(selectUtils.messages.noOptionsMessageWithoutInputValue) : intl.formatMessage(selectUtils.messages.noOptionsMessageWithInputValue, {
|
|
127
133
|
inputValue
|
|
128
134
|
});
|
|
@@ -165,7 +171,7 @@ const AsyncCreatableSelectInput = props => {
|
|
|
165
171
|
placeholder: placeholder,
|
|
166
172
|
tabIndex: props.tabIndex,
|
|
167
173
|
tabSelectsValue: props.tabSelectsValue,
|
|
168
|
-
value:
|
|
174
|
+
value: value
|
|
169
175
|
// Async react-select props
|
|
170
176
|
,
|
|
171
177
|
defaultOptions: props.defaultOptions,
|
|
@@ -197,13 +203,12 @@ AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
197
203
|
iconLeft: _pt__default["default"].node,
|
|
198
204
|
isAutofocussed: _pt__default["default"].bool,
|
|
199
205
|
isCondensed: _pt__default["default"].bool,
|
|
200
|
-
menuPortalZIndex: _pt__default["default"].number
|
|
206
|
+
menuPortalZIndex: _pt__default["default"].number,
|
|
201
207
|
onBlur: _pt__default["default"].func,
|
|
202
208
|
onChange: _pt__default["default"].func,
|
|
203
209
|
showOptionGroupDivider: _pt__default["default"].bool
|
|
204
210
|
} : {};
|
|
205
211
|
AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
|
|
206
|
-
AsyncCreatableSelectInput.defaultProps = defaultProps;
|
|
207
212
|
|
|
208
213
|
/**
|
|
209
214
|
* Expose static helper methods.
|
|
@@ -251,7 +256,7 @@ AsyncCreatableSelectInput.ValueContainer = reactSelect.components.ValueContainer
|
|
|
251
256
|
var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
|
|
252
257
|
|
|
253
258
|
// NOTE: This string will be replaced on build time with the package version.
|
|
254
|
-
var version = "19.
|
|
259
|
+
var version = "19.21.0";
|
|
255
260
|
|
|
256
261
|
exports["default"] = AsyncCreatableSelectInput$1;
|
|
257
262
|
exports.version = version;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
6
7
|
require('prop-types');
|
|
7
8
|
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
8
9
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -38,6 +39,7 @@ var AsyncCreatableSelect__default = /*#__PURE__*/_interopDefault(AsyncCreatableS
|
|
|
38
39
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
39
40
|
var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
|
|
40
41
|
|
|
42
|
+
const _excluded = ["value", "isSearchable", "menuPortalZIndex"];
|
|
41
43
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
44
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
43
45
|
const LoadingIndicator = () => jsxRuntime.jsx(LoadingSpinner__default["default"], {
|
|
@@ -50,26 +52,30 @@ const customizedComponents = {
|
|
|
50
52
|
LoadingIndicator,
|
|
51
53
|
MultiValueRemove: selectUtils.TagRemove
|
|
52
54
|
};
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
const AsyncCreatableSelectInput = _ref => {
|
|
56
|
+
let _ref$value = _ref.value,
|
|
57
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
58
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
59
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable,
|
|
60
|
+
_ref$menuPortalZIndex = _ref.menuPortalZIndex,
|
|
61
|
+
menuPortalZIndex = _ref$menuPortalZIndex === void 0 ? 1 : _ref$menuPortalZIndex,
|
|
62
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
61
63
|
const intl = reactIntl.useIntl();
|
|
62
64
|
const placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
|
|
63
65
|
if (!props.isReadOnly) ;
|
|
64
66
|
if (props.isMulti) ;
|
|
65
67
|
selectUtils.warnIfMenuPortalPropsAreMissing({
|
|
66
|
-
menuPortalZIndex:
|
|
68
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
67
69
|
menuPortalTarget: props.menuPortalTarget,
|
|
68
70
|
componentName: 'AsyncCreatableSelectInput'
|
|
69
71
|
});
|
|
70
72
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
71
73
|
max: props.horizontalConstraint,
|
|
72
|
-
children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(
|
|
74
|
+
children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(_objectSpread({
|
|
75
|
+
value,
|
|
76
|
+
isSearchable,
|
|
77
|
+
menuPortalZIndex
|
|
78
|
+
}, props))), {}, {
|
|
73
79
|
children: jsxRuntime.jsx(AsyncCreatableSelect__default["default"], {
|
|
74
80
|
"aria-label": props['aria-label'],
|
|
75
81
|
"aria-labelledby": props['aria-labelledby'],
|
|
@@ -87,13 +93,13 @@ const AsyncCreatableSelectInput = props => {
|
|
|
87
93
|
hasWarning: props.hasWarning,
|
|
88
94
|
hasError: props.hasError,
|
|
89
95
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
90
|
-
menuPortalZIndex:
|
|
96
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
91
97
|
isCondensed: props.isCondensed,
|
|
92
98
|
isDisabled: props.isDisabled,
|
|
93
99
|
isReadOnly: props.isReadOnly,
|
|
94
100
|
iconLeft: props.iconLeft,
|
|
95
101
|
isMulti: props.isMulti,
|
|
96
|
-
hasValue: !isEmpty__default["default"](
|
|
102
|
+
hasValue: !isEmpty__default["default"](value),
|
|
97
103
|
horizontalConstraint: props.horizontalConstraint
|
|
98
104
|
}),
|
|
99
105
|
filterOption: props.filterOption
|
|
@@ -109,14 +115,14 @@ const AsyncCreatableSelectInput = props => {
|
|
|
109
115
|
isDisabled: props.isDisabled,
|
|
110
116
|
isOptionDisabled: props.isOptionDisabled,
|
|
111
117
|
isMulti: props.isMulti,
|
|
112
|
-
isSearchable:
|
|
118
|
+
isSearchable: isSearchable,
|
|
113
119
|
maxMenuHeight: props.maxMenuHeight,
|
|
114
120
|
menuPortalTarget: props.menuPortalTarget,
|
|
115
121
|
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
116
122
|
closeMenuOnScroll: props.closeMenuOnSelect,
|
|
117
123
|
name: props.name,
|
|
118
|
-
noOptionsMessage: props.noOptionsMessage || (
|
|
119
|
-
let inputValue =
|
|
124
|
+
noOptionsMessage: props.noOptionsMessage || (_ref2 => {
|
|
125
|
+
let inputValue = _ref2.inputValue;
|
|
120
126
|
return inputValue === '' ? intl.formatMessage(selectUtils.messages.noOptionsMessageWithoutInputValue) : intl.formatMessage(selectUtils.messages.noOptionsMessageWithInputValue, {
|
|
121
127
|
inputValue
|
|
122
128
|
});
|
|
@@ -159,7 +165,7 @@ const AsyncCreatableSelectInput = props => {
|
|
|
159
165
|
placeholder: placeholder,
|
|
160
166
|
tabIndex: props.tabIndex,
|
|
161
167
|
tabSelectsValue: props.tabSelectsValue,
|
|
162
|
-
value:
|
|
168
|
+
value: value
|
|
163
169
|
// Async react-select props
|
|
164
170
|
,
|
|
165
171
|
defaultOptions: props.defaultOptions,
|
|
@@ -185,7 +191,6 @@ const AsyncCreatableSelectInput = props => {
|
|
|
185
191
|
};
|
|
186
192
|
AsyncCreatableSelectInput.propTypes = {};
|
|
187
193
|
AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
|
|
188
|
-
AsyncCreatableSelectInput.defaultProps = defaultProps;
|
|
189
194
|
|
|
190
195
|
/**
|
|
191
196
|
* Expose static helper methods.
|
|
@@ -233,7 +238,7 @@ AsyncCreatableSelectInput.ValueContainer = reactSelect.components.ValueContainer
|
|
|
233
238
|
var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
|
|
234
239
|
|
|
235
240
|
// NOTE: This string will be replaced on build time with the package version.
|
|
236
|
-
var version = "19.
|
|
241
|
+
var version = "19.21.0";
|
|
237
242
|
|
|
238
243
|
exports["default"] = AsyncCreatableSelectInput$1;
|
|
239
244
|
exports.version = version;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
2
3
|
import _pt from 'prop-types';
|
|
3
4
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
4
5
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -19,6 +20,7 @@ import { messages, warnIfMenuPortalPropsAreMissing, customComponentsWithIcons, c
|
|
|
19
20
|
import { warning, filterDataAttributes } from '@commercetools-uikit/utils';
|
|
20
21
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
21
22
|
|
|
23
|
+
const _excluded = ["value", "isSearchable", "menuPortalZIndex"];
|
|
22
24
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
26
|
const LoadingIndicator = () => jsx(LoadingSpinner, {
|
|
@@ -31,30 +33,34 @@ const customizedComponents = {
|
|
|
31
33
|
LoadingIndicator,
|
|
32
34
|
MultiValueRemove: TagRemove
|
|
33
35
|
};
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
const AsyncCreatableSelectInput = _ref => {
|
|
37
|
+
let _ref$value = _ref.value,
|
|
38
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
39
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
40
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable,
|
|
41
|
+
_ref$menuPortalZIndex = _ref.menuPortalZIndex,
|
|
42
|
+
menuPortalZIndex = _ref$menuPortalZIndex === void 0 ? 1 : _ref$menuPortalZIndex,
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
42
44
|
const intl = useIntl();
|
|
43
45
|
const placeholder = props.placeholder || intl.formatMessage(messages.placeholder);
|
|
44
46
|
if (!props.isReadOnly) {
|
|
45
47
|
process.env.NODE_ENV !== "production" ? warning(typeof props.onChange === 'function', 'AsyncCreatableSelectInput: `onChange` is required when input is not read only.') : void 0;
|
|
46
48
|
}
|
|
47
49
|
if (props.isMulti) {
|
|
48
|
-
process.env.NODE_ENV !== "production" ? warning(_Array$isArray(
|
|
50
|
+
process.env.NODE_ENV !== "production" ? warning(_Array$isArray(value), 'AsyncCreatableSelectInput: `value` is expected to be an array when isMulti is true') : void 0;
|
|
49
51
|
}
|
|
50
52
|
warnIfMenuPortalPropsAreMissing({
|
|
51
|
-
menuPortalZIndex:
|
|
53
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
52
54
|
menuPortalTarget: props.menuPortalTarget,
|
|
53
55
|
componentName: 'AsyncCreatableSelectInput'
|
|
54
56
|
});
|
|
55
57
|
return jsx(Constraints.Horizontal, {
|
|
56
58
|
max: props.horizontalConstraint,
|
|
57
|
-
children: jsx("div", _objectSpread(_objectSpread({}, filterDataAttributes(
|
|
59
|
+
children: jsx("div", _objectSpread(_objectSpread({}, filterDataAttributes(_objectSpread({
|
|
60
|
+
value,
|
|
61
|
+
isSearchable,
|
|
62
|
+
menuPortalZIndex
|
|
63
|
+
}, props))), {}, {
|
|
58
64
|
children: jsx(AsyncCreatableSelect, {
|
|
59
65
|
"aria-label": props['aria-label'],
|
|
60
66
|
"aria-labelledby": props['aria-labelledby'],
|
|
@@ -72,13 +78,13 @@ const AsyncCreatableSelectInput = props => {
|
|
|
72
78
|
hasWarning: props.hasWarning,
|
|
73
79
|
hasError: props.hasError,
|
|
74
80
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
75
|
-
menuPortalZIndex:
|
|
81
|
+
menuPortalZIndex: menuPortalZIndex,
|
|
76
82
|
isCondensed: props.isCondensed,
|
|
77
83
|
isDisabled: props.isDisabled,
|
|
78
84
|
isReadOnly: props.isReadOnly,
|
|
79
85
|
iconLeft: props.iconLeft,
|
|
80
86
|
isMulti: props.isMulti,
|
|
81
|
-
hasValue: !isEmpty(
|
|
87
|
+
hasValue: !isEmpty(value),
|
|
82
88
|
horizontalConstraint: props.horizontalConstraint
|
|
83
89
|
}),
|
|
84
90
|
filterOption: props.filterOption
|
|
@@ -94,14 +100,14 @@ const AsyncCreatableSelectInput = props => {
|
|
|
94
100
|
isDisabled: props.isDisabled,
|
|
95
101
|
isOptionDisabled: props.isOptionDisabled,
|
|
96
102
|
isMulti: props.isMulti,
|
|
97
|
-
isSearchable:
|
|
103
|
+
isSearchable: isSearchable,
|
|
98
104
|
maxMenuHeight: props.maxMenuHeight,
|
|
99
105
|
menuPortalTarget: props.menuPortalTarget,
|
|
100
106
|
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
101
107
|
closeMenuOnScroll: props.closeMenuOnSelect,
|
|
102
108
|
name: props.name,
|
|
103
|
-
noOptionsMessage: props.noOptionsMessage || (
|
|
104
|
-
let inputValue =
|
|
109
|
+
noOptionsMessage: props.noOptionsMessage || (_ref2 => {
|
|
110
|
+
let inputValue = _ref2.inputValue;
|
|
105
111
|
return inputValue === '' ? intl.formatMessage(messages.noOptionsMessageWithoutInputValue) : intl.formatMessage(messages.noOptionsMessageWithInputValue, {
|
|
106
112
|
inputValue
|
|
107
113
|
});
|
|
@@ -144,7 +150,7 @@ const AsyncCreatableSelectInput = props => {
|
|
|
144
150
|
placeholder: placeholder,
|
|
145
151
|
tabIndex: props.tabIndex,
|
|
146
152
|
tabSelectsValue: props.tabSelectsValue,
|
|
147
|
-
value:
|
|
153
|
+
value: value
|
|
148
154
|
// Async react-select props
|
|
149
155
|
,
|
|
150
156
|
defaultOptions: props.defaultOptions,
|
|
@@ -176,13 +182,12 @@ AsyncCreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
176
182
|
iconLeft: _pt.node,
|
|
177
183
|
isAutofocussed: _pt.bool,
|
|
178
184
|
isCondensed: _pt.bool,
|
|
179
|
-
menuPortalZIndex: _pt.number
|
|
185
|
+
menuPortalZIndex: _pt.number,
|
|
180
186
|
onBlur: _pt.func,
|
|
181
187
|
onChange: _pt.func,
|
|
182
188
|
showOptionGroupDivider: _pt.bool
|
|
183
189
|
} : {};
|
|
184
190
|
AsyncCreatableSelectInput.displayName = 'AsyncCreatableSelectInput';
|
|
185
|
-
AsyncCreatableSelectInput.defaultProps = defaultProps;
|
|
186
191
|
|
|
187
192
|
/**
|
|
188
193
|
* Expose static helper methods.
|
|
@@ -230,6 +235,6 @@ AsyncCreatableSelectInput.ValueContainer = components.ValueContainer;
|
|
|
230
235
|
var AsyncCreatableSelectInput$1 = AsyncCreatableSelectInput;
|
|
231
236
|
|
|
232
237
|
// NOTE: This string will be replaced on build time with the package version.
|
|
233
|
-
var version = "19.
|
|
238
|
+
var version = "19.21.0";
|
|
234
239
|
|
|
235
240
|
export { AsyncCreatableSelectInput$1 as default, version };
|
|
@@ -146,7 +146,7 @@ export type TAsyncCreatableSelectInputProps = {
|
|
|
146
146
|
* <br>
|
|
147
147
|
* Use in conjunction with `menuPortalTarget`
|
|
148
148
|
*/
|
|
149
|
-
menuPortalZIndex
|
|
149
|
+
menuPortalZIndex?: number;
|
|
150
150
|
/**
|
|
151
151
|
* whether the menu should block scroll while open
|
|
152
152
|
* <br>
|
|
@@ -275,9 +275,8 @@ export type TAsyncCreatableSelectInputProps = {
|
|
|
275
275
|
showOptionGroupDivider?: boolean;
|
|
276
276
|
};
|
|
277
277
|
declare const AsyncCreatableSelectInput: {
|
|
278
|
-
(props: TAsyncCreatableSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
278
|
+
({ value, isSearchable, menuPortalZIndex, ...props }: TAsyncCreatableSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
279
279
|
displayName: string;
|
|
280
|
-
defaultProps: Pick<TAsyncCreatableSelectInputProps, "value" | "isSearchable" | "menuPortalZIndex">;
|
|
281
280
|
isTouched(touched: unknown): boolean;
|
|
282
281
|
/**
|
|
283
282
|
* Expose react-select components for customization purposes.
|
|
@@ -311,13 +310,7 @@ declare const AsyncCreatableSelectInput: {
|
|
|
311
310
|
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: import("react-select").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
|
|
312
311
|
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: import("react-select/dist/declarations/src/components/Menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
|
|
313
312
|
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>(props: import("react-select").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
|
|
314
|
-
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: import("react-select").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import(
|
|
315
|
-
/**
|
|
316
|
-
* whether the menu should block scroll while open
|
|
317
|
-
* <br>
|
|
318
|
-
* [Props from React select was used](https://react-select.com/props)
|
|
319
|
-
*/
|
|
320
|
-
"@emotion/react").jsx.JSX.Element;
|
|
313
|
+
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: import("react-select").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
|
|
321
314
|
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: import("react-select").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
|
|
322
315
|
MultiValueRemove: {
|
|
323
316
|
(props: import("@commercetools-uikit/select-utils").TTagRemoveProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
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": "19.
|
|
4
|
+
"version": "19.21.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/icons": "19.
|
|
27
|
-
"@commercetools-uikit/loading-spinner": "19.
|
|
28
|
-
"@commercetools-uikit/select-utils": "19.
|
|
29
|
-
"@commercetools-uikit/spacings": "19.
|
|
30
|
-
"@commercetools-uikit/text": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.21.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.21.0",
|
|
26
|
+
"@commercetools-uikit/icons": "19.21.0",
|
|
27
|
+
"@commercetools-uikit/loading-spinner": "19.21.0",
|
|
28
|
+
"@commercetools-uikit/select-utils": "19.21.0",
|
|
29
|
+
"@commercetools-uikit/spacings": "19.21.0",
|
|
30
|
+
"@commercetools-uikit/text": "19.21.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.21.0",
|
|
32
32
|
"@emotion/is-prop-valid": "1.3.1",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|