@getlupa/client 1.14.0 → 1.14.4

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.
@@ -8561,11 +8561,11 @@ var __async = (__this, __arguments, generator) => {
8561
8561
  const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
8562
8562
  const _hoisted_2$S = { class: "lupa-input-clear" };
8563
8563
  const _hoisted_3$B = { id: "lupa-search-box-input" };
8564
- const _hoisted_4$t = ["value"];
8565
- const _hoisted_5$j = ["aria-label", "placeholder"];
8566
- const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8564
+ const _hoisted_4$s = ["value"];
8565
+ const _hoisted_5$k = ["aria-label", "placeholder"];
8566
+ const _hoisted_6$a = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
8567
8567
  const _hoisted_7$7 = [
8568
- _hoisted_6$9
8568
+ _hoisted_6$a
8569
8569
  ];
8570
8570
  const _hoisted_8$3 = {
8571
8571
  key: 0,
@@ -8668,7 +8668,7 @@ var __async = (__this, __arguments, generator) => {
8668
8668
  "aria-hidden": "true",
8669
8669
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
8670
8670
  disabled: ""
8671
- }, null, 8, _hoisted_4$t),
8671
+ }, null, 8, _hoisted_4$s),
8672
8672
  withDirectives(createBaseVNode("input", mergeProps({
8673
8673
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
8674
8674
  }, inputAttributes.value, {
@@ -8682,7 +8682,7 @@ var __async = (__this, __arguments, generator) => {
8682
8682
  placeholder: labels.value.placeholder,
8683
8683
  onInput: handleInput,
8684
8684
  onFocus: handleFocus
8685
- }), null, 16, _hoisted_5$j), [
8685
+ }), null, 16, _hoisted_5$k), [
8686
8686
  [vModelText, inputValue.value]
8687
8687
  ]),
8688
8688
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -8841,6 +8841,34 @@ var __async = (__this, __arguments, generator) => {
8841
8841
  };
8842
8842
  }
8843
8843
  });
8844
+ const generateGridTemplate = (elements) => {
8845
+ const indexedElements = elements.map((el, index) => __spreadProps2(__spreadValues2({}, el), { index }));
8846
+ if (!indexedElements.length || !indexedElements.every((el) => el.gridArea === "left" || el.gridArea === "right")) {
8847
+ return void 0;
8848
+ }
8849
+ let leftElements = indexedElements.filter((el) => el.gridArea === "left");
8850
+ let rightElements = indexedElements.filter((el) => el.gridArea === "right");
8851
+ if (!leftElements.length && !rightElements.length) {
8852
+ return "";
8853
+ } else if (!leftElements.length) {
8854
+ leftElements = rightElements;
8855
+ } else if (!rightElements.length) {
8856
+ rightElements = leftElements;
8857
+ }
8858
+ const totalRows = Math.max(leftElements.length, rightElements.length);
8859
+ const gridTemplate = [];
8860
+ for (let row = 0; row < totalRows; row++) {
8861
+ const leftIndex = row < leftElements.length ? row : leftElements.length - 1;
8862
+ const rightIndex = row < rightElements.length ? row : rightElements.length - 1;
8863
+ const leftElement = leftElements[leftIndex];
8864
+ const rightElement = rightElements[rightIndex];
8865
+ const leftColumn = `${leftElement.gridArea}${leftElement.index}`;
8866
+ const rightColumn = `${rightElement.gridArea}${rightElement.index}`;
8867
+ const gridRow = `${leftColumn} ${rightColumn}`;
8868
+ gridTemplate.push(`"${gridRow}"`);
8869
+ }
8870
+ return gridTemplate.join(" ");
8871
+ };
8844
8872
  const _hoisted_1$19 = ["innerHTML"];
8845
8873
  const _hoisted_2$Q = {
8846
8874
  key: 1,
@@ -8852,11 +8880,11 @@ var __async = (__this, __arguments, generator) => {
8852
8880
  class: "lupa-suggestion-facet",
8853
8881
  "data-cy": "lupa-suggestion-facet"
8854
8882
  };
8855
- const _hoisted_4$s = {
8883
+ const _hoisted_4$r = {
8856
8884
  class: "lupa-suggestion-facet-label",
8857
8885
  "data-cy": "lupa-suggestion-facet-label"
8858
8886
  };
8859
- const _hoisted_5$i = {
8887
+ const _hoisted_5$j = {
8860
8888
  class: "lupa-suggestion-facet-value",
8861
8889
  "data-cy": "lupa-suggestion-facet-value"
8862
8890
  };
@@ -8898,8 +8926,8 @@ var __async = (__this, __arguments, generator) => {
8898
8926
  innerHTML: _ctx.suggestion.displayHighlight
8899
8927
  }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(_ctx.suggestion.display), 1)),
8900
8928
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
8901
- createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
8902
- createBaseVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
8929
+ createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8930
+ createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
8903
8931
  ])) : createCommentVNode("", true)
8904
8932
  ]);
8905
8933
  };
@@ -9039,6 +9067,7 @@ var __async = (__this, __arguments, generator) => {
9039
9067
  });
9040
9068
  };
9041
9069
  const getSuggestionsDebounced = debounce$1(getSuggestions, props.debounce);
9070
+ watch(() => props.panel.limit, getSuggestionsDebounced);
9042
9071
  return (_ctx, _cache) => {
9043
9072
  return openBlock(), createBlock(_sfc_main$1h, {
9044
9073
  items: searchResult.value,
@@ -18159,6 +18188,25 @@ and ensure you are accounting for this risk.
18159
18188
  var _a;
18160
18189
  return Boolean((_a = hoverImages.value) == null ? void 0 : _a.length);
18161
18190
  });
18191
+ const widthOverride = computed(() => {
18192
+ var _a, _b;
18193
+ return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.width) != null ? _b : void 0;
18194
+ });
18195
+ const heightOverride = computed(() => {
18196
+ var _a, _b;
18197
+ return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.height) != null ? _b : void 0;
18198
+ });
18199
+ const objectFitOverride = computed(() => {
18200
+ var _a, _b;
18201
+ return (_b = (_a = props.options.dimensions) == null ? void 0 : _a.objectFit) != null ? _b : void 0;
18202
+ });
18203
+ const styleOverride = computed(() => {
18204
+ return {
18205
+ width: widthOverride.value ? `${widthOverride.value}px` : void 0,
18206
+ height: heightOverride.value ? `${heightOverride.value}px` : void 0,
18207
+ objectFit: objectFitOverride.value ? objectFitOverride.value : void 0
18208
+ };
18209
+ });
18162
18210
  const replaceWithPlaceholder = (e2) => {
18163
18211
  replaceImageWithPlaceholder(e2, placeholder.value);
18164
18212
  };
@@ -18223,6 +18271,7 @@ and ensure you are accounting for this risk.
18223
18271
  return (_ctx, _cache) => {
18224
18272
  return openBlock(), createElementBlock("div", {
18225
18273
  class: normalizeClass({ [_ctx.wrapperClass]: Boolean(_ctx.wrapperClass), "lupa-images-hover": isHover.value }),
18274
+ style: normalizeStyle(styleOverride.value),
18226
18275
  onMouseenter: handleMouseEnter,
18227
18276
  onMouseleave: handleMouseLeave
18228
18277
  }, [
@@ -18233,6 +18282,7 @@ and ensure you are accounting for this risk.
18233
18282
  default: withCtx(() => [
18234
18283
  (openBlock(), createElementBlock("img", mergeProps({
18235
18284
  class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
18285
+ style: styleOverride.value,
18236
18286
  src: finalUrl.value
18237
18287
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, {
18238
18288
  onError: replaceWithPlaceholder,
@@ -18243,9 +18293,10 @@ and ensure you are accounting for this risk.
18243
18293
  })) : (openBlock(), createElementBlock("img", mergeProps({
18244
18294
  key: 1,
18245
18295
  class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
18296
+ style: styleOverride.value,
18246
18297
  src: finalMainImageUrl.value
18247
18298
  }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$P))
18248
- ], 34);
18299
+ ], 38);
18249
18300
  };
18250
18301
  }
18251
18302
  });
@@ -18387,8 +18438,8 @@ and ensure you are accounting for this risk.
18387
18438
  const _hoisted_1$13 = ["innerHTML"];
18388
18439
  const _hoisted_2$M = { key: 0 };
18389
18440
  const _hoisted_3$z = { key: 1 };
18390
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
18391
- const _hoisted_5$h = { class: "lupa-search-box-custom-text" };
18441
+ const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
18442
+ const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
18392
18443
  const _sfc_main$19 = /* @__PURE__ */ defineComponent({
18393
18444
  __name: "SearchBoxProductCustom",
18394
18445
  props: {
@@ -18420,8 +18471,8 @@ and ensure you are accounting for this risk.
18420
18471
  class: [className.value, "lupa-search-box-product-custom"]
18421
18472
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
18422
18473
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$M, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
18423
- createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
18424
- createBaseVNode("div", _hoisted_5$h, toDisplayString(text.value), 1)
18474
+ createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
18475
+ createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
18425
18476
  ]))
18426
18477
  ], 16));
18427
18478
  };
@@ -18827,7 +18878,7 @@ and ensure you are accounting for this risk.
18827
18878
  const _hoisted_1$$ = { class: "lupa-badge-title" };
18828
18879
  const _hoisted_2$K = ["src"];
18829
18880
  const _hoisted_3$x = { key: 1 };
18830
- const _hoisted_4$q = {
18881
+ const _hoisted_4$p = {
18831
18882
  key: 0,
18832
18883
  class: "lupa-badge-full-text"
18833
18884
  };
@@ -18871,7 +18922,7 @@ and ensure you are accounting for this risk.
18871
18922
  }, null, 8, _hoisted_2$K)) : createCommentVNode("", true),
18872
18923
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$x, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
18873
18924
  ]),
18874
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18925
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
18875
18926
  ], 6);
18876
18927
  };
18877
18928
  }
@@ -19095,9 +19146,8 @@ and ensure you are accounting for this risk.
19095
19146
  }
19096
19147
  }));
19097
19148
  const _hoisted_1$V = ["href"];
19098
- const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
19099
- const _hoisted_3$w = { class: "lupa-search-box-product-details-section" };
19100
- const _hoisted_4$p = {
19149
+ const _hoisted_2$I = { class: "lupa-search-box-product-details-section" };
19150
+ const _hoisted_3$w = {
19101
19151
  key: 0,
19102
19152
  class: "lupa-search-box-product-add-to-cart-section"
19103
19153
  };
@@ -19125,6 +19175,25 @@ and ensure you are accounting for this risk.
19125
19175
  var _a, _b;
19126
19176
  return (_b = (_a = props.panelOptions.elements) == null ? void 0 : _a.filter((e2) => e2.type === DocumentElementType.IMAGE)) != null ? _b : [];
19127
19177
  });
19178
+ const mainImageElement = computed(() => {
19179
+ return imageElements.value[0];
19180
+ });
19181
+ const widthOverride = computed(() => {
19182
+ var _a, _b, _c;
19183
+ return (_c = (_b = (_a = mainImageElement.value) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.width) != null ? _c : void 0;
19184
+ });
19185
+ const heightOverride = computed(() => {
19186
+ var _a, _b, _c;
19187
+ return (_c = (_b = (_a = mainImageElement.value) == null ? void 0 : _a.dimensions) == null ? void 0 : _b.height) != null ? _c : void 0;
19188
+ });
19189
+ const imageStyleOverride = computed(() => {
19190
+ var _a;
19191
+ return ((_a = mainImageElement.value) == null ? void 0 : _a.dimensions) ? {
19192
+ width: widthOverride.value ? `${widthOverride.value}px` : void 0,
19193
+ height: heightOverride.value ? `${heightOverride.value}px` : void 0,
19194
+ minWidth: widthOverride.value ? `${widthOverride.value + 10}px` : void 0
19195
+ } : {};
19196
+ });
19128
19197
  const detailElements = computed(() => {
19129
19198
  var _a, _b;
19130
19199
  return (_b = (_a = props.panelOptions.elements) == null ? void 0 : _a.filter(
@@ -19163,7 +19232,10 @@ and ensure you are accounting for this risk.
19163
19232
  "data-cy": "lupa-search-box-product",
19164
19233
  onClick: handleClick
19165
19234
  }), [
19166
- createBaseVNode("div", _hoisted_2$I, [
19235
+ createBaseVNode("div", {
19236
+ class: "lupa-search-box-product-image-section",
19237
+ style: normalizeStyle(imageStyleOverride.value)
19238
+ }, [
19167
19239
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
19168
19240
  return openBlock(), createBlock(_sfc_main$16, {
19169
19241
  class: "lupa-search-box-product-element",
@@ -19174,8 +19246,8 @@ and ensure you are accounting for this risk.
19174
19246
  link: link.value
19175
19247
  }, null, 8, ["item", "element", "labels", "link"]);
19176
19248
  }), 128))
19177
- ]),
19178
- createBaseVNode("div", _hoisted_3$w, [
19249
+ ], 4),
19250
+ createBaseVNode("div", _hoisted_2$I, [
19179
19251
  (openBlock(true), createElementBlock(Fragment, null, renderList(detailElements.value, (element) => {
19180
19252
  var _a;
19181
19253
  return openBlock(), createBlock(_sfc_main$16, {
@@ -19199,7 +19271,7 @@ and ensure you are accounting for this risk.
19199
19271
  ]), 1032, ["item", "element", "labels", "link"]);
19200
19272
  }), 128))
19201
19273
  ]),
19202
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
19274
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
19203
19275
  createVNode(_sfc_main$16, {
19204
19276
  class: "lupa-search-box-product-element",
19205
19277
  item: _ctx.item,
@@ -19457,6 +19529,7 @@ and ensure you are accounting for this risk.
19457
19529
  });
19458
19530
  };
19459
19531
  const getItemsDebounced = debounce$1(getItems, props.debounce);
19532
+ watch(() => props.panel.limit, getItemsDebounced);
19460
19533
  return (_ctx, _cache) => {
19461
19534
  var _a, _b;
19462
19535
  return openBlock(), createBlock(_sfc_main$_, {
@@ -19593,7 +19666,7 @@ and ensure you are accounting for this risk.
19593
19666
  key: 1,
19594
19667
  class: "lupa-panel-title"
19595
19668
  };
19596
- const _hoisted_5$g = {
19669
+ const _hoisted_5$h = {
19597
19670
  key: 1,
19598
19671
  id: "lupa-search-box-panel"
19599
19672
  };
@@ -19645,6 +19718,13 @@ and ensure you are accounting for this risk.
19645
19718
  const displayPanels = computed(
19646
19719
  () => props.isSearchContainer ? panels.value.filter((p2) => p2.type === SearchBoxPanelType.SUGGESTION) : panels.value
19647
19720
  );
19721
+ const gridTemplate = computed(() => generateGridTemplate(panels.value));
19722
+ const styleOverrides = computed(() => {
19723
+ return {
19724
+ display: expandOnSinglePanel.value ? "block" : "grid",
19725
+ gridTemplateAreas: gridTemplate.value ? gridTemplate.value : "left right"
19726
+ };
19727
+ });
19648
19728
  const getInput = (panel) => {
19649
19729
  var _a, _b;
19650
19730
  if (panel.type === SearchBoxPanelType.SUGGESTION || !panel.searchBySuggestion) {
@@ -19671,6 +19751,9 @@ and ensure you are accounting for this risk.
19671
19751
  searchBoxStore.resetHighlightIndex();
19672
19752
  });
19673
19753
  const handleNavigation = (e2) => {
19754
+ if (!props.focused) {
19755
+ return;
19756
+ }
19674
19757
  switch (e2.key) {
19675
19758
  case "ArrowDown":
19676
19759
  e2.preventDefault();
@@ -19758,7 +19841,7 @@ and ensure you are accounting for this risk.
19758
19841
  }, toDisplayString(labels.value.closePanel), 1)) : createCommentVNode("", true),
19759
19842
  createBaseVNode("div", {
19760
19843
  class: "lupa-main-panel",
19761
- style: normalizeStyle(expandOnSinglePanel.value ? { display: "block" } : {}),
19844
+ style: normalizeStyle(styleOverrides.value),
19762
19845
  "data-cy": "lupa-main-panel"
19763
19846
  }, [
19764
19847
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayPanels.value, (panel, index) => {
@@ -19769,6 +19852,7 @@ and ensure you are accounting for this risk.
19769
19852
  "lupa-panel-" + panel.type + "-index",
19770
19853
  panel.customClassName ? panel.customClassName : ""
19771
19854
  ]),
19855
+ style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
19772
19856
  "data-cy": "lupa-panel-" + panel.type + "-index"
19773
19857
  }, [
19774
19858
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
@@ -19794,7 +19878,7 @@ and ensure you are accounting for this risk.
19794
19878
  key: "0"
19795
19879
  } : void 0
19796
19880
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
19797
- ], 10, _hoisted_2$G);
19881
+ ], 14, _hoisted_2$G);
19798
19882
  }), 128))
19799
19883
  ], 4),
19800
19884
  !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1j, {
@@ -19807,7 +19891,7 @@ and ensure you are accounting for this risk.
19807
19891
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
19808
19892
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
19809
19893
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
19810
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
19894
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
19811
19895
  createVNode(_sfc_main$1k, {
19812
19896
  options: _ctx.options.history,
19813
19897
  history: history.value,
@@ -19858,6 +19942,7 @@ and ensure you are accounting for this risk.
19858
19942
  const inputValue = ref("");
19859
19943
  const suggestedValue = ref(defaultSuggestedValue);
19860
19944
  const opened = ref(props.isSearchContainer);
19945
+ const focused = ref(false);
19861
19946
  const searchBoxInput = ref(null);
19862
19947
  const { highlightedDocument } = storeToRefs(searchBoxStore);
19863
19948
  const searchValue = computed(() => {
@@ -19916,6 +20001,9 @@ and ensure you are accounting for this risk.
19916
20001
  const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
19917
20002
  const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
19918
20003
  const isOutsideElement = el && !el.contains(e2.target) && !hasLupaClass;
20004
+ if (isOutsideElement && props.options.keepOpen) {
20005
+ focused.value = false;
20006
+ }
19919
20007
  if (!isOutsideElement || props.options.keepOpen) {
19920
20008
  return;
19921
20009
  }
@@ -19924,11 +20012,12 @@ and ensure you are accounting for this risk.
19924
20012
  };
19925
20013
  const close = () => {
19926
20014
  opened.value = false;
20015
+ focused.value = false;
19927
20016
  suggestedValue.value = defaultSuggestedValue;
19928
20017
  };
19929
20018
  const handleKeyDown = (e2) => {
19930
20019
  var _a2, _b;
19931
- if (!opened.value) {
20020
+ if (!focused.value) {
19932
20021
  return;
19933
20022
  }
19934
20023
  switch (e2.key) {
@@ -19948,6 +20037,7 @@ and ensure you are accounting for this risk.
19948
20037
  const handleInput = (value) => {
19949
20038
  var _a2;
19950
20039
  opened.value = true;
20040
+ focused.value = true;
19951
20041
  inputValue.value = (_a2 = value == null ? void 0 : value.replace(/\s+$/, "")) != null ? _a2 : "";
19952
20042
  suggestedValue.value = defaultSuggestedValue;
19953
20043
  searchBoxStore.resetHighlightIndex();
@@ -20075,12 +20165,14 @@ and ensure you are accounting for this risk.
20075
20165
  }
20076
20166
  });
20077
20167
  };
20168
+ watch(() => props.options.debounce, handleCurrentValueSearch);
20078
20169
  const resetValues = () => {
20079
20170
  inputValue.value = "";
20080
20171
  suggestedValue.value = defaultSuggestedValue;
20081
20172
  };
20082
20173
  const handleProductClick = () => {
20083
20174
  opened.value = false;
20175
+ focused.value = false;
20084
20176
  };
20085
20177
  const slotProps = (props2) => {
20086
20178
  return __spreadValues2({}, props2);
@@ -20097,15 +20189,17 @@ and ensure you are accounting for this risk.
20097
20189
  ref_key: "searchBoxInput",
20098
20190
  ref: searchBoxInput,
20099
20191
  onInput: handleInput,
20100
- onFocus: _cache[0] || (_cache[0] = ($event) => opened.value = true),
20192
+ onBlur: _cache[0] || (_cache[0] = ($event) => focused.value = false),
20193
+ onFocus: _cache[1] || (_cache[1] = ($event) => opened.value = true),
20101
20194
  onSearch: handleSearch,
20102
- onClose: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("close"))
20195
+ onClose: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("close"))
20103
20196
  }, null, 8, ["options", "suggestedValue", "can-close", "emit-input-on-focus"]),
20104
20197
  opened.value || _ctx.isSearchContainer ? (openBlock(), createBlock(_sfc_main$W, {
20105
20198
  key: 0,
20106
20199
  options: panelOptions.value,
20107
20200
  inputValue: inputValue.value,
20108
20201
  isSearchContainer: _ctx.isSearchContainer,
20202
+ focused: focused.value,
20109
20203
  onFetched: handleItemsFetch,
20110
20204
  onItemSelect: handleItemSelect,
20111
20205
  onGoToResults: handleSearch,
@@ -20119,7 +20213,7 @@ and ensure you are accounting for this risk.
20119
20213
  ]),
20120
20214
  key: "0"
20121
20215
  } : void 0
20122
- ]), 1032, ["options", "inputValue", "isSearchContainer"])) : createCommentVNode("", true)
20216
+ ]), 1032, ["options", "inputValue", "isSearchContainer", "focused"])) : createCommentVNode("", true)
20123
20217
  ])
20124
20218
  ]);
20125
20219
  };
@@ -20303,7 +20397,7 @@ and ensure you are accounting for this risk.
20303
20397
  class: "lupa-results-total-count"
20304
20398
  };
20305
20399
  const _hoisted_4$m = { class: "lupa-results-total-count-number" };
20306
- const _hoisted_5$f = ["innerHTML"];
20400
+ const _hoisted_5$g = ["innerHTML"];
20307
20401
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
20308
20402
  __name: "SearchResultsTitle",
20309
20403
  props: {
@@ -20360,7 +20454,7 @@ and ensure you are accounting for this risk.
20360
20454
  key: 2,
20361
20455
  class: "lupa-result-page-description-top",
20362
20456
  innerHTML: descriptionTop.value
20363
- }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
20457
+ }, null, 8, _hoisted_5$g)) : createCommentVNode("", true)
20364
20458
  ]);
20365
20459
  };
20366
20460
  }
@@ -20559,7 +20653,7 @@ and ensure you are accounting for this risk.
20559
20653
  const _hoisted_2$z = { class: "lupa-category-back" };
20560
20654
  const _hoisted_3$q = ["href"];
20561
20655
  const _hoisted_4$k = ["href"];
20562
- const _hoisted_5$e = { class: "lupa-child-category-list" };
20656
+ const _hoisted_5$f = { class: "lupa-child-category-list" };
20563
20657
  const _sfc_main$O = /* @__PURE__ */ defineComponent({
20564
20658
  __name: "CategoryFilter",
20565
20659
  props: {
@@ -20665,7 +20759,7 @@ and ensure you are accounting for this risk.
20665
20759
  onClick: handleNavigationParent
20666
20760
  }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
20667
20761
  ], 2),
20668
- createBaseVNode("div", _hoisted_5$e, [
20762
+ createBaseVNode("div", _hoisted_5$f, [
20669
20763
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
20670
20764
  return openBlock(), createBlock(_sfc_main$P, {
20671
20765
  key: getCategoryKey(child),
@@ -20685,8 +20779,8 @@ and ensure you are accounting for this risk.
20685
20779
  const _hoisted_2$y = ["placeholder"];
20686
20780
  const _hoisted_3$p = { class: "lupa-terms-list" };
20687
20781
  const _hoisted_4$j = ["onClick"];
20688
- const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
20689
- const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
20782
+ const _hoisted_5$e = { class: "lupa-term-checkbox-wrapper" };
20783
+ const _hoisted_6$9 = { class: "lupa-term-checkbox-label" };
20690
20784
  const _hoisted_7$6 = { class: "lupa-term-label" };
20691
20785
  const _hoisted_8$2 = {
20692
20786
  key: 0,
@@ -20783,12 +20877,12 @@ and ensure you are accounting for this risk.
20783
20877
  key: item.title,
20784
20878
  onClick: ($event) => handleFacetClick(item)
20785
20879
  }, [
20786
- createBaseVNode("div", _hoisted_5$d, [
20880
+ createBaseVNode("div", _hoisted_5$e, [
20787
20881
  createBaseVNode("span", {
20788
20882
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
20789
20883
  }, null, 2)
20790
20884
  ]),
20791
- createBaseVNode("div", _hoisted_6$8, [
20885
+ createBaseVNode("div", _hoisted_6$9, [
20792
20886
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
20793
20887
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$2, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
20794
20888
  ])
@@ -21796,8 +21890,8 @@ and ensure you are accounting for this risk.
21796
21890
  key: 0,
21797
21891
  class: "lupa-stats-range-label"
21798
21892
  };
21799
- const _hoisted_5$c = { class: "lupa-stats-from" };
21800
- const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
21893
+ const _hoisted_5$d = { class: "lupa-stats-from" };
21894
+ const _hoisted_6$8 = ["max", "min", "pattern", "aria-label"];
21801
21895
  const _hoisted_7$5 = { key: 0 };
21802
21896
  const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
21803
21897
  const _hoisted_9$1 = {
@@ -21988,7 +22082,7 @@ and ensure you are accounting for this risk.
21988
22082
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$x, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
21989
22083
  createBaseVNode("div", null, [
21990
22084
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
21991
- createBaseVNode("div", _hoisted_5$c, [
22085
+ createBaseVNode("div", _hoisted_5$d, [
21992
22086
  withDirectives(createBaseVNode("input", {
21993
22087
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
21994
22088
  type: "text",
@@ -21997,7 +22091,7 @@ and ensure you are accounting for this risk.
21997
22091
  min: facetMin.value,
21998
22092
  pattern: sliderInputFormat.value,
21999
22093
  "aria-label": ariaLabelFrom.value
22000
- }, null, 8, _hoisted_6$7), [
22094
+ }, null, 8, _hoisted_6$8), [
22001
22095
  [
22002
22096
  vModelText,
22003
22097
  fromValue.value,
@@ -22058,7 +22152,7 @@ and ensure you are accounting for this risk.
22058
22152
  key: 0,
22059
22153
  class: "lupa-term-count"
22060
22154
  };
22061
- const _hoisted_5$b = {
22155
+ const _hoisted_5$c = {
22062
22156
  key: 0,
22063
22157
  class: "lupa-facet-level"
22064
22158
  };
@@ -22118,7 +22212,7 @@ and ensure you are accounting for this risk.
22118
22212
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
22119
22213
  ])
22120
22214
  ]),
22121
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
22215
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
22122
22216
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
22123
22217
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
22124
22218
  key: itemChild.title,
@@ -22628,8 +22722,8 @@ and ensure you are accounting for this risk.
22628
22722
  const _hoisted_2$r = ["onClick"];
22629
22723
  const _hoisted_3$l = { class: "lupa-mobile-sidebar-content" };
22630
22724
  const _hoisted_4$g = { class: "lupa-sidebar-top" };
22631
- const _hoisted_5$a = { class: "lupa-sidebar-title" };
22632
- const _hoisted_6$6 = {
22725
+ const _hoisted_5$b = { class: "lupa-sidebar-title" };
22726
+ const _hoisted_6$7 = {
22633
22727
  key: 0,
22634
22728
  class: "lupa-sidebar-filter-count"
22635
22729
  };
@@ -22672,9 +22766,9 @@ and ensure you are accounting for this risk.
22672
22766
  }, null, 8, _hoisted_2$r),
22673
22767
  createBaseVNode("div", _hoisted_3$l, [
22674
22768
  createBaseVNode("div", _hoisted_4$g, [
22675
- createBaseVNode("div", _hoisted_5$a, [
22769
+ createBaseVNode("div", _hoisted_5$b, [
22676
22770
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
22677
- isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
22771
+ isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
22678
22772
  ]),
22679
22773
  createBaseVNode("div", {
22680
22774
  class: "lupa-filter-toggle-mobile",
@@ -22978,7 +23072,7 @@ and ensure you are accounting for this risk.
22978
23072
  const _hoisted_2$o = { id: "lupa-select" };
22979
23073
  const _hoisted_3$i = { class: "lupa-select-label" };
22980
23074
  const _hoisted_4$d = ["aria-label"];
22981
- const _hoisted_5$9 = ["value"];
23075
+ const _hoisted_5$a = ["value"];
22982
23076
  const _sfc_main$y = /* @__PURE__ */ defineComponent({
22983
23077
  __name: "SearchResultsPageSize",
22984
23078
  props: {
@@ -23022,7 +23116,7 @@ and ensure you are accounting for this risk.
23022
23116
  return openBlock(), createElementBlock("option", {
23023
23117
  key: option,
23024
23118
  value: option
23025
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
23119
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
23026
23120
  }), 128))
23027
23121
  ], 40, _hoisted_4$d)
23028
23122
  ])
@@ -23037,7 +23131,7 @@ and ensure you are accounting for this risk.
23037
23131
  const _hoisted_2$n = { id: "lupa-select" };
23038
23132
  const _hoisted_3$h = { class: "lupa-select-label" };
23039
23133
  const _hoisted_4$c = ["aria-label"];
23040
- const _hoisted_5$8 = ["value"];
23134
+ const _hoisted_5$9 = ["value"];
23041
23135
  const _sfc_main$x = /* @__PURE__ */ defineComponent({
23042
23136
  __name: "SearchResultsSort",
23043
23137
  props: {
@@ -23102,7 +23196,7 @@ and ensure you are accounting for this risk.
23102
23196
  return openBlock(), createElementBlock("option", {
23103
23197
  key: option.key,
23104
23198
  value: option.key
23105
- }, toDisplayString(option.label), 9, _hoisted_5$8);
23199
+ }, toDisplayString(option.label), 9, _hoisted_5$9);
23106
23200
  }), 128))
23107
23201
  ], 40, _hoisted_4$c), [
23108
23202
  [vModelSelect, selectedKey.value]
@@ -23119,8 +23213,8 @@ and ensure you are accounting for this risk.
23119
23213
  };
23120
23214
  const _hoisted_3$g = { key: 2 };
23121
23215
  const _hoisted_4$b = { key: 4 };
23122
- const _hoisted_5$7 = { key: 6 };
23123
- const _hoisted_6$5 = { class: "lupa-toolbar-right" };
23216
+ const _hoisted_5$8 = { key: 6 };
23217
+ const _hoisted_6$6 = { class: "lupa-toolbar-right" };
23124
23218
  const _hoisted_7$3 = {
23125
23219
  key: 0,
23126
23220
  class: "lupa-toolbar-right-title"
@@ -23248,9 +23342,9 @@ and ensure you are accounting for this risk.
23248
23342
  options: paginationOptions.value.pageSelect,
23249
23343
  "last-page-label": paginationOptions.value.labels.showMore,
23250
23344
  "first-page-label": paginationOptions.value.labels.showLess
23251
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
23345
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
23252
23346
  ]),
23253
- createBaseVNode("div", _hoisted_6$5, [
23347
+ createBaseVNode("div", _hoisted_6$6, [
23254
23348
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
23255
23349
  createVNode(_sfc_main$A, {
23256
23350
  label: optionsValue.value.labels.mobileFilterButton,
@@ -23288,13 +23382,15 @@ and ensure you are accounting for this risk.
23288
23382
  };
23289
23383
  }
23290
23384
  });
23291
- const _hoisted_1$r = ["innerHTML"];
23385
+ const _hoisted_1$r = ["title", "innerHTML"];
23292
23386
  const _hoisted_2$l = ["title"];
23293
- const _hoisted_3$f = {
23387
+ const _hoisted_3$f = ["href", "innerHTML"];
23388
+ const _hoisted_4$a = ["title"];
23389
+ const _hoisted_5$7 = {
23294
23390
  key: 0,
23295
23391
  class: "lupa-search-results-product-title-text"
23296
23392
  };
23297
- const _hoisted_4$a = ["href"];
23393
+ const _hoisted_6$5 = ["href"];
23298
23394
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
23299
23395
  __name: "SearchResultsProductTitle",
23300
23396
  props: {
@@ -23326,25 +23422,38 @@ and ensure you are accounting for this risk.
23326
23422
  handleRoutingEvent(props.link, event, hasEventRouting.value);
23327
23423
  };
23328
23424
  return (_ctx, _cache) => {
23329
- return isHtml.value ? (openBlock(), createElementBlock("div", {
23425
+ return isHtml.value && !_ctx.options.link ? (openBlock(), createElementBlock("div", {
23330
23426
  key: 0,
23331
23427
  class: "lupa-search-results-product-title",
23332
23428
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23429
+ title: sanitizedTitle.value,
23333
23430
  innerHTML: sanitizedTitle.value
23334
- }, null, 12, _hoisted_1$r)) : (openBlock(), createElementBlock("div", {
23431
+ }, null, 12, _hoisted_1$r)) : isHtml.value && _ctx.options.link ? (openBlock(), createElementBlock("div", {
23335
23432
  key: 1,
23336
23433
  class: "lupa-search-results-product-title",
23337
23434
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23435
+ title: sanitizedTitle.value
23436
+ }, [
23437
+ createBaseVNode("a", {
23438
+ href: _ctx.link,
23439
+ class: "lupa-search-results-product-title-text lupa-title-link",
23440
+ innerHTML: sanitizedTitle.value,
23441
+ onClick: handleNavigation
23442
+ }, null, 8, _hoisted_3$f)
23443
+ ], 12, _hoisted_2$l)) : (openBlock(), createElementBlock("div", {
23444
+ key: 2,
23445
+ class: "lupa-search-results-product-title",
23446
+ style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
23338
23447
  title: title.value
23339
23448
  }, [
23340
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_3$f, toDisplayString(title.value), 1)) : createCommentVNode("", true),
23449
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
23341
23450
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
23342
23451
  key: 1,
23343
23452
  href: _ctx.link,
23344
23453
  class: "lupa-search-results-product-title-text lupa-title-link",
23345
23454
  onClick: handleNavigation
23346
- }, toDisplayString(title.value), 9, _hoisted_4$a)) : createCommentVNode("", true)
23347
- ], 12, _hoisted_2$l));
23455
+ }, toDisplayString(title.value), 9, _hoisted_6$5)) : createCommentVNode("", true)
23456
+ ], 12, _hoisted_4$a));
23348
23457
  };
23349
23458
  }
23350
23459
  });