@commercetools-uikit/async-select-input 19.9.0 → 19.10.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.
|
@@ -249,7 +249,7 @@ AsyncSelectInput.ValueContainer = reactSelect.components.ValueContainer;
|
|
|
249
249
|
var AsyncSelectInput$1 = AsyncSelectInput;
|
|
250
250
|
|
|
251
251
|
// NOTE: This string will be replaced on build time with the package version.
|
|
252
|
-
var version = "19.
|
|
252
|
+
var version = "19.10.0";
|
|
253
253
|
|
|
254
254
|
exports["default"] = AsyncSelectInput$1;
|
|
255
255
|
exports.version = version;
|
|
@@ -232,7 +232,7 @@ AsyncSelectInput.ValueContainer = reactSelect.components.ValueContainer;
|
|
|
232
232
|
var AsyncSelectInput$1 = AsyncSelectInput;
|
|
233
233
|
|
|
234
234
|
// NOTE: This string will be replaced on build time with the package version.
|
|
235
|
-
var version = "19.
|
|
235
|
+
var version = "19.10.0";
|
|
236
236
|
|
|
237
237
|
exports["default"] = AsyncSelectInput$1;
|
|
238
238
|
exports.version = version;
|
|
@@ -229,6 +229,6 @@ AsyncSelectInput.ValueContainer = components.ValueContainer;
|
|
|
229
229
|
var AsyncSelectInput$1 = AsyncSelectInput;
|
|
230
230
|
|
|
231
231
|
// NOTE: This string will be replaced on build time with the package version.
|
|
232
|
-
var version = "19.
|
|
232
|
+
var version = "19.10.0";
|
|
233
233
|
|
|
234
234
|
export { AsyncSelectInput$1 as default, version };
|
|
@@ -11,56 +11,256 @@ type TCustomEvent = {
|
|
|
11
11
|
};
|
|
12
12
|
type ReactSelectAsyncProps = AsyncProps<unknown, boolean, GroupBase<unknown>>;
|
|
13
13
|
export type TAsyncSelectInputProps = {
|
|
14
|
+
/**
|
|
15
|
+
* Horizontal size limit of the input fields.
|
|
16
|
+
*/
|
|
14
17
|
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
18
|
+
/**
|
|
19
|
+
* Indicates the input field has an error
|
|
20
|
+
*/
|
|
15
21
|
hasError?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates the input field has a warning
|
|
24
|
+
*/
|
|
16
25
|
hasWarning?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates that the field is displaying read-only content
|
|
28
|
+
*/
|
|
17
29
|
isReadOnly?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Aria label (for assistive tech)
|
|
32
|
+
* <br>
|
|
33
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
34
|
+
*/
|
|
18
35
|
'aria-label'?: ReactSelectAsyncProps['aria-label'];
|
|
36
|
+
/**
|
|
37
|
+
* HTML ID of an element that should be used as the label (for assistive tech)
|
|
38
|
+
* <br>
|
|
39
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
40
|
+
*/
|
|
19
41
|
'aria-labelledby'?: ReactSelectAsyncProps['aria-labelledby'];
|
|
42
|
+
/**
|
|
43
|
+
* Indicate if the value entered in the input is invalid.
|
|
44
|
+
* <br>
|
|
45
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
46
|
+
*/
|
|
20
47
|
'aria-invalid'?: ReactSelectAsyncProps['aria-invalid'];
|
|
48
|
+
/**
|
|
49
|
+
* HTML ID of an element containing an error message related to the input.
|
|
50
|
+
* <br>
|
|
51
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
52
|
+
*/
|
|
21
53
|
'aria-errormessage'?: ReactSelectAsyncProps['aria-errormessage'];
|
|
54
|
+
/**
|
|
55
|
+
* Focus the control when it is mounted
|
|
56
|
+
*/
|
|
22
57
|
isAutofocussed?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Remove the currently focused option when the user presses backspace
|
|
60
|
+
* <br>
|
|
61
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
62
|
+
*/
|
|
23
63
|
backspaceRemovesValue?: ReactSelectAsyncProps['backspaceRemovesValue'];
|
|
64
|
+
/**
|
|
65
|
+
* Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
|
|
66
|
+
* <br>
|
|
67
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
68
|
+
*/
|
|
24
69
|
components?: ReactSelectAsyncProps['components'];
|
|
70
|
+
/**
|
|
71
|
+
* Control whether the selected values should be rendered in the control
|
|
72
|
+
* <br>
|
|
73
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
74
|
+
*/
|
|
25
75
|
controlShouldRenderValue?: ReactSelectAsyncProps['controlShouldRenderValue'];
|
|
76
|
+
/**
|
|
77
|
+
* Custom method to filter whether an option should be displayed in the menu
|
|
78
|
+
* <br>
|
|
79
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
80
|
+
*/
|
|
26
81
|
filterOption?: ReactSelectAsyncProps['filterOption'];
|
|
82
|
+
/**
|
|
83
|
+
* The id of the search input
|
|
84
|
+
* <br>
|
|
85
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
86
|
+
*/
|
|
27
87
|
id?: ReactSelectAsyncProps['inputId'];
|
|
88
|
+
/**
|
|
89
|
+
* The value of the search input
|
|
90
|
+
* <br>
|
|
91
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
92
|
+
*/
|
|
28
93
|
inputValue?: ReactSelectAsyncProps['inputValue'];
|
|
94
|
+
/**
|
|
95
|
+
* The id to set on the SelectContainer component
|
|
96
|
+
* <br>
|
|
97
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
98
|
+
*/
|
|
29
99
|
containerId?: ReactSelectAsyncProps['id'];
|
|
100
|
+
/**
|
|
101
|
+
* Is the select value clearable
|
|
102
|
+
* <br>
|
|
103
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
104
|
+
*/
|
|
30
105
|
isClearable?: ReactSelectAsyncProps['isClearable'];
|
|
106
|
+
/**
|
|
107
|
+
* Use this property to reduce the paddings of the component for a ui compact variant
|
|
108
|
+
*/
|
|
31
109
|
isCondensed?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Is the select disabled
|
|
112
|
+
* <br>
|
|
113
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
114
|
+
*/
|
|
32
115
|
isDisabled?: ReactSelectAsyncProps['isDisabled'];
|
|
116
|
+
/**
|
|
117
|
+
* Override the built-in logic to detect whether an option is disabled
|
|
118
|
+
* <br>
|
|
119
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
120
|
+
*/
|
|
33
121
|
isOptionDisabled?: ReactSelectAsyncProps['isOptionDisabled'];
|
|
122
|
+
/**
|
|
123
|
+
* Support multiple selected options
|
|
124
|
+
* <br>
|
|
125
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
126
|
+
*/
|
|
34
127
|
isMulti?: ReactSelectAsyncProps['isMulti'];
|
|
128
|
+
/**
|
|
129
|
+
* Whether to enable search functionality
|
|
130
|
+
* <br>
|
|
131
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
132
|
+
*/
|
|
35
133
|
isSearchable?: ReactSelectAsyncProps['isSearchable'];
|
|
134
|
+
/**
|
|
135
|
+
* Can be used to enforce the select input to be opened
|
|
136
|
+
* <br>
|
|
137
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
138
|
+
*/
|
|
36
139
|
menuIsOpen?: ReactSelectAsyncProps['menuIsOpen'];
|
|
140
|
+
/**
|
|
141
|
+
* Maximum height of the menu before scrolling
|
|
142
|
+
* <br>
|
|
143
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
144
|
+
*/
|
|
37
145
|
maxMenuHeight?: ReactSelectAsyncProps['maxMenuHeight'];
|
|
146
|
+
/**
|
|
147
|
+
* Dom element to portal the select menu to
|
|
148
|
+
* <br>
|
|
149
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
150
|
+
*/
|
|
38
151
|
menuPortalTarget?: ReactSelectAsyncProps['menuPortalTarget'];
|
|
152
|
+
/**
|
|
153
|
+
* z-index value for the menu portal
|
|
154
|
+
* <br>
|
|
155
|
+
* Use in conjunction with `menuPortalTarget`
|
|
156
|
+
*/
|
|
39
157
|
menuPortalZIndex: number;
|
|
158
|
+
/**
|
|
159
|
+
* whether the menu should block scroll while open
|
|
160
|
+
* <br>
|
|
161
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
162
|
+
*/
|
|
40
163
|
menuShouldBlockScroll?: ReactSelectAsyncProps['menuShouldBlockScroll'];
|
|
164
|
+
/**
|
|
165
|
+
* Whether the menu should close after a value is selected. Defaults to `true`.
|
|
166
|
+
* <br>
|
|
167
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
168
|
+
*/
|
|
41
169
|
closeMenuOnSelect?: ReactSelectAsyncProps['closeMenuOnSelect'];
|
|
170
|
+
/**
|
|
171
|
+
* Name of the HTML Input (optional - without this, no input will be rendered)
|
|
172
|
+
* <br>
|
|
173
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
174
|
+
*/
|
|
42
175
|
name?: ReactSelectAsyncProps['name'];
|
|
176
|
+
/**
|
|
177
|
+
* 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.
|
|
178
|
+
* <br>
|
|
179
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
180
|
+
*/
|
|
43
181
|
noOptionsMessage?: ReactSelectAsyncProps['noOptionsMessage'];
|
|
182
|
+
/**
|
|
183
|
+
* Handle blur events on the control
|
|
184
|
+
*/
|
|
44
185
|
onBlur?: (event: TCustomEvent) => void;
|
|
186
|
+
/**
|
|
187
|
+
* 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`.
|
|
188
|
+
*/
|
|
45
189
|
onChange?: (event: TCustomEvent, info: ActionMeta<unknown>) => void;
|
|
190
|
+
/**
|
|
191
|
+
* Handle focus events on the control
|
|
192
|
+
* <br>
|
|
193
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
194
|
+
*/
|
|
46
195
|
onFocus?: ReactSelectAsyncProps['onFocus'];
|
|
196
|
+
/**
|
|
197
|
+
* Handle change events on the input
|
|
198
|
+
* <br>
|
|
199
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
200
|
+
*/
|
|
47
201
|
onInputChange?: ReactSelectAsyncProps['onInputChange'];
|
|
202
|
+
/**
|
|
203
|
+
* Placeholder text for the select value
|
|
204
|
+
* <br>
|
|
205
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
206
|
+
*/
|
|
48
207
|
placeholder?: ReactSelectAsyncProps['placeholder'];
|
|
208
|
+
/**
|
|
209
|
+
* loading message shown while the options are being loaded
|
|
210
|
+
*/
|
|
49
211
|
loadingMessage?: string | (() => string);
|
|
212
|
+
/**
|
|
213
|
+
* Sets the tabIndex attribute on the input
|
|
214
|
+
* <br>
|
|
215
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
216
|
+
*/
|
|
50
217
|
tabIndex?: ReactSelectAsyncProps['tabIndex'];
|
|
218
|
+
/**
|
|
219
|
+
* Select the currently focused option when the user presses tab
|
|
220
|
+
* <br>
|
|
221
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
222
|
+
*/
|
|
51
223
|
tabSelectsValue?: ReactSelectAsyncProps['tabSelectsValue'];
|
|
224
|
+
/**
|
|
225
|
+
* The value of the select; reflected by the selected option
|
|
226
|
+
* <br>
|
|
227
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
228
|
+
*/
|
|
52
229
|
value?: ReactSelectAsyncProps['value'];
|
|
230
|
+
/**
|
|
231
|
+
* The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
|
|
232
|
+
* <br>
|
|
233
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
234
|
+
*/
|
|
53
235
|
defaultOptions?: OptionsOrGroups<unknown, GroupBase<unknown>> | boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Function that returns a promise, which is the set of options to be used once the promise resolves.
|
|
238
|
+
*/
|
|
54
239
|
loadOptions: ReactSelectAsyncProps['loadOptions'];
|
|
240
|
+
/**
|
|
241
|
+
* If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
|
|
242
|
+
*/
|
|
55
243
|
cacheOptions?: ReactSelectAsyncProps['cacheOptions'];
|
|
244
|
+
/**
|
|
245
|
+
* Determines if option groups will be separated by a divider
|
|
246
|
+
*/
|
|
56
247
|
showOptionGroupDivider?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Icon to display on the left of the placeholder text and selected value. Has no effect when `isMulti` is enabled.
|
|
250
|
+
*/
|
|
57
251
|
iconLeft?: ReactNode;
|
|
58
252
|
};
|
|
59
253
|
declare const AsyncSelectInput: {
|
|
60
254
|
(props: TAsyncSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
61
255
|
displayName: string;
|
|
62
256
|
defaultProps: Pick<TAsyncSelectInputProps, "value" | "controlShouldRenderValue" | "isSearchable" | "menuPortalZIndex">;
|
|
257
|
+
/**
|
|
258
|
+
* Expose static helper methods.
|
|
259
|
+
*/
|
|
63
260
|
isTouched(touched: unknown): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Expose react-select components for customization purposes.
|
|
263
|
+
*/
|
|
64
264
|
ClearIndicator: {
|
|
65
265
|
(props: import("@commercetools-uikit/select-utils").TClearIndicatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
66
266
|
displayName: string;
|
|
@@ -72,7 +272,11 @@ declare const AsyncSelectInput: {
|
|
|
72
272
|
(props: import("react-select").DropdownIndicatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
73
273
|
displayName: string;
|
|
74
274
|
};
|
|
75
|
-
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: import("react-select").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react"
|
|
275
|
+
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: import("react-select").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react" /**
|
|
276
|
+
* Custom method to filter whether an option should be displayed in the menu
|
|
277
|
+
* <br>
|
|
278
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
279
|
+
*/).jsx.JSX.Element;
|
|
76
280
|
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends GroupBase<Option_4>>(props: import("react-select").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
|
|
77
281
|
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends GroupBase<Option_6>>(props: import("react-select").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
|
|
78
282
|
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends GroupBase<Option_5>>(props: import("react-select").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
|
|
@@ -94,7 +298,11 @@ declare const AsyncSelectInput: {
|
|
|
94
298
|
};
|
|
95
299
|
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("react-select").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
|
|
96
300
|
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>(props: import("react-select").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
|
|
97
|
-
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import("react-select").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react"
|
|
301
|
+
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import("react-select").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react" /**
|
|
302
|
+
* Name of the HTML Input (optional - without this, no input will be rendered)
|
|
303
|
+
* <br>
|
|
304
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
305
|
+
*/).jsx.JSX.Element;
|
|
98
306
|
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: import("react-select").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
|
|
99
307
|
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: import("react-select").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
|
|
100
308
|
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: import("react-select").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
|
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": "19.
|
|
4
|
+
"version": "19.10.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/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/icons": "19.
|
|
27
|
-
"@commercetools-uikit/loading-spinner": "19.
|
|
28
|
-
"@commercetools-uikit/select-utils": "19.
|
|
29
|
-
"@commercetools-uikit/spacings": "19.
|
|
30
|
-
"@commercetools-uikit/text": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.10.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.10.0",
|
|
26
|
+
"@commercetools-uikit/icons": "19.10.0",
|
|
27
|
+
"@commercetools-uikit/loading-spinner": "19.10.0",
|
|
28
|
+
"@commercetools-uikit/select-utils": "19.10.0",
|
|
29
|
+
"@commercetools-uikit/spacings": "19.10.0",
|
|
30
|
+
"@commercetools-uikit/text": "19.10.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.10.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"lodash": "4.17.21",
|