@perevorot/shop 2.0.159 → 2.0.160

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.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),a=require("vue-toastification"),n={setup:function(){return{translate:window.__}}},r={class:"shop-cart-success-message"};n.render=function(t,a,n,o,i,l){return e.openBlock(),e.createElementBlock("div",r,e.toDisplayString(o.translate("shop.cart.message")),1)};var o=a.useToast(),i={name:"cart-add",props:{id:Number,isChangeQuantity:{type:Boolean,default:!0},isAlreadyInCart:{type:Boolean,default:!0},isSimple:{type:Boolean,default:!1},isPlusMinus:{type:Boolean,default:!1},after:{type:String,default:"modal"},property:{type:String,default:null},code:{type:String,default:null},name:{type:String,default:null},price:{type:Number,default:null},cartStorage:{type:String,default:"cart"}},setup:function(a){var r=t.useStore(),i=e.ref(!1),l=e.ref(1),c=e.ref(null),s=a.cartStorage,d=e.computed((function(){return r.getters[s+"/productQuantity"](a.id)})),u=a.isAlreadyInCart,m=a.isChangeQuantity,p=a.isPlusMinus;a.isSimple&&(u=!1,m=!1,p=!1);return{button:c,loading:i,quantity:l,add:function(){var e,t,d,u,m;i.value=!0;var p=[];c.value.closest(".product-main")&&document.querySelectorAll("#options input[type=checkbox]:checked").forEach((function(e){p.push(parseInt(e.value))}));var y={};window.getTrackingIndexProductsList&&"function"==typeof window.getTrackingIndexProductsList&&(y=window.getTrackingIndexProductsList(c.value));var v=Math.max(1,l.value),f=c.value.closest("[shop-product]"),g=a.name?a.name:null===(e=f.querySelector("[shop-product-name]"))||void 0===e?void 0:e.textContent,h=a.price?a.price:null===(t=f.querySelector("[shop-product-price]"))||void 0===t?void 0:t.childNodes[0].nodeValue.replace(/ /g,""),b=a.property?a.property:null===(d=f.querySelector("[shop-product-property]"))||void 0===d?void 0:d.textContent,k=a.code?a.code:f.dataset.code,C=null===(u=f.querySelector("[shop-product-category]"))||void 0===u?void 0:u.textContent,_=null===(m=f.querySelector("[shop-product-brand]"))||void 0===m?void 0:m.textContent;r.dispatch(s+"/add",{cart:s,after:a.after,product:{id:a.id,quantity:v,options:p,extra:{trackingIndex:y}},finally:function(){(i.value=!1,l.value=1,"message"==a.after)&&o({component:n},{type:"success-cart"})},callback:function(){var e={ecommerce:{currency:"UAH",value:parseFloat(h)*v,items:[{item_name:g,item_id:k,price:parseFloat(h),quantity:v}]},event:"add_to_cart"};y.index&&(e.ecommerce.items[0].index=y.index),y.item_list_name&&(e.ecommerce.items[0].item_list_name=y.item_list_name),_&&(e.ecommerce.items[0].item_brand=_),C&&(-1!==C.indexOf("/")?C.split("/").forEach((function(t,a){e.ecommerce.items[0]["item_category"+(a?a+1:"")]=t.trim()})):e.ecommerce.items[0].item_category=C),b&&(e.ecommerce.items[0].item_variant=b),$env.debug.ecommerce&&console.log(e),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(e))}})},remove:function(){i.value=!0,r.dispatch(s+"/remove",{id:a.id,cart:s,finally:function(){i.value=!1}})},cart:d,increase:function(){l.value++},decrease:function(){l.value>1&&l.value--},isAlreadyInCart:u,isChangeQuantity:m,isPlusMinus:p}}},l={class:"cart-add",ref:"button"},c={class:"columns"},s={key:0,class:"column"},d={class:"cart-change-quantity"},u=["disabled"],m=["disabled"],p=["disabled"],y={class:"column is-narrow"},v=["disabled"],f=e.createElementVNode("svg",{class:"icon cart"},[e.createElementVNode("use",{"xlink:href":"#cart-add"})],-1),g={class:"cart-add-button-label"},h={key:0},b=e.createElementVNode("br",null,null,-1),k=["disabled","textContent"];i.render=function(t,a,n,r,o,i){return e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",c,[t.$env.shop.isCustomQuantity&&r.isChangeQuantity?(e.openBlock(),e.createElementBlock("div",s,[e.createElementVNode("div",d,[r.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:0,class:"button is-small decrease",onClick:a[0]||(a[0]=function(){return r.decrease&&r.decrease.apply(r,arguments)}),disabled:r.loading||1==r.quantity},"-",8,u)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":a[1]||(a[1]=function(e){return r.quantity=e}),disabled:r.loading},null,8,m),[[e.vModelText,r.quantity]]),r.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-small increase",onClick:a[2]||(a[2]=function(){return r.increase&&r.increase.apply(r,arguments)}),disabled:r.loading},"+",8,p)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"button is-link is-small",onClick:a[3]||(a[3]=function(){return r.add&&r.add.apply(r,arguments)}),disabled:r.loading},[e.renderSlot(t.$slots,"default",{label:t.__("shop.cart.add")},(function(){return[f,e.createElementVNode("span",g,e.toDisplayString(t.__("shop.cart.add")),1)]}))],8,v)])]),t.$env.shop.isAlreadyInCart&&r.isAlreadyInCart&&r.cart>0?(e.openBlock(),e.createElementBlock("div",h,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.already",{quantity:r.cart}))+" ",1),b,e.createElementVNode("a",{onClick:a[4]||(a[4]=e.withModifiers((function(){return r.remove&&r.remove.apply(r,arguments)}),["prevent"])),disabled:r.loading,textContent:e.toDisplayString(t.__("shop.cart.remove"))},null,8,k)])):e.createCommentVNode("v-if",!0)],512)},module.exports=i;
1
+ "use strict";var e=require("vue"),t=require("vuex"),a=require("vue-toastification"),n={setup:function(){return{translate:window.__}}},r={class:"shop-cart-success-message"};n.render=function(t,a,n,o,i,l){return e.openBlock(),e.createElementBlock("div",r,e.toDisplayString(o.translate("shop.cart.message")),1)};var o=a.useToast(),i={name:"cart-add",props:{id:Number,isChangeQuantity:{type:Boolean,default:!0},isAlreadyInCart:{type:Boolean,default:!0},isSimple:{type:Boolean,default:!1},isPlusMinus:{type:Boolean,default:!1},after:{type:String,default:"modal"},property:{type:String,default:null},code:{type:String,default:null},name:{type:String,default:null},price:{type:Number,default:null},cartStorage:{type:String,default:"cart"}},setup:function(a){var r=t.useStore(),i=e.ref(!1),l=e.ref(1),c=e.ref(null),d=a.cartStorage,s=e.computed((function(){return r.getters[d+"/productQuantity"](a.id)})),u=a.isAlreadyInCart,m=a.isChangeQuantity,p=a.isPlusMinus;a.isSimple&&(u=!1,m=!1,p=!1);return{button:c,loading:i,quantity:l,add:function(){var e,t,s,u,m;i.value=!0;var p=[];c.value.closest(".product-main")&&document.querySelectorAll("#options input[type=checkbox]:checked").forEach((function(e){p.push(parseInt(e.value))}));var y={};window.getTrackingIndexProductsList&&"function"==typeof window.getTrackingIndexProductsList&&(y=window.getTrackingIndexProductsList(c.value));var v=Math.max(1,l.value),f=c.value.closest("[shop-product]"),g=a.name?a.name:null===(e=f.querySelector("[shop-product-name]"))||void 0===e?void 0:e.textContent,h=a.price?a.price:null===(t=f.querySelector("[shop-product-price]"))||void 0===t?void 0:t.childNodes[0].nodeValue.replace(/ /g,""),b=a.property?a.property:null===(s=f.querySelector("[shop-product-property]"))||void 0===s?void 0:s.textContent,k=a.code?a.code:f.dataset.code,C=null===(u=f.querySelector("[shop-product-category]"))||void 0===u?void 0:u.textContent,_=null===(m=f.querySelector("[shop-product-brand]"))||void 0===m?void 0:m.textContent;r.dispatch(d+"/add",{cart:d,after:a.after,product:{id:a.id,quantity:v,options:p,extra:{trackingIndex:y}},finally:function(){(i.value=!1,l.value=1,"message"==a.after)&&o({component:n},{type:"success-cart"})},callback:function(){var e,t={ecommerce:{currency:null!==(e=$env.locale)&&void 0!==e&&e.currency?$env.locale.currency:"UAH",value:parseFloat(h)*v,items:[{item_name:g,item_id:k,price:parseFloat(h),quantity:v}]},event:"add_to_cart"};y.index&&(t.ecommerce.items[0].index=y.index),y.item_list_name&&(t.ecommerce.items[0].item_list_name=y.item_list_name),_&&(t.ecommerce.items[0].item_brand=_),C&&(-1!==C.indexOf("/")?C.split("/").forEach((function(e,a){t.ecommerce.items[0]["item_category"+(a?a+1:"")]=e.trim()})):t.ecommerce.items[0].item_category=C),b&&(t.ecommerce.items[0].item_variant=b),$env.debug.ecommerce&&console.log(t),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t))}})},remove:function(){i.value=!0,r.dispatch(d+"/remove",{id:a.id,cart:d,finally:function(){i.value=!1}})},cart:s,increase:function(){l.value++},decrease:function(){l.value>1&&l.value--},isAlreadyInCart:u,isChangeQuantity:m,isPlusMinus:p}}},l={class:"cart-add",ref:"button"},c={class:"columns"},d={key:0,class:"column"},s={class:"cart-change-quantity"},u=["disabled"],m=["disabled"],p=["disabled"],y={class:"column is-narrow"},v=["disabled"],f=e.createElementVNode("svg",{class:"icon cart"},[e.createElementVNode("use",{"xlink:href":"#cart-add"})],-1),g={class:"cart-add-button-label"},h={key:0},b=e.createElementVNode("br",null,null,-1),k=["disabled","textContent"];i.render=function(t,a,n,r,o,i){return e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",c,[t.$env.shop.isCustomQuantity&&r.isChangeQuantity?(e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",s,[r.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:0,class:"button is-small decrease",onClick:a[0]||(a[0]=function(){return r.decrease&&r.decrease.apply(r,arguments)}),disabled:r.loading||1==r.quantity},"-",8,u)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":a[1]||(a[1]=function(e){return r.quantity=e}),disabled:r.loading},null,8,m),[[e.vModelText,r.quantity]]),r.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-small increase",onClick:a[2]||(a[2]=function(){return r.increase&&r.increase.apply(r,arguments)}),disabled:r.loading},"+",8,p)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"button is-link is-small",onClick:a[3]||(a[3]=function(){return r.add&&r.add.apply(r,arguments)}),disabled:r.loading},[e.renderSlot(t.$slots,"default",{label:t.__("shop.cart.add")},(function(){return[f,e.createElementVNode("span",g,e.toDisplayString(t.__("shop.cart.add")),1)]}))],8,v)])]),t.$env.shop.isAlreadyInCart&&r.isAlreadyInCart&&r.cart>0?(e.openBlock(),e.createElementBlock("div",h,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.already",{quantity:r.cart}))+" ",1),b,e.createElementVNode("a",{onClick:a[4]||(a[4]=e.withModifiers((function(){return r.remove&&r.remove.apply(r,arguments)}),["prevent"])),disabled:r.loading,textContent:e.toDisplayString(t.__("shop.cart.remove"))},null,8,k)])):e.createCommentVNode("v-if",!0)],512)},module.exports=i;
2
2
  //# sourceMappingURL=CartAdd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CartAdd.js","sources":["../../../../src/components/shop/cart/SuccessMessage.vue","../../../../src/components/shop/cart/SuccessMessage.vue?vue&type=template&id=75a41ddb&lang.js","../../../../src/components/shop/cart/CartAdd.vue","../../../../src/components/shop/cart/CartAdd.vue?vue&type=template&id=24a33c02&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n },\n property: {\n type: String,\n default: null\n },\n code: {\n type: String,\n default: null\n },\n name: {\n type: String,\n default: null\n },\n price: {\n type: Number,\n default: null\n },\n cartStorage: {\n type: String,\n default: 'cart'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n const cartStorage = props.cartStorage;\n\n const cart = computed(() => store.getters[cartStorage + '/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n let trackingIndex = {};\n\n if (window.getTrackingIndexProductsList && typeof window.getTrackingIndexProductsList === 'function') {\n trackingIndex = window.getTrackingIndexProductsList(button.value);\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = props.name ? props.name : product.querySelector('[shop-product-name]')?.textContent;\n const price = props.price ? props.price : product.querySelector('[shop-product-price]')?.childNodes[0].nodeValue.replace(/ /g, '');\n const property = props.property ? props.property : product.querySelector('[shop-product-property]')?.textContent;\n const code = props.code ? props.code : product.dataset.code;\n const category = product.querySelector('[shop-product-category]')?.textContent;\n const brand = product.querySelector('[shop-product-brand]')?.textContent;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n after: props.after,\n product: {\n id: props.id,\n quantity: q,\n options: options,\n extra: {\n trackingIndex: trackingIndex\n }\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n },\n callback: () => {\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (trackingIndex.index) {\n object.ecommerce.items[0].index = trackingIndex.index;\n }\n\n if (trackingIndex.item_list_name) {\n object.ecommerce.items[0].item_list_name = trackingIndex.item_list_name;\n }\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n },\n property: {\n type: String,\n default: null\n },\n code: {\n type: String,\n default: null\n },\n name: {\n type: String,\n default: null\n },\n price: {\n type: Number,\n default: null\n },\n cartStorage: {\n type: String,\n default: 'cart'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n const cartStorage = props.cartStorage;\n\n const cart = computed(() => store.getters[cartStorage + '/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n let trackingIndex = {};\n\n if (window.getTrackingIndexProductsList && typeof window.getTrackingIndexProductsList === 'function') {\n trackingIndex = window.getTrackingIndexProductsList(button.value);\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = props.name ? props.name : product.querySelector('[shop-product-name]')?.textContent;\n const price = props.price ? props.price : product.querySelector('[shop-product-price]')?.childNodes[0].nodeValue.replace(/ /g, '');\n const property = props.property ? props.property : product.querySelector('[shop-product-property]')?.textContent;\n const code = props.code ? props.code : product.dataset.code;\n const category = product.querySelector('[shop-product-category]')?.textContent;\n const brand = product.querySelector('[shop-product-brand]')?.textContent;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n after: props.after,\n product: {\n id: props.id,\n quantity: q,\n options: options,\n extra: {\n trackingIndex: trackingIndex\n }\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n },\n callback: () => {\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (trackingIndex.index) {\n object.ecommerce.items[0].index = trackingIndex.index;\n }\n\n if (trackingIndex.item_list_name) {\n object.ecommerce.items[0].item_list_name = trackingIndex.item_list_name;\n }\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>"],"names":["script$1","setup","translate","window","__","_hoisted_1","class","_createElementBlock","_toDisplayString","$setup","toast","useToast","script","name","props","id","Number","isChangeQuantity","type","Boolean","default","isAlreadyInCart","isSimple","isPlusMinus","after","String","property","code","price","cartStorage","store","useStore","loading","ref","quantity","button","cart","computed","getters","add","_product$querySelecto","_product$querySelecto2","_product$querySelecto3","_product$querySelecto4","_product$querySelecto5","value","options","closest","document","querySelectorAll","forEach","element","push","parseInt","trackingIndex","getTrackingIndexProductsList","q","Math","max","product","querySelector","textContent","childNodes","nodeValue","replace","dataset","category","brand","dispatch","extra","finally","component","SuccessMessage","callback","object","ecommerce","currency","parseFloat","items","item_name","item_id","event","index","item_list_name","item_brand","indexOf","split","segment","trim","item_category","item_variant","$env","debug","console","log","dataLayer","remove","increase","decrease","_hoisted_2","_hoisted_4","_hoisted_8","_createElementVNode","createElementVNode","xlink:href","_hoisted_11","_openBlock","openBlock","_ctx","shop","isCustomQuantity","createElementBlock","_hoisted_3","onClick","apply","arguments","disabled","_hoisted_5","min","$event","_hoisted_7","_renderSlot","renderSlot","$slots","label","_hoisted_10","_hoisted_12","_hoisted_13"],"mappings":"oFAMeA,EAAA,CACXC,MAAK,WAGD,MAAO,CACHC,UAHcC,OAAOC,MCPxBC,EAAA,CAAAC,MAAM,iFAAXC,qBAEK,MAFLF,EAEKG,EAAAA,gBADEC,EAASP,UAAA,sBAAA,ICkCpB,IAAMQ,EAAQC,EAAQA,WAEPC,EAAA,CACXC,KAAM,WACNC,MAAO,CACHC,GAAIC,OACJC,iBAAkB,CACdC,KAAMC,QACNC,SAAS,GAEbC,gBAAiB,CACbH,KAAMC,QACNC,SAAS,GAEbE,SAAU,CACNJ,KAAMC,QACNC,SAAS,GAEbG,YAAa,CACTL,KAAMC,QACNC,SAAS,GAEbI,MAAO,CACHN,KAAMO,OACNL,QAAS,SAEbM,SAAU,CACNR,KAAMO,OACNL,QAAS,MAEbO,KAAM,CACFT,KAAMO,OACNL,QAAS,MAEbP,KAAM,CACFK,KAAMO,OACNL,QAAS,MAEbQ,MAAO,CACHV,KAAMF,OACNI,QAAS,MAEbS,YAAa,CACTX,KAAMO,OACNL,QAAS,SAGjBnB,MAAK,SAACa,GACF,IAAMgB,EAAQC,EAAAA,WACRC,EAAUC,OAAI,GACdC,EAAWD,MAAI,GACf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AAAiB,MAAAzG,EAAA0G,aAAGC,SAAU3G,EAAOuB,SAAqB,IAAC,EAAAwF,yEAG3GlB,EAAAC,mBAWK,MAXLF,EAWK,CAVDC,EASQC,mBAAA,SAAA,CATAjG,MAAM,0BAA+B2G,sCAAOxG,EAAG8B,KAAA9B,EAAA8B,IAAA2E,MAAAzG,EAAA0G,aAAGC,SAAU3G,EAAOuB,UACvEyF,EAOMC,WAAAd,EAAAe,OAAA,UAAA,CAPCC,MAAOhB,EAAExG,GAAA,mBAAhB,WAAA,MAOM,CANFyH,EAGAvB,qBAEM,OAFNG,EAEMjG,EAAAA,gBADCoG,EAAExG,GAAA,kBAAA,iBAMdwG,EAAAjB,KAAKkB,KAAKxF,iBAAmBZ,EAAAY,iBAAmBZ,EAAG2B,KAAA,iBAA9D7B,EAIKwG,mBAAA,MAAAe,EAAA,qCAHElB,EAAExG,GAAA,oBAAA,CAAA8B,SAAkCzB,EAAK2B,QAAI,IAChD,GAAA2F,EACAzB,EAAsFC,mBAAA,IAAA,CAA9EU,uDAAexG,EAAMuF,QAAAvF,EAAAuF,OAAAkB,MAAAzG,EAAA0G,aAAA,CAAA,aAAGC,SAAU3G,EAAOuB,QAAE6B,YAAArD,EAAAA,gBAAQoG,EAAExG,GAAA"}
1
+ {"version":3,"file":"CartAdd.js","sources":["../../../../src/components/shop/cart/SuccessMessage.vue","../../../../src/components/shop/cart/SuccessMessage.vue?vue&type=template&id=75a41ddb&lang.js","../../../../src/components/shop/cart/CartAdd.vue","../../../../src/components/shop/cart/CartAdd.vue?vue&type=template&id=24ea3d3a&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n },\n property: {\n type: String,\n default: null\n },\n code: {\n type: String,\n default: null\n },\n name: {\n type: String,\n default: null\n },\n price: {\n type: Number,\n default: null\n },\n cartStorage: {\n type: String,\n default: 'cart'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n const cartStorage = props.cartStorage;\n\n const cart = computed(() => store.getters[cartStorage + '/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n let trackingIndex = {};\n\n if (window.getTrackingIndexProductsList && typeof window.getTrackingIndexProductsList === 'function') {\n trackingIndex = window.getTrackingIndexProductsList(button.value);\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = props.name ? props.name : product.querySelector('[shop-product-name]')?.textContent;\n const price = props.price ? props.price : product.querySelector('[shop-product-price]')?.childNodes[0].nodeValue.replace(/ /g, '');\n const property = props.property ? props.property : product.querySelector('[shop-product-property]')?.textContent;\n const code = props.code ? props.code : product.dataset.code;\n const category = product.querySelector('[shop-product-category]')?.textContent;\n const brand = product.querySelector('[shop-product-brand]')?.textContent;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n after: props.after,\n product: {\n id: props.id,\n quantity: q,\n options: options,\n extra: {\n trackingIndex: trackingIndex\n }\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n },\n callback: () => {\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (trackingIndex.index) {\n object.ecommerce.items[0].index = trackingIndex.index;\n }\n\n if (trackingIndex.item_list_name) {\n object.ecommerce.items[0].item_list_name = trackingIndex.item_list_name;\n }\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n },\n property: {\n type: String,\n default: null\n },\n code: {\n type: String,\n default: null\n },\n name: {\n type: String,\n default: null\n },\n price: {\n type: Number,\n default: null\n },\n cartStorage: {\n type: String,\n default: 'cart'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n const cartStorage = props.cartStorage;\n\n const cart = computed(() => store.getters[cartStorage + '/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n let trackingIndex = {};\n\n if (window.getTrackingIndexProductsList && typeof window.getTrackingIndexProductsList === 'function') {\n trackingIndex = window.getTrackingIndexProductsList(button.value);\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = props.name ? props.name : product.querySelector('[shop-product-name]')?.textContent;\n const price = props.price ? props.price : product.querySelector('[shop-product-price]')?.childNodes[0].nodeValue.replace(/ /g, '');\n const property = props.property ? props.property : product.querySelector('[shop-product-property]')?.textContent;\n const code = props.code ? props.code : product.dataset.code;\n const category = product.querySelector('[shop-product-category]')?.textContent;\n const brand = product.querySelector('[shop-product-brand]')?.textContent;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n after: props.after,\n product: {\n id: props.id,\n quantity: q,\n options: options,\n extra: {\n trackingIndex: trackingIndex\n }\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n },\n callback: () => {\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (trackingIndex.index) {\n object.ecommerce.items[0].index = trackingIndex.index;\n }\n\n if (trackingIndex.item_list_name) {\n object.ecommerce.items[0].item_list_name = trackingIndex.item_list_name;\n }\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>"],"names":["script$1","setup","translate","window","__","_hoisted_1","class","_createElementBlock","_toDisplayString","$setup","toast","useToast","script","name","props","id","Number","isChangeQuantity","type","Boolean","default","isAlreadyInCart","isSimple","isPlusMinus","after","String","property","code","price","cartStorage","store","useStore","loading","ref","quantity","button","cart","computed","getters","add","_product$querySelecto","_product$querySelecto2","_product$querySelecto3","_product$querySelecto4","_product$querySelecto5","value","options","closest","document","querySelectorAll","forEach","element","push","parseInt","trackingIndex","getTrackingIndexProductsList","q","Math","max","product","querySelector","textContent","childNodes","nodeValue","replace","dataset","category","brand","dispatch","extra","finally","component","SuccessMessage","callback","_$env$locale","object","ecommerce","currency","$env","locale","parseFloat","items","item_name","item_id","event","index","item_list_name","item_brand","indexOf","split","segment","trim","item_category","item_variant","debug","console","log","dataLayer","remove","increase","decrease","_hoisted_2","_hoisted_4","_hoisted_8","_createElementVNode","createElementVNode","xlink:href","_hoisted_11","_openBlock","openBlock","_ctx","shop","isCustomQuantity","createElementBlock","_hoisted_3","onClick","apply","arguments","disabled","_hoisted_5","min","$event","_hoisted_7","_renderSlot","renderSlot","$slots","label","_hoisted_10","_hoisted_12","_hoisted_13"],"mappings":"oFAMeA,EAAA,CACXC,MAAK,WAGD,MAAO,CACHC,UAHcC,OAAOC,MCPxBC,EAAA,CAAAC,MAAM,iFAAXC,qBAEK,MAFLF,EAEKG,EAAAA,gBADEC,EAASP,UAAA,sBAAA,ICkCpB,IAAMQ,EAAQC,EAAQA,WAEPC,EAAA,CACXC,KAAM,WACNC,MAAO,CACHC,GAAIC,OACJC,iBAAkB,CACdC,KAAMC,QACNC,SAAS,GAEbC,gBAAiB,CACbH,KAAMC,QACNC,SAAS,GAEbE,SAAU,CACNJ,KAAMC,QAC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AE1G,GAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),i={name:"CartItem",props:{item:Object},setup:function(i){var o=e.inject("cartStorage");o=o||"cart";var n=t.useStore(),a=e.ref(!1),r=e.ref(),c=e.ref(i.item.attributes.options&&i.item.attributes.options.length?i.item.attributes.options:[]),l=e.ref(!1),s=e.computed((function(){return n.getters["auth/is"]}));i.item.attributes.options&&i.item.attributes.options.length&&(l.value=!0);var m=i.item.name,d=i.item.attributes.price,u=i.item.attributes.code,p=i.item.attributes.categoryFull?i.item.attributes.categoryFull:i.item.attributes.category,b=i.item.attributes.brand,v=i.item.attributes.property,g=i.item.attributes.index,k=i.item.attributes.itemListName,f=function(e){a.value=!0,n.dispatch(o+"/add",{cart:o,product:{id:i.item.id,quantity:e},finally:function(){a.value=!1},callback:function(){if(e>0){i.item.quantity;var t={ecommerce:{currency:"UAH",value:parseFloat(d),items:[{item_name:m,item_id:u,price:parseFloat(d),quantity:1}]},event:"add_to_cart"};b&&(t.ecommerce.items[0].item_brand=b),i.item.attributes.index&&(t.ecommerce.items[0].index=i.item.attributes.index),i.item.attributes.itemListName&&(t.ecommerce.items[0].item_list_name=i.item.attributes.itemListName),p&&(-1!==p.indexOf("/")?p.split("/").forEach((function(e,i){t.ecommerce.items[0]["item_category"+(i?i+1:"")]=e.trim()})):t.ecommerce.items[0].item_category=p),v&&(t.ecommerce.items[0].item_variant=v),$env.debug.ecommerce&&console.log(t),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t))}}})};i.item.options&&i.item.options.length&&e.watch(c,(function(e){a.value=!0,n.dispatch(o+"/options",{product:{id:i.item.id,options:Object.values(e)},finally:function(){a.value=!1}})}));return{loading:a,increase:function(){f(1)},decrease:function(){f(-1)},remove:function(){a.value=!0,n.dispatch(o+"/remove",{id:i.item.id,cart:o,finally:function(){a.value=!1},callback:function(){var e=i.item.quantity,t={ecommerce:{currency:"UAH",value:parseFloat(d)*e,items:[{item_name:m,item_id:u,price:parseFloat(d),quantity:e}]},event:"remove_from_cart"};p&&(-1!==p.indexOf("/")?p.split("/").forEach((function(e,i){t.ecommerce.items[0]["item_category"+(i?i+1:"")]=e.trim()})):t.ecommerce.items[0].item_category=p),g&&(t.ecommerce.items[0].index=g),k&&(t.ecommerce.items[0].item_list_name=k),v&&(t.ecommerce.items[0].item_variant=v),$env.debug.ecommerce&&console.log(t),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t))}})},options:c,optionsToggled:l,input:r,gotoProduct:function(e){window.addEventListener("beforeunload",(function(){n.commit(o+"/modal",null)})),window.addEventListener("pagehide",(function(){n.commit(o+"/modal",null)})),window.location.href=e},auth:s}}},o=["data-code"],n={key:0,class:"column is-12"},a={class:"bundle-title"},r={class:"column name"},c={class:"column is-narrow cart-actions-parent"},l={class:"cart-actions"},s=["disabled"],m=[e.createElementVNode("svg",{class:"icon"},[e.createElementVNode("use",{"xlink:href":"#cart-remove"})],-1)],d={class:"column is-narrow image-parent"},u=["src"],p={key:1},b=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],v={class:"column"},g={class:"columns is-gapless mb-0"},k={class:"column"},f={key:0,class:"code"},E={class:"is-hidden","shop-product-category":""},y={class:"title"},N={key:0,"shop-product-name":""},V={key:0,class:"column is-narrow has-text-right is-relative quantity-parent"},h={class:"quantity"},B=["disabled"],w=[e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-minus"})],-1)],C=["disabled"],_=[e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-plus"})],-1)],x={key:0,class:"quantity-price"},L=["innerHTML"],S={class:"column is-2 has-text-right"},q=["innerHTML"],D=["innerHTML"],T=["innerHTML"],H=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),M={class:"wrapper"},$={class:"column is-narrow"},P=["value","id"],z={class:"column"},F=["for"],O={key:0,class:"option-description"},U={class:"column is-2 has-text-right"},j=["innerHTML"],I={key:0,class:"bundle columns"},A=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),G={class:"column is-narrow"},J=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),K=["src"],Q={key:1},R=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],W={class:"column"},X={key:0,class:"code"},Y={class:"title"},Z={key:1,class:"bundle columns"},ee=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),te={class:"column is-narrow"},ie=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),oe=["src"],ne={key:1},ae=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],re={class:"column"},ce={key:0,class:"code"},le={class:"title"};i.render=function(t,i,se,me,de,ue){var pe=e.resolveComponent("wishlist-add");return se.item.deleted?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["columns is-multiline shop-cart-item",{inactive:!1===se.item.attributes.active,"is-bundle":se.item.attributes.bundle}]),"data-code":se.item.attributes.code,"shop-product":""},[se.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",a,e.toDisplayString(t.__("shop.cart.bundle")),1)])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",r,[e.createElementVNode("div",{class:e.normalizeClass(["columns",{"mb-0":se.item.attributes.bundle}])},[e.createElementVNode("div",c,[e.createElementVNode("div",l,[e.createElementVNode("button",{class:"remove",onClick:i[0]||(i[0]=function(){return me.remove&&me.remove.apply(me,arguments)}),disabled:me.loading},m,8,s),me.auth&&!se.item.attributes.bundle?(e.openBlock(),e.createBlock(pe,{key:0,id:se.item.attributes.productId?se.item.attributes.productId:se.item.id,item:se.item},null,8,["id","item"])):e.createCommentVNode("v-if",!0)])]),e.createElementVNode("div",d,[e.createElementVNode("a",{onClick:i[1]||(i[1]=function(e){return me.gotoProduct(se.item.attributes.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.image}])},[se.item.attributes.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.image},null,8,u)):(e.openBlock(),e.createElementBlock("svg",p,b))],2)])]),e.createElementVNode("div",v,[e.createElementVNode("div",g,[e.createElementVNode("div",k,[e.renderSlot(t.$slots,"item-name",{item:se.item,gotoProduct:me.gotoProduct},(function(){return[se.item.attributes.code?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,e.toDisplayString(se.item.attributes.categoryFull),1),e.createElementVNode("div",y,[!1===se.item.attributes.active?(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(se.item.name),1)):(e.openBlock(),e.createElementBlock("a",{key:1,onClick:i[2]||(i[2]=function(e){return me.gotoProduct(se.item.attributes.href)})},e.toDisplayString(se.item.name),1))])]}))]),(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",h,[e.createElementVNode("button",{class:"button decrease",onClick:i[3]||(i[3]=function(){return me.decrease&&me.decrease.apply(me,arguments)}),disabled:me.loading||1==se.item.quantity},w,8,B),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":i[4]||(i[4]=function(e){return se.item.quantity=e}),disabled:""},null,512),[[e.vModelText,se.item.quantity]]),e.createElementVNode("button",{class:"button increase",onClick:i[5]||(i[5]=function(){return me.increase&&me.increase.apply(me,arguments)}),disabled:me.loading},_,8,C)]),se.item.quantity>1?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",{innerHTML:t.$filters.price(se.item.attributes.price)},null,8,L),e.createTextVNode(" / "+e.toDisplayString(t.__("shop.cart.q")),1)])):e.createCommentVNode("v-if",!0)])),e.createElementVNode("div",S,[e.renderSlot(t.$slots,"item-price",{item:se.item,filters:t.$filters},(function(){return[e.createElementVNode("div",{class:e.normalizeClass(["price",{"bundle-price":se.item.attributes.bundle}])},[se.item.attributes.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(se.item.attributes.priceOld*se.item.quantity)},null,8,q)):e.createCommentVNode("v-if",!0),se.item.attributes.bundle&&se.item.attributes.amount?(e.openBlock(),e.createElementBlock("div",{key:1,class:"bundle-amount",innerHTML:t.__("shop.cart.bundle_amount")+(se.item.attributes.amount.percent?se.item.attributes.amount.percent+"%":t.$filters.price(se.item.attributes.amount.sum*se.item.quantity))},null,8,D)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{innerHTML:t.$filters.price(se.item.attributes.price*se.item.quantity),"shop-product-price":""},null,8,T)],2)]}))])]),se.item.options&&se.item.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["options",{"is-toggled":me.optionsToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:i[6]||(i[6]=function(e){return me.optionsToggled=!me.optionsToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.cart.additional"))+" "+e.toDisplayString(se.item.options.length),1),H]),e.withDirectives(e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.item.options,(function(o,n){return e.openBlock(),e.createElementBlock("div",{key:n,class:e.normalizeClass(["columns",{"is-checked":-1!==me.options.indexOf(o.id)}])},[e.createElementVNode("div",$,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":i[7]||(i[7]=function(e){return me.options=e}),value:o.id,id:"option-"+se.item.id+"-"+o.id},null,8,P),[[e.vModelCheckbox,me.options]])]),e.createElementVNode("div",z,[e.createElementVNode("label",{class:"option-title is-clickable",for:"option-"+se.item.id+"-"+o.id},e.toDisplayString(o.name),9,F),o.description?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(o.description),1)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",U,[e.createTextVNode("+"),e.createElementVNode("span",{innerHTML:t.$filters.price(o.price)},null,8,j)])],2)})),128))],512),[[e.vShow,me.optionsToggled]])],2)):e.createCommentVNode("v-if",!0)])],2),se.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",I,[A,e.createElementVNode("div",G,[J,e.createElementVNode("a",{onClick:i[8]||(i[8]=function(e){return me.gotoProduct(se.item.attributes.second.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.second.image}])},[se.item.attributes.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.second.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,R))],2)])]),e.createElementVNode("div",W,[se.item.attributes.second.code?(e.openBlock(),e.createElementBlock("div",X,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.second.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Y,[e.createElementVNode("a",{onClick:i[9]||(i[9]=function(e){return me.gotoProduct(se.item.attributes.second.href)})},e.toDisplayString(se.item.attributes.second.name),1)])])])):e.createCommentVNode("v-if",!0),se.item.attributes.bundle&&se.item.attributes.third?(e.openBlock(),e.createElementBlock("div",Z,[ee,e.createElementVNode("div",te,[ie,e.createElementVNode("a",{onClick:i[10]||(i[10]=function(e){return me.gotoProduct(se.item.attributes.third.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.third.image}])},[se.item.attributes.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.third.image},null,8,oe)):(e.openBlock(),e.createElementBlock("svg",ne,ae))],2)])]),e.createElementVNode("div",re,[se.item.attributes.third.code?(e.openBlock(),e.createElementBlock("div",ce,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.third.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.createElementVNode("a",{onClick:i[11]||(i[11]=function(e){return me.gotoProduct(se.item.attributes.third.href)})},e.toDisplayString(se.item.attributes.third.name),1)])])])):e.createCommentVNode("v-if",!0)])],10,o))},module.exports=i;
1
+ "use strict";var e=require("vue"),t=require("vuex"),i={name:"CartItem",props:{item:Object},setup:function(i){var o=e.inject("cartStorage");o=o||"cart";var n=t.useStore(),a=e.ref(!1),r=e.ref(),c=e.ref(i.item.attributes.options&&i.item.attributes.options.length?i.item.attributes.options:[]),l=e.ref(!1),s=e.computed((function(){return n.getters["auth/is"]}));i.item.attributes.options&&i.item.attributes.options.length&&(l.value=!0);var m=i.item.name,d=i.item.attributes.price,u=i.item.attributes.code,p=i.item.attributes.categoryFull?i.item.attributes.categoryFull:i.item.attributes.category,v=i.item.attributes.brand,b=i.item.attributes.property,g=i.item.attributes.index,k=i.item.attributes.itemListName,f=function(e){a.value=!0,n.dispatch(o+"/add",{cart:o,product:{id:i.item.id,quantity:e},finally:function(){a.value=!1},callback:function(){if(e>0){var t;i.item.quantity;var o={ecommerce:{currency:null!==(t=$env.locale)&&void 0!==t&&t.currency?$env.locale.currency:"UAH",value:parseFloat(d),items:[{item_name:m,item_id:u,price:parseFloat(d),quantity:1}]},event:"add_to_cart"};v&&(o.ecommerce.items[0].item_brand=v),i.item.attributes.index&&(o.ecommerce.items[0].index=i.item.attributes.index),i.item.attributes.itemListName&&(o.ecommerce.items[0].item_list_name=i.item.attributes.itemListName),p&&(-1!==p.indexOf("/")?p.split("/").forEach((function(e,t){o.ecommerce.items[0]["item_category"+(t?t+1:"")]=e.trim()})):o.ecommerce.items[0].item_category=p),b&&(o.ecommerce.items[0].item_variant=b),$env.debug.ecommerce&&console.log(o),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(o))}}})};i.item.options&&i.item.options.length&&e.watch(c,(function(e){a.value=!0,n.dispatch(o+"/options",{product:{id:i.item.id,options:Object.values(e)},finally:function(){a.value=!1}})}));return{loading:a,increase:function(){f(1)},decrease:function(){f(-1)},remove:function(){a.value=!0,n.dispatch(o+"/remove",{id:i.item.id,cart:o,finally:function(){a.value=!1},callback:function(){var e,t=i.item.quantity,o={ecommerce:{currency:null!==(e=$env.locale)&&void 0!==e&&e.currency?$env.locale.currency:"UAH",value:parseFloat(d)*t,items:[{item_name:m,item_id:u,price:parseFloat(d),quantity:t}]},event:"remove_from_cart"};p&&(-1!==p.indexOf("/")?p.split("/").forEach((function(e,t){o.ecommerce.items[0]["item_category"+(t?t+1:"")]=e.trim()})):o.ecommerce.items[0].item_category=p),g&&(o.ecommerce.items[0].index=g),k&&(o.ecommerce.items[0].item_list_name=k),b&&(o.ecommerce.items[0].item_variant=b),$env.debug.ecommerce&&console.log(o),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(o))}})},options:c,optionsToggled:l,input:r,gotoProduct:function(e){window.addEventListener("beforeunload",(function(){n.commit(o+"/modal",null)})),window.addEventListener("pagehide",(function(){n.commit(o+"/modal",null)})),window.location.href=e},auth:s}}},o=["data-code"],n={key:0,class:"column is-12"},a={class:"bundle-title"},r={class:"column name"},c={class:"column is-narrow cart-actions-parent"},l={class:"cart-actions"},s=["disabled"],m=[e.createElementVNode("svg",{class:"icon"},[e.createElementVNode("use",{"xlink:href":"#cart-remove"})],-1)],d={class:"column is-narrow image-parent"},u=["src"],p={key:1},v=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],b={class:"column"},g={class:"columns is-gapless mb-0"},k={class:"column"},f={key:0,class:"code"},E={class:"is-hidden","shop-product-category":""},y={class:"title"},N={key:0,"shop-product-name":""},V={key:0,class:"column is-narrow has-text-right is-relative quantity-parent"},h={class:"quantity"},B=["disabled"],w=[e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-minus"})],-1)],C=["disabled"],_=[e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-plus"})],-1)],x={key:0,class:"quantity-price"},L=["innerHTML"],S={class:"column is-2 has-text-right"},q=["innerHTML"],D=["innerHTML"],T=["innerHTML"],$=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#arrow-down"})],-1),H={class:"wrapper"},M={class:"column is-narrow"},P=["value","id"],z={class:"column"},F=["for"],O={key:0,class:"option-description"},U={class:"column is-2 has-text-right"},j=["innerHTML"],I={key:0,class:"bundle columns"},A=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),G={class:"column is-narrow"},J=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),K=["src"],Q={key:1},R=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],W={class:"column"},X={key:0,class:"code"},Y={class:"title"},Z={key:1,class:"bundle columns"},ee=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("div",{class:"cart-bundle-spacer"})],-1),te={class:"column is-narrow"},ie=e.createElementVNode("svg",{class:"bundle-icon"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1),oe=["src"],ne={key:1},ae=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],re={class:"column"},ce={key:0,class:"code"},le={class:"title"};i.render=function(t,i,se,me,de,ue){var pe=e.resolveComponent("wishlist-add");return se.item.deleted?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["columns is-multiline shop-cart-item",{inactive:!1===se.item.attributes.active,"is-bundle":se.item.attributes.bundle}]),"data-code":se.item.attributes.code,"shop-product":""},[se.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",a,e.toDisplayString(t.__("shop.cart.bundle")),1)])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",r,[e.createElementVNode("div",{class:e.normalizeClass(["columns",{"mb-0":se.item.attributes.bundle}])},[e.createElementVNode("div",c,[e.createElementVNode("div",l,[e.createElementVNode("button",{class:"remove",onClick:i[0]||(i[0]=function(){return me.remove&&me.remove.apply(me,arguments)}),disabled:me.loading},m,8,s),me.auth&&!se.item.attributes.bundle?(e.openBlock(),e.createBlock(pe,{key:0,id:se.item.attributes.productId?se.item.attributes.productId:se.item.id,item:se.item},null,8,["id","item"])):e.createCommentVNode("v-if",!0)])]),e.createElementVNode("div",d,[e.createElementVNode("a",{onClick:i[1]||(i[1]=function(e){return me.gotoProduct(se.item.attributes.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.image}])},[se.item.attributes.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.image},null,8,u)):(e.openBlock(),e.createElementBlock("svg",p,v))],2)])]),e.createElementVNode("div",b,[e.createElementVNode("div",g,[e.createElementVNode("div",k,[e.renderSlot(t.$slots,"item-name",{item:se.item,gotoProduct:me.gotoProduct},(function(){return[se.item.attributes.code?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",E,e.toDisplayString(se.item.attributes.categoryFull),1),e.createElementVNode("div",y,[!1===se.item.attributes.active?(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(se.item.name),1)):(e.openBlock(),e.createElementBlock("a",{key:1,onClick:i[2]||(i[2]=function(e){return me.gotoProduct(se.item.attributes.href)})},e.toDisplayString(se.item.name),1))])]}))]),(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",h,[e.createElementVNode("button",{class:"button decrease",onClick:i[3]||(i[3]=function(){return me.decrease&&me.decrease.apply(me,arguments)}),disabled:me.loading||1==se.item.quantity},w,8,B),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":i[4]||(i[4]=function(e){return se.item.quantity=e}),disabled:""},null,512),[[e.vModelText,se.item.quantity]]),e.createElementVNode("button",{class:"button increase",onClick:i[5]||(i[5]=function(){return me.increase&&me.increase.apply(me,arguments)}),disabled:me.loading},_,8,C)]),se.item.quantity>1?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",{innerHTML:t.$filters.price(se.item.attributes.price)},null,8,L),e.createTextVNode(" / "+e.toDisplayString(t.__("shop.cart.q")),1)])):e.createCommentVNode("v-if",!0)])),e.createElementVNode("div",S,[e.renderSlot(t.$slots,"item-price",{item:se.item,filters:t.$filters},(function(){return[e.createElementVNode("div",{class:e.normalizeClass(["price",{"bundle-price":se.item.attributes.bundle}])},[se.item.attributes.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(se.item.attributes.priceOld*se.item.quantity)},null,8,q)):e.createCommentVNode("v-if",!0),se.item.attributes.bundle&&se.item.attributes.amount?(e.openBlock(),e.createElementBlock("div",{key:1,class:"bundle-amount",innerHTML:t.__("shop.cart.bundle_amount")+(se.item.attributes.amount.percent?se.item.attributes.amount.percent+"%":t.$filters.price(se.item.attributes.amount.sum*se.item.quantity))},null,8,D)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{innerHTML:t.$filters.price(se.item.attributes.price*se.item.quantity),"shop-product-price":""},null,8,T)],2)]}))])]),se.item.options&&se.item.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["options",{"is-toggled":me.optionsToggled}])},[e.createElementVNode("div",{class:"toggler",onClick:i[6]||(i[6]=function(e){return me.optionsToggled=!me.optionsToggled})},[e.createElementVNode("span",null,e.toDisplayString(t.__("shop.cart.additional"))+" "+e.toDisplayString(se.item.options.length),1),$]),e.withDirectives(e.createElementVNode("div",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(se.item.options,(function(o,n){return e.openBlock(),e.createElementBlock("div",{key:n,class:e.normalizeClass(["columns",{"is-checked":-1!==me.options.indexOf(o.id)}])},[e.createElementVNode("div",M,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"checkbox","onUpdate:modelValue":i[7]||(i[7]=function(e){return me.options=e}),value:o.id,id:"option-"+se.item.id+"-"+o.id},null,8,P),[[e.vModelCheckbox,me.options]])]),e.createElementVNode("div",z,[e.createElementVNode("label",{class:"option-title is-clickable",for:"option-"+se.item.id+"-"+o.id},e.toDisplayString(o.name),9,F),o.description?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(o.description),1)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",U,[e.createTextVNode("+"),e.createElementVNode("span",{innerHTML:t.$filters.price(o.price)},null,8,j)])],2)})),128))],512),[[e.vShow,me.optionsToggled]])],2)):e.createCommentVNode("v-if",!0)])],2),se.item.attributes.bundle?(e.openBlock(),e.createElementBlock("div",I,[A,e.createElementVNode("div",G,[J,e.createElementVNode("a",{onClick:i[8]||(i[8]=function(e){return me.gotoProduct(se.item.attributes.second.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.second.image}])},[se.item.attributes.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.second.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,R))],2)])]),e.createElementVNode("div",W,[se.item.attributes.second.code?(e.openBlock(),e.createElementBlock("div",X,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.second.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",Y,[e.createElementVNode("a",{onClick:i[9]||(i[9]=function(e){return me.gotoProduct(se.item.attributes.second.href)})},e.toDisplayString(se.item.attributes.second.name),1)])])])):e.createCommentVNode("v-if",!0),se.item.attributes.bundle&&se.item.attributes.third?(e.openBlock(),e.createElementBlock("div",Z,[ee,e.createElementVNode("div",te,[ie,e.createElementVNode("a",{onClick:i[10]||(i[10]=function(e){return me.gotoProduct(se.item.attributes.third.href)})},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!se.item.attributes.third.image}])},[se.item.attributes.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:se.item.attributes.third.image},null,8,oe)):(e.openBlock(),e.createElementBlock("svg",ne,ae))],2)])]),e.createElementVNode("div",re,[se.item.attributes.third.code?(e.openBlock(),e.createElementBlock("div",ce,e.toDisplayString(t.__("shop.cart.code"))+" "+e.toDisplayString(se.item.attributes.third.code),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.createElementVNode("a",{onClick:i[11]||(i[11]=function(e){return me.gotoProduct(se.item.attributes.third.href)})},e.toDisplayString(se.item.attributes.third.name),1)])])])):e.createCommentVNode("v-if",!0)])],10,o))},module.exports=i;
2
2
  //# sourceMappingURL=CartItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CartItem.js","sources":["../../../../src/components/shop/cart/CartItem.vue","../../../../src/components/shop/cart/CartItem.vue?vue&type=template&id=30ed1a56&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>"],"names":["script","name","props","item","Object","setup","cartStorage","inject","store","useStore","loading","ref","input","options","attributes","length","optionsToggled","auth","computed","getters","value","price","code","category","categoryFull","brand","property","index","itemListName","quantity","difference","dispatch","cart","product","id","finally","callback","object","ecommerce","currency","parseFloat","items","item_name","item_id","event","item_brand","item_list_name","indexOf","split","forEach","segment","trim","item_category","item_variant","$env","debug","console","log","window","dataLayer","push","watch","values","increase","decrease","remove","q","gotoProduct","href","addEventListener","commit","location","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_15","_hoisted_16","_hoisted_17","shop-product-category","_hoisted_20","shop-product-name","_hoisted_23","_hoisted_33","_hoisted_38","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_48","_hoisted_54","_hoisted_56","_hoisted_59","_hoisted_65","_hoisted_67","$props","deleted","_createElementBlock","createElementBlock","_normalizeClass","inactive","active","is-bundle","bundle","data-code","shop-product","_openBlock","_hoisted_2","_toDisplayString","_ctx","__","mb-0","onClick","$setup","apply","arguments","disabled","_createBlock","_component_wishlist_add","productId","no-thumb","image","src","_hoisted_12","_hoisted_14","_renderSlot","$slots","_hoisted_18","toDisplayString","_hoisted_19","openBlock","_hoisted_21","_hoisted_22","type","min","onUpdate:modelValue","_cache","$event","_vModelText","_hoisted_30","innerHTML","_createTextVNode","renderSlot","filters","$filters","bundle-price","priceOld","amount","percent","sum","shop-product-price","_hoisted_37","_withDirectives","_Fragment","option","key","is-checked","for","_hoisted_42","description","_hoisted_43","_hoisted_46","_hoisted_47","_hoisted_49","second","_hoisted_51","_hoisted_53","_hoisted_55","third","_hoisted_57","_hoisted_58","_hoisted_60","_hoisted_62","_hoisted_64","_hoisted_66"],"mappings":"oDAiJeA,EAAA,CACXC,KAAM,WACNC,MAAO,CACHC,KAAMC,QAEVC,MAAK,SAACH,GACF,IAAII,EAAcC,SAAO,eACzBD,EAAcA,GAA4B,OAE1C,IAAME,EAAQC,EAAAA,WACRC,EAAUC,OAAI,GACdC,EAAQD,EAAAA,MACRE,EAAUF,EAAAA,IAAIT,EAAMC,KAAKW,WAAWD,SAAWX,EAAMC,KAAKW,WAAWD,QAAQE,OAASb,EAAMC,KAAKW,WAAWD,QAAU,IACtHG,EAAiBL,OAAI,GACrBM,EAAOC,EAAAA,UAAS,WAAA,OAAMV,EAAMW,QAAQ,cAEtCjB,EAAMC,KAAKW,WAAWD,SAAWX,EAAMC,KAAKW,WAAWD,QAAQE,SAC/DC,EAAeI,OAAQ,GAG3B,IAAMnB,EAAOC,EAAMC,KAAKF,KAClBoB,EAAQnB,EAAMC,KAAKW,WAAWO,MAC9BC,EAAOpB,EAAMC,KAAKW,WAAWQ,KAC7BC,EAAWrB,EAAMC,KAAKW,WAAWU,aAAetB,EAAMC,KAAKW,WAAWU,aAAetB,EAAMC,KAAKW,WAAWS,SAC3GE,EAAQvB,EAAMC,KAAKW,WAAWW,MAC9BC,EAAWxB,EAAMC,KAAKW,WAAWY,SACjCC,EAAQzB,EAAMC,KAAKW,WAAWa,MAC9BC,EAAe1B,EAAMC,KAAKW,WAAWc,aA2ErCC,EAAW,SAACC,GACdpB,EAAQU,OAAQ,EAEhBZ,EAAMuB,SAASzB,EAAc,OAAQ,CACjC0B,KAAM1B,EACN2B,QAAS,CACLC,GAAIhC,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AAA,EAAA,IAAA,SAAAC,GAAA,OAAExB,eAAYlB,GAAAhG,KAAKW,WAAW8J,MAAMxG,SAAU4C,kBAAAb,GAAAhG,KAAKW,WAAW8J,MAAM3K,MAAG"}
1
+ {"version":3,"file":"CartItem.js","sources":["../../../../src/components/shop/cart/CartItem.vue","../../../../src/components/shop/cart/CartItem.vue?vue&type=template&id=7bd8b5c0&lang.js"],"sourcesContent":["<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>","<template>\n <div class=\"columns is-multiline shop-cart-item\" v-if=\"!item.deleted\" v-bind:class=\"{ inactive: item.attributes.active === false, 'is-bundle': item.attributes.bundle }\" :data-code=\"item.attributes.code\" shop-product>\n <div class=\"column is-12\" v-if=\"item.attributes.bundle\">\n <div class=\"bundle-title\">{{ __('shop.cart.bundle') }}</div>\n </div>\n <div class=\"column name\">\n <div class=\"columns\" v-bind:class=\"{ 'mb-0': item.attributes.bundle }\">\n <div class=\"column is-narrow cart-actions-parent\">\n <div class=\"cart-actions\">\n <button class=\"remove\" @click=\"remove\" :disabled=\"loading\">\n <svg class=\"icon\">\n <use xlink:href=\"#cart-remove\" />\n </svg>\n </button>\n <wishlist-add :id=\"item.attributes.productId ? item.attributes.productId : item.id\" :item=\"item\" v-if=\"auth && !item.attributes.bundle\"></wishlist-add>\n </div>\n </div>\n <div class=\"column is-narrow image-parent\">\n <a @click=\"gotoProduct(item.attributes.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.image }\">\n <img :src=\"item.attributes.image\" v-if=\"item.attributes.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"columns is-gapless mb-0\">\n <div class=\"column\">\n <slot name=\"item-name\" :item=\"item\" :gotoProduct=\"gotoProduct\">\n <div class=\"code\" v-if=\"item.attributes.code\">{{ __('shop.cart.code') }} {{ item.attributes.code }}</div>\n <div class=\"is-hidden\" shop-product-category>{{ item.attributes.categoryFull }}</div>\n <div class=\"title\">\n <span v-if=\"item.attributes.active === false\" shop-product-name>\n {{ item.name }}\n </span>\n <a @click=\"gotoProduct(item.attributes.href)\" v-else>{{ item.name }}</a>\n </div>\n </slot>\n </div>\n <div class=\"column is-narrow has-text-right is-relative quantity-parent\" v-if=\"true || $env.shop.isChangeQuantity\">\n <div class=\"quantity\">\n <button class=\"button decrease\" @click=\"decrease\" :disabled=\"loading || item.quantity == 1\">\n <svg>\n <use xlink:href=\"#cart-minus\" />\n </svg>\n </button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"item.quantity\" disabled />\n <button class=\"button increase\" @click=\"increase\" :disabled=\"loading\">\n <svg>\n <use xlink:href=\"#cart-plus\" />\n </svg>\n </button>\n </div>\n <div class=\"quantity-price\" v-if=\"item.quantity > 1\"><span v-html=\"$filters.price(item.attributes.price)\"></span> / {{ __('shop.cart.q') }}</div>\n </div>\n <div class=\"column is-narrow has-text-right\" v-else>{{ item.quantity }}✕</div>\n <div class=\"column is-2 has-text-right\">\n <slot name=\"item-price\" :item=\"item\" :filters=\"$filters\">\n <div class=\"price\" v-bind:class=\"{ 'bundle-price': item.attributes.bundle }\">\n <div v-if=\"item.attributes.priceOld\" class=\"price-old\" v-html=\"$filters.price(item.attributes.priceOld * item.quantity)\"></div>\n <div class=\"bundle-amount\" v-if=\"item.attributes.bundle && item.attributes.amount\" v-html=\"__('shop.cart.bundle_amount') + (item.attributes.amount.percent ? item.attributes.amount.percent + '%' : $filters.price(item.attributes.amount.sum * item.quantity))\"></div>\n <div v-html=\"$filters.price(item.attributes.price * item.quantity)\" shop-product-price></div>\n </div>\n </slot>\n </div>\n </div>\n <div class=\"options\" v-if=\"item.options && item.options.length\" v-bind:class=\"{ 'is-toggled': optionsToggled }\">\n <div class=\"toggler\" @click=\"optionsToggled = !optionsToggled\">\n <span>{{ __('shop.cart.additional') }} {{ item.options.length }}</span>\n <svg>\n <use xlink:href=\"#arrow-down\" />\n </svg>\n </div>\n <div class=\"wrapper\" v-show=\"optionsToggled\">\n <div v-for=\"(option, index) in item.options\" v-bind:key=\"index\" class=\"columns\" v-bind:class=\"{ 'is-checked': options.indexOf(option.id) !== -1 }\">\n <div class=\"column is-narrow\">\n <input type=\"checkbox\" class=\"checkbox\" v-model=\"options\" :value=\"option.id\" :id=\"'option-' + item.id + '-' + option.id\" />\n </div>\n <div class=\"column\">\n <label class=\"option-title is-clickable\" :for=\"'option-' + item.id + '-' + option.id\">{{ option.name }}</label>\n <div class=\"option-description\" v-if=\"option.description\">{{ option.description }}</div>\n </div>\n <div class=\"column is-2 has-text-right\">+<span v-html=\"$filters.price(option.price)\"></span></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.second.image }\">\n <img :src=\"item.attributes.second.image\" v-if=\"item.attributes.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.second.code\">{{ __('shop.cart.code') }} {{ item.attributes.second.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.second.href)\">{{ item.attributes.second.name }}</a>\n </div>\n </div>\n </div>\n <div class=\"bundle columns\" v-if=\"item.attributes.bundle && item.attributes.third\">\n <div class=\"column is-narrow\">\n <div class=\"cart-bundle-spacer\"></div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n <a @click=\"gotoProduct(item.attributes.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.attributes.third.image }\">\n <img :src=\"item.attributes.third.image\" v-if=\"item.attributes.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"code\" v-if=\"item.attributes.third.code\">{{ __('shop.cart.code') }} {{ item.attributes.third.code }}</div>\n <div class=\"title\">\n <a @click=\"gotoProduct(item.attributes.third.href)\">{{ item.attributes.third.name }}</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed, watch, inject } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'CartItem',\n props: {\n item: Object\n },\n setup(props) {\n let cartStorage = inject('cartStorage');\n cartStorage = cartStorage ? cartStorage : 'cart';\n\n const store = useStore();\n const loading = ref(false);\n const input = ref();\n const options = ref(props.item.attributes.options && props.item.attributes.options.length ? props.item.attributes.options : []);\n const optionsToggled = ref(false);\n const auth = computed(() => store.getters['auth/is']);\n\n if (props.item.attributes.options && props.item.attributes.options.length) {\n optionsToggled.value = true;\n }\n\n const name = props.item.name;\n const price = props.item.attributes.price;\n const code = props.item.attributes.code;\n const category = props.item.attributes.categoryFull ? props.item.attributes.categoryFull : props.item.attributes.category;\n const brand = props.item.attributes.brand;\n const property = props.item.attributes.property;\n const index = props.item.attributes.index;\n const itemListName = props.item.attributes.itemListName;\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/remove', {\n id: props.item.id,\n cart: cartStorage,\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price) * q,\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: q,\n }\n ]\n },\n event: 'remove_from_cart'\n };\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (index) {\n object.ecommerce.items[0].index = index;\n }\n\n if (itemListName) {\n object.ecommerce.items[0].item_list_name = itemListName;\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const increase = () => {\n quantity(+1);\n };\n\n const decrease = () => {\n quantity(-1);\n };\n\n const quantity = (difference) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/add', {\n cart: cartStorage,\n product: {\n id: props.item.id,\n quantity: difference\n },\n finally: () => {\n loading.value = false;\n },\n callback: () => {\n if (difference > 0) {\n const q = props.item.quantity;\n\n const object = {\n ecommerce: {\n currency: $env.locale?.currency ? $env.locale.currency : 'UAH',\n value: parseFloat(price),\n items: [\n {\n item_name: name,\n item_id: code,\n price: parseFloat(price),\n quantity: 1,\n }\n ]\n },\n event: 'add_to_cart'\n };\n\n if (brand) {\n object.ecommerce.items[0].item_brand = brand;\n }\n\n if (props.item.attributes.index) {\n object.ecommerce.items[0].index = props.item.attributes.index;\n }\n\n if (props.item.attributes.itemListName) {\n object.ecommerce.items[0].item_list_name = props.item.attributes.itemListName;\n }\n\n if (category) {\n if (category.indexOf('/') !== -1) {\n category.split('/').forEach((segment, index) => {\n object.ecommerce.items[0]['item_category' + (index ? index + 1 : '')] = segment.trim();\n });\n } else {\n object.ecommerce.items[0].item_category = category;\n }\n }\n\n if (property) {\n object.ecommerce.items[0].item_variant = property;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n }\n });\n };\n\n if (props.item.options && props.item.options.length) {\n watch(options, (options) => {\n loading.value = true;\n\n store.dispatch(cartStorage + '/options', {\n product: {\n id: props.item.id,\n options: Object.values(options)\n },\n finally: () => {\n loading.value = false;\n }\n });\n });\n }\n\n const gotoProduct = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.addEventListener('pagehide', () => {\n store.commit(cartStorage + '/modal', null);\n });\n\n window.location.href = href;\n };\n\n return {\n loading,\n increase,\n decrease,\n remove,\n options,\n optionsToggled,\n input,\n gotoProduct,\n auth\n };\n }\n};\n</script>"],"names":["script","name","props","item","Object","setup","cartStorage","inject","store","useStore","loading","ref","input","options","attributes","length","optionsToggled","auth","computed","getters","value","price","code","category","categoryFull","brand","property","index","itemListName","quantity","difference","dispatch","cart","product","id","finally","callback","_$env$locale2","object","ecommerce","currency","$env","locale","parseFloat","items","item_name","item_id","event","item_brand","item_list_name","indexOf","split","forEach","segment","trim","item_category","item_variant","debug","console","log","window","dataLayer","push","watch","values","increase","decrease","remove","_$env$locale","q","gotoProduct","href","addEventListener","commit","location","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createElementVNode","createElementVNode","xlink:href","_hoisted_10","_hoisted_15","_hoisted_16","_hoisted_17","shop-product-category","_hoisted_20","shop-product-name","_hoisted_23","_hoisted_33","_hoisted_38","_hoisted_39","_hoisted_41","_hoisted_44","_hoisted_48","_hoisted_54","_hoisted_56","_hoisted_59","_hoisted_65","_hoisted_67","$props","deleted","_createElementBlock","createElementBlock","_normalizeClass","inactive","active","is-bundle","bundle","data-code","shop-product","_openBlock","_hoisted_2","_toDisplayString","_ctx","__","mb-0","onClick","$setup","apply","arguments","disabled","_createBlock","_component_wishlist_add","productId","no-thumb","image","src","_hoisted_12","_hoisted_14","_renderSlot","$slots","_hoisted_18","toDisplayString","_hoisted_19","openBlock","_hoisted_21","_hoisted_22","type","min","onUpdate:modelValue","_cache","$event","_vModelText","_hoisted_30","innerHTML","_createTextVNode","renderSlot","filters","$filters","bundle-price","priceOld","amount","percent","sum","shop-product-price","_hoisted_37","_withDirectives","_Fragment","option","key","is-checked","for","_hoisted_42","description","_hoisted_43","_hoisted_46","_hoisted_47","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