@getlupa/client 1.6.5 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +110 -70
- package/dist/lupaSearch.js +110 -70
- package/dist/lupaSearch.mjs +110 -70
- package/dist/lupaSearch.umd.js +110 -70
- 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" }));
|
|
@@ -7804,8 +7808,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7804
7808
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
7805
7809
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7806
7810
|
const _hoisted_3$B = { id: "lupa-search-box-input" };
|
|
7807
|
-
const _hoisted_4$
|
|
7808
|
-
const _hoisted_5$
|
|
7811
|
+
const _hoisted_4$s = ["value"];
|
|
7812
|
+
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
7809
7813
|
const _hoisted_6$9 = {
|
|
7810
7814
|
key: 0,
|
|
7811
7815
|
class: "lupa-close-label"
|
|
@@ -7854,6 +7858,10 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
7854
7858
|
var _a;
|
|
7855
7859
|
return __spreadValues2({}, (_a = props.options.inputAttributes) != null ? _a : {});
|
|
7856
7860
|
});
|
|
7861
|
+
const ariaLabel = computed(() => {
|
|
7862
|
+
var _a;
|
|
7863
|
+
return (_a = labels.value.searchInputAriaLabel) != null ? _a : "Search input";
|
|
7864
|
+
});
|
|
7857
7865
|
watch(suggestedValue, () => {
|
|
7858
7866
|
if (suggestedValue.value.override) {
|
|
7859
7867
|
input.value = suggestedValue.value.item.suggestion;
|
|
@@ -7897,22 +7905,24 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
7897
7905
|
createBaseVNode("div", _hoisted_3$B, [
|
|
7898
7906
|
createBaseVNode("input", {
|
|
7899
7907
|
class: "lupa-hint",
|
|
7908
|
+
"aria-hidden": "true",
|
|
7900
7909
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
7901
7910
|
disabled: ""
|
|
7902
|
-
}, null, 8, _hoisted_4$
|
|
7911
|
+
}, null, 8, _hoisted_4$s),
|
|
7903
7912
|
withDirectives(createBaseVNode("input", mergeProps({
|
|
7904
7913
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
7905
7914
|
}, inputAttributes.value, {
|
|
7906
7915
|
ref_key: "mainInput",
|
|
7907
7916
|
ref: mainInput,
|
|
7908
7917
|
autocomplete: "off",
|
|
7918
|
+
"aria-label": ariaLabel.value,
|
|
7909
7919
|
class: "lupa-search-box-input-field",
|
|
7910
7920
|
"data-cy": "lupa-search-box-input-field",
|
|
7911
7921
|
type: "text",
|
|
7912
7922
|
placeholder: labels.value.placeholder,
|
|
7913
7923
|
onInput: handleInput,
|
|
7914
7924
|
onFocus: handleFocus
|
|
7915
|
-
}), null, 16, _hoisted_5$
|
|
7925
|
+
}), null, 16, _hoisted_5$g), [
|
|
7916
7926
|
[vModelText, inputValue.value]
|
|
7917
7927
|
])
|
|
7918
7928
|
]),
|
|
@@ -8078,11 +8088,11 @@ const _hoisted_3$A = {
|
|
|
8078
8088
|
class: "lupa-suggestion-facet",
|
|
8079
8089
|
"data-cy": "lupa-suggestion-facet"
|
|
8080
8090
|
};
|
|
8081
|
-
const _hoisted_4$
|
|
8091
|
+
const _hoisted_4$r = {
|
|
8082
8092
|
class: "lupa-suggestion-facet-label",
|
|
8083
8093
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8084
8094
|
};
|
|
8085
|
-
const _hoisted_5$
|
|
8095
|
+
const _hoisted_5$f = {
|
|
8086
8096
|
class: "lupa-suggestion-facet-value",
|
|
8087
8097
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8088
8098
|
};
|
|
@@ -8124,8 +8134,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8124
8134
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8125
8135
|
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8126
8136
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
8127
|
-
createBaseVNode("span", _hoisted_4$
|
|
8128
|
-
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)
|
|
8129
8139
|
])) : createCommentVNode("", true)
|
|
8130
8140
|
]);
|
|
8131
8141
|
};
|
|
@@ -8532,8 +8542,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
8532
8542
|
const _hoisted_1$11 = ["innerHTML"];
|
|
8533
8543
|
const _hoisted_2$K = { key: 0 };
|
|
8534
8544
|
const _hoisted_3$z = { key: 1 };
|
|
8535
|
-
const _hoisted_4$
|
|
8536
|
-
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" };
|
|
8537
8547
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
8538
8548
|
__name: "SearchBoxProductCustom",
|
|
8539
8549
|
props: {
|
|
@@ -8565,8 +8575,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
8565
8575
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8566
8576
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
8567
8577
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8568
|
-
createBaseVNode("div", _hoisted_4$
|
|
8569
|
-
createBaseVNode("div", _hoisted_5$
|
|
8578
|
+
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
8579
|
+
createBaseVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
|
|
8570
8580
|
]))
|
|
8571
8581
|
], 16));
|
|
8572
8582
|
};
|
|
@@ -8906,7 +8916,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8906
8916
|
const _hoisted_1$_ = ["href"];
|
|
8907
8917
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
8908
8918
|
const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
|
|
8909
|
-
const _hoisted_4$
|
|
8919
|
+
const _hoisted_4$p = {
|
|
8910
8920
|
key: 0,
|
|
8911
8921
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
8912
8922
|
};
|
|
@@ -8941,6 +8951,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8941
8951
|
var _a;
|
|
8942
8952
|
return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
|
|
8943
8953
|
});
|
|
8954
|
+
const customDocumentHtmlAttributes = computed(() => {
|
|
8955
|
+
var _a, _b, _c;
|
|
8956
|
+
return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
|
|
8957
|
+
});
|
|
8944
8958
|
const handleClick = (event) => {
|
|
8945
8959
|
emit2("product-click", {
|
|
8946
8960
|
item: props.item,
|
|
@@ -8955,12 +8969,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8955
8969
|
isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
|
|
8956
8970
|
});
|
|
8957
8971
|
return (_ctx, _cache) => {
|
|
8958
|
-
return openBlock(), createElementBlock("a", {
|
|
8959
|
-
class:
|
|
8972
|
+
return openBlock(), createElementBlock("a", mergeProps({
|
|
8973
|
+
class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
|
|
8974
|
+
href: link.value
|
|
8975
|
+
}, customDocumentHtmlAttributes.value, {
|
|
8960
8976
|
"data-cy": "lupa-search-box-product",
|
|
8961
|
-
href: link.value,
|
|
8962
8977
|
onClick: handleClick
|
|
8963
|
-
}, [
|
|
8978
|
+
}), [
|
|
8964
8979
|
createBaseVNode("div", _hoisted_2$I, [
|
|
8965
8980
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
8966
8981
|
return openBlock(), createBlock(_sfc_main$13, {
|
|
@@ -8985,7 +9000,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8985
9000
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
8986
9001
|
}), 128))
|
|
8987
9002
|
]),
|
|
8988
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
9003
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
|
|
8989
9004
|
createVNode(_sfc_main$13, {
|
|
8990
9005
|
class: "lupa-search-box-product-element",
|
|
8991
9006
|
item: _ctx.item,
|
|
@@ -8995,7 +9010,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8995
9010
|
isInStock: isInStock.value
|
|
8996
9011
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
8997
9012
|
])) : createCommentVNode("", true)
|
|
8998
|
-
],
|
|
9013
|
+
], 16, _hoisted_1$_);
|
|
8999
9014
|
};
|
|
9000
9015
|
}
|
|
9001
9016
|
});
|
|
@@ -9109,7 +9124,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9109
9124
|
}
|
|
9110
9125
|
}
|
|
9111
9126
|
});
|
|
9112
|
-
if (!link) {
|
|
9127
|
+
if (!link || eventType === "addToCart") {
|
|
9113
9128
|
return;
|
|
9114
9129
|
}
|
|
9115
9130
|
emit2("product-click");
|
|
@@ -9221,7 +9236,7 @@ const _hoisted_3$w = {
|
|
|
9221
9236
|
key: 0,
|
|
9222
9237
|
class: "lupa-panel-title"
|
|
9223
9238
|
};
|
|
9224
|
-
const _hoisted_4$
|
|
9239
|
+
const _hoisted_4$o = {
|
|
9225
9240
|
key: 1,
|
|
9226
9241
|
id: "lupa-search-box-panel"
|
|
9227
9242
|
};
|
|
@@ -9402,7 +9417,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9402
9417
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
9403
9418
|
onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
|
|
9404
9419
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
9405
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
9420
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
9406
9421
|
createVNode(_sfc_main$1h, {
|
|
9407
9422
|
options: _ctx.options.history,
|
|
9408
9423
|
history: history.value,
|
|
@@ -9780,7 +9795,7 @@ const _hoisted_3$v = {
|
|
|
9780
9795
|
key: 1,
|
|
9781
9796
|
"data-cy": "did-you-mean-label"
|
|
9782
9797
|
};
|
|
9783
|
-
const _hoisted_4$
|
|
9798
|
+
const _hoisted_4$n = { key: 1 };
|
|
9784
9799
|
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
9785
9800
|
__name: "SearchResultsDidYouMean",
|
|
9786
9801
|
props: {
|
|
@@ -9831,7 +9846,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9831
9846
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
9832
9847
|
"data-cy": "did-you-mean-value",
|
|
9833
9848
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
9834
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
9849
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
9835
9850
|
]);
|
|
9836
9851
|
}), 128))
|
|
9837
9852
|
])) : createCommentVNode("", true)
|
|
@@ -9881,7 +9896,7 @@ const _hoisted_3$u = {
|
|
|
9881
9896
|
key: 1,
|
|
9882
9897
|
class: "lupa-results-total-count"
|
|
9883
9898
|
};
|
|
9884
|
-
const _hoisted_4$
|
|
9899
|
+
const _hoisted_4$m = ["innerHTML"];
|
|
9885
9900
|
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
9886
9901
|
__name: "SearchResultsTitle",
|
|
9887
9902
|
props: {
|
|
@@ -9930,7 +9945,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
9930
9945
|
key: 2,
|
|
9931
9946
|
class: "lupa-result-page-description-top",
|
|
9932
9947
|
innerHTML: descriptionTop.value
|
|
9933
|
-
}, null, 8, _hoisted_4$
|
|
9948
|
+
}, null, 8, _hoisted_4$m)) : createCommentVNode("", true)
|
|
9934
9949
|
]);
|
|
9935
9950
|
};
|
|
9936
9951
|
}
|
|
@@ -9976,7 +9991,7 @@ const _hoisted_3$s = {
|
|
|
9976
9991
|
key: 0,
|
|
9977
9992
|
class: "filter-values"
|
|
9978
9993
|
};
|
|
9979
|
-
const _hoisted_4$
|
|
9994
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
9980
9995
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
9981
9996
|
__name: "CurrentFilters",
|
|
9982
9997
|
props: {
|
|
@@ -10042,7 +10057,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10042
10057
|
}, null, 2)) : createCommentVNode("", true)
|
|
10043
10058
|
]),
|
|
10044
10059
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
|
|
10045
|
-
createBaseVNode("div", _hoisted_4$
|
|
10060
|
+
createBaseVNode("div", _hoisted_4$l, [
|
|
10046
10061
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10047
10062
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
10048
10063
|
key: filter.key + "_" + filter.value,
|
|
@@ -10110,8 +10125,8 @@ const _hoisted_1$Q = {
|
|
|
10110
10125
|
};
|
|
10111
10126
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
10112
10127
|
const _hoisted_3$r = ["href"];
|
|
10113
|
-
const _hoisted_4$
|
|
10114
|
-
const _hoisted_5$
|
|
10128
|
+
const _hoisted_4$k = ["href"];
|
|
10129
|
+
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10115
10130
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
10116
10131
|
__name: "CategoryFilter",
|
|
10117
10132
|
props: {
|
|
@@ -10215,9 +10230,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10215
10230
|
href: parentUrlLink.value,
|
|
10216
10231
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
10217
10232
|
onClick: handleNavigationParent
|
|
10218
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
10233
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
10219
10234
|
], 2),
|
|
10220
|
-
createBaseVNode("div", _hoisted_5$
|
|
10235
|
+
createBaseVNode("div", _hoisted_5$d, [
|
|
10221
10236
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
10222
10237
|
return openBlock(), createBlock(_sfc_main$U, {
|
|
10223
10238
|
key: getCategoryKey(child),
|
|
@@ -10236,8 +10251,8 @@ const _hoisted_1$P = {
|
|
|
10236
10251
|
};
|
|
10237
10252
|
const _hoisted_2$z = ["placeholder"];
|
|
10238
10253
|
const _hoisted_3$q = { class: "lupa-terms-list" };
|
|
10239
|
-
const _hoisted_4$
|
|
10240
|
-
const _hoisted_5$
|
|
10254
|
+
const _hoisted_4$j = ["onClick"];
|
|
10255
|
+
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
10241
10256
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
10242
10257
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
10243
10258
|
const _hoisted_8$1 = {
|
|
@@ -10333,7 +10348,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10333
10348
|
key: item.title,
|
|
10334
10349
|
onClick: ($event) => handleFacetClick(item)
|
|
10335
10350
|
}, [
|
|
10336
|
-
createBaseVNode("div", _hoisted_5$
|
|
10351
|
+
createBaseVNode("div", _hoisted_5$c, [
|
|
10337
10352
|
createBaseVNode("span", {
|
|
10338
10353
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
10339
10354
|
}, null, 2)
|
|
@@ -10342,7 +10357,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10342
10357
|
createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
10343
10358
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
10344
10359
|
])
|
|
10345
|
-
], 10, _hoisted_4$
|
|
10360
|
+
], 10, _hoisted_4$j);
|
|
10346
10361
|
}), 128))
|
|
10347
10362
|
]),
|
|
10348
10363
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -11342,12 +11357,12 @@ const _hoisted_3$p = {
|
|
|
11342
11357
|
key: 1,
|
|
11343
11358
|
class: "lupa-stats-facet-summary-input"
|
|
11344
11359
|
};
|
|
11345
|
-
const _hoisted_4$
|
|
11360
|
+
const _hoisted_4$i = {
|
|
11346
11361
|
key: 0,
|
|
11347
11362
|
class: "lupa-stats-range-label"
|
|
11348
11363
|
};
|
|
11349
|
-
const _hoisted_5$
|
|
11350
|
-
const _hoisted_6$7 = ["max", "min", "pattern"];
|
|
11364
|
+
const _hoisted_5$b = { class: "lupa-stats-from" };
|
|
11365
|
+
const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
|
|
11351
11366
|
const _hoisted_7$5 = { key: 0 };
|
|
11352
11367
|
const _hoisted_8 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
|
|
11353
11368
|
const _hoisted_9 = {
|
|
@@ -11355,7 +11370,7 @@ const _hoisted_9 = {
|
|
|
11355
11370
|
class: "lupa-stats-range-label"
|
|
11356
11371
|
};
|
|
11357
11372
|
const _hoisted_10 = { class: "lupa-stats-to" };
|
|
11358
|
-
const _hoisted_11 = ["max", "min", "pattern"];
|
|
11373
|
+
const _hoisted_11 = ["max", "min", "pattern", "aria-label"];
|
|
11359
11374
|
const _hoisted_12 = { key: 0 };
|
|
11360
11375
|
const _hoisted_13 = {
|
|
11361
11376
|
key: 2,
|
|
@@ -11483,6 +11498,20 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11483
11498
|
const sliderInputFormat = computed(() => {
|
|
11484
11499
|
return isPrice.value ? `[0-9]+([${separator.value}][0-9]{1,2})?` : void 0;
|
|
11485
11500
|
});
|
|
11501
|
+
const sliderAria = computed(() => {
|
|
11502
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11503
|
+
return {
|
|
11504
|
+
"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}`
|
|
11505
|
+
};
|
|
11506
|
+
});
|
|
11507
|
+
const ariaLabelFrom = computed(() => {
|
|
11508
|
+
var _a, _b, _c, _d, _e;
|
|
11509
|
+
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}`;
|
|
11510
|
+
});
|
|
11511
|
+
const ariaLabelTo = computed(() => {
|
|
11512
|
+
var _a, _b, _c, _d, _e;
|
|
11513
|
+
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}`;
|
|
11514
|
+
});
|
|
11486
11515
|
watch(currentMinValue, () => {
|
|
11487
11516
|
innerSliderRange.value = [];
|
|
11488
11517
|
});
|
|
@@ -11512,15 +11541,16 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11512
11541
|
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
11513
11542
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
11514
11543
|
createBaseVNode("div", null, [
|
|
11515
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
11516
|
-
createBaseVNode("div", _hoisted_5$
|
|
11544
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
11545
|
+
createBaseVNode("div", _hoisted_5$b, [
|
|
11517
11546
|
withDirectives(createBaseVNode("input", {
|
|
11518
11547
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
11519
11548
|
type: "text",
|
|
11520
11549
|
maxlength: "8",
|
|
11521
11550
|
max: facetMax.value,
|
|
11522
11551
|
min: facetMin.value,
|
|
11523
|
-
pattern: sliderInputFormat.value
|
|
11552
|
+
pattern: sliderInputFormat.value,
|
|
11553
|
+
"aria-label": ariaLabelFrom.value
|
|
11524
11554
|
}, null, 8, _hoisted_6$7), [
|
|
11525
11555
|
[
|
|
11526
11556
|
vModelText,
|
|
@@ -11542,7 +11572,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11542
11572
|
maxlength: "8",
|
|
11543
11573
|
max: facetMax.value,
|
|
11544
11574
|
min: facetMin.value,
|
|
11545
|
-
pattern: sliderInputFormat.value
|
|
11575
|
+
pattern: sliderInputFormat.value,
|
|
11576
|
+
"aria-label": ariaLabelTo.value
|
|
11546
11577
|
}, null, 8, _hoisted_11), [
|
|
11547
11578
|
[
|
|
11548
11579
|
vModelText,
|
|
@@ -11563,11 +11594,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11563
11594
|
max: facetMax.value,
|
|
11564
11595
|
lazy: true,
|
|
11565
11596
|
step: interval.value,
|
|
11597
|
+
aria: sliderAria.value,
|
|
11566
11598
|
modelValue: sliderRange.value,
|
|
11567
11599
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sliderRange.value = $event),
|
|
11568
11600
|
onSlide: handleDragging,
|
|
11569
11601
|
onEnd: handleChange
|
|
11570
|
-
}, null, 8, ["min", "max", "step", "modelValue"])
|
|
11602
|
+
}, null, 8, ["min", "max", "step", "aria", "modelValue"])
|
|
11571
11603
|
])) : createCommentVNode("", true)
|
|
11572
11604
|
]);
|
|
11573
11605
|
};
|
|
@@ -11576,11 +11608,11 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11576
11608
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
11577
11609
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
11578
11610
|
const _hoisted_3$o = { class: "lupa-term-label" };
|
|
11579
|
-
const _hoisted_4$
|
|
11611
|
+
const _hoisted_4$h = {
|
|
11580
11612
|
key: 0,
|
|
11581
11613
|
class: "lupa-term-count"
|
|
11582
11614
|
};
|
|
11583
|
-
const _hoisted_5$
|
|
11615
|
+
const _hoisted_5$a = {
|
|
11584
11616
|
key: 0,
|
|
11585
11617
|
class: "lupa-facet-level"
|
|
11586
11618
|
};
|
|
@@ -11637,10 +11669,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11637
11669
|
]),
|
|
11638
11670
|
createBaseVNode("div", _hoisted_2$x, [
|
|
11639
11671
|
createBaseVNode("span", _hoisted_3$o, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
11640
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
11672
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
11641
11673
|
])
|
|
11642
11674
|
]),
|
|
11643
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
11675
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
|
|
11644
11676
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
11645
11677
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
11646
11678
|
key: itemChild.title,
|
|
@@ -12073,8 +12105,8 @@ const _hoisted_1$H = {
|
|
|
12073
12105
|
};
|
|
12074
12106
|
const _hoisted_2$t = ["onClick"];
|
|
12075
12107
|
const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
|
|
12076
|
-
const _hoisted_4$
|
|
12077
|
-
const _hoisted_5$
|
|
12108
|
+
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
12109
|
+
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
12078
12110
|
const _hoisted_6$6 = {
|
|
12079
12111
|
key: 0,
|
|
12080
12112
|
class: "lupa-sidebar-filter-count"
|
|
@@ -12112,8 +12144,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12112
12144
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
12113
12145
|
}, null, 8, _hoisted_2$t),
|
|
12114
12146
|
createBaseVNode("div", _hoisted_3$m, [
|
|
12115
|
-
createBaseVNode("div", _hoisted_4$
|
|
12116
|
-
createBaseVNode("div", _hoisted_5$
|
|
12147
|
+
createBaseVNode("div", _hoisted_4$g, [
|
|
12148
|
+
createBaseVNode("div", _hoisted_5$9, [
|
|
12117
12149
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
12118
12150
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
12119
12151
|
]),
|
|
@@ -12139,7 +12171,7 @@ const _hoisted_3$l = {
|
|
|
12139
12171
|
key: 1,
|
|
12140
12172
|
class: "lupa-search-results-breadcrumb-text"
|
|
12141
12173
|
};
|
|
12142
|
-
const _hoisted_4$
|
|
12174
|
+
const _hoisted_4$f = { key: 2 };
|
|
12143
12175
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
12144
12176
|
__name: "SearchResultsBreadcrumbs",
|
|
12145
12177
|
props: {
|
|
@@ -12180,7 +12212,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12180
12212
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
12181
12213
|
}
|
|
12182
12214
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
12183
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
12215
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
|
|
12184
12216
|
]);
|
|
12185
12217
|
}), 128))
|
|
12186
12218
|
]);
|
|
@@ -12281,7 +12313,7 @@ const _hoisted_2$r = {
|
|
|
12281
12313
|
class: "lupa-page-number-separator"
|
|
12282
12314
|
};
|
|
12283
12315
|
const _hoisted_3$k = ["onClick"];
|
|
12284
|
-
const _hoisted_4$
|
|
12316
|
+
const _hoisted_4$e = {
|
|
12285
12317
|
key: 0,
|
|
12286
12318
|
class: "lupa-page-number-separator"
|
|
12287
12319
|
};
|
|
@@ -12372,7 +12404,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12372
12404
|
}, toDisplayString(page), 11, _hoisted_3$k);
|
|
12373
12405
|
}), 128)),
|
|
12374
12406
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
12375
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
12407
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
|
|
12376
12408
|
createBaseVNode("div", {
|
|
12377
12409
|
class: "lupa-page-number lupa-page-number-last",
|
|
12378
12410
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -12397,6 +12429,7 @@ const _hoisted_1$B = {
|
|
|
12397
12429
|
};
|
|
12398
12430
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
12399
12431
|
const _hoisted_3$j = { class: "lupa-select-label" };
|
|
12432
|
+
const _hoisted_4$d = ["aria-label"];
|
|
12400
12433
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
12401
12434
|
__name: "SearchResultsPageSize",
|
|
12402
12435
|
props: {
|
|
@@ -12419,6 +12452,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12419
12452
|
createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.label), 1),
|
|
12420
12453
|
createBaseVNode("select", {
|
|
12421
12454
|
class: "lupa-select-dropdown",
|
|
12455
|
+
"aria-label": _ctx.label,
|
|
12422
12456
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
12423
12457
|
onChange: handleSelect,
|
|
12424
12458
|
ref_key: "select",
|
|
@@ -12427,7 +12461,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12427
12461
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
12428
12462
|
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
12429
12463
|
}), 128))
|
|
12430
|
-
],
|
|
12464
|
+
], 40, _hoisted_4$d)
|
|
12431
12465
|
])
|
|
12432
12466
|
]);
|
|
12433
12467
|
};
|
|
@@ -12439,7 +12473,8 @@ const _hoisted_1$A = {
|
|
|
12439
12473
|
};
|
|
12440
12474
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
12441
12475
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
12442
|
-
const _hoisted_4$c = ["
|
|
12476
|
+
const _hoisted_4$c = ["aria-label"];
|
|
12477
|
+
const _hoisted_5$8 = ["value"];
|
|
12443
12478
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
12444
12479
|
__name: "SearchResultsSort",
|
|
12445
12480
|
props: {
|
|
@@ -12493,6 +12528,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12493
12528
|
createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.options.label), 1),
|
|
12494
12529
|
withDirectives(createBaseVNode("select", {
|
|
12495
12530
|
class: "lupa-select-dropdown",
|
|
12531
|
+
"aria-label": _ctx.options.label,
|
|
12496
12532
|
"data-cy": "lupa-sort-select-dropdown",
|
|
12497
12533
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
12498
12534
|
onChange: handleSelect,
|
|
@@ -12502,9 +12538,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12502
12538
|
return openBlock(), createElementBlock("option", {
|
|
12503
12539
|
key: option.key,
|
|
12504
12540
|
value: option.key
|
|
12505
|
-
}, toDisplayString(option.label), 9,
|
|
12541
|
+
}, toDisplayString(option.label), 9, _hoisted_5$8);
|
|
12506
12542
|
}), 128))
|
|
12507
|
-
],
|
|
12543
|
+
], 40, _hoisted_4$c), [
|
|
12508
12544
|
[vModelSelect, selectedKey.value]
|
|
12509
12545
|
])
|
|
12510
12546
|
])
|
|
@@ -13486,6 +13522,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13486
13522
|
}
|
|
13487
13523
|
return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
|
|
13488
13524
|
});
|
|
13525
|
+
const customDocumentHtmlAttributes = computed(() => {
|
|
13526
|
+
var _a, _b, _c;
|
|
13527
|
+
return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
|
|
13528
|
+
});
|
|
13489
13529
|
const getGroupElements = (group) => {
|
|
13490
13530
|
var _a, _b;
|
|
13491
13531
|
return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
|
|
@@ -13542,12 +13582,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13542
13582
|
}
|
|
13543
13583
|
return (_ctx, _cache) => {
|
|
13544
13584
|
var _a;
|
|
13545
|
-
return openBlock(), createElementBlock("div", {
|
|
13585
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
13546
13586
|
id: "lupa-search-result-product-card",
|
|
13547
13587
|
"data-cy": "lupa-search-result-product-card",
|
|
13548
|
-
class:
|
|
13549
|
-
|
|
13550
|
-
}, [
|
|
13588
|
+
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
13589
|
+
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
13551
13590
|
createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
13552
13591
|
createBaseVNode("div", {
|
|
13553
13592
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
@@ -13609,7 +13648,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13609
13648
|
], 2);
|
|
13610
13649
|
}), 128))
|
|
13611
13650
|
], 2)
|
|
13612
|
-
],
|
|
13651
|
+
], 16);
|
|
13613
13652
|
};
|
|
13614
13653
|
}
|
|
13615
13654
|
});
|
|
@@ -13936,7 +13975,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13936
13975
|
"queryKey",
|
|
13937
13976
|
"idKey",
|
|
13938
13977
|
"titleKey",
|
|
13939
|
-
"routingBehavior"
|
|
13978
|
+
"routingBehavior",
|
|
13979
|
+
"customDocumentHtmlAttributes"
|
|
13940
13980
|
]);
|
|
13941
13981
|
});
|
|
13942
13982
|
const similarQueriesLabels = computed(() => {
|