@commercetools-uikit/async-select-field 19.12.1 → 19.13.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.
@@ -58,8 +58,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
58
58
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
59
59
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
60
60
  const sequentialId = utils.createSequentialId('async-select-field-');
61
- const sequentialErrorsId = utils.createSequentialId('async-select-field-error-')();
62
- const sequentialWarningsId = utils.createSequentialId('async-select-field-warning-')();
63
61
  const hasErrors = errors => {
64
62
  var _context;
65
63
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -99,6 +97,8 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
99
97
  process.env.NODE_ENV !== "production" ? utils.warning(_Array$isArray__default["default"](this.props.value), 'AsyncSelectField: `value` is expected to be an array of string when isMulti is true') : void 0;
100
98
  process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.touched === 'undefined' || _Array$isArray__default["default"](this.props.touched), 'AsyncSelectField: `touched` is expected to be an array of boolean when isMulti is true') : void 0;
101
99
  }
100
+ const errorsContainerId = `${this.state.id}-errors`;
101
+ const warningsContainerId = `${this.state.id}-warnings`;
102
102
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
103
103
  max: this.props.horizontalConstraint,
104
104
  children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
@@ -118,7 +118,7 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
118
118
  "aria-label": this.props['aria-label'],
119
119
  "aria-labelledby": this.props['aria-labelledby'],
120
120
  "aria-invalid": hasError,
121
- "aria-errormessage": sequentialErrorsId,
121
+ "aria-errormessage": errorsContainerId,
122
122
  isAutofocussed: this.props.isAutofocussed,
123
123
  backspaceRemovesValue: this.props.backspaceRemovesValue,
124
124
  components: this.props.components,
@@ -158,12 +158,12 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
158
158
  }, utils.filterDataAttributes(this.props)), {}, {
159
159
  controlShouldRenderValue: this.props.controlShouldRenderValue
160
160
  })), jsxRuntime.jsx(FieldErrors__default["default"], {
161
- id: sequentialErrorsId,
161
+ id: errorsContainerId,
162
162
  errors: this.props.errors,
163
163
  isVisible: hasError,
164
164
  renderError: this.props.renderError
165
165
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
166
- id: sequentialWarningsId,
166
+ id: warningsContainerId,
167
167
  warnings: this.props.warnings,
168
168
  isVisible: hasWarning,
169
169
  renderWarning: this.props.renderWarning
@@ -221,7 +221,7 @@ AsyncSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
221
221
  } : {};
222
222
 
223
223
  // NOTE: This string will be replaced on build time with the package version.
224
- var version = "19.12.1";
224
+ var version = "19.13.0";
225
225
 
226
226
  exports["default"] = AsyncSelectField;
227
227
  exports.version = version;
@@ -56,8 +56,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
56
56
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
57
57
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
58
58
  const sequentialId = utils.createSequentialId('async-select-field-');
59
- const sequentialErrorsId = utils.createSequentialId('async-select-field-error-')();
60
- const sequentialWarningsId = utils.createSequentialId('async-select-field-warning-')();
61
59
  const hasErrors = errors => {
62
60
  var _context;
63
61
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -90,6 +88,8 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
90
88
  if (!this.props.isReadOnly) ;
91
89
  if (this.props.hintIcon) ;
92
90
  if (this.props.isMulti) ;
91
+ const errorsContainerId = `${this.state.id}-errors`;
92
+ const warningsContainerId = `${this.state.id}-warnings`;
93
93
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
94
94
  max: this.props.horizontalConstraint,
95
95
  children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
@@ -109,7 +109,7 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
109
109
  "aria-label": this.props['aria-label'],
110
110
  "aria-labelledby": this.props['aria-labelledby'],
111
111
  "aria-invalid": hasError,
112
- "aria-errormessage": sequentialErrorsId,
112
+ "aria-errormessage": errorsContainerId,
113
113
  isAutofocussed: this.props.isAutofocussed,
114
114
  backspaceRemovesValue: this.props.backspaceRemovesValue,
115
115
  components: this.props.components,
@@ -149,12 +149,12 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
149
149
  }, utils.filterDataAttributes(this.props)), {}, {
150
150
  controlShouldRenderValue: this.props.controlShouldRenderValue
151
151
  })), jsxRuntime.jsx(FieldErrors__default["default"], {
152
- id: sequentialErrorsId,
152
+ id: errorsContainerId,
153
153
  errors: this.props.errors,
154
154
  isVisible: hasError,
155
155
  renderError: this.props.renderError
156
156
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
157
- id: sequentialWarningsId,
157
+ id: warningsContainerId,
158
158
  warnings: this.props.warnings,
159
159
  isVisible: hasWarning,
160
160
  renderWarning: this.props.renderWarning
@@ -186,7 +186,7 @@ AsyncSelectField.getDerivedStateFromProps = (props, state) => ({
186
186
  AsyncSelectField.propTypes = {};
187
187
 
188
188
  // NOTE: This string will be replaced on build time with the package version.
189
- var version = "19.12.1";
189
+ var version = "19.13.0";
190
190
 
191
191
  exports["default"] = AsyncSelectField;
192
192
  exports.version = version;
@@ -32,8 +32,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
32
32
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
33
33
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
34
34
  const sequentialId = createSequentialId('async-select-field-');
35
- const sequentialErrorsId = createSequentialId('async-select-field-error-')();
36
- const sequentialWarningsId = createSequentialId('async-select-field-warning-')();
37
35
  const hasErrors = errors => {
38
36
  var _context;
39
37
  return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
@@ -73,6 +71,8 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
73
71
  process.env.NODE_ENV !== "production" ? warning(_Array$isArray(this.props.value), 'AsyncSelectField: `value` is expected to be an array of string when isMulti is true') : void 0;
74
72
  process.env.NODE_ENV !== "production" ? warning(typeof this.props.touched === 'undefined' || _Array$isArray(this.props.touched), 'AsyncSelectField: `touched` is expected to be an array of boolean when isMulti is true') : void 0;
75
73
  }
74
+ const errorsContainerId = `${this.state.id}-errors`;
75
+ const warningsContainerId = `${this.state.id}-warnings`;
76
76
  return jsx(Constraints.Horizontal, {
77
77
  max: this.props.horizontalConstraint,
78
78
  children: jsxs(Spacings.Stack, {
@@ -92,7 +92,7 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
92
92
  "aria-label": this.props['aria-label'],
93
93
  "aria-labelledby": this.props['aria-labelledby'],
94
94
  "aria-invalid": hasError,
95
- "aria-errormessage": sequentialErrorsId,
95
+ "aria-errormessage": errorsContainerId,
96
96
  isAutofocussed: this.props.isAutofocussed,
97
97
  backspaceRemovesValue: this.props.backspaceRemovesValue,
98
98
  components: this.props.components,
@@ -132,12 +132,12 @@ let AsyncSelectField = /*#__PURE__*/function (_Component) {
132
132
  }, filterDataAttributes(this.props)), {}, {
133
133
  controlShouldRenderValue: this.props.controlShouldRenderValue
134
134
  })), jsx(FieldErrors, {
135
- id: sequentialErrorsId,
135
+ id: errorsContainerId,
136
136
  errors: this.props.errors,
137
137
  isVisible: hasError,
138
138
  renderError: this.props.renderError
139
139
  }), jsx(FieldWarnings, {
140
- id: sequentialWarningsId,
140
+ id: warningsContainerId,
141
141
  warnings: this.props.warnings,
142
142
  isVisible: hasWarning,
143
143
  renderWarning: this.props.renderWarning
@@ -195,6 +195,6 @@ AsyncSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
195
195
  } : {};
196
196
 
197
197
  // NOTE: This string will be replaced on build time with the package version.
198
- var version = "19.12.1";
198
+ var version = "19.13.0";
199
199
 
200
200
  export { AsyncSelectField as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/async-select-field",
3
3
  "description": "A controlled input component with validation states and a label getting a selection from an asynchronously loaded list from the user.",
4
- "version": "19.12.1",
4
+ "version": "19.13.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/async-select-input": "19.12.1",
25
- "@commercetools-uikit/constraints": "19.12.1",
26
- "@commercetools-uikit/design-system": "19.12.1",
27
- "@commercetools-uikit/field-errors": "19.12.1",
28
- "@commercetools-uikit/field-label": "19.12.1",
29
- "@commercetools-uikit/field-warnings": "19.12.1",
30
- "@commercetools-uikit/spacings": "19.12.1",
31
- "@commercetools-uikit/utils": "19.12.1",
24
+ "@commercetools-uikit/async-select-input": "19.13.0",
25
+ "@commercetools-uikit/constraints": "19.13.0",
26
+ "@commercetools-uikit/design-system": "19.13.0",
27
+ "@commercetools-uikit/field-errors": "19.13.0",
28
+ "@commercetools-uikit/field-label": "19.13.0",
29
+ "@commercetools-uikit/field-warnings": "19.13.0",
30
+ "@commercetools-uikit/spacings": "19.13.0",
31
+ "@commercetools-uikit/utils": "19.13.0",
32
32
  "@emotion/react": "^11.10.5",
33
33
  "@emotion/styled": "^11.10.5",
34
34
  "prop-types": "15.8.1",