@getlupa/client 1.16.0 → 1.16.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 +41 -14
- package/dist/lupaSearch.js +41 -14
- package/dist/lupaSearch.mjs +41 -14
- package/dist/lupaSearch.umd.js +41 -14
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -23019,6 +23019,7 @@ and ensure you are accounting for this risk.
|
|
|
23019
23019
|
}
|
|
23020
23020
|
});
|
|
23021
23021
|
const _hoisted_1$F = {
|
|
23022
|
+
key: 0,
|
|
23022
23023
|
id: "lupa-search-result-filters",
|
|
23023
23024
|
class: "lupa-search-result-filters"
|
|
23024
23025
|
};
|
|
@@ -23043,6 +23044,10 @@ and ensure you are accounting for this risk.
|
|
|
23043
23044
|
const showCurrentFilters = computed(() => {
|
|
23044
23045
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
23045
23046
|
});
|
|
23047
|
+
const visible = computed(() => {
|
|
23048
|
+
var _a;
|
|
23049
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23050
|
+
});
|
|
23046
23051
|
const filter2 = () => {
|
|
23047
23052
|
emit2("filter");
|
|
23048
23053
|
};
|
|
@@ -23055,7 +23060,7 @@ and ensure you are accounting for this risk.
|
|
|
23055
23060
|
__expose({ fetch: fetch2 });
|
|
23056
23061
|
return (_ctx, _cache) => {
|
|
23057
23062
|
var _a;
|
|
23058
|
-
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23063
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23059
23064
|
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
23060
23065
|
key: 0,
|
|
23061
23066
|
options: _ctx.options.currentFilters,
|
|
@@ -23072,7 +23077,7 @@ and ensure you are accounting for this risk.
|
|
|
23072
23077
|
options: _ctx.options.facets,
|
|
23073
23078
|
onFilter: filter2
|
|
23074
23079
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
23075
|
-
]);
|
|
23080
|
+
])) : createCommentVNode("", true);
|
|
23076
23081
|
};
|
|
23077
23082
|
}
|
|
23078
23083
|
});
|
|
@@ -23182,6 +23187,7 @@ and ensure you are accounting for this risk.
|
|
|
23182
23187
|
return (_ctx, _cache) => {
|
|
23183
23188
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
23184
23189
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
23190
|
+
var _a;
|
|
23185
23191
|
return openBlock(), createElementBlock("span", {
|
|
23186
23192
|
class: "lupa-search-results-breadcrumb",
|
|
23187
23193
|
key: index
|
|
@@ -23191,11 +23197,11 @@ and ensure you are accounting for this risk.
|
|
|
23191
23197
|
class: "lupa-search-results-breadcrumb-link",
|
|
23192
23198
|
href: breadcrumb.link,
|
|
23193
23199
|
onClick: (e2) => {
|
|
23194
|
-
var
|
|
23195
|
-
return handleNavigation(e2, (
|
|
23200
|
+
var _a2;
|
|
23201
|
+
return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
|
|
23196
23202
|
}
|
|
23197
23203
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
23198
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f,
|
|
23204
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
|
|
23199
23205
|
]);
|
|
23200
23206
|
}), 128))
|
|
23201
23207
|
]);
|
|
@@ -23203,6 +23209,7 @@ and ensure you are accounting for this risk.
|
|
|
23203
23209
|
}
|
|
23204
23210
|
});
|
|
23205
23211
|
const _hoisted_1$C = {
|
|
23212
|
+
key: 0,
|
|
23206
23213
|
id: "lupa-search-result-filters",
|
|
23207
23214
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
23208
23215
|
};
|
|
@@ -23213,12 +23220,17 @@ and ensure you are accounting for this risk.
|
|
|
23213
23220
|
},
|
|
23214
23221
|
emits: ["filter"],
|
|
23215
23222
|
setup(__props, { emit: emit2 }) {
|
|
23223
|
+
const props = __props;
|
|
23216
23224
|
const filter2 = () => {
|
|
23217
23225
|
emit2("filter");
|
|
23218
23226
|
};
|
|
23227
|
+
const visible = computed(() => {
|
|
23228
|
+
var _a;
|
|
23229
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23230
|
+
});
|
|
23219
23231
|
return (_ctx, _cache) => {
|
|
23220
23232
|
var _a;
|
|
23221
|
-
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23233
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23222
23234
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$M, {
|
|
23223
23235
|
key: 0,
|
|
23224
23236
|
options: _ctx.options.facets,
|
|
@@ -23226,7 +23238,7 @@ and ensure you are accounting for this risk.
|
|
|
23226
23238
|
clearable: true,
|
|
23227
23239
|
onFilter: filter2
|
|
23228
23240
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
23229
|
-
]);
|
|
23241
|
+
])) : createCommentVNode("", true);
|
|
23230
23242
|
};
|
|
23231
23243
|
}
|
|
23232
23244
|
});
|
|
@@ -23271,13 +23283,14 @@ and ensure you are accounting for this risk.
|
|
|
23271
23283
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
23272
23284
|
__name: "SearchResultsMobileToggle",
|
|
23273
23285
|
props: {
|
|
23274
|
-
|
|
23286
|
+
labels: {},
|
|
23275
23287
|
showFilterCount: { type: Boolean }
|
|
23276
23288
|
},
|
|
23277
23289
|
setup(__props) {
|
|
23290
|
+
const props = __props;
|
|
23278
23291
|
const searchResultStore = useSearchResultStore();
|
|
23279
23292
|
const optionsStore = useOptionsStore();
|
|
23280
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
23293
|
+
const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
|
|
23281
23294
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
23282
23295
|
const disableMobileBodyScrollLock = computed(
|
|
23283
23296
|
() => {
|
|
@@ -23285,9 +23298,22 @@ and ensure you are accounting for this risk.
|
|
|
23285
23298
|
return (_c = (_b = (_a = searchResultOptions.value.filters) == null ? void 0 : _a.facets) == null ? void 0 : _b.disableMobileBodyScrollLock) != null ? _c : false;
|
|
23286
23299
|
}
|
|
23287
23300
|
);
|
|
23301
|
+
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
23302
|
+
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
23303
|
+
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
23304
|
+
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
23305
|
+
const label = computed(() => {
|
|
23306
|
+
if (isSidebarVisible.value) {
|
|
23307
|
+
return openLabel.value;
|
|
23308
|
+
}
|
|
23309
|
+
if (hasActiveFilters.value) {
|
|
23310
|
+
return activeLabel.value;
|
|
23311
|
+
}
|
|
23312
|
+
return defaultLabel.value;
|
|
23313
|
+
});
|
|
23288
23314
|
const handleMobileToggle = () => {
|
|
23289
23315
|
searchResultStore.setSidebarState({
|
|
23290
|
-
visible:
|
|
23316
|
+
visible: !isSidebarVisible.value,
|
|
23291
23317
|
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
23292
23318
|
});
|
|
23293
23319
|
};
|
|
@@ -23296,11 +23322,12 @@ and ensure you are accounting for this risk.
|
|
|
23296
23322
|
return openBlock(), createElementBlock("div", {
|
|
23297
23323
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
23298
23324
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
23299
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters.value
|
|
23325
|
+
"lupa-mobile-toggle-has-filters": hasActiveFilters.value,
|
|
23326
|
+
"lupa-sidebar-open": isSidebarVisible.value
|
|
23300
23327
|
}]),
|
|
23301
23328
|
onClick: handleMobileToggle
|
|
23302
23329
|
}, [
|
|
23303
|
-
createTextVNode(toDisplayString(
|
|
23330
|
+
createTextVNode(toDisplayString(label.value) + " ", 1),
|
|
23304
23331
|
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
23305
23332
|
], 2);
|
|
23306
23333
|
};
|
|
@@ -23747,9 +23774,9 @@ and ensure you are accounting for this risk.
|
|
|
23747
23774
|
createBaseVNode("div", _hoisted_6$5, [
|
|
23748
23775
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
23749
23776
|
createVNode(_sfc_main$G, {
|
|
23750
|
-
|
|
23777
|
+
labels: optionsValue.value.labels,
|
|
23751
23778
|
"show-filter-count": showMobileFilterCount.value
|
|
23752
|
-
}, null, 8, ["
|
|
23779
|
+
}, null, 8, ["labels", "show-filter-count"]),
|
|
23753
23780
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
|
|
23754
23781
|
key: 1,
|
|
23755
23782
|
options: paginationOptions.value.pageSize,
|
package/dist/lupaSearch.js
CHANGED
|
@@ -23019,6 +23019,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
23019
23019
|
}
|
|
23020
23020
|
});
|
|
23021
23021
|
const _hoisted_1$F = {
|
|
23022
|
+
key: 0,
|
|
23022
23023
|
id: "lupa-search-result-filters",
|
|
23023
23024
|
class: "lupa-search-result-filters"
|
|
23024
23025
|
};
|
|
@@ -23043,6 +23044,10 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23043
23044
|
const showCurrentFilters = computed(() => {
|
|
23044
23045
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
23045
23046
|
});
|
|
23047
|
+
const visible = computed(() => {
|
|
23048
|
+
var _a;
|
|
23049
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23050
|
+
});
|
|
23046
23051
|
const filter2 = () => {
|
|
23047
23052
|
emit2("filter");
|
|
23048
23053
|
};
|
|
@@ -23055,7 +23060,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23055
23060
|
__expose({ fetch: fetch2 });
|
|
23056
23061
|
return (_ctx, _cache) => {
|
|
23057
23062
|
var _a;
|
|
23058
|
-
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23063
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23059
23064
|
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
23060
23065
|
key: 0,
|
|
23061
23066
|
options: _ctx.options.currentFilters,
|
|
@@ -23072,7 +23077,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23072
23077
|
options: _ctx.options.facets,
|
|
23073
23078
|
onFilter: filter2
|
|
23074
23079
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
23075
|
-
]);
|
|
23080
|
+
])) : createCommentVNode("", true);
|
|
23076
23081
|
};
|
|
23077
23082
|
}
|
|
23078
23083
|
});
|
|
@@ -23182,6 +23187,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23182
23187
|
return (_ctx, _cache) => {
|
|
23183
23188
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
23184
23189
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
23190
|
+
var _a;
|
|
23185
23191
|
return openBlock(), createElementBlock("span", {
|
|
23186
23192
|
class: "lupa-search-results-breadcrumb",
|
|
23187
23193
|
key: index
|
|
@@ -23191,11 +23197,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23191
23197
|
class: "lupa-search-results-breadcrumb-link",
|
|
23192
23198
|
href: breadcrumb.link,
|
|
23193
23199
|
onClick: (e2) => {
|
|
23194
|
-
var
|
|
23195
|
-
return handleNavigation(e2, (
|
|
23200
|
+
var _a2;
|
|
23201
|
+
return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
|
|
23196
23202
|
}
|
|
23197
23203
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
23198
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f,
|
|
23204
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
|
|
23199
23205
|
]);
|
|
23200
23206
|
}), 128))
|
|
23201
23207
|
]);
|
|
@@ -23203,6 +23209,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23203
23209
|
}
|
|
23204
23210
|
});
|
|
23205
23211
|
const _hoisted_1$C = {
|
|
23212
|
+
key: 0,
|
|
23206
23213
|
id: "lupa-search-result-filters",
|
|
23207
23214
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
23208
23215
|
};
|
|
@@ -23213,12 +23220,17 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
23213
23220
|
},
|
|
23214
23221
|
emits: ["filter"],
|
|
23215
23222
|
setup(__props, { emit: emit2 }) {
|
|
23223
|
+
const props = __props;
|
|
23216
23224
|
const filter2 = () => {
|
|
23217
23225
|
emit2("filter");
|
|
23218
23226
|
};
|
|
23227
|
+
const visible = computed(() => {
|
|
23228
|
+
var _a;
|
|
23229
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23230
|
+
});
|
|
23219
23231
|
return (_ctx, _cache) => {
|
|
23220
23232
|
var _a;
|
|
23221
|
-
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23233
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23222
23234
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$M, {
|
|
23223
23235
|
key: 0,
|
|
23224
23236
|
options: _ctx.options.facets,
|
|
@@ -23226,7 +23238,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
23226
23238
|
clearable: true,
|
|
23227
23239
|
onFilter: filter2
|
|
23228
23240
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
23229
|
-
]);
|
|
23241
|
+
])) : createCommentVNode("", true);
|
|
23230
23242
|
};
|
|
23231
23243
|
}
|
|
23232
23244
|
});
|
|
@@ -23271,13 +23283,14 @@ const _hoisted_1$A = {
|
|
|
23271
23283
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
23272
23284
|
__name: "SearchResultsMobileToggle",
|
|
23273
23285
|
props: {
|
|
23274
|
-
|
|
23286
|
+
labels: {},
|
|
23275
23287
|
showFilterCount: { type: Boolean }
|
|
23276
23288
|
},
|
|
23277
23289
|
setup(__props) {
|
|
23290
|
+
const props = __props;
|
|
23278
23291
|
const searchResultStore = useSearchResultStore();
|
|
23279
23292
|
const optionsStore = useOptionsStore();
|
|
23280
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
23293
|
+
const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
|
|
23281
23294
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
23282
23295
|
const disableMobileBodyScrollLock = computed(
|
|
23283
23296
|
() => {
|
|
@@ -23285,9 +23298,22 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
23285
23298
|
return (_c = (_b = (_a = searchResultOptions.value.filters) == null ? void 0 : _a.facets) == null ? void 0 : _b.disableMobileBodyScrollLock) != null ? _c : false;
|
|
23286
23299
|
}
|
|
23287
23300
|
);
|
|
23301
|
+
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
23302
|
+
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
23303
|
+
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
23304
|
+
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
23305
|
+
const label = computed(() => {
|
|
23306
|
+
if (isSidebarVisible.value) {
|
|
23307
|
+
return openLabel.value;
|
|
23308
|
+
}
|
|
23309
|
+
if (hasActiveFilters.value) {
|
|
23310
|
+
return activeLabel.value;
|
|
23311
|
+
}
|
|
23312
|
+
return defaultLabel.value;
|
|
23313
|
+
});
|
|
23288
23314
|
const handleMobileToggle = () => {
|
|
23289
23315
|
searchResultStore.setSidebarState({
|
|
23290
|
-
visible:
|
|
23316
|
+
visible: !isSidebarVisible.value,
|
|
23291
23317
|
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
23292
23318
|
});
|
|
23293
23319
|
};
|
|
@@ -23296,11 +23322,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
23296
23322
|
return openBlock(), createElementBlock("div", {
|
|
23297
23323
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
23298
23324
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
23299
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters.value
|
|
23325
|
+
"lupa-mobile-toggle-has-filters": hasActiveFilters.value,
|
|
23326
|
+
"lupa-sidebar-open": isSidebarVisible.value
|
|
23300
23327
|
}]),
|
|
23301
23328
|
onClick: handleMobileToggle
|
|
23302
23329
|
}, [
|
|
23303
|
-
createTextVNode(toDisplayString(
|
|
23330
|
+
createTextVNode(toDisplayString(label.value) + " ", 1),
|
|
23304
23331
|
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
23305
23332
|
], 2);
|
|
23306
23333
|
};
|
|
@@ -23747,9 +23774,9 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
23747
23774
|
createBaseVNode("div", _hoisted_6$5, [
|
|
23748
23775
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
23749
23776
|
createVNode(_sfc_main$G, {
|
|
23750
|
-
|
|
23777
|
+
labels: optionsValue.value.labels,
|
|
23751
23778
|
"show-filter-count": showMobileFilterCount.value
|
|
23752
|
-
}, null, 8, ["
|
|
23779
|
+
}, null, 8, ["labels", "show-filter-count"]),
|
|
23753
23780
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
|
|
23754
23781
|
key: 1,
|
|
23755
23782
|
options: paginationOptions.value.pageSize,
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -23017,6 +23017,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
23017
23017
|
}
|
|
23018
23018
|
});
|
|
23019
23019
|
const _hoisted_1$F = {
|
|
23020
|
+
key: 0,
|
|
23020
23021
|
id: "lupa-search-result-filters",
|
|
23021
23022
|
class: "lupa-search-result-filters"
|
|
23022
23023
|
};
|
|
@@ -23041,6 +23042,10 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23041
23042
|
const showCurrentFilters = computed(() => {
|
|
23042
23043
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
23043
23044
|
});
|
|
23045
|
+
const visible = computed(() => {
|
|
23046
|
+
var _a;
|
|
23047
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23048
|
+
});
|
|
23044
23049
|
const filter2 = () => {
|
|
23045
23050
|
emit2("filter");
|
|
23046
23051
|
};
|
|
@@ -23053,7 +23058,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23053
23058
|
__expose({ fetch: fetch2 });
|
|
23054
23059
|
return (_ctx, _cache) => {
|
|
23055
23060
|
var _a;
|
|
23056
|
-
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23061
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23057
23062
|
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
23058
23063
|
key: 0,
|
|
23059
23064
|
options: _ctx.options.currentFilters,
|
|
@@ -23070,7 +23075,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
23070
23075
|
options: _ctx.options.facets,
|
|
23071
23076
|
onFilter: filter2
|
|
23072
23077
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
23073
|
-
]);
|
|
23078
|
+
])) : createCommentVNode("", true);
|
|
23074
23079
|
};
|
|
23075
23080
|
}
|
|
23076
23081
|
});
|
|
@@ -23180,6 +23185,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23180
23185
|
return (_ctx, _cache) => {
|
|
23181
23186
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
23182
23187
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
23188
|
+
var _a;
|
|
23183
23189
|
return openBlock(), createElementBlock("span", {
|
|
23184
23190
|
class: "lupa-search-results-breadcrumb",
|
|
23185
23191
|
key: index
|
|
@@ -23189,11 +23195,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23189
23195
|
class: "lupa-search-results-breadcrumb-link",
|
|
23190
23196
|
href: breadcrumb.link,
|
|
23191
23197
|
onClick: (e2) => {
|
|
23192
|
-
var
|
|
23193
|
-
return handleNavigation(e2, (
|
|
23198
|
+
var _a2;
|
|
23199
|
+
return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
|
|
23194
23200
|
}
|
|
23195
23201
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
23196
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f,
|
|
23202
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
|
|
23197
23203
|
]);
|
|
23198
23204
|
}), 128))
|
|
23199
23205
|
]);
|
|
@@ -23201,6 +23207,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
23201
23207
|
}
|
|
23202
23208
|
});
|
|
23203
23209
|
const _hoisted_1$C = {
|
|
23210
|
+
key: 0,
|
|
23204
23211
|
id: "lupa-search-result-filters",
|
|
23205
23212
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
23206
23213
|
};
|
|
@@ -23211,12 +23218,17 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
23211
23218
|
},
|
|
23212
23219
|
emits: ["filter"],
|
|
23213
23220
|
setup(__props, { emit: emit2 }) {
|
|
23221
|
+
const props = __props;
|
|
23214
23222
|
const filter2 = () => {
|
|
23215
23223
|
emit2("filter");
|
|
23216
23224
|
};
|
|
23225
|
+
const visible = computed(() => {
|
|
23226
|
+
var _a;
|
|
23227
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23228
|
+
});
|
|
23217
23229
|
return (_ctx, _cache) => {
|
|
23218
23230
|
var _a;
|
|
23219
|
-
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23231
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23220
23232
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$M, {
|
|
23221
23233
|
key: 0,
|
|
23222
23234
|
options: _ctx.options.facets,
|
|
@@ -23224,7 +23236,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
23224
23236
|
clearable: true,
|
|
23225
23237
|
onFilter: filter2
|
|
23226
23238
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
23227
|
-
]);
|
|
23239
|
+
])) : createCommentVNode("", true);
|
|
23228
23240
|
};
|
|
23229
23241
|
}
|
|
23230
23242
|
});
|
|
@@ -23269,13 +23281,14 @@ const _hoisted_1$A = {
|
|
|
23269
23281
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
23270
23282
|
__name: "SearchResultsMobileToggle",
|
|
23271
23283
|
props: {
|
|
23272
|
-
|
|
23284
|
+
labels: {},
|
|
23273
23285
|
showFilterCount: { type: Boolean }
|
|
23274
23286
|
},
|
|
23275
23287
|
setup(__props) {
|
|
23288
|
+
const props = __props;
|
|
23276
23289
|
const searchResultStore = useSearchResultStore();
|
|
23277
23290
|
const optionsStore = useOptionsStore();
|
|
23278
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
23291
|
+
const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
|
|
23279
23292
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
23280
23293
|
const disableMobileBodyScrollLock = computed(
|
|
23281
23294
|
() => {
|
|
@@ -23283,9 +23296,22 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
23283
23296
|
return (_c = (_b = (_a = searchResultOptions.value.filters) == null ? void 0 : _a.facets) == null ? void 0 : _b.disableMobileBodyScrollLock) != null ? _c : false;
|
|
23284
23297
|
}
|
|
23285
23298
|
);
|
|
23299
|
+
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
23300
|
+
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
23301
|
+
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
23302
|
+
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
23303
|
+
const label = computed(() => {
|
|
23304
|
+
if (isSidebarVisible.value) {
|
|
23305
|
+
return openLabel.value;
|
|
23306
|
+
}
|
|
23307
|
+
if (hasActiveFilters.value) {
|
|
23308
|
+
return activeLabel.value;
|
|
23309
|
+
}
|
|
23310
|
+
return defaultLabel.value;
|
|
23311
|
+
});
|
|
23286
23312
|
const handleMobileToggle = () => {
|
|
23287
23313
|
searchResultStore.setSidebarState({
|
|
23288
|
-
visible:
|
|
23314
|
+
visible: !isSidebarVisible.value,
|
|
23289
23315
|
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
23290
23316
|
});
|
|
23291
23317
|
};
|
|
@@ -23294,11 +23320,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
23294
23320
|
return openBlock(), createElementBlock("div", {
|
|
23295
23321
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
23296
23322
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
23297
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters.value
|
|
23323
|
+
"lupa-mobile-toggle-has-filters": hasActiveFilters.value,
|
|
23324
|
+
"lupa-sidebar-open": isSidebarVisible.value
|
|
23298
23325
|
}]),
|
|
23299
23326
|
onClick: handleMobileToggle
|
|
23300
23327
|
}, [
|
|
23301
|
-
createTextVNode(toDisplayString(
|
|
23328
|
+
createTextVNode(toDisplayString(label.value) + " ", 1),
|
|
23302
23329
|
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
23303
23330
|
], 2);
|
|
23304
23331
|
};
|
|
@@ -23745,9 +23772,9 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
23745
23772
|
createBaseVNode("div", _hoisted_6$5, [
|
|
23746
23773
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
23747
23774
|
createVNode(_sfc_main$G, {
|
|
23748
|
-
|
|
23775
|
+
labels: optionsValue.value.labels,
|
|
23749
23776
|
"show-filter-count": showMobileFilterCount.value
|
|
23750
|
-
}, null, 8, ["
|
|
23777
|
+
}, null, 8, ["labels", "show-filter-count"]),
|
|
23751
23778
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
|
|
23752
23779
|
key: 1,
|
|
23753
23780
|
options: paginationOptions.value.pageSize,
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -23021,6 +23021,7 @@ and ensure you are accounting for this risk.
|
|
|
23021
23021
|
}
|
|
23022
23022
|
});
|
|
23023
23023
|
const _hoisted_1$F = {
|
|
23024
|
+
key: 0,
|
|
23024
23025
|
id: "lupa-search-result-filters",
|
|
23025
23026
|
class: "lupa-search-result-filters"
|
|
23026
23027
|
};
|
|
@@ -23045,6 +23046,10 @@ and ensure you are accounting for this risk.
|
|
|
23045
23046
|
const showCurrentFilters = computed(() => {
|
|
23046
23047
|
return currentFiltersVisible.value ? Boolean(props.options.facets) : false;
|
|
23047
23048
|
});
|
|
23049
|
+
const visible = computed(() => {
|
|
23050
|
+
var _a;
|
|
23051
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23052
|
+
});
|
|
23048
23053
|
const filter2 = () => {
|
|
23049
23054
|
emit2("filter");
|
|
23050
23055
|
};
|
|
@@ -23057,7 +23062,7 @@ and ensure you are accounting for this risk.
|
|
|
23057
23062
|
__expose({ fetch: fetch2 });
|
|
23058
23063
|
return (_ctx, _cache) => {
|
|
23059
23064
|
var _a;
|
|
23060
|
-
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23065
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
23061
23066
|
showCurrentFilters.value ? (openBlock(), createBlock(_sfc_main$W, {
|
|
23062
23067
|
key: 0,
|
|
23063
23068
|
options: _ctx.options.currentFilters,
|
|
@@ -23074,7 +23079,7 @@ and ensure you are accounting for this risk.
|
|
|
23074
23079
|
options: _ctx.options.facets,
|
|
23075
23080
|
onFilter: filter2
|
|
23076
23081
|
}, null, 8, ["options"])) : createCommentVNode("", true)
|
|
23077
|
-
]);
|
|
23082
|
+
])) : createCommentVNode("", true);
|
|
23078
23083
|
};
|
|
23079
23084
|
}
|
|
23080
23085
|
});
|
|
@@ -23184,6 +23189,7 @@ and ensure you are accounting for this risk.
|
|
|
23184
23189
|
return (_ctx, _cache) => {
|
|
23185
23190
|
return openBlock(), createElementBlock("div", _hoisted_1$D, [
|
|
23186
23191
|
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbsValue.value, (breadcrumb, index) => {
|
|
23192
|
+
var _a;
|
|
23187
23193
|
return openBlock(), createElementBlock("span", {
|
|
23188
23194
|
class: "lupa-search-results-breadcrumb",
|
|
23189
23195
|
key: index
|
|
@@ -23193,11 +23199,11 @@ and ensure you are accounting for this risk.
|
|
|
23193
23199
|
class: "lupa-search-results-breadcrumb-link",
|
|
23194
23200
|
href: breadcrumb.link,
|
|
23195
23201
|
onClick: (e2) => {
|
|
23196
|
-
var
|
|
23197
|
-
return handleNavigation(e2, (
|
|
23202
|
+
var _a2;
|
|
23203
|
+
return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
|
|
23198
23204
|
}
|
|
23199
23205
|
}, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
|
|
23200
|
-
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f,
|
|
23206
|
+
index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
|
|
23201
23207
|
]);
|
|
23202
23208
|
}), 128))
|
|
23203
23209
|
]);
|
|
@@ -23205,6 +23211,7 @@ and ensure you are accounting for this risk.
|
|
|
23205
23211
|
}
|
|
23206
23212
|
});
|
|
23207
23213
|
const _hoisted_1$C = {
|
|
23214
|
+
key: 0,
|
|
23208
23215
|
id: "lupa-search-result-filters",
|
|
23209
23216
|
class: "lupa-search-result-filters lupa-search-result-top-filters"
|
|
23210
23217
|
};
|
|
@@ -23215,12 +23222,17 @@ and ensure you are accounting for this risk.
|
|
|
23215
23222
|
},
|
|
23216
23223
|
emits: ["filter"],
|
|
23217
23224
|
setup(__props, { emit: emit2 }) {
|
|
23225
|
+
const props = __props;
|
|
23218
23226
|
const filter2 = () => {
|
|
23219
23227
|
emit2("filter");
|
|
23220
23228
|
};
|
|
23229
|
+
const visible = computed(() => {
|
|
23230
|
+
var _a;
|
|
23231
|
+
return (_a = props.options.visible) != null ? _a : true;
|
|
23232
|
+
});
|
|
23221
23233
|
return (_ctx, _cache) => {
|
|
23222
23234
|
var _a;
|
|
23223
|
-
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23235
|
+
return visible.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
23224
23236
|
_ctx.options.facets ? (openBlock(), createBlock(_sfc_main$M, {
|
|
23225
23237
|
key: 0,
|
|
23226
23238
|
options: _ctx.options.facets,
|
|
@@ -23228,7 +23240,7 @@ and ensure you are accounting for this risk.
|
|
|
23228
23240
|
clearable: true,
|
|
23229
23241
|
onFilter: filter2
|
|
23230
23242
|
}, null, 8, ["options", "facet-style"])) : createCommentVNode("", true)
|
|
23231
|
-
]);
|
|
23243
|
+
])) : createCommentVNode("", true);
|
|
23232
23244
|
};
|
|
23233
23245
|
}
|
|
23234
23246
|
});
|
|
@@ -23273,13 +23285,14 @@ and ensure you are accounting for this risk.
|
|
|
23273
23285
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
23274
23286
|
__name: "SearchResultsMobileToggle",
|
|
23275
23287
|
props: {
|
|
23276
|
-
|
|
23288
|
+
labels: {},
|
|
23277
23289
|
showFilterCount: { type: Boolean }
|
|
23278
23290
|
},
|
|
23279
23291
|
setup(__props) {
|
|
23292
|
+
const props = __props;
|
|
23280
23293
|
const searchResultStore = useSearchResultStore();
|
|
23281
23294
|
const optionsStore = useOptionsStore();
|
|
23282
|
-
const { currentFilterCount } = storeToRefs(searchResultStore);
|
|
23295
|
+
const { currentFilterCount, isMobileSidebarVisible } = storeToRefs(searchResultStore);
|
|
23283
23296
|
const { searchResultOptions } = storeToRefs(optionsStore);
|
|
23284
23297
|
const disableMobileBodyScrollLock = computed(
|
|
23285
23298
|
() => {
|
|
@@ -23287,9 +23300,22 @@ and ensure you are accounting for this risk.
|
|
|
23287
23300
|
return (_c = (_b = (_a = searchResultOptions.value.filters) == null ? void 0 : _a.facets) == null ? void 0 : _b.disableMobileBodyScrollLock) != null ? _c : false;
|
|
23288
23301
|
}
|
|
23289
23302
|
);
|
|
23303
|
+
const isSidebarVisible = computed(() => isMobileSidebarVisible.value);
|
|
23304
|
+
const defaultLabel = computed(() => props.labels.mobileFilterButton);
|
|
23305
|
+
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
23306
|
+
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
23307
|
+
const label = computed(() => {
|
|
23308
|
+
if (isSidebarVisible.value) {
|
|
23309
|
+
return openLabel.value;
|
|
23310
|
+
}
|
|
23311
|
+
if (hasActiveFilters.value) {
|
|
23312
|
+
return activeLabel.value;
|
|
23313
|
+
}
|
|
23314
|
+
return defaultLabel.value;
|
|
23315
|
+
});
|
|
23290
23316
|
const handleMobileToggle = () => {
|
|
23291
23317
|
searchResultStore.setSidebarState({
|
|
23292
|
-
visible:
|
|
23318
|
+
visible: !isSidebarVisible.value,
|
|
23293
23319
|
disableBodyScrolling: !disableMobileBodyScrollLock.value
|
|
23294
23320
|
});
|
|
23295
23321
|
};
|
|
@@ -23298,11 +23324,12 @@ and ensure you are accounting for this risk.
|
|
|
23298
23324
|
return openBlock(), createElementBlock("div", {
|
|
23299
23325
|
class: normalizeClass(["lupa-mobile-toggle", {
|
|
23300
23326
|
"lupa-mobile-toggle-filters-empty": unref(currentFilterCount) < 1,
|
|
23301
|
-
"lupa-mobile-toggle-has-filters": hasActiveFilters.value
|
|
23327
|
+
"lupa-mobile-toggle-has-filters": hasActiveFilters.value,
|
|
23328
|
+
"lupa-sidebar-open": isSidebarVisible.value
|
|
23302
23329
|
}]),
|
|
23303
23330
|
onClick: handleMobileToggle
|
|
23304
23331
|
}, [
|
|
23305
|
-
createTextVNode(toDisplayString(
|
|
23332
|
+
createTextVNode(toDisplayString(label.value) + " ", 1),
|
|
23306
23333
|
_ctx.showFilterCount && unref(currentFilterCount) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$A, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
|
|
23307
23334
|
], 2);
|
|
23308
23335
|
};
|
|
@@ -23749,9 +23776,9 @@ and ensure you are accounting for this risk.
|
|
|
23749
23776
|
createBaseVNode("div", _hoisted_6$5, [
|
|
23750
23777
|
toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
|
|
23751
23778
|
createVNode(_sfc_main$G, {
|
|
23752
|
-
|
|
23779
|
+
labels: optionsValue.value.labels,
|
|
23753
23780
|
"show-filter-count": showMobileFilterCount.value
|
|
23754
|
-
}, null, 8, ["
|
|
23781
|
+
}, null, 8, ["labels", "show-filter-count"]),
|
|
23755
23782
|
paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$D, {
|
|
23756
23783
|
key: 1,
|
|
23757
23784
|
options: paginationOptions.value.pageSize,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.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.16.
|
|
23
|
+
"@getlupa/vue": "0.16.2",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
25
25
|
"@tsconfig/node18": "^2.0.1",
|
|
26
26
|
"@types/jsdom": "^21.1.1",
|