@getlupa/client 1.12.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lupaSearch.iife.js +34 -19
- package/dist/lupaSearch.js +34 -19
- package/dist/lupaSearch.mjs +34 -19
- package/dist/lupaSearch.umd.js +34 -19
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -8462,7 +8462,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8462
8462
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8463
8463
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8464
8464
|
const _hoisted_4$s = ["value"];
|
|
8465
|
-
const _hoisted_5$
|
|
8465
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
8466
8466
|
const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
8467
8467
|
const _hoisted_7$7 = [
|
|
8468
8468
|
_hoisted_6$9
|
|
@@ -8582,7 +8582,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8582
8582
|
placeholder: labels.value.placeholder,
|
|
8583
8583
|
onInput: handleInput,
|
|
8584
8584
|
onFocus: handleFocus
|
|
8585
|
-
}), null, 16, _hoisted_5$
|
|
8585
|
+
}), null, 16, _hoisted_5$i), [
|
|
8586
8586
|
[vModelText, inputValue.value]
|
|
8587
8587
|
]),
|
|
8588
8588
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -8756,7 +8756,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8756
8756
|
class: "lupa-suggestion-facet-label",
|
|
8757
8757
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8758
8758
|
};
|
|
8759
|
-
const _hoisted_5$
|
|
8759
|
+
const _hoisted_5$h = {
|
|
8760
8760
|
class: "lupa-suggestion-facet-value",
|
|
8761
8761
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8762
8762
|
};
|
|
@@ -8799,7 +8799,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8799
8799
|
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8800
8800
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8801
8801
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8802
|
-
createBaseVNode("span", _hoisted_5$
|
|
8802
|
+
createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8803
8803
|
])) : createCommentVNode("", true)
|
|
8804
8804
|
]);
|
|
8805
8805
|
};
|
|
@@ -9300,7 +9300,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9300
9300
|
const _hoisted_2$M = { key: 0 };
|
|
9301
9301
|
const _hoisted_3$y = { key: 1 };
|
|
9302
9302
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9303
|
-
const _hoisted_5$
|
|
9303
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
9304
9304
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9305
9305
|
__name: "SearchBoxProductCustom",
|
|
9306
9306
|
props: {
|
|
@@ -9333,7 +9333,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9333
9333
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9334
9334
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9335
9335
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9336
|
-
createBaseVNode("div", _hoisted_5$
|
|
9336
|
+
createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
|
|
9337
9337
|
]))
|
|
9338
9338
|
], 16));
|
|
9339
9339
|
};
|
|
@@ -9525,6 +9525,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9525
9525
|
if (!width || !grid) {
|
|
9526
9526
|
return;
|
|
9527
9527
|
}
|
|
9528
|
+
screenStore.setScreenWidth({ width });
|
|
9528
9529
|
const { currentScreenWidth } = storeToRefs(screenStore);
|
|
9529
9530
|
const screenWidth = (_a = currentScreenWidth.value) != null ? _a : "xl";
|
|
9530
9531
|
columnCount.value = grid.columns[screenWidth];
|
|
@@ -10478,7 +10479,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10478
10479
|
key: 1,
|
|
10479
10480
|
class: "lupa-panel-title"
|
|
10480
10481
|
};
|
|
10481
|
-
const _hoisted_5$
|
|
10482
|
+
const _hoisted_5$f = {
|
|
10482
10483
|
key: 1,
|
|
10483
10484
|
id: "lupa-search-box-panel"
|
|
10484
10485
|
};
|
|
@@ -10692,7 +10693,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10692
10693
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10693
10694
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10694
10695
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10695
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
10696
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
10696
10697
|
createVNode(_sfc_main$1k, {
|
|
10697
10698
|
options: _ctx.options.history,
|
|
10698
10699
|
history: history.value,
|
|
@@ -11186,7 +11187,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11186
11187
|
key: 1,
|
|
11187
11188
|
class: "lupa-results-total-count"
|
|
11188
11189
|
};
|
|
11189
|
-
const _hoisted_4$l =
|
|
11190
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
11191
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
11190
11192
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11191
11193
|
__name: "SearchResultsTitle",
|
|
11192
11194
|
props: {
|
|
@@ -11229,7 +11231,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11229
11231
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11230
11232
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11231
11233
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11232
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s,
|
|
11234
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
11235
|
+
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
11236
|
+
createBaseVNode("span", _hoisted_4$l, toDisplayString(unref(totalItems)), 1),
|
|
11237
|
+
createTextVNode(")")
|
|
11238
|
+
])) : createCommentVNode("", true)
|
|
11233
11239
|
])) : createCommentVNode("", true),
|
|
11234
11240
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11235
11241
|
key: 1,
|
|
@@ -11239,7 +11245,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11239
11245
|
key: 2,
|
|
11240
11246
|
class: "lupa-result-page-description-top",
|
|
11241
11247
|
innerHTML: descriptionTop.value
|
|
11242
|
-
}, null, 8,
|
|
11248
|
+
}, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
|
|
11243
11249
|
]);
|
|
11244
11250
|
};
|
|
11245
11251
|
}
|
|
@@ -13862,13 +13868,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13862
13868
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
13863
13869
|
__name: "SearchResultsPageSize",
|
|
13864
13870
|
props: {
|
|
13865
|
-
|
|
13871
|
+
labels: {},
|
|
13866
13872
|
options: {}
|
|
13867
13873
|
},
|
|
13868
13874
|
setup(__props) {
|
|
13875
|
+
const props = __props;
|
|
13869
13876
|
const paramsStore = useParamsStore();
|
|
13870
13877
|
const optionsStore = useOptionsStore();
|
|
13871
13878
|
const select = ref(null);
|
|
13879
|
+
const prefixLabel = computed(() => {
|
|
13880
|
+
var _a, _b;
|
|
13881
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
13882
|
+
});
|
|
13883
|
+
const label = computed(() => {
|
|
13884
|
+
var _a, _b;
|
|
13885
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
13886
|
+
});
|
|
13872
13887
|
const handleSelect = (e) => {
|
|
13873
13888
|
const value = e.target.value;
|
|
13874
13889
|
paramsStore.appendParams({
|
|
@@ -13879,17 +13894,17 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13879
13894
|
return (_ctx, _cache) => {
|
|
13880
13895
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
13881
13896
|
createBaseVNode("div", _hoisted_2$o, [
|
|
13882
|
-
createBaseVNode("label", _hoisted_3$h, toDisplayString(
|
|
13897
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(label.value), 1),
|
|
13883
13898
|
createBaseVNode("select", {
|
|
13884
13899
|
class: "lupa-select-dropdown",
|
|
13885
|
-
"aria-label":
|
|
13900
|
+
"aria-label": label.value,
|
|
13886
13901
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
13887
13902
|
onChange: handleSelect,
|
|
13888
13903
|
ref_key: "select",
|
|
13889
13904
|
ref: select
|
|
13890
13905
|
}, [
|
|
13891
13906
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
13892
|
-
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
13907
|
+
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(prefixLabel.value) + toDisplayString(option), 1);
|
|
13893
13908
|
}), 128))
|
|
13894
13909
|
], 40, _hoisted_4$c)
|
|
13895
13910
|
])
|
|
@@ -14126,8 +14141,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14126
14141
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
14127
14142
|
key: 1,
|
|
14128
14143
|
options: paginationOptions.value.pageSize,
|
|
14129
|
-
|
|
14130
|
-
}, null, 8, ["options", "
|
|
14144
|
+
labels: paginationOptions.value.labels
|
|
14145
|
+
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
14131
14146
|
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
14132
14147
|
key: 3,
|
|
14133
14148
|
options: sortOptions.value,
|
|
@@ -15555,8 +15570,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
15555
15570
|
const handleResize = () => {
|
|
15556
15571
|
const doc2 = document.documentElement;
|
|
15557
15572
|
doc2.style.setProperty("--lupa-full-height", `${window.innerHeight}px`);
|
|
15558
|
-
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15559
15573
|
screenStore.setScreenWidth({ width: window.innerWidth });
|
|
15574
|
+
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15560
15575
|
};
|
|
15561
15576
|
const handleUrlChange = (params) => {
|
|
15562
15577
|
var _a;
|
|
@@ -28374,7 +28389,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
28374
28389
|
top: false,
|
|
28375
28390
|
bottom: true
|
|
28376
28391
|
},
|
|
28377
|
-
sizes: [
|
|
28392
|
+
sizes: [12, 24, 36]
|
|
28378
28393
|
},
|
|
28379
28394
|
pageSelection: {
|
|
28380
28395
|
position: {
|
package/dist/lupaSearch.js
CHANGED
|
@@ -8462,7 +8462,7 @@ const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
|
8462
8462
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8463
8463
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8464
8464
|
const _hoisted_4$s = ["value"];
|
|
8465
|
-
const _hoisted_5$
|
|
8465
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
8466
8466
|
const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
8467
8467
|
const _hoisted_7$7 = [
|
|
8468
8468
|
_hoisted_6$9
|
|
@@ -8582,7 +8582,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
8582
8582
|
placeholder: labels.value.placeholder,
|
|
8583
8583
|
onInput: handleInput,
|
|
8584
8584
|
onFocus: handleFocus
|
|
8585
|
-
}), null, 16, _hoisted_5$
|
|
8585
|
+
}), null, 16, _hoisted_5$i), [
|
|
8586
8586
|
[vModelText, inputValue.value]
|
|
8587
8587
|
]),
|
|
8588
8588
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -8756,7 +8756,7 @@ const _hoisted_4$r = {
|
|
|
8756
8756
|
class: "lupa-suggestion-facet-label",
|
|
8757
8757
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8758
8758
|
};
|
|
8759
|
-
const _hoisted_5$
|
|
8759
|
+
const _hoisted_5$h = {
|
|
8760
8760
|
class: "lupa-suggestion-facet-value",
|
|
8761
8761
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8762
8762
|
};
|
|
@@ -8799,7 +8799,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8799
8799
|
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8800
8800
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8801
8801
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8802
|
-
createBaseVNode("span", _hoisted_5$
|
|
8802
|
+
createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8803
8803
|
])) : createCommentVNode("", true)
|
|
8804
8804
|
]);
|
|
8805
8805
|
};
|
|
@@ -9300,7 +9300,7 @@ const _hoisted_1$14 = ["innerHTML"];
|
|
|
9300
9300
|
const _hoisted_2$M = { key: 0 };
|
|
9301
9301
|
const _hoisted_3$y = { key: 1 };
|
|
9302
9302
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9303
|
-
const _hoisted_5$
|
|
9303
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
9304
9304
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9305
9305
|
__name: "SearchBoxProductCustom",
|
|
9306
9306
|
props: {
|
|
@@ -9333,7 +9333,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
9333
9333
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9334
9334
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9335
9335
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9336
|
-
createBaseVNode("div", _hoisted_5$
|
|
9336
|
+
createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
|
|
9337
9337
|
]))
|
|
9338
9338
|
], 16));
|
|
9339
9339
|
};
|
|
@@ -9525,6 +9525,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9525
9525
|
if (!width || !grid) {
|
|
9526
9526
|
return;
|
|
9527
9527
|
}
|
|
9528
|
+
screenStore.setScreenWidth({ width });
|
|
9528
9529
|
const { currentScreenWidth } = storeToRefs(screenStore);
|
|
9529
9530
|
const screenWidth = (_a = currentScreenWidth.value) != null ? _a : "xl";
|
|
9530
9531
|
columnCount.value = grid.columns[screenWidth];
|
|
@@ -10478,7 +10479,7 @@ const _hoisted_4$n = {
|
|
|
10478
10479
|
key: 1,
|
|
10479
10480
|
class: "lupa-panel-title"
|
|
10480
10481
|
};
|
|
10481
|
-
const _hoisted_5$
|
|
10482
|
+
const _hoisted_5$f = {
|
|
10482
10483
|
key: 1,
|
|
10483
10484
|
id: "lupa-search-box-panel"
|
|
10484
10485
|
};
|
|
@@ -10692,7 +10693,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10692
10693
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10693
10694
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10694
10695
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10695
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
10696
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
10696
10697
|
createVNode(_sfc_main$1k, {
|
|
10697
10698
|
options: _ctx.options.history,
|
|
10698
10699
|
history: history.value,
|
|
@@ -11186,7 +11187,8 @@ const _hoisted_3$s = {
|
|
|
11186
11187
|
key: 1,
|
|
11187
11188
|
class: "lupa-results-total-count"
|
|
11188
11189
|
};
|
|
11189
|
-
const _hoisted_4$l =
|
|
11190
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
11191
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
11190
11192
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11191
11193
|
__name: "SearchResultsTitle",
|
|
11192
11194
|
props: {
|
|
@@ -11229,7 +11231,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11229
11231
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11230
11232
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11231
11233
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11232
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s,
|
|
11234
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
11235
|
+
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
11236
|
+
createBaseVNode("span", _hoisted_4$l, toDisplayString(unref(totalItems)), 1),
|
|
11237
|
+
createTextVNode(")")
|
|
11238
|
+
])) : createCommentVNode("", true)
|
|
11233
11239
|
])) : createCommentVNode("", true),
|
|
11234
11240
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11235
11241
|
key: 1,
|
|
@@ -11239,7 +11245,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11239
11245
|
key: 2,
|
|
11240
11246
|
class: "lupa-result-page-description-top",
|
|
11241
11247
|
innerHTML: descriptionTop.value
|
|
11242
|
-
}, null, 8,
|
|
11248
|
+
}, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
|
|
11243
11249
|
]);
|
|
11244
11250
|
};
|
|
11245
11251
|
}
|
|
@@ -13862,13 +13868,22 @@ const _hoisted_4$c = ["aria-label"];
|
|
|
13862
13868
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
13863
13869
|
__name: "SearchResultsPageSize",
|
|
13864
13870
|
props: {
|
|
13865
|
-
|
|
13871
|
+
labels: {},
|
|
13866
13872
|
options: {}
|
|
13867
13873
|
},
|
|
13868
13874
|
setup(__props) {
|
|
13875
|
+
const props = __props;
|
|
13869
13876
|
const paramsStore = useParamsStore();
|
|
13870
13877
|
const optionsStore = useOptionsStore();
|
|
13871
13878
|
const select = ref(null);
|
|
13879
|
+
const prefixLabel = computed(() => {
|
|
13880
|
+
var _a, _b;
|
|
13881
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
13882
|
+
});
|
|
13883
|
+
const label = computed(() => {
|
|
13884
|
+
var _a, _b;
|
|
13885
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
13886
|
+
});
|
|
13872
13887
|
const handleSelect = (e) => {
|
|
13873
13888
|
const value = e.target.value;
|
|
13874
13889
|
paramsStore.appendParams({
|
|
@@ -13879,17 +13894,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
13879
13894
|
return (_ctx, _cache) => {
|
|
13880
13895
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
13881
13896
|
createBaseVNode("div", _hoisted_2$o, [
|
|
13882
|
-
createBaseVNode("label", _hoisted_3$h, toDisplayString(
|
|
13897
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(label.value), 1),
|
|
13883
13898
|
createBaseVNode("select", {
|
|
13884
13899
|
class: "lupa-select-dropdown",
|
|
13885
|
-
"aria-label":
|
|
13900
|
+
"aria-label": label.value,
|
|
13886
13901
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
13887
13902
|
onChange: handleSelect,
|
|
13888
13903
|
ref_key: "select",
|
|
13889
13904
|
ref: select
|
|
13890
13905
|
}, [
|
|
13891
13906
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
13892
|
-
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
13907
|
+
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(prefixLabel.value) + toDisplayString(option), 1);
|
|
13893
13908
|
}), 128))
|
|
13894
13909
|
], 40, _hoisted_4$c)
|
|
13895
13910
|
])
|
|
@@ -14126,8 +14141,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14126
14141
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
14127
14142
|
key: 1,
|
|
14128
14143
|
options: paginationOptions.value.pageSize,
|
|
14129
|
-
|
|
14130
|
-
}, null, 8, ["options", "
|
|
14144
|
+
labels: paginationOptions.value.labels
|
|
14145
|
+
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
14131
14146
|
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
14132
14147
|
key: 3,
|
|
14133
14148
|
options: sortOptions.value,
|
|
@@ -15555,8 +15570,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15555
15570
|
const handleResize = () => {
|
|
15556
15571
|
const doc2 = document.documentElement;
|
|
15557
15572
|
doc2.style.setProperty("--lupa-full-height", `${window.innerHeight}px`);
|
|
15558
|
-
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15559
15573
|
screenStore.setScreenWidth({ width: window.innerWidth });
|
|
15574
|
+
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15560
15575
|
};
|
|
15561
15576
|
const handleUrlChange = (params) => {
|
|
15562
15577
|
var _a;
|
|
@@ -28374,7 +28389,7 @@ const DEFAULT_OPTIONS_RESULTS = {
|
|
|
28374
28389
|
top: false,
|
|
28375
28390
|
bottom: true
|
|
28376
28391
|
},
|
|
28377
|
-
sizes: [
|
|
28392
|
+
sizes: [12, 24, 36]
|
|
28378
28393
|
},
|
|
28379
28394
|
pageSelection: {
|
|
28380
28395
|
position: {
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -8460,7 +8460,7 @@ const _hoisted_1$1f = { id: "lupa-search-box-input-container" };
|
|
|
8460
8460
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8461
8461
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8462
8462
|
const _hoisted_4$s = ["value"];
|
|
8463
|
-
const _hoisted_5$
|
|
8463
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
8464
8464
|
const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
8465
8465
|
const _hoisted_7$7 = [
|
|
8466
8466
|
_hoisted_6$9
|
|
@@ -8580,7 +8580,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
8580
8580
|
placeholder: labels.value.placeholder,
|
|
8581
8581
|
onInput: handleInput,
|
|
8582
8582
|
onFocus: handleFocus
|
|
8583
|
-
}), null, 16, _hoisted_5$
|
|
8583
|
+
}), null, 16, _hoisted_5$i), [
|
|
8584
8584
|
[vModelText, inputValue.value]
|
|
8585
8585
|
]),
|
|
8586
8586
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -8754,7 +8754,7 @@ const _hoisted_4$r = {
|
|
|
8754
8754
|
class: "lupa-suggestion-facet-label",
|
|
8755
8755
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8756
8756
|
};
|
|
8757
|
-
const _hoisted_5$
|
|
8757
|
+
const _hoisted_5$h = {
|
|
8758
8758
|
class: "lupa-suggestion-facet-value",
|
|
8759
8759
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8760
8760
|
};
|
|
@@ -8797,7 +8797,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
8797
8797
|
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8798
8798
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8799
8799
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8800
|
-
createBaseVNode("span", _hoisted_5$
|
|
8800
|
+
createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8801
8801
|
])) : createCommentVNode("", true)
|
|
8802
8802
|
]);
|
|
8803
8803
|
};
|
|
@@ -9298,7 +9298,7 @@ const _hoisted_1$14 = ["innerHTML"];
|
|
|
9298
9298
|
const _hoisted_2$M = { key: 0 };
|
|
9299
9299
|
const _hoisted_3$y = { key: 1 };
|
|
9300
9300
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9301
|
-
const _hoisted_5$
|
|
9301
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
9302
9302
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9303
9303
|
__name: "SearchBoxProductCustom",
|
|
9304
9304
|
props: {
|
|
@@ -9331,7 +9331,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
9331
9331
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9332
9332
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9333
9333
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9334
|
-
createBaseVNode("div", _hoisted_5$
|
|
9334
|
+
createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
|
|
9335
9335
|
]))
|
|
9336
9336
|
], 16));
|
|
9337
9337
|
};
|
|
@@ -9523,6 +9523,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
|
|
|
9523
9523
|
if (!width || !grid) {
|
|
9524
9524
|
return;
|
|
9525
9525
|
}
|
|
9526
|
+
screenStore.setScreenWidth({ width });
|
|
9526
9527
|
const { currentScreenWidth } = storeToRefs(screenStore);
|
|
9527
9528
|
const screenWidth = (_a = currentScreenWidth.value) != null ? _a : "xl";
|
|
9528
9529
|
columnCount.value = grid.columns[screenWidth];
|
|
@@ -10476,7 +10477,7 @@ const _hoisted_4$n = {
|
|
|
10476
10477
|
key: 1,
|
|
10477
10478
|
class: "lupa-panel-title"
|
|
10478
10479
|
};
|
|
10479
|
-
const _hoisted_5$
|
|
10480
|
+
const _hoisted_5$f = {
|
|
10480
10481
|
key: 1,
|
|
10481
10482
|
id: "lupa-search-box-panel"
|
|
10482
10483
|
};
|
|
@@ -10690,7 +10691,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
10690
10691
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10691
10692
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10692
10693
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10693
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
10694
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
10694
10695
|
createVNode(_sfc_main$1k, {
|
|
10695
10696
|
options: _ctx.options.history,
|
|
10696
10697
|
history: history.value,
|
|
@@ -11184,7 +11185,8 @@ const _hoisted_3$s = {
|
|
|
11184
11185
|
key: 1,
|
|
11185
11186
|
class: "lupa-results-total-count"
|
|
11186
11187
|
};
|
|
11187
|
-
const _hoisted_4$l =
|
|
11188
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
11189
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
11188
11190
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11189
11191
|
__name: "SearchResultsTitle",
|
|
11190
11192
|
props: {
|
|
@@ -11227,7 +11229,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11227
11229
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11228
11230
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11229
11231
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11230
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s,
|
|
11232
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
11233
|
+
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
11234
|
+
createBaseVNode("span", _hoisted_4$l, toDisplayString(unref(totalItems)), 1),
|
|
11235
|
+
createTextVNode(")")
|
|
11236
|
+
])) : createCommentVNode("", true)
|
|
11231
11237
|
])) : createCommentVNode("", true),
|
|
11232
11238
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11233
11239
|
key: 1,
|
|
@@ -11237,7 +11243,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
11237
11243
|
key: 2,
|
|
11238
11244
|
class: "lupa-result-page-description-top",
|
|
11239
11245
|
innerHTML: descriptionTop.value
|
|
11240
|
-
}, null, 8,
|
|
11246
|
+
}, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
|
|
11241
11247
|
]);
|
|
11242
11248
|
};
|
|
11243
11249
|
}
|
|
@@ -13860,13 +13866,22 @@ const _hoisted_4$c = ["aria-label"];
|
|
|
13860
13866
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
13861
13867
|
__name: "SearchResultsPageSize",
|
|
13862
13868
|
props: {
|
|
13863
|
-
|
|
13869
|
+
labels: {},
|
|
13864
13870
|
options: {}
|
|
13865
13871
|
},
|
|
13866
13872
|
setup(__props) {
|
|
13873
|
+
const props = __props;
|
|
13867
13874
|
const paramsStore = useParamsStore();
|
|
13868
13875
|
const optionsStore = useOptionsStore();
|
|
13869
13876
|
const select = ref(null);
|
|
13877
|
+
const prefixLabel = computed(() => {
|
|
13878
|
+
var _a, _b;
|
|
13879
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
13880
|
+
});
|
|
13881
|
+
const label = computed(() => {
|
|
13882
|
+
var _a, _b;
|
|
13883
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
13884
|
+
});
|
|
13870
13885
|
const handleSelect = (e) => {
|
|
13871
13886
|
const value = e.target.value;
|
|
13872
13887
|
paramsStore.appendParams({
|
|
@@ -13877,17 +13892,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
13877
13892
|
return (_ctx, _cache) => {
|
|
13878
13893
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
13879
13894
|
createBaseVNode("div", _hoisted_2$o, [
|
|
13880
|
-
createBaseVNode("label", _hoisted_3$h, toDisplayString(
|
|
13895
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(label.value), 1),
|
|
13881
13896
|
createBaseVNode("select", {
|
|
13882
13897
|
class: "lupa-select-dropdown",
|
|
13883
|
-
"aria-label":
|
|
13898
|
+
"aria-label": label.value,
|
|
13884
13899
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
13885
13900
|
onChange: handleSelect,
|
|
13886
13901
|
ref_key: "select",
|
|
13887
13902
|
ref: select
|
|
13888
13903
|
}, [
|
|
13889
13904
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
13890
|
-
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
13905
|
+
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(prefixLabel.value) + toDisplayString(option), 1);
|
|
13891
13906
|
}), 128))
|
|
13892
13907
|
], 40, _hoisted_4$c)
|
|
13893
13908
|
])
|
|
@@ -14124,8 +14139,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
14124
14139
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
14125
14140
|
key: 1,
|
|
14126
14141
|
options: paginationOptions.value.pageSize,
|
|
14127
|
-
|
|
14128
|
-
}, null, 8, ["options", "
|
|
14142
|
+
labels: paginationOptions.value.labels
|
|
14143
|
+
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
14129
14144
|
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
14130
14145
|
key: 3,
|
|
14131
14146
|
options: sortOptions.value,
|
|
@@ -15553,8 +15568,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
15553
15568
|
const handleResize = () => {
|
|
15554
15569
|
const doc2 = document.documentElement;
|
|
15555
15570
|
doc2.style.setProperty("--lupa-full-height", `${window.innerHeight}px`);
|
|
15556
|
-
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15557
15571
|
screenStore.setScreenWidth({ width: window.innerWidth });
|
|
15572
|
+
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15558
15573
|
};
|
|
15559
15574
|
const handleUrlChange = (params) => {
|
|
15560
15575
|
var _a;
|
|
@@ -28372,7 +28387,7 @@ const DEFAULT_OPTIONS_RESULTS = {
|
|
|
28372
28387
|
top: false,
|
|
28373
28388
|
bottom: true
|
|
28374
28389
|
},
|
|
28375
|
-
sizes: [
|
|
28390
|
+
sizes: [12, 24, 36]
|
|
28376
28391
|
},
|
|
28377
28392
|
pageSelection: {
|
|
28378
28393
|
position: {
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -8464,7 +8464,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8464
8464
|
const _hoisted_2$R = { class: "lupa-input-clear" };
|
|
8465
8465
|
const _hoisted_3$A = { id: "lupa-search-box-input" };
|
|
8466
8466
|
const _hoisted_4$s = ["value"];
|
|
8467
|
-
const _hoisted_5$
|
|
8467
|
+
const _hoisted_5$i = ["aria-label", "placeholder"];
|
|
8468
8468
|
const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
|
|
8469
8469
|
const _hoisted_7$7 = [
|
|
8470
8470
|
_hoisted_6$9
|
|
@@ -8584,7 +8584,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8584
8584
|
placeholder: labels.value.placeholder,
|
|
8585
8585
|
onInput: handleInput,
|
|
8586
8586
|
onFocus: handleFocus
|
|
8587
|
-
}), null, 16, _hoisted_5$
|
|
8587
|
+
}), null, 16, _hoisted_5$i), [
|
|
8588
8588
|
[vModelText, inputValue.value]
|
|
8589
8589
|
]),
|
|
8590
8590
|
_ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
|
|
@@ -8758,7 +8758,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8758
8758
|
class: "lupa-suggestion-facet-label",
|
|
8759
8759
|
"data-cy": "lupa-suggestion-facet-label"
|
|
8760
8760
|
};
|
|
8761
|
-
const _hoisted_5$
|
|
8761
|
+
const _hoisted_5$h = {
|
|
8762
8762
|
class: "lupa-suggestion-facet-value",
|
|
8763
8763
|
"data-cy": "lupa-suggestion-facet-value"
|
|
8764
8764
|
};
|
|
@@ -8801,7 +8801,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
8801
8801
|
}, null, 8, _hoisted_1$1b)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
|
|
8802
8802
|
_ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
8803
8803
|
createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
|
|
8804
|
-
createBaseVNode("span", _hoisted_5$
|
|
8804
|
+
createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
|
|
8805
8805
|
])) : createCommentVNode("", true)
|
|
8806
8806
|
]);
|
|
8807
8807
|
};
|
|
@@ -9302,7 +9302,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9302
9302
|
const _hoisted_2$M = { key: 0 };
|
|
9303
9303
|
const _hoisted_3$y = { key: 1 };
|
|
9304
9304
|
const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
|
|
9305
|
-
const _hoisted_5$
|
|
9305
|
+
const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
|
|
9306
9306
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
9307
9307
|
__name: "SearchBoxProductCustom",
|
|
9308
9308
|
props: {
|
|
@@ -9335,7 +9335,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9335
9335
|
}, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
|
|
9336
9336
|
!label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$y, [
|
|
9337
9337
|
createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
|
|
9338
|
-
createBaseVNode("div", _hoisted_5$
|
|
9338
|
+
createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
|
|
9339
9339
|
]))
|
|
9340
9340
|
], 16));
|
|
9341
9341
|
};
|
|
@@ -9527,6 +9527,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9527
9527
|
if (!width || !grid) {
|
|
9528
9528
|
return;
|
|
9529
9529
|
}
|
|
9530
|
+
screenStore.setScreenWidth({ width });
|
|
9530
9531
|
const { currentScreenWidth } = storeToRefs(screenStore);
|
|
9531
9532
|
const screenWidth = (_a = currentScreenWidth.value) != null ? _a : "xl";
|
|
9532
9533
|
columnCount.value = grid.columns[screenWidth];
|
|
@@ -10480,7 +10481,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10480
10481
|
key: 1,
|
|
10481
10482
|
class: "lupa-panel-title"
|
|
10482
10483
|
};
|
|
10483
|
-
const _hoisted_5$
|
|
10484
|
+
const _hoisted_5$f = {
|
|
10484
10485
|
key: 1,
|
|
10485
10486
|
id: "lupa-search-box-panel"
|
|
10486
10487
|
};
|
|
@@ -10694,7 +10695,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
10694
10695
|
showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
|
|
10695
10696
|
onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
|
|
10696
10697
|
}, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
|
|
10697
|
-
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
10698
|
+
])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
10698
10699
|
createVNode(_sfc_main$1k, {
|
|
10699
10700
|
options: _ctx.options.history,
|
|
10700
10701
|
history: history.value,
|
|
@@ -11188,7 +11189,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11188
11189
|
key: 1,
|
|
11189
11190
|
class: "lupa-results-total-count"
|
|
11190
11191
|
};
|
|
11191
|
-
const _hoisted_4$l =
|
|
11192
|
+
const _hoisted_4$l = { class: "lupa-results-total-count-number" };
|
|
11193
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
11192
11194
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
11193
11195
|
__name: "SearchResultsTitle",
|
|
11194
11196
|
props: {
|
|
@@ -11231,7 +11233,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11231
11233
|
showSearchTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_1$P, [
|
|
11232
11234
|
createTextVNode(toDisplayString(_ctx.options.labels.searchResults), 1),
|
|
11233
11235
|
queryText.value ? (openBlock(), createElementBlock("span", _hoisted_2$C, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
|
|
11234
|
-
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s,
|
|
11236
|
+
showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
11237
|
+
createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
|
|
11238
|
+
createBaseVNode("span", _hoisted_4$l, toDisplayString(unref(totalItems)), 1),
|
|
11239
|
+
createTextVNode(")")
|
|
11240
|
+
])) : createCommentVNode("", true)
|
|
11235
11241
|
])) : createCommentVNode("", true),
|
|
11236
11242
|
_ctx.showSummary ? (openBlock(), createBlock(_sfc_main$T, {
|
|
11237
11243
|
key: 1,
|
|
@@ -11241,7 +11247,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
11241
11247
|
key: 2,
|
|
11242
11248
|
class: "lupa-result-page-description-top",
|
|
11243
11249
|
innerHTML: descriptionTop.value
|
|
11244
|
-
}, null, 8,
|
|
11250
|
+
}, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
|
|
11245
11251
|
]);
|
|
11246
11252
|
};
|
|
11247
11253
|
}
|
|
@@ -13864,13 +13870,22 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13864
13870
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
13865
13871
|
__name: "SearchResultsPageSize",
|
|
13866
13872
|
props: {
|
|
13867
|
-
|
|
13873
|
+
labels: {},
|
|
13868
13874
|
options: {}
|
|
13869
13875
|
},
|
|
13870
13876
|
setup(__props) {
|
|
13877
|
+
const props = __props;
|
|
13871
13878
|
const paramsStore = useParamsStore();
|
|
13872
13879
|
const optionsStore = useOptionsStore();
|
|
13873
13880
|
const select = ref(null);
|
|
13881
|
+
const prefixLabel = computed(() => {
|
|
13882
|
+
var _a, _b;
|
|
13883
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSizePrefix) != null ? _b : "";
|
|
13884
|
+
});
|
|
13885
|
+
const label = computed(() => {
|
|
13886
|
+
var _a, _b;
|
|
13887
|
+
return (_b = (_a = props.labels) == null ? void 0 : _a.pageSize) != null ? _b : "";
|
|
13888
|
+
});
|
|
13874
13889
|
const handleSelect = (e) => {
|
|
13875
13890
|
const value = e.target.value;
|
|
13876
13891
|
paramsStore.appendParams({
|
|
@@ -13881,17 +13896,17 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13881
13896
|
return (_ctx, _cache) => {
|
|
13882
13897
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
13883
13898
|
createBaseVNode("div", _hoisted_2$o, [
|
|
13884
|
-
createBaseVNode("label", _hoisted_3$h, toDisplayString(
|
|
13899
|
+
createBaseVNode("label", _hoisted_3$h, toDisplayString(label.value), 1),
|
|
13885
13900
|
createBaseVNode("select", {
|
|
13886
13901
|
class: "lupa-select-dropdown",
|
|
13887
|
-
"aria-label":
|
|
13902
|
+
"aria-label": label.value,
|
|
13888
13903
|
"data-cy": "lupa-page-size-select-dropdown",
|
|
13889
13904
|
onChange: handleSelect,
|
|
13890
13905
|
ref_key: "select",
|
|
13891
13906
|
ref: select
|
|
13892
13907
|
}, [
|
|
13893
13908
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
|
|
13894
|
-
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
|
|
13909
|
+
return openBlock(), createElementBlock("option", { key: option }, toDisplayString(prefixLabel.value) + toDisplayString(option), 1);
|
|
13895
13910
|
}), 128))
|
|
13896
13911
|
], 40, _hoisted_4$c)
|
|
13897
13912
|
])
|
|
@@ -14128,8 +14143,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
14128
14143
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
|
|
14129
14144
|
key: 1,
|
|
14130
14145
|
options: paginationOptions.value.pageSize,
|
|
14131
|
-
|
|
14132
|
-
}, null, 8, ["options", "
|
|
14146
|
+
labels: paginationOptions.value.labels
|
|
14147
|
+
}, null, 8, ["options", "labels"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
|
|
14133
14148
|
sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
14134
14149
|
key: 3,
|
|
14135
14150
|
options: sortOptions.value,
|
|
@@ -15557,8 +15572,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
15557
15572
|
const handleResize = () => {
|
|
15558
15573
|
const doc2 = document.documentElement;
|
|
15559
15574
|
doc2.style.setProperty("--lupa-full-height", `${window.innerHeight}px`);
|
|
15560
|
-
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15561
15575
|
screenStore.setScreenWidth({ width: window.innerWidth });
|
|
15576
|
+
searchResultStore.setColumnCount({ width: window.innerWidth, grid: props.options.grid });
|
|
15562
15577
|
};
|
|
15563
15578
|
const handleUrlChange = (params) => {
|
|
15564
15579
|
var _a;
|
|
@@ -28376,7 +28391,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
28376
28391
|
top: false,
|
|
28377
28392
|
bottom: true
|
|
28378
28393
|
},
|
|
28379
|
-
sizes: [
|
|
28394
|
+
sizes: [12, 24, 36]
|
|
28380
28395
|
},
|
|
28381
28396
|
pageSelection: {
|
|
28382
28397
|
position: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"main": "dist/lupaSearch.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@getlupa/client-sdk": "^1.3.4",
|
|
23
|
-
"@getlupa/vue": "0.12.
|
|
23
|
+
"@getlupa/vue": "0.12.2",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
25
25
|
"@tsconfig/node18": "^2.0.1",
|
|
26
26
|
"@types/jsdom": "^21.1.1",
|