@getlupa/vue 0.11.3 → 0.11.5

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.
@@ -3739,14 +3739,15 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
3739
3739
  result,
3740
3740
  mode
3741
3741
  }) {
3742
- var _a, _b, _c, _d, _e, _f;
3742
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3743
3743
  const enabledForMode = mode === "searchBox" ? isDynamicDataEnabledForSearchBox.value : isDynamicDataEnabledForSearchResults.value;
3744
3744
  if (!result || !enabledForMode) {
3745
3745
  return;
3746
3746
  }
3747
3747
  const resultIds = (_b = (_a = result == null ? void 0 : result.items) == null ? void 0 : _a.map((i) => i.id)) != null ? _b : [];
3748
3748
  const similarQueryResultIds = (_e = (_d = (_c = result.similarQueries) == null ? void 0 : _c.map((q) => q.items.map((i) => i.id))) == null ? void 0 : _d.flat()) != null ? _e : [];
3749
- let requestedIds = [...resultIds, ...similarQueryResultIds];
3749
+ const similarResultIds = (_g = (_f = result.similarResults) == null ? void 0 : _f.items.map((i) => i.id)) != null ? _g : [];
3750
+ let requestedIds = [...resultIds, ...similarQueryResultIds, ...similarResultIds];
3750
3751
  if (isCacheEnabled.value) {
3751
3752
  requestedIds = requestedIds.filter((i) => !dynamicDataIdMap.value[`${i}`]);
3752
3753
  }
@@ -3760,7 +3761,7 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
3760
3761
  if (!(dynamicData == null ? void 0 : dynamicData.handler)) {
3761
3762
  return {};
3762
3763
  }
3763
- const dynamicDataResult = (_f = yield dynamicData == null ? void 0 : dynamicData.handler(requestedIds)) != null ? _f : [];
3764
+ const dynamicDataResult = (_h = yield dynamicData == null ? void 0 : dynamicData.handler(requestedIds)) != null ? _h : [];
3764
3765
  const seed = {};
3765
3766
  const dynamicDataIdMapValue = dynamicDataResult.reduce(
3766
3767
  (a, c2) => __spreadProps(__spreadValues({}, a), { [`${c2.id}`]: c2 }),
@@ -6243,11 +6244,11 @@ const _hoisted_4$i = ["onClick"];
6243
6244
  const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
6244
6245
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
6245
6246
  const _hoisted_7$6 = { class: "lupa-term-label" };
6246
- const _hoisted_8$1 = {
6247
+ const _hoisted_8$2 = {
6247
6248
  key: 0,
6248
6249
  class: "lupa-term-count"
6249
6250
  };
6250
- const _hoisted_9$1 = { key: 0 };
6251
+ const _hoisted_9$2 = { key: 0 };
6251
6252
  const _hoisted_10$1 = { key: 1 };
6252
6253
  const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
6253
6254
  __name: "TermFacet",
@@ -6343,7 +6344,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
6343
6344
  ]),
6344
6345
  vue.createElementVNode("div", _hoisted_6$8, [
6345
6346
  vue.createElementVNode("span", _hoisted_7$6, vue.toDisplayString(item.title), 1),
6346
- _ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8$1, "(" + vue.toDisplayString(item.count) + ")", 1)) : vue.createCommentVNode("", true)
6347
+ _ctx.options.showDocumentCount ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_8$2, "(" + vue.toDisplayString(item.count) + ")", 1)) : vue.createCommentVNode("", true)
6347
6348
  ])
6348
6349
  ], 10, _hoisted_4$i);
6349
6350
  }), 128))
@@ -6354,7 +6355,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
6354
6355
  "data-cy": "lupa-facet-term",
6355
6356
  onClick: toggleShowAll
6356
6357
  }, [
6357
- showAll.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_9$1, vue.toDisplayString(_ctx.options.labels.showLess), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$1, vue.toDisplayString(_ctx.options.labels.showAll), 1))
6358
+ showAll.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_9$2, vue.toDisplayString(_ctx.options.labels.showLess), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_10$1, vue.toDisplayString(_ctx.options.labels.showAll), 1))
6358
6359
  ])) : vue.createCommentVNode("", true)
6359
6360
  ]);
6360
6361
  };
@@ -7352,8 +7353,8 @@ const _hoisted_4$h = {
7352
7353
  const _hoisted_5$b = { class: "lupa-stats-from" };
7353
7354
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
7354
7355
  const _hoisted_7$5 = { key: 0 };
7355
- const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
7356
- const _hoisted_9 = {
7356
+ const _hoisted_8$1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
7357
+ const _hoisted_9$1 = {
7357
7358
  key: 0,
7358
7359
  class: "lupa-stats-range-label"
7359
7360
  };
@@ -7561,9 +7562,9 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
7561
7562
  isPrice.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$5, vue.toDisplayString(currency.value), 1)) : vue.createCommentVNode("", true)
7562
7563
  ])
7563
7564
  ]),
7564
- _hoisted_8,
7565
+ _hoisted_8$1,
7565
7566
  vue.createElementVNode("div", null, [
7566
- rangeLabelTo.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, vue.toDisplayString(rangeLabelTo.value), 1)) : vue.createCommentVNode("", true),
7567
+ rangeLabelTo.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$1, vue.toDisplayString(rangeLabelTo.value), 1)) : vue.createCommentVNode("", true),
7567
7568
  vue.createElementVNode("div", _hoisted_10, [
7568
7569
  vue.withDirectives(vue.createElementVNode("input", {
7569
7570
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => toValue.value = $event),
@@ -8652,12 +8653,20 @@ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
8652
8653
  }
8653
8654
  });
8654
8655
  const _hoisted_1$t = { class: "lupa-toolbar-left" };
8655
- const _hoisted_2$m = { key: 1 };
8656
- const _hoisted_3$f = { key: 3 };
8657
- const _hoisted_4$a = { key: 5 };
8658
- const _hoisted_5$7 = { class: "lupa-toolbar-right" };
8659
- const _hoisted_6$5 = { key: 1 };
8660
- const _hoisted_7$3 = { key: 3 };
8656
+ const _hoisted_2$m = {
8657
+ key: 0,
8658
+ class: "lupa-toolbar-right-title"
8659
+ };
8660
+ const _hoisted_3$f = { key: 2 };
8661
+ const _hoisted_4$a = { key: 4 };
8662
+ const _hoisted_5$7 = { key: 6 };
8663
+ const _hoisted_6$5 = { class: "lupa-toolbar-right" };
8664
+ const _hoisted_7$3 = {
8665
+ key: 0,
8666
+ class: "lupa-toolbar-right-title"
8667
+ };
8668
+ const _hoisted_8 = { key: 2 };
8669
+ const _hoisted_9 = { key: 4 };
8661
8670
  const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
8662
8671
  __name: "SearchResultsToolbar",
8663
8672
  props: {
@@ -8738,6 +8747,14 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
8738
8747
  const defaultLabel = (_c = (_b = (_a = paginationOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.itemCount) != null ? _c : "";
8739
8748
  return !hasAnyFilter.value || !showFilterClear.value ? defaultLabel : (_f = (_e = (_d = paginationOptions.value) == null ? void 0 : _d.labels) == null ? void 0 : _e.filteredItemCount) != null ? _f : defaultLabel;
8740
8749
  });
8750
+ const toolbarLeftLabel = vue.computed(() => {
8751
+ var _a;
8752
+ return (_a = optionsValue.value.labels.toolbarLeftLabel) != null ? _a : "";
8753
+ });
8754
+ const toolbarRightLabel = vue.computed(() => {
8755
+ var _a;
8756
+ return (_a = optionsValue.value.labels.toolbarRightLabel) != null ? _a : "";
8757
+ });
8741
8758
  const showMobileFilterCount = vue.computed(() => {
8742
8759
  var _a, _b, _c;
8743
8760
  return Boolean((_c = (_b = (_a = optionsValue.value.filters) == null ? void 0 : _a.currentFilters) == null ? void 0 : _b.mobileSidebar) == null ? void 0 : _c.showFilterCount);
@@ -8758,35 +8775,37 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
8758
8775
  class: vue.normalizeClass({ "lupa-filter-no-results": !hasResults.value })
8759
8776
  }, [
8760
8777
  vue.createElementVNode("div", _hoisted_1$t, [
8761
- showLayoutSelection.value ? (vue.openBlock(), vue.createBlock(_sfc_main$B, { key: 0 })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$m)),
8778
+ toolbarLeftLabel.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$m, vue.toDisplayString(toolbarLeftLabel.value), 1)) : vue.createCommentVNode("", true),
8779
+ showLayoutSelection.value ? (vue.openBlock(), vue.createBlock(_sfc_main$B, { key: 1 })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$f)),
8762
8780
  showItemSummary.value ? (vue.openBlock(), vue.createBlock(_sfc_main$T, {
8763
- key: 2,
8781
+ key: 3,
8764
8782
  label: searchSummaryLabel.value,
8765
8783
  clearable: vue.unref(hasAnyFilter) && showFilterClear.value,
8766
8784
  onClear: handleClearAll
8767
- }, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$f)),
8785
+ }, null, 8, ["label", "clearable"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$a)),
8768
8786
  displayPageSelect.value ? (vue.openBlock(), vue.createBlock(_sfc_main$z, {
8769
- key: 4,
8787
+ key: 5,
8770
8788
  options: paginationOptions.value.pageSelect,
8771
8789
  "last-page-label": paginationOptions.value.labels.showMore,
8772
8790
  "first-page-label": paginationOptions.value.labels.showLess
8773
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$a))
8791
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$7))
8774
8792
  ]),
8775
- vue.createElementVNode("div", _hoisted_5$7, [
8793
+ vue.createElementVNode("div", _hoisted_6$5, [
8794
+ toolbarRightLabel.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$3, vue.toDisplayString(toolbarRightLabel.value), 1)) : vue.createCommentVNode("", true),
8776
8795
  vue.createVNode(_sfc_main$A, {
8777
8796
  label: optionsValue.value.labels.mobileFilterButton,
8778
8797
  "show-filter-count": showMobileFilterCount.value
8779
8798
  }, null, 8, ["label", "show-filter-count"]),
8780
8799
  paginationDisplay.value.pageSize ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
8781
- key: 0,
8800
+ key: 1,
8782
8801
  options: paginationOptions.value.pageSize,
8783
8802
  label: paginationOptions.value.labels.pageSize
8784
- }, null, 8, ["options", "label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$5)),
8803
+ }, null, 8, ["options", "label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_8)),
8785
8804
  sortOptions.value ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
8786
- key: 2,
8805
+ key: 3,
8787
8806
  options: sortOptions.value,
8788
8807
  callbacks: callbacks.value
8789
- }, null, 8, ["options", "callbacks"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$3))
8808
+ }, null, 8, ["options", "callbacks"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_9))
8790
8809
  ])
8791
8810
  ], 2);
8792
8811
  };
@@ -10157,12 +10176,12 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
10157
10176
  queryKey,
10158
10177
  results
10159
10178
  }) {
10160
- var _a, _b, _c, _d;
10179
+ var _a, _b, _c, _d, _e, _f;
10161
10180
  trackingStore.trackResults({ queryKey, results });
10162
10181
  const hasResults2 = Boolean(
10163
- results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
10182
+ results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options) || ((_d = (_c = results.similarResults) == null ? void 0 : _c.items) == null ? void 0 : _d.length)
10164
10183
  );
10165
- (_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
10184
+ (_f = (_e = props.options.callbacks) == null ? void 0 : _e.onSearchResults) == null ? void 0 : _f.call(_e, { queryKey, hasResults: hasResults2, params: paramStore.params });
10166
10185
  if (!hasResults2) {
10167
10186
  return;
10168
10187
  }
@@ -3737,14 +3737,15 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
3737
3737
  result,
3738
3738
  mode
3739
3739
  }) {
3740
- var _a, _b, _c, _d, _e, _f;
3740
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3741
3741
  const enabledForMode = mode === "searchBox" ? isDynamicDataEnabledForSearchBox.value : isDynamicDataEnabledForSearchResults.value;
3742
3742
  if (!result || !enabledForMode) {
3743
3743
  return;
3744
3744
  }
3745
3745
  const resultIds = (_b = (_a = result == null ? void 0 : result.items) == null ? void 0 : _a.map((i) => i.id)) != null ? _b : [];
3746
3746
  const similarQueryResultIds = (_e = (_d = (_c = result.similarQueries) == null ? void 0 : _c.map((q) => q.items.map((i) => i.id))) == null ? void 0 : _d.flat()) != null ? _e : [];
3747
- let requestedIds = [...resultIds, ...similarQueryResultIds];
3747
+ const similarResultIds = (_g = (_f = result.similarResults) == null ? void 0 : _f.items.map((i) => i.id)) != null ? _g : [];
3748
+ let requestedIds = [...resultIds, ...similarQueryResultIds, ...similarResultIds];
3748
3749
  if (isCacheEnabled.value) {
3749
3750
  requestedIds = requestedIds.filter((i) => !dynamicDataIdMap.value[`${i}`]);
3750
3751
  }
@@ -3758,7 +3759,7 @@ const useDynamicDataStore = defineStore("dynamicData", () => {
3758
3759
  if (!(dynamicData == null ? void 0 : dynamicData.handler)) {
3759
3760
  return {};
3760
3761
  }
3761
- const dynamicDataResult = (_f = yield dynamicData == null ? void 0 : dynamicData.handler(requestedIds)) != null ? _f : [];
3762
+ const dynamicDataResult = (_h = yield dynamicData == null ? void 0 : dynamicData.handler(requestedIds)) != null ? _h : [];
3762
3763
  const seed = {};
3763
3764
  const dynamicDataIdMapValue = dynamicDataResult.reduce(
3764
3765
  (a, c2) => __spreadProps(__spreadValues({}, a), { [`${c2.id}`]: c2 }),
@@ -6241,11 +6242,11 @@ const _hoisted_4$i = ["onClick"];
6241
6242
  const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
6242
6243
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
6243
6244
  const _hoisted_7$6 = { class: "lupa-term-label" };
6244
- const _hoisted_8$1 = {
6245
+ const _hoisted_8$2 = {
6245
6246
  key: 0,
6246
6247
  class: "lupa-term-count"
6247
6248
  };
6248
- const _hoisted_9$1 = { key: 0 };
6249
+ const _hoisted_9$2 = { key: 0 };
6249
6250
  const _hoisted_10$1 = { key: 1 };
6250
6251
  const _sfc_main$N = /* @__PURE__ */ defineComponent({
6251
6252
  __name: "TermFacet",
@@ -6341,7 +6342,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
6341
6342
  ]),
6342
6343
  createElementVNode("div", _hoisted_6$8, [
6343
6344
  createElementVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
6344
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
6345
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
6345
6346
  ])
6346
6347
  ], 10, _hoisted_4$i);
6347
6348
  }), 128))
@@ -6352,7 +6353,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
6352
6353
  "data-cy": "lupa-facet-term",
6353
6354
  onClick: toggleShowAll
6354
6355
  }, [
6355
- showAll.value ? (openBlock(), createElementBlock("span", _hoisted_9$1, toDisplayString(_ctx.options.labels.showLess), 1)) : (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(_ctx.options.labels.showAll), 1))
6356
+ showAll.value ? (openBlock(), createElementBlock("span", _hoisted_9$2, toDisplayString(_ctx.options.labels.showLess), 1)) : (openBlock(), createElementBlock("span", _hoisted_10$1, toDisplayString(_ctx.options.labels.showAll), 1))
6356
6357
  ])) : createCommentVNode("", true)
6357
6358
  ]);
6358
6359
  };
@@ -7350,8 +7351,8 @@ const _hoisted_4$h = {
7350
7351
  const _hoisted_5$b = { class: "lupa-stats-from" };
7351
7352
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
7352
7353
  const _hoisted_7$5 = { key: 0 };
7353
- const _hoisted_8 = /* @__PURE__ */ createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
7354
- const _hoisted_9 = {
7354
+ const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("div", { class: "lupa-stats-separator" }, null, -1);
7355
+ const _hoisted_9$1 = {
7355
7356
  key: 0,
7356
7357
  class: "lupa-stats-range-label"
7357
7358
  };
@@ -7559,9 +7560,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
7559
7560
  isPrice.value ? (openBlock(), createElementBlock("span", _hoisted_7$5, toDisplayString(currency.value), 1)) : createCommentVNode("", true)
7560
7561
  ])
7561
7562
  ]),
7562
- _hoisted_8,
7563
+ _hoisted_8$1,
7563
7564
  createElementVNode("div", null, [
7564
- rangeLabelTo.value ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(rangeLabelTo.value), 1)) : createCommentVNode("", true),
7565
+ rangeLabelTo.value ? (openBlock(), createElementBlock("div", _hoisted_9$1, toDisplayString(rangeLabelTo.value), 1)) : createCommentVNode("", true),
7565
7566
  createElementVNode("div", _hoisted_10, [
7566
7567
  withDirectives(createElementVNode("input", {
7567
7568
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => toValue.value = $event),
@@ -8650,12 +8651,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
8650
8651
  }
8651
8652
  });
8652
8653
  const _hoisted_1$t = { class: "lupa-toolbar-left" };
8653
- const _hoisted_2$m = { key: 1 };
8654
- const _hoisted_3$f = { key: 3 };
8655
- const _hoisted_4$a = { key: 5 };
8656
- const _hoisted_5$7 = { class: "lupa-toolbar-right" };
8657
- const _hoisted_6$5 = { key: 1 };
8658
- const _hoisted_7$3 = { key: 3 };
8654
+ const _hoisted_2$m = {
8655
+ key: 0,
8656
+ class: "lupa-toolbar-right-title"
8657
+ };
8658
+ const _hoisted_3$f = { key: 2 };
8659
+ const _hoisted_4$a = { key: 4 };
8660
+ const _hoisted_5$7 = { key: 6 };
8661
+ const _hoisted_6$5 = { class: "lupa-toolbar-right" };
8662
+ const _hoisted_7$3 = {
8663
+ key: 0,
8664
+ class: "lupa-toolbar-right-title"
8665
+ };
8666
+ const _hoisted_8 = { key: 2 };
8667
+ const _hoisted_9 = { key: 4 };
8659
8668
  const _sfc_main$w = /* @__PURE__ */ defineComponent({
8660
8669
  __name: "SearchResultsToolbar",
8661
8670
  props: {
@@ -8736,6 +8745,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
8736
8745
  const defaultLabel = (_c = (_b = (_a = paginationOptions.value) == null ? void 0 : _a.labels) == null ? void 0 : _b.itemCount) != null ? _c : "";
8737
8746
  return !hasAnyFilter.value || !showFilterClear.value ? defaultLabel : (_f = (_e = (_d = paginationOptions.value) == null ? void 0 : _d.labels) == null ? void 0 : _e.filteredItemCount) != null ? _f : defaultLabel;
8738
8747
  });
8748
+ const toolbarLeftLabel = computed(() => {
8749
+ var _a;
8750
+ return (_a = optionsValue.value.labels.toolbarLeftLabel) != null ? _a : "";
8751
+ });
8752
+ const toolbarRightLabel = computed(() => {
8753
+ var _a;
8754
+ return (_a = optionsValue.value.labels.toolbarRightLabel) != null ? _a : "";
8755
+ });
8739
8756
  const showMobileFilterCount = computed(() => {
8740
8757
  var _a, _b, _c;
8741
8758
  return Boolean((_c = (_b = (_a = optionsValue.value.filters) == null ? void 0 : _a.currentFilters) == null ? void 0 : _b.mobileSidebar) == null ? void 0 : _c.showFilterCount);
@@ -8756,35 +8773,37 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
8756
8773
  class: normalizeClass({ "lupa-filter-no-results": !hasResults.value })
8757
8774
  }, [
8758
8775
  createElementVNode("div", _hoisted_1$t, [
8759
- showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_2$m)),
8776
+ toolbarLeftLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$m, toDisplayString(toolbarLeftLabel.value), 1)) : createCommentVNode("", true),
8777
+ showLayoutSelection.value ? (openBlock(), createBlock(_sfc_main$B, { key: 1 })) : (openBlock(), createElementBlock("div", _hoisted_3$f)),
8760
8778
  showItemSummary.value ? (openBlock(), createBlock(_sfc_main$T, {
8761
- key: 2,
8779
+ key: 3,
8762
8780
  label: searchSummaryLabel.value,
8763
8781
  clearable: unref(hasAnyFilter) && showFilterClear.value,
8764
8782
  onClear: handleClearAll
8765
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_3$f)),
8783
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$a)),
8766
8784
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$z, {
8767
- key: 4,
8785
+ key: 5,
8768
8786
  options: paginationOptions.value.pageSelect,
8769
8787
  "last-page-label": paginationOptions.value.labels.showMore,
8770
8788
  "first-page-label": paginationOptions.value.labels.showLess
8771
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_4$a))
8789
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
8772
8790
  ]),
8773
- createElementVNode("div", _hoisted_5$7, [
8791
+ createElementVNode("div", _hoisted_6$5, [
8792
+ toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
8774
8793
  createVNode(_sfc_main$A, {
8775
8794
  label: optionsValue.value.labels.mobileFilterButton,
8776
8795
  "show-filter-count": showMobileFilterCount.value
8777
8796
  }, null, 8, ["label", "show-filter-count"]),
8778
8797
  paginationDisplay.value.pageSize ? (openBlock(), createBlock(_sfc_main$y, {
8779
- key: 0,
8798
+ key: 1,
8780
8799
  options: paginationOptions.value.pageSize,
8781
8800
  label: paginationOptions.value.labels.pageSize
8782
- }, null, 8, ["options", "label"])) : (openBlock(), createElementBlock("div", _hoisted_6$5)),
8801
+ }, null, 8, ["options", "label"])) : (openBlock(), createElementBlock("div", _hoisted_8)),
8783
8802
  sortOptions.value ? (openBlock(), createBlock(_sfc_main$x, {
8784
- key: 2,
8803
+ key: 3,
8785
8804
  options: sortOptions.value,
8786
8805
  callbacks: callbacks.value
8787
- }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_7$3))
8806
+ }, null, 8, ["options", "callbacks"])) : (openBlock(), createElementBlock("div", _hoisted_9))
8788
8807
  ])
8789
8808
  ], 2);
8790
8809
  };
@@ -10155,12 +10174,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
10155
10174
  queryKey,
10156
10175
  results
10157
10176
  }) {
10158
- var _a, _b, _c, _d;
10177
+ var _a, _b, _c, _d, _e, _f;
10159
10178
  trackingStore.trackResults({ queryKey, results });
10160
10179
  const hasResults2 = Boolean(
10161
- results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
10180
+ results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options) || ((_d = (_c = results.similarResults) == null ? void 0 : _c.items) == null ? void 0 : _d.length)
10162
10181
  );
10163
- (_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
10182
+ (_f = (_e = props.options.callbacks) == null ? void 0 : _e.onSearchResults) == null ? void 0 : _f.call(_e, { queryKey, hasResults: hasResults2, params: paramStore.params });
10164
10183
  if (!hasResults2) {
10165
10184
  return;
10166
10185
  }
@@ -73,6 +73,8 @@ export type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchRe
73
73
  outOfStock?: string;
74
74
  noItemsInPage?: string;
75
75
  backToFirstPage?: string;
76
+ toolbarRightLabel?: string;
77
+ toolbarLeftLabel?: string;
76
78
  };
77
79
  export type SearchResultsAdditionalPanels = {
78
80
  additionalPanels?: SearchResultsAdditionalPanelOptions[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/vue",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
4
4
  "main": "dist/lupaSearch.mjs",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/src/index.d.ts",