@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.umd.js
CHANGED
|
@@ -6901,11 +6901,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
6901
6901
|
}
|
|
6902
6902
|
};
|
|
6903
6903
|
const getNormalizedString = (str) => {
|
|
6904
|
+
var _a, _b;
|
|
6904
6905
|
if (!str) {
|
|
6905
6906
|
return "";
|
|
6906
6907
|
}
|
|
6907
6908
|
const transformedStr = typeof str === "string" ? str : str.toString();
|
|
6908
|
-
return transformedStr.normalize === void 0 ? transformedStr.toLocaleLowerCase() : transformedStr.toLocaleLowerCase().normalize("NFKD").replace(/[^\w\s.-_/]/g, "");
|
|
6909
|
+
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();
|
|
6909
6910
|
};
|
|
6910
6911
|
const capitalize$1 = (str) => {
|
|
6911
6912
|
if (!str) {
|
|
@@ -8448,8 +8449,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8448
8449
|
resetHighlightIndex
|
|
8449
8450
|
};
|
|
8450
8451
|
});
|
|
8451
|
-
const _hoisted_1$
|
|
8452
|
-
const _hoisted_2$
|
|
8452
|
+
const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
8453
|
+
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8453
8454
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8454
8455
|
const _hoisted_4$s = ["value"];
|
|
8455
8456
|
const _hoisted_5$h = ["aria-label", "placeholder"];
|
|
@@ -8461,7 +8462,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8461
8462
|
key: 0,
|
|
8462
8463
|
class: "lupa-close-label"
|
|
8463
8464
|
};
|
|
8464
|
-
const _sfc_main$
|
|
8465
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
8465
8466
|
__name: "SearchBoxInput",
|
|
8466
8467
|
props: {
|
|
8467
8468
|
options: {},
|
|
@@ -8545,8 +8546,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8545
8546
|
};
|
|
8546
8547
|
__expose({ focus });
|
|
8547
8548
|
return (_ctx, _cache) => {
|
|
8548
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8549
|
-
createBaseVNode("div", _hoisted_2$
|
|
8549
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1f, [
|
|
8550
|
+
createBaseVNode("div", _hoisted_2$R, [
|
|
8550
8551
|
createBaseVNode("div", {
|
|
8551
8552
|
class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
|
|
8552
8553
|
onClick: clear2
|
|
@@ -8591,7 +8592,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8591
8592
|
};
|
|
8592
8593
|
}
|
|
8593
8594
|
});
|
|
8594
|
-
const _sfc_main$
|
|
8595
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
8595
8596
|
__name: "SearchBoxMoreResults",
|
|
8596
8597
|
props: {
|
|
8597
8598
|
labels: {},
|
|
@@ -8623,9 +8624,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8623
8624
|
};
|
|
8624
8625
|
}
|
|
8625
8626
|
});
|
|
8626
|
-
const _hoisted_1$
|
|
8627
|
-
const _hoisted_2$
|
|
8628
|
-
const _sfc_main$
|
|
8627
|
+
const _hoisted_1$1e = { class: "lupa-search-box-history-item" };
|
|
8628
|
+
const _hoisted_2$Q = { class: "lupa-search-box-history-item-content" };
|
|
8629
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
8629
8630
|
__name: "SearchBoxHistoryItem",
|
|
8630
8631
|
props: {
|
|
8631
8632
|
item: {},
|
|
@@ -8641,8 +8642,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8641
8642
|
emit2("click", { query: props.item });
|
|
8642
8643
|
};
|
|
8643
8644
|
return (_ctx, _cache) => {
|
|
8644
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8645
|
-
createBaseVNode("div", _hoisted_2$
|
|
8645
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1e, [
|
|
8646
|
+
createBaseVNode("div", _hoisted_2$Q, [
|
|
8646
8647
|
createBaseVNode("div", {
|
|
8647
8648
|
class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
|
|
8648
8649
|
onClick: click2
|
|
@@ -8656,11 +8657,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8656
8657
|
};
|
|
8657
8658
|
}
|
|
8658
8659
|
});
|
|
8659
|
-
const _hoisted_1$
|
|
8660
|
+
const _hoisted_1$1d = {
|
|
8660
8661
|
key: 0,
|
|
8661
8662
|
class: "lupa-search-box-history-panel"
|
|
8662
8663
|
};
|
|
8663
|
-
const _sfc_main$
|
|
8664
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
8664
8665
|
__name: "SearchBoxHistoryPanel",
|
|
8665
8666
|
props: {
|
|
8666
8667
|
options: {}
|
|
@@ -8701,9 +8702,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8701
8702
|
}
|
|
8702
8703
|
};
|
|
8703
8704
|
return (_ctx, _cache) => {
|
|
8704
|
-
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8705
|
+
return hasHistory.value ? (openBlock(), createElementBlock("div", _hoisted_1$1d, [
|
|
8705
8706
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(history), (item, index) => {
|
|
8706
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8707
|
+
return openBlock(), createBlock(_sfc_main$1l, {
|
|
8707
8708
|
key: item,
|
|
8708
8709
|
item,
|
|
8709
8710
|
highlighted: index === highlightIndex.value,
|
|
@@ -8719,20 +8720,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8719
8720
|
};
|
|
8720
8721
|
}
|
|
8721
8722
|
});
|
|
8722
|
-
const _hoisted_1$
|
|
8723
|
-
const _sfc_main$
|
|
8723
|
+
const _hoisted_1$1c = { class: "lupa-search-box-no-results" };
|
|
8724
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
8724
8725
|
__name: "SearchBoxNoResults",
|
|
8725
8726
|
props: {
|
|
8726
8727
|
labels: {}
|
|
8727
8728
|
},
|
|
8728
8729
|
setup(__props) {
|
|
8729
8730
|
return (_ctx, _cache) => {
|
|
8730
|
-
return openBlock(), createElementBlock("p", _hoisted_1$
|
|
8731
|
+
return openBlock(), createElementBlock("p", _hoisted_1$1c, toDisplayString(_ctx.labels.noResults), 1);
|
|
8731
8732
|
};
|
|
8732
8733
|
}
|
|
8733
8734
|
});
|
|
8734
|
-
const _hoisted_1$
|
|
8735
|
-
const _hoisted_2$
|
|
8735
|
+
const _hoisted_1$1b = ["innerHTML"];
|
|
8736
|
+
const _hoisted_2$P = {
|
|
8736
8737
|
key: 1,
|
|
8737
8738
|
"data-cy": "lupa-suggestion-value",
|
|
8738
8739
|
class: "lupa-suggestion-value"
|
|
@@ -8750,7 +8751,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8750
8751
|
class: "lupa-suggestion-facet-value",
|
|
8751
8752
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8752
8753
|
};
|
|
8753
|
-
const _sfc_main$
|
|
8754
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
8754
8755
|
__name: "SearchBoxSuggestion",
|
|
8755
8756
|
props: {
|
|
8756
8757
|
suggestion: {},
|
|
@@ -8786,7 +8787,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8786
8787
|
class: "lupa-suggestion-value",
|
|
8787
8788
|
"data-cy": "lupa-suggestion-value",
|
|
8788
8789
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8789
|
-
}, null, 8, _hoisted_1$
|
|
8790
|
+
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8790
8791
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8791
8792
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8792
8793
|
createBaseVNode("span", _hoisted_5$g, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
@@ -8795,11 +8796,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8795
8796
|
};
|
|
8796
8797
|
}
|
|
8797
8798
|
});
|
|
8798
|
-
const _hoisted_1$
|
|
8799
|
+
const _hoisted_1$1a = {
|
|
8799
8800
|
id: "lupa-search-box-suggestions",
|
|
8800
8801
|
"data-cy": "lupa-search-box-suggestions"
|
|
8801
8802
|
};
|
|
8802
|
-
const _sfc_main$
|
|
8803
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
8803
8804
|
__name: "SearchBoxSuggestions",
|
|
8804
8805
|
props: {
|
|
8805
8806
|
items: {},
|
|
@@ -8859,9 +8860,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8859
8860
|
});
|
|
8860
8861
|
});
|
|
8861
8862
|
return (_ctx, _cache) => {
|
|
8862
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8863
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1a, [
|
|
8863
8864
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
8864
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8865
|
+
return openBlock(), createBlock(_sfc_main$1i, {
|
|
8865
8866
|
key: getSuggestionKey(item),
|
|
8866
8867
|
class: normalizeClass(["lupa-suggestion", index === highlightedIndex.value ? "lupa-suggestion-highlighted" : ""]),
|
|
8867
8868
|
suggestion: item,
|
|
@@ -8889,7 +8890,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8889
8890
|
}, timeout);
|
|
8890
8891
|
};
|
|
8891
8892
|
};
|
|
8892
|
-
const _sfc_main$
|
|
8893
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
8893
8894
|
__name: "SearchBoxSuggestionsWrapper",
|
|
8894
8895
|
props: {
|
|
8895
8896
|
panel: {},
|
|
@@ -8930,7 +8931,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8930
8931
|
};
|
|
8931
8932
|
const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
|
|
8932
8933
|
return (_ctx, _cache) => {
|
|
8933
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8934
|
+
return openBlock(), createBlock(_sfc_main$1h, {
|
|
8934
8935
|
items: searchResult.value,
|
|
8935
8936
|
highlight: _ctx.panel.highlight,
|
|
8936
8937
|
queryKey: _ctx.panel.queryKey,
|
|
@@ -9034,8 +9035,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9034
9035
|
targetImage.src = placeholder;
|
|
9035
9036
|
}
|
|
9036
9037
|
};
|
|
9037
|
-
const _hoisted_1$
|
|
9038
|
-
const _sfc_main$
|
|
9038
|
+
const _hoisted_1$19 = ["src"];
|
|
9039
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
9039
9040
|
__name: "ProductImage",
|
|
9040
9041
|
props: {
|
|
9041
9042
|
item: {},
|
|
@@ -9153,7 +9154,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9153
9154
|
}, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
|
|
9154
9155
|
onError: replaceWithPlaceholder,
|
|
9155
9156
|
key: finalUrl.value
|
|
9156
|
-
}), null, 16, _hoisted_1$
|
|
9157
|
+
}), null, 16, _hoisted_1$19))
|
|
9157
9158
|
]),
|
|
9158
9159
|
_: 1
|
|
9159
9160
|
})
|
|
@@ -9161,7 +9162,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9161
9162
|
};
|
|
9162
9163
|
}
|
|
9163
9164
|
});
|
|
9164
|
-
const _sfc_main$
|
|
9165
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
9165
9166
|
__name: "SearchBoxProductImage",
|
|
9166
9167
|
props: {
|
|
9167
9168
|
item: {},
|
|
@@ -9169,7 +9170,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9169
9170
|
},
|
|
9170
9171
|
setup(__props) {
|
|
9171
9172
|
return (_ctx, _cache) => {
|
|
9172
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9173
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
9173
9174
|
item: _ctx.item,
|
|
9174
9175
|
options: _ctx.options,
|
|
9175
9176
|
"wrapper-class": "lupa-search-box-image-wrapper",
|
|
@@ -9178,12 +9179,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9178
9179
|
};
|
|
9179
9180
|
}
|
|
9180
9181
|
});
|
|
9181
|
-
const _hoisted_1$
|
|
9182
|
-
const _hoisted_2$
|
|
9182
|
+
const _hoisted_1$18 = ["innerHTML"];
|
|
9183
|
+
const _hoisted_2$O = {
|
|
9183
9184
|
key: 1,
|
|
9184
9185
|
class: "lupa-search-box-product-title"
|
|
9185
9186
|
};
|
|
9186
|
-
const _sfc_main$
|
|
9187
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
9187
9188
|
__name: "SearchBoxProductTitle",
|
|
9188
9189
|
props: {
|
|
9189
9190
|
item: {},
|
|
@@ -9203,18 +9204,18 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9203
9204
|
key: 0,
|
|
9204
9205
|
class: "lupa-search-box-product-title",
|
|
9205
9206
|
innerHTML: title.value
|
|
9206
|
-
}, null, 8, _hoisted_1$
|
|
9207
|
+
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$O, [
|
|
9207
9208
|
createBaseVNode("strong", null, toDisplayString(title.value), 1)
|
|
9208
9209
|
]));
|
|
9209
9210
|
};
|
|
9210
9211
|
}
|
|
9211
9212
|
});
|
|
9212
|
-
const _hoisted_1$
|
|
9213
|
-
const _hoisted_2$
|
|
9213
|
+
const _hoisted_1$17 = ["innerHTML"];
|
|
9214
|
+
const _hoisted_2$N = {
|
|
9214
9215
|
key: 1,
|
|
9215
9216
|
class: "lupa-search-box-product-description"
|
|
9216
9217
|
};
|
|
9217
|
-
const _sfc_main$
|
|
9218
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
9218
9219
|
__name: "SearchBoxProductDescription",
|
|
9219
9220
|
props: {
|
|
9220
9221
|
item: {},
|
|
@@ -9234,12 +9235,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9234
9235
|
key: 0,
|
|
9235
9236
|
class: "lupa-search-box-product-description",
|
|
9236
9237
|
innerHTML: description.value
|
|
9237
|
-
}, null, 8, _hoisted_1$
|
|
9238
|
+
}, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(description.value), 1));
|
|
9238
9239
|
};
|
|
9239
9240
|
}
|
|
9240
9241
|
});
|
|
9241
|
-
const _hoisted_1$
|
|
9242
|
-
const _sfc_main$
|
|
9242
|
+
const _hoisted_1$16 = { class: "lupa-search-box-product-price" };
|
|
9243
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
9243
9244
|
__name: "SearchBoxProductPrice",
|
|
9244
9245
|
props: {
|
|
9245
9246
|
item: {},
|
|
@@ -9257,14 +9258,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9257
9258
|
);
|
|
9258
9259
|
});
|
|
9259
9260
|
return (_ctx, _cache) => {
|
|
9260
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9261
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [
|
|
9261
9262
|
createBaseVNode("strong", null, toDisplayString(price.value), 1)
|
|
9262
9263
|
]);
|
|
9263
9264
|
};
|
|
9264
9265
|
}
|
|
9265
9266
|
});
|
|
9266
|
-
const _hoisted_1$
|
|
9267
|
-
const _sfc_main$
|
|
9267
|
+
const _hoisted_1$15 = { class: "lupa-search-box-product-regular-price" };
|
|
9268
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
9268
9269
|
__name: "SearchBoxProductRegularPrice",
|
|
9269
9270
|
props: {
|
|
9270
9271
|
item: {},
|
|
@@ -9282,16 +9283,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9282
9283
|
);
|
|
9283
9284
|
});
|
|
9284
9285
|
return (_ctx, _cache) => {
|
|
9285
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9286
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, toDisplayString(price.value), 1);
|
|
9286
9287
|
};
|
|
9287
9288
|
}
|
|
9288
9289
|
});
|
|
9289
|
-
const _hoisted_1$
|
|
9290
|
-
const _hoisted_2$
|
|
9290
|
+
const _hoisted_1$14 = ["innerHTML"];
|
|
9291
|
+
const _hoisted_2$M = { key: 0 };
|
|
9291
9292
|
const _hoisted_3$y = { key: 1 };
|
|
9292
9293
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9293
9294
|
const _hoisted_5$f = { class: "lupa-search-box-custom-text" };
|
|
9294
|
-
const _sfc_main$
|
|
9295
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9295
9296
|
__name: "SearchBoxProductCustom",
|
|
9296
9297
|
props: {
|
|
9297
9298
|
item: {},
|
|
@@ -9317,11 +9318,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9317
9318
|
key: 0,
|
|
9318
9319
|
class: [className.value, "lupa-search-box-product-custom"],
|
|
9319
9320
|
innerHTML: text.value
|
|
9320
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9321
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$14)) : (openBlock(), createElementBlock("div", mergeProps({
|
|
9321
9322
|
key: 1,
|
|
9322
9323
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
9323
9324
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9324
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
9325
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9325
9326
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9326
9327
|
createBaseVNode("div", _hoisted_5$f, toDisplayString(text.value), 1)
|
|
9327
9328
|
]))
|
|
@@ -9329,8 +9330,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9329
9330
|
};
|
|
9330
9331
|
}
|
|
9331
9332
|
});
|
|
9332
|
-
const _hoisted_1$
|
|
9333
|
-
const _sfc_main$
|
|
9333
|
+
const _hoisted_1$13 = ["innerHTML"];
|
|
9334
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
9334
9335
|
__name: "SearchBoxProductCustomHtml",
|
|
9335
9336
|
props: {
|
|
9336
9337
|
item: {},
|
|
@@ -9350,7 +9351,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9350
9351
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
9351
9352
|
class: className.value,
|
|
9352
9353
|
innerHTML: text.value
|
|
9353
|
-
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$
|
|
9354
|
+
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), null, 16, _hoisted_1$13);
|
|
9354
9355
|
};
|
|
9355
9356
|
}
|
|
9356
9357
|
});
|
|
@@ -9568,10 +9569,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9568
9569
|
clearSearchResult
|
|
9569
9570
|
};
|
|
9570
9571
|
});
|
|
9571
|
-
const _hoisted_1$
|
|
9572
|
-
const _hoisted_2$
|
|
9572
|
+
const _hoisted_1$12 = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
9573
|
+
const _hoisted_2$L = { class: "lupa-search-box-product-addtocart" };
|
|
9573
9574
|
const _hoisted_3$x = ["onClick", "disabled"];
|
|
9574
|
-
const _sfc_main$
|
|
9575
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
9575
9576
|
__name: "SearchBoxProductAddToCart",
|
|
9576
9577
|
props: {
|
|
9577
9578
|
item: {},
|
|
@@ -9598,8 +9599,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9598
9599
|
loading.value = false;
|
|
9599
9600
|
});
|
|
9600
9601
|
return (_ctx, _cache) => {
|
|
9601
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9602
|
-
createBaseVNode("div", _hoisted_2$
|
|
9602
|
+
return openBlock(), createElementBlock("div", _hoisted_1$12, [
|
|
9603
|
+
createBaseVNode("div", _hoisted_2$L, [
|
|
9603
9604
|
createBaseVNode("button", {
|
|
9604
9605
|
onClick: withModifiers(handleClick, ["stop", "prevent"]),
|
|
9605
9606
|
class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
@@ -9612,23 +9613,23 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9612
9613
|
};
|
|
9613
9614
|
}
|
|
9614
9615
|
});
|
|
9615
|
-
const _hoisted_1$
|
|
9616
|
+
const _hoisted_1$11 = {
|
|
9616
9617
|
key: 1,
|
|
9617
9618
|
class: "lupa-search-box-element-badge-wrapper"
|
|
9618
9619
|
};
|
|
9619
9620
|
const __default__$4 = {
|
|
9620
9621
|
components: {
|
|
9621
|
-
SearchBoxProductImage: _sfc_main$
|
|
9622
|
-
SearchBoxProductTitle: _sfc_main$
|
|
9623
|
-
SearchBoxProductDescription: _sfc_main$
|
|
9624
|
-
SearchBoxProductPrice: _sfc_main$
|
|
9625
|
-
SearchBoxProductRegularPrice: _sfc_main$
|
|
9626
|
-
SearchBoxProductCustom: _sfc_main$
|
|
9627
|
-
SearchBoxProductCustomHtml: _sfc_main$
|
|
9628
|
-
SearchBoxProductAddToCart: _sfc_main$
|
|
9622
|
+
SearchBoxProductImage: _sfc_main$1e,
|
|
9623
|
+
SearchBoxProductTitle: _sfc_main$1d,
|
|
9624
|
+
SearchBoxProductDescription: _sfc_main$1c,
|
|
9625
|
+
SearchBoxProductPrice: _sfc_main$1b,
|
|
9626
|
+
SearchBoxProductRegularPrice: _sfc_main$1a,
|
|
9627
|
+
SearchBoxProductCustom: _sfc_main$19,
|
|
9628
|
+
SearchBoxProductCustomHtml: _sfc_main$18,
|
|
9629
|
+
SearchBoxProductAddToCart: _sfc_main$17
|
|
9629
9630
|
}
|
|
9630
9631
|
};
|
|
9631
|
-
const _sfc_main$
|
|
9632
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$4), {
|
|
9632
9633
|
__name: "SearchBoxProductElement",
|
|
9633
9634
|
props: {
|
|
9634
9635
|
item: {},
|
|
@@ -9686,7 +9687,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9686
9687
|
class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) }),
|
|
9687
9688
|
inStock: _ctx.isInStock
|
|
9688
9689
|
}, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true)
|
|
9689
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
9690
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
9690
9691
|
displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
|
|
9691
9692
|
key: 0,
|
|
9692
9693
|
item: enhancedItem.value,
|
|
@@ -9700,14 +9701,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9700
9701
|
};
|
|
9701
9702
|
}
|
|
9702
9703
|
}));
|
|
9703
|
-
const _hoisted_1
|
|
9704
|
-
const _hoisted_2$
|
|
9704
|
+
const _hoisted_1$10 = { class: "lupa-badge-title" };
|
|
9705
|
+
const _hoisted_2$K = ["src"];
|
|
9705
9706
|
const _hoisted_3$w = { key: 1 };
|
|
9706
9707
|
const _hoisted_4$p = {
|
|
9707
9708
|
key: 0,
|
|
9708
9709
|
class: "lupa-badge-full-text"
|
|
9709
9710
|
};
|
|
9710
|
-
const _sfc_main$
|
|
9711
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
9711
9712
|
__name: "SearchResultGeneratedBadge",
|
|
9712
9713
|
props: {
|
|
9713
9714
|
options: {},
|
|
@@ -9740,11 +9741,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9740
9741
|
class: normalizeClass(["lupa-dynamic-badge", customClassName.value]),
|
|
9741
9742
|
style: normalizeStyle({ background: _ctx.badge.backgroundColor, color: _ctx.badge.color })
|
|
9742
9743
|
}, [
|
|
9743
|
-
createBaseVNode("span", _hoisted_1
|
|
9744
|
+
createBaseVNode("span", _hoisted_1$10, [
|
|
9744
9745
|
image.value ? (openBlock(), createElementBlock("img", {
|
|
9745
9746
|
key: 0,
|
|
9746
9747
|
src: image.value
|
|
9747
|
-
}, null, 8, _hoisted_2$
|
|
9748
|
+
}, null, 8, _hoisted_2$K)) : createCommentVNode("", true),
|
|
9748
9749
|
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$w, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
9749
9750
|
]),
|
|
9750
9751
|
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
@@ -9752,8 +9753,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9752
9753
|
};
|
|
9753
9754
|
}
|
|
9754
9755
|
});
|
|
9755
|
-
const _hoisted_1
|
|
9756
|
-
const _sfc_main$
|
|
9756
|
+
const _hoisted_1$$ = { class: "lupa-generated-badges" };
|
|
9757
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
9757
9758
|
__name: "SearchResultGeneratedBadges",
|
|
9758
9759
|
props: {
|
|
9759
9760
|
options: {}
|
|
@@ -9779,9 +9780,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9779
9780
|
})).filter((b) => Boolean(b.id));
|
|
9780
9781
|
});
|
|
9781
9782
|
return (_ctx, _cache) => {
|
|
9782
|
-
return openBlock(), createElementBlock("div", _hoisted_1
|
|
9783
|
+
return openBlock(), createElementBlock("div", _hoisted_1$$, [
|
|
9783
9784
|
(openBlock(true), createElementBlock(Fragment, null, renderList(badges.value, (badge) => {
|
|
9784
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9785
|
+
return openBlock(), createBlock(_sfc_main$15, {
|
|
9785
9786
|
key: badge.id,
|
|
9786
9787
|
badge,
|
|
9787
9788
|
options: _ctx.options
|
|
@@ -9791,8 +9792,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9791
9792
|
};
|
|
9792
9793
|
}
|
|
9793
9794
|
});
|
|
9794
|
-
const _hoisted_1$
|
|
9795
|
-
const _sfc_main$
|
|
9795
|
+
const _hoisted_1$_ = ["innerHTML"];
|
|
9796
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
9796
9797
|
__name: "CustomBadge",
|
|
9797
9798
|
props: {
|
|
9798
9799
|
badge: {}
|
|
@@ -9811,12 +9812,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9811
9812
|
return openBlock(), createElementBlock("div", {
|
|
9812
9813
|
class: normalizeClass(className.value),
|
|
9813
9814
|
innerHTML: text.value
|
|
9814
|
-
}, null, 10, _hoisted_1$
|
|
9815
|
+
}, null, 10, _hoisted_1$_);
|
|
9815
9816
|
};
|
|
9816
9817
|
}
|
|
9817
9818
|
});
|
|
9818
|
-
const _hoisted_1$
|
|
9819
|
-
const _sfc_main$
|
|
9819
|
+
const _hoisted_1$Z = { class: "lupa-text-badges" };
|
|
9820
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
9820
9821
|
__name: "TextBadge",
|
|
9821
9822
|
props: {
|
|
9822
9823
|
badge: {}
|
|
@@ -9831,7 +9832,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9831
9832
|
return badges.value.slice(0, props.badge.maxItems);
|
|
9832
9833
|
});
|
|
9833
9834
|
return (_ctx, _cache) => {
|
|
9834
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9835
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
9835
9836
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9836
9837
|
return openBlock(), createElementBlock("div", {
|
|
9837
9838
|
class: "lupa-badge lupa-text-badge",
|
|
@@ -9842,9 +9843,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9842
9843
|
};
|
|
9843
9844
|
}
|
|
9844
9845
|
});
|
|
9845
|
-
const _hoisted_1$
|
|
9846
|
-
const _hoisted_2$
|
|
9847
|
-
const _sfc_main$
|
|
9846
|
+
const _hoisted_1$Y = { class: "lupa-image-badges" };
|
|
9847
|
+
const _hoisted_2$J = ["src"];
|
|
9848
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
9848
9849
|
__name: "ImageBadge",
|
|
9849
9850
|
props: {
|
|
9850
9851
|
badge: {}
|
|
@@ -9864,7 +9865,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9864
9865
|
return `${props.badge.rootImageUrl}${src}`;
|
|
9865
9866
|
};
|
|
9866
9867
|
return (_ctx, _cache) => {
|
|
9867
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9868
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
9868
9869
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayBadges.value, (item) => {
|
|
9869
9870
|
return openBlock(), createElementBlock("div", {
|
|
9870
9871
|
class: "lupa-badge lupa-image-badge",
|
|
@@ -9872,22 +9873,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9872
9873
|
}, [
|
|
9873
9874
|
createBaseVNode("img", {
|
|
9874
9875
|
src: getImageUrl(item)
|
|
9875
|
-
}, null, 8, _hoisted_2$
|
|
9876
|
+
}, null, 8, _hoisted_2$J)
|
|
9876
9877
|
]);
|
|
9877
9878
|
}), 128))
|
|
9878
9879
|
]);
|
|
9879
9880
|
};
|
|
9880
9881
|
}
|
|
9881
9882
|
});
|
|
9882
|
-
const _hoisted_1$
|
|
9883
|
+
const _hoisted_1$X = { id: "lupa-search-results-badges" };
|
|
9883
9884
|
const __default__$3 = {
|
|
9884
9885
|
components: {
|
|
9885
|
-
CustomBadge: _sfc_main$
|
|
9886
|
-
TextBadge: _sfc_main$
|
|
9887
|
-
ImageBadge: _sfc_main$
|
|
9886
|
+
CustomBadge: _sfc_main$13,
|
|
9887
|
+
TextBadge: _sfc_main$12,
|
|
9888
|
+
ImageBadge: _sfc_main$11
|
|
9888
9889
|
}
|
|
9889
9890
|
};
|
|
9890
|
-
const _sfc_main
|
|
9891
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValues2({}, __default__$3), {
|
|
9891
9892
|
__name: "SearchResultsBadgeWrapper",
|
|
9892
9893
|
props: {
|
|
9893
9894
|
position: {},
|
|
@@ -9943,7 +9944,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9943
9944
|
}
|
|
9944
9945
|
};
|
|
9945
9946
|
return (_ctx, _cache) => {
|
|
9946
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
9947
|
+
return openBlock(), createElementBlock("div", _hoisted_1$X, [
|
|
9947
9948
|
createBaseVNode("div", {
|
|
9948
9949
|
id: "lupa-badges",
|
|
9949
9950
|
class: normalizeClass(anchorPosition.value)
|
|
@@ -9954,7 +9955,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9954
9955
|
badge
|
|
9955
9956
|
}, null, 8, ["badge"]);
|
|
9956
9957
|
}), 128)),
|
|
9957
|
-
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$
|
|
9958
|
+
positionValue.value === "card" ? (openBlock(), createBlock(_sfc_main$14, {
|
|
9958
9959
|
key: 0,
|
|
9959
9960
|
options: _ctx.options
|
|
9960
9961
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
@@ -9963,14 +9964,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9963
9964
|
};
|
|
9964
9965
|
}
|
|
9965
9966
|
}));
|
|
9966
|
-
const _hoisted_1$
|
|
9967
|
-
const _hoisted_2$
|
|
9967
|
+
const _hoisted_1$W = ["href"];
|
|
9968
|
+
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
9968
9969
|
const _hoisted_3$v = { class: "lupa-search-box-product-details-section" };
|
|
9969
9970
|
const _hoisted_4$o = {
|
|
9970
9971
|
key: 0,
|
|
9971
9972
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
9972
9973
|
};
|
|
9973
|
-
const _sfc_main
|
|
9974
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
9974
9975
|
__name: "SearchBoxProduct",
|
|
9975
9976
|
props: {
|
|
9976
9977
|
item: {},
|
|
@@ -10029,9 +10030,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10029
10030
|
"data-cy": "lupa-search-box-product",
|
|
10030
10031
|
onClick: handleClick
|
|
10031
10032
|
}), [
|
|
10032
|
-
createBaseVNode("div", _hoisted_2$
|
|
10033
|
+
createBaseVNode("div", _hoisted_2$I, [
|
|
10033
10034
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
10034
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10035
|
+
return openBlock(), createBlock(_sfc_main$16, {
|
|
10035
10036
|
class: "lupa-search-box-product-element",
|
|
10036
10037
|
item: _ctx.item,
|
|
10037
10038
|
element,
|
|
@@ -10044,7 +10045,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10044
10045
|
createBaseVNode("div", _hoisted_3$v, [
|
|
10045
10046
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
10046
10047
|
var _a;
|
|
10047
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10048
|
+
return openBlock(), createBlock(_sfc_main$16, {
|
|
10048
10049
|
key: element.key,
|
|
10049
10050
|
class: "lupa-search-box-product-element",
|
|
10050
10051
|
item: _ctx.item,
|
|
@@ -10055,7 +10056,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10055
10056
|
badgeOptions.value && ((_a = badgeOptions.value) == null ? void 0 : _a.anchorElementKey) === element.key ? {
|
|
10056
10057
|
name: "badges",
|
|
10057
10058
|
fn: withCtx(() => [
|
|
10058
|
-
createVNode(_sfc_main
|
|
10059
|
+
createVNode(_sfc_main$10, {
|
|
10059
10060
|
options: badgeOptions.value,
|
|
10060
10061
|
position: "card"
|
|
10061
10062
|
}, null, 8, ["options"])
|
|
@@ -10066,7 +10067,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10066
10067
|
}), 128))
|
|
10067
10068
|
]),
|
|
10068
10069
|
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
10069
|
-
createVNode(_sfc_main$
|
|
10070
|
+
createVNode(_sfc_main$16, {
|
|
10070
10071
|
class: "lupa-search-box-product-element",
|
|
10071
10072
|
item: _ctx.item,
|
|
10072
10073
|
element: addToCartElement.value,
|
|
@@ -10075,7 +10076,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10075
10076
|
isInStock: isInStock.value
|
|
10076
10077
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
10077
10078
|
])) : createCommentVNode("", true)
|
|
10078
|
-
], 16, _hoisted_1$
|
|
10079
|
+
], 16, _hoisted_1$W);
|
|
10079
10080
|
};
|
|
10080
10081
|
}
|
|
10081
10082
|
});
|
|
@@ -10136,8 +10137,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10136
10137
|
};
|
|
10137
10138
|
return { trackSearch, trackResults, trackEvent };
|
|
10138
10139
|
});
|
|
10139
|
-
const _hoisted_1$
|
|
10140
|
-
const _sfc_main$
|
|
10140
|
+
const _hoisted_1$V = { id: "lupa-search-box-products" };
|
|
10141
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
10141
10142
|
__name: "SearchBoxProducts",
|
|
10142
10143
|
props: {
|
|
10143
10144
|
items: {},
|
|
@@ -10198,7 +10199,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10198
10199
|
handleRoutingEvent(link, event, boxRoutingBehavior.value === "event");
|
|
10199
10200
|
};
|
|
10200
10201
|
return (_ctx, _cache) => {
|
|
10201
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
10202
|
+
return openBlock(), createElementBlock("div", _hoisted_1$V, [
|
|
10202
10203
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
|
|
10203
10204
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
10204
10205
|
key: index,
|
|
@@ -10210,7 +10211,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10210
10211
|
itemClicked: handleProductClick
|
|
10211
10212
|
});
|
|
10212
10213
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
|
|
10213
|
-
return openBlock(), createBlock(_sfc_main
|
|
10214
|
+
return openBlock(), createBlock(_sfc_main$$, {
|
|
10214
10215
|
key: index,
|
|
10215
10216
|
item,
|
|
10216
10217
|
panelOptions: _ctx.panelOptions,
|
|
@@ -10219,7 +10220,52 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10219
10220
|
inputValue: _ctx.inputValue,
|
|
10220
10221
|
onProductClick: handleProductClick
|
|
10221
10222
|
}, null, 8, ["item", "panelOptions", "labels", "highlighted", "inputValue"]);
|
|
10222
|
-
}), 128))
|
|
10223
|
+
}), 128)),
|
|
10224
|
+
renderSlot(_ctx.$slots, "default")
|
|
10225
|
+
]);
|
|
10226
|
+
};
|
|
10227
|
+
}
|
|
10228
|
+
});
|
|
10229
|
+
const _hoisted_1$U = { class: "lupa-search-box-documents-go-to-results-wrapper" };
|
|
10230
|
+
const _hoisted_2$H = { key: 0 };
|
|
10231
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
10232
|
+
__name: "SearchBoxProductsGoToResultsButton",
|
|
10233
|
+
props: {
|
|
10234
|
+
options: {},
|
|
10235
|
+
panel: {}
|
|
10236
|
+
},
|
|
10237
|
+
emits: ["goToResults"],
|
|
10238
|
+
setup(__props, { emit: emit2 }) {
|
|
10239
|
+
const props = __props;
|
|
10240
|
+
const searchBoxStore = useSearchBoxStore();
|
|
10241
|
+
const { docResults } = storeToRefs(searchBoxStore);
|
|
10242
|
+
const goToResultsLabel = computed(
|
|
10243
|
+
() => {
|
|
10244
|
+
var _a, _b, _c;
|
|
10245
|
+
return (_c = (_a = props.panel.labels) == null ? void 0 : _a.goToResultsTitle) != null ? _c : (_b = props.options.labels) == null ? void 0 : _b.moreResults;
|
|
10246
|
+
}
|
|
10247
|
+
);
|
|
10248
|
+
const totalCount = computed(() => {
|
|
10249
|
+
var _a;
|
|
10250
|
+
if (!props.options.showTotalCount) {
|
|
10251
|
+
return "";
|
|
10252
|
+
}
|
|
10253
|
+
const queryKey = props.panel.queryKey;
|
|
10254
|
+
const total = queryKey ? (_a = docResults.value[queryKey]) == null ? void 0 : _a.total : "";
|
|
10255
|
+
return total ? `(${total})` : "";
|
|
10256
|
+
});
|
|
10257
|
+
const goToResults = () => {
|
|
10258
|
+
emit2("goToResults");
|
|
10259
|
+
};
|
|
10260
|
+
return (_ctx, _cache) => {
|
|
10261
|
+
return openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
10262
|
+
createBaseVNode("button", {
|
|
10263
|
+
class: "lupa-search-box-documents-go-to-results-button",
|
|
10264
|
+
onClick: goToResults
|
|
10265
|
+
}, [
|
|
10266
|
+
createTextVNode(toDisplayString(goToResultsLabel.value) + " ", 1),
|
|
10267
|
+
totalCount.value ? (openBlock(), createElementBlock("span", _hoisted_2$H, " " + toDisplayString(totalCount.value), 1)) : createCommentVNode("", true)
|
|
10268
|
+
])
|
|
10223
10269
|
]);
|
|
10224
10270
|
};
|
|
10225
10271
|
}
|
|
@@ -10228,12 +10274,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10228
10274
|
__name: "SearchBoxProductsWrapper",
|
|
10229
10275
|
props: {
|
|
10230
10276
|
panel: {},
|
|
10277
|
+
searchBoxOptions: {},
|
|
10231
10278
|
inputValue: {},
|
|
10232
10279
|
options: {},
|
|
10233
10280
|
labels: {},
|
|
10234
10281
|
debounce: {}
|
|
10235
10282
|
},
|
|
10236
|
-
emits: ["fetched"],
|
|
10283
|
+
emits: ["fetched", "product-click", "go-to-results"],
|
|
10237
10284
|
setup(__props, { emit: emit2 }) {
|
|
10238
10285
|
const props = __props;
|
|
10239
10286
|
const searchBoxStore = useSearchBoxStore();
|
|
@@ -10243,6 +10290,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10243
10290
|
var _a;
|
|
10244
10291
|
return (_a = docResults.value[props.panel.queryKey]) != null ? _a : null;
|
|
10245
10292
|
});
|
|
10293
|
+
const showGoToResultsButton = computed(() => {
|
|
10294
|
+
return props.panel.showGoToResults;
|
|
10295
|
+
});
|
|
10246
10296
|
const inputValueProp = computed(() => props.inputValue);
|
|
10247
10297
|
onMounted(() => {
|
|
10248
10298
|
getItemsDebounced();
|
|
@@ -10276,13 +10326,26 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10276
10326
|
const getItemsDebounced = debounce$1(getItems, props.debounce);
|
|
10277
10327
|
return (_ctx, _cache) => {
|
|
10278
10328
|
var _a, _b;
|
|
10279
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10329
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10280
10330
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10281
10331
|
panelOptions: _ctx.panel,
|
|
10282
10332
|
labels: _ctx.labels,
|
|
10283
10333
|
inputValue: _ctx.inputValue,
|
|
10284
|
-
onProductClick: _cache[
|
|
10285
|
-
}, createSlots({
|
|
10334
|
+
onProductClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("product-click"))
|
|
10335
|
+
}, createSlots({
|
|
10336
|
+
default: withCtx(() => {
|
|
10337
|
+
var _a2;
|
|
10338
|
+
return [
|
|
10339
|
+
showGoToResultsButton.value && ((_a2 = searchResult.value) == null ? void 0 : _a2.items.length) ? (openBlock(), createBlock(_sfc_main$Z, {
|
|
10340
|
+
key: 0,
|
|
10341
|
+
options: _ctx.searchBoxOptions,
|
|
10342
|
+
panel: _ctx.panel,
|
|
10343
|
+
onGoToResults: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("go-to-results"))
|
|
10344
|
+
}, null, 8, ["options", "panel"])) : createCommentVNode("", true)
|
|
10345
|
+
];
|
|
10346
|
+
}),
|
|
10347
|
+
_: 2
|
|
10348
|
+
}, [
|
|
10286
10349
|
_ctx.$slots.productCard ? {
|
|
10287
10350
|
name: "productCard",
|
|
10288
10351
|
fn: withCtx((props2) => [
|
|
@@ -10366,7 +10429,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10366
10429
|
});
|
|
10367
10430
|
return (_ctx, _cache) => {
|
|
10368
10431
|
var _a, _b;
|
|
10369
|
-
return openBlock(), createBlock(_sfc_main$
|
|
10432
|
+
return openBlock(), createBlock(_sfc_main$_, {
|
|
10370
10433
|
items: (_b = (_a = searchResult.value) == null ? void 0 : _a.items) != null ? _b : [],
|
|
10371
10434
|
panelOptions: documentPanelOptions.value,
|
|
10372
10435
|
labels: _ctx.labels,
|
|
@@ -10403,7 +10466,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10403
10466
|
};
|
|
10404
10467
|
const __default__$2 = {
|
|
10405
10468
|
components: {
|
|
10406
|
-
SearchBoxSuggestionsWrapper: _sfc_main$
|
|
10469
|
+
SearchBoxSuggestionsWrapper: _sfc_main$1g,
|
|
10407
10470
|
SearchBoxProductsWrapper: _sfc_main$Y,
|
|
10408
10471
|
SearchBoxRelatedSourceWrapper: _sfc_main$X
|
|
10409
10472
|
}
|
|
@@ -10580,13 +10643,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10580
10643
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
10581
10644
|
key: 2,
|
|
10582
10645
|
panel,
|
|
10646
|
+
"search-box-options": _ctx.options,
|
|
10583
10647
|
options: sdkOptions.value,
|
|
10584
10648
|
debounce: _ctx.options.debounce,
|
|
10585
10649
|
inputValue: getInput(panel),
|
|
10586
10650
|
labels: labels.value,
|
|
10587
10651
|
onFetched: _cache[1] || (_cache[1] = (data) => _ctx.$emit("fetched", data)),
|
|
10588
10652
|
onItemSelect: _cache[2] || (_cache[2] = (item) => _ctx.$emit("itemSelect", item)),
|
|
10589
|
-
onProductClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("product-click"))
|
|
10653
|
+
onProductClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("product-click")),
|
|
10654
|
+
onGoToResults: handleGoToResults
|
|
10590
10655
|
}, createSlots({ _: 2 }, [
|
|
10591
10656
|
_ctx.$slots.productCard ? {
|
|
10592
10657
|
name: "productCard",
|
|
@@ -10595,22 +10660,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10595
10660
|
]),
|
|
10596
10661
|
key: "0"
|
|
10597
10662
|
} : void 0
|
|
10598
|
-
]), 1064, ["panel", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10663
|
+
]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
|
|
10599
10664
|
], 10, _hoisted_2$G);
|
|
10600
10665
|
}), 128))
|
|
10601
10666
|
], 4),
|
|
10602
|
-
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$
|
|
10667
|
+
!unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1j, {
|
|
10603
10668
|
key: 1,
|
|
10604
10669
|
labels: labels.value
|
|
10605
10670
|
}, null, 8, ["labels"])) : createCommentVNode("", true),
|
|
10606
|
-
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$
|
|
10671
|
+
unref(hasAnyResults) || !_ctx.options.hideMoreResultsButtonOnNoResults ? (openBlock(), createBlock(_sfc_main$1m, {
|
|
10607
10672
|
key: 2,
|
|
10608
10673
|
labels: labels.value,
|
|
10609
10674
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10610
10675
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10611
10676
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10612
10677
|
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
10613
|
-
createVNode(_sfc_main$
|
|
10678
|
+
createVNode(_sfc_main$1k, {
|
|
10614
10679
|
options: _ctx.options.history,
|
|
10615
10680
|
history: history.value,
|
|
10616
10681
|
onGoToResults: handleGoToResults,
|
|
@@ -10890,7 +10955,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10890
10955
|
var _a2;
|
|
10891
10956
|
return openBlock(), createElementBlock("div", _hoisted_1$S, [
|
|
10892
10957
|
createBaseVNode("div", _hoisted_2$F, [
|
|
10893
|
-
createVNode(_sfc_main$
|
|
10958
|
+
createVNode(_sfc_main$1n, {
|
|
10894
10959
|
options: inputOptions.value,
|
|
10895
10960
|
suggestedValue: suggestedValue.value,
|
|
10896
10961
|
"can-close": (_a2 = _ctx.isSearchContainer) != null ? _a2 : false,
|
|
@@ -14047,7 +14112,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14047
14112
|
},
|
|
14048
14113
|
setup(__props) {
|
|
14049
14114
|
return (_ctx, _cache) => {
|
|
14050
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14115
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
14051
14116
|
item: _ctx.item,
|
|
14052
14117
|
options: _ctx.options,
|
|
14053
14118
|
"wrapper-class": "lupa-search-results-image-wrapper",
|
|
@@ -14689,7 +14754,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14689
14754
|
"data-cy": "lupa-search-result-product-card",
|
|
14690
14755
|
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
14691
14756
|
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
14692
|
-
createVNode(_sfc_main
|
|
14757
|
+
createVNode(_sfc_main$10, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
14693
14758
|
createBaseVNode("div", {
|
|
14694
14759
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
14695
14760
|
}, [
|
|
@@ -14710,7 +14775,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14710
14775
|
onProductEvent: handleProductEvent
|
|
14711
14776
|
}, null, 8, ["item", "element", "labels", "inStock", "link"]);
|
|
14712
14777
|
}), 128)),
|
|
14713
|
-
createVNode(_sfc_main
|
|
14778
|
+
createVNode(_sfc_main$10, {
|
|
14714
14779
|
options: badgesOptions.value,
|
|
14715
14780
|
position: "image",
|
|
14716
14781
|
class: "lupa-image-badges"
|
|
@@ -22588,7 +22653,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
22588
22653
|
class: "lupa-chat-spinner-main"
|
|
22589
22654
|
};
|
|
22590
22655
|
const _hoisted_5 = { class: "lupasearch-chat-input" };
|
|
22591
|
-
const _sfc_main$
|
|
22656
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
22592
22657
|
__name: "ChatContainer",
|
|
22593
22658
|
props: {
|
|
22594
22659
|
options: {}
|
|
@@ -29066,7 +29131,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
29066
29131
|
}
|
|
29067
29132
|
return;
|
|
29068
29133
|
}
|
|
29069
|
-
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$
|
|
29134
|
+
const instance = createVue(options.displayOptions.containerSelector, _sfc_main$1o, {
|
|
29070
29135
|
options
|
|
29071
29136
|
});
|
|
29072
29137
|
if (!instance) {
|