@getlupa/client 1.8.6 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +118 -91
- package/dist/lupaSearch.js +118 -91
- package/dist/lupaSearch.mjs +118 -91
- package/dist/lupaSearch.umd.js +118 -91
- package/package.json +2 -2
package/dist/lupaSearch.mjs
CHANGED
|
@@ -6399,6 +6399,37 @@ const inputsAreEqual = (input, possibleValues) => {
|
|
|
6399
6399
|
const normalizedInput = getNormalizedString(input);
|
|
6400
6400
|
return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
|
|
6401
6401
|
};
|
|
6402
|
+
const levenshteinDistance = (s = "", t = "") => {
|
|
6403
|
+
if (!(s == null ? void 0 : s.length)) {
|
|
6404
|
+
return t.length;
|
|
6405
|
+
}
|
|
6406
|
+
if (!(t == null ? void 0 : t.length)) {
|
|
6407
|
+
return s.length;
|
|
6408
|
+
}
|
|
6409
|
+
const arr = [];
|
|
6410
|
+
for (let i = 0; i <= t.length; i++) {
|
|
6411
|
+
arr[i] = [i];
|
|
6412
|
+
for (let j = 1; j <= s.length; j++) {
|
|
6413
|
+
arr[i][j] = i === 0 ? j : Math.min(
|
|
6414
|
+
arr[i - 1][j] + 1,
|
|
6415
|
+
arr[i][j - 1] + 1,
|
|
6416
|
+
arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)
|
|
6417
|
+
);
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
return arr[t.length][s.length];
|
|
6421
|
+
};
|
|
6422
|
+
const findClosestStringValue = (input, possibleValues, key) => {
|
|
6423
|
+
var _a;
|
|
6424
|
+
const directMatch = possibleValues.find((v) => v[key] === input);
|
|
6425
|
+
if (directMatch) {
|
|
6426
|
+
return directMatch;
|
|
6427
|
+
}
|
|
6428
|
+
const distances = possibleValues.map((v) => levenshteinDistance(`${v[key]}`, input));
|
|
6429
|
+
const minDistance = Math.min(...distances);
|
|
6430
|
+
const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
|
|
6431
|
+
return closestValue;
|
|
6432
|
+
};
|
|
6402
6433
|
const initAnalyticsTracking = (analyticsOptions) => {
|
|
6403
6434
|
try {
|
|
6404
6435
|
if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
|
|
@@ -7808,7 +7839,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
7808
7839
|
});
|
|
7809
7840
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
7810
7841
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
7811
|
-
const _hoisted_3$
|
|
7842
|
+
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
7812
7843
|
const _hoisted_4$s = ["value"];
|
|
7813
7844
|
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
7814
7845
|
const _hoisted_6$9 = {
|
|
@@ -7903,7 +7934,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
7903
7934
|
onClick: clear2
|
|
7904
7935
|
}, null, 2)
|
|
7905
7936
|
]),
|
|
7906
|
-
createBaseVNode("div", _hoisted_3$
|
|
7937
|
+
createBaseVNode("div", _hoisted_3$A, [
|
|
7907
7938
|
createBaseVNode("input", {
|
|
7908
7939
|
class: "lupa-hint",
|
|
7909
7940
|
"aria-hidden": "true",
|
|
@@ -8084,7 +8115,7 @@ const _hoisted_2$N = {
|
|
|
8084
8115
|
"data-cy": "lupa-suggestion-value",
|
|
8085
8116
|
class: "lupa-suggestion-value"
|
|
8086
8117
|
};
|
|
8087
|
-
const _hoisted_3$
|
|
8118
|
+
const _hoisted_3$z = {
|
|
8088
8119
|
key: 2,
|
|
8089
8120
|
class: "lupa-suggestion-facet",
|
|
8090
8121
|
"data-cy": "lupa-suggestion-facet"
|
|
@@ -8134,7 +8165,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
8134
8165
|
"data-cy": "lupa-suggestion-value",
|
|
8135
8166
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
8136
8167
|
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8137
|
-
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
8168
|
+
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8138
8169
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8139
8170
|
createBaseVNode("span", _hoisted_5$f, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8140
8171
|
])) : createCommentVNode("", true)
|
|
@@ -8548,7 +8579,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
8548
8579
|
});
|
|
8549
8580
|
const _hoisted_1$11 = ["innerHTML"];
|
|
8550
8581
|
const _hoisted_2$K = { key: 0 };
|
|
8551
|
-
const _hoisted_3$
|
|
8582
|
+
const _hoisted_3$y = { key: 1 };
|
|
8552
8583
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
8553
8584
|
const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
|
|
8554
8585
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
@@ -8581,7 +8612,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
8581
8612
|
key: 1,
|
|
8582
8613
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
8583
8614
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
8584
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
8615
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
8585
8616
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
8586
8617
|
createBaseVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
|
|
8587
8618
|
]))
|
|
@@ -8806,7 +8837,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
8806
8837
|
});
|
|
8807
8838
|
const _hoisted_1$$ = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
8808
8839
|
const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
|
|
8809
|
-
const _hoisted_3$
|
|
8840
|
+
const _hoisted_3$x = ["onClick", "disabled"];
|
|
8810
8841
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
8811
8842
|
__name: "SearchBoxProductAddToCart",
|
|
8812
8843
|
props: {
|
|
@@ -8842,7 +8873,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
8842
8873
|
"data-cy": "lupa-add-to-cart",
|
|
8843
8874
|
type: "button",
|
|
8844
8875
|
disabled: !inStockValue.value || loading.value
|
|
8845
|
-
}, toDisplayString(label.value), 11, _hoisted_3$
|
|
8876
|
+
}, toDisplayString(label.value), 11, _hoisted_3$x)
|
|
8846
8877
|
])
|
|
8847
8878
|
]);
|
|
8848
8879
|
};
|
|
@@ -8921,7 +8952,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
|
|
|
8921
8952
|
}));
|
|
8922
8953
|
const _hoisted_1$_ = ["href"];
|
|
8923
8954
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
8924
|
-
const _hoisted_3$
|
|
8955
|
+
const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
|
|
8925
8956
|
const _hoisted_4$p = {
|
|
8926
8957
|
key: 0,
|
|
8927
8958
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
@@ -8994,7 +9025,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
8994
9025
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
8995
9026
|
}), 128))
|
|
8996
9027
|
]),
|
|
8997
|
-
createBaseVNode("div", _hoisted_3$
|
|
9028
|
+
createBaseVNode("div", _hoisted_3$w, [
|
|
8998
9029
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
8999
9030
|
return openBlock(), createBlock(_sfc_main$13, {
|
|
9000
9031
|
class: "lupa-search-box-product-element",
|
|
@@ -9238,7 +9269,7 @@ const _hoisted_1$Y = {
|
|
|
9238
9269
|
id: "lupa-search-box-panel"
|
|
9239
9270
|
};
|
|
9240
9271
|
const _hoisted_2$H = ["data-cy"];
|
|
9241
|
-
const _hoisted_3$
|
|
9272
|
+
const _hoisted_3$v = {
|
|
9242
9273
|
key: 0,
|
|
9243
9274
|
class: "lupa-panel-title"
|
|
9244
9275
|
};
|
|
@@ -9390,7 +9421,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9390
9421
|
]),
|
|
9391
9422
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9392
9423
|
}, [
|
|
9393
|
-
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
9424
|
+
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
|
|
9394
9425
|
panel.queryKey ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9395
9426
|
key: 1,
|
|
9396
9427
|
panel,
|
|
@@ -9533,13 +9564,16 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
9533
9564
|
suggestedValue.value = defaultSuggestedValue;
|
|
9534
9565
|
};
|
|
9535
9566
|
const handleKeyDown = (e) => {
|
|
9567
|
+
var _a2, _b;
|
|
9536
9568
|
if (!opened.value) {
|
|
9537
9569
|
return;
|
|
9538
9570
|
}
|
|
9539
9571
|
switch (e.key) {
|
|
9540
9572
|
case "Tab":
|
|
9541
|
-
|
|
9542
|
-
|
|
9573
|
+
if ((_b = (_a2 = suggestedValue == null ? void 0 : suggestedValue.value) == null ? void 0 : _a2.item) == null ? void 0 : _b.suggestion) {
|
|
9574
|
+
e.preventDefault();
|
|
9575
|
+
selectSuggestion(__spreadProps2(__spreadValues2({}, suggestedValue.value), { override: true }));
|
|
9576
|
+
}
|
|
9543
9577
|
break;
|
|
9544
9578
|
case "Enter":
|
|
9545
9579
|
e.preventDefault();
|
|
@@ -9797,7 +9831,7 @@ const _hoisted_2$F = {
|
|
|
9797
9831
|
key: 0,
|
|
9798
9832
|
"data-cy": "suggested-search-text-label"
|
|
9799
9833
|
};
|
|
9800
|
-
const _hoisted_3$
|
|
9834
|
+
const _hoisted_3$u = {
|
|
9801
9835
|
key: 1,
|
|
9802
9836
|
"data-cy": "did-you-mean-label"
|
|
9803
9837
|
};
|
|
@@ -9844,7 +9878,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
9844
9878
|
]);
|
|
9845
9879
|
}), 128))
|
|
9846
9880
|
])) : createCommentVNode("", true),
|
|
9847
|
-
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
9881
|
+
didYouMeanValue.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
|
|
9848
9882
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
|
|
9849
9883
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
9850
9884
|
label.includes("{1}") ? (openBlock(), createElementBlock("span", {
|
|
@@ -9898,7 +9932,7 @@ const _hoisted_1$U = {
|
|
|
9898
9932
|
"data-cy": "lupa-result-page-title"
|
|
9899
9933
|
};
|
|
9900
9934
|
const _hoisted_2$D = { key: 0 };
|
|
9901
|
-
const _hoisted_3$
|
|
9935
|
+
const _hoisted_3$t = {
|
|
9902
9936
|
key: 1,
|
|
9903
9937
|
class: "lupa-results-total-count"
|
|
9904
9938
|
};
|
|
@@ -9941,7 +9975,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
9941
9975
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$U, [
|
|
9942
9976
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
9943
9977
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$D, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
9944
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
9978
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$t, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
9945
9979
|
])) : createCommentVNode("", true),
|
|
9946
9980
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$Y, {
|
|
9947
9981
|
key: 1,
|
|
@@ -9961,7 +9995,7 @@ const _hoisted_2$C = {
|
|
|
9961
9995
|
class: "lupa-current-filter-label",
|
|
9962
9996
|
"data-cy": "lupa-current-filter-label"
|
|
9963
9997
|
};
|
|
9964
|
-
const _hoisted_3$
|
|
9998
|
+
const _hoisted_3$s = {
|
|
9965
9999
|
class: "lupa-current-filter-value",
|
|
9966
10000
|
"data-cy": "lupa-current-filter-value"
|
|
9967
10001
|
};
|
|
@@ -9983,7 +10017,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
9983
10017
|
onClick: handleClick
|
|
9984
10018
|
}, "⨉"),
|
|
9985
10019
|
createBaseVNode("div", _hoisted_2$C, toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
9986
|
-
createBaseVNode("div", _hoisted_3$
|
|
10020
|
+
createBaseVNode("div", _hoisted_3$s, toDisplayString(_ctx.filter.value), 1)
|
|
9987
10021
|
]);
|
|
9988
10022
|
};
|
|
9989
10023
|
}
|
|
@@ -9993,7 +10027,7 @@ const _hoisted_2$B = {
|
|
|
9993
10027
|
key: 0,
|
|
9994
10028
|
class: "lupa-filter-count"
|
|
9995
10029
|
};
|
|
9996
|
-
const _hoisted_3$
|
|
10030
|
+
const _hoisted_3$r = {
|
|
9997
10031
|
key: 0,
|
|
9998
10032
|
class: "filter-values"
|
|
9999
10033
|
};
|
|
@@ -10062,7 +10096,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
10062
10096
|
class: normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
|
|
10063
10097
|
}, null, 2)) : createCommentVNode("", true)
|
|
10064
10098
|
]),
|
|
10065
|
-
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
10099
|
+
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
10066
10100
|
createBaseVNode("div", _hoisted_4$l, [
|
|
10067
10101
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
10068
10102
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
@@ -10130,7 +10164,7 @@ const _hoisted_1$Q = {
|
|
|
10130
10164
|
"data-cy": "lupa-category-filter"
|
|
10131
10165
|
};
|
|
10132
10166
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
10133
|
-
const _hoisted_3$
|
|
10167
|
+
const _hoisted_3$q = ["href"];
|
|
10134
10168
|
const _hoisted_4$k = ["href"];
|
|
10135
10169
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
10136
10170
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
@@ -10226,7 +10260,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
10226
10260
|
"data-cy": "lupa-category-back",
|
|
10227
10261
|
href: backUrlLink.value,
|
|
10228
10262
|
onClick: handleNavigationBack
|
|
10229
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
10263
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$q)) : createCommentVNode("", true)
|
|
10230
10264
|
]),
|
|
10231
10265
|
createBaseVNode("div", {
|
|
10232
10266
|
class: normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
|
|
@@ -10256,7 +10290,7 @@ const _hoisted_1$P = {
|
|
|
10256
10290
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
10257
10291
|
};
|
|
10258
10292
|
const _hoisted_2$z = ["placeholder"];
|
|
10259
|
-
const _hoisted_3$
|
|
10293
|
+
const _hoisted_3$p = { class: "lupa-terms-list" };
|
|
10260
10294
|
const _hoisted_4$j = ["onClick"];
|
|
10261
10295
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
10262
10296
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
@@ -10346,7 +10380,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
10346
10380
|
}, null, 8, _hoisted_2$z)), [
|
|
10347
10381
|
[vModelText, termFilter.value]
|
|
10348
10382
|
]) : createCommentVNode("", true),
|
|
10349
|
-
createBaseVNode("div", _hoisted_3$
|
|
10383
|
+
createBaseVNode("div", _hoisted_3$p, [
|
|
10350
10384
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayValues.value, (item) => {
|
|
10351
10385
|
return openBlock(), createElementBlock("div", {
|
|
10352
10386
|
class: normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
|
|
@@ -11359,7 +11393,7 @@ const _hoisted_2$y = {
|
|
|
11359
11393
|
key: 0,
|
|
11360
11394
|
class: "lupa-stats-facet-summary"
|
|
11361
11395
|
};
|
|
11362
|
-
const _hoisted_3$
|
|
11396
|
+
const _hoisted_3$o = {
|
|
11363
11397
|
key: 1,
|
|
11364
11398
|
class: "lupa-stats-facet-summary-input"
|
|
11365
11399
|
};
|
|
@@ -11545,7 +11579,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11545
11579
|
};
|
|
11546
11580
|
return (_ctx, _cache) => {
|
|
11547
11581
|
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
11548
|
-
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
11582
|
+
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
|
|
11549
11583
|
createBaseVNode("div", null, [
|
|
11550
11584
|
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
11551
11585
|
createBaseVNode("div", _hoisted_5$b, [
|
|
@@ -11613,7 +11647,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
11613
11647
|
});
|
|
11614
11648
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
11615
11649
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
11616
|
-
const _hoisted_3$
|
|
11650
|
+
const _hoisted_3$n = { class: "lupa-term-label" };
|
|
11617
11651
|
const _hoisted_4$h = {
|
|
11618
11652
|
key: 0,
|
|
11619
11653
|
class: "lupa-term-count"
|
|
@@ -11674,7 +11708,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
11674
11708
|
}, null, 2)
|
|
11675
11709
|
]),
|
|
11676
11710
|
createBaseVNode("div", _hoisted_2$x, [
|
|
11677
|
-
createBaseVNode("span", _hoisted_3$
|
|
11711
|
+
createBaseVNode("span", _hoisted_3$n, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
11678
11712
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
11679
11713
|
])
|
|
11680
11714
|
]),
|
|
@@ -11699,7 +11733,7 @@ const _hoisted_1$M = {
|
|
|
11699
11733
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
11700
11734
|
};
|
|
11701
11735
|
const _hoisted_2$w = { key: 0 };
|
|
11702
|
-
const _hoisted_3$
|
|
11736
|
+
const _hoisted_3$m = ["placeholder"];
|
|
11703
11737
|
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
11704
11738
|
__name: "HierarchyFacet",
|
|
11705
11739
|
props: {
|
|
@@ -11757,7 +11791,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
11757
11791
|
"data-cy": "lupa-term-filter",
|
|
11758
11792
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
11759
11793
|
placeholder: _ctx.options.labels.facetFilter
|
|
11760
|
-
}, null, 8, _hoisted_3$
|
|
11794
|
+
}, null, 8, _hoisted_3$m), [
|
|
11761
11795
|
[vModelText, termFilter.value]
|
|
11762
11796
|
])
|
|
11763
11797
|
])) : createCommentVNode("", true),
|
|
@@ -12125,7 +12159,7 @@ const _hoisted_1$H = {
|
|
|
12125
12159
|
class: "lupa-mobile-filter-sidebar"
|
|
12126
12160
|
};
|
|
12127
12161
|
const _hoisted_2$t = ["onClick"];
|
|
12128
|
-
const _hoisted_3$
|
|
12162
|
+
const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
|
|
12129
12163
|
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
12130
12164
|
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
12131
12165
|
const _hoisted_6$6 = {
|
|
@@ -12164,7 +12198,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12164
12198
|
class: "lupa-sidebar-close",
|
|
12165
12199
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
12166
12200
|
}, null, 8, _hoisted_2$t),
|
|
12167
|
-
createBaseVNode("div", _hoisted_3$
|
|
12201
|
+
createBaseVNode("div", _hoisted_3$l, [
|
|
12168
12202
|
createBaseVNode("div", _hoisted_4$g, [
|
|
12169
12203
|
createBaseVNode("div", _hoisted_5$9, [
|
|
12170
12204
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
@@ -12188,7 +12222,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
12188
12222
|
});
|
|
12189
12223
|
const _hoisted_1$G = { id: "lupa-search-results-breadcrumbs" };
|
|
12190
12224
|
const _hoisted_2$s = ["href", "onClick"];
|
|
12191
|
-
const _hoisted_3$
|
|
12225
|
+
const _hoisted_3$k = {
|
|
12192
12226
|
key: 1,
|
|
12193
12227
|
class: "lupa-search-results-breadcrumb-text"
|
|
12194
12228
|
};
|
|
@@ -12232,7 +12266,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
12232
12266
|
var _a;
|
|
12233
12267
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
12234
12268
|
}
|
|
12235
|
-
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
12269
|
+
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
12236
12270
|
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
|
|
12237
12271
|
]);
|
|
12238
12272
|
}), 128))
|
|
@@ -12333,7 +12367,7 @@ const _hoisted_2$r = {
|
|
|
12333
12367
|
key: 0,
|
|
12334
12368
|
class: "lupa-page-number-separator"
|
|
12335
12369
|
};
|
|
12336
|
-
const _hoisted_3$
|
|
12370
|
+
const _hoisted_3$j = ["onClick"];
|
|
12337
12371
|
const _hoisted_4$e = {
|
|
12338
12372
|
key: 0,
|
|
12339
12373
|
class: "lupa-page-number-separator"
|
|
@@ -12437,7 +12471,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
12437
12471
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
12438
12472
|
]),
|
|
12439
12473
|
"data-cy": "lupa-page-number"
|
|
12440
|
-
}, toDisplayString(page), 11, _hoisted_3$
|
|
12474
|
+
}, toDisplayString(page), 11, _hoisted_3$j);
|
|
12441
12475
|
}), 128)),
|
|
12442
12476
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
12443
12477
|
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
|
|
@@ -12464,7 +12498,7 @@ const _hoisted_1$B = {
|
|
|
12464
12498
|
"data-cy": "lupa-search-results-page-size"
|
|
12465
12499
|
};
|
|
12466
12500
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
12467
|
-
const _hoisted_3$
|
|
12501
|
+
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
12468
12502
|
const _hoisted_4$d = ["aria-label"];
|
|
12469
12503
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
12470
12504
|
__name: "SearchResultsPageSize",
|
|
@@ -12485,7 +12519,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
12485
12519
|
return (_ctx, _cache) => {
|
|
12486
12520
|
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
12487
12521
|
createBaseVNode("div", _hoisted_2$q, [
|
|
12488
|
-
createBaseVNode("label", _hoisted_3$
|
|
12522
|
+
createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.label), 1),
|
|
12489
12523
|
createBaseVNode("select", {
|
|
12490
12524
|
class: "lupa-select-dropdown",
|
|
12491
12525
|
"aria-label": _ctx.label,
|
|
@@ -12508,7 +12542,7 @@ const _hoisted_1$A = {
|
|
|
12508
12542
|
class: "lupa-search-results-sort"
|
|
12509
12543
|
};
|
|
12510
12544
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
12511
|
-
const _hoisted_3$
|
|
12545
|
+
const _hoisted_3$h = { class: "lupa-select-label" };
|
|
12512
12546
|
const _hoisted_4$c = ["aria-label"];
|
|
12513
12547
|
const _hoisted_5$8 = ["value"];
|
|
12514
12548
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
@@ -12561,7 +12595,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12561
12595
|
return (_ctx, _cache) => {
|
|
12562
12596
|
return openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
12563
12597
|
createBaseVNode("div", _hoisted_2$p, [
|
|
12564
|
-
createBaseVNode("label", _hoisted_3$
|
|
12598
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(_ctx.options.label), 1),
|
|
12565
12599
|
withDirectives(createBaseVNode("select", {
|
|
12566
12600
|
class: "lupa-select-dropdown",
|
|
12567
12601
|
"aria-label": _ctx.options.label,
|
|
@@ -12586,7 +12620,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
12586
12620
|
});
|
|
12587
12621
|
const _hoisted_1$z = { class: "lupa-toolbar-left" };
|
|
12588
12622
|
const _hoisted_2$o = { key: 1 };
|
|
12589
|
-
const _hoisted_3$
|
|
12623
|
+
const _hoisted_3$g = { key: 3 };
|
|
12590
12624
|
const _hoisted_4$b = { key: 5 };
|
|
12591
12625
|
const _hoisted_5$7 = { class: "lupa-toolbar-right" };
|
|
12592
12626
|
const _hoisted_6$5 = { key: 1 };
|
|
@@ -12697,7 +12731,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12697
12731
|
label: searchSummaryLabel.value,
|
|
12698
12732
|
clearable: unref(hasAnyFilter) && showFilterClear.value,
|
|
12699
12733
|
onClear: handleClearAll
|
|
12700
|
-
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
12734
|
+
}, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$g)),
|
|
12701
12735
|
displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
|
|
12702
12736
|
key: 4,
|
|
12703
12737
|
options: paginationOptions.value.pageSelect,
|
|
@@ -12727,7 +12761,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
12727
12761
|
});
|
|
12728
12762
|
const _hoisted_1$y = { class: "lupa-badge-title" };
|
|
12729
12763
|
const _hoisted_2$n = ["src"];
|
|
12730
|
-
const _hoisted_3$
|
|
12764
|
+
const _hoisted_3$f = { key: 1 };
|
|
12731
12765
|
const _hoisted_4$a = {
|
|
12732
12766
|
key: 0,
|
|
12733
12767
|
class: "lupa-badge-full-text"
|
|
@@ -12770,7 +12804,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12770
12804
|
key: 0,
|
|
12771
12805
|
src: image.value
|
|
12772
12806
|
}, null, 8, _hoisted_2$n)) : createCommentVNode("", true),
|
|
12773
|
-
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
12807
|
+
hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
|
|
12774
12808
|
]),
|
|
12775
12809
|
hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
|
|
12776
12810
|
], 6);
|
|
@@ -12997,7 +13031,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12997
13031
|
});
|
|
12998
13032
|
const _hoisted_1$s = ["innerHTML"];
|
|
12999
13033
|
const _hoisted_2$l = ["title"];
|
|
13000
|
-
const _hoisted_3$
|
|
13034
|
+
const _hoisted_3$e = {
|
|
13001
13035
|
key: 0,
|
|
13002
13036
|
class: "lupa-search-results-product-title-text"
|
|
13003
13037
|
};
|
|
@@ -13041,7 +13075,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
13041
13075
|
style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
13042
13076
|
title: title.value
|
|
13043
13077
|
}, [
|
|
13044
|
-
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
13078
|
+
!_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(title.value), 1)) : createCommentVNode("", true),
|
|
13045
13079
|
_ctx.options.link ? (openBlock(), createElementBlock("a", {
|
|
13046
13080
|
key: 1,
|
|
13047
13081
|
href: _ctx.link,
|
|
@@ -13087,7 +13121,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
13087
13121
|
});
|
|
13088
13122
|
const _hoisted_1$q = { id: "lupa-search-results-rating" };
|
|
13089
13123
|
const _hoisted_2$k = { class: "lupa-ratings" };
|
|
13090
|
-
const _hoisted_3$
|
|
13124
|
+
const _hoisted_3$d = { class: "lupa-ratings-base" };
|
|
13091
13125
|
const _hoisted_4$8 = ["innerHTML"];
|
|
13092
13126
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
13093
13127
|
const _hoisted_6$4 = ["innerHTML"];
|
|
@@ -13126,7 +13160,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13126
13160
|
return (_ctx, _cache) => {
|
|
13127
13161
|
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
13128
13162
|
createBaseVNode("div", _hoisted_2$k, [
|
|
13129
|
-
createBaseVNode("div", _hoisted_3$
|
|
13163
|
+
createBaseVNode("div", _hoisted_3$d, [
|
|
13130
13164
|
(openBlock(true), createElementBlock(Fragment, null, renderList(baseStars.value, (star, index) => {
|
|
13131
13165
|
return openBlock(), createElementBlock("div", {
|
|
13132
13166
|
key: index,
|
|
@@ -13214,7 +13248,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
13214
13248
|
});
|
|
13215
13249
|
const _hoisted_1$n = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
13216
13250
|
const _hoisted_2$j = { class: "lupa-search-results-product-addtocart" };
|
|
13217
|
-
const _hoisted_3$
|
|
13251
|
+
const _hoisted_3$c = ["onClick", "disabled"];
|
|
13218
13252
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
13219
13253
|
__name: "SearchResultsProductAddToCart",
|
|
13220
13254
|
props: {
|
|
@@ -13249,7 +13283,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
13249
13283
|
class: normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
13250
13284
|
"data-cy": "lupa-add-to-cart",
|
|
13251
13285
|
disabled: !inStockValue.value || loading.value
|
|
13252
|
-
}, toDisplayString(label.value), 11, _hoisted_3$
|
|
13286
|
+
}, toDisplayString(label.value), 11, _hoisted_3$c)
|
|
13253
13287
|
])
|
|
13254
13288
|
]);
|
|
13255
13289
|
};
|
|
@@ -13257,7 +13291,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
13257
13291
|
});
|
|
13258
13292
|
const _hoisted_1$m = ["innerHTML"];
|
|
13259
13293
|
const _hoisted_2$i = { key: 0 };
|
|
13260
|
-
const _hoisted_3$
|
|
13294
|
+
const _hoisted_3$b = { key: 1 };
|
|
13261
13295
|
const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
|
|
13262
13296
|
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
13263
13297
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
@@ -13302,7 +13336,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
13302
13336
|
key: 1,
|
|
13303
13337
|
class: className.value
|
|
13304
13338
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
13305
|
-
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
13339
|
+
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$b, [
|
|
13306
13340
|
createBaseVNode("div", _hoisted_4$7, toDisplayString(label.value), 1),
|
|
13307
13341
|
createBaseVNode("div", _hoisted_5$5, toDisplayString(text.value), 1)
|
|
13308
13342
|
]))
|
|
@@ -13341,7 +13375,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
13341
13375
|
});
|
|
13342
13376
|
const _hoisted_1$k = { id: "lupa-search-results-rating" };
|
|
13343
13377
|
const _hoisted_2$h = ["innerHTML"];
|
|
13344
|
-
const _hoisted_3$
|
|
13378
|
+
const _hoisted_3$a = { class: "lupa-ratings" };
|
|
13345
13379
|
const _hoisted_4$6 = ["href"];
|
|
13346
13380
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
13347
13381
|
__name: "SearchResultsProductSingleStarRating",
|
|
@@ -13376,7 +13410,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
13376
13410
|
innerHTML: star.value,
|
|
13377
13411
|
class: "lupa-rating lupa-rating-highlighted"
|
|
13378
13412
|
}, null, 8, _hoisted_2$h),
|
|
13379
|
-
createBaseVNode("div", _hoisted_3$
|
|
13413
|
+
createBaseVNode("div", _hoisted_3$a, toDisplayString(rating.value), 1),
|
|
13380
13414
|
createBaseVNode("a", {
|
|
13381
13415
|
href: ratingLink.value,
|
|
13382
13416
|
class: "lupa-total-ratings"
|
|
@@ -13474,7 +13508,7 @@ const _hoisted_2$g = {
|
|
|
13474
13508
|
key: 0,
|
|
13475
13509
|
class: "lupa-out-of-stock"
|
|
13476
13510
|
};
|
|
13477
|
-
const _hoisted_3$
|
|
13511
|
+
const _hoisted_3$9 = { class: "lupa-search-result-product-details-section" };
|
|
13478
13512
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
13479
13513
|
__name: "SearchResultsProductCard",
|
|
13480
13514
|
props: {
|
|
@@ -13650,7 +13684,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13650
13684
|
}, null, 8, ["options"]),
|
|
13651
13685
|
((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (openBlock(), createElementBlock("div", _hoisted_2$g, toDisplayString(labels.value.outOfStock), 1)) : createCommentVNode("", true)
|
|
13652
13686
|
], 8, _hoisted_1$j),
|
|
13653
|
-
createBaseVNode("div", _hoisted_3$
|
|
13687
|
+
createBaseVNode("div", _hoisted_3$9, [
|
|
13654
13688
|
(openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
|
|
13655
13689
|
return openBlock(), createBlock(_sfc_main$l, {
|
|
13656
13690
|
class: "lupa-search-results-product-element",
|
|
@@ -13693,7 +13727,7 @@ const _hoisted_1$i = {
|
|
|
13693
13727
|
"data-cy": "lupa-search-results-similar-queries"
|
|
13694
13728
|
};
|
|
13695
13729
|
const _hoisted_2$f = { class: "lupa-similar-queries-label" };
|
|
13696
|
-
const _hoisted_3$
|
|
13730
|
+
const _hoisted_3$8 = {
|
|
13697
13731
|
class: "lupa-similar-query-label",
|
|
13698
13732
|
"data-cy": "lupa-similar-query-label"
|
|
13699
13733
|
};
|
|
@@ -13738,7 +13772,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13738
13772
|
createBaseVNode("div", _hoisted_2$f, toDisplayString(_ctx.labels.similarQueries), 1),
|
|
13739
13773
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarQueries.value, (similarQuery, index) => {
|
|
13740
13774
|
return openBlock(), createElementBlock("div", { key: index }, [
|
|
13741
|
-
createBaseVNode("div", _hoisted_3$
|
|
13775
|
+
createBaseVNode("div", _hoisted_3$8, [
|
|
13742
13776
|
createBaseVNode("span", null, toDisplayString(similarQueryLabel.value), 1),
|
|
13743
13777
|
createBaseVNode("span", {
|
|
13744
13778
|
id: "lupa-similar-query-text-component",
|
|
@@ -13927,7 +13961,7 @@ const _hoisted_1$e = {
|
|
|
13927
13961
|
"data-cy": "lupa-search-results-similar-results"
|
|
13928
13962
|
};
|
|
13929
13963
|
const _hoisted_2$c = { class: "lupa-similar-results-label" };
|
|
13930
|
-
const _hoisted_3$
|
|
13964
|
+
const _hoisted_3$7 = {
|
|
13931
13965
|
class: "lupa-products",
|
|
13932
13966
|
"data-cy": "lupa-products"
|
|
13933
13967
|
};
|
|
@@ -13949,7 +13983,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
13949
13983
|
return (_ctx, _cache) => {
|
|
13950
13984
|
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
13951
13985
|
createBaseVNode("div", _hoisted_2$c, toDisplayString(_ctx.labels.similarResultsLabel), 1),
|
|
13952
|
-
createBaseVNode("div", _hoisted_3$
|
|
13986
|
+
createBaseVNode("div", _hoisted_3$7, [
|
|
13953
13987
|
(openBlock(true), createElementBlock(Fragment, null, renderList(similarResults.value.items, (product, index) => {
|
|
13954
13988
|
return openBlock(), createBlock(_sfc_main$k, {
|
|
13955
13989
|
style: normalizeStyle(_ctx.columnSize),
|
|
@@ -13968,7 +14002,7 @@ const _hoisted_2$b = {
|
|
|
13968
14002
|
class: "lupa-products",
|
|
13969
14003
|
"data-cy": "lupa-products"
|
|
13970
14004
|
};
|
|
13971
|
-
const _hoisted_3$
|
|
14005
|
+
const _hoisted_3$6 = {
|
|
13972
14006
|
key: 0,
|
|
13973
14007
|
class: "lupa-empty-results",
|
|
13974
14008
|
"data-cy": "lupa-no-results-in-page"
|
|
@@ -14131,7 +14165,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
14131
14165
|
}, null, 8, ["style", "product", "options"]);
|
|
14132
14166
|
}), 128))
|
|
14133
14167
|
]),
|
|
14134
|
-
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
14168
|
+
unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
14135
14169
|
createTextVNode(toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
|
|
14136
14170
|
_ctx.options.labels.backToFirstPage ? (openBlock(), createElementBlock("span", {
|
|
14137
14171
|
key: 0,
|
|
@@ -14177,7 +14211,7 @@ const _hoisted_2$a = {
|
|
|
14177
14211
|
key: 0,
|
|
14178
14212
|
class: "lupa-category-back"
|
|
14179
14213
|
};
|
|
14180
|
-
const _hoisted_3$
|
|
14214
|
+
const _hoisted_3$5 = ["href"];
|
|
14181
14215
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
14182
14216
|
__name: "CategoryTopFilters",
|
|
14183
14217
|
props: {
|
|
@@ -14216,7 +14250,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
14216
14250
|
"data-cy": "lupa-category-back",
|
|
14217
14251
|
href: backUrlLink.value,
|
|
14218
14252
|
onClick: handleNavigationBack
|
|
14219
|
-
}, toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
14253
|
+
}, toDisplayString(backTitle.value), 9, _hoisted_3$5)
|
|
14220
14254
|
])) : createCommentVNode("", true),
|
|
14221
14255
|
createVNode(_sfc_main$C, {
|
|
14222
14256
|
class: "lupa-toolbar-mobile",
|
|
@@ -14237,7 +14271,7 @@ const _hoisted_2$9 = {
|
|
|
14237
14271
|
id: "lupa-search-results",
|
|
14238
14272
|
class: "top-layout-wrapper"
|
|
14239
14273
|
};
|
|
14240
|
-
const _hoisted_3$
|
|
14274
|
+
const _hoisted_3$4 = { class: "search-content" };
|
|
14241
14275
|
const _hoisted_4$3 = { id: "lupa-search-results" };
|
|
14242
14276
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
14243
14277
|
__name: "SearchResults",
|
|
@@ -14476,7 +14510,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14476
14510
|
ref_key: "searchResultsFilters",
|
|
14477
14511
|
ref: searchResultsFilters
|
|
14478
14512
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
14479
|
-
createBaseVNode("div", _hoisted_3$
|
|
14513
|
+
createBaseVNode("div", _hoisted_3$4, [
|
|
14480
14514
|
createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
14481
14515
|
createVNode(_sfc_main$X, {
|
|
14482
14516
|
options: _ctx.options,
|
|
@@ -20967,12 +21001,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
20967
21001
|
});
|
|
20968
21002
|
const _hoisted_1$7 = { class: "lupa-chat-spinner" };
|
|
20969
21003
|
const _hoisted_2$5 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
|
|
20970
|
-
const _hoisted_3$
|
|
21004
|
+
const _hoisted_3$3 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
|
|
20971
21005
|
const _hoisted_4$2 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
|
|
20972
21006
|
const _hoisted_5$2 = /* @__PURE__ */ createBaseVNode("div", null, null, -1);
|
|
20973
21007
|
const _hoisted_6$1 = [
|
|
20974
21008
|
_hoisted_2$5,
|
|
20975
|
-
_hoisted_3$
|
|
21009
|
+
_hoisted_3$3,
|
|
20976
21010
|
_hoisted_4$2,
|
|
20977
21011
|
_hoisted_5$2
|
|
20978
21012
|
];
|
|
@@ -20996,7 +21030,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
20996
21030
|
});
|
|
20997
21031
|
const _hoisted_1$6 = { class: "lupa-chat-input-container" };
|
|
20998
21032
|
const _hoisted_2$4 = { id: "lupa-search-box-input" };
|
|
20999
|
-
const _hoisted_3$
|
|
21033
|
+
const _hoisted_3$2 = {
|
|
21000
21034
|
key: 0,
|
|
21001
21035
|
class: "lupa-chat-form-submit"
|
|
21002
21036
|
};
|
|
@@ -21032,7 +21066,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21032
21066
|
[vModelText, inputValue.value]
|
|
21033
21067
|
])
|
|
21034
21068
|
]),
|
|
21035
|
-
!_ctx.disabled ? (openBlock(), createElementBlock("button", _hoisted_3$
|
|
21069
|
+
!_ctx.disabled ? (openBlock(), createElementBlock("button", _hoisted_3$2, "Ask LupaChat")) : (openBlock(), createBlock(_sfc_main$7, {
|
|
21036
21070
|
key: 1,
|
|
21037
21071
|
small: true
|
|
21038
21072
|
}))
|
|
@@ -21199,7 +21233,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
21199
21233
|
});
|
|
21200
21234
|
const _hoisted_1$4 = { class: "lupa-chat-content-entry-phrase" };
|
|
21201
21235
|
const _hoisted_2$3 = { class: "lupa-chat-phrase-title" };
|
|
21202
|
-
const _hoisted_3$
|
|
21236
|
+
const _hoisted_3$1 = {
|
|
21203
21237
|
key: 0,
|
|
21204
21238
|
class: "alert"
|
|
21205
21239
|
};
|
|
@@ -21300,7 +21334,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
21300
21334
|
createBaseVNode("div", _hoisted_2$3, [
|
|
21301
21335
|
createBaseVNode("h3", null, toDisplayString(displayPhrase.value), 1),
|
|
21302
21336
|
createBaseVNode("sub", null, toDisplayString(usedAlternativePhrases.value.join(", ")), 1),
|
|
21303
|
-
usedPartialResults.value ? (openBlock(), createElementBlock("sub", _hoisted_3$
|
|
21337
|
+
usedPartialResults.value ? (openBlock(), createElementBlock("sub", _hoisted_3$1, "Including partial matches - which might not be what you are looking for")) : createCommentVNode("", true)
|
|
21304
21338
|
]),
|
|
21305
21339
|
createBaseVNode("div", null, [
|
|
21306
21340
|
createVNode(_sfc_main$5, {
|
|
@@ -21319,7 +21353,7 @@ const _sfc_main$4$1 = /* @__PURE__ */ defineComponent({
|
|
|
21319
21353
|
});
|
|
21320
21354
|
const _hoisted_1$3 = { class: "lupa-chat-best-matches lupa-chat-content-entry" };
|
|
21321
21355
|
const _hoisted_2$2 = /* @__PURE__ */ createBaseVNode("h3", null, "Best matches", -1);
|
|
21322
|
-
const
|
|
21356
|
+
const MAX_SOURCES_FOR_BEST_ITEM_MATCHING = 250;
|
|
21323
21357
|
const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
21324
21358
|
__name: "ChatContentEntry",
|
|
21325
21359
|
props: {
|
|
@@ -21349,20 +21383,18 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
|
21349
21383
|
return (_a = props.options.displayOptions.titleKey) != null ? _a : "title";
|
|
21350
21384
|
});
|
|
21351
21385
|
const loadFinalRecommendations = () => __async(this, null, function* () {
|
|
21352
|
-
var _a;
|
|
21386
|
+
var _a, _b;
|
|
21353
21387
|
try {
|
|
21354
|
-
const productResultStrings = loadedResults.value.map(
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
}
|
|
21359
|
-
);
|
|
21388
|
+
const productResultStrings = (_a = loadedResults.value.map((result) => {
|
|
21389
|
+
var _a2, _b2;
|
|
21390
|
+
return (_b2 = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
|
|
21391
|
+
})) == null ? void 0 : _a.slice(0, MAX_SOURCES_FOR_BEST_ITEM_MATCHING);
|
|
21360
21392
|
const { products } = yield ChatService.suggestBestProductMatches(
|
|
21361
21393
|
props.options.sdkOptions,
|
|
21362
21394
|
{
|
|
21363
21395
|
initialQuery: props.entry.userInput,
|
|
21364
21396
|
productStrings: productResultStrings,
|
|
21365
|
-
messageHistory: (
|
|
21397
|
+
messageHistory: (_b = props.history) != null ? _b : [],
|
|
21366
21398
|
queryKey: props.options.displayOptions.queryKey
|
|
21367
21399
|
},
|
|
21368
21400
|
props.options.chatSettings
|
|
@@ -21375,13 +21407,9 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
|
21375
21407
|
});
|
|
21376
21408
|
const bestMatchProducts = computed(() => {
|
|
21377
21409
|
return bestMatches.value.map((productName) => {
|
|
21378
|
-
return loadedResults.value
|
|
21410
|
+
return findClosestStringValue(productName, loadedResults.value, titleKey.value);
|
|
21379
21411
|
}).filter(Boolean);
|
|
21380
21412
|
});
|
|
21381
|
-
const explanation = computed(() => {
|
|
21382
|
-
var _a, _b;
|
|
21383
|
-
return ((_a = bestMatches.value) == null ? void 0 : _a.length) > 0 && !bestMatchProducts.value.length ? (_b = bestMatches == null ? void 0 : bestMatches.value) == null ? void 0 : _b[0] : "";
|
|
21384
|
-
});
|
|
21385
21413
|
return (_ctx, _cache) => {
|
|
21386
21414
|
return openBlock(), createElementBlock("div", null, [
|
|
21387
21415
|
createBaseVNode("ul", null, [
|
|
@@ -21401,13 +21429,12 @@ const _sfc_main$3$1 = /* @__PURE__ */ defineComponent({
|
|
|
21401
21429
|
]),
|
|
21402
21430
|
createBaseVNode("section", _hoisted_1$3, [
|
|
21403
21431
|
_hoisted_2$2,
|
|
21404
|
-
explanation.value ? (openBlock(), createElementBlock("p", _hoisted_3$1, toDisplayString(explanation.value), 1)) : createCommentVNode("", true),
|
|
21405
21432
|
loading.value ? (openBlock(), createBlock(_sfc_main$7, {
|
|
21406
|
-
key:
|
|
21433
|
+
key: 0,
|
|
21407
21434
|
message: "Selecting the best matches for you. This might take a few seconds."
|
|
21408
21435
|
})) : createCommentVNode("", true),
|
|
21409
21436
|
bestMatches.value.length ? (openBlock(), createBlock(_sfc_main$5, {
|
|
21410
|
-
key:
|
|
21437
|
+
key: 1,
|
|
21411
21438
|
"search-results": bestMatchProducts.value,
|
|
21412
21439
|
options: _ctx.options.displayOptions
|
|
21413
21440
|
}, null, 8, ["search-results", "options"])) : createCommentVNode("", true)
|