@getlupa/vue 0.7.8 → 0.8.0
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 +102 -66
- package/dist/lupaSearch.mjs +102 -66
- package/dist/src/types/General.d.ts +2 -1
- package/dist/src/types/search-box/SearchBoxOptions.d.ts +1 -0
- package/dist/src/types/search-box/SearchBoxPanel.d.ts +2 -0
- package/dist/src/types/search-results/SearchResultsOptions.d.ts +3 -0
- package/dist/src/types/search-results/SearchResultsProductCardOptions.d.ts +2 -0
- package/package.json +1 -1
package/dist/lupaSearch.js
CHANGED
|
@@ -3166,8 +3166,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
3166
3166
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
3167
3167
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
3168
3168
|
const _hoisted_3$B = { id: "lupa-search-box-input" };
|
|
3169
|
-
const _hoisted_4$
|
|
3170
|
-
const _hoisted_5$
|
|
3169
|
+
const _hoisted_4$s = ["value"];
|
|
3170
|
+
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
3171
3171
|
const _hoisted_6$9 = {
|
|
3172
3172
|
key: 0,
|
|
3173
3173
|
class: "lupa-close-label"
|
|
@@ -3216,6 +3216,10 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
3216
3216
|
var _a;
|
|
3217
3217
|
return __spreadValues({}, (_a = props.options.inputAttributes) != null ? _a : {});
|
|
3218
3218
|
});
|
|
3219
|
+
const ariaLabel = vue.computed(() => {
|
|
3220
|
+
var _a;
|
|
3221
|
+
return (_a = labels.value.searchInputAriaLabel) != null ? _a : "Search input";
|
|
3222
|
+
});
|
|
3219
3223
|
vue.watch(suggestedValue, () => {
|
|
3220
3224
|
if (suggestedValue.value.override) {
|
|
3221
3225
|
input.value = suggestedValue.value.item.suggestion;
|
|
@@ -3259,22 +3263,24 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
3259
3263
|
vue.createElementVNode("div", _hoisted_3$B, [
|
|
3260
3264
|
vue.createElementVNode("input", {
|
|
3261
3265
|
class: "lupa-hint",
|
|
3266
|
+
"aria-hidden": "true",
|
|
3262
3267
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
3263
3268
|
disabled: ""
|
|
3264
|
-
}, null, 8, _hoisted_4$
|
|
3269
|
+
}, null, 8, _hoisted_4$s),
|
|
3265
3270
|
vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
|
|
3266
3271
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
3267
3272
|
}, inputAttributes.value, {
|
|
3268
3273
|
ref_key: "mainInput",
|
|
3269
3274
|
ref: mainInput,
|
|
3270
3275
|
autocomplete: "off",
|
|
3276
|
+
"aria-label": ariaLabel.value,
|
|
3271
3277
|
class: "lupa-search-box-input-field",
|
|
3272
3278
|
"data-cy": "lupa-search-box-input-field",
|
|
3273
3279
|
type: "text",
|
|
3274
3280
|
placeholder: labels.value.placeholder,
|
|
3275
3281
|
onInput: handleInput,
|
|
3276
3282
|
onFocus: handleFocus
|
|
3277
|
-
}), null, 16, _hoisted_5$
|
|
3283
|
+
}), null, 16, _hoisted_5$g), [
|
|
3278
3284
|
[vue.vModelText, inputValue.value]
|
|
3279
3285
|
])
|
|
3280
3286
|
]),
|
|
@@ -3440,11 +3446,11 @@ const _hoisted_3$A = {
|
|
|
3440
3446
|
class: "lupa-suggestion-facet",
|
|
3441
3447
|
"data-cy": "lupa-suggestion-facet"
|
|
3442
3448
|
};
|
|
3443
|
-
const _hoisted_4$
|
|
3449
|
+
const _hoisted_4$r = {
|
|
3444
3450
|
class: "lupa-suggestion-facet-label",
|
|
3445
3451
|
"data-cy": "lupa-suggestion-facet-label"
|
|
3446
3452
|
};
|
|
3447
|
-
const _hoisted_5$
|
|
3453
|
+
const _hoisted_5$f = {
|
|
3448
3454
|
class: "lupa-suggestion-facet-value",
|
|
3449
3455
|
"data-cy": "lupa-suggestion-facet-value"
|
|
3450
3456
|
};
|
|
@@ -3486,8 +3492,8 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
|
|
|
3486
3492
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
3487
3493
|
}, null, 8, _hoisted_1$18)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$N, vue.toDisplayString(_ctx.suggestion.display), 1)),
|
|
3488
3494
|
_ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$A, [
|
|
3489
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
3490
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
3495
|
+
vue.createElementVNode("span", _hoisted_4$r, vue.toDisplayString(facetLabel.value), 1),
|
|
3496
|
+
vue.createElementVNode("span", _hoisted_5$f, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3491
3497
|
])) : vue.createCommentVNode("", true)
|
|
3492
3498
|
]);
|
|
3493
3499
|
};
|
|
@@ -3894,8 +3900,8 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3894
3900
|
const _hoisted_1$11 = ["innerHTML"];
|
|
3895
3901
|
const _hoisted_2$K = { key: 0 };
|
|
3896
3902
|
const _hoisted_3$z = { key: 1 };
|
|
3897
|
-
const _hoisted_4$
|
|
3898
|
-
const _hoisted_5$
|
|
3903
|
+
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
3904
|
+
const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
|
|
3899
3905
|
const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
3900
3906
|
__name: "SearchBoxProductCustom",
|
|
3901
3907
|
props: {
|
|
@@ -3927,8 +3933,8 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3927
3933
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
3928
3934
|
}, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
3929
3935
|
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$K, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
3930
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
3931
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
3936
|
+
vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(label.value), 1),
|
|
3937
|
+
vue.createElementVNode("div", _hoisted_5$e, vue.toDisplayString(text.value), 1)
|
|
3932
3938
|
]))
|
|
3933
3939
|
], 16));
|
|
3934
3940
|
};
|
|
@@ -4268,7 +4274,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadV
|
|
|
4268
4274
|
const _hoisted_1$_ = ["href"];
|
|
4269
4275
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
4270
4276
|
const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
|
|
4271
|
-
const _hoisted_4$
|
|
4277
|
+
const _hoisted_4$p = {
|
|
4272
4278
|
key: 0,
|
|
4273
4279
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
4274
4280
|
};
|
|
@@ -4303,6 +4309,10 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4303
4309
|
var _a;
|
|
4304
4310
|
return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
|
|
4305
4311
|
});
|
|
4312
|
+
const customDocumentHtmlAttributes = vue.computed(() => {
|
|
4313
|
+
var _a, _b, _c;
|
|
4314
|
+
return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
|
|
4315
|
+
});
|
|
4306
4316
|
const handleClick = (event) => {
|
|
4307
4317
|
emit("product-click", {
|
|
4308
4318
|
item: props.item,
|
|
@@ -4317,12 +4327,13 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4317
4327
|
isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
|
|
4318
4328
|
});
|
|
4319
4329
|
return (_ctx, _cache) => {
|
|
4320
|
-
return vue.openBlock(), vue.createElementBlock("a", {
|
|
4321
|
-
class:
|
|
4330
|
+
return vue.openBlock(), vue.createElementBlock("a", vue.mergeProps({
|
|
4331
|
+
class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
|
|
4332
|
+
href: link.value
|
|
4333
|
+
}, customDocumentHtmlAttributes.value, {
|
|
4322
4334
|
"data-cy": "lupa-search-box-product",
|
|
4323
|
-
href: link.value,
|
|
4324
4335
|
onClick: handleClick
|
|
4325
|
-
}, [
|
|
4336
|
+
}), [
|
|
4326
4337
|
vue.createElementVNode("div", _hoisted_2$I, [
|
|
4327
4338
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageElements.value, (element) => {
|
|
4328
4339
|
return vue.openBlock(), vue.createBlock(_sfc_main$13, {
|
|
@@ -4347,7 +4358,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4347
4358
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
4348
4359
|
}), 128))
|
|
4349
4360
|
]),
|
|
4350
|
-
addToCartElement.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
4361
|
+
addToCartElement.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$p, [
|
|
4351
4362
|
vue.createVNode(_sfc_main$13, {
|
|
4352
4363
|
class: "lupa-search-box-product-element",
|
|
4353
4364
|
item: _ctx.item,
|
|
@@ -4357,7 +4368,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4357
4368
|
isInStock: isInStock.value
|
|
4358
4369
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
4359
4370
|
])) : vue.createCommentVNode("", true)
|
|
4360
|
-
],
|
|
4371
|
+
], 16, _hoisted_1$_);
|
|
4361
4372
|
};
|
|
4362
4373
|
}
|
|
4363
4374
|
});
|
|
@@ -4583,7 +4594,7 @@ const _hoisted_3$w = {
|
|
|
4583
4594
|
key: 0,
|
|
4584
4595
|
class: "lupa-panel-title"
|
|
4585
4596
|
};
|
|
4586
|
-
const _hoisted_4$
|
|
4597
|
+
const _hoisted_4$o = {
|
|
4587
4598
|
key: 1,
|
|
4588
4599
|
id: "lupa-search-box-panel"
|
|
4589
4600
|
};
|
|
@@ -4764,7 +4775,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
4764
4775
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
4765
4776
|
onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
|
|
4766
4777
|
}, null, 8, ["labels", "showTotalCount"])) : vue.createCommentVNode("", true)
|
|
4767
|
-
])) : displayHistory.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
4778
|
+
])) : displayHistory.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o, [
|
|
4768
4779
|
vue.createVNode(_sfc_main$1h, {
|
|
4769
4780
|
options: _ctx.options.history,
|
|
4770
4781
|
history: history.value,
|
|
@@ -5158,7 +5169,7 @@ const _hoisted_3$v = {
|
|
|
5158
5169
|
key: 1,
|
|
5159
5170
|
"data-cy": "did-you-mean-label"
|
|
5160
5171
|
};
|
|
5161
|
-
const _hoisted_4$
|
|
5172
|
+
const _hoisted_4$n = { key: 1 };
|
|
5162
5173
|
const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
5163
5174
|
__name: "SearchResultsDidYouMean",
|
|
5164
5175
|
props: {
|
|
@@ -5209,7 +5220,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
5209
5220
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
5210
5221
|
"data-cy": "did-you-mean-value",
|
|
5211
5222
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
5212
|
-
}, vue.toDisplayString(didYouMeanValue.value) + " ", 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
5223
|
+
}, vue.toDisplayString(didYouMeanValue.value) + " ", 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, vue.toDisplayString(label) + " ", 1))
|
|
5213
5224
|
]);
|
|
5214
5225
|
}), 128))
|
|
5215
5226
|
])) : vue.createCommentVNode("", true)
|
|
@@ -5259,7 +5270,7 @@ const _hoisted_3$u = {
|
|
|
5259
5270
|
key: 1,
|
|
5260
5271
|
class: "lupa-results-total-count"
|
|
5261
5272
|
};
|
|
5262
|
-
const _hoisted_4$
|
|
5273
|
+
const _hoisted_4$m = ["innerHTML"];
|
|
5263
5274
|
const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
5264
5275
|
__name: "SearchResultsTitle",
|
|
5265
5276
|
props: {
|
|
@@ -5308,7 +5319,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
|
5308
5319
|
key: 2,
|
|
5309
5320
|
class: "lupa-result-page-description-top",
|
|
5310
5321
|
innerHTML: descriptionTop.value
|
|
5311
|
-
}, null, 8, _hoisted_4$
|
|
5322
|
+
}, null, 8, _hoisted_4$m)) : vue.createCommentVNode("", true)
|
|
5312
5323
|
]);
|
|
5313
5324
|
};
|
|
5314
5325
|
}
|
|
@@ -5354,7 +5365,7 @@ const _hoisted_3$s = {
|
|
|
5354
5365
|
key: 0,
|
|
5355
5366
|
class: "filter-values"
|
|
5356
5367
|
};
|
|
5357
|
-
const _hoisted_4$
|
|
5368
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
5358
5369
|
const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
5359
5370
|
__name: "CurrentFilters",
|
|
5360
5371
|
props: {
|
|
@@ -5420,7 +5431,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
|
5420
5431
|
}, null, 2)) : vue.createCommentVNode("", true)
|
|
5421
5432
|
]),
|
|
5422
5433
|
!_ctx.expandable || isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$s, [
|
|
5423
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
5434
|
+
vue.createElementVNode("div", _hoisted_4$l, [
|
|
5424
5435
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(displayFilters), (filter) => {
|
|
5425
5436
|
return vue.openBlock(), vue.createBlock(_sfc_main$W, {
|
|
5426
5437
|
key: filter.key + "_" + filter.value,
|
|
@@ -5488,8 +5499,8 @@ const _hoisted_1$Q = {
|
|
|
5488
5499
|
};
|
|
5489
5500
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
5490
5501
|
const _hoisted_3$r = ["href"];
|
|
5491
|
-
const _hoisted_4$
|
|
5492
|
-
const _hoisted_5$
|
|
5502
|
+
const _hoisted_4$k = ["href"];
|
|
5503
|
+
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
5493
5504
|
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
5494
5505
|
__name: "CategoryFilter",
|
|
5495
5506
|
props: {
|
|
@@ -5593,9 +5604,9 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
|
5593
5604
|
href: parentUrlLink.value,
|
|
5594
5605
|
class: vue.normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
5595
5606
|
onClick: handleNavigationParent
|
|
5596
|
-
}, vue.toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
5607
|
+
}, vue.toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
5597
5608
|
], 2),
|
|
5598
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5609
|
+
vue.createElementVNode("div", _hoisted_5$d, [
|
|
5599
5610
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(categoryChildren.value, (child) => {
|
|
5600
5611
|
return vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
5601
5612
|
key: getCategoryKey(child),
|
|
@@ -5614,8 +5625,8 @@ const _hoisted_1$P = {
|
|
|
5614
5625
|
};
|
|
5615
5626
|
const _hoisted_2$z = ["placeholder"];
|
|
5616
5627
|
const _hoisted_3$q = { class: "lupa-terms-list" };
|
|
5617
|
-
const _hoisted_4$
|
|
5618
|
-
const _hoisted_5$
|
|
5628
|
+
const _hoisted_4$j = ["onClick"];
|
|
5629
|
+
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
5619
5630
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
5620
5631
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
5621
5632
|
const _hoisted_8$1 = {
|
|
@@ -5711,7 +5722,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5711
5722
|
key: item.title,
|
|
5712
5723
|
onClick: ($event) => handleFacetClick(item)
|
|
5713
5724
|
}, [
|
|
5714
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5725
|
+
vue.createElementVNode("div", _hoisted_5$c, [
|
|
5715
5726
|
vue.createElementVNode("span", {
|
|
5716
5727
|
class: vue.normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
5717
5728
|
}, null, 2)
|
|
@@ -5720,7 +5731,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5720
5731
|
vue.createElementVNode("span", _hoisted_7$6, vue.toDisplayString(item.title), 1),
|
|
5721
5732
|
_ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8$1, "(" + vue.toDisplayString(item.count) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5722
5733
|
])
|
|
5723
|
-
], 10, _hoisted_4$
|
|
5734
|
+
], 10, _hoisted_4$j);
|
|
5724
5735
|
}), 128))
|
|
5725
5736
|
]),
|
|
5726
5737
|
displayShowMore.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -6720,12 +6731,12 @@ const _hoisted_3$p = {
|
|
|
6720
6731
|
key: 1,
|
|
6721
6732
|
class: "lupa-stats-facet-summary-input"
|
|
6722
6733
|
};
|
|
6723
|
-
const _hoisted_4$
|
|
6734
|
+
const _hoisted_4$i = {
|
|
6724
6735
|
key: 0,
|
|
6725
6736
|
class: "lupa-stats-range-label"
|
|
6726
6737
|
};
|
|
6727
|
-
const _hoisted_5$
|
|
6728
|
-
const _hoisted_6$7 = ["max", "min", "pattern"];
|
|
6738
|
+
const _hoisted_5$b = { class: "lupa-stats-from" };
|
|
6739
|
+
const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
|
|
6729
6740
|
const _hoisted_7$5 = { key: 0 };
|
|
6730
6741
|
const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
|
|
6731
6742
|
const _hoisted_9 = {
|
|
@@ -6733,7 +6744,7 @@ const _hoisted_9 = {
|
|
|
6733
6744
|
class: "lupa-stats-range-label"
|
|
6734
6745
|
};
|
|
6735
6746
|
const _hoisted_10 = { class: "lupa-stats-to" };
|
|
6736
|
-
const _hoisted_11 = ["max", "min", "pattern"];
|
|
6747
|
+
const _hoisted_11 = ["max", "min", "pattern", "aria-label"];
|
|
6737
6748
|
const _hoisted_12 = { key: 0 };
|
|
6738
6749
|
const _hoisted_13 = {
|
|
6739
6750
|
key: 2,
|
|
@@ -6861,6 +6872,20 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6861
6872
|
const sliderInputFormat = vue.computed(() => {
|
|
6862
6873
|
return isPrice.value ? `[0-9]+([${separator.value}][0-9]{1,2})?` : void 0;
|
|
6863
6874
|
});
|
|
6875
|
+
const sliderAria = vue.computed(() => {
|
|
6876
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6877
|
+
return {
|
|
6878
|
+
"aria-label": ((_b = (_a = props.options.stats) == null ? void 0 : _a.labels) == null ? void 0 : _b.sliderDotAriaLabel) ? `${(_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.sliderDotAriaLabel} - ${(_e = props.facet) == null ? void 0 : _e.label}` : `Range slider control dot for ${(_f = props.facet) == null ? void 0 : _f.label}`
|
|
6879
|
+
};
|
|
6880
|
+
});
|
|
6881
|
+
const ariaLabelFrom = vue.computed(() => {
|
|
6882
|
+
var _a, _b, _c, _d, _e;
|
|
6883
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaFrom) != null ? _e : rangeLabelFrom.value}`;
|
|
6884
|
+
});
|
|
6885
|
+
const ariaLabelTo = vue.computed(() => {
|
|
6886
|
+
var _a, _b, _c, _d, _e;
|
|
6887
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaTo) != null ? _e : rangeLabelTo.value}`;
|
|
6888
|
+
});
|
|
6864
6889
|
vue.watch(currentMinValue, () => {
|
|
6865
6890
|
innerSliderRange.value = [];
|
|
6866
6891
|
});
|
|
@@ -6890,15 +6915,16 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6890
6915
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
|
|
6891
6916
|
!isInputVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, vue.toDisplayString(statsSummary.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$p, [
|
|
6892
6917
|
vue.createElementVNode("div", null, [
|
|
6893
|
-
rangeLabelFrom.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
6894
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
6918
|
+
rangeLabelFrom.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$i, vue.toDisplayString(rangeLabelFrom.value), 1)) : vue.createCommentVNode("", true),
|
|
6919
|
+
vue.createElementVNode("div", _hoisted_5$b, [
|
|
6895
6920
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
6896
6921
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
6897
6922
|
type: "text",
|
|
6898
6923
|
maxlength: "8",
|
|
6899
6924
|
max: facetMax.value,
|
|
6900
6925
|
min: facetMin.value,
|
|
6901
|
-
pattern: sliderInputFormat.value
|
|
6926
|
+
pattern: sliderInputFormat.value,
|
|
6927
|
+
"aria-label": ariaLabelFrom.value
|
|
6902
6928
|
}, null, 8, _hoisted_6$7), [
|
|
6903
6929
|
[
|
|
6904
6930
|
vue.vModelText,
|
|
@@ -6920,7 +6946,8 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6920
6946
|
maxlength: "8",
|
|
6921
6947
|
max: facetMax.value,
|
|
6922
6948
|
min: facetMin.value,
|
|
6923
|
-
pattern: sliderInputFormat.value
|
|
6949
|
+
pattern: sliderInputFormat.value,
|
|
6950
|
+
"aria-label": ariaLabelTo.value
|
|
6924
6951
|
}, null, 8, _hoisted_11), [
|
|
6925
6952
|
[
|
|
6926
6953
|
vue.vModelText,
|
|
@@ -6941,11 +6968,12 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6941
6968
|
max: facetMax.value,
|
|
6942
6969
|
lazy: true,
|
|
6943
6970
|
step: interval.value,
|
|
6971
|
+
aria: sliderAria.value,
|
|
6944
6972
|
modelValue: sliderRange.value,
|
|
6945
6973
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sliderRange.value = $event),
|
|
6946
6974
|
onSlide: handleDragging,
|
|
6947
6975
|
onEnd: handleChange
|
|
6948
|
-
}, null, 8, ["min", "max", "step", "modelValue"])
|
|
6976
|
+
}, null, 8, ["min", "max", "step", "aria", "modelValue"])
|
|
6949
6977
|
])) : vue.createCommentVNode("", true)
|
|
6950
6978
|
]);
|
|
6951
6979
|
};
|
|
@@ -6954,11 +6982,11 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
6954
6982
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
6955
6983
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
6956
6984
|
const _hoisted_3$o = { class: "lupa-term-label" };
|
|
6957
|
-
const _hoisted_4$
|
|
6985
|
+
const _hoisted_4$h = {
|
|
6958
6986
|
key: 0,
|
|
6959
6987
|
class: "lupa-term-count"
|
|
6960
6988
|
};
|
|
6961
|
-
const _hoisted_5$
|
|
6989
|
+
const _hoisted_5$a = {
|
|
6962
6990
|
key: 0,
|
|
6963
6991
|
class: "lupa-facet-level"
|
|
6964
6992
|
};
|
|
@@ -7015,10 +7043,10 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
|
7015
7043
|
]),
|
|
7016
7044
|
vue.createElementVNode("div", _hoisted_2$x, [
|
|
7017
7045
|
vue.createElementVNode("span", _hoisted_3$o, vue.toDisplayString(_ctx.item.title) + vue.toDisplayString(" "), 1),
|
|
7018
|
-
_ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
7046
|
+
_ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$h, "(" + vue.toDisplayString(_ctx.item.count) + ")", 1)) : vue.createCommentVNode("", true)
|
|
7019
7047
|
])
|
|
7020
7048
|
]),
|
|
7021
|
-
showChildren.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
7049
|
+
showChildren.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$a, [
|
|
7022
7050
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(treeItem.value.children, (itemChild) => {
|
|
7023
7051
|
return vue.openBlock(), vue.createBlock(_component_HierarchyFacetLevel, {
|
|
7024
7052
|
key: itemChild.title,
|
|
@@ -7451,8 +7479,8 @@ const _hoisted_1$H = {
|
|
|
7451
7479
|
};
|
|
7452
7480
|
const _hoisted_2$t = ["onClick"];
|
|
7453
7481
|
const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
|
|
7454
|
-
const _hoisted_4$
|
|
7455
|
-
const _hoisted_5$
|
|
7482
|
+
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
7483
|
+
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
7456
7484
|
const _hoisted_6$6 = {
|
|
7457
7485
|
key: 0,
|
|
7458
7486
|
class: "lupa-sidebar-filter-count"
|
|
@@ -7490,8 +7518,8 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
7490
7518
|
onClick: vue.withModifiers(handleMobileToggle, ["stop"])
|
|
7491
7519
|
}, null, 8, _hoisted_2$t),
|
|
7492
7520
|
vue.createElementVNode("div", _hoisted_3$m, [
|
|
7493
|
-
vue.createElementVNode("div", _hoisted_4$
|
|
7494
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
7521
|
+
vue.createElementVNode("div", _hoisted_4$g, [
|
|
7522
|
+
vue.createElementVNode("div", _hoisted_5$9, [
|
|
7495
7523
|
vue.createTextVNode(vue.toDisplayString(sidebarTitle.value) + " ", 1),
|
|
7496
7524
|
isFilterCountVisible.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$6, vue.toDisplayString(vue.unref(currentFilterCount)), 1)) : vue.createCommentVNode("", true)
|
|
7497
7525
|
]),
|
|
@@ -7517,7 +7545,7 @@ const _hoisted_3$l = {
|
|
|
7517
7545
|
key: 1,
|
|
7518
7546
|
class: "lupa-search-results-breadcrumb-text"
|
|
7519
7547
|
};
|
|
7520
|
-
const _hoisted_4$
|
|
7548
|
+
const _hoisted_4$f = { key: 2 };
|
|
7521
7549
|
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
7522
7550
|
__name: "SearchResultsBreadcrumbs",
|
|
7523
7551
|
props: {
|
|
@@ -7558,7 +7586,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
|
7558
7586
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
7559
7587
|
}
|
|
7560
7588
|
}, vue.toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$l, vue.toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
7561
|
-
index < breadcrumbsValue.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
7589
|
+
index < breadcrumbsValue.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$f, " / ")) : vue.createCommentVNode("", true)
|
|
7562
7590
|
]);
|
|
7563
7591
|
}), 128))
|
|
7564
7592
|
]);
|
|
@@ -7659,7 +7687,7 @@ const _hoisted_2$r = {
|
|
|
7659
7687
|
class: "lupa-page-number-separator"
|
|
7660
7688
|
};
|
|
7661
7689
|
const _hoisted_3$k = ["onClick"];
|
|
7662
|
-
const _hoisted_4$
|
|
7690
|
+
const _hoisted_4$e = {
|
|
7663
7691
|
key: 0,
|
|
7664
7692
|
class: "lupa-page-number-separator"
|
|
7665
7693
|
};
|
|
@@ -7750,7 +7778,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
7750
7778
|
}, vue.toDisplayString(page), 11, _hoisted_3$k);
|
|
7751
7779
|
}), 128)),
|
|
7752
7780
|
showLastPage.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
7753
|
-
showLastPageSeparator.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
7781
|
+
showLastPageSeparator.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$e, "...")) : vue.createCommentVNode("", true),
|
|
7754
7782
|
vue.createElementVNode("div", {
|
|
7755
7783
|
class: "lupa-page-number lupa-page-number-last",
|
|
7756
7784
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -7775,6 +7803,7 @@ const _hoisted_1$B = {
|
|
|
7775
7803
|
};
|
|
7776
7804
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
7777
7805
|
const _hoisted_3$j = { class: "lupa-select-label" };
|
|
7806
|
+
const _hoisted_4$d = ["aria-label"];
|
|
7778
7807
|
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
7779
7808
|
__name: "SearchResultsPageSize",
|
|
7780
7809
|
props: {
|
|
@@ -7797,6 +7826,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
7797
7826
|
vue.createElementVNode("label", _hoisted_3$j, vue.toDisplayString(_ctx.label), 1),
|
|
7798
7827
|
vue.createElementVNode("select", {
|
|
7799
7828
|
class: "lupa-select-dropdown",
|
|
7829
|
+
"aria-label": _ctx.label,
|
|
7800
7830
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
7801
7831
|
onChange: handleSelect,
|
|
7802
7832
|
ref_key: "select",
|
|
@@ -7805,7 +7835,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
7805
7835
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options.sizes, (option) => {
|
|
7806
7836
|
return vue.openBlock(), vue.createElementBlock("option", { key: option }, vue.toDisplayString(option), 1);
|
|
7807
7837
|
}), 128))
|
|
7808
|
-
],
|
|
7838
|
+
], 40, _hoisted_4$d)
|
|
7809
7839
|
])
|
|
7810
7840
|
]);
|
|
7811
7841
|
};
|
|
@@ -7817,7 +7847,8 @@ const _hoisted_1$A = {
|
|
|
7817
7847
|
};
|
|
7818
7848
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
7819
7849
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
7820
|
-
const _hoisted_4$c = ["
|
|
7850
|
+
const _hoisted_4$c = ["aria-label"];
|
|
7851
|
+
const _hoisted_5$8 = ["value"];
|
|
7821
7852
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
7822
7853
|
__name: "SearchResultsSort",
|
|
7823
7854
|
props: {
|
|
@@ -7871,6 +7902,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
7871
7902
|
vue.createElementVNode("label", _hoisted_3$i, vue.toDisplayString(_ctx.options.label), 1),
|
|
7872
7903
|
vue.withDirectives(vue.createElementVNode("select", {
|
|
7873
7904
|
class: "lupa-select-dropdown",
|
|
7905
|
+
"aria-label": _ctx.options.label,
|
|
7874
7906
|
"data-cy": "lupa-sort-select-dropdown",
|
|
7875
7907
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
7876
7908
|
onChange: handleSelect,
|
|
@@ -7880,9 +7912,9 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
7880
7912
|
return vue.openBlock(), vue.createElementBlock("option", {
|
|
7881
7913
|
key: option.key,
|
|
7882
7914
|
value: option.key
|
|
7883
|
-
}, vue.toDisplayString(option.label), 9,
|
|
7915
|
+
}, vue.toDisplayString(option.label), 9, _hoisted_5$8);
|
|
7884
7916
|
}), 128))
|
|
7885
|
-
],
|
|
7917
|
+
], 40, _hoisted_4$c), [
|
|
7886
7918
|
[vue.vModelSelect, selectedKey.value]
|
|
7887
7919
|
])
|
|
7888
7920
|
])
|
|
@@ -8864,6 +8896,10 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
8864
8896
|
}
|
|
8865
8897
|
return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
|
|
8866
8898
|
});
|
|
8899
|
+
const customDocumentHtmlAttributes = vue.computed(() => {
|
|
8900
|
+
var _a, _b, _c;
|
|
8901
|
+
return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
|
|
8902
|
+
});
|
|
8867
8903
|
const getGroupElements = (group) => {
|
|
8868
8904
|
var _a, _b;
|
|
8869
8905
|
return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
|
|
@@ -8920,12 +8956,11 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
8920
8956
|
}
|
|
8921
8957
|
return (_ctx, _cache) => {
|
|
8922
8958
|
var _a;
|
|
8923
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8959
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
8924
8960
|
id: "lupa-search-result-product-card",
|
|
8925
8961
|
"data-cy": "lupa-search-result-product-card",
|
|
8926
|
-
class:
|
|
8927
|
-
|
|
8928
|
-
}, [
|
|
8962
|
+
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
8963
|
+
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
8929
8964
|
vue.createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
8930
8965
|
vue.createElementVNode("div", {
|
|
8931
8966
|
class: vue.normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
@@ -8987,7 +9022,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
8987
9022
|
], 2);
|
|
8988
9023
|
}), 128))
|
|
8989
9024
|
], 2)
|
|
8990
|
-
],
|
|
9025
|
+
], 16);
|
|
8991
9026
|
};
|
|
8992
9027
|
}
|
|
8993
9028
|
});
|
|
@@ -9314,7 +9349,8 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9314
9349
|
"queryKey",
|
|
9315
9350
|
"idKey",
|
|
9316
9351
|
"titleKey",
|
|
9317
|
-
"routingBehavior"
|
|
9352
|
+
"routingBehavior",
|
|
9353
|
+
"customDocumentHtmlAttributes"
|
|
9318
9354
|
]);
|
|
9319
9355
|
});
|
|
9320
9356
|
const similarQueriesLabels = vue.computed(() => {
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -3164,8 +3164,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
|
|
|
3164
3164
|
const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
|
|
3165
3165
|
const _hoisted_2$P = { class: "lupa-input-clear" };
|
|
3166
3166
|
const _hoisted_3$B = { id: "lupa-search-box-input" };
|
|
3167
|
-
const _hoisted_4$
|
|
3168
|
-
const _hoisted_5$
|
|
3167
|
+
const _hoisted_4$s = ["value"];
|
|
3168
|
+
const _hoisted_5$g = ["aria-label", "placeholder"];
|
|
3169
3169
|
const _hoisted_6$9 = {
|
|
3170
3170
|
key: 0,
|
|
3171
3171
|
class: "lupa-close-label"
|
|
@@ -3214,6 +3214,10 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
3214
3214
|
var _a;
|
|
3215
3215
|
return __spreadValues({}, (_a = props.options.inputAttributes) != null ? _a : {});
|
|
3216
3216
|
});
|
|
3217
|
+
const ariaLabel = computed(() => {
|
|
3218
|
+
var _a;
|
|
3219
|
+
return (_a = labels.value.searchInputAriaLabel) != null ? _a : "Search input";
|
|
3220
|
+
});
|
|
3217
3221
|
watch(suggestedValue, () => {
|
|
3218
3222
|
if (suggestedValue.value.override) {
|
|
3219
3223
|
input.value = suggestedValue.value.item.suggestion;
|
|
@@ -3257,22 +3261,24 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
3257
3261
|
createElementVNode("div", _hoisted_3$B, [
|
|
3258
3262
|
createElementVNode("input", {
|
|
3259
3263
|
class: "lupa-hint",
|
|
3264
|
+
"aria-hidden": "true",
|
|
3260
3265
|
value: showHint.value ? suggestedValue.value.item.suggestion : "",
|
|
3261
3266
|
disabled: ""
|
|
3262
|
-
}, null, 8, _hoisted_4$
|
|
3267
|
+
}, null, 8, _hoisted_4$s),
|
|
3263
3268
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3264
3269
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
3265
3270
|
}, inputAttributes.value, {
|
|
3266
3271
|
ref_key: "mainInput",
|
|
3267
3272
|
ref: mainInput,
|
|
3268
3273
|
autocomplete: "off",
|
|
3274
|
+
"aria-label": ariaLabel.value,
|
|
3269
3275
|
class: "lupa-search-box-input-field",
|
|
3270
3276
|
"data-cy": "lupa-search-box-input-field",
|
|
3271
3277
|
type: "text",
|
|
3272
3278
|
placeholder: labels.value.placeholder,
|
|
3273
3279
|
onInput: handleInput,
|
|
3274
3280
|
onFocus: handleFocus
|
|
3275
|
-
}), null, 16, _hoisted_5$
|
|
3281
|
+
}), null, 16, _hoisted_5$g), [
|
|
3276
3282
|
[vModelText, inputValue.value]
|
|
3277
3283
|
])
|
|
3278
3284
|
]),
|
|
@@ -3438,11 +3444,11 @@ const _hoisted_3$A = {
|
|
|
3438
3444
|
class: "lupa-suggestion-facet",
|
|
3439
3445
|
"data-cy": "lupa-suggestion-facet"
|
|
3440
3446
|
};
|
|
3441
|
-
const _hoisted_4$
|
|
3447
|
+
const _hoisted_4$r = {
|
|
3442
3448
|
class: "lupa-suggestion-facet-label",
|
|
3443
3449
|
"data-cy": "lupa-suggestion-facet-label"
|
|
3444
3450
|
};
|
|
3445
|
-
const _hoisted_5$
|
|
3451
|
+
const _hoisted_5$f = {
|
|
3446
3452
|
class: "lupa-suggestion-facet-value",
|
|
3447
3453
|
"data-cy": "lupa-suggestion-facet-value"
|
|
3448
3454
|
};
|
|
@@ -3484,8 +3490,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
3484
3490
|
innerHTML: _ctx.suggestion.displayHighlight
|
|
3485
3491
|
}, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
|
|
3486
3492
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
|
|
3487
|
-
createElementVNode("span", _hoisted_4$
|
|
3488
|
-
createElementVNode("span", _hoisted_5$
|
|
3493
|
+
createElementVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
3494
|
+
createElementVNode("span", _hoisted_5$f, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3489
3495
|
])) : createCommentVNode("", true)
|
|
3490
3496
|
]);
|
|
3491
3497
|
};
|
|
@@ -3892,8 +3898,8 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
3892
3898
|
const _hoisted_1$11 = ["innerHTML"];
|
|
3893
3899
|
const _hoisted_2$K = { key: 0 };
|
|
3894
3900
|
const _hoisted_3$z = { key: 1 };
|
|
3895
|
-
const _hoisted_4$
|
|
3896
|
-
const _hoisted_5$
|
|
3901
|
+
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
3902
|
+
const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
|
|
3897
3903
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
3898
3904
|
__name: "SearchBoxProductCustom",
|
|
3899
3905
|
props: {
|
|
@@ -3925,8 +3931,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
3925
3931
|
class: [className.value, "lupa-search-box-product-custom"]
|
|
3926
3932
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
3927
3933
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
3928
|
-
createElementVNode("div", _hoisted_4$
|
|
3929
|
-
createElementVNode("div", _hoisted_5$
|
|
3934
|
+
createElementVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
3935
|
+
createElementVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
|
|
3930
3936
|
]))
|
|
3931
3937
|
], 16));
|
|
3932
3938
|
};
|
|
@@ -4266,7 +4272,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValue
|
|
|
4266
4272
|
const _hoisted_1$_ = ["href"];
|
|
4267
4273
|
const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
|
|
4268
4274
|
const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
|
|
4269
|
-
const _hoisted_4$
|
|
4275
|
+
const _hoisted_4$p = {
|
|
4270
4276
|
key: 0,
|
|
4271
4277
|
class: "lupa-search-box-product-add-to-cart-section"
|
|
4272
4278
|
};
|
|
@@ -4301,6 +4307,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
4301
4307
|
var _a;
|
|
4302
4308
|
return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
|
|
4303
4309
|
});
|
|
4310
|
+
const customDocumentHtmlAttributes = computed(() => {
|
|
4311
|
+
var _a, _b, _c;
|
|
4312
|
+
return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
|
|
4313
|
+
});
|
|
4304
4314
|
const handleClick = (event) => {
|
|
4305
4315
|
emit("product-click", {
|
|
4306
4316
|
item: props.item,
|
|
@@ -4315,12 +4325,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
4315
4325
|
isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
|
|
4316
4326
|
});
|
|
4317
4327
|
return (_ctx, _cache) => {
|
|
4318
|
-
return openBlock(), createElementBlock("a", {
|
|
4319
|
-
class:
|
|
4328
|
+
return openBlock(), createElementBlock("a", mergeProps({
|
|
4329
|
+
class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
|
|
4330
|
+
href: link.value
|
|
4331
|
+
}, customDocumentHtmlAttributes.value, {
|
|
4320
4332
|
"data-cy": "lupa-search-box-product",
|
|
4321
|
-
href: link.value,
|
|
4322
4333
|
onClick: handleClick
|
|
4323
|
-
}, [
|
|
4334
|
+
}), [
|
|
4324
4335
|
createElementVNode("div", _hoisted_2$I, [
|
|
4325
4336
|
(openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
|
|
4326
4337
|
return openBlock(), createBlock(_sfc_main$13, {
|
|
@@ -4345,7 +4356,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
4345
4356
|
}, null, 8, ["item", "element", "labels", "link"]);
|
|
4346
4357
|
}), 128))
|
|
4347
4358
|
]),
|
|
4348
|
-
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4359
|
+
addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
|
|
4349
4360
|
createVNode(_sfc_main$13, {
|
|
4350
4361
|
class: "lupa-search-box-product-element",
|
|
4351
4362
|
item: _ctx.item,
|
|
@@ -4355,7 +4366,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
4355
4366
|
isInStock: isInStock.value
|
|
4356
4367
|
}, null, 8, ["item", "element", "labels", "link", "isInStock"])
|
|
4357
4368
|
])) : createCommentVNode("", true)
|
|
4358
|
-
],
|
|
4369
|
+
], 16, _hoisted_1$_);
|
|
4359
4370
|
};
|
|
4360
4371
|
}
|
|
4361
4372
|
});
|
|
@@ -4581,7 +4592,7 @@ const _hoisted_3$w = {
|
|
|
4581
4592
|
key: 0,
|
|
4582
4593
|
class: "lupa-panel-title"
|
|
4583
4594
|
};
|
|
4584
|
-
const _hoisted_4$
|
|
4595
|
+
const _hoisted_4$o = {
|
|
4585
4596
|
key: 1,
|
|
4586
4597
|
id: "lupa-search-box-panel"
|
|
4587
4598
|
};
|
|
@@ -4762,7 +4773,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4762
4773
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
4763
4774
|
onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
|
|
4764
4775
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
4765
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4776
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
4766
4777
|
createVNode(_sfc_main$1h, {
|
|
4767
4778
|
options: _ctx.options.history,
|
|
4768
4779
|
history: history.value,
|
|
@@ -5156,7 +5167,7 @@ const _hoisted_3$v = {
|
|
|
5156
5167
|
key: 1,
|
|
5157
5168
|
"data-cy": "did-you-mean-label"
|
|
5158
5169
|
};
|
|
5159
|
-
const _hoisted_4$
|
|
5170
|
+
const _hoisted_4$n = { key: 1 };
|
|
5160
5171
|
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
5161
5172
|
__name: "SearchResultsDidYouMean",
|
|
5162
5173
|
props: {
|
|
@@ -5207,7 +5218,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
5207
5218
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
5208
5219
|
"data-cy": "did-you-mean-value",
|
|
5209
5220
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
5210
|
-
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$
|
|
5221
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
|
|
5211
5222
|
]);
|
|
5212
5223
|
}), 128))
|
|
5213
5224
|
])) : createCommentVNode("", true)
|
|
@@ -5257,7 +5268,7 @@ const _hoisted_3$u = {
|
|
|
5257
5268
|
key: 1,
|
|
5258
5269
|
class: "lupa-results-total-count"
|
|
5259
5270
|
};
|
|
5260
|
-
const _hoisted_4$
|
|
5271
|
+
const _hoisted_4$m = ["innerHTML"];
|
|
5261
5272
|
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
5262
5273
|
__name: "SearchResultsTitle",
|
|
5263
5274
|
props: {
|
|
@@ -5306,7 +5317,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
5306
5317
|
key: 2,
|
|
5307
5318
|
class: "lupa-result-page-description-top",
|
|
5308
5319
|
innerHTML: descriptionTop.value
|
|
5309
|
-
}, null, 8, _hoisted_4$
|
|
5320
|
+
}, null, 8, _hoisted_4$m)) : createCommentVNode("", true)
|
|
5310
5321
|
]);
|
|
5311
5322
|
};
|
|
5312
5323
|
}
|
|
@@ -5352,7 +5363,7 @@ const _hoisted_3$s = {
|
|
|
5352
5363
|
key: 0,
|
|
5353
5364
|
class: "filter-values"
|
|
5354
5365
|
};
|
|
5355
|
-
const _hoisted_4$
|
|
5366
|
+
const _hoisted_4$l = { class: "lupa-current-filter-list" };
|
|
5356
5367
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
5357
5368
|
__name: "CurrentFilters",
|
|
5358
5369
|
props: {
|
|
@@ -5418,7 +5429,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
5418
5429
|
}, null, 2)) : createCommentVNode("", true)
|
|
5419
5430
|
]),
|
|
5420
5431
|
!_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
|
|
5421
|
-
createElementVNode("div", _hoisted_4$
|
|
5432
|
+
createElementVNode("div", _hoisted_4$l, [
|
|
5422
5433
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
|
|
5423
5434
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
5424
5435
|
key: filter.key + "_" + filter.value,
|
|
@@ -5486,8 +5497,8 @@ const _hoisted_1$Q = {
|
|
|
5486
5497
|
};
|
|
5487
5498
|
const _hoisted_2$A = { class: "lupa-category-back" };
|
|
5488
5499
|
const _hoisted_3$r = ["href"];
|
|
5489
|
-
const _hoisted_4$
|
|
5490
|
-
const _hoisted_5$
|
|
5500
|
+
const _hoisted_4$k = ["href"];
|
|
5501
|
+
const _hoisted_5$d = { class: "lupa-child-category-list" };
|
|
5491
5502
|
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
5492
5503
|
__name: "CategoryFilter",
|
|
5493
5504
|
props: {
|
|
@@ -5591,9 +5602,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
5591
5602
|
href: parentUrlLink.value,
|
|
5592
5603
|
class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
|
|
5593
5604
|
onClick: handleNavigationParent
|
|
5594
|
-
}, toDisplayString(parentTitle.value), 11, _hoisted_4$
|
|
5605
|
+
}, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
|
|
5595
5606
|
], 2),
|
|
5596
|
-
createElementVNode("div", _hoisted_5$
|
|
5607
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
5597
5608
|
(openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
|
|
5598
5609
|
return openBlock(), createBlock(_sfc_main$U, {
|
|
5599
5610
|
key: getCategoryKey(child),
|
|
@@ -5612,8 +5623,8 @@ const _hoisted_1$P = {
|
|
|
5612
5623
|
};
|
|
5613
5624
|
const _hoisted_2$z = ["placeholder"];
|
|
5614
5625
|
const _hoisted_3$q = { class: "lupa-terms-list" };
|
|
5615
|
-
const _hoisted_4$
|
|
5616
|
-
const _hoisted_5$
|
|
5626
|
+
const _hoisted_4$j = ["onClick"];
|
|
5627
|
+
const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
|
|
5617
5628
|
const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
|
|
5618
5629
|
const _hoisted_7$6 = { class: "lupa-term-label" };
|
|
5619
5630
|
const _hoisted_8$1 = {
|
|
@@ -5709,7 +5720,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
5709
5720
|
key: item.title,
|
|
5710
5721
|
onClick: ($event) => handleFacetClick(item)
|
|
5711
5722
|
}, [
|
|
5712
|
-
createElementVNode("div", _hoisted_5$
|
|
5723
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
5713
5724
|
createElementVNode("span", {
|
|
5714
5725
|
class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
|
|
5715
5726
|
}, null, 2)
|
|
@@ -5718,7 +5729,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
5718
5729
|
createElementVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
|
|
5719
5730
|
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
|
|
5720
5731
|
])
|
|
5721
|
-
], 10, _hoisted_4$
|
|
5732
|
+
], 10, _hoisted_4$j);
|
|
5722
5733
|
}), 128))
|
|
5723
5734
|
]),
|
|
5724
5735
|
displayShowMore.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -6718,12 +6729,12 @@ const _hoisted_3$p = {
|
|
|
6718
6729
|
key: 1,
|
|
6719
6730
|
class: "lupa-stats-facet-summary-input"
|
|
6720
6731
|
};
|
|
6721
|
-
const _hoisted_4$
|
|
6732
|
+
const _hoisted_4$i = {
|
|
6722
6733
|
key: 0,
|
|
6723
6734
|
class: "lupa-stats-range-label"
|
|
6724
6735
|
};
|
|
6725
|
-
const _hoisted_5$
|
|
6726
|
-
const _hoisted_6$7 = ["max", "min", "pattern"];
|
|
6736
|
+
const _hoisted_5$b = { class: "lupa-stats-from" };
|
|
6737
|
+
const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
|
|
6727
6738
|
const _hoisted_7$5 = { key: 0 };
|
|
6728
6739
|
const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
|
|
6729
6740
|
const _hoisted_9 = {
|
|
@@ -6731,7 +6742,7 @@ const _hoisted_9 = {
|
|
|
6731
6742
|
class: "lupa-stats-range-label"
|
|
6732
6743
|
};
|
|
6733
6744
|
const _hoisted_10 = { class: "lupa-stats-to" };
|
|
6734
|
-
const _hoisted_11 = ["max", "min", "pattern"];
|
|
6745
|
+
const _hoisted_11 = ["max", "min", "pattern", "aria-label"];
|
|
6735
6746
|
const _hoisted_12 = { key: 0 };
|
|
6736
6747
|
const _hoisted_13 = {
|
|
6737
6748
|
key: 2,
|
|
@@ -6859,6 +6870,20 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
6859
6870
|
const sliderInputFormat = computed(() => {
|
|
6860
6871
|
return isPrice.value ? `[0-9]+([${separator.value}][0-9]{1,2})?` : void 0;
|
|
6861
6872
|
});
|
|
6873
|
+
const sliderAria = computed(() => {
|
|
6874
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6875
|
+
return {
|
|
6876
|
+
"aria-label": ((_b = (_a = props.options.stats) == null ? void 0 : _a.labels) == null ? void 0 : _b.sliderDotAriaLabel) ? `${(_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.sliderDotAriaLabel} - ${(_e = props.facet) == null ? void 0 : _e.label}` : `Range slider control dot for ${(_f = props.facet) == null ? void 0 : _f.label}`
|
|
6877
|
+
};
|
|
6878
|
+
});
|
|
6879
|
+
const ariaLabelFrom = computed(() => {
|
|
6880
|
+
var _a, _b, _c, _d, _e;
|
|
6881
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaFrom) != null ? _e : rangeLabelFrom.value}`;
|
|
6882
|
+
});
|
|
6883
|
+
const ariaLabelTo = computed(() => {
|
|
6884
|
+
var _a, _b, _c, _d, _e;
|
|
6885
|
+
return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaTo) != null ? _e : rangeLabelTo.value}`;
|
|
6886
|
+
});
|
|
6862
6887
|
watch(currentMinValue, () => {
|
|
6863
6888
|
innerSliderRange.value = [];
|
|
6864
6889
|
});
|
|
@@ -6888,15 +6913,16 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
6888
6913
|
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
6889
6914
|
!isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
6890
6915
|
createElementVNode("div", null, [
|
|
6891
|
-
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
6892
|
-
createElementVNode("div", _hoisted_5$
|
|
6916
|
+
rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
|
|
6917
|
+
createElementVNode("div", _hoisted_5$b, [
|
|
6893
6918
|
withDirectives(createElementVNode("input", {
|
|
6894
6919
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
6895
6920
|
type: "text",
|
|
6896
6921
|
maxlength: "8",
|
|
6897
6922
|
max: facetMax.value,
|
|
6898
6923
|
min: facetMin.value,
|
|
6899
|
-
pattern: sliderInputFormat.value
|
|
6924
|
+
pattern: sliderInputFormat.value,
|
|
6925
|
+
"aria-label": ariaLabelFrom.value
|
|
6900
6926
|
}, null, 8, _hoisted_6$7), [
|
|
6901
6927
|
[
|
|
6902
6928
|
vModelText,
|
|
@@ -6918,7 +6944,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
6918
6944
|
maxlength: "8",
|
|
6919
6945
|
max: facetMax.value,
|
|
6920
6946
|
min: facetMin.value,
|
|
6921
|
-
pattern: sliderInputFormat.value
|
|
6947
|
+
pattern: sliderInputFormat.value,
|
|
6948
|
+
"aria-label": ariaLabelTo.value
|
|
6922
6949
|
}, null, 8, _hoisted_11), [
|
|
6923
6950
|
[
|
|
6924
6951
|
vModelText,
|
|
@@ -6939,11 +6966,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
6939
6966
|
max: facetMax.value,
|
|
6940
6967
|
lazy: true,
|
|
6941
6968
|
step: interval.value,
|
|
6969
|
+
aria: sliderAria.value,
|
|
6942
6970
|
modelValue: sliderRange.value,
|
|
6943
6971
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sliderRange.value = $event),
|
|
6944
6972
|
onSlide: handleDragging,
|
|
6945
6973
|
onEnd: handleChange
|
|
6946
|
-
}, null, 8, ["min", "max", "step", "modelValue"])
|
|
6974
|
+
}, null, 8, ["min", "max", "step", "aria", "modelValue"])
|
|
6947
6975
|
])) : createCommentVNode("", true)
|
|
6948
6976
|
]);
|
|
6949
6977
|
};
|
|
@@ -6952,11 +6980,11 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
6952
6980
|
const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
|
|
6953
6981
|
const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
|
|
6954
6982
|
const _hoisted_3$o = { class: "lupa-term-label" };
|
|
6955
|
-
const _hoisted_4$
|
|
6983
|
+
const _hoisted_4$h = {
|
|
6956
6984
|
key: 0,
|
|
6957
6985
|
class: "lupa-term-count"
|
|
6958
6986
|
};
|
|
6959
|
-
const _hoisted_5$
|
|
6987
|
+
const _hoisted_5$a = {
|
|
6960
6988
|
key: 0,
|
|
6961
6989
|
class: "lupa-facet-level"
|
|
6962
6990
|
};
|
|
@@ -7013,10 +7041,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
7013
7041
|
]),
|
|
7014
7042
|
createElementVNode("div", _hoisted_2$x, [
|
|
7015
7043
|
createElementVNode("span", _hoisted_3$o, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
|
|
7016
|
-
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
7044
|
+
_ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
|
|
7017
7045
|
])
|
|
7018
7046
|
]),
|
|
7019
|
-
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
7047
|
+
showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
|
|
7020
7048
|
(openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
|
|
7021
7049
|
return openBlock(), createBlock(_component_HierarchyFacetLevel, {
|
|
7022
7050
|
key: itemChild.title,
|
|
@@ -7449,8 +7477,8 @@ const _hoisted_1$H = {
|
|
|
7449
7477
|
};
|
|
7450
7478
|
const _hoisted_2$t = ["onClick"];
|
|
7451
7479
|
const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
|
|
7452
|
-
const _hoisted_4$
|
|
7453
|
-
const _hoisted_5$
|
|
7480
|
+
const _hoisted_4$g = { class: "lupa-sidebar-top" };
|
|
7481
|
+
const _hoisted_5$9 = { class: "lupa-sidebar-title" };
|
|
7454
7482
|
const _hoisted_6$6 = {
|
|
7455
7483
|
key: 0,
|
|
7456
7484
|
class: "lupa-sidebar-filter-count"
|
|
@@ -7488,8 +7516,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
7488
7516
|
onClick: withModifiers(handleMobileToggle, ["stop"])
|
|
7489
7517
|
}, null, 8, _hoisted_2$t),
|
|
7490
7518
|
createElementVNode("div", _hoisted_3$m, [
|
|
7491
|
-
createElementVNode("div", _hoisted_4$
|
|
7492
|
-
createElementVNode("div", _hoisted_5$
|
|
7519
|
+
createElementVNode("div", _hoisted_4$g, [
|
|
7520
|
+
createElementVNode("div", _hoisted_5$9, [
|
|
7493
7521
|
createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
|
|
7494
7522
|
isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
7495
7523
|
]),
|
|
@@ -7515,7 +7543,7 @@ const _hoisted_3$l = {
|
|
|
7515
7543
|
key: 1,
|
|
7516
7544
|
class: "lupa-search-results-breadcrumb-text"
|
|
7517
7545
|
};
|
|
7518
|
-
const _hoisted_4$
|
|
7546
|
+
const _hoisted_4$f = { key: 2 };
|
|
7519
7547
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
7520
7548
|
__name: "SearchResultsBreadcrumbs",
|
|
7521
7549
|
props: {
|
|
@@ -7556,7 +7584,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
7556
7584
|
return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
|
|
7557
7585
|
}
|
|
7558
7586
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
7559
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
7587
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
|
|
7560
7588
|
]);
|
|
7561
7589
|
}), 128))
|
|
7562
7590
|
]);
|
|
@@ -7657,7 +7685,7 @@ const _hoisted_2$r = {
|
|
|
7657
7685
|
class: "lupa-page-number-separator"
|
|
7658
7686
|
};
|
|
7659
7687
|
const _hoisted_3$k = ["onClick"];
|
|
7660
|
-
const _hoisted_4$
|
|
7688
|
+
const _hoisted_4$e = {
|
|
7661
7689
|
key: 0,
|
|
7662
7690
|
class: "lupa-page-number-separator"
|
|
7663
7691
|
};
|
|
@@ -7748,7 +7776,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
7748
7776
|
}, toDisplayString(page), 11, _hoisted_3$k);
|
|
7749
7777
|
}), 128)),
|
|
7750
7778
|
showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
7751
|
-
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
7779
|
+
showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
|
|
7752
7780
|
createElementVNode("div", {
|
|
7753
7781
|
class: "lupa-page-number lupa-page-number-last",
|
|
7754
7782
|
onClick: _cache[2] || (_cache[2] = () => {
|
|
@@ -7773,6 +7801,7 @@ const _hoisted_1$B = {
|
|
|
7773
7801
|
};
|
|
7774
7802
|
const _hoisted_2$q = { id: "lupa-select" };
|
|
7775
7803
|
const _hoisted_3$j = { class: "lupa-select-label" };
|
|
7804
|
+
const _hoisted_4$d = ["aria-label"];
|
|
7776
7805
|
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
7777
7806
|
__name: "SearchResultsPageSize",
|
|
7778
7807
|
props: {
|
|
@@ -7795,6 +7824,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
7795
7824
|
createElementVNode("label", _hoisted_3$j, toDisplayString(_ctx.label), 1),
|
|
7796
7825
|
createElementVNode("select", {
|
|
7797
7826
|
class: "lupa-select-dropdown",
|
|
7827
|
+
"aria-label": _ctx.label,
|
|
7798
7828
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
7799
7829
|
onChange: handleSelect,
|
|
7800
7830
|
ref_key: "select",
|
|
@@ -7803,7 +7833,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
7803
7833
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
7804
7834
|
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
7805
7835
|
}), 128))
|
|
7806
|
-
],
|
|
7836
|
+
], 40, _hoisted_4$d)
|
|
7807
7837
|
])
|
|
7808
7838
|
]);
|
|
7809
7839
|
};
|
|
@@ -7815,7 +7845,8 @@ const _hoisted_1$A = {
|
|
|
7815
7845
|
};
|
|
7816
7846
|
const _hoisted_2$p = { id: "lupa-select" };
|
|
7817
7847
|
const _hoisted_3$i = { class: "lupa-select-label" };
|
|
7818
|
-
const _hoisted_4$c = ["
|
|
7848
|
+
const _hoisted_4$c = ["aria-label"];
|
|
7849
|
+
const _hoisted_5$8 = ["value"];
|
|
7819
7850
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
7820
7851
|
__name: "SearchResultsSort",
|
|
7821
7852
|
props: {
|
|
@@ -7869,6 +7900,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
7869
7900
|
createElementVNode("label", _hoisted_3$i, toDisplayString(_ctx.options.label), 1),
|
|
7870
7901
|
withDirectives(createElementVNode("select", {
|
|
7871
7902
|
class: "lupa-select-dropdown",
|
|
7903
|
+
"aria-label": _ctx.options.label,
|
|
7872
7904
|
"data-cy": "lupa-sort-select-dropdown",
|
|
7873
7905
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
|
|
7874
7906
|
onChange: handleSelect,
|
|
@@ -7878,9 +7910,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
7878
7910
|
return openBlock(), createElementBlock("option", {
|
|
7879
7911
|
key: option.key,
|
|
7880
7912
|
value: option.key
|
|
7881
|
-
}, toDisplayString(option.label), 9,
|
|
7913
|
+
}, toDisplayString(option.label), 9, _hoisted_5$8);
|
|
7882
7914
|
}), 128))
|
|
7883
|
-
],
|
|
7915
|
+
], 40, _hoisted_4$c), [
|
|
7884
7916
|
[vModelSelect, selectedKey.value]
|
|
7885
7917
|
])
|
|
7886
7918
|
])
|
|
@@ -8862,6 +8894,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8862
8894
|
}
|
|
8863
8895
|
return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
|
|
8864
8896
|
});
|
|
8897
|
+
const customDocumentHtmlAttributes = computed(() => {
|
|
8898
|
+
var _a, _b, _c;
|
|
8899
|
+
return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
|
|
8900
|
+
});
|
|
8865
8901
|
const getGroupElements = (group) => {
|
|
8866
8902
|
var _a, _b;
|
|
8867
8903
|
return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
|
|
@@ -8918,12 +8954,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8918
8954
|
}
|
|
8919
8955
|
return (_ctx, _cache) => {
|
|
8920
8956
|
var _a;
|
|
8921
|
-
return openBlock(), createElementBlock("div", {
|
|
8957
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
8922
8958
|
id: "lupa-search-result-product-card",
|
|
8923
8959
|
"data-cy": "lupa-search-result-product-card",
|
|
8924
|
-
class:
|
|
8925
|
-
|
|
8926
|
-
}, [
|
|
8960
|
+
class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
|
|
8961
|
+
}, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
|
|
8927
8962
|
createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
|
|
8928
8963
|
createElementVNode("div", {
|
|
8929
8964
|
class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
|
|
@@ -8985,7 +9020,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8985
9020
|
], 2);
|
|
8986
9021
|
}), 128))
|
|
8987
9022
|
], 2)
|
|
8988
|
-
],
|
|
9023
|
+
], 16);
|
|
8989
9024
|
};
|
|
8990
9025
|
}
|
|
8991
9026
|
});
|
|
@@ -9312,7 +9347,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9312
9347
|
"queryKey",
|
|
9313
9348
|
"idKey",
|
|
9314
9349
|
"titleKey",
|
|
9315
|
-
"routingBehavior"
|
|
9350
|
+
"routingBehavior",
|
|
9351
|
+
"customDocumentHtmlAttributes"
|
|
9316
9352
|
]);
|
|
9317
9353
|
});
|
|
9318
9354
|
const similarQueriesLabels = computed(() => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AnalyticsOptions } from './AnalyticsOptions';
|
|
2
|
-
import type { Environment as SdkEnvironment } from '@getlupa/client-sdk/Types';
|
|
2
|
+
import type { Environment as SdkEnvironment, Document } from '@getlupa/client-sdk/Types';
|
|
3
|
+
export type CustomDocumentHtmlAttributes = (doc: Document) => Record<string, unknown>;
|
|
3
4
|
export type SdkOptions = {
|
|
4
5
|
environment: SdkEnvironment;
|
|
5
6
|
customBaseUrl?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DocumentElement } from '../DocumentElement';
|
|
2
2
|
import type { Document } from '@getlupa/client-sdk/Types';
|
|
3
|
+
import { CustomDocumentHtmlAttributes } from '../General';
|
|
3
4
|
export declare enum SearchBoxPanelType {
|
|
4
5
|
SUGGESTION = "suggestion",
|
|
5
6
|
DOCUMENT = "document"
|
|
@@ -25,6 +26,7 @@ export type DocumentSearchBoxPanel = SearchBoxPanelBase & {
|
|
|
25
26
|
customClassName?: string;
|
|
26
27
|
searchBySuggestion?: boolean;
|
|
27
28
|
isInStock?: (doc: Document) => boolean;
|
|
29
|
+
customDocumentHtmlAttributes?: CustomDocumentHtmlAttributes;
|
|
28
30
|
};
|
|
29
31
|
export type SuggestionSearchBoxPanel = SearchBoxPanelBase & {
|
|
30
32
|
type: SearchBoxPanelType.SUGGESTION;
|
|
@@ -3,6 +3,7 @@ import type { DocumentElement } from '../DocumentElement';
|
|
|
3
3
|
import type { BadgeElement, BadgeGenerateOptions } from './BadgeOptions';
|
|
4
4
|
import type { RoutingBehavior } from './RoutingBehavior';
|
|
5
5
|
import type { SearchResultsOptionLabels } from './SearchResultsOptions';
|
|
6
|
+
import { CustomDocumentHtmlAttributes } from '../General';
|
|
6
7
|
export type SearchResultsProductCardOptions = {
|
|
7
8
|
labels: SearchResultsOptionLabels;
|
|
8
9
|
routingBehavior?: RoutingBehavior;
|
|
@@ -15,6 +16,7 @@ export type SearchResultsProductCardOptions = {
|
|
|
15
16
|
queryKey: string;
|
|
16
17
|
idKey?: string;
|
|
17
18
|
titleKey?: string;
|
|
19
|
+
customDocumentHtmlAttributes?: CustomDocumentHtmlAttributes;
|
|
18
20
|
};
|
|
19
21
|
export type SearchResultBadgeOptions = {
|
|
20
22
|
anchor: AnchorPosition;
|