@getlupa/vue 0.11.2 → 0.11.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
CHANGED
|
@@ -5908,12 +5908,16 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
5908
5908
|
var _a, _b;
|
|
5909
5909
|
return (_b = (_a = props.options.labels) == null ? void 0 : _a.itemCount) != null ? _b : "";
|
|
5910
5910
|
});
|
|
5911
|
+
const searchResultsCountLabel = vue.computed(() => {
|
|
5912
|
+
var _a, _b;
|
|
5913
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.searchResultsCount) != null ? _b : "";
|
|
5914
|
+
});
|
|
5911
5915
|
return (_ctx, _cache) => {
|
|
5912
5916
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
5913
5917
|
showSearchTitle.value ? (vue.openBlock(), vue.createElementBlock("h1", _hoisted_1$P, [
|
|
5914
5918
|
vue.createTextVNode(vue.toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
5915
5919
|
queryText.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$C, "'" + vue.toDisplayString(queryText.value) + "'", 1)) : vue.createCommentVNode("", true),
|
|
5916
|
-
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, "(" + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5920
|
+
showProductCount.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, "(" + vue.toDisplayString(searchResultsCountLabel.value) + vue.toDisplayString(vue.unref(totalItems)) + ")", 1)) : vue.createCommentVNode("", true)
|
|
5917
5921
|
])) : vue.createCommentVNode("", true),
|
|
5918
5922
|
_ctx.showSummary ? (vue.openBlock(), vue.createBlock(_sfc_main$T, {
|
|
5919
5923
|
key: 1,
|
|
@@ -9785,7 +9789,7 @@ const _hoisted_2$b = {
|
|
|
9785
9789
|
"data-cy": "lupa-products"
|
|
9786
9790
|
};
|
|
9787
9791
|
const _hoisted_3$6 = {
|
|
9788
|
-
key:
|
|
9792
|
+
key: 1,
|
|
9789
9793
|
class: "lupa-empty-results",
|
|
9790
9794
|
"data-cy": "lupa-no-results-in-page"
|
|
9791
9795
|
};
|
|
@@ -9855,6 +9859,10 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9855
9859
|
var _a;
|
|
9856
9860
|
return currentFilterToolbarVisible.value ? (_a = props.options.filters) == null ? void 0 : _a.currentFilters : void 0;
|
|
9857
9861
|
});
|
|
9862
|
+
const currentFilterPositionDesktop = vue.computed(() => {
|
|
9863
|
+
var _a, _b, _c;
|
|
9864
|
+
return ((_c = (_b = (_a = props.options.filters) == null ? void 0 : _a.currentFilters) == null ? void 0 : _b.desktopToolbar) == null ? void 0 : _c.position) || "pageTop";
|
|
9865
|
+
});
|
|
9858
9866
|
const currentFiltersClass = vue.computed(() => {
|
|
9859
9867
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9860
9868
|
if (!currentFilterToolbarVisible.value) {
|
|
@@ -9916,7 +9924,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9916
9924
|
"pagination-location": "top",
|
|
9917
9925
|
onFilter: filter
|
|
9918
9926
|
}, null, 8, ["options"])) : vue.createCommentVNode("", true),
|
|
9919
|
-
currentFilterOptions.value ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9927
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9920
9928
|
key: 2,
|
|
9921
9929
|
class: vue.normalizeClass(currentFiltersClass.value),
|
|
9922
9930
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -9935,6 +9943,13 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9935
9943
|
options: _ctx.options,
|
|
9936
9944
|
"pagination-location": "top"
|
|
9937
9945
|
}, null, 8, ["options"]),
|
|
9946
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
9947
|
+
key: 0,
|
|
9948
|
+
class: vue.normalizeClass(currentFiltersClass.value),
|
|
9949
|
+
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
9950
|
+
options: currentFilterOptions.value,
|
|
9951
|
+
expandable: !desktopFiltersExpanded.value
|
|
9952
|
+
}, null, 8, ["class", "options", "expandable"])) : vue.createCommentVNode("", true),
|
|
9938
9953
|
vue.createElementVNode("div", _hoisted_2$b, [
|
|
9939
9954
|
_ctx.$slots.productCard ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(searchResult).items, (product, index) => {
|
|
9940
9955
|
return vue.renderSlot(_ctx.$slots, "productCard", {
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -5906,12 +5906,16 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
5906
5906
|
var _a, _b;
|
|
5907
5907
|
return (_b = (_a = props.options.labels) == null ? void 0 : _a.itemCount) != null ? _b : "";
|
|
5908
5908
|
});
|
|
5909
|
+
const searchResultsCountLabel = computed(() => {
|
|
5910
|
+
var _a, _b;
|
|
5911
|
+
return (_b = (_a = props.options.labels) == null ? void 0 : _a.searchResultsCount) != null ? _b : "";
|
|
5912
|
+
});
|
|
5909
5913
|
return (_ctx, _cache) => {
|
|
5910
5914
|
return openBlock(), createElementBlock("div", null, [
|
|
5911
5915
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
5912
5916
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
5913
5917
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
5914
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
5918
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, "(" + toDisplayString(searchResultsCountLabel.value) + toDisplayString(unref(totalItems)) + ")", 1)) : createCommentVNode("", true)
|
|
5915
5919
|
])) : createCommentVNode("", true),
|
|
5916
5920
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
5917
5921
|
key: 1,
|
|
@@ -9783,7 +9787,7 @@ const _hoisted_2$b = {
|
|
|
9783
9787
|
"data-cy": "lupa-products"
|
|
9784
9788
|
};
|
|
9785
9789
|
const _hoisted_3$6 = {
|
|
9786
|
-
key:
|
|
9790
|
+
key: 1,
|
|
9787
9791
|
class: "lupa-empty-results",
|
|
9788
9792
|
"data-cy": "lupa-no-results-in-page"
|
|
9789
9793
|
};
|
|
@@ -9853,6 +9857,10 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9853
9857
|
var _a;
|
|
9854
9858
|
return currentFilterToolbarVisible.value ? (_a = props.options.filters) == null ? void 0 : _a.currentFilters : void 0;
|
|
9855
9859
|
});
|
|
9860
|
+
const currentFilterPositionDesktop = computed(() => {
|
|
9861
|
+
var _a, _b, _c;
|
|
9862
|
+
return ((_c = (_b = (_a = props.options.filters) == null ? void 0 : _a.currentFilters) == null ? void 0 : _b.desktopToolbar) == null ? void 0 : _c.position) || "pageTop";
|
|
9863
|
+
});
|
|
9856
9864
|
const currentFiltersClass = computed(() => {
|
|
9857
9865
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9858
9866
|
if (!currentFilterToolbarVisible.value) {
|
|
@@ -9914,7 +9922,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9914
9922
|
"pagination-location": "top",
|
|
9915
9923
|
onFilter: filter
|
|
9916
9924
|
}, null, 8, ["options"])) : createCommentVNode("", true),
|
|
9917
|
-
currentFilterOptions.value ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
9925
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
9918
9926
|
key: 2,
|
|
9919
9927
|
class: normalizeClass(currentFiltersClass.value),
|
|
9920
9928
|
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
@@ -9933,6 +9941,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
9933
9941
|
options: _ctx.options,
|
|
9934
9942
|
"pagination-location": "top"
|
|
9935
9943
|
}, null, 8, ["options"]),
|
|
9944
|
+
currentFilterOptions.value && currentFilterPositionDesktop.value === "resultsTop" ? (openBlock(), createBlock(_sfc_main$Q, {
|
|
9945
|
+
key: 0,
|
|
9946
|
+
class: normalizeClass(currentFiltersClass.value),
|
|
9947
|
+
"data-cy": "lupa-search-result-filters-mobile-toolbar",
|
|
9948
|
+
options: currentFilterOptions.value,
|
|
9949
|
+
expandable: !desktopFiltersExpanded.value
|
|
9950
|
+
}, null, 8, ["class", "options", "expandable"])) : createCommentVNode("", true),
|
|
9936
9951
|
createElementVNode("div", _hoisted_2$b, [
|
|
9937
9952
|
_ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(searchResult).items, (product, index) => {
|
|
9938
9953
|
return renderSlot(_ctx.$slots, "productCard", {
|
|
@@ -65,6 +65,7 @@ export type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchRe
|
|
|
65
65
|
currency: string;
|
|
66
66
|
priceSeparator?: string;
|
|
67
67
|
searchResults?: string;
|
|
68
|
+
searchResultsCount?: string;
|
|
68
69
|
itemCount: string;
|
|
69
70
|
emptyResults: string;
|
|
70
71
|
mobileFilterButton: string;
|
|
@@ -146,6 +147,7 @@ export type ResultCurrentFilterOptions = {
|
|
|
146
147
|
};
|
|
147
148
|
desktopToolbar?: {
|
|
148
149
|
activeFiltersExpanded?: boolean;
|
|
150
|
+
position?: 'pageTop' | 'resultsTop';
|
|
149
151
|
};
|
|
150
152
|
};
|
|
151
153
|
export type FacetStyle = 'sidebar' | 'top-dropdown';
|