@getlupa/vue 0.8.4 → 0.8.5
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.js +113 -89
- package/dist/lupaSearch.mjs +113 -89
- package/dist/src/utils/string.utils.d.ts +1 -0
- package/package.json +1 -1
package/dist/lupaSearch.js
CHANGED
|
@@ -1757,6 +1757,37 @@ const inputsAreEqual = (input, possibleValues) => {
|
|
|
1757
1757
|
const normalizedInput = getNormalizedString(input);
|
|
1758
1758
|
return possibleValues.some((v) => getNormalizedString(v) === normalizedInput);
|
|
1759
1759
|
};
|
|
1760
|
+
const levenshteinDistance = (s = "", t = "") => {
|
|
1761
|
+
if (!(s == null ? void 0 : s.length)) {
|
|
1762
|
+
return t.length;
|
|
1763
|
+
}
|
|
1764
|
+
if (!(t == null ? void 0 : t.length)) {
|
|
1765
|
+
return s.length;
|
|
1766
|
+
}
|
|
1767
|
+
const arr = [];
|
|
1768
|
+
for (let i = 0; i <= t.length; i++) {
|
|
1769
|
+
arr[i] = [i];
|
|
1770
|
+
for (let j = 1; j <= s.length; j++) {
|
|
1771
|
+
arr[i][j] = i === 0 ? j : Math.min(
|
|
1772
|
+
arr[i - 1][j] + 1,
|
|
1773
|
+
arr[i][j - 1] + 1,
|
|
1774
|
+
arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)
|
|
1775
|
+
);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
return arr[t.length][s.length];
|
|
1779
|
+
};
|
|
1780
|
+
const findClosestStringValue = (input, possibleValues, key) => {
|
|
1781
|
+
var _a;
|
|
1782
|
+
const directMatch = possibleValues.find((v) => v[key] === input);
|
|
1783
|
+
if (directMatch) {
|
|
1784
|
+
return directMatch;
|
|
1785
|
+
}
|
|
1786
|
+
const distances = possibleValues.map((v) => levenshteinDistance(`${v[key]}`, input));
|
|
1787
|
+
const minDistance = Math.min(...distances);
|
|
1788
|
+
const closestValue = (_a = possibleValues.filter((_, i) => distances[i] === minDistance)) == null ? void 0 : _a[0];
|
|
1789
|
+
return closestValue;
|
|
1790
|
+
};
|
|
1760
1791
|
const initAnalyticsTracking = (analyticsOptions) => {
|
|
1761
1792
|
try {
|
|
1762
1793
|
if (analyticsOptions == null ? void 0 : analyticsOptions.enabled) {
|
|
@@ -3166,7 +3197,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
3166
3197
|
});
|
|
3167
3198
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
3168
3199
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
3169
|
-
const _hoisted_3$
|
|
3200
|
+
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
3170
3201
|
const _hoisted_4$s = ["value"];
|
|
3171
3202
|
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
3172
3203
|
const _hoisted_6$9 = {
|
|
@@ -3261,7 +3292,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
3261
3292
|
onClick: clear
|
|
3262
3293
|
}, null, 2)
|
|
3263
3294
|
]),
|
|
3264
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
3295
|
+
vue.createElementVNode("div", _hoisted_3$A, [
|
|
3265
3296
|
vue.createElementVNode("input", {
|
|
3266
3297
|
class: "lupa-hint",
|
|
3267
3298
|
"aria-hidden": "true",
|
|
@@ -3442,7 +3473,7 @@ const _hoisted_2$N = {
|
|
|
3442
3473
|
"data-cy": "lupa-suggestion-value",
|
|
3443
3474
|
class: "lupa-suggestion-value"
|
|
3444
3475
|
};
|
|
3445
|
-
const _hoisted_3$
|
|
3476
|
+
const _hoisted_3$z = {
|
|
3446
3477
|
key: 2,
|
|
3447
3478
|
class: "lupa-suggestion-facet",
|
|
3448
3479
|
"data-cy": "lupa-suggestion-facet"
|
|
@@ -3492,7 +3523,7 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
|
|
|
3492
3523
|
"data-cy": "lupa-suggestion-value",
|
|
3493
3524
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
3494
3525
|
}, null, 8, _hoisted_1$18)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$N, vue.toDisplayString(_ctx.suggestion.display), 1)),
|
|
3495
|
-
_ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
3526
|
+
_ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
3496
3527
|
vue.createElementVNode("span", _hoisted_4$r, vue.toDisplayString(facetLabel.value), 1),
|
|
3497
3528
|
vue.createElementVNode("span", _hoisted_5$f, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3498
3529
|
])) : vue.createCommentVNode("", true)
|
|
@@ -3906,7 +3937,7 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3906
3937
|
});
|
|
3907
3938
|
const _hoisted_1$11 = ["innerHTML"];
|
|
3908
3939
|
const _hoisted_2$K = { key: 0 };
|
|
3909
|
-
const _hoisted_3$
|
|
3940
|
+
const _hoisted_3$y = { key: 1 };
|
|
3910
3941
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
3911
3942
|
const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
|
|
3912
3943
|
const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -3939,7 +3970,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3939
3970
|
key: 1,
|
|
3940
3971
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
3941
3972
|
}, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
3942
|
-
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
3973
|
+
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$y, [
|
|
3943
3974
|
vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(label.value), 1),
|
|
3944
3975
|
vue.createElementVNode("div", _hoisted_5$e, vue.toDisplayString(text.value), 1)
|
|
3945
3976
|
]))
|
|
@@ -4164,7 +4195,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
4164
4195
|
});
|
|
4165
4196
|
const _hoisted_1$$ = { class: "lupa-search-box-add-to-cart-wrapper" };
|
|
4166
4197
|
const _hoisted_2$J = { class: "lupa-search-box-product-addtocart" };
|
|
4167
|
-
const _hoisted_3$
|
|
4198
|
+
const _hoisted_3$x = ["onClick", "disabled"];
|
|
4168
4199
|
const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
|
|
4169
4200
|
__name: "SearchBoxProductAddToCart",
|
|
4170
4201
|
props: {
|
|
@@ -4200,7 +4231,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4200
4231
|
"data-cy": "lupa-add-to-cart",
|
|
4201
4232
|
type: "button",
|
|
4202
4233
|
disabled: !inStockValue.value || loading.value
|
|
4203
|
-
}, vue.toDisplayString(label.value), 11, _hoisted_3$
|
|
4234
|
+
}, vue.toDisplayString(label.value), 11, _hoisted_3$x)
|
|
4204
4235
|
])
|
|
4205
4236
|
]);
|
|
4206
4237
|
};
|
|
@@ -4279,7 +4310,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadV
|
|
|
4279
4310
|
}));
|
|
4280
4311
|
const _hoisted_1$_ = ["href"];
|
|
4281
4312
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
4282
|
-
const _hoisted_3$
|
|
4313
|
+
const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
|
|
4283
4314
|
const _hoisted_4$p = {
|
|
4284
4315
|
key: 0,
|
|
4285
4316
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
@@ -4352,7 +4383,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4352
4383
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
4353
4384
|
}), 128))
|
|
4354
4385
|
]),
|
|
4355
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
4386
|
+
vue.createElementVNode("div", _hoisted_3$w, [
|
|
4356
4387
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(detailElements.value, (element) => {
|
|
4357
4388
|
return vue.openBlock(), vue.createBlock(_sfc_main$13, {
|
|
4358
4389
|
class: "lupa-search-box-product-element",
|
|
@@ -4596,7 +4627,7 @@ const _hoisted_1$Y = {
|
|
|
4596
4627
|
id: "lupa-search-box-panel"
|
|
4597
4628
|
};
|
|
4598
4629
|
const _hoisted_2$H = ["data-cy"];
|
|
4599
|
-
const _hoisted_3$
|
|
4630
|
+
const _hoisted_3$v = {
|
|
4600
4631
|
key: 0,
|
|
4601
4632
|
class: "lupa-panel-title"
|
|
4602
4633
|
};
|
|
@@ -4748,7 +4779,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
4748
4779
|
]),
|
|
4749
4780
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
4750
4781
|
}, [
|
|
4751
|
-
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
4782
|
+
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, vue.toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : vue.createCommentVNode("", true),
|
|
4752
4783
|
panel.queryKey ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getComponent(panel.type)), {
|
|
4753
4784
|
key: 1,
|
|
4754
4785
|
panel,
|
|
@@ -5171,7 +5202,7 @@ const _hoisted_2$F = {
|
|
|
5171
5202
|
key: 0,
|
|
5172
5203
|
"data-cy": "suggested-search-text-label"
|
|
5173
5204
|
};
|
|
5174
|
-
const _hoisted_3$
|
|
5205
|
+
const _hoisted_3$u = {
|
|
5175
5206
|
key: 1,
|
|
5176
5207
|
"data-cy": "did-you-mean-label"
|
|
5177
5208
|
};
|
|
@@ -5218,7 +5249,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
5218
5249
|
]);
|
|
5219
5250
|
}), 128))
|
|
5220
5251
|
])) : vue.createCommentVNode("", true),
|
|
5221
|
-
didYouMeanValue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5252
|
+
didYouMeanValue.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
|
|
5222
5253
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.labels.didYouMean.split(" "), (label, index) => {
|
|
5223
5254
|
return vue.openBlock(), vue.createElementBlock("span", { key: index }, [
|
|
5224
5255
|
label.includes("{1}") ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -5272,7 +5303,7 @@ const _hoisted_1$U = {
|
|
|
5272
5303
|
"data-cy": "lupa-result-page-title"
|
|
5273
5304
|
};
|
|
5274
5305
|
const _hoisted_2$D = { key: 0 };
|
|
5275
|
-
const _hoisted_3$
|
|
5306
|
+
const _hoisted_3$t = {
|
|
5276
5307
|
key: 1,
|
|
5277
5308
|
class: "lupa-results-total-count"
|
|
5278
5309
|
};
|
|
@@ -5315,7 +5346,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
|
5315
5346
|
showSearchTitle.value ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_1$U, [
|
|
5316
5347
|
vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
5317
5348
|
queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$D, "'" + vue.toDisplayString(queryText.value) + "'", 1)) : vue.createCommentVNode("", true),
|
|
5318
|
-
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
5349
|
+
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, "(" + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5319
5350
|
])) : vue.createCommentVNode("", true),
|
|
5320
5351
|
_ctx.showSummary ? (vue.openBlock(), vue.createBlock(_sfc_main$Y, {
|
|
5321
5352
|
key: 1,
|
|
@@ -5335,7 +5366,7 @@ const _hoisted_2$C = {
|
|
|
5335
5366
|
class: "lupa-current-filter-label",
|
|
5336
5367
|
"data-cy": "lupa-current-filter-label"
|
|
5337
5368
|
};
|
|
5338
|
-
const _hoisted_3$
|
|
5369
|
+
const _hoisted_3$s = {
|
|
5339
5370
|
class: "lupa-current-filter-value",
|
|
5340
5371
|
"data-cy": "lupa-current-filter-value"
|
|
5341
5372
|
};
|
|
@@ -5357,7 +5388,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
|
|
|
5357
5388
|
onClick: handleClick
|
|
5358
5389
|
}, "⨉"),
|
|
5359
5390
|
vue.createElementVNode("div", _hoisted_2$C, vue.toDisplayString(_ctx.filter.label) + ": ", 1),
|
|
5360
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
5391
|
+
vue.createElementVNode("div", _hoisted_3$s, vue.toDisplayString(_ctx.filter.value), 1)
|
|
5361
5392
|
]);
|
|
5362
5393
|
};
|
|
5363
5394
|
}
|
|
@@ -5367,7 +5398,7 @@ const _hoisted_2$B = {
|
|
|
5367
5398
|
key: 0,
|
|
5368
5399
|
class: "lupa-filter-count"
|
|
5369
5400
|
};
|
|
5370
|
-
const _hoisted_3$
|
|
5401
|
+
const _hoisted_3$r = {
|
|
5371
5402
|
key: 0,
|
|
5372
5403
|
class: "filter-values"
|
|
5373
5404
|
};
|
|
@@ -5436,7 +5467,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
|
5436
5467
|
class: vue.normalizeClass(["lupa-filter-title-caret", isOpen.value && "open"])
|
|
5437
5468
|
}, null, 2)) : vue.createCommentVNode("", true)
|
|
5438
5469
|
]),
|
|
5439
|
-
!_ctx.expandable || isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
5470
|
+
!_ctx.expandable || isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$r, [
|
|
5440
5471
|
vue.createElementVNode("div", _hoisted_4$l, [
|
|
5441
5472
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(displayFilters), (filter) => {
|
|
5442
5473
|
return vue.openBlock(), vue.createBlock(_sfc_main$W, {
|
|
@@ -5504,7 +5535,7 @@ const _hoisted_1$Q = {
|
|
|
5504
5535
|
"data-cy": "lupa-category-filter"
|
|
5505
5536
|
};
|
|
5506
5537
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
5507
|
-
const _hoisted_3$
|
|
5538
|
+
const _hoisted_3$q = ["href"];
|
|
5508
5539
|
const _hoisted_4$k = ["href"];
|
|
5509
5540
|
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
5510
5541
|
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -5600,7 +5631,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
|
5600
5631
|
"data-cy": "lupa-category-back",
|
|
5601
5632
|
href: backUrlLink.value,
|
|
5602
5633
|
onClick: handleNavigationBack
|
|
5603
|
-
}, vue.toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
5634
|
+
}, vue.toDisplayString(backTitle.value), 9, _hoisted_3$q)) : vue.createCommentVNode("", true)
|
|
5604
5635
|
]),
|
|
5605
5636
|
vue.createElementVNode("div", {
|
|
5606
5637
|
class: vue.normalizeClass(["lupa-current-category", { "lupa-current-category-active": isActive }])
|
|
@@ -5630,7 +5661,7 @@ const _hoisted_1$P = {
|
|
|
5630
5661
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
5631
5662
|
};
|
|
5632
5663
|
const _hoisted_2$z = ["placeholder"];
|
|
5633
|
-
const _hoisted_3$
|
|
5664
|
+
const _hoisted_3$p = { class: "lupa-terms-list" };
|
|
5634
5665
|
const _hoisted_4$j = ["onClick"];
|
|
5635
5666
|
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
5636
5667
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
@@ -5720,7 +5751,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5720
5751
|
}, null, 8, _hoisted_2$z)), [
|
|
5721
5752
|
[vue.vModelText, termFilter.value]
|
|
5722
5753
|
]) : vue.createCommentVNode("", true),
|
|
5723
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
5754
|
+
vue.createElementVNode("div", _hoisted_3$p, [
|
|
5724
5755
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayValues.value, (item) => {
|
|
5725
5756
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
5726
5757
|
class: vue.normalizeClass(["lupa-facet-term", { checked: isChecked(item) }]),
|
|
@@ -6733,7 +6764,7 @@ const _hoisted_2$y = {
|
|
|
6733
6764
|
key: 0,
|
|
6734
6765
|
class: "lupa-stats-facet-summary"
|
|
6735
6766
|
};
|
|
6736
|
-
const _hoisted_3$
|
|
6767
|
+
const _hoisted_3$o = {
|
|
6737
6768
|
key: 1,
|
|
6738
6769
|
class: "lupa-stats-facet-summary-input"
|
|
6739
6770
|
};
|
|
@@ -6919,7 +6950,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6919
6950
|
};
|
|
6920
6951
|
return (_ctx, _cache) => {
|
|
6921
6952
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
|
|
6922
|
-
!isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
6953
|
+
!isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$o, [
|
|
6923
6954
|
vue.createElementVNode("div", null, [
|
|
6924
6955
|
rangeLabelFrom.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$i, vue.toDisplayString(rangeLabelFrom.value), 1)) : vue.createCommentVNode("", true),
|
|
6925
6956
|
vue.createElementVNode("div", _hoisted_5$b, [
|
|
@@ -6987,7 +7018,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6987
7018
|
});
|
|
6988
7019
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
6989
7020
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
6990
|
-
const _hoisted_3$
|
|
7021
|
+
const _hoisted_3$n = { class: "lupa-term-label" };
|
|
6991
7022
|
const _hoisted_4$h = {
|
|
6992
7023
|
key: 0,
|
|
6993
7024
|
class: "lupa-term-count"
|
|
@@ -7048,7 +7079,7 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
|
7048
7079
|
}, null, 2)
|
|
7049
7080
|
]),
|
|
7050
7081
|
vue.createElementVNode("div", _hoisted_2$x, [
|
|
7051
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
7082
|
+
vue.createElementVNode("span", _hoisted_3$n, vue.toDisplayString(_ctx.item.title) + vue.toDisplayString(" "), 1),
|
|
7052
7083
|
_ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$h, "(" + vue.toDisplayString(_ctx.item.count) + ")", 1)) : vue.createCommentVNode("", true)
|
|
7053
7084
|
])
|
|
7054
7085
|
]),
|
|
@@ -7073,7 +7104,7 @@ const _hoisted_1$M = {
|
|
|
7073
7104
|
"data-cy": "lupa-search-result-facet-term-values"
|
|
7074
7105
|
};
|
|
7075
7106
|
const _hoisted_2$w = { key: 0 };
|
|
7076
|
-
const _hoisted_3$
|
|
7107
|
+
const _hoisted_3$m = ["placeholder"];
|
|
7077
7108
|
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
7078
7109
|
__name: "HierarchyFacet",
|
|
7079
7110
|
props: {
|
|
@@ -7131,7 +7162,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
|
7131
7162
|
"data-cy": "lupa-term-filter",
|
|
7132
7163
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => termFilter.value = $event),
|
|
7133
7164
|
placeholder: _ctx.options.labels.facetFilter
|
|
7134
|
-
}, null, 8, _hoisted_3$
|
|
7165
|
+
}, null, 8, _hoisted_3$m), [
|
|
7135
7166
|
[vue.vModelText, termFilter.value]
|
|
7136
7167
|
])
|
|
7137
7168
|
])) : vue.createCommentVNode("", true),
|
|
@@ -7499,7 +7530,7 @@ const _hoisted_1$H = {
|
|
|
7499
7530
|
class: "lupa-mobile-filter-sidebar"
|
|
7500
7531
|
};
|
|
7501
7532
|
const _hoisted_2$t = ["onClick"];
|
|
7502
|
-
const _hoisted_3$
|
|
7533
|
+
const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
|
|
7503
7534
|
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
7504
7535
|
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
7505
7536
|
const _hoisted_6$6 = {
|
|
@@ -7538,7 +7569,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
7538
7569
|
class: "lupa-sidebar-close",
|
|
7539
7570
|
onClick: vue.withModifiers(handleMobileToggle, ["stop"])
|
|
7540
7571
|
}, null, 8, _hoisted_2$t),
|
|
7541
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
7572
|
+
vue.createElementVNode("div", _hoisted_3$l, [
|
|
7542
7573
|
vue.createElementVNode("div", _hoisted_4$g, [
|
|
7543
7574
|
vue.createElementVNode("div", _hoisted_5$9, [
|
|
7544
7575
|
vue.createTextVNode(vue.toDisplayString(sidebarTitle.value) + " ", 1),
|
|
@@ -7562,7 +7593,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
7562
7593
|
});
|
|
7563
7594
|
const _hoisted_1$G = { id: "lupa-search-results-breadcrumbs" };
|
|
7564
7595
|
const _hoisted_2$s = ["href", "onClick"];
|
|
7565
|
-
const _hoisted_3$
|
|
7596
|
+
const _hoisted_3$k = {
|
|
7566
7597
|
key: 1,
|
|
7567
7598
|
class: "lupa-search-results-breadcrumb-text"
|
|
7568
7599
|
};
|
|
@@ -7606,7 +7637,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
7606
7637
|
var _a;
|
|
7607
7638
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
7608
7639
|
}
|
|
7609
|
-
}, vue.toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
7640
|
+
}, vue.toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$k, vue.toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
7610
7641
|
index < breadcrumbsValue.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$f, " / ")) : vue.createCommentVNode("", true)
|
|
7611
7642
|
]);
|
|
7612
7643
|
}), 128))
|
|
@@ -7707,7 +7738,7 @@ const _hoisted_2$r = {
|
|
|
7707
7738
|
key: 0,
|
|
7708
7739
|
class: "lupa-page-number-separator"
|
|
7709
7740
|
};
|
|
7710
|
-
const _hoisted_3$
|
|
7741
|
+
const _hoisted_3$j = ["onClick"];
|
|
7711
7742
|
const _hoisted_4$e = {
|
|
7712
7743
|
key: 0,
|
|
7713
7744
|
class: "lupa-page-number-separator"
|
|
@@ -7811,7 +7842,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
7811
7842
|
page === _ctx.options.selectedPage ? "lupa-page-number-selected" : ""
|
|
7812
7843
|
]),
|
|
7813
7844
|
"data-cy": "lupa-page-number"
|
|
7814
|
-
}, vue.toDisplayString(page), 11, _hoisted_3$
|
|
7845
|
+
}, vue.toDisplayString(page), 11, _hoisted_3$j);
|
|
7815
7846
|
}), 128)),
|
|
7816
7847
|
showLastPage.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
7817
7848
|
showLastPageSeparator.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$e, "...")) : vue.createCommentVNode("", true),
|
|
@@ -7838,7 +7869,7 @@ const _hoisted_1$B = {
|
|
|
7838
7869
|
"data-cy": "lupa-search-results-page-size"
|
|
7839
7870
|
};
|
|
7840
7871
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
7841
|
-
const _hoisted_3$
|
|
7872
|
+
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
7842
7873
|
const _hoisted_4$d = ["aria-label"];
|
|
7843
7874
|
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
7844
7875
|
__name: "SearchResultsPageSize",
|
|
@@ -7859,7 +7890,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
7859
7890
|
return (_ctx, _cache) => {
|
|
7860
7891
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
|
|
7861
7892
|
vue.createElementVNode("div", _hoisted_2$q, [
|
|
7862
|
-
vue.createElementVNode("label", _hoisted_3$
|
|
7893
|
+
vue.createElementVNode("label", _hoisted_3$i, vue.toDisplayString(_ctx.label), 1),
|
|
7863
7894
|
vue.createElementVNode("select", {
|
|
7864
7895
|
class: "lupa-select-dropdown",
|
|
7865
7896
|
"aria-label": _ctx.label,
|
|
@@ -7882,7 +7913,7 @@ const _hoisted_1$A = {
|
|
|
7882
7913
|
class: "lupa-search-results-sort"
|
|
7883
7914
|
};
|
|
7884
7915
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
7885
|
-
const _hoisted_3$
|
|
7916
|
+
const _hoisted_3$h = { class: "lupa-select-label" };
|
|
7886
7917
|
const _hoisted_4$c = ["aria-label"];
|
|
7887
7918
|
const _hoisted_5$8 = ["value"];
|
|
7888
7919
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -7935,7 +7966,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
7935
7966
|
return (_ctx, _cache) => {
|
|
7936
7967
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
|
|
7937
7968
|
vue.createElementVNode("div", _hoisted_2$p, [
|
|
7938
|
-
vue.createElementVNode("label", _hoisted_3$
|
|
7969
|
+
vue.createElementVNode("label", _hoisted_3$h, vue.toDisplayString(_ctx.options.label), 1),
|
|
7939
7970
|
vue.withDirectives(vue.createElementVNode("select", {
|
|
7940
7971
|
class: "lupa-select-dropdown",
|
|
7941
7972
|
"aria-label": _ctx.options.label,
|
|
@@ -7960,7 +7991,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
7960
7991
|
});
|
|
7961
7992
|
const _hoisted_1$z = { class: "lupa-toolbar-left" };
|
|
7962
7993
|
const _hoisted_2$o = { key: 1 };
|
|
7963
|
-
const _hoisted_3$
|
|
7994
|
+
const _hoisted_3$g = { key: 3 };
|
|
7964
7995
|
const _hoisted_4$b = { key: 5 };
|
|
7965
7996
|
const _hoisted_5$7 = { class: "lupa-toolbar-right" };
|
|
7966
7997
|
const _hoisted_6$5 = { key: 1 };
|
|
@@ -8071,7 +8102,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8071
8102
|
label: searchSummaryLabel.value,
|
|
8072
8103
|
clearable: vue.unref(hasAnyFilter) && showFilterClear.value,
|
|
8073
8104
|
onClear: handleClearAll
|
|
8074
|
-
}, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
8105
|
+
}, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$g)),
|
|
8075
8106
|
displayPageSelect.value ? (vue.openBlock(), vue.createBlock(_sfc_main$F, {
|
|
8076
8107
|
key: 4,
|
|
8077
8108
|
options: paginationOptions.value.pageSelect,
|
|
@@ -8101,7 +8132,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
8101
8132
|
});
|
|
8102
8133
|
const _hoisted_1$y = { class: "lupa-badge-title" };
|
|
8103
8134
|
const _hoisted_2$n = ["src"];
|
|
8104
|
-
const _hoisted_3$
|
|
8135
|
+
const _hoisted_3$f = { key: 1 };
|
|
8105
8136
|
const _hoisted_4$a = {
|
|
8106
8137
|
key: 0,
|
|
8107
8138
|
class: "lupa-badge-full-text"
|
|
@@ -8144,7 +8175,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
|
8144
8175
|
key: 0,
|
|
8145
8176
|
src: image.value
|
|
8146
8177
|
}, null, 8, _hoisted_2$n)) : vue.createCommentVNode("", true),
|
|
8147
|
-
hasTitleText.value && showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
8178
|
+
hasTitleText.value && showTitle.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$f, vue.toDisplayString(_ctx.badge.titleText), 1)) : vue.createCommentVNode("", true)
|
|
8148
8179
|
]),
|
|
8149
8180
|
hasAdditionalText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$a, vue.toDisplayString(_ctx.badge.additionalText), 1)) : vue.createCommentVNode("", true)
|
|
8150
8181
|
], 6);
|
|
@@ -8371,7 +8402,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
8371
8402
|
});
|
|
8372
8403
|
const _hoisted_1$s = ["innerHTML"];
|
|
8373
8404
|
const _hoisted_2$l = ["title"];
|
|
8374
|
-
const _hoisted_3$
|
|
8405
|
+
const _hoisted_3$e = {
|
|
8375
8406
|
key: 0,
|
|
8376
8407
|
class: "lupa-search-results-product-title-text"
|
|
8377
8408
|
};
|
|
@@ -8415,7 +8446,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
8415
8446
|
style: vue.normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
|
|
8416
8447
|
title: title.value
|
|
8417
8448
|
}, [
|
|
8418
|
-
!_ctx.options.link ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
8449
|
+
!_ctx.options.link ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(title.value), 1)) : vue.createCommentVNode("", true),
|
|
8419
8450
|
_ctx.options.link ? (vue.openBlock(), vue.createElementBlock("a", {
|
|
8420
8451
|
key: 1,
|
|
8421
8452
|
href: _ctx.link,
|
|
@@ -8461,7 +8492,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
8461
8492
|
});
|
|
8462
8493
|
const _hoisted_1$q = { id: "lupa-search-results-rating" };
|
|
8463
8494
|
const _hoisted_2$k = { class: "lupa-ratings" };
|
|
8464
|
-
const _hoisted_3$
|
|
8495
|
+
const _hoisted_3$d = { class: "lupa-ratings-base" };
|
|
8465
8496
|
const _hoisted_4$8 = ["innerHTML"];
|
|
8466
8497
|
const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
|
|
8467
8498
|
const _hoisted_6$4 = ["innerHTML"];
|
|
@@ -8500,7 +8531,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
8500
8531
|
return (_ctx, _cache) => {
|
|
8501
8532
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
|
|
8502
8533
|
vue.createElementVNode("div", _hoisted_2$k, [
|
|
8503
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
8534
|
+
vue.createElementVNode("div", _hoisted_3$d, [
|
|
8504
8535
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(baseStars.value, (star, index) => {
|
|
8505
8536
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8506
8537
|
key: index,
|
|
@@ -8588,7 +8619,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
8588
8619
|
});
|
|
8589
8620
|
const _hoisted_1$n = { class: "lupa-search-results-add-to-cart-wrapper" };
|
|
8590
8621
|
const _hoisted_2$j = { class: "lupa-search-results-product-addtocart" };
|
|
8591
|
-
const _hoisted_3$
|
|
8622
|
+
const _hoisted_3$c = ["onClick", "disabled"];
|
|
8592
8623
|
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
8593
8624
|
__name: "SearchResultsProductAddToCart",
|
|
8594
8625
|
props: {
|
|
@@ -8623,7 +8654,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
8623
8654
|
class: vue.normalizeClass(loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart"),
|
|
8624
8655
|
"data-cy": "lupa-add-to-cart",
|
|
8625
8656
|
disabled: !inStockValue.value || loading.value
|
|
8626
|
-
}, vue.toDisplayString(label.value), 11, _hoisted_3$
|
|
8657
|
+
}, vue.toDisplayString(label.value), 11, _hoisted_3$c)
|
|
8627
8658
|
])
|
|
8628
8659
|
]);
|
|
8629
8660
|
};
|
|
@@ -8631,7 +8662,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
8631
8662
|
});
|
|
8632
8663
|
const _hoisted_1$m = ["innerHTML"];
|
|
8633
8664
|
const _hoisted_2$i = { key: 0 };
|
|
8634
|
-
const _hoisted_3$
|
|
8665
|
+
const _hoisted_3$b = { key: 1 };
|
|
8635
8666
|
const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
|
|
8636
8667
|
const _hoisted_5$5 = { class: "lupa-search-box-custom-text" };
|
|
8637
8668
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -8676,7 +8707,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
8676
8707
|
key: 1,
|
|
8677
8708
|
class: className.value
|
|
8678
8709
|
}, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
8679
|
-
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$i, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
8710
|
+
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$i, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
|
|
8680
8711
|
vue.createElementVNode("div", _hoisted_4$7, vue.toDisplayString(label.value), 1),
|
|
8681
8712
|
vue.createElementVNode("div", _hoisted_5$5, vue.toDisplayString(text.value), 1)
|
|
8682
8713
|
]))
|
|
@@ -8715,7 +8746,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
8715
8746
|
});
|
|
8716
8747
|
const _hoisted_1$k = { id: "lupa-search-results-rating" };
|
|
8717
8748
|
const _hoisted_2$h = ["innerHTML"];
|
|
8718
|
-
const _hoisted_3$
|
|
8749
|
+
const _hoisted_3$a = { class: "lupa-ratings" };
|
|
8719
8750
|
const _hoisted_4$6 = ["href"];
|
|
8720
8751
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
8721
8752
|
__name: "SearchResultsProductSingleStarRating",
|
|
@@ -8750,7 +8781,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
8750
8781
|
innerHTML: star.value,
|
|
8751
8782
|
class: "lupa-rating lupa-rating-highlighted"
|
|
8752
8783
|
}, null, 8, _hoisted_2$h),
|
|
8753
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
8784
|
+
vue.createElementVNode("div", _hoisted_3$a, vue.toDisplayString(rating.value), 1),
|
|
8754
8785
|
vue.createElementVNode("a", {
|
|
8755
8786
|
href: ratingLink.value,
|
|
8756
8787
|
class: "lupa-total-ratings"
|
|
@@ -8848,7 +8879,7 @@ const _hoisted_2$g = {
|
|
|
8848
8879
|
key: 0,
|
|
8849
8880
|
class: "lupa-out-of-stock"
|
|
8850
8881
|
};
|
|
8851
|
-
const _hoisted_3$
|
|
8882
|
+
const _hoisted_3$9 = { class: "lupa-search-result-product-details-section" };
|
|
8852
8883
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
8853
8884
|
__name: "SearchResultsProductCard",
|
|
8854
8885
|
props: {
|
|
@@ -9024,7 +9055,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
9024
9055
|
}, null, 8, ["options"]),
|
|
9025
9056
|
((_a = labels.value) == null ? void 0 : _a.outOfStock) && !isInStock.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, vue.toDisplayString(labels.value.outOfStock), 1)) : vue.createCommentVNode("", true)
|
|
9026
9057
|
], 8, _hoisted_1$j),
|
|
9027
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
9058
|
+
vue.createElementVNode("div", _hoisted_3$9, [
|
|
9028
9059
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(detailElements.value, (element) => {
|
|
9029
9060
|
return vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
9030
9061
|
class: "lupa-search-results-product-element",
|
|
@@ -9067,7 +9098,7 @@ const _hoisted_1$i = {
|
|
|
9067
9098
|
"data-cy": "lupa-search-results-similar-queries"
|
|
9068
9099
|
};
|
|
9069
9100
|
const _hoisted_2$f = { class: "lupa-similar-queries-label" };
|
|
9070
|
-
const _hoisted_3$
|
|
9101
|
+
const _hoisted_3$8 = {
|
|
9071
9102
|
class: "lupa-similar-query-label",
|
|
9072
9103
|
"data-cy": "lupa-similar-query-label"
|
|
9073
9104
|
};
|
|
@@ -9112,7 +9143,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
9112
9143
|
vue.createElementVNode("div", _hoisted_2$f, vue.toDisplayString(_ctx.labels.similarQueries), 1),
|
|
9113
9144
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(similarQueries.value, (similarQuery, index) => {
|
|
9114
9145
|
return vue.openBlock(), vue.createElementBlock("div", { key: index }, [
|
|
9115
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
9146
|
+
vue.createElementVNode("div", _hoisted_3$8, [
|
|
9116
9147
|
vue.createElementVNode("span", null, vue.toDisplayString(similarQueryLabel.value), 1),
|
|
9117
9148
|
vue.createElementVNode("span", {
|
|
9118
9149
|
id: "lupa-similar-query-text-component",
|
|
@@ -9301,7 +9332,7 @@ const _hoisted_1$e = {
|
|
|
9301
9332
|
"data-cy": "lupa-search-results-similar-results"
|
|
9302
9333
|
};
|
|
9303
9334
|
const _hoisted_2$c = { class: "lupa-similar-results-label" };
|
|
9304
|
-
const _hoisted_3$
|
|
9335
|
+
const _hoisted_3$7 = {
|
|
9305
9336
|
class: "lupa-products",
|
|
9306
9337
|
"data-cy": "lupa-products"
|
|
9307
9338
|
};
|
|
@@ -9323,7 +9354,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
9323
9354
|
return (_ctx, _cache) => {
|
|
9324
9355
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
9325
9356
|
vue.createElementVNode("div", _hoisted_2$c, vue.toDisplayString(_ctx.labels.similarResultsLabel), 1),
|
|
9326
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
9357
|
+
vue.createElementVNode("div", _hoisted_3$7, [
|
|
9327
9358
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(similarResults.value.items, (product, index) => {
|
|
9328
9359
|
return vue.openBlock(), vue.createBlock(_sfc_main$k, {
|
|
9329
9360
|
style: vue.normalizeStyle(_ctx.columnSize),
|
|
@@ -9342,7 +9373,7 @@ const _hoisted_2$b = {
|
|
|
9342
9373
|
class: "lupa-products",
|
|
9343
9374
|
"data-cy": "lupa-products"
|
|
9344
9375
|
};
|
|
9345
|
-
const _hoisted_3$
|
|
9376
|
+
const _hoisted_3$6 = {
|
|
9346
9377
|
key: 0,
|
|
9347
9378
|
class: "lupa-empty-results",
|
|
9348
9379
|
"data-cy": "lupa-no-results-in-page"
|
|
@@ -9505,7 +9536,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9505
9536
|
}, null, 8, ["style", "product", "options"]);
|
|
9506
9537
|
}), 128))
|
|
9507
9538
|
]),
|
|
9508
|
-
vue.unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
9539
|
+
vue.unref(isPageEmpty) && _ctx.options.labels.noItemsInPage ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
|
|
9509
9540
|
vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.noItemsInPage) + " ", 1),
|
|
9510
9541
|
_ctx.options.labels.backToFirstPage ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
9511
9542
|
key: 0,
|
|
@@ -9551,7 +9582,7 @@ const _hoisted_2$a = {
|
|
|
9551
9582
|
key: 0,
|
|
9552
9583
|
class: "lupa-category-back"
|
|
9553
9584
|
};
|
|
9554
|
-
const _hoisted_3$
|
|
9585
|
+
const _hoisted_3$5 = ["href"];
|
|
9555
9586
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
9556
9587
|
__name: "CategoryTopFilters",
|
|
9557
9588
|
props: {
|
|
@@ -9590,7 +9621,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
9590
9621
|
"data-cy": "lupa-category-back",
|
|
9591
9622
|
href: backUrlLink.value,
|
|
9592
9623
|
onClick: handleNavigationBack
|
|
9593
|
-
}, vue.toDisplayString(backTitle.value), 9, _hoisted_3$
|
|
9624
|
+
}, vue.toDisplayString(backTitle.value), 9, _hoisted_3$5)
|
|
9594
9625
|
])) : vue.createCommentVNode("", true),
|
|
9595
9626
|
vue.createVNode(_sfc_main$C, {
|
|
9596
9627
|
class: "lupa-toolbar-mobile",
|
|
@@ -9611,7 +9642,7 @@ const _hoisted_2$9 = {
|
|
|
9611
9642
|
id: "lupa-search-results",
|
|
9612
9643
|
class: "top-layout-wrapper"
|
|
9613
9644
|
};
|
|
9614
|
-
const _hoisted_3$
|
|
9645
|
+
const _hoisted_3$4 = { class: "search-content" };
|
|
9615
9646
|
const _hoisted_4$3 = { id: "lupa-search-results" };
|
|
9616
9647
|
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
9617
9648
|
__name: "SearchResults",
|
|
@@ -9850,7 +9881,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
9850
9881
|
ref_key: "searchResultsFilters",
|
|
9851
9882
|
ref: searchResultsFilters
|
|
9852
9883
|
}, null, 8, ["options"])) : vue.createCommentVNode("", true),
|
|
9853
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
9884
|
+
vue.createElementVNode("div", _hoisted_3$4, [
|
|
9854
9885
|
vue.createVNode(_sfc_main$Z, { labels: didYouMeanLabels.value }, null, 8, ["labels"]),
|
|
9855
9886
|
vue.createVNode(_sfc_main$X, {
|
|
9856
9887
|
options: _ctx.options,
|
|
@@ -16342,12 +16373,12 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16342
16373
|
});
|
|
16343
16374
|
const _hoisted_1$7 = { class: "lupa-chat-spinner" };
|
|
16344
16375
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
|
|
16345
|
-
const _hoisted_3$
|
|
16376
|
+
const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
|
|
16346
16377
|
const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
|
|
16347
16378
|
const _hoisted_5$2 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
|
|
16348
16379
|
const _hoisted_6$1 = [
|
|
16349
16380
|
_hoisted_2$5,
|
|
16350
|
-
_hoisted_3$
|
|
16381
|
+
_hoisted_3$3,
|
|
16351
16382
|
_hoisted_4$2,
|
|
16352
16383
|
_hoisted_5$2
|
|
16353
16384
|
];
|
|
@@ -16371,7 +16402,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16371
16402
|
});
|
|
16372
16403
|
const _hoisted_1$6 = { class: "lupa-chat-input-container" };
|
|
16373
16404
|
const _hoisted_2$4 = { id: "lupa-search-box-input" };
|
|
16374
|
-
const _hoisted_3$
|
|
16405
|
+
const _hoisted_3$2 = {
|
|
16375
16406
|
key: 0,
|
|
16376
16407
|
class: "lupa-chat-form-submit"
|
|
16377
16408
|
};
|
|
@@ -16407,7 +16438,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16407
16438
|
[vue.vModelText, inputValue.value]
|
|
16408
16439
|
])
|
|
16409
16440
|
]),
|
|
16410
|
-
!_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("button", _hoisted_3$
|
|
16441
|
+
!_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("button", _hoisted_3$2, "Ask LupaChat")) : (vue.openBlock(), vue.createBlock(_sfc_main$7, {
|
|
16411
16442
|
key: 1,
|
|
16412
16443
|
small: true
|
|
16413
16444
|
}))
|
|
@@ -16574,7 +16605,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16574
16605
|
});
|
|
16575
16606
|
const _hoisted_1$4 = { class: "lupa-chat-content-entry-phrase" };
|
|
16576
16607
|
const _hoisted_2$3 = { class: "lupa-chat-phrase-title" };
|
|
16577
|
-
const _hoisted_3$
|
|
16608
|
+
const _hoisted_3$1 = {
|
|
16578
16609
|
key: 0,
|
|
16579
16610
|
class: "alert"
|
|
16580
16611
|
};
|
|
@@ -16675,7 +16706,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16675
16706
|
vue.createElementVNode("div", _hoisted_2$3, [
|
|
16676
16707
|
vue.createElementVNode("h3", null, vue.toDisplayString(displayPhrase.value), 1),
|
|
16677
16708
|
vue.createElementVNode("sub", null, vue.toDisplayString(usedAlternativePhrases.value.join(", ")), 1),
|
|
16678
|
-
usedPartialResults.value ? (vue.openBlock(), vue.createElementBlock("sub", _hoisted_3$
|
|
16709
|
+
usedPartialResults.value ? (vue.openBlock(), vue.createElementBlock("sub", _hoisted_3$1, "Including partial matches - which might not be what you are looking for")) : vue.createCommentVNode("", true)
|
|
16679
16710
|
]),
|
|
16680
16711
|
vue.createElementVNode("div", null, [
|
|
16681
16712
|
vue.createVNode(_sfc_main$5, {
|
|
@@ -16694,7 +16725,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16694
16725
|
});
|
|
16695
16726
|
const _hoisted_1$3 = { class: "lupa-chat-best-matches lupa-chat-content-entry" };
|
|
16696
16727
|
const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode("h3", null, "Best matches", -1);
|
|
16697
|
-
const
|
|
16728
|
+
const MAX_SOURCES_FOR_BEST_ITEM_MATCHING = 250;
|
|
16698
16729
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
16699
16730
|
__name: "ChatContentEntry",
|
|
16700
16731
|
props: {
|
|
@@ -16724,20 +16755,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16724
16755
|
return (_a = props.options.displayOptions.titleKey) != null ? _a : "title";
|
|
16725
16756
|
});
|
|
16726
16757
|
const loadFinalRecommendations = () => __async(this, null, function* () {
|
|
16727
|
-
var _a;
|
|
16758
|
+
var _a, _b;
|
|
16728
16759
|
try {
|
|
16729
|
-
const productResultStrings = loadedResults.value.map(
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
|
|
16733
|
-
}
|
|
16734
|
-
);
|
|
16760
|
+
const productResultStrings = (_a = loadedResults.value.map((result) => {
|
|
16761
|
+
var _a2, _b2;
|
|
16762
|
+
return (_b2 = (_a2 = result[titleKey.value]) == null ? void 0 : _a2.toString()) != null ? _b2 : "";
|
|
16763
|
+
})) == null ? void 0 : _a.slice(0, MAX_SOURCES_FOR_BEST_ITEM_MATCHING);
|
|
16735
16764
|
const { products } = yield ChatService.suggestBestProductMatches(
|
|
16736
16765
|
props.options.sdkOptions,
|
|
16737
16766
|
{
|
|
16738
16767
|
initialQuery: props.entry.userInput,
|
|
16739
16768
|
productStrings: productResultStrings,
|
|
16740
|
-
messageHistory: (
|
|
16769
|
+
messageHistory: (_b = props.history) != null ? _b : [],
|
|
16741
16770
|
queryKey: props.options.displayOptions.queryKey
|
|
16742
16771
|
},
|
|
16743
16772
|
props.options.chatSettings
|
|
@@ -16750,13 +16779,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16750
16779
|
});
|
|
16751
16780
|
const bestMatchProducts = vue.computed(() => {
|
|
16752
16781
|
return bestMatches.value.map((productName) => {
|
|
16753
|
-
return loadedResults.value
|
|
16782
|
+
return findClosestStringValue(productName, loadedResults.value, titleKey.value);
|
|
16754
16783
|
}).filter(Boolean);
|
|
16755
16784
|
});
|
|
16756
|
-
const explanation = vue.computed(() => {
|
|
16757
|
-
var _a, _b;
|
|
16758
|
-
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] : "";
|
|
16759
|
-
});
|
|
16760
16785
|
return (_ctx, _cache) => {
|
|
16761
16786
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
16762
16787
|
vue.createElementVNode("ul", null, [
|
|
@@ -16776,13 +16801,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
16776
16801
|
]),
|
|
16777
16802
|
vue.createElementVNode("section", _hoisted_1$3, [
|
|
16778
16803
|
_hoisted_2$2,
|
|
16779
|
-
explanation.value ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$1, vue.toDisplayString(explanation.value), 1)) : vue.createCommentVNode("", true),
|
|
16780
16804
|
loading.value ? (vue.openBlock(), vue.createBlock(_sfc_main$7, {
|
|
16781
|
-
key:
|
|
16805
|
+
key: 0,
|
|
16782
16806
|
message: "Selecting the best matches for you. This might take a few seconds."
|
|
16783
16807
|
})) : vue.createCommentVNode("", true),
|
|
16784
16808
|
bestMatches.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
|
|
16785
|
-
key:
|
|
16809
|
+
key: 1,
|
|
16786
16810
|
"search-results": bestMatchProducts.value,
|
|
16787
16811
|
options: _ctx.options.displayOptions
|
|
16788
16812
|
}, null, 8, ["search-results", "options"])) : vue.createCommentVNode("", true)
|