@commercetools-uikit/search-select-field 19.12.1 → 19.14.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 @@ const hasWarnings = warnings => {
|
|
|
58
58
|
return warnings && _someInstanceProperty__default["default"](_context2 = _Object$values__default["default"](warnings)).call(_context2, Boolean);
|
|
59
59
|
};
|
|
60
60
|
const sequentialId = utils.createSequentialId('search-select-field-');
|
|
61
|
-
const sequentialErrorsId = utils.createSequentialId('search-select-field-error-')();
|
|
62
|
-
const sequentialWarningsId = utils.createSequentialId('search-select-field-warning-')();
|
|
63
61
|
const defaultProps = {
|
|
64
62
|
controlShouldRenderValue: true
|
|
65
63
|
};
|
|
@@ -67,6 +65,8 @@ const SearchSelectField = props => {
|
|
|
67
65
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
68
66
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
69
67
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
68
|
+
const errorsContainerId = `${id}-errors`;
|
|
69
|
+
const warningsContainerId = `${id}-warnings`;
|
|
70
70
|
if (!props.isReadOnly) {
|
|
71
71
|
process.env.NODE_ENV !== "production" ? utils.warning(typeof props.onChange === 'function', 'SearchSelectField: `onChange` is required when field is not read only.') : void 0;
|
|
72
72
|
}
|
|
@@ -96,7 +96,7 @@ const SearchSelectField = props => {
|
|
|
96
96
|
"aria-label": props['aria-label'],
|
|
97
97
|
"aria-labelledby": props['aria-labelledby'],
|
|
98
98
|
"aria-invalid": hasError,
|
|
99
|
-
"aria-errormessage":
|
|
99
|
+
"aria-errormessage": errorsContainerId,
|
|
100
100
|
isAutofocussed: props.isAutofocussed,
|
|
101
101
|
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
102
102
|
components: props.components,
|
|
@@ -134,12 +134,12 @@ const SearchSelectField = props => {
|
|
|
134
134
|
controlShouldRenderValue: props.controlShouldRenderValue,
|
|
135
135
|
iconLeft: props.iconLeft
|
|
136
136
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
137
|
-
id:
|
|
137
|
+
id: errorsContainerId,
|
|
138
138
|
errors: props.errors,
|
|
139
139
|
isVisible: hasError,
|
|
140
140
|
renderError: props.renderError
|
|
141
141
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
142
|
-
id:
|
|
142
|
+
id: warningsContainerId,
|
|
143
143
|
warnings: props.warnings,
|
|
144
144
|
isVisible: hasWarning,
|
|
145
145
|
renderWarning: props.renderWarning
|
|
@@ -187,7 +187,7 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
187
187
|
var SearchSelectField$1 = SearchSelectField;
|
|
188
188
|
|
|
189
189
|
// NOTE: This string will be replaced on build time with the package version.
|
|
190
|
-
var version = "19.
|
|
190
|
+
var version = "19.14.0";
|
|
191
191
|
|
|
192
192
|
exports["default"] = SearchSelectField$1;
|
|
193
193
|
exports.version = version;
|
|
@@ -56,8 +56,6 @@ const hasWarnings = warnings => {
|
|
|
56
56
|
return warnings && _someInstanceProperty__default["default"](_context2 = _Object$values__default["default"](warnings)).call(_context2, Boolean);
|
|
57
57
|
};
|
|
58
58
|
const sequentialId = utils.createSequentialId('search-select-field-');
|
|
59
|
-
const sequentialErrorsId = utils.createSequentialId('search-select-field-error-')();
|
|
60
|
-
const sequentialWarningsId = utils.createSequentialId('search-select-field-warning-')();
|
|
61
59
|
const defaultProps = {
|
|
62
60
|
controlShouldRenderValue: true
|
|
63
61
|
};
|
|
@@ -65,6 +63,8 @@ const SearchSelectField = props => {
|
|
|
65
63
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
66
64
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
67
65
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
66
|
+
const errorsContainerId = `${id}-errors`;
|
|
67
|
+
const warningsContainerId = `${id}-warnings`;
|
|
68
68
|
if (!props.isReadOnly) ;
|
|
69
69
|
if (props.hintIcon) ;
|
|
70
70
|
if (props.isMulti) ;
|
|
@@ -87,7 +87,7 @@ const SearchSelectField = props => {
|
|
|
87
87
|
"aria-label": props['aria-label'],
|
|
88
88
|
"aria-labelledby": props['aria-labelledby'],
|
|
89
89
|
"aria-invalid": hasError,
|
|
90
|
-
"aria-errormessage":
|
|
90
|
+
"aria-errormessage": errorsContainerId,
|
|
91
91
|
isAutofocussed: props.isAutofocussed,
|
|
92
92
|
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
93
93
|
components: props.components,
|
|
@@ -125,12 +125,12 @@ const SearchSelectField = props => {
|
|
|
125
125
|
controlShouldRenderValue: props.controlShouldRenderValue,
|
|
126
126
|
iconLeft: props.iconLeft
|
|
127
127
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
128
|
-
id:
|
|
128
|
+
id: errorsContainerId,
|
|
129
129
|
errors: props.errors,
|
|
130
130
|
isVisible: hasError,
|
|
131
131
|
renderError: props.renderError
|
|
132
132
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
133
|
-
id:
|
|
133
|
+
id: warningsContainerId,
|
|
134
134
|
warnings: props.warnings,
|
|
135
135
|
isVisible: hasWarning,
|
|
136
136
|
renderWarning: props.renderWarning
|
|
@@ -152,7 +152,7 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
152
152
|
var SearchSelectField$1 = SearchSelectField;
|
|
153
153
|
|
|
154
154
|
// NOTE: This string will be replaced on build time with the package version.
|
|
155
|
-
var version = "19.
|
|
155
|
+
var version = "19.14.0";
|
|
156
156
|
|
|
157
157
|
exports["default"] = SearchSelectField$1;
|
|
158
158
|
exports.version = version;
|
|
@@ -33,8 +33,6 @@ const hasWarnings = warnings => {
|
|
|
33
33
|
return warnings && _someInstanceProperty(_context2 = _Object$values(warnings)).call(_context2, Boolean);
|
|
34
34
|
};
|
|
35
35
|
const sequentialId = createSequentialId('search-select-field-');
|
|
36
|
-
const sequentialErrorsId = createSequentialId('search-select-field-error-')();
|
|
37
|
-
const sequentialWarningsId = createSequentialId('search-select-field-warning-')();
|
|
38
36
|
const defaultProps = {
|
|
39
37
|
controlShouldRenderValue: true
|
|
40
38
|
};
|
|
@@ -42,6 +40,8 @@ const SearchSelectField = props => {
|
|
|
42
40
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
43
41
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
44
42
|
const id = useFieldId(props.id, sequentialId);
|
|
43
|
+
const errorsContainerId = `${id}-errors`;
|
|
44
|
+
const warningsContainerId = `${id}-warnings`;
|
|
45
45
|
if (!props.isReadOnly) {
|
|
46
46
|
process.env.NODE_ENV !== "production" ? warning(typeof props.onChange === 'function', 'SearchSelectField: `onChange` is required when field is not read only.') : void 0;
|
|
47
47
|
}
|
|
@@ -71,7 +71,7 @@ const SearchSelectField = props => {
|
|
|
71
71
|
"aria-label": props['aria-label'],
|
|
72
72
|
"aria-labelledby": props['aria-labelledby'],
|
|
73
73
|
"aria-invalid": hasError,
|
|
74
|
-
"aria-errormessage":
|
|
74
|
+
"aria-errormessage": errorsContainerId,
|
|
75
75
|
isAutofocussed: props.isAutofocussed,
|
|
76
76
|
backspaceRemovesValue: props.backspaceRemovesValue,
|
|
77
77
|
components: props.components,
|
|
@@ -109,12 +109,12 @@ const SearchSelectField = props => {
|
|
|
109
109
|
controlShouldRenderValue: props.controlShouldRenderValue,
|
|
110
110
|
iconLeft: props.iconLeft
|
|
111
111
|
})), jsx(FieldErrors, {
|
|
112
|
-
id:
|
|
112
|
+
id: errorsContainerId,
|
|
113
113
|
errors: props.errors,
|
|
114
114
|
isVisible: hasError,
|
|
115
115
|
renderError: props.renderError
|
|
116
116
|
}), jsx(FieldWarnings, {
|
|
117
|
-
id:
|
|
117
|
+
id: warningsContainerId,
|
|
118
118
|
warnings: props.warnings,
|
|
119
119
|
isVisible: hasWarning,
|
|
120
120
|
renderWarning: props.renderWarning
|
|
@@ -162,6 +162,6 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
162
162
|
var SearchSelectField$1 = SearchSelectField;
|
|
163
163
|
|
|
164
164
|
// NOTE: This string will be replaced on build time with the package version.
|
|
165
|
-
var version = "19.
|
|
165
|
+
var version = "19.14.0";
|
|
166
166
|
|
|
167
167
|
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": "19.
|
|
4
|
+
"version": "19.14.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,15 +21,15 @@
|
|
|
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/field-errors": "19.
|
|
27
|
-
"@commercetools-uikit/field-label": "19.
|
|
28
|
-
"@commercetools-uikit/field-warnings": "19.
|
|
29
|
-
"@commercetools-uikit/hooks": "19.
|
|
30
|
-
"@commercetools-uikit/search-select-input": "19.
|
|
31
|
-
"@commercetools-uikit/spacings": "19.
|
|
32
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.14.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.14.0",
|
|
26
|
+
"@commercetools-uikit/field-errors": "19.14.0",
|
|
27
|
+
"@commercetools-uikit/field-label": "19.14.0",
|
|
28
|
+
"@commercetools-uikit/field-warnings": "19.14.0",
|
|
29
|
+
"@commercetools-uikit/hooks": "19.14.0",
|
|
30
|
+
"@commercetools-uikit/search-select-input": "19.14.0",
|
|
31
|
+
"@commercetools-uikit/spacings": "19.14.0",
|
|
32
|
+
"@commercetools-uikit/utils": "19.14.0",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|
|
35
35
|
"prop-types": "15.8.1",
|