@getlupa/vue 0.13.4 → 0.13.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.
@@ -3300,7 +3300,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
3300
3300
  };
3301
3301
  });
3302
3302
  const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
3303
- const _hoisted_2$R = { class: "lupa-input-clear" };
3303
+ const _hoisted_2$S = { class: "lupa-input-clear" };
3304
3304
  const _hoisted_3$B = { id: "lupa-search-box-input" };
3305
3305
  const _hoisted_4$t = ["value"];
3306
3306
  const _hoisted_5$j = ["aria-label", "placeholder"];
@@ -3397,7 +3397,7 @@ const _sfc_main$1n = /* @__PURE__ */ vue.defineComponent({
3397
3397
  __expose({ focus });
3398
3398
  return (_ctx, _cache) => {
3399
3399
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1d, [
3400
- vue.createElementVNode("div", _hoisted_2$R, [
3400
+ vue.createElementVNode("div", _hoisted_2$S, [
3401
3401
  vue.createElementVNode("div", {
3402
3402
  class: vue.normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
3403
3403
  onClick: clear
@@ -3475,7 +3475,7 @@ const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
3475
3475
  }
3476
3476
  });
3477
3477
  const _hoisted_1$1c = { class: "lupa-search-box-history-item" };
3478
- const _hoisted_2$Q = { class: "lupa-search-box-history-item-content" };
3478
+ const _hoisted_2$R = { class: "lupa-search-box-history-item-content" };
3479
3479
  const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
3480
3480
  __name: "SearchBoxHistoryItem",
3481
3481
  props: {
@@ -3493,7 +3493,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
3493
3493
  };
3494
3494
  return (_ctx, _cache) => {
3495
3495
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1c, [
3496
- vue.createElementVNode("div", _hoisted_2$Q, [
3496
+ vue.createElementVNode("div", _hoisted_2$R, [
3497
3497
  vue.createElementVNode("div", {
3498
3498
  class: vue.normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
3499
3499
  onClick: click2
@@ -3583,7 +3583,7 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
3583
3583
  }
3584
3584
  });
3585
3585
  const _hoisted_1$19 = ["innerHTML"];
3586
- const _hoisted_2$P = {
3586
+ const _hoisted_2$Q = {
3587
3587
  key: 1,
3588
3588
  "data-cy": "lupa-suggestion-value",
3589
3589
  class: "lupa-suggestion-value"
@@ -3637,7 +3637,7 @@ const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
3637
3637
  class: "lupa-suggestion-value",
3638
3638
  "data-cy": "lupa-suggestion-value",
3639
3639
  innerHTML: _ctx.suggestion.displayHighlight
3640
- }, null, 8, _hoisted_1$19)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$P, vue.toDisplayString(_ctx.suggestion.display), 1)),
3640
+ }, null, 8, _hoisted_1$19)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$Q, vue.toDisplayString(_ctx.suggestion.display), 1)),
3641
3641
  _ctx.suggestion.facet ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$A, [
3642
3642
  vue.createElementVNode("span", _hoisted_4$s, vue.toDisplayString(facetLabel.value), 1),
3643
3643
  vue.createElementVNode("span", _hoisted_5$i, vue.toDisplayString(_ctx.suggestion.facet.title), 1)
@@ -3886,6 +3886,7 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
3886
3886
  }
3887
3887
  };
3888
3888
  const _hoisted_1$17 = ["src"];
3889
+ const _hoisted_2$P = ["src"];
3889
3890
  const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
3890
3891
  __name: "ProductImage",
3891
3892
  props: {
@@ -3996,7 +3997,10 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
3996
3997
  onMouseenter: handleMouseEnter,
3997
3998
  onMouseleave: handleMouseLeave
3998
3999
  }, [
3999
- vue.createVNode(vue.Transition, { name: "lupa-fade" }, {
4000
+ hasHoverImages.value ? (vue.openBlock(), vue.createBlock(vue.Transition, {
4001
+ key: 0,
4002
+ name: "lupa-fade"
4003
+ }, {
4000
4004
  default: vue.withCtx(() => [
4001
4005
  (vue.openBlock(), vue.createElementBlock("img", vue.mergeProps({
4002
4006
  class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
@@ -4007,7 +4011,11 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
4007
4011
  }), null, 16, _hoisted_1$17))
4008
4012
  ]),
4009
4013
  _: 1
4010
- })
4014
+ })) : (vue.openBlock(), vue.createElementBlock("img", vue.mergeProps({
4015
+ key: 1,
4016
+ class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
4017
+ src: finalMainImageUrl.value
4018
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$P))
4011
4019
  ], 34);
4012
4020
  };
4013
4021
  }
@@ -37,7 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
  step((generator = generator.apply(__this, __arguments)).next());
38
38
  });
39
39
  };
40
- import { toRaw, isRef, isReactive, toRef, effectScope, ref, markRaw, hasInjectionContext, inject, getCurrentInstance, watch, reactive, nextTick, computed, unref, getCurrentScope, onScopeDispose, toRefs, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withDirectives, mergeProps, vModelText, createCommentVNode, toDisplayString, onMounted, onBeforeMount, Fragment, renderList, createBlock, onBeforeUnmount, createVNode, Transition, withCtx, toHandlers, withModifiers, resolveDynamicComponent, renderSlot, normalizeStyle, createSlots, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, resolveComponent, vModelSelect, h as h$1, provide, cloneVNode } from "vue";
40
+ import { toRaw, isRef, isReactive, toRef, effectScope, ref, markRaw, hasInjectionContext, inject, getCurrentInstance, watch, reactive, nextTick, computed, unref, getCurrentScope, onScopeDispose, toRefs, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withDirectives, mergeProps, vModelText, createCommentVNode, toDisplayString, onMounted, onBeforeMount, Fragment, renderList, createBlock, onBeforeUnmount, Transition, withCtx, toHandlers, withModifiers, resolveDynamicComponent, renderSlot, normalizeStyle, createSlots, createVNode, createTextVNode, normalizeProps, guardReactiveProps, onUnmounted, resolveComponent, vModelSelect, h as h$1, provide, cloneVNode } from "vue";
41
41
  var isVue2 = false;
42
42
  function set(target, key, val) {
43
43
  if (Array.isArray(target)) {
@@ -3298,7 +3298,7 @@ const useSearchBoxStore = defineStore("searchBox", () => {
3298
3298
  };
3299
3299
  });
3300
3300
  const _hoisted_1$1d = { id: "lupa-search-box-input-container" };
3301
- const _hoisted_2$R = { class: "lupa-input-clear" };
3301
+ const _hoisted_2$S = { class: "lupa-input-clear" };
3302
3302
  const _hoisted_3$B = { id: "lupa-search-box-input" };
3303
3303
  const _hoisted_4$t = ["value"];
3304
3304
  const _hoisted_5$j = ["aria-label", "placeholder"];
@@ -3395,7 +3395,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
3395
3395
  __expose({ focus });
3396
3396
  return (_ctx, _cache) => {
3397
3397
  return openBlock(), createElementBlock("div", _hoisted_1$1d, [
3398
- createElementVNode("div", _hoisted_2$R, [
3398
+ createElementVNode("div", _hoisted_2$S, [
3399
3399
  createElementVNode("div", {
3400
3400
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
3401
3401
  onClick: clear
@@ -3473,7 +3473,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
3473
3473
  }
3474
3474
  });
3475
3475
  const _hoisted_1$1c = { class: "lupa-search-box-history-item" };
3476
- const _hoisted_2$Q = { class: "lupa-search-box-history-item-content" };
3476
+ const _hoisted_2$R = { class: "lupa-search-box-history-item-content" };
3477
3477
  const _sfc_main$1l = /* @__PURE__ */ defineComponent({
3478
3478
  __name: "SearchBoxHistoryItem",
3479
3479
  props: {
@@ -3491,7 +3491,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
3491
3491
  };
3492
3492
  return (_ctx, _cache) => {
3493
3493
  return openBlock(), createElementBlock("div", _hoisted_1$1c, [
3494
- createElementVNode("div", _hoisted_2$Q, [
3494
+ createElementVNode("div", _hoisted_2$R, [
3495
3495
  createElementVNode("div", {
3496
3496
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
3497
3497
  onClick: click2
@@ -3581,7 +3581,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
3581
3581
  }
3582
3582
  });
3583
3583
  const _hoisted_1$19 = ["innerHTML"];
3584
- const _hoisted_2$P = {
3584
+ const _hoisted_2$Q = {
3585
3585
  key: 1,
3586
3586
  "data-cy": "lupa-suggestion-value",
3587
3587
  class: "lupa-suggestion-value"
@@ -3635,7 +3635,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
3635
3635
  class: "lupa-suggestion-value",
3636
3636
  "data-cy": "lupa-suggestion-value",
3637
3637
  innerHTML: _ctx.suggestion.displayHighlight
3638
- }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(_ctx.suggestion.display), 1)),
3638
+ }, null, 8, _hoisted_1$19)) : (openBlock(), createElementBlock("div", _hoisted_2$Q, toDisplayString(_ctx.suggestion.display), 1)),
3639
3639
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
3640
3640
  createElementVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
3641
3641
  createElementVNode("span", _hoisted_5$i, toDisplayString(_ctx.suggestion.facet.title), 1)
@@ -3884,6 +3884,7 @@ const replaceImageWithPlaceholder = (e2, placeholder) => {
3884
3884
  }
3885
3885
  };
3886
3886
  const _hoisted_1$17 = ["src"];
3887
+ const _hoisted_2$P = ["src"];
3887
3888
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
3888
3889
  __name: "ProductImage",
3889
3890
  props: {
@@ -3994,7 +3995,10 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
3994
3995
  onMouseenter: handleMouseEnter,
3995
3996
  onMouseleave: handleMouseLeave
3996
3997
  }, [
3997
- createVNode(Transition, { name: "lupa-fade" }, {
3998
+ hasHoverImages.value ? (openBlock(), createBlock(Transition, {
3999
+ key: 0,
4000
+ name: "lupa-fade"
4001
+ }, {
3998
4002
  default: withCtx(() => [
3999
4003
  (openBlock(), createElementBlock("img", mergeProps({
4000
4004
  class: ["lupa-images-hover-image", { [_ctx.imageClass]: true, "lupa-images-hover-image": isHover.value }],
@@ -4005,7 +4009,11 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
4005
4009
  }), null, 16, _hoisted_1$17))
4006
4010
  ]),
4007
4011
  _: 1
4008
- })
4012
+ })) : (openBlock(), createElementBlock("img", mergeProps({
4013
+ key: 1,
4014
+ class: ["lupa-images-main-image", { [_ctx.imageClass]: true }],
4015
+ src: finalMainImageUrl.value
4016
+ }, { alt: imageAlt.value ? imageAlt.value : void 0 }, { onError: replaceWithPlaceholder }), null, 16, _hoisted_2$P))
4009
4017
  ], 34);
4010
4018
  };
4011
4019
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/vue",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "main": "dist/lupaSearch.mjs",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/src/index.d.ts",