@povio/ui 3.0.0-rc.1 → 3.0.0-rc.2
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/DateTime/DatePicker/DatePicker.js +2 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +10 -0
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +7 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +188 -207
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +13 -10
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +50 -45
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +5 -3
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +18 -11
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +1 -1
- package/dist/hooks/useQueryAutocomplete.js +17 -2
- package/package.json +1 -1
|
@@ -431,6 +431,16 @@ var DateRangePickerBase = (props) => {
|
|
|
431
431
|
};
|
|
432
432
|
const onInputClear = () => {
|
|
433
433
|
onChange?.(null);
|
|
434
|
+
dialogState.setValue(null);
|
|
435
|
+
leftCalendarState.setValue(null);
|
|
436
|
+
rightCalendarState.setValue(null);
|
|
437
|
+
setRangeSelection({
|
|
438
|
+
start: null,
|
|
439
|
+
end: null,
|
|
440
|
+
isSelecting: false
|
|
441
|
+
});
|
|
442
|
+
setHoverDate(null);
|
|
443
|
+
if (fireBlurOnChange) handleBlur(null);
|
|
434
444
|
};
|
|
435
445
|
const onOpenChange = (isOpen) => {
|
|
436
446
|
state.toggle();
|
|
@@ -152,6 +152,11 @@ var DateTimePickerBase = (props) => {
|
|
|
152
152
|
dialogState.setValue(currentValue);
|
|
153
153
|
calendarState.setFocusedDate(toCalendarDate(currentValue));
|
|
154
154
|
};
|
|
155
|
+
const onInputClear = () => {
|
|
156
|
+
onChange?.(null);
|
|
157
|
+
dialogState.setValue(null);
|
|
158
|
+
if (fireBlurOnChange) handleBlur(null);
|
|
159
|
+
};
|
|
155
160
|
const onOpenChange = (isOpen) => {
|
|
156
161
|
state.toggle();
|
|
157
162
|
calendarState.setFocusedDate(state.value || today(effectiveTimeZone));
|
|
@@ -219,7 +224,8 @@ var DateTimePickerBase = (props) => {
|
|
|
219
224
|
timeZone: effectiveTimeZone,
|
|
220
225
|
isTimeOptional,
|
|
221
226
|
format,
|
|
222
|
-
fireBlurOnChange
|
|
227
|
+
fireBlurOnChange,
|
|
228
|
+
onClear: onInputClear
|
|
223
229
|
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
224
230
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
225
231
|
isDisabled,
|
|
@@ -41,5 +41,5 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
41
41
|
fireBlurOnChange?: boolean;
|
|
42
42
|
onClear?: () => void;
|
|
43
43
|
}
|
|
44
|
-
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
45
|
export {};
|
|
@@ -15,18 +15,20 @@ import { clsx } from "clsx";
|
|
|
15
15
|
import { useImperativeHandle, useRef, useState } from "react";
|
|
16
16
|
import { Button } from "react-aria-components";
|
|
17
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
18
|
-
import { today } from "@internationalized/date";
|
|
18
|
+
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
19
19
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
20
|
var DatePickerInput = (t0) => {
|
|
21
|
-
const $ = c(
|
|
22
|
-
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
21
|
+
const $ = c(95);
|
|
22
|
+
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone: timeZoneProp, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
23
23
|
const todayIconButtonSize = t1 === void 0 ? "none" : t1;
|
|
24
24
|
const todayIconPlacement = t2 === void 0 ? "content" : t2;
|
|
25
25
|
const autoFixYear = t3 === void 0 ? false : t3;
|
|
26
26
|
const dateGranularity = t4 === void 0 ? "day" : t4;
|
|
27
27
|
const isTimeOptional = t5 === void 0 ? false : t5;
|
|
28
28
|
const uiConfig = UIConfig.useConfig();
|
|
29
|
-
const
|
|
29
|
+
const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
|
|
30
|
+
let effectiveTimeZone = getLocalTimeZone();
|
|
31
|
+
if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
|
|
30
32
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
31
33
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
32
34
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRow);
|
|
@@ -129,112 +131,91 @@ var DatePickerInput = (t0) => {
|
|
|
129
131
|
const onClearChange = t14;
|
|
130
132
|
const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
|
|
131
133
|
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
$[20] = effectiveTimeZone;
|
|
150
|
-
$[21] = endFieldProps;
|
|
151
|
-
$[22] = fieldProps;
|
|
152
|
-
$[23] = fireBlurOnChange;
|
|
153
|
-
$[24] = isDateTime;
|
|
154
|
-
$[25] = isTodayIconDisabled;
|
|
155
|
-
$[26] = t15;
|
|
156
|
-
} else t15 = $[26];
|
|
157
|
-
const onToday = t15;
|
|
134
|
+
const onToday = () => {
|
|
135
|
+
if (isTodayIconDisabled) return;
|
|
136
|
+
if (isDateTime) {
|
|
137
|
+
const calendarDateTime = DateTimeUtils.getCurrentWallClockCalendarDateTime();
|
|
138
|
+
fieldProps.onChange?.(calendarDateTime);
|
|
139
|
+
if (endFieldProps) endFieldProps.onChange?.(calendarDateTime);
|
|
140
|
+
} else {
|
|
141
|
+
fieldProps.onChange?.(today(effectiveTimeZone));
|
|
142
|
+
if (endFieldProps) endFieldProps.onChange?.(today(effectiveTimeZone));
|
|
143
|
+
}
|
|
144
|
+
if (fireBlurOnChange) {
|
|
145
|
+
fieldProps.onBlur?.(null);
|
|
146
|
+
endFieldProps?.onBlur?.(null);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
158
149
|
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
todayIconButtonComponent
|
|
166
|
-
});
|
|
167
|
-
$[27] = isTodayIconDisabled;
|
|
168
|
-
$[28] = onToday;
|
|
169
|
-
$[29] = todayIcon;
|
|
170
|
-
$[30] = todayIconButtonComponent;
|
|
171
|
-
$[31] = todayIconButtonSize;
|
|
172
|
-
$[32] = t16;
|
|
173
|
-
} else t16 = $[32];
|
|
174
|
-
const todayIconButton = t16;
|
|
150
|
+
const todayIconButton = renderDatePickerTodayIcon(todayIcon, {
|
|
151
|
+
isDisabled: isTodayIconDisabled,
|
|
152
|
+
onPress: onToday,
|
|
153
|
+
size: todayIconButtonSize,
|
|
154
|
+
todayIconButtonComponent
|
|
155
|
+
});
|
|
175
156
|
const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
|
|
176
157
|
const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
|
|
177
|
-
const
|
|
158
|
+
const t15 = clsx("group group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2", groupProps.className, inputBaseCva({
|
|
178
159
|
variant,
|
|
179
160
|
as,
|
|
180
161
|
...props
|
|
181
162
|
}), className);
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
163
|
+
const t16 = isHovered || void 0;
|
|
164
|
+
const t17 = isDisabled || void 0;
|
|
165
|
+
const t18 = isDisabled || void 0;
|
|
166
|
+
const t19 = isInvalid || void 0;
|
|
167
|
+
const t20 = normalizedFieldProps.value == null || void 0;
|
|
168
|
+
const t21 = isFocused || void 0;
|
|
169
|
+
const t22 = isFocused && isFocusVisible || void 0;
|
|
170
|
+
const t23 = normalizedFieldProps.value != null || void 0;
|
|
171
|
+
const t24 = isDirty || void 0;
|
|
172
|
+
const t25 = isRequired || void 0;
|
|
173
|
+
const t26 = normalizedFieldProps.value != null || void 0;
|
|
174
|
+
let t27;
|
|
175
|
+
if ($[20] !== as || $[21] !== inputSizeCva || $[22] !== size) {
|
|
176
|
+
t27 = clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeCva({
|
|
196
177
|
size,
|
|
197
178
|
as
|
|
198
179
|
}));
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
} else
|
|
204
|
-
let
|
|
205
|
-
if ($[
|
|
206
|
-
|
|
180
|
+
$[20] = as;
|
|
181
|
+
$[21] = inputSizeCva;
|
|
182
|
+
$[22] = size;
|
|
183
|
+
$[23] = t27;
|
|
184
|
+
} else t27 = $[23];
|
|
185
|
+
let t28;
|
|
186
|
+
if ($[24] !== as || $[25] !== headerProps) {
|
|
187
|
+
t28 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
207
188
|
as,
|
|
208
189
|
...headerProps
|
|
209
190
|
});
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
} else
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
} else
|
|
222
|
-
let
|
|
223
|
-
if ($[
|
|
224
|
-
|
|
191
|
+
$[24] = as;
|
|
192
|
+
$[25] = headerProps;
|
|
193
|
+
$[26] = t28;
|
|
194
|
+
} else t28 = $[26];
|
|
195
|
+
const t29 = shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
196
|
+
let t30;
|
|
197
|
+
if ($[27] !== datePickerInputContentRowCva || $[28] !== size) {
|
|
198
|
+
t30 = datePickerInputContentRowCva({ size });
|
|
199
|
+
$[27] = datePickerInputContentRowCva;
|
|
200
|
+
$[28] = size;
|
|
201
|
+
$[29] = t30;
|
|
202
|
+
} else t30 = $[29];
|
|
203
|
+
let t31;
|
|
204
|
+
if ($[30] !== disableManualEntry || $[31] !== isDisabled || $[32] !== onOpenDropdown) {
|
|
205
|
+
t31 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
225
206
|
onPress: onOpenDropdown,
|
|
226
207
|
className: "absolute inset-0 z-0",
|
|
227
208
|
isDisabled
|
|
228
209
|
});
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
} else
|
|
234
|
-
const
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
210
|
+
$[30] = disableManualEntry;
|
|
211
|
+
$[31] = isDisabled;
|
|
212
|
+
$[32] = onOpenDropdown;
|
|
213
|
+
$[33] = t31;
|
|
214
|
+
} else t31 = $[33];
|
|
215
|
+
const t32 = !shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
216
|
+
let t33;
|
|
217
|
+
if ($[34] !== as || $[35] !== dateGranularity || $[36] !== disableManualEntry || $[37] !== effectiveTimeZone || $[38] !== fieldProps || $[39] !== format || $[40] !== hidePlaceholder || $[41] !== isDisabled || $[42] !== isInvalid || $[43] !== isTimeOptional || $[44] !== normalizedEndFieldProps || $[45] !== normalizedFieldProps || $[46] !== onClearChange || $[47] !== placeholder) {
|
|
218
|
+
t33 = disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
238
219
|
size: "label-1",
|
|
239
220
|
className: "text-text-default-3",
|
|
240
221
|
children: placeholder
|
|
@@ -265,79 +246,79 @@ var DatePickerInput = (t0) => {
|
|
|
265
246
|
format,
|
|
266
247
|
timeZone: effectiveTimeZone
|
|
267
248
|
})] })] });
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
} else
|
|
284
|
-
let
|
|
285
|
-
if ($[
|
|
286
|
-
|
|
287
|
-
className:
|
|
249
|
+
$[34] = as;
|
|
250
|
+
$[35] = dateGranularity;
|
|
251
|
+
$[36] = disableManualEntry;
|
|
252
|
+
$[37] = effectiveTimeZone;
|
|
253
|
+
$[38] = fieldProps;
|
|
254
|
+
$[39] = format;
|
|
255
|
+
$[40] = hidePlaceholder;
|
|
256
|
+
$[41] = isDisabled;
|
|
257
|
+
$[42] = isInvalid;
|
|
258
|
+
$[43] = isTimeOptional;
|
|
259
|
+
$[44] = normalizedEndFieldProps;
|
|
260
|
+
$[45] = normalizedFieldProps;
|
|
261
|
+
$[46] = onClearChange;
|
|
262
|
+
$[47] = placeholder;
|
|
263
|
+
$[48] = t33;
|
|
264
|
+
} else t33 = $[48];
|
|
265
|
+
let t34;
|
|
266
|
+
if ($[49] !== t30 || $[50] !== t31 || $[51] !== t32 || $[52] !== t33) {
|
|
267
|
+
t34 = /* @__PURE__ */ jsxs("div", {
|
|
268
|
+
className: t30,
|
|
288
269
|
children: [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
270
|
+
t31,
|
|
271
|
+
t32,
|
|
272
|
+
t33
|
|
292
273
|
]
|
|
293
274
|
});
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
} else
|
|
300
|
-
let
|
|
301
|
-
if ($[
|
|
302
|
-
|
|
303
|
-
className:
|
|
275
|
+
$[49] = t30;
|
|
276
|
+
$[50] = t31;
|
|
277
|
+
$[51] = t32;
|
|
278
|
+
$[52] = t33;
|
|
279
|
+
$[53] = t34;
|
|
280
|
+
} else t34 = $[53];
|
|
281
|
+
let t35;
|
|
282
|
+
if ($[54] !== t27 || $[55] !== t28 || $[56] !== t29 || $[57] !== t34) {
|
|
283
|
+
t35 = /* @__PURE__ */ jsxs("div", {
|
|
284
|
+
className: t27,
|
|
304
285
|
children: [
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
286
|
+
t28,
|
|
287
|
+
t29,
|
|
288
|
+
t34
|
|
308
289
|
]
|
|
309
290
|
});
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
} else
|
|
316
|
-
let
|
|
317
|
-
if ($[
|
|
318
|
-
|
|
291
|
+
$[54] = t27;
|
|
292
|
+
$[55] = t28;
|
|
293
|
+
$[56] = t29;
|
|
294
|
+
$[57] = t34;
|
|
295
|
+
$[58] = t35;
|
|
296
|
+
} else t35 = $[58];
|
|
297
|
+
let t36;
|
|
298
|
+
if ($[59] !== as || $[60] !== inputSizeCva || $[61] !== size) {
|
|
299
|
+
t36 = clsx(inputSizeCva({
|
|
319
300
|
size,
|
|
320
301
|
as
|
|
321
302
|
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
} else
|
|
327
|
-
let
|
|
328
|
-
if ($[
|
|
329
|
-
|
|
303
|
+
$[59] = as;
|
|
304
|
+
$[60] = inputSizeCva;
|
|
305
|
+
$[61] = size;
|
|
306
|
+
$[62] = t36;
|
|
307
|
+
} else t36 = $[62];
|
|
308
|
+
let t37;
|
|
309
|
+
if ($[63] !== clearInput || $[64] !== isClearable || $[65] !== showClear) {
|
|
310
|
+
t37 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
330
311
|
onClear: clearInput,
|
|
331
312
|
show: showClear
|
|
332
313
|
});
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
} else
|
|
338
|
-
let
|
|
339
|
-
if ($[
|
|
340
|
-
|
|
314
|
+
$[63] = clearInput;
|
|
315
|
+
$[64] = isClearable;
|
|
316
|
+
$[65] = showClear;
|
|
317
|
+
$[66] = t37;
|
|
318
|
+
} else t37 = $[66];
|
|
319
|
+
let t38;
|
|
320
|
+
if ($[67] !== buttonProps || $[68] !== disableDropdown || $[69] !== disableManualEntry || $[70] !== isDisabled || $[71] !== pickerIcon) {
|
|
321
|
+
t38 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
341
322
|
label: "",
|
|
342
323
|
color: "secondary",
|
|
343
324
|
...buttonProps,
|
|
@@ -345,67 +326,67 @@ var DatePickerInput = (t0) => {
|
|
|
345
326
|
isDisabled,
|
|
346
327
|
className: "border-0!"
|
|
347
328
|
});
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
} else
|
|
355
|
-
let
|
|
356
|
-
if ($[
|
|
357
|
-
|
|
358
|
-
className:
|
|
359
|
-
children: [
|
|
329
|
+
$[67] = buttonProps;
|
|
330
|
+
$[68] = disableDropdown;
|
|
331
|
+
$[69] = disableManualEntry;
|
|
332
|
+
$[70] = isDisabled;
|
|
333
|
+
$[71] = pickerIcon;
|
|
334
|
+
$[72] = t38;
|
|
335
|
+
} else t38 = $[72];
|
|
336
|
+
let t39;
|
|
337
|
+
if ($[73] !== t36 || $[74] !== t37 || $[75] !== t38) {
|
|
338
|
+
t39 = /* @__PURE__ */ jsxs("div", {
|
|
339
|
+
className: t36,
|
|
340
|
+
children: [t37, t38]
|
|
360
341
|
});
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
} else
|
|
366
|
-
let
|
|
367
|
-
if ($[
|
|
368
|
-
|
|
342
|
+
$[73] = t36;
|
|
343
|
+
$[74] = t37;
|
|
344
|
+
$[75] = t38;
|
|
345
|
+
$[76] = t39;
|
|
346
|
+
} else t39 = $[76];
|
|
347
|
+
let t40;
|
|
348
|
+
if ($[77] !== focusWithinProps || $[78] !== groupProps || $[79] !== hoverProps || $[80] !== t15 || $[81] !== t16 || $[82] !== t17 || $[83] !== t18 || $[84] !== t19 || $[85] !== t20 || $[86] !== t21 || $[87] !== t22 || $[88] !== t23 || $[89] !== t24 || $[90] !== t25 || $[91] !== t26 || $[92] !== t35 || $[93] !== t39) {
|
|
349
|
+
t40 = /* @__PURE__ */ jsxs("div", {
|
|
369
350
|
ref: containerRef,
|
|
370
351
|
...groupProps,
|
|
371
352
|
...focusWithinProps,
|
|
372
353
|
...hoverProps,
|
|
373
|
-
className:
|
|
354
|
+
className: t15,
|
|
374
355
|
"data-rac": "",
|
|
375
356
|
"data-datetime-input": "",
|
|
376
|
-
"data-hovered":
|
|
377
|
-
"data-disabled":
|
|
378
|
-
"data-is-disabled":
|
|
379
|
-
"data-invalid":
|
|
380
|
-
"data-is-empty":
|
|
381
|
-
"data-focus-within":
|
|
382
|
-
"data-focus-visible":
|
|
383
|
-
"data-has-selection":
|
|
384
|
-
"data-is-dirty":
|
|
385
|
-
"data-is-required":
|
|
386
|
-
"data-is-filled":
|
|
387
|
-
children: [
|
|
357
|
+
"data-hovered": t16,
|
|
358
|
+
"data-disabled": t17,
|
|
359
|
+
"data-is-disabled": t18,
|
|
360
|
+
"data-invalid": t19,
|
|
361
|
+
"data-is-empty": t20,
|
|
362
|
+
"data-focus-within": t21,
|
|
363
|
+
"data-focus-visible": t22,
|
|
364
|
+
"data-has-selection": t23,
|
|
365
|
+
"data-is-dirty": t24,
|
|
366
|
+
"data-is-required": t25,
|
|
367
|
+
"data-is-filled": t26,
|
|
368
|
+
children: [t35, t39]
|
|
388
369
|
});
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else
|
|
408
|
-
return
|
|
370
|
+
$[77] = focusWithinProps;
|
|
371
|
+
$[78] = groupProps;
|
|
372
|
+
$[79] = hoverProps;
|
|
373
|
+
$[80] = t15;
|
|
374
|
+
$[81] = t16;
|
|
375
|
+
$[82] = t17;
|
|
376
|
+
$[83] = t18;
|
|
377
|
+
$[84] = t19;
|
|
378
|
+
$[85] = t20;
|
|
379
|
+
$[86] = t21;
|
|
380
|
+
$[87] = t22;
|
|
381
|
+
$[88] = t23;
|
|
382
|
+
$[89] = t24;
|
|
383
|
+
$[90] = t25;
|
|
384
|
+
$[91] = t26;
|
|
385
|
+
$[92] = t35;
|
|
386
|
+
$[93] = t39;
|
|
387
|
+
$[94] = t40;
|
|
388
|
+
} else t40 = $[94];
|
|
389
|
+
return t40;
|
|
409
390
|
};
|
|
410
391
|
//#endregion
|
|
411
392
|
export { DatePickerInput };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
2
|
import { Autocomplete } from "./Autocomplete.js";
|
|
3
|
-
import { getQueryItems,
|
|
3
|
+
import { getQueryItems, getSelectionIdsToResolve } from "../shared/querySelect.utils.js";
|
|
4
4
|
import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -13,25 +13,28 @@ var QueryAutocompleteContent = ({ query, queryParams, queryOptions, queryMap, le
|
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
14
|
const [search, setSearch] = useState("");
|
|
15
15
|
const { onChange, ...restProps } = props;
|
|
16
|
+
const value = "value" in props ? props.value : void 0;
|
|
17
|
+
const selectedIdsToResolve = getSelectionIdsToResolve({
|
|
18
|
+
initialSelection: props.initialSelection,
|
|
19
|
+
value,
|
|
20
|
+
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
21
|
+
});
|
|
16
22
|
const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete({
|
|
17
23
|
query,
|
|
18
24
|
queryParams,
|
|
19
25
|
queryOptions,
|
|
20
26
|
mapItems: (data) => getQueryItems(data, queryMap),
|
|
21
27
|
search,
|
|
22
|
-
initialQueryState:
|
|
23
|
-
|
|
24
|
-
value: "value" in props ? props.value : void 0,
|
|
25
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
26
|
-
}) ? false : props.isInitialQueryDisabled ?? ui.queryAutocomplete?.isInitialQueryDisabled
|
|
28
|
+
initialQueryState: selectedIdsToResolve.count > 0 ? false : props.isInitialQueryDisabled ?? ui.queryAutocomplete?.isInitialQueryDisabled,
|
|
29
|
+
selectedIdsToResolve: selectedIdsToResolve.items
|
|
27
30
|
});
|
|
28
|
-
const handleChange = (
|
|
29
|
-
onChange?.(
|
|
31
|
+
const handleChange = (value_0) => {
|
|
32
|
+
onChange?.(value_0);
|
|
30
33
|
props.onBlur?.({ target: { value: null } });
|
|
31
34
|
};
|
|
32
35
|
const { isInitialQueryDisabled: _, ...autocompleteProps } = restProps;
|
|
33
|
-
const onSearchChange = (
|
|
34
|
-
setSearch(
|
|
36
|
+
const onSearchChange = (value_1) => {
|
|
37
|
+
setSearch(value_1);
|
|
35
38
|
handleEnableQuery();
|
|
36
39
|
};
|
|
37
40
|
return /* @__PURE__ */ jsx(Autocomplete, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
2
|
import { Select } from "./Select.js";
|
|
3
|
-
import { getQueryItems,
|
|
3
|
+
import { getQueryItems, getSelectionIdsToResolve } from "../shared/querySelect.utils.js";
|
|
4
4
|
import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -9,11 +9,18 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
9
9
|
import { Controller } from "react-hook-form";
|
|
10
10
|
//#region src/components/inputs/Selection/Select/QuerySelect.tsx
|
|
11
11
|
var QuerySelectContent = (t0) => {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(29);
|
|
13
13
|
const { query, queryParams, queryOptions, queryMap, ...props } = t0;
|
|
14
14
|
const ui = UIConfig.useConfig();
|
|
15
15
|
const [search, setSearch] = useState("");
|
|
16
16
|
const isSearchable = props.isSearchable ?? ui.select.isSearchable;
|
|
17
|
+
const value = "value" in props ? props.value : void 0;
|
|
18
|
+
const selectedIdsToResolve = getSelectionIdsToResolve({
|
|
19
|
+
initialSelection: props.initialSelection,
|
|
20
|
+
value,
|
|
21
|
+
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
22
|
+
});
|
|
23
|
+
const shouldEnableInitialQuery = selectedIdsToResolve.count > 0;
|
|
17
24
|
let t1;
|
|
18
25
|
if ($[0] !== queryMap) {
|
|
19
26
|
t1 = (data) => getQueryItems(data, queryMap);
|
|
@@ -21,68 +28,66 @@ var QuerySelectContent = (t0) => {
|
|
|
21
28
|
$[1] = t1;
|
|
22
29
|
} else t1 = $[1];
|
|
23
30
|
const t2 = isSearchable ? search : void 0;
|
|
24
|
-
const t3 =
|
|
25
|
-
initialSelection: props.initialSelection,
|
|
26
|
-
value: "value" in props ? props.value : void 0,
|
|
27
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
28
|
-
}) ? false : props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
|
|
31
|
+
const t3 = shouldEnableInitialQuery ? false : props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
|
|
29
32
|
let t4;
|
|
30
|
-
if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !==
|
|
33
|
+
if ($[2] !== query || $[3] !== queryOptions || $[4] !== queryParams || $[5] !== selectedIdsToResolve.items || $[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
|
|
31
34
|
t4 = {
|
|
32
35
|
query,
|
|
33
36
|
queryParams,
|
|
34
37
|
queryOptions,
|
|
35
38
|
mapItems: t1,
|
|
36
39
|
search: t2,
|
|
37
|
-
initialQueryState: t3
|
|
40
|
+
initialQueryState: t3,
|
|
41
|
+
selectedIdsToResolve: selectedIdsToResolve.items
|
|
38
42
|
};
|
|
39
43
|
$[2] = query;
|
|
40
44
|
$[3] = queryOptions;
|
|
41
45
|
$[4] = queryParams;
|
|
42
|
-
$[5] =
|
|
43
|
-
$[6] =
|
|
44
|
-
$[7] =
|
|
45
|
-
$[8] =
|
|
46
|
-
|
|
46
|
+
$[5] = selectedIdsToResolve.items;
|
|
47
|
+
$[6] = t1;
|
|
48
|
+
$[7] = t2;
|
|
49
|
+
$[8] = t3;
|
|
50
|
+
$[9] = t4;
|
|
51
|
+
} else t4 = $[9];
|
|
47
52
|
const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete(t4);
|
|
48
53
|
let onSearchChange;
|
|
49
54
|
let selectProps;
|
|
50
|
-
if ($[
|
|
55
|
+
if ($[10] !== props) {
|
|
51
56
|
const { isInitialQueryDisabled: _, onSearchChange: t5, ...t6 } = props;
|
|
52
57
|
onSearchChange = t5;
|
|
53
58
|
selectProps = t6;
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
59
|
+
$[10] = props;
|
|
60
|
+
$[11] = onSearchChange;
|
|
61
|
+
$[12] = selectProps;
|
|
57
62
|
} else {
|
|
58
|
-
onSearchChange = $[
|
|
59
|
-
selectProps = $[
|
|
63
|
+
onSearchChange = $[11];
|
|
64
|
+
selectProps = $[12];
|
|
60
65
|
}
|
|
61
66
|
let t5;
|
|
62
|
-
if ($[
|
|
63
|
-
t5 = (
|
|
64
|
-
setSearch(
|
|
67
|
+
if ($[13] !== handleEnableQuery || $[14] !== onSearchChange || $[15] !== setSearch) {
|
|
68
|
+
t5 = (value_0) => {
|
|
69
|
+
setSearch(value_0);
|
|
65
70
|
handleEnableQuery();
|
|
66
|
-
onSearchChange?.(
|
|
71
|
+
onSearchChange?.(value_0);
|
|
67
72
|
};
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
} else t5 = $[
|
|
73
|
+
$[13] = handleEnableQuery;
|
|
74
|
+
$[14] = onSearchChange;
|
|
75
|
+
$[15] = setSearch;
|
|
76
|
+
$[16] = t5;
|
|
77
|
+
} else t5 = $[16];
|
|
73
78
|
const handleSearchChange = t5;
|
|
74
79
|
let t6;
|
|
75
|
-
if ($[
|
|
80
|
+
if ($[17] !== handleSearchChange || $[18] !== isSearchable) {
|
|
76
81
|
t6 = isSearchable && {
|
|
77
82
|
isClientSearchDisabled: true,
|
|
78
83
|
onSearchChange: handleSearchChange
|
|
79
84
|
};
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else t6 = $[
|
|
85
|
+
$[17] = handleSearchChange;
|
|
86
|
+
$[18] = isSearchable;
|
|
87
|
+
$[19] = t6;
|
|
88
|
+
} else t6 = $[19];
|
|
84
89
|
let t7;
|
|
85
|
-
if ($[
|
|
90
|
+
if ($[20] !== fetchNextPage || $[21] !== handleEnableQuery || $[22] !== hasNextPage || $[23] !== isLoading || $[24] !== items || $[25] !== selectProps || $[26] !== t6 || $[27] !== totalItems) {
|
|
86
91
|
t7 = /* @__PURE__ */ jsx(Select, {
|
|
87
92
|
...selectProps,
|
|
88
93
|
items,
|
|
@@ -94,16 +99,16 @@ var QuerySelectContent = (t0) => {
|
|
|
94
99
|
onFocusCapture: handleEnableQuery,
|
|
95
100
|
...t6
|
|
96
101
|
});
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else t7 = $[
|
|
102
|
+
$[20] = fetchNextPage;
|
|
103
|
+
$[21] = handleEnableQuery;
|
|
104
|
+
$[22] = hasNextPage;
|
|
105
|
+
$[23] = isLoading;
|
|
106
|
+
$[24] = items;
|
|
107
|
+
$[25] = selectProps;
|
|
108
|
+
$[26] = t6;
|
|
109
|
+
$[27] = totalItems;
|
|
110
|
+
$[28] = t7;
|
|
111
|
+
} else t7 = $[28];
|
|
107
112
|
return t7;
|
|
108
113
|
};
|
|
109
114
|
var QuerySelect = (props) => {
|
|
@@ -3,10 +3,12 @@ import { Key } from 'react-aria-components';
|
|
|
3
3
|
import { SelectItem } from './select.types';
|
|
4
4
|
export type QueryFn<TData = any> = (...args: any[]) => UseQueryResult<TData> | UseInfiniteQueryResult<TData>;
|
|
5
5
|
export type QueryDataType<TQueryFn extends QueryFn> = Exclude<ReturnType<TQueryFn>["data"], undefined>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const shouldEnableQueryForSelection: <TInitialSelectItem, TKey extends Key = Key>({ initialSelection, value, mapInitialToSelectItem, }: {
|
|
6
|
+
export declare const getSelectionIdsToResolve: <TInitialSelectItem, TKey extends Key = Key>({ initialSelection, value, mapInitialToSelectItem, }: {
|
|
8
7
|
initialSelection: TInitialSelectItem | TInitialSelectItem[] | null | undefined;
|
|
9
8
|
value: TKey | TKey[] | null | undefined;
|
|
10
9
|
mapInitialToSelectItem?: (item: TInitialSelectItem) => SelectItem<TKey>;
|
|
11
|
-
}) =>
|
|
10
|
+
}) => {
|
|
11
|
+
count: number;
|
|
12
|
+
items: TKey[];
|
|
13
|
+
};
|
|
12
14
|
export declare const getQueryItems: <TQueryFn extends QueryFn, TKey extends Key = Key>(data: QueryDataType<TQueryFn> | undefined, queryMap?: (data: QueryDataType<TQueryFn>) => SelectItem<TKey>[]) => SelectItem<TKey>[];
|
|
@@ -9,18 +9,25 @@ var getInitialSelectionItems = (initialSelection) => {
|
|
|
9
9
|
return Array.isArray(initialSelection) ? initialSelection : initialSelection != null ? [initialSelection] : [];
|
|
10
10
|
};
|
|
11
11
|
var getInitialSelectionLabel = (initialSelection, mapInitialToSelectItem) => mapInitialToSelectItem?.(initialSelection).label ?? getDefaultInitialSelectionLabel(initialSelection);
|
|
12
|
-
var
|
|
13
|
-
return getInitialSelectionItems(initialSelection).some((item) => {
|
|
14
|
-
return getInitialSelectionLabel(item, mapInitialToSelectItem) === "";
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
var shouldEnableQueryForSelection = ({ initialSelection, value, mapInitialToSelectItem }) => {
|
|
18
|
-
if (isInitialSelectionLabelMissing(initialSelection, mapInitialToSelectItem)) return true;
|
|
12
|
+
var getSelectionIdsToResolve = ({ initialSelection, value, mapInitialToSelectItem }) => {
|
|
19
13
|
const values = Array.isArray(value) ? value : value != null ? [value] : [];
|
|
20
|
-
if (values.length === 0) return false;
|
|
21
14
|
const initialSelections = getInitialSelectionItems(initialSelection);
|
|
22
|
-
const labeledInitialSelectionIds =
|
|
23
|
-
|
|
15
|
+
const labeledInitialSelectionIds = /* @__PURE__ */ new Set();
|
|
16
|
+
const missingLabelInitialSelectionIds = [];
|
|
17
|
+
initialSelections.forEach((item) => {
|
|
18
|
+
const id = (mapInitialToSelectItem?.(item))?.id ?? item.id;
|
|
19
|
+
if (id == null) return;
|
|
20
|
+
if (getInitialSelectionLabel(item, mapInitialToSelectItem) === "") {
|
|
21
|
+
missingLabelInitialSelectionIds.push(id);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
labeledInitialSelectionIds.add(id);
|
|
25
|
+
});
|
|
26
|
+
const items = Array.from(new Set([...missingLabelInitialSelectionIds, ...values.filter((id) => !labeledInitialSelectionIds.has(id))]));
|
|
27
|
+
return {
|
|
28
|
+
count: items.length,
|
|
29
|
+
items
|
|
30
|
+
};
|
|
24
31
|
};
|
|
25
32
|
var getQueryItems = (data, queryMap) => {
|
|
26
33
|
if (!data) return [];
|
|
@@ -33,4 +40,4 @@ var getQueryItems = (data, queryMap) => {
|
|
|
33
40
|
return [];
|
|
34
41
|
};
|
|
35
42
|
//#endregion
|
|
36
|
-
export { getQueryItems,
|
|
43
|
+
export { getQueryItems, getSelectionIdsToResolve };
|
|
@@ -41,7 +41,7 @@ export declare namespace UIConfig {
|
|
|
41
41
|
dateTimeIcon?: ReactElement;
|
|
42
42
|
timeIcon?: ReactElement;
|
|
43
43
|
setDateValueOnDateSelection?: boolean;
|
|
44
|
-
timeZone
|
|
44
|
+
timeZone?: string;
|
|
45
45
|
todayIconButtonComponent?: DatePickerProps["todayIconButtonComponent"];
|
|
46
46
|
};
|
|
47
47
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InfiniteData } from '@tanstack/react-query';
|
|
2
2
|
import { Key } from 'react-aria-components';
|
|
3
3
|
import { InfiniteQueryPage, QueryFn, UseQueryAutocompleteOptions } from '../components/inputs/Selection/Autocomplete/queryAutocomplete.types';
|
|
4
|
-
export declare const useQueryAutocomplete: <TQueryFn extends QueryFn, TKey extends Key = Key>({ query, queryParams, queryOptions, mapItems, initialQueryState, search, }: UseQueryAutocompleteOptions<TQueryFn, TKey>) => {
|
|
4
|
+
export declare const useQueryAutocomplete: <TQueryFn extends QueryFn, TKey extends Key = Key>({ query, queryParams, queryOptions, mapItems, initialQueryState, search, selectedIdsToResolve, }: UseQueryAutocompleteOptions<TQueryFn, TKey>) => {
|
|
5
5
|
data: any;
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
isQueryEnabled: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ApiQueryUtils } from "../utils/query.utils.js";
|
|
2
|
-
import { useMemo, useState } from "react";
|
|
2
|
+
import { useEffect, useMemo, useState } from "react";
|
|
3
3
|
//#region src/hooks/useQueryAutocomplete.ts
|
|
4
4
|
var isFilterSearchParams = (params) => {
|
|
5
5
|
return typeof params === "object" && params !== null && "filter" in params;
|
|
6
6
|
};
|
|
7
|
-
var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initialQueryState, search }) => {
|
|
7
|
+
var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initialQueryState, search, selectedIdsToResolve = [] }) => {
|
|
8
8
|
"use no memo";
|
|
9
9
|
const [isQueryEnabled, setIsQueryEnabled] = useState(!initialQueryState);
|
|
10
10
|
const queryResult = query(search === void 0 ? queryParams : {
|
|
@@ -41,6 +41,21 @@ var useQueryAutocomplete = ({ query, queryParams, queryOptions, mapItems, initia
|
|
|
41
41
|
isInfiniteQuery,
|
|
42
42
|
mapItems
|
|
43
43
|
]);
|
|
44
|
+
const selectedIdsToResolveSet = useMemo(() => new Set(selectedIdsToResolve), [selectedIdsToResolve]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!isQueryEnabled || !isInfiniteQuery || !fetchNextPage || !hasNextPage || isFetchingNextPage || selectedIdsToResolveSet.size === 0) return;
|
|
47
|
+
const loadedItemIds = new Set(items.map((item) => item.id));
|
|
48
|
+
if (selectedIdsToResolve.some((id) => !loadedItemIds.has(id))) fetchNextPage();
|
|
49
|
+
}, [
|
|
50
|
+
fetchNextPage,
|
|
51
|
+
hasNextPage,
|
|
52
|
+
isFetchingNextPage,
|
|
53
|
+
isInfiniteQuery,
|
|
54
|
+
isQueryEnabled,
|
|
55
|
+
items,
|
|
56
|
+
selectedIdsToResolve,
|
|
57
|
+
selectedIdsToResolveSet
|
|
58
|
+
]);
|
|
44
59
|
return {
|
|
45
60
|
data,
|
|
46
61
|
isLoading: isLoading || isFetchingNextPage,
|