@backstage/plugin-search-react 1.2.1 → 1.2.2-next.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/CHANGELOG.md +25 -0
- package/dist/index.esm.js +427 -395
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -9
package/dist/index.esm.js
CHANGED
|
@@ -45,10 +45,7 @@ const HighlightedSearchResultText = ({
|
|
|
45
45
|
[postTag, preTag, text]
|
|
46
46
|
);
|
|
47
47
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, terms.map(
|
|
48
|
-
(t, idx) => t.includes(preTag) ? /* @__PURE__ */ React.createElement("mark", {
|
|
49
|
-
className: classes.highlight,
|
|
50
|
-
key: idx
|
|
51
|
-
}, t.replace(new RegExp(`${preTag}|${postTag}`, "g"), "")) : t
|
|
48
|
+
(t, idx) => t.includes(preTag) ? /* @__PURE__ */ React.createElement("mark", { className: classes.highlight, key: idx }, t.replace(new RegExp(`${preTag}|${postTag}`, "g"), "")) : t
|
|
52
49
|
));
|
|
53
50
|
};
|
|
54
51
|
|
|
@@ -139,18 +136,18 @@ const useSearchContextValue = (initialValue = searchInitialState) => {
|
|
|
139
136
|
const LocalSearchContext = (props) => {
|
|
140
137
|
const { initialState, children } = props;
|
|
141
138
|
const value = useSearchContextValue(initialState);
|
|
142
|
-
return /* @__PURE__ */ React.createElement(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
return /* @__PURE__ */ React.createElement(
|
|
140
|
+
AnalyticsContext,
|
|
141
|
+
{
|
|
142
|
+
attributes: { searchTypes: value.types.sort().join(",") }
|
|
143
|
+
},
|
|
144
|
+
/* @__PURE__ */ React.createElement(SearchContext.Provider, { value: createVersionedValueMap({ 1: value }) }, children)
|
|
145
|
+
);
|
|
147
146
|
};
|
|
148
147
|
const SearchContextProvider = (props) => {
|
|
149
148
|
const { initialState, inheritParentContextIfAvailable, children } = props;
|
|
150
149
|
const hasParentContext = useSearchContextCheck();
|
|
151
|
-
return hasParentContext && inheritParentContextIfAvailable ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement(LocalSearchContext, {
|
|
152
|
-
initialState
|
|
153
|
-
}, children);
|
|
150
|
+
return hasParentContext && inheritParentContextIfAvailable ? /* @__PURE__ */ React.createElement(React.Fragment, null, children) : /* @__PURE__ */ React.createElement(LocalSearchContext, { initialState }, children);
|
|
154
151
|
};
|
|
155
152
|
|
|
156
153
|
const TrackSearch = ({ children }) => {
|
|
@@ -165,12 +162,7 @@ const TrackSearch = ({ children }) => {
|
|
|
165
162
|
};
|
|
166
163
|
|
|
167
164
|
function withContext$1(Component) {
|
|
168
|
-
return forwardRef((props, ref) => /* @__PURE__ */ React.createElement(SearchContextProvider, {
|
|
169
|
-
inheritParentContextIfAvailable: true
|
|
170
|
-
}, /* @__PURE__ */ React.createElement(Component, {
|
|
171
|
-
...props,
|
|
172
|
-
ref
|
|
173
|
-
})));
|
|
165
|
+
return forwardRef((props, ref) => /* @__PURE__ */ React.createElement(SearchContextProvider, { inheritParentContextIfAvailable: true }, /* @__PURE__ */ React.createElement(Component, { ...props, ref })));
|
|
174
166
|
}
|
|
175
167
|
const SearchBarBase = withContext$1(
|
|
176
168
|
forwardRef((props, ref) => {
|
|
@@ -222,33 +214,24 @@ const SearchBarBase = withContext$1(
|
|
|
222
214
|
}
|
|
223
215
|
}, [onChange, onClear]);
|
|
224
216
|
const placeholder = defaultPlaceholder != null ? defaultPlaceholder : `Search in ${configApi.getOptionalString("app.title") || "Backstage"}`;
|
|
225
|
-
const startAdornment = /* @__PURE__ */ React.createElement(InputAdornment, {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
placeholder,
|
|
244
|
-
startAdornment,
|
|
245
|
-
endAdornment: clearButton ? endAdornment : defaultEndAdornment,
|
|
246
|
-
inputProps: { "aria-label": "Search", ...defaultInputProps },
|
|
247
|
-
fullWidth,
|
|
248
|
-
onChange: handleChange,
|
|
249
|
-
onKeyDown: handleKeyDown,
|
|
250
|
-
...rest
|
|
251
|
-
}));
|
|
217
|
+
const startAdornment = /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React.createElement(IconButton, { "aria-label": "Query", size: "small", disabled: true }, /* @__PURE__ */ React.createElement(SearchIcon, null)));
|
|
218
|
+
const endAdornment = /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, /* @__PURE__ */ React.createElement(IconButton, { "aria-label": "Clear", size: "small", onClick: handleClear }, /* @__PURE__ */ React.createElement(ClearButton, null)));
|
|
219
|
+
return /* @__PURE__ */ React.createElement(TrackSearch, null, /* @__PURE__ */ React.createElement(
|
|
220
|
+
InputBase,
|
|
221
|
+
{
|
|
222
|
+
"data-testid": "search-bar-next",
|
|
223
|
+
ref,
|
|
224
|
+
value,
|
|
225
|
+
placeholder,
|
|
226
|
+
startAdornment,
|
|
227
|
+
endAdornment: clearButton ? endAdornment : defaultEndAdornment,
|
|
228
|
+
inputProps: { "aria-label": "Search", ...defaultInputProps },
|
|
229
|
+
fullWidth,
|
|
230
|
+
onChange: handleChange,
|
|
231
|
+
onKeyDown: handleKeyDown,
|
|
232
|
+
...rest
|
|
233
|
+
}
|
|
234
|
+
));
|
|
252
235
|
})
|
|
253
236
|
);
|
|
254
237
|
const SearchBar = withContext$1(
|
|
@@ -270,23 +253,26 @@ const SearchBar = withContext$1(
|
|
|
270
253
|
},
|
|
271
254
|
[onChange, setTerm]
|
|
272
255
|
);
|
|
273
|
-
return /* @__PURE__ */ React.createElement(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
256
|
+
return /* @__PURE__ */ React.createElement(
|
|
257
|
+
AnalyticsContext,
|
|
258
|
+
{
|
|
259
|
+
attributes: { pluginId: "search", extension: "SearchBar" }
|
|
260
|
+
},
|
|
261
|
+
/* @__PURE__ */ React.createElement(
|
|
262
|
+
SearchBarBase,
|
|
263
|
+
{
|
|
264
|
+
...rest,
|
|
265
|
+
ref,
|
|
266
|
+
value: term,
|
|
267
|
+
onChange: handleChange
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
);
|
|
281
271
|
})
|
|
282
272
|
);
|
|
283
273
|
|
|
284
274
|
const withContext = (Component) => {
|
|
285
|
-
return (props) => /* @__PURE__ */ React.createElement(SearchContextProvider, {
|
|
286
|
-
inheritParentContextIfAvailable: true
|
|
287
|
-
}, /* @__PURE__ */ React.createElement(Component, {
|
|
288
|
-
...props
|
|
289
|
-
}));
|
|
275
|
+
return (props) => /* @__PURE__ */ React.createElement(SearchContextProvider, { inheritParentContextIfAvailable: true }, /* @__PURE__ */ React.createElement(Component, { ...props }));
|
|
290
276
|
};
|
|
291
277
|
const SearchAutocomplete = withContext(
|
|
292
278
|
function SearchAutocompleteComponent(props) {
|
|
@@ -332,33 +318,42 @@ const SearchAutocomplete = withContext(
|
|
|
332
318
|
InputProps: { ref, endAdornment },
|
|
333
319
|
InputLabelProps,
|
|
334
320
|
...params
|
|
335
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
321
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
322
|
+
SearchBar,
|
|
323
|
+
{
|
|
324
|
+
...params,
|
|
325
|
+
ref,
|
|
326
|
+
clearButton: false,
|
|
327
|
+
value: inputValue,
|
|
328
|
+
placeholder: inputPlaceholder,
|
|
329
|
+
debounceTime: inputDebounceTime,
|
|
330
|
+
endAdornment: loading ? /* @__PURE__ */ React.createElement(
|
|
331
|
+
CircularProgress,
|
|
332
|
+
{
|
|
333
|
+
"data-testid": "search-autocomplete-progressbar",
|
|
334
|
+
color: "inherit",
|
|
335
|
+
size: 20
|
|
336
|
+
}
|
|
337
|
+
) : endAdornment
|
|
338
|
+
}
|
|
339
|
+
),
|
|
348
340
|
[loading, inputValue, inputPlaceholder, inputDebounceTime]
|
|
349
341
|
);
|
|
350
|
-
return /* @__PURE__ */ React.createElement(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
342
|
+
return /* @__PURE__ */ React.createElement(
|
|
343
|
+
Autocomplete,
|
|
344
|
+
{
|
|
345
|
+
...rest,
|
|
346
|
+
"data-testid": dataTestId,
|
|
347
|
+
value,
|
|
348
|
+
onChange: handleChange,
|
|
349
|
+
options,
|
|
350
|
+
getOptionLabel,
|
|
351
|
+
renderInput,
|
|
352
|
+
freeSolo,
|
|
353
|
+
fullWidth,
|
|
354
|
+
clearOnBlur
|
|
355
|
+
}
|
|
356
|
+
);
|
|
362
357
|
}
|
|
363
358
|
);
|
|
364
359
|
|
|
@@ -369,13 +364,16 @@ const SearchAutocompleteDefaultOption = ({
|
|
|
369
364
|
secondaryText,
|
|
370
365
|
secondaryTextTypographyProps,
|
|
371
366
|
disableTextTypography
|
|
372
|
-
}) => /* @__PURE__ */ React.createElement(React.Fragment, null, icon ? /* @__PURE__ */ React.createElement(ListItemIcon, null, icon) : null, /* @__PURE__ */ React.createElement(
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
367
|
+
}) => /* @__PURE__ */ React.createElement(React.Fragment, null, icon ? /* @__PURE__ */ React.createElement(ListItemIcon, null, icon) : null, /* @__PURE__ */ React.createElement(
|
|
368
|
+
ListItemText,
|
|
369
|
+
{
|
|
370
|
+
primary: primaryText,
|
|
371
|
+
primaryTypographyProps: primaryTextTypographyProps,
|
|
372
|
+
secondary: secondaryText,
|
|
373
|
+
secondaryTypographyProps: secondaryTextTypographyProps,
|
|
374
|
+
disableTypography: disableTextTypography
|
|
375
|
+
}
|
|
376
|
+
));
|
|
379
377
|
|
|
380
378
|
const useAsyncFilterValues = (fn, inputValue, defaultValues = [], debounce = 250) => {
|
|
381
379
|
const valuesMemo = useRef({});
|
|
@@ -455,32 +453,34 @@ const AutocompleteFilter = (props) => {
|
|
|
455
453
|
return { ...others };
|
|
456
454
|
});
|
|
457
455
|
};
|
|
458
|
-
const renderInput = (params) => /* @__PURE__ */ React.createElement(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
456
|
+
const renderInput = (params) => /* @__PURE__ */ React.createElement(
|
|
457
|
+
TextField,
|
|
458
|
+
{
|
|
459
|
+
...params,
|
|
460
|
+
name: "search",
|
|
461
|
+
variant: "outlined",
|
|
462
|
+
label,
|
|
463
|
+
fullWidth: true
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
const renderTags = (tagValue, getTagProps) => tagValue.map((option, index) => /* @__PURE__ */ React.createElement(Chip, { label: option, color: "primary", ...getTagProps({ index }) }));
|
|
467
|
+
return /* @__PURE__ */ React.createElement(
|
|
468
|
+
Autocomplete,
|
|
469
|
+
{
|
|
470
|
+
filterSelectedOptions,
|
|
471
|
+
limitTags,
|
|
472
|
+
multiple,
|
|
473
|
+
className,
|
|
474
|
+
id: `${multiple ? "multi-" : ""}select-filter-${name}--select`,
|
|
475
|
+
options: values || [],
|
|
476
|
+
loading,
|
|
477
|
+
value: filterValue,
|
|
478
|
+
onChange: handleChange,
|
|
479
|
+
onInputChange: (_, newValue) => setInputValue(newValue),
|
|
480
|
+
renderInput,
|
|
481
|
+
renderTags
|
|
482
|
+
}
|
|
483
|
+
);
|
|
484
484
|
};
|
|
485
485
|
|
|
486
486
|
const useStyles$2 = makeStyles({
|
|
@@ -519,29 +519,38 @@ const CheckboxFilter = (props) => {
|
|
|
519
519
|
return items.length ? { ...others, [name]: items } : others;
|
|
520
520
|
});
|
|
521
521
|
};
|
|
522
|
-
return /* @__PURE__ */ React.createElement(
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
522
|
+
return /* @__PURE__ */ React.createElement(
|
|
523
|
+
FormControl,
|
|
524
|
+
{
|
|
525
|
+
className,
|
|
526
|
+
disabled: loading,
|
|
527
|
+
fullWidth: true,
|
|
528
|
+
"data-testid": "search-checkboxfilter-next"
|
|
529
|
+
},
|
|
530
|
+
label ? /* @__PURE__ */ React.createElement(FormLabel, { className: classes.label }, label) : null,
|
|
531
|
+
values.map((value) => {
|
|
532
|
+
var _a;
|
|
533
|
+
return /* @__PURE__ */ React.createElement(
|
|
534
|
+
FormControlLabel,
|
|
535
|
+
{
|
|
536
|
+
key: value,
|
|
537
|
+
control: /* @__PURE__ */ React.createElement(
|
|
538
|
+
Checkbox,
|
|
539
|
+
{
|
|
540
|
+
color: "primary",
|
|
541
|
+
tabIndex: -1,
|
|
542
|
+
inputProps: { "aria-labelledby": value },
|
|
543
|
+
value,
|
|
544
|
+
name: value,
|
|
545
|
+
onChange: handleChange,
|
|
546
|
+
checked: ((_a = filters[name]) != null ? _a : []).includes(value)
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
label: value
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
})
|
|
553
|
+
);
|
|
545
554
|
};
|
|
546
555
|
const SelectFilter = (props) => {
|
|
547
556
|
const {
|
|
@@ -572,44 +581,35 @@ const SelectFilter = (props) => {
|
|
|
572
581
|
return value ? { ...others, [name]: value } : others;
|
|
573
582
|
});
|
|
574
583
|
};
|
|
575
|
-
return /* @__PURE__ */ React.createElement(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
584
|
+
return /* @__PURE__ */ React.createElement(
|
|
585
|
+
FormControl,
|
|
586
|
+
{
|
|
587
|
+
disabled: loading,
|
|
588
|
+
className,
|
|
589
|
+
variant: "filled",
|
|
590
|
+
fullWidth: true,
|
|
591
|
+
"data-testid": "search-selectfilter-next"
|
|
592
|
+
},
|
|
593
|
+
label ? /* @__PURE__ */ React.createElement(InputLabel, { className: classes.label, margin: "dense" }, label) : null,
|
|
594
|
+
/* @__PURE__ */ React.createElement(
|
|
595
|
+
Select,
|
|
596
|
+
{
|
|
597
|
+
variant: "outlined",
|
|
598
|
+
value: filters[name] || "",
|
|
599
|
+
onChange: handleChange
|
|
600
|
+
},
|
|
601
|
+
/* @__PURE__ */ React.createElement(MenuItem, { value: "" }, /* @__PURE__ */ React.createElement("em", null, "All")),
|
|
602
|
+
values.map((value) => /* @__PURE__ */ React.createElement(MenuItem, { key: value, value }, value))
|
|
603
|
+
)
|
|
604
|
+
);
|
|
594
605
|
};
|
|
595
606
|
const SearchFilter = ({
|
|
596
607
|
component: Element,
|
|
597
608
|
...props
|
|
598
|
-
}) => /* @__PURE__ */ React.createElement(Element, {
|
|
599
|
-
|
|
600
|
-
});
|
|
601
|
-
SearchFilter.
|
|
602
|
-
...props,
|
|
603
|
-
component: CheckboxFilter
|
|
604
|
-
});
|
|
605
|
-
SearchFilter.Select = (props) => /* @__PURE__ */ React.createElement(SearchFilter, {
|
|
606
|
-
...props,
|
|
607
|
-
component: SelectFilter
|
|
608
|
-
});
|
|
609
|
-
SearchFilter.Autocomplete = (props) => /* @__PURE__ */ React.createElement(SearchFilter, {
|
|
610
|
-
...props,
|
|
611
|
-
component: AutocompleteFilter
|
|
612
|
-
});
|
|
609
|
+
}) => /* @__PURE__ */ React.createElement(Element, { ...props });
|
|
610
|
+
SearchFilter.Checkbox = (props) => /* @__PURE__ */ React.createElement(SearchFilter, { ...props, component: CheckboxFilter });
|
|
611
|
+
SearchFilter.Select = (props) => /* @__PURE__ */ React.createElement(SearchFilter, { ...props, component: SelectFilter });
|
|
612
|
+
SearchFilter.Autocomplete = (props) => /* @__PURE__ */ React.createElement(SearchFilter, { ...props, component: AutocompleteFilter });
|
|
613
613
|
|
|
614
614
|
const SearchResultContext = (props) => {
|
|
615
615
|
const { children } = props;
|
|
@@ -628,41 +628,39 @@ const SearchResultApi = (props) => {
|
|
|
628
628
|
};
|
|
629
629
|
const SearchResultState = (props) => {
|
|
630
630
|
const { query, children } = props;
|
|
631
|
-
return query ? /* @__PURE__ */ React.createElement(SearchResultApi, {
|
|
632
|
-
query
|
|
633
|
-
}, children) : /* @__PURE__ */ React.createElement(SearchResultContext, null, children);
|
|
631
|
+
return query ? /* @__PURE__ */ React.createElement(SearchResultApi, { query }, children) : /* @__PURE__ */ React.createElement(SearchResultContext, null, children);
|
|
634
632
|
};
|
|
635
633
|
const SearchResultComponent = (props) => {
|
|
636
634
|
const { query, children } = props;
|
|
637
|
-
return /* @__PURE__ */ React.createElement(SearchResultState, {
|
|
638
|
-
query
|
|
639
|
-
}, ({ loading, error, value }) => {
|
|
635
|
+
return /* @__PURE__ */ React.createElement(SearchResultState, { query }, ({ loading, error, value }) => {
|
|
640
636
|
if (loading) {
|
|
641
637
|
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
642
638
|
}
|
|
643
639
|
if (error) {
|
|
644
|
-
return /* @__PURE__ */ React.createElement(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
640
|
+
return /* @__PURE__ */ React.createElement(
|
|
641
|
+
ResponseErrorPanel,
|
|
642
|
+
{
|
|
643
|
+
title: "Error encountered while fetching search results",
|
|
644
|
+
error
|
|
645
|
+
}
|
|
646
|
+
);
|
|
648
647
|
}
|
|
649
648
|
if (!(value == null ? void 0 : value.results.length)) {
|
|
650
|
-
return /* @__PURE__ */ React.createElement(EmptyState, {
|
|
651
|
-
missing: "data",
|
|
652
|
-
title: "Sorry, no results were found"
|
|
653
|
-
});
|
|
649
|
+
return /* @__PURE__ */ React.createElement(EmptyState, { missing: "data", title: "Sorry, no results were found" });
|
|
654
650
|
}
|
|
655
651
|
return children(value);
|
|
656
652
|
});
|
|
657
653
|
};
|
|
658
|
-
const SearchResult = (props) => /* @__PURE__ */ React.createElement(
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
654
|
+
const SearchResult = (props) => /* @__PURE__ */ React.createElement(
|
|
655
|
+
AnalyticsContext,
|
|
656
|
+
{
|
|
657
|
+
attributes: {
|
|
658
|
+
pluginId: "search",
|
|
659
|
+
extension: "SearchResult"
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
/* @__PURE__ */ React.createElement(SearchResultComponent, { ...props })
|
|
663
|
+
);
|
|
666
664
|
|
|
667
665
|
const useStyles$1 = makeStyles((theme) => ({
|
|
668
666
|
root: {
|
|
@@ -678,20 +676,25 @@ const SearchResultPager = () => {
|
|
|
678
676
|
if (!fetchNextPage && !fetchPreviousPage) {
|
|
679
677
|
return /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
680
678
|
}
|
|
681
|
-
return /* @__PURE__ */ React.createElement("nav", {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
679
|
+
return /* @__PURE__ */ React.createElement("nav", { "aria-label": "pagination navigation", className: classes.root }, /* @__PURE__ */ React.createElement(
|
|
680
|
+
Button,
|
|
681
|
+
{
|
|
682
|
+
"aria-label": "previous page",
|
|
683
|
+
disabled: !fetchPreviousPage,
|
|
684
|
+
onClick: fetchPreviousPage,
|
|
685
|
+
startIcon: /* @__PURE__ */ React.createElement(ArrowBackIosIcon, null)
|
|
686
|
+
},
|
|
687
|
+
"Previous"
|
|
688
|
+
), /* @__PURE__ */ React.createElement(
|
|
689
|
+
Button,
|
|
690
|
+
{
|
|
691
|
+
"aria-label": "next page",
|
|
692
|
+
disabled: !fetchNextPage,
|
|
693
|
+
onClick: fetchNextPage,
|
|
694
|
+
endIcon: /* @__PURE__ */ React.createElement(ArrowForwardIosIcon, null)
|
|
695
|
+
},
|
|
696
|
+
"Next"
|
|
697
|
+
));
|
|
695
698
|
};
|
|
696
699
|
|
|
697
700
|
const encodePageCursor = (pageCursor) => {
|
|
@@ -728,28 +731,34 @@ const SearchPaginationBase = (props) => {
|
|
|
728
731
|
},
|
|
729
732
|
[onPageLimitChange]
|
|
730
733
|
);
|
|
731
|
-
return /* @__PURE__ */ React.createElement(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
734
|
+
return /* @__PURE__ */ React.createElement(
|
|
735
|
+
TablePagination,
|
|
736
|
+
{
|
|
737
|
+
...rest,
|
|
738
|
+
component: "div",
|
|
739
|
+
count,
|
|
740
|
+
page,
|
|
741
|
+
onPageChange: handlePageChange,
|
|
742
|
+
rowsPerPage,
|
|
743
|
+
labelRowsPerPage,
|
|
744
|
+
labelDisplayedRows,
|
|
745
|
+
rowsPerPageOptions,
|
|
746
|
+
onRowsPerPageChange: handleRowsPerPageChange
|
|
747
|
+
}
|
|
748
|
+
);
|
|
743
749
|
};
|
|
744
750
|
const SearchPagination = (props) => {
|
|
745
751
|
const { pageLimit, setPageLimit, pageCursor, setPageCursor } = useSearch();
|
|
746
|
-
return /* @__PURE__ */ React.createElement(
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
752
|
+
return /* @__PURE__ */ React.createElement(
|
|
753
|
+
SearchPaginationBase,
|
|
754
|
+
{
|
|
755
|
+
...props,
|
|
756
|
+
limit: pageLimit,
|
|
757
|
+
onLimitChange: setPageLimit,
|
|
758
|
+
cursor: pageCursor,
|
|
759
|
+
onCursorChange: setPageCursor
|
|
760
|
+
}
|
|
761
|
+
);
|
|
753
762
|
};
|
|
754
763
|
|
|
755
764
|
const DefaultResultListItemComponent = ({
|
|
@@ -767,44 +776,51 @@ const DefaultResultListItemComponent = ({
|
|
|
767
776
|
value: rank
|
|
768
777
|
});
|
|
769
778
|
};
|
|
770
|
-
return /* @__PURE__ */ React.createElement(
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
779
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ListItem, { alignItems: "center" }, icon && /* @__PURE__ */ React.createElement(ListItemIcon, null, icon), /* @__PURE__ */ React.createElement(
|
|
780
|
+
ListItemText,
|
|
781
|
+
{
|
|
782
|
+
primaryTypographyProps: { variant: "h6" },
|
|
783
|
+
primary: /* @__PURE__ */ React.createElement(Link, { noTrack: true, to: result.location, onClick: handleClick }, (highlight == null ? void 0 : highlight.fields.title) ? /* @__PURE__ */ React.createElement(
|
|
784
|
+
HighlightedSearchResultText,
|
|
785
|
+
{
|
|
786
|
+
text: (highlight == null ? void 0 : highlight.fields.title) || "",
|
|
787
|
+
preTag: (highlight == null ? void 0 : highlight.preTag) || "",
|
|
788
|
+
postTag: (highlight == null ? void 0 : highlight.postTag) || ""
|
|
789
|
+
}
|
|
790
|
+
) : result.title),
|
|
791
|
+
secondary: /* @__PURE__ */ React.createElement(
|
|
792
|
+
"span",
|
|
793
|
+
{
|
|
794
|
+
style: {
|
|
795
|
+
display: "-webkit-box",
|
|
796
|
+
WebkitBoxOrient: "vertical",
|
|
797
|
+
WebkitLineClamp: lineClamp,
|
|
798
|
+
overflow: "hidden"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
(highlight == null ? void 0 : highlight.fields.text) ? /* @__PURE__ */ React.createElement(
|
|
802
|
+
HighlightedSearchResultText,
|
|
803
|
+
{
|
|
804
|
+
text: highlight.fields.text,
|
|
805
|
+
preTag: highlight.preTag,
|
|
806
|
+
postTag: highlight.postTag
|
|
807
|
+
}
|
|
808
|
+
) : result.text
|
|
809
|
+
)
|
|
810
|
+
}
|
|
811
|
+
), secondaryAction && /* @__PURE__ */ React.createElement(Box, { alignItems: "flex-end" }, secondaryAction)), /* @__PURE__ */ React.createElement(Divider, null));
|
|
798
812
|
};
|
|
799
813
|
const HigherOrderDefaultResultListItem = (props) => {
|
|
800
|
-
return /* @__PURE__ */ React.createElement(
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
814
|
+
return /* @__PURE__ */ React.createElement(
|
|
815
|
+
AnalyticsContext,
|
|
816
|
+
{
|
|
817
|
+
attributes: {
|
|
818
|
+
pluginId: "search",
|
|
819
|
+
extension: "DefaultResultListItem"
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
/* @__PURE__ */ React.createElement(DefaultResultListItemComponent, { ...props })
|
|
823
|
+
);
|
|
808
824
|
};
|
|
809
825
|
|
|
810
826
|
const SearchResultListLayout = (props) => {
|
|
@@ -812,44 +828,50 @@ const SearchResultListLayout = (props) => {
|
|
|
812
828
|
loading,
|
|
813
829
|
error,
|
|
814
830
|
resultItems,
|
|
815
|
-
renderResultItem = (resultItem) => /* @__PURE__ */ React.createElement(
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
}),
|
|
831
|
+
renderResultItem = (resultItem) => /* @__PURE__ */ React.createElement(
|
|
832
|
+
HigherOrderDefaultResultListItem,
|
|
833
|
+
{
|
|
834
|
+
key: resultItem.document.location,
|
|
835
|
+
result: resultItem.document
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
noResultsComponent = /* @__PURE__ */ React.createElement(EmptyState, { missing: "data", title: "Sorry, no results were found" }),
|
|
823
839
|
...rest
|
|
824
840
|
} = props;
|
|
825
|
-
return /* @__PURE__ */ React.createElement(List, {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
841
|
+
return /* @__PURE__ */ React.createElement(List, { ...rest }, loading ? /* @__PURE__ */ React.createElement(Progress, null) : null, !loading && error ? /* @__PURE__ */ React.createElement(
|
|
842
|
+
ResponseErrorPanel,
|
|
843
|
+
{
|
|
844
|
+
title: "Error encountered while fetching search results",
|
|
845
|
+
error
|
|
846
|
+
}
|
|
847
|
+
) : null, !loading && !error && (resultItems == null ? void 0 : resultItems.length) ? resultItems.map(renderResultItem) : null, !loading && !error && !(resultItems == null ? void 0 : resultItems.length) ? /* @__PURE__ */ React.createElement(ListItem, null, noResultsComponent) : null);
|
|
831
848
|
};
|
|
832
849
|
const SearchResultList = (props) => {
|
|
833
850
|
const { query, disableRenderingWithNoResults, ...rest } = props;
|
|
834
|
-
return /* @__PURE__ */ React.createElement(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
return /* @__PURE__ */ React.createElement(
|
|
852
|
+
AnalyticsContext,
|
|
853
|
+
{
|
|
854
|
+
attributes: {
|
|
855
|
+
pluginId: "search",
|
|
856
|
+
extension: "SearchResultList"
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
/* @__PURE__ */ React.createElement(SearchResultState, { query }, ({ loading, error, value }) => {
|
|
860
|
+
var _a;
|
|
861
|
+
if (!((_a = value == null ? void 0 : value.results) == null ? void 0 : _a.length) && disableRenderingWithNoResults) {
|
|
862
|
+
return null;
|
|
863
|
+
}
|
|
864
|
+
return /* @__PURE__ */ React.createElement(
|
|
865
|
+
SearchResultListLayout,
|
|
866
|
+
{
|
|
867
|
+
...rest,
|
|
868
|
+
loading,
|
|
869
|
+
error,
|
|
870
|
+
resultItems: value == null ? void 0 : value.results
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
})
|
|
874
|
+
);
|
|
853
875
|
};
|
|
854
876
|
|
|
855
877
|
const useStyles = makeStyles((theme) => ({
|
|
@@ -883,12 +905,15 @@ const useStyles = makeStyles((theme) => ({
|
|
|
883
905
|
const SearchResultGroupFilterFieldLayout = (props) => {
|
|
884
906
|
const classes = useStyles();
|
|
885
907
|
const { label, children, ...rest } = props;
|
|
886
|
-
return /* @__PURE__ */ React.createElement(
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
908
|
+
return /* @__PURE__ */ React.createElement(
|
|
909
|
+
Chip,
|
|
910
|
+
{
|
|
911
|
+
...rest,
|
|
912
|
+
className: classes.listSubheaderFilter,
|
|
913
|
+
variant: "outlined",
|
|
914
|
+
label: /* @__PURE__ */ React.createElement(React.Fragment, null, label, ": ", children)
|
|
915
|
+
}
|
|
916
|
+
);
|
|
892
917
|
};
|
|
893
918
|
const NullIcon = () => null;
|
|
894
919
|
const useSearchResultGroupTextFilterStyles = makeStyles((theme) => ({
|
|
@@ -916,17 +941,18 @@ const SearchResultGroupTextFilterField = (props) => {
|
|
|
916
941
|
},
|
|
917
942
|
[onChange]
|
|
918
943
|
);
|
|
919
|
-
return /* @__PURE__ */ React.createElement(SearchResultGroupFilterFieldLayout, {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
944
|
+
return /* @__PURE__ */ React.createElement(SearchResultGroupFilterFieldLayout, { label, onDelete }, /* @__PURE__ */ React.createElement(
|
|
945
|
+
Typography,
|
|
946
|
+
{
|
|
947
|
+
role: "textbox",
|
|
948
|
+
component: "span",
|
|
949
|
+
className: classes.root,
|
|
950
|
+
onChange: handleChange,
|
|
951
|
+
contentEditable: true,
|
|
952
|
+
suppressContentEditableWarning: true
|
|
953
|
+
},
|
|
954
|
+
value
|
|
955
|
+
));
|
|
930
956
|
};
|
|
931
957
|
const useSearchResultGroupSelectFilterStyles = makeStyles((theme) => ({
|
|
932
958
|
root: {
|
|
@@ -955,18 +981,18 @@ const SearchResultGroupSelectFilterField = (props) => {
|
|
|
955
981
|
},
|
|
956
982
|
[onChange]
|
|
957
983
|
);
|
|
958
|
-
return /* @__PURE__ */ React.createElement(SearchResultGroupFilterFieldLayout, {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
984
|
+
return /* @__PURE__ */ React.createElement(SearchResultGroupFilterFieldLayout, { label, onDelete }, /* @__PURE__ */ React.createElement(
|
|
985
|
+
Select,
|
|
986
|
+
{
|
|
987
|
+
className: classes.root,
|
|
988
|
+
value,
|
|
989
|
+
onChange: handleChange,
|
|
990
|
+
input: /* @__PURE__ */ React.createElement(InputBase, null),
|
|
991
|
+
IconComponent: NullIcon
|
|
992
|
+
},
|
|
993
|
+
/* @__PURE__ */ React.createElement(MenuItem, { value: "none" }, "None"),
|
|
994
|
+
children
|
|
995
|
+
));
|
|
970
996
|
};
|
|
971
997
|
function SearchResultGroupLayout(props) {
|
|
972
998
|
const classes = useStyles();
|
|
@@ -977,26 +1003,21 @@ function SearchResultGroupLayout(props) {
|
|
|
977
1003
|
icon,
|
|
978
1004
|
title,
|
|
979
1005
|
titleProps = {},
|
|
980
|
-
link = /* @__PURE__ */ React.createElement(React.Fragment, null, "See all", /* @__PURE__ */ React.createElement(ArrowForwardIosIcon, {
|
|
981
|
-
className: classes.listSubheaderLinkIcon
|
|
982
|
-
})),
|
|
1006
|
+
link = /* @__PURE__ */ React.createElement(React.Fragment, null, "See all", /* @__PURE__ */ React.createElement(ArrowForwardIosIcon, { className: classes.listSubheaderLinkIcon })),
|
|
983
1007
|
linkProps = {},
|
|
984
1008
|
filterOptions,
|
|
985
|
-
renderFilterOption = (filterOption) => /* @__PURE__ */ React.createElement(MenuItem, {
|
|
986
|
-
key: String(filterOption),
|
|
987
|
-
value: String(filterOption)
|
|
988
|
-
}, filterOption),
|
|
1009
|
+
renderFilterOption = (filterOption) => /* @__PURE__ */ React.createElement(MenuItem, { key: String(filterOption), value: String(filterOption) }, filterOption),
|
|
989
1010
|
filterFields,
|
|
990
1011
|
renderFilterField,
|
|
991
1012
|
resultItems,
|
|
992
|
-
renderResultItem = (resultItem) => /* @__PURE__ */ React.createElement(
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
}),
|
|
1013
|
+
renderResultItem = (resultItem) => /* @__PURE__ */ React.createElement(
|
|
1014
|
+
HigherOrderDefaultResultListItem,
|
|
1015
|
+
{
|
|
1016
|
+
key: resultItem.document.location,
|
|
1017
|
+
result: resultItem.document
|
|
1018
|
+
}
|
|
1019
|
+
),
|
|
1020
|
+
noResultsComponent = /* @__PURE__ */ React.createElement(EmptyState, { missing: "data", title: "Sorry, no results were found" }),
|
|
1000
1021
|
...rest
|
|
1001
1022
|
} = props;
|
|
1002
1023
|
const handleClick = useCallback((e) => {
|
|
@@ -1005,43 +1026,49 @@ function SearchResultGroupLayout(props) {
|
|
|
1005
1026
|
const handleClose = useCallback(() => {
|
|
1006
1027
|
setAnchorEl(null);
|
|
1007
1028
|
}, []);
|
|
1008
|
-
return /* @__PURE__ */ React.createElement(List, {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
return /* @__PURE__ */ React.createElement(List, { ...rest }, /* @__PURE__ */ React.createElement(ListSubheader, { className: classes.listSubheader }, icon, /* @__PURE__ */ React.createElement(
|
|
1030
|
+
Typography,
|
|
1031
|
+
{
|
|
1032
|
+
className: classes.listSubheaderName,
|
|
1033
|
+
component: "strong",
|
|
1034
|
+
...titleProps
|
|
1035
|
+
},
|
|
1036
|
+
title
|
|
1037
|
+
), filterOptions ? /* @__PURE__ */ React.createElement(
|
|
1038
|
+
Chip,
|
|
1039
|
+
{
|
|
1040
|
+
className: classes.listSubheaderChip,
|
|
1041
|
+
component: "button",
|
|
1042
|
+
icon: /* @__PURE__ */ React.createElement(AddIcon, null),
|
|
1043
|
+
variant: "outlined",
|
|
1044
|
+
label: "Add filter",
|
|
1045
|
+
"aria-controls": "filters-menu",
|
|
1046
|
+
"aria-haspopup": "true",
|
|
1047
|
+
onClick: handleClick
|
|
1048
|
+
}
|
|
1049
|
+
) : null, filterOptions ? /* @__PURE__ */ React.createElement(
|
|
1050
|
+
Menu,
|
|
1051
|
+
{
|
|
1052
|
+
id: "filters-menu",
|
|
1053
|
+
anchorEl,
|
|
1054
|
+
open: Boolean(anchorEl),
|
|
1055
|
+
onClose: handleClose,
|
|
1056
|
+
onClick: handleClose,
|
|
1057
|
+
keepMounted: true
|
|
1058
|
+
},
|
|
1059
|
+
filterOptions.map(renderFilterOption)
|
|
1060
|
+
) : null, filterFields == null ? void 0 : filterFields.map(
|
|
1033
1061
|
(filterField) => {
|
|
1034
1062
|
var _a;
|
|
1035
1063
|
return (_a = renderFilterField == null ? void 0 : renderFilterField(filterField)) != null ? _a : null;
|
|
1036
1064
|
}
|
|
1037
|
-
), /* @__PURE__ */ React.createElement(Link, {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
}) : null, !loading && !error && (resultItems == null ? void 0 : resultItems.length) ? resultItems.map(renderResultItem) : null, !loading && !error && !(resultItems == null ? void 0 : resultItems.length) ? /* @__PURE__ */ React.createElement(ListItem, null, noResultsComponent) : null);
|
|
1065
|
+
), /* @__PURE__ */ React.createElement(Link, { className: classes.listSubheaderLink, to: "/search", ...linkProps }, link)), loading ? /* @__PURE__ */ React.createElement(Progress, null) : null, !loading && error ? /* @__PURE__ */ React.createElement(
|
|
1066
|
+
ResponseErrorPanel,
|
|
1067
|
+
{
|
|
1068
|
+
title: "Error encountered while fetching search results",
|
|
1069
|
+
error
|
|
1070
|
+
}
|
|
1071
|
+
) : null, !loading && !error && (resultItems == null ? void 0 : resultItems.length) ? resultItems.map(renderResultItem) : null, !loading && !error && !(resultItems == null ? void 0 : resultItems.length) ? /* @__PURE__ */ React.createElement(ListItem, null, noResultsComponent) : null);
|
|
1045
1072
|
}
|
|
1046
1073
|
function SearchResultGroup(props) {
|
|
1047
1074
|
const {
|
|
@@ -1059,27 +1086,32 @@ function SearchResultGroup(props) {
|
|
|
1059
1086
|
},
|
|
1060
1087
|
{ arrayFormat: "brackets" }
|
|
1061
1088
|
)}`;
|
|
1062
|
-
return /* @__PURE__ */ React.createElement(
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1089
|
+
return /* @__PURE__ */ React.createElement(
|
|
1090
|
+
AnalyticsContext,
|
|
1091
|
+
{
|
|
1092
|
+
attributes: {
|
|
1093
|
+
pluginId: "search",
|
|
1094
|
+
extension: "SearchResultGroup"
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
/* @__PURE__ */ React.createElement(SearchResultState, { query }, ({ loading, error, value }) => {
|
|
1098
|
+
var _a, _b;
|
|
1099
|
+
if (!((_a = value == null ? void 0 : value.results) == null ? void 0 : _a.length) && disableRenderingWithNoResults) {
|
|
1100
|
+
return null;
|
|
1101
|
+
}
|
|
1102
|
+
return /* @__PURE__ */ React.createElement(
|
|
1103
|
+
SearchResultGroupLayout,
|
|
1104
|
+
{
|
|
1105
|
+
...rest,
|
|
1106
|
+
loading,
|
|
1107
|
+
error,
|
|
1108
|
+
linkProps: { to, ...linkProps },
|
|
1109
|
+
resultItems: value == null ? void 0 : value.results,
|
|
1110
|
+
filterFields: Object.keys((_b = query.filters) != null ? _b : {})
|
|
1111
|
+
}
|
|
1112
|
+
);
|
|
1113
|
+
})
|
|
1114
|
+
);
|
|
1083
1115
|
}
|
|
1084
1116
|
|
|
1085
1117
|
export { AutocompleteFilter, CheckboxFilter, HigherOrderDefaultResultListItem as DefaultResultListItem, HighlightedSearchResultText, MockSearchApi, SearchAutocomplete, SearchAutocompleteDefaultOption, SearchBar, SearchBarBase, SearchContextProvider, SearchFilter, SearchPagination, SearchPaginationBase, SearchResult, SearchResultApi, SearchResultComponent, SearchResultContext, SearchResultGroup, SearchResultGroupFilterFieldLayout, SearchResultGroupLayout, SearchResultGroupSelectFilterField, SearchResultGroupTextFilterField, SearchResultList, SearchResultListLayout, SearchResultPager, SearchResultState, SelectFilter, searchApiRef, useSearch, useSearchContextCheck };
|