@commercetools-uikit/async-select-input 12.2.3 → 12.2.7

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.
@@ -39,12 +39,12 @@ var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
39
39
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
40
40
  var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
41
41
 
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; }
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; }
43
43
 
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; }
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; }
45
45
 
46
46
  var LoadingIndicator = function LoadingIndicator() {
47
- return jsxRuntime.jsx(LoadingSpinner__default['default'], {
47
+ return jsxRuntime.jsx(LoadingSpinner__default["default"], {
48
48
  scale: "s"
49
49
  });
50
50
  };
@@ -70,10 +70,10 @@ var AsyncSelectInput = function AsyncSelectInput(props) {
70
70
  return props.loadingMessage || intl.formatMessage(selectUtils.messages.loadingOptions);
71
71
  };
72
72
 
73
- return jsxRuntime.jsx(Constraints__default['default'].Horizontal, {
73
+ return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
74
74
  max: props.horizontalConstraint,
75
75
  children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
76
- children: jsxRuntime.jsx(AsyncSelect__default['default'], {
76
+ children: jsxRuntime.jsx(AsyncSelect__default["default"], {
77
77
  "aria-label": props['aria-label'],
78
78
  "aria-labelledby": props['aria-labelledby'],
79
79
  autoFocus: props.isAutofocussed,
@@ -189,22 +189,22 @@ AsyncSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
189
189
  /**
190
190
  * Horizontal size limit of the input fields.
191
191
  */
192
- horizontalConstraint: PropTypes__default['default'].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
192
+ horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
193
193
 
194
194
  /**
195
195
  * Indicates the input field has an error
196
196
  */
197
- hasError: PropTypes__default['default'].bool,
197
+ hasError: PropTypes__default["default"].bool,
198
198
 
199
199
  /**
200
200
  * Indicates the input field has a warning
201
201
  */
202
- hasWarning: PropTypes__default['default'].bool,
202
+ hasWarning: PropTypes__default["default"].bool,
203
203
 
204
204
  /**
205
205
  * Indicates that the field is displaying read-only content
206
206
  */
207
- isReadOnly: PropTypes__default['default'].bool,
207
+ isReadOnly: PropTypes__default["default"].bool,
208
208
  // react-select base props
209
209
  //
210
210
  // Currently unsupported props are commented out. In case you need one of
@@ -217,141 +217,141 @@ AsyncSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
217
217
  /**
218
218
  * Aria label (for assistive tech)
219
219
  */
220
- 'aria-label': PropTypes__default['default'].string,
220
+ 'aria-label': PropTypes__default["default"].string,
221
221
 
222
222
  /**
223
223
  * HTML ID of an element that should be used as the label (for assistive tech)
224
224
  */
225
- 'aria-labelledby': PropTypes__default['default'].string,
225
+ 'aria-labelledby': PropTypes__default["default"].string,
226
226
  // renamed autoFocus of react-select
227
227
 
228
228
  /**
229
229
  * Focus the control when it is mounted
230
230
  */
231
- isAutofocussed: PropTypes__default['default'].bool,
231
+ isAutofocussed: PropTypes__default["default"].bool,
232
232
 
233
233
  /**
234
234
  * Remove the currently focused option when the user presses backspace
235
235
  */
236
- backspaceRemovesValue: PropTypes__default['default'].bool,
236
+ backspaceRemovesValue: PropTypes__default["default"].bool,
237
237
 
238
238
  /**
239
239
  * Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
240
240
  */
241
- components: PropTypes__default['default'].objectOf(PropTypes__default['default'].func),
241
+ components: PropTypes__default["default"].objectOf(PropTypes__default["default"].func),
242
242
 
243
243
  /**
244
244
  * Custom method to filter whether an option should be displayed in the menu
245
245
  */
246
- filterOption: PropTypes__default['default'].func,
246
+ filterOption: PropTypes__default["default"].func,
247
247
  // This forwarded as react-select's "inputId"
248
248
 
249
249
  /**
250
250
  * The id of the search input
251
251
  */
252
- id: PropTypes__default['default'].string,
253
- inputValue: PropTypes__default['default'].string,
252
+ id: PropTypes__default["default"].string,
253
+ inputValue: PropTypes__default["default"].string,
254
254
  // This is forwarded as react-select's "id"
255
255
 
256
256
  /**
257
257
  * The id to set on the SelectContainer component
258
258
  */
259
- containerId: PropTypes__default['default'].string,
259
+ containerId: PropTypes__default["default"].string,
260
260
 
261
261
  /**
262
262
  * Is the select value clearable
263
263
  */
264
- isClearable: PropTypes__default['default'].bool,
264
+ isClearable: PropTypes__default["default"].bool,
265
265
 
266
266
  /**
267
267
  * Is the select disabled
268
268
  */
269
- isDisabled: PropTypes__default['default'].bool,
269
+ isDisabled: PropTypes__default["default"].bool,
270
270
 
271
271
  /**
272
272
  * Override the built-in logic to detect whether an option is disabled
273
273
  */
274
- isOptionDisabled: PropTypes__default['default'].func,
274
+ isOptionDisabled: PropTypes__default["default"].func,
275
275
 
276
276
  /**
277
277
  * Support multiple selected options
278
278
  */
279
- isMulti: PropTypes__default['default'].bool,
279
+ isMulti: PropTypes__default["default"].bool,
280
280
 
281
281
  /**
282
282
  * Whether to enable search functionality
283
283
  */
284
- isSearchable: PropTypes__default['default'].bool,
284
+ isSearchable: PropTypes__default["default"].bool,
285
285
 
286
286
  /**
287
287
  * Maximum height of the menu before scrolling
288
288
  */
289
- maxMenuHeight: PropTypes__default['default'].number,
289
+ maxMenuHeight: PropTypes__default["default"].number,
290
290
 
291
291
  /**
292
292
  * Dom element to portal the select menu to
293
293
  */
294
- menuPortalTarget: PropTypes__default['default'].instanceOf(utils.SafeHTMLElement),
294
+ menuPortalTarget: PropTypes__default["default"].instanceOf(utils.SafeHTMLElement),
295
295
 
296
296
  /**
297
297
  * z-index value for the menu portal
298
298
  */
299
- menuPortalZIndex: PropTypes__default['default'].number.isRequired,
299
+ menuPortalZIndex: PropTypes__default["default"].number.isRequired,
300
300
 
301
301
  /**
302
302
  * whether the menu should block scroll while open
303
303
  */
304
- menuShouldBlockScroll: PropTypes__default['default'].bool,
304
+ menuShouldBlockScroll: PropTypes__default["default"].bool,
305
305
 
306
306
  /**
307
307
  * Name of the HTML Input (optional - without this, no input will be rendered)
308
308
  */
309
- name: PropTypes__default['default'].string,
309
+ name: PropTypes__default["default"].string,
310
310
 
311
311
  /**
312
312
  * 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.
313
313
  */
314
- noOptionsMessage: PropTypes__default['default'].func,
314
+ noOptionsMessage: PropTypes__default["default"].func,
315
315
 
316
316
  /**
317
317
  * Handle blur events on the control
318
318
  */
319
- onBlur: PropTypes__default['default'].func,
319
+ onBlur: PropTypes__default["default"].func,
320
320
 
321
321
  /**
322
322
  * 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`.
323
323
  */
324
- onChange: PropTypes__default['default'].func.isRequired,
324
+ onChange: PropTypes__default["default"].func.isRequired,
325
325
 
326
326
  /**
327
327
  * Handle focus events on the control
328
328
  */
329
- onFocus: PropTypes__default['default'].func,
329
+ onFocus: PropTypes__default["default"].func,
330
330
 
331
331
  /**
332
332
  * Handle change events on the input
333
333
  */
334
- onInputChange: PropTypes__default['default'].func,
334
+ onInputChange: PropTypes__default["default"].func,
335
335
 
336
336
  /**
337
337
  * Placeholder text for the select value
338
338
  */
339
- placeholder: PropTypes__default['default'].string,
339
+ placeholder: PropTypes__default["default"].string,
340
340
 
341
341
  /**
342
342
  * loading message shown while the options are being loaded
343
343
  */
344
- loadingMessage: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].func]),
344
+ loadingMessage: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].func]),
345
345
 
346
346
  /**
347
347
  * Sets the tabIndex attribute on the input
348
348
  */
349
- tabIndex: PropTypes__default['default'].string,
349
+ tabIndex: PropTypes__default["default"].string,
350
350
 
351
351
  /**
352
352
  * Select the currently focused option when the user presses tab
353
353
  */
354
- tabSelectsValue: PropTypes__default['default'].bool,
354
+ tabSelectsValue: PropTypes__default["default"].bool,
355
355
 
356
356
  /**
357
357
  * The value of the select; reflected by the selected option
@@ -363,48 +363,48 @@ AsyncSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
363
363
  rest[_key - 1] = arguments[_key];
364
364
  }
365
365
 
366
- return props.isMulti ? PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
367
- value: PropTypes__default['default'].string.isRequired
368
- })).apply(void 0, _concatInstanceProperty__default['default'](_context = [props]).call(_context, rest)) : PropTypes__default['default'].shape({
369
- value: PropTypes__default['default'].string.isRequired
370
- }).apply(void 0, _concatInstanceProperty__default['default'](_context2 = [props]).call(_context2, rest));
366
+ return props.isMulti ? PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
367
+ value: PropTypes__default["default"].string.isRequired
368
+ })).apply(void 0, _concatInstanceProperty__default["default"](_context = [props]).call(_context, rest)) : PropTypes__default["default"].shape({
369
+ value: PropTypes__default["default"].string.isRequired
370
+ }).apply(void 0, _concatInstanceProperty__default["default"](_context2 = [props]).call(_context2, rest));
371
371
  },
372
372
  // Async props
373
373
 
374
374
  /**
375
375
  * The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
376
376
  */
377
- defaultOptions: PropTypes__default['default'].oneOfType([PropTypes__default['default'].bool, PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
378
- value: PropTypes__default['default'].string.isRequired
377
+ defaultOptions: PropTypes__default["default"].oneOfType([PropTypes__default["default"].bool, PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
378
+ value: PropTypes__default["default"].string.isRequired
379
379
  }))]),
380
380
 
381
381
  /**
382
382
  * Function that returns a promise, which is the set of options to be used once the promise resolves.
383
383
  */
384
- loadOptions: PropTypes__default['default'].func.isRequired,
384
+ loadOptions: PropTypes__default["default"].func.isRequired,
385
385
 
386
386
  /**
387
387
  * If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
388
388
  */
389
- cacheOptions: PropTypes__default['default'].any,
389
+ cacheOptions: PropTypes__default["default"].any,
390
390
 
391
391
  /**
392
392
  * Determines if option groups will be separated by a divider
393
393
  */
394
- showOptionGroupDivider: PropTypes__default['default'].bool,
394
+ showOptionGroupDivider: PropTypes__default["default"].bool,
395
395
 
396
396
  /**
397
397
  * Icon to display on the left of the placeholder text and selected value. Has no effect when `isMulti` is enabled.
398
398
  */
399
- iconLeft: PropTypes__default['default'].node
399
+ iconLeft: PropTypes__default["default"].node
400
400
  } : {};
401
401
  utils.addStaticFields(AsyncSelectInput, _objectSpread(_objectSpread(_objectSpread({}, reactSelect.components), customizedComponents), {}, {
402
402
  isTouched: AsyncSelectInput.isTouched
403
403
  }));
404
404
  var AsyncSelectInput$1 = AsyncSelectInput;
405
405
 
406
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
407
- var version = '12.2.3';
406
+ // NOTE: This string will be replaced on build time with the package version.
407
+ var version = "12.2.7";
408
408
 
409
- exports['default'] = AsyncSelectInput$1;
409
+ exports["default"] = AsyncSelectInput$1;
410
410
  exports.version = version;
@@ -37,12 +37,12 @@ var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
37
37
  var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
38
38
  var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
39
39
 
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; }
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; }
41
41
 
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; }
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; }
43
43
 
44
44
  var LoadingIndicator = function LoadingIndicator() {
45
- return jsxRuntime.jsx(LoadingSpinner__default['default'], {
45
+ return jsxRuntime.jsx(LoadingSpinner__default["default"], {
46
46
  scale: "s"
47
47
  });
48
48
  };
@@ -68,10 +68,10 @@ var AsyncSelectInput = function AsyncSelectInput(props) {
68
68
  return props.loadingMessage || intl.formatMessage(selectUtils.messages.loadingOptions);
69
69
  };
70
70
 
71
- return jsxRuntime.jsx(Constraints__default['default'].Horizontal, {
71
+ return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
72
72
  max: props.horizontalConstraint,
73
73
  children: jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, utils.filterDataAttributes(props)), {}, {
74
- children: jsxRuntime.jsx(AsyncSelect__default['default'], {
74
+ children: jsxRuntime.jsx(AsyncSelect__default["default"], {
75
75
  "aria-label": props['aria-label'],
76
76
  "aria-labelledby": props['aria-labelledby'],
77
77
  autoFocus: props.isAutofocussed,
@@ -189,8 +189,8 @@ utils.addStaticFields(AsyncSelectInput, _objectSpread(_objectSpread(_objectSprea
189
189
  }));
190
190
  var AsyncSelectInput$1 = AsyncSelectInput;
191
191
 
192
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
193
- var version = '12.2.3';
192
+ // NOTE: This string will be replaced on build time with the package version.
193
+ var version = "12.2.7";
194
194
 
195
- exports['default'] = AsyncSelectInput$1;
195
+ exports["default"] = AsyncSelectInput$1;
196
196
  exports.version = version;
@@ -383,7 +383,7 @@ addStaticFields(AsyncSelectInput, _objectSpread(_objectSpread(_objectSpread({},
383
383
  }));
384
384
  var AsyncSelectInput$1 = AsyncSelectInput;
385
385
 
386
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
387
- var version = '12.2.3';
386
+ // NOTE: This string will be replaced on build time with the package version.
387
+ var version = "12.2.7";
388
388
 
389
389
  export { AsyncSelectInput$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/async-select-input",
3
3
  "description": "An input component getting a selection from an asynchronously loaded list from the user.",
4
- "version": "12.2.3",
4
+ "version": "12.2.7",
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,20 +18,17 @@
19
18
  "main": "dist/commercetools-uikit-async-select-input.cjs.js",
20
19
  "module": "dist/commercetools-uikit-async-select-input.esm.js",
21
20
  "files": ["dist"],
22
- "scripts": {
23
- "prepare": "../../../../scripts/version.js replace"
24
- },
25
21
  "dependencies": {
26
- "@babel/runtime": "7.14.8",
27
- "@babel/runtime-corejs3": "7.14.9",
28
- "@commercetools-uikit/constraints": "12.2.3",
29
- "@commercetools-uikit/design-system": "12.2.3",
30
- "@commercetools-uikit/icons": "12.2.3",
31
- "@commercetools-uikit/loading-spinner": "12.2.3",
32
- "@commercetools-uikit/select-utils": "12.2.3",
33
- "@commercetools-uikit/spacings": "12.2.3",
34
- "@commercetools-uikit/text": "12.2.3",
35
- "@commercetools-uikit/utils": "12.2.0",
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.7",
27
+ "@commercetools-uikit/loading-spinner": "12.2.5",
28
+ "@commercetools-uikit/select-utils": "12.2.7",
29
+ "@commercetools-uikit/spacings": "12.2.5",
30
+ "@commercetools-uikit/text": "12.2.5",
31
+ "@commercetools-uikit/utils": "12.2.5",
36
32
  "@emotion/react": "^11.4.0",
37
33
  "@emotion/styled": "^11.3.0",
38
34
  "lodash": "4.17.21",
@@ -42,7 +38,7 @@
42
38
  "devDependencies": {
43
39
  "react": "17.0.2",
44
40
  "react-dom": "17.0.2",
45
- "react-intl": "5.20.7"
41
+ "react-intl": "5.21.2"
46
42
  },
47
43
  "peerDependencies": {
48
44
  "react": "17.x",