@getlupa/client 1.9.5 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +668 -582
- package/dist/lupaSearch.js +668 -582
- package/dist/lupaSearch.mjs +668 -582
- package/dist/lupaSearch.umd.js +668 -582
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -6890,6 +6890,11 @@ const useOptionsStore = defineStore("options", () => {
|
|
|
6890
6890
|
const setInitialFilters = ({ initialFilters: initialFilters2 }) => {
|
|
6891
6891
|
searchResultInitialFilters.value = initialFilters2;
|
|
6892
6892
|
};
|
|
6893
|
+
const getQueryParamName = (param) => {
|
|
6894
|
+
var _a;
|
|
6895
|
+
const nameMap = searchBoxOptions.value.queryParameterNames;
|
|
6896
|
+
return (_a = nameMap == null ? void 0 : nameMap[param]) != null ? _a : param;
|
|
6897
|
+
};
|
|
6893
6898
|
return {
|
|
6894
6899
|
searchBoxOptions,
|
|
6895
6900
|
searchResultOptions,
|
|
@@ -6904,7 +6909,8 @@ const useOptionsStore = defineStore("options", () => {
|
|
|
6904
6909
|
setSearchBoxOptions,
|
|
6905
6910
|
setTrackingOptions,
|
|
6906
6911
|
setSearchResultOptions,
|
|
6907
|
-
setInitialFilters
|
|
6912
|
+
setInitialFilters,
|
|
6913
|
+
getQueryParamName
|
|
6908
6914
|
};
|
|
6909
6915
|
});
|
|
6910
6916
|
var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
|
|
@@ -7157,9 +7163,14 @@ const parseParam = (key, params) => {
|
|
|
7157
7163
|
return void 0;
|
|
7158
7164
|
}
|
|
7159
7165
|
};
|
|
7160
|
-
const parseRegularKeys = (regularKeys, searchParams) => {
|
|
7166
|
+
const parseRegularKeys = (regularKeys, searchParams, getQueryParamName) => {
|
|
7161
7167
|
const params = /* @__PURE__ */ Object.create({});
|
|
7162
|
-
const keys = reverseKeyValue(
|
|
7168
|
+
const keys = reverseKeyValue({
|
|
7169
|
+
QUERY: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.QUERY) : QUERY_PARAMS$1.QUERY,
|
|
7170
|
+
LIMIT: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.LIMIT) : QUERY_PARAMS$1.LIMIT,
|
|
7171
|
+
PAGE: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE,
|
|
7172
|
+
SORT: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.SORT) : QUERY_PARAMS$1.SORT
|
|
7173
|
+
});
|
|
7163
7174
|
for (const key of regularKeys) {
|
|
7164
7175
|
const rawKey = keys[key] || key;
|
|
7165
7176
|
params[rawKey] = parseParam(key, searchParams);
|
|
@@ -7201,16 +7212,17 @@ const parseFacetKeys = (facetKeys, searchParams) => {
|
|
|
7201
7212
|
}
|
|
7202
7213
|
return params;
|
|
7203
7214
|
};
|
|
7204
|
-
const parseParams = (searchParams) => {
|
|
7215
|
+
const parseParams = (getQueryParamName, searchParams) => {
|
|
7205
7216
|
const params = /* @__PURE__ */ Object.create({});
|
|
7206
7217
|
if (!searchParams)
|
|
7207
7218
|
return params;
|
|
7208
7219
|
const paramKeys = Array.from(searchParams.keys());
|
|
7209
7220
|
const facetKeys = paramKeys.filter((k) => isFacetKey(k));
|
|
7210
7221
|
const regularKeys = paramKeys.filter((k) => !isFacetKey(k));
|
|
7211
|
-
|
|
7222
|
+
const r = __spreadValues2(__spreadValues2({
|
|
7212
7223
|
[QUERY_PARAMS_PARSED.QUERY]: ""
|
|
7213
|
-
}, parseRegularKeys(regularKeys, searchParams)), parseFacetKeys(facetKeys, searchParams));
|
|
7224
|
+
}, parseRegularKeys(regularKeys, searchParams, getQueryParamName)), parseFacetKeys(facetKeys, searchParams));
|
|
7225
|
+
return r;
|
|
7214
7226
|
};
|
|
7215
7227
|
const appendParam = (url, { name, value }, encode = true) => {
|
|
7216
7228
|
if (Array.isArray(value)) {
|
|
@@ -7231,10 +7243,16 @@ const appendArrayParams = (url, param) => {
|
|
|
7231
7243
|
url.searchParams.delete(param.name);
|
|
7232
7244
|
param.value.forEach((v) => url.searchParams.append(param.name, encodeParam(v)));
|
|
7233
7245
|
};
|
|
7234
|
-
const getRemovableParams = (url, paramsToRemove) => {
|
|
7246
|
+
const getRemovableParams = (url, getQueryParamName, paramsToRemove) => {
|
|
7235
7247
|
if (paramsToRemove === "all") {
|
|
7248
|
+
const params = {
|
|
7249
|
+
QUERY: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.QUERY) : QUERY_PARAMS$1.QUERY,
|
|
7250
|
+
LIMIT: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.LIMIT) : QUERY_PARAMS$1.LIMIT,
|
|
7251
|
+
PAGE: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE,
|
|
7252
|
+
SORT: getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.SORT) : QUERY_PARAMS$1.SORT
|
|
7253
|
+
};
|
|
7236
7254
|
return [
|
|
7237
|
-
...Object.values(
|
|
7255
|
+
...Object.values(params),
|
|
7238
7256
|
...Array.from(url.searchParams.keys()).filter((k) => isFacetKey(k))
|
|
7239
7257
|
];
|
|
7240
7258
|
}
|
|
@@ -7265,12 +7283,12 @@ const generateLink = (linkPattern, document2) => {
|
|
|
7265
7283
|
}
|
|
7266
7284
|
return link;
|
|
7267
7285
|
};
|
|
7268
|
-
const generateResultLink = (link, searchText, facet) => {
|
|
7286
|
+
const generateResultLink = (link, getQueryParamName, searchText, facet) => {
|
|
7269
7287
|
if (!searchText) {
|
|
7270
7288
|
return link;
|
|
7271
7289
|
}
|
|
7272
7290
|
const facetParam = facet ? `&${FACET_PARAMS_TYPE.TERMS}${encodeParam(facet.key)}=${encodeParam(facet.title)}` : "";
|
|
7273
|
-
const queryParam = `?${QUERY_PARAMS$1.QUERY}=${encodeParam(searchText)}`;
|
|
7291
|
+
const queryParam = `?${getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.QUERY) : QUERY_PARAMS$1.QUERY}=${encodeParam(searchText)}`;
|
|
7274
7292
|
return `${link}${queryParam}${facetParam}`;
|
|
7275
7293
|
};
|
|
7276
7294
|
const getRelativePath = (link) => {
|
|
@@ -7299,8 +7317,8 @@ const handleRoutingEvent = (link, event, hasEventRouting = false) => {
|
|
|
7299
7317
|
event == null ? void 0 : event.preventDefault();
|
|
7300
7318
|
emitRoutingEvent(link);
|
|
7301
7319
|
};
|
|
7302
|
-
const redirectToResultsPage = (link, searchText, facet, routingBehavior = "direct-link") => {
|
|
7303
|
-
const url = generateResultLink(link, searchText, facet);
|
|
7320
|
+
const redirectToResultsPage = (link, searchText, getQueryParamName, facet, routingBehavior = "direct-link") => {
|
|
7321
|
+
const url = generateResultLink(link, getQueryParamName, searchText, facet);
|
|
7304
7322
|
if (routingBehavior === "event") {
|
|
7305
7323
|
emitRoutingEvent(url);
|
|
7306
7324
|
} else {
|
|
@@ -7325,15 +7343,15 @@ const getFacetParam = (key, value, type = FACET_PARAMS_TYPE.TERMS) => {
|
|
|
7325
7343
|
value
|
|
7326
7344
|
};
|
|
7327
7345
|
};
|
|
7328
|
-
const toggleTermFilter = (appendParams, facetAction, currentFilters) => {
|
|
7346
|
+
const toggleTermFilter = (appendParams, facetAction, getQueryParamName, currentFilters) => {
|
|
7329
7347
|
const currentFilter = currentFilters == null ? void 0 : currentFilters[facetAction.key];
|
|
7330
7348
|
const newParams = toggleTermParam(currentFilter, facetAction.value);
|
|
7331
7349
|
appendParams({
|
|
7332
7350
|
params: [getFacetParam(facetAction.key, newParams)],
|
|
7333
|
-
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
7351
|
+
paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE]
|
|
7334
7352
|
});
|
|
7335
7353
|
};
|
|
7336
|
-
const toggleHierarchyFilter = (appendParams, facetAction, currentFilters, removeAllLevels = false) => {
|
|
7354
|
+
const toggleHierarchyFilter = (appendParams, facetAction, getQueryParamName, currentFilters, removeAllLevels = false) => {
|
|
7337
7355
|
var _a;
|
|
7338
7356
|
const currentFilter = currentFilters == null ? void 0 : currentFilters[facetAction.key];
|
|
7339
7357
|
const newParams = toggleHierarchyParam(
|
|
@@ -7343,10 +7361,10 @@ const toggleHierarchyFilter = (appendParams, facetAction, currentFilters, remove
|
|
|
7343
7361
|
);
|
|
7344
7362
|
appendParams({
|
|
7345
7363
|
params: [getFacetParam(facetAction.key, newParams, FACET_PARAMS_TYPE.HIERARCHY)],
|
|
7346
|
-
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
7364
|
+
paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE]
|
|
7347
7365
|
});
|
|
7348
7366
|
};
|
|
7349
|
-
const toggleRangeFilter = (appendParams, facetAction, currentFilters) => {
|
|
7367
|
+
const toggleRangeFilter = (appendParams, facetAction, getQueryParamName, currentFilters) => {
|
|
7350
7368
|
const currentFilter = rangeFilterToString(
|
|
7351
7369
|
currentFilters == null ? void 0 : currentFilters[facetAction.key],
|
|
7352
7370
|
FACET_RANGE_SEPARATOR
|
|
@@ -7355,7 +7373,7 @@ const toggleRangeFilter = (appendParams, facetAction, currentFilters) => {
|
|
|
7355
7373
|
facetValue = currentFilter === facetValue ? "" : facetValue;
|
|
7356
7374
|
appendParams({
|
|
7357
7375
|
params: [getFacetParam(facetAction.key, facetValue, FACET_PARAMS_TYPE.RANGE)],
|
|
7358
|
-
paramsToRemove: [QUERY_PARAMS$1.PAGE],
|
|
7376
|
+
paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE],
|
|
7359
7377
|
encode: false
|
|
7360
7378
|
});
|
|
7361
7379
|
};
|
|
@@ -7484,7 +7502,7 @@ const useParamsStore = defineStore("params", () => {
|
|
|
7484
7502
|
const navigate = (url) => {
|
|
7485
7503
|
var _a, _b, _c;
|
|
7486
7504
|
window.history.pushState("", "Append params", url.pathname + url.search);
|
|
7487
|
-
const params2 = parseParams(url.searchParams);
|
|
7505
|
+
const params2 = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
7488
7506
|
(_c = (_b = (_a = optionsStore == null ? void 0 : optionsStore.searchBoxOptions) == null ? void 0 : _a.callbacks) == null ? void 0 : _b.onSearchResultsNavigate) == null ? void 0 : _c.call(_b, {
|
|
7489
7507
|
params: params2
|
|
7490
7508
|
});
|
|
@@ -7502,7 +7520,7 @@ const useParamsStore = defineStore("params", () => {
|
|
|
7502
7520
|
const paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
|
|
7503
7521
|
removeParams(url, paramsToRemove);
|
|
7504
7522
|
navigate(url);
|
|
7505
|
-
params.value = parseParams(url.searchParams);
|
|
7523
|
+
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
7506
7524
|
searchString.value = url.search;
|
|
7507
7525
|
};
|
|
7508
7526
|
const removeParameters = ({
|
|
@@ -7510,13 +7528,13 @@ const useParamsStore = defineStore("params", () => {
|
|
|
7510
7528
|
save = true
|
|
7511
7529
|
}) => {
|
|
7512
7530
|
const url = getPageUrl();
|
|
7513
|
-
paramsToRemove = getRemovableParams(url, paramsToRemove);
|
|
7531
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
7514
7532
|
removeParams(url, paramsToRemove);
|
|
7515
7533
|
navigate(url);
|
|
7516
7534
|
if (!save) {
|
|
7517
7535
|
return;
|
|
7518
7536
|
}
|
|
7519
|
-
params.value = parseParams(url.searchParams);
|
|
7537
|
+
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
7520
7538
|
searchString.value = url.search;
|
|
7521
7539
|
};
|
|
7522
7540
|
const handleNoResultsFlag = ({
|
|
@@ -7558,13 +7576,22 @@ const useParamsStore = defineStore("params", () => {
|
|
|
7558
7576
|
})
|
|
7559
7577
|
] : [];
|
|
7560
7578
|
appendParams({
|
|
7561
|
-
params: [
|
|
7579
|
+
params: [
|
|
7580
|
+
{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.QUERY), value: searchText },
|
|
7581
|
+
...facetParam
|
|
7582
|
+
],
|
|
7562
7583
|
paramsToRemove: "all",
|
|
7563
7584
|
searchResultsLink: searchResultsLink.value
|
|
7564
7585
|
});
|
|
7565
7586
|
} else {
|
|
7566
7587
|
const routing = (_a = optionsStore.boxRoutingBehavior) != null ? _a : "direct-link";
|
|
7567
|
-
redirectToResultsPage(
|
|
7588
|
+
redirectToResultsPage(
|
|
7589
|
+
searchResultsLink.value,
|
|
7590
|
+
searchText,
|
|
7591
|
+
optionsStore.getQueryParamName,
|
|
7592
|
+
facet,
|
|
7593
|
+
routing
|
|
7594
|
+
);
|
|
7568
7595
|
}
|
|
7569
7596
|
};
|
|
7570
7597
|
const appendParams = ({
|
|
@@ -7578,14 +7605,14 @@ const useParamsStore = defineStore("params", () => {
|
|
|
7578
7605
|
return { params: params.value };
|
|
7579
7606
|
}
|
|
7580
7607
|
const url = getPageUrl(searchResultsLink2);
|
|
7581
|
-
paramsToRemove = getRemovableParams(url, paramsToRemove);
|
|
7608
|
+
paramsToRemove = getRemovableParams(url, optionsStore.getQueryParamName, paramsToRemove);
|
|
7582
7609
|
removeParams(url, paramsToRemove);
|
|
7583
7610
|
newParams.forEach((p2) => appendParam(url, p2, encode));
|
|
7584
7611
|
navigate(url);
|
|
7585
7612
|
if (!save) {
|
|
7586
7613
|
return;
|
|
7587
7614
|
}
|
|
7588
|
-
params.value = parseParams(url.searchParams);
|
|
7615
|
+
params.value = parseParams(optionsStore.getQueryParamName, url.searchParams);
|
|
7589
7616
|
searchString.value = url.search;
|
|
7590
7617
|
};
|
|
7591
7618
|
const setDefaultLimit = (newDefaultLimit) => {
|
|
@@ -7836,7 +7863,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7836
7863
|
resetHighlightIndex
|
|
7837
7864
|
};
|
|
7838
7865
|
});
|
|
7839
|
-
const _hoisted_1$
|
|
7866
|
+
const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
|
|
7840
7867
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7841
7868
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
7842
7869
|
const _hoisted_4$s = ["value"];
|
|
@@ -7926,7 +7953,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
7926
7953
|
};
|
|
7927
7954
|
__expose({ focus });
|
|
7928
7955
|
return (_ctx, _cache) => {
|
|
7929
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
7956
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
7930
7957
|
createBaseVNode("div", _hoisted_2$P, [
|
|
7931
7958
|
createBaseVNode("div", {
|
|
7932
7959
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
@@ -8000,7 +8027,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
8000
8027
|
};
|
|
8001
8028
|
}
|
|
8002
8029
|
});
|
|
8003
|
-
const _hoisted_1$
|
|
8030
|
+
const _hoisted_1$1c = { class: "lupa-search-box-history-item" };
|
|
8004
8031
|
const _hoisted_2$O = { class: "lupa-search-box-history-item-content" };
|
|
8005
8032
|
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8006
8033
|
__name: "SearchBoxHistoryItem",
|
|
@@ -8018,7 +8045,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8018
8045
|
emit2("click", { query: props.item });
|
|
8019
8046
|
};
|
|
8020
8047
|
return (_ctx, _cache) => {
|
|
8021
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8048
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1c, [
|
|
8022
8049
|
createBaseVNode("div", _hoisted_2$O, [
|
|
8023
8050
|
createBaseVNode("div", {
|
|
8024
8051
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
@@ -8033,7 +8060,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8033
8060
|
};
|
|
8034
8061
|
}
|
|
8035
8062
|
});
|
|
8036
|
-
const _hoisted_1$
|
|
8063
|
+
const _hoisted_1$1b = {
|
|
8037
8064
|
key: 0,
|
|
8038
8065
|
class: "lupa-search-box-history-panel"
|
|
8039
8066
|
};
|
|
@@ -8078,7 +8105,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8078
8105
|
}
|
|
8079
8106
|
};
|
|
8080
8107
|
return (_ctx, _cache) => {
|
|
8081
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8108
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1b, [
|
|
8082
8109
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8083
8110
|
return openBlock(), createBlock(_sfc_main$1j, {
|
|
8084
8111
|
key: item,
|
|
@@ -8096,7 +8123,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8096
8123
|
};
|
|
8097
8124
|
}
|
|
8098
8125
|
});
|
|
8099
|
-
const _hoisted_1$
|
|
8126
|
+
const _hoisted_1$1a = { class: "lupa-search-box-no-results" };
|
|
8100
8127
|
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8101
8128
|
__name: "SearchBoxNoResults",
|
|
8102
8129
|
props: {
|
|
@@ -8104,11 +8131,11 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
8104
8131
|
},
|
|
8105
8132
|
setup(__props) {
|
|
8106
8133
|
return (_ctx, _cache) => {
|
|
8107
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8134
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1a, toDisplayString(_ctx.labels.noResults), 1);
|
|
8108
8135
|
};
|
|
8109
8136
|
}
|
|
8110
8137
|
});
|
|
8111
|
-
const _hoisted_1$
|
|
8138
|
+
const _hoisted_1$19 = ["innerHTML"];
|
|
8112
8139
|
const _hoisted_2$N = {
|
|
8113
8140
|
key: 1,
|
|
8114
8141
|
"data-cy": "lupa-suggestion-value",
|
|
@@ -8163,7 +8190,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8163
8190
|
class: "lupa-suggestion-value",
|
|
8164
8191
|
"data-cy": "lupa-suggestion-value",
|
|
8165
8192
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8166
|
-
}, null, 8, _hoisted_1$
|
|
8193
|
+
}, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8167
8194
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8168
8195
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8169
8196
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8172,7 +8199,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8172
8199
|
};
|
|
8173
8200
|
}
|
|
8174
8201
|
});
|
|
8175
|
-
const _hoisted_1$
|
|
8202
|
+
const _hoisted_1$18 = {
|
|
8176
8203
|
id: "lupa-search-box-suggestions",
|
|
8177
8204
|
"data-cy": "lupa-search-box-suggestions"
|
|
8178
8205
|
};
|
|
@@ -8236,7 +8263,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8236
8263
|
});
|
|
8237
8264
|
});
|
|
8238
8265
|
return (_ctx, _cache) => {
|
|
8239
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8266
|
+
return openBlock(), createElementBlock("div", _hoisted_1$18, [
|
|
8240
8267
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8241
8268
|
return openBlock(), createBlock(_sfc_main$1g, {
|
|
8242
8269
|
key: getSuggestionKey(item),
|
|
@@ -8320,8 +8347,9 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
8320
8347
|
const useDynamicDataStore = defineStore("dynamicData", () => {
|
|
8321
8348
|
const loading = ref(false);
|
|
8322
8349
|
const dynamicDataIdMap = ref({});
|
|
8350
|
+
const loadingIds = ref({});
|
|
8323
8351
|
const optionsStore = useOptionsStore();
|
|
8324
|
-
|
|
8352
|
+
computed(() => Object.keys(dynamicDataIdMap.value));
|
|
8325
8353
|
const searchResultOptions = computed(() => optionsStore.searchResultOptions);
|
|
8326
8354
|
const searchBoxOptions = computed(() => optionsStore.searchBoxOptions);
|
|
8327
8355
|
const dynamicSearchResultData = computed(() => {
|
|
@@ -8361,11 +8389,12 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
|
|
|
8361
8389
|
const similarQueryResultIds = (_e = (_d = (_c = result.similarQueries) == null ? void 0 : _c.map((q) => q.items.map((i) => i.id))) == null ? void 0 : _d.flat()) != null ? _e : [];
|
|
8362
8390
|
let requestedIds = [...resultIds, ...similarQueryResultIds];
|
|
8363
8391
|
if (isCacheEnabled.value) {
|
|
8364
|
-
requestedIds = requestedIds.filter((i) => !
|
|
8392
|
+
requestedIds = requestedIds.filter((i) => !dynamicDataIdMap.value[`${i}`]);
|
|
8365
8393
|
}
|
|
8366
8394
|
if (!requestedIds.length) {
|
|
8367
8395
|
return;
|
|
8368
8396
|
}
|
|
8397
|
+
loadingIds.value = requestedIds.reduce((a, c2) => __spreadProps2(__spreadValues2({}, a), { [c2]: true }), {});
|
|
8369
8398
|
loading.value = true;
|
|
8370
8399
|
try {
|
|
8371
8400
|
const dynamicData = dynamicSearchResultData.value || dynamicSearchBoxData.value;
|
|
@@ -8375,15 +8404,16 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
|
|
|
8375
8404
|
const dynamicDataResult = (_f = yield dynamicData == null ? void 0 : dynamicData.handler(requestedIds)) != null ? _f : [];
|
|
8376
8405
|
const seed = {};
|
|
8377
8406
|
const dynamicDataIdMapValue = dynamicDataResult.reduce(
|
|
8378
|
-
(a, c2) => __spreadProps2(__spreadValues2({}, a), { [c2.id]: c2 }),
|
|
8407
|
+
(a, c2) => __spreadProps2(__spreadValues2({}, a), { [`${c2.id}`]: c2 }),
|
|
8379
8408
|
seed
|
|
8380
8409
|
);
|
|
8381
8410
|
dynamicDataIdMap.value = __spreadValues2(__spreadValues2({}, dynamicDataIdMap.value), dynamicDataIdMapValue);
|
|
8382
8411
|
} finally {
|
|
8383
8412
|
loading.value = false;
|
|
8413
|
+
loadingIds.value = {};
|
|
8384
8414
|
}
|
|
8385
8415
|
});
|
|
8386
|
-
return { dynamicDataIdMap, loading, enhanceSearchResultsWithDynamicData };
|
|
8416
|
+
return { dynamicDataIdMap, loading, loadingIds, enhanceSearchResultsWithDynamicData };
|
|
8387
8417
|
});
|
|
8388
8418
|
const joinUrlParts = (...parts) => {
|
|
8389
8419
|
var _a, _b, _c;
|
|
@@ -8392,7 +8422,7 @@ const joinUrlParts = (...parts) => {
|
|
|
8392
8422
|
}
|
|
8393
8423
|
return (_c = (_b = (_a = parts == null ? void 0 : parts.map((part) => part.replace(/(^\/+|\/+$)/g, ""))) == null ? void 0 : _a.filter((part) => part !== "")) == null ? void 0 : _b.join("/")) != null ? _c : "";
|
|
8394
8424
|
};
|
|
8395
|
-
const _hoisted_1$
|
|
8425
|
+
const _hoisted_1$17 = ["src"];
|
|
8396
8426
|
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
8397
8427
|
__name: "ProductImage",
|
|
8398
8428
|
props: {
|
|
@@ -8446,7 +8476,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
8446
8476
|
createBaseVNode("img", mergeProps({
|
|
8447
8477
|
class: (_b = _ctx.imageClass) != null ? _b : "",
|
|
8448
8478
|
src: finalUrl.value
|
|
8449
|
-
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_1$
|
|
8479
|
+
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_1$17)
|
|
8450
8480
|
], 2);
|
|
8451
8481
|
};
|
|
8452
8482
|
}
|
|
@@ -8468,7 +8498,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
8468
8498
|
};
|
|
8469
8499
|
}
|
|
8470
8500
|
});
|
|
8471
|
-
const _hoisted_1$
|
|
8501
|
+
const _hoisted_1$16 = ["innerHTML"];
|
|
8472
8502
|
const _hoisted_2$M = {
|
|
8473
8503
|
key: 1,
|
|
8474
8504
|
class: "lupa-search-box-product-title"
|
|
@@ -8493,13 +8523,13 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
8493
8523
|
key: 0,
|
|
8494
8524
|
class: "lupa-search-box-product-title",
|
|
8495
8525
|
innerHTML: title.value
|
|
8496
|
-
}, null, 8, _hoisted_1$
|
|
8526
|
+
}, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("div", _hoisted_2$M, [
|
|
8497
8527
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
8498
8528
|
]));
|
|
8499
8529
|
};
|
|
8500
8530
|
}
|
|
8501
8531
|
});
|
|
8502
|
-
const _hoisted_1$
|
|
8532
|
+
const _hoisted_1$15 = ["innerHTML"];
|
|
8503
8533
|
const _hoisted_2$L = {
|
|
8504
8534
|
key: 1,
|
|
8505
8535
|
class: "lupa-search-box-product-description"
|
|
@@ -8524,11 +8554,11 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
8524
8554
|
key: 0,
|
|
8525
8555
|
class: "lupa-search-box-product-description",
|
|
8526
8556
|
innerHTML: description.value
|
|
8527
|
-
}, null, 8, _hoisted_1$
|
|
8557
|
+
}, null, 8, _hoisted_1$15)) : (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString(description.value), 1));
|
|
8528
8558
|
};
|
|
8529
8559
|
}
|
|
8530
8560
|
});
|
|
8531
|
-
const _hoisted_1$
|
|
8561
|
+
const _hoisted_1$14 = { class: "lupa-search-box-product-price" };
|
|
8532
8562
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
8533
8563
|
__name: "SearchBoxProductPrice",
|
|
8534
8564
|
props: {
|
|
@@ -8547,13 +8577,13 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
8547
8577
|
);
|
|
8548
8578
|
});
|
|
8549
8579
|
return (_ctx, _cache) => {
|
|
8550
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8580
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
8551
8581
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
8552
8582
|
]);
|
|
8553
8583
|
};
|
|
8554
8584
|
}
|
|
8555
8585
|
});
|
|
8556
|
-
const _hoisted_1$
|
|
8586
|
+
const _hoisted_1$13 = { class: "lupa-search-box-product-regular-price" };
|
|
8557
8587
|
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
8558
8588
|
__name: "SearchBoxProductRegularPrice",
|
|
8559
8589
|
props: {
|
|
@@ -8572,11 +8602,11 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
8572
8602
|
);
|
|
8573
8603
|
});
|
|
8574
8604
|
return (_ctx, _cache) => {
|
|
8575
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8605
|
+
return openBlock(), createElementBlock("div", _hoisted_1$13, toDisplayString(price.value), 1);
|
|
8576
8606
|
};
|
|
8577
8607
|
}
|
|
8578
8608
|
});
|
|
8579
|
-
const _hoisted_1$
|
|
8609
|
+
const _hoisted_1$12 = ["innerHTML"];
|
|
8580
8610
|
const _hoisted_2$K = { key: 0 };
|
|
8581
8611
|
const _hoisted_3$y = { key: 1 };
|
|
8582
8612
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
@@ -8607,7 +8637,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
8607
8637
|
key: 0,
|
|
8608
8638
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
8609
8639
|
innerHTML: text.value
|
|
8610
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
8640
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$12)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
8611
8641
|
key: 1,
|
|
8612
8642
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8613
8643
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
@@ -8619,7 +8649,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
8619
8649
|
};
|
|
8620
8650
|
}
|
|
8621
8651
|
});
|
|
8622
|
-
const _hoisted_1$
|
|
8652
|
+
const _hoisted_1$11 = ["innerHTML"];
|
|
8623
8653
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
8624
8654
|
__name: "SearchBoxProductCustomHtml",
|
|
8625
8655
|
props: {
|
|
@@ -8640,7 +8670,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
8640
8670
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
8641
8671
|
class: className.value,
|
|
8642
8672
|
innerHTML: text.value
|
|
8643
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
8673
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$11);
|
|
8644
8674
|
};
|
|
8645
8675
|
}
|
|
8646
8676
|
});
|
|
@@ -8834,7 +8864,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
8834
8864
|
setLoading
|
|
8835
8865
|
};
|
|
8836
8866
|
});
|
|
8837
|
-
const _hoisted_1
|
|
8867
|
+
const _hoisted_1$10 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
8838
8868
|
const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
|
|
8839
8869
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
8840
8870
|
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
@@ -8864,7 +8894,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
8864
8894
|
loading.value = false;
|
|
8865
8895
|
});
|
|
8866
8896
|
return (_ctx, _cache) => {
|
|
8867
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
8897
|
+
return openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
8868
8898
|
createBaseVNode("div", _hoisted_2$J, [
|
|
8869
8899
|
createBaseVNode("button", {
|
|
8870
8900
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
@@ -8878,6 +8908,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
8878
8908
|
};
|
|
8879
8909
|
}
|
|
8880
8910
|
});
|
|
8911
|
+
const _hoisted_1$$ = {
|
|
8912
|
+
key: 1,
|
|
8913
|
+
class: "lupa-search-box-element-badge-wrapper"
|
|
8914
|
+
};
|
|
8881
8915
|
const __default__$4 = {
|
|
8882
8916
|
components: {
|
|
8883
8917
|
SearchBoxProductImage: _sfc_main$1c,
|
|
@@ -8901,7 +8935,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8901
8935
|
setup(__props) {
|
|
8902
8936
|
const props = __props;
|
|
8903
8937
|
const dynamicDataStore = useDynamicDataStore();
|
|
8904
|
-
const { loading, dynamicDataIdMap } = storeToRefs(dynamicDataStore);
|
|
8938
|
+
const { loading, loadingIds, dynamicDataIdMap } = storeToRefs(dynamicDataStore);
|
|
8905
8939
|
const elementComponent = computed(() => {
|
|
8906
8940
|
switch (props.element.type) {
|
|
8907
8941
|
case DocumentElementType.IMAGE:
|
|
@@ -8926,9 +8960,6 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8926
8960
|
const displayElement = computed(() => {
|
|
8927
8961
|
return props.element.display ? props.element.display(props.item) : true;
|
|
8928
8962
|
});
|
|
8929
|
-
const isLoadingDynamicData = computed(() => {
|
|
8930
|
-
return Boolean(props.element.dynamic && loading.value);
|
|
8931
|
-
});
|
|
8932
8963
|
const enhancedItem = computed(() => {
|
|
8933
8964
|
var _a, _b, _c, _d;
|
|
8934
8965
|
if (!((_a = props.item) == null ? void 0 : _a.id)) {
|
|
@@ -8937,26 +8968,295 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8937
8968
|
const enhancementData = (_d = (_c = dynamicDataIdMap.value) == null ? void 0 : _c[(_b = props.item) == null ? void 0 : _b.id]) != null ? _d : {};
|
|
8938
8969
|
return __spreadValues2(__spreadValues2({}, props.item), enhancementData);
|
|
8939
8970
|
});
|
|
8971
|
+
const isLoadingDynamicData = (id) => {
|
|
8972
|
+
return Boolean(props.element.dynamic && id && loading.value && (loadingIds == null ? void 0 : loadingIds.value[id]));
|
|
8973
|
+
};
|
|
8940
8974
|
return (_ctx, _cache) => {
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8975
|
+
var _a, _b;
|
|
8976
|
+
return !_ctx.$slots.badges ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
8977
|
+
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
8978
|
+
key: 0,
|
|
8979
|
+
item: enhancedItem.value,
|
|
8980
|
+
options: _ctx.element,
|
|
8981
|
+
labels: _ctx.labels,
|
|
8982
|
+
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
8983
|
+
inStock: _ctx.isInStock
|
|
8984
|
+
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
8985
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$$, [
|
|
8986
|
+
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
8987
|
+
key: 0,
|
|
8988
|
+
item: enhancedItem.value,
|
|
8989
|
+
options: _ctx.element,
|
|
8990
|
+
labels: _ctx.labels,
|
|
8991
|
+
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_b = _ctx.item) == null ? void 0 : _b.id) }),
|
|
8992
|
+
inStock: _ctx.isInStock
|
|
8993
|
+
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true),
|
|
8994
|
+
renderSlot(_ctx.$slots, "badges")
|
|
8995
|
+
]));
|
|
8949
8996
|
};
|
|
8950
8997
|
}
|
|
8951
8998
|
}));
|
|
8952
|
-
const _hoisted_1$_ =
|
|
8953
|
-
const _hoisted_2$I =
|
|
8954
|
-
const _hoisted_3$w = {
|
|
8999
|
+
const _hoisted_1$_ = { class: "lupa-badge-title" };
|
|
9000
|
+
const _hoisted_2$I = ["src"];
|
|
9001
|
+
const _hoisted_3$w = { key: 1 };
|
|
8955
9002
|
const _hoisted_4$p = {
|
|
8956
9003
|
key: 0,
|
|
8957
|
-
class: "lupa-
|
|
9004
|
+
class: "lupa-badge-full-text"
|
|
8958
9005
|
};
|
|
8959
9006
|
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9007
|
+
__name: "SearchResultGeneratedBadge",
|
|
9008
|
+
props: {
|
|
9009
|
+
options: {},
|
|
9010
|
+
badge: {}
|
|
9011
|
+
},
|
|
9012
|
+
setup(__props) {
|
|
9013
|
+
const props = __props;
|
|
9014
|
+
const image = computed(() => {
|
|
9015
|
+
var _a, _b, _c;
|
|
9016
|
+
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.image) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : "";
|
|
9017
|
+
});
|
|
9018
|
+
const showTitle = computed(() => {
|
|
9019
|
+
var _a, _b, _c;
|
|
9020
|
+
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.showTitle) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : true;
|
|
9021
|
+
});
|
|
9022
|
+
const hasAdditionalText = computed(() => {
|
|
9023
|
+
var _a, _b;
|
|
9024
|
+
return Boolean((_a = props.badge) == null ? void 0 : _a.additionalText) && typeof ((_b = props.badge) == null ? void 0 : _b.additionalText) === "string";
|
|
9025
|
+
});
|
|
9026
|
+
const hasTitleText = computed(() => {
|
|
9027
|
+
var _a, _b;
|
|
9028
|
+
return Boolean((_a = props.badge) == null ? void 0 : _a.titleText) && typeof ((_b = props.badge) == null ? void 0 : _b.titleText) === "string";
|
|
9029
|
+
});
|
|
9030
|
+
const customClassName = computed(() => {
|
|
9031
|
+
var _a, _b, _c;
|
|
9032
|
+
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.customClass) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : "";
|
|
9033
|
+
});
|
|
9034
|
+
return (_ctx, _cache) => {
|
|
9035
|
+
return openBlock(), createElementBlock("div", {
|
|
9036
|
+
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9037
|
+
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9038
|
+
}, [
|
|
9039
|
+
createBaseVNode("span", _hoisted_1$_, [
|
|
9040
|
+
image.value ? (openBlock(), createElementBlock("img", {
|
|
9041
|
+
key: 0,
|
|
9042
|
+
src: image.value
|
|
9043
|
+
}, null, 8, _hoisted_2$I)) : createCommentVNode("", true),
|
|
9044
|
+
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
9045
|
+
]),
|
|
9046
|
+
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
9047
|
+
], 6);
|
|
9048
|
+
};
|
|
9049
|
+
}
|
|
9050
|
+
});
|
|
9051
|
+
const _hoisted_1$Z = { class: "lupa-generated-badges" };
|
|
9052
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9053
|
+
__name: "SearchResultGeneratedBadges",
|
|
9054
|
+
props: {
|
|
9055
|
+
options: {}
|
|
9056
|
+
},
|
|
9057
|
+
setup(__props) {
|
|
9058
|
+
const props = __props;
|
|
9059
|
+
const badgeField = computed(() => {
|
|
9060
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9061
|
+
const fieldHasBadges = ((_a = props.options.generate) == null ? void 0 : _a.key) && ((_d = props.options.product) == null ? void 0 : _d[(_c = (_b = props.options.generate) == null ? void 0 : _b.key) != null ? _c : ""]) && Array.isArray(props.options.product[(_f = (_e = props.options.generate) == null ? void 0 : _e.key) != null ? _f : ""]);
|
|
9062
|
+
return fieldHasBadges ? props.options.product[(_h = (_g = props.options.generate) == null ? void 0 : _g.key) != null ? _h : ""] : [];
|
|
9063
|
+
});
|
|
9064
|
+
const keyMap = computed(() => {
|
|
9065
|
+
var _a, _b;
|
|
9066
|
+
return (_b = (_a = props.options.generate) == null ? void 0 : _a.keyMap) != null ? _b : {};
|
|
9067
|
+
});
|
|
9068
|
+
const badges = computed(() => {
|
|
9069
|
+
return badgeField.value.filter((f2) => Boolean(f2)).map((f2) => ({
|
|
9070
|
+
backgroundColor: keyMap.value.backgroundColor ? f2[keyMap.value.backgroundColor] : void 0,
|
|
9071
|
+
color: keyMap.value.color ? f2[keyMap.value.color] : void 0,
|
|
9072
|
+
titleText: keyMap.value.titleText ? f2[keyMap.value.titleText] : void 0,
|
|
9073
|
+
additionalText: keyMap.value.additionalText ? f2[keyMap.value.additionalText] : void 0,
|
|
9074
|
+
id: keyMap.value.id ? f2[keyMap.value.id] : void 0
|
|
9075
|
+
})).filter((b) => Boolean(b.id));
|
|
9076
|
+
});
|
|
9077
|
+
return (_ctx, _cache) => {
|
|
9078
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
9079
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9080
|
+
return openBlock(), createBlock(_sfc_main$13, {
|
|
9081
|
+
key: badge.id,
|
|
9082
|
+
badge,
|
|
9083
|
+
options: _ctx.options
|
|
9084
|
+
}, null, 8, ["badge", "options"]);
|
|
9085
|
+
}), 128))
|
|
9086
|
+
]);
|
|
9087
|
+
};
|
|
9088
|
+
}
|
|
9089
|
+
});
|
|
9090
|
+
const _hoisted_1$Y = ["innerHTML"];
|
|
9091
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9092
|
+
__name: "CustomBadge",
|
|
9093
|
+
props: {
|
|
9094
|
+
badge: {}
|
|
9095
|
+
},
|
|
9096
|
+
setup(__props) {
|
|
9097
|
+
const props = __props;
|
|
9098
|
+
const text = computed(() => {
|
|
9099
|
+
var _a, _b, _c;
|
|
9100
|
+
return (_c = (_b = props.badge).html) == null ? void 0 : _c.call(_b, (_a = props.badge.product) != null ? _a : {});
|
|
9101
|
+
});
|
|
9102
|
+
const className = computed(() => {
|
|
9103
|
+
var _a;
|
|
9104
|
+
return (_a = props.badge.className) != null ? _a : "";
|
|
9105
|
+
});
|
|
9106
|
+
return (_ctx, _cache) => {
|
|
9107
|
+
return openBlock(), createElementBlock("div", {
|
|
9108
|
+
class: normalizeClass(className.value),
|
|
9109
|
+
innerHTML: text.value
|
|
9110
|
+
}, null, 10, _hoisted_1$Y);
|
|
9111
|
+
};
|
|
9112
|
+
}
|
|
9113
|
+
});
|
|
9114
|
+
const _hoisted_1$X = { class: "lupa-text-badges" };
|
|
9115
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
9116
|
+
__name: "TextBadge",
|
|
9117
|
+
props: {
|
|
9118
|
+
badge: {}
|
|
9119
|
+
},
|
|
9120
|
+
setup(__props) {
|
|
9121
|
+
const props = __props;
|
|
9122
|
+
const badges = computed(() => {
|
|
9123
|
+
var _a, _b;
|
|
9124
|
+
return (_b = (_a = props.badge) == null ? void 0 : _a.value) != null ? _b : [];
|
|
9125
|
+
});
|
|
9126
|
+
const displayBadges = computed(() => {
|
|
9127
|
+
return badges.value.slice(0, props.badge.maxItems);
|
|
9128
|
+
});
|
|
9129
|
+
return (_ctx, _cache) => {
|
|
9130
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9131
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9132
|
+
return openBlock(), createElementBlock("div", {
|
|
9133
|
+
class: "lupa-badge lupa-text-badge",
|
|
9134
|
+
key: item
|
|
9135
|
+
}, toDisplayString(_ctx.badge.prefix) + toDisplayString(item), 1);
|
|
9136
|
+
}), 128))
|
|
9137
|
+
]);
|
|
9138
|
+
};
|
|
9139
|
+
}
|
|
9140
|
+
});
|
|
9141
|
+
const _hoisted_1$W = { class: "lupa-image-badges" };
|
|
9142
|
+
const _hoisted_2$H = ["src"];
|
|
9143
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
9144
|
+
__name: "ImageBadge",
|
|
9145
|
+
props: {
|
|
9146
|
+
badge: {}
|
|
9147
|
+
},
|
|
9148
|
+
setup(__props) {
|
|
9149
|
+
const props = __props;
|
|
9150
|
+
const badges = computed(() => {
|
|
9151
|
+
return props.badge.value;
|
|
9152
|
+
});
|
|
9153
|
+
const displayBadges = computed(() => {
|
|
9154
|
+
return badges.value.slice(0, props.badge.maxItems);
|
|
9155
|
+
});
|
|
9156
|
+
const getImageUrl = (src) => {
|
|
9157
|
+
if (!props.badge.rootImageUrl) {
|
|
9158
|
+
return src;
|
|
9159
|
+
}
|
|
9160
|
+
return `${props.badge.rootImageUrl}${src}`;
|
|
9161
|
+
};
|
|
9162
|
+
return (_ctx, _cache) => {
|
|
9163
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
9164
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9165
|
+
return openBlock(), createElementBlock("div", {
|
|
9166
|
+
class: "lupa-badge lupa-image-badge",
|
|
9167
|
+
key: item
|
|
9168
|
+
}, [
|
|
9169
|
+
createBaseVNode("img", {
|
|
9170
|
+
src: getImageUrl(item)
|
|
9171
|
+
}, null, 8, _hoisted_2$H)
|
|
9172
|
+
]);
|
|
9173
|
+
}), 128))
|
|
9174
|
+
]);
|
|
9175
|
+
};
|
|
9176
|
+
}
|
|
9177
|
+
});
|
|
9178
|
+
const _hoisted_1$V = { id: "lupa-search-results-badges" };
|
|
9179
|
+
const __default__$3 = {
|
|
9180
|
+
components: {
|
|
9181
|
+
CustomBadge: _sfc_main$11,
|
|
9182
|
+
TextBadge: _sfc_main$10,
|
|
9183
|
+
ImageBadge: _sfc_main$$
|
|
9184
|
+
}
|
|
9185
|
+
};
|
|
9186
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9187
|
+
__name: "SearchResultsBadgeWrapper",
|
|
9188
|
+
props: {
|
|
9189
|
+
position: {},
|
|
9190
|
+
options: {}
|
|
9191
|
+
},
|
|
9192
|
+
setup(__props) {
|
|
9193
|
+
const props = __props;
|
|
9194
|
+
const positionValue = computed(() => {
|
|
9195
|
+
var _a;
|
|
9196
|
+
return (_a = props.position) != null ? _a : "card";
|
|
9197
|
+
});
|
|
9198
|
+
const anchorPosition = computed(() => {
|
|
9199
|
+
return props.options.anchor;
|
|
9200
|
+
});
|
|
9201
|
+
const badges = computed(() => {
|
|
9202
|
+
if (!props.options.elements) {
|
|
9203
|
+
return [];
|
|
9204
|
+
}
|
|
9205
|
+
return props.options.elements.filter((e) => {
|
|
9206
|
+
var _a;
|
|
9207
|
+
return !e.display || e.display((_a = props.options.product) != null ? _a : {});
|
|
9208
|
+
}).map((x) => {
|
|
9209
|
+
var _a;
|
|
9210
|
+
return __spreadProps2(__spreadValues2({}, x), {
|
|
9211
|
+
value: ((_a = props.options.product) == null ? void 0 : _a[x.key]) || "badge",
|
|
9212
|
+
product: props.options.product
|
|
9213
|
+
});
|
|
9214
|
+
});
|
|
9215
|
+
});
|
|
9216
|
+
const displayBadges = computed(() => {
|
|
9217
|
+
return positionValue.value === "card" ? badges.value.filter((b) => !b.position || b.position === "card") : badges.value.filter((b) => b.position === "image");
|
|
9218
|
+
});
|
|
9219
|
+
const getBadgeComponent = (type) => {
|
|
9220
|
+
switch (type) {
|
|
9221
|
+
case BadgeType.TEXT:
|
|
9222
|
+
return "TextBadge";
|
|
9223
|
+
case BadgeType.IMAGE:
|
|
9224
|
+
return "ImageBadge";
|
|
9225
|
+
case BadgeType.CUSTOM_HTML:
|
|
9226
|
+
return "CustomBadge";
|
|
9227
|
+
default:
|
|
9228
|
+
return "CustomBadge";
|
|
9229
|
+
}
|
|
9230
|
+
};
|
|
9231
|
+
return (_ctx, _cache) => {
|
|
9232
|
+
return openBlock(), createElementBlock("div", _hoisted_1$V, [
|
|
9233
|
+
createBaseVNode("div", {
|
|
9234
|
+
id: "lupa-badges",
|
|
9235
|
+
class: normalizeClass(anchorPosition.value)
|
|
9236
|
+
}, [
|
|
9237
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (badge, index) => {
|
|
9238
|
+
return openBlock(), createBlock(resolveDynamicComponent(getBadgeComponent(badge.type)), {
|
|
9239
|
+
key: index,
|
|
9240
|
+
badge
|
|
9241
|
+
}, null, 8, ["badge"]);
|
|
9242
|
+
}), 128)),
|
|
9243
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$12, {
|
|
9244
|
+
key: 0,
|
|
9245
|
+
options: _ctx.options
|
|
9246
|
+
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
9247
|
+
], 2)
|
|
9248
|
+
]);
|
|
9249
|
+
};
|
|
9250
|
+
}
|
|
9251
|
+
}));
|
|
9252
|
+
const _hoisted_1$U = ["href"];
|
|
9253
|
+
const _hoisted_2$G = { class: "lupa-search-box-product-image-section" };
|
|
9254
|
+
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9255
|
+
const _hoisted_4$o = {
|
|
9256
|
+
key: 0,
|
|
9257
|
+
class: "lupa-search-box-product-add-to-cart-section"
|
|
9258
|
+
};
|
|
9259
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
8960
9260
|
__name: "SearchBoxProduct",
|
|
8961
9261
|
props: {
|
|
8962
9262
|
item: {},
|
|
@@ -8973,6 +9273,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
8973
9273
|
var _a, _b;
|
|
8974
9274
|
return generateLink((_b = (_a = props.panelOptions.links) == null ? void 0 : _a.details) != null ? _b : "", props.item);
|
|
8975
9275
|
});
|
|
9276
|
+
const badgeOptions = computed(() => {
|
|
9277
|
+
return __spreadProps2(__spreadValues2({}, props.panelOptions.badges), { product: props.item });
|
|
9278
|
+
});
|
|
8976
9279
|
const imageElements = computed(() => {
|
|
8977
9280
|
var _a, _b;
|
|
8978
9281
|
return (_b = (_a = props.panelOptions.elements) == null ? void 0 : _a.filter((e) => e.type === DocumentElementType.IMAGE)) != null ? _b : [];
|
|
@@ -9012,7 +9315,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9012
9315
|
"data-cy": "lupa-search-box-product",
|
|
9013
9316
|
onClick: handleClick
|
|
9014
9317
|
}), [
|
|
9015
|
-
createBaseVNode("div", _hoisted_2$
|
|
9318
|
+
createBaseVNode("div", _hoisted_2$G, [
|
|
9016
9319
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
9017
9320
|
return openBlock(), createBlock(_sfc_main$14, {
|
|
9018
9321
|
class: "lupa-search-box-product-element",
|
|
@@ -9024,19 +9327,31 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9024
9327
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
9025
9328
|
}), 128))
|
|
9026
9329
|
]),
|
|
9027
|
-
createBaseVNode("div", _hoisted_3$
|
|
9330
|
+
createBaseVNode("div", _hoisted_3$v, [
|
|
9028
9331
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
9332
|
+
var _a;
|
|
9029
9333
|
return openBlock(), createBlock(_sfc_main$14, {
|
|
9334
|
+
key: element.key,
|
|
9030
9335
|
class: "lupa-search-box-product-element",
|
|
9031
9336
|
item: _ctx.item,
|
|
9032
9337
|
element,
|
|
9033
|
-
key: element.key,
|
|
9034
9338
|
labels: _ctx.labels,
|
|
9035
9339
|
link: link.value
|
|
9036
|
-
},
|
|
9340
|
+
}, createSlots({ _: 2 }, [
|
|
9341
|
+
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
9342
|
+
name: "badges",
|
|
9343
|
+
fn: withCtx(() => [
|
|
9344
|
+
createVNode(_sfc_main$_, {
|
|
9345
|
+
options: badgeOptions.value,
|
|
9346
|
+
position: "card"
|
|
9347
|
+
}, null, 8, ["options"])
|
|
9348
|
+
]),
|
|
9349
|
+
key: "0"
|
|
9350
|
+
} : void 0
|
|
9351
|
+
]), 1032, ["item", "element", "labels", "link"]);
|
|
9037
9352
|
}), 128))
|
|
9038
9353
|
]),
|
|
9039
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
9354
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
9040
9355
|
createVNode(_sfc_main$14, {
|
|
9041
9356
|
class: "lupa-search-box-product-element",
|
|
9042
9357
|
item: _ctx.item,
|
|
@@ -9046,7 +9361,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9046
9361
|
isInStock: isInStock.value
|
|
9047
9362
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
9048
9363
|
])) : createCommentVNode("", true)
|
|
9049
|
-
], 16, _hoisted_1$
|
|
9364
|
+
], 16, _hoisted_1$U);
|
|
9050
9365
|
};
|
|
9051
9366
|
}
|
|
9052
9367
|
});
|
|
@@ -9107,8 +9422,8 @@ const useTrackingStore = defineStore("tracking", () => {
|
|
|
9107
9422
|
};
|
|
9108
9423
|
return { trackSearch, trackResults, trackEvent };
|
|
9109
9424
|
});
|
|
9110
|
-
const _hoisted_1$
|
|
9111
|
-
const _sfc_main$
|
|
9425
|
+
const _hoisted_1$T = { id: "lupa-search-box-products" };
|
|
9426
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
9112
9427
|
__name: "SearchBoxProducts",
|
|
9113
9428
|
props: {
|
|
9114
9429
|
items: {},
|
|
@@ -9169,7 +9484,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9169
9484
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
9170
9485
|
};
|
|
9171
9486
|
return (_ctx, _cache) => {
|
|
9172
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9487
|
+
return openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
9173
9488
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
9174
9489
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
9175
9490
|
key: index,
|
|
@@ -9181,7 +9496,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9181
9496
|
itemClicked: handleProductClick
|
|
9182
9497
|
});
|
|
9183
9498
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
9184
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9499
|
+
return openBlock(), createBlock(_sfc_main$Z, {
|
|
9185
9500
|
key: index,
|
|
9186
9501
|
item,
|
|
9187
9502
|
panelOptions: _ctx.panelOptions,
|
|
@@ -9195,7 +9510,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9195
9510
|
};
|
|
9196
9511
|
}
|
|
9197
9512
|
});
|
|
9198
|
-
const _sfc_main$
|
|
9513
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9199
9514
|
__name: "SearchBoxProductsWrapper",
|
|
9200
9515
|
props: {
|
|
9201
9516
|
panel: {},
|
|
@@ -9247,7 +9562,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9247
9562
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
9248
9563
|
return (_ctx, _cache) => {
|
|
9249
9564
|
var _a, _b;
|
|
9250
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9565
|
+
return openBlock(), createBlock(_sfc_main$Y, {
|
|
9251
9566
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9252
9567
|
panelOptions: _ctx.panel,
|
|
9253
9568
|
labels: _ctx.labels,
|
|
@@ -9265,7 +9580,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9265
9580
|
};
|
|
9266
9581
|
}
|
|
9267
9582
|
});
|
|
9268
|
-
const _sfc_main$
|
|
9583
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
9269
9584
|
__name: "SearchBoxRelatedSourceWrapper",
|
|
9270
9585
|
props: {
|
|
9271
9586
|
panel: {},
|
|
@@ -9337,7 +9652,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9337
9652
|
});
|
|
9338
9653
|
return (_ctx, _cache) => {
|
|
9339
9654
|
var _a, _b;
|
|
9340
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9655
|
+
return openBlock(), createBlock(_sfc_main$Y, {
|
|
9341
9656
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
9342
9657
|
panelOptions: documentPanelOptions.value,
|
|
9343
9658
|
labels: _ctx.labels,
|
|
@@ -9355,16 +9670,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9355
9670
|
};
|
|
9356
9671
|
}
|
|
9357
9672
|
});
|
|
9358
|
-
const _hoisted_1$
|
|
9673
|
+
const _hoisted_1$S = {
|
|
9359
9674
|
key: 0,
|
|
9360
9675
|
id: "lupa-search-box-panel"
|
|
9361
9676
|
};
|
|
9362
|
-
const _hoisted_2$
|
|
9363
|
-
const _hoisted_3$
|
|
9677
|
+
const _hoisted_2$F = ["data-cy"];
|
|
9678
|
+
const _hoisted_3$u = {
|
|
9364
9679
|
key: 0,
|
|
9365
9680
|
class: "lupa-panel-title lupa-panel-title-top-results"
|
|
9366
9681
|
};
|
|
9367
|
-
const _hoisted_4$
|
|
9682
|
+
const _hoisted_4$n = {
|
|
9368
9683
|
key: 1,
|
|
9369
9684
|
class: "lupa-panel-title"
|
|
9370
9685
|
};
|
|
@@ -9372,14 +9687,14 @@ const _hoisted_5$e = {
|
|
|
9372
9687
|
key: 1,
|
|
9373
9688
|
id: "lupa-search-box-panel"
|
|
9374
9689
|
};
|
|
9375
|
-
const __default__$
|
|
9690
|
+
const __default__$2 = {
|
|
9376
9691
|
components: {
|
|
9377
9692
|
SearchBoxSuggestionsWrapper: _sfc_main$1e,
|
|
9378
|
-
SearchBoxProductsWrapper: _sfc_main$
|
|
9379
|
-
SearchBoxRelatedSourceWrapper: _sfc_main$
|
|
9693
|
+
SearchBoxProductsWrapper: _sfc_main$X,
|
|
9694
|
+
SearchBoxRelatedSourceWrapper: _sfc_main$W
|
|
9380
9695
|
}
|
|
9381
9696
|
};
|
|
9382
|
-
const _sfc_main
|
|
9697
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$2), {
|
|
9383
9698
|
__name: "SearchBoxMainPanel",
|
|
9384
9699
|
props: {
|
|
9385
9700
|
options: {},
|
|
@@ -9525,7 +9840,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9525
9840
|
ref_key: "panelContainer",
|
|
9526
9841
|
ref: panelContainer
|
|
9527
9842
|
}, [
|
|
9528
|
-
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
9843
|
+
displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
9529
9844
|
labels.value.closePanel ? (openBlock(), createElementBlock("a", {
|
|
9530
9845
|
key: 0,
|
|
9531
9846
|
class: "lupa-search-box-close-panel",
|
|
@@ -9546,8 +9861,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9546
9861
|
]),
|
|
9547
9862
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9548
9863
|
}, [
|
|
9549
|
-
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
9550
|
-
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
9864
|
+
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$u, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
9865
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$n, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
9551
9866
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9552
9867
|
key: 2,
|
|
9553
9868
|
panel,
|
|
@@ -9567,7 +9882,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9567
9882
|
key: "0"
|
|
9568
9883
|
} : void 0
|
|
9569
9884
|
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
9570
|
-
], 10, _hoisted_2$
|
|
9885
|
+
], 10, _hoisted_2$F);
|
|
9571
9886
|
}), 128))
|
|
9572
9887
|
], 4),
|
|
9573
9888
|
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1h, {
|
|
@@ -9606,9 +9921,9 @@ const unbindSearchTriggers = (triggers = [], event) => {
|
|
|
9606
9921
|
const elements = getElements(triggers);
|
|
9607
9922
|
elements.forEach((e) => e == null ? void 0 : e.removeEventListener(BIND_EVENT, event));
|
|
9608
9923
|
};
|
|
9609
|
-
const _hoisted_1$
|
|
9610
|
-
const _hoisted_2$
|
|
9611
|
-
const _sfc_main$
|
|
9924
|
+
const _hoisted_1$R = { id: "lupa-search-box" };
|
|
9925
|
+
const _hoisted_2$E = { class: "lupa-search-box-wrapper" };
|
|
9926
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
9612
9927
|
__name: "SearchBox",
|
|
9613
9928
|
props: {
|
|
9614
9929
|
options: {},
|
|
@@ -9853,8 +10168,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
9853
10168
|
};
|
|
9854
10169
|
return (_ctx, _cache) => {
|
|
9855
10170
|
var _a2;
|
|
9856
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9857
|
-
createBaseVNode("div", _hoisted_2$
|
|
10171
|
+
return openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
10172
|
+
createBaseVNode("div", _hoisted_2$E, [
|
|
9858
10173
|
createVNode(_sfc_main$1l, {
|
|
9859
10174
|
options: inputOptions.value,
|
|
9860
10175
|
suggestedValue: suggestedValue.value,
|
|
@@ -9866,7 +10181,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
9866
10181
|
onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
|
|
9867
10182
|
onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
|
|
9868
10183
|
}, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
|
|
9869
|
-
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main
|
|
10184
|
+
opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$V, {
|
|
9870
10185
|
key: 0,
|
|
9871
10186
|
options: panelOptions.value,
|
|
9872
10187
|
inputValue: inputValue.value,
|
|
@@ -9954,20 +10269,20 @@ const getSearchParams = (url, params, baseUrl) => {
|
|
|
9954
10269
|
}
|
|
9955
10270
|
return searchParams;
|
|
9956
10271
|
};
|
|
9957
|
-
const _hoisted_1$
|
|
10272
|
+
const _hoisted_1$Q = {
|
|
9958
10273
|
key: 0,
|
|
9959
10274
|
id: "lupa-search-results-did-you-mean"
|
|
9960
10275
|
};
|
|
9961
|
-
const _hoisted_2$
|
|
10276
|
+
const _hoisted_2$D = {
|
|
9962
10277
|
key: 0,
|
|
9963
10278
|
"data-cy": "suggested-search-text-label"
|
|
9964
10279
|
};
|
|
9965
|
-
const _hoisted_3$
|
|
10280
|
+
const _hoisted_3$t = {
|
|
9966
10281
|
key: 1,
|
|
9967
10282
|
"data-cy": "did-you-mean-label"
|
|
9968
10283
|
};
|
|
9969
|
-
const _hoisted_4$
|
|
9970
|
-
const _sfc_main$
|
|
10284
|
+
const _hoisted_4$m = { key: 1 };
|
|
10285
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
9971
10286
|
__name: "SearchResultsDidYouMean",
|
|
9972
10287
|
props: {
|
|
9973
10288
|
labels: {}
|
|
@@ -9999,8 +10314,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9999
10314
|
paramStore.goToResults({ searchText, facet });
|
|
10000
10315
|
};
|
|
10001
10316
|
return (_ctx, _cache) => {
|
|
10002
|
-
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10003
|
-
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
10317
|
+
return unref(searchResult).suggestedSearchText || didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
10318
|
+
unref(searchResult).suggestedSearchText ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
10004
10319
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.noResultsSuggestion.split(" "), (label, index) => {
|
|
10005
10320
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
10006
10321
|
createBaseVNode("span", {
|
|
@@ -10009,7 +10324,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10009
10324
|
]);
|
|
10010
10325
|
}), 128))
|
|
10011
10326
|
])) : createCommentVNode("", true),
|
|
10012
|
-
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
10327
|
+
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
10013
10328
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
|
|
10014
10329
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
10015
10330
|
label.includes("{1}") ? (openBlock(), createElementBlock("span", {
|
|
@@ -10017,7 +10332,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10017
10332
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
10018
10333
|
"data-cy": "did-you-mean-value",
|
|
10019
10334
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
10020
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
10335
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$m, toDisplayString(label) + " ", 1))
|
|
10021
10336
|
]);
|
|
10022
10337
|
}), 128))
|
|
10023
10338
|
])) : createCommentVNode("", true)
|
|
@@ -10025,12 +10340,12 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10025
10340
|
};
|
|
10026
10341
|
}
|
|
10027
10342
|
});
|
|
10028
|
-
const _hoisted_1$
|
|
10343
|
+
const _hoisted_1$P = {
|
|
10029
10344
|
key: 0,
|
|
10030
10345
|
class: "lupa-search-results-summary"
|
|
10031
10346
|
};
|
|
10032
|
-
const _hoisted_2$
|
|
10033
|
-
const _sfc_main$
|
|
10347
|
+
const _hoisted_2$C = ["innerHTML"];
|
|
10348
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
10034
10349
|
__name: "SearchResultsSummary",
|
|
10035
10350
|
props: {
|
|
10036
10351
|
label: {},
|
|
@@ -10045,8 +10360,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10045
10360
|
return addParamsToLabel(props.label, range, `<span>${totalItems.value}</span>`);
|
|
10046
10361
|
});
|
|
10047
10362
|
return (_ctx, _cache) => {
|
|
10048
|
-
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
10049
|
-
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$
|
|
10363
|
+
return unref(totalItems) > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$P, [
|
|
10364
|
+
createBaseVNode("div", { innerHTML: summaryLabel.value }, null, 8, _hoisted_2$C),
|
|
10050
10365
|
_ctx.clearable ? (openBlock(), createElementBlock("span", {
|
|
10051
10366
|
key: 0,
|
|
10052
10367
|
class: "lupa-filter-clear",
|
|
@@ -10057,18 +10372,18 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10057
10372
|
};
|
|
10058
10373
|
}
|
|
10059
10374
|
});
|
|
10060
|
-
const _hoisted_1$
|
|
10375
|
+
const _hoisted_1$O = {
|
|
10061
10376
|
key: 0,
|
|
10062
10377
|
class: "lupa-result-page-title",
|
|
10063
10378
|
"data-cy": "lupa-result-page-title"
|
|
10064
10379
|
};
|
|
10065
|
-
const _hoisted_2$
|
|
10066
|
-
const _hoisted_3$
|
|
10380
|
+
const _hoisted_2$B = { key: 0 };
|
|
10381
|
+
const _hoisted_3$s = {
|
|
10067
10382
|
key: 1,
|
|
10068
10383
|
class: "lupa-results-total-count"
|
|
10069
10384
|
};
|
|
10070
|
-
const _hoisted_4$
|
|
10071
|
-
const _sfc_main$
|
|
10385
|
+
const _hoisted_4$l = ["innerHTML"];
|
|
10386
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
10072
10387
|
__name: "SearchResultsTitle",
|
|
10073
10388
|
props: {
|
|
10074
10389
|
options: {},
|
|
@@ -10103,12 +10418,12 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10103
10418
|
});
|
|
10104
10419
|
return (_ctx, _cache) => {
|
|
10105
10420
|
return openBlock(), createElementBlock("div", null, [
|
|
10106
|
-
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$
|
|
10421
|
+
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$O, [
|
|
10107
10422
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
10108
|
-
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
10109
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
10423
|
+
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$B, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
10424
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
10110
10425
|
])) : createCommentVNode("", true),
|
|
10111
|
-
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$
|
|
10426
|
+
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$S, {
|
|
10112
10427
|
key: 1,
|
|
10113
10428
|
label: summaryLabel.value
|
|
10114
10429
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
@@ -10116,21 +10431,21 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10116
10431
|
key: 2,
|
|
10117
10432
|
class: "lupa-result-page-description-top",
|
|
10118
10433
|
innerHTML: descriptionTop.value
|
|
10119
|
-
}, null, 8, _hoisted_4$
|
|
10434
|
+
}, null, 8, _hoisted_4$l)) : createCommentVNode("", true)
|
|
10120
10435
|
]);
|
|
10121
10436
|
};
|
|
10122
10437
|
}
|
|
10123
10438
|
});
|
|
10124
|
-
const _hoisted_1$
|
|
10125
|
-
const _hoisted_2$
|
|
10439
|
+
const _hoisted_1$N = { class: "lupa-search-result-filter-value" };
|
|
10440
|
+
const _hoisted_2$A = {
|
|
10126
10441
|
class: "lupa-current-filter-label",
|
|
10127
10442
|
"data-cy": "lupa-current-filter-label"
|
|
10128
10443
|
};
|
|
10129
|
-
const _hoisted_3$
|
|
10444
|
+
const _hoisted_3$r = {
|
|
10130
10445
|
class: "lupa-current-filter-value",
|
|
10131
10446
|
"data-cy": "lupa-current-filter-value"
|
|
10132
10447
|
};
|
|
10133
|
-
const _sfc_main$
|
|
10448
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
10134
10449
|
__name: "CurrentFilterDisplay",
|
|
10135
10450
|
props: {
|
|
10136
10451
|
filter: {}
|
|
@@ -10142,28 +10457,28 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
10142
10457
|
emit2("remove", { filter: props.filter });
|
|
10143
10458
|
};
|
|
10144
10459
|
return (_ctx, _cache) => {
|
|
10145
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10460
|
+
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
10146
10461
|
createBaseVNode("div", {
|
|
10147
10462
|
class: "lupa-current-filter-action",
|
|
10148
10463
|
onClick: handleClick
|
|
10149
10464
|
}, "⨉"),
|
|
10150
|
-
createBaseVNode("div", _hoisted_2$
|
|
10151
|
-
createBaseVNode("div", _hoisted_3$
|
|
10465
|
+
createBaseVNode("div", _hoisted_2$A, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
10466
|
+
createBaseVNode("div", _hoisted_3$r, toDisplayString(_ctx.filter.value), 1)
|
|
10152
10467
|
]);
|
|
10153
10468
|
};
|
|
10154
10469
|
}
|
|
10155
10470
|
});
|
|
10156
|
-
const _hoisted_1$
|
|
10157
|
-
const _hoisted_2$
|
|
10471
|
+
const _hoisted_1$M = { class: "lupa-filter-title-text" };
|
|
10472
|
+
const _hoisted_2$z = {
|
|
10158
10473
|
key: 0,
|
|
10159
10474
|
class: "lupa-filter-count"
|
|
10160
10475
|
};
|
|
10161
|
-
const _hoisted_3$
|
|
10476
|
+
const _hoisted_3$q = {
|
|
10162
10477
|
key: 0,
|
|
10163
10478
|
class: "filter-values"
|
|
10164
10479
|
};
|
|
10165
|
-
const _hoisted_4$
|
|
10166
|
-
const _sfc_main$
|
|
10480
|
+
const _hoisted_4$k = { class: "lupa-current-filter-list" };
|
|
10481
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
10167
10482
|
__name: "CurrentFilters",
|
|
10168
10483
|
props: {
|
|
10169
10484
|
options: {},
|
|
@@ -10172,6 +10487,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10172
10487
|
setup(__props) {
|
|
10173
10488
|
const isOpen = ref(false);
|
|
10174
10489
|
const paramsStore = useParamsStore();
|
|
10490
|
+
const optionStore = useOptionsStore();
|
|
10175
10491
|
const searchResultStore = useSearchResultStore();
|
|
10176
10492
|
const { filters, displayFilters, currentFilterCount } = storeToRefs(searchResultStore);
|
|
10177
10493
|
const currentFilters = computed(() => filters.value);
|
|
@@ -10189,6 +10505,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10189
10505
|
// TODO: Fix any
|
|
10190
10506
|
paramsStore.appendParams,
|
|
10191
10507
|
{ type: "terms", value: filter.value, key: filter.key },
|
|
10508
|
+
optionStore.getQueryParamName,
|
|
10192
10509
|
currentFilters.value
|
|
10193
10510
|
);
|
|
10194
10511
|
break;
|
|
@@ -10196,13 +10513,17 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10196
10513
|
toggleHierarchyFilter(
|
|
10197
10514
|
paramsStore.appendParams,
|
|
10198
10515
|
{ type: "hierarchy", value: filter.value, key: filter.key },
|
|
10516
|
+
optionStore.getQueryParamName,
|
|
10199
10517
|
currentFilters.value,
|
|
10200
10518
|
true
|
|
10201
10519
|
);
|
|
10202
10520
|
break;
|
|
10203
10521
|
case "range":
|
|
10204
10522
|
paramsStore.removeParameters({
|
|
10205
|
-
paramsToRemove: [
|
|
10523
|
+
paramsToRemove: [
|
|
10524
|
+
optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE),
|
|
10525
|
+
`${FACET_PARAMS_TYPE.RANGE}${filter.key}`
|
|
10526
|
+
]
|
|
10206
10527
|
});
|
|
10207
10528
|
break;
|
|
10208
10529
|
}
|
|
@@ -10218,19 +10539,19 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10218
10539
|
class: "lupa-current-filter-title",
|
|
10219
10540
|
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
|
10220
10541
|
}, [
|
|
10221
|
-
createBaseVNode("div", _hoisted_1$
|
|
10542
|
+
createBaseVNode("div", _hoisted_1$M, [
|
|
10222
10543
|
createTextVNode(toDisplayString((_c = (_b = (_a = _ctx.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.title) != null ? _c : "") + " ", 1),
|
|
10223
|
-
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
10544
|
+
_ctx.expandable ? (openBlock(), createElementBlock("span", _hoisted_2$z, " (" + toDisplayString(unref(currentFilterCount)) + ") ", 1)) : createCommentVNode("", true)
|
|
10224
10545
|
]),
|
|
10225
10546
|
_ctx.expandable ? (openBlock(), createElementBlock("div", {
|
|
10226
10547
|
key: 0,
|
|
10227
10548
|
class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
|
|
10228
10549
|
}, null, 2)) : createCommentVNode("", true)
|
|
10229
10550
|
]),
|
|
10230
|
-
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
10231
|
-
createBaseVNode("div", _hoisted_4$
|
|
10551
|
+
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
10552
|
+
createBaseVNode("div", _hoisted_4$k, [
|
|
10232
10553
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10233
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10554
|
+
return openBlock(), createBlock(_sfc_main$Q, {
|
|
10234
10555
|
key: filter.key + "_" + filter.value,
|
|
10235
10556
|
filter,
|
|
10236
10557
|
onRemove: handleRemove
|
|
@@ -10247,8 +10568,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10247
10568
|
};
|
|
10248
10569
|
}
|
|
10249
10570
|
});
|
|
10250
|
-
const _hoisted_1$
|
|
10251
|
-
const _sfc_main$
|
|
10571
|
+
const _hoisted_1$L = ["href"];
|
|
10572
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
10252
10573
|
__name: "CategoryFilterItem",
|
|
10253
10574
|
props: {
|
|
10254
10575
|
options: {},
|
|
@@ -10285,20 +10606,20 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
10285
10606
|
"data-cy": "lupa-child-category-item",
|
|
10286
10607
|
href: urlLink.value,
|
|
10287
10608
|
onClick: handleNavigation
|
|
10288
|
-
}, toDisplayString(title.value), 9, _hoisted_1$
|
|
10609
|
+
}, toDisplayString(title.value), 9, _hoisted_1$L)
|
|
10289
10610
|
], 2);
|
|
10290
10611
|
};
|
|
10291
10612
|
}
|
|
10292
10613
|
});
|
|
10293
|
-
const _hoisted_1$
|
|
10614
|
+
const _hoisted_1$K = {
|
|
10294
10615
|
class: "lupa-category-filter",
|
|
10295
10616
|
"data-cy": "lupa-category-filter"
|
|
10296
10617
|
};
|
|
10297
|
-
const _hoisted_2$
|
|
10298
|
-
const _hoisted_3$
|
|
10299
|
-
const _hoisted_4$
|
|
10618
|
+
const _hoisted_2$y = { class: "lupa-category-back" };
|
|
10619
|
+
const _hoisted_3$p = ["href"];
|
|
10620
|
+
const _hoisted_4$j = ["href"];
|
|
10300
10621
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10301
|
-
const _sfc_main$
|
|
10622
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
10302
10623
|
__name: "CategoryFilter",
|
|
10303
10624
|
props: {
|
|
10304
10625
|
options: {}
|
|
@@ -10384,14 +10705,14 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10384
10705
|
};
|
|
10385
10706
|
__expose({ fetch: fetch2 });
|
|
10386
10707
|
return (_ctx, _cache) => {
|
|
10387
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10388
|
-
createBaseVNode("div", _hoisted_2$
|
|
10708
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
10709
|
+
createBaseVNode("div", _hoisted_2$y, [
|
|
10389
10710
|
hasBackButton.value ? (openBlock(), createElementBlock("a", {
|
|
10390
10711
|
key: 0,
|
|
10391
10712
|
"data-cy": "lupa-category-back",
|
|
10392
10713
|
href: backUrlLink.value,
|
|
10393
10714
|
onClick: handleNavigationBack
|
|
10394
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
10715
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$p)) : createCommentVNode("", true)
|
|
10395
10716
|
]),
|
|
10396
10717
|
createBaseVNode("div", {
|
|
10397
10718
|
class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
|
|
@@ -10401,11 +10722,11 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10401
10722
|
href: parentUrlLink.value,
|
|
10402
10723
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
10403
10724
|
onClick: handleNavigationParent
|
|
10404
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
10725
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$j)
|
|
10405
10726
|
], 2),
|
|
10406
10727
|
createBaseVNode("div", _hoisted_5$d, [
|
|
10407
10728
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
10408
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10729
|
+
return openBlock(), createBlock(_sfc_main$O, {
|
|
10409
10730
|
key: getCategoryKey(child),
|
|
10410
10731
|
item: child,
|
|
10411
10732
|
options: _ctx.options
|
|
@@ -10416,13 +10737,13 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10416
10737
|
};
|
|
10417
10738
|
}
|
|
10418
10739
|
});
|
|
10419
|
-
const _hoisted_1$
|
|
10740
|
+
const _hoisted_1$J = {
|
|
10420
10741
|
class: "lupa-search-result-facet-term-values",
|
|
10421
10742
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
10422
10743
|
};
|
|
10423
|
-
const _hoisted_2$
|
|
10424
|
-
const _hoisted_3$
|
|
10425
|
-
const _hoisted_4$
|
|
10744
|
+
const _hoisted_2$x = ["placeholder"];
|
|
10745
|
+
const _hoisted_3$o = { class: "lupa-terms-list" };
|
|
10746
|
+
const _hoisted_4$i = ["onClick"];
|
|
10426
10747
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
10427
10748
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
10428
10749
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
@@ -10432,7 +10753,7 @@ const _hoisted_8$1 = {
|
|
|
10432
10753
|
};
|
|
10433
10754
|
const _hoisted_9$1 = { key: 0 };
|
|
10434
10755
|
const _hoisted_10$1 = { key: 1 };
|
|
10435
|
-
const _sfc_main$
|
|
10756
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
10436
10757
|
__name: "TermFacet",
|
|
10437
10758
|
props: {
|
|
10438
10759
|
options: {},
|
|
@@ -10501,17 +10822,17 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10501
10822
|
return selectedItems == null ? void 0 : selectedItems.includes((_b = item.title) == null ? void 0 : _b.toString());
|
|
10502
10823
|
};
|
|
10503
10824
|
return (_ctx, _cache) => {
|
|
10504
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10825
|
+
return openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
10505
10826
|
isFilterable.value ? withDirectives((openBlock(), createElementBlock("input", {
|
|
10506
10827
|
key: 0,
|
|
10507
10828
|
class: "lupa-term-filter",
|
|
10508
10829
|
"data-cy": "lupa-term-filter",
|
|
10509
10830
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
10510
10831
|
placeholder: _ctx.options.labels.facetFilter
|
|
10511
|
-
}, null, 8, _hoisted_2$
|
|
10832
|
+
}, null, 8, _hoisted_2$x)), [
|
|
10512
10833
|
[vModelText, termFilter.value]
|
|
10513
10834
|
]) : createCommentVNode("", true),
|
|
10514
|
-
createBaseVNode("div", _hoisted_3$
|
|
10835
|
+
createBaseVNode("div", _hoisted_3$o, [
|
|
10515
10836
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
10516
10837
|
return openBlock(), createElementBlock("div", {
|
|
10517
10838
|
class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
|
|
@@ -10528,7 +10849,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10528
10849
|
createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
10529
10850
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
10530
10851
|
])
|
|
10531
|
-
], 10, _hoisted_4$
|
|
10852
|
+
], 10, _hoisted_4$i);
|
|
10532
10853
|
}), 128))
|
|
10533
10854
|
]),
|
|
10534
10855
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -11519,16 +11840,16 @@ var m = { name: "Slider", emits: ["input", "update:modelValue", "start", "slide"
|
|
|
11519
11840
|
m.render = function(e, t, r, i, n, o) {
|
|
11520
11841
|
return openBlock(), createElementBlock("div", mergeProps(e.sliderProps, { ref: "slider" }), null, 16);
|
|
11521
11842
|
}, m.__file = "src/Slider.vue";
|
|
11522
|
-
const _hoisted_1$
|
|
11523
|
-
const _hoisted_2$
|
|
11843
|
+
const _hoisted_1$I = { class: "lupa-search-result-facet-stats-values" };
|
|
11844
|
+
const _hoisted_2$w = {
|
|
11524
11845
|
key: 0,
|
|
11525
11846
|
class: "lupa-stats-facet-summary"
|
|
11526
11847
|
};
|
|
11527
|
-
const _hoisted_3$
|
|
11848
|
+
const _hoisted_3$n = {
|
|
11528
11849
|
key: 1,
|
|
11529
11850
|
class: "lupa-stats-facet-summary-input"
|
|
11530
11851
|
};
|
|
11531
|
-
const _hoisted_4$
|
|
11852
|
+
const _hoisted_4$h = {
|
|
11532
11853
|
key: 0,
|
|
11533
11854
|
class: "lupa-stats-range-label"
|
|
11534
11855
|
};
|
|
@@ -11547,7 +11868,7 @@ const _hoisted_13 = {
|
|
|
11547
11868
|
key: 2,
|
|
11548
11869
|
class: "lupa-stats-slider-wrapper"
|
|
11549
11870
|
};
|
|
11550
|
-
const _sfc_main$
|
|
11871
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
11551
11872
|
__name: "StatsFacet",
|
|
11552
11873
|
props: {
|
|
11553
11874
|
options: {},
|
|
@@ -11716,10 +12037,10 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11716
12037
|
innerSliderRange.value = value;
|
|
11717
12038
|
};
|
|
11718
12039
|
return (_ctx, _cache) => {
|
|
11719
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11720
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12040
|
+
return openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
12041
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$w, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$n, [
|
|
11721
12042
|
createBaseVNode("div", null, [
|
|
11722
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12043
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
11723
12044
|
createBaseVNode("div", _hoisted_5$b, [
|
|
11724
12045
|
withDirectives(createBaseVNode("input", {
|
|
11725
12046
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
@@ -11783,10 +12104,10 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11783
12104
|
};
|
|
11784
12105
|
}
|
|
11785
12106
|
});
|
|
11786
|
-
const _hoisted_1$
|
|
11787
|
-
const _hoisted_2$
|
|
11788
|
-
const _hoisted_3$
|
|
11789
|
-
const _hoisted_4$
|
|
12107
|
+
const _hoisted_1$H = { class: "lupa-term-checkbox-wrapper" };
|
|
12108
|
+
const _hoisted_2$v = { class: "lupa-term-checkbox-label" };
|
|
12109
|
+
const _hoisted_3$m = { class: "lupa-term-label" };
|
|
12110
|
+
const _hoisted_4$g = {
|
|
11790
12111
|
key: 0,
|
|
11791
12112
|
class: "lupa-term-count"
|
|
11792
12113
|
};
|
|
@@ -11794,7 +12115,7 @@ const _hoisted_5$a = {
|
|
|
11794
12115
|
key: 0,
|
|
11795
12116
|
class: "lupa-facet-level"
|
|
11796
12117
|
};
|
|
11797
|
-
const _sfc_main$
|
|
12118
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
11798
12119
|
__name: "HierarchyFacetLevel",
|
|
11799
12120
|
props: {
|
|
11800
12121
|
options: {},
|
|
@@ -11840,14 +12161,14 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11840
12161
|
"data-cy": "lupa-facet-term",
|
|
11841
12162
|
onClick: _cache[0] || (_cache[0] = ($event) => handleFacetClick(_ctx.item))
|
|
11842
12163
|
}, [
|
|
11843
|
-
createBaseVNode("div", _hoisted_1$
|
|
12164
|
+
createBaseVNode("div", _hoisted_1$H, [
|
|
11844
12165
|
createBaseVNode("span", {
|
|
11845
12166
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked.value }])
|
|
11846
12167
|
}, null, 2)
|
|
11847
12168
|
]),
|
|
11848
|
-
createBaseVNode("div", _hoisted_2$
|
|
11849
|
-
createBaseVNode("span", _hoisted_3$
|
|
11850
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
12169
|
+
createBaseVNode("div", _hoisted_2$v, [
|
|
12170
|
+
createBaseVNode("span", _hoisted_3$m, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
12171
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
11851
12172
|
])
|
|
11852
12173
|
]),
|
|
11853
12174
|
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
|
|
@@ -11866,13 +12187,13 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11866
12187
|
};
|
|
11867
12188
|
}
|
|
11868
12189
|
});
|
|
11869
|
-
const _hoisted_1$
|
|
12190
|
+
const _hoisted_1$G = {
|
|
11870
12191
|
class: "lupa-search-result-facet-term-values lupa-search-result-facet-hierarchy-values",
|
|
11871
12192
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
11872
12193
|
};
|
|
11873
|
-
const _hoisted_2$
|
|
11874
|
-
const _hoisted_3$
|
|
11875
|
-
const _sfc_main$
|
|
12194
|
+
const _hoisted_2$u = { key: 0 };
|
|
12195
|
+
const _hoisted_3$l = ["placeholder"];
|
|
12196
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
11876
12197
|
__name: "HierarchyFacet",
|
|
11877
12198
|
props: {
|
|
11878
12199
|
options: {},
|
|
@@ -11922,19 +12243,19 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11922
12243
|
showAll.value = true;
|
|
11923
12244
|
};
|
|
11924
12245
|
return (_ctx, _cache) => {
|
|
11925
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11926
|
-
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12246
|
+
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
12247
|
+
isFilterable.value ? (openBlock(), createElementBlock("div", _hoisted_2$u, [
|
|
11927
12248
|
withDirectives(createBaseVNode("input", {
|
|
11928
12249
|
class: "lupa-term-filter",
|
|
11929
12250
|
"data-cy": "lupa-term-filter",
|
|
11930
12251
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
11931
12252
|
placeholder: _ctx.options.labels.facetFilter
|
|
11932
|
-
}, null, 8, _hoisted_3$
|
|
12253
|
+
}, null, 8, _hoisted_3$l), [
|
|
11933
12254
|
[vModelText, termFilter.value]
|
|
11934
12255
|
])
|
|
11935
12256
|
])) : createCommentVNode("", true),
|
|
11936
12257
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
11937
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12258
|
+
return openBlock(), createBlock(_sfc_main$K, {
|
|
11938
12259
|
key: item.title,
|
|
11939
12260
|
options: _ctx.options,
|
|
11940
12261
|
item,
|
|
@@ -11954,20 +12275,20 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11954
12275
|
};
|
|
11955
12276
|
}
|
|
11956
12277
|
});
|
|
11957
|
-
const _hoisted_1$
|
|
11958
|
-
const _hoisted_2$
|
|
12278
|
+
const _hoisted_1$F = { class: "lupa-facet-label-text" };
|
|
12279
|
+
const _hoisted_2$t = {
|
|
11959
12280
|
key: 0,
|
|
11960
12281
|
class: "lupa-facet-content",
|
|
11961
12282
|
"data-cy": "lupa-facet-content"
|
|
11962
12283
|
};
|
|
11963
|
-
const __default__$
|
|
12284
|
+
const __default__$1 = {
|
|
11964
12285
|
components: {
|
|
11965
|
-
TermFacet: _sfc_main$
|
|
11966
|
-
StatsFacet: _sfc_main$
|
|
11967
|
-
HierarchyFacet: _sfc_main$
|
|
12286
|
+
TermFacet: _sfc_main$M,
|
|
12287
|
+
StatsFacet: _sfc_main$L,
|
|
12288
|
+
HierarchyFacet: _sfc_main$J
|
|
11968
12289
|
}
|
|
11969
12290
|
};
|
|
11970
|
-
const _sfc_main$
|
|
12291
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
11971
12292
|
__name: "FacetDisplay",
|
|
11972
12293
|
props: {
|
|
11973
12294
|
options: {},
|
|
@@ -12079,12 +12400,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
12079
12400
|
"data-cy": "lupa-search-result-facet-label",
|
|
12080
12401
|
onClick: toggleFacet
|
|
12081
12402
|
}, [
|
|
12082
|
-
createBaseVNode("div", _hoisted_1$
|
|
12403
|
+
createBaseVNode("div", _hoisted_1$F, toDisplayString(facet.value.label), 1),
|
|
12083
12404
|
createBaseVNode("div", {
|
|
12084
12405
|
class: normalizeClass(["lupa-facet-label-caret", isOpen.value && "open"])
|
|
12085
12406
|
}, null, 2)
|
|
12086
12407
|
], 2),
|
|
12087
|
-
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12408
|
+
isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$t, [
|
|
12088
12409
|
(openBlock(), createBlock(resolveDynamicComponent(facetType.value), {
|
|
12089
12410
|
facet: facet.value,
|
|
12090
12411
|
currentFilters: currentFilters.value[facet.value.key],
|
|
@@ -12102,12 +12423,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
12102
12423
|
};
|
|
12103
12424
|
}
|
|
12104
12425
|
}));
|
|
12105
|
-
const _hoisted_1$
|
|
12106
|
-
const _hoisted_2$
|
|
12426
|
+
const _hoisted_1$E = { class: "lupa-search-result-facet-section" };
|
|
12427
|
+
const _hoisted_2$s = {
|
|
12107
12428
|
key: 0,
|
|
12108
12429
|
class: "lupa-facets-title"
|
|
12109
12430
|
};
|
|
12110
|
-
const _sfc_main$
|
|
12431
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
12111
12432
|
__name: "FacetList",
|
|
12112
12433
|
props: {
|
|
12113
12434
|
options: {},
|
|
@@ -12141,14 +12462,14 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
12141
12462
|
};
|
|
12142
12463
|
return (_ctx, _cache) => {
|
|
12143
12464
|
var _a;
|
|
12144
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12145
|
-
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12465
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
12466
|
+
_ctx.options.labels.title ? (openBlock(), createElementBlock("div", _hoisted_2$s, toDisplayString(_ctx.options.labels.title), 1)) : createCommentVNode("", true),
|
|
12146
12467
|
createBaseVNode("div", {
|
|
12147
12468
|
class: normalizeClass(["lupa-search-result-facet-list", "lupa-" + ((_a = _ctx.facetStyle) != null ? _a : "")])
|
|
12148
12469
|
}, [
|
|
12149
12470
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayFacets.value, (facet) => {
|
|
12150
12471
|
var _a2;
|
|
12151
|
-
return openBlock(), createBlock(_sfc_main$
|
|
12472
|
+
return openBlock(), createBlock(_sfc_main$I, {
|
|
12152
12473
|
key: facet.key,
|
|
12153
12474
|
facet,
|
|
12154
12475
|
currentFilters: currentFiltersValue.value,
|
|
@@ -12163,8 +12484,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
12163
12484
|
};
|
|
12164
12485
|
}
|
|
12165
12486
|
});
|
|
12166
|
-
const _hoisted_1$
|
|
12167
|
-
const _sfc_main$
|
|
12487
|
+
const _hoisted_1$D = { class: "lupa-search-result-facets" };
|
|
12488
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
12168
12489
|
__name: "Facets",
|
|
12169
12490
|
props: {
|
|
12170
12491
|
options: {},
|
|
@@ -12204,13 +12525,28 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
12204
12525
|
const handleFacetSelect = (facetAction) => {
|
|
12205
12526
|
switch (facetAction.type) {
|
|
12206
12527
|
case "terms":
|
|
12207
|
-
toggleTermFilter(
|
|
12528
|
+
toggleTermFilter(
|
|
12529
|
+
paramStore.appendParams,
|
|
12530
|
+
facetAction,
|
|
12531
|
+
optionsStore.getQueryParamName,
|
|
12532
|
+
filters.value
|
|
12533
|
+
);
|
|
12208
12534
|
break;
|
|
12209
12535
|
case "range":
|
|
12210
|
-
toggleRangeFilter(
|
|
12536
|
+
toggleRangeFilter(
|
|
12537
|
+
paramStore.appendParams,
|
|
12538
|
+
facetAction,
|
|
12539
|
+
optionsStore.getQueryParamName,
|
|
12540
|
+
filters.value
|
|
12541
|
+
);
|
|
12211
12542
|
break;
|
|
12212
12543
|
case "hierarchy":
|
|
12213
|
-
toggleHierarchyFilter(
|
|
12544
|
+
toggleHierarchyFilter(
|
|
12545
|
+
paramStore.appendParams,
|
|
12546
|
+
facetAction,
|
|
12547
|
+
optionsStore.getQueryParamName,
|
|
12548
|
+
filters.value
|
|
12549
|
+
);
|
|
12214
12550
|
break;
|
|
12215
12551
|
}
|
|
12216
12552
|
if (scrollToResultsOptions.value.enabled) {
|
|
@@ -12225,8 +12561,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
12225
12561
|
paramStore.removeParameters({ paramsToRemove: [param] });
|
|
12226
12562
|
};
|
|
12227
12563
|
return (_ctx, _cache) => {
|
|
12228
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12229
|
-
regularFacets.value ? (openBlock(), createBlock(_sfc_main$
|
|
12564
|
+
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
12565
|
+
regularFacets.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
12230
12566
|
key: 0,
|
|
12231
12567
|
options: _ctx.options,
|
|
12232
12568
|
facets: regularFacets.value,
|
|
@@ -12240,11 +12576,11 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
12240
12576
|
};
|
|
12241
12577
|
}
|
|
12242
12578
|
});
|
|
12243
|
-
const _hoisted_1$
|
|
12579
|
+
const _hoisted_1$C = {
|
|
12244
12580
|
id: "lupa-search-result-filters",
|
|
12245
12581
|
class: "lupa-search-result-filters"
|
|
12246
12582
|
};
|
|
12247
|
-
const _sfc_main$
|
|
12583
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
12248
12584
|
__name: "SearchResultsFilters",
|
|
12249
12585
|
props: {
|
|
12250
12586
|
options: {},
|
|
@@ -12273,19 +12609,19 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12273
12609
|
__expose({ fetch: fetch2 });
|
|
12274
12610
|
return (_ctx, _cache) => {
|
|
12275
12611
|
var _a;
|
|
12276
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12277
|
-
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
12612
|
+
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
12613
|
+
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$P, {
|
|
12278
12614
|
key: 0,
|
|
12279
12615
|
options: _ctx.options.currentFilters,
|
|
12280
12616
|
expandable: (_a = _ctx.expandable) != null ? _a : false
|
|
12281
12617
|
}, null, 8, ["options", "expandable"])) : createCommentVNode("", true),
|
|
12282
|
-
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$
|
|
12618
|
+
_ctx.options.categories ? (openBlock(), createBlock(_sfc_main$N, {
|
|
12283
12619
|
key: 1,
|
|
12284
12620
|
options: _ctx.options.categories,
|
|
12285
12621
|
ref_key: "categoryFilters",
|
|
12286
12622
|
ref: categoryFilters
|
|
12287
12623
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
12288
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
12624
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
12289
12625
|
key: 2,
|
|
12290
12626
|
options: _ctx.options.facets
|
|
12291
12627
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -12293,20 +12629,20 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
12293
12629
|
};
|
|
12294
12630
|
}
|
|
12295
12631
|
});
|
|
12296
|
-
const _hoisted_1$
|
|
12632
|
+
const _hoisted_1$B = {
|
|
12297
12633
|
key: 0,
|
|
12298
12634
|
class: "lupa-mobile-filter-sidebar"
|
|
12299
12635
|
};
|
|
12300
|
-
const _hoisted_2$
|
|
12301
|
-
const _hoisted_3$
|
|
12302
|
-
const _hoisted_4$
|
|
12636
|
+
const _hoisted_2$r = ["onClick"];
|
|
12637
|
+
const _hoisted_3$k = { class: "lupa-mobile-sidebar-content" };
|
|
12638
|
+
const _hoisted_4$f = { class: "lupa-sidebar-top" };
|
|
12303
12639
|
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
12304
12640
|
const _hoisted_6$6 = {
|
|
12305
12641
|
key: 0,
|
|
12306
12642
|
class: "lupa-sidebar-filter-count"
|
|
12307
12643
|
};
|
|
12308
12644
|
const _hoisted_7$4 = { class: "lupa-sidebar-filter-options" };
|
|
12309
|
-
const _sfc_main$
|
|
12645
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
12310
12646
|
__name: "MobileFilterSidebar",
|
|
12311
12647
|
props: {
|
|
12312
12648
|
options: {}
|
|
@@ -12332,13 +12668,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12332
12668
|
searchResultStore.setSidebarState({ visible: false });
|
|
12333
12669
|
};
|
|
12334
12670
|
return (_ctx, _cache) => {
|
|
12335
|
-
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
12671
|
+
return isMobileSidebarVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
12336
12672
|
createBaseVNode("div", {
|
|
12337
12673
|
class: "lupa-sidebar-close",
|
|
12338
12674
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
12339
|
-
}, null, 8, _hoisted_2$
|
|
12340
|
-
createBaseVNode("div", _hoisted_3$
|
|
12341
|
-
createBaseVNode("div", _hoisted_4$
|
|
12675
|
+
}, null, 8, _hoisted_2$r),
|
|
12676
|
+
createBaseVNode("div", _hoisted_3$k, [
|
|
12677
|
+
createBaseVNode("div", _hoisted_4$f, [
|
|
12342
12678
|
createBaseVNode("div", _hoisted_5$9, [
|
|
12343
12679
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
12344
12680
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
@@ -12349,7 +12685,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12349
12685
|
})
|
|
12350
12686
|
]),
|
|
12351
12687
|
createBaseVNode("div", _hoisted_7$4, [
|
|
12352
|
-
createVNode(_sfc_main$
|
|
12688
|
+
createVNode(_sfc_main$F, {
|
|
12353
12689
|
options: _ctx.options,
|
|
12354
12690
|
expandable: isActiveFiltersExpanded.value
|
|
12355
12691
|
}, null, 8, ["options", "expandable"])
|
|
@@ -12359,14 +12695,14 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12359
12695
|
};
|
|
12360
12696
|
}
|
|
12361
12697
|
});
|
|
12362
|
-
const _hoisted_1$
|
|
12363
|
-
const _hoisted_2$
|
|
12364
|
-
const _hoisted_3$
|
|
12698
|
+
const _hoisted_1$A = { id: "lupa-search-results-breadcrumbs" };
|
|
12699
|
+
const _hoisted_2$q = ["href", "onClick"];
|
|
12700
|
+
const _hoisted_3$j = {
|
|
12365
12701
|
key: 1,
|
|
12366
12702
|
class: "lupa-search-results-breadcrumb-text"
|
|
12367
12703
|
};
|
|
12368
|
-
const _hoisted_4$
|
|
12369
|
-
const _sfc_main$
|
|
12704
|
+
const _hoisted_4$e = { key: 2 };
|
|
12705
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
12370
12706
|
__name: "SearchResultsBreadcrumbs",
|
|
12371
12707
|
props: {
|
|
12372
12708
|
breadcrumbs: {}
|
|
@@ -12391,7 +12727,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12391
12727
|
handleRoutingEvent(link, event, hasEventRouting.value);
|
|
12392
12728
|
};
|
|
12393
12729
|
return (_ctx, _cache) => {
|
|
12394
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12730
|
+
return openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
12395
12731
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
12396
12732
|
return openBlock(), createElementBlock("span", {
|
|
12397
12733
|
class: "lupa-search-results-breadcrumb",
|
|
@@ -12405,19 +12741,19 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12405
12741
|
var _a;
|
|
12406
12742
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
12407
12743
|
}
|
|
12408
|
-
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$
|
|
12409
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
12744
|
+
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$q)) : (openBlock(), createElementBlock("span", _hoisted_3$j, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
12745
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$e, " / ")) : createCommentVNode("", true)
|
|
12410
12746
|
]);
|
|
12411
12747
|
}), 128))
|
|
12412
12748
|
]);
|
|
12413
12749
|
};
|
|
12414
12750
|
}
|
|
12415
12751
|
});
|
|
12416
|
-
const _hoisted_1$
|
|
12752
|
+
const _hoisted_1$z = {
|
|
12417
12753
|
id: "lupa-search-result-filters",
|
|
12418
12754
|
class: "lupa-search-result-filters"
|
|
12419
12755
|
};
|
|
12420
|
-
const _sfc_main$
|
|
12756
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
12421
12757
|
__name: "FiltersTopDropdown",
|
|
12422
12758
|
props: {
|
|
12423
12759
|
options: {}
|
|
@@ -12425,8 +12761,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
12425
12761
|
setup(__props) {
|
|
12426
12762
|
return (_ctx, _cache) => {
|
|
12427
12763
|
var _a;
|
|
12428
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12429
|
-
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$
|
|
12764
|
+
return openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
12765
|
+
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$G, {
|
|
12430
12766
|
key: 0,
|
|
12431
12767
|
options: _ctx.options.facets,
|
|
12432
12768
|
"facet-style": (_a = _ctx.options.facets.style) == null ? void 0 : _a.type,
|
|
@@ -12436,8 +12772,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
12436
12772
|
};
|
|
12437
12773
|
}
|
|
12438
12774
|
});
|
|
12439
|
-
const _hoisted_1$
|
|
12440
|
-
const _sfc_main$
|
|
12775
|
+
const _hoisted_1$y = { id: "lupa-search-results-layout-selection" };
|
|
12776
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
12441
12777
|
__name: "SearchResultsLayoutSelection",
|
|
12442
12778
|
setup(__props) {
|
|
12443
12779
|
const searchResultStore = useSearchResultStore();
|
|
@@ -12448,7 +12784,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
12448
12784
|
searchResultStore.setLayout(layout2);
|
|
12449
12785
|
};
|
|
12450
12786
|
return (_ctx, _cache) => {
|
|
12451
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12787
|
+
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
12452
12788
|
createBaseVNode("div", {
|
|
12453
12789
|
class: normalizeClass([
|
|
12454
12790
|
"lupa-layout-selection-grid",
|
|
@@ -12470,11 +12806,11 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
12470
12806
|
};
|
|
12471
12807
|
}
|
|
12472
12808
|
});
|
|
12473
|
-
const _hoisted_1$
|
|
12809
|
+
const _hoisted_1$x = {
|
|
12474
12810
|
key: 0,
|
|
12475
12811
|
class: "lupa-mobile-toggle-filter-count"
|
|
12476
12812
|
};
|
|
12477
|
-
const _sfc_main$
|
|
12813
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
12478
12814
|
__name: "SearchResultsMobileToggle",
|
|
12479
12815
|
props: {
|
|
12480
12816
|
label: {},
|
|
@@ -12492,26 +12828,26 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
12492
12828
|
onClick: handleMobileToggle
|
|
12493
12829
|
}, [
|
|
12494
12830
|
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
12495
|
-
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
12831
|
+
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$x, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
12496
12832
|
], 2);
|
|
12497
12833
|
};
|
|
12498
12834
|
}
|
|
12499
12835
|
});
|
|
12500
|
-
const _hoisted_1$
|
|
12836
|
+
const _hoisted_1$w = {
|
|
12501
12837
|
key: 0,
|
|
12502
12838
|
id: "lupa-search-results-page-select",
|
|
12503
12839
|
"data-cy": "lupa-search-results-page-select"
|
|
12504
12840
|
};
|
|
12505
|
-
const _hoisted_2$
|
|
12841
|
+
const _hoisted_2$p = {
|
|
12506
12842
|
key: 0,
|
|
12507
12843
|
class: "lupa-page-number-separator"
|
|
12508
12844
|
};
|
|
12509
|
-
const _hoisted_3$
|
|
12510
|
-
const _hoisted_4$
|
|
12845
|
+
const _hoisted_3$i = ["onClick"];
|
|
12846
|
+
const _hoisted_4$d = {
|
|
12511
12847
|
key: 0,
|
|
12512
12848
|
class: "lupa-page-number-separator"
|
|
12513
12849
|
};
|
|
12514
|
-
const _sfc_main$
|
|
12850
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
12515
12851
|
__name: "SearchResultsPageSelect",
|
|
12516
12852
|
props: {
|
|
12517
12853
|
lastPageLabel: {},
|
|
@@ -12577,7 +12913,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12577
12913
|
const handlePageChange = (page) => {
|
|
12578
12914
|
if (page > 0) {
|
|
12579
12915
|
paramStore.appendParams({
|
|
12580
|
-
params: [{ name: QUERY_PARAMS$1.PAGE, value: page.toString() }]
|
|
12916
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: page.toString() }]
|
|
12581
12917
|
});
|
|
12582
12918
|
if (scrollToResultsOptions.value.enabled) {
|
|
12583
12919
|
scrollToSearchResults(
|
|
@@ -12588,7 +12924,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12588
12924
|
}
|
|
12589
12925
|
};
|
|
12590
12926
|
return (_ctx, _cache) => {
|
|
12591
|
-
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
12927
|
+
return showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
12592
12928
|
showBack.value ? (openBlock(), createElementBlock("div", {
|
|
12593
12929
|
key: 0,
|
|
12594
12930
|
class: normalizeClass(firstPageLabel.value === "<" ? "lupa-page-arrow" : "lupa-show-less"),
|
|
@@ -12599,7 +12935,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12599
12935
|
class: "lupa-page-number lupa-page-number-first",
|
|
12600
12936
|
onClick: _cache[1] || (_cache[1] = () => handlePageChange(1))
|
|
12601
12937
|
}, " 1 "),
|
|
12602
|
-
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
12938
|
+
showFirstPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_2$p, "...")) : createCommentVNode("", true)
|
|
12603
12939
|
], 64)) : createCommentVNode("", true),
|
|
12604
12940
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pages.value, (page) => {
|
|
12605
12941
|
return openBlock(), createElementBlock("div", {
|
|
@@ -12610,10 +12946,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12610
12946
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
12611
12947
|
]),
|
|
12612
12948
|
"data-cy": "lupa-page-number"
|
|
12613
|
-
}, toDisplayString(page), 11, _hoisted_3$
|
|
12949
|
+
}, toDisplayString(page), 11, _hoisted_3$i);
|
|
12614
12950
|
}), 128)),
|
|
12615
12951
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
12616
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12952
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$d, "...")) : createCommentVNode("", true),
|
|
12617
12953
|
createBaseVNode("div", {
|
|
12618
12954
|
class: "lupa-page-number lupa-page-number-last",
|
|
12619
12955
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -12632,14 +12968,14 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12632
12968
|
};
|
|
12633
12969
|
}
|
|
12634
12970
|
});
|
|
12635
|
-
const _hoisted_1$
|
|
12971
|
+
const _hoisted_1$v = {
|
|
12636
12972
|
id: "lupa-search-results-page-size",
|
|
12637
12973
|
"data-cy": "lupa-search-results-page-size"
|
|
12638
12974
|
};
|
|
12639
|
-
const _hoisted_2$
|
|
12640
|
-
const _hoisted_3$
|
|
12641
|
-
const _hoisted_4$
|
|
12642
|
-
const _sfc_main$
|
|
12975
|
+
const _hoisted_2$o = { id: "lupa-select" };
|
|
12976
|
+
const _hoisted_3$h = { class: "lupa-select-label" };
|
|
12977
|
+
const _hoisted_4$c = ["aria-label"];
|
|
12978
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
12643
12979
|
__name: "SearchResultsPageSize",
|
|
12644
12980
|
props: {
|
|
12645
12981
|
label: {},
|
|
@@ -12647,18 +12983,19 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12647
12983
|
},
|
|
12648
12984
|
setup(__props) {
|
|
12649
12985
|
const paramsStore = useParamsStore();
|
|
12986
|
+
const optionsStore = useOptionsStore();
|
|
12650
12987
|
const select = ref(null);
|
|
12651
12988
|
const handleSelect = (e) => {
|
|
12652
12989
|
const value = e.target.value;
|
|
12653
12990
|
paramsStore.appendParams({
|
|
12654
|
-
params: [{ name: QUERY_PARAMS$1.LIMIT, value }],
|
|
12655
|
-
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
12991
|
+
params: [{ name: optionsStore.getQueryParamName(QUERY_PARAMS$1.LIMIT), value }],
|
|
12992
|
+
paramsToRemove: [optionsStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
12656
12993
|
});
|
|
12657
12994
|
};
|
|
12658
12995
|
return (_ctx, _cache) => {
|
|
12659
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12660
|
-
createBaseVNode("div", _hoisted_2$
|
|
12661
|
-
createBaseVNode("label", _hoisted_3$
|
|
12996
|
+
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
12997
|
+
createBaseVNode("div", _hoisted_2$o, [
|
|
12998
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(_ctx.label), 1),
|
|
12662
12999
|
createBaseVNode("select", {
|
|
12663
13000
|
class: "lupa-select-dropdown",
|
|
12664
13001
|
"aria-label": _ctx.label,
|
|
@@ -12670,21 +13007,21 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12670
13007
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
12671
13008
|
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
12672
13009
|
}), 128))
|
|
12673
|
-
], 40, _hoisted_4$
|
|
13010
|
+
], 40, _hoisted_4$c)
|
|
12674
13011
|
])
|
|
12675
13012
|
]);
|
|
12676
13013
|
};
|
|
12677
13014
|
}
|
|
12678
13015
|
});
|
|
12679
|
-
const _hoisted_1$
|
|
13016
|
+
const _hoisted_1$u = {
|
|
12680
13017
|
id: "lupa-search-results-sort",
|
|
12681
13018
|
class: "lupa-search-results-sort"
|
|
12682
13019
|
};
|
|
12683
|
-
const _hoisted_2$
|
|
12684
|
-
const _hoisted_3$
|
|
12685
|
-
const _hoisted_4$
|
|
13020
|
+
const _hoisted_2$n = { id: "lupa-select" };
|
|
13021
|
+
const _hoisted_3$g = { class: "lupa-select-label" };
|
|
13022
|
+
const _hoisted_4$b = ["aria-label"];
|
|
12686
13023
|
const _hoisted_5$8 = ["value"];
|
|
12687
|
-
const _sfc_main$
|
|
13024
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
12688
13025
|
__name: "SearchResultsSort",
|
|
12689
13026
|
props: {
|
|
12690
13027
|
options: {},
|
|
@@ -12693,6 +13030,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12693
13030
|
setup(__props) {
|
|
12694
13031
|
const props = __props;
|
|
12695
13032
|
const paramStore = useParamsStore();
|
|
13033
|
+
const optionStore = useOptionsStore();
|
|
12696
13034
|
const { sort } = storeToRefs(paramStore);
|
|
12697
13035
|
const selectedKey = ref("");
|
|
12698
13036
|
const previousKey = ref("");
|
|
@@ -12726,15 +13064,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12726
13064
|
paramStore.setSortSettings({ selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12727
13065
|
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12728
13066
|
paramStore.appendParams({
|
|
12729
|
-
params: [{ name: QUERY_PARAMS$1.SORT, value }],
|
|
12730
|
-
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
13067
|
+
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.SORT), value }],
|
|
13068
|
+
paramsToRemove: [optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE)]
|
|
12731
13069
|
});
|
|
12732
13070
|
previousKey.value = selectedKey.value;
|
|
12733
13071
|
};
|
|
12734
13072
|
return (_ctx, _cache) => {
|
|
12735
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12736
|
-
createBaseVNode("div", _hoisted_2$
|
|
12737
|
-
createBaseVNode("label", _hoisted_3$
|
|
13073
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
13074
|
+
createBaseVNode("div", _hoisted_2$n, [
|
|
13075
|
+
createBaseVNode("label", _hoisted_3$g, toDisplayString(_ctx.options.label), 1),
|
|
12738
13076
|
withDirectives(createBaseVNode("select", {
|
|
12739
13077
|
class: "lupa-select-dropdown",
|
|
12740
13078
|
"aria-label": _ctx.options.label,
|
|
@@ -12749,7 +13087,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12749
13087
|
value: option.key
|
|
12750
13088
|
}, toDisplayString(option.label), 9, _hoisted_5$8);
|
|
12751
13089
|
}), 128))
|
|
12752
|
-
], 40, _hoisted_4$
|
|
13090
|
+
], 40, _hoisted_4$b), [
|
|
12753
13091
|
[vModelSelect, selectedKey.value]
|
|
12754
13092
|
])
|
|
12755
13093
|
])
|
|
@@ -12757,14 +13095,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12757
13095
|
};
|
|
12758
13096
|
}
|
|
12759
13097
|
});
|
|
12760
|
-
const _hoisted_1$
|
|
12761
|
-
const _hoisted_2$
|
|
12762
|
-
const _hoisted_3$
|
|
12763
|
-
const _hoisted_4$
|
|
13098
|
+
const _hoisted_1$t = { class: "lupa-toolbar-left" };
|
|
13099
|
+
const _hoisted_2$m = { key: 1 };
|
|
13100
|
+
const _hoisted_3$f = { key: 3 };
|
|
13101
|
+
const _hoisted_4$a = { key: 5 };
|
|
12764
13102
|
const _hoisted_5$7 = { class: "lupa-toolbar-right" };
|
|
12765
13103
|
const _hoisted_6$5 = { key: 1 };
|
|
12766
13104
|
const _hoisted_7$3 = { key: 3 };
|
|
12767
|
-
const _sfc_main$
|
|
13105
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
12768
13106
|
__name: "SearchResultsToolbar",
|
|
12769
13107
|
props: {
|
|
12770
13108
|
options: {},
|
|
@@ -12863,32 +13201,32 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12863
13201
|
id: "lupa-search-results-toolbar",
|
|
12864
13202
|
class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
|
|
12865
13203
|
}, [
|
|
12866
|
-
createBaseVNode("div", _hoisted_1$
|
|
12867
|
-
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$
|
|
12868
|
-
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$
|
|
13204
|
+
createBaseVNode("div", _hoisted_1$t, [
|
|
13205
|
+
showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
|
|
13206
|
+
showItemSummary.value ? (openBlock(), createBlock(_sfc_main$S, {
|
|
12869
13207
|
key: 2,
|
|
12870
13208
|
label: searchSummaryLabel.value,
|
|
12871
13209
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
12872
13210
|
onClear: handleClearAll
|
|
12873
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
12874
|
-
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$
|
|
13211
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$f)),
|
|
13212
|
+
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$z, {
|
|
12875
13213
|
key: 4,
|
|
12876
13214
|
options: paginationOptions.value.pageSelect,
|
|
12877
13215
|
"last-page-label": paginationOptions.value.labels.showMore,
|
|
12878
13216
|
"first-page-label": paginationOptions.value.labels.showLess
|
|
12879
|
-
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
13217
|
+
}, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_4$a))
|
|
12880
13218
|
]),
|
|
12881
13219
|
createBaseVNode("div", _hoisted_5$7, [
|
|
12882
|
-
createVNode(_sfc_main$
|
|
13220
|
+
createVNode(_sfc_main$A, {
|
|
12883
13221
|
label: optionsValue.value.labels.mobileFilterButton,
|
|
12884
13222
|
"show-filter-count": showMobileFilterCount.value
|
|
12885
13223
|
}, null, 8, ["label", "show-filter-count"]),
|
|
12886
|
-
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$
|
|
13224
|
+
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
12887
13225
|
key: 0,
|
|
12888
13226
|
options: paginationOptions.value.pageSize,
|
|
12889
13227
|
label: paginationOptions.value.labels.pageSize
|
|
12890
13228
|
}, null, 8, ["options", "label"])) : (openBlock(), createElementBlock("div", _hoisted_6$5)),
|
|
12891
|
-
sortOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
13229
|
+
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
12892
13230
|
key: 2,
|
|
12893
13231
|
options: sortOptions.value,
|
|
12894
13232
|
callbacks: callbacks.value
|
|
@@ -12898,259 +13236,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12898
13236
|
};
|
|
12899
13237
|
}
|
|
12900
13238
|
});
|
|
12901
|
-
const _hoisted_1$y = { class: "lupa-badge-title" };
|
|
12902
|
-
const _hoisted_2$n = ["src"];
|
|
12903
|
-
const _hoisted_3$f = { key: 1 };
|
|
12904
|
-
const _hoisted_4$a = {
|
|
12905
|
-
key: 0,
|
|
12906
|
-
class: "lupa-badge-full-text"
|
|
12907
|
-
};
|
|
12908
|
-
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
12909
|
-
__name: "SearchResultGeneratedBadge",
|
|
12910
|
-
props: {
|
|
12911
|
-
options: {},
|
|
12912
|
-
badge: {}
|
|
12913
|
-
},
|
|
12914
|
-
setup(__props) {
|
|
12915
|
-
const props = __props;
|
|
12916
|
-
const image = computed(() => {
|
|
12917
|
-
var _a, _b, _c;
|
|
12918
|
-
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.image) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : "";
|
|
12919
|
-
});
|
|
12920
|
-
const showTitle = computed(() => {
|
|
12921
|
-
var _a, _b, _c;
|
|
12922
|
-
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.showTitle) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : true;
|
|
12923
|
-
});
|
|
12924
|
-
const hasAdditionalText = computed(() => {
|
|
12925
|
-
var _a, _b;
|
|
12926
|
-
return Boolean((_a = props.badge) == null ? void 0 : _a.additionalText) && typeof ((_b = props.badge) == null ? void 0 : _b.additionalText) === "string";
|
|
12927
|
-
});
|
|
12928
|
-
const hasTitleText = computed(() => {
|
|
12929
|
-
var _a, _b;
|
|
12930
|
-
return Boolean((_a = props.badge) == null ? void 0 : _a.titleText) && typeof ((_b = props.badge) == null ? void 0 : _b.titleText) === "string";
|
|
12931
|
-
});
|
|
12932
|
-
const customClassName = computed(() => {
|
|
12933
|
-
var _a, _b, _c;
|
|
12934
|
-
return (_c = (_b = (_a = props.options.generate) == null ? void 0 : _a.customClass) == null ? void 0 : _b.call(_a, props.badge)) != null ? _c : "";
|
|
12935
|
-
});
|
|
12936
|
-
return (_ctx, _cache) => {
|
|
12937
|
-
return openBlock(), createElementBlock("div", {
|
|
12938
|
-
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
12939
|
-
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
12940
|
-
}, [
|
|
12941
|
-
createBaseVNode("span", _hoisted_1$y, [
|
|
12942
|
-
image.value ? (openBlock(), createElementBlock("img", {
|
|
12943
|
-
key: 0,
|
|
12944
|
-
src: image.value
|
|
12945
|
-
}, null, 8, _hoisted_2$n)) : createCommentVNode("", true),
|
|
12946
|
-
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
12947
|
-
]),
|
|
12948
|
-
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
12949
|
-
], 6);
|
|
12950
|
-
};
|
|
12951
|
-
}
|
|
12952
|
-
});
|
|
12953
|
-
const _hoisted_1$x = { class: "lupa-generated-badges" };
|
|
12954
|
-
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
12955
|
-
__name: "SearchResultGeneratedBadges",
|
|
12956
|
-
props: {
|
|
12957
|
-
options: {}
|
|
12958
|
-
},
|
|
12959
|
-
setup(__props) {
|
|
12960
|
-
const props = __props;
|
|
12961
|
-
const badgeField = computed(() => {
|
|
12962
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
12963
|
-
const fieldHasBadges = ((_a = props.options.generate) == null ? void 0 : _a.key) && props.options.product[(_c = (_b = props.options.generate) == null ? void 0 : _b.key) != null ? _c : ""] && Array.isArray(props.options.product[(_e = (_d = props.options.generate) == null ? void 0 : _d.key) != null ? _e : ""]);
|
|
12964
|
-
return fieldHasBadges ? props.options.product[(_g = (_f = props.options.generate) == null ? void 0 : _f.key) != null ? _g : ""] : [];
|
|
12965
|
-
});
|
|
12966
|
-
const keyMap = computed(() => {
|
|
12967
|
-
var _a, _b;
|
|
12968
|
-
return (_b = (_a = props.options.generate) == null ? void 0 : _a.keyMap) != null ? _b : {};
|
|
12969
|
-
});
|
|
12970
|
-
const badges = computed(() => {
|
|
12971
|
-
return badgeField.value.filter((f2) => Boolean(f2)).map((f2) => ({
|
|
12972
|
-
backgroundColor: keyMap.value.backgroundColor ? f2[keyMap.value.backgroundColor] : void 0,
|
|
12973
|
-
color: keyMap.value.color ? f2[keyMap.value.color] : void 0,
|
|
12974
|
-
titleText: keyMap.value.titleText ? f2[keyMap.value.titleText] : void 0,
|
|
12975
|
-
additionalText: keyMap.value.additionalText ? f2[keyMap.value.additionalText] : void 0,
|
|
12976
|
-
id: keyMap.value.id ? f2[keyMap.value.id] : void 0
|
|
12977
|
-
})).filter((b) => Boolean(b.id));
|
|
12978
|
-
});
|
|
12979
|
-
return (_ctx, _cache) => {
|
|
12980
|
-
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
12981
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
12982
|
-
return openBlock(), createBlock(_sfc_main$B, {
|
|
12983
|
-
key: badge.id,
|
|
12984
|
-
badge,
|
|
12985
|
-
options: _ctx.options
|
|
12986
|
-
}, null, 8, ["badge", "options"]);
|
|
12987
|
-
}), 128))
|
|
12988
|
-
]);
|
|
12989
|
-
};
|
|
12990
|
-
}
|
|
12991
|
-
});
|
|
12992
|
-
const _hoisted_1$w = ["innerHTML"];
|
|
12993
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
12994
|
-
__name: "CustomBadge",
|
|
12995
|
-
props: {
|
|
12996
|
-
badge: {}
|
|
12997
|
-
},
|
|
12998
|
-
setup(__props) {
|
|
12999
|
-
const props = __props;
|
|
13000
|
-
const text = computed(() => {
|
|
13001
|
-
var _a, _b, _c;
|
|
13002
|
-
return (_c = (_b = props.badge).html) == null ? void 0 : _c.call(_b, (_a = props.badge.product) != null ? _a : {});
|
|
13003
|
-
});
|
|
13004
|
-
const className = computed(() => {
|
|
13005
|
-
var _a;
|
|
13006
|
-
return (_a = props.badge.className) != null ? _a : "";
|
|
13007
|
-
});
|
|
13008
|
-
return (_ctx, _cache) => {
|
|
13009
|
-
return openBlock(), createElementBlock("div", {
|
|
13010
|
-
class: normalizeClass(className.value),
|
|
13011
|
-
innerHTML: text.value
|
|
13012
|
-
}, null, 10, _hoisted_1$w);
|
|
13013
|
-
};
|
|
13014
|
-
}
|
|
13015
|
-
});
|
|
13016
|
-
const _hoisted_1$v = { class: "lupa-text-badges" };
|
|
13017
|
-
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
13018
|
-
__name: "TextBadge",
|
|
13019
|
-
props: {
|
|
13020
|
-
badge: {}
|
|
13021
|
-
},
|
|
13022
|
-
setup(__props) {
|
|
13023
|
-
const props = __props;
|
|
13024
|
-
const badges = computed(() => {
|
|
13025
|
-
var _a, _b;
|
|
13026
|
-
return (_b = (_a = props.badge) == null ? void 0 : _a.value) != null ? _b : [];
|
|
13027
|
-
});
|
|
13028
|
-
const displayBadges = computed(() => {
|
|
13029
|
-
return badges.value.slice(0, props.badge.maxItems);
|
|
13030
|
-
});
|
|
13031
|
-
return (_ctx, _cache) => {
|
|
13032
|
-
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
13033
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
13034
|
-
return openBlock(), createElementBlock("div", {
|
|
13035
|
-
class: "lupa-badge lupa-text-badge",
|
|
13036
|
-
key: item
|
|
13037
|
-
}, toDisplayString(_ctx.badge.prefix) + toDisplayString(item), 1);
|
|
13038
|
-
}), 128))
|
|
13039
|
-
]);
|
|
13040
|
-
};
|
|
13041
|
-
}
|
|
13042
|
-
});
|
|
13043
|
-
const _hoisted_1$u = { class: "lupa-image-badges" };
|
|
13044
|
-
const _hoisted_2$m = ["src"];
|
|
13045
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
13046
|
-
__name: "ImageBadge",
|
|
13047
|
-
props: {
|
|
13048
|
-
badge: {}
|
|
13049
|
-
},
|
|
13050
|
-
setup(__props) {
|
|
13051
|
-
const props = __props;
|
|
13052
|
-
const badges = computed(() => {
|
|
13053
|
-
return props.badge.value;
|
|
13054
|
-
});
|
|
13055
|
-
const displayBadges = computed(() => {
|
|
13056
|
-
return badges.value.slice(0, props.badge.maxItems);
|
|
13057
|
-
});
|
|
13058
|
-
const getImageUrl = (src) => {
|
|
13059
|
-
if (!props.badge.rootImageUrl) {
|
|
13060
|
-
return src;
|
|
13061
|
-
}
|
|
13062
|
-
return `${props.badge.rootImageUrl}${src}`;
|
|
13063
|
-
};
|
|
13064
|
-
return (_ctx, _cache) => {
|
|
13065
|
-
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
13066
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
13067
|
-
return openBlock(), createElementBlock("div", {
|
|
13068
|
-
class: "lupa-badge lupa-image-badge",
|
|
13069
|
-
key: item
|
|
13070
|
-
}, [
|
|
13071
|
-
createBaseVNode("img", {
|
|
13072
|
-
src: getImageUrl(item)
|
|
13073
|
-
}, null, 8, _hoisted_2$m)
|
|
13074
|
-
]);
|
|
13075
|
-
}), 128))
|
|
13076
|
-
]);
|
|
13077
|
-
};
|
|
13078
|
-
}
|
|
13079
|
-
});
|
|
13080
|
-
const _hoisted_1$t = { id: "lupa-search-results-badges" };
|
|
13081
|
-
const __default__$1 = {
|
|
13082
|
-
components: {
|
|
13083
|
-
CustomBadge: _sfc_main$z,
|
|
13084
|
-
TextBadge: _sfc_main$y,
|
|
13085
|
-
ImageBadge: _sfc_main$x
|
|
13086
|
-
}
|
|
13087
|
-
};
|
|
13088
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$1), {
|
|
13089
|
-
__name: "SearchResultsBadgeWrapper",
|
|
13090
|
-
props: {
|
|
13091
|
-
position: {},
|
|
13092
|
-
options: {}
|
|
13093
|
-
},
|
|
13094
|
-
setup(__props) {
|
|
13095
|
-
const props = __props;
|
|
13096
|
-
const positionValue = computed(() => {
|
|
13097
|
-
var _a;
|
|
13098
|
-
return (_a = props.position) != null ? _a : "card";
|
|
13099
|
-
});
|
|
13100
|
-
const anchorPosition = computed(() => {
|
|
13101
|
-
return props.options.anchor;
|
|
13102
|
-
});
|
|
13103
|
-
const badges = computed(() => {
|
|
13104
|
-
if (!props.options.elements) {
|
|
13105
|
-
return [];
|
|
13106
|
-
}
|
|
13107
|
-
return props.options.elements.filter((e) => {
|
|
13108
|
-
var _a;
|
|
13109
|
-
return !e.display || e.display((_a = props.options.product) != null ? _a : {});
|
|
13110
|
-
}).map((x) => {
|
|
13111
|
-
var _a;
|
|
13112
|
-
return __spreadProps2(__spreadValues2({}, x), {
|
|
13113
|
-
value: ((_a = props.options.product) == null ? void 0 : _a[x.key]) || "badge",
|
|
13114
|
-
product: props.options.product
|
|
13115
|
-
});
|
|
13116
|
-
});
|
|
13117
|
-
});
|
|
13118
|
-
const displayBadges = computed(() => {
|
|
13119
|
-
return positionValue.value === "card" ? badges.value.filter((b) => !b.position || b.position === "card") : badges.value.filter((b) => b.position === "image");
|
|
13120
|
-
});
|
|
13121
|
-
const getBadgeComponent = (type) => {
|
|
13122
|
-
switch (type) {
|
|
13123
|
-
case BadgeType.TEXT:
|
|
13124
|
-
return "TextBadge";
|
|
13125
|
-
case BadgeType.IMAGE:
|
|
13126
|
-
return "ImageBadge";
|
|
13127
|
-
case BadgeType.CUSTOM_HTML:
|
|
13128
|
-
return "CustomBadge";
|
|
13129
|
-
default:
|
|
13130
|
-
return "CustomBadge";
|
|
13131
|
-
}
|
|
13132
|
-
};
|
|
13133
|
-
return (_ctx, _cache) => {
|
|
13134
|
-
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
13135
|
-
createBaseVNode("div", {
|
|
13136
|
-
id: "lupa-badges",
|
|
13137
|
-
class: normalizeClass(anchorPosition.value)
|
|
13138
|
-
}, [
|
|
13139
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (badge, index) => {
|
|
13140
|
-
return openBlock(), createBlock(resolveDynamicComponent(getBadgeComponent(badge.type)), {
|
|
13141
|
-
key: index,
|
|
13142
|
-
badge
|
|
13143
|
-
}, null, 8, ["badge"]);
|
|
13144
|
-
}), 128)),
|
|
13145
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$A, {
|
|
13146
|
-
key: 0,
|
|
13147
|
-
options: _ctx.options
|
|
13148
|
-
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
13149
|
-
], 2)
|
|
13150
|
-
]);
|
|
13151
|
-
};
|
|
13152
|
-
}
|
|
13153
|
-
}));
|
|
13154
13239
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
13155
13240
|
__name: "SearchResultsProductImage",
|
|
13156
13241
|
props: {
|
|
@@ -13585,7 +13670,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13585
13670
|
setup(__props, { emit: emit2 }) {
|
|
13586
13671
|
const props = __props;
|
|
13587
13672
|
const dynamicDataStore = useDynamicDataStore();
|
|
13588
|
-
const { dynamicDataIdMap, loading } = storeToRefs(dynamicDataStore);
|
|
13673
|
+
const { dynamicDataIdMap, loadingIds, loading } = storeToRefs(dynamicDataStore);
|
|
13589
13674
|
const elementComponent = computed(() => {
|
|
13590
13675
|
switch (props.element.type) {
|
|
13591
13676
|
case DocumentElementType.IMAGE:
|
|
@@ -13611,9 +13696,6 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13611
13696
|
}
|
|
13612
13697
|
return "searchResultsProductTitle";
|
|
13613
13698
|
});
|
|
13614
|
-
const isLoadingDynamicData = computed(() => {
|
|
13615
|
-
return Boolean(props.element.dynamic && loading.value);
|
|
13616
|
-
});
|
|
13617
13699
|
const enhancedItem = computed(() => {
|
|
13618
13700
|
var _a, _b, _c, _d;
|
|
13619
13701
|
if (!((_a = props.item) == null ? void 0 : _a.id)) {
|
|
@@ -13628,7 +13710,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13628
13710
|
const handleProductEvent = (item) => {
|
|
13629
13711
|
emit2("productEvent", item);
|
|
13630
13712
|
};
|
|
13713
|
+
const isLoadingDynamicData = (id) => {
|
|
13714
|
+
return Boolean(props.element.dynamic && id && loading.value && (loadingIds == null ? void 0 : loadingIds.value[id]));
|
|
13715
|
+
};
|
|
13631
13716
|
return (_ctx, _cache) => {
|
|
13717
|
+
var _a;
|
|
13632
13718
|
return displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
13633
13719
|
key: 0,
|
|
13634
13720
|
item: enhancedItem.value,
|
|
@@ -13636,7 +13722,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
13636
13722
|
labels: _ctx.labels,
|
|
13637
13723
|
inStock: _ctx.inStock,
|
|
13638
13724
|
link: _ctx.link,
|
|
13639
|
-
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData.
|
|
13725
|
+
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
13640
13726
|
onProductEvent: handleProductEvent
|
|
13641
13727
|
}, null, 40, ["item", "options", "labels", "inStock", "link", "class"])) : createCommentVNode("", true);
|
|
13642
13728
|
};
|
|
@@ -13796,7 +13882,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13796
13882
|
"data-cy": "lupa-search-result-product-card",
|
|
13797
13883
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
13798
13884
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
13799
|
-
createVNode(_sfc_main$
|
|
13885
|
+
createVNode(_sfc_main$_, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
13800
13886
|
createBaseVNode("div", {
|
|
13801
13887
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
13802
13888
|
}, [
|
|
@@ -13816,7 +13902,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13816
13902
|
link: link.value
|
|
13817
13903
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
13818
13904
|
}), 128)),
|
|
13819
|
-
createVNode(_sfc_main$
|
|
13905
|
+
createVNode(_sfc_main$_, {
|
|
13820
13906
|
options: badgesOptions.value,
|
|
13821
13907
|
position: "image",
|
|
13822
13908
|
class: "lupa-image-badges"
|
|
@@ -14163,7 +14249,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14163
14249
|
const props = __props;
|
|
14164
14250
|
const searchResultStore = useSearchResultStore();
|
|
14165
14251
|
const paramStore = useParamsStore();
|
|
14166
|
-
useOptionsStore();
|
|
14252
|
+
const optionStore = useOptionsStore();
|
|
14167
14253
|
const {
|
|
14168
14254
|
hasResults,
|
|
14169
14255
|
currentQueryText,
|
|
@@ -14247,7 +14333,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14247
14333
|
};
|
|
14248
14334
|
const goToFirstPage = () => {
|
|
14249
14335
|
paramStore.appendParams({
|
|
14250
|
-
params: [{ name: QUERY_PARAMS$1.PAGE, value: "1" }]
|
|
14336
|
+
params: [{ name: optionStore.getQueryParamName(QUERY_PARAMS$1.PAGE), value: "1" }]
|
|
14251
14337
|
});
|
|
14252
14338
|
};
|
|
14253
14339
|
return (_ctx, _cache) => {
|
|
@@ -14258,17 +14344,17 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14258
14344
|
class: "lupa-loader"
|
|
14259
14345
|
})) : createCommentVNode("", true),
|
|
14260
14346
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14261
|
-
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
14347
|
+
showTopFilters.value ? (openBlock(), createBlock(_sfc_main$C, {
|
|
14262
14348
|
key: 0,
|
|
14263
14349
|
options: (_a = _ctx.options.filters) != null ? _a : {}
|
|
14264
14350
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14265
|
-
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$
|
|
14351
|
+
showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$w, {
|
|
14266
14352
|
key: 1,
|
|
14267
14353
|
class: "lupa-toolbar-mobile",
|
|
14268
14354
|
options: _ctx.options,
|
|
14269
14355
|
"pagination-location": "top"
|
|
14270
14356
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14271
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
14357
|
+
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$P, {
|
|
14272
14358
|
key: 2,
|
|
14273
14359
|
class: normalizeClass(currentFiltersClass.value),
|
|
14274
14360
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -14282,7 +14368,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14282
14368
|
sdkOptions: _ctx.options.options
|
|
14283
14369
|
}, null, 8, ["options", "sdkOptions"]),
|
|
14284
14370
|
unref(hasResults) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
14285
|
-
createVNode(_sfc_main$
|
|
14371
|
+
createVNode(_sfc_main$w, {
|
|
14286
14372
|
class: "lupa-toolbar-top",
|
|
14287
14373
|
options: _ctx.options,
|
|
14288
14374
|
"pagination-location": "top"
|
|
@@ -14312,7 +14398,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14312
14398
|
onClick: goToFirstPage
|
|
14313
14399
|
}, toDisplayString(_ctx.options.labels.backToFirstPage), 1)) : createCommentVNode("", true)
|
|
14314
14400
|
])) : createCommentVNode("", true),
|
|
14315
|
-
createVNode(_sfc_main$
|
|
14401
|
+
createVNode(_sfc_main$w, {
|
|
14316
14402
|
class: "lupa-toolbar-bottom",
|
|
14317
14403
|
options: _ctx.options,
|
|
14318
14404
|
"pagination-location": "bottom"
|
|
@@ -14391,7 +14477,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
14391
14477
|
onClick: handleNavigationBack
|
|
14392
14478
|
}, toDisplayString(backTitle.value), 9, _hoisted_3$5)
|
|
14393
14479
|
])) : createCommentVNode("", true),
|
|
14394
|
-
createVNode(_sfc_main$
|
|
14480
|
+
createVNode(_sfc_main$w, {
|
|
14395
14481
|
class: "lupa-toolbar-mobile",
|
|
14396
14482
|
"pagination-location": "top",
|
|
14397
14483
|
options: _ctx.options
|
|
@@ -14453,7 +14539,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14453
14539
|
const handlePopState = () => {
|
|
14454
14540
|
var _a;
|
|
14455
14541
|
const searchParams = getSearchParams((_a = props.options.ssr) == null ? void 0 : _a.url);
|
|
14456
|
-
paramStore.add(parseParams(searchParams));
|
|
14542
|
+
paramStore.add(parseParams(optionStore.getQueryParamName, searchParams));
|
|
14457
14543
|
};
|
|
14458
14544
|
onMounted(() => __async(this, null, function* () {
|
|
14459
14545
|
var _a, _b;
|
|
@@ -14553,7 +14639,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14553
14639
|
var _a;
|
|
14554
14640
|
const searchParams = getSearchParams((_a = props.options.ssr) == null ? void 0 : _a.url, params);
|
|
14555
14641
|
const publicQuery = createPublicQuery(
|
|
14556
|
-
parseParams(searchParams),
|
|
14642
|
+
parseParams(optionStore.getQueryParamName, searchParams),
|
|
14557
14643
|
props.options.sort,
|
|
14558
14644
|
defaultSearchResultPageSize.value
|
|
14559
14645
|
);
|
|
@@ -14573,10 +14659,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14573
14659
|
}
|
|
14574
14660
|
}
|
|
14575
14661
|
const params = new URLSearchParams(window.location.search);
|
|
14576
|
-
if (!params.has(QUERY_PARAMS$1.QUERY) && !props.initialData) {
|
|
14662
|
+
if (!params.has(optionStore.getQueryParamName(QUERY_PARAMS$1.QUERY)) && !props.initialData) {
|
|
14577
14663
|
handleUrlChange(params);
|
|
14578
14664
|
}
|
|
14579
|
-
paramStore.add(parseParams(params));
|
|
14665
|
+
paramStore.add(parseParams(optionStore.getQueryParamName, params));
|
|
14580
14666
|
paramStore.setDefaultLimit(defaultSearchResultPageSize.value);
|
|
14581
14667
|
};
|
|
14582
14668
|
watch(searchString, () => handleParamsChange());
|
|
@@ -14610,7 +14696,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14610
14696
|
);
|
|
14611
14697
|
optionStore.setSearchResultOptions({ options: props.options });
|
|
14612
14698
|
searchResultStore.add(__spreadValues2({}, initialData));
|
|
14613
|
-
paramStore.add(parseParams(searchParams), props.options.ssr);
|
|
14699
|
+
paramStore.add(parseParams(optionStore.getQueryParamName, searchParams), props.options.ssr);
|
|
14614
14700
|
paramStore.setDefaultLimit(defaultSearchResultPageSize.value);
|
|
14615
14701
|
handleResults({ queryKey: props.options.queryKey, results: initialData });
|
|
14616
14702
|
}
|
|
@@ -14623,8 +14709,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14623
14709
|
class: normalizeClass(["lupa-search-result-wrapper", { "lupa-search-wrapper-no-results": !unref(hasResults) }])
|
|
14624
14710
|
}, [
|
|
14625
14711
|
_ctx.isContainer ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
14626
|
-
createVNode(_sfc_main$
|
|
14627
|
-
createVNode(_sfc_main$
|
|
14712
|
+
createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
14713
|
+
createVNode(_sfc_main$R, {
|
|
14628
14714
|
"show-summary": true,
|
|
14629
14715
|
options: _ctx.options,
|
|
14630
14716
|
"is-product-list": (_a = _ctx.isProductList) != null ? _a : false
|
|
@@ -14634,24 +14720,24 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14634
14720
|
key: 1,
|
|
14635
14721
|
options: _ctx.options
|
|
14636
14722
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14637
|
-
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$
|
|
14723
|
+
_ctx.options.filters ? (openBlock(), createBlock(_sfc_main$E, {
|
|
14638
14724
|
key: 2,
|
|
14639
14725
|
options: _ctx.options.filters
|
|
14640
14726
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14641
|
-
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$
|
|
14727
|
+
unref(currentQueryText) || _ctx.isProductList ? (openBlock(), createBlock(_sfc_main$D, {
|
|
14642
14728
|
key: 3,
|
|
14643
14729
|
breadcrumbs: _ctx.options.breadcrumbs
|
|
14644
14730
|
}, null, 8, ["breadcrumbs"])) : createCommentVNode("", true),
|
|
14645
14731
|
isTitleResultTopPosition.value ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
14646
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
14732
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$F, {
|
|
14647
14733
|
key: 0,
|
|
14648
14734
|
options: (_b = _ctx.options.filters) != null ? _b : {},
|
|
14649
14735
|
ref_key: "searchResultsFilters",
|
|
14650
14736
|
ref: searchResultsFilters
|
|
14651
14737
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14652
14738
|
createBaseVNode("div", _hoisted_3$4, [
|
|
14653
|
-
createVNode(_sfc_main$
|
|
14654
|
-
createVNode(_sfc_main$
|
|
14739
|
+
createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
14740
|
+
createVNode(_sfc_main$R, {
|
|
14655
14741
|
options: _ctx.options,
|
|
14656
14742
|
"is-product-list": (_c = _ctx.isProductList) != null ? _c : false
|
|
14657
14743
|
}, null, 8, ["options", "is-product-list"]),
|
|
@@ -14666,13 +14752,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14666
14752
|
}, 8, ["options", "ssr"])
|
|
14667
14753
|
])
|
|
14668
14754
|
])) : (openBlock(), createElementBlock(Fragment, { key: 5 }, [
|
|
14669
|
-
createVNode(_sfc_main$
|
|
14670
|
-
createVNode(_sfc_main$
|
|
14755
|
+
createVNode(_sfc_main$T, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
14756
|
+
createVNode(_sfc_main$R, {
|
|
14671
14757
|
options: _ctx.options,
|
|
14672
14758
|
"is-product-list": (_d = _ctx.isProductList) != null ? _d : false
|
|
14673
14759
|
}, null, 8, ["options", "is-product-list"]),
|
|
14674
14760
|
createBaseVNode("div", _hoisted_4$3, [
|
|
14675
|
-
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$
|
|
14761
|
+
showFilterSidebar.value ? (openBlock(), createBlock(_sfc_main$F, {
|
|
14676
14762
|
key: 0,
|
|
14677
14763
|
options: (_e = _ctx.options.filters) != null ? _e : {},
|
|
14678
14764
|
ref_key: "searchResultsFilters",
|
|
@@ -20302,7 +20388,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
20302
20388
|
onClick: withModifiers(innerClick, ["stop"])
|
|
20303
20389
|
}, [
|
|
20304
20390
|
createBaseVNode("div", _hoisted_2$7, [
|
|
20305
|
-
createVNode(_sfc_main$
|
|
20391
|
+
createVNode(_sfc_main$U, {
|
|
20306
20392
|
options: fullSearchBoxOptions.value,
|
|
20307
20393
|
"is-search-container": true,
|
|
20308
20394
|
ref_key: "searchBox",
|
|
@@ -27314,7 +27400,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
27314
27400
|
};
|
|
27315
27401
|
__expose({ fetch: fetch2 });
|
|
27316
27402
|
return (_ctx, _cache) => {
|
|
27317
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
27403
|
+
return openBlock(), createBlock(unref(_sfc_main$U), {
|
|
27318
27404
|
options: fullSearchBoxOptions.value,
|
|
27319
27405
|
ref_key: "searchBox",
|
|
27320
27406
|
ref: searchBox2
|