@getlupa/client 1.11.6 → 1.11.8
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 +194 -130
- package/dist/lupaSearch.js +194 -130
- package/dist/lupaSearch.mjs +194 -130
- package/dist/lupaSearch.umd.js +194 -130
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/lupaSearch.js
CHANGED
|
@@ -8446,8 +8446,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
8446
8446
|
resetHighlightIndex
|
|
8447
8447
|
};
|
|
8448
8448
|
});
|
|
8449
|
-
const _hoisted_1$
|
|
8450
|
-
const _hoisted_2$
|
|
8449
|
+
const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
8450
|
+
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8451
8451
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8452
8452
|
const _hoisted_4$s = ["value"];
|
|
8453
8453
|
const _hoisted_5$h = ["aria-label", "placeholder"];
|
|
@@ -8459,7 +8459,7 @@ const _hoisted_8$3 = {
|
|
|
8459
8459
|
key: 0,
|
|
8460
8460
|
class: "lupa-close-label"
|
|
8461
8461
|
};
|
|
8462
|
-
const _sfc_main$
|
|
8462
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
8463
8463
|
__name: "SearchBoxInput",
|
|
8464
8464
|
props: {
|
|
8465
8465
|
options: {},
|
|
@@ -8529,7 +8529,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
8529
8529
|
}
|
|
8530
8530
|
};
|
|
8531
8531
|
const handleSubmit = () => {
|
|
8532
|
-
emit2("search");
|
|
8532
|
+
emit2("search", { query: inputValue.value });
|
|
8533
8533
|
};
|
|
8534
8534
|
const clear2 = () => {
|
|
8535
8535
|
emit2("input", "");
|
|
@@ -8543,8 +8543,8 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
8543
8543
|
};
|
|
8544
8544
|
__expose({ focus });
|
|
8545
8545
|
return (_ctx, _cache) => {
|
|
8546
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8547
|
-
createBaseVNode("div", _hoisted_2$
|
|
8546
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1f, [
|
|
8547
|
+
createBaseVNode("div", _hoisted_2$R, [
|
|
8548
8548
|
createBaseVNode("div", {
|
|
8549
8549
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
8550
8550
|
onClick: clear2
|
|
@@ -8589,7 +8589,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
8589
8589
|
};
|
|
8590
8590
|
}
|
|
8591
8591
|
});
|
|
8592
|
-
const _sfc_main$
|
|
8592
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
8593
8593
|
__name: "SearchBoxMoreResults",
|
|
8594
8594
|
props: {
|
|
8595
8595
|
labels: {},
|
|
@@ -8621,9 +8621,9 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
8621
8621
|
};
|
|
8622
8622
|
}
|
|
8623
8623
|
});
|
|
8624
|
-
const _hoisted_1$
|
|
8625
|
-
const _hoisted_2$
|
|
8626
|
-
const _sfc_main$
|
|
8624
|
+
const _hoisted_1$1e = { class: "lupa-search-box-history-item" };
|
|
8625
|
+
const _hoisted_2$Q = { class: "lupa-search-box-history-item-content" };
|
|
8626
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8627
8627
|
__name: "SearchBoxHistoryItem",
|
|
8628
8628
|
props: {
|
|
8629
8629
|
item: {},
|
|
@@ -8639,8 +8639,8 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
8639
8639
|
emit2("click", { query: props.item });
|
|
8640
8640
|
};
|
|
8641
8641
|
return (_ctx, _cache) => {
|
|
8642
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8643
|
-
createBaseVNode("div", _hoisted_2$
|
|
8642
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
8643
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
8644
8644
|
createBaseVNode("div", {
|
|
8645
8645
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
8646
8646
|
onClick: click2
|
|
@@ -8654,11 +8654,11 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
8654
8654
|
};
|
|
8655
8655
|
}
|
|
8656
8656
|
});
|
|
8657
|
-
const _hoisted_1$
|
|
8657
|
+
const _hoisted_1$1d = {
|
|
8658
8658
|
key: 0,
|
|
8659
8659
|
class: "lupa-search-box-history-panel"
|
|
8660
8660
|
};
|
|
8661
|
-
const _sfc_main$
|
|
8661
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8662
8662
|
__name: "SearchBoxHistoryPanel",
|
|
8663
8663
|
props: {
|
|
8664
8664
|
options: {}
|
|
@@ -8699,9 +8699,9 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8699
8699
|
}
|
|
8700
8700
|
};
|
|
8701
8701
|
return (_ctx, _cache) => {
|
|
8702
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8702
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8703
8703
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8704
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8704
|
+
return openBlock(), createBlock(_sfc_main$1l, {
|
|
8705
8705
|
key: item,
|
|
8706
8706
|
item,
|
|
8707
8707
|
highlighted: index === highlightIndex.value,
|
|
@@ -8717,20 +8717,20 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
8717
8717
|
};
|
|
8718
8718
|
}
|
|
8719
8719
|
});
|
|
8720
|
-
const _hoisted_1$
|
|
8721
|
-
const _sfc_main$
|
|
8720
|
+
const _hoisted_1$1c = { class: "lupa-search-box-no-results" };
|
|
8721
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8722
8722
|
__name: "SearchBoxNoResults",
|
|
8723
8723
|
props: {
|
|
8724
8724
|
labels: {}
|
|
8725
8725
|
},
|
|
8726
8726
|
setup(__props) {
|
|
8727
8727
|
return (_ctx, _cache) => {
|
|
8728
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8728
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1c, toDisplayString(_ctx.labels.noResults), 1);
|
|
8729
8729
|
};
|
|
8730
8730
|
}
|
|
8731
8731
|
});
|
|
8732
|
-
const _hoisted_1$
|
|
8733
|
-
const _hoisted_2$
|
|
8732
|
+
const _hoisted_1$1b = ["innerHTML"];
|
|
8733
|
+
const _hoisted_2$P = {
|
|
8734
8734
|
key: 1,
|
|
8735
8735
|
"data-cy": "lupa-suggestion-value",
|
|
8736
8736
|
class: "lupa-suggestion-value"
|
|
@@ -8748,7 +8748,7 @@ const _hoisted_5$g = {
|
|
|
8748
8748
|
class: "lupa-suggestion-facet-value",
|
|
8749
8749
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8750
8750
|
};
|
|
8751
|
-
const _sfc_main$
|
|
8751
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8752
8752
|
__name: "SearchBoxSuggestion",
|
|
8753
8753
|
props: {
|
|
8754
8754
|
suggestion: {},
|
|
@@ -8784,7 +8784,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
8784
8784
|
class: "lupa-suggestion-value",
|
|
8785
8785
|
"data-cy": "lupa-suggestion-value",
|
|
8786
8786
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8787
|
-
}, null, 8, _hoisted_1$
|
|
8787
|
+
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8788
8788
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8789
8789
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8790
8790
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8793,11 +8793,11 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
8793
8793
|
};
|
|
8794
8794
|
}
|
|
8795
8795
|
});
|
|
8796
|
-
const _hoisted_1$
|
|
8796
|
+
const _hoisted_1$1a = {
|
|
8797
8797
|
id: "lupa-search-box-suggestions",
|
|
8798
8798
|
"data-cy": "lupa-search-box-suggestions"
|
|
8799
8799
|
};
|
|
8800
|
-
const _sfc_main$
|
|
8800
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8801
8801
|
__name: "SearchBoxSuggestions",
|
|
8802
8802
|
props: {
|
|
8803
8803
|
items: {},
|
|
@@ -8857,9 +8857,9 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
8857
8857
|
});
|
|
8858
8858
|
});
|
|
8859
8859
|
return (_ctx, _cache) => {
|
|
8860
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8860
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1a, [
|
|
8861
8861
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8862
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8862
|
+
return openBlock(), createBlock(_sfc_main$1i, {
|
|
8863
8863
|
key: getSuggestionKey(item),
|
|
8864
8864
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8865
8865
|
suggestion: item,
|
|
@@ -8887,7 +8887,7 @@ const debounce$1 = (func, timeout) => {
|
|
|
8887
8887
|
}, timeout);
|
|
8888
8888
|
};
|
|
8889
8889
|
};
|
|
8890
|
-
const _sfc_main$
|
|
8890
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8891
8891
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8892
8892
|
props: {
|
|
8893
8893
|
panel: {},
|
|
@@ -8928,7 +8928,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8928
8928
|
};
|
|
8929
8929
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8930
8930
|
return (_ctx, _cache) => {
|
|
8931
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8931
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8932
8932
|
items: searchResult.value,
|
|
8933
8933
|
highlight: _ctx.panel.highlight,
|
|
8934
8934
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -9032,8 +9032,8 @@ const replaceImageWithPlaceholder = (e, placeholder) => {
|
|
|
9032
9032
|
targetImage.src = placeholder;
|
|
9033
9033
|
}
|
|
9034
9034
|
};
|
|
9035
|
-
const _hoisted_1$
|
|
9036
|
-
const _sfc_main$
|
|
9035
|
+
const _hoisted_1$19 = ["src"];
|
|
9036
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
9037
9037
|
__name: "ProductImage",
|
|
9038
9038
|
props: {
|
|
9039
9039
|
item: {},
|
|
@@ -9151,7 +9151,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
9151
9151
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9152
9152
|
onError: replaceWithPlaceholder,
|
|
9153
9153
|
key: finalUrl.value
|
|
9154
|
-
}), null, 16, _hoisted_1$
|
|
9154
|
+
}), null, 16, _hoisted_1$19))
|
|
9155
9155
|
]),
|
|
9156
9156
|
_: 1
|
|
9157
9157
|
})
|
|
@@ -9159,7 +9159,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
9159
9159
|
};
|
|
9160
9160
|
}
|
|
9161
9161
|
});
|
|
9162
|
-
const _sfc_main$
|
|
9162
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
9163
9163
|
__name: "SearchBoxProductImage",
|
|
9164
9164
|
props: {
|
|
9165
9165
|
item: {},
|
|
@@ -9167,7 +9167,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9167
9167
|
},
|
|
9168
9168
|
setup(__props) {
|
|
9169
9169
|
return (_ctx, _cache) => {
|
|
9170
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9170
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
9171
9171
|
item: _ctx.item,
|
|
9172
9172
|
options: _ctx.options,
|
|
9173
9173
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -9176,12 +9176,12 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
9176
9176
|
};
|
|
9177
9177
|
}
|
|
9178
9178
|
});
|
|
9179
|
-
const _hoisted_1$
|
|
9180
|
-
const _hoisted_2$
|
|
9179
|
+
const _hoisted_1$18 = ["innerHTML"];
|
|
9180
|
+
const _hoisted_2$O = {
|
|
9181
9181
|
key: 1,
|
|
9182
9182
|
class: "lupa-search-box-product-title"
|
|
9183
9183
|
};
|
|
9184
|
-
const _sfc_main$
|
|
9184
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
9185
9185
|
__name: "SearchBoxProductTitle",
|
|
9186
9186
|
props: {
|
|
9187
9187
|
item: {},
|
|
@@ -9201,18 +9201,18 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
9201
9201
|
key: 0,
|
|
9202
9202
|
class: "lupa-search-box-product-title",
|
|
9203
9203
|
innerHTML: title.value
|
|
9204
|
-
}, null, 8, _hoisted_1$
|
|
9204
|
+
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$O, [
|
|
9205
9205
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
9206
9206
|
]));
|
|
9207
9207
|
};
|
|
9208
9208
|
}
|
|
9209
9209
|
});
|
|
9210
|
-
const _hoisted_1$
|
|
9211
|
-
const _hoisted_2$
|
|
9210
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
9211
|
+
const _hoisted_2$N = {
|
|
9212
9212
|
key: 1,
|
|
9213
9213
|
class: "lupa-search-box-product-description"
|
|
9214
9214
|
};
|
|
9215
|
-
const _sfc_main$
|
|
9215
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
9216
9216
|
__name: "SearchBoxProductDescription",
|
|
9217
9217
|
props: {
|
|
9218
9218
|
item: {},
|
|
@@ -9232,12 +9232,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
9232
9232
|
key: 0,
|
|
9233
9233
|
class: "lupa-search-box-product-description",
|
|
9234
9234
|
innerHTML: description.value
|
|
9235
|
-
}, null, 8, _hoisted_1$
|
|
9235
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(description.value), 1));
|
|
9236
9236
|
};
|
|
9237
9237
|
}
|
|
9238
9238
|
});
|
|
9239
|
-
const _hoisted_1$
|
|
9240
|
-
const _sfc_main$
|
|
9239
|
+
const _hoisted_1$16 = { class: "lupa-search-box-product-price" };
|
|
9240
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
9241
9241
|
__name: "SearchBoxProductPrice",
|
|
9242
9242
|
props: {
|
|
9243
9243
|
item: {},
|
|
@@ -9255,14 +9255,14 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
9255
9255
|
);
|
|
9256
9256
|
});
|
|
9257
9257
|
return (_ctx, _cache) => {
|
|
9258
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9258
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
9259
9259
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
9260
9260
|
]);
|
|
9261
9261
|
};
|
|
9262
9262
|
}
|
|
9263
9263
|
});
|
|
9264
|
-
const _hoisted_1$
|
|
9265
|
-
const _sfc_main$
|
|
9264
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-regular-price" };
|
|
9265
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
9266
9266
|
__name: "SearchBoxProductRegularPrice",
|
|
9267
9267
|
props: {
|
|
9268
9268
|
item: {},
|
|
@@ -9280,16 +9280,16 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
9280
9280
|
);
|
|
9281
9281
|
});
|
|
9282
9282
|
return (_ctx, _cache) => {
|
|
9283
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9283
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, toDisplayString(price.value), 1);
|
|
9284
9284
|
};
|
|
9285
9285
|
}
|
|
9286
9286
|
});
|
|
9287
|
-
const _hoisted_1$
|
|
9288
|
-
const _hoisted_2$
|
|
9287
|
+
const _hoisted_1$14 = ["innerHTML"];
|
|
9288
|
+
const _hoisted_2$M = { key: 0 };
|
|
9289
9289
|
const _hoisted_3$y = { key: 1 };
|
|
9290
9290
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9291
9291
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
9292
|
-
const _sfc_main$
|
|
9292
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9293
9293
|
__name: "SearchBoxProductCustom",
|
|
9294
9294
|
props: {
|
|
9295
9295
|
item: {},
|
|
@@ -9315,11 +9315,11 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
9315
9315
|
key: 0,
|
|
9316
9316
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
9317
9317
|
innerHTML: text.value
|
|
9318
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9318
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$14)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
9319
9319
|
key: 1,
|
|
9320
9320
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
9321
9321
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9322
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
9322
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9323
9323
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9324
9324
|
createBaseVNode("div", _hoisted_5$f, toDisplayString(text.value), 1)
|
|
9325
9325
|
]))
|
|
@@ -9327,8 +9327,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
9327
9327
|
};
|
|
9328
9328
|
}
|
|
9329
9329
|
});
|
|
9330
|
-
const _hoisted_1$
|
|
9331
|
-
const _sfc_main$
|
|
9330
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
9331
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
9332
9332
|
__name: "SearchBoxProductCustomHtml",
|
|
9333
9333
|
props: {
|
|
9334
9334
|
item: {},
|
|
@@ -9348,7 +9348,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
9348
9348
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
9349
9349
|
class: className.value,
|
|
9350
9350
|
innerHTML: text.value
|
|
9351
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9351
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13);
|
|
9352
9352
|
};
|
|
9353
9353
|
}
|
|
9354
9354
|
});
|
|
@@ -9566,10 +9566,10 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9566
9566
|
clearSearchResult
|
|
9567
9567
|
};
|
|
9568
9568
|
});
|
|
9569
|
-
const _hoisted_1$
|
|
9570
|
-
const _hoisted_2$
|
|
9569
|
+
const _hoisted_1$12 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
9570
|
+
const _hoisted_2$L = { class: "lupa-search-box-product-addtocart" };
|
|
9571
9571
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
9572
|
-
const _sfc_main$
|
|
9572
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
9573
9573
|
__name: "SearchBoxProductAddToCart",
|
|
9574
9574
|
props: {
|
|
9575
9575
|
item: {},
|
|
@@ -9596,8 +9596,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
9596
9596
|
loading.value = false;
|
|
9597
9597
|
});
|
|
9598
9598
|
return (_ctx, _cache) => {
|
|
9599
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9600
|
-
createBaseVNode("div", _hoisted_2$
|
|
9599
|
+
return openBlock(), createElementBlock("div", _hoisted_1$12, [
|
|
9600
|
+
createBaseVNode("div", _hoisted_2$L, [
|
|
9601
9601
|
createBaseVNode("button", {
|
|
9602
9602
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
9603
9603
|
class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
@@ -9610,23 +9610,23 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
9610
9610
|
};
|
|
9611
9611
|
}
|
|
9612
9612
|
});
|
|
9613
|
-
const _hoisted_1$
|
|
9613
|
+
const _hoisted_1$11 = {
|
|
9614
9614
|
key: 1,
|
|
9615
9615
|
class: "lupa-search-box-element-badge-wrapper"
|
|
9616
9616
|
};
|
|
9617
9617
|
const __default__$4 = {
|
|
9618
9618
|
components: {
|
|
9619
|
-
SearchBoxProductImage: _sfc_main$
|
|
9620
|
-
SearchBoxProductTitle: _sfc_main$
|
|
9621
|
-
SearchBoxProductDescription: _sfc_main$
|
|
9622
|
-
SearchBoxProductPrice: _sfc_main$
|
|
9623
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
9624
|
-
SearchBoxProductCustom: _sfc_main$
|
|
9625
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
9626
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9619
|
+
SearchBoxProductImage: _sfc_main$1e,
|
|
9620
|
+
SearchBoxProductTitle: _sfc_main$1d,
|
|
9621
|
+
SearchBoxProductDescription: _sfc_main$1c,
|
|
9622
|
+
SearchBoxProductPrice: _sfc_main$1b,
|
|
9623
|
+
SearchBoxProductRegularPrice: _sfc_main$1a,
|
|
9624
|
+
SearchBoxProductCustom: _sfc_main$19,
|
|
9625
|
+
SearchBoxProductCustomHtml: _sfc_main$18,
|
|
9626
|
+
SearchBoxProductAddToCart: _sfc_main$17
|
|
9627
9627
|
}
|
|
9628
9628
|
};
|
|
9629
|
-
const _sfc_main$
|
|
9629
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
9630
9630
|
__name: "SearchBoxProductElement",
|
|
9631
9631
|
props: {
|
|
9632
9632
|
item: {},
|
|
@@ -9684,7 +9684,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9684
9684
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
9685
9685
|
inStock: _ctx.isInStock
|
|
9686
9686
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
9687
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
9687
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
9688
9688
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
9689
9689
|
key: 0,
|
|
9690
9690
|
item: enhancedItem.value,
|
|
@@ -9698,14 +9698,14 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
9698
9698
|
};
|
|
9699
9699
|
}
|
|
9700
9700
|
}));
|
|
9701
|
-
const _hoisted_1
|
|
9702
|
-
const _hoisted_2$
|
|
9701
|
+
const _hoisted_1$10 = { class: "lupa-badge-title" };
|
|
9702
|
+
const _hoisted_2$K = ["src"];
|
|
9703
9703
|
const _hoisted_3$w = { key: 1 };
|
|
9704
9704
|
const _hoisted_4$p = {
|
|
9705
9705
|
key: 0,
|
|
9706
9706
|
class: "lupa-badge-full-text"
|
|
9707
9707
|
};
|
|
9708
|
-
const _sfc_main$
|
|
9708
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
9709
9709
|
__name: "SearchResultGeneratedBadge",
|
|
9710
9710
|
props: {
|
|
9711
9711
|
options: {},
|
|
@@ -9738,11 +9738,11 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
9738
9738
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9739
9739
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9740
9740
|
}, [
|
|
9741
|
-
createBaseVNode("span", _hoisted_1
|
|
9741
|
+
createBaseVNode("span", _hoisted_1$10, [
|
|
9742
9742
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9743
9743
|
key: 0,
|
|
9744
9744
|
src: image.value
|
|
9745
|
-
}, null, 8, _hoisted_2$
|
|
9745
|
+
}, null, 8, _hoisted_2$K)) : createCommentVNode("", true),
|
|
9746
9746
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
9747
9747
|
]),
|
|
9748
9748
|
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
@@ -9750,8 +9750,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
9750
9750
|
};
|
|
9751
9751
|
}
|
|
9752
9752
|
});
|
|
9753
|
-
const _hoisted_1
|
|
9754
|
-
const _sfc_main$
|
|
9753
|
+
const _hoisted_1$$ = { class: "lupa-generated-badges" };
|
|
9754
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9755
9755
|
__name: "SearchResultGeneratedBadges",
|
|
9756
9756
|
props: {
|
|
9757
9757
|
options: {}
|
|
@@ -9777,9 +9777,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9777
9777
|
})).filter((b) => Boolean(b.id));
|
|
9778
9778
|
});
|
|
9779
9779
|
return (_ctx, _cache) => {
|
|
9780
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
9780
|
+
return openBlock(), createElementBlock("div", _hoisted_1$$, [
|
|
9781
9781
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9782
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9782
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9783
9783
|
key: badge.id,
|
|
9784
9784
|
badge,
|
|
9785
9785
|
options: _ctx.options
|
|
@@ -9789,8 +9789,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
9789
9789
|
};
|
|
9790
9790
|
}
|
|
9791
9791
|
});
|
|
9792
|
-
const _hoisted_1$
|
|
9793
|
-
const _sfc_main$
|
|
9792
|
+
const _hoisted_1$_ = ["innerHTML"];
|
|
9793
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9794
9794
|
__name: "CustomBadge",
|
|
9795
9795
|
props: {
|
|
9796
9796
|
badge: {}
|
|
@@ -9809,12 +9809,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
9809
9809
|
return openBlock(), createElementBlock("div", {
|
|
9810
9810
|
class: normalizeClass(className.value),
|
|
9811
9811
|
innerHTML: text.value
|
|
9812
|
-
}, null, 10, _hoisted_1$
|
|
9812
|
+
}, null, 10, _hoisted_1$_);
|
|
9813
9813
|
};
|
|
9814
9814
|
}
|
|
9815
9815
|
});
|
|
9816
|
-
const _hoisted_1$
|
|
9817
|
-
const _sfc_main$
|
|
9816
|
+
const _hoisted_1$Z = { class: "lupa-text-badges" };
|
|
9817
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9818
9818
|
__name: "TextBadge",
|
|
9819
9819
|
props: {
|
|
9820
9820
|
badge: {}
|
|
@@ -9829,7 +9829,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9829
9829
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9830
9830
|
});
|
|
9831
9831
|
return (_ctx, _cache) => {
|
|
9832
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9832
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
9833
9833
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9834
9834
|
return openBlock(), createElementBlock("div", {
|
|
9835
9835
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9840,9 +9840,9 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
9840
9840
|
};
|
|
9841
9841
|
}
|
|
9842
9842
|
});
|
|
9843
|
-
const _hoisted_1$
|
|
9844
|
-
const _hoisted_2$
|
|
9845
|
-
const _sfc_main$
|
|
9843
|
+
const _hoisted_1$Y = { class: "lupa-image-badges" };
|
|
9844
|
+
const _hoisted_2$J = ["src"];
|
|
9845
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9846
9846
|
__name: "ImageBadge",
|
|
9847
9847
|
props: {
|
|
9848
9848
|
badge: {}
|
|
@@ -9862,7 +9862,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9862
9862
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9863
9863
|
};
|
|
9864
9864
|
return (_ctx, _cache) => {
|
|
9865
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9865
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9866
9866
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9867
9867
|
return openBlock(), createElementBlock("div", {
|
|
9868
9868
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9870,22 +9870,22 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9870
9870
|
}, [
|
|
9871
9871
|
createBaseVNode("img", {
|
|
9872
9872
|
src: getImageUrl(item)
|
|
9873
|
-
}, null, 8, _hoisted_2$
|
|
9873
|
+
}, null, 8, _hoisted_2$J)
|
|
9874
9874
|
]);
|
|
9875
9875
|
}), 128))
|
|
9876
9876
|
]);
|
|
9877
9877
|
};
|
|
9878
9878
|
}
|
|
9879
9879
|
});
|
|
9880
|
-
const _hoisted_1$
|
|
9880
|
+
const _hoisted_1$X = { id: "lupa-search-results-badges" };
|
|
9881
9881
|
const __default__$3 = {
|
|
9882
9882
|
components: {
|
|
9883
|
-
CustomBadge: _sfc_main$
|
|
9884
|
-
TextBadge: _sfc_main$
|
|
9885
|
-
ImageBadge: _sfc_main$
|
|
9883
|
+
CustomBadge: _sfc_main$13,
|
|
9884
|
+
TextBadge: _sfc_main$12,
|
|
9885
|
+
ImageBadge: _sfc_main$11
|
|
9886
9886
|
}
|
|
9887
9887
|
};
|
|
9888
|
-
const _sfc_main
|
|
9888
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9889
9889
|
__name: "SearchResultsBadgeWrapper",
|
|
9890
9890
|
props: {
|
|
9891
9891
|
position: {},
|
|
@@ -9941,7 +9941,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9941
9941
|
}
|
|
9942
9942
|
};
|
|
9943
9943
|
return (_ctx, _cache) => {
|
|
9944
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9944
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9945
9945
|
createBaseVNode("div", {
|
|
9946
9946
|
id: "lupa-badges",
|
|
9947
9947
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9952,7 +9952,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9952
9952
|
badge
|
|
9953
9953
|
}, null, 8, ["badge"]);
|
|
9954
9954
|
}), 128)),
|
|
9955
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9955
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
9956
9956
|
key: 0,
|
|
9957
9957
|
options: _ctx.options
|
|
9958
9958
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9961,14 +9961,14 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9961
9961
|
};
|
|
9962
9962
|
}
|
|
9963
9963
|
}));
|
|
9964
|
-
const _hoisted_1$
|
|
9965
|
-
const _hoisted_2$
|
|
9964
|
+
const _hoisted_1$W = ["href"];
|
|
9965
|
+
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
9966
9966
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9967
9967
|
const _hoisted_4$o = {
|
|
9968
9968
|
key: 0,
|
|
9969
9969
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9970
9970
|
};
|
|
9971
|
-
const _sfc_main
|
|
9971
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
9972
9972
|
__name: "SearchBoxProduct",
|
|
9973
9973
|
props: {
|
|
9974
9974
|
item: {},
|
|
@@ -10027,9 +10027,9 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10027
10027
|
"data-cy": "lupa-search-box-product",
|
|
10028
10028
|
onClick: handleClick
|
|
10029
10029
|
}), [
|
|
10030
|
-
createBaseVNode("div", _hoisted_2$
|
|
10030
|
+
createBaseVNode("div", _hoisted_2$I, [
|
|
10031
10031
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
10032
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10032
|
+
return openBlock(), createBlock(_sfc_main$16, {
|
|
10033
10033
|
class: "lupa-search-box-product-element",
|
|
10034
10034
|
item: _ctx.item,
|
|
10035
10035
|
element,
|
|
@@ -10042,7 +10042,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10042
10042
|
createBaseVNode("div", _hoisted_3$v, [
|
|
10043
10043
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
10044
10044
|
var _a;
|
|
10045
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10045
|
+
return openBlock(), createBlock(_sfc_main$16, {
|
|
10046
10046
|
key: element.key,
|
|
10047
10047
|
class: "lupa-search-box-product-element",
|
|
10048
10048
|
item: _ctx.item,
|
|
@@ -10053,7 +10053,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10053
10053
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
10054
10054
|
name: "badges",
|
|
10055
10055
|
fn: withCtx(() => [
|
|
10056
|
-
createVNode(_sfc_main
|
|
10056
|
+
createVNode(_sfc_main$10, {
|
|
10057
10057
|
options: badgeOptions.value,
|
|
10058
10058
|
position: "card"
|
|
10059
10059
|
}, null, 8, ["options"])
|
|
@@ -10064,7 +10064,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10064
10064
|
}), 128))
|
|
10065
10065
|
]),
|
|
10066
10066
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
10067
|
-
createVNode(_sfc_main$
|
|
10067
|
+
createVNode(_sfc_main$16, {
|
|
10068
10068
|
class: "lupa-search-box-product-element",
|
|
10069
10069
|
item: _ctx.item,
|
|
10070
10070
|
element: addToCartElement.value,
|
|
@@ -10073,7 +10073,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10073
10073
|
isInStock: isInStock.value
|
|
10074
10074
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
10075
10075
|
])) : createCommentVNode("", true)
|
|
10076
|
-
], 16, _hoisted_1$
|
|
10076
|
+
], 16, _hoisted_1$W);
|
|
10077
10077
|
};
|
|
10078
10078
|
}
|
|
10079
10079
|
});
|
|
@@ -10134,8 +10134,8 @@ const useTrackingStore = defineStore("tracking", () => {
|
|
|
10134
10134
|
};
|
|
10135
10135
|
return { trackSearch, trackResults, trackEvent };
|
|
10136
10136
|
});
|
|
10137
|
-
const _hoisted_1$
|
|
10138
|
-
const _sfc_main$
|
|
10137
|
+
const _hoisted_1$V = { id: "lupa-search-box-products" };
|
|
10138
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
10139
10139
|
__name: "SearchBoxProducts",
|
|
10140
10140
|
props: {
|
|
10141
10141
|
items: {},
|
|
@@ -10196,7 +10196,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10196
10196
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
10197
10197
|
};
|
|
10198
10198
|
return (_ctx, _cache) => {
|
|
10199
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10199
|
+
return openBlock(), createElementBlock("div", _hoisted_1$V, [
|
|
10200
10200
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
10201
10201
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
10202
10202
|
key: index,
|
|
@@ -10208,7 +10208,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10208
10208
|
itemClicked: handleProductClick
|
|
10209
10209
|
});
|
|
10210
10210
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
10211
|
-
return openBlock(), createBlock(_sfc_main
|
|
10211
|
+
return openBlock(), createBlock(_sfc_main$$, {
|
|
10212
10212
|
key: index,
|
|
10213
10213
|
item,
|
|
10214
10214
|
panelOptions: _ctx.panelOptions,
|
|
@@ -10217,7 +10217,52 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10217
10217
|
inputValue: _ctx.inputValue,
|
|
10218
10218
|
onProductClick: handleProductClick
|
|
10219
10219
|
}, null, 8, ["item", "panelOptions", "labels", "highlighted", "inputValue"]);
|
|
10220
|
-
}), 128))
|
|
10220
|
+
}), 128)),
|
|
10221
|
+
renderSlot(_ctx.$slots, "default")
|
|
10222
|
+
]);
|
|
10223
|
+
};
|
|
10224
|
+
}
|
|
10225
|
+
});
|
|
10226
|
+
const _hoisted_1$U = { class: "lupa-search-box-documents-go-to-results-wrapper" };
|
|
10227
|
+
const _hoisted_2$H = { key: 0 };
|
|
10228
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
10229
|
+
__name: "SearchBoxProductsGoToResultsButton",
|
|
10230
|
+
props: {
|
|
10231
|
+
options: {},
|
|
10232
|
+
panel: {}
|
|
10233
|
+
},
|
|
10234
|
+
emits: ["goToResults"],
|
|
10235
|
+
setup(__props, { emit: emit2 }) {
|
|
10236
|
+
const props = __props;
|
|
10237
|
+
const searchBoxStore = useSearchBoxStore();
|
|
10238
|
+
const { docResults } = storeToRefs(searchBoxStore);
|
|
10239
|
+
const goToResultsLabel = computed(
|
|
10240
|
+
() => {
|
|
10241
|
+
var _a, _b, _c;
|
|
10242
|
+
return (_c = (_a = props.panel.labels) == null ? void 0 : _a.goToResultsTitle) != null ? _c : (_b = props.options.labels) == null ? void 0 : _b.moreResults;
|
|
10243
|
+
}
|
|
10244
|
+
);
|
|
10245
|
+
const totalCount = computed(() => {
|
|
10246
|
+
var _a;
|
|
10247
|
+
if (!props.options.showTotalCount) {
|
|
10248
|
+
return "";
|
|
10249
|
+
}
|
|
10250
|
+
const queryKey = props.panel.queryKey;
|
|
10251
|
+
const total = queryKey ? (_a = docResults.value[queryKey]) == null ? void 0 : _a.total : "";
|
|
10252
|
+
return total ? `(${total})` : "";
|
|
10253
|
+
});
|
|
10254
|
+
const goToResults = () => {
|
|
10255
|
+
emit2("goToResults");
|
|
10256
|
+
};
|
|
10257
|
+
return (_ctx, _cache) => {
|
|
10258
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
10259
|
+
createBaseVNode("button", {
|
|
10260
|
+
class: "lupa-search-box-documents-go-to-results-button",
|
|
10261
|
+
onClick: goToResults
|
|
10262
|
+
}, [
|
|
10263
|
+
createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
|
|
10264
|
+
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$H, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
|
|
10265
|
+
])
|
|
10221
10266
|
]);
|
|
10222
10267
|
};
|
|
10223
10268
|
}
|
|
@@ -10226,12 +10271,13 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10226
10271
|
__name: "SearchBoxProductsWrapper",
|
|
10227
10272
|
props: {
|
|
10228
10273
|
panel: {},
|
|
10274
|
+
searchBoxOptions: {},
|
|
10229
10275
|
inputValue: {},
|
|
10230
10276
|
options: {},
|
|
10231
10277
|
labels: {},
|
|
10232
10278
|
debounce: {}
|
|
10233
10279
|
},
|
|
10234
|
-
emits: ["fetched"],
|
|
10280
|
+
emits: ["fetched", "product-click", "go-to-results"],
|
|
10235
10281
|
setup(__props, { emit: emit2 }) {
|
|
10236
10282
|
const props = __props;
|
|
10237
10283
|
const searchBoxStore = useSearchBoxStore();
|
|
@@ -10241,6 +10287,9 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10241
10287
|
var _a;
|
|
10242
10288
|
return (_a = docResults.value[props.panel.queryKey]) != null ? _a : null;
|
|
10243
10289
|
});
|
|
10290
|
+
const showGoToResultsButton = computed(() => {
|
|
10291
|
+
return props.panel.showGoToResults;
|
|
10292
|
+
});
|
|
10244
10293
|
const inputValueProp = computed(() => props.inputValue);
|
|
10245
10294
|
onMounted(() => {
|
|
10246
10295
|
getItemsDebounced();
|
|
@@ -10274,13 +10323,26 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
10274
10323
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
10275
10324
|
return (_ctx, _cache) => {
|
|
10276
10325
|
var _a, _b;
|
|
10277
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10326
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10278
10327
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10279
10328
|
panelOptions: _ctx.panel,
|
|
10280
10329
|
labels: _ctx.labels,
|
|
10281
10330
|
inputValue: _ctx.inputValue,
|
|
10282
|
-
onProductClick: _cache[
|
|
10283
|
-
}, createSlots({
|
|
10331
|
+
onProductClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("product-click"))
|
|
10332
|
+
}, createSlots({
|
|
10333
|
+
default: withCtx(() => {
|
|
10334
|
+
var _a2;
|
|
10335
|
+
return [
|
|
10336
|
+
showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
10337
|
+
key: 0,
|
|
10338
|
+
options: _ctx.searchBoxOptions,
|
|
10339
|
+
panel: _ctx.panel,
|
|
10340
|
+
onGoToResults: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("go-to-results"))
|
|
10341
|
+
}, null, 8, ["options", "panel"])) : createCommentVNode("", true)
|
|
10342
|
+
];
|
|
10343
|
+
}),
|
|
10344
|
+
_: 2
|
|
10345
|
+
}, [
|
|
10284
10346
|
_ctx.$slots.productCard ? {
|
|
10285
10347
|
name: "productCard",
|
|
10286
10348
|
fn: withCtx((props2) => [
|
|
@@ -10364,7 +10426,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
10364
10426
|
});
|
|
10365
10427
|
return (_ctx, _cache) => {
|
|
10366
10428
|
var _a, _b;
|
|
10367
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10429
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10368
10430
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10369
10431
|
panelOptions: documentPanelOptions.value,
|
|
10370
10432
|
labels: _ctx.labels,
|
|
@@ -10401,7 +10463,7 @@ const _hoisted_5$e = {
|
|
|
10401
10463
|
};
|
|
10402
10464
|
const __default__$2 = {
|
|
10403
10465
|
components: {
|
|
10404
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
10466
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1g,
|
|
10405
10467
|
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10406
10468
|
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
10407
10469
|
}
|
|
@@ -10578,13 +10640,15 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10578
10640
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
10579
10641
|
key: 2,
|
|
10580
10642
|
panel,
|
|
10643
|
+
"search-box-options": _ctx.options,
|
|
10581
10644
|
options: sdkOptions.value,
|
|
10582
10645
|
debounce: _ctx.options.debounce,
|
|
10583
10646
|
inputValue: getInput(panel),
|
|
10584
10647
|
labels: labels.value,
|
|
10585
10648
|
onFetched: _cache[1] || (_cache[1] = (data) => _ctx.$emit("fetched", data)),
|
|
10586
10649
|
onItemSelect: _cache[2] || (_cache[2] = (item) => _ctx.$emit("itemSelect", item)),
|
|
10587
|
-
onProductClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("product-click"))
|
|
10650
|
+
onProductClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("product-click")),
|
|
10651
|
+
onGoToResults: handleGoToResults
|
|
10588
10652
|
}, createSlots({ _: 2 }, [
|
|
10589
10653
|
_ctx.$slots.productCard ? {
|
|
10590
10654
|
name: "productCard",
|
|
@@ -10593,22 +10657,22 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10593
10657
|
]),
|
|
10594
10658
|
key: "0"
|
|
10595
10659
|
} : void 0
|
|
10596
|
-
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10660
|
+
]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10597
10661
|
], 10, _hoisted_2$G);
|
|
10598
10662
|
}), 128))
|
|
10599
10663
|
], 4),
|
|
10600
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10664
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1j, {
|
|
10601
10665
|
key: 1,
|
|
10602
10666
|
labels: labels.value
|
|
10603
10667
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
10604
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10668
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1m, {
|
|
10605
10669
|
key: 2,
|
|
10606
10670
|
labels: labels.value,
|
|
10607
10671
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10608
10672
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10609
10673
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10610
10674
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
10611
|
-
createVNode(_sfc_main$
|
|
10675
|
+
createVNode(_sfc_main$1k, {
|
|
10612
10676
|
options: _ctx.options.history,
|
|
10613
10677
|
history: history.value,
|
|
10614
10678
|
onGoToResults: handleGoToResults,
|
|
@@ -10888,7 +10952,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10888
10952
|
var _a2;
|
|
10889
10953
|
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10890
10954
|
createBaseVNode("div", _hoisted_2$F, [
|
|
10891
|
-
createVNode(_sfc_main$
|
|
10955
|
+
createVNode(_sfc_main$1n, {
|
|
10892
10956
|
options: inputOptions.value,
|
|
10893
10957
|
suggestedValue: suggestedValue.value,
|
|
10894
10958
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -14045,7 +14109,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
14045
14109
|
},
|
|
14046
14110
|
setup(__props) {
|
|
14047
14111
|
return (_ctx, _cache) => {
|
|
14048
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14112
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
14049
14113
|
item: _ctx.item,
|
|
14050
14114
|
options: _ctx.options,
|
|
14051
14115
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -14687,7 +14751,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14687
14751
|
"data-cy": "lupa-search-result-product-card",
|
|
14688
14752
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
14689
14753
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
14690
|
-
createVNode(_sfc_main
|
|
14754
|
+
createVNode(_sfc_main$10, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
14691
14755
|
createBaseVNode("div", {
|
|
14692
14756
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
14693
14757
|
}, [
|
|
@@ -14708,7 +14772,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14708
14772
|
onProductEvent: handleProductEvent
|
|
14709
14773
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
14710
14774
|
}), 128)),
|
|
14711
|
-
createVNode(_sfc_main
|
|
14775
|
+
createVNode(_sfc_main$10, {
|
|
14712
14776
|
options: badgesOptions.value,
|
|
14713
14777
|
position: "image",
|
|
14714
14778
|
class: "lupa-image-badges"
|
|
@@ -22586,7 +22650,7 @@ const _hoisted_4 = {
|
|
|
22586
22650
|
class: "lupa-chat-spinner-main"
|
|
22587
22651
|
};
|
|
22588
22652
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
22589
|
-
const _sfc_main$
|
|
22653
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
22590
22654
|
__name: "ChatContainer",
|
|
22591
22655
|
props: {
|
|
22592
22656
|
options: {}
|
|
@@ -29064,7 +29128,7 @@ const chat = (options, mountOptions) => {
|
|
|
29064
29128
|
}
|
|
29065
29129
|
return;
|
|
29066
29130
|
}
|
|
29067
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
29131
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1o, {
|
|
29068
29132
|
options
|
|
29069
29133
|
});
|
|
29070
29134
|
if (!instance) {
|