@commercetools-uikit/async-select-field 13.0.2 → 13.0.4
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.
|
@@ -61,6 +61,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
61
61
|
|
|
62
62
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
63
63
|
var sequentialId = utils.createSequentialId('async-select-field-');
|
|
64
|
+
var sequentialErrorsId = utils.createSequentialId('async-select-field-error-')();
|
|
64
65
|
|
|
65
66
|
var hasErrors = function hasErrors(errors) {
|
|
66
67
|
var _context;
|
|
@@ -99,7 +100,7 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
99
100
|
var hasError = AsyncSelectInput__default["default"].isTouched(this.props.touched) && hasErrors(this.props.errors);
|
|
100
101
|
|
|
101
102
|
if (this.props.hintIcon) {
|
|
102
|
-
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.hint === 'string' || /*#__PURE__*/react.isValidElement(this.props.hint), '
|
|
103
|
+
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.hint === 'string' || /*#__PURE__*/react.isValidElement(this.props.hint), 'AsyncSelectField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
if (this.props.isMulti) {
|
|
@@ -125,6 +126,8 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
125
126
|
hasError: hasError,
|
|
126
127
|
"aria-label": this.props['aria-label'],
|
|
127
128
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
129
|
+
"aria-invalid": hasError,
|
|
130
|
+
"aria-errormessage": sequentialErrorsId,
|
|
128
131
|
isAutofocussed: this.props.isAutofocussed,
|
|
129
132
|
backspaceRemovesValue: this.props.backspaceRemovesValue,
|
|
130
133
|
components: this.props.components,
|
|
@@ -160,6 +163,7 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
160
163
|
showOptionGroupDivider: this.props.showOptionGroupDivider,
|
|
161
164
|
iconLeft: this.props.iconLeft
|
|
162
165
|
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
166
|
+
id: sequentialErrorsId,
|
|
163
167
|
errors: this.props.errors,
|
|
164
168
|
isVisible: hasError,
|
|
165
169
|
renderError: this.props.renderError
|
|
@@ -208,7 +212,7 @@ AsyncSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
208
212
|
} : {};
|
|
209
213
|
|
|
210
214
|
// NOTE: This string will be replaced on build time with the package version.
|
|
211
|
-
var version = "13.0.
|
|
215
|
+
var version = "13.0.4";
|
|
212
216
|
|
|
213
217
|
exports["default"] = AsyncSelectField;
|
|
214
218
|
exports.version = version;
|
|
@@ -59,6 +59,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
59
59
|
|
|
60
60
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
61
61
|
var sequentialId = utils.createSequentialId('async-select-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('async-select-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -118,6 +119,8 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
118
119
|
hasError: hasError,
|
|
119
120
|
"aria-label": this.props['aria-label'],
|
|
120
121
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
122
|
+
"aria-invalid": hasError,
|
|
123
|
+
"aria-errormessage": sequentialErrorsId,
|
|
121
124
|
isAutofocussed: this.props.isAutofocussed,
|
|
122
125
|
backspaceRemovesValue: this.props.backspaceRemovesValue,
|
|
123
126
|
components: this.props.components,
|
|
@@ -153,6 +156,7 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
153
156
|
showOptionGroupDivider: this.props.showOptionGroupDivider,
|
|
154
157
|
iconLeft: this.props.iconLeft
|
|
155
158
|
}, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
159
|
+
id: sequentialErrorsId,
|
|
156
160
|
errors: this.props.errors,
|
|
157
161
|
isVisible: hasError,
|
|
158
162
|
renderError: this.props.renderError
|
|
@@ -178,7 +182,7 @@ AsyncSelectField.getDerivedStateFromProps = function (props, state) {
|
|
|
178
182
|
AsyncSelectField.propTypes = {};
|
|
179
183
|
|
|
180
184
|
// NOTE: This string will be replaced on build time with the package version.
|
|
181
|
-
var version = "13.0.
|
|
185
|
+
var version = "13.0.4";
|
|
182
186
|
|
|
183
187
|
exports["default"] = AsyncSelectField;
|
|
184
188
|
exports.version = version;
|
|
@@ -35,6 +35,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
35
35
|
|
|
36
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
var sequentialId = createSequentialId('async-select-field-');
|
|
38
|
+
var sequentialErrorsId = createSequentialId('async-select-field-error-')();
|
|
38
39
|
|
|
39
40
|
var hasErrors = function hasErrors(errors) {
|
|
40
41
|
var _context;
|
|
@@ -73,7 +74,7 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
73
74
|
var hasError = AsyncSelectInput.isTouched(this.props.touched) && hasErrors(this.props.errors);
|
|
74
75
|
|
|
75
76
|
if (this.props.hintIcon) {
|
|
76
|
-
process.env.NODE_ENV !== "production" ? warning(typeof this.props.hint === 'string' || /*#__PURE__*/isValidElement(this.props.hint), '
|
|
77
|
+
process.env.NODE_ENV !== "production" ? warning(typeof this.props.hint === 'string' || /*#__PURE__*/isValidElement(this.props.hint), 'AsyncSelectField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
if (this.props.isMulti) {
|
|
@@ -99,6 +100,8 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
99
100
|
hasError: hasError,
|
|
100
101
|
"aria-label": this.props['aria-label'],
|
|
101
102
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
103
|
+
"aria-invalid": hasError,
|
|
104
|
+
"aria-errormessage": sequentialErrorsId,
|
|
102
105
|
isAutofocussed: this.props.isAutofocussed,
|
|
103
106
|
backspaceRemovesValue: this.props.backspaceRemovesValue,
|
|
104
107
|
components: this.props.components,
|
|
@@ -134,6 +137,7 @@ var AsyncSelectField = /*#__PURE__*/function (_Component) {
|
|
|
134
137
|
showOptionGroupDivider: this.props.showOptionGroupDivider,
|
|
135
138
|
iconLeft: this.props.iconLeft
|
|
136
139
|
}, filterDataAttributes(this.props))), jsx(FieldErrors, {
|
|
140
|
+
id: sequentialErrorsId,
|
|
137
141
|
errors: this.props.errors,
|
|
138
142
|
isVisible: hasError,
|
|
139
143
|
renderError: this.props.renderError
|
|
@@ -182,6 +186,6 @@ AsyncSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
182
186
|
} : {};
|
|
183
187
|
|
|
184
188
|
// NOTE: This string will be replaced on build time with the package version.
|
|
185
|
-
var version = "13.0.
|
|
189
|
+
var version = "13.0.4";
|
|
186
190
|
|
|
187
191
|
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": "13.0.
|
|
4
|
+
"version": "13.0.4",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "7.17.2",
|
|
24
|
-
"@commercetools-uikit/async-select-input": "13.0.
|
|
24
|
+
"@commercetools-uikit/async-select-input": "13.0.4",
|
|
25
25
|
"@commercetools-uikit/constraints": "13.0.2",
|
|
26
26
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
27
|
-
"@commercetools-uikit/field-errors": "13.0.
|
|
28
|
-
"@commercetools-uikit/field-label": "13.0.
|
|
27
|
+
"@commercetools-uikit/field-errors": "13.0.4",
|
|
28
|
+
"@commercetools-uikit/field-label": "13.0.4",
|
|
29
29
|
"@commercetools-uikit/spacings": "13.0.2",
|
|
30
30
|
"@commercetools-uikit/utils": "13.0.2",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|
|
33
33
|
"prop-types": "15.8.1",
|
|
34
|
-
"react-
|
|
34
|
+
"react-intl": "^5.24.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "17.0.2"
|