@getlupa/vue 0.12.1 → 0.12.3
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 +35 -23
- package/dist/lupaSearch.mjs +35 -23
- package/dist/src/components/search-results/products/pagination/SearchResultsPageSize.vue.d.ts +5 -4
- package/dist/src/types/search-results/SearchResultsOptions.d.ts +4 -0
- package/dist/src/types/search-results/SearchResultsPagination.d.ts +1 -0
- package/package.json +1 -1
package/dist/lupaSearch.js
CHANGED
|
@@ -3238,7 +3238,7 @@ const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
|
3238
3238
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
3239
3239
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
3240
3240
|
const _hoisted_4$s = ["value"];
|
|
3241
|
-
const _hoisted_5$
|
|
3241
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
3242
3242
|
const _hoisted_6$9 = /* @__PURE__ */ vue.createElementVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
3243
3243
|
const _hoisted_7$7 = [
|
|
3244
3244
|
_hoisted_6$9
|
|
@@ -3358,7 +3358,7 @@ const _sfc_main$1n = /* @__PURE__ */ vue.defineComponent({
|
|
|
3358
3358
|
placeholder: labels.value.placeholder,
|
|
3359
3359
|
onInput: handleInput,
|
|
3360
3360
|
onFocus: handleFocus
|
|
3361
|
-
}), null, 16, _hoisted_5$
|
|
3361
|
+
}), null, 16, _hoisted_5$i), [
|
|
3362
3362
|
[vue.vModelText, inputValue.value]
|
|
3363
3363
|
]),
|
|
3364
3364
|
_ctx.options.showSubmitButton ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -3532,7 +3532,7 @@ const _hoisted_4$r = {
|
|
|
3532
3532
|
class: "lupa-suggestion-facet-label",
|
|
3533
3533
|
"data-cy": "lupa-suggestion-facet-label"
|
|
3534
3534
|
};
|
|
3535
|
-
const _hoisted_5$
|
|
3535
|
+
const _hoisted_5$h = {
|
|
3536
3536
|
class: "lupa-suggestion-facet-value",
|
|
3537
3537
|
"data-cy": "lupa-suggestion-facet-value"
|
|
3538
3538
|
};
|
|
@@ -3575,7 +3575,7 @@ const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
|
|
|
3575
3575
|
}, null, 8, _hoisted_1$1b)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$P, vue.toDisplayString(_ctx.suggestion.display), 1)),
|
|
3576
3576
|
_ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
3577
3577
|
vue.createElementVNode("span", _hoisted_4$r, vue.toDisplayString(facetLabel.value), 1),
|
|
3578
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
3578
|
+
vue.createElementVNode("span", _hoisted_5$h, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3579
3579
|
])) : vue.createCommentVNode("", true)
|
|
3580
3580
|
]);
|
|
3581
3581
|
};
|
|
@@ -4076,7 +4076,7 @@ const _hoisted_1$14 = ["innerHTML"];
|
|
|
4076
4076
|
const _hoisted_2$M = { key: 0 };
|
|
4077
4077
|
const _hoisted_3$y = { key: 1 };
|
|
4078
4078
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
4079
|
-
const _hoisted_5$
|
|
4079
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
4080
4080
|
const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
4081
4081
|
__name: "SearchBoxProductCustom",
|
|
4082
4082
|
props: {
|
|
@@ -4109,7 +4109,7 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4109
4109
|
}, vue.toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
4110
4110
|
!label.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$M, vue.toDisplayString(text.value), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$y, [
|
|
4111
4111
|
vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(label.value), 1),
|
|
4112
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
4112
|
+
vue.createElementVNode("div", _hoisted_5$g, vue.toDisplayString(text.value), 1)
|
|
4113
4113
|
]))
|
|
4114
4114
|
], 16));
|
|
4115
4115
|
};
|
|
@@ -5255,7 +5255,7 @@ const _hoisted_4$n = {
|
|
|
5255
5255
|
key: 1,
|
|
5256
5256
|
class: "lupa-panel-title"
|
|
5257
5257
|
};
|
|
5258
|
-
const _hoisted_5$
|
|
5258
|
+
const _hoisted_5$f = {
|
|
5259
5259
|
key: 1,
|
|
5260
5260
|
id: "lupa-search-box-panel"
|
|
5261
5261
|
};
|
|
@@ -5469,7 +5469,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
5469
5469
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
5470
5470
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
5471
5471
|
}, null, 8, ["labels", "showTotalCount"])) : vue.createCommentVNode("", true)
|
|
5472
|
-
])) : displayHistory.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
5472
|
+
])) : displayHistory.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$f, [
|
|
5473
5473
|
vue.createVNode(_sfc_main$1k, {
|
|
5474
5474
|
options: _ctx.options.history,
|
|
5475
5475
|
history: history.value,
|
|
@@ -5979,7 +5979,8 @@ const _hoisted_3$s = {
|
|
|
5979
5979
|
key: 1,
|
|
5980
5980
|
class: "lupa-results-total-count"
|
|
5981
5981
|
};
|
|
5982
|
-
const _hoisted_4$l =
|
|
5982
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
5983
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
5983
5984
|
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
5984
5985
|
__name: "SearchResultsTitle",
|
|
5985
5986
|
props: {
|
|
@@ -6022,7 +6023,11 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
6022
6023
|
showSearchTitle.value ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_1$P, [
|
|
6023
6024
|
vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
6024
6025
|
queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$C, "'" + vue.toDisplayString(queryText.value) + "'", 1)) : vue.createCommentVNode("", true),
|
|
6025
|
-
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s,
|
|
6026
|
+
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, [
|
|
6027
|
+
vue.createTextVNode("(" + vue.toDisplayString(searchResultsCountLabel.value), 1),
|
|
6028
|
+
vue.createElementVNode("span", _hoisted_4$l, vue.toDisplayString(vue.unref(totalItems)), 1),
|
|
6029
|
+
vue.createTextVNode(")")
|
|
6030
|
+
])) : vue.createCommentVNode("", true)
|
|
6026
6031
|
])) : vue.createCommentVNode("", true),
|
|
6027
6032
|
_ctx.showSummary ? (vue.openBlock(), vue.createBlock(_sfc_main$T, {
|
|
6028
6033
|
key: 1,
|
|
@@ -6032,7 +6037,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
6032
6037
|
key: 2,
|
|
6033
6038
|
class: "lupa-result-page-description-top",
|
|
6034
6039
|
innerHTML: descriptionTop.value
|
|
6035
|
-
}, null, 8,
|
|
6040
|
+
}, null, 8, _hoisted_5$e)) : vue.createCommentVNode("", true)
|
|
6036
6041
|
]);
|
|
6037
6042
|
};
|
|
6038
6043
|
}
|
|
@@ -6099,12 +6104,10 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
|
6099
6104
|
} = storeToRefs(searchResultStore);
|
|
6100
6105
|
const currentFilters = vue.computed(() => filters.value);
|
|
6101
6106
|
const currentDisplayFilters = vue.computed(
|
|
6102
|
-
() => hideFiltersOnExactMatchForKeys.value.length ? displayFilters.value.filter(
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
}
|
|
6107
|
-
) : displayFilters.value
|
|
6107
|
+
() => hideFiltersOnExactMatchForKeys.value.length ? displayFilters.value.filter((f2) => {
|
|
6108
|
+
var _a;
|
|
6109
|
+
return !((_a = hideFiltersOnExactMatchForKeys.value) == null ? void 0 : _a.includes(f2.key)) || getNormalizedString(currentQueryText.value) !== getNormalizedString(f2.value);
|
|
6110
|
+
}) : displayFilters.value
|
|
6108
6111
|
);
|
|
6109
6112
|
const hasFilters = vue.computed(() => {
|
|
6110
6113
|
var _a;
|
|
@@ -8655,13 +8658,22 @@ const _hoisted_4$c = ["aria-label"];
|
|
|
8655
8658
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
8656
8659
|
__name: "SearchResultsPageSize",
|
|
8657
8660
|
props: {
|
|
8658
|
-
|
|
8661
|
+
labels: {},
|
|
8659
8662
|
options: {}
|
|
8660
8663
|
},
|
|
8661
8664
|
setup(__props) {
|
|
8665
|
+
const props = __props;
|
|
8662
8666
|
const paramsStore = useParamsStore();
|
|
8663
8667
|
const optionsStore = useOptionsStore();
|
|
8664
8668
|
const select = vue.ref(null);
|
|
8669
|
+
const prefixLabel = vue.computed(() => {
|
|
8670
|
+
var _a, _b;
|
|
8671
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
8672
|
+
});
|
|
8673
|
+
const label = vue.computed(() => {
|
|
8674
|
+
var _a, _b;
|
|
8675
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
8676
|
+
});
|
|
8665
8677
|
const handleSelect = (e) => {
|
|
8666
8678
|
const value = e.target.value;
|
|
8667
8679
|
paramsStore.appendParams({
|
|
@@ -8672,17 +8684,17 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
8672
8684
|
return (_ctx, _cache) => {
|
|
8673
8685
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
|
|
8674
8686
|
vue.createElementVNode("div", _hoisted_2$o, [
|
|
8675
|
-
vue.createElementVNode("label", _hoisted_3$h, vue.toDisplayString(
|
|
8687
|
+
vue.createElementVNode("label", _hoisted_3$h, vue.toDisplayString(label.value), 1),
|
|
8676
8688
|
vue.createElementVNode("select", {
|
|
8677
8689
|
class: "lupa-select-dropdown",
|
|
8678
|
-
"aria-label":
|
|
8690
|
+
"aria-label": label.value,
|
|
8679
8691
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
8680
8692
|
onChange: handleSelect,
|
|
8681
8693
|
ref_key: "select",
|
|
8682
8694
|
ref: select
|
|
8683
8695
|
}, [
|
|
8684
8696
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options.sizes, (option) => {
|
|
8685
|
-
return vue.openBlock(), vue.createElementBlock("option", { key: option }, vue.toDisplayString(option), 1);
|
|
8697
|
+
return vue.openBlock(), vue.createElementBlock("option", { key: option }, vue.toDisplayString(prefixLabel.value) + vue.toDisplayString(option), 1);
|
|
8686
8698
|
}), 128))
|
|
8687
8699
|
], 40, _hoisted_4$c)
|
|
8688
8700
|
])
|
|
@@ -8919,8 +8931,8 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
|
8919
8931
|
paginationDisplay.value.pageSize ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
8920
8932
|
key: 1,
|
|
8921
8933
|
options: paginationOptions.value.pageSize,
|
|
8922
|
-
|
|
8923
|
-
}, null, 8, ["options", "
|
|
8934
|
+
labels: paginationOptions.value.labels
|
|
8935
|
+
}, null, 8, ["options", "labels"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_8)),
|
|
8924
8936
|
sortOptions.value ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
8925
8937
|
key: 3,
|
|
8926
8938
|
options: sortOptions.value,
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -3236,7 +3236,7 @@ const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
|
3236
3236
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
3237
3237
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
3238
3238
|
const _hoisted_4$s = ["value"];
|
|
3239
|
-
const _hoisted_5$
|
|
3239
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
3240
3240
|
const _hoisted_6$9 = /* @__PURE__ */ createElementVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
3241
3241
|
const _hoisted_7$7 = [
|
|
3242
3242
|
_hoisted_6$9
|
|
@@ -3356,7 +3356,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
3356
3356
|
placeholder: labels.value.placeholder,
|
|
3357
3357
|
onInput: handleInput,
|
|
3358
3358
|
onFocus: handleFocus
|
|
3359
|
-
}), null, 16, _hoisted_5$
|
|
3359
|
+
}), null, 16, _hoisted_5$i), [
|
|
3360
3360
|
[vModelText, inputValue.value]
|
|
3361
3361
|
]),
|
|
3362
3362
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -3530,7 +3530,7 @@ const _hoisted_4$r = {
|
|
|
3530
3530
|
class: "lupa-suggestion-facet-label",
|
|
3531
3531
|
"data-cy": "lupa-suggestion-facet-label"
|
|
3532
3532
|
};
|
|
3533
|
-
const _hoisted_5$
|
|
3533
|
+
const _hoisted_5$h = {
|
|
3534
3534
|
class: "lupa-suggestion-facet-value",
|
|
3535
3535
|
"data-cy": "lupa-suggestion-facet-value"
|
|
3536
3536
|
};
|
|
@@ -3573,7 +3573,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
3573
3573
|
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
3574
3574
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
3575
3575
|
createElementVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
3576
|
-
createElementVNode("span", _hoisted_5$
|
|
3576
|
+
createElementVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
3577
3577
|
])) : createCommentVNode("", true)
|
|
3578
3578
|
]);
|
|
3579
3579
|
};
|
|
@@ -4074,7 +4074,7 @@ const _hoisted_1$14 = ["innerHTML"];
|
|
|
4074
4074
|
const _hoisted_2$M = { key: 0 };
|
|
4075
4075
|
const _hoisted_3$y = { key: 1 };
|
|
4076
4076
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
4077
|
-
const _hoisted_5$
|
|
4077
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
4078
4078
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
4079
4079
|
__name: "SearchBoxProductCustom",
|
|
4080
4080
|
props: {
|
|
@@ -4107,7 +4107,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
4107
4107
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
4108
4108
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
4109
4109
|
createElementVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
4110
|
-
createElementVNode("div", _hoisted_5$
|
|
4110
|
+
createElementVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
|
|
4111
4111
|
]))
|
|
4112
4112
|
], 16));
|
|
4113
4113
|
};
|
|
@@ -5253,7 +5253,7 @@ const _hoisted_4$n = {
|
|
|
5253
5253
|
key: 1,
|
|
5254
5254
|
class: "lupa-panel-title"
|
|
5255
5255
|
};
|
|
5256
|
-
const _hoisted_5$
|
|
5256
|
+
const _hoisted_5$f = {
|
|
5257
5257
|
key: 1,
|
|
5258
5258
|
id: "lupa-search-box-panel"
|
|
5259
5259
|
};
|
|
@@ -5467,7 +5467,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
5467
5467
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
5468
5468
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
5469
5469
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
5470
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
5470
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
5471
5471
|
createVNode(_sfc_main$1k, {
|
|
5472
5472
|
options: _ctx.options.history,
|
|
5473
5473
|
history: history.value,
|
|
@@ -5977,7 +5977,8 @@ const _hoisted_3$s = {
|
|
|
5977
5977
|
key: 1,
|
|
5978
5978
|
class: "lupa-results-total-count"
|
|
5979
5979
|
};
|
|
5980
|
-
const _hoisted_4$l =
|
|
5980
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
5981
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
5981
5982
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
5982
5983
|
__name: "SearchResultsTitle",
|
|
5983
5984
|
props: {
|
|
@@ -6020,7 +6021,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
6020
6021
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
6021
6022
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
6022
6023
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
6023
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s,
|
|
6024
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
6025
|
+
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
6026
|
+
createElementVNode("span", _hoisted_4$l, toDisplayString(unref(totalItems)), 1),
|
|
6027
|
+
createTextVNode(")")
|
|
6028
|
+
])) : createCommentVNode("", true)
|
|
6024
6029
|
])) : createCommentVNode("", true),
|
|
6025
6030
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
6026
6031
|
key: 1,
|
|
@@ -6030,7 +6035,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
6030
6035
|
key: 2,
|
|
6031
6036
|
class: "lupa-result-page-description-top",
|
|
6032
6037
|
innerHTML: descriptionTop.value
|
|
6033
|
-
}, null, 8,
|
|
6038
|
+
}, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
|
|
6034
6039
|
]);
|
|
6035
6040
|
};
|
|
6036
6041
|
}
|
|
@@ -6097,12 +6102,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
6097
6102
|
} = storeToRefs(searchResultStore);
|
|
6098
6103
|
const currentFilters = computed(() => filters.value);
|
|
6099
6104
|
const currentDisplayFilters = computed(
|
|
6100
|
-
() => hideFiltersOnExactMatchForKeys.value.length ? displayFilters.value.filter(
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
}
|
|
6105
|
-
) : displayFilters.value
|
|
6105
|
+
() => hideFiltersOnExactMatchForKeys.value.length ? displayFilters.value.filter((f2) => {
|
|
6106
|
+
var _a;
|
|
6107
|
+
return !((_a = hideFiltersOnExactMatchForKeys.value) == null ? void 0 : _a.includes(f2.key)) || getNormalizedString(currentQueryText.value) !== getNormalizedString(f2.value);
|
|
6108
|
+
}) : displayFilters.value
|
|
6106
6109
|
);
|
|
6107
6110
|
const hasFilters = computed(() => {
|
|
6108
6111
|
var _a;
|
|
@@ -8653,13 +8656,22 @@ const _hoisted_4$c = ["aria-label"];
|
|
|
8653
8656
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
8654
8657
|
__name: "SearchResultsPageSize",
|
|
8655
8658
|
props: {
|
|
8656
|
-
|
|
8659
|
+
labels: {},
|
|
8657
8660
|
options: {}
|
|
8658
8661
|
},
|
|
8659
8662
|
setup(__props) {
|
|
8663
|
+
const props = __props;
|
|
8660
8664
|
const paramsStore = useParamsStore();
|
|
8661
8665
|
const optionsStore = useOptionsStore();
|
|
8662
8666
|
const select = ref(null);
|
|
8667
|
+
const prefixLabel = computed(() => {
|
|
8668
|
+
var _a, _b;
|
|
8669
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
8670
|
+
});
|
|
8671
|
+
const label = computed(() => {
|
|
8672
|
+
var _a, _b;
|
|
8673
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
8674
|
+
});
|
|
8663
8675
|
const handleSelect = (e) => {
|
|
8664
8676
|
const value = e.target.value;
|
|
8665
8677
|
paramsStore.appendParams({
|
|
@@ -8670,17 +8682,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
8670
8682
|
return (_ctx, _cache) => {
|
|
8671
8683
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
8672
8684
|
createElementVNode("div", _hoisted_2$o, [
|
|
8673
|
-
createElementVNode("label", _hoisted_3$h, toDisplayString(
|
|
8685
|
+
createElementVNode("label", _hoisted_3$h, toDisplayString(label.value), 1),
|
|
8674
8686
|
createElementVNode("select", {
|
|
8675
8687
|
class: "lupa-select-dropdown",
|
|
8676
|
-
"aria-label":
|
|
8688
|
+
"aria-label": label.value,
|
|
8677
8689
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
8678
8690
|
onChange: handleSelect,
|
|
8679
8691
|
ref_key: "select",
|
|
8680
8692
|
ref: select
|
|
8681
8693
|
}, [
|
|
8682
8694
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
8683
|
-
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
8695
|
+
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(prefixLabel.value) + toDisplayString(option), 1);
|
|
8684
8696
|
}), 128))
|
|
8685
8697
|
], 40, _hoisted_4$c)
|
|
8686
8698
|
])
|
|
@@ -8917,8 +8929,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
8917
8929
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
8918
8930
|
key: 1,
|
|
8919
8931
|
options: paginationOptions.value.pageSize,
|
|
8920
|
-
|
|
8921
|
-
}, null, 8, ["options", "
|
|
8932
|
+
labels: paginationOptions.value.labels
|
|
8933
|
+
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
8922
8934
|
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
8923
8935
|
key: 3,
|
|
8924
8936
|
options: sortOptions.value,
|
package/dist/src/components/search-results/products/pagination/SearchResultsPageSize.vue.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { PropType as __PropType } from 'vue';
|
|
2
2
|
import type { PaginationPageSize } from '../../../../types/search-results/PaginationOptions';
|
|
3
|
+
import type { SearchResultsPaginationLabels } from '../../../../types/search-results/SearchResultsPagination';
|
|
3
4
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
-
|
|
5
|
-
type: __PropType<
|
|
5
|
+
labels: {
|
|
6
|
+
type: __PropType<SearchResultsPaginationLabels>;
|
|
6
7
|
required: true;
|
|
7
8
|
};
|
|
8
9
|
options: {
|
|
@@ -10,8 +11,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
10
11
|
required: true;
|
|
11
12
|
};
|
|
12
13
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
-
|
|
14
|
-
type: __PropType<
|
|
14
|
+
labels: {
|
|
15
|
+
type: __PropType<SearchResultsPaginationLabels>;
|
|
15
16
|
required: true;
|
|
16
17
|
};
|
|
17
18
|
options: {
|
|
@@ -114,6 +114,7 @@ export type SearchResultsPaginationLabels = {
|
|
|
114
114
|
pageSize: string;
|
|
115
115
|
showMore: string;
|
|
116
116
|
showLess?: string;
|
|
117
|
+
pageSizePrefix?: string;
|
|
117
118
|
};
|
|
118
119
|
export type ResponsiveSearchResultPageSizes = {
|
|
119
120
|
xs: number[];
|
|
@@ -127,6 +128,9 @@ export type SearchResultsPagination = {
|
|
|
127
128
|
sizeSelection: {
|
|
128
129
|
sizes: SearchResultPageSizes;
|
|
129
130
|
position: SearchResultsPaginationPosition;
|
|
131
|
+
labels?: {
|
|
132
|
+
pageSizePrefix: string;
|
|
133
|
+
};
|
|
130
134
|
};
|
|
131
135
|
pageSelection: {
|
|
132
136
|
position: SearchResultsPaginationPosition;
|