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