@docsearch/js 5.0.5 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/docsearch.d.ts +4054 -749
- package/dist/esm/docsearch.js +377 -67
- package/dist/esm/docsearch.js.map +1 -1
- package/dist/esm/index.d.ts +4055 -750
- package/dist/esm/index.js +2450 -1324
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/docsearch.js +12 -12
- package/dist/umd/docsearch.js.map +1 -1
- package/dist/umd/index.js +46 -46
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/docsearch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @docsearch/js 5.0
|
|
1
|
+
/*! @docsearch/js 5.1.0 (UNRELEASED 189dcc9) | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1144,9 +1144,9 @@ function usePlatformKeys() {
|
|
|
1144
1144
|
key
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
|
-
const _excluded$
|
|
1147
|
+
const _excluded$28 = ["translations", "keyboardShortcuts"];
|
|
1148
1148
|
const DocSearchButton = En.forwardRef((_ref, ref) => {
|
|
1149
|
-
let { translations = {}, keyboardShortcuts } = _ref, props = _objectWithoutProperties$6(_ref, _excluded$
|
|
1149
|
+
let { translations = {}, keyboardShortcuts } = _ref, props = _objectWithoutProperties$6(_ref, _excluded$28);
|
|
1150
1150
|
const { buttonText = "Search", buttonAriaLabel = "Search" } = translations;
|
|
1151
1151
|
const resolvedShortcuts = getKeyboardShortcuts(keyboardShortcuts);
|
|
1152
1152
|
const { actionKeyReactsTo, actionKeyAltText, actionKeyLabel, key } = usePlatformKeys();
|
|
@@ -1182,7 +1182,7 @@ function DocSearchButtonKey({ reactsToKey, children }) {
|
|
|
1182
1182
|
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region ../docsearch-react/dist/esm/version.js
|
|
1185
|
-
const version$1 = "5.0
|
|
1185
|
+
const version$1 = "5.1.0";
|
|
1186
1186
|
|
|
1187
1187
|
//#endregion
|
|
1188
1188
|
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/OverloadYield.js
|
|
@@ -2094,7 +2094,7 @@ function _objectWithoutProperties$5(e, t) {
|
|
|
2094
2094
|
|
|
2095
2095
|
//#endregion
|
|
2096
2096
|
//#region ../../node_modules/.bun/algoliasearch@5.55.2/node_modules/algoliasearch/dist/lite/builds/browser.js
|
|
2097
|
-
const _excluded$
|
|
2097
|
+
const _excluded$27 = [
|
|
2098
2098
|
"appId",
|
|
2099
2099
|
"apiKey",
|
|
2100
2100
|
"authMode",
|
|
@@ -2131,7 +2131,7 @@ function getDefaultHosts(appId) {
|
|
|
2131
2131
|
]));
|
|
2132
2132
|
}
|
|
2133
2133
|
function createLiteClient(_ref) {
|
|
2134
|
-
let { appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents } = _ref, options = _objectWithoutProperties$5(_ref, _excluded$
|
|
2134
|
+
let { appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents } = _ref, options = _objectWithoutProperties$5(_ref, _excluded$27);
|
|
2135
2135
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
2136
2136
|
const transporter = createTransporter(_objectSpread2$1(_objectSpread2$1({ hosts: getDefaultHosts(appIdOption) }, options), {}, {
|
|
2137
2137
|
algoliaAgent: getAlgoliaAgent({
|
|
@@ -2606,13 +2606,13 @@ function createStorage(key) {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
};
|
|
2608
2608
|
}
|
|
2609
|
-
const _excluded$
|
|
2609
|
+
const _excluded$26 = ["_highlightResult", "_snippetResult"];
|
|
2610
2610
|
function createStoredSearches({ key, limit = 5 }) {
|
|
2611
2611
|
const storage = createStorage(key);
|
|
2612
2612
|
let items = storage.getItem().slice(0, limit);
|
|
2613
2613
|
return {
|
|
2614
2614
|
add(item) {
|
|
2615
|
-
const _ref = item, { _highlightResult, _snippetResult } = _ref, hit = _objectWithoutProperties$6(_ref, _excluded$
|
|
2615
|
+
const _ref = item, { _highlightResult, _snippetResult } = _ref, hit = _objectWithoutProperties$6(_ref, _excluded$26);
|
|
2616
2616
|
const isQueryAlreadySaved = items.findIndex((x) => x.objectID === hit.objectID);
|
|
2617
2617
|
if (isQueryAlreadySaved > -1) items.splice(isQueryAlreadySaved, 1);
|
|
2618
2618
|
items.unshift(hit);
|
|
@@ -3220,6 +3220,16 @@ function useControlled({ controlled, default: defaultProp, name, state = "value"
|
|
|
3220
3220
|
}, [])];
|
|
3221
3221
|
}
|
|
3222
3222
|
|
|
3223
|
+
//#endregion
|
|
3224
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemContext.mjs
|
|
3225
|
+
init_compat();
|
|
3226
|
+
const MenuCheckboxItemContext = /*#__PURE__*/ K$1(void 0);
|
|
3227
|
+
function useMenuCheckboxItemContext() {
|
|
3228
|
+
const context = j$1(MenuCheckboxItemContext);
|
|
3229
|
+
if (context === void 0) throw new Error(formatErrorMessage(30));
|
|
3230
|
+
return context;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3223
3233
|
//#endregion
|
|
3224
3234
|
//#region ../../node_modules/.bun/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
3225
3235
|
function hasWindow() {
|
|
@@ -3431,7 +3441,7 @@ function useFocusableWhenDisabled(parameters) {
|
|
|
3431
3441
|
//#endregion
|
|
3432
3442
|
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/internals/use-button/useButton.mjs
|
|
3433
3443
|
init_compat();
|
|
3434
|
-
const _excluded$
|
|
3444
|
+
const _excluded$25 = [
|
|
3435
3445
|
"onClick",
|
|
3436
3446
|
"onMouseDown",
|
|
3437
3447
|
"onKeyUp",
|
|
@@ -3462,7 +3472,7 @@ function useButton(parameters = {}) {
|
|
|
3462
3472
|
useIsoLayoutEffect(updateDisabled, [updateDisabled]);
|
|
3463
3473
|
return {
|
|
3464
3474
|
getButtonProps: b((externalProps = {}) => {
|
|
3465
|
-
const { onClick: externalOnClick, onMouseDown: externalOnMouseDown, onKeyUp: externalOnKeyUp, onKeyDown: externalOnKeyDown, onPointerDown: externalOnPointerDown } = externalProps, otherExternalProps = _objectWithoutProperties$5(externalProps, _excluded$
|
|
3475
|
+
const { onClick: externalOnClick, onMouseDown: externalOnMouseDown, onKeyUp: externalOnKeyUp, onKeyDown: externalOnKeyDown, onPointerDown: externalOnPointerDown } = externalProps, otherExternalProps = _objectWithoutProperties$5(externalProps, _excluded$25);
|
|
3466
3476
|
return mergeProps({
|
|
3467
3477
|
onClick(event) {
|
|
3468
3478
|
if (disabled) {
|
|
@@ -3946,6 +3956,92 @@ function u(t, e, n, f, u, i) {
|
|
|
3946
3956
|
//#region ../../node_modules/.bun/preact@11.0.0-beta.0/node_modules/preact/compat/jsx-runtime.mjs
|
|
3947
3957
|
init_compat();
|
|
3948
3958
|
|
|
3959
|
+
//#endregion
|
|
3960
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItem.mjs
|
|
3961
|
+
init_compat();
|
|
3962
|
+
const _excluded$24 = [
|
|
3963
|
+
"render",
|
|
3964
|
+
"className",
|
|
3965
|
+
"id",
|
|
3966
|
+
"label",
|
|
3967
|
+
"nativeButton",
|
|
3968
|
+
"disabled",
|
|
3969
|
+
"closeOnClick",
|
|
3970
|
+
"checked",
|
|
3971
|
+
"defaultChecked",
|
|
3972
|
+
"onCheckedChange",
|
|
3973
|
+
"style"
|
|
3974
|
+
];
|
|
3975
|
+
/**
|
|
3976
|
+
* A menu item that toggles a setting on or off.
|
|
3977
|
+
* Renders a `<div>` element.
|
|
3978
|
+
*
|
|
3979
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
3980
|
+
*/
|
|
3981
|
+
const MenuCheckboxItem$1 = /*#__PURE__*/ M(function MenuCheckboxItem(componentProps, forwardedRef) {
|
|
3982
|
+
const { render, className, id: idProp, label, nativeButton = false, disabled = false, closeOnClick = false, checked: checkedProp, defaultChecked, onCheckedChange, style } = componentProps, elementProps = _objectWithoutProperties$5(componentProps, _excluded$24);
|
|
3983
|
+
const listItem = useCompositeListItem({ label });
|
|
3984
|
+
const menuPositionerContext = useMenuPositionerContext(true);
|
|
3985
|
+
const id = useBaseUiId(idProp);
|
|
3986
|
+
const { store } = useMenuRootContext();
|
|
3987
|
+
const highlighted = store.useState("isActive", listItem.index);
|
|
3988
|
+
const itemProps = store.useState("itemProps");
|
|
3989
|
+
const [checked, setChecked] = useControlled({
|
|
3990
|
+
controlled: checkedProp,
|
|
3991
|
+
default: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : false,
|
|
3992
|
+
name: "MenuCheckboxItem",
|
|
3993
|
+
state: "checked"
|
|
3994
|
+
});
|
|
3995
|
+
const { getItemProps, itemRef } = useMenuItem({
|
|
3996
|
+
closeOnClick,
|
|
3997
|
+
disabled,
|
|
3998
|
+
highlighted,
|
|
3999
|
+
id,
|
|
4000
|
+
store,
|
|
4001
|
+
nativeButton,
|
|
4002
|
+
nodeId: menuPositionerContext === null || menuPositionerContext === void 0 ? void 0 : menuPositionerContext.context.nodeId,
|
|
4003
|
+
itemMetadata: REGULAR_ITEM
|
|
4004
|
+
});
|
|
4005
|
+
const state = q$1(() => ({
|
|
4006
|
+
disabled,
|
|
4007
|
+
highlighted,
|
|
4008
|
+
checked
|
|
4009
|
+
}), [
|
|
4010
|
+
disabled,
|
|
4011
|
+
highlighted,
|
|
4012
|
+
checked
|
|
4013
|
+
]);
|
|
4014
|
+
function handleClick(event) {
|
|
4015
|
+
const details = createChangeEventDetails(itemPress, event.nativeEvent, void 0, { preventUnmountOnClose() {} });
|
|
4016
|
+
onCheckedChange === null || onCheckedChange === void 0 || onCheckedChange(!checked, details);
|
|
4017
|
+
if (details.isCanceled) return;
|
|
4018
|
+
setChecked((currentlyChecked) => !currentlyChecked);
|
|
4019
|
+
}
|
|
4020
|
+
const element = useRenderElement("div", componentProps, {
|
|
4021
|
+
state,
|
|
4022
|
+
stateAttributesMapping: itemMapping,
|
|
4023
|
+
props: [
|
|
4024
|
+
itemProps,
|
|
4025
|
+
{
|
|
4026
|
+
role: "menuitemcheckbox",
|
|
4027
|
+
"aria-checked": checked,
|
|
4028
|
+
onClick: handleClick
|
|
4029
|
+
},
|
|
4030
|
+
elementProps,
|
|
4031
|
+
getItemProps
|
|
4032
|
+
],
|
|
4033
|
+
ref: [
|
|
4034
|
+
itemRef,
|
|
4035
|
+
forwardedRef,
|
|
4036
|
+
listItem.ref
|
|
4037
|
+
]
|
|
4038
|
+
});
|
|
4039
|
+
return /*#__PURE__*/ u(MenuCheckboxItemContext.Provider, {
|
|
4040
|
+
value: state,
|
|
4041
|
+
children: element
|
|
4042
|
+
});
|
|
4043
|
+
});
|
|
4044
|
+
|
|
3949
4045
|
//#endregion
|
|
3950
4046
|
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/useOnMount.mjs
|
|
3951
4047
|
init_compat();
|
|
@@ -4205,6 +4301,47 @@ function useOpenChangeComplete(parameters) {
|
|
|
4205
4301
|
]);
|
|
4206
4302
|
}
|
|
4207
4303
|
|
|
4304
|
+
//#endregion
|
|
4305
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs
|
|
4306
|
+
init_compat();
|
|
4307
|
+
const _excluded$23 = [
|
|
4308
|
+
"render",
|
|
4309
|
+
"className",
|
|
4310
|
+
"style",
|
|
4311
|
+
"keepMounted"
|
|
4312
|
+
];
|
|
4313
|
+
/**
|
|
4314
|
+
* Indicates whether the checkbox item is ticked.
|
|
4315
|
+
* Renders a `<span>` element.
|
|
4316
|
+
*
|
|
4317
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
4318
|
+
*/
|
|
4319
|
+
const MenuCheckboxItemIndicator = /*#__PURE__*/ M(function MenuCheckboxItemIndicator(componentProps, forwardedRef) {
|
|
4320
|
+
const { render, className, style, keepMounted = false } = componentProps, elementProps = _objectWithoutProperties$5(componentProps, _excluded$23);
|
|
4321
|
+
const item = useMenuCheckboxItemContext();
|
|
4322
|
+
const indicatorRef = F$1(null);
|
|
4323
|
+
const { transitionStatus, setMounted } = useTransitionStatus(item.checked);
|
|
4324
|
+
useOpenChangeComplete({
|
|
4325
|
+
open: item.checked,
|
|
4326
|
+
ref: indicatorRef,
|
|
4327
|
+
onComplete() {
|
|
4328
|
+
if (!item.checked) setMounted(false);
|
|
4329
|
+
}
|
|
4330
|
+
});
|
|
4331
|
+
return useRenderElement("span", componentProps, {
|
|
4332
|
+
state: {
|
|
4333
|
+
checked: item.checked,
|
|
4334
|
+
disabled: item.disabled,
|
|
4335
|
+
highlighted: item.highlighted,
|
|
4336
|
+
transitionStatus
|
|
4337
|
+
},
|
|
4338
|
+
ref: [forwardedRef, indicatorRef],
|
|
4339
|
+
stateAttributesMapping: itemMapping,
|
|
4340
|
+
props: _objectSpread2$1({ "aria-hidden": true }, elementProps),
|
|
4341
|
+
enabled: keepMounted || item.checked
|
|
4342
|
+
});
|
|
4343
|
+
});
|
|
4344
|
+
|
|
4208
4345
|
//#endregion
|
|
4209
4346
|
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs
|
|
4210
4347
|
init_compat();
|
|
@@ -4218,7 +4355,7 @@ function useMenuGroupRootContext() {
|
|
|
4218
4355
|
//#endregion
|
|
4219
4356
|
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs
|
|
4220
4357
|
init_compat();
|
|
4221
|
-
const _excluded$
|
|
4358
|
+
const _excluded$22 = [
|
|
4222
4359
|
"render",
|
|
4223
4360
|
"className",
|
|
4224
4361
|
"style",
|
|
@@ -4231,7 +4368,7 @@ const _excluded$21 = [
|
|
|
4231
4368
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
4232
4369
|
*/
|
|
4233
4370
|
const MenuGroupLabel$1 = /*#__PURE__*/ M(function MenuGroupLabel(componentProps, forwardedRef) {
|
|
4234
|
-
const { render, className, style, id: idProp } = componentProps, elementProps = _objectWithoutProperties$5(componentProps, _excluded$
|
|
4371
|
+
const { render, className, style, id: idProp } = componentProps, elementProps = _objectWithoutProperties$5(componentProps, _excluded$22);
|
|
4235
4372
|
const id = useBaseUiId(idProp);
|
|
4236
4373
|
const setLabelId = useMenuGroupRootContext();
|
|
4237
4374
|
useIsoLayoutEffect(() => {
|
|
@@ -4249,6 +4386,61 @@ const MenuGroupLabel$1 = /*#__PURE__*/ M(function MenuGroupLabel(componentProps,
|
|
|
4249
4386
|
});
|
|
4250
4387
|
});
|
|
4251
4388
|
|
|
4389
|
+
//#endregion
|
|
4390
|
+
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+fce4ea6354698f9c/node_modules/@base-ui/react/menu/item/MenuItem.mjs
|
|
4391
|
+
init_compat();
|
|
4392
|
+
const _excluded$21 = [
|
|
4393
|
+
"render",
|
|
4394
|
+
"className",
|
|
4395
|
+
"id",
|
|
4396
|
+
"label",
|
|
4397
|
+
"nativeButton",
|
|
4398
|
+
"disabled",
|
|
4399
|
+
"closeOnClick",
|
|
4400
|
+
"style"
|
|
4401
|
+
];
|
|
4402
|
+
/**
|
|
4403
|
+
* An individual interactive item in the menu.
|
|
4404
|
+
* Renders a `<div>` element.
|
|
4405
|
+
*
|
|
4406
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
4407
|
+
*/
|
|
4408
|
+
const MenuItem$1 = /*#__PURE__*/ M(function MenuItem(componentProps, forwardedRef) {
|
|
4409
|
+
const { render, className, id: idProp, label, nativeButton = false, disabled = false, closeOnClick = true, style } = componentProps, elementProps = _objectWithoutProperties$5(componentProps, _excluded$21);
|
|
4410
|
+
const listItem = useCompositeListItem({ label });
|
|
4411
|
+
const menuPositionerContext = useMenuPositionerContext(true);
|
|
4412
|
+
const id = useBaseUiId(idProp);
|
|
4413
|
+
const { store } = useMenuRootContext();
|
|
4414
|
+
const highlighted = store.useState("isActive", listItem.index);
|
|
4415
|
+
const itemProps = store.useState("itemProps");
|
|
4416
|
+
const { getItemProps, itemRef } = useMenuItem({
|
|
4417
|
+
closeOnClick,
|
|
4418
|
+
disabled,
|
|
4419
|
+
highlighted,
|
|
4420
|
+
id,
|
|
4421
|
+
store,
|
|
4422
|
+
nativeButton,
|
|
4423
|
+
nodeId: menuPositionerContext === null || menuPositionerContext === void 0 ? void 0 : menuPositionerContext.context.nodeId,
|
|
4424
|
+
itemMetadata: REGULAR_ITEM
|
|
4425
|
+
});
|
|
4426
|
+
return useRenderElement("div", componentProps, {
|
|
4427
|
+
state: {
|
|
4428
|
+
disabled,
|
|
4429
|
+
highlighted
|
|
4430
|
+
},
|
|
4431
|
+
props: [
|
|
4432
|
+
itemProps,
|
|
4433
|
+
elementProps,
|
|
4434
|
+
getItemProps
|
|
4435
|
+
],
|
|
4436
|
+
ref: [
|
|
4437
|
+
itemRef,
|
|
4438
|
+
forwardedRef,
|
|
4439
|
+
listItem.ref
|
|
4440
|
+
]
|
|
4441
|
+
});
|
|
4442
|
+
});
|
|
4443
|
+
|
|
4252
4444
|
//#endregion
|
|
4253
4445
|
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/useTimeout.mjs
|
|
4254
4446
|
const EMPTY = 0;
|
|
@@ -6206,7 +6398,7 @@ const _excluded4$2 = [
|
|
|
6206
6398
|
"crossAxis",
|
|
6207
6399
|
"limiter"
|
|
6208
6400
|
];
|
|
6209
|
-
const _excluded5$
|
|
6401
|
+
const _excluded5$2 = ["apply"];
|
|
6210
6402
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
6211
6403
|
let { reference, floating } = _ref;
|
|
6212
6404
|
const sideAxis = getSideAxis(placement);
|
|
@@ -6640,7 +6832,7 @@ const size$2 = function(options) {
|
|
|
6640
6832
|
options,
|
|
6641
6833
|
async fn(state) {
|
|
6642
6834
|
const { placement, rects, platform, elements } = state;
|
|
6643
|
-
const _evaluate5 = evaluate(options, state), { apply = () => {} } = _evaluate5, detectOverflowOptions = _objectWithoutProperties$5(_evaluate5, _excluded5$
|
|
6835
|
+
const _evaluate5 = evaluate(options, state), { apply = () => {} } = _evaluate5, detectOverflowOptions = _objectWithoutProperties$5(_evaluate5, _excluded5$2);
|
|
6644
6836
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
6645
6837
|
const side = getSide(placement);
|
|
6646
6838
|
const alignment = getAlignment(placement);
|
|
@@ -12380,7 +12572,7 @@ function useMenuParent() {
|
|
|
12380
12572
|
}
|
|
12381
12573
|
|
|
12382
12574
|
//#endregion
|
|
12383
|
-
//#region ../docsearch-react/dist/esm/normalizeDocSearchIndexes-
|
|
12575
|
+
//#region ../docsearch-react/dist/esm/normalizeDocSearchIndexes-B_bI_ytC.js
|
|
12384
12576
|
init_compat();
|
|
12385
12577
|
function capitalize(text) {
|
|
12386
12578
|
return `${text.charAt(0).toLocaleUpperCase()}${text.substring(1)}`;
|
|
@@ -12560,18 +12752,58 @@ function getFacetLabel(facet) {
|
|
|
12560
12752
|
if (facet.label) return facet.label;
|
|
12561
12753
|
return facet.key.replace(/[._-]+/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
12562
12754
|
}
|
|
12755
|
+
/**
|
|
12756
|
+
* Extracts the facet key from an Algolia `facetFilters` string entry such as
|
|
12757
|
+
* `language:en`. Returns `null` when the entry doesn't have a `key:value`
|
|
12758
|
+
* shape.
|
|
12759
|
+
*/
|
|
12760
|
+
function getFacetFilterKey(facetFilter) {
|
|
12761
|
+
const separatorIndex = facetFilter.indexOf(":");
|
|
12762
|
+
return separatorIndex <= 0 ? null : facetFilter.slice(0, separatorIndex);
|
|
12763
|
+
}
|
|
12764
|
+
function parseFacetFilter(facetFilter) {
|
|
12765
|
+
const key = getFacetFilterKey(facetFilter);
|
|
12766
|
+
if (key === null) return null;
|
|
12767
|
+
const value = facetFilter.slice(key.length + 1);
|
|
12768
|
+
return value ? {
|
|
12769
|
+
key,
|
|
12770
|
+
value
|
|
12771
|
+
} : null;
|
|
12772
|
+
}
|
|
12773
|
+
/**
|
|
12774
|
+
* Reads the initial facet selections from the configured `facetFilters` of each
|
|
12775
|
+
* index. Later indices override earlier ones for the same facet key.
|
|
12776
|
+
*
|
|
12777
|
+
* - A `key:value` string selects a single value.
|
|
12778
|
+
* - A nested OR group whose entries all share the same key (for example
|
|
12779
|
+
* `['docusaurus_tag:default', 'docusaurus_tag:docs-default-current']`)
|
|
12780
|
+
* selects every value in the group.
|
|
12781
|
+
* - OR groups that mix facet keys can't map to a single facet and are ignored.
|
|
12782
|
+
*/
|
|
12563
12783
|
function deriveDefaultSelectedFacetsFromIndex(indices) {
|
|
12564
12784
|
const defaultFacets = {};
|
|
12565
12785
|
for (const index of indices) {
|
|
12566
12786
|
var _index$searchParamete;
|
|
12567
12787
|
const facetFilters = (_index$searchParamete = index.searchParameters) === null || _index$searchParamete === void 0 ? void 0 : _index$searchParamete.facetFilters;
|
|
12568
12788
|
for (const facetFilter of Array.isArray(facetFilters) ? facetFilters : [facetFilters]) {
|
|
12569
|
-
if (typeof facetFilter
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
if (
|
|
12789
|
+
if (typeof facetFilter === "string") {
|
|
12790
|
+
const parsed = parseFacetFilter(facetFilter);
|
|
12791
|
+
if (parsed) defaultFacets[parsed.key] = [parsed.value];
|
|
12792
|
+
continue;
|
|
12793
|
+
}
|
|
12794
|
+
if (!Array.isArray(facetFilter) || facetFilter.length === 0) continue;
|
|
12795
|
+
let groupKey = null;
|
|
12796
|
+
const groupValues = [];
|
|
12797
|
+
for (const entry of facetFilter) {
|
|
12798
|
+
const parsed = typeof entry === "string" ? parseFacetFilter(entry) : null;
|
|
12799
|
+
if (!parsed || groupKey !== null && parsed.key !== groupKey) {
|
|
12800
|
+
groupKey = null;
|
|
12801
|
+
break;
|
|
12802
|
+
}
|
|
12803
|
+
groupKey = parsed.key;
|
|
12804
|
+
groupValues.push(parsed.value);
|
|
12805
|
+
}
|
|
12806
|
+
if (groupKey !== null) defaultFacets[groupKey] = groupValues;
|
|
12575
12807
|
}
|
|
12576
12808
|
}
|
|
12577
12809
|
return defaultFacets;
|
|
@@ -12599,8 +12831,10 @@ const _excluded2$3 = [
|
|
|
12599
12831
|
"collisionBoundary",
|
|
12600
12832
|
"container"
|
|
12601
12833
|
];
|
|
12602
|
-
const _excluded3$1 = ["className"
|
|
12603
|
-
const _excluded4$1 = ["className"];
|
|
12834
|
+
const _excluded3$1 = ["className"];
|
|
12835
|
+
const _excluded4$1 = ["className", "children"];
|
|
12836
|
+
const _excluded5$1 = ["className", "children"];
|
|
12837
|
+
const _excluded6$1 = ["className"];
|
|
12604
12838
|
function Menu$1(_ref) {
|
|
12605
12839
|
let props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
12606
12840
|
return /* @__PURE__ */ En.createElement(MenuRoot, props);
|
|
@@ -12625,13 +12859,19 @@ function MenuPopup(_ref3) {
|
|
|
12625
12859
|
}, /* @__PURE__ */ En.createElement(MenuPopup$1, _objectSpread2$2({ className: "DocSearch-Menu-Popup" }, props))));
|
|
12626
12860
|
}
|
|
12627
12861
|
Menu$1.Popup = MenuPopup;
|
|
12628
|
-
function
|
|
12629
|
-
let
|
|
12862
|
+
function MenuItem(_ref4) {
|
|
12863
|
+
let { className } = _ref4, props = _objectWithoutProperties$6(_ref4, _excluded3$1);
|
|
12864
|
+
const cn = `DocSearch-Menu-Item${className ? ` ${className}` : ""}`;
|
|
12865
|
+
return /* @__PURE__ */ En.createElement(MenuItem$1, _objectSpread2$2({ className: cn }, props));
|
|
12866
|
+
}
|
|
12867
|
+
Menu$1.Item = MenuItem;
|
|
12868
|
+
function MenuRadioGroup(_ref5) {
|
|
12869
|
+
let props = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
12630
12870
|
return /* @__PURE__ */ En.createElement(MenuRadioGroup$1, props);
|
|
12631
12871
|
}
|
|
12632
12872
|
Menu$1.RadioGroup = MenuRadioGroup;
|
|
12633
|
-
function MenuRadioItem(
|
|
12634
|
-
let { className, children } =
|
|
12873
|
+
function MenuRadioItem(_ref6) {
|
|
12874
|
+
let { className, children } = _ref6, props = _objectWithoutProperties$6(_ref6, _excluded4$1);
|
|
12635
12875
|
const cn = `DocSearch-Menu-Item DocSearch-Menu-RadioItem${className ? ` ${className}` : ""}`;
|
|
12636
12876
|
return /* @__PURE__ */ En.createElement(MenuRadioItem$1, _objectSpread2$2({
|
|
12637
12877
|
className: cn,
|
|
@@ -12639,40 +12879,76 @@ function MenuRadioItem(_ref5) {
|
|
|
12639
12879
|
}, props), /* @__PURE__ */ En.createElement("span", { className: "DocSearch-Menu-RadioItem-Indicator" }, /* @__PURE__ */ En.createElement(MenuRadioItemIndicator, null, /* @__PURE__ */ En.createElement(CheckIcon, null))), children);
|
|
12640
12880
|
}
|
|
12641
12881
|
Menu$1.RadioItem = MenuRadioItem;
|
|
12642
|
-
function
|
|
12643
|
-
let { className } =
|
|
12882
|
+
function MenuCheckboxItem(_ref7) {
|
|
12883
|
+
let { className, children } = _ref7, props = _objectWithoutProperties$6(_ref7, _excluded5$1);
|
|
12884
|
+
const cn = `DocSearch-Menu-Item DocSearch-Menu-CheckboxItem${className ? ` ${className}` : ""}`;
|
|
12885
|
+
return /* @__PURE__ */ En.createElement(MenuCheckboxItem$1, _objectSpread2$2({ className: cn }, props), /* @__PURE__ */ En.createElement("span", { className: "DocSearch-Menu-CheckboxItem-Indicator" }, /* @__PURE__ */ En.createElement(MenuCheckboxItemIndicator, null, /* @__PURE__ */ En.createElement(CheckIcon, null))), children);
|
|
12886
|
+
}
|
|
12887
|
+
Menu$1.CheckboxItem = MenuCheckboxItem;
|
|
12888
|
+
function MenuGroupLabel(_ref8) {
|
|
12889
|
+
let { className } = _ref8, props = _objectWithoutProperties$6(_ref8, _excluded6$1);
|
|
12644
12890
|
const cn = `DocSearch-Menu-GroupLabel${className ? ` ${className}` : ""}`;
|
|
12645
12891
|
return /* @__PURE__ */ En.createElement(MenuGroupLabel$1, _objectSpread2$2({ className: cn }, props));
|
|
12646
12892
|
}
|
|
12647
12893
|
Menu$1.GroupLabel = MenuGroupLabel;
|
|
12648
|
-
const
|
|
12894
|
+
const EMPTY_SELECTION$1 = [];
|
|
12895
|
+
const FacetValueItem = En.memo(function FacetValueItem({ facetKey, value, checked, onToggle }) {
|
|
12896
|
+
const handleCheckedChange = En.useCallback(() => {
|
|
12897
|
+
onToggle(facetKey, value);
|
|
12898
|
+
}, [
|
|
12899
|
+
facetKey,
|
|
12900
|
+
onToggle,
|
|
12901
|
+
value
|
|
12902
|
+
]);
|
|
12903
|
+
return /* @__PURE__ */ En.createElement(Menu$1.CheckboxItem, {
|
|
12904
|
+
checked,
|
|
12905
|
+
label: value,
|
|
12906
|
+
onCheckedChange: handleCheckedChange
|
|
12907
|
+
}, capitalize(value));
|
|
12908
|
+
});
|
|
12909
|
+
function toggleValue(value) {
|
|
12910
|
+
return (currentValues) => currentValues.includes(value) ? currentValues.filter((selected) => selected !== value) : [...currentValues, value];
|
|
12911
|
+
}
|
|
12912
|
+
function removeValue(value) {
|
|
12913
|
+
return (currentValues) => currentValues.filter((selected) => selected !== value);
|
|
12914
|
+
}
|
|
12915
|
+
const FacetMenu = En.memo(function FacetMenu({ facet, selectedValues, defaultValueLabel, onSelectionChange, registerTrigger, menuTriggerSelectedAriaLabel }) {
|
|
12649
12916
|
const label = getFacetLabel(facet);
|
|
12650
|
-
const
|
|
12651
|
-
|
|
12917
|
+
const hasSelection = selectedValues.length > 0;
|
|
12918
|
+
const selectedSet = En.useMemo(() => new Set(selectedValues), [selectedValues]);
|
|
12919
|
+
const handleToggleValue = En.useCallback((facetKey, value) => {
|
|
12920
|
+
onSelectionChange(facetKey, toggleValue(value));
|
|
12921
|
+
}, [onSelectionChange]);
|
|
12922
|
+
const handleSelectAll = En.useCallback(() => {
|
|
12923
|
+
onSelectionChange(facet.key, EMPTY_SELECTION$1);
|
|
12652
12924
|
}, [facet.key, onSelectionChange]);
|
|
12653
12925
|
const triggerRef = En.useCallback((el) => {
|
|
12654
12926
|
registerTrigger(facet.key, el);
|
|
12655
12927
|
}, [facet.key, registerTrigger]);
|
|
12656
12928
|
return /* @__PURE__ */ En.createElement(Menu$1, null, /* @__PURE__ */ En.createElement(Menu$1.Trigger, {
|
|
12657
12929
|
ref: triggerRef,
|
|
12658
|
-
"data-has-selection":
|
|
12659
|
-
"aria-label":
|
|
12660
|
-
}, /* @__PURE__ */ En.createElement("span", null, capitalize(label)), /* @__PURE__ */ En.createElement(ChevronIcon, null)), /* @__PURE__ */ En.createElement(Menu$1.Popup, null, /* @__PURE__ */ En.createElement(Menu$1.
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
label: `${defaultValueLabel} ${label}`
|
|
12666
|
-
}, defaultValueLabel), facet.values.map((value) => /* @__PURE__ */ En.createElement(Menu$1.RadioItem, {
|
|
12930
|
+
"data-has-selection": hasSelection,
|
|
12931
|
+
"aria-label": hasSelection ? `${label}, ${selectedValues.join(", ")} ${menuTriggerSelectedAriaLabel}` : label
|
|
12932
|
+
}, /* @__PURE__ */ En.createElement("span", null, capitalize(label)), /* @__PURE__ */ En.createElement(ChevronIcon, null)), /* @__PURE__ */ En.createElement(Menu$1.Popup, null, /* @__PURE__ */ En.createElement(Menu$1.Item, {
|
|
12933
|
+
className: "DocSearch-Menu-ResetItem",
|
|
12934
|
+
label: `${defaultValueLabel} ${label}`,
|
|
12935
|
+
onClick: handleSelectAll
|
|
12936
|
+
}, defaultValueLabel), facet.values.map((value) => /* @__PURE__ */ En.createElement(FacetValueItem, {
|
|
12667
12937
|
key: value,
|
|
12938
|
+
facetKey: facet.key,
|
|
12668
12939
|
value,
|
|
12669
|
-
|
|
12670
|
-
|
|
12940
|
+
checked: selectedSet.has(value),
|
|
12941
|
+
onToggle: handleToggleValue
|
|
12942
|
+
}))));
|
|
12671
12943
|
});
|
|
12672
12944
|
const SelectedFacetChip = En.memo(function SelectedFacetChip({ facetKey, facetLabel, value, dismissAriaLabel, onDismiss }) {
|
|
12673
12945
|
const handleDismissFacet = En.useCallback((e) => {
|
|
12674
|
-
onDismiss(facetKey, e);
|
|
12675
|
-
}, [
|
|
12946
|
+
onDismiss(facetKey, value, e);
|
|
12947
|
+
}, [
|
|
12948
|
+
facetKey,
|
|
12949
|
+
onDismiss,
|
|
12950
|
+
value
|
|
12951
|
+
]);
|
|
12676
12952
|
return /* @__PURE__ */ En.createElement(Chip, null, capitalize(value), /* @__PURE__ */ En.createElement(Chip.Dismiss, {
|
|
12677
12953
|
"aria-label": `${dismissAriaLabel} ${capitalize(value)} (${facetLabel})`,
|
|
12678
12954
|
onClick: handleDismissFacet
|
|
@@ -12682,14 +12958,19 @@ const FacetBar = En.memo(function FacetBar({ facets, selections, onSelectionChan
|
|
|
12682
12958
|
const { defaultValueLabel = "All", facetMenuTriggerAriaLabel = "selected", clearAllLabel = "Clear all", facetsAriaLabel = "Search filters", selectedFacetsAriaLabel = "Selected search filters", clearFacetAriaLabel = "Clear filter:" } = translations;
|
|
12683
12959
|
const visibleFacetKeys = En.useMemo(() => new Set(facets.map((f) => f.key)), [facets]);
|
|
12684
12960
|
const selectionsToDisplay = En.useMemo(() => {
|
|
12685
|
-
|
|
12961
|
+
const entries = [];
|
|
12962
|
+
for (const [key, values] of Object.entries(selections)) {
|
|
12963
|
+
if (!visibleFacetKeys.has(key)) continue;
|
|
12964
|
+
for (const value of values) entries.push([key, value]);
|
|
12965
|
+
}
|
|
12966
|
+
return entries;
|
|
12686
12967
|
}, [selections, visibleFacetKeys]);
|
|
12687
12968
|
const triggerRefs = En.useRef(/* @__PURE__ */ new Map());
|
|
12688
12969
|
const registerTrigger = En.useCallback((facetKey, el) => {
|
|
12689
12970
|
if (el) triggerRefs.current.set(facetKey, el);
|
|
12690
12971
|
else triggerRefs.current.delete(facetKey);
|
|
12691
12972
|
}, []);
|
|
12692
|
-
const handleDismissFacet = En.useCallback((facetKey, ev) => {
|
|
12973
|
+
const handleDismissFacet = En.useCallback((facetKey, value, ev) => {
|
|
12693
12974
|
const dismissButton = ev.currentTarget;
|
|
12694
12975
|
const selectionBar = dismissButton.closest(".DocSearch-FacetSelectionBar");
|
|
12695
12976
|
if (selectionBar) {
|
|
@@ -12699,7 +12980,7 @@ const FacetBar = En.memo(function FacetBar({ facets, selections, onSelectionChan
|
|
|
12699
12980
|
const target = (_ref = (_dismissButtons = dismissButtons[index + 1]) !== null && _dismissButtons !== void 0 ? _dismissButtons : dismissButtons[index - 1]) !== null && _ref !== void 0 ? _ref : triggerRefs.current.get(facetKey);
|
|
12700
12981
|
target === null || target === void 0 || target.focus();
|
|
12701
12982
|
}
|
|
12702
|
-
onSelectionChange(facetKey,
|
|
12983
|
+
onSelectionChange(facetKey, removeValue(value));
|
|
12703
12984
|
}, [onSelectionChange]);
|
|
12704
12985
|
const handleClearAll = En.useCallback(() => {
|
|
12705
12986
|
var _triggerRefs$current$;
|
|
@@ -12714,11 +12995,10 @@ const FacetBar = En.memo(function FacetBar({ facets, selections, onSelectionChan
|
|
|
12714
12995
|
"aria-label": facetsAriaLabel
|
|
12715
12996
|
}, facets.map((facet) => {
|
|
12716
12997
|
var _selections$facet$key;
|
|
12717
|
-
const selectedValue = (_selections$facet$key = selections[facet.key]) !== null && _selections$facet$key !== void 0 ? _selections$facet$key : "";
|
|
12718
12998
|
return /* @__PURE__ */ En.createElement(FacetMenu, {
|
|
12719
12999
|
key: facet.key,
|
|
12720
13000
|
facet,
|
|
12721
|
-
|
|
13001
|
+
selectedValues: (_selections$facet$key = selections[facet.key]) !== null && _selections$facet$key !== void 0 ? _selections$facet$key : EMPTY_SELECTION$1,
|
|
12722
13002
|
defaultValueLabel,
|
|
12723
13003
|
registerTrigger,
|
|
12724
13004
|
menuTriggerSelectedAriaLabel: facetMenuTriggerAriaLabel,
|
|
@@ -12731,7 +13011,7 @@ const FacetBar = En.memo(function FacetBar({ facets, selections, onSelectionChan
|
|
|
12731
13011
|
}, selectionsToDisplay.map(([key, value]) => {
|
|
12732
13012
|
var _facetLabels$get;
|
|
12733
13013
|
return /* @__PURE__ */ En.createElement(SelectedFacetChip, {
|
|
12734
|
-
key
|
|
13014
|
+
key: `${key}:${value}`,
|
|
12735
13015
|
facetKey: key,
|
|
12736
13016
|
facetLabel: (_facetLabels$get = facetLabels.get(key)) !== null && _facetLabels$get !== void 0 ? _facetLabels$get : key,
|
|
12737
13017
|
value,
|
|
@@ -12892,6 +13172,19 @@ function useFacetValues({ facets, indexes, searchClient }) {
|
|
|
12892
13172
|
]);
|
|
12893
13173
|
return facetValues;
|
|
12894
13174
|
}
|
|
13175
|
+
const EMPTY_SELECTION = [];
|
|
13176
|
+
/**
|
|
13177
|
+
* Compares two selections for a facet. A missing entry and an empty array are
|
|
13178
|
+
* both "nothing selected" so clearing an untouched facet doesn't trigger a
|
|
13179
|
+
* refresh.
|
|
13180
|
+
*/
|
|
13181
|
+
function areSelectionsEqual(a, b) {
|
|
13182
|
+
const left = a !== null && a !== void 0 ? a : EMPTY_SELECTION;
|
|
13183
|
+
const right = b !== null && b !== void 0 ? b : EMPTY_SELECTION;
|
|
13184
|
+
if (left === right) return true;
|
|
13185
|
+
if (left.length !== right.length) return false;
|
|
13186
|
+
return left.every((value, index) => value === right[index]);
|
|
13187
|
+
}
|
|
12895
13188
|
function useDocSearchFacets({ facets, indexes, searchClient, onSelectionsChange }) {
|
|
12896
13189
|
const normalizedFacets = En.useMemo(() => normalizeFacets(facets), [facets]);
|
|
12897
13190
|
const normalizedFacetsRef = En.useRef(normalizedFacets);
|
|
@@ -12921,16 +13214,23 @@ function useDocSearchFacets({ facets, indexes, searchClient, onSelectionsChange
|
|
|
12921
13214
|
visibleFacets,
|
|
12922
13215
|
facetSelections,
|
|
12923
13216
|
facetSelectionsRef,
|
|
12924
|
-
handleFacetSelectionChange: En.useCallback((facet,
|
|
12925
|
-
|
|
12926
|
-
const
|
|
12927
|
-
|
|
12928
|
-
applySelections(
|
|
13217
|
+
handleFacetSelectionChange: En.useCallback((facet, update) => {
|
|
13218
|
+
const existing = facetSelectionsRef.current[facet];
|
|
13219
|
+
const values = typeof update === "function" ? update(existing !== null && existing !== void 0 ? existing : EMPTY_SELECTION) : update;
|
|
13220
|
+
if (areSelectionsEqual(existing, values)) return;
|
|
13221
|
+
applySelections(_objectSpread2$2(_objectSpread2$2({}, facetSelectionsRef.current), {}, { [facet]: values }));
|
|
12929
13222
|
}, [applySelections]),
|
|
12930
13223
|
clearFacetSelections: En.useCallback(() => {
|
|
12931
|
-
|
|
13224
|
+
const current = facetSelectionsRef.current;
|
|
12932
13225
|
const next = {};
|
|
12933
|
-
|
|
13226
|
+
let hasSelectedValues = false;
|
|
13227
|
+
for (const facet of normalizedFacetsRef.current) {
|
|
13228
|
+
const values = current[facet.key];
|
|
13229
|
+
if (values === void 0) continue;
|
|
13230
|
+
if (values.length > 0) hasSelectedValues = true;
|
|
13231
|
+
next[facet.key] = EMPTY_SELECTION;
|
|
13232
|
+
}
|
|
13233
|
+
if (!hasSelectedValues) return;
|
|
12934
13234
|
applySelections(next);
|
|
12935
13235
|
}, [applySelections])
|
|
12936
13236
|
};
|
|
@@ -13364,21 +13664,31 @@ function ResultsScreen(_ref) {
|
|
|
13364
13664
|
}));
|
|
13365
13665
|
}), props.resultsFooterComponent && /* @__PURE__ */ En.createElement("section", { className: "DocSearch-HitsFooter" }, /* @__PURE__ */ En.createElement(props.resultsFooterComponent, { state: props.state })));
|
|
13366
13666
|
}
|
|
13667
|
+
function isFacetFilterOverridden(facetFilter, selectedFacets) {
|
|
13668
|
+
if (typeof facetFilter === "string") {
|
|
13669
|
+
const key = getFacetFilterKey(facetFilter);
|
|
13670
|
+
return key !== null && selectedFacets.has(key);
|
|
13671
|
+
}
|
|
13672
|
+
return facetFilter.length > 0 && facetFilter.every((entry) => isFacetFilterOverridden(entry, selectedFacets));
|
|
13673
|
+
}
|
|
13674
|
+
/**
|
|
13675
|
+
* Merges configured `facetFilters` with the user's facet selections.
|
|
13676
|
+
*
|
|
13677
|
+
* Multiple values selected for the same facet are combined into an OR group
|
|
13678
|
+
* (nested array). Different facets are combined with AND (top-level entries),
|
|
13679
|
+
* following Algolia `facetFilters` semantics.
|
|
13680
|
+
*/
|
|
13367
13681
|
function createFacetFilters(searchParametersFacetFilters, facetSelections) {
|
|
13368
13682
|
const selections = Object.entries(facetSelections);
|
|
13683
|
+
if (selections.length === 0) return searchParametersFacetFilters;
|
|
13369
13684
|
const selectedFacets = new Set(selections.map(([facet]) => facet));
|
|
13370
13685
|
const dynamicFacetFilters = [];
|
|
13371
|
-
for (const [facet,
|
|
13372
|
-
if (
|
|
13686
|
+
for (const [facet, values] of selections) if (values.length === 1) dynamicFacetFilters.push(`${facet}:${values[0]}`);
|
|
13687
|
+
else if (values.length > 1) dynamicFacetFilters.push(values.map((value) => `${facet}:${value}`));
|
|
13373
13688
|
let configuredFacetFilters = [];
|
|
13374
13689
|
if (searchParametersFacetFilters && Array.isArray(searchParametersFacetFilters)) configuredFacetFilters = searchParametersFacetFilters;
|
|
13375
13690
|
else if (searchParametersFacetFilters) configuredFacetFilters = [searchParametersFacetFilters];
|
|
13376
|
-
return [...configuredFacetFilters.filter((facetFilter) =>
|
|
13377
|
-
if (typeof facetFilter !== "string") return true;
|
|
13378
|
-
const separatorIndex = facetFilter.indexOf(":");
|
|
13379
|
-
const facet = facetFilter.slice(0, separatorIndex);
|
|
13380
|
-
return separatorIndex <= 0 || !selectedFacets.has(facet);
|
|
13381
|
-
}), ...dynamicFacetFilters];
|
|
13691
|
+
return [...configuredFacetFilters.filter((facetFilter) => !isFacetFilterOverridden(facetFilter, selectedFacets)), ...dynamicFacetFilters];
|
|
13382
13692
|
}
|
|
13383
13693
|
function buildNoQuerySources({ recentSearches, favoriteSearches, saveRecentSearch, onClose, disableUserPersonalization }) {
|
|
13384
13694
|
if (disableUserPersonalization) return [];
|
|
@@ -16305,7 +16615,7 @@ function createAutocomplete(options) {
|
|
|
16305
16615
|
}
|
|
16306
16616
|
|
|
16307
16617
|
//#endregion
|
|
16308
|
-
//#region ../docsearch-react/dist/esm/DocSearchModal-
|
|
16618
|
+
//#region ../docsearch-react/dist/esm/DocSearchModal-CLcbYBea.js
|
|
16309
16619
|
init_compat();
|
|
16310
16620
|
const _excluded$3 = ["translations"];
|
|
16311
16621
|
function KeywordSearchBox(_ref) {
|