@getlupa/client 1.6.4 → 1.6.6
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 +111 -68
- package/dist/lupaSearch.js +111 -68
- package/dist/lupaSearch.mjs +111 -68
- package/dist/lupaSearch.umd.js +111 -68
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -6271,11 +6271,15 @@ const suggest = (queryKey, query, environment, customBaseUrl) => __awaiter(void
|
|
|
6271
6271
|
return { success: false, errors };
|
|
6272
6272
|
});
|
|
6273
6273
|
const track$1 = (queryKey, event, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
6274
|
-
|
|
6275
|
-
|
|
6274
|
+
try {
|
|
6275
|
+
const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
|
|
6276
|
+
if (res.status < 400) {
|
|
6277
|
+
return { success: false };
|
|
6278
|
+
}
|
|
6279
|
+
return res.json();
|
|
6280
|
+
} catch (e) {
|
|
6276
6281
|
return { success: false };
|
|
6277
6282
|
}
|
|
6278
|
-
return res.json();
|
|
6279
6283
|
});
|
|
6280
6284
|
const loadRedirectionRules = (queryKey, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
6281
6285
|
const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}redirections/${queryKey}`, Object.assign(Object.assign({}, defaultConfig$1), { method: "GET" }));
|
|
@@ -7635,6 +7639,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7635
7639
|
const suggestionResults = ref({});
|
|
7636
7640
|
const highlightedIndex = ref(-1);
|
|
7637
7641
|
const inputValue = ref("");
|
|
7642
|
+
const resultInputValue = ref("");
|
|
7638
7643
|
const historyStore = useHistoryStore();
|
|
7639
7644
|
const resultsVisible = computed(() => {
|
|
7640
7645
|
var _a;
|
|
@@ -7647,13 +7652,15 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7647
7652
|
return {
|
|
7648
7653
|
queryKey: p2.queryKey,
|
|
7649
7654
|
count: (_b = (_a = suggestionResults.value[p2.queryKey]) == null ? void 0 : _a.length) != null ? _b : 0,
|
|
7650
|
-
panel: p2
|
|
7655
|
+
panel: p2,
|
|
7656
|
+
input: resultInputValue.value
|
|
7651
7657
|
};
|
|
7652
7658
|
}
|
|
7653
7659
|
return {
|
|
7654
7660
|
queryKey: p2.queryKey,
|
|
7655
7661
|
count: (_e = (_d = (_c = docResults.value[p2.queryKey]) == null ? void 0 : _c.items) == null ? void 0 : _d.length) != null ? _e : 0,
|
|
7656
|
-
panel: p2
|
|
7662
|
+
panel: p2,
|
|
7663
|
+
input: resultInputValue.value
|
|
7657
7664
|
};
|
|
7658
7665
|
})
|
|
7659
7666
|
);
|
|
@@ -7713,6 +7720,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7713
7720
|
[queryKey]: flattenSuggestions(result.items, (_a = publicQuery.searchText) != null ? _a : "")
|
|
7714
7721
|
});
|
|
7715
7722
|
inputValue.value = publicQuery.searchText;
|
|
7723
|
+
resultInputValue.value = publicQuery.searchText;
|
|
7716
7724
|
emitSearchResultsCallback();
|
|
7717
7725
|
return {
|
|
7718
7726
|
suggestions: result.items
|
|
@@ -7800,8 +7808,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7800
7808
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
7801
7809
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7802
7810
|
const _hoisted_3$B = { id: "lupa-search-box-input" };
|
|
7803
|
-
const _hoisted_4$
|
|
7804
|
-
const _hoisted_5$
|
|
7811
|
+
const _hoisted_4$s = ["value"];
|
|
7812
|
+
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
7805
7813
|
const _hoisted_6$9 = {
|
|
7806
7814
|
key: 0,
|
|
7807
7815
|
class: "lupa-close-label"
|
|
@@ -7850,6 +7858,10 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
7850
7858
|
var _a;
|
|
7851
7859
|
return __spreadValues2({}, (_a = props.options.inputAttributes) != null ? _a : {});
|
|
7852
7860
|
});
|
|
7861
|
+
const ariaLabel = computed(() => {
|
|
7862
|
+
var _a;
|
|
7863
|
+
return (_a = labels.value.searchInputAriaLabel) != null ? _a : "Search input";
|
|
7864
|
+
});
|
|
7853
7865
|
watch(suggestedValue, () => {
|
|
7854
7866
|
if (suggestedValue.value.override) {
|
|
7855
7867
|
input.value = suggestedValue.value.item.suggestion;
|
|
@@ -7893,22 +7905,24 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
7893
7905
|
createBaseVNode("div", _hoisted_3$B, [
|
|
7894
7906
|
createBaseVNode("input", {
|
|
7895
7907
|
class: "lupa-hint",
|
|
7908
|
+
"aria-hidden": "true",
|
|
7896
7909
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
7897
7910
|
disabled: ""
|
|
7898
|
-
}, null, 8, _hoisted_4$
|
|
7911
|
+
}, null, 8, _hoisted_4$s),
|
|
7899
7912
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
7900
7913
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
7901
7914
|
}, inputAttributes.value, {
|
|
7902
7915
|
ref_key: "mainInput",
|
|
7903
7916
|
ref: mainInput,
|
|
7904
7917
|
autocomplete: "off",
|
|
7918
|
+
"aria-label": ariaLabel.value,
|
|
7905
7919
|
class: "lupa-search-box-input-field",
|
|
7906
7920
|
"data-cy": "lupa-search-box-input-field",
|
|
7907
7921
|
type: "text",
|
|
7908
7922
|
placeholder: labels.value.placeholder,
|
|
7909
7923
|
onInput: handleInput,
|
|
7910
7924
|
onFocus: handleFocus
|
|
7911
|
-
}), null, 16, _hoisted_5$
|
|
7925
|
+
}), null, 16, _hoisted_5$g), [
|
|
7912
7926
|
[vModelText, inputValue.value]
|
|
7913
7927
|
])
|
|
7914
7928
|
]),
|
|
@@ -8074,11 +8088,11 @@ const _hoisted_3$A = {
|
|
|
8074
8088
|
class: "lupa-suggestion-facet",
|
|
8075
8089
|
"data-cy": "lupa-suggestion-facet"
|
|
8076
8090
|
};
|
|
8077
|
-
const _hoisted_4$
|
|
8091
|
+
const _hoisted_4$r = {
|
|
8078
8092
|
class: "lupa-suggestion-facet-label",
|
|
8079
8093
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8080
8094
|
};
|
|
8081
|
-
const _hoisted_5$
|
|
8095
|
+
const _hoisted_5$f = {
|
|
8082
8096
|
class: "lupa-suggestion-facet-value",
|
|
8083
8097
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8084
8098
|
};
|
|
@@ -8120,8 +8134,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8120
8134
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8121
8135
|
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8122
8136
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
8123
|
-
createBaseVNode("span", _hoisted_4$
|
|
8124
|
-
createBaseVNode("span", _hoisted_5$
|
|
8137
|
+
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8138
|
+
createBaseVNode("span", _hoisted_5$f, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8125
8139
|
])) : createCommentVNode("", true)
|
|
8126
8140
|
]);
|
|
8127
8141
|
};
|
|
@@ -8528,8 +8542,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
8528
8542
|
const _hoisted_1$11 = ["innerHTML"];
|
|
8529
8543
|
const _hoisted_2$K = { key: 0 };
|
|
8530
8544
|
const _hoisted_3$z = { key: 1 };
|
|
8531
|
-
const _hoisted_4$
|
|
8532
|
-
const _hoisted_5$
|
|
8545
|
+
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
8546
|
+
const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
|
|
8533
8547
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
8534
8548
|
__name: "SearchBoxProductCustom",
|
|
8535
8549
|
props: {
|
|
@@ -8561,8 +8575,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
8561
8575
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8562
8576
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
8563
8577
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8564
|
-
createBaseVNode("div", _hoisted_4$
|
|
8565
|
-
createBaseVNode("div", _hoisted_5$
|
|
8578
|
+
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
8579
|
+
createBaseVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
|
|
8566
8580
|
]))
|
|
8567
8581
|
], 16));
|
|
8568
8582
|
};
|
|
@@ -8902,7 +8916,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8902
8916
|
const _hoisted_1$_ = ["href"];
|
|
8903
8917
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
8904
8918
|
const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
|
|
8905
|
-
const _hoisted_4$
|
|
8919
|
+
const _hoisted_4$p = {
|
|
8906
8920
|
key: 0,
|
|
8907
8921
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
8908
8922
|
};
|
|
@@ -8981,7 +8995,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8981
8995
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
8982
8996
|
}), 128))
|
|
8983
8997
|
]),
|
|
8984
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
8998
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
|
|
8985
8999
|
createVNode(_sfc_main$13, {
|
|
8986
9000
|
class: "lupa-search-box-product-element",
|
|
8987
9001
|
item: _ctx.item,
|
|
@@ -9105,7 +9119,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9105
9119
|
}
|
|
9106
9120
|
}
|
|
9107
9121
|
});
|
|
9108
|
-
if (!link) {
|
|
9122
|
+
if (!link || eventType === "addToCart") {
|
|
9109
9123
|
return;
|
|
9110
9124
|
}
|
|
9111
9125
|
emit2("product-click");
|
|
@@ -9214,6 +9228,10 @@ const _hoisted_1$Y = {
|
|
|
9214
9228
|
};
|
|
9215
9229
|
const _hoisted_2$H = ["data-cy"];
|
|
9216
9230
|
const _hoisted_3$w = {
|
|
9231
|
+
key: 0,
|
|
9232
|
+
class: "lupa-panel-title"
|
|
9233
|
+
};
|
|
9234
|
+
const _hoisted_4$o = {
|
|
9217
9235
|
key: 1,
|
|
9218
9236
|
id: "lupa-search-box-panel"
|
|
9219
9237
|
};
|
|
@@ -9251,16 +9269,14 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9251
9269
|
const sdkOptions = computed(() => props.options.options);
|
|
9252
9270
|
const searchBoxStore = useSearchBoxStore();
|
|
9253
9271
|
const { suggestionResults, hasAnyResults, panelItemCounts } = storeToRefs(searchBoxStore);
|
|
9254
|
-
const displayResults = computed(
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
}
|
|
9259
|
-
);
|
|
9272
|
+
const displayResults = computed(() => {
|
|
9273
|
+
var _a;
|
|
9274
|
+
return ((_a = props.inputValue) == null ? void 0 : _a.length) >= props.options.minInputLength;
|
|
9275
|
+
});
|
|
9260
9276
|
const displayHistory = computed(
|
|
9261
9277
|
() => {
|
|
9262
9278
|
var _a;
|
|
9263
|
-
return Boolean(props.options.history) && ((_a = props.inputValue) == null ? void 0 : _a.length) < 1;
|
|
9279
|
+
return Boolean(props.options.history) && ((_a = props.inputValue) == null ? void 0 : _a.length) < 1 && props.options.minInputLength > 0;
|
|
9264
9280
|
}
|
|
9265
9281
|
);
|
|
9266
9282
|
const displayPanels = computed(
|
|
@@ -9337,6 +9353,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9337
9353
|
const expandOnSinglePanel = computed(() => {
|
|
9338
9354
|
return numberOfVisiblePanels.value === 1 && props.options.expandOnSinglePanel;
|
|
9339
9355
|
});
|
|
9356
|
+
const showTopResultsPanelTitle = (queryKey) => {
|
|
9357
|
+
const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
|
|
9358
|
+
return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
|
|
9359
|
+
};
|
|
9340
9360
|
return (_ctx, _cache) => {
|
|
9341
9361
|
var _a;
|
|
9342
9362
|
return openBlock(), createElementBlock("div", {
|
|
@@ -9350,6 +9370,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9350
9370
|
"data-cy": "lupa-main-panel"
|
|
9351
9371
|
}, [
|
|
9352
9372
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayPanels.value, (panel, index) => {
|
|
9373
|
+
var _a2, _b;
|
|
9353
9374
|
return openBlock(), createElementBlock("div", {
|
|
9354
9375
|
key: index,
|
|
9355
9376
|
class: normalizeClass([
|
|
@@ -9358,8 +9379,9 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9358
9379
|
]),
|
|
9359
9380
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9360
9381
|
}, [
|
|
9382
|
+
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
9361
9383
|
panel.queryKey ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9362
|
-
key:
|
|
9384
|
+
key: 1,
|
|
9363
9385
|
panel,
|
|
9364
9386
|
options: sdkOptions.value,
|
|
9365
9387
|
debounce: _ctx.options.debounce,
|
|
@@ -9390,7 +9412,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9390
9412
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
9391
9413
|
onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
|
|
9392
9414
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
9393
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div",
|
|
9415
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
9394
9416
|
createVNode(_sfc_main$1h, {
|
|
9395
9417
|
options: _ctx.options.history,
|
|
9396
9418
|
history: history.value,
|
|
@@ -9768,7 +9790,7 @@ const _hoisted_3$v = {
|
|
|
9768
9790
|
key: 1,
|
|
9769
9791
|
"data-cy": "did-you-mean-label"
|
|
9770
9792
|
};
|
|
9771
|
-
const _hoisted_4$
|
|
9793
|
+
const _hoisted_4$n = { key: 1 };
|
|
9772
9794
|
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
9773
9795
|
__name: "SearchResultsDidYouMean",
|
|
9774
9796
|
props: {
|
|
@@ -9819,7 +9841,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9819
9841
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
9820
9842
|
"data-cy": "did-you-mean-value",
|
|
9821
9843
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
9822
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
9844
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
9823
9845
|
]);
|
|
9824
9846
|
}), 128))
|
|
9825
9847
|
])) : createCommentVNode("", true)
|
|
@@ -9869,7 +9891,7 @@ const _hoisted_3$u = {
|
|
|
9869
9891
|
key: 1,
|
|
9870
9892
|
class: "lupa-results-total-count"
|
|
9871
9893
|
};
|
|
9872
|
-
const _hoisted_4$
|
|
9894
|
+
const _hoisted_4$m = ["innerHTML"];
|
|
9873
9895
|
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9874
9896
|
__name: "SearchResultsTitle",
|
|
9875
9897
|
props: {
|
|
@@ -9918,7 +9940,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
9918
9940
|
key: 2,
|
|
9919
9941
|
class: "lupa-result-page-description-top",
|
|
9920
9942
|
innerHTML: descriptionTop.value
|
|
9921
|
-
}, null, 8, _hoisted_4$
|
|
9943
|
+
}, null, 8, _hoisted_4$m)) : createCommentVNode("", true)
|
|
9922
9944
|
]);
|
|
9923
9945
|
};
|
|
9924
9946
|
}
|
|
@@ -9964,7 +9986,7 @@ const _hoisted_3$s = {
|
|
|
9964
9986
|
key: 0,
|
|
9965
9987
|
class: "filter-values"
|
|
9966
9988
|
};
|
|
9967
|
-
const _hoisted_4$
|
|
9989
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
9968
9990
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
9969
9991
|
__name: "CurrentFilters",
|
|
9970
9992
|
props: {
|
|
@@ -10030,7 +10052,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10030
10052
|
}, null, 2)) : createCommentVNode("", true)
|
|
10031
10053
|
]),
|
|
10032
10054
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
|
|
10033
|
-
createBaseVNode("div", _hoisted_4$
|
|
10055
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
10034
10056
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10035
10057
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
10036
10058
|
key: filter.key + "_" + filter.value,
|
|
@@ -10098,8 +10120,8 @@ const _hoisted_1$Q = {
|
|
|
10098
10120
|
};
|
|
10099
10121
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
10100
10122
|
const _hoisted_3$r = ["href"];
|
|
10101
|
-
const _hoisted_4$
|
|
10102
|
-
const _hoisted_5$
|
|
10123
|
+
const _hoisted_4$k = ["href"];
|
|
10124
|
+
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10103
10125
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
10104
10126
|
__name: "CategoryFilter",
|
|
10105
10127
|
props: {
|
|
@@ -10203,9 +10225,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10203
10225
|
href: parentUrlLink.value,
|
|
10204
10226
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
10205
10227
|
onClick: handleNavigationParent
|
|
10206
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
10228
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
10207
10229
|
], 2),
|
|
10208
|
-
createBaseVNode("div", _hoisted_5$
|
|
10230
|
+
createBaseVNode("div", _hoisted_5$d, [
|
|
10209
10231
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
10210
10232
|
return openBlock(), createBlock(_sfc_main$U, {
|
|
10211
10233
|
key: getCategoryKey(child),
|
|
@@ -10224,8 +10246,8 @@ const _hoisted_1$P = {
|
|
|
10224
10246
|
};
|
|
10225
10247
|
const _hoisted_2$z = ["placeholder"];
|
|
10226
10248
|
const _hoisted_3$q = { class: "lupa-terms-list" };
|
|
10227
|
-
const _hoisted_4$
|
|
10228
|
-
const _hoisted_5$
|
|
10249
|
+
const _hoisted_4$j = ["onClick"];
|
|
10250
|
+
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
10229
10251
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
10230
10252
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
10231
10253
|
const _hoisted_8$1 = {
|
|
@@ -10321,7 +10343,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10321
10343
|
key: item.title,
|
|
10322
10344
|
onClick: ($event) => handleFacetClick(item)
|
|
10323
10345
|
}, [
|
|
10324
|
-
createBaseVNode("div", _hoisted_5$
|
|
10346
|
+
createBaseVNode("div", _hoisted_5$c, [
|
|
10325
10347
|
createBaseVNode("span", {
|
|
10326
10348
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
10327
10349
|
}, null, 2)
|
|
@@ -10330,7 +10352,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10330
10352
|
createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
10331
10353
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
10332
10354
|
])
|
|
10333
|
-
], 10, _hoisted_4$
|
|
10355
|
+
], 10, _hoisted_4$j);
|
|
10334
10356
|
}), 128))
|
|
10335
10357
|
]),
|
|
10336
10358
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -11330,12 +11352,12 @@ const _hoisted_3$p = {
|
|
|
11330
11352
|
key: 1,
|
|
11331
11353
|
class: "lupa-stats-facet-summary-input"
|
|
11332
11354
|
};
|
|
11333
|
-
const _hoisted_4$
|
|
11355
|
+
const _hoisted_4$i = {
|
|
11334
11356
|
key: 0,
|
|
11335
11357
|
class: "lupa-stats-range-label"
|
|
11336
11358
|
};
|
|
11337
|
-
const _hoisted_5$
|
|
11338
|
-
const _hoisted_6$7 = ["max", "min", "pattern"];
|
|
11359
|
+
const _hoisted_5$b = { class: "lupa-stats-from" };
|
|
11360
|
+
const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
|
|
11339
11361
|
const _hoisted_7$5 = { key: 0 };
|
|
11340
11362
|
const _hoisted_8 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
|
|
11341
11363
|
const _hoisted_9 = {
|
|
@@ -11343,7 +11365,7 @@ const _hoisted_9 = {
|
|
|
11343
11365
|
class: "lupa-stats-range-label"
|
|
11344
11366
|
};
|
|
11345
11367
|
const _hoisted_10 = { class: "lupa-stats-to" };
|
|
11346
|
-
const _hoisted_11 = ["max", "min", "pattern"];
|
|
11368
|
+
const _hoisted_11 = ["max", "min", "pattern", "aria-label"];
|
|
11347
11369
|
const _hoisted_12 = { key: 0 };
|
|
11348
11370
|
const _hoisted_13 = {
|
|
11349
11371
|
key: 2,
|
|
@@ -11471,6 +11493,20 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11471
11493
|
const sliderInputFormat = computed(() => {
|
|
11472
11494
|
return isPrice.value ? `[0-9]+([${separator.value}][0-9]{1,2})?` : void 0;
|
|
11473
11495
|
});
|
|
11496
|
+
const sliderAria = computed(() => {
|
|
11497
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11498
|
+
return {
|
|
11499
|
+
"aria-label": ((_b = (_a = props.options.stats) == null ? void 0 : _a.labels) == null ? void 0 : _b.sliderDotAriaLabel) ? `${(_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.sliderDotAriaLabel} - ${(_e = props.facet) == null ? void 0 : _e.label}` : `Range slider control dot for ${(_f = props.facet) == null ? void 0 : _f.label}`
|
|
11500
|
+
};
|
|
11501
|
+
});
|
|
11502
|
+
const ariaLabelFrom = computed(() => {
|
|
11503
|
+
var _a, _b, _c, _d, _e;
|
|
11504
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaFrom) != null ? _e : rangeLabelFrom.value}`;
|
|
11505
|
+
});
|
|
11506
|
+
const ariaLabelTo = computed(() => {
|
|
11507
|
+
var _a, _b, _c, _d, _e;
|
|
11508
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaTo) != null ? _e : rangeLabelTo.value}`;
|
|
11509
|
+
});
|
|
11474
11510
|
watch(currentMinValue, () => {
|
|
11475
11511
|
innerSliderRange.value = [];
|
|
11476
11512
|
});
|
|
@@ -11500,15 +11536,16 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11500
11536
|
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
11501
11537
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
11502
11538
|
createBaseVNode("div", null, [
|
|
11503
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
11504
|
-
createBaseVNode("div", _hoisted_5$
|
|
11539
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
11540
|
+
createBaseVNode("div", _hoisted_5$b, [
|
|
11505
11541
|
withDirectives(createBaseVNode("input", {
|
|
11506
11542
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
11507
11543
|
type: "text",
|
|
11508
11544
|
maxlength: "8",
|
|
11509
11545
|
max: facetMax.value,
|
|
11510
11546
|
min: facetMin.value,
|
|
11511
|
-
pattern: sliderInputFormat.value
|
|
11547
|
+
pattern: sliderInputFormat.value,
|
|
11548
|
+
"aria-label": ariaLabelFrom.value
|
|
11512
11549
|
}, null, 8, _hoisted_6$7), [
|
|
11513
11550
|
[
|
|
11514
11551
|
vModelText,
|
|
@@ -11530,7 +11567,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11530
11567
|
maxlength: "8",
|
|
11531
11568
|
max: facetMax.value,
|
|
11532
11569
|
min: facetMin.value,
|
|
11533
|
-
pattern: sliderInputFormat.value
|
|
11570
|
+
pattern: sliderInputFormat.value,
|
|
11571
|
+
"aria-label": ariaLabelTo.value
|
|
11534
11572
|
}, null, 8, _hoisted_11), [
|
|
11535
11573
|
[
|
|
11536
11574
|
vModelText,
|
|
@@ -11551,11 +11589,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11551
11589
|
max: facetMax.value,
|
|
11552
11590
|
lazy: true,
|
|
11553
11591
|
step: interval.value,
|
|
11592
|
+
aria: sliderAria.value,
|
|
11554
11593
|
modelValue: sliderRange.value,
|
|
11555
11594
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sliderRange.value = $event),
|
|
11556
11595
|
onSlide: handleDragging,
|
|
11557
11596
|
onEnd: handleChange
|
|
11558
|
-
}, null, 8, ["min", "max", "step", "modelValue"])
|
|
11597
|
+
}, null, 8, ["min", "max", "step", "aria", "modelValue"])
|
|
11559
11598
|
])) : createCommentVNode("", true)
|
|
11560
11599
|
]);
|
|
11561
11600
|
};
|
|
@@ -11564,11 +11603,11 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11564
11603
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
11565
11604
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
11566
11605
|
const _hoisted_3$o = { class: "lupa-term-label" };
|
|
11567
|
-
const _hoisted_4$
|
|
11606
|
+
const _hoisted_4$h = {
|
|
11568
11607
|
key: 0,
|
|
11569
11608
|
class: "lupa-term-count"
|
|
11570
11609
|
};
|
|
11571
|
-
const _hoisted_5$
|
|
11610
|
+
const _hoisted_5$a = {
|
|
11572
11611
|
key: 0,
|
|
11573
11612
|
class: "lupa-facet-level"
|
|
11574
11613
|
};
|
|
@@ -11625,10 +11664,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11625
11664
|
]),
|
|
11626
11665
|
createBaseVNode("div", _hoisted_2$x, [
|
|
11627
11666
|
createBaseVNode("span", _hoisted_3$o, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
11628
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
11667
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
11629
11668
|
])
|
|
11630
11669
|
]),
|
|
11631
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
11670
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
|
|
11632
11671
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
11633
11672
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
11634
11673
|
key: itemChild.title,
|
|
@@ -12061,8 +12100,8 @@ const _hoisted_1$H = {
|
|
|
12061
12100
|
};
|
|
12062
12101
|
const _hoisted_2$t = ["onClick"];
|
|
12063
12102
|
const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
|
|
12064
|
-
const _hoisted_4$
|
|
12065
|
-
const _hoisted_5$
|
|
12103
|
+
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
12104
|
+
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
12066
12105
|
const _hoisted_6$6 = {
|
|
12067
12106
|
key: 0,
|
|
12068
12107
|
class: "lupa-sidebar-filter-count"
|
|
@@ -12100,8 +12139,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12100
12139
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
12101
12140
|
}, null, 8, _hoisted_2$t),
|
|
12102
12141
|
createBaseVNode("div", _hoisted_3$m, [
|
|
12103
|
-
createBaseVNode("div", _hoisted_4$
|
|
12104
|
-
createBaseVNode("div", _hoisted_5$
|
|
12142
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
12143
|
+
createBaseVNode("div", _hoisted_5$9, [
|
|
12105
12144
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
12106
12145
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
12107
12146
|
]),
|
|
@@ -12127,7 +12166,7 @@ const _hoisted_3$l = {
|
|
|
12127
12166
|
key: 1,
|
|
12128
12167
|
class: "lupa-search-results-breadcrumb-text"
|
|
12129
12168
|
};
|
|
12130
|
-
const _hoisted_4$
|
|
12169
|
+
const _hoisted_4$f = { key: 2 };
|
|
12131
12170
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
12132
12171
|
__name: "SearchResultsBreadcrumbs",
|
|
12133
12172
|
props: {
|
|
@@ -12168,7 +12207,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12168
12207
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
12169
12208
|
}
|
|
12170
12209
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
12171
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
12210
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
|
|
12172
12211
|
]);
|
|
12173
12212
|
}), 128))
|
|
12174
12213
|
]);
|
|
@@ -12269,7 +12308,7 @@ const _hoisted_2$r = {
|
|
|
12269
12308
|
class: "lupa-page-number-separator"
|
|
12270
12309
|
};
|
|
12271
12310
|
const _hoisted_3$k = ["onClick"];
|
|
12272
|
-
const _hoisted_4$
|
|
12311
|
+
const _hoisted_4$e = {
|
|
12273
12312
|
key: 0,
|
|
12274
12313
|
class: "lupa-page-number-separator"
|
|
12275
12314
|
};
|
|
@@ -12360,7 +12399,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12360
12399
|
}, toDisplayString(page), 11, _hoisted_3$k);
|
|
12361
12400
|
}), 128)),
|
|
12362
12401
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
12363
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12402
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
|
|
12364
12403
|
createBaseVNode("div", {
|
|
12365
12404
|
class: "lupa-page-number lupa-page-number-last",
|
|
12366
12405
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -12385,6 +12424,7 @@ const _hoisted_1$B = {
|
|
|
12385
12424
|
};
|
|
12386
12425
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
12387
12426
|
const _hoisted_3$j = { class: "lupa-select-label" };
|
|
12427
|
+
const _hoisted_4$d = ["aria-label"];
|
|
12388
12428
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
12389
12429
|
__name: "SearchResultsPageSize",
|
|
12390
12430
|
props: {
|
|
@@ -12407,6 +12447,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12407
12447
|
createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.label), 1),
|
|
12408
12448
|
createBaseVNode("select", {
|
|
12409
12449
|
class: "lupa-select-dropdown",
|
|
12450
|
+
"aria-label": _ctx.label,
|
|
12410
12451
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
12411
12452
|
onChange: handleSelect,
|
|
12412
12453
|
ref_key: "select",
|
|
@@ -12415,7 +12456,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12415
12456
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
12416
12457
|
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
12417
12458
|
}), 128))
|
|
12418
|
-
],
|
|
12459
|
+
], 40, _hoisted_4$d)
|
|
12419
12460
|
])
|
|
12420
12461
|
]);
|
|
12421
12462
|
};
|
|
@@ -12427,7 +12468,8 @@ const _hoisted_1$A = {
|
|
|
12427
12468
|
};
|
|
12428
12469
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
12429
12470
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
12430
|
-
const _hoisted_4$c = ["
|
|
12471
|
+
const _hoisted_4$c = ["aria-label"];
|
|
12472
|
+
const _hoisted_5$8 = ["value"];
|
|
12431
12473
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
12432
12474
|
__name: "SearchResultsSort",
|
|
12433
12475
|
props: {
|
|
@@ -12481,6 +12523,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12481
12523
|
createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.options.label), 1),
|
|
12482
12524
|
withDirectives(createBaseVNode("select", {
|
|
12483
12525
|
class: "lupa-select-dropdown",
|
|
12526
|
+
"aria-label": _ctx.options.label,
|
|
12484
12527
|
"data-cy": "lupa-sort-select-dropdown",
|
|
12485
12528
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
12486
12529
|
onChange: handleSelect,
|
|
@@ -12490,9 +12533,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12490
12533
|
return openBlock(), createElementBlock("option", {
|
|
12491
12534
|
key: option.key,
|
|
12492
12535
|
value: option.key
|
|
12493
|
-
}, toDisplayString(option.label), 9,
|
|
12536
|
+
}, toDisplayString(option.label), 9, _hoisted_5$8);
|
|
12494
12537
|
}), 128))
|
|
12495
|
-
],
|
|
12538
|
+
], 40, _hoisted_4$c), [
|
|
12496
12539
|
[vModelSelect, selectedKey.value]
|
|
12497
12540
|
])
|
|
12498
12541
|
])
|