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