@povio/ui 3.2.2-rc.7 → 3.2.3-rc.1
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.
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +35 -32
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +111 -91
- package/dist/components/inputs/Selection/shared/SelectInput.js +193 -154
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +3 -1
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/config/uiConfig.context.js +2 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ export type SelectBaseProps<TKey extends Key = Key, TInitialSelectItem = Default
|
|
|
27
27
|
collapseAfter?: number;
|
|
28
28
|
fireBlurOnChange?: boolean;
|
|
29
29
|
searchDebounceDelay?: number;
|
|
30
|
+
multiSelectAutoConfirm?: boolean;
|
|
30
31
|
onInputChange?: (value: string) => void;
|
|
31
32
|
onSearchChange?: (value: string) => void;
|
|
32
33
|
mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
|
|
@@ -7,7 +7,7 @@ import { c } from "react/compiler-runtime";
|
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/inputs/Selection/shared/SelectBase.tsx
|
|
9
9
|
var SelectBase = (dProps) => {
|
|
10
|
-
const $ = c(
|
|
10
|
+
const $ = c(22);
|
|
11
11
|
const ui = UIConfig.useConfig();
|
|
12
12
|
const t0 = dProps.selectionMode ?? ui.select.selectionMode;
|
|
13
13
|
const t1 = dProps.variant ?? ui.input.variant;
|
|
@@ -21,10 +21,11 @@ var SelectBase = (dProps) => {
|
|
|
21
21
|
const t9 = dProps.collapseAfter ?? ui.select.collapseAfter;
|
|
22
22
|
const t10 = dProps.hideSearchIcon ?? ui.select.hideSearchIcon;
|
|
23
23
|
const t11 = dProps.fireBlurOnChange ?? ui.select.fireBlurOnChange;
|
|
24
|
-
const t12 = dProps.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const t12 = dProps.multiSelectAutoConfirm ?? ui.select.multiSelectAutoConfirm;
|
|
25
|
+
const t13 = dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled;
|
|
26
|
+
let t14;
|
|
27
|
+
if ($[0] !== dProps || $[1] !== t0 || $[2] !== t1 || $[3] !== t10 || $[4] !== t11 || $[5] !== t12 || $[6] !== t13 || $[7] !== t2 || $[8] !== t3 || $[9] !== t4 || $[10] !== t5 || $[11] !== t6 || $[12] !== t7 || $[13] !== t8 || $[14] !== t9) {
|
|
28
|
+
t14 = {
|
|
28
29
|
...dProps,
|
|
29
30
|
selectionMode: t0,
|
|
30
31
|
variant: t1,
|
|
@@ -38,7 +39,8 @@ var SelectBase = (dProps) => {
|
|
|
38
39
|
collapseAfter: t9,
|
|
39
40
|
hideSearchIcon: t10,
|
|
40
41
|
fireBlurOnChange: t11,
|
|
41
|
-
|
|
42
|
+
multiSelectAutoConfirm: t12,
|
|
43
|
+
isClientSearchDisabled: t13
|
|
42
44
|
};
|
|
43
45
|
$[0] = dProps;
|
|
44
46
|
$[1] = t0;
|
|
@@ -46,37 +48,38 @@ var SelectBase = (dProps) => {
|
|
|
46
48
|
$[3] = t10;
|
|
47
49
|
$[4] = t11;
|
|
48
50
|
$[5] = t12;
|
|
49
|
-
$[6] =
|
|
50
|
-
$[7] =
|
|
51
|
-
$[8] =
|
|
52
|
-
$[9] =
|
|
53
|
-
$[10] =
|
|
54
|
-
$[11] =
|
|
55
|
-
$[12] =
|
|
56
|
-
$[13] =
|
|
57
|
-
$[14] =
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
$[6] = t13;
|
|
52
|
+
$[7] = t2;
|
|
53
|
+
$[8] = t3;
|
|
54
|
+
$[9] = t4;
|
|
55
|
+
$[10] = t5;
|
|
56
|
+
$[11] = t6;
|
|
57
|
+
$[12] = t7;
|
|
58
|
+
$[13] = t8;
|
|
59
|
+
$[14] = t9;
|
|
60
|
+
$[15] = t14;
|
|
61
|
+
} else t14 = $[15];
|
|
62
|
+
const props = t14;
|
|
60
63
|
const isDesktop = useBreakpoint("md");
|
|
61
|
-
const
|
|
62
|
-
let t15;
|
|
63
|
-
if ($[15] !== isDesktop || $[16] !== props) {
|
|
64
|
-
t15 = isDesktop ? /* @__PURE__ */ jsx(SelectDesktop, { ...props }) : /* @__PURE__ */ jsx(SelectMobile, { ...props });
|
|
65
|
-
$[15] = isDesktop;
|
|
66
|
-
$[16] = props;
|
|
67
|
-
$[17] = t15;
|
|
68
|
-
} else t15 = $[17];
|
|
64
|
+
const t15 = props;
|
|
69
65
|
let t16;
|
|
70
|
-
if ($[
|
|
71
|
-
t16 = /* @__PURE__ */ jsx(
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
if ($[16] !== isDesktop || $[17] !== props) {
|
|
67
|
+
t16 = isDesktop ? /* @__PURE__ */ jsx(SelectDesktop, { ...props }) : /* @__PURE__ */ jsx(SelectMobile, { ...props });
|
|
68
|
+
$[16] = isDesktop;
|
|
69
|
+
$[17] = props;
|
|
70
|
+
$[18] = t16;
|
|
71
|
+
} else t16 = $[18];
|
|
72
|
+
let t17;
|
|
73
|
+
if ($[19] !== t15 || $[20] !== t16) {
|
|
74
|
+
t17 = /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
75
|
+
...t15,
|
|
76
|
+
children: t16
|
|
74
77
|
});
|
|
75
|
-
$[18] = t14;
|
|
76
78
|
$[19] = t15;
|
|
77
79
|
$[20] = t16;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
$[21] = t17;
|
|
81
|
+
} else t17 = $[21];
|
|
82
|
+
return t17;
|
|
80
83
|
};
|
|
81
84
|
//#endregion
|
|
82
85
|
export { SelectBase };
|
|
@@ -16,7 +16,7 @@ import { useLabel, usePreventScroll } from "react-aria";
|
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
18
18
|
var SelectDesktop = (t0) => {
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(132);
|
|
20
20
|
let containerClassName;
|
|
21
21
|
let customTrigger;
|
|
22
22
|
let error;
|
|
@@ -105,6 +105,7 @@ var SelectDesktop = (t0) => {
|
|
|
105
105
|
const closeComboBoxRef = useRef(null);
|
|
106
106
|
const wrapperRef = useRef(null);
|
|
107
107
|
const [popoverWidth, setPopoverWidth] = useState(void 0);
|
|
108
|
+
const [shouldBlurAfterSingleSelection, setShouldBlurAfterSingleSelection] = useState(false);
|
|
108
109
|
const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
|
|
109
110
|
const t4 = !isOpen;
|
|
110
111
|
let t5;
|
|
@@ -148,6 +149,7 @@ var SelectDesktop = (t0) => {
|
|
|
148
149
|
}
|
|
149
150
|
if (!isMultiple) {
|
|
150
151
|
onChange(value);
|
|
152
|
+
setShouldBlurAfterSingleSelection(true);
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
153
155
|
if (!Array.isArray(fieldState.value)) {
|
|
@@ -262,26 +264,44 @@ var SelectDesktop = (t0) => {
|
|
|
262
264
|
} else t18 = $[70];
|
|
263
265
|
const showPopover = t18;
|
|
264
266
|
let t19;
|
|
265
|
-
if ($[71] !== comboBoxProps || $[72] !== isSearchable) {
|
|
266
|
-
t19 = isSearchable ? comboBoxProps : {};
|
|
267
|
-
$[71] = comboBoxProps;
|
|
268
|
-
$[72] = isSearchable;
|
|
269
|
-
$[73] = t19;
|
|
270
|
-
} else t19 = $[73];
|
|
271
267
|
let t20;
|
|
272
|
-
if ($[
|
|
273
|
-
|
|
268
|
+
if ($[71] !== shouldBlurAfterSingleSelection) {
|
|
269
|
+
t19 = () => {
|
|
270
|
+
if (!shouldBlurAfterSingleSelection) return;
|
|
271
|
+
setShouldBlurAfterSingleSelection(false);
|
|
272
|
+
const activeElement = document.activeElement;
|
|
273
|
+
if (activeElement instanceof HTMLElement && triggerRef.current?.contains(activeElement)) activeElement.blur();
|
|
274
|
+
};
|
|
275
|
+
t20 = [shouldBlurAfterSingleSelection];
|
|
276
|
+
$[71] = shouldBlurAfterSingleSelection;
|
|
277
|
+
$[72] = t19;
|
|
278
|
+
$[73] = t20;
|
|
279
|
+
} else {
|
|
280
|
+
t19 = $[72];
|
|
281
|
+
t20 = $[73];
|
|
282
|
+
}
|
|
283
|
+
useLayoutEffect(t19, t20);
|
|
284
|
+
let t21;
|
|
285
|
+
if ($[74] !== comboBoxProps || $[75] !== isSearchable) {
|
|
286
|
+
t21 = isSearchable ? comboBoxProps : {};
|
|
287
|
+
$[74] = comboBoxProps;
|
|
288
|
+
$[75] = isSearchable;
|
|
289
|
+
$[76] = t21;
|
|
290
|
+
} else t21 = $[76];
|
|
291
|
+
let t22;
|
|
292
|
+
if ($[77] !== containerClassName || $[78] !== isSearchable || $[79] !== labelProps) {
|
|
293
|
+
t22 = !isSearchable && {
|
|
274
294
|
labelProps,
|
|
275
295
|
className: clsx("group w-full", containerClassName)
|
|
276
296
|
};
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
} else
|
|
282
|
-
let
|
|
283
|
-
if ($[
|
|
284
|
-
|
|
297
|
+
$[77] = containerClassName;
|
|
298
|
+
$[78] = isSearchable;
|
|
299
|
+
$[79] = labelProps;
|
|
300
|
+
$[80] = t22;
|
|
301
|
+
} else t22 = $[80];
|
|
302
|
+
let t23;
|
|
303
|
+
if ($[81] !== as || $[82] !== className || $[83] !== collapseAfter || $[84] !== customTrigger || $[85] !== dialogTriggerProps || $[86] !== error || $[87] !== fieldProps || $[88] !== headerProps || $[89] !== hideDropdownIcon || $[90] !== inputClassName || $[91] !== isClearable || $[92] !== isDirty || $[93] !== isDisabled || $[94] !== isRequired || $[95] !== isSearchable || $[96] !== leadingContent || $[97] !== onBlur || $[98] !== placeholder || $[99] !== ref || $[100] !== selectedTagsType || $[101] !== showSelectionContent || $[102] !== size || $[103] !== trailingContent || $[104] !== variant) {
|
|
304
|
+
t23 = customTrigger ? /* @__PURE__ */ jsx(DialogTrigger, {
|
|
285
305
|
...dialogTriggerProps,
|
|
286
306
|
children: /* @__PURE__ */ jsx("div", {
|
|
287
307
|
...fieldProps,
|
|
@@ -315,35 +335,35 @@ var SelectDesktop = (t0) => {
|
|
|
315
335
|
fieldProps,
|
|
316
336
|
headerProps
|
|
317
337
|
});
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
} else
|
|
344
|
-
let
|
|
345
|
-
if ($[
|
|
346
|
-
|
|
338
|
+
$[81] = as;
|
|
339
|
+
$[82] = className;
|
|
340
|
+
$[83] = collapseAfter;
|
|
341
|
+
$[84] = customTrigger;
|
|
342
|
+
$[85] = dialogTriggerProps;
|
|
343
|
+
$[86] = error;
|
|
344
|
+
$[87] = fieldProps;
|
|
345
|
+
$[88] = headerProps;
|
|
346
|
+
$[89] = hideDropdownIcon;
|
|
347
|
+
$[90] = inputClassName;
|
|
348
|
+
$[91] = isClearable;
|
|
349
|
+
$[92] = isDirty;
|
|
350
|
+
$[93] = isDisabled;
|
|
351
|
+
$[94] = isRequired;
|
|
352
|
+
$[95] = isSearchable;
|
|
353
|
+
$[96] = leadingContent;
|
|
354
|
+
$[97] = onBlur;
|
|
355
|
+
$[98] = placeholder;
|
|
356
|
+
$[99] = ref;
|
|
357
|
+
$[100] = selectedTagsType;
|
|
358
|
+
$[101] = showSelectionContent;
|
|
359
|
+
$[102] = size;
|
|
360
|
+
$[103] = trailingContent;
|
|
361
|
+
$[104] = variant;
|
|
362
|
+
$[105] = t23;
|
|
363
|
+
} else t23 = $[105];
|
|
364
|
+
let t24;
|
|
365
|
+
if ($[106] !== ignoreTriggerWidth || $[107] !== isOpen || $[108] !== isSearchable || $[109] !== popoverCva || $[110] !== popoverWidth || $[111] !== props || $[112] !== selectPopoverCva || $[113] !== setIsOpen || $[114] !== showPopover) {
|
|
366
|
+
t24 = (!isSearchable || showPopover) && /* @__PURE__ */ jsx(Popover, {
|
|
347
367
|
triggerRef,
|
|
348
368
|
isOpen,
|
|
349
369
|
onOpenChange: setIsOpen,
|
|
@@ -356,61 +376,61 @@ var SelectDesktop = (t0) => {
|
|
|
356
376
|
autoFocus: !isSearchable
|
|
357
377
|
})
|
|
358
378
|
});
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
379
|
+
$[106] = ignoreTriggerWidth;
|
|
380
|
+
$[107] = isOpen;
|
|
381
|
+
$[108] = isSearchable;
|
|
382
|
+
$[109] = popoverCva;
|
|
383
|
+
$[110] = popoverWidth;
|
|
384
|
+
$[111] = props;
|
|
385
|
+
$[112] = selectPopoverCva;
|
|
386
|
+
$[113] = setIsOpen;
|
|
387
|
+
$[114] = showPopover;
|
|
388
|
+
$[115] = t24;
|
|
389
|
+
} else t24 = $[115];
|
|
390
|
+
let t25;
|
|
391
|
+
if ($[116] !== as || $[117] !== formFieldProps || $[118] !== onFocusCapture || $[119] !== onMouseEnter || $[120] !== t22 || $[121] !== t23 || $[122] !== t24) {
|
|
392
|
+
t25 = /* @__PURE__ */ jsxs(FormField, {
|
|
373
393
|
...formFieldProps,
|
|
374
|
-
...
|
|
394
|
+
...t22,
|
|
375
395
|
as,
|
|
376
396
|
onMouseEnter,
|
|
377
397
|
onFocusCapture,
|
|
378
398
|
ref: wrapperRef,
|
|
379
|
-
children: [
|
|
399
|
+
children: [t23, t24]
|
|
380
400
|
});
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
393
|
-
...
|
|
394
|
-
children:
|
|
401
|
+
$[116] = as;
|
|
402
|
+
$[117] = formFieldProps;
|
|
403
|
+
$[118] = onFocusCapture;
|
|
404
|
+
$[119] = onMouseEnter;
|
|
405
|
+
$[120] = t22;
|
|
406
|
+
$[121] = t23;
|
|
407
|
+
$[122] = t24;
|
|
408
|
+
$[123] = t25;
|
|
409
|
+
} else t25 = $[123];
|
|
410
|
+
let t26;
|
|
411
|
+
if ($[124] !== WrapperComponent || $[125] !== t21 || $[126] !== t25) {
|
|
412
|
+
t26 = /* @__PURE__ */ jsx(WrapperComponent, {
|
|
413
|
+
...t21,
|
|
414
|
+
children: t25
|
|
395
415
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
} else
|
|
401
|
-
let
|
|
402
|
-
if ($[
|
|
403
|
-
|
|
416
|
+
$[124] = WrapperComponent;
|
|
417
|
+
$[125] = t21;
|
|
418
|
+
$[126] = t25;
|
|
419
|
+
$[127] = t26;
|
|
420
|
+
} else t26 = $[127];
|
|
421
|
+
let t27;
|
|
422
|
+
if ($[128] !== as || $[129] !== error || $[130] !== t26) {
|
|
423
|
+
t27 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
404
424
|
as,
|
|
405
425
|
error,
|
|
406
|
-
children:
|
|
426
|
+
children: t26
|
|
407
427
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
} else
|
|
413
|
-
return
|
|
428
|
+
$[128] = as;
|
|
429
|
+
$[129] = error;
|
|
430
|
+
$[130] = t26;
|
|
431
|
+
$[131] = t27;
|
|
432
|
+
} else t27 = $[131];
|
|
433
|
+
return t27;
|
|
414
434
|
};
|
|
415
435
|
function _temp(item) {
|
|
416
436
|
return !item.isSelectAllItem;
|
|
@@ -18,7 +18,7 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
|
18
18
|
import { useTranslation } from "react-i18next";
|
|
19
19
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
20
20
|
var SelectInput = (t0) => {
|
|
21
|
-
const $0 = c(
|
|
21
|
+
const $0 = c(136);
|
|
22
22
|
const { ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props } = t0;
|
|
23
23
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
24
24
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
@@ -42,7 +42,7 @@ var SelectInput = (t0) => {
|
|
|
42
42
|
const { focusWithinProps } = useFocusWithin(t2);
|
|
43
43
|
const { isFocusVisible } = useFocusVisible();
|
|
44
44
|
const inputRef = useRef(null);
|
|
45
|
-
const { fieldState, isOpen, setIsOpen,
|
|
45
|
+
const { fieldState, isOpen, setIsOpen, selectableListItems, selectedItems, onChange, onClear, onRemove, isMultiple, multiSelectAutoConfirm, isLoading } = SelectContext.useSelect();
|
|
46
46
|
const isEmpty = selectedItems.length === 0;
|
|
47
47
|
const showTags = isMultiple && !isEmpty;
|
|
48
48
|
const showClearButton = !isDisabled && isClearable && (selectedItems.length > 0 || isSearchable && fieldState.inputValue !== "");
|
|
@@ -79,91 +79,130 @@ var SelectInput = (t0) => {
|
|
|
79
79
|
t3 = t7;
|
|
80
80
|
}
|
|
81
81
|
const labelProps = t3;
|
|
82
|
-
|
|
82
|
+
let exactMatchItem;
|
|
83
|
+
if (isMultiple && multiSelectAutoConfirm && fieldState.inputValue !== "") {
|
|
84
|
+
let t4;
|
|
85
|
+
if ($0[10] !== fieldState.inputValue || $0[11] !== selectableListItems) {
|
|
86
|
+
let t5;
|
|
87
|
+
if ($0[13] !== fieldState.inputValue) {
|
|
88
|
+
t5 = (item) => item.label.toLowerCase() === fieldState.inputValue.toLowerCase();
|
|
89
|
+
$0[13] = fieldState.inputValue;
|
|
90
|
+
$0[14] = t5;
|
|
91
|
+
} else t5 = $0[14];
|
|
92
|
+
t4 = selectableListItems.find(t5);
|
|
93
|
+
$0[10] = fieldState.inputValue;
|
|
94
|
+
$0[11] = selectableListItems;
|
|
95
|
+
$0[12] = t4;
|
|
96
|
+
} else t4 = $0[12];
|
|
97
|
+
exactMatchItem = t4;
|
|
98
|
+
}
|
|
99
|
+
let singleRemainingItem;
|
|
100
|
+
if (!isLoading && selectableListItems.length === 1 && !selectableListItems[0].isDisabled) singleRemainingItem = selectableListItems[0];
|
|
101
|
+
let autoConfirmItem;
|
|
102
|
+
if ($0[15] !== exactMatchItem || $0[16] !== isMultiple || $0[17] !== multiSelectAutoConfirm || $0[18] !== singleRemainingItem) {
|
|
103
|
+
if (isMultiple) {
|
|
104
|
+
if (multiSelectAutoConfirm) autoConfirmItem = exactMatchItem ?? singleRemainingItem;
|
|
105
|
+
} else autoConfirmItem = singleRemainingItem;
|
|
106
|
+
$0[15] = exactMatchItem;
|
|
107
|
+
$0[16] = isMultiple;
|
|
108
|
+
$0[17] = multiSelectAutoConfirm;
|
|
109
|
+
$0[18] = singleRemainingItem;
|
|
110
|
+
$0[19] = autoConfirmItem;
|
|
111
|
+
} else autoConfirmItem = $0[19];
|
|
112
|
+
const t4 = !isLoading && !!autoConfirmItem;
|
|
83
113
|
let t5;
|
|
84
|
-
if ($0[
|
|
114
|
+
if ($0[20] !== autoConfirmItem || $0[21] !== fieldState.value || $0[22] !== isMultiple || $0[23] !== onChange || $0[24] !== onCloseComboBox || $0[25] !== state) {
|
|
85
115
|
t5 = () => {
|
|
86
|
-
|
|
116
|
+
if (!autoConfirmItem) return;
|
|
117
|
+
if (isMultiple) {
|
|
118
|
+
if (Array.isArray(fieldState.value)) if (fieldState.value.includes(autoConfirmItem.id)) onChange(fieldState.value.filter((id) => id !== autoConfirmItem.id));
|
|
119
|
+
else onChange(fieldState.value.concat(autoConfirmItem.id));
|
|
120
|
+
else onChange([autoConfirmItem.id]);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
onChange(autoConfirmItem.id);
|
|
87
124
|
onCloseComboBox?.(state);
|
|
88
125
|
};
|
|
89
|
-
$0[
|
|
90
|
-
$0[
|
|
91
|
-
$0[
|
|
92
|
-
$0[
|
|
93
|
-
$0[
|
|
94
|
-
|
|
126
|
+
$0[20] = autoConfirmItem;
|
|
127
|
+
$0[21] = fieldState.value;
|
|
128
|
+
$0[22] = isMultiple;
|
|
129
|
+
$0[23] = onChange;
|
|
130
|
+
$0[24] = onCloseComboBox;
|
|
131
|
+
$0[25] = state;
|
|
132
|
+
$0[26] = t5;
|
|
133
|
+
} else t5 = $0[26];
|
|
95
134
|
let t6;
|
|
96
|
-
if ($0[
|
|
135
|
+
if ($0[27] !== t4 || $0[28] !== t5) {
|
|
97
136
|
t6 = {
|
|
98
137
|
enabled: t4,
|
|
99
138
|
preventDefault: true,
|
|
100
139
|
callback: t5
|
|
101
140
|
};
|
|
102
|
-
$0[
|
|
103
|
-
$0[
|
|
104
|
-
$0[
|
|
105
|
-
} else t6 = $0[
|
|
141
|
+
$0[27] = t4;
|
|
142
|
+
$0[28] = t5;
|
|
143
|
+
$0[29] = t6;
|
|
144
|
+
} else t6 = $0[29];
|
|
106
145
|
const t7 = isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0;
|
|
107
146
|
let t8;
|
|
108
|
-
if ($0[
|
|
147
|
+
if ($0[30] !== fieldState.value || $0[31] !== onChange) {
|
|
109
148
|
t8 = () => {
|
|
110
149
|
if (!Array.isArray(fieldState.value)) return;
|
|
111
150
|
onChange(fieldState.value.slice(0, -1));
|
|
112
151
|
};
|
|
113
|
-
$0[
|
|
114
|
-
$0[
|
|
115
|
-
$0[
|
|
116
|
-
} else t8 = $0[
|
|
152
|
+
$0[30] = fieldState.value;
|
|
153
|
+
$0[31] = onChange;
|
|
154
|
+
$0[32] = t8;
|
|
155
|
+
} else t8 = $0[32];
|
|
117
156
|
let t9;
|
|
118
|
-
if ($0[
|
|
157
|
+
if ($0[33] !== t7 || $0[34] !== t8) {
|
|
119
158
|
t9 = {
|
|
120
159
|
enabled: t7,
|
|
121
160
|
callback: t8
|
|
122
161
|
};
|
|
123
|
-
$0[
|
|
124
|
-
$0[
|
|
125
|
-
$0[
|
|
126
|
-
} else t9 = $0[
|
|
162
|
+
$0[33] = t7;
|
|
163
|
+
$0[34] = t8;
|
|
164
|
+
$0[35] = t9;
|
|
165
|
+
} else t9 = $0[35];
|
|
127
166
|
let t10;
|
|
128
|
-
if ($0[
|
|
167
|
+
if ($0[36] !== t6 || $0[37] !== t9) {
|
|
129
168
|
t10 = {
|
|
130
169
|
enter: t6,
|
|
131
170
|
backspace: t9
|
|
132
171
|
};
|
|
133
|
-
$0[
|
|
134
|
-
$0[
|
|
135
|
-
$0[
|
|
136
|
-
} else t10 = $0[
|
|
172
|
+
$0[36] = t6;
|
|
173
|
+
$0[37] = t9;
|
|
174
|
+
$0[38] = t10;
|
|
175
|
+
} else t10 = $0[38];
|
|
137
176
|
const { onKeyDown } = useKeyInteractions(t10);
|
|
138
177
|
let t11;
|
|
139
|
-
if ($0[
|
|
178
|
+
if ($0[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
140
179
|
t11 = ["up", "down"];
|
|
141
|
-
$0[
|
|
142
|
-
} else t11 = $0[
|
|
180
|
+
$0[39] = t11;
|
|
181
|
+
} else t11 = $0[39];
|
|
143
182
|
const t12 = !isSearchable && !isDisabled && !isOpen;
|
|
144
183
|
let t13;
|
|
145
|
-
if ($0[
|
|
184
|
+
if ($0[40] !== setIsOpen) {
|
|
146
185
|
t13 = () => {
|
|
147
186
|
setIsOpen(true);
|
|
148
187
|
};
|
|
149
|
-
$0[
|
|
150
|
-
$0[
|
|
151
|
-
} else t13 = $0[
|
|
188
|
+
$0[40] = setIsOpen;
|
|
189
|
+
$0[41] = t13;
|
|
190
|
+
} else t13 = $0[41];
|
|
152
191
|
let t14;
|
|
153
|
-
if ($0[
|
|
192
|
+
if ($0[42] !== t12 || $0[43] !== t13) {
|
|
154
193
|
t14 = { interactions: [{
|
|
155
194
|
actions: t11,
|
|
156
195
|
enabled: t12,
|
|
157
196
|
preventDefault: true,
|
|
158
197
|
callback: t13
|
|
159
198
|
}] };
|
|
160
|
-
$0[
|
|
161
|
-
$0[
|
|
162
|
-
$0[
|
|
163
|
-
} else t14 = $0[
|
|
199
|
+
$0[42] = t12;
|
|
200
|
+
$0[43] = t13;
|
|
201
|
+
$0[44] = t14;
|
|
202
|
+
} else t14 = $0[44];
|
|
164
203
|
const { onKeyDown: onTriggerKeyDown } = useKeyInteractions(t14);
|
|
165
204
|
let t15;
|
|
166
|
-
if ($0[
|
|
205
|
+
if ($0[45] !== isDisabled || $0[46] !== isOpen || $0[47] !== isSearchable || $0[48] !== setIsOpen) {
|
|
167
206
|
t15 = () => {
|
|
168
207
|
if (isDisabled) return;
|
|
169
208
|
if (!isSearchable) {
|
|
@@ -172,12 +211,12 @@ var SelectInput = (t0) => {
|
|
|
172
211
|
}
|
|
173
212
|
inputRef.current?.focus();
|
|
174
213
|
};
|
|
175
|
-
$0[
|
|
176
|
-
$0[
|
|
177
|
-
$0[
|
|
178
|
-
$0[
|
|
179
|
-
$0[
|
|
180
|
-
} else t15 = $0[
|
|
214
|
+
$0[45] = isDisabled;
|
|
215
|
+
$0[46] = isOpen;
|
|
216
|
+
$0[47] = isSearchable;
|
|
217
|
+
$0[48] = setIsOpen;
|
|
218
|
+
$0[49] = t15;
|
|
219
|
+
} else t15 = $0[49];
|
|
181
220
|
const onClick = t15;
|
|
182
221
|
const t16 = inputBaseCva({
|
|
183
222
|
variant,
|
|
@@ -207,28 +246,28 @@ var SelectInput = (t0) => {
|
|
|
207
246
|
...props
|
|
208
247
|
}));
|
|
209
248
|
let t34;
|
|
210
|
-
if ($0[
|
|
249
|
+
if ($0[50] !== as || $0[51] !== headerProps || $0[52] !== labelProps) {
|
|
211
250
|
t34 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
212
251
|
as,
|
|
213
252
|
...headerProps,
|
|
214
253
|
labelProps
|
|
215
254
|
});
|
|
216
|
-
$0[
|
|
217
|
-
$0[
|
|
218
|
-
$0[
|
|
219
|
-
$0[
|
|
220
|
-
} else t34 = $0[
|
|
255
|
+
$0[50] = as;
|
|
256
|
+
$0[51] = headerProps;
|
|
257
|
+
$0[52] = labelProps;
|
|
258
|
+
$0[53] = t34;
|
|
259
|
+
} else t34 = $0[53];
|
|
221
260
|
let t35;
|
|
222
|
-
if ($0[
|
|
261
|
+
if ($0[54] !== leadingContent) {
|
|
223
262
|
t35 = leadingContent && /* @__PURE__ */ jsx("div", {
|
|
224
263
|
className: "ml-input-side-default flex shrink-0 items-center",
|
|
225
264
|
children: leadingContent
|
|
226
265
|
});
|
|
227
|
-
$0[
|
|
228
|
-
$0[
|
|
229
|
-
} else t35 = $0[
|
|
266
|
+
$0[54] = leadingContent;
|
|
267
|
+
$0[55] = t35;
|
|
268
|
+
} else t35 = $0[55];
|
|
230
269
|
let t36;
|
|
231
|
-
if ($0[
|
|
270
|
+
if ($0[56] !== as || $0[57] !== collapseAfter || $0[58] !== fieldProps || $0[59] !== inputClassName || $0[60] !== isDisabled || $0[61] !== isSearchable || $0[62] !== onBlur || $0[63] !== onKeyDown || $0[64] !== onRemove || $0[65] !== placeholder || $0[66] !== selectInputTagsContentWrapperCva || $0[67] !== selectedItems || $0[68] !== selectedTagsType || $0[69] !== showTags) {
|
|
232
271
|
t36 = (showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
233
272
|
className: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
234
273
|
children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
|
|
@@ -246,24 +285,24 @@ var SelectInput = (t0) => {
|
|
|
246
285
|
...fieldProps
|
|
247
286
|
})]
|
|
248
287
|
});
|
|
249
|
-
$0[
|
|
250
|
-
$0[
|
|
251
|
-
$0[
|
|
252
|
-
$0[
|
|
253
|
-
$0[
|
|
254
|
-
$0[
|
|
255
|
-
$0[
|
|
256
|
-
$0[
|
|
257
|
-
$0[
|
|
258
|
-
$0[
|
|
259
|
-
$0[
|
|
260
|
-
$0[
|
|
261
|
-
$0[
|
|
262
|
-
$0[
|
|
263
|
-
$0[
|
|
264
|
-
} else t36 = $0[
|
|
288
|
+
$0[56] = as;
|
|
289
|
+
$0[57] = collapseAfter;
|
|
290
|
+
$0[58] = fieldProps;
|
|
291
|
+
$0[59] = inputClassName;
|
|
292
|
+
$0[60] = isDisabled;
|
|
293
|
+
$0[61] = isSearchable;
|
|
294
|
+
$0[62] = onBlur;
|
|
295
|
+
$0[63] = onKeyDown;
|
|
296
|
+
$0[64] = onRemove;
|
|
297
|
+
$0[65] = placeholder;
|
|
298
|
+
$0[66] = selectInputTagsContentWrapperCva;
|
|
299
|
+
$0[67] = selectedItems;
|
|
300
|
+
$0[68] = selectedTagsType;
|
|
301
|
+
$0[69] = showTags;
|
|
302
|
+
$0[70] = t36;
|
|
303
|
+
} else t36 = $0[70];
|
|
265
304
|
let t37;
|
|
266
|
-
if ($0[
|
|
305
|
+
if ($0[71] !== as || $0[72] !== fieldProps || $0[73] !== isDisabled || $0[74] !== isEmpty || $0[75] !== isMultiple || $0[76] !== isOpen || $0[77] !== isSearchable || $0[78] !== onBlur || $0[79] !== onTriggerKeyDown || $0[80] !== placeholder || $0[81] !== selectedItems[0] || $0[82] !== setIsOpen || $0[83] !== showSelectionContent || $0[84] !== showTags) {
|
|
267
306
|
t37 = !isSearchable && /* @__PURE__ */ jsxs(Button, {
|
|
268
307
|
isDisabled,
|
|
269
308
|
onPress: () => setIsOpen(!isOpen),
|
|
@@ -278,24 +317,24 @@ var SelectInput = (t0) => {
|
|
|
278
317
|
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
279
318
|
})]
|
|
280
319
|
});
|
|
281
|
-
$0[
|
|
282
|
-
$0[
|
|
283
|
-
$0[
|
|
284
|
-
$0[
|
|
285
|
-
$0[
|
|
286
|
-
$0[
|
|
287
|
-
$0[
|
|
288
|
-
$0[
|
|
289
|
-
$0[
|
|
290
|
-
$0[
|
|
291
|
-
$0[
|
|
292
|
-
$0[
|
|
293
|
-
$0[
|
|
294
|
-
$0[
|
|
295
|
-
$0[
|
|
296
|
-
} else t37 = $0[
|
|
320
|
+
$0[71] = as;
|
|
321
|
+
$0[72] = fieldProps;
|
|
322
|
+
$0[73] = isDisabled;
|
|
323
|
+
$0[74] = isEmpty;
|
|
324
|
+
$0[75] = isMultiple;
|
|
325
|
+
$0[76] = isOpen;
|
|
326
|
+
$0[77] = isSearchable;
|
|
327
|
+
$0[78] = onBlur;
|
|
328
|
+
$0[79] = onTriggerKeyDown;
|
|
329
|
+
$0[80] = placeholder;
|
|
330
|
+
$0[81] = selectedItems[0];
|
|
331
|
+
$0[82] = setIsOpen;
|
|
332
|
+
$0[83] = showSelectionContent;
|
|
333
|
+
$0[84] = showTags;
|
|
334
|
+
$0[85] = t37;
|
|
335
|
+
} else t37 = $0[85];
|
|
297
336
|
let t38;
|
|
298
|
-
if ($0[
|
|
337
|
+
if ($0[86] !== onClick || $0[87] !== t33 || $0[88] !== t34 || $0[89] !== t35 || $0[90] !== t36 || $0[91] !== t37) {
|
|
299
338
|
t38 = /* @__PURE__ */ jsxs("div", {
|
|
300
339
|
className: t33,
|
|
301
340
|
onClick,
|
|
@@ -306,16 +345,16 @@ var SelectInput = (t0) => {
|
|
|
306
345
|
t37
|
|
307
346
|
]
|
|
308
347
|
});
|
|
309
|
-
$0[
|
|
310
|
-
$0[
|
|
311
|
-
$0[
|
|
312
|
-
$0[
|
|
313
|
-
$0[
|
|
314
|
-
$0[
|
|
315
|
-
$0[
|
|
316
|
-
} else t38 = $0[
|
|
348
|
+
$0[86] = onClick;
|
|
349
|
+
$0[87] = t33;
|
|
350
|
+
$0[88] = t34;
|
|
351
|
+
$0[89] = t35;
|
|
352
|
+
$0[90] = t36;
|
|
353
|
+
$0[91] = t37;
|
|
354
|
+
$0[92] = t38;
|
|
355
|
+
} else t38 = $0[92];
|
|
317
356
|
let t39;
|
|
318
|
-
if ($0[
|
|
357
|
+
if ($0[93] !== as || $0[94] !== inputClearClassCva || $0[95] !== isClearable || $0[96] !== isDisabled || $0[97] !== onClear || $0[98] !== showClearButton) {
|
|
319
358
|
t39 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
|
|
320
359
|
onClear: () => {
|
|
321
360
|
onClear();
|
|
@@ -323,25 +362,25 @@ var SelectInput = (t0) => {
|
|
|
323
362
|
className: inputClearClassCva({ as }),
|
|
324
363
|
show: showClearButton
|
|
325
364
|
});
|
|
326
|
-
$0[
|
|
327
|
-
$0[
|
|
328
|
-
$0[
|
|
329
|
-
$0[
|
|
330
|
-
$0[
|
|
331
|
-
$0[
|
|
332
|
-
$0[
|
|
333
|
-
} else t39 = $0[
|
|
365
|
+
$0[93] = as;
|
|
366
|
+
$0[94] = inputClearClassCva;
|
|
367
|
+
$0[95] = isClearable;
|
|
368
|
+
$0[96] = isDisabled;
|
|
369
|
+
$0[97] = onClear;
|
|
370
|
+
$0[98] = showClearButton;
|
|
371
|
+
$0[99] = t39;
|
|
372
|
+
} else t39 = $0[99];
|
|
334
373
|
let t40;
|
|
335
|
-
if ($0[
|
|
374
|
+
if ($0[100] !== trailingContent) {
|
|
336
375
|
t40 = trailingContent && /* @__PURE__ */ jsx("div", {
|
|
337
376
|
className: "flex shrink-0 items-center",
|
|
338
377
|
children: trailingContent
|
|
339
378
|
});
|
|
340
|
-
$0[
|
|
341
|
-
$0[
|
|
342
|
-
} else t40 = $0[
|
|
379
|
+
$0[100] = trailingContent;
|
|
380
|
+
$0[101] = t40;
|
|
381
|
+
} else t40 = $0[101];
|
|
343
382
|
let t41;
|
|
344
|
-
if ($0[
|
|
383
|
+
if ($0[102] !== hideDropdownIcon || $0[103] !== inputSizeCva || $0[104] !== isDisabled || $0[105] !== isOpen || $0[106] !== isSearchable || $0[107] !== setIsOpen || $0[108] !== size || $0[109] !== t) {
|
|
345
384
|
t41 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
346
385
|
excludeFromTabOrder: true,
|
|
347
386
|
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
@@ -355,18 +394,18 @@ var SelectInput = (t0) => {
|
|
|
355
394
|
"aria-hidden": "true"
|
|
356
395
|
})
|
|
357
396
|
});
|
|
358
|
-
$0[
|
|
359
|
-
$0[
|
|
360
|
-
$0[
|
|
361
|
-
$0[
|
|
362
|
-
$0[
|
|
363
|
-
$0[
|
|
364
|
-
$0[
|
|
365
|
-
$0[
|
|
366
|
-
$0[
|
|
367
|
-
} else t41 = $0[
|
|
397
|
+
$0[102] = hideDropdownIcon;
|
|
398
|
+
$0[103] = inputSizeCva;
|
|
399
|
+
$0[104] = isDisabled;
|
|
400
|
+
$0[105] = isOpen;
|
|
401
|
+
$0[106] = isSearchable;
|
|
402
|
+
$0[107] = setIsOpen;
|
|
403
|
+
$0[108] = size;
|
|
404
|
+
$0[109] = t;
|
|
405
|
+
$0[110] = t41;
|
|
406
|
+
} else t41 = $0[110];
|
|
368
407
|
let t42;
|
|
369
|
-
if ($0[
|
|
408
|
+
if ($0[111] !== focusWithinProps || $0[112] !== hoverProps || $0[113] !== onFocusCapture || $0[114] !== onMouseEnter || $0[115] !== ref || $0[116] !== t16 || $0[117] !== t18 || $0[118] !== t19 || $0[119] !== t20 || $0[120] !== t21 || $0[121] !== t22 || $0[122] !== t23 || $0[123] !== t24 || $0[124] !== t25 || $0[125] !== t26 || $0[126] !== t27 || $0[127] !== t28 || $0[128] !== t29 || $0[129] !== t30 || $0[130] !== t31 || $0[131] !== t38 || $0[132] !== t39 || $0[133] !== t40 || $0[134] !== t41) {
|
|
370
409
|
t42 = /* @__PURE__ */ jsxs("div", {
|
|
371
410
|
ref,
|
|
372
411
|
className: t16,
|
|
@@ -397,32 +436,32 @@ var SelectInput = (t0) => {
|
|
|
397
436
|
t41
|
|
398
437
|
]
|
|
399
438
|
});
|
|
400
|
-
$0[
|
|
401
|
-
$0[
|
|
402
|
-
$0[
|
|
403
|
-
$0[
|
|
404
|
-
$0[
|
|
405
|
-
$0[
|
|
406
|
-
$0[
|
|
407
|
-
$0[
|
|
408
|
-
$0[
|
|
409
|
-
$0[
|
|
410
|
-
$0[
|
|
411
|
-
$0[
|
|
412
|
-
$0[
|
|
413
|
-
$0[
|
|
414
|
-
$0[
|
|
415
|
-
$0[
|
|
416
|
-
$0[
|
|
417
|
-
$0[
|
|
418
|
-
$0[
|
|
419
|
-
$0[
|
|
420
|
-
$0[
|
|
421
|
-
$0[
|
|
422
|
-
$0[
|
|
423
|
-
$0[
|
|
424
|
-
$0[
|
|
425
|
-
} else t42 = $0[
|
|
439
|
+
$0[111] = focusWithinProps;
|
|
440
|
+
$0[112] = hoverProps;
|
|
441
|
+
$0[113] = onFocusCapture;
|
|
442
|
+
$0[114] = onMouseEnter;
|
|
443
|
+
$0[115] = ref;
|
|
444
|
+
$0[116] = t16;
|
|
445
|
+
$0[117] = t18;
|
|
446
|
+
$0[118] = t19;
|
|
447
|
+
$0[119] = t20;
|
|
448
|
+
$0[120] = t21;
|
|
449
|
+
$0[121] = t22;
|
|
450
|
+
$0[122] = t23;
|
|
451
|
+
$0[123] = t24;
|
|
452
|
+
$0[124] = t25;
|
|
453
|
+
$0[125] = t26;
|
|
454
|
+
$0[126] = t27;
|
|
455
|
+
$0[127] = t28;
|
|
456
|
+
$0[128] = t29;
|
|
457
|
+
$0[129] = t30;
|
|
458
|
+
$0[130] = t31;
|
|
459
|
+
$0[131] = t38;
|
|
460
|
+
$0[132] = t39;
|
|
461
|
+
$0[133] = t40;
|
|
462
|
+
$0[134] = t41;
|
|
463
|
+
$0[135] = t42;
|
|
464
|
+
} else t42 = $0[135];
|
|
426
465
|
return t42;
|
|
427
466
|
};
|
|
428
467
|
//#endregion
|
|
@@ -23,9 +23,10 @@ export declare namespace SelectContext {
|
|
|
23
23
|
selectedItems: SelectItem[];
|
|
24
24
|
selectedIds: Key[];
|
|
25
25
|
isMultiple: boolean;
|
|
26
|
+
multiSelectAutoConfirm: boolean;
|
|
26
27
|
} & Pick<SelectBaseProps, "onInputChange" | "isLoading" | "hasLoadMore">;
|
|
27
|
-
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "fireBlurOnChange" | "searchDebounceDelay" | "onBlur">;
|
|
28
|
-
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, onBlur: fieldOnBlur, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "fireBlurOnChange" | "searchDebounceDelay" | "multiSelectAutoConfirm" | "onBlur">;
|
|
29
|
+
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, multiSelectAutoConfirm, onBlur: fieldOnBlur, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
29
30
|
export const useSelect: () => Type;
|
|
30
31
|
export {};
|
|
31
32
|
}
|
|
@@ -10,7 +10,7 @@ var SelectContext;
|
|
|
10
10
|
id: item.id,
|
|
11
11
|
label: item.label ?? item.name ?? ""
|
|
12
12
|
});
|
|
13
|
-
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, onBlur: fieldOnBlur, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
|
|
13
|
+
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
|
|
14
14
|
const isMultiple = props.selectionMode === "multiple";
|
|
15
15
|
const initialSelectedItems = useMemo(() => {
|
|
16
16
|
if (!props.initialSelection) return null;
|
|
@@ -189,6 +189,7 @@ var SelectContext;
|
|
|
189
189
|
selectedItems,
|
|
190
190
|
selectedIds,
|
|
191
191
|
isMultiple,
|
|
192
|
+
multiSelectAutoConfirm,
|
|
192
193
|
isLoading,
|
|
193
194
|
hasLoadMore
|
|
194
195
|
}), [
|
|
@@ -207,6 +208,7 @@ var SelectContext;
|
|
|
207
208
|
selectedIds,
|
|
208
209
|
selectedItems,
|
|
209
210
|
isMultiple,
|
|
211
|
+
multiSelectAutoConfirm,
|
|
210
212
|
isLoading,
|
|
211
213
|
hasLoadMore
|
|
212
214
|
]);
|
|
@@ -28,7 +28,7 @@ export declare namespace UIConfig {
|
|
|
28
28
|
numberInput: Pick<NumberInputProps, "formatOptions">;
|
|
29
29
|
radioGroup: Pick<RadioGroupProps, "variant" | "hideLabel" | "fireBlurOnChange">;
|
|
30
30
|
checkbox: Pick<CheckboxProps, "variant" | "fireBlurOnChange">;
|
|
31
|
-
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon" | "fireBlurOnChange">;
|
|
31
|
+
select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon" | "fireBlurOnChange" | "multiSelectAutoConfirm">;
|
|
32
32
|
queryAutocomplete: {
|
|
33
33
|
isInitialQueryDisabled?: boolean;
|
|
34
34
|
resolveSelectedItemsWithIds?: boolean;
|