@getlupa/client 1.17.11 → 1.17.13

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.
@@ -14298,8 +14298,8 @@ var __async = (__this, __arguments, generator) => {
14298
14298
  const _hoisted_1$1i = { id: "lupa-search-box-input-container" };
14299
14299
  const _hoisted_2$T = { class: "lupa-input-clear" };
14300
14300
  const _hoisted_3$C = { id: "lupa-search-box-input" };
14301
- const _hoisted_4$s = ["value"];
14302
- const _hoisted_5$i = ["aria-label", "placeholder"];
14301
+ const _hoisted_4$u = ["value"];
14302
+ const _hoisted_5$k = ["aria-label", "placeholder"];
14303
14303
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
14304
14304
  const _hoisted_7$7 = [
14305
14305
  _hoisted_6$9
@@ -14405,7 +14405,7 @@ var __async = (__this, __arguments, generator) => {
14405
14405
  "aria-hidden": "true",
14406
14406
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
14407
14407
  disabled: ""
14408
- }, null, 8, _hoisted_4$s),
14408
+ }, null, 8, _hoisted_4$u),
14409
14409
  withDirectives(createBaseVNode("input", mergeProps({
14410
14410
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
14411
14411
  }, inputAttributes.value, {
@@ -14419,7 +14419,7 @@ var __async = (__this, __arguments, generator) => {
14419
14419
  placeholder: labels.value.placeholder,
14420
14420
  onInput: handleInput,
14421
14421
  onFocus: handleFocus
14422
- }), null, 16, _hoisted_5$i), [
14422
+ }), null, 16, _hoisted_5$k), [
14423
14423
  [vModelText, inputValue.value]
14424
14424
  ]),
14425
14425
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -14631,11 +14631,11 @@ var __async = (__this, __arguments, generator) => {
14631
14631
  class: "lupa-suggestion-facet",
14632
14632
  "data-cy": "lupa-suggestion-facet"
14633
14633
  };
14634
- const _hoisted_4$r = {
14634
+ const _hoisted_4$t = {
14635
14635
  class: "lupa-suggestion-facet-label",
14636
14636
  "data-cy": "lupa-suggestion-facet-label"
14637
14637
  };
14638
- const _hoisted_5$h = {
14638
+ const _hoisted_5$j = {
14639
14639
  class: "lupa-suggestion-facet-value",
14640
14640
  "data-cy": "lupa-suggestion-facet-value"
14641
14641
  };
@@ -14677,8 +14677,8 @@ var __async = (__this, __arguments, generator) => {
14677
14677
  innerHTML: _ctx.suggestion.displayHighlight
14678
14678
  }, null, 8, _hoisted_1$1e)) : (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(_ctx.suggestion.display), 1)),
14679
14679
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$B, [
14680
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
14681
- createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
14680
+ createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
14681
+ createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
14682
14682
  ])) : createCommentVNode("", true)
14683
14683
  ]);
14684
14684
  };
@@ -24171,8 +24171,8 @@ and ensure you are accounting for this risk.
24171
24171
  const _hoisted_1$18 = ["innerHTML"];
24172
24172
  const _hoisted_2$N = { key: 0 };
24173
24173
  const _hoisted_3$A = { key: 1 };
24174
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
24175
- const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
24174
+ const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
24175
+ const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
24176
24176
  const _sfc_main$1h = /* @__PURE__ */ defineComponent({
24177
24177
  __name: "SearchBoxProductCustom",
24178
24178
  props: {
@@ -24204,8 +24204,8 @@ and ensure you are accounting for this risk.
24204
24204
  class: [className.value, "lupa-search-box-product-custom"]
24205
24205
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
24206
24206
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$A, [
24207
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
24208
- createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
24207
+ createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
24208
+ createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
24209
24209
  ]))
24210
24210
  ], 16));
24211
24211
  };
@@ -24298,13 +24298,11 @@ and ensure you are accounting for this risk.
24298
24298
  const relatedCategoryChildren = ref([]);
24299
24299
  const lastRequestId = ref("");
24300
24300
  const searchRequestResults = ref({});
24301
+ const lastResultsSource = ref(void 0);
24301
24302
  const optionsStore = useOptionsStore();
24302
24303
  const paramsStore = useParamsStore();
24303
24304
  const screenStore = useScreenStore();
24304
24305
  const { searchResultOptions } = storeToRefs(optionsStore);
24305
- computed(
24306
- () => loading.value || loadingFacets.value || loadingRefiners.value
24307
- );
24308
24306
  const facets2 = computed(() => searchResult.value.facets);
24309
24307
  const filters = computed(() => searchResult.value.filters);
24310
24308
  const currentQueryText = computed(() => searchResult.value.searchText);
@@ -24401,13 +24399,14 @@ and ensure you are accounting for this risk.
24401
24399
  });
24402
24400
  searchResult.value = updatedResult;
24403
24401
  });
24404
- const saveRequestResult = (requestId, result2) => {
24402
+ const saveRequestResult = (requestId, result2, source = "items") => {
24405
24403
  var _a;
24406
24404
  const existingResult = (_a = searchRequestResults.value[requestId]) != null ? _a : {};
24407
24405
  const combinedResult = __spreadValues2(__spreadValues2({}, existingResult), result2);
24408
24406
  searchRequestResults.value = __spreadProps2(__spreadValues2({}, searchRequestResults.value), {
24409
24407
  [requestId]: combinedResult
24410
24408
  });
24409
+ lastResultsSource.value = source;
24411
24410
  searchResult.value = combinedResult;
24412
24411
  };
24413
24412
  const setLastRequestId = (requestId) => {
@@ -24433,14 +24432,13 @@ and ensure you are accounting for this risk.
24433
24432
  } else {
24434
24433
  saveRequestResult(requestId, newSearchResult);
24435
24434
  }
24436
- saveRequestResult(requestId, newSearchResult);
24437
24435
  return { searchResult: newSearchResult };
24438
24436
  };
24439
- const addPartial = (requestId, newSearchResult) => {
24437
+ const addPartial = (requestId, newSearchResult, source) => {
24440
24438
  if (lastRequestId.value !== requestId || !newSearchResult) {
24441
24439
  return;
24442
24440
  }
24443
- saveRequestResult(requestId, newSearchResult);
24441
+ saveRequestResult(requestId, newSearchResult, source);
24444
24442
  return { searchResult: searchResult.value };
24445
24443
  };
24446
24444
  const setColumnCount = ({ width, grid }) => {
@@ -24507,6 +24505,7 @@ and ensure you are accounting for this risk.
24507
24505
  hideFiltersOnExactMatchForKeys,
24508
24506
  relatedCategoryChildren,
24509
24507
  searchRequestResults,
24508
+ lastResultsSource,
24510
24509
  setSidebarState,
24511
24510
  queryFacet,
24512
24511
  setLastRequestId,
@@ -24523,14 +24522,17 @@ and ensure you are accounting for this risk.
24523
24522
  });
24524
24523
  const _hoisted_1$16 = { class: "lupa-search-box-add-to-cart-wrapper" };
24525
24524
  const _hoisted_2$M = { class: "lupa-search-box-product-addtocart" };
24526
- const _hoisted_3$z = ["onClick", "disabled"];
24525
+ const _hoisted_3$z = ["disabled"];
24526
+ const _hoisted_4$r = ["href"];
24527
+ const _hoisted_5$h = ["onClick", "disabled"];
24527
24528
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24528
24529
  __name: "SearchBoxProductAddToCart",
24529
24530
  props: {
24530
24531
  item: {},
24531
24532
  options: {},
24532
24533
  inStock: { type: Boolean },
24533
- dynamicAttributes: {}
24534
+ dynamicAttributes: {},
24535
+ link: {}
24534
24536
  },
24535
24537
  emits: ["productEvent"],
24536
24538
  setup(__props, { emit: emit2 }) {
@@ -24557,16 +24559,27 @@ and ensure you are accounting for this risk.
24557
24559
  emit2("productEvent", { type: "addToCart" });
24558
24560
  loading.value = false;
24559
24561
  });
24562
+ const hasLink = computed(() => {
24563
+ return Boolean(props.link && props.options.link);
24564
+ });
24560
24565
  return (_ctx, _cache) => {
24561
24566
  return openBlock(), createElementBlock("div", _hoisted_1$16, [
24562
24567
  createBaseVNode("div", _hoisted_2$M, [
24563
- createBaseVNode("button", mergeProps({
24568
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
24569
+ key: 0,
24570
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24571
+ "data-cy": "lupa-add-to-cart",
24572
+ disabled: !inStockValue.value || loading.value
24573
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
24574
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
24575
+ ], 16, _hoisted_3$z)) : (openBlock(), createElementBlock("button", mergeProps({
24576
+ key: 1,
24564
24577
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
24565
24578
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24566
24579
  "data-cy": "lupa-add-to-cart",
24567
24580
  type: "button",
24568
24581
  disabled: !inStockValue.value || loading.value
24569
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_3$z)
24582
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
24570
24583
  ])
24571
24584
  ]);
24572
24585
  };
@@ -24594,7 +24607,8 @@ and ensure you are accounting for this risk.
24594
24607
  item: {},
24595
24608
  element: {},
24596
24609
  labels: {},
24597
- isInStock: { type: Boolean }
24610
+ isInStock: { type: Boolean },
24611
+ link: {}
24598
24612
  },
24599
24613
  setup(__props) {
24600
24614
  const props = __props;
@@ -24656,17 +24670,19 @@ and ensure you are accounting for this risk.
24656
24670
  labels: _ctx.labels,
24657
24671
  class: { "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) },
24658
24672
  inStock: _ctx.isInStock,
24659
- "dynamic-attributes": dynamicAttributes.value
24660
- }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes"])) : createCommentVNode("", true)
24673
+ "dynamic-attributes": dynamicAttributes.value,
24674
+ link: _ctx.link
24675
+ }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
24661
24676
  ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$15, [
24662
24677
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
24663
24678
  key: 0,
24664
24679
  item: enhancedItem.value,
24665
24680
  options: _ctx.element,
24666
24681
  labels: _ctx.labels,
24682
+ link: _ctx.link,
24667
24683
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_b = _ctx.item) == null ? void 0 : _b.id) }),
24668
24684
  inStock: _ctx.isInStock
24669
- }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true),
24685
+ }, null, 8, ["item", "options", "labels", "link", "class", "inStock"])) : createCommentVNode("", true),
24670
24686
  renderSlot(_ctx.$slots, "badges")
24671
24687
  ]));
24672
24688
  };
@@ -24675,7 +24691,7 @@ and ensure you are accounting for this risk.
24675
24691
  const _hoisted_1$14 = { class: "lupa-badge-title" };
24676
24692
  const _hoisted_2$L = ["src"];
24677
24693
  const _hoisted_3$y = { key: 1 };
24678
- const _hoisted_4$p = {
24694
+ const _hoisted_4$q = {
24679
24695
  key: 0,
24680
24696
  class: "lupa-badge-full-text"
24681
24697
  };
@@ -24719,7 +24735,7 @@ and ensure you are accounting for this risk.
24719
24735
  }, null, 8, _hoisted_2$L)) : createCommentVNode("", true),
24720
24736
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$y, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
24721
24737
  ]),
24722
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24738
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24723
24739
  ], 6);
24724
24740
  };
24725
24741
  }
@@ -25634,11 +25650,11 @@ and ensure you are accounting for this risk.
25634
25650
  key: 0,
25635
25651
  class: "lupa-panel-title lupa-panel-title-top-results"
25636
25652
  };
25637
- const _hoisted_4$o = {
25653
+ const _hoisted_4$p = {
25638
25654
  key: 1,
25639
25655
  class: "lupa-panel-title"
25640
25656
  };
25641
- const _hoisted_5$f = {
25657
+ const _hoisted_5$g = {
25642
25658
  key: 1,
25643
25659
  id: "lupa-search-box-panel"
25644
25660
  };
@@ -25827,7 +25843,7 @@ and ensure you are accounting for this risk.
25827
25843
  "data-cy": "lupa-panel-" + panel.type + "-index"
25828
25844
  }, [
25829
25845
  ((_a = panel.labels) == null ? void 0 : _a.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
25830
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
25846
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
25831
25847
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
25832
25848
  key: 2,
25833
25849
  panel,
@@ -25862,7 +25878,7 @@ and ensure you are accounting for this risk.
25862
25878
  options: _ctx.options,
25863
25879
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
25864
25880
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
25865
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
25881
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
25866
25882
  createVNode(_sfc_main$1s, {
25867
25883
  options: _ctx.options.history,
25868
25884
  history: history.value,
@@ -26325,7 +26341,7 @@ and ensure you are accounting for this risk.
26325
26341
  key: 1,
26326
26342
  "data-cy": "did-you-mean-label"
26327
26343
  };
26328
- const _hoisted_4$n = { key: 1 };
26344
+ const _hoisted_4$o = { key: 1 };
26329
26345
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26330
26346
  __name: "SearchResultsDidYouMean",
26331
26347
  props: {
@@ -26376,7 +26392,7 @@ and ensure you are accounting for this risk.
26376
26392
  class: "lupa-did-you-mean lupa-highlighted-search-text",
26377
26393
  "data-cy": "did-you-mean-value",
26378
26394
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
26379
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
26395
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
26380
26396
  ]);
26381
26397
  }), 128))
26382
26398
  ])) : createCommentVNode("", true)
@@ -26426,8 +26442,8 @@ and ensure you are accounting for this risk.
26426
26442
  key: 1,
26427
26443
  class: "lupa-results-total-count"
26428
26444
  };
26429
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
26430
- const _hoisted_5$e = ["innerHTML"];
26445
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
26446
+ const _hoisted_5$f = ["innerHTML"];
26431
26447
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26432
26448
  __name: "SearchResultsTitle",
26433
26449
  props: {
@@ -26476,7 +26492,7 @@ and ensure you are accounting for this risk.
26476
26492
  queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
26477
26493
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, [
26478
26494
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
26479
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
26495
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
26480
26496
  createTextVNode(")")
26481
26497
  ])) : createCommentVNode("", true)
26482
26498
  ])) : createCommentVNode("", true),
@@ -26488,7 +26504,7 @@ and ensure you are accounting for this risk.
26488
26504
  key: 2,
26489
26505
  class: "lupa-result-page-description-top",
26490
26506
  innerHTML: descriptionTop.value
26491
- }, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
26507
+ }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
26492
26508
  ]);
26493
26509
  };
26494
26510
  }
@@ -26538,7 +26554,7 @@ and ensure you are accounting for this risk.
26538
26554
  key: 0,
26539
26555
  class: "filter-values"
26540
26556
  };
26541
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
26557
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
26542
26558
  const _sfc_main$X = /* @__PURE__ */ defineComponent({
26543
26559
  __name: "CurrentFilters",
26544
26560
  props: {
@@ -26622,7 +26638,7 @@ and ensure you are accounting for this risk.
26622
26638
  }, null, 2)) : createCommentVNode("", true)
26623
26639
  ]),
26624
26640
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
26625
- createBaseVNode("div", _hoisted_4$l, [
26641
+ createBaseVNode("div", _hoisted_4$m, [
26626
26642
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
26627
26643
  return openBlock(), createBlock(_sfc_main$Y, {
26628
26644
  key: filter2.key + "_" + filter2.value,
@@ -26690,8 +26706,8 @@ and ensure you are accounting for this risk.
26690
26706
  };
26691
26707
  const _hoisted_2$B = { class: "lupa-category-back" };
26692
26708
  const _hoisted_3$s = ["href"];
26693
- const _hoisted_4$k = ["href"];
26694
- const _hoisted_5$d = { class: "lupa-child-category-list" };
26709
+ const _hoisted_4$l = ["href"];
26710
+ const _hoisted_5$e = { class: "lupa-child-category-list" };
26695
26711
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
26696
26712
  __name: "CategoryFilter",
26697
26713
  props: {
@@ -26797,9 +26813,9 @@ and ensure you are accounting for this risk.
26797
26813
  href: parentUrlLink.value,
26798
26814
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
26799
26815
  onClick: handleNavigationParent
26800
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
26816
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
26801
26817
  ], 2),
26802
- createBaseVNode("div", _hoisted_5$d, [
26818
+ createBaseVNode("div", _hoisted_5$e, [
26803
26819
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
26804
26820
  return openBlock(), createBlock(_sfc_main$W, {
26805
26821
  key: getCategoryKey(child),
@@ -26818,8 +26834,8 @@ and ensure you are accounting for this risk.
26818
26834
  };
26819
26835
  const _hoisted_2$A = ["placeholder"];
26820
26836
  const _hoisted_3$r = { class: "lupa-terms-list" };
26821
- const _hoisted_4$j = ["onClick"];
26822
- const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
26837
+ const _hoisted_4$k = ["onClick"];
26838
+ const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
26823
26839
  const _hoisted_6$8 = { class: "lupa-term-label" };
26824
26840
  const _hoisted_7$6 = {
26825
26841
  key: 0,
@@ -26934,7 +26950,7 @@ and ensure you are accounting for this risk.
26934
26950
  key: item.title,
26935
26951
  onClick: ($event) => handleFacetClick(item)
26936
26952
  }, [
26937
- createBaseVNode("div", _hoisted_5$c, [
26953
+ createBaseVNode("div", _hoisted_5$d, [
26938
26954
  createBaseVNode("span", {
26939
26955
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
26940
26956
  }, null, 2)
@@ -26945,7 +26961,7 @@ and ensure you are accounting for this risk.
26945
26961
  createBaseVNode("span", _hoisted_6$8, toDisplayString(getItemLabel(item)), 1),
26946
26962
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$6, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
26947
26963
  ], 2)
26948
- ], 10, _hoisted_4$j);
26964
+ ], 10, _hoisted_4$k);
26949
26965
  }), 128))
26950
26966
  ]),
26951
26967
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -27945,11 +27961,11 @@ and ensure you are accounting for this risk.
27945
27961
  key: 1,
27946
27962
  class: "lupa-stats-facet-summary-input"
27947
27963
  };
27948
- const _hoisted_4$i = {
27964
+ const _hoisted_4$j = {
27949
27965
  key: 0,
27950
27966
  class: "lupa-stats-range-label"
27951
27967
  };
27952
- const _hoisted_5$b = { class: "lupa-stats-from" };
27968
+ const _hoisted_5$c = { class: "lupa-stats-from" };
27953
27969
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
27954
27970
  const _hoisted_7$5 = { key: 0 };
27955
27971
  const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
@@ -28148,8 +28164,8 @@ and ensure you are accounting for this risk.
28148
28164
  return openBlock(), createElementBlock("div", _hoisted_1$N, [
28149
28165
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
28150
28166
  createBaseVNode("div", null, [
28151
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28152
- createBaseVNode("div", _hoisted_5$b, [
28167
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28168
+ createBaseVNode("div", _hoisted_5$c, [
28153
28169
  withDirectives(createBaseVNode("input", {
28154
28170
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
28155
28171
  type: "text",
@@ -28218,7 +28234,7 @@ and ensure you are accounting for this risk.
28218
28234
  key: 0,
28219
28235
  class: "lupa-term-count"
28220
28236
  };
28221
- const _hoisted_4$h = {
28237
+ const _hoisted_4$i = {
28222
28238
  key: 0,
28223
28239
  class: "lupa-facet-level"
28224
28240
  };
@@ -28287,7 +28303,7 @@ and ensure you are accounting for this risk.
28287
28303
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$p, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
28288
28304
  ], 2)
28289
28305
  ]),
28290
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
28306
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
28291
28307
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
28292
28308
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
28293
28309
  key: itemChild.title,
@@ -28820,8 +28836,8 @@ and ensure you are accounting for this risk.
28820
28836
  };
28821
28837
  const _hoisted_2$u = ["onClick"];
28822
28838
  const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
28823
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
28824
- const _hoisted_5$a = { class: "lupa-sidebar-title" };
28839
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
28840
+ const _hoisted_5$b = { class: "lupa-sidebar-title" };
28825
28841
  const _hoisted_6$6 = {
28826
28842
  key: 0,
28827
28843
  class: "lupa-sidebar-filter-count"
@@ -28864,8 +28880,8 @@ and ensure you are accounting for this risk.
28864
28880
  onClick: withModifiers(handleMobileToggle, ["stop"])
28865
28881
  }, null, 8, _hoisted_2$u),
28866
28882
  createBaseVNode("div", _hoisted_3$n, [
28867
- createBaseVNode("div", _hoisted_4$g, [
28868
- createBaseVNode("div", _hoisted_5$a, [
28883
+ createBaseVNode("div", _hoisted_4$h, [
28884
+ createBaseVNode("div", _hoisted_5$b, [
28869
28885
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
28870
28886
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28871
28887
  ]),
@@ -28892,7 +28908,7 @@ and ensure you are accounting for this risk.
28892
28908
  key: 1,
28893
28909
  class: "lupa-search-results-breadcrumb-text"
28894
28910
  };
28895
- const _hoisted_4$f = { key: 2 };
28911
+ const _hoisted_4$g = { key: 2 };
28896
28912
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
28897
28913
  __name: "SearchResultsBreadcrumbs",
28898
28914
  props: {
@@ -28934,7 +28950,7 @@ and ensure you are accounting for this risk.
28934
28950
  return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
28935
28951
  }
28936
28952
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
28937
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28953
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28938
28954
  ]);
28939
28955
  }), 128))
28940
28956
  ]);
@@ -29096,7 +29112,7 @@ and ensure you are accounting for this risk.
29096
29112
  class: "lupa-page-number-separator"
29097
29113
  };
29098
29114
  const _hoisted_3$l = ["onClick"];
29099
- const _hoisted_4$e = {
29115
+ const _hoisted_4$f = {
29100
29116
  key: 0,
29101
29117
  class: "lupa-page-number-separator"
29102
29118
  };
@@ -29202,7 +29218,7 @@ and ensure you are accounting for this risk.
29202
29218
  }, toDisplayString(page), 11, _hoisted_3$l);
29203
29219
  }), 128)),
29204
29220
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
29205
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
29221
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
29206
29222
  createBaseVNode("div", {
29207
29223
  class: "lupa-page-number lupa-page-number-last",
29208
29224
  onClick: _cache[2] || (_cache[2] = () => {
@@ -29227,8 +29243,8 @@ and ensure you are accounting for this risk.
29227
29243
  };
29228
29244
  const _hoisted_2$r = { id: "lupa-select" };
29229
29245
  const _hoisted_3$k = { class: "lupa-select-label" };
29230
- const _hoisted_4$d = ["aria-label"];
29231
- const _hoisted_5$9 = ["value"];
29246
+ const _hoisted_4$e = ["aria-label"];
29247
+ const _hoisted_5$a = ["value"];
29232
29248
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
29233
29249
  __name: "SearchResultsPageSize",
29234
29250
  props: {
@@ -29272,9 +29288,9 @@ and ensure you are accounting for this risk.
29272
29288
  return openBlock(), createElementBlock("option", {
29273
29289
  key: option,
29274
29290
  value: option
29275
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
29291
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
29276
29292
  }), 128))
29277
- ], 40, _hoisted_4$d)
29293
+ ], 40, _hoisted_4$e)
29278
29294
  ])
29279
29295
  ]);
29280
29296
  };
@@ -29286,8 +29302,8 @@ and ensure you are accounting for this risk.
29286
29302
  };
29287
29303
  const _hoisted_2$q = { id: "lupa-select" };
29288
29304
  const _hoisted_3$j = { class: "lupa-select-label" };
29289
- const _hoisted_4$c = ["aria-label"];
29290
- const _hoisted_5$8 = ["value"];
29305
+ const _hoisted_4$d = ["aria-label"];
29306
+ const _hoisted_5$9 = ["value"];
29291
29307
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
29292
29308
  __name: "SearchResultsSort",
29293
29309
  props: {
@@ -29352,9 +29368,9 @@ and ensure you are accounting for this risk.
29352
29368
  return openBlock(), createElementBlock("option", {
29353
29369
  key: option.key,
29354
29370
  value: option.key
29355
- }, toDisplayString(option.label), 9, _hoisted_5$8);
29371
+ }, toDisplayString(option.label), 9, _hoisted_5$9);
29356
29372
  }), 128))
29357
- ], 40, _hoisted_4$c), [
29373
+ ], 40, _hoisted_4$d), [
29358
29374
  [vModelSelect, selectedKey.value]
29359
29375
  ])
29360
29376
  ])
@@ -29368,8 +29384,8 @@ and ensure you are accounting for this risk.
29368
29384
  class: "lupa-toolbar-right-title"
29369
29385
  };
29370
29386
  const _hoisted_3$i = { key: 2 };
29371
- const _hoisted_4$b = { key: 4 };
29372
- const _hoisted_5$7 = { key: 6 };
29387
+ const _hoisted_4$c = { key: 4 };
29388
+ const _hoisted_5$8 = { key: 6 };
29373
29389
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
29374
29390
  const _hoisted_7$3 = {
29375
29391
  key: 0,
@@ -29496,13 +29512,13 @@ and ensure you are accounting for this risk.
29496
29512
  label: searchSummaryLabel.value,
29497
29513
  clearable: unref(hasAnyFilter) && showFilterClear.value,
29498
29514
  onClear: handleClearAll
29499
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
29515
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
29500
29516
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
29501
29517
  key: 5,
29502
29518
  options: paginationOptions.value.pageSelect,
29503
29519
  "last-page-label": paginationOptions.value.labels.showMore,
29504
29520
  "first-page-label": paginationOptions.value.labels.showLess
29505
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
29521
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
29506
29522
  ]),
29507
29523
  createBaseVNode("div", _hoisted_6$5, [
29508
29524
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
@@ -29549,8 +29565,8 @@ and ensure you are accounting for this risk.
29549
29565
  const _hoisted_1$w = ["title", "innerHTML"];
29550
29566
  const _hoisted_2$o = ["title"];
29551
29567
  const _hoisted_3$h = ["href", "innerHTML"];
29552
- const _hoisted_4$a = ["title"];
29553
- const _hoisted_5$6 = {
29568
+ const _hoisted_4$b = ["title"];
29569
+ const _hoisted_5$7 = {
29554
29570
  key: 0,
29555
29571
  class: "lupa-search-results-product-title-text"
29556
29572
  };
@@ -29610,14 +29626,14 @@ and ensure you are accounting for this risk.
29610
29626
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29611
29627
  title: title.value
29612
29628
  }, [
29613
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29629
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29614
29630
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
29615
29631
  key: 1,
29616
29632
  href: _ctx.link,
29617
29633
  class: "lupa-search-results-product-title-text lupa-title-link",
29618
29634
  onClick: handleNavigation
29619
29635
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
29620
- ], 12, _hoisted_4$a));
29636
+ ], 12, _hoisted_4$b));
29621
29637
  };
29622
29638
  }
29623
29639
  });
@@ -29660,8 +29676,8 @@ and ensure you are accounting for this risk.
29660
29676
  const _hoisted_1$u = { id: "lupa-search-results-rating" };
29661
29677
  const _hoisted_2$n = { class: "lupa-ratings" };
29662
29678
  const _hoisted_3$g = { class: "lupa-ratings-base" };
29663
- const _hoisted_4$9 = ["innerHTML"];
29664
- const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
29679
+ const _hoisted_4$a = ["innerHTML"];
29680
+ const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
29665
29681
  const _hoisted_6$3 = ["innerHTML"];
29666
29682
  const _hoisted_7$2 = ["href"];
29667
29683
  const STAR_COUNT = 5;
@@ -29710,10 +29726,10 @@ and ensure you are accounting for this risk.
29710
29726
  key: index,
29711
29727
  innerHTML: star,
29712
29728
  class: "lupa-rating lupa-rating-not-highlighted"
29713
- }, null, 8, _hoisted_4$9);
29729
+ }, null, 8, _hoisted_4$a);
29714
29730
  }), 128))
29715
29731
  ]),
29716
- createBaseVNode("div", _hoisted_5$5, [
29732
+ createBaseVNode("div", _hoisted_5$6, [
29717
29733
  createBaseVNode("div", {
29718
29734
  class: "lupa-ratings-highlighted",
29719
29735
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -29796,14 +29812,17 @@ and ensure you are accounting for this risk.
29796
29812
  });
29797
29813
  const _hoisted_1$s = { class: "lupa-search-results-add-to-cart-wrapper" };
29798
29814
  const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
29799
- const _hoisted_3$f = ["id", "disabled", "onClick"];
29815
+ const _hoisted_3$f = ["disabled"];
29816
+ const _hoisted_4$9 = ["href"];
29817
+ const _hoisted_5$5 = ["id", "disabled", "onClick"];
29800
29818
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
29801
29819
  __name: "SearchResultsProductAddToCart",
29802
29820
  props: {
29803
29821
  item: {},
29804
29822
  options: {},
29805
29823
  inStock: { type: Boolean },
29806
- dynamicAttributes: {}
29824
+ dynamicAttributes: {},
29825
+ link: {}
29807
29826
  },
29808
29827
  emits: ["productEvent"],
29809
29828
  setup(__props, { emit: emit2 }) {
@@ -29835,17 +29854,28 @@ and ensure you are accounting for this risk.
29835
29854
  emit2("productEvent", { type: "addToCart" });
29836
29855
  loading.value = false;
29837
29856
  });
29857
+ const hasLink = computed(() => {
29858
+ return Boolean(props.link && props.options.link);
29859
+ });
29838
29860
  return (_ctx, _cache) => {
29839
29861
  return openBlock(), createElementBlock("div", _hoisted_1$s, [
29840
29862
  createBaseVNode("div", _hoisted_2$m, [
29841
- createBaseVNode("button", mergeProps({
29863
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
29864
+ key: 0,
29865
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29866
+ "data-cy": "lupa-add-to-cart",
29867
+ disabled: !inStockValue.value || loading.value
29868
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
29869
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
29870
+ ], 16, _hoisted_3$f)) : (openBlock(), createElementBlock("button", mergeProps({
29871
+ key: 1,
29842
29872
  id: id.value,
29843
29873
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29844
29874
  "data-cy": "lupa-add-to-cart",
29845
29875
  disabled: !inStockValue.value || loading.value
29846
29876
  }, _ctx.dynamicAttributes, {
29847
29877
  onClick: withModifiers(handleClick, ["stop"])
29848
- }), toDisplayString(label.value), 17, _hoisted_3$f)
29878
+ }), toDisplayString(label.value), 17, _hoisted_5$5))
29849
29879
  ])
29850
29880
  ]);
29851
29881
  };
@@ -30858,7 +30888,7 @@ and ensure you are accounting for this risk.
30858
30888
  const searchResultStore = useSearchResultStore();
30859
30889
  const paramsStore = useParamsStore();
30860
30890
  const optionsStore = useOptionsStore();
30861
- const { searchResult } = storeToRefs(searchResultStore);
30891
+ const { searchResult, lastResultsSource } = storeToRefs(searchResultStore);
30862
30892
  const { searchResultOptions } = storeToRefs(optionsStore);
30863
30893
  const relatedQueries = ref([]);
30864
30894
  const allDisplayItems = ref({});
@@ -30884,8 +30914,12 @@ and ensure you are accounting for this risk.
30884
30914
  return filters;
30885
30915
  });
30886
30916
  watch(searchResult, () => __async2(this, null, function* () {
30917
+ var _a;
30887
30918
  allDisplayItems.value = {};
30888
30919
  querySourceResultMap.value = {};
30920
+ if (((_a = searchResult.value) == null ? void 0 : _a.searchText) === void 0 || lastResultsSource.value !== "items") {
30921
+ return;
30922
+ }
30889
30923
  if (!props.options || !searchResult.value) {
30890
30924
  relatedQueries.value = [];
30891
30925
  }
@@ -31545,7 +31579,7 @@ and ensure you are accounting for this risk.
31545
31579
  if (!res.success) {
31546
31580
  return;
31547
31581
  }
31548
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31582
+ searchResultStore.addPartial(requestId, __spreadValues2({}, res), "facets");
31549
31583
  }).catch((err) => {
31550
31584
  console.error(err);
31551
31585
  }).finally(() => {
@@ -31563,7 +31597,11 @@ and ensure you are accounting for this risk.
31563
31597
  if (!res.success) {
31564
31598
  return;
31565
31599
  }
31566
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31600
+ searchResultStore.addPartial(
31601
+ requestId,
31602
+ __spreadValues2({}, res),
31603
+ "refiners"
31604
+ );
31567
31605
  }).catch((err) => {
31568
31606
  console.error(err);
31569
31607
  }).finally(() => {