@commercetools-uikit/search-select-field 12.2.2 → 12.2.6
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
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
14
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
7
15
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
8
16
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
9
|
-
require('react');
|
|
10
17
|
var PropTypes = require('prop-types');
|
|
11
18
|
var requiredIf = require('react-required-if');
|
|
12
19
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -15,10 +22,18 @@ var Spacings = require('@commercetools-uikit/spacings');
|
|
|
15
22
|
var FieldLabel = require('@commercetools-uikit/field-label');
|
|
16
23
|
var SearchSelectInput = require('@commercetools-uikit/search-select-input');
|
|
17
24
|
var FieldErrors = require('@commercetools-uikit/field-errors');
|
|
18
|
-
var
|
|
25
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
19
26
|
|
|
20
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
21
28
|
|
|
29
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
30
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
31
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
32
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
33
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
34
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
35
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
36
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
22
37
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
23
38
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
24
39
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
@@ -30,10 +45,14 @@ var FieldLabel__default = /*#__PURE__*/_interopDefault(FieldLabel);
|
|
|
30
45
|
var SearchSelectInput__default = /*#__PURE__*/_interopDefault(SearchSelectInput);
|
|
31
46
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
32
47
|
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), true)).call(_context7, 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 _context8; _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
51
|
+
|
|
33
52
|
var hasErrors = function hasErrors(errors) {
|
|
34
53
|
var _context;
|
|
35
54
|
|
|
36
|
-
return errors && _someInstanceProperty__default[
|
|
55
|
+
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
37
56
|
};
|
|
38
57
|
|
|
39
58
|
var sequentialId = utils.createSequentialId('async-select-field-');
|
|
@@ -41,61 +60,63 @@ var sequentialId = utils.createSequentialId('async-select-field-');
|
|
|
41
60
|
var SearchSelectField = function SearchSelectField(props) {
|
|
42
61
|
var hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
43
62
|
var id = props.id || sequentialId();
|
|
44
|
-
return
|
|
45
|
-
max: props.horizontalConstraint
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
63
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
64
|
+
max: props.horizontalConstraint,
|
|
65
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
66
|
+
scale: "xs",
|
|
67
|
+
children: [jsxRuntime.jsx(FieldLabel__default["default"], {
|
|
68
|
+
title: props.title,
|
|
69
|
+
hint: props.hint,
|
|
70
|
+
description: props.description,
|
|
71
|
+
onInfoButtonClick: props.onInfoButtonClick,
|
|
72
|
+
hintIcon: props.hintIcon,
|
|
73
|
+
badge: props.badge,
|
|
74
|
+
hasRequiredIndicator: props.isRequired,
|
|
75
|
+
htmlFor: id
|
|
76
|
+
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
|
|
77
|
+
horizontalConstraint: "scale",
|
|
78
|
+
hasError: hasError,
|
|
79
|
+
"aria-label": props['aria-label'],
|
|
80
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
81
|
+
isAutofocussed: props.isAutofocussed,
|
|
82
|
+
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
83
|
+
components: props.components,
|
|
84
|
+
filterOption: props.filterOption,
|
|
85
|
+
id: id,
|
|
86
|
+
containerId: props.containerId,
|
|
87
|
+
isClearable: props.isClearable,
|
|
88
|
+
isDisabled: props.isDisabled,
|
|
89
|
+
isReadOnly: props.isReadOnly,
|
|
90
|
+
isOptionDisabled: props.isOptionDisabled,
|
|
91
|
+
isMulti: props.isMulti,
|
|
92
|
+
hasWarning: props.hasWarning,
|
|
93
|
+
maxMenuHeight: props.maxMenuHeight,
|
|
94
|
+
menuPortalTarget: props.menuPortalTarget,
|
|
95
|
+
menuPortalZIndex: props.menuPortalZIndex,
|
|
96
|
+
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
97
|
+
name: props.name,
|
|
98
|
+
noOptionsMessage: props.noOptionsMessage,
|
|
99
|
+
loadingMessage: props.loadingMessage,
|
|
100
|
+
onBlur: props.onBlur,
|
|
101
|
+
onChange: props.onChange,
|
|
102
|
+
onFocus: props.onFocus,
|
|
103
|
+
onInputChange: props.onInputChange,
|
|
104
|
+
placeholder: props.placeholder,
|
|
105
|
+
tabIndex: props.tabIndex,
|
|
106
|
+
tabSelectsValue: props.tabSelectsValue,
|
|
107
|
+
value: props.value // Async react-select props
|
|
108
|
+
,
|
|
109
|
+
loadOptions: props.loadOptions,
|
|
110
|
+
cacheOptions: props.cacheOptions,
|
|
111
|
+
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
112
|
+
optionType: props.optionType
|
|
113
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
114
|
+
errors: props.errors,
|
|
115
|
+
isVisible: hasError,
|
|
116
|
+
renderError: props.renderError
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
});
|
|
99
120
|
};
|
|
100
121
|
|
|
101
122
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
@@ -105,47 +126,47 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
105
126
|
/**
|
|
106
127
|
*Horizontal size limit of the input fields.
|
|
107
128
|
*/
|
|
108
|
-
horizontalConstraint: PropTypes__default[
|
|
129
|
+
horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
|
|
109
130
|
|
|
110
131
|
/**
|
|
111
132
|
* Aria label (for assistive tech)
|
|
112
133
|
*/
|
|
113
|
-
'aria-label': PropTypes__default[
|
|
134
|
+
'aria-label': PropTypes__default["default"].string,
|
|
114
135
|
|
|
115
136
|
/**
|
|
116
137
|
* HTML ID of an element that should be used as the label (for assistive tech)
|
|
117
138
|
*/
|
|
118
|
-
'aria-labelledby': PropTypes__default[
|
|
139
|
+
'aria-labelledby': PropTypes__default["default"].string,
|
|
119
140
|
|
|
120
141
|
/**
|
|
121
142
|
* The id of the search input. This forwarded as react-select's "inputId"
|
|
122
143
|
*/
|
|
123
|
-
id: PropTypes__default[
|
|
144
|
+
id: PropTypes__default["default"].string,
|
|
124
145
|
|
|
125
146
|
/**
|
|
126
147
|
* The id to set on the SelectContainer component. This is forwarded as react-select's "id"
|
|
127
148
|
*/
|
|
128
|
-
containerId: PropTypes__default[
|
|
149
|
+
containerId: PropTypes__default["default"].string,
|
|
129
150
|
|
|
130
151
|
/**
|
|
131
152
|
* Name of the HTML Input (optional - without this, no input will be rendered)
|
|
132
153
|
*/
|
|
133
|
-
name: PropTypes__default[
|
|
154
|
+
name: PropTypes__default["default"].string,
|
|
134
155
|
|
|
135
156
|
/**
|
|
136
157
|
* Placeholder text for the select value
|
|
137
158
|
*/
|
|
138
|
-
placeholder: PropTypes__default[
|
|
159
|
+
placeholder: PropTypes__default["default"].string,
|
|
139
160
|
|
|
140
161
|
/**
|
|
141
162
|
* Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
|
|
142
163
|
*/
|
|
143
|
-
components: PropTypes__default[
|
|
164
|
+
components: PropTypes__default["default"].objectOf(PropTypes__default["default"].func),
|
|
144
165
|
|
|
145
166
|
/**
|
|
146
167
|
* Sets the tabIndex attribute on the input
|
|
147
168
|
*/
|
|
148
|
-
tabIndex: PropTypes__default[
|
|
169
|
+
tabIndex: PropTypes__default["default"].string,
|
|
149
170
|
|
|
150
171
|
/**
|
|
151
172
|
* The value of the select; reflected by the selected option
|
|
@@ -157,92 +178,92 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
157
178
|
rest[_key - 1] = arguments[_key];
|
|
158
179
|
}
|
|
159
180
|
|
|
160
|
-
return props.isMulti ? PropTypes__default[
|
|
161
|
-
value: PropTypes__default[
|
|
162
|
-
})).apply(void 0, _concatInstanceProperty__default[
|
|
163
|
-
value: PropTypes__default[
|
|
164
|
-
}).apply(void 0, _concatInstanceProperty__default[
|
|
181
|
+
return props.isMulti ? PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
182
|
+
value: PropTypes__default["default"].string.isRequired
|
|
183
|
+
})).apply(void 0, _concatInstanceProperty__default["default"](_context2 = [props]).call(_context2, rest)) : PropTypes__default["default"].shape({
|
|
184
|
+
value: PropTypes__default["default"].string.isRequired
|
|
185
|
+
}).apply(void 0, _concatInstanceProperty__default["default"](_context3 = [props]).call(_context3, rest));
|
|
165
186
|
},
|
|
166
187
|
|
|
167
188
|
/**
|
|
168
189
|
* Remove the currently focused option when the user presses backspace
|
|
169
190
|
*/
|
|
170
|
-
backspaceRemovesValue: PropTypes__default[
|
|
191
|
+
backspaceRemovesValue: PropTypes__default["default"].bool,
|
|
171
192
|
|
|
172
193
|
/**
|
|
173
194
|
* Indicates the input field has an error
|
|
174
195
|
*/
|
|
175
|
-
hasError: PropTypes__default[
|
|
196
|
+
hasError: PropTypes__default["default"].bool,
|
|
176
197
|
|
|
177
198
|
/**
|
|
178
199
|
* Indicates the input field has a warning
|
|
179
200
|
*/
|
|
180
|
-
hasWarning: PropTypes__default[
|
|
201
|
+
hasWarning: PropTypes__default["default"].bool,
|
|
181
202
|
|
|
182
203
|
/**
|
|
183
204
|
* Is the select read-only
|
|
184
205
|
*/
|
|
185
|
-
isReadOnly: PropTypes__default[
|
|
206
|
+
isReadOnly: PropTypes__default["default"].bool,
|
|
186
207
|
|
|
187
208
|
/**
|
|
188
209
|
* Is the select disabled
|
|
189
210
|
*/
|
|
190
|
-
isDisabled: PropTypes__default[
|
|
211
|
+
isDisabled: PropTypes__default["default"].bool,
|
|
191
212
|
|
|
192
213
|
/**
|
|
193
214
|
* Is the select value clearable
|
|
194
215
|
*/
|
|
195
|
-
isClearable: PropTypes__default[
|
|
216
|
+
isClearable: PropTypes__default["default"].bool,
|
|
196
217
|
|
|
197
218
|
/**
|
|
198
219
|
* Override the built-in logic to detect whether an option is disabled
|
|
199
220
|
*/
|
|
200
|
-
isOptionDisabled: PropTypes__default[
|
|
221
|
+
isOptionDisabled: PropTypes__default["default"].func,
|
|
201
222
|
|
|
202
223
|
/**
|
|
203
224
|
* Support multiple selected options
|
|
204
225
|
*/
|
|
205
|
-
isMulti: PropTypes__default[
|
|
226
|
+
isMulti: PropTypes__default["default"].bool,
|
|
206
227
|
|
|
207
228
|
/**
|
|
208
229
|
* Focus the control when it is mounted. Renamed autoFocus of react-select
|
|
209
230
|
*/
|
|
210
|
-
isAutofocussed: PropTypes__default[
|
|
231
|
+
isAutofocussed: PropTypes__default["default"].bool,
|
|
211
232
|
|
|
212
233
|
/**
|
|
213
234
|
* 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.
|
|
214
235
|
*/
|
|
215
|
-
noOptionsMessage: PropTypes__default[
|
|
236
|
+
noOptionsMessage: PropTypes__default["default"].func,
|
|
216
237
|
|
|
217
238
|
/**
|
|
218
239
|
* Maximum height of the menu before scrolling
|
|
219
240
|
*/
|
|
220
|
-
maxMenuHeight: PropTypes__default[
|
|
241
|
+
maxMenuHeight: PropTypes__default["default"].number,
|
|
221
242
|
|
|
222
243
|
/**
|
|
223
244
|
* Dom element to portal the select menu to
|
|
224
245
|
*/
|
|
225
|
-
menuPortalTarget: PropTypes__default[
|
|
246
|
+
menuPortalTarget: PropTypes__default["default"].instanceOf(utils.SafeHTMLElement),
|
|
226
247
|
|
|
227
248
|
/**
|
|
228
249
|
* z-index value for the menu portal
|
|
229
250
|
*/
|
|
230
|
-
menuPortalZIndex: PropTypes__default[
|
|
251
|
+
menuPortalZIndex: PropTypes__default["default"].number,
|
|
231
252
|
|
|
232
253
|
/**
|
|
233
254
|
* whether the menu should block scroll while open
|
|
234
255
|
*/
|
|
235
|
-
menuShouldBlockScroll: PropTypes__default[
|
|
256
|
+
menuShouldBlockScroll: PropTypes__default["default"].bool,
|
|
236
257
|
|
|
237
258
|
/**
|
|
238
259
|
* Determines if option groups will be separated by a divider
|
|
239
260
|
*/
|
|
240
|
-
showOptionGroupDivider: PropTypes__default[
|
|
261
|
+
showOptionGroupDivider: PropTypes__default["default"].bool,
|
|
241
262
|
|
|
242
263
|
/**
|
|
243
264
|
* Handle blur events on the control
|
|
244
265
|
*/
|
|
245
|
-
onBlur: PropTypes__default[
|
|
266
|
+
onBlur: PropTypes__default["default"].func,
|
|
246
267
|
|
|
247
268
|
/**
|
|
248
269
|
* Called with a fake event when value changes.
|
|
@@ -251,57 +272,57 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
251
272
|
* <br />
|
|
252
273
|
* Signature: `(event, action) => void`
|
|
253
274
|
*/
|
|
254
|
-
onChange: PropTypes__default[
|
|
275
|
+
onChange: PropTypes__default["default"].func.isRequired,
|
|
255
276
|
|
|
256
277
|
/**
|
|
257
278
|
* Handle focus events on the control
|
|
258
279
|
*/
|
|
259
|
-
onFocus: PropTypes__default[
|
|
280
|
+
onFocus: PropTypes__default["default"].func,
|
|
260
281
|
|
|
261
282
|
/**
|
|
262
283
|
* Handle change events on the input
|
|
263
284
|
* <br />
|
|
264
285
|
* Signature: `(inputValue, action) => void`
|
|
265
286
|
*/
|
|
266
|
-
onInputChange: PropTypes__default[
|
|
287
|
+
onInputChange: PropTypes__default["default"].func,
|
|
267
288
|
|
|
268
289
|
/**
|
|
269
290
|
* Select the currently focused option when the user presses tab
|
|
270
291
|
*/
|
|
271
|
-
tabSelectsValue: PropTypes__default[
|
|
292
|
+
tabSelectsValue: PropTypes__default["default"].bool,
|
|
272
293
|
|
|
273
294
|
/**
|
|
274
295
|
* Function that returns a promise, which is the set of options to be used once the promise resolves.
|
|
275
296
|
*/
|
|
276
|
-
loadOptions: PropTypes__default[
|
|
297
|
+
loadOptions: PropTypes__default["default"].func.isRequired,
|
|
277
298
|
|
|
278
299
|
/**
|
|
279
300
|
* The text shown while the options are being loaded
|
|
280
301
|
*/
|
|
281
|
-
loadingMessage: PropTypes__default[
|
|
302
|
+
loadingMessage: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].func]),
|
|
282
303
|
|
|
283
304
|
/**
|
|
284
305
|
* If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
|
|
285
306
|
*/
|
|
286
|
-
cacheOptions: PropTypes__default[
|
|
307
|
+
cacheOptions: PropTypes__default["default"].any,
|
|
287
308
|
|
|
288
309
|
/**
|
|
289
310
|
* Custom method to filter whether an option should be displayed in the menu
|
|
290
311
|
*/
|
|
291
|
-
filterOption: PropTypes__default[
|
|
312
|
+
filterOption: PropTypes__default["default"].func,
|
|
292
313
|
|
|
293
314
|
/**
|
|
294
315
|
* The style of the an option in the dropdown menu. It could be single lined option or an option with more and custom info
|
|
295
316
|
*/
|
|
296
|
-
optionType: PropTypes__default[
|
|
317
|
+
optionType: PropTypes__default["default"].oneOf(['single-property', 'double-property', 'multiple-properties']),
|
|
297
318
|
|
|
298
319
|
/**
|
|
299
320
|
* A map of errors. Error messages for known errors are rendered automatically.
|
|
300
321
|
* <br />
|
|
301
322
|
* Unknown errors will be forwarded to `renderError`
|
|
302
323
|
*/
|
|
303
|
-
errors: PropTypes__default[
|
|
304
|
-
missing: PropTypes__default[
|
|
324
|
+
errors: PropTypes__default["default"].shape({
|
|
325
|
+
missing: PropTypes__default["default"].bool
|
|
305
326
|
}),
|
|
306
327
|
|
|
307
328
|
/**
|
|
@@ -309,12 +330,12 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
309
330
|
* <br />
|
|
310
331
|
* Signature: `(key, error) => React.node`
|
|
311
332
|
*/
|
|
312
|
-
renderError: PropTypes__default[
|
|
333
|
+
renderError: PropTypes__default["default"].func,
|
|
313
334
|
|
|
314
335
|
/**
|
|
315
336
|
* Indicates if the value is required. Shows an the "required asterisk" if so.
|
|
316
337
|
*/
|
|
317
|
-
isRequired: PropTypes__default[
|
|
338
|
+
isRequired: PropTypes__default["default"].bool,
|
|
318
339
|
|
|
319
340
|
/**
|
|
320
341
|
* Indicates whether the field was touched. Errors will only be shown when the field was touched.
|
|
@@ -326,26 +347,26 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
326
347
|
rest[_key2 - 1] = arguments[_key2];
|
|
327
348
|
}
|
|
328
349
|
|
|
329
|
-
return props.isMulti ? PropTypes__default[
|
|
350
|
+
return props.isMulti ? PropTypes__default["default"].arrayOf.apply(PropTypes__default["default"], _concatInstanceProperty__default["default"](_context4 = [PropTypes__default["default"].bool]).call(_context4, rest)).apply(void 0, _concatInstanceProperty__default["default"](_context5 = [props]).call(_context5, rest)) : PropTypes__default["default"].bool.apply(PropTypes__default["default"], _concatInstanceProperty__default["default"](_context6 = [props]).call(_context6, rest));
|
|
330
351
|
},
|
|
331
352
|
// LabelField
|
|
332
353
|
|
|
333
354
|
/**
|
|
334
355
|
* Title of the label
|
|
335
356
|
*/
|
|
336
|
-
title: PropTypes__default[
|
|
357
|
+
title: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]).isRequired,
|
|
337
358
|
|
|
338
359
|
/**
|
|
339
360
|
* Hint for the label. Provides a supplementary but important information regarding the behaviour of the input (e.g warn about uniqueness of a field, when it can only be set once), whereas `description` can describe it in more depth. Can also receive a `hintIcon`.
|
|
340
361
|
*/
|
|
341
|
-
hint: requiredIf__default[
|
|
362
|
+
hint: requiredIf__default["default"](PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]), function (props) {
|
|
342
363
|
return props.hintIcon;
|
|
343
364
|
}),
|
|
344
365
|
|
|
345
366
|
/**
|
|
346
367
|
* Provides a description for the title.
|
|
347
368
|
*/
|
|
348
|
-
description: PropTypes__default[
|
|
369
|
+
description: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]),
|
|
349
370
|
|
|
350
371
|
/**
|
|
351
372
|
* Function called when info button is pressed.
|
|
@@ -354,26 +375,26 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
354
375
|
* <br />
|
|
355
376
|
* Signature: `(event) => void`
|
|
356
377
|
*/
|
|
357
|
-
onInfoButtonClick: PropTypes__default[
|
|
378
|
+
onInfoButtonClick: PropTypes__default["default"].func,
|
|
358
379
|
|
|
359
380
|
/**
|
|
360
381
|
* Icon to be displayed beside the hint text.
|
|
361
382
|
* <br />
|
|
362
383
|
* Will only get rendered when `hint` is passed as well.
|
|
363
384
|
*/
|
|
364
|
-
hintIcon: PropTypes__default[
|
|
385
|
+
hintIcon: PropTypes__default["default"].node,
|
|
365
386
|
|
|
366
387
|
/**
|
|
367
388
|
* Badge to be displayed beside the label.
|
|
368
389
|
* <br />
|
|
369
390
|
* Might be used to display additional information about the content of the field (E.g verified email)
|
|
370
391
|
*/
|
|
371
|
-
badge: PropTypes__default[
|
|
392
|
+
badge: PropTypes__default["default"].node
|
|
372
393
|
} : {};
|
|
373
394
|
var SearchSelectField$1 = SearchSelectField;
|
|
374
395
|
|
|
375
|
-
// NOTE: This string will be replaced
|
|
376
|
-
var version =
|
|
396
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
397
|
+
var version = "12.2.6";
|
|
377
398
|
|
|
378
|
-
exports[
|
|
399
|
+
exports["default"] = SearchSelectField$1;
|
|
379
400
|
exports.version = version;
|
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
14
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
7
15
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
8
16
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
9
|
-
require('react');
|
|
10
17
|
require('prop-types');
|
|
11
18
|
require('react-required-if');
|
|
12
19
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -15,10 +22,18 @@ var Spacings = require('@commercetools-uikit/spacings');
|
|
|
15
22
|
var FieldLabel = require('@commercetools-uikit/field-label');
|
|
16
23
|
var SearchSelectInput = require('@commercetools-uikit/search-select-input');
|
|
17
24
|
var FieldErrors = require('@commercetools-uikit/field-errors');
|
|
18
|
-
var
|
|
25
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
19
26
|
|
|
20
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
21
28
|
|
|
29
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
30
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
31
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
32
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
33
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
34
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
35
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
36
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
22
37
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
23
38
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
24
39
|
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
@@ -27,10 +42,14 @@ var FieldLabel__default = /*#__PURE__*/_interopDefault(FieldLabel);
|
|
|
27
42
|
var SearchSelectInput__default = /*#__PURE__*/_interopDefault(SearchSelectInput);
|
|
28
43
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
29
44
|
|
|
45
|
+
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; }
|
|
46
|
+
|
|
47
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), true)).call(_context7, 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 _context8; _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
48
|
+
|
|
30
49
|
var hasErrors = function hasErrors(errors) {
|
|
31
50
|
var _context;
|
|
32
51
|
|
|
33
|
-
return errors && _someInstanceProperty__default[
|
|
52
|
+
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
34
53
|
};
|
|
35
54
|
|
|
36
55
|
var sequentialId = utils.createSequentialId('async-select-field-');
|
|
@@ -38,69 +57,71 @@ var sequentialId = utils.createSequentialId('async-select-field-');
|
|
|
38
57
|
var SearchSelectField = function SearchSelectField(props) {
|
|
39
58
|
var hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
40
59
|
var id = props.id || sequentialId();
|
|
41
|
-
return
|
|
42
|
-
max: props.horizontalConstraint
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
60
|
+
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
61
|
+
max: props.horizontalConstraint,
|
|
62
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
63
|
+
scale: "xs",
|
|
64
|
+
children: [jsxRuntime.jsx(FieldLabel__default["default"], {
|
|
65
|
+
title: props.title,
|
|
66
|
+
hint: props.hint,
|
|
67
|
+
description: props.description,
|
|
68
|
+
onInfoButtonClick: props.onInfoButtonClick,
|
|
69
|
+
hintIcon: props.hintIcon,
|
|
70
|
+
badge: props.badge,
|
|
71
|
+
hasRequiredIndicator: props.isRequired,
|
|
72
|
+
htmlFor: id
|
|
73
|
+
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
|
|
74
|
+
horizontalConstraint: "scale",
|
|
75
|
+
hasError: hasError,
|
|
76
|
+
"aria-label": props['aria-label'],
|
|
77
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
78
|
+
isAutofocussed: props.isAutofocussed,
|
|
79
|
+
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
80
|
+
components: props.components,
|
|
81
|
+
filterOption: props.filterOption,
|
|
82
|
+
id: id,
|
|
83
|
+
containerId: props.containerId,
|
|
84
|
+
isClearable: props.isClearable,
|
|
85
|
+
isDisabled: props.isDisabled,
|
|
86
|
+
isReadOnly: props.isReadOnly,
|
|
87
|
+
isOptionDisabled: props.isOptionDisabled,
|
|
88
|
+
isMulti: props.isMulti,
|
|
89
|
+
hasWarning: props.hasWarning,
|
|
90
|
+
maxMenuHeight: props.maxMenuHeight,
|
|
91
|
+
menuPortalTarget: props.menuPortalTarget,
|
|
92
|
+
menuPortalZIndex: props.menuPortalZIndex,
|
|
93
|
+
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
94
|
+
name: props.name,
|
|
95
|
+
noOptionsMessage: props.noOptionsMessage,
|
|
96
|
+
loadingMessage: props.loadingMessage,
|
|
97
|
+
onBlur: props.onBlur,
|
|
98
|
+
onChange: props.onChange,
|
|
99
|
+
onFocus: props.onFocus,
|
|
100
|
+
onInputChange: props.onInputChange,
|
|
101
|
+
placeholder: props.placeholder,
|
|
102
|
+
tabIndex: props.tabIndex,
|
|
103
|
+
tabSelectsValue: props.tabSelectsValue,
|
|
104
|
+
value: props.value // Async react-select props
|
|
105
|
+
,
|
|
106
|
+
loadOptions: props.loadOptions,
|
|
107
|
+
cacheOptions: props.cacheOptions,
|
|
108
|
+
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
109
|
+
optionType: props.optionType
|
|
110
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
111
|
+
errors: props.errors,
|
|
112
|
+
isVisible: hasError,
|
|
113
|
+
renderError: props.renderError
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
});
|
|
96
117
|
};
|
|
97
118
|
|
|
98
119
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
99
120
|
SearchSelectField.propTypes = {};
|
|
100
121
|
var SearchSelectField$1 = SearchSelectField;
|
|
101
122
|
|
|
102
|
-
// NOTE: This string will be replaced
|
|
103
|
-
var version =
|
|
123
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
124
|
+
var version = "12.2.6";
|
|
104
125
|
|
|
105
|
-
exports[
|
|
126
|
+
exports["default"] = SearchSelectField$1;
|
|
106
127
|
exports.version = version;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
2
|
+
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
3
|
+
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
5
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
7
|
+
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
8
|
+
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
2
10
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
3
11
|
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
4
12
|
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
5
|
-
import 'react';
|
|
6
13
|
import PropTypes from 'prop-types';
|
|
7
14
|
import requiredIf from 'react-required-if';
|
|
8
15
|
import { createSequentialId, filterDataAttributes, SafeHTMLElement } from '@commercetools-uikit/utils';
|
|
@@ -11,7 +18,11 @@ import Spacings from '@commercetools-uikit/spacings';
|
|
|
11
18
|
import FieldLabel from '@commercetools-uikit/field-label';
|
|
12
19
|
import SearchSelectInput from '@commercetools-uikit/search-select-input';
|
|
13
20
|
import FieldErrors from '@commercetools-uikit/field-errors';
|
|
14
|
-
import { jsx } from '@emotion/react';
|
|
21
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context7; _forEachInstanceProperty(_context7 = ownKeys(Object(source), true)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context8; _forEachInstanceProperty(_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
15
26
|
|
|
16
27
|
var hasErrors = function hasErrors(errors) {
|
|
17
28
|
var _context;
|
|
@@ -25,60 +36,62 @@ var SearchSelectField = function SearchSelectField(props) {
|
|
|
25
36
|
var hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
26
37
|
var id = props.id || sequentialId();
|
|
27
38
|
return jsx(Constraints.Horizontal, {
|
|
28
|
-
max: props.horizontalConstraint
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
39
|
+
max: props.horizontalConstraint,
|
|
40
|
+
children: jsxs(Spacings.Stack, {
|
|
41
|
+
scale: "xs",
|
|
42
|
+
children: [jsx(FieldLabel, {
|
|
43
|
+
title: props.title,
|
|
44
|
+
hint: props.hint,
|
|
45
|
+
description: props.description,
|
|
46
|
+
onInfoButtonClick: props.onInfoButtonClick,
|
|
47
|
+
hintIcon: props.hintIcon,
|
|
48
|
+
badge: props.badge,
|
|
49
|
+
hasRequiredIndicator: props.isRequired,
|
|
50
|
+
htmlFor: id
|
|
51
|
+
}), jsx(SearchSelectInput, _objectSpread(_objectSpread({}, filterDataAttributes(props)), {}, {
|
|
52
|
+
horizontalConstraint: "scale",
|
|
53
|
+
hasError: hasError,
|
|
54
|
+
"aria-label": props['aria-label'],
|
|
55
|
+
"aria-labelledby": props['aria-labelledby'],
|
|
56
|
+
isAutofocussed: props.isAutofocussed,
|
|
57
|
+
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
58
|
+
components: props.components,
|
|
59
|
+
filterOption: props.filterOption,
|
|
60
|
+
id: id,
|
|
61
|
+
containerId: props.containerId,
|
|
62
|
+
isClearable: props.isClearable,
|
|
63
|
+
isDisabled: props.isDisabled,
|
|
64
|
+
isReadOnly: props.isReadOnly,
|
|
65
|
+
isOptionDisabled: props.isOptionDisabled,
|
|
66
|
+
isMulti: props.isMulti,
|
|
67
|
+
hasWarning: props.hasWarning,
|
|
68
|
+
maxMenuHeight: props.maxMenuHeight,
|
|
69
|
+
menuPortalTarget: props.menuPortalTarget,
|
|
70
|
+
menuPortalZIndex: props.menuPortalZIndex,
|
|
71
|
+
menuShouldBlockScroll: props.menuShouldBlockScroll,
|
|
72
|
+
name: props.name,
|
|
73
|
+
noOptionsMessage: props.noOptionsMessage,
|
|
74
|
+
loadingMessage: props.loadingMessage,
|
|
75
|
+
onBlur: props.onBlur,
|
|
76
|
+
onChange: props.onChange,
|
|
77
|
+
onFocus: props.onFocus,
|
|
78
|
+
onInputChange: props.onInputChange,
|
|
79
|
+
placeholder: props.placeholder,
|
|
80
|
+
tabIndex: props.tabIndex,
|
|
81
|
+
tabSelectsValue: props.tabSelectsValue,
|
|
82
|
+
value: props.value // Async react-select props
|
|
83
|
+
,
|
|
84
|
+
loadOptions: props.loadOptions,
|
|
85
|
+
cacheOptions: props.cacheOptions,
|
|
86
|
+
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
87
|
+
optionType: props.optionType
|
|
88
|
+
})), jsx(FieldErrors, {
|
|
89
|
+
errors: props.errors,
|
|
90
|
+
isVisible: hasError,
|
|
91
|
+
renderError: props.renderError
|
|
92
|
+
})]
|
|
93
|
+
})
|
|
94
|
+
});
|
|
82
95
|
};
|
|
83
96
|
|
|
84
97
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
@@ -355,7 +368,7 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
355
368
|
} : {};
|
|
356
369
|
var SearchSelectField$1 = SearchSelectField;
|
|
357
370
|
|
|
358
|
-
// NOTE: This string will be replaced
|
|
359
|
-
var version =
|
|
371
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
372
|
+
var version = "12.2.6";
|
|
360
373
|
|
|
361
374
|
export { SearchSelectField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/search-select-field",
|
|
3
3
|
"description": "A search select field built on top of search select input, allowing users to asynchronously search for options",
|
|
4
|
-
"version": "12.2.
|
|
4
|
+
"version": "12.2.6",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
12
|
"keywords": ["javascript", "design system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -19,19 +18,16 @@
|
|
|
19
18
|
"main": "dist/commercetools-uikit-search-select-field.cjs.js",
|
|
20
19
|
"module": "dist/commercetools-uikit-search-select-field.esm.js",
|
|
21
20
|
"files": ["dist"],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"prepare": "../../../../scripts/version.js replace"
|
|
24
|
-
},
|
|
25
21
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "7.
|
|
27
|
-
"@babel/runtime-corejs3": "7.
|
|
28
|
-
"@commercetools-uikit/constraints": "12.2.
|
|
29
|
-
"@commercetools-uikit/design-system": "12.2.
|
|
30
|
-
"@commercetools-uikit/field-errors": "12.2.
|
|
31
|
-
"@commercetools-uikit/field-label": "12.2.
|
|
32
|
-
"@commercetools-uikit/search-select-input": "12.2.
|
|
33
|
-
"@commercetools-uikit/spacings": "12.2.
|
|
34
|
-
"@commercetools-uikit/utils": "12.2.
|
|
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/field-errors": "12.2.5",
|
|
27
|
+
"@commercetools-uikit/field-label": "12.2.6",
|
|
28
|
+
"@commercetools-uikit/search-select-input": "12.2.6",
|
|
29
|
+
"@commercetools-uikit/spacings": "12.2.5",
|
|
30
|
+
"@commercetools-uikit/utils": "12.2.5",
|
|
35
31
|
"@emotion/react": "^11.4.0",
|
|
36
32
|
"@emotion/styled": "^11.3.0",
|
|
37
33
|
"prop-types": "15.7.2",
|