@commercetools-uikit/search-select-field 19.20.0 → 19.21.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.
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
6
7
|
var _pt = require('prop-types');
|
|
7
8
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
8
9
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
@@ -47,6 +48,7 @@ var SearchSelectInput__default = /*#__PURE__*/_interopDefault(SearchSelectInput)
|
|
|
47
48
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
48
49
|
var FieldWarnings__default = /*#__PURE__*/_interopDefault(FieldWarnings);
|
|
49
50
|
|
|
51
|
+
const _excluded = ["controlShouldRenderValue"];
|
|
50
52
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
51
53
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
52
54
|
const hasErrors = errors => {
|
|
@@ -58,10 +60,10 @@ const hasWarnings = warnings => {
|
|
|
58
60
|
return warnings && _someInstanceProperty__default["default"](_context2 = _Object$values__default["default"](warnings)).call(_context2, Boolean);
|
|
59
61
|
};
|
|
60
62
|
const sequentialId = utils.createSequentialId('search-select-field-');
|
|
61
|
-
const
|
|
62
|
-
controlShouldRenderValue
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
const SearchSelectField = _ref => {
|
|
64
|
+
let _ref$controlShouldRen = _ref.controlShouldRenderValue,
|
|
65
|
+
controlShouldRenderValue = _ref$controlShouldRen === void 0 ? true : _ref$controlShouldRen,
|
|
66
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
65
67
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
66
68
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
67
69
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
@@ -90,7 +92,9 @@ const SearchSelectField = props => {
|
|
|
90
92
|
badge: props.badge,
|
|
91
93
|
hasRequiredIndicator: props.isRequired,
|
|
92
94
|
htmlFor: id
|
|
93
|
-
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(
|
|
95
|
+
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(_objectSpread({
|
|
96
|
+
controlShouldRenderValue
|
|
97
|
+
}, props))), {}, {
|
|
94
98
|
horizontalConstraint: "scale",
|
|
95
99
|
hasError: hasError,
|
|
96
100
|
"aria-label": props['aria-label'],
|
|
@@ -131,7 +135,7 @@ const SearchSelectField = props => {
|
|
|
131
135
|
cacheOptions: props.cacheOptions,
|
|
132
136
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
133
137
|
optionType: props.optionType,
|
|
134
|
-
controlShouldRenderValue:
|
|
138
|
+
controlShouldRenderValue: controlShouldRenderValue,
|
|
135
139
|
iconLeft: props.iconLeft
|
|
136
140
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
137
141
|
id: errorsContainerId,
|
|
@@ -174,7 +178,6 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
174
178
|
description: _pt__default["default"].node,
|
|
175
179
|
onInfoButtonClick: _pt__default["default"].func
|
|
176
180
|
} : {};
|
|
177
|
-
SearchSelectField.defaultProps = defaultProps;
|
|
178
181
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
179
182
|
/**
|
|
180
183
|
* Use this function to convert the Formik `errors` object type to
|
|
@@ -187,7 +190,7 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
187
190
|
var SearchSelectField$1 = SearchSelectField;
|
|
188
191
|
|
|
189
192
|
// NOTE: This string will be replaced on build time with the package version.
|
|
190
|
-
var version = "19.
|
|
193
|
+
var version = "19.21.0";
|
|
191
194
|
|
|
192
195
|
exports["default"] = SearchSelectField$1;
|
|
193
196
|
exports.version = version;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
6
7
|
require('prop-types');
|
|
7
8
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
8
9
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
@@ -45,6 +46,7 @@ var SearchSelectInput__default = /*#__PURE__*/_interopDefault(SearchSelectInput)
|
|
|
45
46
|
var FieldErrors__default = /*#__PURE__*/_interopDefault(FieldErrors);
|
|
46
47
|
var FieldWarnings__default = /*#__PURE__*/_interopDefault(FieldWarnings);
|
|
47
48
|
|
|
49
|
+
const _excluded = ["controlShouldRenderValue"];
|
|
48
50
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
49
51
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
50
52
|
const hasErrors = errors => {
|
|
@@ -56,10 +58,10 @@ const hasWarnings = warnings => {
|
|
|
56
58
|
return warnings && _someInstanceProperty__default["default"](_context2 = _Object$values__default["default"](warnings)).call(_context2, Boolean);
|
|
57
59
|
};
|
|
58
60
|
const sequentialId = utils.createSequentialId('search-select-field-');
|
|
59
|
-
const
|
|
60
|
-
controlShouldRenderValue
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const SearchSelectField = _ref => {
|
|
62
|
+
let _ref$controlShouldRen = _ref.controlShouldRenderValue,
|
|
63
|
+
controlShouldRenderValue = _ref$controlShouldRen === void 0 ? true : _ref$controlShouldRen,
|
|
64
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
63
65
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
64
66
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
65
67
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
@@ -81,7 +83,9 @@ const SearchSelectField = props => {
|
|
|
81
83
|
badge: props.badge,
|
|
82
84
|
hasRequiredIndicator: props.isRequired,
|
|
83
85
|
htmlFor: id
|
|
84
|
-
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(
|
|
86
|
+
}), jsxRuntime.jsx(SearchSelectInput__default["default"], _objectSpread(_objectSpread({}, utils.filterDataAttributes(_objectSpread({
|
|
87
|
+
controlShouldRenderValue
|
|
88
|
+
}, props))), {}, {
|
|
85
89
|
horizontalConstraint: "scale",
|
|
86
90
|
hasError: hasError,
|
|
87
91
|
"aria-label": props['aria-label'],
|
|
@@ -122,7 +126,7 @@ const SearchSelectField = props => {
|
|
|
122
126
|
cacheOptions: props.cacheOptions,
|
|
123
127
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
124
128
|
optionType: props.optionType,
|
|
125
|
-
controlShouldRenderValue:
|
|
129
|
+
controlShouldRenderValue: controlShouldRenderValue,
|
|
126
130
|
iconLeft: props.iconLeft
|
|
127
131
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
128
132
|
id: errorsContainerId,
|
|
@@ -139,7 +143,6 @@ const SearchSelectField = props => {
|
|
|
139
143
|
});
|
|
140
144
|
};
|
|
141
145
|
SearchSelectField.propTypes = {};
|
|
142
|
-
SearchSelectField.defaultProps = defaultProps;
|
|
143
146
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
144
147
|
/**
|
|
145
148
|
* Use this function to convert the Formik `errors` object type to
|
|
@@ -152,7 +155,7 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
152
155
|
var SearchSelectField$1 = SearchSelectField;
|
|
153
156
|
|
|
154
157
|
// NOTE: This string will be replaced on build time with the package version.
|
|
155
|
-
var version = "19.
|
|
158
|
+
var version = "19.21.0";
|
|
156
159
|
|
|
157
160
|
exports["default"] = SearchSelectField$1;
|
|
158
161
|
exports.version = version;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
2
3
|
import _pt from 'prop-types';
|
|
3
4
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
4
5
|
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
@@ -22,6 +23,7 @@ import FieldErrors from '@commercetools-uikit/field-errors';
|
|
|
22
23
|
import FieldWarnings from '@commercetools-uikit/field-warnings';
|
|
23
24
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
24
25
|
|
|
26
|
+
const _excluded = ["controlShouldRenderValue"];
|
|
25
27
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
28
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
29
|
const hasErrors = errors => {
|
|
@@ -33,10 +35,10 @@ const hasWarnings = warnings => {
|
|
|
33
35
|
return warnings && _someInstanceProperty(_context2 = _Object$values(warnings)).call(_context2, Boolean);
|
|
34
36
|
};
|
|
35
37
|
const sequentialId = createSequentialId('search-select-field-');
|
|
36
|
-
const
|
|
37
|
-
controlShouldRenderValue
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const SearchSelectField = _ref => {
|
|
39
|
+
let _ref$controlShouldRen = _ref.controlShouldRenderValue,
|
|
40
|
+
controlShouldRenderValue = _ref$controlShouldRen === void 0 ? true : _ref$controlShouldRen,
|
|
41
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
42
|
const hasError = Boolean(props.touched) && hasErrors(props.errors);
|
|
41
43
|
const hasWarning = props.hasWarning || Boolean(props.touched) && hasWarnings(props.warnings);
|
|
42
44
|
const id = useFieldId(props.id, sequentialId);
|
|
@@ -65,7 +67,9 @@ const SearchSelectField = props => {
|
|
|
65
67
|
badge: props.badge,
|
|
66
68
|
hasRequiredIndicator: props.isRequired,
|
|
67
69
|
htmlFor: id
|
|
68
|
-
}), jsx(SearchSelectInput, _objectSpread(_objectSpread({}, filterDataAttributes(
|
|
70
|
+
}), jsx(SearchSelectInput, _objectSpread(_objectSpread({}, filterDataAttributes(_objectSpread({
|
|
71
|
+
controlShouldRenderValue
|
|
72
|
+
}, props))), {}, {
|
|
69
73
|
horizontalConstraint: "scale",
|
|
70
74
|
hasError: hasError,
|
|
71
75
|
"aria-label": props['aria-label'],
|
|
@@ -106,7 +110,7 @@ const SearchSelectField = props => {
|
|
|
106
110
|
cacheOptions: props.cacheOptions,
|
|
107
111
|
showOptionGroupDivider: props.showOptionGroupDivider,
|
|
108
112
|
optionType: props.optionType,
|
|
109
|
-
controlShouldRenderValue:
|
|
113
|
+
controlShouldRenderValue: controlShouldRenderValue,
|
|
110
114
|
iconLeft: props.iconLeft
|
|
111
115
|
})), jsx(FieldErrors, {
|
|
112
116
|
id: errorsContainerId,
|
|
@@ -149,7 +153,6 @@ SearchSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
149
153
|
description: _pt.node,
|
|
150
154
|
onInfoButtonClick: _pt.func
|
|
151
155
|
} : {};
|
|
152
|
-
SearchSelectField.defaultProps = defaultProps;
|
|
153
156
|
SearchSelectField.displayName = 'SearchSelectField';
|
|
154
157
|
/**
|
|
155
158
|
* Use this function to convert the Formik `errors` object type to
|
|
@@ -162,6 +165,6 @@ SearchSelectField.toFieldErrors = function toFieldErrors(errors) {
|
|
|
162
165
|
var SearchSelectField$1 = SearchSelectField;
|
|
163
166
|
|
|
164
167
|
// NOTE: This string will be replaced on build time with the package version.
|
|
165
|
-
var version = "19.
|
|
168
|
+
var version = "19.21.0";
|
|
166
169
|
|
|
167
170
|
export { SearchSelectField$1 as default, version };
|
|
@@ -280,8 +280,7 @@ export type TSearchSelectFieldProps = {
|
|
|
280
280
|
iconLeft?: ReactNode;
|
|
281
281
|
};
|
|
282
282
|
declare const SearchSelectField: {
|
|
283
|
-
(props: TSearchSelectFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
284
|
-
defaultProps: Pick<TSearchSelectFieldProps, "controlShouldRenderValue">;
|
|
283
|
+
({ controlShouldRenderValue, ...props }: TSearchSelectFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
285
284
|
displayName: string;
|
|
286
285
|
toFieldErrors<FormValues>(errors: unknown): TCustomFormErrors<FormValues>;
|
|
287
286
|
};
|
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.21.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.21.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.21.0",
|
|
26
|
+
"@commercetools-uikit/field-errors": "19.21.0",
|
|
27
|
+
"@commercetools-uikit/field-label": "19.21.0",
|
|
28
|
+
"@commercetools-uikit/field-warnings": "19.21.0",
|
|
29
|
+
"@commercetools-uikit/hooks": "19.21.0",
|
|
30
|
+
"@commercetools-uikit/search-select-input": "19.21.0",
|
|
31
|
+
"@commercetools-uikit/spacings": "19.21.0",
|
|
32
|
+
"@commercetools-uikit/utils": "19.21.0",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|
|
35
35
|
"prop-types": "15.8.1",
|